react-luminus-components 1.2.113 → 1.2.114

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 (31) hide show
  1. package/dist/.vite/manifest.json +42 -42
  2. package/dist/{NoInputContainer-CnWtqd6M.js → NoInputContainer-BAgsWdLH.js} +498 -498
  3. package/dist/{NoInputContainer-B2NLKTjL.cjs → NoInputContainer-BK9oG3tT.cjs} +16 -16
  4. package/dist/{PrimaryButton-DdX5Urwd.cjs → PrimaryButton-7SShR5CP.cjs} +1 -1
  5. package/dist/{PrimaryButton-JmPJBth0.js → PrimaryButton-DEmq1lC9.js} +1 -1
  6. package/dist/{SimpleTooltip-DAt21777.cjs → SimpleTooltip-4RS28Xw5.cjs} +1 -1
  7. package/dist/{SimpleTooltip-SJ7NFji7.js → SimpleTooltip-DcjdypSH.js} +1 -1
  8. package/dist/components/common/ImgApi/ImgApi.d.ts +4 -0
  9. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +9 -0
  10. package/dist/components/common/ImgDirect/ImgDirect.d.ts +4 -0
  11. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +6 -2
  12. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +6 -2
  13. package/dist/components/common/index.d.ts +2 -0
  14. package/dist/contexts.cjs.js +1 -1
  15. package/dist/contexts.es.js +160 -148
  16. package/dist/hooks/useAxios/useAxios.d.ts +1 -0
  17. package/dist/hooks.cjs.js +1 -1
  18. package/dist/hooks.es.js +4 -4
  19. package/dist/layout.cjs.js +1 -1
  20. package/dist/layout.es.js +3 -3
  21. package/dist/main.cjs.js +1 -1
  22. package/dist/main.d.ts +1 -0
  23. package/dist/main.es.js +1206 -1177
  24. package/dist/models/index.d.ts +2 -0
  25. package/dist/models/prop-types/ImgProps.d.ts +7 -0
  26. package/dist/models/types/UserModel.d.ts +2 -1
  27. package/dist/{useConfirm-C4vc6fDa.js → useConfirm-D0XQit1K.js} +1 -1
  28. package/dist/{useConfirm-k8Kyrbnb.cjs → useConfirm-DnHLBOB6.cjs} +1 -1
  29. package/dist/{usePermissions-CJNbDDXa.cjs → usePermissions-CZ9GOCPf.cjs} +1 -1
  30. package/dist/{usePermissions-fMk86sJx.js → usePermissions-giXiX-A0.js} +1 -1
  31. package/package.json +1 -1
@@ -1,83 +1,83 @@
1
- import { j as a, al as O, Q as L, am as _, an as k, ao as b, M as N, L as l, ap as w, aq as M, ar as j, a4 as F, a8 as U, aa as G, as as z } from "./NoInputContainer-CnWtqd6M.js";
2
- import H, { useState as h, useCallback as E, useMemo as v, useContext as R, useEffect as I, useRef as K, useReducer as B } from "react";
1
+ import { j as c, al as M, Q as j, am as O, an as F, ao as G, M as p, L as i, ap as z, aq as D, ar as _, a4 as H, a8 as b, a9 as K, aa as B, as as q } from "./NoInputContainer-BAgsWdLH.js";
2
+ import V, { useState as h, useCallback as f, useMemo as I, useContext as N, useEffect as y, useRef as $, useReducer as Q } from "react";
3
3
  import "./latinize-BQrinury.js";
4
4
  import "react-hook-form";
5
- import { u as D, a as q } from "./useConfirm-C4vc6fDa.js";
6
- import { M as P, b as V, P as T, L as $, E as u } from "./PrimaryButton-JmPJBth0.js";
7
- const Q = ({ children: e }) => {
8
- const [s, n] = h(!1), [o, t] = h(""), r = E((d) => {
5
+ import { u as J, a as W } from "./useConfirm-D0XQit1K.js";
6
+ import { M as C, b as X, P as L, L as Y, E as u } from "./PrimaryButton-DEmq1lC9.js";
7
+ const Z = ({ children: e }) => {
8
+ const [s, n] = h(!1), [o, t] = h(""), r = f((d) => {
9
9
  n(!0), t(d);
10
- }, []), c = E(() => {
10
+ }, []), a = f(() => {
11
11
  n(!1);
12
- }, []), i = v(() => ({ show: s, text: o, showConfirm: r, hideConfirm: c }), [s, o, r, c]);
13
- return /* @__PURE__ */ a.jsxs(O.Provider, { value: i, children: [
14
- /* @__PURE__ */ a.jsx(ne, {}),
12
+ }, []), l = I(() => ({ show: s, text: o, showConfirm: r, hideConfirm: a }), [s, o, r, a]);
13
+ return /* @__PURE__ */ c.jsxs(M.Provider, { value: l, children: [
14
+ /* @__PURE__ */ c.jsx(ae, {}),
15
15
  e
16
16
  ] });
17
- }, J = () => {
18
- const { confirmTexts: e } = R(L), { isShown: s, text: n, onFinish: o } = D(), { options: t } = R(_), [r, c] = h(t.defaultValue ?? ""), i = E(() => {
17
+ }, ee = () => {
18
+ const { confirmTexts: e } = N(j), { isShown: s, text: n, onFinish: o } = J(), { options: t } = N(O), [r, a] = h(t.defaultValue ?? ""), l = f(() => {
19
19
  o(null);
20
- }, [o]), d = E((f) => {
21
- f.preventDefault(), !(t.required && !r) && o(r);
20
+ }, [o]), d = f((x) => {
21
+ x.preventDefault(), !(t.required && !r) && o(r);
22
22
  }, [o, t.required, r]);
23
- I(() => {
24
- s === !0 && c(t.defaultValue ?? "");
23
+ y(() => {
24
+ s === !0 && a(t.defaultValue ?? "");
25
25
  }, [s, t.defaultValue]);
26
- const m = v(() => ({
26
+ const m = I(() => ({
27
27
  value: r,
28
- onChange: (f) => c(f.currentTarget.value),
28
+ onChange: (x) => a(x.currentTarget.value),
29
29
  className: "w-100",
30
30
  autoFocus: !0,
31
31
  tabIndex: 0
32
32
  }), [r]);
33
- return /* @__PURE__ */ a.jsxs(P, { show: s, size: "sm", centered: !0, onHide: i, children: [
34
- /* @__PURE__ */ a.jsx(P.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(P.Title, { children: n }) }),
35
- /* @__PURE__ */ a.jsxs("form", { onSubmit: d, children: [
36
- /* @__PURE__ */ a.jsxs(P.Body, { children: [
37
- t.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...m, rows: 5 }) : void 0,
38
- t.input === "input" ? /* @__PURE__ */ a.jsx(V, { ...m, type: t.type }) : void 0
33
+ return /* @__PURE__ */ c.jsxs(C, { show: s, size: "sm", centered: !0, onHide: l, children: [
34
+ /* @__PURE__ */ c.jsx(C.Header, { className: "justify-content-center", children: /* @__PURE__ */ c.jsx(C.Title, { children: n }) }),
35
+ /* @__PURE__ */ c.jsxs("form", { onSubmit: d, children: [
36
+ /* @__PURE__ */ c.jsxs(C.Body, { children: [
37
+ t.input === "textarea" ? /* @__PURE__ */ c.jsx("textarea", { ...m, rows: 5 }) : void 0,
38
+ t.input === "input" ? /* @__PURE__ */ c.jsx(X, { ...m, type: t.type }) : void 0
39
39
  ] }),
40
- /* @__PURE__ */ a.jsxs(P.Footer, { className: "w-100 d-flex gap-5", children: [
41
- /* @__PURE__ */ a.jsx(T, { variant: "outlined", color: "secondary", onClick: i, className: "flex-grow-1", children: e.cancel }),
42
- /* @__PURE__ */ a.jsx(T, { color: "primary", disabled: t.required && !r, type: "submit", className: "flex-grow-1", children: e.confirm })
40
+ /* @__PURE__ */ c.jsxs(C.Footer, { className: "w-100 d-flex gap-5", children: [
41
+ /* @__PURE__ */ c.jsx(L, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
42
+ /* @__PURE__ */ c.jsx(L, { color: "primary", disabled: t.required && !r, type: "submit", className: "flex-grow-1", children: e.confirm })
43
43
  ] })
44
44
  ] })
45
45
  ] });
46
- }, W = ({ children: e }) => {
47
- const [s, n] = h(!1), [o, t] = h(""), [r, c] = h({ input: "textarea", type: "text" }), i = K(() => {
48
- }), d = E((C) => {
49
- t(C), n(!0);
50
- }, []), m = E(() => {
46
+ }, ne = ({ children: e }) => {
47
+ const [s, n] = h(!1), [o, t] = h(""), [r, a] = h({ input: "textarea", type: "text" }), l = $(() => {
48
+ }), d = f((P) => {
49
+ t(P), n(!0);
50
+ }, []), m = f(() => {
51
51
  n(!1);
52
- }, []), f = v(() => ({
52
+ }, []), x = I(() => ({
53
53
  isShown: s,
54
54
  text: o,
55
55
  showPrompt: d,
56
56
  hidePrompt: m,
57
- resolveRef: i,
57
+ resolveRef: l,
58
58
  options: r,
59
- setOptions: c
59
+ setOptions: a
60
60
  }), [s, o, d, m, r]);
61
- return /* @__PURE__ */ a.jsxs(_.Provider, { value: f, children: [
61
+ return /* @__PURE__ */ c.jsxs(O.Provider, { value: x, children: [
62
62
  e,
63
- /* @__PURE__ */ a.jsx(J, {})
63
+ /* @__PURE__ */ c.jsx(ee, {})
64
64
  ] });
65
- }, ie = ({ cookieDomain: e, axiosOptions: s, LinkComponent: n, NavigateComponent: o, language: t, axiosTexts: r, confirmTexts: c, formValidationTexts: i, homeDashboardTexts: d, formSubmitTexts: m, appSearchTexts: f, customSelectTexts: C, errorBoundaryTexts: y, widgetTexts: g, children: x }) => {
66
- const S = v(() => ({
65
+ }, ge = ({ cookieDomain: e, axiosOptions: s, LinkComponent: n, NavigateComponent: o, language: t, axiosTexts: r, confirmTexts: a, formValidationTexts: l, homeDashboardTexts: d, formSubmitTexts: m, appSearchTexts: x, customSelectTexts: P, errorBoundaryTexts: R, widgetTexts: T, children: v }) => {
66
+ const S = I(() => ({
67
67
  axiosOptions: s,
68
68
  cookieDomain: e,
69
69
  LinkComponent: n,
70
70
  NavigateComponent: o,
71
71
  language: t,
72
72
  axiosTexts: r,
73
- confirmTexts: c,
74
- formValidationTexts: i,
73
+ confirmTexts: a,
74
+ formValidationTexts: l,
75
75
  homeDashboardTexts: d,
76
76
  formSubmitTexts: m,
77
- appSearchTexts: f,
78
- customSelectTexts: C,
79
- errorBoundaryTexts: y,
80
- widgetTexts: g
77
+ appSearchTexts: x,
78
+ customSelectTexts: P,
79
+ errorBoundaryTexts: R,
80
+ widgetTexts: T
81
81
  }), [
82
82
  s,
83
83
  e,
@@ -85,32 +85,32 @@ const Q = ({ children: e }) => {
85
85
  o,
86
86
  t,
87
87
  r,
88
- c,
89
- i,
88
+ a,
89
+ l,
90
90
  d,
91
91
  m,
92
- f,
93
- C,
94
- y,
95
- g
92
+ x,
93
+ P,
94
+ R,
95
+ T
96
96
  ]);
97
- return /* @__PURE__ */ a.jsx(L.Provider, { value: S, children: /* @__PURE__ */ a.jsx(Q, { children: /* @__PURE__ */ a.jsxs(W, { children: [
98
- /* @__PURE__ */ a.jsx(k, {}),
99
- x
97
+ return /* @__PURE__ */ c.jsx(j.Provider, { value: S, children: /* @__PURE__ */ c.jsx(Z, { children: /* @__PURE__ */ c.jsxs(ne, { children: [
98
+ /* @__PURE__ */ c.jsx(F, {}),
99
+ v
100
100
  ] }) }) });
101
- }, le = ({ children: e }) => {
102
- const [s, n] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t = E((i) => {
103
- o.add(i), n(!0);
104
- }, [o]), r = E((i) => {
105
- o.delete(i), o.size === 0 && n(!1);
106
- }, [o]), c = v(() => ({ isLoading: s, startLoading: t, stopLoading: r }), [s, t, r]);
107
- return /* @__PURE__ */ a.jsxs(b.Provider, { value: c, children: [
108
- s && /* @__PURE__ */ a.jsx($, {}),
101
+ }, me = ({ children: e }) => {
102
+ const [s, n] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t = f((l) => {
103
+ o.add(l), n(!0);
104
+ }, [o]), r = f((l) => {
105
+ o.delete(l), o.size === 0 && n(!1);
106
+ }, [o]), a = I(() => ({ isLoading: s, startLoading: t, stopLoading: r }), [s, t, r]);
107
+ return /* @__PURE__ */ c.jsxs(G.Provider, { value: a, children: [
108
+ s && /* @__PURE__ */ c.jsx(Y, {}),
109
109
  e
110
110
  ] });
111
111
  };
112
112
  /*! @azure/msal-browser v3.14.0 2024-05-07 */
113
- class X {
113
+ class te {
114
114
  /**
115
115
  * Gets interaction status from event message
116
116
  * @param message
@@ -119,39 +119,39 @@ class X {
119
119
  static getInteractionStatusFromEvent(s, n) {
120
120
  switch (s.eventType) {
121
121
  case u.LOGIN_START:
122
- return l.Login;
122
+ return i.Login;
123
123
  case u.SSO_SILENT_START:
124
- return l.SsoSilent;
124
+ return i.SsoSilent;
125
125
  case u.ACQUIRE_TOKEN_START:
126
- if (s.interactionType === N.Redirect || s.interactionType === N.Popup)
127
- return l.AcquireToken;
126
+ if (s.interactionType === p.Redirect || s.interactionType === p.Popup)
127
+ return i.AcquireToken;
128
128
  break;
129
129
  case u.HANDLE_REDIRECT_START:
130
- return l.HandleRedirect;
130
+ return i.HandleRedirect;
131
131
  case u.LOGOUT_START:
132
- return l.Logout;
132
+ return i.Logout;
133
133
  case u.SSO_SILENT_SUCCESS:
134
134
  case u.SSO_SILENT_FAILURE:
135
- if (n && n !== l.SsoSilent)
135
+ if (n && n !== i.SsoSilent)
136
136
  break;
137
- return l.None;
137
+ return i.None;
138
138
  case u.LOGOUT_END:
139
- if (n && n !== l.Logout)
139
+ if (n && n !== i.Logout)
140
140
  break;
141
- return l.None;
141
+ return i.None;
142
142
  case u.HANDLE_REDIRECT_END:
143
- if (n && n !== l.HandleRedirect)
143
+ if (n && n !== i.HandleRedirect)
144
144
  break;
145
- return l.None;
145
+ return i.None;
146
146
  case u.LOGIN_SUCCESS:
147
147
  case u.LOGIN_FAILURE:
148
148
  case u.ACQUIRE_TOKEN_SUCCESS:
149
149
  case u.ACQUIRE_TOKEN_FAILURE:
150
150
  case u.RESTORE_FROM_BFCACHE:
151
- if (s.interactionType === N.Redirect || s.interactionType === N.Popup) {
152
- if (n && n !== l.Login && n !== l.AcquireToken)
151
+ if (s.interactionType === p.Redirect || s.interactionType === p.Popup) {
152
+ if (n && n !== i.Login && n !== i.AcquireToken)
153
153
  break;
154
- return l.None;
154
+ return i.None;
155
155
  }
156
156
  break;
157
157
  }
@@ -159,58 +159,58 @@ class X {
159
159
  }
160
160
  }
161
161
  /*! @azure/msal-react v2.0.16 2024-05-07 */
162
- const Y = "@azure/msal-react", A = "2.0.16";
162
+ const se = "@azure/msal-react", U = "2.0.16";
163
163
  /*! @azure/msal-react v2.0.16 2024-05-07 */
164
- const p = {
164
+ const A = {
165
165
  UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
166
166
  EVENT: "EVENT"
167
- }, Z = (e, s) => {
167
+ }, oe = (e, s) => {
168
168
  const { type: n, payload: o } = s;
169
169
  let t = e.inProgress;
170
170
  switch (n) {
171
- case p.UNBLOCK_INPROGRESS:
172
- e.inProgress === l.Startup && (t = l.None, o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
171
+ case A.UNBLOCK_INPROGRESS:
172
+ e.inProgress === i.Startup && (t = i.None, o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
173
173
  break;
174
- case p.EVENT:
175
- const c = o.message, i = X.getInteractionStatusFromEvent(c, e.inProgress);
176
- i && (o.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${i}`), t = i);
174
+ case A.EVENT:
175
+ const a = o.message, l = te.getInteractionStatusFromEvent(a, e.inProgress);
176
+ l && (o.logger.info(`MsalProvider - ${a.eventType} results in setting inProgress from ${e.inProgress} to ${l}`), t = l);
177
177
  break;
178
178
  default:
179
179
  throw new Error(`Unknown action type: ${n}`);
180
180
  }
181
181
  const r = o.instance.getAllAccounts();
182
- return t !== e.inProgress && !j(r, e.accounts) ? {
182
+ return t !== e.inProgress && !_(r, e.accounts) ? {
183
183
  ...e,
184
184
  inProgress: t,
185
185
  accounts: r
186
186
  } : t !== e.inProgress ? {
187
187
  ...e,
188
188
  inProgress: t
189
- } : j(r, e.accounts) ? e : {
189
+ } : _(r, e.accounts) ? e : {
190
190
  ...e,
191
191
  accounts: r
192
192
  };
193
193
  };
194
- function ee({ instance: e, children: s }) {
195
- I(() => {
196
- e.initializeWrapperLibrary(w.React, A);
194
+ function re({ instance: e, children: s }) {
195
+ y(() => {
196
+ e.initializeWrapperLibrary(z.React, U);
197
197
  }, [e]);
198
- const n = v(() => e.getLogger().clone(Y, A), [e]), [o, t] = B(Z, void 0, () => ({
199
- inProgress: l.Startup,
198
+ const n = I(() => e.getLogger().clone(se, U), [e]), [o, t] = Q(oe, void 0, () => ({
199
+ inProgress: i.Startup,
200
200
  accounts: e.getAllAccounts()
201
201
  }));
202
- I(() => {
203
- const c = e.addEventCallback((i) => {
202
+ y(() => {
203
+ const a = e.addEventCallback((l) => {
204
204
  t({
205
205
  payload: {
206
206
  instance: e,
207
207
  logger: n,
208
- message: i
208
+ message: l
209
209
  },
210
- type: p.EVENT
210
+ type: A.EVENT
211
211
  });
212
212
  });
213
- return n.verbose(`MsalProvider - Registered event callback with id: ${c}`), e.initialize().then(() => {
213
+ return n.verbose(`MsalProvider - Registered event callback with id: ${a}`), e.initialize().then(() => {
214
214
  e.handleRedirectPromise().catch(() => {
215
215
  }).finally(() => {
216
216
  t({
@@ -218,12 +218,12 @@ function ee({ instance: e, children: s }) {
218
218
  instance: e,
219
219
  logger: n
220
220
  },
221
- type: p.UNBLOCK_INPROGRESS
221
+ type: A.UNBLOCK_INPROGRESS
222
222
  });
223
223
  });
224
224
  }).catch(() => {
225
225
  }), () => {
226
- c && (n.verbose(`MsalProvider - Removing event callback ${c}`), e.removeEventCallback(c));
226
+ a && (n.verbose(`MsalProvider - Removing event callback ${a}`), e.removeEventCallback(a));
227
227
  };
228
228
  }, [e, n]);
229
229
  const r = {
@@ -232,36 +232,46 @@ function ee({ instance: e, children: s }) {
232
232
  accounts: o.accounts,
233
233
  logger: n
234
234
  };
235
- return H.createElement(M.Provider, { value: r }, s);
235
+ return V.createElement(D.Provider, { value: r }, s);
236
236
  }
237
- const ue = ({ children: e }) => {
238
- const s = F(), { msalInstance: n } = R(U), [o, t] = h(!1), r = E(() => {
237
+ const xe = ({ children: e }) => {
238
+ const s = H(), { msalInstance: n } = N(b), { getToken: o } = K(), [t, r] = h(!1), [a, l] = h(null), d = f(async () => {
239
+ const g = await o();
240
+ g && l(g);
241
+ }, [o]);
242
+ y(() => {
243
+ d();
244
+ }, [d]);
245
+ const m = f(() => {
239
246
  const g = localStorage.getItem("user") ?? null;
240
247
  return g ? JSON.parse(g ?? "") : null;
241
- }, []), [c, i] = h(r()), d = E(async (g) => {
242
- let x = null;
243
- return await s.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((S) => {
244
- x = S.data;
248
+ }, []), [x, P] = h(m()), R = f(async (g) => {
249
+ let E = null;
250
+ return await s.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((k) => {
251
+ E = k.data;
245
252
  }).catch(() => {
246
- x = null;
247
- }), localStorage.setItem("user", JSON.stringify(x)), x;
248
- }, [s]), m = E(() => {
249
- localStorage.removeItem("user");
250
- }, []), f = E(async (g) => {
251
- t(!0);
252
- const x = await d(g);
253
- return t(!1), x ? (i(x), !0) : !1;
254
- }, [d]), C = E(() => {
255
- m(), i(null);
256
- }, [m]), y = v(() => ({ user: c, loggingInProgress: o, loginUser: f, logoutUser: C }), [c, f, C, o]);
257
- return I(() => {
258
- i(r());
259
- }, [r]), I(() => {
253
+ E = null;
254
+ }), E;
255
+ }, [s]), T = f(() => {
256
+ localStorage.removeItem("user"), P(null);
257
+ }, []), v = f(async (g) => {
258
+ r(!0);
259
+ const E = await R(g);
260
+ return E ? (P(E), localStorage.setItem("user", JSON.stringify(E)), r(!1), !0) : (r(!1), !1);
261
+ }, [R]), S = f(() => {
262
+ T(), P(null);
263
+ }, [T]), w = I(() => ({
264
+ user: x,
265
+ loggingInProgress: t || !a,
266
+ loginUser: v,
267
+ logoutUser: S
268
+ }), [x, v, S, t, a]);
269
+ return y(() => {
260
270
  if (n) {
261
- const g = n.addEventCallback((x) => {
262
- if (x.eventType === u.LOGIN_SUCCESS && x.payload) {
263
- const S = x.payload;
264
- f(S.accessToken).catch(() => C());
271
+ const g = n.addEventCallback((E) => {
272
+ if (E.eventType === u.LOGIN_SUCCESS && E.payload) {
273
+ const k = E.payload;
274
+ l(k.accessToken);
265
275
  }
266
276
  });
267
277
  return () => {
@@ -270,20 +280,22 @@ const ue = ({ children: e }) => {
270
280
  }
271
281
  return () => {
272
282
  };
273
- }, [n, f, C]), /* @__PURE__ */ a.jsx(G.Provider, { value: y, children: e });
274
- }, de = ({ ...e }) => {
275
- const { cookieDomain: s } = R(L), [, n] = z(["Authorization"]), o = v(() => ({
283
+ }, [n, v, S]), y(() => {
284
+ a && v(a).catch(() => S());
285
+ }, [a, v, S]), /* @__PURE__ */ c.jsx(B.Provider, { value: w, children: e });
286
+ }, Ee = ({ ...e }) => {
287
+ const { cookieDomain: s } = N(j), [, n] = q(["Authorization"]), o = I(() => ({
276
288
  useMsal: e.useMsal ?? !1,
277
289
  msalInstance: e.useMsal ? e.msalInstance ?? null : null,
278
290
  msalScopes: e.useMsal ? e.msalScopes ?? [] : []
279
291
  }), [e]);
280
- return I(() => {
292
+ return y(() => {
281
293
  if (e.useMsal) {
282
294
  const t = e.msalInstance.addEventCallback((r) => {
283
295
  if (r.eventType === u.LOGIN_SUCCESS || r.eventType === u.ACQUIRE_TOKEN_SUCCESS && r.payload) {
284
- const c = r.payload, i = c.account;
285
- e.msalInstance.setActiveAccount(i);
286
- const d = c.accessToken, m = c.expiresOn;
296
+ const a = r.payload, l = a.account;
297
+ e.msalInstance.setActiveAccount(l);
298
+ const d = a.accessToken, m = a.expiresOn;
287
299
  n("Authorization", d, {
288
300
  path: "/",
289
301
  secure: !0,
@@ -299,24 +311,24 @@ const ue = ({ children: e }) => {
299
311
  }
300
312
  return () => {
301
313
  };
302
- }, [e, n, s]), /* @__PURE__ */ a.jsx(U.Provider, { value: o, children: e.useMsal ? /* @__PURE__ */ a.jsx(ee, { instance: e.msalInstance, children: e.children }) : e.children });
303
- }, ne = () => {
304
- const { confirmTexts: e } = R(L), { onConfirm: s, onCancel: n, text: o, show: t } = q();
305
- return /* @__PURE__ */ a.jsxs(P, { show: t, size: "sm", centered: !0, onHide: n, children: [
306
- /* @__PURE__ */ a.jsx(P.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(P.Title, { children: o }) }),
307
- /* @__PURE__ */ a.jsx(P.Body, { children: /* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
308
- /* @__PURE__ */ a.jsx(T, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: e.no }),
309
- /* @__PURE__ */ a.jsx(T, { type: "button", color: "primary", onClick: s, className: "w-100 ml", children: e.yes })
314
+ }, [e, n, s]), /* @__PURE__ */ c.jsx(b.Provider, { value: o, children: e.useMsal ? /* @__PURE__ */ c.jsx(re, { instance: e.msalInstance, children: e.children }) : e.children });
315
+ }, ae = () => {
316
+ const { confirmTexts: e } = N(j), { onConfirm: s, onCancel: n, text: o, show: t } = W();
317
+ return /* @__PURE__ */ c.jsxs(C, { show: t, size: "sm", centered: !0, onHide: n, children: [
318
+ /* @__PURE__ */ c.jsx(C.Header, { className: "justify-content-center", children: /* @__PURE__ */ c.jsx(C.Title, { children: o }) }),
319
+ /* @__PURE__ */ c.jsx(C.Body, { children: /* @__PURE__ */ c.jsxs("div", { className: "w-100 d-flex gap-5", children: [
320
+ /* @__PURE__ */ c.jsx(L, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: e.no }),
321
+ /* @__PURE__ */ c.jsx(L, { type: "button", color: "primary", onClick: s, className: "w-100 ml", children: e.yes })
310
322
  ] }) })
311
323
  ] });
312
324
  };
313
325
  export {
314
- U as AuthContext,
315
- de as AuthProvider,
316
- b as LoadingContext,
317
- le as LoadingProvider,
318
- L as LuminusComponentsContext,
319
- ie as LuminusComponentsProvider,
320
- G as UserContext,
321
- ue as UserProvider
326
+ b as AuthContext,
327
+ Ee as AuthProvider,
328
+ G as LoadingContext,
329
+ me as LoadingProvider,
330
+ j as LuminusComponentsContext,
331
+ ge as LuminusComponentsProvider,
332
+ B as UserContext,
333
+ xe as UserProvider
322
334
  };
@@ -4,6 +4,7 @@ type Config = {
4
4
  authenticated?: boolean;
5
5
  differentBaseUrl?: string;
6
6
  silent?: boolean;
7
+ customToken?: string;
7
8
  };
8
9
  export declare const useAxios: (useAxiosConfig?: Config) => import("axios").AxiosInstance;
9
10
  export {};