@australiangreens/ag-internal-components 0.0.99 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +10 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts.map +1 -1
- package/dist/components/AuthGuard/auth0ErrorParsing.d.ts +0 -6
- package/dist/components/AuthGuard/auth0ErrorParsing.d.ts.map +1 -1
- package/dist/esm/index.js +414 -391
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Lt = Object.defineProperty, _t = Object.defineProperties;
|
|
2
2
|
var Mt = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var ne = Object.getOwnPropertySymbols;
|
|
4
4
|
var Te = Object.prototype.hasOwnProperty, Be = 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
7
|
Te.call(t, n) && he(e, n, t[n]);
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
8
|
+
if (ne)
|
|
9
|
+
for (var n of ne(t))
|
|
10
10
|
Be.call(t, n) && he(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, k = (e, t) => _t(e, Mt(t));
|
|
@@ -14,31 +14,31 @@ var Ee = (e, t) => {
|
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
16
|
Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var i of
|
|
17
|
+
if (e != null && ne)
|
|
18
|
+
for (var i of ne(e))
|
|
19
19
|
t.indexOf(i) < 0 && Be.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 T, Button as ae, Paper as je, Box as $, 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 be, TextField as Se, 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 Io({ text: e }) {
|
|
59
|
+
const [t, n] = E(0);
|
|
60
|
+
return /* @__PURE__ */ u(F, { 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
|
ae,
|
|
65
65
|
{
|
|
@@ -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 = R(
|
|
90
|
+
}, pn = R($, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -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) => k(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), Oo = Q(
|
|
162
162
|
(e = vn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Cn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
-
),
|
|
163
|
+
), To = Q(() => ({ children: e }) => /* @__PURE__ */ o(Zt, { children: e })), Re = 7, Bo = R(st)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -198,7 +198,7 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
|
|
|
198
198
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
199
199
|
// },
|
|
200
200
|
}
|
|
201
|
-
})), He = 7,
|
|
201
|
+
})), He = 7, Eo = R(st)(({ theme: e }) => ({
|
|
202
202
|
backgroundColor: "#e8e8e8",
|
|
203
203
|
color: "inherit",
|
|
204
204
|
"& .MuiListItem-root": {
|
|
@@ -237,7 +237,7 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
|
|
|
237
237
|
// },
|
|
238
238
|
}
|
|
239
239
|
}));
|
|
240
|
-
function
|
|
240
|
+
function Fo({
|
|
241
241
|
"data-testid": e,
|
|
242
242
|
children: t
|
|
243
243
|
}) {
|
|
@@ -256,7 +256,7 @@ function Po({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const wn = 24, An = 64, G = "TopBar",
|
|
259
|
+
const wn = 24, An = 64, G = "TopBar", B = {
|
|
260
260
|
topStripe: `${G}-topStripe`,
|
|
261
261
|
titleBar: `${G}-titleBar`,
|
|
262
262
|
titleSlider: `${G}-titleSlider`,
|
|
@@ -270,18 +270,18 @@ const wn = 24, An = 64, G = "TopBar", T = {
|
|
|
270
270
|
var i, r;
|
|
271
271
|
return {
|
|
272
272
|
width: "100%",
|
|
273
|
-
[`& .${
|
|
273
|
+
[`& .${B.topStripe}`]: {
|
|
274
274
|
width: "100%",
|
|
275
275
|
height: `${wn}px`,
|
|
276
276
|
backgroundColor: e.palette.primary.main
|
|
277
277
|
},
|
|
278
|
-
[`& .${
|
|
278
|
+
[`& .${B.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
|
+
[`& .${B.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
|
+
[`& .${B.leftPanelButton}`]: {
|
|
294
294
|
marginRight: e.spacing(2),
|
|
295
295
|
flexGrow: 0
|
|
296
296
|
},
|
|
297
|
-
[`& .${
|
|
297
|
+
[`& .${B.titleText}`]: {
|
|
298
298
|
flexGrow: 1
|
|
299
299
|
},
|
|
300
|
-
[`& .${
|
|
300
|
+
[`& .${B.rightPanelButton}`]: {
|
|
301
301
|
flexGrow: 0
|
|
302
302
|
}
|
|
303
303
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -322,12 +322,12 @@ function Sn({
|
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
324
|
return /* @__PURE__ */ u(bn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
|
-
/* @__PURE__ */ o("div", { className:
|
|
326
|
-
/* @__PURE__ */ o("div", { className:
|
|
325
|
+
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
326
|
+
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u($, { className: B.titleSlider, children: [
|
|
327
327
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
328
|
-
|
|
328
|
+
J,
|
|
329
329
|
{
|
|
330
|
-
className:
|
|
330
|
+
className: B.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(T, { className: B.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: B.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,7 +388,7 @@ const xt = 400, kn = Ae(we, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
),
|
|
391
|
+
), kn = Ae($, {
|
|
392
392
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
393
393
|
})(({ theme: e, anchor: t }) => k(a({
|
|
394
394
|
display: "flex",
|
|
@@ -417,51 +417,51 @@ 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:
|
|
423
|
+
onClosed: C,
|
|
424
|
+
"data-testid": f,
|
|
425
|
+
navBarOpen: m = !1,
|
|
426
426
|
navBarWidthOpen: g = 0,
|
|
427
|
-
navBarWidthClosed:
|
|
427
|
+
navBarWidthClosed: b = 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:
|
|
440
|
+
debugOpacity: l,
|
|
441
|
+
"data-testid": f,
|
|
442
|
+
navBarOpen: m,
|
|
443
443
|
navBarWidthOpen: g,
|
|
444
|
-
navBarWidthClosed:
|
|
444
|
+
navBarWidthClosed: b,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
/* @__PURE__ */ o(
|
|
448
|
-
c && /* @__PURE__ */ u(
|
|
446
|
+
/* @__PURE__ */ o(kn, k(a({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ u(F, { children: [
|
|
447
|
+
/* @__PURE__ */ o(T, { 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(T, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
458
458
|
] }) })),
|
|
459
459
|
e
|
|
460
460
|
]
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const yn = R(
|
|
464
|
+
const yn = R($, {
|
|
465
465
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
466
466
|
name: "PanelAwareMargins"
|
|
467
467
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -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,12 +499,12 @@ 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
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function Po({
|
|
508
508
|
children: e,
|
|
509
509
|
titleText: t = "",
|
|
510
510
|
leftPanel: n,
|
|
@@ -512,48 +512,48 @@ 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, g] = E(me), [b, y] = E(Ce), [S, I] = E(me), [O, P] = E(Ce), N = n !== void 0, D = i !== void 0, {
|
|
522
|
+
titleText: A,
|
|
523
523
|
content: H,
|
|
524
524
|
flavour: W,
|
|
525
525
|
open: h,
|
|
526
|
-
onChangeOpen:
|
|
527
|
-
width:
|
|
528
|
-
arrowButtons:
|
|
526
|
+
onChangeOpen: x,
|
|
527
|
+
width: v,
|
|
528
|
+
arrowButtons: w,
|
|
529
529
|
startOpen: M,
|
|
530
|
-
onOpened:
|
|
530
|
+
onOpened: j,
|
|
531
531
|
onClosed: le,
|
|
532
532
|
dataTestId: Tt
|
|
533
|
-
} = n ? a(a({},
|
|
533
|
+
} = n ? a(a({}, oe), n) : a({}, oe), {
|
|
534
534
|
titleText: Bt,
|
|
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
|
-
|
|
545
|
+
} = i ? a(a({}, oe), i) : a({}, oe);
|
|
546
|
+
K(() => {
|
|
547
547
|
M !== me && (g(M), I(M));
|
|
548
|
-
}, [M]),
|
|
549
|
-
|
|
550
|
-
}, [
|
|
551
|
-
const pe = h === void 0 ?
|
|
552
|
-
h === void 0 && (g(z), r &&
|
|
548
|
+
}, [M]), K(() => {
|
|
549
|
+
te !== Ce && (y(te), P(te));
|
|
550
|
+
}, [te]);
|
|
551
|
+
const pe = h === void 0 ? m : h, ue = ce === void 0 ? b : ce, Ie = (z) => {
|
|
552
|
+
h === void 0 && (g(z), r && D && (z ? (y(!1), P(b)) : y(O))), x && x(z);
|
|
553
553
|
}, Oe = (z) => {
|
|
554
|
-
ce === void 0 && (
|
|
554
|
+
ce === void 0 && (y(z), r && N && (z ? (g(!1), I(m)) : g(S))), $e && $e(z);
|
|
555
555
|
};
|
|
556
|
-
return /* @__PURE__ */ u(
|
|
556
|
+
return /* @__PURE__ */ u($, { children: [
|
|
557
557
|
N && /* @__PURE__ */ o(
|
|
558
558
|
We,
|
|
559
559
|
{
|
|
@@ -561,19 +561,19 @@ function No({
|
|
|
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
|
+
D && /* @__PURE__ */ o(
|
|
577
577
|
We,
|
|
578
578
|
{
|
|
579
579
|
"data-testid": Nt,
|
|
@@ -583,12 +583,12 @@ function No({
|
|
|
583
583
|
width: de,
|
|
584
584
|
titleText: Bt,
|
|
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
|
),
|
|
@@ -596,20 +596,20 @@ function No({
|
|
|
596
596
|
Sn,
|
|
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
|
+
} : {}), D && ye === "push" ? {
|
|
608
608
|
rightPanel: {
|
|
609
609
|
open: ue,
|
|
610
610
|
width: de,
|
|
611
611
|
onOpen: () => Oe(!0),
|
|
612
|
-
showOpenArrow:
|
|
612
|
+
showOpenArrow: ee === "both" || ee === "open"
|
|
613
613
|
}
|
|
614
614
|
} : {})
|
|
615
615
|
),
|
|
@@ -618,7 +618,7 @@ function No({
|
|
|
618
618
|
k(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, k(a({ "data-testid":
|
|
629
|
+
children: /* @__PURE__ */ o($n, k(a({ "data-testid": l }, c), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
@@ -634,19 +634,19 @@ function No({
|
|
|
634
634
|
const vt = () => {
|
|
635
635
|
const e = se();
|
|
636
636
|
return Rt(e.breakpoints.down("sm"));
|
|
637
|
-
}, In = 64, On = 72, Tn = 256,
|
|
637
|
+
}, In = 64, On = 72, Tn = 256, Z = _(!0), wt = _(Tn), At = _(On), ve = _(""), Bn = _(void 0), bt = _(In), St = _(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`,
|
|
649
|
-
}, Fn = R(
|
|
649
|
+
}, Fn = R($, { name: "NavBar" })(({ theme: e }) => ({
|
|
650
650
|
[`&.${Y.root}`]: {
|
|
651
651
|
display: "flex"
|
|
652
652
|
},
|
|
@@ -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,
|
|
@@ -721,7 +721,7 @@ const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], V
|
|
|
721
721
|
function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
722
722
|
const r = se();
|
|
723
723
|
return /* @__PURE__ */ u(
|
|
724
|
-
|
|
724
|
+
$,
|
|
725
725
|
{
|
|
726
726
|
sx: {
|
|
727
727
|
paddingTop: 3,
|
|
@@ -732,14 +732,14 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
732
732
|
},
|
|
733
733
|
children: [
|
|
734
734
|
!i && /* @__PURE__ */ o(
|
|
735
|
-
|
|
735
|
+
$,
|
|
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(F, { children: /* @__PURE__ */ o(
|
|
743
743
|
Pe,
|
|
744
744
|
{
|
|
745
745
|
src: e == null ? void 0 : e.picture,
|
|
@@ -754,14 +754,14 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
i && /* @__PURE__ */ o(
|
|
757
|
-
|
|
757
|
+
$,
|
|
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(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
|
" ",
|
|
@@ -769,9 +769,9 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
769
769
|
] }) }) : /* @__PURE__ */ o(Me, {})
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
|
-
/* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ u(
|
|
773
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
774
|
-
t ? /* @__PURE__ */ o(
|
|
772
|
+
/* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ u($, { 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
|
}
|
|
@@ -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,25 +797,25 @@ 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
|
-
!
|
|
810
|
-
r && /* @__PURE__ */ u(
|
|
809
|
+
!C && /* @__PURE__ */ o(zt, {}),
|
|
810
|
+
r && /* @__PURE__ */ u($, { flexGrow: "0", children: [
|
|
811
811
|
r,
|
|
812
812
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
813
813
|
] }),
|
|
814
|
-
/* @__PURE__ */ o(
|
|
815
|
-
/* @__PURE__ */ u(
|
|
814
|
+
/* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(En, { links: s }) : s }),
|
|
815
|
+
/* @__PURE__ */ u($, { 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
|
}
|
|
@@ -828,14 +828,14 @@ function Rn({
|
|
|
828
828
|
noPadding: i
|
|
829
829
|
}) {
|
|
830
830
|
return /* @__PURE__ */ o(
|
|
831
|
-
|
|
831
|
+
$,
|
|
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($, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
839
839
|
et,
|
|
840
840
|
{
|
|
841
841
|
component: "main",
|
|
@@ -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,13 +886,13 @@ function zn({
|
|
|
886
886
|
children: /* @__PURE__ */ o(jt, { fontSize: "medium" })
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
|
-
/* @__PURE__ */ o(
|
|
889
|
+
/* @__PURE__ */ o(T, { className: Wn.titleText, variant: "h6", component: "h1", children: e }),
|
|
890
890
|
i
|
|
891
891
|
]
|
|
892
892
|
}
|
|
893
893
|
) });
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function No({
|
|
896
896
|
children: e,
|
|
897
897
|
initialTitleText: t,
|
|
898
898
|
initialNavBarOpen: n,
|
|
@@ -900,50 +900,50 @@ 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
|
|
914
|
-
return /* @__PURE__ */ u(
|
|
913
|
+
const m = _e(Z), [g] = V(wt), [b] = V(At), y = _e(ve), [S] = V(bt), [I] = V(Bn), [O] = V(St);
|
|
914
|
+
return /* @__PURE__ */ u($, { children: [
|
|
915
915
|
/* @__PURE__ */ o(Ut, {}),
|
|
916
916
|
/* @__PURE__ */ o(
|
|
917
917
|
zn,
|
|
918
918
|
{
|
|
919
|
-
titleText:
|
|
919
|
+
titleText: y,
|
|
920
920
|
"data-testid": s,
|
|
921
|
-
height:
|
|
921
|
+
height: S,
|
|
922
922
|
middle: I
|
|
923
923
|
}
|
|
924
924
|
),
|
|
925
|
-
/* @__PURE__ */ u(
|
|
925
|
+
/* @__PURE__ */ u($, { sx: { display: "flex" }, children: [
|
|
926
926
|
/* @__PURE__ */ o(
|
|
927
927
|
Mn,
|
|
928
928
|
{
|
|
929
|
-
open:
|
|
929
|
+
open: m,
|
|
930
930
|
top: O,
|
|
931
|
-
middle:
|
|
932
|
-
bottom:
|
|
931
|
+
middle: l,
|
|
932
|
+
bottom: d,
|
|
933
933
|
user: p,
|
|
934
|
-
domainCode:
|
|
934
|
+
domainCode: C,
|
|
935
935
|
widthOpen: g,
|
|
936
|
-
widthClosed:
|
|
937
|
-
offsetTop:
|
|
936
|
+
widthClosed: b,
|
|
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
|
k(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,26 +959,26 @@ 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 g,
|
|
968
|
-
const [
|
|
967
|
+
var g, b;
|
|
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: (y, 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: [
|
|
@@ -987,20 +987,20 @@ const Dt = ({
|
|
|
987
987
|
{
|
|
988
988
|
onClick: (g = s == null ? void 0 : s.onClick) != null ? g : 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
|
-
children: (
|
|
992
|
+
children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
|
|
993
993
|
}
|
|
994
994
|
),
|
|
995
995
|
r && /* @__PURE__ */ o(
|
|
996
996
|
ae,
|
|
997
997
|
{
|
|
998
998
|
onClick: () => L(void 0, null, function* () {
|
|
999
|
-
var
|
|
1000
|
-
|
|
999
|
+
var y;
|
|
1000
|
+
m(!0), yield (y = r.onClick) == null ? void 0 : y.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
|
}
|
|
@@ -1021,7 +1021,7 @@ const Dt = ({
|
|
|
1021
1021
|
) : n(r),
|
|
1022
1022
|
queryKey: ["autocomplete", i, r]
|
|
1023
1023
|
});
|
|
1024
|
-
function
|
|
1024
|
+
function Lo({
|
|
1025
1025
|
lookup: e = () => L(this, null, function* () {
|
|
1026
1026
|
}),
|
|
1027
1027
|
enableHighlighting: t = !0,
|
|
@@ -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:
|
|
1036
|
+
textFieldVariant: C = "filled",
|
|
1037
|
+
loadingText: f = "Loading...",
|
|
1038
|
+
noOptionsText: m = "No options",
|
|
1039
1039
|
popupIcon: g = /* @__PURE__ */ o(tn, {}),
|
|
1040
|
-
error:
|
|
1041
|
-
helperText:
|
|
1042
|
-
preLoadedOptions:
|
|
1040
|
+
error: b = !1,
|
|
1041
|
+
helperText: y = "",
|
|
1042
|
+
preLoadedOptions: S = void 0,
|
|
1043
1043
|
disablePortal: I = !1,
|
|
1044
1044
|
disableIconFlip: O = !1
|
|
1045
1045
|
}) {
|
|
1046
|
-
const [P, N] =
|
|
1047
|
-
const
|
|
1048
|
-
n(
|
|
1049
|
-
}, { data:
|
|
1046
|
+
const [P, N] = E(""), D = (h, x) => {
|
|
1047
|
+
const v = s.filter((w) => w.id !== x);
|
|
1048
|
+
n(v, "delete", h);
|
|
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
|
be,
|
|
1059
1059
|
{
|
|
1060
|
-
sx: a(a({},
|
|
1060
|
+
sx: a(a({}, l), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1061
1061
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1062
1062
|
disablePortal: I,
|
|
1063
1063
|
multiple: !0,
|
|
1064
1064
|
getOptionLabel: (h) => typeof h == "string" ? h : h.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: (h,
|
|
1071
|
-
n(
|
|
1070
|
+
onChange: (h, x, v) => {
|
|
1071
|
+
n(x, v, h);
|
|
1072
1072
|
},
|
|
1073
|
-
onInputChange: (h,
|
|
1074
|
-
noOptionsText: W ?
|
|
1075
|
-
loadingText:
|
|
1073
|
+
onInputChange: (h, x) => N(x),
|
|
1074
|
+
noOptionsText: W ? m : "Start typing to search",
|
|
1075
|
+
loadingText: f,
|
|
1076
1076
|
popupIcon: g,
|
|
1077
1077
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
1078
1078
|
Se,
|
|
1079
1079
|
k(a({}, h), {
|
|
1080
1080
|
label: r,
|
|
1081
1081
|
fullWidth: !0,
|
|
1082
|
-
variant:
|
|
1083
|
-
error:
|
|
1084
|
-
helperText:
|
|
1082
|
+
variant: C,
|
|
1083
|
+
error: b,
|
|
1084
|
+
helperText: y,
|
|
1085
1085
|
InputProps: k(a({}, h.InputProps), {
|
|
1086
|
-
endAdornment: /* @__PURE__ */ u(
|
|
1087
|
-
H ? /* @__PURE__ */ o(
|
|
1086
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1087
|
+
H ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
1088
1088
|
h.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: (h,
|
|
1100
|
-
renderOption: (h,
|
|
1099
|
+
isOptionEqualToValue: (h, x) => h.id === x.id,
|
|
1100
|
+
renderOption: (h, 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
1108
|
k(a({}, h), {
|
|
1109
|
-
key:
|
|
1110
|
-
"data-testid": c ? `${c}:Autocomplete:option(${
|
|
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
|
)) })
|
|
@@ -1124,15 +1124,15 @@ function _o({
|
|
|
1124
1124
|
return /* @__PURE__ */ xe(
|
|
1125
1125
|
"li",
|
|
1126
1126
|
k(a({}, h), {
|
|
1127
|
-
key:
|
|
1128
|
-
"data-testid": c ? `${c}:option(${
|
|
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(
|
|
1135
|
+
s.length > 0 && /* @__PURE__ */ o($, { sx: d, children: s.map((h) => /* @__PURE__ */ o(
|
|
1136
1136
|
Gt,
|
|
1137
1137
|
{
|
|
1138
1138
|
sx: {
|
|
@@ -1155,11 +1155,11 @@ function _o({
|
|
|
1155
1155
|
}
|
|
1156
1156
|
]
|
|
1157
1157
|
},
|
|
1158
|
-
children: /* @__PURE__ */ o(
|
|
1158
|
+
children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
|
|
1159
1159
|
}
|
|
1160
1160
|
),
|
|
1161
1161
|
"data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
|
|
1162
|
-
onDelete: (
|
|
1162
|
+
onDelete: (x) => D(x, h.id),
|
|
1163
1163
|
deleteIcon: /* @__PURE__ */ o(
|
|
1164
1164
|
en,
|
|
1165
1165
|
{
|
|
@@ -1171,7 +1171,7 @@ function _o({
|
|
|
1171
1171
|
)) })
|
|
1172
1172
|
] });
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const _o = ({
|
|
1175
1175
|
lookup: e = () => L(void 0, null, function* () {
|
|
1176
1176
|
}),
|
|
1177
1177
|
onChange: t,
|
|
@@ -1180,61 +1180,61 @@ 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:
|
|
1186
|
+
disablePortal: C = !1,
|
|
1187
|
+
preLoadedOptions: f,
|
|
1188
|
+
helperText: m = "",
|
|
1189
1189
|
disabled: g,
|
|
1190
|
-
popupIcon:
|
|
1191
|
-
disableIconFlip:
|
|
1190
|
+
popupIcon: b,
|
|
1191
|
+
disableIconFlip: y
|
|
1192
1192
|
}) => {
|
|
1193
|
-
const [
|
|
1194
|
-
inputValue:
|
|
1193
|
+
const [S, I] = E(""), { data: O, 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":
|
|
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
1201
|
be,
|
|
1202
1202
|
{
|
|
1203
|
-
sx: a(a({}, r),
|
|
1204
|
-
"data-testid":
|
|
1203
|
+
sx: a(a({}, r), y ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1204
|
+
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1205
1205
|
loading: N ? P : !1,
|
|
1206
1206
|
options: O != null ? O : [],
|
|
1207
|
-
onChange: (
|
|
1208
|
-
t(
|
|
1207
|
+
onChange: (D, A) => {
|
|
1208
|
+
t(D, A);
|
|
1209
1209
|
},
|
|
1210
|
-
disablePortal:
|
|
1211
|
-
filterOptions: (
|
|
1210
|
+
disablePortal: C,
|
|
1211
|
+
filterOptions: (D) => D,
|
|
1212
1212
|
value: i,
|
|
1213
|
-
noOptionsText: N ?
|
|
1214
|
-
getOptionLabel: (
|
|
1215
|
-
popupIcon:
|
|
1216
|
-
renderInput: (
|
|
1213
|
+
noOptionsText: N ? d : "Start typing to search",
|
|
1214
|
+
getOptionLabel: (D) => D.label,
|
|
1215
|
+
popupIcon: b,
|
|
1216
|
+
renderInput: (D) => /* @__PURE__ */ o(
|
|
1217
1217
|
Se,
|
|
1218
1218
|
k(a({
|
|
1219
|
-
"data-testid":
|
|
1220
|
-
},
|
|
1219
|
+
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1220
|
+
}, D), {
|
|
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: (D, A) => D.id === A.id,
|
|
1228
|
+
onInputChange: (D, A) => {
|
|
1229
|
+
I(A);
|
|
1230
1230
|
},
|
|
1231
|
-
renderOption: (
|
|
1231
|
+
renderOption: (D, A) => /* @__PURE__ */ xe(
|
|
1232
1232
|
"li",
|
|
1233
|
-
k(a({},
|
|
1234
|
-
key:
|
|
1235
|
-
"data-testid":
|
|
1233
|
+
k(a({}, D), {
|
|
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
1239
|
disabled: g
|
|
1240
1240
|
}
|
|
@@ -1252,37 +1252,37 @@ const Mo = ({
|
|
|
1252
1252
|
} catch (t) {
|
|
1253
1253
|
return -1;
|
|
1254
1254
|
}
|
|
1255
|
-
},
|
|
1255
|
+
}, Mo = ({
|
|
1256
1256
|
open: e = !1,
|
|
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
|
|
1268
|
+
const m = yield r({ cacheMode: "off" }), g = Un(m) * 1e3;
|
|
1269
1269
|
n(g);
|
|
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,49 +1298,72 @@ function Gn(e) {
|
|
|
1298
1298
|
return "error" in e;
|
|
1299
1299
|
}
|
|
1300
1300
|
function Vn(e) {
|
|
1301
|
-
return e.error === "access_denied";
|
|
1302
|
-
}
|
|
1303
|
-
function qn(e) {
|
|
1304
1301
|
var i;
|
|
1305
1302
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1306
1303
|
return t === "access_denied" && n.startsWith("You do not have the required authorization");
|
|
1307
1304
|
}
|
|
1308
|
-
function
|
|
1305
|
+
function qn(e) {
|
|
1309
1306
|
var i;
|
|
1310
1307
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1311
1308
|
return t === "access_denied" && n.startsWith("User did not authorize the request");
|
|
1312
1309
|
}
|
|
1313
|
-
function
|
|
1310
|
+
function Ro({
|
|
1314
1311
|
children: e,
|
|
1315
|
-
appName: t = "the app"
|
|
1312
|
+
appName: t = "the app",
|
|
1313
|
+
throwErrors: n,
|
|
1314
|
+
disableConsoleLogging: i = !1,
|
|
1315
|
+
onError: r = () => {
|
|
1316
|
+
}
|
|
1316
1317
|
}) {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1318
|
+
var C, f;
|
|
1319
|
+
const { isAuthenticated: s, isLoading: c, error: l, loginWithRedirect: d, logout: p } = ht();
|
|
1320
|
+
if (K(() => {
|
|
1321
|
+
l && r(l);
|
|
1322
|
+
}, [l, r]), K(() => {
|
|
1323
|
+
if (c || s || l)
|
|
1320
1324
|
return;
|
|
1321
|
-
const
|
|
1325
|
+
const m = {
|
|
1322
1326
|
appState: {
|
|
1323
1327
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
1324
1328
|
}
|
|
1325
1329
|
};
|
|
1326
|
-
|
|
1327
|
-
}, [
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1330
|
+
d(m);
|
|
1331
|
+
}, [c, s, l, d, r]), l && (i || console.error(
|
|
1332
|
+
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${c}]`,
|
|
1333
|
+
l
|
|
1334
|
+
), Gn(l))) {
|
|
1335
|
+
let m = "Auth error", g = "An unknown Auth0 error occurred.", b = !1;
|
|
1336
|
+
if (Vn(l) ? (m = "Unauthorised", g = `You are not authorised to access ${t}.`, b = !0) : qn(l) && (m = "App not authorised", g = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`, b = !0), n === "all")
|
|
1337
|
+
throw l;
|
|
1338
|
+
if (n === "unknown" && !b)
|
|
1339
|
+
throw l;
|
|
1340
|
+
return /* @__PURE__ */ u(tt, { open: !0, children: [
|
|
1341
|
+
/* @__PURE__ */ o(ot, { children: m }),
|
|
1342
|
+
/* @__PURE__ */ u(it, { children: [
|
|
1343
|
+
/* @__PURE__ */ o(T, { children: g }),
|
|
1344
|
+
/* @__PURE__ */ o("br", {}),
|
|
1345
|
+
/* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1346
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1347
|
+
"error: ",
|
|
1348
|
+
(C = l == null ? void 0 : l.error) != null ? C : "N/A"
|
|
1349
|
+
] }),
|
|
1350
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1351
|
+
"description: ",
|
|
1352
|
+
(f = l == null ? void 0 : l.error_description) != null ? f : "N/A"
|
|
1353
|
+
] })
|
|
1354
|
+
] }),
|
|
1355
|
+
/* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(ae, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
1333
1356
|
] });
|
|
1334
1357
|
}
|
|
1335
|
-
return
|
|
1358
|
+
return s ? /* @__PURE__ */ o(F, { children: e }) : /* @__PURE__ */ o(dn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1336
1359
|
}
|
|
1337
|
-
const
|
|
1360
|
+
const Xn = {
|
|
1338
1361
|
autoHideDuration: 6e3,
|
|
1339
1362
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1340
1363
|
// The default is false. If we prefer timer to continue when window loses
|
|
1341
1364
|
// focus, change to true
|
|
1342
1365
|
disableWindowBlurListener: !1
|
|
1343
|
-
},
|
|
1366
|
+
}, Qn = {
|
|
1344
1367
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1345
1368
|
}, qe = {
|
|
1346
1369
|
message: "",
|
|
@@ -1348,18 +1371,18 @@ const Qn = {
|
|
|
1348
1371
|
variant: "standard",
|
|
1349
1372
|
progressIndicator: void 0
|
|
1350
1373
|
// Can use 'circular' or 'linear'
|
|
1351
|
-
}, Xe = 100, Qe = 2e3,
|
|
1374
|
+
}, Xe = 100, Qe = 2e3, Yn = 2e3, Kn = (() => {
|
|
1352
1375
|
let e = 0;
|
|
1353
1376
|
return () => (e += 1, e);
|
|
1354
|
-
})(),
|
|
1377
|
+
})(), Jn = {
|
|
1355
1378
|
borderBottomLeftRadius: "0px",
|
|
1356
1379
|
borderBottomRightRadius: "0px"
|
|
1357
|
-
},
|
|
1358
|
-
function
|
|
1380
|
+
}, Zn = {}, jn = {}, $t = Je(null);
|
|
1381
|
+
function eo(s) {
|
|
1359
1382
|
var c = s, {
|
|
1360
|
-
overrideState: e =
|
|
1361
|
-
overrideActions: t =
|
|
1362
|
-
shouldClose: n =
|
|
1383
|
+
overrideState: e = Zn,
|
|
1384
|
+
overrideActions: t = jn,
|
|
1385
|
+
shouldClose: n = Qn.shouldClose,
|
|
1363
1386
|
children: i
|
|
1364
1387
|
} = c, r = Ee(c, [
|
|
1365
1388
|
"overrideState",
|
|
@@ -1367,35 +1390,35 @@ function to(s) {
|
|
|
1367
1390
|
"shouldClose",
|
|
1368
1391
|
"children"
|
|
1369
1392
|
]);
|
|
1370
|
-
var
|
|
1371
|
-
const [{ open:
|
|
1372
|
-
|
|
1373
|
-
}, []), g =
|
|
1374
|
-
|
|
1375
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${
|
|
1376
|
-
),
|
|
1377
|
-
const
|
|
1378
|
-
key:
|
|
1379
|
-
}),
|
|
1380
|
-
return p.current.push(
|
|
1381
|
-
}, []),
|
|
1382
|
-
const
|
|
1383
|
-
if (
|
|
1384
|
-
return
|
|
1385
|
-
}, P = (
|
|
1386
|
-
n(
|
|
1393
|
+
var x;
|
|
1394
|
+
const [{ open: l }, d] = E({ open: !1 }), p = ge([]), C = ge(Date.now()), f = ge(0), m = re((v) => {
|
|
1395
|
+
d({ open: v });
|
|
1396
|
+
}, []), g = re((v = {}) => {
|
|
1397
|
+
f.current += 1, p.current.length >= Xe && Date.now() - C.current >= Qe && (C.current = Date.now(), console.error(
|
|
1398
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${f.current} times in last ${Qe}ms)`
|
|
1399
|
+
), f.current = 0);
|
|
1400
|
+
const w = a(k(a({}, qe), {
|
|
1401
|
+
key: Kn()
|
|
1402
|
+
}), v);
|
|
1403
|
+
return p.current.push(w), p.current.length === 1 && d({ open: !0 }), w.key;
|
|
1404
|
+
}, []), b = (v = "", w = {}) => g(a({ message: v, severity: "success" }, w)), y = (v = "", w = {}) => g(a({ message: v, severity: "info" }, w)), S = (v = "", w = {}) => g(a({ message: v, severity: "warning" }, w)), I = (v = "", w = {}) => g(a({ message: v, severity: "error" }, w)), O = (v) => {
|
|
1405
|
+
const w = p.current.findIndex((M) => M.key === v);
|
|
1406
|
+
if (w !== -1)
|
|
1407
|
+
return w === 0 ? (d({ open: !1 }), p.current[0]) : p.current.splice(w, 1);
|
|
1408
|
+
}, P = (v, w) => {
|
|
1409
|
+
n(v, w) && d({ open: !1 });
|
|
1387
1410
|
}, N = () => {
|
|
1388
|
-
},
|
|
1389
|
-
p.current.shift(), p.current.length > 0 &&
|
|
1390
|
-
},
|
|
1391
|
-
"autoHideDuration" in
|
|
1392
|
-
const W = a(a({},
|
|
1393
|
-
open:
|
|
1394
|
-
setOpen:
|
|
1411
|
+
}, D = () => {
|
|
1412
|
+
p.current.shift(), p.current.length > 0 && d({ open: !0 });
|
|
1413
|
+
}, A = (x = p.current[0]) != null ? x : a({}, qe), H = {};
|
|
1414
|
+
"autoHideDuration" in A && (H.autoHideDuration = A.autoHideDuration);
|
|
1415
|
+
const W = a(a({}, Xn), r), h = a(a({
|
|
1416
|
+
open: l,
|
|
1417
|
+
setOpen: m,
|
|
1395
1418
|
enqueueNotification: g,
|
|
1396
|
-
enqueueSuccessNotification:
|
|
1397
|
-
enqueueInfoNotification:
|
|
1398
|
-
enqueueWarningNotification:
|
|
1419
|
+
enqueueSuccessNotification: b,
|
|
1420
|
+
enqueueInfoNotification: y,
|
|
1421
|
+
enqueueWarningNotification: S,
|
|
1399
1422
|
enqueueErrorNotification: I,
|
|
1400
1423
|
removeNotification: O
|
|
1401
1424
|
}, e), t);
|
|
@@ -1404,43 +1427,43 @@ function to(s) {
|
|
|
1404
1427
|
/* @__PURE__ */ o(
|
|
1405
1428
|
Xt,
|
|
1406
1429
|
k(a(a({}, W), H), {
|
|
1407
|
-
open:
|
|
1430
|
+
open: l,
|
|
1408
1431
|
onClose: P,
|
|
1409
1432
|
TransitionProps: {
|
|
1410
|
-
onExited:
|
|
1433
|
+
onExited: D,
|
|
1411
1434
|
onExit: N
|
|
1412
1435
|
},
|
|
1413
|
-
sx: { zIndex:
|
|
1436
|
+
sx: { zIndex: Yn },
|
|
1414
1437
|
children: /* @__PURE__ */ u("div", { children: [
|
|
1415
1438
|
/* @__PURE__ */ o(
|
|
1416
1439
|
Qt,
|
|
1417
1440
|
{
|
|
1418
|
-
onClose: (
|
|
1419
|
-
severity:
|
|
1441
|
+
onClose: (v) => P(v, "closeAlert"),
|
|
1442
|
+
severity: A.severity,
|
|
1420
1443
|
variant: "filled",
|
|
1421
|
-
icon:
|
|
1422
|
-
style:
|
|
1423
|
-
children:
|
|
1444
|
+
icon: A.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
|
|
1445
|
+
style: A.progressIndicator === "linear" ? Jn : void 0,
|
|
1446
|
+
children: A.message
|
|
1424
1447
|
}
|
|
1425
1448
|
),
|
|
1426
|
-
|
|
1449
|
+
A.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
|
|
1427
1450
|
] })
|
|
1428
1451
|
})
|
|
1429
1452
|
)
|
|
1430
1453
|
] });
|
|
1431
1454
|
}
|
|
1432
|
-
function
|
|
1455
|
+
function to() {
|
|
1433
1456
|
const e = Ze($t);
|
|
1434
1457
|
if (e === null)
|
|
1435
|
-
throw new
|
|
1458
|
+
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1436
1459
|
return e;
|
|
1437
1460
|
}
|
|
1438
|
-
const
|
|
1439
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(
|
|
1440
|
-
),
|
|
1461
|
+
const Ho = Q(
|
|
1462
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, k(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1463
|
+
), no = nn(), Wo = ({
|
|
1441
1464
|
children: e,
|
|
1442
1465
|
store: t
|
|
1443
|
-
}) => /* @__PURE__ */ o(pt, { store: t != null ? t :
|
|
1466
|
+
}) => /* @__PURE__ */ o(pt, { store: t != null ? t : no, children: e }), It = "domainCode";
|
|
1444
1467
|
var Ke;
|
|
1445
1468
|
const Ye = _(
|
|
1446
1469
|
JSON.parse((Ke = localStorage.getItem(It)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
@@ -1449,7 +1472,7 @@ const Ye = _(
|
|
|
1449
1472
|
(e, t, n) => {
|
|
1450
1473
|
t(Ye, n), localStorage.setItem(It, JSON.stringify({ domainCode: n }));
|
|
1451
1474
|
}
|
|
1452
|
-
),
|
|
1475
|
+
), oo = {
|
|
1453
1476
|
act: "ACT",
|
|
1454
1477
|
nsw: "NSW",
|
|
1455
1478
|
nt: "NT",
|
|
@@ -1461,10 +1484,10 @@ const Ye = _(
|
|
|
1461
1484
|
ag: "AG",
|
|
1462
1485
|
fedmps: "Fedmps",
|
|
1463
1486
|
"": ""
|
|
1464
|
-
},
|
|
1487
|
+
}, io = (e) => {
|
|
1465
1488
|
var t;
|
|
1466
|
-
return e === null ? "N/A" : (t =
|
|
1467
|
-
},
|
|
1489
|
+
return e === null ? "N/A" : (t = oo[e]) != null ? t : "";
|
|
1490
|
+
}, zo = ({
|
|
1468
1491
|
isLoading: e,
|
|
1469
1492
|
isOpen: t,
|
|
1470
1493
|
onClose: n,
|
|
@@ -1472,31 +1495,31 @@ const Ye = _(
|
|
|
1472
1495
|
applicationName: r,
|
|
1473
1496
|
handleLogout: s
|
|
1474
1497
|
}) => {
|
|
1475
|
-
const [c,
|
|
1476
|
-
|
|
1477
|
-
}),
|
|
1478
|
-
c && !
|
|
1498
|
+
const [c, l] = V(Ot), [d, p] = E(c), { enqueueSuccessNotification: C } = to(), f = i.length === 0, m = !!c && !i.includes(c) && !i.includes(d), g = !c || f || m, b = () => L(void 0, null, function* () {
|
|
1499
|
+
d ? (l(d), C(`Set domain to ${d}`), n()) : l("");
|
|
1500
|
+
}), y = () => L(void 0, null, function* () {
|
|
1501
|
+
c && !f && !m ? (p(c), n()) : g && s();
|
|
1479
1502
|
});
|
|
1480
|
-
let
|
|
1481
|
-
return
|
|
1482
|
-
|
|
1503
|
+
let S;
|
|
1504
|
+
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(
|
|
1505
|
+
kt,
|
|
1483
1506
|
{
|
|
1484
1507
|
isOpen: t,
|
|
1485
1508
|
dialogTitle: "Select an organisation",
|
|
1486
1509
|
primaryButton: {
|
|
1487
1510
|
text: "Confirm",
|
|
1488
|
-
onClick:
|
|
1489
|
-
disabled: !
|
|
1511
|
+
onClick: b,
|
|
1512
|
+
disabled: !d || f || m,
|
|
1490
1513
|
buttonColor: "primary"
|
|
1491
1514
|
},
|
|
1492
1515
|
secondaryButton: {
|
|
1493
1516
|
text: g ? "Logout" : "Cancel",
|
|
1494
|
-
onClick:
|
|
1517
|
+
onClick: y
|
|
1495
1518
|
},
|
|
1496
1519
|
onClose: g ? () => {
|
|
1497
1520
|
} : n,
|
|
1498
1521
|
children: [
|
|
1499
|
-
/* @__PURE__ */ u(
|
|
1522
|
+
/* @__PURE__ */ u(T, { marginBottom: 2, children: [
|
|
1500
1523
|
"Select the default organisation that you want to use with the ",
|
|
1501
1524
|
r,
|
|
1502
1525
|
"."
|
|
@@ -1507,9 +1530,9 @@ const Ye = _(
|
|
|
1507
1530
|
loading: e,
|
|
1508
1531
|
multiple: !1,
|
|
1509
1532
|
disableClearable: !1,
|
|
1510
|
-
value:
|
|
1533
|
+
value: d !== "" ? d : null,
|
|
1511
1534
|
onChange: (I, O) => p(O != null ? O : ""),
|
|
1512
|
-
getOptionLabel:
|
|
1535
|
+
getOptionLabel: io,
|
|
1513
1536
|
options: [...i],
|
|
1514
1537
|
renderInput: (I) => /* @__PURE__ */ o(
|
|
1515
1538
|
Se,
|
|
@@ -1517,8 +1540,8 @@ const Ye = _(
|
|
|
1517
1540
|
variant: "filled",
|
|
1518
1541
|
label: "Select organisation",
|
|
1519
1542
|
InputProps: k(a({}, I.InputProps), {
|
|
1520
|
-
endAdornment: /* @__PURE__ */ u(
|
|
1521
|
-
e ? /* @__PURE__ */ o(
|
|
1543
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1544
|
+
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1522
1545
|
I.InputProps.endAdornment
|
|
1523
1546
|
] })
|
|
1524
1547
|
})
|
|
@@ -1526,11 +1549,11 @@ const Ye = _(
|
|
|
1526
1549
|
)
|
|
1527
1550
|
}
|
|
1528
1551
|
),
|
|
1529
|
-
|
|
1552
|
+
S && /* @__PURE__ */ o(Yt, { error: !0, children: S })
|
|
1530
1553
|
]
|
|
1531
1554
|
}
|
|
1532
1555
|
);
|
|
1533
|
-
},
|
|
1556
|
+
}, Uo = at({
|
|
1534
1557
|
palette: {
|
|
1535
1558
|
primary: {
|
|
1536
1559
|
dark: "#00A651",
|
|
@@ -1581,7 +1604,7 @@ const Ye = _(
|
|
|
1581
1604
|
navBar: {
|
|
1582
1605
|
backgroundColor: "#E8E8E8"
|
|
1583
1606
|
}
|
|
1584
|
-
}),
|
|
1607
|
+
}), Go = at({
|
|
1585
1608
|
palette: {
|
|
1586
1609
|
primary: {
|
|
1587
1610
|
main: "#007236",
|
|
@@ -1675,63 +1698,63 @@ const Ye = _(
|
|
|
1675
1698
|
navBar: {
|
|
1676
1699
|
backgroundColor: "#E8E8E8"
|
|
1677
1700
|
}
|
|
1678
|
-
}),
|
|
1701
|
+
}), ro = {
|
|
1679
1702
|
domainCode: Ot,
|
|
1680
|
-
navBarOpen:
|
|
1703
|
+
navBarOpen: Z,
|
|
1681
1704
|
navBarWidthOpen: wt,
|
|
1682
1705
|
navBarWidthClosed: At,
|
|
1683
1706
|
titleText: ve,
|
|
1684
1707
|
topBarHeight: bt,
|
|
1685
1708
|
navBarTop: St
|
|
1686
|
-
},
|
|
1709
|
+
}, Vo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), ao = ({
|
|
1687
1710
|
initialValues: e,
|
|
1688
1711
|
children: t
|
|
1689
|
-
}) => (ut(e), /* @__PURE__ */ o(
|
|
1712
|
+
}) => (ut(e), /* @__PURE__ */ o(F, { children: t })), qo = Q(
|
|
1690
1713
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1691
|
-
|
|
1714
|
+
ao,
|
|
1692
1715
|
{
|
|
1693
1716
|
initialValues: Object.entries(e).map(
|
|
1694
1717
|
([n, i]) => [
|
|
1695
|
-
|
|
1718
|
+
ro[n],
|
|
1696
1719
|
i
|
|
1697
1720
|
]
|
|
1698
1721
|
),
|
|
1699
1722
|
children: t
|
|
1700
1723
|
}
|
|
1701
1724
|
)
|
|
1702
|
-
),
|
|
1725
|
+
), Xo = Q(() => ({ children: e }) => {
|
|
1703
1726
|
const t = new sn();
|
|
1704
1727
|
return /* @__PURE__ */ o(ln, { client: t, children: e });
|
|
1705
1728
|
});
|
|
1706
1729
|
export {
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1730
|
+
kt as AgDialog,
|
|
1731
|
+
No as AppLayout,
|
|
1732
|
+
Wo as AtomProvider,
|
|
1733
|
+
Ro as AuthGuard,
|
|
1711
1734
|
$t as Context,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1735
|
+
ke as ContextError,
|
|
1736
|
+
zo as DomainCodeDialog,
|
|
1737
|
+
Io as ExampleComponent,
|
|
1738
|
+
Lo as FetchAutocomplete,
|
|
1739
|
+
ao as HydrateAtoms,
|
|
1717
1740
|
ft as NAVBAR_WIDTH_CLOSED,
|
|
1718
1741
|
gt as NAVBAR_WIDTH_OPENED,
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1742
|
+
Fo as NavBar,
|
|
1743
|
+
Bo as NavBarDarkStyledList,
|
|
1744
|
+
Eo as NavBarLightStyledList,
|
|
1722
1745
|
Cn as NavBarProvider,
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1746
|
+
Po as PageLayout,
|
|
1747
|
+
eo as SaladBarProvider,
|
|
1748
|
+
Mo as SessionExpiryDialog,
|
|
1749
|
+
_o as SingleAutocomplete,
|
|
1750
|
+
no as atomStore,
|
|
1728
1751
|
vn as buildNavBarState,
|
|
1729
1752
|
Ot as domainCodeAtom,
|
|
1730
|
-
|
|
1753
|
+
Uo as fed21Theme,
|
|
1731
1754
|
Un as getAuth0Expiry,
|
|
1732
|
-
|
|
1755
|
+
Go as internalAgSystemsTheme,
|
|
1733
1756
|
q as navBarClasses,
|
|
1734
|
-
|
|
1757
|
+
Z as navBarOpenAtom,
|
|
1735
1758
|
St as navBarTopAtom,
|
|
1736
1759
|
At as navBarWidthClosedAtom,
|
|
1737
1760
|
wt as navBarWidthOpenAtom,
|
|
@@ -1740,12 +1763,12 @@ export {
|
|
|
1740
1763
|
Bn as topBarMiddleAtom,
|
|
1741
1764
|
yt as useAutocompleteOptions,
|
|
1742
1765
|
xn as useNavBar,
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1766
|
+
to as useSaladBar,
|
|
1767
|
+
Vo as withAtomProvider,
|
|
1768
|
+
To as withBrowserRouter,
|
|
1769
|
+
Oo as withNavBarProvider,
|
|
1770
|
+
qo as withOverrideDefaults,
|
|
1771
|
+
Xo as withQueryClient,
|
|
1772
|
+
Ho as withSaladBarProvider
|
|
1750
1773
|
};
|
|
1751
1774
|
//# sourceMappingURL=index.js.map
|