react-luminus-components 1.3.25 → 1.3.27

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 (57) hide show
  1. package/dist/.vite/manifest.json +89 -74
  2. package/dist/PrimaryButton-C3toFFlE.cjs +1 -0
  3. package/dist/{PrimaryButton-Bewa28m7.js → PrimaryButton-CToGCd5i.js} +31 -25
  4. package/dist/{SimpleTooltip-B7H1sJLN.js → SimpleTooltip-0rNY6uR5.js} +1 -1
  5. package/dist/{SimpleTooltip-Cssc2MLs.cjs → SimpleTooltip-E2QIyvNE.cjs} +1 -1
  6. package/dist/{UserAvatarToggle-C1CRXpP2.js → UserAvatarToggle-CIpmuTVE.js} +66 -62
  7. package/dist/{UserAvatarToggle-DYIBvTYX.cjs → UserAvatarToggle-J8ZQDJ2r.cjs} +2 -2
  8. package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +14 -0
  9. package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +12 -0
  10. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +7 -0
  11. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +11 -0
  12. package/dist/components/Layout/MessageBoard/components/MessageList/comps/index.d.ts +2 -0
  13. package/dist/components/Layout/MessageBoard/components/index.d.ts +1 -0
  14. package/dist/components/Layout/index.d.ts +1 -0
  15. package/dist/components/common/AlertItem/AlertItem.d.ts +9 -0
  16. package/dist/components/common/index.d.ts +1 -0
  17. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +17 -5
  18. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +10 -3
  19. package/dist/contexts.cjs.js +1 -1
  20. package/dist/contexts.d.ts +248 -1
  21. package/dist/contexts.es.js +161 -152
  22. package/dist/dateUtils-C47nO5qP.js +13 -0
  23. package/dist/dateUtils-Dy3knMZB.cjs +1 -0
  24. package/dist/hooks.cjs.js +1 -1
  25. package/dist/hooks.d.ts +162 -1
  26. package/dist/hooks.es.js +73 -2944
  27. package/dist/{latinize-BQrinury.js → latinize-B-UfS78J.js} +41 -34
  28. package/dist/{latinize-DaqzUOla.cjs → latinize-Dl6DAk4g.cjs} +1 -1
  29. package/dist/layout.cjs.js +1 -1
  30. package/dist/layout.d.ts +56 -1
  31. package/dist/layout.es.js +13 -12
  32. package/dist/main.cjs.js +28 -1
  33. package/dist/main.d.ts +2 -1
  34. package/dist/main.es.js +3298 -2021
  35. package/dist/models/index.d.ts +3 -0
  36. package/dist/models/luminus-context-types/CommonLuminusIcons.d.ts +2 -0
  37. package/dist/models/luminus-context-types/ILocalizationContext.d.ts +7 -0
  38. package/dist/models/texts/MessageBoardTexts.d.ts +4 -0
  39. package/dist/models/types/BaseMessageBoardModel.d.ts +8 -0
  40. package/dist/parseISO-DTRVS-Fr.cjs +1 -0
  41. package/dist/{dateUtils-C7tHbjab.js → parseISO-DxNDV6y0.js} +37 -46
  42. package/dist/{searchUtils-Do20vjZW.cjs → searchUtils-CYFu8LBz.cjs} +1 -1
  43. package/dist/searchUtils-Dxbvcicv.js +7 -0
  44. package/dist/style.css +1 -1
  45. package/dist/useLocalStorageState-KNanBZsO.cjs +1 -0
  46. package/dist/{useLocalStorageState-DblJQuM7.js → useLocalStorageState-MzPp9GNd.js} +11 -10
  47. package/dist/{usePermissions-avh3rydq.js → usePermissions-BZKgvDp_.js} +5 -4
  48. package/dist/usePermissions-DB7RkdYM.cjs +1 -0
  49. package/dist/utils.cjs.js +1 -1
  50. package/dist/utils.d.ts +38 -1
  51. package/dist/utils.es.js +10 -10
  52. package/package.json +2 -2
  53. package/dist/PrimaryButton-DXGul-f9.cjs +0 -1
  54. package/dist/dateUtils-b-AkAh2Y.cjs +0 -1
  55. package/dist/searchUtils-Du4JnXdQ.js +0 -7
  56. package/dist/useLocalStorageState-CxsNjf78.cjs +0 -1
  57. package/dist/usePermissions-BEKIk6u3.cjs +0 -1
@@ -1,112 +1,121 @@
1
- import { j as a, am as H, Q as b, an as M, ao as q, ap as V, L as O, K as d, aq as $, ar as Q, as as D, ab as J, ae as F, at as z, af as W, ah as N, ag as X, au as Y } from "./UserAvatarToggle-C1CRXpP2.js";
2
- import Z, { useState as h, useCallback as E, useMemo as C, useContext as L, useEffect as v, useRef as K, useReducer as ee } from "react";
3
- import "./latinize-BQrinury.js";
1
+ import { j as a, am as B, Q as j, an as M, ao as q, ap as V, L as _, K as d, aq as $, ar as Q, as as D, a5 as J, ae as F, at as K, af as W, ah as T, ag as X, au as Y } from "./UserAvatarToggle-CIpmuTVE.js";
2
+ import Z, { useState as h, useCallback as E, useMemo as C, useContext as y, useEffect as v, useRef as z, useReducer as ee } from "react";
3
+ import "./latinize-B-UfS78J.js";
4
+ import "zod";
4
5
  import "react-hook-form";
5
- import { u as te, a as ne, b as se, c as oe } from "./useLocalStorageState-DblJQuM7.js";
6
- import { M as S, b as re, P as _, L as ae, E as f } from "./PrimaryButton-Bewa28m7.js";
7
- import { m as ce } from "./dateUtils-C7tHbjab.js";
6
+ import { u as te, a as se, b as ne, c as re } from "./useLocalStorageState-MzPp9GNd.js";
7
+ import { f as S, b as oe, P as w, L as ae, E as f } from "./PrimaryButton-CToGCd5i.js";
8
+ import { m as ce } from "./dateUtils-C47nO5qP.js";
8
9
  const le = ({ children: e }) => {
9
- const [r, t] = h(!1), [s, n] = h(""), o = E((i) => {
10
- t(!0), n(i);
10
+ const [o, t] = h(!1), [n, s] = h(""), r = E((i) => {
11
+ t(!0), s(i);
11
12
  }, []), c = E(() => {
12
13
  t(!1);
13
- }, []), l = C(() => ({ show: r, text: s, showConfirm: o, hideConfirm: c }), [r, s, o, c]);
14
- return /* @__PURE__ */ a.jsxs(H.Provider, { value: l, children: [
14
+ }, []), l = C(() => ({ show: o, text: n, showConfirm: r, hideConfirm: c }), [o, n, r, c]);
15
+ return /* @__PURE__ */ a.jsxs(B.Provider, { value: l, children: [
15
16
  /* @__PURE__ */ a.jsx(Ee, {}),
16
17
  e
17
18
  ] });
18
19
  }, ie = () => {
19
- const { confirmTexts: e } = L(b), { isShown: r, text: t, onFinish: s } = te(), { options: n } = L(M), [o, c] = h(n.defaultValue ?? ""), l = E(() => {
20
- s(null);
21
- }, [s]), i = E((u) => {
22
- u.preventDefault(), !(n.required && !o) && s(o);
23
- }, [s, n.required, o]);
20
+ const { confirmTexts: e } = y(j), { isShown: o, text: t, onFinish: n } = te(), { options: s } = y(M), [r, c] = h(s.defaultValue ?? ""), l = E(() => {
21
+ n(null);
22
+ }, [n]), i = E((u) => {
23
+ u.preventDefault(), !(s.required && !r) && n(r);
24
+ }, [n, s.required, r]);
24
25
  v(() => {
25
- r === !0 && c(n.defaultValue ?? "");
26
- }, [r, n.defaultValue]);
26
+ o === !0 && c(s.defaultValue ?? "");
27
+ }, [o, s.defaultValue]);
27
28
  const g = C(() => ({
28
- value: o,
29
+ value: r,
29
30
  onChange: (u) => c(u.currentTarget.value),
30
31
  className: "w-100",
31
32
  autoFocus: !0,
32
33
  tabIndex: 0
33
- }), [o]);
34
- return /* @__PURE__ */ a.jsxs(S, { show: r, size: "sm", centered: !0, onHide: l, children: [
34
+ }), [r]);
35
+ return /* @__PURE__ */ a.jsxs(S, { show: o, size: "sm", centered: !0, onHide: l, children: [
35
36
  /* @__PURE__ */ a.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(S.Title, { children: t }) }),
36
37
  /* @__PURE__ */ a.jsxs("form", { onSubmit: i, children: [
37
38
  /* @__PURE__ */ a.jsxs(S.Body, { children: [
38
- n.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...g, rows: 5 }) : void 0,
39
- n.input === "input" ? /* @__PURE__ */ a.jsx(re, { ...g, type: n.type }) : void 0
39
+ s.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...g, rows: 5 }) : void 0,
40
+ s.input === "input" ? /* @__PURE__ */ a.jsx(oe, { ...g, type: s.type }) : void 0
40
41
  ] }),
41
42
  /* @__PURE__ */ a.jsxs(S.Footer, { className: "w-100 d-flex gap-5", children: [
42
- /* @__PURE__ */ a.jsx(_, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
43
- /* @__PURE__ */ a.jsx(_, { color: "primary", disabled: n.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
43
+ /* @__PURE__ */ a.jsx(w, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
44
+ /* @__PURE__ */ a.jsx(w, { color: "primary", disabled: s.required && !r, type: "submit", className: "flex-grow-1", children: e.confirm })
44
45
  ] })
45
46
  ] })
46
47
  ] });
47
48
  }, ue = ({ children: e }) => {
48
- const [r, t] = h(!1), [s, n] = h(""), [o, c] = h({ input: "textarea", type: "text" }), l = K(() => {
49
- }), i = E((T) => {
50
- n(T), t(!0);
49
+ const [o, t] = h(!1), [n, s] = h(""), [r, c] = h({ input: "textarea", type: "text" }), l = z(() => {
50
+ }), i = E((R) => {
51
+ s(R), t(!0);
51
52
  }, []), g = E(() => {
52
53
  t(!1);
53
54
  }, []), u = C(() => ({
54
- isShown: r,
55
- text: s,
55
+ isShown: o,
56
+ text: n,
56
57
  showPrompt: i,
57
58
  hidePrompt: g,
58
59
  resolveRef: l,
59
- options: o,
60
+ options: r,
60
61
  setOptions: c
61
- }), [r, s, i, g, o]);
62
+ }), [o, n, i, g, r]);
62
63
  return /* @__PURE__ */ a.jsxs(M.Provider, { value: u, children: [
63
64
  e,
64
65
  /* @__PURE__ */ a.jsx(ie, {})
65
66
  ] });
66
- }, Ne = ({ cookieDomain: e, axiosOptions: r, LinkComponent: t, NavigateComponent: s, language: n, axiosTexts: o, confirmTexts: c, formValidationTexts: l, homeDashboardTexts: i, formSubmitTexts: g, appSearchTexts: u, customSelectTexts: T, errorBoundaryTexts: y, widgetTexts: I, children: P }) => {
67
- const p = C(() => ({
68
- axiosOptions: r,
67
+ }, Le = ({ cookieDomain: e, axiosOptions: o, LinkComponent: t, NavigateComponent: n, language: s, axiosTexts: r, confirmTexts: c, formValidationTexts: l, homeDashboardTexts: i, formSubmitTexts: g, appSearchTexts: u, customSelectTexts: R, errorBoundaryTexts: A, widgetTexts: L, texts: { messageBoard: I }, ProjectIconComponent: p, localizationContext: O, children: P }) => {
68
+ const N = C(() => ({
69
+ axiosOptions: o,
69
70
  cookieDomain: e,
70
71
  LinkComponent: t,
71
- NavigateComponent: s,
72
- language: n,
73
- axiosTexts: o,
72
+ NavigateComponent: n,
73
+ language: s,
74
+ axiosTexts: r,
74
75
  confirmTexts: c,
75
76
  formValidationTexts: l,
76
77
  homeDashboardTexts: i,
77
78
  formSubmitTexts: g,
78
79
  appSearchTexts: u,
79
- customSelectTexts: T,
80
- errorBoundaryTexts: y,
81
- widgetTexts: I
80
+ customSelectTexts: R,
81
+ errorBoundaryTexts: A,
82
+ widgetTexts: L,
83
+ texts: {
84
+ messageBoard: I
85
+ },
86
+ ProjectIconComponent: p,
87
+ localizationContext: O
82
88
  }), [
83
- r,
89
+ o,
84
90
  e,
85
91
  t,
86
- s,
87
92
  n,
88
- o,
93
+ s,
94
+ r,
89
95
  c,
90
96
  l,
91
97
  i,
92
98
  g,
93
99
  u,
94
- T,
95
- y,
96
- I
100
+ R,
101
+ A,
102
+ L,
103
+ I,
104
+ p,
105
+ O
97
106
  ]);
98
- return /* @__PURE__ */ a.jsx(b.Provider, { value: p, children: /* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsxs(ue, { children: [
107
+ return /* @__PURE__ */ a.jsx(j.Provider, { value: N, children: /* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsxs(ue, { children: [
99
108
  /* @__PURE__ */ a.jsx(q, {}),
100
109
  P
101
110
  ] }) }) });
102
- }, Le = ({ children: e }) => {
103
- const [r, t] = h(!1), [s] = h(/* @__PURE__ */ new Set()), n = E((l) => {
104
- s.add(l), t(!0);
105
- }, [s]), o = E((l) => {
106
- s.delete(l), s.size === 0 && t(!1);
107
- }, [s]), c = C(() => ({ isLoading: r, startLoading: n, stopLoading: o }), [r, n, o]);
111
+ }, Te = ({ children: e }) => {
112
+ const [o, t] = h(!1), [n] = h(/* @__PURE__ */ new Set()), s = E((l) => {
113
+ n.add(l), t(!0);
114
+ }, [n]), r = E((l) => {
115
+ n.delete(l), n.size === 0 && t(!1);
116
+ }, [n]), c = C(() => ({ isLoading: o, startLoading: s, stopLoading: r }), [o, s, r]);
108
117
  return /* @__PURE__ */ a.jsxs(V.Provider, { value: c, children: [
109
- r && /* @__PURE__ */ a.jsx(ae, {}),
118
+ o && /* @__PURE__ */ a.jsx(ae, {}),
110
119
  e
111
120
  ] });
112
121
  };
@@ -117,14 +126,14 @@ class de {
117
126
  * @param message
118
127
  * @param currentStatus
119
128
  */
120
- static getInteractionStatusFromEvent(r, t) {
121
- switch (r.eventType) {
129
+ static getInteractionStatusFromEvent(o, t) {
130
+ switch (o.eventType) {
122
131
  case f.LOGIN_START:
123
132
  return d.Login;
124
133
  case f.SSO_SILENT_START:
125
134
  return d.SsoSilent;
126
135
  case f.ACQUIRE_TOKEN_START:
127
- if (r.interactionType === O.Redirect || r.interactionType === O.Popup)
136
+ if (o.interactionType === _.Redirect || o.interactionType === _.Popup)
128
137
  return d.AcquireToken;
129
138
  break;
130
139
  case f.HANDLE_REDIRECT_START:
@@ -149,7 +158,7 @@ class de {
149
158
  case f.ACQUIRE_TOKEN_SUCCESS:
150
159
  case f.ACQUIRE_TOKEN_FAILURE:
151
160
  case f.RESTORE_FROM_BFCACHE:
152
- if (r.interactionType === O.Redirect || r.interactionType === O.Popup) {
161
+ if (o.interactionType === _.Redirect || o.interactionType === _.Popup) {
153
162
  if (t && t !== d.Login && t !== d.AcquireToken)
154
163
  break;
155
164
  return d.None;
@@ -162,64 +171,64 @@ class de {
162
171
  /*! @azure/msal-react v2.0.16 2024-05-07 */
163
172
  const fe = "@azure/msal-react", G = "2.0.16";
164
173
  /*! @azure/msal-react v2.0.16 2024-05-07 */
165
- const w = {
174
+ const b = {
166
175
  UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
167
176
  EVENT: "EVENT"
168
- }, me = (e, r) => {
169
- const { type: t, payload: s } = r;
170
- let n = e.inProgress;
177
+ }, me = (e, o) => {
178
+ const { type: t, payload: n } = o;
179
+ let s = e.inProgress;
171
180
  switch (t) {
172
- case w.UNBLOCK_INPROGRESS:
173
- e.inProgress === d.Startup && (n = d.None, s.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
181
+ case b.UNBLOCK_INPROGRESS:
182
+ e.inProgress === d.Startup && (s = d.None, n.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
174
183
  break;
175
- case w.EVENT:
176
- const c = s.message, l = de.getInteractionStatusFromEvent(c, e.inProgress);
177
- l && (s.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${l}`), n = l);
184
+ case b.EVENT:
185
+ const c = n.message, l = de.getInteractionStatusFromEvent(c, e.inProgress);
186
+ l && (n.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${l}`), s = l);
178
187
  break;
179
188
  default:
180
189
  throw new Error(`Unknown action type: ${t}`);
181
190
  }
182
- const o = s.instance.getAllAccounts();
183
- return n !== e.inProgress && !D(o, e.accounts) ? {
191
+ const r = n.instance.getAllAccounts();
192
+ return s !== e.inProgress && !D(r, e.accounts) ? {
184
193
  ...e,
185
- inProgress: n,
186
- accounts: o
187
- } : n !== e.inProgress ? {
194
+ inProgress: s,
195
+ accounts: r
196
+ } : s !== e.inProgress ? {
188
197
  ...e,
189
- inProgress: n
190
- } : D(o, e.accounts) ? e : {
198
+ inProgress: s
199
+ } : D(r, e.accounts) ? e : {
191
200
  ...e,
192
- accounts: o
201
+ accounts: r
193
202
  };
194
203
  };
195
- function ge({ instance: e, children: r }) {
204
+ function ge({ instance: e, children: o }) {
196
205
  v(() => {
197
206
  e.initializeWrapperLibrary($.React, G);
198
207
  }, [e]);
199
- const t = C(() => e.getLogger().clone(fe, G), [e]), [s, n] = ee(me, void 0, () => ({
208
+ const t = C(() => e.getLogger().clone(fe, G), [e]), [n, s] = ee(me, void 0, () => ({
200
209
  inProgress: d.Startup,
201
210
  accounts: e.getAllAccounts()
202
211
  }));
203
212
  v(() => {
204
213
  const c = e.addEventCallback((l) => {
205
- n({
214
+ s({
206
215
  payload: {
207
216
  instance: e,
208
217
  logger: t,
209
218
  message: l
210
219
  },
211
- type: w.EVENT
220
+ type: b.EVENT
212
221
  });
213
222
  });
214
223
  return t.verbose(`MsalProvider - Registered event callback with id: ${c}`), e.initialize().then(() => {
215
224
  e.handleRedirectPromise().catch(() => {
216
225
  }).finally(() => {
217
- n({
226
+ s({
218
227
  payload: {
219
228
  instance: e,
220
229
  logger: t
221
230
  },
222
- type: w.UNBLOCK_INPROGRESS
231
+ type: b.UNBLOCK_INPROGRESS
223
232
  });
224
233
  });
225
234
  }).catch(() => {
@@ -227,62 +236,62 @@ function ge({ instance: e, children: r }) {
227
236
  c && (t.verbose(`MsalProvider - Removing event callback ${c}`), e.removeEventCallback(c));
228
237
  };
229
238
  }, [e, t]);
230
- const o = {
239
+ const r = {
231
240
  instance: e,
232
- inProgress: s.inProgress,
233
- accounts: s.accounts,
241
+ inProgress: n.inProgress,
242
+ accounts: n.accounts,
234
243
  logger: t
235
244
  };
236
- return Z.createElement(Q.Provider, { value: o }, r);
245
+ return Z.createElement(Q.Provider, { value: r }, o);
237
246
  }
238
- const Te = ({ children: e }) => {
239
- const r = J(), { msalInstance: t } = L(F), { delegation: s, setDelegation: n, setAvailableDelegations: o, refreshAvailableDelegations: c } = L(z), { getToken: l } = W(), [i, g] = h(null), u = E(async () => {
247
+ const ye = ({ children: e }) => {
248
+ const o = J(), { msalInstance: t } = y(F), { delegation: n, setDelegation: s, setAvailableDelegations: r, refreshAvailableDelegations: c } = y(K), { getToken: l } = W(), [i, g] = h(null), u = E(async () => {
240
249
  const m = await l();
241
250
  m && g(m);
242
251
  }, [l]);
243
252
  v(() => {
244
253
  u();
245
254
  }, [u]);
246
- const y = E(() => {
255
+ const A = E(() => {
247
256
  const m = localStorage.getItem("user") ?? null;
248
257
  return m ? JSON.parse(m ?? "") : null;
249
- }, [])(), [I, P] = h({
250
- state: y ? N.LOGGED_IN : N.LOGGING_IN,
251
- user: y
258
+ }, [])(), [L, I] = h({
259
+ state: A ? T.LOGGED_IN : T.LOGGING_IN,
260
+ user: A
252
261
  }), p = E(async (m) => {
253
262
  let x = null;
254
- return await r.get("/user/detail", m ? { headers: { Authorization: `Bearer ${m}` } } : void 0).then((j) => {
255
- x = j.data;
263
+ return await o.get("/user/detail", m ? { headers: { Authorization: `Bearer ${m}` } } : void 0).then((k) => {
264
+ x = k.data;
256
265
  }).catch(() => {
257
266
  x = null;
258
267
  }), x;
259
- }, [r]), k = E(() => {
260
- localStorage.removeItem("user"), P({
261
- state: N.LOGGED_OUT,
268
+ }, [o]), O = E(() => {
269
+ localStorage.removeItem("user"), I({
270
+ state: T.LOGGED_OUT,
262
271
  user: null
263
- }), n(null), o(null);
264
- }, [o, n]), R = E(async (m) => {
265
- P({
266
- state: N.LOGGING_IN,
272
+ }), s(null), r(null);
273
+ }, [r, s]), P = E(async (m) => {
274
+ I({
275
+ state: T.LOGGING_IN,
267
276
  user: null
268
277
  });
269
278
  const x = await p(m);
270
- return x ? (P({
271
- state: N.LOGGED_IN,
279
+ return x ? (I({
280
+ state: T.LOGGED_IN,
272
281
  user: x
273
- }), localStorage.setItem("user", JSON.stringify(x)), await c(), !0) : (P({
274
- state: N.LOGIN_FAILED,
282
+ }), localStorage.setItem("user", JSON.stringify(x)), await c(), !0) : (I({
283
+ state: T.LOGIN_FAILED,
275
284
  user: null
276
285
  }), !1);
277
- }, [p, c]), A = E(() => {
278
- k();
279
- }, [k]);
286
+ }, [p, c]), N = E(() => {
287
+ O();
288
+ }, [O]);
280
289
  v(() => {
281
290
  if (t) {
282
291
  const m = t.addEventCallback((x) => {
283
292
  if (x.eventType === f.LOGIN_SUCCESS && x.payload) {
284
- const j = x.payload;
285
- g(j.accessToken);
293
+ const k = x.payload;
294
+ g(k.accessToken);
286
295
  }
287
296
  });
288
297
  return () => {
@@ -291,57 +300,57 @@ const Te = ({ children: e }) => {
291
300
  }
292
301
  return () => {
293
302
  };
294
- }, [t, R, A]);
303
+ }, [t, P, N]);
295
304
  const U = E(async (m) => {
296
- m && await R(m).catch(() => {
297
- A(), n(null);
305
+ m && await P(m).catch(() => {
306
+ N(), s(null);
298
307
  });
299
- }, [R, A, n]);
308
+ }, [P, N, s]);
300
309
  v(() => {
301
310
  U(i);
302
- }, [i, s == null ? void 0 : s.id, U]);
303
- const B = C(() => ({
304
- user: I.user,
305
- userLoginState: I,
306
- loginUser: R,
307
- logoutUser: A
308
- }), [I, R, A]);
309
- return /* @__PURE__ */ a.jsx(X.Provider, { value: B, children: e });
310
- }, ye = ({ ...e }) => {
311
- const { cookieDomain: r } = L(b), [, t] = Y(["Authorization"]), s = C(() => ({
311
+ }, [i, n == null ? void 0 : n.id, U]);
312
+ const H = C(() => ({
313
+ user: L.user,
314
+ userLoginState: L,
315
+ loginUser: P,
316
+ logoutUser: N
317
+ }), [L, P, N]);
318
+ return /* @__PURE__ */ a.jsx(X.Provider, { value: H, children: e });
319
+ }, Re = ({ ...e }) => {
320
+ const { cookieDomain: o } = y(j), [, t] = Y(["Authorization"]), n = C(() => ({
312
321
  useMsal: e.useMsal ?? !1,
313
322
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
314
323
  msalScopes: e.useMsal ? e.msalScopes ?? [] : []
315
324
  }), [e]);
316
325
  return v(() => {
317
326
  if (e.useMsal) {
318
- const n = e.msalInstance.addEventCallback((o) => {
319
- if (o.eventType === f.LOGIN_SUCCESS || o.eventType === f.ACQUIRE_TOKEN_SUCCESS && o.payload) {
320
- const c = o.payload, l = c.account;
327
+ const s = e.msalInstance.addEventCallback((r) => {
328
+ if (r.eventType === f.LOGIN_SUCCESS || r.eventType === f.ACQUIRE_TOKEN_SUCCESS && r.payload) {
329
+ const c = r.payload, l = c.account;
321
330
  e.msalInstance.setActiveAccount(l);
322
331
  const i = c.accessToken, g = c.expiresOn;
323
332
  t("Authorization", i, {
324
333
  path: "/",
325
334
  secure: !0,
326
335
  sameSite: "none",
327
- domain: r,
336
+ domain: o,
328
337
  expires: g ?? void 0
329
338
  });
330
339
  }
331
- o.error && console.error("AuthProvider MSAL Error", o);
340
+ r.error && console.error("AuthProvider MSAL Error", r);
332
341
  });
333
342
  return () => {
334
- n && e.msalInstance.removeEventCallback(n);
343
+ s && e.msalInstance.removeEventCallback(s);
335
344
  };
336
345
  }
337
346
  return () => {
338
347
  };
339
- }, [e, t, r]), /* @__PURE__ */ a.jsx(F.Provider, { value: s, children: e.useMsal ? /* @__PURE__ */ a.jsx(ge, { instance: e.msalInstance, children: e.children }) : e.children });
340
- }, Re = ({ children: e, relativeEndpoint: r }) => {
341
- const [t, s, n] = ne("user-delegation", null), { data: o, setData: c, reloadData: l } = se(r, {
348
+ }, [e, t, o]), /* @__PURE__ */ a.jsx(F.Provider, { value: n, children: e.useMsal ? /* @__PURE__ */ a.jsx(ge, { instance: e.msalInstance, children: e.children }) : e.children });
349
+ }, Ae = ({ children: e, relativeEndpoint: o }) => {
350
+ const [t, n, s] = se("user-delegation", null), { data: r, setData: c, reloadData: l } = ne(o, {
342
351
  nullStateBeforeLoad: !1,
343
352
  nullStateOnFail: !0
344
- }), i = K(null);
353
+ }), i = z(null);
345
354
  v(() => {
346
355
  const u = () => {
347
356
  l(), i.current = window.setTimeout(u, ce() + 5e3);
@@ -351,45 +360,45 @@ const Te = ({ children: e }) => {
351
360
  };
352
361
  }, [l]), v(() => {
353
362
  const u = () => {
354
- n();
363
+ s();
355
364
  };
356
365
  return window.addEventListener("focus", u), () => {
357
366
  window.removeEventListener("focus", u);
358
367
  };
359
- }, [n, l]);
368
+ }, [s, l]);
360
369
  const g = C(() => ({
361
370
  delegation: t,
362
- setDelegation: s,
363
- availableDelegations: o,
371
+ setDelegation: n,
372
+ availableDelegations: r,
364
373
  setAvailableDelegations: c,
365
374
  refreshAvailableDelegations: l
366
375
  }), [
367
376
  t,
368
- s,
369
- o,
377
+ n,
378
+ r,
370
379
  c,
371
380
  l
372
381
  ]);
373
- return /* @__PURE__ */ a.jsx(z.Provider, { value: g, children: e });
382
+ return /* @__PURE__ */ a.jsx(K.Provider, { value: g, children: e });
374
383
  }, Ee = () => {
375
- const { confirmTexts: e } = L(b), { onConfirm: r, onCancel: t, text: s, show: n } = oe();
376
- return /* @__PURE__ */ a.jsxs(S, { show: n, size: "sm", centered: !0, onHide: t, children: [
377
- /* @__PURE__ */ a.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(S.Title, { children: s }) }),
384
+ const { confirmTexts: e } = y(j), { onConfirm: o, onCancel: t, text: n, show: s } = re();
385
+ return /* @__PURE__ */ a.jsxs(S, { show: s, size: "sm", centered: !0, onHide: t, children: [
386
+ /* @__PURE__ */ a.jsx(S.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(S.Title, { children: n }) }),
378
387
  /* @__PURE__ */ a.jsx(S.Body, { children: /* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
379
- /* @__PURE__ */ a.jsx(_, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
380
- /* @__PURE__ */ a.jsx(_, { type: "button", color: "primary", onClick: r, className: "w-100 ml", children: e.yes })
388
+ /* @__PURE__ */ a.jsx(w, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
389
+ /* @__PURE__ */ a.jsx(w, { type: "button", color: "primary", onClick: o, className: "w-100 ml", children: e.yes })
381
390
  ] }) })
382
391
  ] });
383
392
  };
384
393
  export {
385
394
  F as AuthContext,
386
- ye as AuthProvider,
387
- z as DelegationContext,
388
- Re as DelegationProvider,
395
+ Re as AuthProvider,
396
+ K as DelegationContext,
397
+ Ae as DelegationProvider,
389
398
  V as LoadingContext,
390
- Le as LoadingProvider,
391
- b as LuminusComponentsContext,
392
- Ne as LuminusComponentsProvider,
399
+ Te as LoadingProvider,
400
+ j as LuminusComponentsContext,
401
+ Le as LuminusComponentsProvider,
393
402
  X as UserContext,
394
- Te as UserProvider
403
+ ye as UserProvider
395
404
  };
@@ -0,0 +1,13 @@
1
+ import { p as s } from "./parseISO-DxNDV6y0.js";
2
+ const r = (t) => {
3
+ const e = s(t);
4
+ return !Number.isNaN(e.getTime());
5
+ };
6
+ function n() {
7
+ const t = /* @__PURE__ */ new Date(), e = new Date(t);
8
+ return e.setHours(24, 0, 0, 0), e.getTime() - t.getTime();
9
+ }
10
+ export {
11
+ r as i,
12
+ n as m
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./parseISO-DTRVS-Fr.cjs"),r=t=>{const e=s.parseISO(t);return!Number.isNaN(e.getTime())};function a(){const t=new Date,e=new Date(t);return e.setHours(24,0,0,0),e.getTime()-t.getTime()}exports.isISODate=r;exports.msToStartOfNextDay=a;