react-luminus-components 2.0.8 → 2.0.10
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/README.md +349 -349
- package/dist/.vite/manifest.json +44 -44
- package/dist/{FormDisabledProvider-DqonORhL.js → FormDisabledProvider-Bquj6x7m.js} +1 -1
- package/dist/FormDisabledProvider-D7QcTs-i.cjs +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +95 -95
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +44 -44
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +84 -84
- package/dist/{localStorageUtils-CZ4HDRzi.js → localStorageUtils-D2opn367.js} +2 -2
- package/dist/main.cjs.js +15 -15
- package/dist/main.es.js +10484 -10483
- package/dist/nivo-bar-Bak2bSwx.cjs +285 -0
- package/dist/{ShortcutLinksContext-JzYprDew.js → nivo-bar-D1U8PKC8.js} +20555 -20555
- package/dist/style.css +1 -1
- package/dist/{useIsFormDirty-Chttb_yH.js → useIsFormDirty-BBA_uA1C.js} +5 -5
- package/dist/useIsFormDirty-BvvK5I1M.cjs +1 -0
- package/dist/useLocalStorageState-CfodPjK7.cjs +1 -0
- package/dist/{useLocalStorageState-Bhv5Db7O.js → useLocalStorageState-FOtO1MEx.js} +20 -20
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +22 -22
- package/dist/variables.scss +165 -165
- package/package.json +127 -127
- package/dist/FormDisabledProvider-BbyzT_Cv.cjs +0 -1
- package/dist/ShortcutLinksContext-Bn-HfyvV.cjs +0 -285
- package/dist/useIsFormDirty-Bxcm6YTp.cjs +0 -1
- package/dist/useLocalStorageState-bJ5LCIyw.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { bR as
|
|
1
|
+
import { t as j, bK as ae, c as A, bL as ce, Q as J, am as ue, bM as se, a4 as O, aj as fe, R as V, bN as de, aq as me, ao as he, bf as re, bA as ie, bh as G, ap as ge, bO as Se, aE as te, bP as xe, bQ as ye, an as ve, ba as be, a5 as ke } from "./nivo-bar-D1U8PKC8.js";
|
|
2
|
+
import { bR as at, ag as ct } from "./nivo-bar-D1U8PKC8.js";
|
|
3
3
|
import { jsxs as D, jsx as b } from "react/jsx-runtime";
|
|
4
4
|
import { useState as _, useContext as H, useEffect as U, useRef as Q, useMemo as K, useCallback as Z } from "react";
|
|
5
5
|
import { EventType as ee, InteractionStatus as we, InteractionRequiredAuthError as Te } from "@azure/msal-browser";
|
|
@@ -8,30 +8,30 @@ import "react-router";
|
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
|
-
import { L as De, b as Pe } from "./FormDisabledProvider-
|
|
12
|
-
import { F as ft } from "./FormDisabledProvider-
|
|
13
|
-
import { a as _e, u as Me } from "./useLocalStorageState-
|
|
11
|
+
import { L as De, b as Pe } from "./FormDisabledProvider-Bquj6x7m.js";
|
|
12
|
+
import { F as ft } from "./FormDisabledProvider-Bquj6x7m.js";
|
|
13
|
+
import { a as _e, u as Me } from "./useLocalStorageState-FOtO1MEx.js";
|
|
14
14
|
function Ee(t) {
|
|
15
|
-
const e =
|
|
15
|
+
const e = j(t);
|
|
16
16
|
return e.setHours(23, 59, 59, 999), e;
|
|
17
17
|
}
|
|
18
18
|
function Ae() {
|
|
19
19
|
return Ee(Date.now());
|
|
20
20
|
}
|
|
21
21
|
function Le(t, e) {
|
|
22
|
-
const l = +
|
|
23
|
-
+
|
|
24
|
-
+
|
|
25
|
-
].sort((
|
|
22
|
+
const l = +j(t), [i, n] = [
|
|
23
|
+
+j(e.start),
|
|
24
|
+
+j(e.end)
|
|
25
|
+
].sort((c, o) => c - o);
|
|
26
26
|
return l >= i && l <= n;
|
|
27
27
|
}
|
|
28
28
|
function Oe() {
|
|
29
|
-
return
|
|
29
|
+
return ae(Date.now());
|
|
30
30
|
}
|
|
31
31
|
const Ne = (t) => {
|
|
32
32
|
const e = A.c(10), {
|
|
33
33
|
children: l
|
|
34
|
-
} = t, [i, n] = _(!1), [
|
|
34
|
+
} = t, [i, n] = _(!1), [c, o] = _(""), [r, x] = _(void 0);
|
|
35
35
|
let y;
|
|
36
36
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (y = (m, g) => {
|
|
37
37
|
n(!0), o(m), x(g);
|
|
@@ -43,21 +43,21 @@ const Ne = (t) => {
|
|
|
43
43
|
}, e[1] = S) : S = e[1];
|
|
44
44
|
const d = S;
|
|
45
45
|
let s;
|
|
46
|
-
e[2] !== i || e[3] !==
|
|
46
|
+
e[2] !== i || e[3] !== c || e[4] !== r ? (s = {
|
|
47
47
|
show: i,
|
|
48
|
-
text:
|
|
48
|
+
text: c,
|
|
49
49
|
showConfirm: f,
|
|
50
50
|
hideConfirm: d,
|
|
51
51
|
textSm: r
|
|
52
|
-
}, e[2] = i, e[3] =
|
|
53
|
-
const
|
|
52
|
+
}, e[2] = i, e[3] = c, e[4] = r, e[5] = s) : s = e[5];
|
|
53
|
+
const a = s;
|
|
54
54
|
let u;
|
|
55
55
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ b(ze, {}), e[6] = u) : u = e[6];
|
|
56
56
|
let h;
|
|
57
|
-
return e[7] !== l || e[8] !==
|
|
57
|
+
return e[7] !== l || e[8] !== a ? (h = /* @__PURE__ */ D(ce.Provider, { value: a, children: [
|
|
58
58
|
u,
|
|
59
59
|
l
|
|
60
|
-
] }), e[7] = l, e[8] =
|
|
60
|
+
] }), e[7] = l, e[8] = a, e[9] = h) : h = e[9], h;
|
|
61
61
|
}, Re = () => {
|
|
62
62
|
const t = A.c(43), {
|
|
63
63
|
texts: e
|
|
@@ -66,31 +66,31 @@ const Ne = (t) => {
|
|
|
66
66
|
} = e, {
|
|
67
67
|
isShown: i,
|
|
68
68
|
text: n,
|
|
69
|
-
onFinish:
|
|
69
|
+
onFinish: c
|
|
70
70
|
} = ue(), {
|
|
71
71
|
options: o
|
|
72
72
|
} = H(se), [r, x] = _(o.defaultValue ?? "");
|
|
73
73
|
let y;
|
|
74
|
-
t[0] !==
|
|
75
|
-
|
|
76
|
-
}, t[0] =
|
|
74
|
+
t[0] !== c ? (y = () => {
|
|
75
|
+
c(null);
|
|
76
|
+
}, t[0] = c, t[1] = y) : y = t[1];
|
|
77
77
|
const f = y;
|
|
78
78
|
let S;
|
|
79
|
-
t[2] !==
|
|
80
|
-
R.preventDefault(), !(o.required && !r) && (
|
|
81
|
-
}, t[2] =
|
|
79
|
+
t[2] !== c || t[3] !== o.required || t[4] !== r ? (S = (R) => {
|
|
80
|
+
R.preventDefault(), !(o.required && !r) && (c(r), x(""));
|
|
81
|
+
}, t[2] = c, t[3] = o.required, t[4] = r, t[5] = S) : S = t[5];
|
|
82
82
|
const d = S;
|
|
83
83
|
let s;
|
|
84
84
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (s = (R) => x(R.currentTarget.value), t[6] = s) : s = t[6];
|
|
85
|
-
let
|
|
86
|
-
t[7] !== r ? (
|
|
85
|
+
let a;
|
|
86
|
+
t[7] !== r ? (a = {
|
|
87
87
|
value: r,
|
|
88
88
|
onChange: s,
|
|
89
89
|
className: "w-100",
|
|
90
90
|
autoFocus: !0,
|
|
91
91
|
tabIndex: 0
|
|
92
|
-
}, t[7] = r, t[8] =
|
|
93
|
-
const u =
|
|
92
|
+
}, t[7] = r, t[8] = a) : a = t[8];
|
|
93
|
+
const u = a;
|
|
94
94
|
let h, m;
|
|
95
95
|
t[9] !== i || t[10] !== o.defaultValue ? (h = () => {
|
|
96
96
|
i === !0 && x(o.defaultValue ?? "");
|
|
@@ -107,10 +107,10 @@ const Ne = (t) => {
|
|
|
107
107
|
w
|
|
108
108
|
] }), t[22] = v, t[23] = w, t[24] = k) : k = t[24];
|
|
109
109
|
let P;
|
|
110
|
-
t[25] !== l.cancel || t[26] !== f ? (P = /* @__PURE__ */ b(
|
|
110
|
+
t[25] !== l.cancel || t[26] !== f ? (P = /* @__PURE__ */ b(V, { variant: "outlined", color: "secondary", onClick: f, className: "flex-grow-1", children: l.cancel }), t[25] = l.cancel, t[26] = f, t[27] = P) : P = t[27];
|
|
111
111
|
const N = o.required && !r;
|
|
112
112
|
let T;
|
|
113
|
-
t[28] !== l.confirm || t[29] !== N ? (T = /* @__PURE__ */ b(
|
|
113
|
+
t[28] !== l.confirm || t[29] !== N ? (T = /* @__PURE__ */ b(V, { color: "primary", disabled: N, type: "submit", className: "flex-grow-1", children: l.confirm }), t[28] = l.confirm, t[29] = N, t[30] = T) : T = t[30];
|
|
114
114
|
let M;
|
|
115
115
|
t[31] !== P || t[32] !== T ? (M = /* @__PURE__ */ D(O.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
116
116
|
P,
|
|
@@ -133,7 +133,7 @@ function Ue(t) {
|
|
|
133
133
|
const $e = (t) => {
|
|
134
134
|
const e = A.c(11), {
|
|
135
135
|
children: l
|
|
136
|
-
} = t, [i, n] = _(!1), [
|
|
136
|
+
} = t, [i, n] = _(!1), [c, o] = _("");
|
|
137
137
|
let r;
|
|
138
138
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
139
139
|
input: "textarea",
|
|
@@ -149,17 +149,17 @@ const $e = (t) => {
|
|
|
149
149
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (s = () => {
|
|
150
150
|
n(!1);
|
|
151
151
|
}, e[2] = s) : s = e[2];
|
|
152
|
-
const
|
|
152
|
+
const a = s;
|
|
153
153
|
let u;
|
|
154
|
-
e[3] !== i || e[4] !== x || e[5] !==
|
|
154
|
+
e[3] !== i || e[4] !== x || e[5] !== c ? (u = {
|
|
155
155
|
isShown: i,
|
|
156
|
-
text:
|
|
156
|
+
text: c,
|
|
157
157
|
showPrompt: d,
|
|
158
|
-
hidePrompt:
|
|
158
|
+
hidePrompt: a,
|
|
159
159
|
resolveRef: f,
|
|
160
160
|
options: x,
|
|
161
161
|
setOptions: y
|
|
162
|
-
}, e[3] = i, e[4] = x, e[5] =
|
|
162
|
+
}, e[3] = i, e[4] = x, e[5] = c, e[6] = u) : u = e[6];
|
|
163
163
|
const h = u;
|
|
164
164
|
let m;
|
|
165
165
|
e[7] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ b(Re, {}), e[7] = m) : m = e[7];
|
|
@@ -176,22 +176,22 @@ const et = (t) => {
|
|
|
176
176
|
cookieDomain: l,
|
|
177
177
|
axiosOptions: i,
|
|
178
178
|
language: n,
|
|
179
|
-
texts:
|
|
179
|
+
texts: c,
|
|
180
180
|
ProjectIconComponent: o,
|
|
181
181
|
localizationContext: r,
|
|
182
182
|
chartColorPalette: x,
|
|
183
183
|
children: y
|
|
184
184
|
} = t;
|
|
185
185
|
let f;
|
|
186
|
-
e[0] !== o || e[1] !== i || e[2] !== x || e[3] !== l || e[4] !== n || e[5] !== r || e[6] !==
|
|
186
|
+
e[0] !== o || e[1] !== i || e[2] !== x || e[3] !== l || e[4] !== n || e[5] !== r || e[6] !== c ? (f = {
|
|
187
187
|
axiosOptions: i,
|
|
188
188
|
cookieDomain: l,
|
|
189
189
|
language: n,
|
|
190
|
-
texts:
|
|
190
|
+
texts: c,
|
|
191
191
|
ProjectIconComponent: o,
|
|
192
192
|
localizationContext: r,
|
|
193
193
|
chartColorPalette: x
|
|
194
|
-
}, e[0] = o, e[1] = i, e[2] = x, e[3] = l, e[4] = n, e[5] = r, e[6] =
|
|
194
|
+
}, e[0] = o, e[1] = i, e[2] = x, e[3] = l, e[4] = n, e[5] = r, e[6] = c, e[7] = f) : f = e[7];
|
|
195
195
|
const S = f;
|
|
196
196
|
let d;
|
|
197
197
|
e[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ b(de, {}), e[8] = d) : d = e[8];
|
|
@@ -200,15 +200,15 @@ const et = (t) => {
|
|
|
200
200
|
d,
|
|
201
201
|
y
|
|
202
202
|
] }) }), e[9] = y, e[10] = s) : s = e[10];
|
|
203
|
-
let
|
|
204
|
-
return e[11] !== S || e[12] !== s ? (
|
|
203
|
+
let a;
|
|
204
|
+
return e[11] !== S || e[12] !== s ? (a = /* @__PURE__ */ b(J.Provider, { value: S, children: s }), e[11] = S, e[12] = s, e[13] = a) : a = e[13], a;
|
|
205
205
|
}, tt = (t) => {
|
|
206
206
|
const e = A.c(15), {
|
|
207
207
|
children: l
|
|
208
208
|
} = t, [i, n] = _(!1);
|
|
209
|
-
let
|
|
210
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
211
|
-
const [o] = _(
|
|
209
|
+
let c;
|
|
210
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ new Set(), e[0] = c) : c = e[0];
|
|
211
|
+
const [o] = _(c);
|
|
212
212
|
let r;
|
|
213
213
|
e[1] !== o ? (r = (u) => {
|
|
214
214
|
o.add(u), n(!0);
|
|
@@ -228,17 +228,17 @@ const et = (t) => {
|
|
|
228
228
|
const d = S;
|
|
229
229
|
let s;
|
|
230
230
|
e[9] !== i ? (s = i && /* @__PURE__ */ b(De, {}), e[9] = i, e[10] = s) : s = e[10];
|
|
231
|
-
let
|
|
232
|
-
return e[11] !== l || e[12] !== d || e[13] !== s ? (
|
|
231
|
+
let a;
|
|
232
|
+
return e[11] !== l || e[12] !== d || e[13] !== s ? (a = /* @__PURE__ */ D(me.Provider, { value: d, children: [
|
|
233
233
|
s,
|
|
234
234
|
l
|
|
235
|
-
] }), e[11] = l, e[12] = d, e[13] = s, e[14] =
|
|
235
|
+
] }), e[11] = l, e[12] = d, e[13] = s, e[14] = a) : a = e[14], a;
|
|
236
236
|
}, nt = (t) => {
|
|
237
237
|
const e = A.c(39), {
|
|
238
238
|
children: l
|
|
239
239
|
} = t, i = he(), {
|
|
240
240
|
msalInstance: n,
|
|
241
|
-
getToken:
|
|
241
|
+
getToken: c
|
|
242
242
|
} = H(re), {
|
|
243
243
|
delegation: o,
|
|
244
244
|
setDelegation: r,
|
|
@@ -246,15 +246,15 @@ const et = (t) => {
|
|
|
246
246
|
refreshAvailableDelegations: y
|
|
247
247
|
} = H(ie), [f, S] = _(null);
|
|
248
248
|
let d;
|
|
249
|
-
e[0] !==
|
|
250
|
-
const C = await
|
|
249
|
+
e[0] !== c ? (d = async () => {
|
|
250
|
+
const C = await c();
|
|
251
251
|
C && S(C.token);
|
|
252
|
-
}, e[0] =
|
|
252
|
+
}, e[0] = c, e[1] = d) : d = e[1];
|
|
253
253
|
const s = d;
|
|
254
|
-
let
|
|
255
|
-
e[2] !== s ? (
|
|
254
|
+
let a, u;
|
|
255
|
+
e[2] !== s ? (a = () => {
|
|
256
256
|
s();
|
|
257
|
-
}, u = [s], e[2] = s, e[3] =
|
|
257
|
+
}, u = [s], e[2] = s, e[3] = a, e[4] = u) : (a = e[3], u = e[4]), U(a, u);
|
|
258
258
|
let h;
|
|
259
259
|
if (e[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
260
260
|
e: {
|
|
@@ -388,7 +388,7 @@ const ne = () => {
|
|
|
388
388
|
() => t.useMsal ? t.msalInstance : null,
|
|
389
389
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
390
390
|
[t.useMsal, t.useMsal ? t.msalInstance : null]
|
|
391
|
-
),
|
|
391
|
+
), c = K(
|
|
392
392
|
() => t.useMsal ? t.msalScopes : [],
|
|
393
393
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
394
394
|
[t.useMsal, t.useMsal ? t.msalScopes : null]
|
|
@@ -407,30 +407,30 @@ const ne = () => {
|
|
|
407
407
|
throw console.log("getTokenMsal throwing error because msalInstance is null"), new Error("getTokenMsal: msalInstance is null");
|
|
408
408
|
if (r.current)
|
|
409
409
|
return console.log("getTokenMsal returning tokenRequestPromise.current", r.current), r.current;
|
|
410
|
-
const s = new Promise((
|
|
410
|
+
const s = new Promise((a, u) => {
|
|
411
411
|
const h = (m) => {
|
|
412
412
|
const g = Ie(n);
|
|
413
413
|
if (!g) {
|
|
414
414
|
console.log("getTokenMsal no account found. Redirecting to login"), n == null || n.loginRedirect({
|
|
415
|
-
scopes:
|
|
415
|
+
scopes: c,
|
|
416
416
|
extraScopesToConsent: o
|
|
417
417
|
});
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
420
|
n == null || n.acquireTokenSilent({
|
|
421
|
-
scopes:
|
|
421
|
+
scopes: c,
|
|
422
422
|
account: g,
|
|
423
423
|
redirectUri: t.useMsal ? t.msalSilentRedirectUri : void 0
|
|
424
424
|
}).then((v) => {
|
|
425
|
-
m(),
|
|
425
|
+
m(), a({
|
|
426
426
|
token: v.accessToken,
|
|
427
427
|
expiresOn: v.expiresOn ?? new Date(Date.now())
|
|
428
428
|
});
|
|
429
429
|
}).catch((v) => {
|
|
430
430
|
console.error("Error acquiring token", v), v instanceof Te && (console.log("Silent token acquisition failed. Acquiring token using redirect"), n == null || n.acquireTokenRedirect({
|
|
431
|
-
scopes:
|
|
431
|
+
scopes: c,
|
|
432
432
|
extraScopesToConsent: o
|
|
433
|
-
}), m(),
|
|
433
|
+
}), m(), a(null)), m(), u(v);
|
|
434
434
|
}).finally(() => {
|
|
435
435
|
m(), u(new Error("No access token returned from handleRedirectPromise"));
|
|
436
436
|
});
|
|
@@ -448,25 +448,25 @@ const ne = () => {
|
|
|
448
448
|
});
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
|
-
r.current = null, x.current = !0,
|
|
451
|
+
r.current = null, x.current = !0, a({
|
|
452
452
|
token: m.accessToken,
|
|
453
453
|
expiresOn: m.expiresOn ?? new Date(Date.now())
|
|
454
454
|
});
|
|
455
455
|
});
|
|
456
456
|
});
|
|
457
457
|
return r.current = s, s;
|
|
458
|
-
}, [e, o, n,
|
|
458
|
+
}, [e, o, n, c, t.msalSilentRedirectUri, t.useMsal]), S = Z(async () => t.useMsal ? f() : y(), [y, f, t.useMsal]), d = K(() => ({
|
|
459
459
|
useMsal: t.useMsal ?? !1,
|
|
460
460
|
msalInstance: n,
|
|
461
|
-
msalScopes:
|
|
461
|
+
msalScopes: c,
|
|
462
462
|
msalExtraScopes: o,
|
|
463
463
|
getToken: S
|
|
464
|
-
}), [t.useMsal, n,
|
|
464
|
+
}), [t.useMsal, n, c, o, S]);
|
|
465
465
|
return U(() => {
|
|
466
466
|
if (t.useMsal && n) {
|
|
467
|
-
const s = n.addEventCallback((
|
|
468
|
-
if (
|
|
469
|
-
const u =
|
|
467
|
+
const s = n.addEventCallback((a) => {
|
|
468
|
+
if (a.eventType === ee.LOGIN_SUCCESS || a.eventType === ee.ACQUIRE_TOKEN_SUCCESS && a.payload) {
|
|
469
|
+
const u = a.payload, h = u.account;
|
|
470
470
|
n.setActiveAccount(h);
|
|
471
471
|
const m = u.accessToken, g = u.expiresOn;
|
|
472
472
|
i("Authorization", m, {
|
|
@@ -477,7 +477,7 @@ const ne = () => {
|
|
|
477
477
|
expires: g ?? void 0
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
a.error && console.error("AuthProvider MSAL Error", a);
|
|
481
481
|
});
|
|
482
482
|
return () => {
|
|
483
483
|
s && n.removeEventCallback(s);
|
|
@@ -490,7 +490,7 @@ const ne = () => {
|
|
|
490
490
|
const e = A.c(18), {
|
|
491
491
|
children: l,
|
|
492
492
|
relativeEndpoint: i
|
|
493
|
-
} = t, [n,
|
|
493
|
+
} = t, [n, c, o] = _e("user-delegation", null);
|
|
494
494
|
let r;
|
|
495
495
|
e: {
|
|
496
496
|
if (!n) {
|
|
@@ -502,7 +502,7 @@ const ne = () => {
|
|
|
502
502
|
start: k,
|
|
503
503
|
end: P
|
|
504
504
|
})) {
|
|
505
|
-
|
|
505
|
+
c(null), r = null;
|
|
506
506
|
break e;
|
|
507
507
|
}
|
|
508
508
|
r = n;
|
|
@@ -518,15 +518,15 @@ const ne = () => {
|
|
|
518
518
|
setData: S,
|
|
519
519
|
reloadData: d
|
|
520
520
|
} = Me(i, y), s = Q(null);
|
|
521
|
-
let
|
|
522
|
-
e[1] !== d ? (
|
|
521
|
+
let a, u;
|
|
522
|
+
e[1] !== d ? (a = () => {
|
|
523
523
|
const k = () => {
|
|
524
524
|
d(), s.current = window.setTimeout(k, xe() + 5e3);
|
|
525
525
|
};
|
|
526
526
|
return k(), () => {
|
|
527
527
|
s.current !== null && window.clearTimeout(s.current);
|
|
528
528
|
};
|
|
529
|
-
}, u = [d], e[1] = d, e[2] =
|
|
529
|
+
}, u = [d], e[1] = d, e[2] = a, e[3] = u) : (a = e[2], u = e[3]), U(a, u);
|
|
530
530
|
let h;
|
|
531
531
|
e[4] !== o ? (h = () => {
|
|
532
532
|
const k = () => {
|
|
@@ -539,13 +539,13 @@ const ne = () => {
|
|
|
539
539
|
let m;
|
|
540
540
|
e[6] !== o || e[7] !== d ? (m = [o, d], e[6] = o, e[7] = d, e[8] = m) : m = e[8], U(h, m);
|
|
541
541
|
let g;
|
|
542
|
-
e[9] !== f || e[10] !== d || e[11] !== S || e[12] !==
|
|
542
|
+
e[9] !== f || e[10] !== d || e[11] !== S || e[12] !== c || e[13] !== x ? (g = {
|
|
543
543
|
delegation: x,
|
|
544
|
-
setDelegation:
|
|
544
|
+
setDelegation: c,
|
|
545
545
|
availableDelegations: f,
|
|
546
546
|
setAvailableDelegations: S,
|
|
547
547
|
refreshAvailableDelegations: d
|
|
548
|
-
}, e[9] = f, e[10] = d, e[11] = S, e[12] =
|
|
548
|
+
}, e[9] = f, e[10] = d, e[11] = S, e[12] = c, e[13] = x, e[14] = g) : g = e[14];
|
|
549
549
|
const v = g;
|
|
550
550
|
let w;
|
|
551
551
|
return e[15] !== l || e[16] !== v ? (w = /* @__PURE__ */ b(ie.Provider, { value: v, children: l }), e[15] = l, e[16] = v, e[17] = w) : w = e[17], w;
|
|
@@ -554,9 +554,9 @@ const ne = () => {
|
|
|
554
554
|
defaultHelmet: l,
|
|
555
555
|
children: i,
|
|
556
556
|
helmetPrefix: n
|
|
557
|
-
} = t,
|
|
557
|
+
} = t, c = n ?? "";
|
|
558
558
|
let o;
|
|
559
|
-
e[0] !== l || e[1] !==
|
|
559
|
+
e[0] !== l || e[1] !== c ? (o = oe(c, l), e[0] = l, e[1] = c, e[2] = o) : o = e[2];
|
|
560
560
|
let r;
|
|
561
561
|
e[3] !== o ? (r = [o], e[3] = o, e[4] = r) : r = e[4];
|
|
562
562
|
const [x, y] = _(r);
|
|
@@ -570,9 +570,9 @@ const ne = () => {
|
|
|
570
570
|
y(qe);
|
|
571
571
|
}, e[7] = d) : d = e[7];
|
|
572
572
|
const s = d;
|
|
573
|
-
let
|
|
574
|
-
e[8] !== x ? (
|
|
575
|
-
const u =
|
|
573
|
+
let a;
|
|
574
|
+
e[8] !== x ? (a = x.at(-1) ?? "", e[8] = x, e[9] = a) : a = e[9];
|
|
575
|
+
const u = a;
|
|
576
576
|
let h;
|
|
577
577
|
e[10] !== S ? (h = {
|
|
578
578
|
addHelmet: S,
|
|
@@ -598,10 +598,10 @@ const le = 50, ze = () => {
|
|
|
598
598
|
} = e, {
|
|
599
599
|
onConfirm: i,
|
|
600
600
|
onCancel: n,
|
|
601
|
-
text:
|
|
601
|
+
text: c,
|
|
602
602
|
show: o,
|
|
603
603
|
textSm: r
|
|
604
|
-
} = ve(), x = r === void 0 ?
|
|
604
|
+
} = ve(), x = r === void 0 ? c.length > le : r, y = c.length > le;
|
|
605
605
|
let f;
|
|
606
606
|
t[0] !== n || t[1] !== i || t[2] !== o ? (f = (g) => {
|
|
607
607
|
if (o)
|
|
@@ -618,16 +618,16 @@ const le = 50, ze = () => {
|
|
|
618
618
|
}, t[0] = n, t[1] = i, t[2] = o, t[3] = f) : f = t[3], be(f);
|
|
619
619
|
const d = y ? void 0 : "sm";
|
|
620
620
|
let s;
|
|
621
|
-
t[4] !== x || t[5] !==
|
|
622
|
-
let
|
|
623
|
-
t[7] !== l.no || t[8] !== n ? (
|
|
621
|
+
t[4] !== x || t[5] !== c ? (s = /* @__PURE__ */ b(O.Header, { className: "justify-content-center", children: x ? /* @__PURE__ */ b(ke, { variant: "body", children: c }) : /* @__PURE__ */ b(O.Title, { children: c }) }), t[4] = x, t[5] = c, t[6] = s) : s = t[6];
|
|
622
|
+
let a;
|
|
623
|
+
t[7] !== l.no || t[8] !== n ? (a = /* @__PURE__ */ b(V, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: l.no }), t[7] = l.no, t[8] = n, t[9] = a) : a = t[9];
|
|
624
624
|
let u;
|
|
625
|
-
t[10] !== l.yes || t[11] !== i ? (u = /* @__PURE__ */ b(
|
|
625
|
+
t[10] !== l.yes || t[11] !== i ? (u = /* @__PURE__ */ b(V, { type: "button", color: "primary", onClick: i, className: "w-100 ml", children: l.yes }), t[10] = l.yes, t[11] = i, t[12] = u) : u = t[12];
|
|
626
626
|
let h;
|
|
627
|
-
t[13] !==
|
|
628
|
-
|
|
627
|
+
t[13] !== a || t[14] !== u ? (h = /* @__PURE__ */ b(O.Body, { children: /* @__PURE__ */ D("div", { className: "w-100 d-flex gap-5", children: [
|
|
628
|
+
a,
|
|
629
629
|
u
|
|
630
|
-
] }) }), t[13] =
|
|
630
|
+
] }) }), t[13] = a, t[14] = u, t[15] = h) : h = t[15];
|
|
631
631
|
let m;
|
|
632
632
|
return t[16] !== n || t[17] !== o || t[18] !== d || t[19] !== s || t[20] !== h ? (m = /* @__PURE__ */ D(O, { show: o, size: d, centered: !0, onHide: n, children: [
|
|
633
633
|
s,
|
|
@@ -639,7 +639,7 @@ export {
|
|
|
639
639
|
ot as AuthProvider,
|
|
640
640
|
ie as DelegationContext,
|
|
641
641
|
lt as DelegationProvider,
|
|
642
|
-
|
|
642
|
+
at as FormDisabledContext,
|
|
643
643
|
ft as FormDisabledProvider,
|
|
644
644
|
ye as HelmetContext,
|
|
645
645
|
st as HelmetProvider,
|
|
@@ -649,5 +649,5 @@ export {
|
|
|
649
649
|
et as LuminusComponentsProvider,
|
|
650
650
|
ge as UserContext,
|
|
651
651
|
nt as UserProvider,
|
|
652
|
-
|
|
652
|
+
ct as useFormDisabledContext
|
|
653
653
|
};
|
package/dist/hooks.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-Bak2bSwx.cjs"),U=require("./useLocalStorageState-CfodPjK7.cjs"),f=require("react"),F=require("./useIsFormDirty-BvvK5I1M.cjs");require("react/jsx-runtime");require("react-router");const H=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");const C=new Map;function Q(s,r){const e=a.useAxios({silent:!0,differentBaseUrl:r==null?void 0:r.customBaseUrl,customToken:r==null?void 0:r.customToken}),t=f.useRef(null);if(!C.has(s)){if(!e.interceptorsUsed)return null;const m=e.get(s).then(n=>(C.set(s,{status:"success",data:n.data}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e3*10),n.data)).catch(n=>{throw C.set(s,{status:"error",error:n}),t.current=setTimeout(()=>{C.delete(s),t.current=null},1e3*1),n});throw C.set(s,{status:"pending",promise:m}),m}const o=C.get(s);if(o.status==="pending")throw o.promise;if(o.status==="error")throw o.error;return o.data}const _=s=>r=>(window.addEventListener(`storage_${s}`,r),()=>window.removeEventListener(`storage_${s}`,r)),J=(s,r,e)=>{const t=a.compilerRuntimeExports.c(15),o=e===void 0?localStorage:e,[m]=f.useState(r);let n;t[0]!==r?(n=JSON.stringify(r),t[0]=r,t[1]=n):n=t[1];const l=f.useRef(n),w=f.useRef(r);let h;t[2]!==s||t[3]!==m||t[4]!==o?(h=()=>{const i=o.getItem(s);return i!==l.current&&(l.current=i,w.current=l.current?JSON.parse(l.current):m),w.current},t[2]=s,t[3]=m,t[4]=o,t[5]=h):h=t[5];const y=h;let g;t[6]!==s?(g=_(s),t[6]=s,t[7]=g):g=t[7];const D=g,c=f.useSyncExternalStore(D,y);let u;t[8]!==y||t[9]!==s||t[10]!==o?(u=i=>{const E=typeof i=="function"?i(y()):i;o.setItem(s,JSON.stringify(E)),window.dispatchEvent(new Event(`storage_${s}`))},t[8]=y,t[9]=s,t[10]=o,t[11]=u):u=t[11];const d=u;let v;return t[12]!==d||t[13]!==c?(v=[c,d],t[12]=d,t[13]=c,t[14]=v):v=t[14],v},M=(s,r,e)=>{let t="pending",o;const m=s.then(n=>{t="success",o=n},n=>{const l=n==null?void 0:n.response;(l==null?void 0:l.status)===404&&e?(t="error-404",o=n):(t="error",o=n)});return()=>{switch(t){case"pending":throw m;case"success":return o;case"error":if(o.code==="ERR_CANCELED")return null;throw o;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},b={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},W=(s,r)=>{const e=a.compilerRuntimeExports.c(26),{loadOnInit:t,enabled:o,silent:m,nullStateBeforeLoad:n,nullStateOnFail:l,customApiUrl:w,customBearerToken:h,dataTransformer:y,errorBoundaryOn404:g}=r===void 0?b:r,D=t===void 0?b.loadOnInit:t,c=o===void 0?b.enabled:o,u=m===void 0?b.silent:m,d=n===void 0?b.nullStateBeforeLoad:n,v=l===void 0?b.nullStateOnFail:l;let p;e[0]!==g?(p=g?[404]:void 0,e[0]=g,e[1]=p):p=e[1];let i;e[2]!==w||e[3]!==h||e[4]!==u||e[5]!==p?(i={silent:u,customToken:h,differentBaseUrl:w,noToastOnStatus:p},e[2]=w,e[3]=h,e[4]=u,e[5]=p,e[6]=i):i=e[6];const E=a.useAxios(i),{startLoading:I,stopLoading:S}=f.useContext(a.LoadingContext),O=f.useRef(0),{isAuthenticated:P}=a.useAuth(),[R,N]=f.useState(null);let A;e[7]!==E||e[8]!==y||e[9]!==c||e[10]!==g||e[11]!==P||e[12]!==d||e[13]!==v||e[14]!==u||e[15]!==I||e[16]!==S||e[17]!==s?(A=async(x,G)=>{if(!P()||c===!1)return;!u&&I(`loadData-${s}-${G}`),d&&N(null);const V=E.get(s,{signal:x}).then(K=>y?y(K.data):K.data).finally(()=>!u&&S(`loadData-${s}-${G}`));N(M(V,v??!1,g??!1))},e[7]=E,e[8]=y,e[9]=c,e[10]=g,e[11]=P,e[12]=d,e[13]=v,e[14]=u,e[15]=I,e[16]=S,e[17]=s,e[18]=A):A=e[18];const T=A;let q,B;e[19]!==T||e[20]!==D?(B=()=>{if(D===!1)return;const x=new AbortController;return T(x.signal,O.current=O.current+1),()=>{x.abort()}},q=[T,D],e[19]=T,e[20]=D,e[21]=q,e[22]=B):(q=e[21],B=e[22]),f.useEffect(B,q);let L;return e[23]!==R||e[24]!==T?(L={data:R,setData:N,reloadData:T},e[23]=R,e[24]=T,e[25]=L):L=e[25],L},z=()=>{const s=f.useRef({}).current;return f.useEffect(()=>{const r=document.createElement("div");return r.style.position="absolute",r.style.pointerEvents="none",r.style.top="0",r.style.width="100%",r.style.height="100%",s.elt=r,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[s]),r=>(e,...t)=>{const o=r(e,...t);return e.draggableProps.style.position==="fixed"?H.createPortal(o,s.elt):o}},$={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},Z=(s,r)=>{const e=a.compilerRuntimeExports.c(18),{storageKey:t,requiredHeight:o,retryInterval:m}=r===void 0?$:r,n=t===void 0?$.storageKey:t,l=o===void 0?$.requiredHeight:o,w=m===void 0?$.retryInterval:m,[h,y]=f.useState(!1),g=f.useRef(null);let D;e[0]!==n?(D=()=>{const S=localStorage.getItem(n);return localStorage.removeItem(n),S===null?null:Number(S)},e[0]=n,e[1]=D):D=e[1];const c=D;let u;e[2]!==n?(u=S=>{localStorage.setItem(n,S)},e[2]=n,e[3]=u):u=e[3];const d=u;let v,p;e[4]!==h||e[5]!==l||e[6]!==c||e[7]!==w||e[8]!==s?(v=()=>{const S=window.setInterval(()=>{if(!h&&s.current!==null&&s.current.getBoundingClientRect().height>l){y(!0);const O=c();O!==null&&s.current.scrollTo({top:O}),window.clearInterval(S)}},w);return()=>{window.clearTimeout(S)}},p=[h,l,c,w,s],e[4]=h,e[5]=l,e[6]=c,e[7]=w,e[8]=s,e[9]=v,e[10]=p):(v=e[9],p=e[10]),f.useEffect(v,p);let i,E;e[11]!==d||e[12]!==s?(i=()=>{var O;const S=new AbortController;return(O=s.current)==null||O.addEventListener("scrollend",()=>{var P;g.current=((P=s.current)==null?void 0:P.scrollTop)??0,d((g.current??0).toString())},{signal:S.signal}),()=>S.abort()},E=[d,s],e[11]=d,e[12]=s,e[13]=i,e[14]=E):(i=e[13],E=e[14]),f.useEffect(i,E);let I;return e[15]!==c||e[16]!==d?(I={saveValue:d,retrieveValue:c},e[15]=c,e[16]=d,e[17]=I):I=e[17],I};exports.cancelToken=a.cancelToken;exports.useAuth=a.useAuth;exports.useAxios=a.useAxios;exports.useClickOutside=a.useClickOutside;exports.useClipboard=a.useClipboard;exports.useConfirm=a.useConfirm;exports.useFormControlType=a.useFormControlType;exports.useKeyPress=a.useKeyPress;exports.useNotifications=a.useNotifications;exports.usePermissions=a.usePermissions;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.useZodSchemaTypes;exports.useGetApiData=U.useGetApiData;exports.useLocalStorageState=U.useLocalStorageState;exports.useEmployeePhotoPath=F.useEmployeePhotoPath;exports.useIsFormDirty=F.useIsFormDirty;exports.useSearchQuery=F.useSearchQuery;exports.useSearchQueryState=F.useSearchQueryState;exports.useGetApiDataBound=W;exports.useGetDataBound=Q;exports.usePersistentState=J;exports.useRenderDraggableInPortal=z;exports.useScrollSave=Z;
|