react-luminus-components 1.3.224 → 1.3.226

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 (38) hide show
  1. package/dist/.vite/manifest.json +51 -74
  2. package/dist/{Loading-DEKu7M0N.js → Loading-C1axYZDI.js} +1 -1
  3. package/dist/{Loading-B436MONV.cjs → Loading-ldurBCf0.cjs} +1 -1
  4. package/dist/components/Documents/components/DocumentsMobile/DocumentsMobile.d.ts +2 -0
  5. package/dist/components/Documents/components/DocumentsMobile/comps/DocumentsMobileItem/DocumentsMobileItem.d.ts +7 -0
  6. package/dist/components/Documents/components/DocumentsMobile/comps/index.d.ts +1 -0
  7. package/dist/components/Documents/utils/documentsUtils.d.ts +1 -0
  8. package/dist/contexts.cjs.js +1 -1
  9. package/dist/contexts.es.js +66 -66
  10. package/dist/hooks.cjs.js +1 -1
  11. package/dist/hooks.es.js +54 -55
  12. package/dist/layout.cjs.js +1 -1
  13. package/dist/layout.es.js +37 -38
  14. package/dist/main.cjs.js +52 -52
  15. package/dist/main.es.js +4257 -4778
  16. package/dist/models/texts/DocumentsTexts.d.ts +3 -0
  17. package/dist/{nivo-bar.es-DesWgm5I.js → nivo-bar.es-DJ9CZTr8.js} +9254 -8670
  18. package/dist/nivo-bar.es-bZrvOx-V.cjs +279 -0
  19. package/dist/numberUtils-BY7ziQF8.cjs +1 -0
  20. package/dist/numberUtils-Bwf8nio8.js +7 -0
  21. package/dist/style.css +1 -1
  22. package/dist/{useGetApiData-Dpec6p_k.js → useGetApiData-B6l1jJVd.js} +5 -5
  23. package/dist/{useGetApiData-331OKKzJ.cjs → useGetApiData-XcyHeE-W.cjs} +1 -1
  24. package/dist/{usePermissions-Cc-zWmjL.cjs → usePermissions-BejhAAEt.cjs} +1 -1
  25. package/dist/usePermissions-BrCHy7zQ.js +21 -0
  26. package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +78 -0
  27. package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +1 -0
  28. package/dist/utils.cjs.js +1 -1
  29. package/dist/utils.es.js +26 -26
  30. package/package.json +1 -1
  31. package/dist/nivo-bar.es-T63HNLkn.cjs +0 -279
  32. package/dist/searchUtils-BaFWnoLc.cjs +0 -1
  33. package/dist/searchUtils-Da9P5jEW.js +0 -14
  34. package/dist/useClickOutside-BmlXg38T.js +0 -14
  35. package/dist/useClickOutside-D0505nsm.cjs +0 -1
  36. package/dist/usePermissions-BWi-fB1i.js +0 -21
  37. package/dist/useRenderDraggableInPortal-BC_cXXRv.js +0 -99
  38. package/dist/useRenderDraggableInPortal-BH0jk-pY.cjs +0 -1
@@ -1,16 +1,16 @@
1
- var Se = Object.defineProperty;
2
- var Oe = (e, t, r) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var b = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as N, bt as Ee, j as f, bu as we, $ as z, ap as Ie, bv as fe, av as S, am as je, a0 as G, bw as Pe, at as De, ar as ke, b2 as de, bx as me, b3 as Le, b4 as D, as as He, by as $e, aF as se, bz as _e, aX as pe, bA as oe, bB as Me, aq as Re } from "./nivo-bar.es-DesWgm5I.js";
5
- import E, { useState as C, useCallback as p, useMemo as A, useContext as $, useEffect as P, useRef as he, Component as te } from "react";
6
- import { EventType as W } from "@azure/msal-browser";
1
+ var be = Object.defineProperty;
2
+ var Oe = (e, t, r) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var S = (e, t, r) => Oe(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { t as N, bq as Ee, j as f, br as we, P as z, ag as Ie, bs as fe, am as b, ad as je, Q as G, bt as Pe, ak as De, ai as ke, aZ as de, bu as me, a_ as Le, a$ as D, aj as He, bv as _e, ay as se, bw as $e, aQ as pe, bx as oe, by as Me, ah as Re } from "./nivo-bar.es-DJ9CZTr8.js";
5
+ import E, { useState as C, useCallback as p, useMemo as A, useContext as _, useEffect as P, useRef as he, Component as te } from "react";
6
+ import { EventType as Z } from "@azure/msal-browser";
7
7
  import { MsalProvider as Ue } from "@azure/msal-react";
8
8
  import "react-router-dom";
9
9
  import "react-dom";
10
10
  import "react-hook-form";
11
11
  import "react-flexmonster";
12
- import { L as Ne } from "./Loading-DEKu7M0N.js";
13
- import { u as Fe } from "./useGetApiData-Dpec6p_k.js";
12
+ import { L as Ne } from "./Loading-C1axYZDI.js";
13
+ import { u as Fe } from "./useGetApiData-B6l1jJVd.js";
14
14
  import { u as qe } from "./useLocalStorageState-Bt99kkCr.js";
15
15
  function Ge(e) {
16
16
  const t = N(e);
@@ -26,21 +26,21 @@ function Ke(e, t) {
26
26
  ].sort((o, l) => o - l);
27
27
  return r >= n && r <= s;
28
28
  }
29
- function Be() {
29
+ function Ve() {
30
30
  return Ee(Date.now());
31
31
  }
32
- const Ve = ({ children: e }) => {
32
+ const Be = ({ children: e }) => {
33
33
  const [t, r] = C(!1), [n, s] = C(""), o = p((c) => {
34
34
  r(!0), s(c);
35
35
  }, []), l = p(() => {
36
36
  r(!1);
37
37
  }, []), a = A(() => ({ show: t, text: n, showConfirm: o, hideConfirm: l }), [t, n, o, l]);
38
38
  return /* @__PURE__ */ f.jsxs(we.Provider, { value: a, children: [
39
- /* @__PURE__ */ f.jsx(bt, {}),
39
+ /* @__PURE__ */ f.jsx(St, {}),
40
40
  e
41
41
  ] });
42
42
  }, Ye = () => {
43
- const { texts: { confirm: e } } = $(z), { isShown: t, text: r, onFinish: n } = Ie(), { options: s } = $(fe), [o, l] = C(s.defaultValue ?? ""), a = p(() => {
43
+ const { texts: { confirm: e } } = _(z), { isShown: t, text: r, onFinish: n } = Ie(), { options: s } = _(fe), [o, l] = C(s.defaultValue ?? ""), a = p(() => {
44
44
  n(null);
45
45
  }, [n]), c = p((u) => {
46
46
  u.preventDefault(), !(s.required && !o) && n(o);
@@ -55,20 +55,20 @@ const Ve = ({ children: e }) => {
55
55
  autoFocus: !0,
56
56
  tabIndex: 0
57
57
  }), [o]);
58
- return /* @__PURE__ */ f.jsxs(S, { show: t, size: "sm", centered: !0, onHide: a, children: [
59
- /* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: r }) }),
58
+ return /* @__PURE__ */ f.jsxs(b, { show: t, size: "sm", centered: !0, onHide: a, children: [
59
+ /* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: r }) }),
60
60
  /* @__PURE__ */ f.jsxs("form", { onSubmit: c, children: [
61
- /* @__PURE__ */ f.jsxs(S.Body, { children: [
61
+ /* @__PURE__ */ f.jsxs(b.Body, { children: [
62
62
  s.input === "textarea" ? /* @__PURE__ */ f.jsx("textarea", { ...i, rows: 5 }) : void 0,
63
63
  s.input === "input" ? /* @__PURE__ */ f.jsx(je, { ...i, type: s.type }) : void 0
64
64
  ] }),
65
- /* @__PURE__ */ f.jsxs(S.Footer, { className: "w-100 d-flex gap-5", children: [
65
+ /* @__PURE__ */ f.jsxs(b.Footer, { className: "w-100 d-flex gap-5", children: [
66
66
  /* @__PURE__ */ f.jsx(G, { variant: "outlined", color: "secondary", onClick: a, className: "flex-grow-1", children: e.cancel }),
67
67
  /* @__PURE__ */ f.jsx(G, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
68
68
  ] })
69
69
  ] })
70
70
  ] });
71
- }, Je = ({ children: e }) => {
71
+ }, Qe = ({ children: e }) => {
72
72
  const [t, r] = C(!1), [n, s] = C(""), [o, l] = C({ input: "textarea", type: "text" }), a = he(() => {
73
73
  }), c = p((d) => {
74
74
  s(d), r(!0);
@@ -87,7 +87,7 @@ const Ve = ({ children: e }) => {
87
87
  e,
88
88
  /* @__PURE__ */ f.jsx(Ye, {})
89
89
  ] });
90
- }, _t = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: a }) => {
90
+ }, $t = ({ cookieDomain: e, axiosOptions: t, language: r, texts: n, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: a }) => {
91
91
  const c = A(() => ({
92
92
  axiosOptions: t,
93
93
  cookieDomain: e,
@@ -105,7 +105,7 @@ const Ve = ({ children: e }) => {
105
105
  n,
106
106
  l
107
107
  ]);
108
- return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Ve, { children: /* @__PURE__ */ f.jsxs(Je, { children: [
108
+ return /* @__PURE__ */ f.jsx(z.Provider, { value: c, children: /* @__PURE__ */ f.jsx(Be, { children: /* @__PURE__ */ f.jsxs(Qe, { children: [
109
109
  /* @__PURE__ */ f.jsx(Pe, {}),
110
110
  a
111
111
  ] }) }) });
@@ -120,7 +120,7 @@ const Ve = ({ children: e }) => {
120
120
  e
121
121
  ] });
122
122
  }, Rt = ({ children: e }) => {
123
- const t = ke(), { msalInstance: r } = $(de), { delegation: n, setDelegation: s, setAvailableDelegations: o, refreshAvailableDelegations: l } = $(me), { getToken: a } = Le(), [c, i] = C(null), u = p(async () => {
123
+ const t = ke(), { msalInstance: r } = _(de), { delegation: n, setDelegation: s, setAvailableDelegations: o, refreshAvailableDelegations: l } = _(me), { getToken: a } = Le(), [c, i] = C(null), u = p(async () => {
124
124
  const y = await a();
125
125
  y && i(y.token);
126
126
  }, [a]);
@@ -133,7 +133,7 @@ const Ve = ({ children: e }) => {
133
133
  }, [])(), [m, g] = C({
134
134
  state: h ? D.LOGGED_IN : D.LOGGING_IN,
135
135
  user: h
136
- }), _ = p(async (y) => {
136
+ }), $ = p(async (y) => {
137
137
  let v = null;
138
138
  return await t.get("/user/detail", y ? { headers: { Authorization: `Bearer ${y}` } } : void 0).then((K) => {
139
139
  v = K.data;
@@ -150,7 +150,7 @@ const Ve = ({ children: e }) => {
150
150
  state: D.LOGGING_IN,
151
151
  user: null
152
152
  });
153
- const v = await _(y);
153
+ const v = await $(y);
154
154
  return v ? (g({
155
155
  state: D.LOGGED_IN,
156
156
  user: v
@@ -158,13 +158,13 @@ const Ve = ({ children: e }) => {
158
158
  state: D.LOGIN_FAILED,
159
159
  user: null
160
160
  }), !1);
161
- }, [_, l]), I = p(() => {
161
+ }, [$, l]), I = p(() => {
162
162
  w();
163
163
  }, [w]);
164
164
  P(() => {
165
165
  if (r) {
166
166
  const y = r.addEventCallback((v) => {
167
- if (v.eventType === W.LOGIN_SUCCESS && v.payload) {
167
+ if (v.eventType === Z.LOGIN_SUCCESS && v.payload) {
168
168
  const K = v.payload;
169
169
  i(K.accessToken);
170
170
  }
@@ -184,15 +184,15 @@ const Ve = ({ children: e }) => {
184
184
  P(() => {
185
185
  ne(c);
186
186
  }, [c, n == null ? void 0 : n.id, ne]);
187
- const be = A(() => ({
187
+ const Se = A(() => ({
188
188
  user: m.user,
189
189
  userLoginState: m,
190
190
  loginUser: O,
191
191
  logoutUser: I
192
192
  }), [m, O, I]);
193
- return /* @__PURE__ */ f.jsx(He.Provider, { value: be, children: e });
193
+ return /* @__PURE__ */ f.jsx(He.Provider, { value: Se, children: e });
194
194
  }, Ut = ({ ...e }) => {
195
- const { cookieDomain: t } = $(z), [, r] = $e(["Authorization"]), n = A(() => ({
195
+ const { cookieDomain: t } = _(z), [, r] = _e(["Authorization"]), n = A(() => ({
196
196
  useMsal: e.useMsal ?? !1,
197
197
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
198
198
  msalScopes: e.useMsal ? e.msalScopes ?? [] : [],
@@ -201,7 +201,7 @@ const Ve = ({ children: e }) => {
201
201
  return P(() => {
202
202
  if (e.useMsal) {
203
203
  const s = e.msalInstance.addEventCallback((o) => {
204
- if (o.eventType === W.LOGIN_SUCCESS || o.eventType === W.ACQUIRE_TOKEN_SUCCESS && o.payload) {
204
+ if (o.eventType === Z.LOGIN_SUCCESS || o.eventType === Z.ACQUIRE_TOKEN_SUCCESS && o.payload) {
205
205
  const l = o.payload, a = l.account;
206
206
  e.msalInstance.setActiveAccount(a);
207
207
  const c = l.accessToken, i = l.expiresOn;
@@ -226,7 +226,7 @@ const Ve = ({ children: e }) => {
226
226
  const [r, n, s] = qe("user-delegation", null), o = A(() => {
227
227
  if (!r)
228
228
  return null;
229
- const d = r.from ? se(r.from) : Be(), h = r.to ? se(r.to) : ze();
229
+ const d = r.from ? se(r.from) : Ve(), h = r.to ? se(r.to) : ze();
230
230
  return Ke(new Date(Date.now()), { start: d, end: h }) ? r : (n(null), null);
231
231
  }, [r, n]), { data: l, setData: a, reloadData: c } = Fe(t, {
232
232
  nullStateBeforeLoad: !1,
@@ -234,7 +234,7 @@ const Ve = ({ children: e }) => {
234
234
  }), i = he(null);
235
235
  P(() => {
236
236
  const d = () => {
237
- c(), i.current = window.setTimeout(d, _e() + 5e3);
237
+ c(), i.current = window.setTimeout(d, $e() + 5e3);
238
238
  };
239
239
  return d(), () => {
240
240
  i.current !== null && window.clearTimeout(i.current);
@@ -262,7 +262,7 @@ const Ve = ({ children: e }) => {
262
262
  ]);
263
263
  return /* @__PURE__ */ f.jsx(me.Provider, { value: u, children: e });
264
264
  };
265
- var We = typeof Element < "u", Ze = typeof Map == "function", Qe = typeof Set == "function", Xe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
265
+ var Ze = typeof Element < "u", Je = typeof Map == "function", We = typeof Set == "function", Xe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
266
266
  function F(e, t) {
267
267
  if (e === t) return !0;
268
268
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -275,7 +275,7 @@ function F(e, t) {
275
275
  return !0;
276
276
  }
277
277
  var o;
278
- if (Ze && e instanceof Map && t instanceof Map) {
278
+ if (Je && e instanceof Map && t instanceof Map) {
279
279
  if (e.size !== t.size) return !1;
280
280
  for (o = e.entries(); !(n = o.next()).done; )
281
281
  if (!t.has(n.value[0])) return !1;
@@ -283,7 +283,7 @@ function F(e, t) {
283
283
  if (!F(n.value[1], t.get(n.value[0]))) return !1;
284
284
  return !0;
285
285
  }
286
- if (Qe && e instanceof Set && t instanceof Set) {
286
+ if (We && e instanceof Set && t instanceof Set) {
287
287
  if (e.size !== t.size) return !1;
288
288
  for (o = e.entries(); !(n = o.next()).done; )
289
289
  if (!t.has(n.value[0])) return !1;
@@ -301,7 +301,7 @@ function F(e, t) {
301
301
  if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
302
302
  for (n = r; n-- !== 0; )
303
303
  if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
304
- if (We && e instanceof Element) return !1;
304
+ if (Ze && e instanceof Element) return !1;
305
305
  for (n = r; n-- !== 0; )
306
306
  if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !F(e[s[n]], t[s[n]]))
307
307
  return !1;
@@ -341,7 +341,7 @@ var rt = function(t, r, n, s) {
341
341
  return !0;
342
342
  };
343
343
  const nt = /* @__PURE__ */ pe(rt);
344
- var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(ye || {}), B = {
344
+ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(ye || {}), V = {
345
345
  link: { rel: ["amphtml", "canonical", "alternate"] },
346
346
  script: { type: ["application/ld+json"] },
347
347
  meta: {
@@ -401,7 +401,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
401
401
  const n = H(e, L.DEFAULT_TITLE);
402
402
  return t || n || void 0;
403
403
  }, at = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
404
- }), V = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), it = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
404
+ }), B = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), it = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
405
405
  if (!r.length) {
406
406
  const s = Object.keys(n);
407
407
  for (let o = 0; o < s.length; o += 1) {
@@ -451,10 +451,10 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
451
451
  "href"
452
452
  /* HREF */
453
453
  ], e),
454
- bodyAttributes: V("bodyAttributes", e),
454
+ bodyAttributes: B("bodyAttributes", e),
455
455
  defer: H(e, L.DEFER),
456
456
  encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
457
- htmlAttributes: V("htmlAttributes", e),
457
+ htmlAttributes: B("htmlAttributes", e),
458
458
  linkTags: M(
459
459
  "link",
460
460
  [
@@ -495,7 +495,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
495
495
  /* CSS_TEXT */
496
496
  ], e),
497
497
  title: ot(e),
498
- titleAttributes: V("titleAttributes", e),
498
+ titleAttributes: B("titleAttributes", e),
499
499
  prioritizeSeoTags: ct(e, L.PRIORITIZE_SEO_TAGS)
500
500
  }), ge = (e) => Array.isArray(e) ? e.join("") : e, ft = (e, t) => {
501
501
  const r = Object.keys(e);
@@ -514,15 +514,15 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
514
514
  "script",
515
515
  "style"
516
516
  /* STYLE */
517
- ], Z = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), Te = (e) => Object.keys(e).reduce((t, r) => {
517
+ ], J = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), Te = (e) => Object.keys(e).reduce((t, r) => {
518
518
  const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
519
519
  return t ? `${t} ${n}` : n;
520
520
  }, ""), mt = (e, t, r, n) => {
521
521
  const s = Te(r), o = ge(t);
522
- return s ? `<${e} ${x}="true" ${s}>${Z(
522
+ return s ? `<${e} ${x}="true" ${s}>${J(
523
523
  o,
524
524
  n
525
- )}</${e}>` : `<${e} ${x}="true">${Z(
525
+ )}</${e}>` : `<${e} ${x}="true">${J(
526
526
  o,
527
527
  n
528
528
  )}</${e}>`;
@@ -530,7 +530,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
530
530
  const o = s, l = Object.keys(o).filter(
531
531
  (i) => !(i === "innerHTML" || i === "cssText")
532
532
  ).reduce((i, u) => {
533
- const d = typeof o[u] > "u" ? u : `${u}="${Z(o[u], r)}"`;
533
+ const d = typeof o[u] > "u" ? u : `${u}="${J(o[u], r)}"`;
534
534
  return i ? `${i} ${d}` : d;
535
535
  }, ""), a = o.innerHTML || o.cssText || "", c = dt.indexOf(e) === -1;
536
536
  return `${n}<${e} ${x}="true" ${l}${c ? "/>" : `>${a}</${e}>`}`;
@@ -576,7 +576,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
576
576
  };
577
577
  }
578
578
  }, yt = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
579
- const s = Y(e, B.meta), o = Y(t, B.link), l = Y(r, B.script);
579
+ const s = Y(e, V.meta), o = Y(t, V.link), l = Y(r, V.script);
580
580
  return {
581
581
  priorityMethods: {
582
582
  toComponent: () => [
@@ -626,12 +626,12 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
626
626
  style: T("style", l, n),
627
627
  title: T("title", { title: a, titleAttributes: c }, n)
628
628
  };
629
- }, Q = gt, U = [], xe = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
629
+ }, W = gt, U = [], xe = !!(typeof window < "u" && window.document && window.document.createElement), X = class {
630
630
  constructor(e, t) {
631
- b(this, "instances", []);
632
- b(this, "canUseDOM", xe);
633
- b(this, "context");
634
- b(this, "value", {
631
+ S(this, "instances", []);
632
+ S(this, "canUseDOM", xe);
633
+ S(this, "context");
634
+ S(this, "value", {
635
635
  setHelmet: (e) => {
636
636
  this.context.helmet = e;
637
637
  },
@@ -646,7 +646,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
646
646
  }
647
647
  }
648
648
  });
649
- this.context = e, this.canUseDOM = t || !1, t || (e.helmet = Q({
649
+ this.context = e, this.canUseDOM = t || !1, t || (e.helmet = W({
650
650
  baseTag: [],
651
651
  bodyAttributes: {},
652
652
  encodeSpecialCharacters: !0,
@@ -663,13 +663,13 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
663
663
  }, Tt = {}, Ce = E.createContext(Tt), j, Ae = (j = class extends te {
664
664
  constructor(r) {
665
665
  super(r);
666
- b(this, "helmetData");
666
+ S(this, "helmetData");
667
667
  this.helmetData = new X(this.props.context || {}, j.canUseDOM);
668
668
  }
669
669
  render() {
670
670
  return /* @__PURE__ */ E.createElement(Ce.Provider, { value: this.helmetData.value }, this.props.children);
671
671
  }
672
- }, b(j, "canUseDOM", xe), j), k = (e, t) => {
672
+ }, S(j, "canUseDOM", xe), j), k = (e, t) => {
673
673
  const r = document.head || document.querySelector(
674
674
  "head"
675
675
  /* HEAD */
@@ -733,11 +733,11 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
733
733
  noscriptTags: k("noscript", a),
734
734
  scriptTags: k("script", i),
735
735
  styleTags: k("style", u)
736
- }, g = {}, _ = {};
736
+ }, g = {}, $ = {};
737
737
  Object.keys(m).forEach((w) => {
738
738
  const { newTags: O, oldTags: I } = m[w];
739
- O.length && (g[w] = O), I.length && (_[w] = m[w].oldTags);
740
- }), t && t(), c(e, g, _);
739
+ O.length && (g[w] = O), I.length && ($[w] = m[w].oldTags);
740
+ }), t && t(), c(e, g, $);
741
741
  }, R = null, xt = (e) => {
742
742
  R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
743
743
  le(e, () => {
@@ -747,7 +747,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
747
747
  }, Ct = xt, ce = class extends te {
748
748
  constructor() {
749
749
  super(...arguments);
750
- b(this, "rendered", !1);
750
+ S(this, "rendered", !1);
751
751
  }
752
752
  shouldComponentUpdate(t) {
753
753
  return !nt(t, this.props);
@@ -768,7 +768,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
768
768
  return delete l.context, l;
769
769
  })
770
770
  );
771
- Ae.canUseDOM ? Ct(s) : Q && (n = Q(s)), r(n);
771
+ Ae.canUseDOM ? Ct(s) : W && (n = W(s)), r(n);
772
772
  }
773
773
  // componentWillMount will be deprecated
774
774
  // for SSR, initialize on first render
@@ -783,7 +783,7 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
783
783
  render() {
784
784
  return this.init(), null;
785
785
  }
786
- }, J, At = (J = class extends te {
786
+ }, Q, At = (Q = class extends te {
787
787
  shouldComponentUpdate(e) {
788
788
  return !tt(ie(this.props, "helmetData"), ie(e, "helmetData"));
789
789
  }
@@ -901,11 +901,11 @@ var ye = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "he
901
901
  }
902
902
  return n ? /* @__PURE__ */ E.createElement(ce, { ...r, context: n.value }) : /* @__PURE__ */ E.createElement(Ce.Consumer, null, (s) => /* @__PURE__ */ E.createElement(ce, { ...r, context: s }));
903
903
  }
904
- }, b(J, "defaultProps", {
904
+ }, S(Q, "defaultProps", {
905
905
  defer: !0,
906
906
  encodeSpecialCharacters: !0,
907
907
  prioritizeSeoTags: !1
908
- }), J);
908
+ }), Q);
909
909
  const ue = (e, t) => e ? `${e} | ${t}` : t, Ft = ({ defaultHelmet: e, children: t, helmetPrefix: r }) => {
910
910
  const [n, s] = C([
911
911
  ue(r ?? "", e)
@@ -918,11 +918,11 @@ const ue = (e, t) => e ? `${e} | ${t}` : t, Ft = ({ defaultHelmet: e, children:
918
918
  /* @__PURE__ */ f.jsx(At, { defer: !1, children: /* @__PURE__ */ f.jsx("title", { children: a }) }),
919
919
  t
920
920
  ] }) });
921
- }, bt = () => {
922
- const { texts: { confirm: e } } = $(z), { onConfirm: t, onCancel: r, text: n, show: s } = Re();
923
- return /* @__PURE__ */ f.jsxs(S, { show: s, size: "sm", centered: !0, onHide: r, children: [
924
- /* @__PURE__ */ f.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(S.Title, { children: n }) }),
925
- /* @__PURE__ */ f.jsx(S.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
921
+ }, St = () => {
922
+ const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: r, text: n, show: s } = Re();
923
+ return /* @__PURE__ */ f.jsxs(b, { show: s, size: "sm", centered: !0, onHide: r, children: [
924
+ /* @__PURE__ */ f.jsx(b.Header, { className: "justify-content-center", children: /* @__PURE__ */ f.jsx(b.Title, { children: n }) }),
925
+ /* @__PURE__ */ f.jsx(b.Body, { children: /* @__PURE__ */ f.jsxs("div", { className: "w-100 d-flex gap-5", children: [
926
926
  /* @__PURE__ */ f.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: r, children: e.no }),
927
927
  /* @__PURE__ */ f.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
928
928
  ] }) })
@@ -938,7 +938,7 @@ export {
938
938
  De as LoadingContext,
939
939
  Mt as LoadingProvider,
940
940
  z as LuminusComponentsContext,
941
- _t as LuminusComponentsProvider,
941
+ $t as LuminusComponentsProvider,
942
942
  He as UserContext,
943
943
  Rt as UserProvider
944
944
  };
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar.es-T63HNLkn.cjs"),k=require("./useClickOutside-D0505nsm.cjs"),T=require("./usePermissions-Cc-zWmjL.cjs"),l=require("./useRenderDraggableInPortal-BH0jk-pY.cjs"),x=require("./useGetApiData-331OKKzJ.cjs"),c=require("react"),B=require("./useLocalStorageState-BFc8Gc8H.cjs");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const G=r=>{let e="pending",u;const t=r.then(s=>{e="success",u=s},s=>{e="error",u=s});return()=>{switch(e){case"pending":throw t;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function L(r,e){const u=a.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),[t,s]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=u.get(r).then(o=>o.data);s(G(n))})()},[u,r]),t}const O=(r,e,u)=>{let t="pending",s;const d=r.then(n=>{t="success",s=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(t="error-404",s=n):(t="error",s=n)});return()=>{switch(t){case"pending":throw d;case"success":return s;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},i={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(r,{loadOnInit:e=i.loadOnInit,enabled:u=i.enabled,silent:t=i.silent,nullStateBeforeLoad:s=i.nullStateBeforeLoad,nullStateOnFail:d=i.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=i)=>{const p=a.useAxios({silent:t,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(a.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=a.useAuth(),[q,g]=c.useState(null),m=c.useCallback(async(f,y)=>{if(!P()||u===!1)return;!t&&D(`loadData-${r}-${y}`),s&&g(null);const b=p.get(r,{signal:f}).then(A=>h?h(A.data):A.data).finally(()=>!t&&w(`loadData-${r}-${y}`));g(O(b,d??!1,S??!1))},[P,u,t,D,r,s,p,h,w,d,S]);return c.useEffect(()=>{if(e===!1)return;const f=new AbortController;return m(f.signal,++C.current),()=>{f.abort()}},[m,e]),{data:q,setData:g,reloadData:m}};exports.cancelToken=a.cancelToken;exports.useAuth=a.useAuth;exports.useAxios=a.useAxios;exports.useConfirm=a.useConfirm;exports.useFormControlType=a.useFormControlType;exports.useNotifications=a.useNotifications;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.useZodSchemaTypes;exports.useClickOutside=k.useClickOutside;exports.usePermissions=T.usePermissions;exports.useClipboard=l.useClipboard;exports.useEmployeePhotoPath=l.useEmployeePhotoPath;exports.useKeyPress=l.useKeyPress;exports.useRenderDraggableInPortal=l.useRenderDraggableInPortal;exports.useSearchQuery=l.useSearchQuery;exports.useSearchQueryState=l.useSearchQueryState;exports.useGetApiData=x.useGetApiData;exports.useLocalStorageState=B.useLocalStorageState;exports.useGetApiDataBound=E;exports.useGetDataBound=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar.es-bZrvOx-V.cjs"),k=require("./usePermissions-BejhAAEt.cjs"),T=require("./useGetApiData-XcyHeE-W.cjs"),c=require("react"),x=require("./useLocalStorageState-BFc8Gc8H.cjs"),f=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 B=r=>{let t="pending",u;const s=r.then(a=>{t="success",u=a},a=>{t="error",u=a});return()=>{switch(t){case"pending":throw s;case"success":return u;case"error":throw u;default:throw new Error("Unknown status")}}};function G(r,t){const u=e.useAxios({silent:!0,differentBaseUrl:t==null?void 0:t.customBaseUrl,customToken:t==null?void 0:t.customToken}),[s,a]=c.useState(null);return c.useEffect(()=>{(async()=>{const n=u.get(r).then(o=>o.data);a(B(n))})()},[u,r]),s}const L=(r,t,u)=>{let s="pending",a;const i=r.then(n=>{s="success",a=n},n=>{const o=n==null?void 0:n.response;(o==null?void 0:o.status)===404&&u?(s="error-404",a=n):(s="error",a=n)});return()=>{switch(s){case"pending":throw i;case"success":return a;case"error":return null;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},l={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},E=(r,{loadOnInit:t=l.loadOnInit,enabled:u=l.enabled,silent:s=l.silent,nullStateBeforeLoad:a=l.nullStateBeforeLoad,nullStateOnFail:i=l.nullStateOnFail,customApiUrl:n,customBearerToken:o,dataTransformer:h,errorBoundaryOn404:S}=l)=>{const p=e.useAxios({silent:s,customToken:o,differentBaseUrl:n,noToastOnStatus:S?[404]:void 0}),{startLoading:D,stopLoading:w}=c.useContext(e.LoadingContext),C=c.useRef(0),{isAuthenticated:P}=e.useAuth(),[b,g]=c.useState(null),m=c.useCallback(async(d,y)=>{if(!P()||u===!1)return;!s&&D(`loadData-${r}-${y}`),a&&g(null);const q=p.get(r,{signal:d}).then(A=>h?h(A.data):A.data).finally(()=>!s&&w(`loadData-${r}-${y}`));g(L(q,i??!1,S??!1))},[P,u,s,D,r,a,p,h,w,i,S]);return c.useEffect(()=>{if(t===!1)return;const d=new AbortController;return m(d.signal,++C.current),()=>{d.abort()}},[m,t]),{data:b,setData:g,reloadData:m}};exports.cancelToken=e.cancelToken;exports.useAuth=e.useAuth;exports.useAxios=e.useAxios;exports.useClickOutside=e.useClickOutside;exports.useClipboard=e.useClipboard;exports.useConfirm=e.useConfirm;exports.useFormControlType=e.useFormControlType;exports.useKeyPress=e.useKeyPress;exports.useNotifications=e.useNotifications;exports.usePrompt=e.usePrompt;exports.useWindowSize=e.useWindowSize;exports.useZodSchemaTypes=e.useZodSchemaTypes;exports.usePermissions=k.usePermissions;exports.useGetApiData=T.useGetApiData;exports.useLocalStorageState=x.useLocalStorageState;exports.useEmployeePhotoPath=f.useEmployeePhotoPath;exports.useRenderDraggableInPortal=f.useRenderDraggableInPortal;exports.useSearchQuery=f.useSearchQuery;exports.useSearchQueryState=f.useSearchQueryState;exports.useGetApiDataBound=E;exports.useGetDataBound=G;
package/dist/hooks.es.js CHANGED
@@ -1,20 +1,19 @@
1
- import { ar as S, at as P, b3 as L } from "./nivo-bar.es-DesWgm5I.js";
2
- import { bC as j, aq as H, ae as J, au as M, ap as V, aI as X, bD as Y } from "./nivo-bar.es-DesWgm5I.js";
3
- import { u as ee } from "./useClickOutside-BmlXg38T.js";
4
- import { u as se } from "./usePermissions-BWi-fB1i.js";
5
- import { u as re, e as oe, a as ne, b as ue, c as ce, d as le } from "./useRenderDraggableInPortal-BC_cXXRv.js";
6
- import { u as fe } from "./useGetApiData-Dpec6p_k.js";
7
- import { useState as b, useEffect as C, useContext as T, useRef as U, useCallback as $ } from "react";
8
- import { u as me } from "./useLocalStorageState-Bt99kkCr.js";
1
+ import { ai as S, ak as B, a_ as P } from "./nivo-bar.es-DJ9CZTr8.js";
2
+ import { bz as j, aK as q, bC as H, ah as J, bB as M, aU as V, al as X, ag as Y, aB as ee, bA as te } from "./nivo-bar.es-DJ9CZTr8.js";
3
+ import { u as ae } from "./usePermissions-BrCHy7zQ.js";
4
+ import { u as re } from "./useGetApiData-B6l1jJVd.js";
5
+ import { useState as x, useEffect as C, useContext as U, useRef as L, useCallback as T } from "react";
6
+ import { u as ue } from "./useLocalStorageState-Bt99kkCr.js";
7
+ import { c as ce, u as ie, a as fe, b as de } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
9
8
  import "react-router-dom";
10
9
  import "react-dom";
11
10
  import "react-hook-form";
12
11
  import "react-flexmonster";
13
12
  import "@azure/msal-browser";
14
13
  import "@azure/msal-react";
15
- const B = (r) => {
14
+ const $ = (o) => {
16
15
  let e = "pending", a;
17
- const t = r.then((s) => {
16
+ const t = o.then((s) => {
18
17
  e = "success", a = s;
19
18
  }, (s) => {
20
19
  e = "error", a = s;
@@ -32,31 +31,31 @@ const B = (r) => {
32
31
  }
33
32
  };
34
33
  };
35
- function z(r, e) {
34
+ function Q(o, e) {
36
35
  const a = S({
37
36
  silent: !0,
38
37
  differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
39
38
  customToken: e == null ? void 0 : e.customToken
40
- }), [t, s] = b(null);
39
+ }), [t, s] = x(null);
41
40
  return C(() => {
42
41
  (async () => {
43
- const o = a.get(r).then((n) => n.data);
44
- s(B(o));
42
+ const r = a.get(o).then((n) => n.data);
43
+ s($(r));
45
44
  })();
46
- }, [a, r]), t;
45
+ }, [a, o]), t;
47
46
  }
48
- const E = (r, e, a) => {
47
+ const E = (o, e, a) => {
49
48
  let t = "pending", s;
50
- const c = r.then((o) => {
51
- t = "success", s = o;
52
- }, (o) => {
53
- const n = o == null ? void 0 : o.response;
54
- (n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s = o) : (t = "error", s = o);
49
+ const l = o.then((r) => {
50
+ t = "success", s = r;
51
+ }, (r) => {
52
+ const n = r == null ? void 0 : r.response;
53
+ (n == null ? void 0 : n.status) === 404 && a ? (t = "error-404", s = r) : (t = "error", s = r);
55
54
  });
56
55
  return () => {
57
56
  switch (t) {
58
57
  case "pending":
59
- throw c;
58
+ throw l;
60
59
  case "success":
61
60
  return s;
62
61
  case "error":
@@ -73,62 +72,62 @@ const E = (r, e, a) => {
73
72
  enabled: !0,
74
73
  nullStateBeforeLoad: !0,
75
74
  nullStateOnFail: !1
76
- }, K = (r, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: c = u.nullStateOnFail, customApiUrl: o, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
75
+ }, N = (o, { loadOnInit: e = u.loadOnInit, enabled: a = u.enabled, silent: t = u.silent, nullStateBeforeLoad: s = u.nullStateBeforeLoad, nullStateOnFail: l = u.nullStateOnFail, customApiUrl: r, customBearerToken: n, dataTransformer: i, errorBoundaryOn404: f } = u) => {
77
76
  const p = S({
78
77
  silent: t,
79
78
  customToken: n,
80
- differentBaseUrl: o,
79
+ differentBaseUrl: r,
81
80
  noToastOnStatus: f ? [404] : void 0
82
- }), { startLoading: h, stopLoading: g } = T(P), k = U(0), { isAuthenticated: w } = L(), [y, d] = b(null), m = $(async (l, D) => {
81
+ }), { startLoading: h, stopLoading: g } = U(B), k = L(0), { isAuthenticated: w } = P(), [A, d] = x(null), m = T(async (c, D) => {
83
82
  if (!w() || a === !1)
84
83
  return;
85
- !t && h(`loadData-${r}-${D}`), s && d(null);
86
- const A = p.get(r, {
87
- signal: l
88
- }).then((x) => i ? i(x.data) : x.data).finally(() => !t && g(`loadData-${r}-${D}`));
89
- d(E(A, c ?? !1, f ?? !1));
84
+ !t && h(`loadData-${o}-${D}`), s && d(null);
85
+ const y = p.get(o, {
86
+ signal: c
87
+ }).then((b) => i ? i(b.data) : b.data).finally(() => !t && g(`loadData-${o}-${D}`));
88
+ d(E(y, l ?? !1, f ?? !1));
90
89
  }, [
91
90
  w,
92
91
  a,
93
92
  t,
94
93
  h,
95
- r,
94
+ o,
96
95
  s,
97
96
  p,
98
97
  i,
99
98
  g,
100
- c,
99
+ l,
101
100
  f
102
101
  ]);
103
102
  return C(() => {
104
103
  if (e === !1)
105
104
  return;
106
- const l = new AbortController();
107
- return m(l.signal, ++k.current), () => {
108
- l.abort();
105
+ const c = new AbortController();
106
+ return m(c.signal, ++k.current), () => {
107
+ c.abort();
109
108
  };
110
- }, [m, e]), { data: y, setData: d, reloadData: m };
109
+ }, [m, e]), { data: A, setData: d, reloadData: m };
111
110
  };
112
111
  export {
113
112
  j as cancelToken,
114
- L as useAuth,
113
+ P as useAuth,
115
114
  S as useAxios,
116
- ee as useClickOutside,
117
- re as useClipboard,
118
- H as useConfirm,
119
- oe as useEmployeePhotoPath,
120
- J as useFormControlType,
121
- fe as useGetApiData,
122
- K as useGetApiDataBound,
123
- z as useGetDataBound,
124
- ne as useKeyPress,
125
- me as useLocalStorageState,
126
- M as useNotifications,
127
- se as usePermissions,
128
- V as usePrompt,
129
- ue as useRenderDraggableInPortal,
130
- ce as useSearchQuery,
131
- le as useSearchQueryState,
132
- X as useWindowSize,
133
- Y as useZodSchemaTypes
115
+ q as useClickOutside,
116
+ H as useClipboard,
117
+ J as useConfirm,
118
+ ce as useEmployeePhotoPath,
119
+ M as useFormControlType,
120
+ re as useGetApiData,
121
+ N as useGetApiDataBound,
122
+ Q as useGetDataBound,
123
+ V as useKeyPress,
124
+ ue as useLocalStorageState,
125
+ X as useNotifications,
126
+ ae as usePermissions,
127
+ Y as usePrompt,
128
+ ie as useRenderDraggableInPortal,
129
+ fe as useSearchQuery,
130
+ de as useSearchQueryState,
131
+ ee as useWindowSize,
132
+ te as useZodSchemaTypes
134
133
  };