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.
- package/dist/.vite/manifest.json +42 -42
- package/dist/{NoInputContainer-CnWtqd6M.js → NoInputContainer-BAgsWdLH.js} +498 -498
- package/dist/{NoInputContainer-B2NLKTjL.cjs → NoInputContainer-BK9oG3tT.cjs} +16 -16
- package/dist/{PrimaryButton-DdX5Urwd.cjs → PrimaryButton-7SShR5CP.cjs} +1 -1
- package/dist/{PrimaryButton-JmPJBth0.js → PrimaryButton-DEmq1lC9.js} +1 -1
- package/dist/{SimpleTooltip-DAt21777.cjs → SimpleTooltip-4RS28Xw5.cjs} +1 -1
- package/dist/{SimpleTooltip-SJ7NFji7.js → SimpleTooltip-DcjdypSH.js} +1 -1
- package/dist/components/common/ImgApi/ImgApi.d.ts +4 -0
- package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +9 -0
- package/dist/components/common/ImgDirect/ImgDirect.d.ts +4 -0
- package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +6 -2
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +6 -2
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +160 -148
- package/dist/hooks/useAxios/useAxios.d.ts +1 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +4 -4
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +1206 -1177
- package/dist/models/index.d.ts +2 -0
- package/dist/models/prop-types/ImgProps.d.ts +7 -0
- package/dist/models/types/UserModel.d.ts +2 -1
- package/dist/{useConfirm-C4vc6fDa.js → useConfirm-D0XQit1K.js} +1 -1
- package/dist/{useConfirm-k8Kyrbnb.cjs → useConfirm-DnHLBOB6.cjs} +1 -1
- package/dist/{usePermissions-CJNbDDXa.cjs → usePermissions-CZ9GOCPf.cjs} +1 -1
- package/dist/{usePermissions-fMk86sJx.js → usePermissions-giXiX-A0.js} +1 -1
- package/package.json +1 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
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
|
|
6
|
-
import { M as
|
|
7
|
-
const
|
|
8
|
-
const [s, n] = h(!1), [o, t] = h(""), r =
|
|
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
|
-
}, []),
|
|
10
|
+
}, []), a = f(() => {
|
|
11
11
|
n(!1);
|
|
12
|
-
}, []),
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
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
|
-
},
|
|
18
|
-
const { confirmTexts: 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 =
|
|
21
|
-
|
|
20
|
+
}, [o]), d = f((x) => {
|
|
21
|
+
x.preventDefault(), !(t.required && !r) && o(r);
|
|
22
22
|
}, [o, t.required, r]);
|
|
23
|
-
|
|
24
|
-
s === !0 &&
|
|
23
|
+
y(() => {
|
|
24
|
+
s === !0 && a(t.defaultValue ?? "");
|
|
25
25
|
}, [s, t.defaultValue]);
|
|
26
|
-
const m =
|
|
26
|
+
const m = I(() => ({
|
|
27
27
|
value: r,
|
|
28
|
-
onChange: (
|
|
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__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
t.input === "textarea" ? /* @__PURE__ */
|
|
38
|
-
t.input === "input" ? /* @__PURE__ */
|
|
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__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
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
|
-
},
|
|
47
|
-
const [s, n] = h(!1), [o, t] = h(""), [r,
|
|
48
|
-
}), d =
|
|
49
|
-
t(
|
|
50
|
-
}, []), m =
|
|
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
|
-
}, []),
|
|
52
|
+
}, []), x = I(() => ({
|
|
53
53
|
isShown: s,
|
|
54
54
|
text: o,
|
|
55
55
|
showPrompt: d,
|
|
56
56
|
hidePrompt: m,
|
|
57
|
-
resolveRef:
|
|
57
|
+
resolveRef: l,
|
|
58
58
|
options: r,
|
|
59
|
-
setOptions:
|
|
59
|
+
setOptions: a
|
|
60
60
|
}), [s, o, d, m, r]);
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ c.jsxs(O.Provider, { value: x, children: [
|
|
62
62
|
e,
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ c.jsx(ee, {})
|
|
64
64
|
] });
|
|
65
|
-
},
|
|
66
|
-
const S =
|
|
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:
|
|
74
|
-
formValidationTexts:
|
|
73
|
+
confirmTexts: a,
|
|
74
|
+
formValidationTexts: l,
|
|
75
75
|
homeDashboardTexts: d,
|
|
76
76
|
formSubmitTexts: m,
|
|
77
|
-
appSearchTexts:
|
|
78
|
-
customSelectTexts:
|
|
79
|
-
errorBoundaryTexts:
|
|
80
|
-
widgetTexts:
|
|
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
|
-
|
|
89
|
-
|
|
88
|
+
a,
|
|
89
|
+
l,
|
|
90
90
|
d,
|
|
91
91
|
m,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
x,
|
|
93
|
+
P,
|
|
94
|
+
R,
|
|
95
|
+
T
|
|
96
96
|
]);
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
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
|
-
},
|
|
102
|
-
const [s, n] = h(!1), [o] = h(/* @__PURE__ */ new Set()), t =
|
|
103
|
-
o.add(
|
|
104
|
-
}, [o]), r =
|
|
105
|
-
o.delete(
|
|
106
|
-
}, [o]),
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
s && /* @__PURE__ */
|
|
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
|
|
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
|
|
122
|
+
return i.Login;
|
|
123
123
|
case u.SSO_SILENT_START:
|
|
124
|
-
return
|
|
124
|
+
return i.SsoSilent;
|
|
125
125
|
case u.ACQUIRE_TOKEN_START:
|
|
126
|
-
if (s.interactionType ===
|
|
127
|
-
return
|
|
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
|
|
130
|
+
return i.HandleRedirect;
|
|
131
131
|
case u.LOGOUT_START:
|
|
132
|
-
return
|
|
132
|
+
return i.Logout;
|
|
133
133
|
case u.SSO_SILENT_SUCCESS:
|
|
134
134
|
case u.SSO_SILENT_FAILURE:
|
|
135
|
-
if (n && n !==
|
|
135
|
+
if (n && n !== i.SsoSilent)
|
|
136
136
|
break;
|
|
137
|
-
return
|
|
137
|
+
return i.None;
|
|
138
138
|
case u.LOGOUT_END:
|
|
139
|
-
if (n && n !==
|
|
139
|
+
if (n && n !== i.Logout)
|
|
140
140
|
break;
|
|
141
|
-
return
|
|
141
|
+
return i.None;
|
|
142
142
|
case u.HANDLE_REDIRECT_END:
|
|
143
|
-
if (n && n !==
|
|
143
|
+
if (n && n !== i.HandleRedirect)
|
|
144
144
|
break;
|
|
145
|
-
return
|
|
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 ===
|
|
152
|
-
if (n && n !==
|
|
151
|
+
if (s.interactionType === p.Redirect || s.interactionType === p.Popup) {
|
|
152
|
+
if (n && n !== i.Login && n !== i.AcquireToken)
|
|
153
153
|
break;
|
|
154
|
-
return
|
|
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
|
|
162
|
+
const se = "@azure/msal-react", U = "2.0.16";
|
|
163
163
|
/*! @azure/msal-react v2.0.16 2024-05-07 */
|
|
164
|
-
const
|
|
164
|
+
const A = {
|
|
165
165
|
UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
|
|
166
166
|
EVENT: "EVENT"
|
|
167
|
-
},
|
|
167
|
+
}, oe = (e, s) => {
|
|
168
168
|
const { type: n, payload: o } = s;
|
|
169
169
|
let t = e.inProgress;
|
|
170
170
|
switch (n) {
|
|
171
|
-
case
|
|
172
|
-
e.inProgress ===
|
|
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
|
|
175
|
-
const
|
|
176
|
-
|
|
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 && !
|
|
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
|
-
} :
|
|
189
|
+
} : _(r, e.accounts) ? e : {
|
|
190
190
|
...e,
|
|
191
191
|
accounts: r
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
-
e.initializeWrapperLibrary(
|
|
194
|
+
function re({ instance: e, children: s }) {
|
|
195
|
+
y(() => {
|
|
196
|
+
e.initializeWrapperLibrary(z.React, U);
|
|
197
197
|
}, [e]);
|
|
198
|
-
const n =
|
|
199
|
-
inProgress:
|
|
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
|
-
|
|
203
|
-
const
|
|
202
|
+
y(() => {
|
|
203
|
+
const a = e.addEventCallback((l) => {
|
|
204
204
|
t({
|
|
205
205
|
payload: {
|
|
206
206
|
instance: e,
|
|
207
207
|
logger: n,
|
|
208
|
-
message:
|
|
208
|
+
message: l
|
|
209
209
|
},
|
|
210
|
-
type:
|
|
210
|
+
type: A.EVENT
|
|
211
211
|
});
|
|
212
212
|
});
|
|
213
|
-
return n.verbose(`MsalProvider - Registered event callback with id: ${
|
|
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:
|
|
221
|
+
type: A.UNBLOCK_INPROGRESS
|
|
222
222
|
});
|
|
223
223
|
});
|
|
224
224
|
}).catch(() => {
|
|
225
225
|
}), () => {
|
|
226
|
-
|
|
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
|
|
235
|
+
return V.createElement(D.Provider, { value: r }, s);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
const s =
|
|
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
|
-
}, []), [
|
|
242
|
-
let
|
|
243
|
-
return await s.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((
|
|
244
|
-
|
|
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
|
-
|
|
247
|
-
}),
|
|
248
|
-
}, [s]),
|
|
249
|
-
localStorage.removeItem("user");
|
|
250
|
-
}, []),
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
return
|
|
254
|
-
}, [
|
|
255
|
-
|
|
256
|
-
}, [
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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((
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
264
|
-
|
|
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,
|
|
274
|
-
|
|
275
|
-
|
|
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
|
|
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
|
|
285
|
-
e.msalInstance.setActiveAccount(
|
|
286
|
-
const d =
|
|
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__ */
|
|
303
|
-
},
|
|
304
|
-
const { confirmTexts: e } =
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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
|
};
|