@australiangreens/ag-internal-components 0.1.9 → 0.1.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/dist/esm/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var he = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var n of oe(t))
|
|
10
10
|
Be.call(t, n) && he(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, D = (e, t) => _t(e, Mt(t));
|
|
13
13
|
var Ee = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
@@ -21,32 +21,32 @@ var Ee = (e, t) => {
|
|
|
21
21
|
};
|
|
22
22
|
var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
23
|
var L = (e, t, n) => new Promise((i, r) => {
|
|
24
|
-
var s = (
|
|
24
|
+
var s = (l) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
r(
|
|
26
|
+
c(n.next(l));
|
|
27
|
+
} catch (p) {
|
|
28
|
+
r(p);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, d = (l) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
r(
|
|
32
|
+
c(n.throw(l));
|
|
33
|
+
} catch (p) {
|
|
34
|
+
r(p);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, c = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, d);
|
|
37
|
+
c((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as u, Fragment as P, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as F, createContext as Je, useCallback as ae, useContext as Ze, useEffect as K, createElement as xe, useMemo as Rt, useRef as ge } from "react";
|
|
41
|
+
import { Typography as T, Button as J, Paper as je, Box as y, Drawer as we, styled as Ae, IconButton as Z, Container as et, useTheme as se, useMediaQuery as Ht, Collapse as Wt, Avatar as Pe, Fade as zt, Skeleton as Ne, Toolbar as Ut, Divider as Le, CssBaseline as Gt, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as Se, TextField as be, CircularProgress as De, Chip as Vt, Tooltip as qt, Stack as Xt, Snackbar as Qt, Alert as Yt, FormHelperText as Kt } from "@mui/material";
|
|
42
42
|
import Jt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as W, createTheme as at, alpha as fe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Zt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as Q } from "souvlaki";
|
|
46
46
|
import { BrowserRouter as jt } from "react-router-dom";
|
|
47
47
|
import st from "@mui/material/List";
|
|
48
48
|
import { ArrowForward as lt, ArrowBack as ct, ViewHeadline as en, Cancel as tn, ArrowDropDown as nn } from "@mui/icons-material";
|
|
49
|
-
import { atom as
|
|
49
|
+
import { atom as R, useSetAtom as dt, useAtomValue as _e, useAtom as V, getDefaultStore as on, Provider as ut } from "jotai";
|
|
50
50
|
import { useHydrateAtoms as pt } from "jotai/utils";
|
|
51
51
|
import Me from "react-avatar";
|
|
52
52
|
import rn from "autosuggest-highlight/match";
|
|
@@ -56,10 +56,10 @@ import { useAuth0 as ht } from "@auth0/auth0-react";
|
|
|
56
56
|
import { Buffer as dn } from "buffer";
|
|
57
57
|
import un from "@mui/material/Skeleton";
|
|
58
58
|
function Oo({ text: e }) {
|
|
59
|
-
const [t, n] =
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
/* @__PURE__ */ o(
|
|
59
|
+
const [t, n] = F(0);
|
|
60
|
+
return /* @__PURE__ */ u(P, { children: [
|
|
61
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
62
|
+
/* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
63
63
|
/* @__PURE__ */ o(
|
|
64
64
|
J,
|
|
65
65
|
{
|
|
@@ -69,11 +69,11 @@ function Oo({ text: e }) {
|
|
|
69
69
|
children: "Hello I am a button"
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ u("p", { children: [
|
|
73
73
|
"This is some text: ",
|
|
74
74
|
/* @__PURE__ */ o("span", { children: e })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ u(je, { children: [
|
|
77
77
|
"This number will incremember when button pressed: ",
|
|
78
78
|
t
|
|
79
79
|
] })
|
|
@@ -87,7 +87,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
87
87
|
userInfoHolder: `${U}-userInfoHolder`,
|
|
88
88
|
settings: `${U}-settings`,
|
|
89
89
|
pieChartIcon: `${U}-pieChartIcon`
|
|
90
|
-
}, pn =
|
|
90
|
+
}, pn = W(y, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -120,7 +120,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
120
120
|
width: gt
|
|
121
121
|
}, mt()), gn = () => a({
|
|
122
122
|
width: ft
|
|
123
|
-
}, mt()), fn =
|
|
123
|
+
}, mt()), fn = W(we, {
|
|
124
124
|
shouldForwardProp: (e) => e !== "open"
|
|
125
125
|
})(({ theme: e, open: t }) => a(a({
|
|
126
126
|
width: t ? gt : ft,
|
|
@@ -141,16 +141,16 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
141
141
|
overrideActions: t = Cn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
|
-
const [{ open: i }, r] =
|
|
145
|
-
r({ open:
|
|
146
|
-
}, []),
|
|
147
|
-
r((
|
|
148
|
-
}, []),
|
|
144
|
+
const [{ open: i }, r] = F({ open: !0 }), s = ae((l) => {
|
|
145
|
+
r({ open: l });
|
|
146
|
+
}, []), d = ae(() => {
|
|
147
|
+
r((l) => D(a({}, l), { open: !l.open }));
|
|
148
|
+
}, []), c = a(a({
|
|
149
149
|
open: i,
|
|
150
150
|
setOpen: s,
|
|
151
|
-
toggleOpen:
|
|
151
|
+
toggleOpen: d
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(Ct.Provider, { value:
|
|
153
|
+
return /* @__PURE__ */ o(Ct.Provider, { value: c, children: n });
|
|
154
154
|
}, vn = () => {
|
|
155
155
|
const e = Ze(Ct);
|
|
156
156
|
if (e === null)
|
|
@@ -160,7 +160,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
160
160
|
open: !0
|
|
161
161
|
}, e), Bo = Q(
|
|
162
162
|
(e = wn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(xn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
-
), Eo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), Re = 7, Fo =
|
|
163
|
+
), Eo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), Re = 7, Fo = W(st)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -198,7 +198,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
198
198
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
199
199
|
// },
|
|
200
200
|
}
|
|
201
|
-
})), He = 7, Po =
|
|
201
|
+
})), He = 7, Po = W(st)(({ theme: e }) => ({
|
|
202
202
|
backgroundColor: "#e8e8e8",
|
|
203
203
|
color: "inherit",
|
|
204
204
|
"& .MuiListItem-root": {
|
|
@@ -242,7 +242,7 @@ function No({
|
|
|
242
242
|
children: t
|
|
243
243
|
}) {
|
|
244
244
|
const { open: n } = vn();
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ u(pn, { className: q.root, "data-testid": e, children: [
|
|
246
246
|
/* @__PURE__ */ o(Jt, {}),
|
|
247
247
|
/* @__PURE__ */ o(
|
|
248
248
|
fn,
|
|
@@ -256,7 +256,7 @@ function No({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const An = 24, Sn = 64, G = "TopBar",
|
|
259
|
+
const An = 24, Sn = 64, G = "TopBar", E = {
|
|
260
260
|
topStripe: `${G}-topStripe`,
|
|
261
261
|
titleBar: `${G}-titleBar`,
|
|
262
262
|
titleSlider: `${G}-titleSlider`,
|
|
@@ -270,18 +270,18 @@ const An = 24, Sn = 64, G = "TopBar", B = {
|
|
|
270
270
|
var i, r;
|
|
271
271
|
return {
|
|
272
272
|
width: "100%",
|
|
273
|
-
[`& .${
|
|
273
|
+
[`& .${E.topStripe}`]: {
|
|
274
274
|
width: "100%",
|
|
275
275
|
height: `${An}px`,
|
|
276
276
|
backgroundColor: e.palette.primary.main
|
|
277
277
|
},
|
|
278
|
-
[`& .${
|
|
278
|
+
[`& .${E.titleBar}`]: {
|
|
279
279
|
backgroundColor: e.palette.primary.light,
|
|
280
280
|
height: `${Sn}px`,
|
|
281
281
|
padding: e.spacing(0, 3),
|
|
282
282
|
width: "100%"
|
|
283
283
|
},
|
|
284
|
-
[`& .${
|
|
284
|
+
[`& .${E.titleSlider}`]: a(a({
|
|
285
285
|
height: "100%",
|
|
286
286
|
display: "flex",
|
|
287
287
|
alignItems: "center",
|
|
@@ -290,14 +290,14 @@ const An = 24, Sn = 64, G = "TopBar", B = {
|
|
|
290
290
|
easing: e.transitions.easing.sharp,
|
|
291
291
|
duration: e.transitions.duration.leavingScreen
|
|
292
292
|
}),
|
|
293
|
-
[`& .${
|
|
293
|
+
[`& .${E.leftPanelButton}`]: {
|
|
294
294
|
marginRight: e.spacing(2),
|
|
295
295
|
flexGrow: 0
|
|
296
296
|
},
|
|
297
|
-
[`& .${
|
|
297
|
+
[`& .${E.titleText}`]: {
|
|
298
298
|
flexGrow: 1
|
|
299
299
|
},
|
|
300
|
-
[`& .${
|
|
300
|
+
[`& .${E.rightPanelButton}`]: {
|
|
301
301
|
flexGrow: 0
|
|
302
302
|
}
|
|
303
303
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -321,13 +321,13 @@ function Dn({
|
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */ o("div", { className:
|
|
326
|
-
/* @__PURE__ */ o("div", { className:
|
|
327
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ u(bn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
|
+
/* @__PURE__ */ o("div", { className: E.topStripe }),
|
|
326
|
+
/* @__PURE__ */ o("div", { className: E.titleBar, children: /* @__PURE__ */ u(y, { className: E.titleSlider, children: [
|
|
327
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
328
328
|
Z,
|
|
329
329
|
{
|
|
330
|
-
className:
|
|
330
|
+
className: E.leftPanelButton,
|
|
331
331
|
color: "inherit",
|
|
332
332
|
"aria-label": "Open left side panel",
|
|
333
333
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -339,11 +339,11 @@ function Dn({
|
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ o(
|
|
343
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ o(T, { className: E.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
343
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
|
|
344
344
|
Z,
|
|
345
345
|
{
|
|
346
|
-
className:
|
|
346
|
+
className: E.rightPanelButton,
|
|
347
347
|
color: "inherit",
|
|
348
348
|
"aria-label": "Open right side panel",
|
|
349
349
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -388,9 +388,9 @@ const xt = 400, kn = Ae(we, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
), yn = Ae(
|
|
391
|
+
), yn = Ae(y, {
|
|
392
392
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
393
|
-
})(({ theme: e, anchor: t }) =>
|
|
393
|
+
})(({ theme: e, anchor: t }) => D(a({
|
|
394
394
|
display: "flex",
|
|
395
395
|
alignItems: "center",
|
|
396
396
|
padding: e.spacing(2)
|
|
@@ -416,52 +416,52 @@ function We({
|
|
|
416
416
|
},
|
|
417
417
|
titleText: r = "",
|
|
418
418
|
width: s = xt,
|
|
419
|
-
showCloseArrow:
|
|
420
|
-
debugOpacity:
|
|
421
|
-
headerBoxProps:
|
|
422
|
-
onOpened:
|
|
423
|
-
onClosed:
|
|
419
|
+
showCloseArrow: d = !0,
|
|
420
|
+
debugOpacity: c = !1,
|
|
421
|
+
headerBoxProps: l = {},
|
|
422
|
+
onOpened: p,
|
|
423
|
+
onClosed: g,
|
|
424
424
|
"data-testid": m,
|
|
425
|
-
navBarOpen:
|
|
425
|
+
navBarOpen: w = !1,
|
|
426
426
|
navBarWidthOpen: h = 0,
|
|
427
427
|
navBarWidthClosed: b = 0
|
|
428
428
|
}) {
|
|
429
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ u(
|
|
430
430
|
kn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
|
-
onEntered: () =>
|
|
434
|
-
onExited: () =>
|
|
433
|
+
onEntered: () => p == null ? void 0 : p(),
|
|
434
|
+
onExited: () => g == null ? void 0 : g()
|
|
435
435
|
},
|
|
436
436
|
variant: "persistent",
|
|
437
437
|
anchor: t,
|
|
438
438
|
open: n,
|
|
439
439
|
width: s,
|
|
440
|
-
debugOpacity:
|
|
440
|
+
debugOpacity: c,
|
|
441
441
|
"data-testid": m,
|
|
442
|
-
navBarOpen:
|
|
442
|
+
navBarOpen: w,
|
|
443
443
|
navBarWidthOpen: h,
|
|
444
444
|
navBarWidthClosed: b,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(yn,
|
|
447
|
-
/* @__PURE__ */ o(
|
|
448
|
-
|
|
446
|
+
/* @__PURE__ */ o(yn, D(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(P, { children: [
|
|
447
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
|
+
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
449
449
|
/* @__PURE__ */ o(ct, { "data-testid": "arrowbackicon" }),
|
|
450
450
|
" "
|
|
451
451
|
] })
|
|
452
|
-
] }) : /* @__PURE__ */
|
|
453
|
-
|
|
452
|
+
] }) : /* @__PURE__ */ u(P, { children: [
|
|
453
|
+
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
454
454
|
/* @__PURE__ */ o(lt, {}),
|
|
455
455
|
" "
|
|
456
456
|
] }),
|
|
457
|
-
/* @__PURE__ */ o(
|
|
457
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
458
458
|
] }) })),
|
|
459
459
|
e
|
|
460
460
|
]
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const In =
|
|
464
|
+
const In = W(y, {
|
|
465
465
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
466
466
|
name: "PanelAwareMargins"
|
|
467
467
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -484,7 +484,7 @@ const In = H(I, {
|
|
|
484
484
|
}),
|
|
485
485
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
486
486
|
});
|
|
487
|
-
}), $n =
|
|
487
|
+
}), $n = W(et, {
|
|
488
488
|
name: "PageContainer"
|
|
489
489
|
})(({ theme: e }) => ({
|
|
490
490
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -499,7 +499,7 @@ const In = H(I, {
|
|
|
499
499
|
startOpen: !1,
|
|
500
500
|
open: void 0,
|
|
501
501
|
onChangeOpen: void 0,
|
|
502
|
-
content: /* @__PURE__ */ o(
|
|
502
|
+
content: /* @__PURE__ */ o(P, {}),
|
|
503
503
|
onOpened: void 0,
|
|
504
504
|
onClosed: void 0,
|
|
505
505
|
dataTestId: void 0
|
|
@@ -511,22 +511,22 @@ function Lo({
|
|
|
511
511
|
rightPanel: i,
|
|
512
512
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
513
513
|
debugOpacity: s = !1,
|
|
514
|
-
pageContainerProps:
|
|
515
|
-
pageContentDataTestId:
|
|
516
|
-
topBarDataTestId:
|
|
517
|
-
navBarOpen:
|
|
518
|
-
navBarWidthOpen:
|
|
514
|
+
pageContainerProps: d,
|
|
515
|
+
pageContentDataTestId: c,
|
|
516
|
+
topBarDataTestId: l,
|
|
517
|
+
navBarOpen: p,
|
|
518
|
+
navBarWidthOpen: g,
|
|
519
519
|
navBarWidthClosed: m
|
|
520
520
|
}) {
|
|
521
|
-
const [
|
|
522
|
-
titleText:
|
|
523
|
-
content:
|
|
524
|
-
flavour:
|
|
525
|
-
open:
|
|
521
|
+
const [w, h] = F(me), [b, S] = F(Ce), [k, $] = F(me), [O, B] = F(Ce), _ = n !== void 0, N = i !== void 0, {
|
|
522
|
+
titleText: v,
|
|
523
|
+
content: I,
|
|
524
|
+
flavour: M,
|
|
525
|
+
open: f,
|
|
526
526
|
onChangeOpen: C,
|
|
527
527
|
width: x,
|
|
528
|
-
arrowButtons:
|
|
529
|
-
startOpen:
|
|
528
|
+
arrowButtons: A,
|
|
529
|
+
startOpen: H,
|
|
530
530
|
onOpened: ee,
|
|
531
531
|
onClosed: le,
|
|
532
532
|
dataTestId: Ot
|
|
@@ -544,17 +544,17 @@ function Lo({
|
|
|
544
544
|
dataTestId: Nt
|
|
545
545
|
} = i ? a(a({}, ie), i) : a({}, ie);
|
|
546
546
|
K(() => {
|
|
547
|
-
|
|
548
|
-
}, [
|
|
549
|
-
ne !== Ce && (
|
|
547
|
+
H !== me && (h(H), $(H));
|
|
548
|
+
}, [H]), K(() => {
|
|
549
|
+
ne !== Ce && (S(ne), B(ne));
|
|
550
550
|
}, [ne]);
|
|
551
|
-
const ue =
|
|
552
|
-
|
|
551
|
+
const ue = f === void 0 ? w : f, pe = ce === void 0 ? b : ce, $e = (z) => {
|
|
552
|
+
f === void 0 && (h(z), r && N && (z ? (S(!1), B(b)) : S(O))), C && C(z);
|
|
553
553
|
}, Te = (z) => {
|
|
554
|
-
ce === void 0 && (
|
|
554
|
+
ce === void 0 && (S(z), r && _ && (z ? (h(!1), $(w)) : h(k))), Ie && Ie(z);
|
|
555
555
|
};
|
|
556
|
-
return /* @__PURE__ */
|
|
557
|
-
|
|
556
|
+
return /* @__PURE__ */ u(y, { children: [
|
|
557
|
+
_ && /* @__PURE__ */ o(
|
|
558
558
|
We,
|
|
559
559
|
{
|
|
560
560
|
"data-testid": Ot,
|
|
@@ -562,18 +562,18 @@ function Lo({
|
|
|
562
562
|
open: ue,
|
|
563
563
|
onClose: () => $e(!1),
|
|
564
564
|
width: x,
|
|
565
|
-
titleText:
|
|
565
|
+
titleText: v,
|
|
566
566
|
debugOpacity: s,
|
|
567
|
-
showCloseArrow:
|
|
567
|
+
showCloseArrow: A === "both" || A === "close",
|
|
568
568
|
onOpened: ee,
|
|
569
569
|
onClosed: le,
|
|
570
|
-
navBarOpen:
|
|
571
|
-
navBarWidthOpen:
|
|
570
|
+
navBarOpen: p,
|
|
571
|
+
navBarWidthOpen: g,
|
|
572
572
|
navBarWidthClosed: m,
|
|
573
|
-
children:
|
|
573
|
+
children: I
|
|
574
574
|
}
|
|
575
575
|
),
|
|
576
|
-
|
|
576
|
+
N && /* @__PURE__ */ o(
|
|
577
577
|
We,
|
|
578
578
|
{
|
|
579
579
|
"data-testid": Nt,
|
|
@@ -586,8 +586,8 @@ function Lo({
|
|
|
586
586
|
showCloseArrow: te === "both" || te === "close",
|
|
587
587
|
onOpened: Ft,
|
|
588
588
|
onClosed: Pt,
|
|
589
|
-
navBarOpen:
|
|
590
|
-
navBarWidthOpen:
|
|
589
|
+
navBarOpen: p,
|
|
590
|
+
navBarWidthOpen: g,
|
|
591
591
|
navBarWidthClosed: m,
|
|
592
592
|
children: Et
|
|
593
593
|
}
|
|
@@ -596,15 +596,15 @@ function Lo({
|
|
|
596
596
|
Dn,
|
|
597
597
|
a(a({
|
|
598
598
|
titleText: t,
|
|
599
|
-
"data-testid":
|
|
600
|
-
},
|
|
599
|
+
"data-testid": l
|
|
600
|
+
}, _ && M === "push" ? {
|
|
601
601
|
leftPanel: {
|
|
602
602
|
open: ue,
|
|
603
603
|
width: x,
|
|
604
604
|
onOpen: () => $e(!0),
|
|
605
|
-
showOpenArrow:
|
|
605
|
+
showOpenArrow: A === "both" || A === "open"
|
|
606
606
|
}
|
|
607
|
-
} : {}),
|
|
607
|
+
} : {}), N && ye === "push" ? {
|
|
608
608
|
rightPanel: {
|
|
609
609
|
open: pe,
|
|
610
610
|
width: de,
|
|
@@ -615,7 +615,7 @@ function Lo({
|
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ o(
|
|
617
617
|
In,
|
|
618
|
-
|
|
618
|
+
D(a(a({}, M === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
620
|
open: ue,
|
|
621
621
|
width: x
|
|
@@ -626,7 +626,7 @@ function Lo({
|
|
|
626
626
|
width: de
|
|
627
627
|
}
|
|
628
628
|
} : {}), {
|
|
629
|
-
children: /* @__PURE__ */ o($n,
|
|
629
|
+
children: /* @__PURE__ */ o($n, D(a({ "data-testid": c }, d), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
@@ -634,7 +634,7 @@ function Lo({
|
|
|
634
634
|
const vt = () => {
|
|
635
635
|
const e = se();
|
|
636
636
|
return Ht(e.breakpoints.down("sm"));
|
|
637
|
-
}, Tn = 64, On = 72, Bn = 256, j =
|
|
637
|
+
}, Tn = 64, On = 72, Bn = 256, j = R(!0), wt = R(Bn), At = R(On), ve = R(""), En = R(void 0), St = R(Tn), bt = R(void 0);
|
|
638
638
|
function Fn({ links: e }) {
|
|
639
639
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
640
640
|
}
|
|
@@ -646,7 +646,7 @@ const re = "Navbar", Y = {
|
|
|
646
646
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
647
647
|
// settings: `${PREFIX}-settings`,
|
|
648
648
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
649
|
-
}, Pn =
|
|
649
|
+
}, Pn = W(y, { name: "NavBar" })(({ theme: e }) => ({
|
|
650
650
|
[`&.${Y.root}`]: {
|
|
651
651
|
display: "flex"
|
|
652
652
|
},
|
|
@@ -694,7 +694,7 @@ const re = "Navbar", Y = {
|
|
|
694
694
|
}, Dt(e)), Ue = (e, t) => a({
|
|
695
695
|
width: t,
|
|
696
696
|
transition: X(e, "width", "leaving")
|
|
697
|
-
}, Dt(e)), Ln =
|
|
697
|
+
}, Dt(e)), Ln = W(we, {
|
|
698
698
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
699
699
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
|
|
700
700
|
flexShrink: 0,
|
|
@@ -702,10 +702,10 @@ const re = "Navbar", Y = {
|
|
|
702
702
|
boxSizing: "border-box",
|
|
703
703
|
display: "flex",
|
|
704
704
|
flexDirection: "column"
|
|
705
|
-
}, t &&
|
|
705
|
+
}, t && D(a({}, ze(e, n)), {
|
|
706
706
|
backgroundColor: "",
|
|
707
707
|
"& .MuiDrawer-paper": ze(e, n)
|
|
708
|
-
})), !t &&
|
|
708
|
+
})), !t && D(a({}, Ue(e, r ? n : i)), {
|
|
709
709
|
backgroundColor: "",
|
|
710
710
|
"& .MuiDrawer-paper": Ue(e, r ? n : i)
|
|
711
711
|
})));
|
|
@@ -720,8 +720,8 @@ function _n(e) {
|
|
|
720
720
|
const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Ve = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
721
721
|
function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
722
722
|
const r = se();
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
|
|
723
|
+
return /* @__PURE__ */ u(
|
|
724
|
+
y,
|
|
725
725
|
{
|
|
726
726
|
sx: {
|
|
727
727
|
paddingTop: 3,
|
|
@@ -732,14 +732,14 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
732
732
|
},
|
|
733
733
|
children: [
|
|
734
734
|
!i && /* @__PURE__ */ o(
|
|
735
|
-
|
|
735
|
+
y,
|
|
736
736
|
{
|
|
737
737
|
sx: {
|
|
738
738
|
width: n ? "5rem" : "2rem",
|
|
739
739
|
transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
|
|
740
740
|
aspectRatio: 1
|
|
741
741
|
},
|
|
742
|
-
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
742
|
+
children: e != null && e.name ? /* @__PURE__ */ o(P, { children: /* @__PURE__ */ o(
|
|
743
743
|
Pe,
|
|
744
744
|
{
|
|
745
745
|
src: e == null ? void 0 : e.picture,
|
|
@@ -754,14 +754,14 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
i && /* @__PURE__ */ o(
|
|
757
|
-
|
|
757
|
+
y,
|
|
758
758
|
{
|
|
759
759
|
sx: {
|
|
760
760
|
width: n ? "5rem" : "2rem",
|
|
761
761
|
transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
|
|
762
762
|
aspectRatio: 1
|
|
763
763
|
},
|
|
764
|
-
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
764
|
+
children: e != null && e.name ? /* @__PURE__ */ o(P, { children: /* @__PURE__ */ u(Me, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
|
|
765
765
|
" ",
|
|
766
766
|
Ve(e == null ? void 0 : e.name),
|
|
767
767
|
" ",
|
|
@@ -769,9 +769,9 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
769
769
|
] }) }) : /* @__PURE__ */ o(Me, {})
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
|
-
/* @__PURE__ */ o(Nn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */
|
|
773
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
774
|
-
t ? /* @__PURE__ */ o(
|
|
772
|
+
/* @__PURE__ */ o(Nn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ u(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
773
|
+
e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
|
|
774
|
+
t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
|
|
775
775
|
] }) }) })
|
|
776
776
|
]
|
|
777
777
|
}
|
|
@@ -784,38 +784,38 @@ function Rn({
|
|
|
784
784
|
"data-testid": i,
|
|
785
785
|
top: r,
|
|
786
786
|
middle: s,
|
|
787
|
-
bottom:
|
|
788
|
-
user:
|
|
789
|
-
domainCode:
|
|
790
|
-
useNewAvatar:
|
|
787
|
+
bottom: d,
|
|
788
|
+
user: c,
|
|
789
|
+
domainCode: l,
|
|
790
|
+
useNewAvatar: p = !1
|
|
791
791
|
}) {
|
|
792
|
-
const
|
|
793
|
-
return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */
|
|
792
|
+
const g = vt(), m = dt(j);
|
|
793
|
+
return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
|
|
794
794
|
Ln,
|
|
795
795
|
{
|
|
796
796
|
open: e,
|
|
797
797
|
widthOpen: n,
|
|
798
798
|
widthClosed: t,
|
|
799
799
|
anchor: "left",
|
|
800
|
-
variant:
|
|
800
|
+
variant: g ? "temporary" : "permanent",
|
|
801
801
|
PaperProps: {
|
|
802
802
|
component: "nav"
|
|
803
803
|
},
|
|
804
804
|
onClose: () => {
|
|
805
805
|
m(!1);
|
|
806
806
|
},
|
|
807
|
-
isSmallScreen:
|
|
807
|
+
isSmallScreen: g,
|
|
808
808
|
children: [
|
|
809
|
-
!
|
|
810
|
-
r && /* @__PURE__ */
|
|
809
|
+
!g && /* @__PURE__ */ o(Ut, {}),
|
|
810
|
+
r && /* @__PURE__ */ u(y, { flexGrow: "0", children: [
|
|
811
811
|
r,
|
|
812
812
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
813
813
|
] }),
|
|
814
|
-
/* @__PURE__ */ o(
|
|
815
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Fn, { links: s }) : s }),
|
|
815
|
+
/* @__PURE__ */ u(y, { flexGrow: "0", children: [
|
|
816
816
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
817
|
-
/* @__PURE__ */ o(Mn, { user:
|
|
818
|
-
|
|
817
|
+
/* @__PURE__ */ o(Mn, { user: c, domainCode: l, open: e, useNewAvatar: p }),
|
|
818
|
+
d && /* @__PURE__ */ o(P, { children: d })
|
|
819
819
|
] })
|
|
820
820
|
]
|
|
821
821
|
}
|
|
@@ -828,14 +828,14 @@ function Hn({
|
|
|
828
828
|
noPadding: i
|
|
829
829
|
}) {
|
|
830
830
|
return /* @__PURE__ */ o(
|
|
831
|
-
|
|
831
|
+
y,
|
|
832
832
|
{
|
|
833
833
|
sx: {
|
|
834
834
|
overflow: "auto",
|
|
835
835
|
height: `calc(100vh - ${t}px)`,
|
|
836
836
|
flexGrow: 1
|
|
837
837
|
},
|
|
838
|
-
children: i ? /* @__PURE__ */ o(
|
|
838
|
+
children: i ? /* @__PURE__ */ o(y, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
839
839
|
et,
|
|
840
840
|
{
|
|
841
841
|
component: "main",
|
|
@@ -857,8 +857,8 @@ function Un({
|
|
|
857
857
|
"data-testid": n,
|
|
858
858
|
middle: i
|
|
859
859
|
}) {
|
|
860
|
-
const r = dt(j), s = () => r((
|
|
861
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
860
|
+
const r = dt(j), s = () => r((l) => !l), d = se(), c = vt();
|
|
861
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
|
|
862
862
|
je,
|
|
863
863
|
{
|
|
864
864
|
square: !0,
|
|
@@ -873,7 +873,7 @@ function Un({
|
|
|
873
873
|
gap: 2,
|
|
874
874
|
flexShrink: 0,
|
|
875
875
|
height: t,
|
|
876
|
-
zIndex:
|
|
876
|
+
zIndex: c ? 0 : d.zIndex.drawer + 101
|
|
877
877
|
},
|
|
878
878
|
children: [
|
|
879
879
|
/* @__PURE__ */ o(
|
|
@@ -886,7 +886,7 @@ function Un({
|
|
|
886
886
|
children: /* @__PURE__ */ o(en, { fontSize: "medium" })
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
|
-
/* @__PURE__ */ o(
|
|
889
|
+
/* @__PURE__ */ o(T, { className: zn.titleText, variant: "h6", component: "h1", children: e }),
|
|
890
890
|
i
|
|
891
891
|
]
|
|
892
892
|
}
|
|
@@ -899,51 +899,51 @@ function _o({
|
|
|
899
899
|
pageContainerProps: i,
|
|
900
900
|
pageContentDataTestId: r,
|
|
901
901
|
topBarDataTestId: s,
|
|
902
|
-
navBarDataTestId:
|
|
903
|
-
navBarMiddle:
|
|
904
|
-
navBarBottom:
|
|
905
|
-
user:
|
|
906
|
-
domainCode:
|
|
902
|
+
navBarDataTestId: d,
|
|
903
|
+
navBarMiddle: c,
|
|
904
|
+
navBarBottom: l,
|
|
905
|
+
user: p,
|
|
906
|
+
domainCode: g,
|
|
907
907
|
useNewAvatar: m = !1
|
|
908
908
|
}) {
|
|
909
909
|
pt([
|
|
910
910
|
[j, n != null ? n : !0],
|
|
911
911
|
[ve, t != null ? t : ""]
|
|
912
912
|
]);
|
|
913
|
-
const
|
|
914
|
-
return /* @__PURE__ */
|
|
913
|
+
const w = _e(j), [h] = V(wt), [b] = V(At), S = _e(ve), [k] = V(St), [$] = V(En), [O] = V(bt);
|
|
914
|
+
return /* @__PURE__ */ u(y, { children: [
|
|
915
915
|
/* @__PURE__ */ o(Gt, {}),
|
|
916
916
|
/* @__PURE__ */ o(
|
|
917
917
|
Un,
|
|
918
918
|
{
|
|
919
|
-
titleText:
|
|
919
|
+
titleText: S,
|
|
920
920
|
"data-testid": s,
|
|
921
|
-
height:
|
|
921
|
+
height: k,
|
|
922
922
|
middle: $
|
|
923
923
|
}
|
|
924
924
|
),
|
|
925
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ u(y, { sx: { display: "flex" }, children: [
|
|
926
926
|
/* @__PURE__ */ o(
|
|
927
927
|
Rn,
|
|
928
928
|
{
|
|
929
|
-
open:
|
|
930
|
-
top:
|
|
931
|
-
middle:
|
|
932
|
-
bottom:
|
|
933
|
-
user:
|
|
934
|
-
domainCode:
|
|
929
|
+
open: w,
|
|
930
|
+
top: O,
|
|
931
|
+
middle: c,
|
|
932
|
+
bottom: l,
|
|
933
|
+
user: p,
|
|
934
|
+
domainCode: g,
|
|
935
935
|
widthOpen: h,
|
|
936
936
|
widthClosed: b,
|
|
937
|
-
offsetTop:
|
|
938
|
-
"data-testid":
|
|
937
|
+
offsetTop: k,
|
|
938
|
+
"data-testid": d,
|
|
939
939
|
useNewAvatar: m
|
|
940
940
|
}
|
|
941
941
|
),
|
|
942
942
|
/* @__PURE__ */ o(
|
|
943
943
|
Hn,
|
|
944
|
-
|
|
944
|
+
D(a({
|
|
945
945
|
"data-testid": r,
|
|
946
|
-
topBarHeight:
|
|
946
|
+
topBarHeight: k
|
|
947
947
|
}, i), {
|
|
948
948
|
children: e
|
|
949
949
|
})
|
|
@@ -958,34 +958,34 @@ const kt = ({
|
|
|
958
958
|
maxWidth: i,
|
|
959
959
|
primaryButton: r,
|
|
960
960
|
secondaryButton: s,
|
|
961
|
-
onClose:
|
|
962
|
-
sx:
|
|
963
|
-
"data-testid":
|
|
964
|
-
disableCloseOnBackdropOrEscape:
|
|
965
|
-
isLoading:
|
|
961
|
+
onClose: d,
|
|
962
|
+
sx: c,
|
|
963
|
+
"data-testid": l,
|
|
964
|
+
disableCloseOnBackdropOrEscape: p = !1,
|
|
965
|
+
isLoading: g = !1
|
|
966
966
|
}) => {
|
|
967
967
|
var h, b;
|
|
968
|
-
const [m,
|
|
969
|
-
return /* @__PURE__ */
|
|
968
|
+
const [m, w] = F(!1);
|
|
969
|
+
return /* @__PURE__ */ u(
|
|
970
970
|
tt,
|
|
971
971
|
{
|
|
972
972
|
open: e,
|
|
973
|
-
onClose: (
|
|
974
|
-
|
|
973
|
+
onClose: (S, k) => L(void 0, null, function* () {
|
|
974
|
+
p && (k === "backdropClick" || k === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
|
|
975
975
|
}),
|
|
976
976
|
fullWidth: !0,
|
|
977
977
|
maxWidth: i != null ? i : "xs",
|
|
978
|
-
"data-testid":
|
|
979
|
-
sx:
|
|
978
|
+
"data-testid": l,
|
|
979
|
+
sx: c,
|
|
980
980
|
children: [
|
|
981
|
-
|
|
981
|
+
g && /* @__PURE__ */ o(nt, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
982
982
|
/* @__PURE__ */ o(ot, { children: t }),
|
|
983
983
|
/* @__PURE__ */ o(it, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
984
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
985
985
|
/* @__PURE__ */ o(
|
|
986
986
|
J,
|
|
987
987
|
{
|
|
988
|
-
onClick: (h = s == null ? void 0 : s.onClick) != null ? h :
|
|
988
|
+
onClick: (h = s == null ? void 0 : s.onClick) != null ? h : d,
|
|
989
989
|
"data-testid": s == null ? void 0 : s.testId,
|
|
990
990
|
disabled: (s == null ? void 0 : s.disabled) || m,
|
|
991
991
|
color: s == null ? void 0 : s.buttonColor,
|
|
@@ -996,8 +996,8 @@ const kt = ({
|
|
|
996
996
|
J,
|
|
997
997
|
{
|
|
998
998
|
onClick: () => L(void 0, null, function* () {
|
|
999
|
-
var
|
|
1000
|
-
|
|
999
|
+
var S;
|
|
1000
|
+
w(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), w(!1);
|
|
1001
1001
|
}),
|
|
1002
1002
|
"data-testid": r.testId,
|
|
1003
1003
|
disabled: r.disabled || m,
|
|
@@ -1029,87 +1029,87 @@ function Mo({
|
|
|
1029
1029
|
minLength: i = 0,
|
|
1030
1030
|
label: r,
|
|
1031
1031
|
value: s,
|
|
1032
|
-
"data-testid":
|
|
1033
|
-
sx:
|
|
1034
|
-
boxSx:
|
|
1035
|
-
textFieldColor:
|
|
1036
|
-
textFieldVariant:
|
|
1032
|
+
"data-testid": d,
|
|
1033
|
+
sx: c,
|
|
1034
|
+
boxSx: l,
|
|
1035
|
+
textFieldColor: p,
|
|
1036
|
+
textFieldVariant: g = "filled",
|
|
1037
1037
|
loadingText: m = "Loading...",
|
|
1038
|
-
noOptionsText:
|
|
1038
|
+
noOptionsText: w = "No options",
|
|
1039
1039
|
popupIcon: h = /* @__PURE__ */ o(nn, {}),
|
|
1040
1040
|
error: b = !1,
|
|
1041
|
-
helperText:
|
|
1042
|
-
preLoadedOptions:
|
|
1041
|
+
helperText: S = "",
|
|
1042
|
+
preLoadedOptions: k = void 0,
|
|
1043
1043
|
disablePortal: $ = !1,
|
|
1044
|
-
disableIconFlip:
|
|
1044
|
+
disableIconFlip: O = !1
|
|
1045
1045
|
}) {
|
|
1046
|
-
const [
|
|
1047
|
-
const x = s.filter((
|
|
1048
|
-
n(x, "delete",
|
|
1049
|
-
}, { data:
|
|
1050
|
-
inputValue:
|
|
1046
|
+
const [B, _] = F(""), N = (f, C) => {
|
|
1047
|
+
const x = s.filter((A) => A.id !== C);
|
|
1048
|
+
n(x, "delete", f);
|
|
1049
|
+
}, { data: v, isLoading: I } = yt({
|
|
1050
|
+
inputValue: B,
|
|
1051
1051
|
label: r,
|
|
1052
1052
|
lookup: e,
|
|
1053
1053
|
minLength: i,
|
|
1054
|
-
preLoadedOptions:
|
|
1055
|
-
}),
|
|
1056
|
-
return /* @__PURE__ */
|
|
1054
|
+
preLoadedOptions: k
|
|
1055
|
+
}), M = B.length >= i;
|
|
1056
|
+
return /* @__PURE__ */ u("div", { "data-testid": d, children: [
|
|
1057
1057
|
/* @__PURE__ */ o(
|
|
1058
1058
|
Se,
|
|
1059
1059
|
{
|
|
1060
|
-
sx: a(a({},
|
|
1061
|
-
"data-testid":
|
|
1060
|
+
sx: a(a({}, c), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1061
|
+
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
1062
1062
|
disablePortal: $,
|
|
1063
1063
|
multiple: !0,
|
|
1064
|
-
getOptionLabel: (
|
|
1065
|
-
loading:
|
|
1066
|
-
options: [...s, ...
|
|
1064
|
+
getOptionLabel: (f) => typeof f == "string" ? f : f.label,
|
|
1065
|
+
loading: M ? I : !1,
|
|
1066
|
+
options: [...s, ...v != null ? v : []],
|
|
1067
1067
|
filterSelectedOptions: !0,
|
|
1068
1068
|
includeInputInList: !0,
|
|
1069
1069
|
value: s,
|
|
1070
|
-
onChange: (
|
|
1071
|
-
n(C, x,
|
|
1070
|
+
onChange: (f, C, x) => {
|
|
1071
|
+
n(C, x, f);
|
|
1072
1072
|
},
|
|
1073
|
-
onInputChange: (
|
|
1074
|
-
noOptionsText:
|
|
1073
|
+
onInputChange: (f, C) => _(C),
|
|
1074
|
+
noOptionsText: M ? w : "Start typing to search",
|
|
1075
1075
|
loadingText: m,
|
|
1076
1076
|
popupIcon: h,
|
|
1077
|
-
renderInput: (
|
|
1077
|
+
renderInput: (f) => /* @__PURE__ */ o(
|
|
1078
1078
|
be,
|
|
1079
|
-
|
|
1079
|
+
D(a({}, f), {
|
|
1080
1080
|
label: r,
|
|
1081
1081
|
fullWidth: !0,
|
|
1082
|
-
variant:
|
|
1082
|
+
variant: g,
|
|
1083
1083
|
error: b,
|
|
1084
|
-
helperText:
|
|
1085
|
-
InputProps:
|
|
1086
|
-
endAdornment: /* @__PURE__ */
|
|
1087
|
-
|
|
1088
|
-
|
|
1084
|
+
helperText: S,
|
|
1085
|
+
InputProps: D(a({}, f.InputProps), {
|
|
1086
|
+
endAdornment: /* @__PURE__ */ u(P, { children: [
|
|
1087
|
+
I ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
1088
|
+
f.InputProps.endAdornment
|
|
1089
1089
|
] })
|
|
1090
1090
|
}),
|
|
1091
|
-
"data-testid":
|
|
1091
|
+
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
|
|
1092
1092
|
onKeyDown: (C) => {
|
|
1093
1093
|
(C.key === "Backspace" || C.key === "Delete") && C.stopPropagation();
|
|
1094
1094
|
},
|
|
1095
|
-
color:
|
|
1095
|
+
color: p
|
|
1096
1096
|
})
|
|
1097
1097
|
),
|
|
1098
1098
|
renderTags: () => null,
|
|
1099
|
-
isOptionEqualToValue: (
|
|
1100
|
-
renderOption: (
|
|
1099
|
+
isOptionEqualToValue: (f, C) => f.id === C.id,
|
|
1100
|
+
renderOption: (f, C, x) => {
|
|
1101
1101
|
if (t) {
|
|
1102
|
-
const
|
|
1102
|
+
const A = rn(C.label, x.inputValue, {
|
|
1103
1103
|
insideWords: !0,
|
|
1104
1104
|
findAllOccurrences: !0
|
|
1105
|
-
}),
|
|
1105
|
+
}), H = an(C.label, A);
|
|
1106
1106
|
return /* @__PURE__ */ xe(
|
|
1107
1107
|
"li",
|
|
1108
|
-
|
|
1108
|
+
D(a({}, f), {
|
|
1109
1109
|
key: C.id,
|
|
1110
|
-
"data-testid":
|
|
1110
|
+
"data-testid": d ? `${d}:Autocomplete:option(${C.id.toString()})` : void 0
|
|
1111
1111
|
}),
|
|
1112
|
-
/* @__PURE__ */ o("div", { children:
|
|
1112
|
+
/* @__PURE__ */ o("div", { children: H.map((ee, le) => /* @__PURE__ */ o(
|
|
1113
1113
|
"span",
|
|
1114
1114
|
{
|
|
1115
1115
|
style: {
|
|
@@ -1123,16 +1123,16 @@ function Mo({
|
|
|
1123
1123
|
} else
|
|
1124
1124
|
return /* @__PURE__ */ xe(
|
|
1125
1125
|
"li",
|
|
1126
|
-
|
|
1126
|
+
D(a({}, f), {
|
|
1127
1127
|
key: C.id,
|
|
1128
|
-
"data-testid":
|
|
1128
|
+
"data-testid": d ? `${d}:option(${C.id.toString()})` : void 0
|
|
1129
1129
|
}),
|
|
1130
1130
|
C.label
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
),
|
|
1135
|
-
s.length > 0 && /* @__PURE__ */ o(
|
|
1135
|
+
s.length > 0 && /* @__PURE__ */ o(y, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
|
|
1136
1136
|
Vt,
|
|
1137
1137
|
{
|
|
1138
1138
|
sx: {
|
|
@@ -1143,7 +1143,7 @@ function Mo({
|
|
|
1143
1143
|
label: /* @__PURE__ */ o(
|
|
1144
1144
|
qt,
|
|
1145
1145
|
{
|
|
1146
|
-
title:
|
|
1146
|
+
title: f.tooltipContent || "",
|
|
1147
1147
|
placement: "bottom-start",
|
|
1148
1148
|
PopperProps: {
|
|
1149
1149
|
modifiers: [
|
|
@@ -1155,19 +1155,19 @@ function Mo({
|
|
|
1155
1155
|
}
|
|
1156
1156
|
]
|
|
1157
1157
|
},
|
|
1158
|
-
children: /* @__PURE__ */ o(
|
|
1158
|
+
children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: f.chipLabel ? f.chipLabel : f.label })
|
|
1159
1159
|
}
|
|
1160
1160
|
),
|
|
1161
|
-
"data-testid":
|
|
1162
|
-
onDelete: (C) =>
|
|
1161
|
+
"data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
|
|
1162
|
+
onDelete: (C) => N(C, f.id),
|
|
1163
1163
|
deleteIcon: /* @__PURE__ */ o(
|
|
1164
1164
|
tn,
|
|
1165
1165
|
{
|
|
1166
|
-
"data-testid":
|
|
1166
|
+
"data-testid": d ? `${d}:Chip(${f.id.toString()}):deleteIcon` : void 0
|
|
1167
1167
|
}
|
|
1168
1168
|
)
|
|
1169
1169
|
},
|
|
1170
|
-
|
|
1170
|
+
f.id
|
|
1171
1171
|
)) })
|
|
1172
1172
|
] });
|
|
1173
1173
|
}
|
|
@@ -1179,64 +1179,66 @@ const Ro = ({
|
|
|
1179
1179
|
value: i,
|
|
1180
1180
|
sx: r,
|
|
1181
1181
|
textFieldColor: s,
|
|
1182
|
-
textFieldVariant:
|
|
1182
|
+
textFieldVariant: d = "filled",
|
|
1183
|
+
error: c = !1,
|
|
1183
1184
|
"data-testid": l,
|
|
1184
|
-
noOptionsText:
|
|
1185
|
-
minLength:
|
|
1186
|
-
disablePortal:
|
|
1187
|
-
preLoadedOptions:
|
|
1188
|
-
helperText:
|
|
1189
|
-
disabled:
|
|
1190
|
-
popupIcon:
|
|
1191
|
-
disableIconFlip:
|
|
1185
|
+
noOptionsText: p = "No options",
|
|
1186
|
+
minLength: g = 3,
|
|
1187
|
+
disablePortal: m = !1,
|
|
1188
|
+
preLoadedOptions: w,
|
|
1189
|
+
helperText: h = "",
|
|
1190
|
+
disabled: b,
|
|
1191
|
+
popupIcon: S,
|
|
1192
|
+
disableIconFlip: k
|
|
1192
1193
|
}) => {
|
|
1193
|
-
const [
|
|
1194
|
-
inputValue:
|
|
1194
|
+
const [$, O] = F(""), { data: B, isLoading: _ } = yt({
|
|
1195
|
+
inputValue: $,
|
|
1195
1196
|
label: n,
|
|
1196
1197
|
lookup: e,
|
|
1197
|
-
minLength:
|
|
1198
|
-
preLoadedOptions:
|
|
1199
|
-
}), N =
|
|
1198
|
+
minLength: g != null ? g : 0,
|
|
1199
|
+
preLoadedOptions: w
|
|
1200
|
+
}), N = $.length >= g;
|
|
1200
1201
|
return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(Xt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1201
1202
|
Se,
|
|
1202
1203
|
{
|
|
1203
|
-
sx: a(a({}, r),
|
|
1204
|
+
sx: a(a({}, r), k ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1204
1205
|
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1205
|
-
loading: N ?
|
|
1206
|
-
options:
|
|
1207
|
-
onChange: (
|
|
1208
|
-
t(
|
|
1206
|
+
loading: N ? _ : !1,
|
|
1207
|
+
options: B != null ? B : [],
|
|
1208
|
+
onChange: (v, I, M) => {
|
|
1209
|
+
t(v, I, M);
|
|
1209
1210
|
},
|
|
1210
|
-
disablePortal:
|
|
1211
|
-
filterOptions: (
|
|
1211
|
+
disablePortal: m,
|
|
1212
|
+
filterOptions: (v) => v,
|
|
1212
1213
|
value: i,
|
|
1213
|
-
noOptionsText: N ?
|
|
1214
|
-
getOptionLabel: (
|
|
1215
|
-
popupIcon:
|
|
1216
|
-
renderInput: (
|
|
1214
|
+
noOptionsText: N ? p : "Start typing to search",
|
|
1215
|
+
getOptionLabel: (v) => v.label,
|
|
1216
|
+
popupIcon: S,
|
|
1217
|
+
renderInput: (v) => /* @__PURE__ */ o(
|
|
1217
1218
|
be,
|
|
1218
|
-
|
|
1219
|
+
D(a({
|
|
1219
1220
|
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1220
|
-
},
|
|
1221
|
-
variant:
|
|
1221
|
+
}, v), {
|
|
1222
|
+
variant: d,
|
|
1222
1223
|
label: n,
|
|
1223
1224
|
color: s,
|
|
1224
|
-
|
|
1225
|
+
error: c,
|
|
1226
|
+
helperText: h
|
|
1225
1227
|
})
|
|
1226
1228
|
),
|
|
1227
|
-
isOptionEqualToValue: (
|
|
1228
|
-
onInputChange: (
|
|
1229
|
-
|
|
1229
|
+
isOptionEqualToValue: (v, I) => v.id === I.id,
|
|
1230
|
+
onInputChange: (v, I) => {
|
|
1231
|
+
O(I);
|
|
1230
1232
|
},
|
|
1231
|
-
renderOption: (
|
|
1233
|
+
renderOption: (v, I) => /* @__PURE__ */ xe(
|
|
1232
1234
|
"li",
|
|
1233
|
-
|
|
1234
|
-
key:
|
|
1235
|
-
"data-testid": l ? `${l}:Autocomplete:option(${
|
|
1235
|
+
D(a({}, v), {
|
|
1236
|
+
key: I.id,
|
|
1237
|
+
"data-testid": l ? `${l}:Autocomplete:option(${I.id.toString()})` : void 0
|
|
1236
1238
|
}),
|
|
1237
|
-
|
|
1239
|
+
I.label
|
|
1238
1240
|
),
|
|
1239
|
-
disabled:
|
|
1241
|
+
disabled: b
|
|
1240
1242
|
}
|
|
1241
1243
|
) }) });
|
|
1242
1244
|
}, Gn = (e) => {
|
|
@@ -1257,15 +1259,15 @@ const Ro = ({
|
|
|
1257
1259
|
closeHandler: t,
|
|
1258
1260
|
setAuth0ExpiryTime: n
|
|
1259
1261
|
}) => {
|
|
1260
|
-
const { logout: i, getAccessTokenSilently: r } = ht(), [s,
|
|
1262
|
+
const { logout: i, getAccessTokenSilently: r } = ht(), [s, d] = F(0), c = () => L(void 0, null, function* () {
|
|
1261
1263
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1262
|
-
}),
|
|
1263
|
-
|
|
1264
|
+
}), l = () => L(void 0, null, function* () {
|
|
1265
|
+
d(s + 1), t();
|
|
1264
1266
|
});
|
|
1265
1267
|
return K(() => {
|
|
1266
1268
|
(() => L(void 0, null, function* () {
|
|
1267
1269
|
if (s > 0) {
|
|
1268
|
-
const
|
|
1270
|
+
const w = yield r({ cacheMode: "off" }), h = Gn(w) * 1e3;
|
|
1269
1271
|
n(h);
|
|
1270
1272
|
}
|
|
1271
1273
|
}))();
|
|
@@ -1275,14 +1277,14 @@ const Ro = ({
|
|
|
1275
1277
|
isOpen: e,
|
|
1276
1278
|
primaryButton: {
|
|
1277
1279
|
text: "Continue",
|
|
1278
|
-
onClick:
|
|
1280
|
+
onClick: l,
|
|
1279
1281
|
disabled: !1,
|
|
1280
1282
|
testId: "PreferencesDialog",
|
|
1281
1283
|
buttonColor: "secondary"
|
|
1282
1284
|
},
|
|
1283
1285
|
secondaryButton: {
|
|
1284
1286
|
text: "Log out",
|
|
1285
|
-
onClick:
|
|
1287
|
+
onClick: c,
|
|
1286
1288
|
disabled: !1,
|
|
1287
1289
|
testId: "PreferencesDialog",
|
|
1288
1290
|
buttonColor: "secondary"
|
|
@@ -1320,12 +1322,12 @@ function Wo({
|
|
|
1320
1322
|
onError: r = () => {
|
|
1321
1323
|
}
|
|
1322
1324
|
}) {
|
|
1323
|
-
var m,
|
|
1324
|
-
const { isAuthenticated: s, isLoading:
|
|
1325
|
+
var m, w;
|
|
1326
|
+
const { isAuthenticated: s, isLoading: d, error: c, loginWithRedirect: l, logout: p } = ht();
|
|
1325
1327
|
K(() => {
|
|
1326
|
-
|
|
1327
|
-
}, [
|
|
1328
|
-
const
|
|
1328
|
+
c && r(c);
|
|
1329
|
+
}, [c, r]);
|
|
1330
|
+
const g = Rt(
|
|
1329
1331
|
() => ({
|
|
1330
1332
|
appState: {
|
|
1331
1333
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1334,50 +1336,50 @@ function Wo({
|
|
|
1334
1336
|
[]
|
|
1335
1337
|
);
|
|
1336
1338
|
if (K(() => {
|
|
1337
|
-
|
|
1338
|
-
}, [
|
|
1339
|
+
d || s || c || l(g);
|
|
1340
|
+
}, [d, s, c, l, r, g]), c) {
|
|
1339
1341
|
if (i || console.error(
|
|
1340
|
-
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${
|
|
1341
|
-
|
|
1342
|
+
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${d}]`,
|
|
1343
|
+
c
|
|
1342
1344
|
), n === "all")
|
|
1343
|
-
throw
|
|
1344
|
-
if (Vn(
|
|
1345
|
+
throw c;
|
|
1346
|
+
if (Vn(c)) {
|
|
1345
1347
|
let h = "Auth error", b = "An unknown Auth0 error occurred.";
|
|
1346
|
-
if (qn(
|
|
1348
|
+
if (qn(c))
|
|
1347
1349
|
h = "Unauthorised", b = `You are not authorised to access ${t}.`;
|
|
1348
|
-
else if (Xn(
|
|
1350
|
+
else if (Xn(c))
|
|
1349
1351
|
h = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1350
|
-
else if (Qn(
|
|
1352
|
+
else if (Qn(c))
|
|
1351
1353
|
h = "Auth0 script execution time exceeded", b = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
1352
|
-
else if (
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1354
|
+
else if (c.message === "Invalid state") {
|
|
1355
|
+
const S = localStorage.getItem("auth0_redirect_count");
|
|
1356
|
+
S ? S && parseInt(S) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(S) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
|
|
1355
1357
|
} else if (n === "unknown")
|
|
1356
|
-
throw
|
|
1357
|
-
return /* @__PURE__ */
|
|
1358
|
+
throw c;
|
|
1359
|
+
return /* @__PURE__ */ u(tt, { open: !0, children: [
|
|
1358
1360
|
/* @__PURE__ */ o(ot, { children: h }),
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */ o(
|
|
1361
|
+
/* @__PURE__ */ u(it, { children: [
|
|
1362
|
+
/* @__PURE__ */ o(T, { children: b }),
|
|
1361
1363
|
/* @__PURE__ */ o("br", {}),
|
|
1362
|
-
/* @__PURE__ */ o(
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
+
/* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1365
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1364
1366
|
"error: ",
|
|
1365
|
-
(m =
|
|
1367
|
+
(m = c == null ? void 0 : c.error) != null ? m : "N/A"
|
|
1366
1368
|
] }),
|
|
1367
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1368
1370
|
"description: ",
|
|
1369
|
-
(
|
|
1371
|
+
(w = c == null ? void 0 : c.error_description) != null ? w : "N/A"
|
|
1370
1372
|
] })
|
|
1371
1373
|
] }),
|
|
1372
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
1373
1375
|
h === "Auth0 script execution time exceeded" && /* @__PURE__ */ o(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
|
|
1374
|
-
/* @__PURE__ */ o(J, { onClick: () =>
|
|
1376
|
+
/* @__PURE__ */ o(J, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1375
1377
|
] })
|
|
1376
1378
|
] });
|
|
1377
1379
|
} else if (n === "unknown")
|
|
1378
|
-
throw
|
|
1380
|
+
throw c;
|
|
1379
1381
|
}
|
|
1380
|
-
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(
|
|
1382
|
+
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(P, { children: e })) : /* @__PURE__ */ o(un, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1381
1383
|
}
|
|
1382
1384
|
const Yn = {
|
|
1383
1385
|
autoHideDuration: 6e3,
|
|
@@ -1401,74 +1403,74 @@ const Yn = {
|
|
|
1401
1403
|
borderBottomRightRadius: "0px"
|
|
1402
1404
|
}, eo = {}, to = {}, It = Je(null);
|
|
1403
1405
|
function no(s) {
|
|
1404
|
-
var
|
|
1406
|
+
var d = s, {
|
|
1405
1407
|
overrideState: e = eo,
|
|
1406
1408
|
overrideActions: t = to,
|
|
1407
1409
|
shouldClose: n = Kn.shouldClose,
|
|
1408
1410
|
children: i
|
|
1409
|
-
} =
|
|
1411
|
+
} = d, r = Ee(d, [
|
|
1410
1412
|
"overrideState",
|
|
1411
1413
|
"overrideActions",
|
|
1412
1414
|
"shouldClose",
|
|
1413
1415
|
"children"
|
|
1414
1416
|
]);
|
|
1415
1417
|
var C;
|
|
1416
|
-
const [{ open:
|
|
1417
|
-
|
|
1418
|
+
const [{ open: c }, l] = F({ open: !1 }), p = ge([]), g = ge(Date.now()), m = ge(0), w = ae((x) => {
|
|
1419
|
+
l({ open: x });
|
|
1418
1420
|
}, []), h = ae((x = {}) => {
|
|
1419
|
-
m.current += 1,
|
|
1421
|
+
m.current += 1, p.current.length >= Xe && Date.now() - g.current >= Qe && (g.current = Date.now(), console.error(
|
|
1420
1422
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${m.current} times in last ${Qe}ms)`
|
|
1421
1423
|
), m.current = 0);
|
|
1422
|
-
const
|
|
1424
|
+
const A = a(D(a({}, qe), {
|
|
1423
1425
|
key: Zn()
|
|
1424
1426
|
}), x);
|
|
1425
|
-
return
|
|
1426
|
-
}, []), b = (x = "",
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1429
|
-
return
|
|
1430
|
-
},
|
|
1431
|
-
n(x,
|
|
1427
|
+
return p.current.push(A), p.current.length === 1 && l({ open: !0 }), A.key;
|
|
1428
|
+
}, []), b = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), S = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), k = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), O = (x) => {
|
|
1429
|
+
const A = p.current.findIndex((H) => H.key === x);
|
|
1430
|
+
if (A !== -1)
|
|
1431
|
+
return A === 0 ? (l({ open: !1 }), p.current[0]) : p.current.splice(A, 1);
|
|
1432
|
+
}, B = (x, A) => {
|
|
1433
|
+
n(x, A) && l({ open: !1 });
|
|
1434
|
+
}, _ = () => {
|
|
1432
1435
|
}, N = () => {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
setOpen: v,
|
|
1436
|
+
p.current.shift(), p.current.length > 0 && l({ open: !0 });
|
|
1437
|
+
}, v = (C = p.current[0]) != null ? C : a({}, qe), I = {};
|
|
1438
|
+
"autoHideDuration" in v && (I.autoHideDuration = v.autoHideDuration);
|
|
1439
|
+
const M = a(a({}, Yn), r), f = a(a({
|
|
1440
|
+
open: c,
|
|
1441
|
+
setOpen: w,
|
|
1440
1442
|
enqueueNotification: h,
|
|
1441
1443
|
enqueueSuccessNotification: b,
|
|
1442
|
-
enqueueInfoNotification:
|
|
1443
|
-
enqueueWarningNotification:
|
|
1444
|
+
enqueueInfoNotification: S,
|
|
1445
|
+
enqueueWarningNotification: k,
|
|
1444
1446
|
enqueueErrorNotification: $,
|
|
1445
|
-
removeNotification:
|
|
1447
|
+
removeNotification: O
|
|
1446
1448
|
}, e), t);
|
|
1447
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ u(It.Provider, { value: f, children: [
|
|
1448
1450
|
i,
|
|
1449
1451
|
/* @__PURE__ */ o(
|
|
1450
1452
|
Qt,
|
|
1451
|
-
|
|
1452
|
-
open:
|
|
1453
|
-
onClose:
|
|
1453
|
+
D(a(a({}, M), I), {
|
|
1454
|
+
open: c,
|
|
1455
|
+
onClose: B,
|
|
1454
1456
|
TransitionProps: {
|
|
1455
|
-
onExited:
|
|
1456
|
-
onExit:
|
|
1457
|
+
onExited: N,
|
|
1458
|
+
onExit: _
|
|
1457
1459
|
},
|
|
1458
1460
|
sx: { zIndex: Jn },
|
|
1459
|
-
children: /* @__PURE__ */
|
|
1461
|
+
children: /* @__PURE__ */ u("div", { children: [
|
|
1460
1462
|
/* @__PURE__ */ o(
|
|
1461
1463
|
Yt,
|
|
1462
1464
|
{
|
|
1463
|
-
onClose: (x) =>
|
|
1464
|
-
severity:
|
|
1465
|
+
onClose: (x) => B(x, "closeAlert"),
|
|
1466
|
+
severity: v.severity,
|
|
1465
1467
|
variant: "filled",
|
|
1466
|
-
icon:
|
|
1467
|
-
style:
|
|
1468
|
-
children:
|
|
1468
|
+
icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
|
|
1469
|
+
style: v.progressIndicator === "linear" ? jn : void 0,
|
|
1470
|
+
children: v.message
|
|
1469
1471
|
}
|
|
1470
1472
|
),
|
|
1471
|
-
|
|
1473
|
+
v.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
|
|
1472
1474
|
] })
|
|
1473
1475
|
})
|
|
1474
1476
|
)
|
|
@@ -1481,15 +1483,15 @@ function oo() {
|
|
|
1481
1483
|
return e;
|
|
1482
1484
|
}
|
|
1483
1485
|
const zo = Q(
|
|
1484
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no,
|
|
1486
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no, D(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1485
1487
|
), io = on(), Uo = ({
|
|
1486
1488
|
children: e,
|
|
1487
1489
|
store: t
|
|
1488
1490
|
}) => /* @__PURE__ */ o(ut, { store: t != null ? t : io, children: e }), $t = "domainCode";
|
|
1489
1491
|
var Ke;
|
|
1490
|
-
const Ye =
|
|
1492
|
+
const Ye = R(
|
|
1491
1493
|
JSON.parse((Ke = localStorage.getItem($t)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
1492
|
-
), Tt =
|
|
1494
|
+
), Tt = R(
|
|
1493
1495
|
(e) => e(Ye),
|
|
1494
1496
|
(e, t, n) => {
|
|
1495
1497
|
t(Ye, n), localStorage.setItem($t, JSON.stringify({ domainCode: n }));
|
|
@@ -1517,13 +1519,13 @@ const Ye = M(
|
|
|
1517
1519
|
applicationName: r,
|
|
1518
1520
|
handleLogout: s
|
|
1519
1521
|
}) => {
|
|
1520
|
-
const [
|
|
1521
|
-
|
|
1522
|
-
}),
|
|
1523
|
-
|
|
1522
|
+
const [d, c] = V(Tt), [l, p] = F(d), { enqueueSuccessNotification: g } = oo(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, b = () => L(void 0, null, function* () {
|
|
1523
|
+
l ? (c(l), g(`Set organisation to ${l}`), n()) : c("");
|
|
1524
|
+
}), S = () => L(void 0, null, function* () {
|
|
1525
|
+
d && !m && !w ? (p(d), n()) : h && s();
|
|
1524
1526
|
});
|
|
1525
|
-
let
|
|
1526
|
-
return m ?
|
|
1527
|
+
let k;
|
|
1528
|
+
return m ? k = "Unable to retrieve your active organisations. Try logging in again." : w && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
|
|
1527
1529
|
kt,
|
|
1528
1530
|
{
|
|
1529
1531
|
isOpen: t,
|
|
@@ -1531,17 +1533,17 @@ const Ye = M(
|
|
|
1531
1533
|
primaryButton: {
|
|
1532
1534
|
text: "Confirm",
|
|
1533
1535
|
onClick: b,
|
|
1534
|
-
disabled: !
|
|
1536
|
+
disabled: !l || m || w,
|
|
1535
1537
|
buttonColor: "primary"
|
|
1536
1538
|
},
|
|
1537
1539
|
secondaryButton: {
|
|
1538
1540
|
text: h ? "Logout" : "Cancel",
|
|
1539
|
-
onClick:
|
|
1541
|
+
onClick: S
|
|
1540
1542
|
},
|
|
1541
1543
|
onClose: h ? () => {
|
|
1542
1544
|
} : n,
|
|
1543
1545
|
children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ u(T, { marginBottom: 2, children: [
|
|
1545
1547
|
"Select the default organisation that you want to use with the ",
|
|
1546
1548
|
r,
|
|
1547
1549
|
"."
|
|
@@ -1552,17 +1554,17 @@ const Ye = M(
|
|
|
1552
1554
|
loading: e,
|
|
1553
1555
|
multiple: !1,
|
|
1554
1556
|
disableClearable: !1,
|
|
1555
|
-
value:
|
|
1556
|
-
onChange: ($,
|
|
1557
|
+
value: l !== "" ? l : null,
|
|
1558
|
+
onChange: ($, O) => p(O != null ? O : ""),
|
|
1557
1559
|
getOptionLabel: ao,
|
|
1558
1560
|
options: [...i],
|
|
1559
1561
|
renderInput: ($) => /* @__PURE__ */ o(
|
|
1560
1562
|
be,
|
|
1561
|
-
|
|
1563
|
+
D(a({}, $), {
|
|
1562
1564
|
variant: "filled",
|
|
1563
1565
|
label: "Select organisation",
|
|
1564
|
-
InputProps:
|
|
1565
|
-
endAdornment: /* @__PURE__ */
|
|
1566
|
+
InputProps: D(a({}, $.InputProps), {
|
|
1567
|
+
endAdornment: /* @__PURE__ */ u(P, { children: [
|
|
1566
1568
|
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1567
1569
|
$.InputProps.endAdornment
|
|
1568
1570
|
] })
|
|
@@ -1571,7 +1573,7 @@ const Ye = M(
|
|
|
1571
1573
|
)
|
|
1572
1574
|
}
|
|
1573
1575
|
),
|
|
1574
|
-
|
|
1576
|
+
k && /* @__PURE__ */ o(Kt, { error: !0, children: k })
|
|
1575
1577
|
]
|
|
1576
1578
|
}
|
|
1577
1579
|
);
|
|
@@ -1731,7 +1733,7 @@ const Ye = M(
|
|
|
1731
1733
|
}, Xo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), lo = ({
|
|
1732
1734
|
initialValues: e,
|
|
1733
1735
|
children: t
|
|
1734
|
-
}) => (pt(e), /* @__PURE__ */ o(
|
|
1736
|
+
}) => (pt(e), /* @__PURE__ */ o(P, { children: t })), Qo = Q(
|
|
1735
1737
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1736
1738
|
lo,
|
|
1737
1739
|
{
|