react-luminus-components 2.0.35 → 2.1.0
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 +36 -36
- package/dist/{FormDisabledProvider-CknAF8EI.js → FormDisabledProvider-CixhRdLK.js} +1 -1
- package/dist/{FormDisabledProvider-DoGy2C4j.cjs → FormDisabledProvider-DT0dU-kQ.cjs} +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +120 -122
- package/dist/hooks/useAxios/useAxios.d.ts +3 -5
- package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +49 -51
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +5 -5
- package/dist/{nivo-bar-wBsr2P1t.js → nivo-bar-BkbzRnZi.js} +240 -248
- package/dist/{nivo-bar-BkpPCncR.cjs → nivo-bar-CFkvCosn.cjs} +4 -4
- package/dist/{useIsFormDirty-Cb4GEBID.cjs → useIsFormDirty-C2-K6Xed.cjs} +1 -1
- package/dist/{useIsFormDirty-CTuj9_Nd.js → useIsFormDirty-DZBIvp4X.js} +1 -1
- package/dist/useLocalStorageState-B1kFYGzD.js +91 -0
- package/dist/useLocalStorageState-E2HAjd0z.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
- package/dist/useLocalStorageState-DBd2vOH1.js +0 -95
- package/dist/useLocalStorageState-gKbms6va.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as re, bR as Ne, c as N, bS as Oe, R as ae, an as He, bT as Ae, a5 as H, ak as Ue, S as ie, bU as We, ar as je, ap as Fe, bd as pe, by as De, bf as J, aq as Be, bV as ze, aF as we, bW as Ge, bX as Ve, bY as R, bZ as Xe, b_ as U, b$ as l, c0 as _e, c1 as Ie, c2 as V, c3 as E, c4 as q, c5 as ce, c6 as Re, c7 as Ke, c8 as Se, c9 as Je, ca as Qe, cb as Ye, cc as qe, cd as be, ce as G, cf as Le, cg as Ce, ch as Ze, ci as fe, cj as Me, ao as et, b8 as tt, a6 as nt } from "./nivo-bar-
|
|
2
|
-
import { ck as pn, ah as _n } from "./nivo-bar-
|
|
1
|
+
import { t as re, bR as Ne, c as N, bS as Oe, R as ae, an as He, bT as Ae, a5 as H, ak as Ue, S as ie, bU as We, ar as je, ap as Fe, bd as pe, by as De, bf as J, aq as Be, bV as ze, aF as we, bW as Ge, bX as Ve, bY as R, bZ as Xe, b_ as U, b$ as l, c0 as _e, c1 as Ie, c2 as V, c3 as E, c4 as q, c5 as ce, c6 as Re, c7 as Ke, c8 as Se, c9 as Je, ca as Qe, cb as Ye, cc as qe, cd as be, ce as G, cf as Le, cg as Ce, ch as Ze, ci as fe, cj as Me, ao as et, b8 as tt, a6 as nt } from "./nivo-bar-BkbzRnZi.js";
|
|
2
|
+
import { ck as pn, ah as _n } from "./nivo-bar-BkbzRnZi.js";
|
|
3
3
|
import { jsxs as L, jsx as y } from "react/jsx-runtime";
|
|
4
4
|
import { useState as I, useContext as z, useEffect as B, useRef as Q, useMemo as F, useCallback as Y, useSyncExternalStore as ot } from "react";
|
|
5
5
|
import { EventType as ge, InteractionStatus as st, InteractionRequiredAuthError as rt } from "@azure/msal-browser";
|
|
@@ -8,9 +8,9 @@ import "react-router";
|
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
|
-
import { L as at, b as lt } from "./FormDisabledProvider-
|
|
12
|
-
import { F as wn } from "./FormDisabledProvider-
|
|
13
|
-
import { a as ht, u as ut } from "./useLocalStorageState-
|
|
11
|
+
import { L as at, b as lt } from "./FormDisabledProvider-CixhRdLK.js";
|
|
12
|
+
import { F as wn } from "./FormDisabledProvider-CixhRdLK.js";
|
|
13
|
+
import { a as ht, u as ut } from "./useLocalStorageState-B1kFYGzD.js";
|
|
14
14
|
import { u as dt } from "./useIsBrowserOnline-RAirIO4c.js";
|
|
15
15
|
function ft(t) {
|
|
16
16
|
const e = re(t);
|
|
@@ -38,11 +38,11 @@ const mt = (t) => {
|
|
|
38
38
|
o(!0), r(S), a(p);
|
|
39
39
|
}, e[0] = h) : h = e[0];
|
|
40
40
|
const u = h;
|
|
41
|
-
let
|
|
42
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
41
|
+
let m;
|
|
42
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
43
43
|
o(!1);
|
|
44
|
-
}, e[1] =
|
|
45
|
-
const f =
|
|
44
|
+
}, e[1] = m) : m = e[1];
|
|
45
|
+
const f = m;
|
|
46
46
|
let g;
|
|
47
47
|
e[2] !== s || e[3] !== i || e[4] !== c ? (g = {
|
|
48
48
|
show: s,
|
|
@@ -51,14 +51,14 @@ const mt = (t) => {
|
|
|
51
51
|
hideConfirm: f,
|
|
52
52
|
textSm: c
|
|
53
53
|
}, e[2] = s, e[3] = i, e[4] = c, e[5] = g) : g = e[5];
|
|
54
|
-
const
|
|
54
|
+
const w = g;
|
|
55
55
|
let b;
|
|
56
56
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ y(zt, {}), e[6] = b) : b = e[6];
|
|
57
57
|
let d;
|
|
58
|
-
return e[7] !== n || e[8] !==
|
|
58
|
+
return e[7] !== n || e[8] !== w ? (d = /* @__PURE__ */ L(Oe.Provider, { value: w, children: [
|
|
59
59
|
b,
|
|
60
60
|
n
|
|
61
|
-
] }), e[7] = n, e[8] =
|
|
61
|
+
] }), e[7] = n, e[8] = w, e[9] = d) : d = e[9], d;
|
|
62
62
|
}, wt = () => {
|
|
63
63
|
const t = N.c(43), {
|
|
64
64
|
texts: e
|
|
@@ -76,22 +76,22 @@ const mt = (t) => {
|
|
|
76
76
|
i(null);
|
|
77
77
|
}, t[0] = i, t[1] = h) : h = t[1];
|
|
78
78
|
const u = h;
|
|
79
|
-
let
|
|
80
|
-
t[2] !== i || t[3] !== r.required || t[4] !== c ? (
|
|
79
|
+
let m;
|
|
80
|
+
t[2] !== i || t[3] !== r.required || t[4] !== c ? (m = (j) => {
|
|
81
81
|
j.preventDefault(), !(r.required && !c) && (i(c), a(""));
|
|
82
|
-
}, t[2] = i, t[3] = r.required, t[4] = c, t[5] =
|
|
83
|
-
const f =
|
|
82
|
+
}, t[2] = i, t[3] = r.required, t[4] = c, t[5] = m) : m = t[5];
|
|
83
|
+
const f = m;
|
|
84
84
|
let g;
|
|
85
85
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (g = (j) => a(j.currentTarget.value), t[6] = g) : g = t[6];
|
|
86
|
-
let
|
|
87
|
-
t[7] !== c ? (
|
|
86
|
+
let w;
|
|
87
|
+
t[7] !== c ? (w = {
|
|
88
88
|
value: c,
|
|
89
89
|
onChange: g,
|
|
90
90
|
className: "w-100",
|
|
91
91
|
autoFocus: !0,
|
|
92
92
|
tabIndex: 0
|
|
93
|
-
}, t[7] = c, t[8] =
|
|
94
|
-
const b =
|
|
93
|
+
}, t[7] = c, t[8] = w) : w = t[8];
|
|
94
|
+
const b = w;
|
|
95
95
|
let d, S;
|
|
96
96
|
t[9] !== s || t[10] !== r.defaultValue ? (d = () => {
|
|
97
97
|
s === !0 && a(r.defaultValue ?? "");
|
|
@@ -107,16 +107,16 @@ const mt = (t) => {
|
|
|
107
107
|
C,
|
|
108
108
|
_
|
|
109
109
|
] }), t[22] = C, t[23] = _, t[24] = v) : v = t[24];
|
|
110
|
-
let
|
|
111
|
-
t[25] !== n.cancel || t[26] !== u ? (
|
|
110
|
+
let T;
|
|
111
|
+
t[25] !== n.cancel || t[26] !== u ? (T = /* @__PURE__ */ y(ie, { variant: "outlined", color: "secondary", onClick: u, className: "flex-grow-1", children: n.cancel }), t[25] = n.cancel, t[26] = u, t[27] = T) : T = t[27];
|
|
112
112
|
const W = r.required && !c;
|
|
113
113
|
let P;
|
|
114
114
|
t[28] !== n.confirm || t[29] !== W ? (P = /* @__PURE__ */ y(ie, { color: "primary", disabled: W, type: "submit", className: "flex-grow-1", children: n.confirm }), t[28] = n.confirm, t[29] = W, t[30] = P) : P = t[30];
|
|
115
115
|
let M;
|
|
116
|
-
t[31] !==
|
|
117
|
-
|
|
116
|
+
t[31] !== T || t[32] !== P ? (M = /* @__PURE__ */ L(H.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
117
|
+
T,
|
|
118
118
|
P
|
|
119
|
-
] }), t[31] =
|
|
119
|
+
] }), t[31] = T, t[32] = P, t[33] = M) : M = t[33];
|
|
120
120
|
let x;
|
|
121
121
|
t[34] !== f || t[35] !== v || t[36] !== M ? (x = /* @__PURE__ */ L("form", { onSubmit: f, onKeyDown: St, children: [
|
|
122
122
|
v,
|
|
@@ -141,22 +141,22 @@ const bt = (t) => {
|
|
|
141
141
|
type: "text"
|
|
142
142
|
}, e[0] = c) : c = e[0];
|
|
143
143
|
const [a, h] = I(c), u = Q(Ct);
|
|
144
|
-
let
|
|
145
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
144
|
+
let m;
|
|
145
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (m = (C) => {
|
|
146
146
|
r(C), o(!0);
|
|
147
|
-
}, e[1] =
|
|
148
|
-
const f =
|
|
147
|
+
}, e[1] = m) : m = e[1];
|
|
148
|
+
const f = m;
|
|
149
149
|
let g;
|
|
150
150
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (g = () => {
|
|
151
151
|
o(!1);
|
|
152
152
|
}, e[2] = g) : g = e[2];
|
|
153
|
-
const
|
|
153
|
+
const w = g;
|
|
154
154
|
let b;
|
|
155
155
|
e[3] !== s || e[4] !== a || e[5] !== i ? (b = {
|
|
156
156
|
isShown: s,
|
|
157
157
|
text: i,
|
|
158
158
|
showPrompt: f,
|
|
159
|
-
hidePrompt:
|
|
159
|
+
hidePrompt: w,
|
|
160
160
|
resolveRef: u,
|
|
161
161
|
options: a,
|
|
162
162
|
setOptions: h
|
|
@@ -193,7 +193,7 @@ const on = (t) => {
|
|
|
193
193
|
localizationContext: c,
|
|
194
194
|
chartColorPalette: a
|
|
195
195
|
}, e[0] = r, e[1] = s, e[2] = a, e[3] = n, e[4] = o, e[5] = c, e[6] = i, e[7] = u) : u = e[7];
|
|
196
|
-
const
|
|
196
|
+
const m = u;
|
|
197
197
|
let f;
|
|
198
198
|
e[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ y(We, {}), e[8] = f) : f = e[8];
|
|
199
199
|
let g;
|
|
@@ -201,8 +201,8 @@ const on = (t) => {
|
|
|
201
201
|
f,
|
|
202
202
|
h
|
|
203
203
|
] }) }), e[9] = h, e[10] = g) : g = e[10];
|
|
204
|
-
let
|
|
205
|
-
return e[11] !==
|
|
204
|
+
let w;
|
|
205
|
+
return e[11] !== m || e[12] !== g ? (w = /* @__PURE__ */ y(ae.Provider, { value: m, children: g }), e[11] = m, e[12] = g, e[13] = w) : w = e[13], w;
|
|
206
206
|
}, sn = (t) => {
|
|
207
207
|
const e = N.c(15), {
|
|
208
208
|
children: n
|
|
@@ -220,20 +220,20 @@ const on = (t) => {
|
|
|
220
220
|
r.delete(b), r.size === 0 && o(!1);
|
|
221
221
|
}, e[3] = r, e[4] = h) : h = e[4];
|
|
222
222
|
const u = h;
|
|
223
|
-
let
|
|
224
|
-
e[5] !== s || e[6] !== a || e[7] !== u ? (
|
|
223
|
+
let m;
|
|
224
|
+
e[5] !== s || e[6] !== a || e[7] !== u ? (m = {
|
|
225
225
|
isLoading: s,
|
|
226
226
|
startLoading: a,
|
|
227
227
|
stopLoading: u
|
|
228
|
-
}, e[5] = s, e[6] = a, e[7] = u, e[8] =
|
|
229
|
-
const f =
|
|
228
|
+
}, e[5] = s, e[6] = a, e[7] = u, e[8] = m) : m = e[8];
|
|
229
|
+
const f = m;
|
|
230
230
|
let g;
|
|
231
231
|
e[9] !== s ? (g = s && /* @__PURE__ */ y(at, {}), e[9] = s, e[10] = g) : g = e[10];
|
|
232
|
-
let
|
|
233
|
-
return e[11] !== n || e[12] !== f || e[13] !== g ? (
|
|
232
|
+
let w;
|
|
233
|
+
return e[11] !== n || e[12] !== f || e[13] !== g ? (w = /* @__PURE__ */ L(je.Provider, { value: f, children: [
|
|
234
234
|
g,
|
|
235
235
|
n
|
|
236
|
-
] }), e[11] = n, e[12] = f, e[13] = g, e[14] =
|
|
236
|
+
] }), e[11] = n, e[12] = f, e[13] = g, e[14] = w) : w = e[14], w;
|
|
237
237
|
}, rn = (t) => {
|
|
238
238
|
const e = N.c(39), {
|
|
239
239
|
children: n
|
|
@@ -245,17 +245,17 @@ const on = (t) => {
|
|
|
245
245
|
setDelegation: c,
|
|
246
246
|
setAvailableDelegations: a,
|
|
247
247
|
refreshAvailableDelegations: h
|
|
248
|
-
} = z(De), [u,
|
|
248
|
+
} = z(De), [u, m] = I(null);
|
|
249
249
|
let f;
|
|
250
250
|
e[0] !== i ? (f = async () => {
|
|
251
251
|
const A = await i();
|
|
252
|
-
A &&
|
|
252
|
+
A && m(A.token);
|
|
253
253
|
}, e[0] = i, e[1] = f) : f = e[1];
|
|
254
254
|
const g = f;
|
|
255
|
-
let
|
|
256
|
-
e[2] !== g ? (
|
|
255
|
+
let w, b;
|
|
256
|
+
e[2] !== g ? (w = () => {
|
|
257
257
|
g();
|
|
258
|
-
}, b = [g], e[2] = g, e[3] =
|
|
258
|
+
}, b = [g], e[2] = g, e[3] = w, e[4] = b) : (w = e[3], b = e[4]), B(w, b);
|
|
259
259
|
let d;
|
|
260
260
|
if (e[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
261
261
|
e: {
|
|
@@ -289,7 +289,7 @@ const on = (t) => {
|
|
|
289
289
|
$ = null;
|
|
290
290
|
}), $;
|
|
291
291
|
}, e[7] = s, e[8] = v) : v = e[8];
|
|
292
|
-
const
|
|
292
|
+
const T = v;
|
|
293
293
|
let W;
|
|
294
294
|
e[9] !== a || e[10] !== c ? (W = () => {
|
|
295
295
|
localStorage.removeItem("user"), _({
|
|
@@ -299,12 +299,12 @@ const on = (t) => {
|
|
|
299
299
|
}, e[9] = a, e[10] = c, e[11] = W) : W = e[11];
|
|
300
300
|
const P = W;
|
|
301
301
|
let M;
|
|
302
|
-
e[12] !==
|
|
302
|
+
e[12] !== T || e[13] !== h ? (M = async (A) => {
|
|
303
303
|
_({
|
|
304
304
|
state: J.LOGGING_IN,
|
|
305
305
|
user: null
|
|
306
306
|
});
|
|
307
|
-
const $ = await
|
|
307
|
+
const $ = await T(A);
|
|
308
308
|
return $ ? (_({
|
|
309
309
|
state: J.LOGGED_IN,
|
|
310
310
|
user: $
|
|
@@ -312,7 +312,7 @@ const on = (t) => {
|
|
|
312
312
|
state: J.LOGIN_FAILED,
|
|
313
313
|
user: null
|
|
314
314
|
}), !1);
|
|
315
|
-
}, e[12] =
|
|
315
|
+
}, e[12] = T, e[13] = h, e[14] = M) : M = e[14];
|
|
316
316
|
const x = M;
|
|
317
317
|
let O;
|
|
318
318
|
e[15] !== o ? (O = () => {
|
|
@@ -320,7 +320,7 @@ const on = (t) => {
|
|
|
320
320
|
const A = o.addEventCallback(($) => {
|
|
321
321
|
if ($.eventType === ge.LOGIN_SUCCESS && $.payload) {
|
|
322
322
|
const de = $.payload;
|
|
323
|
-
|
|
323
|
+
m(de.accessToken);
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
326
|
return () => {
|
|
@@ -371,7 +371,7 @@ const vt = () => {
|
|
|
371
371
|
/* @__PURE__ */ y("a", { href: window.location.href.replace("/blank", "/"), children: "here" })
|
|
372
372
|
] })
|
|
373
373
|
] }), t[1] = n) : n = t[1], n;
|
|
374
|
-
},
|
|
374
|
+
}, Tt = (t) => {
|
|
375
375
|
const e = t == null ? void 0 : t.getActiveAccount();
|
|
376
376
|
console.log("getTokenMsal activeAccount", e);
|
|
377
377
|
const n = t == null ? void 0 : t.getAllAccounts();
|
|
@@ -410,7 +410,7 @@ const vt = () => {
|
|
|
410
410
|
return console.log("getTokenMsal returning tokenRequestPromise.current", c.current), c.current;
|
|
411
411
|
const d = new Promise((S, p) => {
|
|
412
412
|
const C = (_) => {
|
|
413
|
-
const v =
|
|
413
|
+
const v = Tt(o);
|
|
414
414
|
if (!v) {
|
|
415
415
|
console.log("getTokenMsal no account found. Redirecting to login"), o == null || o.loginRedirect({
|
|
416
416
|
scopes: i,
|
|
@@ -422,16 +422,16 @@ const vt = () => {
|
|
|
422
422
|
scopes: i,
|
|
423
423
|
account: v,
|
|
424
424
|
redirectUri: t.useMsal ? t.msalSilentRedirectUri : void 0
|
|
425
|
-
}).then((
|
|
425
|
+
}).then((T) => {
|
|
426
426
|
_(), S({
|
|
427
|
-
token:
|
|
428
|
-
expiresOn:
|
|
427
|
+
token: T.accessToken,
|
|
428
|
+
expiresOn: T.expiresOn ?? new Date(Date.now())
|
|
429
429
|
});
|
|
430
|
-
}).catch((
|
|
431
|
-
console.error("Error acquiring token",
|
|
430
|
+
}).catch((T) => {
|
|
431
|
+
console.error("Error acquiring token", T), T instanceof rt && (console.log("Silent token acquisition failed. Acquiring token using redirect"), o == null || o.acquireTokenRedirect({
|
|
432
432
|
scopes: i,
|
|
433
433
|
extraScopesToConsent: r
|
|
434
|
-
}), _(), S(null)), _(), p(
|
|
434
|
+
}), _(), S(null)), _(), p(T);
|
|
435
435
|
}).finally(() => {
|
|
436
436
|
_(), p(new Error("No access token returned from handleRedirectPromise"));
|
|
437
437
|
});
|
|
@@ -452,22 +452,20 @@ const vt = () => {
|
|
|
452
452
|
});
|
|
453
453
|
});
|
|
454
454
|
return c.current = d, d;
|
|
455
|
-
}, [r, o, i, t.msalSilentRedirectUri, t.useMsal]),
|
|
455
|
+
}, [r, o, i, t.msalSilentRedirectUri, t.useMsal]), m = Y(async () => t.useMsal ? u() : h(), [h, u, t.useMsal]), f = Y((d) => t.useMsal ? () => {
|
|
456
456
|
} : (window.addEventListener("storage", d), window.addEventListener("dev-auth-change", d), () => {
|
|
457
457
|
window.removeEventListener("storage", d), window.removeEventListener("dev-auth-change", d);
|
|
458
|
-
}), [t.useMsal]), g = ot(f, () => localStorage.getItem("token") !== null ? "AUTH_OK" : "NO_AUTH"),
|
|
458
|
+
}), [t.useMsal]), g = ot(f, () => localStorage.getItem("token") !== null ? "AUTH_OK" : "NO_AUTH"), w = F(() => {
|
|
459
459
|
var d;
|
|
460
460
|
return t.useMsal ? e !== st.None ? "AUTH_IN_PROGRESS" : (o == null ? void 0 : o.getActiveAccount()) ?? ((d = o == null ? void 0 : o.getAllAccounts()) == null ? void 0 : d[0]) ?? null ? "AUTH_OK" : "NO_AUTH" : g;
|
|
461
|
-
}, [g, e, o, t.useMsal])
|
|
462
|
-
console.log("authState", m);
|
|
463
|
-
const b = F(() => ({
|
|
461
|
+
}, [g, e, o, t.useMsal]), b = F(() => ({
|
|
464
462
|
useMsal: t.useMsal ?? !1,
|
|
465
463
|
msalInstance: o,
|
|
466
464
|
msalScopes: i,
|
|
467
465
|
msalExtraScopes: r,
|
|
468
|
-
getToken:
|
|
469
|
-
authState:
|
|
470
|
-
}), [t.useMsal, o, i, r,
|
|
466
|
+
getToken: m,
|
|
467
|
+
authState: w
|
|
468
|
+
}), [t.useMsal, o, i, r, m, w]);
|
|
471
469
|
return B(() => {
|
|
472
470
|
if (t.useMsal && o) {
|
|
473
471
|
const d = o.addEventCallback((S) => {
|
|
@@ -516,10 +514,10 @@ const vt = () => {
|
|
|
516
514
|
c = null;
|
|
517
515
|
break e;
|
|
518
516
|
}
|
|
519
|
-
const v = o.from ? we(o.from) : _t(),
|
|
517
|
+
const v = o.from ? we(o.from) : _t(), T = o.to ? we(o.to) : gt();
|
|
520
518
|
if (!pt(new Date(Date.now()), {
|
|
521
519
|
start: v,
|
|
522
|
-
end:
|
|
520
|
+
end: T
|
|
523
521
|
})) {
|
|
524
522
|
i(null), c = null;
|
|
525
523
|
break e;
|
|
@@ -534,18 +532,18 @@ const vt = () => {
|
|
|
534
532
|
}, e[0] = h) : h = e[0];
|
|
535
533
|
const {
|
|
536
534
|
data: u,
|
|
537
|
-
setData:
|
|
535
|
+
setData: m,
|
|
538
536
|
reloadData: f
|
|
539
537
|
} = ut(s, h), g = Q(null);
|
|
540
|
-
let
|
|
541
|
-
e[1] !== f ? (
|
|
538
|
+
let w, b;
|
|
539
|
+
e[1] !== f ? (w = () => {
|
|
542
540
|
const v = () => {
|
|
543
541
|
f(), g.current = window.setTimeout(v, Ge() + 5e3);
|
|
544
542
|
};
|
|
545
543
|
return v(), () => {
|
|
546
544
|
g.current !== null && window.clearTimeout(g.current);
|
|
547
545
|
};
|
|
548
|
-
}, b = [f], e[1] = f, e[2] =
|
|
546
|
+
}, b = [f], e[1] = f, e[2] = w, e[3] = b) : (w = e[2], b = e[3]), B(w, b);
|
|
549
547
|
let d;
|
|
550
548
|
e[4] !== r ? (d = () => {
|
|
551
549
|
const v = () => {
|
|
@@ -558,13 +556,13 @@ const vt = () => {
|
|
|
558
556
|
let S;
|
|
559
557
|
e[6] !== r || e[7] !== f ? (S = [r, f], e[6] = r, e[7] = f, e[8] = S) : S = e[8], B(d, S);
|
|
560
558
|
let p;
|
|
561
|
-
e[9] !== u || e[10] !== f || e[11] !==
|
|
559
|
+
e[9] !== u || e[10] !== f || e[11] !== m || e[12] !== i || e[13] !== a ? (p = {
|
|
562
560
|
delegation: a,
|
|
563
561
|
setDelegation: i,
|
|
564
562
|
availableDelegations: u,
|
|
565
|
-
setAvailableDelegations:
|
|
563
|
+
setAvailableDelegations: m,
|
|
566
564
|
refreshAvailableDelegations: f
|
|
567
|
-
}, e[9] = u, e[10] = f, e[11] =
|
|
565
|
+
}, e[9] = u, e[10] = f, e[11] = m, e[12] = i, e[13] = a, e[14] = p) : p = e[14];
|
|
568
566
|
const C = p;
|
|
569
567
|
let _;
|
|
570
568
|
return e[15] !== n || e[16] !== C ? (_ = /* @__PURE__ */ y(De.Provider, { value: C, children: n }), e[15] = n, e[16] = C, e[17] = _) : _ = e[17], _;
|
|
@@ -583,20 +581,20 @@ const vt = () => {
|
|
|
583
581
|
e[5] !== o ? (u = (_) => {
|
|
584
582
|
h((v) => [...v, ve(o ?? "", _)]);
|
|
585
583
|
}, e[5] = o, e[6] = u) : u = e[6];
|
|
586
|
-
const
|
|
584
|
+
const m = u;
|
|
587
585
|
let f;
|
|
588
586
|
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
589
|
-
h(
|
|
587
|
+
h(kt);
|
|
590
588
|
}, e[7] = f) : f = e[7];
|
|
591
589
|
const g = f;
|
|
592
|
-
let
|
|
593
|
-
e[8] !== a ? (
|
|
594
|
-
const b =
|
|
590
|
+
let w;
|
|
591
|
+
e[8] !== a ? (w = a.at(-1) ?? "", e[8] = a, e[9] = w) : w = e[9];
|
|
592
|
+
const b = w;
|
|
595
593
|
let d;
|
|
596
|
-
e[10] !==
|
|
597
|
-
addHelmet:
|
|
594
|
+
e[10] !== m ? (d = {
|
|
595
|
+
addHelmet: m,
|
|
598
596
|
removeHelmet: g
|
|
599
|
-
}, e[10] =
|
|
597
|
+
}, e[10] = m, e[11] = d) : d = e[11];
|
|
600
598
|
const S = d;
|
|
601
599
|
let p;
|
|
602
600
|
e[12] !== b ? (p = /* @__PURE__ */ y("title", { children: b }), e[12] = b, e[13] = p) : p = e[13];
|
|
@@ -606,7 +604,7 @@ const vt = () => {
|
|
|
606
604
|
s
|
|
607
605
|
] }), e[14] = s, e[15] = S, e[16] = p, e[17] = C) : C = e[17], C;
|
|
608
606
|
};
|
|
609
|
-
function
|
|
607
|
+
function kt(t) {
|
|
610
608
|
return t.length > 1 ? t.slice(0, -1) : t;
|
|
611
609
|
}
|
|
612
610
|
class $e {
|
|
@@ -701,10 +699,10 @@ class Et extends le {
|
|
|
701
699
|
o && clearTimeout(o), e.abortSignal && (e.abortSignal.onabort = null);
|
|
702
700
|
}
|
|
703
701
|
if (!i.ok) {
|
|
704
|
-
const a = await
|
|
702
|
+
const a = await Te(i, "text");
|
|
705
703
|
throw new V(a || i.statusText, i.status);
|
|
706
704
|
}
|
|
707
|
-
const c = await
|
|
705
|
+
const c = await Te(i, e.responseType);
|
|
708
706
|
return new $e(i.status, i.statusText, c);
|
|
709
707
|
}
|
|
710
708
|
getCookieString(e) {
|
|
@@ -712,7 +710,7 @@ class Et extends le {
|
|
|
712
710
|
return R.isNode && this._jar && this._jar.getCookies(e, (s, o) => n = o.join("; ")), n;
|
|
713
711
|
}
|
|
714
712
|
}
|
|
715
|
-
function
|
|
713
|
+
function Te(t, e) {
|
|
716
714
|
let n;
|
|
717
715
|
switch (e) {
|
|
718
716
|
case "arraybuffer":
|
|
@@ -774,7 +772,7 @@ class xt extends le {
|
|
|
774
772
|
}
|
|
775
773
|
}
|
|
776
774
|
const At = [0, 2e3, 1e4, 3e4, null];
|
|
777
|
-
class
|
|
775
|
+
class ke {
|
|
778
776
|
constructor(e) {
|
|
779
777
|
this._retryDelays = e !== void 0 ? [...e, null] : At;
|
|
780
778
|
}
|
|
@@ -803,10 +801,10 @@ class Dt extends le {
|
|
|
803
801
|
return this._innerClient.getCookieString(e);
|
|
804
802
|
}
|
|
805
803
|
}
|
|
806
|
-
var
|
|
804
|
+
var k;
|
|
807
805
|
(function(t) {
|
|
808
806
|
t[t.None = 0] = "None", t[t.WebSockets = 1] = "WebSockets", t[t.ServerSentEvents = 2] = "ServerSentEvents", t[t.LongPolling = 4] = "LongPolling";
|
|
809
|
-
})(
|
|
807
|
+
})(k || (k = {}));
|
|
810
808
|
var D;
|
|
811
809
|
(function(t) {
|
|
812
810
|
t[t.Text = 1] = "Text", t[t.Binary = 2] = "Binary";
|
|
@@ -958,8 +956,8 @@ class Lt {
|
|
|
958
956
|
const c = this._httpClient.getCookieString(e);
|
|
959
957
|
let a = !1;
|
|
960
958
|
if (R.isNode || R.isReactNative) {
|
|
961
|
-
const h = {}, [u,
|
|
962
|
-
h[u] =
|
|
959
|
+
const h = {}, [u, m] = q();
|
|
960
|
+
h[u] = m, s && (h[X.Authorization] = `Bearer ${s}`), c && (h[X.Cookie] = c), r = new this._webSocketConstructor(e, void 0, {
|
|
963
961
|
headers: { ...h, ...this._headers }
|
|
964
962
|
});
|
|
965
963
|
} else
|
|
@@ -1064,8 +1062,8 @@ class Mt {
|
|
|
1064
1062
|
this._accessTokenFactory = this._options.accessTokenFactory, this._httpClient._accessTokenFactory = this._accessTokenFactory;
|
|
1065
1063
|
try {
|
|
1066
1064
|
if (this._options.skipNegotiation)
|
|
1067
|
-
if (this._options.transport ===
|
|
1068
|
-
this.transport = this._constructTransport(
|
|
1065
|
+
if (this._options.transport === k.WebSockets)
|
|
1066
|
+
this.transport = this._constructTransport(k.WebSockets), await this._startTransport(n, e);
|
|
1069
1067
|
else
|
|
1070
1068
|
throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");
|
|
1071
1069
|
else {
|
|
@@ -1132,16 +1130,16 @@ class Mt {
|
|
|
1132
1130
|
if (this.transport = u, !a) {
|
|
1133
1131
|
try {
|
|
1134
1132
|
a = await this._getNegotiationResponse(e);
|
|
1135
|
-
} catch (
|
|
1136
|
-
return Promise.reject(
|
|
1133
|
+
} catch (m) {
|
|
1134
|
+
return Promise.reject(m);
|
|
1137
1135
|
}
|
|
1138
1136
|
i = this._createConnectUrl(e, a.connectionToken);
|
|
1139
1137
|
}
|
|
1140
1138
|
try {
|
|
1141
1139
|
await this._startTransport(i, o), this.connectionId = a.connectionId;
|
|
1142
1140
|
return;
|
|
1143
|
-
} catch (
|
|
1144
|
-
if (this._logger.log(l.Error, `Failed to start the transport '${h.transport}': ${
|
|
1141
|
+
} catch (m) {
|
|
1142
|
+
if (this._logger.log(l.Error, `Failed to start the transport '${h.transport}': ${m}`), a = void 0, r.push(new Je(`${h.transport} failed: ${m}`, k[h.transport])), this._connectionState !== "Connecting") {
|
|
1145
1143
|
const f = "Failed to select transport before stop() was called.";
|
|
1146
1144
|
return this._logger.log(l.Debug, f), Promise.reject(new U(f));
|
|
1147
1145
|
}
|
|
@@ -1152,15 +1150,15 @@ class Mt {
|
|
|
1152
1150
|
}
|
|
1153
1151
|
_constructTransport(e) {
|
|
1154
1152
|
switch (e) {
|
|
1155
|
-
case
|
|
1153
|
+
case k.WebSockets:
|
|
1156
1154
|
if (!this._options.WebSocket)
|
|
1157
1155
|
throw new Error("'WebSocket' is not supported in your environment.");
|
|
1158
1156
|
return new Lt(this._httpClient, this._accessTokenFactory, this._logger, this._options.logMessageContent, this._options.WebSocket, this._options.headers || {});
|
|
1159
|
-
case
|
|
1157
|
+
case k.ServerSentEvents:
|
|
1160
1158
|
if (!this._options.EventSource)
|
|
1161
1159
|
throw new Error("'EventSource' is not supported in your environment.");
|
|
1162
1160
|
return new Rt(this._httpClient, this._httpClient._accessToken, this._logger, this._options);
|
|
1163
|
-
case
|
|
1161
|
+
case k.LongPolling:
|
|
1164
1162
|
return new Ee(this._httpClient, this._logger, this._options);
|
|
1165
1163
|
default:
|
|
1166
1164
|
throw new Error(`Unknown transport: ${e}.`);
|
|
@@ -1183,23 +1181,23 @@ class Mt {
|
|
|
1183
1181
|
} : this.transport.onclose = (s) => this._stopConnection(s), this.transport.connect(e, n);
|
|
1184
1182
|
}
|
|
1185
1183
|
_resolveTransportOrError(e, n, s, o) {
|
|
1186
|
-
const i =
|
|
1184
|
+
const i = k[e.transport];
|
|
1187
1185
|
if (i == null)
|
|
1188
1186
|
return this._logger.log(l.Debug, `Skipping transport '${e.transport}' because it is not supported by this client.`), new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);
|
|
1189
1187
|
if ($t(n, i))
|
|
1190
1188
|
if (e.transferFormats.map((c) => D[c]).indexOf(s) >= 0) {
|
|
1191
|
-
if (i ===
|
|
1192
|
-
return this._logger.log(l.Debug, `Skipping transport '${
|
|
1193
|
-
this._logger.log(l.Debug, `Selecting transport '${
|
|
1189
|
+
if (i === k.WebSockets && !this._options.WebSocket || i === k.ServerSentEvents && !this._options.EventSource)
|
|
1190
|
+
return this._logger.log(l.Debug, `Skipping transport '${k[i]}' because it is not supported in your environment.'`), new Ye(`'${k[i]}' is not supported in your environment.`, i);
|
|
1191
|
+
this._logger.log(l.Debug, `Selecting transport '${k[i]}'.`);
|
|
1194
1192
|
try {
|
|
1195
|
-
return this.features.reconnect = i ===
|
|
1193
|
+
return this.features.reconnect = i === k.WebSockets ? o : void 0, this._constructTransport(i);
|
|
1196
1194
|
} catch (c) {
|
|
1197
1195
|
return c;
|
|
1198
1196
|
}
|
|
1199
1197
|
} else
|
|
1200
|
-
return this._logger.log(l.Debug, `Skipping transport '${
|
|
1198
|
+
return this._logger.log(l.Debug, `Skipping transport '${k[i]}' because it does not support the requested transfer format '${D[s]}'.`), new Error(`'${k[i]}' does not support ${D[s]}.`);
|
|
1201
1199
|
else
|
|
1202
|
-
return this._logger.log(l.Debug, `Skipping transport '${
|
|
1200
|
+
return this._logger.log(l.Debug, `Skipping transport '${k[i]}' because it was disabled by the client.`), new qe(`'${k[i]}' is disabled by the client.`, i);
|
|
1203
1201
|
}
|
|
1204
1202
|
_isITransport(e) {
|
|
1205
1203
|
return e && typeof e == "object" && "connect" in e;
|
|
@@ -1418,7 +1416,7 @@ class Wt {
|
|
|
1418
1416
|
withAutomaticReconnect(e) {
|
|
1419
1417
|
if (this.reconnectPolicy)
|
|
1420
1418
|
throw new Error("A reconnectPolicy has already been set.");
|
|
1421
|
-
return e ? Array.isArray(e) ? this.reconnectPolicy = new
|
|
1419
|
+
return e ? Array.isArray(e) ? this.reconnectPolicy = new ke(e) : this.reconnectPolicy = e : this.reconnectPolicy = new ke(), this;
|
|
1422
1420
|
}
|
|
1423
1421
|
/** Configures {@link @microsoft/signalr.HubConnection.serverTimeoutInMilliseconds} for the {@link @microsoft/signalr.HubConnection}.
|
|
1424
1422
|
*
|
|
@@ -1464,18 +1462,18 @@ const Ft = 10 * 1e3, Bt = 15 * 1e3, un = ({
|
|
|
1464
1462
|
const {
|
|
1465
1463
|
authState: s,
|
|
1466
1464
|
getToken: o
|
|
1467
|
-
} = z(pe), i = dt(), [r, c] = I(fe.Disconnected), [a, h] = I(!1), u = Q(null),
|
|
1468
|
-
|
|
1465
|
+
} = z(pe), i = dt(), [r, c] = I(fe.Disconnected), [a, h] = I(!1), u = Q(null), m = Q(o);
|
|
1466
|
+
m.current = o;
|
|
1469
1467
|
const f = Y(() => {
|
|
1470
1468
|
var d;
|
|
1471
1469
|
return c(((d = u.current) == null ? void 0 : d.state) ?? fe.Disconnected);
|
|
1472
1470
|
}, []);
|
|
1473
1471
|
B(() => {
|
|
1474
|
-
if (
|
|
1472
|
+
if (s !== "AUTH_OK" || !i)
|
|
1475
1473
|
return;
|
|
1476
1474
|
let d = !1, S = null;
|
|
1477
1475
|
const p = new Wt().withUrl(`${e}/${n}`, {
|
|
1478
|
-
accessTokenFactory: () =>
|
|
1476
|
+
accessTokenFactory: () => m.current().then((_) => (_ == null ? void 0 : _.token) ?? "")
|
|
1479
1477
|
}).withAutomaticReconnect({
|
|
1480
1478
|
nextRetryDelayInMilliseconds: (_) => Math.min(1e3 * 2 ** _.previousRetryCount, Bt)
|
|
1481
1479
|
}).build();
|
|
@@ -1507,12 +1505,12 @@ const Ft = 10 * 1e3, Bt = 15 * 1e3, un = ({
|
|
|
1507
1505
|
});
|
|
1508
1506
|
};
|
|
1509
1507
|
}, [e, s, n, f, i]);
|
|
1510
|
-
const g = F(() => r === fe.Connected, [r]),
|
|
1508
|
+
const g = F(() => r === fe.Connected, [r]), w = F(() => s === "AUTH_OK", [s]), b = F(() => ({
|
|
1511
1509
|
isAlive: g,
|
|
1512
|
-
shouldBeAlive:
|
|
1510
|
+
shouldBeAlive: w,
|
|
1513
1511
|
connectionState: r,
|
|
1514
1512
|
hasLastConnectionEnded: a
|
|
1515
|
-
}), [g,
|
|
1513
|
+
}), [g, w, r, a]);
|
|
1516
1514
|
return /* @__PURE__ */ y(Me.Provider, { value: b, children: t });
|
|
1517
1515
|
}, dn = () => {
|
|
1518
1516
|
const t = z(Me);
|
|
@@ -1548,15 +1546,15 @@ const Ft = 10 * 1e3, Bt = 15 * 1e3, un = ({
|
|
|
1548
1546
|
const f = h ? void 0 : "sm";
|
|
1549
1547
|
let g;
|
|
1550
1548
|
t[4] !== a || t[5] !== i ? (g = /* @__PURE__ */ y(H.Header, { className: "justify-content-center", children: a ? /* @__PURE__ */ y(nt, { variant: "body", children: i }) : /* @__PURE__ */ y(H.Title, { children: i }) }), t[4] = a, t[5] = i, t[6] = g) : g = t[6];
|
|
1551
|
-
let
|
|
1552
|
-
t[7] !== n.no || t[8] !== o ? (
|
|
1549
|
+
let w;
|
|
1550
|
+
t[7] !== n.no || t[8] !== o ? (w = /* @__PURE__ */ y(ie, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: o, children: n.no }), t[7] = n.no, t[8] = o, t[9] = w) : w = t[9];
|
|
1553
1551
|
let b;
|
|
1554
1552
|
t[10] !== n.yes || t[11] !== s ? (b = /* @__PURE__ */ y(ie, { type: "button", color: "primary", onClick: s, className: "w-100 ml", children: n.yes }), t[10] = n.yes, t[11] = s, t[12] = b) : b = t[12];
|
|
1555
1553
|
let d;
|
|
1556
|
-
t[13] !==
|
|
1557
|
-
|
|
1554
|
+
t[13] !== w || t[14] !== b ? (d = /* @__PURE__ */ y(H.Body, { children: /* @__PURE__ */ L("div", { className: "w-100 d-flex gap-5", children: [
|
|
1555
|
+
w,
|
|
1558
1556
|
b
|
|
1559
|
-
] }) }), t[13] =
|
|
1557
|
+
] }) }), t[13] = w, t[14] = b, t[15] = d) : d = t[15];
|
|
1560
1558
|
let S;
|
|
1561
1559
|
return t[16] !== o || t[17] !== r || t[18] !== f || t[19] !== g || t[20] !== d ? (S = /* @__PURE__ */ L(H, { show: r, size: f, centered: !0, onHide: o, children: [
|
|
1562
1560
|
g,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CancelTokenStatic } from 'axios';
|
|
2
2
|
|
|
3
|
+
/** @deprecated Use native `AbortController` instead. */
|
|
3
4
|
export declare const cancelToken: CancelTokenStatic;
|
|
4
|
-
type AxiosInstanceExtended = AxiosInstance & {
|
|
5
|
-
interceptorsUsed: boolean;
|
|
6
|
-
};
|
|
7
5
|
type Config = {
|
|
8
6
|
authenticated?: boolean;
|
|
9
7
|
differentBaseUrl?: string;
|
|
@@ -12,5 +10,5 @@ type Config = {
|
|
|
12
10
|
ignoreDelegation?: boolean;
|
|
13
11
|
noToastOnStatus?: number[];
|
|
14
12
|
};
|
|
15
|
-
export declare const useAxios: (useAxiosConfig?: Config) =>
|
|
13
|
+
export declare const useAxios: (useAxiosConfig?: Config) => import('axios').AxiosInstance;
|
|
16
14
|
export {};
|
|
@@ -2,5 +2,5 @@ type UseGetDataBoundOptions = {
|
|
|
2
2
|
customBaseUrl?: string;
|
|
3
3
|
customToken?: string;
|
|
4
4
|
};
|
|
5
|
-
declare function useGetDataBound<T>(url: string, options?: UseGetDataBoundOptions): T
|
|
5
|
+
declare function useGetDataBound<T>(url: string, options?: UseGetDataBoundOptions): T;
|
|
6
6
|
export default useGetDataBound;
|