@australiangreens/ag-internal-components 0.0.99 → 0.1.1
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +11 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts.map +1 -1
- package/dist/components/AuthGuard/auth0ErrorParsing.d.ts +7 -6
- package/dist/components/AuthGuard/auth0ErrorParsing.d.ts.map +1 -1
- package/dist/esm/index.js +418 -381
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
var Lt = Object.defineProperty, _t = Object.defineProperties;
|
|
2
2
|
var Mt = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var ne = Object.getOwnPropertySymbols;
|
|
4
|
+
var Be = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var he = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
Be.call(t, n) && he(e, n, t[n]);
|
|
8
|
+
if (ne)
|
|
9
|
+
for (var n of ne(t))
|
|
10
|
+
Oe.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)
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var i of
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
16
|
+
Be.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
|
+
if (e != null && ne)
|
|
18
|
+
for (var i of ne(e))
|
|
19
|
+
t.indexOf(i) < 0 && Oe.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
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 = (d) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
l(n.next(d));
|
|
27
27
|
} catch (p) {
|
|
28
28
|
r(p);
|
|
29
29
|
}
|
|
30
|
-
}, c = (
|
|
30
|
+
}, c = (d) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
l(n.throw(d));
|
|
33
33
|
} catch (p) {
|
|
34
34
|
r(p);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, l = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(s, c);
|
|
37
|
+
l((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as u, Fragment as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as u, Fragment as F, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as E, createContext as Je, useCallback as re, useContext as Ze, useEffect as K, createElement as xe, useRef as ge } from "react";
|
|
41
|
+
import { Typography as B, Button as ae, Paper as je, Box as y, Drawer as we, styled as Ae, IconButton as J, Container as et, useTheme as se, useMediaQuery as Rt, Collapse as Ht, Avatar as Pe, Fade as Wt, Skeleton as Ne, Toolbar as zt, Divider as Le, CssBaseline as Ut, 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 Gt, Tooltip as Vt, Stack as qt, Snackbar as Xt, Alert as Qt, FormHelperText as Yt } from "@mui/material";
|
|
42
42
|
import Kt from "@mui/material/CssBaseline";
|
|
43
43
|
import { styled as R, createTheme as at, alpha as fe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Jt } from "@australiangreens/ag-error";
|
|
@@ -55,11 +55,11 @@ import { useQuery as an, QueryClient as sn, QueryClientProvider as ln } from "@t
|
|
|
55
55
|
import { useAuth0 as ht } from "@auth0/auth0-react";
|
|
56
56
|
import { Buffer as cn } from "buffer";
|
|
57
57
|
import dn from "@mui/material/Skeleton";
|
|
58
|
-
function
|
|
59
|
-
const [t, n] =
|
|
60
|
-
return /* @__PURE__ */ u(
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
/* @__PURE__ */ o(
|
|
58
|
+
function To({ text: e }) {
|
|
59
|
+
const [t, n] = E(0);
|
|
60
|
+
return /* @__PURE__ */ u(F, { children: [
|
|
61
|
+
/* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
62
|
+
/* @__PURE__ */ o(B, { 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
|
ae,
|
|
65
65
|
{
|
|
@@ -133,34 +133,34 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
133
133
|
}), !t && {
|
|
134
134
|
"& .MuiDrawer-paper": hn()
|
|
135
135
|
}));
|
|
136
|
-
class
|
|
136
|
+
class ke extends Jt {
|
|
137
137
|
}
|
|
138
|
-
Fe(
|
|
138
|
+
Fe(ke, "errorName", "ContextError");
|
|
139
139
|
const Ct = Je(null), fn = {}, mn = {}, Cn = ({
|
|
140
140
|
overrideState: e = fn,
|
|
141
141
|
overrideActions: t = mn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
|
-
const [{ open: i }, r] =
|
|
145
|
-
r({ open:
|
|
146
|
-
}, []), c =
|
|
147
|
-
r((
|
|
148
|
-
}, []),
|
|
144
|
+
const [{ open: i }, r] = E({ open: !0 }), s = re((d) => {
|
|
145
|
+
r({ open: d });
|
|
146
|
+
}, []), c = re(() => {
|
|
147
|
+
r((d) => D(a({}, d), { open: !d.open }));
|
|
148
|
+
}, []), l = a(a({
|
|
149
149
|
open: i,
|
|
150
150
|
setOpen: s,
|
|
151
151
|
toggleOpen: c
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(Ct.Provider, { value:
|
|
153
|
+
return /* @__PURE__ */ o(Ct.Provider, { value: l, children: n });
|
|
154
154
|
}, xn = () => {
|
|
155
155
|
const e = Ze(Ct);
|
|
156
156
|
if (e === null)
|
|
157
|
-
throw new
|
|
157
|
+
throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
158
158
|
return e;
|
|
159
159
|
}, vn = (e = {}) => a({
|
|
160
160
|
open: !0
|
|
161
|
-
}, e),
|
|
161
|
+
}, e), Bo = Q(
|
|
162
162
|
(e = vn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Cn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
-
),
|
|
163
|
+
), Oo = Q(() => ({ children: e }) => /* @__PURE__ */ o(Zt, { children: e })), Re = 7, Eo = R(st)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -256,32 +256,32 @@ function Po({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const wn = 24, An = 64, G = "TopBar",
|
|
259
|
+
const wn = 24, An = 64, G = "TopBar", O = {
|
|
260
260
|
topStripe: `${G}-topStripe`,
|
|
261
261
|
titleBar: `${G}-titleBar`,
|
|
262
262
|
titleSlider: `${G}-titleSlider`,
|
|
263
263
|
titleText: `${G}-titleText`,
|
|
264
264
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
265
265
|
rightPanelButton: `${G}-leftPanelButton`
|
|
266
|
-
},
|
|
266
|
+
}, Sn = Ae("div", {
|
|
267
267
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
268
268
|
name: G
|
|
269
269
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
270
270
|
var i, r;
|
|
271
271
|
return {
|
|
272
272
|
width: "100%",
|
|
273
|
-
[`& .${
|
|
273
|
+
[`& .${O.topStripe}`]: {
|
|
274
274
|
width: "100%",
|
|
275
275
|
height: `${wn}px`,
|
|
276
276
|
backgroundColor: e.palette.primary.main
|
|
277
277
|
},
|
|
278
|
-
[`& .${
|
|
278
|
+
[`& .${O.titleBar}`]: {
|
|
279
279
|
backgroundColor: e.palette.primary.light,
|
|
280
280
|
height: `${An}px`,
|
|
281
281
|
padding: e.spacing(0, 3),
|
|
282
282
|
width: "100%"
|
|
283
283
|
},
|
|
284
|
-
[`& .${
|
|
284
|
+
[`& .${O.titleSlider}`]: a(a({
|
|
285
285
|
height: "100%",
|
|
286
286
|
display: "flex",
|
|
287
287
|
alignItems: "center",
|
|
@@ -290,14 +290,14 @@ const wn = 24, An = 64, G = "TopBar", T = {
|
|
|
290
290
|
easing: e.transitions.easing.sharp,
|
|
291
291
|
duration: e.transitions.duration.leavingScreen
|
|
292
292
|
}),
|
|
293
|
-
[`& .${
|
|
293
|
+
[`& .${O.leftPanelButton}`]: {
|
|
294
294
|
marginRight: e.spacing(2),
|
|
295
295
|
flexGrow: 0
|
|
296
296
|
},
|
|
297
|
-
[`& .${
|
|
297
|
+
[`& .${O.titleText}`]: {
|
|
298
298
|
flexGrow: 1
|
|
299
299
|
},
|
|
300
|
-
[`& .${
|
|
300
|
+
[`& .${O.rightPanelButton}`]: {
|
|
301
301
|
flexGrow: 0
|
|
302
302
|
}
|
|
303
303
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -315,19 +315,19 @@ const wn = 24, An = 64, G = "TopBar", T = {
|
|
|
315
315
|
})
|
|
316
316
|
};
|
|
317
317
|
});
|
|
318
|
-
function
|
|
318
|
+
function bn({
|
|
319
319
|
titleText: e = "",
|
|
320
320
|
leftPanel: t,
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */ u(
|
|
325
|
-
/* @__PURE__ */ o("div", { className:
|
|
326
|
-
/* @__PURE__ */ o("div", { className:
|
|
324
|
+
return /* @__PURE__ */ u(Sn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
|
+
/* @__PURE__ */ o("div", { className: O.topStripe }),
|
|
326
|
+
/* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ u(y, { className: O.titleSlider, children: [
|
|
327
327
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
328
|
-
|
|
328
|
+
J,
|
|
329
329
|
{
|
|
330
|
-
className:
|
|
330
|
+
className: O.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 Sn({
|
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ o(
|
|
342
|
+
/* @__PURE__ */ o(B, { className: O.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
343
343
|
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
|
|
344
|
-
|
|
344
|
+
J,
|
|
345
345
|
{
|
|
346
|
-
className:
|
|
346
|
+
className: O.rightPanelButton,
|
|
347
347
|
color: "inherit",
|
|
348
348
|
"aria-label": "Open right side panel",
|
|
349
349
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -358,7 +358,7 @@ function Sn({
|
|
|
358
358
|
] }) })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
const xt = 400,
|
|
361
|
+
const xt = 400, Dn = Ae(we, {
|
|
362
362
|
shouldForwardProp: (e) => (
|
|
363
363
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
364
364
|
![
|
|
@@ -388,9 +388,9 @@ const xt = 400, kn = Ae(we, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
),
|
|
391
|
+
), kn = 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)
|
|
@@ -417,44 +417,44 @@ function We({
|
|
|
417
417
|
titleText: r = "",
|
|
418
418
|
width: s = xt,
|
|
419
419
|
showCloseArrow: c = !0,
|
|
420
|
-
debugOpacity:
|
|
421
|
-
headerBoxProps:
|
|
420
|
+
debugOpacity: l = !1,
|
|
421
|
+
headerBoxProps: d = {},
|
|
422
422
|
onOpened: p,
|
|
423
|
-
onClosed:
|
|
424
|
-
"data-testid":
|
|
425
|
-
navBarOpen:
|
|
426
|
-
navBarWidthOpen:
|
|
423
|
+
onClosed: C,
|
|
424
|
+
"data-testid": f,
|
|
425
|
+
navBarOpen: m = !1,
|
|
426
|
+
navBarWidthOpen: h = 0,
|
|
427
427
|
navBarWidthClosed: $ = 0
|
|
428
428
|
}) {
|
|
429
429
|
return /* @__PURE__ */ u(
|
|
430
|
-
|
|
430
|
+
Dn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
433
|
onEntered: () => p == null ? void 0 : p(),
|
|
434
|
-
onExited: () =>
|
|
434
|
+
onExited: () => C == null ? void 0 : C()
|
|
435
435
|
},
|
|
436
436
|
variant: "persistent",
|
|
437
437
|
anchor: t,
|
|
438
438
|
open: n,
|
|
439
439
|
width: s,
|
|
440
|
-
debugOpacity:
|
|
441
|
-
"data-testid":
|
|
442
|
-
navBarOpen:
|
|
443
|
-
navBarWidthOpen:
|
|
440
|
+
debugOpacity: l,
|
|
441
|
+
"data-testid": f,
|
|
442
|
+
navBarOpen: m,
|
|
443
|
+
navBarWidthOpen: h,
|
|
444
444
|
navBarWidthClosed: $,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
/* @__PURE__ */ o(
|
|
448
|
-
c && /* @__PURE__ */ u(
|
|
446
|
+
/* @__PURE__ */ o(kn, D(a({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ u(F, { children: [
|
|
447
|
+
/* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
|
+
c && /* @__PURE__ */ u(J, { 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__ */ u(
|
|
453
|
-
c && /* @__PURE__ */ u(
|
|
452
|
+
] }) : /* @__PURE__ */ u(F, { children: [
|
|
453
|
+
c && /* @__PURE__ */ u(J, { 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(B, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
458
458
|
] }) })),
|
|
459
459
|
e
|
|
460
460
|
]
|
|
@@ -491,7 +491,7 @@ const yn = R(y, {
|
|
|
491
491
|
paddingTop: e.spacing(3),
|
|
492
492
|
paddingBottom: e.spacing(3)
|
|
493
493
|
// TODO: Remove max width
|
|
494
|
-
})), me = !1, Ce = !1,
|
|
494
|
+
})), me = !1, Ce = !1, oe = {
|
|
495
495
|
titleText: "",
|
|
496
496
|
flavour: "push",
|
|
497
497
|
width: xt,
|
|
@@ -499,7 +499,7 @@ const yn = R(y, {
|
|
|
499
499
|
startOpen: !1,
|
|
500
500
|
open: void 0,
|
|
501
501
|
onChangeOpen: void 0,
|
|
502
|
-
content: /* @__PURE__ */ o(
|
|
502
|
+
content: /* @__PURE__ */ o(F, {}),
|
|
503
503
|
onOpened: void 0,
|
|
504
504
|
onClosed: void 0,
|
|
505
505
|
dataTestId: void 0
|
|
@@ -512,113 +512,113 @@ function No({
|
|
|
512
512
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
513
513
|
debugOpacity: s = !1,
|
|
514
514
|
pageContainerProps: c,
|
|
515
|
-
pageContentDataTestId:
|
|
516
|
-
topBarDataTestId:
|
|
515
|
+
pageContentDataTestId: l,
|
|
516
|
+
topBarDataTestId: d,
|
|
517
517
|
navBarOpen: p,
|
|
518
|
-
navBarWidthOpen:
|
|
519
|
-
navBarWidthClosed:
|
|
518
|
+
navBarWidthOpen: C,
|
|
519
|
+
navBarWidthClosed: f
|
|
520
520
|
}) {
|
|
521
|
-
const [
|
|
522
|
-
titleText:
|
|
521
|
+
const [m, h] = E(me), [$, k] = E(Ce), [S, I] = E(me), [T, P] = E(Ce), N = n !== void 0, b = i !== void 0, {
|
|
522
|
+
titleText: A,
|
|
523
523
|
content: H,
|
|
524
524
|
flavour: W,
|
|
525
|
-
open:
|
|
526
|
-
onChangeOpen:
|
|
527
|
-
width:
|
|
528
|
-
arrowButtons:
|
|
525
|
+
open: g,
|
|
526
|
+
onChangeOpen: x,
|
|
527
|
+
width: v,
|
|
528
|
+
arrowButtons: w,
|
|
529
529
|
startOpen: M,
|
|
530
|
-
onOpened:
|
|
530
|
+
onOpened: j,
|
|
531
531
|
onClosed: le,
|
|
532
|
-
dataTestId:
|
|
533
|
-
} = n ? a(a({},
|
|
534
|
-
titleText:
|
|
532
|
+
dataTestId: Bt
|
|
533
|
+
} = n ? a(a({}, oe), n) : a({}, oe), {
|
|
534
|
+
titleText: Ot,
|
|
535
535
|
content: Et,
|
|
536
536
|
flavour: ye,
|
|
537
537
|
open: ce,
|
|
538
538
|
onChangeOpen: $e,
|
|
539
539
|
width: de,
|
|
540
|
-
arrowButtons:
|
|
541
|
-
startOpen:
|
|
540
|
+
arrowButtons: ee,
|
|
541
|
+
startOpen: te,
|
|
542
542
|
onOpened: Ft,
|
|
543
543
|
onClosed: Pt,
|
|
544
544
|
dataTestId: Nt
|
|
545
|
-
} = i ? a(a({},
|
|
546
|
-
|
|
547
|
-
M !== me && (
|
|
548
|
-
}, [M]),
|
|
549
|
-
|
|
550
|
-
}, [
|
|
551
|
-
const pe =
|
|
552
|
-
|
|
553
|
-
},
|
|
554
|
-
ce === void 0 && (
|
|
545
|
+
} = i ? a(a({}, oe), i) : a({}, oe);
|
|
546
|
+
K(() => {
|
|
547
|
+
M !== me && (h(M), I(M));
|
|
548
|
+
}, [M]), K(() => {
|
|
549
|
+
te !== Ce && (k(te), P(te));
|
|
550
|
+
}, [te]);
|
|
551
|
+
const pe = g === void 0 ? m : g, ue = ce === void 0 ? $ : ce, Ie = (z) => {
|
|
552
|
+
g === void 0 && (h(z), r && b && (z ? (k(!1), P($)) : k(T))), x && x(z);
|
|
553
|
+
}, Te = (z) => {
|
|
554
|
+
ce === void 0 && (k(z), r && N && (z ? (h(!1), I(m)) : h(S))), $e && $e(z);
|
|
555
555
|
};
|
|
556
556
|
return /* @__PURE__ */ u(y, { children: [
|
|
557
557
|
N && /* @__PURE__ */ o(
|
|
558
558
|
We,
|
|
559
559
|
{
|
|
560
|
-
"data-testid":
|
|
560
|
+
"data-testid": Bt,
|
|
561
561
|
anchor: "left",
|
|
562
562
|
open: pe,
|
|
563
563
|
onClose: () => Ie(!1),
|
|
564
|
-
width:
|
|
565
|
-
titleText:
|
|
564
|
+
width: v,
|
|
565
|
+
titleText: A,
|
|
566
566
|
debugOpacity: s,
|
|
567
|
-
showCloseArrow:
|
|
568
|
-
onOpened:
|
|
567
|
+
showCloseArrow: w === "both" || w === "close",
|
|
568
|
+
onOpened: j,
|
|
569
569
|
onClosed: le,
|
|
570
570
|
navBarOpen: p,
|
|
571
|
-
navBarWidthOpen:
|
|
572
|
-
navBarWidthClosed:
|
|
571
|
+
navBarWidthOpen: C,
|
|
572
|
+
navBarWidthClosed: f,
|
|
573
573
|
children: H
|
|
574
574
|
}
|
|
575
575
|
),
|
|
576
|
-
|
|
576
|
+
b && /* @__PURE__ */ o(
|
|
577
577
|
We,
|
|
578
578
|
{
|
|
579
579
|
"data-testid": Nt,
|
|
580
580
|
anchor: "right",
|
|
581
581
|
open: ue,
|
|
582
|
-
onClose: () =>
|
|
582
|
+
onClose: () => Te(!1),
|
|
583
583
|
width: de,
|
|
584
|
-
titleText:
|
|
584
|
+
titleText: Ot,
|
|
585
585
|
debugOpacity: s,
|
|
586
|
-
showCloseArrow:
|
|
586
|
+
showCloseArrow: ee === "both" || ee === "close",
|
|
587
587
|
onOpened: Ft,
|
|
588
588
|
onClosed: Pt,
|
|
589
589
|
navBarOpen: p,
|
|
590
|
-
navBarWidthOpen:
|
|
591
|
-
navBarWidthClosed:
|
|
590
|
+
navBarWidthOpen: C,
|
|
591
|
+
navBarWidthClosed: f,
|
|
592
592
|
children: Et
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ o(
|
|
596
|
-
|
|
596
|
+
bn,
|
|
597
597
|
a(a({
|
|
598
598
|
titleText: t,
|
|
599
|
-
"data-testid":
|
|
599
|
+
"data-testid": d
|
|
600
600
|
}, N && W === "push" ? {
|
|
601
601
|
leftPanel: {
|
|
602
602
|
open: pe,
|
|
603
|
-
width:
|
|
603
|
+
width: v,
|
|
604
604
|
onOpen: () => Ie(!0),
|
|
605
|
-
showOpenArrow:
|
|
605
|
+
showOpenArrow: w === "both" || w === "open"
|
|
606
606
|
}
|
|
607
|
-
} : {}),
|
|
607
|
+
} : {}), b && ye === "push" ? {
|
|
608
608
|
rightPanel: {
|
|
609
609
|
open: ue,
|
|
610
610
|
width: de,
|
|
611
|
-
onOpen: () =>
|
|
612
|
-
showOpenArrow:
|
|
611
|
+
onOpen: () => Te(!0),
|
|
612
|
+
showOpenArrow: ee === "both" || ee === "open"
|
|
613
613
|
}
|
|
614
614
|
} : {})
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ o(
|
|
617
617
|
yn,
|
|
618
|
-
|
|
618
|
+
D(a(a({}, W === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
620
|
open: pe,
|
|
621
|
-
width:
|
|
621
|
+
width: v
|
|
622
622
|
}
|
|
623
623
|
} : {}), ye === "push" ? {
|
|
624
624
|
rightPanel: {
|
|
@@ -626,7 +626,7 @@ function No({
|
|
|
626
626
|
width: de
|
|
627
627
|
}
|
|
628
628
|
} : {}), {
|
|
629
|
-
children: /* @__PURE__ */ o($n,
|
|
629
|
+
children: /* @__PURE__ */ o($n, D(a({ "data-testid": l }, c), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
@@ -634,15 +634,15 @@ function No({
|
|
|
634
634
|
const vt = () => {
|
|
635
635
|
const e = se();
|
|
636
636
|
return Rt(e.breakpoints.down("sm"));
|
|
637
|
-
}, In = 64,
|
|
637
|
+
}, In = 64, Tn = 72, Bn = 256, Z = _(!0), wt = _(Bn), At = _(Tn), ve = _(""), On = _(void 0), St = _(In), bt = _(void 0);
|
|
638
638
|
function En({ links: e }) {
|
|
639
639
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
640
640
|
}
|
|
641
|
-
const
|
|
642
|
-
root: `${
|
|
643
|
-
menuButton: `${
|
|
644
|
-
hide: `${
|
|
645
|
-
content: `${
|
|
641
|
+
const ie = "Navbar", Y = {
|
|
642
|
+
root: `${ie}-root`,
|
|
643
|
+
menuButton: `${ie}-menuButton`,
|
|
644
|
+
hide: `${ie}-hide`,
|
|
645
|
+
content: `${ie}-content`
|
|
646
646
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
647
647
|
// settings: `${PREFIX}-settings`,
|
|
648
648
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
@@ -680,7 +680,7 @@ const oe = "Navbar", Y = {
|
|
|
680
680
|
}
|
|
681
681
|
}, e)
|
|
682
682
|
);
|
|
683
|
-
},
|
|
683
|
+
}, Dt = (e) => {
|
|
684
684
|
var t, n;
|
|
685
685
|
return {
|
|
686
686
|
overflowX: "hidden",
|
|
@@ -691,10 +691,10 @@ const oe = "Navbar", Y = {
|
|
|
691
691
|
}, ze = (e, t) => a({
|
|
692
692
|
width: t,
|
|
693
693
|
transition: X(e, "width", "entering")
|
|
694
|
-
},
|
|
694
|
+
}, Dt(e)), Ue = (e, t) => a({
|
|
695
695
|
width: t,
|
|
696
696
|
transition: X(e, "width", "leaving")
|
|
697
|
-
},
|
|
697
|
+
}, Dt(e)), Nn = R(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 oe = "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
|
})));
|
|
@@ -739,7 +739,7 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
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(F, { children: /* @__PURE__ */ o(
|
|
743
743
|
Pe,
|
|
744
744
|
{
|
|
745
745
|
src: e == null ? void 0 : e.picture,
|
|
@@ -761,7 +761,7 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
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(F, { 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
|
" ",
|
|
@@ -770,8 +770,8 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
772
|
/* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ u(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
773
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
774
|
-
t ? /* @__PURE__ */ o(
|
|
773
|
+
e != null && e.name ? /* @__PURE__ */ o(B, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
|
|
774
|
+
t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
|
|
775
775
|
] }) }) })
|
|
776
776
|
]
|
|
777
777
|
}
|
|
@@ -785,11 +785,11 @@ function Mn({
|
|
|
785
785
|
top: r,
|
|
786
786
|
middle: s,
|
|
787
787
|
bottom: c,
|
|
788
|
-
user:
|
|
789
|
-
domainCode:
|
|
788
|
+
user: l,
|
|
789
|
+
domainCode: d,
|
|
790
790
|
useNewAvatar: p = !1
|
|
791
791
|
}) {
|
|
792
|
-
const
|
|
792
|
+
const C = vt(), f = dt(Z);
|
|
793
793
|
return /* @__PURE__ */ o(Fn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
|
|
794
794
|
Nn,
|
|
795
795
|
{
|
|
@@ -797,16 +797,16 @@ function Mn({
|
|
|
797
797
|
widthOpen: n,
|
|
798
798
|
widthClosed: t,
|
|
799
799
|
anchor: "left",
|
|
800
|
-
variant:
|
|
800
|
+
variant: C ? "temporary" : "permanent",
|
|
801
801
|
PaperProps: {
|
|
802
802
|
component: "nav"
|
|
803
803
|
},
|
|
804
804
|
onClose: () => {
|
|
805
|
-
|
|
805
|
+
f(!1);
|
|
806
806
|
},
|
|
807
|
-
isSmallScreen:
|
|
807
|
+
isSmallScreen: C,
|
|
808
808
|
children: [
|
|
809
|
-
!
|
|
809
|
+
!C && /* @__PURE__ */ o(zt, {}),
|
|
810
810
|
r && /* @__PURE__ */ u(y, { flexGrow: "0", children: [
|
|
811
811
|
r,
|
|
812
812
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
@@ -814,8 +814,8 @@ function Mn({
|
|
|
814
814
|
/* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(En, { links: s }) : s }),
|
|
815
815
|
/* @__PURE__ */ u(y, { flexGrow: "0", children: [
|
|
816
816
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
817
|
-
/* @__PURE__ */ o(_n, { user:
|
|
818
|
-
c && /* @__PURE__ */ o(
|
|
817
|
+
/* @__PURE__ */ o(_n, { user: l, domainCode: d, open: e, useNewAvatar: p }),
|
|
818
|
+
c && /* @__PURE__ */ o(F, { children: c })
|
|
819
819
|
] })
|
|
820
820
|
]
|
|
821
821
|
}
|
|
@@ -857,7 +857,7 @@ function zn({
|
|
|
857
857
|
"data-testid": n,
|
|
858
858
|
middle: i
|
|
859
859
|
}) {
|
|
860
|
-
const r = dt(
|
|
860
|
+
const r = dt(Z), s = () => r((d) => !d), c = se(), l = vt();
|
|
861
861
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
|
|
862
862
|
je,
|
|
863
863
|
{
|
|
@@ -873,11 +873,11 @@ function zn({
|
|
|
873
873
|
gap: 2,
|
|
874
874
|
flexShrink: 0,
|
|
875
875
|
height: t,
|
|
876
|
-
zIndex:
|
|
876
|
+
zIndex: l ? 0 : c.zIndex.drawer + 1
|
|
877
877
|
},
|
|
878
878
|
children: [
|
|
879
879
|
/* @__PURE__ */ o(
|
|
880
|
-
|
|
880
|
+
J,
|
|
881
881
|
{
|
|
882
882
|
size: "medium",
|
|
883
883
|
color: "inherit",
|
|
@@ -886,7 +886,7 @@ function zn({
|
|
|
886
886
|
children: /* @__PURE__ */ o(jt, { fontSize: "medium" })
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
|
-
/* @__PURE__ */ o(
|
|
889
|
+
/* @__PURE__ */ o(B, { className: Wn.titleText, variant: "h6", component: "h1", children: e }),
|
|
890
890
|
i
|
|
891
891
|
]
|
|
892
892
|
}
|
|
@@ -900,25 +900,25 @@ function Lo({
|
|
|
900
900
|
pageContentDataTestId: r,
|
|
901
901
|
topBarDataTestId: s,
|
|
902
902
|
navBarDataTestId: c,
|
|
903
|
-
navBarMiddle:
|
|
904
|
-
navBarBottom:
|
|
903
|
+
navBarMiddle: l,
|
|
904
|
+
navBarBottom: d,
|
|
905
905
|
user: p,
|
|
906
|
-
domainCode:
|
|
907
|
-
useNewAvatar:
|
|
906
|
+
domainCode: C,
|
|
907
|
+
useNewAvatar: f = !1
|
|
908
908
|
}) {
|
|
909
909
|
ut([
|
|
910
|
-
[
|
|
910
|
+
[Z, n != null ? n : !0],
|
|
911
911
|
[ve, t != null ? t : ""]
|
|
912
912
|
]);
|
|
913
|
-
const
|
|
913
|
+
const m = _e(Z), [h] = V(wt), [$] = V(At), k = _e(ve), [S] = V(St), [I] = V(On), [T] = V(bt);
|
|
914
914
|
return /* @__PURE__ */ u(y, { children: [
|
|
915
915
|
/* @__PURE__ */ o(Ut, {}),
|
|
916
916
|
/* @__PURE__ */ o(
|
|
917
917
|
zn,
|
|
918
918
|
{
|
|
919
|
-
titleText:
|
|
919
|
+
titleText: k,
|
|
920
920
|
"data-testid": s,
|
|
921
|
-
height:
|
|
921
|
+
height: S,
|
|
922
922
|
middle: I
|
|
923
923
|
}
|
|
924
924
|
),
|
|
@@ -926,24 +926,24 @@ function Lo({
|
|
|
926
926
|
/* @__PURE__ */ o(
|
|
927
927
|
Mn,
|
|
928
928
|
{
|
|
929
|
-
open:
|
|
930
|
-
top:
|
|
931
|
-
middle:
|
|
932
|
-
bottom:
|
|
929
|
+
open: m,
|
|
930
|
+
top: T,
|
|
931
|
+
middle: l,
|
|
932
|
+
bottom: d,
|
|
933
933
|
user: p,
|
|
934
|
-
domainCode:
|
|
935
|
-
widthOpen:
|
|
934
|
+
domainCode: C,
|
|
935
|
+
widthOpen: h,
|
|
936
936
|
widthClosed: $,
|
|
937
|
-
offsetTop:
|
|
937
|
+
offsetTop: S,
|
|
938
938
|
"data-testid": c,
|
|
939
|
-
useNewAvatar:
|
|
939
|
+
useNewAvatar: f
|
|
940
940
|
}
|
|
941
941
|
),
|
|
942
942
|
/* @__PURE__ */ o(
|
|
943
943
|
Rn,
|
|
944
|
-
|
|
944
|
+
D(a({
|
|
945
945
|
"data-testid": r,
|
|
946
|
-
topBarHeight:
|
|
946
|
+
topBarHeight: S
|
|
947
947
|
}, i), {
|
|
948
948
|
children: e
|
|
949
949
|
})
|
|
@@ -951,7 +951,7 @@ function Lo({
|
|
|
951
951
|
] })
|
|
952
952
|
] });
|
|
953
953
|
}
|
|
954
|
-
const
|
|
954
|
+
const kt = ({
|
|
955
955
|
isOpen: e,
|
|
956
956
|
dialogTitle: t,
|
|
957
957
|
children: n,
|
|
@@ -959,35 +959,35 @@ const Dt = ({
|
|
|
959
959
|
primaryButton: r,
|
|
960
960
|
secondaryButton: s,
|
|
961
961
|
onClose: c,
|
|
962
|
-
sx:
|
|
963
|
-
"data-testid":
|
|
962
|
+
sx: l,
|
|
963
|
+
"data-testid": d,
|
|
964
964
|
disableCloseOnBackdropOrEscape: p = !1,
|
|
965
|
-
isLoading:
|
|
965
|
+
isLoading: C = !1
|
|
966
966
|
}) => {
|
|
967
|
-
var
|
|
968
|
-
const [
|
|
967
|
+
var h, $;
|
|
968
|
+
const [f, m] = E(!1);
|
|
969
969
|
return /* @__PURE__ */ u(
|
|
970
970
|
tt,
|
|
971
971
|
{
|
|
972
972
|
open: e,
|
|
973
|
-
onClose: (
|
|
974
|
-
p && (
|
|
973
|
+
onClose: (k, S) => L(void 0, null, function* () {
|
|
974
|
+
p && (S === "backdropClick" || S === "escapeKeyDown") || f || (s != null && s.onClick ? yield s.onClick() : c());
|
|
975
975
|
}),
|
|
976
976
|
fullWidth: !0,
|
|
977
977
|
maxWidth: i != null ? i : "xs",
|
|
978
|
-
"data-testid":
|
|
979
|
-
sx:
|
|
978
|
+
"data-testid": d,
|
|
979
|
+
sx: l,
|
|
980
980
|
children: [
|
|
981
|
-
|
|
981
|
+
C && /* @__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
984
|
/* @__PURE__ */ u(rt, { children: [
|
|
985
985
|
/* @__PURE__ */ o(
|
|
986
986
|
ae,
|
|
987
987
|
{
|
|
988
|
-
onClick: (
|
|
988
|
+
onClick: (h = s == null ? void 0 : s.onClick) != null ? h : c,
|
|
989
989
|
"data-testid": s == null ? void 0 : s.testId,
|
|
990
|
-
disabled: (s == null ? void 0 : s.disabled) ||
|
|
990
|
+
disabled: (s == null ? void 0 : s.disabled) || f,
|
|
991
991
|
color: s == null ? void 0 : s.buttonColor,
|
|
992
992
|
children: ($ = s == null ? void 0 : s.text) != null ? $ : "Cancel"
|
|
993
993
|
}
|
|
@@ -996,11 +996,11 @@ const Dt = ({
|
|
|
996
996
|
ae,
|
|
997
997
|
{
|
|
998
998
|
onClick: () => L(void 0, null, function* () {
|
|
999
|
-
var
|
|
1000
|
-
|
|
999
|
+
var k;
|
|
1000
|
+
m(!0), yield (k = r.onClick) == null ? void 0 : k.call(r), m(!1);
|
|
1001
1001
|
}),
|
|
1002
1002
|
"data-testid": r.testId,
|
|
1003
|
-
disabled: r.disabled ||
|
|
1003
|
+
disabled: r.disabled || f,
|
|
1004
1004
|
color: r == null ? void 0 : r.buttonColor,
|
|
1005
1005
|
children: r.text
|
|
1006
1006
|
}
|
|
@@ -1030,92 +1030,92 @@ function _o({
|
|
|
1030
1030
|
label: r,
|
|
1031
1031
|
value: s,
|
|
1032
1032
|
"data-testid": c,
|
|
1033
|
-
sx:
|
|
1034
|
-
boxSx:
|
|
1033
|
+
sx: l,
|
|
1034
|
+
boxSx: d,
|
|
1035
1035
|
textFieldColor: p,
|
|
1036
|
-
textFieldVariant:
|
|
1037
|
-
loadingText:
|
|
1038
|
-
noOptionsText:
|
|
1039
|
-
popupIcon:
|
|
1036
|
+
textFieldVariant: C = "filled",
|
|
1037
|
+
loadingText: f = "Loading...",
|
|
1038
|
+
noOptionsText: m = "No options",
|
|
1039
|
+
popupIcon: h = /* @__PURE__ */ o(tn, {}),
|
|
1040
1040
|
error: $ = !1,
|
|
1041
|
-
helperText:
|
|
1042
|
-
preLoadedOptions:
|
|
1041
|
+
helperText: k = "",
|
|
1042
|
+
preLoadedOptions: S = void 0,
|
|
1043
1043
|
disablePortal: I = !1,
|
|
1044
|
-
disableIconFlip:
|
|
1044
|
+
disableIconFlip: T = !1
|
|
1045
1045
|
}) {
|
|
1046
|
-
const [P, N] =
|
|
1047
|
-
const
|
|
1048
|
-
n(
|
|
1049
|
-
}, { data:
|
|
1046
|
+
const [P, N] = E(""), b = (g, x) => {
|
|
1047
|
+
const v = s.filter((w) => w.id !== x);
|
|
1048
|
+
n(v, "delete", g);
|
|
1049
|
+
}, { data: A, isLoading: H } = yt({
|
|
1050
1050
|
inputValue: P,
|
|
1051
1051
|
label: r,
|
|
1052
1052
|
lookup: e,
|
|
1053
1053
|
minLength: i,
|
|
1054
|
-
preLoadedOptions:
|
|
1054
|
+
preLoadedOptions: S
|
|
1055
1055
|
}), W = P.length >= i;
|
|
1056
1056
|
return /* @__PURE__ */ u("div", { "data-testid": c, children: [
|
|
1057
1057
|
/* @__PURE__ */ o(
|
|
1058
|
-
|
|
1058
|
+
Se,
|
|
1059
1059
|
{
|
|
1060
|
-
sx: a(a({},
|
|
1060
|
+
sx: a(a({}, l), T ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1061
1061
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1062
1062
|
disablePortal: I,
|
|
1063
1063
|
multiple: !0,
|
|
1064
|
-
getOptionLabel: (
|
|
1064
|
+
getOptionLabel: (g) => typeof g == "string" ? g : g.label,
|
|
1065
1065
|
loading: W ? H : !1,
|
|
1066
|
-
options: [...s, ...
|
|
1066
|
+
options: [...s, ...A != null ? A : []],
|
|
1067
1067
|
filterSelectedOptions: !0,
|
|
1068
1068
|
includeInputInList: !0,
|
|
1069
1069
|
value: s,
|
|
1070
|
-
onChange: (
|
|
1071
|
-
n(
|
|
1070
|
+
onChange: (g, x, v) => {
|
|
1071
|
+
n(x, v, g);
|
|
1072
1072
|
},
|
|
1073
|
-
onInputChange: (
|
|
1074
|
-
noOptionsText: W ?
|
|
1075
|
-
loadingText:
|
|
1076
|
-
popupIcon:
|
|
1077
|
-
renderInput: (
|
|
1078
|
-
|
|
1079
|
-
|
|
1073
|
+
onInputChange: (g, x) => N(x),
|
|
1074
|
+
noOptionsText: W ? m : "Start typing to search",
|
|
1075
|
+
loadingText: f,
|
|
1076
|
+
popupIcon: h,
|
|
1077
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
1078
|
+
be,
|
|
1079
|
+
D(a({}, g), {
|
|
1080
1080
|
label: r,
|
|
1081
1081
|
fullWidth: !0,
|
|
1082
|
-
variant:
|
|
1082
|
+
variant: C,
|
|
1083
1083
|
error: $,
|
|
1084
|
-
helperText:
|
|
1085
|
-
InputProps:
|
|
1086
|
-
endAdornment: /* @__PURE__ */ u(
|
|
1087
|
-
H ? /* @__PURE__ */ o(
|
|
1088
|
-
|
|
1084
|
+
helperText: k,
|
|
1085
|
+
InputProps: D(a({}, g.InputProps), {
|
|
1086
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1087
|
+
H ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
1088
|
+
g.InputProps.endAdornment
|
|
1089
1089
|
] })
|
|
1090
1090
|
}),
|
|
1091
1091
|
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
|
|
1092
|
-
onKeyDown: (
|
|
1093
|
-
(
|
|
1092
|
+
onKeyDown: (x) => {
|
|
1093
|
+
(x.key === "Backspace" || x.key === "Delete") && x.stopPropagation();
|
|
1094
1094
|
},
|
|
1095
1095
|
color: p
|
|
1096
1096
|
})
|
|
1097
1097
|
),
|
|
1098
1098
|
renderTags: () => null,
|
|
1099
|
-
isOptionEqualToValue: (
|
|
1100
|
-
renderOption: (
|
|
1099
|
+
isOptionEqualToValue: (g, x) => g.id === x.id,
|
|
1100
|
+
renderOption: (g, x, v) => {
|
|
1101
1101
|
if (t) {
|
|
1102
|
-
const
|
|
1102
|
+
const w = on(x.label, v.inputValue, {
|
|
1103
1103
|
insideWords: !0,
|
|
1104
1104
|
findAllOccurrences: !0
|
|
1105
|
-
}), M = rn(
|
|
1105
|
+
}), M = rn(x.label, w);
|
|
1106
1106
|
return /* @__PURE__ */ xe(
|
|
1107
1107
|
"li",
|
|
1108
|
-
|
|
1109
|
-
key:
|
|
1110
|
-
"data-testid": c ? `${c}:Autocomplete:option(${
|
|
1108
|
+
D(a({}, g), {
|
|
1109
|
+
key: x.id,
|
|
1110
|
+
"data-testid": c ? `${c}:Autocomplete:option(${x.id.toString()})` : void 0
|
|
1111
1111
|
}),
|
|
1112
|
-
/* @__PURE__ */ o("div", { children: M.map((
|
|
1112
|
+
/* @__PURE__ */ o("div", { children: M.map((j, le) => /* @__PURE__ */ o(
|
|
1113
1113
|
"span",
|
|
1114
1114
|
{
|
|
1115
1115
|
style: {
|
|
1116
|
-
fontWeight:
|
|
1116
|
+
fontWeight: j.highlight ? 700 : 400
|
|
1117
1117
|
},
|
|
1118
|
-
children:
|
|
1118
|
+
children: j.text
|
|
1119
1119
|
},
|
|
1120
1120
|
le
|
|
1121
1121
|
)) })
|
|
@@ -1123,16 +1123,16 @@ function _o({
|
|
|
1123
1123
|
} else
|
|
1124
1124
|
return /* @__PURE__ */ xe(
|
|
1125
1125
|
"li",
|
|
1126
|
-
|
|
1127
|
-
key:
|
|
1128
|
-
"data-testid": c ? `${c}:option(${
|
|
1126
|
+
D(a({}, g), {
|
|
1127
|
+
key: x.id,
|
|
1128
|
+
"data-testid": c ? `${c}:option(${x.id.toString()})` : void 0
|
|
1129
1129
|
}),
|
|
1130
|
-
|
|
1130
|
+
x.label
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
),
|
|
1135
|
-
s.length > 0 && /* @__PURE__ */ o(y, { sx:
|
|
1135
|
+
s.length > 0 && /* @__PURE__ */ o(y, { sx: d, children: s.map((g) => /* @__PURE__ */ o(
|
|
1136
1136
|
Gt,
|
|
1137
1137
|
{
|
|
1138
1138
|
sx: {
|
|
@@ -1143,7 +1143,7 @@ function _o({
|
|
|
1143
1143
|
label: /* @__PURE__ */ o(
|
|
1144
1144
|
Vt,
|
|
1145
1145
|
{
|
|
1146
|
-
title:
|
|
1146
|
+
title: g.tooltipContent || "",
|
|
1147
1147
|
placement: "bottom-start",
|
|
1148
1148
|
PopperProps: {
|
|
1149
1149
|
modifiers: [
|
|
@@ -1155,19 +1155,19 @@ function _o({
|
|
|
1155
1155
|
}
|
|
1156
1156
|
]
|
|
1157
1157
|
},
|
|
1158
|
-
children: /* @__PURE__ */ o(
|
|
1158
|
+
children: /* @__PURE__ */ o(B, { style: { whiteSpace: "normal" }, children: g.chipLabel ? g.chipLabel : g.label })
|
|
1159
1159
|
}
|
|
1160
1160
|
),
|
|
1161
|
-
"data-testid": c ? `${c}:Chip(${
|
|
1162
|
-
onDelete: (
|
|
1161
|
+
"data-testid": c ? `${c}:Chip(${g.id.toString()})` : void 0,
|
|
1162
|
+
onDelete: (x) => b(x, g.id),
|
|
1163
1163
|
deleteIcon: /* @__PURE__ */ o(
|
|
1164
1164
|
en,
|
|
1165
1165
|
{
|
|
1166
|
-
"data-testid": c ? `${c}:Chip(${
|
|
1166
|
+
"data-testid": c ? `${c}:Chip(${g.id.toString()}):deleteIcon` : void 0
|
|
1167
1167
|
}
|
|
1168
1168
|
)
|
|
1169
1169
|
},
|
|
1170
|
-
|
|
1170
|
+
g.id
|
|
1171
1171
|
)) })
|
|
1172
1172
|
] });
|
|
1173
1173
|
}
|
|
@@ -1180,63 +1180,63 @@ const Mo = ({
|
|
|
1180
1180
|
sx: r,
|
|
1181
1181
|
textFieldColor: s,
|
|
1182
1182
|
textFieldVariant: c = "filled",
|
|
1183
|
-
"data-testid":
|
|
1184
|
-
noOptionsText:
|
|
1183
|
+
"data-testid": l,
|
|
1184
|
+
noOptionsText: d = "No options",
|
|
1185
1185
|
minLength: p = 3,
|
|
1186
|
-
disablePortal:
|
|
1187
|
-
preLoadedOptions:
|
|
1188
|
-
helperText:
|
|
1189
|
-
disabled:
|
|
1186
|
+
disablePortal: C = !1,
|
|
1187
|
+
preLoadedOptions: f,
|
|
1188
|
+
helperText: m = "",
|
|
1189
|
+
disabled: h,
|
|
1190
1190
|
popupIcon: $,
|
|
1191
|
-
disableIconFlip:
|
|
1191
|
+
disableIconFlip: k
|
|
1192
1192
|
}) => {
|
|
1193
|
-
const [
|
|
1194
|
-
inputValue:
|
|
1193
|
+
const [S, I] = E(""), { data: T, isLoading: P } = yt({
|
|
1194
|
+
inputValue: S,
|
|
1195
1195
|
label: n,
|
|
1196
1196
|
lookup: e,
|
|
1197
1197
|
minLength: p != null ? p : 0,
|
|
1198
|
-
preLoadedOptions:
|
|
1199
|
-
}), N =
|
|
1200
|
-
return /* @__PURE__ */ o("div", { "data-testid":
|
|
1201
|
-
|
|
1198
|
+
preLoadedOptions: f
|
|
1199
|
+
}), N = S.length >= p;
|
|
1200
|
+
return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1201
|
+
Se,
|
|
1202
1202
|
{
|
|
1203
|
-
sx: a(a({}, r),
|
|
1204
|
-
"data-testid":
|
|
1203
|
+
sx: a(a({}, r), k ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1204
|
+
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1205
1205
|
loading: N ? P : !1,
|
|
1206
|
-
options:
|
|
1207
|
-
onChange: (
|
|
1208
|
-
t(
|
|
1206
|
+
options: T != null ? T : [],
|
|
1207
|
+
onChange: (b, A) => {
|
|
1208
|
+
t(b, A);
|
|
1209
1209
|
},
|
|
1210
|
-
disablePortal:
|
|
1211
|
-
filterOptions: (
|
|
1210
|
+
disablePortal: C,
|
|
1211
|
+
filterOptions: (b) => b,
|
|
1212
1212
|
value: i,
|
|
1213
|
-
noOptionsText: N ?
|
|
1214
|
-
getOptionLabel: (
|
|
1213
|
+
noOptionsText: N ? d : "Start typing to search",
|
|
1214
|
+
getOptionLabel: (b) => b.label,
|
|
1215
1215
|
popupIcon: $,
|
|
1216
|
-
renderInput: (
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
"data-testid":
|
|
1220
|
-
},
|
|
1216
|
+
renderInput: (b) => /* @__PURE__ */ o(
|
|
1217
|
+
be,
|
|
1218
|
+
D(a({
|
|
1219
|
+
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1220
|
+
}, b), {
|
|
1221
1221
|
variant: c,
|
|
1222
1222
|
label: n,
|
|
1223
1223
|
color: s,
|
|
1224
|
-
helperText:
|
|
1224
|
+
helperText: m
|
|
1225
1225
|
})
|
|
1226
1226
|
),
|
|
1227
|
-
isOptionEqualToValue: (
|
|
1228
|
-
onInputChange: (
|
|
1229
|
-
I(
|
|
1227
|
+
isOptionEqualToValue: (b, A) => b.id === A.id,
|
|
1228
|
+
onInputChange: (b, A) => {
|
|
1229
|
+
I(A);
|
|
1230
1230
|
},
|
|
1231
|
-
renderOption: (
|
|
1231
|
+
renderOption: (b, A) => /* @__PURE__ */ xe(
|
|
1232
1232
|
"li",
|
|
1233
|
-
|
|
1234
|
-
key:
|
|
1235
|
-
"data-testid":
|
|
1233
|
+
D(a({}, b), {
|
|
1234
|
+
key: A.id,
|
|
1235
|
+
"data-testid": l ? `${l}:Autocomplete:option(${A.id.toString()})` : void 0
|
|
1236
1236
|
}),
|
|
1237
|
-
|
|
1237
|
+
A.label
|
|
1238
1238
|
),
|
|
1239
|
-
disabled:
|
|
1239
|
+
disabled: h
|
|
1240
1240
|
}
|
|
1241
1241
|
) }) });
|
|
1242
1242
|
}, Un = (e) => {
|
|
@@ -1257,32 +1257,32 @@ const Mo = ({
|
|
|
1257
1257
|
closeHandler: t,
|
|
1258
1258
|
setAuth0ExpiryTime: n
|
|
1259
1259
|
}) => {
|
|
1260
|
-
const { logout: i, getAccessTokenSilently: r } = ht(), [s, c] =
|
|
1260
|
+
const { logout: i, getAccessTokenSilently: r } = ht(), [s, c] = E(0), l = () => L(void 0, null, function* () {
|
|
1261
1261
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1262
|
-
}),
|
|
1262
|
+
}), d = () => L(void 0, null, function* () {
|
|
1263
1263
|
c(s + 1), t();
|
|
1264
1264
|
});
|
|
1265
|
-
return
|
|
1265
|
+
return K(() => {
|
|
1266
1266
|
(() => L(void 0, null, function* () {
|
|
1267
1267
|
if (s > 0) {
|
|
1268
|
-
const
|
|
1269
|
-
n(
|
|
1268
|
+
const m = yield r({ cacheMode: "off" }), h = Un(m) * 1e3;
|
|
1269
|
+
n(h);
|
|
1270
1270
|
}
|
|
1271
1271
|
}))();
|
|
1272
1272
|
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1273
|
-
|
|
1273
|
+
kt,
|
|
1274
1274
|
{
|
|
1275
1275
|
isOpen: e,
|
|
1276
1276
|
primaryButton: {
|
|
1277
1277
|
text: "Continue",
|
|
1278
|
-
onClick:
|
|
1278
|
+
onClick: d,
|
|
1279
1279
|
disabled: !1,
|
|
1280
1280
|
testId: "PreferencesDialog",
|
|
1281
1281
|
buttonColor: "secondary"
|
|
1282
1282
|
},
|
|
1283
1283
|
secondaryButton: {
|
|
1284
1284
|
text: "Log out",
|
|
1285
|
-
onClick:
|
|
1285
|
+
onClick: l,
|
|
1286
1286
|
disabled: !1,
|
|
1287
1287
|
testId: "PreferencesDialog",
|
|
1288
1288
|
buttonColor: "secondary"
|
|
@@ -1298,41 +1298,78 @@ function Gn(e) {
|
|
|
1298
1298
|
return "error" in e;
|
|
1299
1299
|
}
|
|
1300
1300
|
function Vn(e) {
|
|
1301
|
-
|
|
1301
|
+
var i;
|
|
1302
|
+
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1303
|
+
return t === "access_denied" && n.startsWith("You do not have the required authorization");
|
|
1302
1304
|
}
|
|
1303
1305
|
function qn(e) {
|
|
1304
1306
|
var i;
|
|
1305
1307
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1306
|
-
return t === "access_denied" && n.startsWith("
|
|
1308
|
+
return t === "access_denied" && n.startsWith("User did not authorize the request");
|
|
1307
1309
|
}
|
|
1308
1310
|
function Xn(e) {
|
|
1309
1311
|
var i;
|
|
1310
1312
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1311
|
-
return t === "access_denied" && n.
|
|
1313
|
+
return t === "access_denied" && n.match(/Script.*time.*exceeded/);
|
|
1312
1314
|
}
|
|
1313
1315
|
function Ho({
|
|
1314
1316
|
children: e,
|
|
1315
|
-
appName: t = "the app"
|
|
1317
|
+
appName: t = "the app",
|
|
1318
|
+
throwErrors: n = "none",
|
|
1319
|
+
disableConsoleLogging: i = !1,
|
|
1320
|
+
onError: r = () => {
|
|
1321
|
+
}
|
|
1316
1322
|
}) {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1323
|
+
var C, f;
|
|
1324
|
+
const { isAuthenticated: s, isLoading: c, error: l, loginWithRedirect: d, logout: p } = ht();
|
|
1325
|
+
if (K(() => {
|
|
1326
|
+
l && r(l);
|
|
1327
|
+
}, [l, r]), K(() => {
|
|
1328
|
+
if (c || s || l)
|
|
1320
1329
|
return;
|
|
1321
|
-
const
|
|
1330
|
+
const m = {
|
|
1322
1331
|
appState: {
|
|
1323
1332
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
1324
1333
|
}
|
|
1325
1334
|
};
|
|
1326
|
-
|
|
1327
|
-
}, [
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1335
|
+
d(m);
|
|
1336
|
+
}, [c, s, l, d, r]), l) {
|
|
1337
|
+
if (i || console.error(
|
|
1338
|
+
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${c}]`,
|
|
1339
|
+
l
|
|
1340
|
+
), n === "all")
|
|
1341
|
+
throw l;
|
|
1342
|
+
if (Gn(l)) {
|
|
1343
|
+
let m = "Auth error", h = "An unknown Auth0 error occurred.";
|
|
1344
|
+
if (Vn(l))
|
|
1345
|
+
m = "Unauthorised", h = `You are not authorised to access ${t}.`;
|
|
1346
|
+
else if (qn(l))
|
|
1347
|
+
m = "App not authorised", h = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1348
|
+
else if (Xn(l))
|
|
1349
|
+
m = "Auth0 script execution time exceeded", h = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute.";
|
|
1350
|
+
else if (n === "unknown")
|
|
1351
|
+
throw l;
|
|
1352
|
+
return /* @__PURE__ */ u(tt, { open: !0, children: [
|
|
1353
|
+
/* @__PURE__ */ o(ot, { children: m }),
|
|
1354
|
+
/* @__PURE__ */ u(it, { children: [
|
|
1355
|
+
/* @__PURE__ */ o(B, { children: h }),
|
|
1356
|
+
/* @__PURE__ */ o("br", {}),
|
|
1357
|
+
/* @__PURE__ */ o(B, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1358
|
+
/* @__PURE__ */ u(B, { variant: "body2", children: [
|
|
1359
|
+
"error: ",
|
|
1360
|
+
(C = l == null ? void 0 : l.error) != null ? C : "N/A"
|
|
1361
|
+
] }),
|
|
1362
|
+
/* @__PURE__ */ u(B, { variant: "body2", children: [
|
|
1363
|
+
"description: ",
|
|
1364
|
+
(f = l == null ? void 0 : l.error_description) != null ? f : "N/A"
|
|
1365
|
+
] })
|
|
1366
|
+
] }),
|
|
1367
|
+
/* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(ae, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
1368
|
+
] });
|
|
1369
|
+
} else if (n === "unknown")
|
|
1370
|
+
throw l;
|
|
1334
1371
|
}
|
|
1335
|
-
return
|
|
1372
|
+
return s ? /* @__PURE__ */ o(F, { children: e }) : /* @__PURE__ */ o(dn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1336
1373
|
}
|
|
1337
1374
|
const Qn = {
|
|
1338
1375
|
autoHideDuration: 6e3,
|
|
@@ -1367,47 +1404,47 @@ function to(s) {
|
|
|
1367
1404
|
"shouldClose",
|
|
1368
1405
|
"children"
|
|
1369
1406
|
]);
|
|
1370
|
-
var
|
|
1371
|
-
const [{ open:
|
|
1372
|
-
|
|
1373
|
-
}, []),
|
|
1374
|
-
|
|
1375
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${
|
|
1376
|
-
),
|
|
1377
|
-
const
|
|
1407
|
+
var x;
|
|
1408
|
+
const [{ open: l }, d] = E({ open: !1 }), p = ge([]), C = ge(Date.now()), f = ge(0), m = re((v) => {
|
|
1409
|
+
d({ open: v });
|
|
1410
|
+
}, []), h = re((v = {}) => {
|
|
1411
|
+
f.current += 1, p.current.length >= Xe && Date.now() - C.current >= Qe && (C.current = Date.now(), console.error(
|
|
1412
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${f.current} times in last ${Qe}ms)`
|
|
1413
|
+
), f.current = 0);
|
|
1414
|
+
const w = a(D(a({}, qe), {
|
|
1378
1415
|
key: Jn()
|
|
1379
|
-
}),
|
|
1380
|
-
return p.current.push(
|
|
1381
|
-
}, []), $ = (
|
|
1382
|
-
const
|
|
1383
|
-
if (
|
|
1384
|
-
return
|
|
1385
|
-
}, P = (
|
|
1386
|
-
n(
|
|
1416
|
+
}), v);
|
|
1417
|
+
return p.current.push(w), p.current.length === 1 && d({ open: !0 }), w.key;
|
|
1418
|
+
}, []), $ = (v = "", w = {}) => h(a({ message: v, severity: "success" }, w)), k = (v = "", w = {}) => h(a({ message: v, severity: "info" }, w)), S = (v = "", w = {}) => h(a({ message: v, severity: "warning" }, w)), I = (v = "", w = {}) => h(a({ message: v, severity: "error" }, w)), T = (v) => {
|
|
1419
|
+
const w = p.current.findIndex((M) => M.key === v);
|
|
1420
|
+
if (w !== -1)
|
|
1421
|
+
return w === 0 ? (d({ open: !1 }), p.current[0]) : p.current.splice(w, 1);
|
|
1422
|
+
}, P = (v, w) => {
|
|
1423
|
+
n(v, w) && d({ open: !1 });
|
|
1387
1424
|
}, N = () => {
|
|
1388
|
-
},
|
|
1389
|
-
p.current.shift(), p.current.length > 0 &&
|
|
1390
|
-
},
|
|
1391
|
-
"autoHideDuration" in
|
|
1392
|
-
const W = a(a({}, Qn), r),
|
|
1393
|
-
open:
|
|
1394
|
-
setOpen:
|
|
1395
|
-
enqueueNotification:
|
|
1425
|
+
}, b = () => {
|
|
1426
|
+
p.current.shift(), p.current.length > 0 && d({ open: !0 });
|
|
1427
|
+
}, A = (x = p.current[0]) != null ? x : a({}, qe), H = {};
|
|
1428
|
+
"autoHideDuration" in A && (H.autoHideDuration = A.autoHideDuration);
|
|
1429
|
+
const W = a(a({}, Qn), r), g = a(a({
|
|
1430
|
+
open: l,
|
|
1431
|
+
setOpen: m,
|
|
1432
|
+
enqueueNotification: h,
|
|
1396
1433
|
enqueueSuccessNotification: $,
|
|
1397
|
-
enqueueInfoNotification:
|
|
1398
|
-
enqueueWarningNotification:
|
|
1434
|
+
enqueueInfoNotification: k,
|
|
1435
|
+
enqueueWarningNotification: S,
|
|
1399
1436
|
enqueueErrorNotification: I,
|
|
1400
|
-
removeNotification:
|
|
1437
|
+
removeNotification: T
|
|
1401
1438
|
}, e), t);
|
|
1402
|
-
return /* @__PURE__ */ u($t.Provider, { value:
|
|
1439
|
+
return /* @__PURE__ */ u($t.Provider, { value: g, children: [
|
|
1403
1440
|
i,
|
|
1404
1441
|
/* @__PURE__ */ o(
|
|
1405
1442
|
Xt,
|
|
1406
|
-
|
|
1407
|
-
open:
|
|
1443
|
+
D(a(a({}, W), H), {
|
|
1444
|
+
open: l,
|
|
1408
1445
|
onClose: P,
|
|
1409
1446
|
TransitionProps: {
|
|
1410
|
-
onExited:
|
|
1447
|
+
onExited: b,
|
|
1411
1448
|
onExit: N
|
|
1412
1449
|
},
|
|
1413
1450
|
sx: { zIndex: Kn },
|
|
@@ -1415,15 +1452,15 @@ function to(s) {
|
|
|
1415
1452
|
/* @__PURE__ */ o(
|
|
1416
1453
|
Qt,
|
|
1417
1454
|
{
|
|
1418
|
-
onClose: (
|
|
1419
|
-
severity:
|
|
1455
|
+
onClose: (v) => P(v, "closeAlert"),
|
|
1456
|
+
severity: A.severity,
|
|
1420
1457
|
variant: "filled",
|
|
1421
|
-
icon:
|
|
1422
|
-
style:
|
|
1423
|
-
children:
|
|
1458
|
+
icon: A.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
|
|
1459
|
+
style: A.progressIndicator === "linear" ? Zn : void 0,
|
|
1460
|
+
children: A.message
|
|
1424
1461
|
}
|
|
1425
1462
|
),
|
|
1426
|
-
|
|
1463
|
+
A.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
|
|
1427
1464
|
] })
|
|
1428
1465
|
})
|
|
1429
1466
|
)
|
|
@@ -1432,11 +1469,11 @@ function to(s) {
|
|
|
1432
1469
|
function no() {
|
|
1433
1470
|
const e = Ze($t);
|
|
1434
1471
|
if (e === null)
|
|
1435
|
-
throw new
|
|
1472
|
+
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1436
1473
|
return e;
|
|
1437
1474
|
}
|
|
1438
1475
|
const Wo = Q(
|
|
1439
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(to,
|
|
1476
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(to, D(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1440
1477
|
), oo = nn(), zo = ({
|
|
1441
1478
|
children: e,
|
|
1442
1479
|
store: t
|
|
@@ -1444,7 +1481,7 @@ const Wo = Q(
|
|
|
1444
1481
|
var Ke;
|
|
1445
1482
|
const Ye = _(
|
|
1446
1483
|
JSON.parse((Ke = localStorage.getItem(It)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
1447
|
-
),
|
|
1484
|
+
), Tt = _(
|
|
1448
1485
|
(e) => e(Ye),
|
|
1449
1486
|
(e, t, n) => {
|
|
1450
1487
|
t(Ye, n), localStorage.setItem(It, JSON.stringify({ domainCode: n }));
|
|
@@ -1472,53 +1509,53 @@ const Ye = _(
|
|
|
1472
1509
|
applicationName: r,
|
|
1473
1510
|
handleLogout: s
|
|
1474
1511
|
}) => {
|
|
1475
|
-
const [c,
|
|
1476
|
-
|
|
1477
|
-
}),
|
|
1478
|
-
c && !
|
|
1512
|
+
const [c, l] = V(Tt), [d, p] = E(c), { enqueueSuccessNotification: C } = no(), f = i.length === 0, m = !!c && !i.includes(c) && !i.includes(d), h = !c || f || m, $ = () => L(void 0, null, function* () {
|
|
1513
|
+
d ? (l(d), C(`Set domain to ${d}`), n()) : l("");
|
|
1514
|
+
}), k = () => L(void 0, null, function* () {
|
|
1515
|
+
c && !f && !m ? (p(c), n()) : h && s();
|
|
1479
1516
|
});
|
|
1480
|
-
let
|
|
1481
|
-
return
|
|
1482
|
-
|
|
1517
|
+
let S;
|
|
1518
|
+
return f ? S = "Unable to retrieve your active organisations. Try logging in again." : m && (S = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
|
|
1519
|
+
kt,
|
|
1483
1520
|
{
|
|
1484
1521
|
isOpen: t,
|
|
1485
1522
|
dialogTitle: "Select an organisation",
|
|
1486
1523
|
primaryButton: {
|
|
1487
1524
|
text: "Confirm",
|
|
1488
1525
|
onClick: $,
|
|
1489
|
-
disabled: !
|
|
1526
|
+
disabled: !d || f || m,
|
|
1490
1527
|
buttonColor: "primary"
|
|
1491
1528
|
},
|
|
1492
1529
|
secondaryButton: {
|
|
1493
|
-
text:
|
|
1494
|
-
onClick:
|
|
1530
|
+
text: h ? "Logout" : "Cancel",
|
|
1531
|
+
onClick: k
|
|
1495
1532
|
},
|
|
1496
|
-
onClose:
|
|
1533
|
+
onClose: h ? () => {
|
|
1497
1534
|
} : n,
|
|
1498
1535
|
children: [
|
|
1499
|
-
/* @__PURE__ */ u(
|
|
1536
|
+
/* @__PURE__ */ u(B, { marginBottom: 2, children: [
|
|
1500
1537
|
"Select the default organisation that you want to use with the ",
|
|
1501
1538
|
r,
|
|
1502
1539
|
"."
|
|
1503
1540
|
] }),
|
|
1504
1541
|
/* @__PURE__ */ o(
|
|
1505
|
-
|
|
1542
|
+
Se,
|
|
1506
1543
|
{
|
|
1507
1544
|
loading: e,
|
|
1508
1545
|
multiple: !1,
|
|
1509
1546
|
disableClearable: !1,
|
|
1510
|
-
value:
|
|
1511
|
-
onChange: (I,
|
|
1547
|
+
value: d !== "" ? d : null,
|
|
1548
|
+
onChange: (I, T) => p(T != null ? T : ""),
|
|
1512
1549
|
getOptionLabel: ro,
|
|
1513
1550
|
options: [...i],
|
|
1514
1551
|
renderInput: (I) => /* @__PURE__ */ o(
|
|
1515
|
-
|
|
1516
|
-
|
|
1552
|
+
be,
|
|
1553
|
+
D(a({}, I), {
|
|
1517
1554
|
variant: "filled",
|
|
1518
1555
|
label: "Select organisation",
|
|
1519
|
-
InputProps:
|
|
1520
|
-
endAdornment: /* @__PURE__ */ u(
|
|
1521
|
-
e ? /* @__PURE__ */ o(
|
|
1556
|
+
InputProps: D(a({}, I.InputProps), {
|
|
1557
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1558
|
+
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1522
1559
|
I.InputProps.endAdornment
|
|
1523
1560
|
] })
|
|
1524
1561
|
})
|
|
@@ -1526,7 +1563,7 @@ const Ye = _(
|
|
|
1526
1563
|
)
|
|
1527
1564
|
}
|
|
1528
1565
|
),
|
|
1529
|
-
|
|
1566
|
+
S && /* @__PURE__ */ o(Yt, { error: !0, children: S })
|
|
1530
1567
|
]
|
|
1531
1568
|
}
|
|
1532
1569
|
);
|
|
@@ -1676,17 +1713,17 @@ const Ye = _(
|
|
|
1676
1713
|
backgroundColor: "#E8E8E8"
|
|
1677
1714
|
}
|
|
1678
1715
|
}), ao = {
|
|
1679
|
-
domainCode:
|
|
1680
|
-
navBarOpen:
|
|
1716
|
+
domainCode: Tt,
|
|
1717
|
+
navBarOpen: Z,
|
|
1681
1718
|
navBarWidthOpen: wt,
|
|
1682
1719
|
navBarWidthClosed: At,
|
|
1683
1720
|
titleText: ve,
|
|
1684
|
-
topBarHeight:
|
|
1685
|
-
navBarTop:
|
|
1721
|
+
topBarHeight: St,
|
|
1722
|
+
navBarTop: bt
|
|
1686
1723
|
}, qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), so = ({
|
|
1687
1724
|
initialValues: e,
|
|
1688
1725
|
children: t
|
|
1689
|
-
}) => (ut(e), /* @__PURE__ */ o(
|
|
1726
|
+
}) => (ut(e), /* @__PURE__ */ o(F, { children: t })), Xo = Q(
|
|
1690
1727
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1691
1728
|
so,
|
|
1692
1729
|
{
|
|
@@ -1704,14 +1741,14 @@ const Ye = _(
|
|
|
1704
1741
|
return /* @__PURE__ */ o(ln, { client: t, children: e });
|
|
1705
1742
|
});
|
|
1706
1743
|
export {
|
|
1707
|
-
|
|
1744
|
+
kt as AgDialog,
|
|
1708
1745
|
Lo as AppLayout,
|
|
1709
1746
|
zo as AtomProvider,
|
|
1710
1747
|
Ho as AuthGuard,
|
|
1711
1748
|
$t as Context,
|
|
1712
|
-
|
|
1749
|
+
ke as ContextError,
|
|
1713
1750
|
Uo as DomainCodeDialog,
|
|
1714
|
-
|
|
1751
|
+
To as ExampleComponent,
|
|
1715
1752
|
_o as FetchAutocomplete,
|
|
1716
1753
|
so as HydrateAtoms,
|
|
1717
1754
|
ft as NAVBAR_WIDTH_CLOSED,
|
|
@@ -1726,24 +1763,24 @@ export {
|
|
|
1726
1763
|
Mo as SingleAutocomplete,
|
|
1727
1764
|
oo as atomStore,
|
|
1728
1765
|
vn as buildNavBarState,
|
|
1729
|
-
|
|
1766
|
+
Tt as domainCodeAtom,
|
|
1730
1767
|
Go as fed21Theme,
|
|
1731
1768
|
Un as getAuth0Expiry,
|
|
1732
1769
|
Vo as internalAgSystemsTheme,
|
|
1733
1770
|
q as navBarClasses,
|
|
1734
|
-
|
|
1735
|
-
|
|
1771
|
+
Z as navBarOpenAtom,
|
|
1772
|
+
bt as navBarTopAtom,
|
|
1736
1773
|
At as navBarWidthClosedAtom,
|
|
1737
1774
|
wt as navBarWidthOpenAtom,
|
|
1738
1775
|
ve as titleTextAtom,
|
|
1739
|
-
|
|
1740
|
-
|
|
1776
|
+
St as topBarHeightAtom,
|
|
1777
|
+
On as topBarMiddleAtom,
|
|
1741
1778
|
yt as useAutocompleteOptions,
|
|
1742
1779
|
xn as useNavBar,
|
|
1743
1780
|
no as useSaladBar,
|
|
1744
1781
|
qo as withAtomProvider,
|
|
1745
|
-
|
|
1746
|
-
|
|
1782
|
+
Oo as withBrowserRouter,
|
|
1783
|
+
Bo as withNavBarProvider,
|
|
1747
1784
|
Xo as withOverrideDefaults,
|
|
1748
1785
|
Qo as withQueryClient,
|
|
1749
1786
|
Wo as withSaladBarProvider
|