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.
- package/dist/.vite/manifest.json +60 -60
- package/dist/FromToDatePickerDropdownToggle-BPfviPUU.cjs +253 -0
- package/dist/{FromToDatePickerDropdownToggle-a6zb7EV7.js → FromToDatePickerDropdownToggle-DDOxJCc2.js} +2178 -2571
- package/dist/{PrimaryButton-BbKMePCv.js → PrimaryButton-B64e5vBv.js} +261 -289
- package/dist/PrimaryButton-BnrFH2PB.cjs +1 -0
- package/dist/SimpleTooltip-BgRjtr0d.js +5 -0
- package/dist/{SimpleTooltip-ngcscCjg.cjs → SimpleTooltip-DIqIPx0H.cjs} +1 -1
- package/dist/components/NewTabs/Tab/Tab.d.ts +5 -5
- package/dist/components/NewTabs/Tabs/Tabs.d.ts +7 -6
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +180 -304
- package/dist/{dateUtils-D5PdELhi.js → dateUtils-C8trxO28.js} +1 -1
- package/dist/{dateUtils-CIDS0n5B.cjs → dateUtils-ChS-y8JY.cjs} +1 -1
- package/dist/hooks/useFormControlType/useFormControlType.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.es.js +37 -35
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +29 -27
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1755 -2126
- package/dist/{searchUtils-9_EWs2V9.cjs → searchUtils-BdYnxcy0.cjs} +1 -1
- package/dist/{searchUtils-CEjMiULh.js → searchUtils-C38WM_G8.js} +1 -1
- package/dist/useLocalStorageState-CFe9QRz0.js +76 -0
- package/dist/useLocalStorageState-asgEpnUg.cjs +1 -0
- package/dist/usePermissions-55of2QBH.js +17 -0
- package/dist/usePermissions-Ce0AAKj1.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +54 -52
- package/package.json +3 -3
- package/dist/FromToDatePickerDropdownToggle-EhHpHC9A.cjs +0 -253
- package/dist/PrimaryButton-ugYzKlak.cjs +0 -1
- package/dist/SimpleTooltip-Boktzm98.js +0 -5
- package/dist/useLocalStorageState-CT8xepqa.cjs +0 -1
- package/dist/useLocalStorageState-DkeM8Y6R.js +0 -74
- package/dist/usePermissions-BkVAe1PL.cjs +0 -1
- package/dist/usePermissions-Dh1Sgbd7.js +0 -15
package/dist/contexts.es.js
CHANGED
|
@@ -1,402 +1,278 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
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
|
|
7
|
-
import { f as
|
|
8
|
-
import { m as
|
|
9
|
-
const
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
}, []), c =
|
|
13
|
-
|
|
14
|
-
}, []), l =
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
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
|
-
},
|
|
20
|
-
const { confirmTexts: e } =
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
u.preventDefault(), !(
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
value:
|
|
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
|
-
}), [
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
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__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
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
|
-
},
|
|
49
|
-
const [
|
|
50
|
-
}), i =
|
|
51
|
-
|
|
52
|
-
}, []),
|
|
53
|
-
|
|
54
|
-
}, []), u =
|
|
55
|
-
isShown:
|
|
56
|
-
text:
|
|
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:
|
|
60
|
+
hidePrompt: m,
|
|
59
61
|
resolveRef: l,
|
|
60
|
-
options:
|
|
62
|
+
options: s,
|
|
61
63
|
setOptions: c
|
|
62
|
-
}), [
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
+
}), [r, o, i, m, s]);
|
|
65
|
+
return /* @__PURE__ */ n.jsxs(G.Provider, { value: u, children: [
|
|
64
66
|
e,
|
|
65
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ n.jsx(te, {})
|
|
66
68
|
] });
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
axiosOptions:
|
|
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:
|
|
72
|
-
NavigateComponent:
|
|
73
|
-
language:
|
|
74
|
-
axiosTexts:
|
|
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:
|
|
80
|
+
formSubmitTexts: m,
|
|
79
81
|
appSearchTexts: u,
|
|
80
|
-
customSelectTexts:
|
|
81
|
-
errorBoundaryTexts:
|
|
82
|
-
widgetTexts:
|
|
83
|
-
texts:
|
|
84
|
-
ProjectIconComponent:
|
|
85
|
-
localizationContext:
|
|
82
|
+
customSelectTexts: L,
|
|
83
|
+
errorBoundaryTexts: P,
|
|
84
|
+
widgetTexts: y,
|
|
85
|
+
texts: C,
|
|
86
|
+
ProjectIconComponent: N,
|
|
87
|
+
localizationContext: D
|
|
86
88
|
}), [
|
|
87
|
-
|
|
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
|
-
|
|
98
|
+
m,
|
|
97
99
|
u,
|
|
98
|
-
R,
|
|
99
|
-
A,
|
|
100
100
|
L,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
P,
|
|
102
|
+
y,
|
|
103
|
+
N,
|
|
104
|
+
D,
|
|
105
|
+
C
|
|
104
106
|
]);
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
|
|
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
|
-
},
|
|
110
|
-
const [
|
|
111
|
-
|
|
112
|
-
}, [
|
|
113
|
-
|
|
114
|
-
}, [
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
|
|
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
|
-
|
|
121
|
-
|
|
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
|
-
|
|
126
|
+
w(() => {
|
|
251
127
|
u();
|
|
252
128
|
}, [u]);
|
|
253
|
-
const
|
|
254
|
-
const
|
|
255
|
-
return
|
|
256
|
-
}, [])(), [
|
|
257
|
-
state:
|
|
258
|
-
user:
|
|
259
|
-
}),
|
|
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
|
|
262
|
-
x =
|
|
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
|
-
}, [
|
|
267
|
-
localStorage.removeItem("user"),
|
|
268
|
-
state:
|
|
142
|
+
}, [r]), D = f(() => {
|
|
143
|
+
localStorage.removeItem("user"), C({
|
|
144
|
+
state: I.LOGGED_OUT,
|
|
269
145
|
user: null
|
|
270
|
-
}),
|
|
271
|
-
}, [
|
|
272
|
-
|
|
273
|
-
state:
|
|
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
|
|
277
|
-
return x ? (
|
|
278
|
-
state:
|
|
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) : (
|
|
281
|
-
state:
|
|
156
|
+
}), localStorage.setItem("user", JSON.stringify(x)), await c(), !0) : (C({
|
|
157
|
+
state: I.LOGIN_FAILED,
|
|
282
158
|
user: null
|
|
283
159
|
}), !1);
|
|
284
|
-
}, [
|
|
285
|
-
|
|
286
|
-
}, [
|
|
287
|
-
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
if (x.eventType ===
|
|
291
|
-
const
|
|
292
|
-
|
|
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
|
-
|
|
172
|
+
d && a.removeEventCallback(d);
|
|
297
173
|
};
|
|
298
174
|
}
|
|
299
175
|
return () => {
|
|
300
176
|
};
|
|
301
|
-
}, [
|
|
302
|
-
const U =
|
|
303
|
-
|
|
304
|
-
|
|
177
|
+
}, [a, j, S]);
|
|
178
|
+
const U = f(async (d) => {
|
|
179
|
+
d && await j(d).catch(() => {
|
|
180
|
+
S(), t(null);
|
|
305
181
|
});
|
|
306
|
-
}, [
|
|
307
|
-
|
|
182
|
+
}, [j, S, t]);
|
|
183
|
+
w(() => {
|
|
308
184
|
U(i);
|
|
309
|
-
}, [i,
|
|
310
|
-
const
|
|
311
|
-
user:
|
|
312
|
-
userLoginState:
|
|
313
|
-
loginUser:
|
|
314
|
-
logoutUser:
|
|
315
|
-
}), [
|
|
316
|
-
return /* @__PURE__ */
|
|
317
|
-
},
|
|
318
|
-
const { cookieDomain:
|
|
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
|
|
199
|
+
return w(() => {
|
|
324
200
|
if (e.useMsal) {
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
327
|
-
const c =
|
|
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,
|
|
330
|
-
|
|
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:
|
|
335
|
-
expires:
|
|
210
|
+
domain: r,
|
|
211
|
+
expires: m ?? void 0
|
|
336
212
|
});
|
|
337
213
|
}
|
|
338
|
-
|
|
214
|
+
s.error && console.error("AuthProvider MSAL Error", s);
|
|
339
215
|
});
|
|
340
216
|
return () => {
|
|
341
|
-
|
|
217
|
+
t && e.msalInstance.removeEventCallback(t);
|
|
342
218
|
};
|
|
343
219
|
}
|
|
344
220
|
return () => {
|
|
345
221
|
};
|
|
346
|
-
}, [e,
|
|
347
|
-
},
|
|
348
|
-
const [
|
|
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 =
|
|
352
|
-
|
|
227
|
+
}), i = M(null);
|
|
228
|
+
w(() => {
|
|
353
229
|
const u = () => {
|
|
354
|
-
l(), i.current = window.setTimeout(u,
|
|
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]),
|
|
235
|
+
}, [l]), w(() => {
|
|
360
236
|
const u = () => {
|
|
361
|
-
|
|
237
|
+
t();
|
|
362
238
|
};
|
|
363
239
|
return window.addEventListener("focus", u), () => {
|
|
364
240
|
window.removeEventListener("focus", u);
|
|
365
241
|
};
|
|
366
|
-
}, [
|
|
367
|
-
const
|
|
368
|
-
delegation:
|
|
369
|
-
setDelegation:
|
|
370
|
-
availableDelegations:
|
|
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
|
-
|
|
375
|
-
|
|
376
|
-
|
|
250
|
+
a,
|
|
251
|
+
o,
|
|
252
|
+
s,
|
|
377
253
|
c,
|
|
378
254
|
l
|
|
379
255
|
]);
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
-
},
|
|
382
|
-
const { confirmTexts: e } =
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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,
|
|
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;
|