react-luminus-components 1.3.31 → 1.3.32

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