@australiangreens/ag-internal-components 0.0.98 → 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 +461 -437
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +2 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts.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
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
r(
|
|
26
|
+
l(n.next(d));
|
|
27
|
+
} catch (p) {
|
|
28
|
+
r(p);
|
|
29
29
|
}
|
|
30
|
-
}, c = (
|
|
30
|
+
}, c = (d) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
r(
|
|
32
|
+
l(n.throw(d));
|
|
33
|
+
} catch (p) {
|
|
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
|
|
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";
|
|
@@ -46,8 +46,8 @@ import { createHelper as Q } from "souvlaki";
|
|
|
46
46
|
import { BrowserRouter as Zt } from "react-router-dom";
|
|
47
47
|
import st from "@mui/material/List";
|
|
48
48
|
import { ArrowForward as lt, ArrowBack as ct, ViewHeadline as jt, Cancel as en, ArrowDropDown as tn } from "@mui/icons-material";
|
|
49
|
-
import { atom as _, useSetAtom as dt, useAtomValue as _e, useAtom as V, getDefaultStore as nn, Provider as
|
|
50
|
-
import { useHydrateAtoms as
|
|
49
|
+
import { atom as _, useSetAtom as dt, useAtomValue as _e, useAtom as V, getDefaultStore as nn, Provider as pt } from "jotai";
|
|
50
|
+
import { useHydrateAtoms as ut } from "jotai/utils";
|
|
51
51
|
import Me from "react-avatar";
|
|
52
52
|
import on from "autosuggest-highlight/match";
|
|
53
53
|
import rn from "autosuggest-highlight/parse";
|
|
@@ -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__ */
|
|
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
|
{
|
|
@@ -69,11 +69,11 @@ function Oo({ text: e }) {
|
|
|
69
69
|
children: "Hello I am a button"
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ u("p", { children: [
|
|
73
73
|
"This is some text: ",
|
|
74
74
|
/* @__PURE__ */ o("span", { children: e })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ u(je, { children: [
|
|
77
77
|
"This number will incremember when button pressed: ",
|
|
78
78
|
t
|
|
79
79
|
] })
|
|
@@ -87,7 +87,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
87
87
|
userInfoHolder: `${U}-userInfoHolder`,
|
|
88
88
|
settings: `${U}-settings`,
|
|
89
89
|
pieChartIcon: `${U}-pieChartIcon`
|
|
90
|
-
},
|
|
90
|
+
}, pn = R($, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -116,7 +116,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
116
116
|
color: "white",
|
|
117
117
|
backgroundColor: "black"
|
|
118
118
|
// backgroundColor: '#e8e8e8',
|
|
119
|
-
}),
|
|
119
|
+
}), un = () => a({
|
|
120
120
|
width: gt
|
|
121
121
|
}, mt()), hn = () => a({
|
|
122
122
|
width: ft
|
|
@@ -129,38 +129,38 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
129
129
|
boxSizing: "border-box",
|
|
130
130
|
zIndex: e.zIndex.drawer + 100
|
|
131
131
|
}, t && {
|
|
132
|
-
"& .MuiDrawer-paper":
|
|
132
|
+
"& .MuiDrawer-paper": un()
|
|
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,12 +237,12 @@ 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
|
}) {
|
|
244
244
|
const { open: n } = xn();
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ u(pn, { className: q.root, "data-testid": e, children: [
|
|
246
246
|
/* @__PURE__ */ o(Kt, {}),
|
|
247
247
|
/* @__PURE__ */ o(
|
|
248
248
|
gn,
|
|
@@ -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) && {
|
|
@@ -321,13 +321,13 @@ function Sn({
|
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */ o("div", { className:
|
|
326
|
-
/* @__PURE__ */ o("div", { className:
|
|
327
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
328
|
-
|
|
324
|
+
return /* @__PURE__ */ u(bn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
|
+
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
326
|
+
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u($, { className: B.titleSlider, children: [
|
|
327
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
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(
|
|
343
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
344
|
-
|
|
342
|
+
/* @__PURE__ */ o(T, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
343
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
|
|
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:
|
|
422
|
-
onOpened:
|
|
423
|
-
onClosed:
|
|
424
|
-
"data-testid":
|
|
425
|
-
navBarOpen:
|
|
420
|
+
debugOpacity: l = !1,
|
|
421
|
+
headerBoxProps: d = {},
|
|
422
|
+
onOpened: p,
|
|
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
|
-
return /* @__PURE__ */
|
|
430
|
-
|
|
429
|
+
return /* @__PURE__ */ u(
|
|
430
|
+
Dn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
|
-
onEntered: () =>
|
|
434
|
-
onExited: () =>
|
|
433
|
+
onEntered: () => p == null ? void 0 : p(),
|
|
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__ */
|
|
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__ */
|
|
453
|
-
c && /* @__PURE__ */
|
|
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,83 +512,83 @@ function No({
|
|
|
512
512
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
513
513
|
debugOpacity: s = !1,
|
|
514
514
|
pageContainerProps: c,
|
|
515
|
-
pageContentDataTestId:
|
|
516
|
-
topBarDataTestId:
|
|
517
|
-
navBarOpen:
|
|
518
|
-
navBarWidthOpen:
|
|
519
|
-
navBarWidthClosed:
|
|
515
|
+
pageContentDataTestId: l,
|
|
516
|
+
topBarDataTestId: d,
|
|
517
|
+
navBarOpen: p,
|
|
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
|
|
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__ */
|
|
556
|
+
return /* @__PURE__ */ u($, { children: [
|
|
557
557
|
N && /* @__PURE__ */ o(
|
|
558
558
|
We,
|
|
559
559
|
{
|
|
560
560
|
"data-testid": Tt,
|
|
561
561
|
anchor: "left",
|
|
562
|
-
open:
|
|
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
|
-
navBarOpen:
|
|
571
|
-
navBarWidthOpen:
|
|
572
|
-
navBarWidthClosed:
|
|
570
|
+
navBarOpen: p,
|
|
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,
|
|
580
580
|
anchor: "right",
|
|
581
|
-
open:
|
|
581
|
+
open: ue,
|
|
582
582
|
onClose: () => Oe(!1),
|
|
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
|
-
navBarOpen:
|
|
590
|
-
navBarWidthOpen:
|
|
591
|
-
navBarWidthClosed:
|
|
589
|
+
navBarOpen: p,
|
|
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
|
-
open:
|
|
603
|
-
width:
|
|
602
|
+
open: pe,
|
|
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
|
-
open:
|
|
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
|
),
|
|
@@ -617,16 +617,16 @@ function No({
|
|
|
617
617
|
yn,
|
|
618
618
|
k(a(a({}, W === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
|
-
open:
|
|
621
|
-
width:
|
|
620
|
+
open: pe,
|
|
621
|
+
width: v
|
|
622
622
|
}
|
|
623
623
|
} : {}), ye === "push" ? {
|
|
624
624
|
rightPanel: {
|
|
625
|
-
open:
|
|
625
|
+
open: ue,
|
|
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,
|
|
@@ -720,8 +720,8 @@ function Ln(e) {
|
|
|
720
720
|
const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Ve = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
721
721
|
function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
722
722
|
const r = se();
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
|
|
723
|
+
return /* @__PURE__ */ u(
|
|
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__ */
|
|
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,37 +785,37 @@ function Mn({
|
|
|
785
785
|
top: r,
|
|
786
786
|
middle: s,
|
|
787
787
|
bottom: c,
|
|
788
|
-
user:
|
|
789
|
-
domainCode:
|
|
790
|
-
useNewAvatar:
|
|
788
|
+
user: l,
|
|
789
|
+
domainCode: d,
|
|
790
|
+
useNewAvatar: p = !1
|
|
791
791
|
}) {
|
|
792
|
-
const
|
|
793
|
-
return /* @__PURE__ */ o(Fn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */
|
|
792
|
+
const C = vt(), f = dt(Z);
|
|
793
|
+
return /* @__PURE__ */ o(Fn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
|
|
794
794
|
Nn,
|
|
795
795
|
{
|
|
796
796
|
open: e,
|
|
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__ */
|
|
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__ */
|
|
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,8 +857,8 @@ function zn({
|
|
|
857
857
|
"data-testid": n,
|
|
858
858
|
middle: i
|
|
859
859
|
}) {
|
|
860
|
-
const r = dt(
|
|
861
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
860
|
+
const r = dt(Z), s = () => r((d) => !d), c = se(), l = vt();
|
|
861
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
|
|
862
862
|
je,
|
|
863
863
|
{
|
|
864
864
|
square: !0,
|
|
@@ -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,49 +900,50 @@ function Lo({
|
|
|
900
900
|
pageContentDataTestId: r,
|
|
901
901
|
topBarDataTestId: s,
|
|
902
902
|
navBarDataTestId: c,
|
|
903
|
-
navBarMiddle:
|
|
904
|
-
navBarBottom:
|
|
905
|
-
user:
|
|
906
|
-
domainCode:
|
|
903
|
+
navBarMiddle: l,
|
|
904
|
+
navBarBottom: d,
|
|
905
|
+
user: p,
|
|
906
|
+
domainCode: C,
|
|
907
|
+
useNewAvatar: f = !1
|
|
907
908
|
}) {
|
|
908
|
-
|
|
909
|
-
[
|
|
909
|
+
ut([
|
|
910
|
+
[Z, n != null ? n : !0],
|
|
910
911
|
[ve, t != null ? t : ""]
|
|
911
912
|
]);
|
|
912
|
-
const
|
|
913
|
-
return /* @__PURE__ */
|
|
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: [
|
|
914
915
|
/* @__PURE__ */ o(Ut, {}),
|
|
915
916
|
/* @__PURE__ */ o(
|
|
916
917
|
zn,
|
|
917
918
|
{
|
|
918
|
-
titleText:
|
|
919
|
+
titleText: y,
|
|
919
920
|
"data-testid": s,
|
|
920
|
-
height:
|
|
921
|
-
middle:
|
|
921
|
+
height: S,
|
|
922
|
+
middle: I
|
|
922
923
|
}
|
|
923
924
|
),
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ u($, { sx: { display: "flex" }, children: [
|
|
925
926
|
/* @__PURE__ */ o(
|
|
926
927
|
Mn,
|
|
927
928
|
{
|
|
928
|
-
open:
|
|
929
|
-
top:
|
|
930
|
-
middle:
|
|
931
|
-
bottom:
|
|
932
|
-
user:
|
|
933
|
-
domainCode:
|
|
934
|
-
widthOpen:
|
|
935
|
-
widthClosed:
|
|
936
|
-
offsetTop:
|
|
929
|
+
open: m,
|
|
930
|
+
top: O,
|
|
931
|
+
middle: l,
|
|
932
|
+
bottom: d,
|
|
933
|
+
user: p,
|
|
934
|
+
domainCode: C,
|
|
935
|
+
widthOpen: g,
|
|
936
|
+
widthClosed: b,
|
|
937
|
+
offsetTop: S,
|
|
937
938
|
"data-testid": c,
|
|
938
|
-
useNewAvatar:
|
|
939
|
+
useNewAvatar: f
|
|
939
940
|
}
|
|
940
941
|
),
|
|
941
942
|
/* @__PURE__ */ o(
|
|
942
943
|
Rn,
|
|
943
944
|
k(a({
|
|
944
945
|
"data-testid": r,
|
|
945
|
-
topBarHeight:
|
|
946
|
+
topBarHeight: S
|
|
946
947
|
}, i), {
|
|
947
948
|
children: e
|
|
948
949
|
})
|
|
@@ -950,7 +951,7 @@ function Lo({
|
|
|
950
951
|
] })
|
|
951
952
|
] });
|
|
952
953
|
}
|
|
953
|
-
const
|
|
954
|
+
const kt = ({
|
|
954
955
|
isOpen: e,
|
|
955
956
|
dialogTitle: t,
|
|
956
957
|
children: n,
|
|
@@ -958,48 +959,48 @@ const Dt = ({
|
|
|
958
959
|
primaryButton: r,
|
|
959
960
|
secondaryButton: s,
|
|
960
961
|
onClose: c,
|
|
961
|
-
sx:
|
|
962
|
-
"data-testid":
|
|
963
|
-
disableCloseOnBackdropOrEscape:
|
|
964
|
-
isLoading:
|
|
962
|
+
sx: l,
|
|
963
|
+
"data-testid": d,
|
|
964
|
+
disableCloseOnBackdropOrEscape: p = !1,
|
|
965
|
+
isLoading: C = !1
|
|
965
966
|
}) => {
|
|
966
|
-
var g,
|
|
967
|
-
const [
|
|
968
|
-
return /* @__PURE__ */
|
|
967
|
+
var g, b;
|
|
968
|
+
const [f, m] = E(!1);
|
|
969
|
+
return /* @__PURE__ */ u(
|
|
969
970
|
tt,
|
|
970
971
|
{
|
|
971
972
|
open: e,
|
|
972
|
-
onClose: (
|
|
973
|
-
|
|
973
|
+
onClose: (y, S) => L(void 0, null, function* () {
|
|
974
|
+
p && (S === "backdropClick" || S === "escapeKeyDown") || f || (s != null && s.onClick ? yield s.onClick() : c());
|
|
974
975
|
}),
|
|
975
976
|
fullWidth: !0,
|
|
976
977
|
maxWidth: i != null ? i : "xs",
|
|
977
|
-
"data-testid":
|
|
978
|
-
sx:
|
|
978
|
+
"data-testid": d,
|
|
979
|
+
sx: l,
|
|
979
980
|
children: [
|
|
980
|
-
|
|
981
|
+
C && /* @__PURE__ */ o(nt, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
981
982
|
/* @__PURE__ */ o(ot, { children: t }),
|
|
982
983
|
/* @__PURE__ */ o(it, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
984
985
|
/* @__PURE__ */ o(
|
|
985
986
|
ae,
|
|
986
987
|
{
|
|
987
988
|
onClick: (g = s == null ? void 0 : s.onClick) != null ? g : c,
|
|
988
989
|
"data-testid": s == null ? void 0 : s.testId,
|
|
989
|
-
disabled: (s == null ? void 0 : s.disabled) ||
|
|
990
|
+
disabled: (s == null ? void 0 : s.disabled) || f,
|
|
990
991
|
color: s == null ? void 0 : s.buttonColor,
|
|
991
|
-
children: (
|
|
992
|
+
children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
|
|
992
993
|
}
|
|
993
994
|
),
|
|
994
995
|
r && /* @__PURE__ */ o(
|
|
995
996
|
ae,
|
|
996
997
|
{
|
|
997
998
|
onClick: () => L(void 0, null, function* () {
|
|
998
|
-
var
|
|
999
|
-
|
|
999
|
+
var y;
|
|
1000
|
+
m(!0), yield (y = r.onClick) == null ? void 0 : y.call(r), m(!1);
|
|
1000
1001
|
}),
|
|
1001
1002
|
"data-testid": r.testId,
|
|
1002
|
-
disabled: r.disabled ||
|
|
1003
|
+
disabled: r.disabled || f,
|
|
1003
1004
|
color: r == null ? void 0 : r.buttonColor,
|
|
1004
1005
|
children: r.text
|
|
1005
1006
|
}
|
|
@@ -1020,7 +1021,7 @@ const Dt = ({
|
|
|
1020
1021
|
) : n(r),
|
|
1021
1022
|
queryKey: ["autocomplete", i, r]
|
|
1022
1023
|
});
|
|
1023
|
-
function
|
|
1024
|
+
function Lo({
|
|
1024
1025
|
lookup: e = () => L(this, null, function* () {
|
|
1025
1026
|
}),
|
|
1026
1027
|
enableHighlighting: t = !0,
|
|
@@ -1029,92 +1030,92 @@ function _o({
|
|
|
1029
1030
|
label: r,
|
|
1030
1031
|
value: s,
|
|
1031
1032
|
"data-testid": c,
|
|
1032
|
-
sx:
|
|
1033
|
-
boxSx:
|
|
1034
|
-
textFieldColor:
|
|
1035
|
-
textFieldVariant:
|
|
1036
|
-
loadingText:
|
|
1037
|
-
noOptionsText:
|
|
1033
|
+
sx: l,
|
|
1034
|
+
boxSx: d,
|
|
1035
|
+
textFieldColor: p,
|
|
1036
|
+
textFieldVariant: C = "filled",
|
|
1037
|
+
loadingText: f = "Loading...",
|
|
1038
|
+
noOptionsText: m = "No options",
|
|
1038
1039
|
popupIcon: g = /* @__PURE__ */ o(tn, {}),
|
|
1039
|
-
error:
|
|
1040
|
-
helperText:
|
|
1041
|
-
preLoadedOptions:
|
|
1040
|
+
error: b = !1,
|
|
1041
|
+
helperText: y = "",
|
|
1042
|
+
preLoadedOptions: S = void 0,
|
|
1042
1043
|
disablePortal: I = !1,
|
|
1043
1044
|
disableIconFlip: O = !1
|
|
1044
1045
|
}) {
|
|
1045
|
-
const [P, N] =
|
|
1046
|
-
const
|
|
1047
|
-
n(
|
|
1048
|
-
}, { 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({
|
|
1049
1050
|
inputValue: P,
|
|
1050
1051
|
label: r,
|
|
1051
1052
|
lookup: e,
|
|
1052
1053
|
minLength: i,
|
|
1053
|
-
preLoadedOptions:
|
|
1054
|
+
preLoadedOptions: S
|
|
1054
1055
|
}), W = P.length >= i;
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ u("div", { "data-testid": c, children: [
|
|
1056
1057
|
/* @__PURE__ */ o(
|
|
1057
1058
|
be,
|
|
1058
1059
|
{
|
|
1059
|
-
sx: a(a({},
|
|
1060
|
+
sx: a(a({}, l), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1060
1061
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1061
1062
|
disablePortal: I,
|
|
1062
1063
|
multiple: !0,
|
|
1063
1064
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
1064
1065
|
loading: W ? H : !1,
|
|
1065
|
-
options: [...s, ...
|
|
1066
|
+
options: [...s, ...A != null ? A : []],
|
|
1066
1067
|
filterSelectedOptions: !0,
|
|
1067
1068
|
includeInputInList: !0,
|
|
1068
1069
|
value: s,
|
|
1069
|
-
onChange: (h,
|
|
1070
|
-
n(
|
|
1070
|
+
onChange: (h, x, v) => {
|
|
1071
|
+
n(x, v, h);
|
|
1071
1072
|
},
|
|
1072
|
-
onInputChange: (h,
|
|
1073
|
-
noOptionsText: W ?
|
|
1074
|
-
loadingText:
|
|
1073
|
+
onInputChange: (h, x) => N(x),
|
|
1074
|
+
noOptionsText: W ? m : "Start typing to search",
|
|
1075
|
+
loadingText: f,
|
|
1075
1076
|
popupIcon: g,
|
|
1076
1077
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
1077
1078
|
Se,
|
|
1078
1079
|
k(a({}, h), {
|
|
1079
1080
|
label: r,
|
|
1080
1081
|
fullWidth: !0,
|
|
1081
|
-
variant:
|
|
1082
|
-
error:
|
|
1083
|
-
helperText:
|
|
1082
|
+
variant: C,
|
|
1083
|
+
error: b,
|
|
1084
|
+
helperText: y,
|
|
1084
1085
|
InputProps: k(a({}, h.InputProps), {
|
|
1085
|
-
endAdornment: /* @__PURE__ */
|
|
1086
|
-
H ? /* @__PURE__ */ o(
|
|
1086
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1087
|
+
H ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
1087
1088
|
h.InputProps.endAdornment
|
|
1088
1089
|
] })
|
|
1089
1090
|
}),
|
|
1090
1091
|
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
|
|
1091
|
-
onKeyDown: (
|
|
1092
|
-
(
|
|
1092
|
+
onKeyDown: (x) => {
|
|
1093
|
+
(x.key === "Backspace" || x.key === "Delete") && x.stopPropagation();
|
|
1093
1094
|
},
|
|
1094
|
-
color:
|
|
1095
|
+
color: p
|
|
1095
1096
|
})
|
|
1096
1097
|
),
|
|
1097
1098
|
renderTags: () => null,
|
|
1098
|
-
isOptionEqualToValue: (h,
|
|
1099
|
-
renderOption: (h,
|
|
1099
|
+
isOptionEqualToValue: (h, x) => h.id === x.id,
|
|
1100
|
+
renderOption: (h, x, v) => {
|
|
1100
1101
|
if (t) {
|
|
1101
|
-
const
|
|
1102
|
+
const w = on(x.label, v.inputValue, {
|
|
1102
1103
|
insideWords: !0,
|
|
1103
1104
|
findAllOccurrences: !0
|
|
1104
|
-
}), M = rn(
|
|
1105
|
+
}), M = rn(x.label, w);
|
|
1105
1106
|
return /* @__PURE__ */ xe(
|
|
1106
1107
|
"li",
|
|
1107
1108
|
k(a({}, h), {
|
|
1108
|
-
key:
|
|
1109
|
-
"data-testid": c ? `${c}:Autocomplete:option(${
|
|
1109
|
+
key: x.id,
|
|
1110
|
+
"data-testid": c ? `${c}:Autocomplete:option(${x.id.toString()})` : void 0
|
|
1110
1111
|
}),
|
|
1111
|
-
/* @__PURE__ */ o("div", { children: M.map((
|
|
1112
|
+
/* @__PURE__ */ o("div", { children: M.map((j, le) => /* @__PURE__ */ o(
|
|
1112
1113
|
"span",
|
|
1113
1114
|
{
|
|
1114
1115
|
style: {
|
|
1115
|
-
fontWeight:
|
|
1116
|
+
fontWeight: j.highlight ? 700 : 400
|
|
1116
1117
|
},
|
|
1117
|
-
children:
|
|
1118
|
+
children: j.text
|
|
1118
1119
|
},
|
|
1119
1120
|
le
|
|
1120
1121
|
)) })
|
|
@@ -1123,15 +1124,15 @@ function _o({
|
|
|
1123
1124
|
return /* @__PURE__ */ xe(
|
|
1124
1125
|
"li",
|
|
1125
1126
|
k(a({}, h), {
|
|
1126
|
-
key:
|
|
1127
|
-
"data-testid": c ? `${c}:option(${
|
|
1127
|
+
key: x.id,
|
|
1128
|
+
"data-testid": c ? `${c}:option(${x.id.toString()})` : void 0
|
|
1128
1129
|
}),
|
|
1129
|
-
|
|
1130
|
+
x.label
|
|
1130
1131
|
);
|
|
1131
1132
|
}
|
|
1132
1133
|
}
|
|
1133
1134
|
),
|
|
1134
|
-
s.length > 0 && /* @__PURE__ */ o(
|
|
1135
|
+
s.length > 0 && /* @__PURE__ */ o($, { sx: d, children: s.map((h) => /* @__PURE__ */ o(
|
|
1135
1136
|
Gt,
|
|
1136
1137
|
{
|
|
1137
1138
|
sx: {
|
|
@@ -1154,11 +1155,11 @@ function _o({
|
|
|
1154
1155
|
}
|
|
1155
1156
|
]
|
|
1156
1157
|
},
|
|
1157
|
-
children: /* @__PURE__ */ o(
|
|
1158
|
+
children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
|
|
1158
1159
|
}
|
|
1159
1160
|
),
|
|
1160
1161
|
"data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
|
|
1161
|
-
onDelete: (
|
|
1162
|
+
onDelete: (x) => D(x, h.id),
|
|
1162
1163
|
deleteIcon: /* @__PURE__ */ o(
|
|
1163
1164
|
en,
|
|
1164
1165
|
{
|
|
@@ -1170,7 +1171,7 @@ function _o({
|
|
|
1170
1171
|
)) })
|
|
1171
1172
|
] });
|
|
1172
1173
|
}
|
|
1173
|
-
const
|
|
1174
|
+
const _o = ({
|
|
1174
1175
|
lookup: e = () => L(void 0, null, function* () {
|
|
1175
1176
|
}),
|
|
1176
1177
|
onChange: t,
|
|
@@ -1179,61 +1180,61 @@ const Mo = ({
|
|
|
1179
1180
|
sx: r,
|
|
1180
1181
|
textFieldColor: s,
|
|
1181
1182
|
textFieldVariant: c = "filled",
|
|
1182
|
-
"data-testid":
|
|
1183
|
-
noOptionsText:
|
|
1184
|
-
minLength:
|
|
1185
|
-
disablePortal:
|
|
1186
|
-
preLoadedOptions:
|
|
1187
|
-
helperText:
|
|
1183
|
+
"data-testid": l,
|
|
1184
|
+
noOptionsText: d = "No options",
|
|
1185
|
+
minLength: p = 3,
|
|
1186
|
+
disablePortal: C = !1,
|
|
1187
|
+
preLoadedOptions: f,
|
|
1188
|
+
helperText: m = "",
|
|
1188
1189
|
disabled: g,
|
|
1189
|
-
popupIcon:
|
|
1190
|
-
disableIconFlip:
|
|
1190
|
+
popupIcon: b,
|
|
1191
|
+
disableIconFlip: y
|
|
1191
1192
|
}) => {
|
|
1192
|
-
const [
|
|
1193
|
-
inputValue:
|
|
1193
|
+
const [S, I] = E(""), { data: O, isLoading: P } = yt({
|
|
1194
|
+
inputValue: S,
|
|
1194
1195
|
label: n,
|
|
1195
1196
|
lookup: e,
|
|
1196
|
-
minLength:
|
|
1197
|
-
preLoadedOptions:
|
|
1198
|
-
}), N =
|
|
1199
|
-
return /* @__PURE__ */ o("div", { "data-testid":
|
|
1197
|
+
minLength: p != null ? p : 0,
|
|
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(
|
|
1200
1201
|
be,
|
|
1201
1202
|
{
|
|
1202
|
-
sx: a(a({}, r),
|
|
1203
|
-
"data-testid":
|
|
1203
|
+
sx: a(a({}, r), y ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1204
|
+
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1204
1205
|
loading: N ? P : !1,
|
|
1205
1206
|
options: O != null ? O : [],
|
|
1206
|
-
onChange: (
|
|
1207
|
-
t(
|
|
1207
|
+
onChange: (D, A) => {
|
|
1208
|
+
t(D, A);
|
|
1208
1209
|
},
|
|
1209
|
-
disablePortal:
|
|
1210
|
-
filterOptions: (
|
|
1210
|
+
disablePortal: C,
|
|
1211
|
+
filterOptions: (D) => D,
|
|
1211
1212
|
value: i,
|
|
1212
|
-
noOptionsText: N ?
|
|
1213
|
-
getOptionLabel: (
|
|
1214
|
-
popupIcon:
|
|
1215
|
-
renderInput: (
|
|
1213
|
+
noOptionsText: N ? d : "Start typing to search",
|
|
1214
|
+
getOptionLabel: (D) => D.label,
|
|
1215
|
+
popupIcon: b,
|
|
1216
|
+
renderInput: (D) => /* @__PURE__ */ o(
|
|
1216
1217
|
Se,
|
|
1217
1218
|
k(a({
|
|
1218
|
-
"data-testid":
|
|
1219
|
-
},
|
|
1219
|
+
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1220
|
+
}, D), {
|
|
1220
1221
|
variant: c,
|
|
1221
1222
|
label: n,
|
|
1222
1223
|
color: s,
|
|
1223
|
-
helperText:
|
|
1224
|
+
helperText: m
|
|
1224
1225
|
})
|
|
1225
1226
|
),
|
|
1226
|
-
isOptionEqualToValue: (
|
|
1227
|
-
onInputChange: (
|
|
1228
|
-
I(
|
|
1227
|
+
isOptionEqualToValue: (D, A) => D.id === A.id,
|
|
1228
|
+
onInputChange: (D, A) => {
|
|
1229
|
+
I(A);
|
|
1229
1230
|
},
|
|
1230
|
-
renderOption: (
|
|
1231
|
+
renderOption: (D, A) => /* @__PURE__ */ xe(
|
|
1231
1232
|
"li",
|
|
1232
|
-
k(a({},
|
|
1233
|
-
key:
|
|
1234
|
-
"data-testid":
|
|
1233
|
+
k(a({}, D), {
|
|
1234
|
+
key: A.id,
|
|
1235
|
+
"data-testid": l ? `${l}:Autocomplete:option(${A.id.toString()})` : void 0
|
|
1235
1236
|
}),
|
|
1236
|
-
|
|
1237
|
+
A.label
|
|
1237
1238
|
),
|
|
1238
1239
|
disabled: g
|
|
1239
1240
|
}
|
|
@@ -1251,37 +1252,37 @@ const Mo = ({
|
|
|
1251
1252
|
} catch (t) {
|
|
1252
1253
|
return -1;
|
|
1253
1254
|
}
|
|
1254
|
-
},
|
|
1255
|
+
}, Mo = ({
|
|
1255
1256
|
open: e = !1,
|
|
1256
1257
|
closeHandler: t,
|
|
1257
1258
|
setAuth0ExpiryTime: n
|
|
1258
1259
|
}) => {
|
|
1259
|
-
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* () {
|
|
1260
1261
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1261
|
-
}),
|
|
1262
|
+
}), d = () => L(void 0, null, function* () {
|
|
1262
1263
|
c(s + 1), t();
|
|
1263
1264
|
});
|
|
1264
|
-
return
|
|
1265
|
+
return K(() => {
|
|
1265
1266
|
(() => L(void 0, null, function* () {
|
|
1266
1267
|
if (s > 0) {
|
|
1267
|
-
const
|
|
1268
|
+
const m = yield r({ cacheMode: "off" }), g = Un(m) * 1e3;
|
|
1268
1269
|
n(g);
|
|
1269
1270
|
}
|
|
1270
1271
|
}))();
|
|
1271
1272
|
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1272
|
-
|
|
1273
|
+
kt,
|
|
1273
1274
|
{
|
|
1274
1275
|
isOpen: e,
|
|
1275
1276
|
primaryButton: {
|
|
1276
1277
|
text: "Continue",
|
|
1277
|
-
onClick:
|
|
1278
|
+
onClick: d,
|
|
1278
1279
|
disabled: !1,
|
|
1279
1280
|
testId: "PreferencesDialog",
|
|
1280
1281
|
buttonColor: "secondary"
|
|
1281
1282
|
},
|
|
1282
1283
|
secondaryButton: {
|
|
1283
1284
|
text: "Log out",
|
|
1284
|
-
onClick:
|
|
1285
|
+
onClick: l,
|
|
1285
1286
|
disabled: !1,
|
|
1286
1287
|
testId: "PreferencesDialog",
|
|
1287
1288
|
buttonColor: "secondary"
|
|
@@ -1297,49 +1298,72 @@ function Gn(e) {
|
|
|
1297
1298
|
return "error" in e;
|
|
1298
1299
|
}
|
|
1299
1300
|
function Vn(e) {
|
|
1300
|
-
return e.error === "access_denied";
|
|
1301
|
-
}
|
|
1302
|
-
function qn(e) {
|
|
1303
1301
|
var i;
|
|
1304
1302
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1305
1303
|
return t === "access_denied" && n.startsWith("You do not have the required authorization");
|
|
1306
1304
|
}
|
|
1307
|
-
function
|
|
1305
|
+
function qn(e) {
|
|
1308
1306
|
var i;
|
|
1309
1307
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1310
1308
|
return t === "access_denied" && n.startsWith("User did not authorize the request");
|
|
1311
1309
|
}
|
|
1312
|
-
function
|
|
1310
|
+
function Ro({
|
|
1313
1311
|
children: e,
|
|
1314
|
-
appName: t = "the app"
|
|
1312
|
+
appName: t = "the app",
|
|
1313
|
+
throwErrors: n,
|
|
1314
|
+
disableConsoleLogging: i = !1,
|
|
1315
|
+
onError: r = () => {
|
|
1316
|
+
}
|
|
1315
1317
|
}) {
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
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)
|
|
1319
1324
|
return;
|
|
1320
|
-
const
|
|
1325
|
+
const m = {
|
|
1321
1326
|
appState: {
|
|
1322
1327
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
1323
1328
|
}
|
|
1324
1329
|
};
|
|
1325
|
-
|
|
1326
|
-
}, [
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
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" }) })
|
|
1332
1356
|
] });
|
|
1333
1357
|
}
|
|
1334
|
-
return
|
|
1358
|
+
return s ? /* @__PURE__ */ o(F, { children: e }) : /* @__PURE__ */ o(dn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1335
1359
|
}
|
|
1336
|
-
const
|
|
1360
|
+
const Xn = {
|
|
1337
1361
|
autoHideDuration: 6e3,
|
|
1338
1362
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1339
1363
|
// The default is false. If we prefer timer to continue when window loses
|
|
1340
1364
|
// focus, change to true
|
|
1341
1365
|
disableWindowBlurListener: !1
|
|
1342
|
-
},
|
|
1366
|
+
}, Qn = {
|
|
1343
1367
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1344
1368
|
}, qe = {
|
|
1345
1369
|
message: "",
|
|
@@ -1347,18 +1371,18 @@ const Qn = {
|
|
|
1347
1371
|
variant: "standard",
|
|
1348
1372
|
progressIndicator: void 0
|
|
1349
1373
|
// Can use 'circular' or 'linear'
|
|
1350
|
-
}, Xe = 100, Qe = 2e3,
|
|
1374
|
+
}, Xe = 100, Qe = 2e3, Yn = 2e3, Kn = (() => {
|
|
1351
1375
|
let e = 0;
|
|
1352
1376
|
return () => (e += 1, e);
|
|
1353
|
-
})(),
|
|
1377
|
+
})(), Jn = {
|
|
1354
1378
|
borderBottomLeftRadius: "0px",
|
|
1355
1379
|
borderBottomRightRadius: "0px"
|
|
1356
|
-
},
|
|
1357
|
-
function
|
|
1380
|
+
}, Zn = {}, jn = {}, $t = Je(null);
|
|
1381
|
+
function eo(s) {
|
|
1358
1382
|
var c = s, {
|
|
1359
|
-
overrideState: e =
|
|
1360
|
-
overrideActions: t =
|
|
1361
|
-
shouldClose: n =
|
|
1383
|
+
overrideState: e = Zn,
|
|
1384
|
+
overrideActions: t = jn,
|
|
1385
|
+
shouldClose: n = Qn.shouldClose,
|
|
1362
1386
|
children: i
|
|
1363
1387
|
} = c, r = Ee(c, [
|
|
1364
1388
|
"overrideState",
|
|
@@ -1366,80 +1390,80 @@ function to(s) {
|
|
|
1366
1390
|
"shouldClose",
|
|
1367
1391
|
"children"
|
|
1368
1392
|
]);
|
|
1369
|
-
var
|
|
1370
|
-
const [{ open:
|
|
1371
|
-
|
|
1372
|
-
}, []), g =
|
|
1373
|
-
|
|
1374
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${
|
|
1375
|
-
),
|
|
1376
|
-
const
|
|
1377
|
-
key:
|
|
1378
|
-
}),
|
|
1379
|
-
return
|
|
1380
|
-
}, []),
|
|
1381
|
-
const
|
|
1382
|
-
if (
|
|
1383
|
-
return
|
|
1384
|
-
}, P = (
|
|
1385
|
-
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 });
|
|
1386
1410
|
}, N = () => {
|
|
1387
|
-
},
|
|
1388
|
-
|
|
1389
|
-
},
|
|
1390
|
-
"autoHideDuration" in
|
|
1391
|
-
const W = a(a({},
|
|
1392
|
-
open:
|
|
1393
|
-
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,
|
|
1394
1418
|
enqueueNotification: g,
|
|
1395
|
-
enqueueSuccessNotification:
|
|
1396
|
-
enqueueInfoNotification:
|
|
1397
|
-
enqueueWarningNotification:
|
|
1419
|
+
enqueueSuccessNotification: b,
|
|
1420
|
+
enqueueInfoNotification: y,
|
|
1421
|
+
enqueueWarningNotification: S,
|
|
1398
1422
|
enqueueErrorNotification: I,
|
|
1399
1423
|
removeNotification: O
|
|
1400
1424
|
}, e), t);
|
|
1401
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ u($t.Provider, { value: h, children: [
|
|
1402
1426
|
i,
|
|
1403
1427
|
/* @__PURE__ */ o(
|
|
1404
1428
|
Xt,
|
|
1405
1429
|
k(a(a({}, W), H), {
|
|
1406
|
-
open:
|
|
1430
|
+
open: l,
|
|
1407
1431
|
onClose: P,
|
|
1408
1432
|
TransitionProps: {
|
|
1409
|
-
onExited:
|
|
1433
|
+
onExited: D,
|
|
1410
1434
|
onExit: N
|
|
1411
1435
|
},
|
|
1412
|
-
sx: { zIndex:
|
|
1413
|
-
children: /* @__PURE__ */
|
|
1436
|
+
sx: { zIndex: Yn },
|
|
1437
|
+
children: /* @__PURE__ */ u("div", { children: [
|
|
1414
1438
|
/* @__PURE__ */ o(
|
|
1415
1439
|
Qt,
|
|
1416
1440
|
{
|
|
1417
|
-
onClose: (
|
|
1418
|
-
severity:
|
|
1441
|
+
onClose: (v) => P(v, "closeAlert"),
|
|
1442
|
+
severity: A.severity,
|
|
1419
1443
|
variant: "filled",
|
|
1420
|
-
icon:
|
|
1421
|
-
style:
|
|
1422
|
-
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
|
|
1423
1447
|
}
|
|
1424
1448
|
),
|
|
1425
|
-
|
|
1449
|
+
A.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
|
|
1426
1450
|
] })
|
|
1427
1451
|
})
|
|
1428
1452
|
)
|
|
1429
1453
|
] });
|
|
1430
1454
|
}
|
|
1431
|
-
function
|
|
1455
|
+
function to() {
|
|
1432
1456
|
const e = Ze($t);
|
|
1433
1457
|
if (e === null)
|
|
1434
|
-
throw new
|
|
1458
|
+
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1435
1459
|
return e;
|
|
1436
1460
|
}
|
|
1437
|
-
const
|
|
1438
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(
|
|
1439
|
-
),
|
|
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 = ({
|
|
1440
1464
|
children: e,
|
|
1441
1465
|
store: t
|
|
1442
|
-
}) => /* @__PURE__ */ o(
|
|
1466
|
+
}) => /* @__PURE__ */ o(pt, { store: t != null ? t : no, children: e }), It = "domainCode";
|
|
1443
1467
|
var Ke;
|
|
1444
1468
|
const Ye = _(
|
|
1445
1469
|
JSON.parse((Ke = localStorage.getItem(It)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
@@ -1448,7 +1472,7 @@ const Ye = _(
|
|
|
1448
1472
|
(e, t, n) => {
|
|
1449
1473
|
t(Ye, n), localStorage.setItem(It, JSON.stringify({ domainCode: n }));
|
|
1450
1474
|
}
|
|
1451
|
-
),
|
|
1475
|
+
), oo = {
|
|
1452
1476
|
act: "ACT",
|
|
1453
1477
|
nsw: "NSW",
|
|
1454
1478
|
nt: "NT",
|
|
@@ -1460,10 +1484,10 @@ const Ye = _(
|
|
|
1460
1484
|
ag: "AG",
|
|
1461
1485
|
fedmps: "Fedmps",
|
|
1462
1486
|
"": ""
|
|
1463
|
-
},
|
|
1487
|
+
}, io = (e) => {
|
|
1464
1488
|
var t;
|
|
1465
|
-
return e === null ? "N/A" : (t =
|
|
1466
|
-
},
|
|
1489
|
+
return e === null ? "N/A" : (t = oo[e]) != null ? t : "";
|
|
1490
|
+
}, zo = ({
|
|
1467
1491
|
isLoading: e,
|
|
1468
1492
|
isOpen: t,
|
|
1469
1493
|
onClose: n,
|
|
@@ -1471,31 +1495,31 @@ const Ye = _(
|
|
|
1471
1495
|
applicationName: r,
|
|
1472
1496
|
handleLogout: s
|
|
1473
1497
|
}) => {
|
|
1474
|
-
const [c,
|
|
1475
|
-
|
|
1476
|
-
}),
|
|
1477
|
-
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();
|
|
1478
1502
|
});
|
|
1479
|
-
let
|
|
1480
|
-
return
|
|
1481
|
-
|
|
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,
|
|
1482
1506
|
{
|
|
1483
1507
|
isOpen: t,
|
|
1484
1508
|
dialogTitle: "Select an organisation",
|
|
1485
1509
|
primaryButton: {
|
|
1486
1510
|
text: "Confirm",
|
|
1487
|
-
onClick:
|
|
1488
|
-
disabled: !
|
|
1511
|
+
onClick: b,
|
|
1512
|
+
disabled: !d || f || m,
|
|
1489
1513
|
buttonColor: "primary"
|
|
1490
1514
|
},
|
|
1491
1515
|
secondaryButton: {
|
|
1492
1516
|
text: g ? "Logout" : "Cancel",
|
|
1493
|
-
onClick:
|
|
1517
|
+
onClick: y
|
|
1494
1518
|
},
|
|
1495
1519
|
onClose: g ? () => {
|
|
1496
1520
|
} : n,
|
|
1497
1521
|
children: [
|
|
1498
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ u(T, { marginBottom: 2, children: [
|
|
1499
1523
|
"Select the default organisation that you want to use with the ",
|
|
1500
1524
|
r,
|
|
1501
1525
|
"."
|
|
@@ -1506,9 +1530,9 @@ const Ye = _(
|
|
|
1506
1530
|
loading: e,
|
|
1507
1531
|
multiple: !1,
|
|
1508
1532
|
disableClearable: !1,
|
|
1509
|
-
value:
|
|
1510
|
-
onChange: (I, O) =>
|
|
1511
|
-
getOptionLabel:
|
|
1533
|
+
value: d !== "" ? d : null,
|
|
1534
|
+
onChange: (I, O) => p(O != null ? O : ""),
|
|
1535
|
+
getOptionLabel: io,
|
|
1512
1536
|
options: [...i],
|
|
1513
1537
|
renderInput: (I) => /* @__PURE__ */ o(
|
|
1514
1538
|
Se,
|
|
@@ -1516,8 +1540,8 @@ const Ye = _(
|
|
|
1516
1540
|
variant: "filled",
|
|
1517
1541
|
label: "Select organisation",
|
|
1518
1542
|
InputProps: k(a({}, I.InputProps), {
|
|
1519
|
-
endAdornment: /* @__PURE__ */
|
|
1520
|
-
e ? /* @__PURE__ */ o(
|
|
1543
|
+
endAdornment: /* @__PURE__ */ u(F, { children: [
|
|
1544
|
+
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1521
1545
|
I.InputProps.endAdornment
|
|
1522
1546
|
] })
|
|
1523
1547
|
})
|
|
@@ -1525,11 +1549,11 @@ const Ye = _(
|
|
|
1525
1549
|
)
|
|
1526
1550
|
}
|
|
1527
1551
|
),
|
|
1528
|
-
|
|
1552
|
+
S && /* @__PURE__ */ o(Yt, { error: !0, children: S })
|
|
1529
1553
|
]
|
|
1530
1554
|
}
|
|
1531
1555
|
);
|
|
1532
|
-
},
|
|
1556
|
+
}, Uo = at({
|
|
1533
1557
|
palette: {
|
|
1534
1558
|
primary: {
|
|
1535
1559
|
dark: "#00A651",
|
|
@@ -1580,7 +1604,7 @@ const Ye = _(
|
|
|
1580
1604
|
navBar: {
|
|
1581
1605
|
backgroundColor: "#E8E8E8"
|
|
1582
1606
|
}
|
|
1583
|
-
}),
|
|
1607
|
+
}), Go = at({
|
|
1584
1608
|
palette: {
|
|
1585
1609
|
primary: {
|
|
1586
1610
|
main: "#007236",
|
|
@@ -1674,63 +1698,63 @@ const Ye = _(
|
|
|
1674
1698
|
navBar: {
|
|
1675
1699
|
backgroundColor: "#E8E8E8"
|
|
1676
1700
|
}
|
|
1677
|
-
}),
|
|
1701
|
+
}), ro = {
|
|
1678
1702
|
domainCode: Ot,
|
|
1679
|
-
navBarOpen:
|
|
1703
|
+
navBarOpen: Z,
|
|
1680
1704
|
navBarWidthOpen: wt,
|
|
1681
1705
|
navBarWidthClosed: At,
|
|
1682
1706
|
titleText: ve,
|
|
1683
1707
|
topBarHeight: bt,
|
|
1684
1708
|
navBarTop: St
|
|
1685
|
-
},
|
|
1709
|
+
}, Vo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), ao = ({
|
|
1686
1710
|
initialValues: e,
|
|
1687
1711
|
children: t
|
|
1688
|
-
}) => (
|
|
1712
|
+
}) => (ut(e), /* @__PURE__ */ o(F, { children: t })), qo = Q(
|
|
1689
1713
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1690
|
-
|
|
1714
|
+
ao,
|
|
1691
1715
|
{
|
|
1692
1716
|
initialValues: Object.entries(e).map(
|
|
1693
1717
|
([n, i]) => [
|
|
1694
|
-
|
|
1718
|
+
ro[n],
|
|
1695
1719
|
i
|
|
1696
1720
|
]
|
|
1697
1721
|
),
|
|
1698
1722
|
children: t
|
|
1699
1723
|
}
|
|
1700
1724
|
)
|
|
1701
|
-
),
|
|
1725
|
+
), Xo = Q(() => ({ children: e }) => {
|
|
1702
1726
|
const t = new sn();
|
|
1703
1727
|
return /* @__PURE__ */ o(ln, { client: t, children: e });
|
|
1704
1728
|
});
|
|
1705
1729
|
export {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1730
|
+
kt as AgDialog,
|
|
1731
|
+
No as AppLayout,
|
|
1732
|
+
Wo as AtomProvider,
|
|
1733
|
+
Ro as AuthGuard,
|
|
1710
1734
|
$t as Context,
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1735
|
+
ke as ContextError,
|
|
1736
|
+
zo as DomainCodeDialog,
|
|
1737
|
+
Io as ExampleComponent,
|
|
1738
|
+
Lo as FetchAutocomplete,
|
|
1739
|
+
ao as HydrateAtoms,
|
|
1716
1740
|
ft as NAVBAR_WIDTH_CLOSED,
|
|
1717
1741
|
gt as NAVBAR_WIDTH_OPENED,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1742
|
+
Fo as NavBar,
|
|
1743
|
+
Bo as NavBarDarkStyledList,
|
|
1744
|
+
Eo as NavBarLightStyledList,
|
|
1721
1745
|
Cn as NavBarProvider,
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1746
|
+
Po as PageLayout,
|
|
1747
|
+
eo as SaladBarProvider,
|
|
1748
|
+
Mo as SessionExpiryDialog,
|
|
1749
|
+
_o as SingleAutocomplete,
|
|
1750
|
+
no as atomStore,
|
|
1727
1751
|
vn as buildNavBarState,
|
|
1728
1752
|
Ot as domainCodeAtom,
|
|
1729
|
-
|
|
1753
|
+
Uo as fed21Theme,
|
|
1730
1754
|
Un as getAuth0Expiry,
|
|
1731
|
-
|
|
1755
|
+
Go as internalAgSystemsTheme,
|
|
1732
1756
|
q as navBarClasses,
|
|
1733
|
-
|
|
1757
|
+
Z as navBarOpenAtom,
|
|
1734
1758
|
St as navBarTopAtom,
|
|
1735
1759
|
At as navBarWidthClosedAtom,
|
|
1736
1760
|
wt as navBarWidthOpenAtom,
|
|
@@ -1739,12 +1763,12 @@ export {
|
|
|
1739
1763
|
Bn as topBarMiddleAtom,
|
|
1740
1764
|
yt as useAutocompleteOptions,
|
|
1741
1765
|
xn as useNavBar,
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
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
|
|
1749
1773
|
};
|
|
1750
1774
|
//# sourceMappingURL=index.js.map
|