react-luminus-components 1.3.17 → 1.3.20
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-D_uCtgcq.cjs → NoInputContainer-BKPv5rmP.cjs} +45 -45
- package/dist/{NoInputContainer-DPjgKLR8.js → NoInputContainer-C2e1tx-D.js} +834 -829
- package/dist/{PrimaryButton-B9eaaCaE.js → PrimaryButton-JNkq9258.js} +1 -1
- package/dist/{PrimaryButton-CsedWqh2.cjs → PrimaryButton-PjAN0Acn.cjs} +1 -1
- package/dist/{SimpleTooltip-Dkn3uxZY.js → SimpleTooltip-BCnuzxKk.js} +1 -1
- package/dist/{SimpleTooltip-cWWpVW4n.cjs → SimpleTooltip-BTqqafx1.cjs} +1 -1
- package/dist/contexts/delegation/DelegationContext.d.ts +7 -0
- package/dist/contexts/delegation/DelegationProvider.d.ts +6 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +183 -173
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +26 -26
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +4 -4
- package/dist/{useConfirm-DHh1dicX.cjs → useConfirm-95WxctJ9.cjs} +1 -1
- package/dist/{useConfirm-Dv-I8Odc.js → useConfirm-DkHhgyYO.js} +1 -1
- package/dist/{usePermissions-C6VQVWtc.js → usePermissions-B2G69gWH.js} +1 -1
- package/dist/{usePermissions-CBFsynG2.cjs → usePermissions-kfYKLHzs.cjs} +1 -1
- package/package.json +1 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
import { j as a, am as
|
|
2
|
-
import
|
|
1
|
+
import { j as a, am as F, Q as j, an as w, ao as z, ap as K, L as A, K as i, aq as H, ar as B, as as U, a4 as q, a8 as G, at as M, a9 as V, ab as y, aa as $, au as Q } from "./NoInputContainer-C2e1tx-D.js";
|
|
2
|
+
import J, { useState as h, useCallback as f, useMemo as C, useContext as L, useEffect as v, useRef as W, useReducer as X } 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 [
|
|
5
|
+
import { u as Y, a as Z } from "./useConfirm-DkHhgyYO.js";
|
|
6
|
+
import { M as I, b as ee, P as p, L as te, E as u } from "./PrimaryButton-JNkq9258.js";
|
|
7
|
+
const ne = ({ children: e }) => {
|
|
8
|
+
const [n, t] = h(!1), [o, s] = h(""), r = f((d) => {
|
|
9
9
|
t(!0), s(d);
|
|
10
|
-
}, []), c =
|
|
10
|
+
}, []), c = f(() => {
|
|
11
11
|
t(!1);
|
|
12
|
-
}, []),
|
|
13
|
-
return /* @__PURE__ */ a.jsxs(
|
|
14
|
-
/* @__PURE__ */ a.jsx(
|
|
12
|
+
}, []), l = C(() => ({ show: n, text: o, showConfirm: r, hideConfirm: c }), [n, o, r, c]);
|
|
13
|
+
return /* @__PURE__ */ a.jsxs(F.Provider, { value: l, children: [
|
|
14
|
+
/* @__PURE__ */ a.jsx(ie, {}),
|
|
15
15
|
e
|
|
16
16
|
] });
|
|
17
|
-
},
|
|
18
|
-
const { confirmTexts: e } =
|
|
17
|
+
}, se = () => {
|
|
18
|
+
const { confirmTexts: e } = L(j), { isShown: n, text: t, onFinish: o } = Y(), { options: s } = L(w), [r, c] = h(s.defaultValue ?? ""), l = f(() => {
|
|
19
19
|
o(null);
|
|
20
|
-
}, [o]), d =
|
|
21
|
-
E.preventDefault(), !(s.required && !
|
|
22
|
-
}, [o, s.required,
|
|
20
|
+
}, [o]), d = f((E) => {
|
|
21
|
+
E.preventDefault(), !(s.required && !r) && o(r);
|
|
22
|
+
}, [o, s.required, r]);
|
|
23
23
|
v(() => {
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
const
|
|
27
|
-
value:
|
|
24
|
+
n === !0 && c(s.defaultValue ?? "");
|
|
25
|
+
}, [n, s.defaultValue]);
|
|
26
|
+
const g = C(() => ({
|
|
27
|
+
value: r,
|
|
28
28
|
onChange: (E) => c(E.currentTarget.value),
|
|
29
29
|
className: "w-100",
|
|
30
30
|
autoFocus: !0,
|
|
31
31
|
tabIndex: 0
|
|
32
|
-
}), [
|
|
33
|
-
return /* @__PURE__ */ a.jsxs(
|
|
34
|
-
/* @__PURE__ */ a.jsx(
|
|
32
|
+
}), [r]);
|
|
33
|
+
return /* @__PURE__ */ a.jsxs(I, { show: n, size: "sm", centered: !0, onHide: l, children: [
|
|
34
|
+
/* @__PURE__ */ a.jsx(I.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(I.Title, { children: t }) }),
|
|
35
35
|
/* @__PURE__ */ a.jsxs("form", { onSubmit: d, children: [
|
|
36
|
-
/* @__PURE__ */ a.jsxs(
|
|
37
|
-
s.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...
|
|
38
|
-
s.input === "input" ? /* @__PURE__ */ a.jsx(
|
|
36
|
+
/* @__PURE__ */ a.jsxs(I.Body, { children: [
|
|
37
|
+
s.input === "textarea" ? /* @__PURE__ */ a.jsx("textarea", { ...g, rows: 5 }) : void 0,
|
|
38
|
+
s.input === "input" ? /* @__PURE__ */ a.jsx(ee, { ...g, type: s.type }) : void 0
|
|
39
39
|
] }),
|
|
40
|
-
/* @__PURE__ */ a.jsxs(
|
|
41
|
-
/* @__PURE__ */ a.jsx(
|
|
42
|
-
/* @__PURE__ */ a.jsx(
|
|
40
|
+
/* @__PURE__ */ a.jsxs(I.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
41
|
+
/* @__PURE__ */ a.jsx(p, { variant: "outlined", color: "secondary", onClick: l, className: "flex-grow-1", children: e.cancel }),
|
|
42
|
+
/* @__PURE__ */ a.jsx(p, { color: "primary", disabled: s.required && !r, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
43
43
|
] })
|
|
44
44
|
] })
|
|
45
45
|
] });
|
|
46
|
-
},
|
|
47
|
-
const [
|
|
48
|
-
}), d =
|
|
49
|
-
s(
|
|
50
|
-
}, []),
|
|
46
|
+
}, oe = ({ children: e }) => {
|
|
47
|
+
const [n, t] = h(!1), [o, s] = h(""), [r, c] = h({ input: "textarea", type: "text" }), l = W(() => {
|
|
48
|
+
}), d = f((P) => {
|
|
49
|
+
s(P), t(!0);
|
|
50
|
+
}, []), g = f(() => {
|
|
51
51
|
t(!1);
|
|
52
|
-
}, []), E =
|
|
53
|
-
isShown:
|
|
52
|
+
}, []), E = C(() => ({
|
|
53
|
+
isShown: n,
|
|
54
54
|
text: o,
|
|
55
55
|
showPrompt: d,
|
|
56
|
-
hidePrompt:
|
|
57
|
-
resolveRef:
|
|
58
|
-
options:
|
|
56
|
+
hidePrompt: g,
|
|
57
|
+
resolveRef: l,
|
|
58
|
+
options: r,
|
|
59
59
|
setOptions: c
|
|
60
|
-
}), [
|
|
61
|
-
return /* @__PURE__ */ a.jsxs(
|
|
60
|
+
}), [n, o, d, g, r]);
|
|
61
|
+
return /* @__PURE__ */ a.jsxs(w.Provider, { value: E, children: [
|
|
62
62
|
e,
|
|
63
|
-
/* @__PURE__ */ a.jsx(
|
|
63
|
+
/* @__PURE__ */ a.jsx(se, {})
|
|
64
64
|
] });
|
|
65
|
-
},
|
|
66
|
-
const
|
|
67
|
-
axiosOptions:
|
|
65
|
+
}, xe = ({ cookieDomain: e, axiosOptions: n, LinkComponent: t, NavigateComponent: o, language: s, axiosTexts: r, confirmTexts: c, formValidationTexts: l, homeDashboardTexts: d, formSubmitTexts: g, appSearchTexts: E, customSelectTexts: P, errorBoundaryTexts: S, widgetTexts: R, children: _ }) => {
|
|
66
|
+
const N = C(() => ({
|
|
67
|
+
axiosOptions: n,
|
|
68
68
|
cookieDomain: e,
|
|
69
69
|
LinkComponent: t,
|
|
70
70
|
NavigateComponent: o,
|
|
71
71
|
language: s,
|
|
72
|
-
axiosTexts:
|
|
72
|
+
axiosTexts: r,
|
|
73
73
|
confirmTexts: c,
|
|
74
|
-
formValidationTexts:
|
|
74
|
+
formValidationTexts: l,
|
|
75
75
|
homeDashboardTexts: d,
|
|
76
|
-
formSubmitTexts:
|
|
76
|
+
formSubmitTexts: g,
|
|
77
77
|
appSearchTexts: E,
|
|
78
|
-
customSelectTexts:
|
|
79
|
-
errorBoundaryTexts:
|
|
80
|
-
widgetTexts:
|
|
78
|
+
customSelectTexts: P,
|
|
79
|
+
errorBoundaryTexts: S,
|
|
80
|
+
widgetTexts: R
|
|
81
81
|
}), [
|
|
82
|
-
|
|
82
|
+
n,
|
|
83
83
|
e,
|
|
84
84
|
t,
|
|
85
85
|
o,
|
|
86
86
|
s,
|
|
87
|
-
|
|
87
|
+
r,
|
|
88
88
|
c,
|
|
89
|
-
|
|
89
|
+
l,
|
|
90
90
|
d,
|
|
91
|
-
|
|
91
|
+
g,
|
|
92
92
|
E,
|
|
93
|
+
P,
|
|
93
94
|
S,
|
|
94
|
-
|
|
95
|
-
I
|
|
95
|
+
R
|
|
96
96
|
]);
|
|
97
|
-
return /* @__PURE__ */ a.jsx(
|
|
98
|
-
/* @__PURE__ */ a.jsx(
|
|
99
|
-
|
|
97
|
+
return /* @__PURE__ */ a.jsx(j.Provider, { value: N, children: /* @__PURE__ */ a.jsx(ne, { children: /* @__PURE__ */ a.jsxs(oe, { children: [
|
|
98
|
+
/* @__PURE__ */ a.jsx(z, {}),
|
|
99
|
+
_
|
|
100
100
|
] }) }) });
|
|
101
|
-
},
|
|
102
|
-
const [
|
|
103
|
-
o.add(
|
|
104
|
-
}, [o]),
|
|
105
|
-
o.delete(
|
|
106
|
-
}, [o]), c =
|
|
107
|
-
return /* @__PURE__ */ a.jsxs(
|
|
108
|
-
|
|
101
|
+
}, he = ({ children: e }) => {
|
|
102
|
+
const [n, t] = h(!1), [o] = h(/* @__PURE__ */ new Set()), s = f((l) => {
|
|
103
|
+
o.add(l), t(!0);
|
|
104
|
+
}, [o]), r = f((l) => {
|
|
105
|
+
o.delete(l), o.size === 0 && t(!1);
|
|
106
|
+
}, [o]), c = C(() => ({ isLoading: n, startLoading: s, stopLoading: r }), [n, s, r]);
|
|
107
|
+
return /* @__PURE__ */ a.jsxs(K.Provider, { value: c, children: [
|
|
108
|
+
n && /* @__PURE__ */ a.jsx(te, {}),
|
|
109
109
|
e
|
|
110
110
|
] });
|
|
111
111
|
};
|
|
112
112
|
/*! @azure/msal-browser v3.14.0 2024-05-07 */
|
|
113
|
-
class
|
|
113
|
+
class re {
|
|
114
114
|
/**
|
|
115
115
|
* Gets interaction status from event message
|
|
116
116
|
* @param message
|
|
117
117
|
* @param currentStatus
|
|
118
118
|
*/
|
|
119
|
-
static getInteractionStatusFromEvent(
|
|
120
|
-
switch (
|
|
119
|
+
static getInteractionStatusFromEvent(n, t) {
|
|
120
|
+
switch (n.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 (
|
|
127
|
-
return
|
|
126
|
+
if (n.interactionType === A.Redirect || n.interactionType === A.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 (t && t !==
|
|
135
|
+
if (t && t !== i.SsoSilent)
|
|
136
136
|
break;
|
|
137
|
-
return
|
|
137
|
+
return i.None;
|
|
138
138
|
case u.LOGOUT_END:
|
|
139
|
-
if (t && t !==
|
|
139
|
+
if (t && t !== i.Logout)
|
|
140
140
|
break;
|
|
141
|
-
return
|
|
141
|
+
return i.None;
|
|
142
142
|
case u.HANDLE_REDIRECT_END:
|
|
143
|
-
if (t && t !==
|
|
143
|
+
if (t && t !== 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 (
|
|
152
|
-
if (t && t !==
|
|
151
|
+
if (n.interactionType === A.Redirect || n.interactionType === A.Popup) {
|
|
152
|
+
if (t && t !== i.Login && t !== i.AcquireToken)
|
|
153
153
|
break;
|
|
154
|
-
return
|
|
154
|
+
return i.None;
|
|
155
155
|
}
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
@@ -159,55 +159,55 @@ class se {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
/*! @azure/msal-react v2.0.16 2024-05-07 */
|
|
162
|
-
const
|
|
162
|
+
const ae = "@azure/msal-react", b = "2.0.16";
|
|
163
163
|
/*! @azure/msal-react v2.0.16 2024-05-07 */
|
|
164
|
-
const
|
|
164
|
+
const O = {
|
|
165
165
|
UNBLOCK_INPROGRESS: "UNBLOCK_INPROGRESS",
|
|
166
166
|
EVENT: "EVENT"
|
|
167
|
-
},
|
|
168
|
-
const { type: t, payload: o } =
|
|
167
|
+
}, ce = (e, n) => {
|
|
168
|
+
const { type: t, payload: o } = n;
|
|
169
169
|
let s = e.inProgress;
|
|
170
170
|
switch (t) {
|
|
171
|
-
case
|
|
172
|
-
e.inProgress ===
|
|
171
|
+
case O.UNBLOCK_INPROGRESS:
|
|
172
|
+
e.inProgress === i.Startup && (s = i.None, o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));
|
|
173
173
|
break;
|
|
174
|
-
case
|
|
175
|
-
const c = o.message,
|
|
176
|
-
|
|
174
|
+
case O.EVENT:
|
|
175
|
+
const c = o.message, l = re.getInteractionStatusFromEvent(c, e.inProgress);
|
|
176
|
+
l && (o.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${l}`), s = l);
|
|
177
177
|
break;
|
|
178
178
|
default:
|
|
179
179
|
throw new Error(`Unknown action type: ${t}`);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
182
|
-
return s !== e.inProgress && !
|
|
181
|
+
const r = o.instance.getAllAccounts();
|
|
182
|
+
return s !== e.inProgress && !U(r, e.accounts) ? {
|
|
183
183
|
...e,
|
|
184
184
|
inProgress: s,
|
|
185
|
-
accounts:
|
|
185
|
+
accounts: r
|
|
186
186
|
} : s !== e.inProgress ? {
|
|
187
187
|
...e,
|
|
188
188
|
inProgress: s
|
|
189
|
-
} :
|
|
189
|
+
} : U(r, e.accounts) ? e : {
|
|
190
190
|
...e,
|
|
191
|
-
accounts:
|
|
191
|
+
accounts: r
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
|
-
function
|
|
194
|
+
function le({ instance: e, children: n }) {
|
|
195
195
|
v(() => {
|
|
196
|
-
e.initializeWrapperLibrary(
|
|
196
|
+
e.initializeWrapperLibrary(H.React, b);
|
|
197
197
|
}, [e]);
|
|
198
|
-
const t =
|
|
199
|
-
inProgress:
|
|
198
|
+
const t = C(() => e.getLogger().clone(ae, b), [e]), [o, s] = X(ce, void 0, () => ({
|
|
199
|
+
inProgress: i.Startup,
|
|
200
200
|
accounts: e.getAllAccounts()
|
|
201
201
|
}));
|
|
202
202
|
v(() => {
|
|
203
|
-
const c = e.addEventCallback((
|
|
203
|
+
const c = e.addEventCallback((l) => {
|
|
204
204
|
s({
|
|
205
205
|
payload: {
|
|
206
206
|
instance: e,
|
|
207
207
|
logger: t,
|
|
208
|
-
message:
|
|
208
|
+
message: l
|
|
209
209
|
},
|
|
210
|
-
type:
|
|
210
|
+
type: O.EVENT
|
|
211
211
|
});
|
|
212
212
|
});
|
|
213
213
|
return t.verbose(`MsalProvider - Registered event callback with id: ${c}`), e.initialize().then(() => {
|
|
@@ -218,7 +218,7 @@ function oe({ instance: e, children: r }) {
|
|
|
218
218
|
instance: e,
|
|
219
219
|
logger: t
|
|
220
220
|
},
|
|
221
|
-
type:
|
|
221
|
+
type: O.UNBLOCK_INPROGRESS
|
|
222
222
|
});
|
|
223
223
|
});
|
|
224
224
|
}).catch(() => {
|
|
@@ -226,100 +226,102 @@ function oe({ instance: e, children: r }) {
|
|
|
226
226
|
c && (t.verbose(`MsalProvider - Removing event callback ${c}`), e.removeEventCallback(c));
|
|
227
227
|
};
|
|
228
228
|
}, [e, t]);
|
|
229
|
-
const
|
|
229
|
+
const r = {
|
|
230
230
|
instance: e,
|
|
231
231
|
inProgress: o.inProgress,
|
|
232
232
|
accounts: o.accounts,
|
|
233
233
|
logger: t
|
|
234
234
|
};
|
|
235
|
-
return
|
|
235
|
+
return J.createElement(B.Provider, { value: r }, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
}, [
|
|
237
|
+
const Ie = ({ children: e }) => {
|
|
238
|
+
const n = q(), { msalInstance: t } = L(G), { delegationId: o, setDelegationId: s } = L(M), { getToken: r } = V(), [c, l] = h(null), d = f(async () => {
|
|
239
|
+
const m = await r();
|
|
240
|
+
m && l(m);
|
|
241
|
+
}, [r]);
|
|
242
242
|
v(() => {
|
|
243
|
-
|
|
244
|
-
}, [
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
return
|
|
248
|
-
}, [])(), [
|
|
249
|
-
state:
|
|
250
|
-
user:
|
|
251
|
-
}),
|
|
243
|
+
d();
|
|
244
|
+
}, [d]);
|
|
245
|
+
const E = f(() => {
|
|
246
|
+
const m = localStorage.getItem("user") ?? null;
|
|
247
|
+
return m ? JSON.parse(m ?? "") : null;
|
|
248
|
+
}, [])(), [P, S] = h({
|
|
249
|
+
state: E ? y.LOGGED_IN : y.LOGGING_IN,
|
|
250
|
+
user: E
|
|
251
|
+
}), R = f(async (m) => {
|
|
252
252
|
let x = null;
|
|
253
|
-
return await
|
|
254
|
-
x =
|
|
253
|
+
return await n.get("/user/detail", m ? { headers: { Authorization: `Bearer ${m}` } } : void 0).then((k) => {
|
|
254
|
+
x = k.data;
|
|
255
255
|
}).catch(() => {
|
|
256
256
|
x = null;
|
|
257
257
|
}), x;
|
|
258
|
-
}, [
|
|
259
|
-
localStorage.removeItem("user"),
|
|
258
|
+
}, [n]), _ = f(() => {
|
|
259
|
+
localStorage.removeItem("user"), S({
|
|
260
260
|
state: y.LOGGED_OUT,
|
|
261
261
|
user: null
|
|
262
262
|
});
|
|
263
|
-
}, []),
|
|
264
|
-
|
|
263
|
+
}, []), N = f(async (m) => {
|
|
264
|
+
S({
|
|
265
265
|
state: y.LOGGING_IN,
|
|
266
266
|
user: null
|
|
267
267
|
});
|
|
268
|
-
const x = await
|
|
269
|
-
return x ? (
|
|
268
|
+
const x = await R(m);
|
|
269
|
+
return x ? (S({
|
|
270
270
|
state: y.LOGGED_IN,
|
|
271
271
|
user: x
|
|
272
|
-
}), localStorage.setItem("user", JSON.stringify(x)), !0) : (
|
|
272
|
+
}), localStorage.setItem("user", JSON.stringify(x)), !0) : (S({
|
|
273
273
|
state: y.LOGIN_FAILED,
|
|
274
274
|
user: null
|
|
275
275
|
}), !1);
|
|
276
|
-
}, [
|
|
277
|
-
|
|
278
|
-
}, [
|
|
279
|
-
user:
|
|
280
|
-
userLoginState:
|
|
281
|
-
loginUser:
|
|
282
|
-
logoutUser:
|
|
283
|
-
}), [
|
|
276
|
+
}, [R]), T = f(() => {
|
|
277
|
+
_();
|
|
278
|
+
}, [_]), D = C(() => ({
|
|
279
|
+
user: P.user,
|
|
280
|
+
userLoginState: P,
|
|
281
|
+
loginUser: N,
|
|
282
|
+
logoutUser: T
|
|
283
|
+
}), [P, N, T]);
|
|
284
284
|
return v(() => {
|
|
285
285
|
if (t) {
|
|
286
|
-
const
|
|
286
|
+
const m = t.addEventCallback((x) => {
|
|
287
287
|
if (x.eventType === u.LOGIN_SUCCESS && x.payload) {
|
|
288
|
-
const
|
|
289
|
-
|
|
288
|
+
const k = x.payload;
|
|
289
|
+
l(k.accessToken);
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
292
|
return () => {
|
|
293
|
-
|
|
293
|
+
m && t.removeEventCallback(m);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
return () => {
|
|
297
297
|
};
|
|
298
|
-
}, [t,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
298
|
+
}, [t, N, T]), v(() => {
|
|
299
|
+
c && N(c).catch(() => {
|
|
300
|
+
T(), s(null);
|
|
301
|
+
});
|
|
302
|
+
}, [c, N, T, o, s]), /* @__PURE__ */ a.jsx($.Provider, { value: D, children: e });
|
|
303
|
+
}, Ce = ({ ...e }) => {
|
|
304
|
+
const { cookieDomain: n } = L(j), [, t] = Q(["Authorization"]), o = C(() => ({
|
|
303
305
|
useMsal: e.useMsal ?? !1,
|
|
304
306
|
msalInstance: e.useMsal ? e.msalInstance ?? null : null,
|
|
305
307
|
msalScopes: e.useMsal ? e.msalScopes ?? [] : []
|
|
306
308
|
}), [e]);
|
|
307
309
|
return v(() => {
|
|
308
310
|
if (e.useMsal) {
|
|
309
|
-
const s = e.msalInstance.addEventCallback((
|
|
310
|
-
if (
|
|
311
|
-
const c =
|
|
312
|
-
e.msalInstance.setActiveAccount(
|
|
313
|
-
const d = c.accessToken,
|
|
311
|
+
const s = e.msalInstance.addEventCallback((r) => {
|
|
312
|
+
if (r.eventType === u.LOGIN_SUCCESS || r.eventType === u.ACQUIRE_TOKEN_SUCCESS && r.payload) {
|
|
313
|
+
const c = r.payload, l = c.account;
|
|
314
|
+
e.msalInstance.setActiveAccount(l);
|
|
315
|
+
const d = c.accessToken, g = c.expiresOn;
|
|
314
316
|
t("Authorization", d, {
|
|
315
317
|
path: "/",
|
|
316
318
|
secure: !0,
|
|
317
319
|
sameSite: "none",
|
|
318
|
-
domain:
|
|
319
|
-
expires:
|
|
320
|
+
domain: n,
|
|
321
|
+
expires: g ?? void 0
|
|
320
322
|
});
|
|
321
323
|
}
|
|
322
|
-
|
|
324
|
+
r.error && console.error("AuthProvider MSAL Error", r);
|
|
323
325
|
});
|
|
324
326
|
return () => {
|
|
325
327
|
s && e.msalInstance.removeEventCallback(s);
|
|
@@ -327,24 +329,32 @@ const ge = ({ children: e }) => {
|
|
|
327
329
|
}
|
|
328
330
|
return () => {
|
|
329
331
|
};
|
|
330
|
-
}, [e, t,
|
|
331
|
-
},
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
}, [e, t, n]), /* @__PURE__ */ a.jsx(G.Provider, { value: o, children: e.useMsal ? /* @__PURE__ */ a.jsx(le, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
333
|
+
}, Pe = ({ children: e }) => {
|
|
334
|
+
const [n, t] = h(null), o = C(() => ({
|
|
335
|
+
delegationId: n,
|
|
336
|
+
setDelegationId: t
|
|
337
|
+
}), [n]);
|
|
338
|
+
return /* @__PURE__ */ a.jsx(M.Provider, { value: o, children: e });
|
|
339
|
+
}, ie = () => {
|
|
340
|
+
const { confirmTexts: e } = L(j), { onConfirm: n, onCancel: t, text: o, show: s } = Z();
|
|
341
|
+
return /* @__PURE__ */ a.jsxs(I, { show: s, size: "sm", centered: !0, onHide: t, children: [
|
|
342
|
+
/* @__PURE__ */ a.jsx(I.Header, { className: "justify-content-center", children: /* @__PURE__ */ a.jsx(I.Title, { children: o }) }),
|
|
343
|
+
/* @__PURE__ */ a.jsx(I.Body, { children: /* @__PURE__ */ a.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
344
|
+
/* @__PURE__ */ a.jsx(p, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: t, children: e.no }),
|
|
345
|
+
/* @__PURE__ */ a.jsx(p, { type: "button", color: "primary", onClick: n, className: "w-100 ml", children: e.yes })
|
|
338
346
|
] }) })
|
|
339
347
|
] });
|
|
340
348
|
};
|
|
341
349
|
export {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
+
G as AuthContext,
|
|
351
|
+
Ce as AuthProvider,
|
|
352
|
+
M as DelegationContext,
|
|
353
|
+
Pe as DelegationProvider,
|
|
354
|
+
K as LoadingContext,
|
|
355
|
+
he as LoadingProvider,
|
|
356
|
+
j as LuminusComponentsContext,
|
|
357
|
+
xe as LuminusComponentsProvider,
|
|
358
|
+
$ as UserContext,
|
|
359
|
+
Ie as UserProvider
|
|
350
360
|
};
|