@australiangreens/ag-internal-components 0.1.12 → 0.1.13
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/SingleAutocomplete/index.d.ts +1 -1
- package/dist/esm/index.js +426 -397
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Lt = Object.defineProperty, Mt = Object.defineProperties;
|
|
2
|
+
var Rt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var oe = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Oe = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ge = (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
|
+
Oe.call(t, n) && ge(e, n, t[n]);
|
|
8
8
|
if (oe)
|
|
9
9
|
for (var n of oe(t))
|
|
10
|
-
|
|
10
|
+
Be.call(t, n) && ge(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, y = (e, t) => Mt(e, Rt(t));
|
|
13
|
+
var Fe = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
|
-
|
|
16
|
+
Oe.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
17
|
if (e != null && oe)
|
|
18
18
|
for (var i of oe(e))
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
19
|
+
t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var Ne = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
23
|
var _ = (e, t, n) => new Promise((i, r) => {
|
|
24
24
|
var s = (l) => {
|
|
25
25
|
try {
|
|
@@ -37,25 +37,25 @@ var _ = (e, t, n) => new Promise((i, r) => {
|
|
|
37
37
|
c((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as u, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
40
|
-
import { useState as F, createContext as
|
|
41
|
-
import { Typography as T, Button as J, Paper as
|
|
42
|
-
import
|
|
43
|
-
import { styled as W, createTheme as
|
|
44
|
-
import { AgError as
|
|
40
|
+
import { useState as F, createContext as Ze, useCallback as se, useContext as je, useEffect as K, createElement as ve, useMemo as Ht, useRef as fe } from "react";
|
|
41
|
+
import { Typography as T, Button as J, Paper as et, Box as k, Drawer as Ae, styled as be, IconButton as Z, Container as tt, useTheme as le, useMediaQuery as Wt, Collapse as Ut, Avatar as Pe, Fade as zt, Skeleton as _e, Toolbar as Gt, Divider as Le, CssBaseline as Vt, Dialog as nt, LinearProgress as ot, DialogTitle as it, DialogContent as rt, DialogActions as at, Autocomplete as Se, TextField as ye, CircularProgress as Ie, Chip as qt, Tooltip as Xt, Stack as Qt, Snackbar as Yt, Alert as Kt, FormHelperText as Jt } from "@mui/material";
|
|
42
|
+
import Zt from "@mui/material/CssBaseline";
|
|
43
|
+
import { styled as W, createTheme as st, alpha as me } from "@mui/material/styles";
|
|
44
|
+
import { AgError as jt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as Q } from "souvlaki";
|
|
46
|
-
import { BrowserRouter as
|
|
47
|
-
import
|
|
48
|
-
import { ArrowForward as
|
|
49
|
-
import { atom as R, useSetAtom as
|
|
50
|
-
import { useHydrateAtoms as
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import { useQuery as
|
|
55
|
-
import { useAuth0 as
|
|
56
|
-
import { Buffer as
|
|
57
|
-
import
|
|
58
|
-
function
|
|
46
|
+
import { BrowserRouter as en } from "react-router-dom";
|
|
47
|
+
import lt from "@mui/material/List";
|
|
48
|
+
import { ArrowForward as ct, ArrowBack as dt, ViewHeadline as tn, Cancel as nn, ArrowDropDown as on } from "@mui/icons-material";
|
|
49
|
+
import { atom as R, useSetAtom as ut, useAtomValue as Me, useAtom as V, getDefaultStore as rn, Provider as pt } from "jotai";
|
|
50
|
+
import { useHydrateAtoms as ht } from "jotai/utils";
|
|
51
|
+
import Re from "react-avatar";
|
|
52
|
+
import an from "autosuggest-highlight/match";
|
|
53
|
+
import sn from "autosuggest-highlight/parse";
|
|
54
|
+
import { useQuery as ln, QueryClient as cn, QueryClientProvider as dn } from "@tanstack/react-query";
|
|
55
|
+
import { useAuth0 as gt } from "@auth0/auth0-react";
|
|
56
|
+
import { Buffer as un } from "buffer";
|
|
57
|
+
import pn from "@mui/material/Skeleton";
|
|
58
|
+
function Oo({ text: e }) {
|
|
59
59
|
const [t, n] = F(0);
|
|
60
60
|
return /* @__PURE__ */ u(N, { children: [
|
|
61
61
|
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
@@ -73,13 +73,13 @@ function Eo({ text: e }) {
|
|
|
73
73
|
"This is some text: ",
|
|
74
74
|
/* @__PURE__ */ o("span", { children: e })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */ u(
|
|
76
|
+
/* @__PURE__ */ u(et, { children: [
|
|
77
77
|
"This number will incremember when button pressed: ",
|
|
78
78
|
t
|
|
79
79
|
] })
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const ft = 330, mt = 73, z = "Navbar", q = {
|
|
83
83
|
root: `${z}-root`,
|
|
84
84
|
menuButton: `${z}-menuButton`,
|
|
85
85
|
hide: `${z}-hide`,
|
|
@@ -87,7 +87,7 @@ const gt = 330, ft = 73, z = "Navbar", q = {
|
|
|
87
87
|
userInfoHolder: `${z}-userInfoHolder`,
|
|
88
88
|
settings: `${z}-settings`,
|
|
89
89
|
pieChartIcon: `${z}-pieChartIcon`
|
|
90
|
-
},
|
|
90
|
+
}, hn = W(k, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -108,7 +108,7 @@ const gt = 330, ft = 73, z = "Navbar", q = {
|
|
|
108
108
|
marginTop: "64px",
|
|
109
109
|
marginBottom: "16px"
|
|
110
110
|
}
|
|
111
|
-
})),
|
|
111
|
+
})), Ct = () => ({
|
|
112
112
|
position: "absolute",
|
|
113
113
|
height: "100%",
|
|
114
114
|
overflowX: "hidden",
|
|
@@ -116,51 +116,51 @@ const gt = 330, ft = 73, z = "Navbar", q = {
|
|
|
116
116
|
color: "white",
|
|
117
117
|
backgroundColor: "black"
|
|
118
118
|
// backgroundColor: '#e8e8e8',
|
|
119
|
-
}),
|
|
120
|
-
width: gt
|
|
121
|
-
}, mt()), gn = () => a({
|
|
119
|
+
}), gn = () => a({
|
|
122
120
|
width: ft
|
|
123
|
-
},
|
|
121
|
+
}, Ct()), fn = () => a({
|
|
122
|
+
width: mt
|
|
123
|
+
}, Ct()), mn = W(Ae, {
|
|
124
124
|
shouldForwardProp: (e) => e !== "open"
|
|
125
125
|
})(({ theme: e, open: t }) => a(a({
|
|
126
|
-
width: t ?
|
|
126
|
+
width: t ? ft : mt,
|
|
127
127
|
flexShrink: 0,
|
|
128
128
|
whiteSpace: "nowrap",
|
|
129
129
|
boxSizing: "border-box",
|
|
130
130
|
zIndex: e.zIndex.drawer + 100
|
|
131
131
|
}, t && {
|
|
132
|
-
"& .MuiDrawer-paper": hn()
|
|
133
|
-
}), !t && {
|
|
134
132
|
"& .MuiDrawer-paper": gn()
|
|
133
|
+
}), !t && {
|
|
134
|
+
"& .MuiDrawer-paper": fn()
|
|
135
135
|
}));
|
|
136
|
-
class
|
|
136
|
+
class ke extends jt {
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
overrideState: e =
|
|
141
|
-
overrideActions: t =
|
|
138
|
+
Ne(ke, "errorName", "ContextError");
|
|
139
|
+
const xt = Ze(null), Cn = {}, xn = {}, vn = ({
|
|
140
|
+
overrideState: e = Cn,
|
|
141
|
+
overrideActions: t = xn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
|
-
const [{ open: i }, r] = F({ open: !0 }), s =
|
|
144
|
+
const [{ open: i }, r] = F({ open: !0 }), s = se((l) => {
|
|
145
145
|
r({ open: l });
|
|
146
|
-
}, []), d =
|
|
147
|
-
r((l) =>
|
|
146
|
+
}, []), d = se(() => {
|
|
147
|
+
r((l) => y(a({}, l), { open: !l.open }));
|
|
148
148
|
}, []), c = a(a({
|
|
149
149
|
open: i,
|
|
150
150
|
setOpen: s,
|
|
151
151
|
toggleOpen: d
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(
|
|
154
|
-
},
|
|
155
|
-
const e =
|
|
153
|
+
return /* @__PURE__ */ o(xt.Provider, { value: c, children: n });
|
|
154
|
+
}, wn = () => {
|
|
155
|
+
const e = je(xt);
|
|
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
|
+
}, An = (e = {}) => a({
|
|
160
160
|
open: !0
|
|
161
|
-
}, e),
|
|
162
|
-
(e =
|
|
163
|
-
),
|
|
161
|
+
}, e), Bo = Q(
|
|
162
|
+
(e = An(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(vn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
+
), Fo = Q(() => ({ children: e }) => /* @__PURE__ */ o(en, { children: e })), He = 7, No = W(lt)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -169,7 +169,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
169
169
|
"& .MuiListItemButton-root": {
|
|
170
170
|
" .MuiListItemIcon-root": {
|
|
171
171
|
color: "white",
|
|
172
|
-
padding: `${
|
|
172
|
+
padding: `${He}px`
|
|
173
173
|
},
|
|
174
174
|
// Focus state
|
|
175
175
|
"&.Mui-focusVisible": {
|
|
@@ -180,7 +180,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
180
180
|
borderLeftStyle: "solid",
|
|
181
181
|
borderLeftWidth: "7px",
|
|
182
182
|
borderLeftColor: e.palette.primary.main,
|
|
183
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
183
|
+
paddingLeft: `calc(${e.spacing(2)} - ${He}px)`
|
|
184
184
|
},
|
|
185
185
|
// Hover state
|
|
186
186
|
"&:hover": {
|
|
@@ -198,7 +198,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
198
198
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
199
199
|
// },
|
|
200
200
|
}
|
|
201
|
-
})),
|
|
201
|
+
})), We = 7, Po = W(lt)(({ theme: e }) => ({
|
|
202
202
|
backgroundColor: "#e8e8e8",
|
|
203
203
|
color: "inherit",
|
|
204
204
|
"& .MuiListItem-root": {
|
|
@@ -207,7 +207,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
207
207
|
"& .MuiListItemButton-root": {
|
|
208
208
|
" .MuiListItemIcon-root": {
|
|
209
209
|
color: "inherit",
|
|
210
|
-
padding: `${
|
|
210
|
+
padding: `${We}px`
|
|
211
211
|
},
|
|
212
212
|
// Focus state
|
|
213
213
|
"&.Mui-focusVisible": {
|
|
@@ -218,7 +218,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
218
218
|
borderLeftStyle: "solid",
|
|
219
219
|
borderLeftWidth: "7px",
|
|
220
220
|
borderLeftColor: e.palette.primary.main,
|
|
221
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
221
|
+
paddingLeft: `calc(${e.spacing(2)} - ${We}px)`
|
|
222
222
|
},
|
|
223
223
|
// Hover state
|
|
224
224
|
"&:hover": {
|
|
@@ -237,15 +237,15 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
237
237
|
// },
|
|
238
238
|
}
|
|
239
239
|
}));
|
|
240
|
-
function
|
|
240
|
+
function _o({
|
|
241
241
|
"data-testid": e,
|
|
242
242
|
children: t
|
|
243
243
|
}) {
|
|
244
|
-
const { open: n } =
|
|
245
|
-
return /* @__PURE__ */ u(
|
|
246
|
-
/* @__PURE__ */ o(
|
|
244
|
+
const { open: n } = wn();
|
|
245
|
+
return /* @__PURE__ */ u(hn, { className: q.root, "data-testid": e, children: [
|
|
246
|
+
/* @__PURE__ */ o(Zt, {}),
|
|
247
247
|
/* @__PURE__ */ o(
|
|
248
|
-
|
|
248
|
+
mn,
|
|
249
249
|
{
|
|
250
250
|
variant: "permanent",
|
|
251
251
|
anchor: "left",
|
|
@@ -256,14 +256,14 @@ function Po({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const
|
|
259
|
+
const bn = 24, Sn = 64, G = "TopBar", B = {
|
|
260
260
|
topStripe: `${G}-topStripe`,
|
|
261
261
|
titleBar: `${G}-titleBar`,
|
|
262
262
|
titleSlider: `${G}-titleSlider`,
|
|
263
263
|
titleText: `${G}-titleText`,
|
|
264
264
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
265
265
|
rightPanelButton: `${G}-leftPanelButton`
|
|
266
|
-
},
|
|
266
|
+
}, yn = be("div", {
|
|
267
267
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
268
268
|
name: G
|
|
269
269
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -272,12 +272,12 @@ const An = 24, bn = 64, G = "TopBar", B = {
|
|
|
272
272
|
width: "100%",
|
|
273
273
|
[`& .${B.topStripe}`]: {
|
|
274
274
|
width: "100%",
|
|
275
|
-
height: `${
|
|
275
|
+
height: `${bn}px`,
|
|
276
276
|
backgroundColor: e.palette.primary.main
|
|
277
277
|
},
|
|
278
278
|
[`& .${B.titleBar}`]: {
|
|
279
279
|
backgroundColor: e.palette.primary.light,
|
|
280
|
-
height: `${
|
|
280
|
+
height: `${Sn}px`,
|
|
281
281
|
padding: e.spacing(0, 3),
|
|
282
282
|
width: "100%"
|
|
283
283
|
},
|
|
@@ -321,7 +321,7 @@ function In({
|
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */ u(
|
|
324
|
+
return /* @__PURE__ */ u(yn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
325
|
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
326
326
|
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u(k, { className: B.titleSlider, children: [
|
|
327
327
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
@@ -335,7 +335,7 @@ function In({
|
|
|
335
335
|
size: "large",
|
|
336
336
|
children: [
|
|
337
337
|
" ",
|
|
338
|
-
/* @__PURE__ */ o(
|
|
338
|
+
/* @__PURE__ */ o(ct, {})
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
),
|
|
@@ -351,14 +351,14 @@ function In({
|
|
|
351
351
|
size: "large",
|
|
352
352
|
children: [
|
|
353
353
|
" ",
|
|
354
|
-
/* @__PURE__ */ o(
|
|
354
|
+
/* @__PURE__ */ o(dt, {})
|
|
355
355
|
]
|
|
356
356
|
}
|
|
357
357
|
)
|
|
358
358
|
] }) })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const vt = 400, kn = be(Ae, {
|
|
362
362
|
shouldForwardProp: (e) => (
|
|
363
363
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
364
364
|
![
|
|
@@ -388,9 +388,9 @@ const xt = 400, Dn = Ae(we, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
),
|
|
391
|
+
), Dn = be(k, {
|
|
392
392
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
393
|
-
})(({ theme: e, anchor: t }) =>
|
|
393
|
+
})(({ theme: e, anchor: t }) => y(a({
|
|
394
394
|
display: "flex",
|
|
395
395
|
alignItems: "center",
|
|
396
396
|
padding: e.spacing(2)
|
|
@@ -408,14 +408,14 @@ const xt = 400, Dn = Ae(we, {
|
|
|
408
408
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
409
409
|
}
|
|
410
410
|
}));
|
|
411
|
-
function
|
|
411
|
+
function Ue({
|
|
412
412
|
children: e,
|
|
413
413
|
anchor: t = "left",
|
|
414
414
|
open: n,
|
|
415
415
|
onClose: i = () => {
|
|
416
416
|
},
|
|
417
417
|
titleText: r = "",
|
|
418
|
-
width: s =
|
|
418
|
+
width: s = vt,
|
|
419
419
|
showCloseArrow: d = !0,
|
|
420
420
|
debugOpacity: c = !1,
|
|
421
421
|
headerBoxProps: l = {},
|
|
@@ -427,7 +427,7 @@ function We({
|
|
|
427
427
|
navBarWidthClosed: S = 0
|
|
428
428
|
}) {
|
|
429
429
|
return /* @__PURE__ */ u(
|
|
430
|
-
|
|
430
|
+
kn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
433
|
onEntered: () => p == null ? void 0 : p(),
|
|
@@ -443,15 +443,15 @@ function We({
|
|
|
443
443
|
navBarWidthOpen: h,
|
|
444
444
|
navBarWidthClosed: S,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
446
|
+
/* @__PURE__ */ o(Dn, y(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(N, { children: [
|
|
447
447
|
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
448
|
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
449
|
-
/* @__PURE__ */ o(
|
|
449
|
+
/* @__PURE__ */ o(dt, { "data-testid": "arrowbackicon" }),
|
|
450
450
|
" "
|
|
451
451
|
] })
|
|
452
452
|
] }) : /* @__PURE__ */ u(N, { children: [
|
|
453
453
|
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
454
|
-
/* @__PURE__ */ o(
|
|
454
|
+
/* @__PURE__ */ o(ct, {}),
|
|
455
455
|
" "
|
|
456
456
|
] }),
|
|
457
457
|
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
@@ -461,7 +461,7 @@ function We({
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const $n = W(k, {
|
|
465
465
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
466
466
|
name: "PanelAwareMargins"
|
|
467
467
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -484,17 +484,17 @@ const yn = W(k, {
|
|
|
484
484
|
}),
|
|
485
485
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
486
486
|
});
|
|
487
|
-
}),
|
|
487
|
+
}), Tn = W(tt, {
|
|
488
488
|
name: "PageContainer"
|
|
489
489
|
})(({ theme: e }) => ({
|
|
490
490
|
// Horizontal padding comes from the Container's gutter
|
|
491
491
|
paddingTop: e.spacing(3),
|
|
492
492
|
paddingBottom: e.spacing(3)
|
|
493
493
|
// TODO: Remove max width
|
|
494
|
-
})),
|
|
494
|
+
})), Ce = !1, xe = !1, ie = {
|
|
495
495
|
titleText: "",
|
|
496
496
|
flavour: "push",
|
|
497
|
-
width:
|
|
497
|
+
width: vt,
|
|
498
498
|
arrowButtons: "both",
|
|
499
499
|
startOpen: !1,
|
|
500
500
|
open: void 0,
|
|
@@ -504,7 +504,7 @@ const yn = W(k, {
|
|
|
504
504
|
onClosed: void 0,
|
|
505
505
|
dataTestId: void 0
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function Lo({
|
|
508
508
|
children: e,
|
|
509
509
|
titleText: t = "",
|
|
510
510
|
leftPanel: n,
|
|
@@ -518,9 +518,9 @@ function _o({
|
|
|
518
518
|
navBarWidthOpen: g,
|
|
519
519
|
navBarWidthClosed: m
|
|
520
520
|
}) {
|
|
521
|
-
const [w, h] = F(
|
|
521
|
+
const [w, h] = F(Ce), [S, b] = F(xe), [I, $] = F(Ce), [E, O] = F(xe), L = n !== void 0, P = i !== void 0, {
|
|
522
522
|
titleText: v,
|
|
523
|
-
content:
|
|
523
|
+
content: D,
|
|
524
524
|
flavour: M,
|
|
525
525
|
open: f,
|
|
526
526
|
onChangeOpen: C,
|
|
@@ -528,68 +528,68 @@ function _o({
|
|
|
528
528
|
arrowButtons: A,
|
|
529
529
|
startOpen: H,
|
|
530
530
|
onOpened: ee,
|
|
531
|
-
onClosed:
|
|
532
|
-
dataTestId:
|
|
531
|
+
onClosed: ce,
|
|
532
|
+
dataTestId: Ot
|
|
533
533
|
} = n ? a(a({}, ie), n) : a({}, ie), {
|
|
534
|
-
titleText:
|
|
535
|
-
content:
|
|
536
|
-
flavour:
|
|
537
|
-
open:
|
|
538
|
-
onChangeOpen:
|
|
539
|
-
width:
|
|
534
|
+
titleText: Bt,
|
|
535
|
+
content: Ft,
|
|
536
|
+
flavour: De,
|
|
537
|
+
open: de,
|
|
538
|
+
onChangeOpen: $e,
|
|
539
|
+
width: ue,
|
|
540
540
|
arrowButtons: te,
|
|
541
541
|
startOpen: ne,
|
|
542
|
-
onOpened:
|
|
543
|
-
onClosed:
|
|
544
|
-
dataTestId:
|
|
542
|
+
onOpened: Nt,
|
|
543
|
+
onClosed: Pt,
|
|
544
|
+
dataTestId: _t
|
|
545
545
|
} = i ? a(a({}, ie), i) : a({}, ie);
|
|
546
546
|
K(() => {
|
|
547
|
-
H !==
|
|
547
|
+
H !== Ce && (h(H), $(H));
|
|
548
548
|
}, [H]), K(() => {
|
|
549
|
-
ne !==
|
|
549
|
+
ne !== xe && (b(ne), O(ne));
|
|
550
550
|
}, [ne]);
|
|
551
|
-
const
|
|
551
|
+
const pe = f === void 0 ? w : f, he = de === void 0 ? S : de, Te = (U) => {
|
|
552
552
|
f === void 0 && (h(U), r && P && (U ? (b(!1), O(S)) : b(E))), C && C(U);
|
|
553
|
-
},
|
|
554
|
-
|
|
553
|
+
}, Ee = (U) => {
|
|
554
|
+
de === void 0 && (b(U), r && L && (U ? (h(!1), $(w)) : h(I))), $e && $e(U);
|
|
555
555
|
};
|
|
556
556
|
return /* @__PURE__ */ u(k, { children: [
|
|
557
557
|
L && /* @__PURE__ */ o(
|
|
558
|
-
|
|
558
|
+
Ue,
|
|
559
559
|
{
|
|
560
|
-
"data-testid":
|
|
560
|
+
"data-testid": Ot,
|
|
561
561
|
anchor: "left",
|
|
562
|
-
open:
|
|
563
|
-
onClose: () =>
|
|
562
|
+
open: pe,
|
|
563
|
+
onClose: () => Te(!1),
|
|
564
564
|
width: x,
|
|
565
565
|
titleText: v,
|
|
566
566
|
debugOpacity: s,
|
|
567
567
|
showCloseArrow: A === "both" || A === "close",
|
|
568
568
|
onOpened: ee,
|
|
569
|
-
onClosed:
|
|
569
|
+
onClosed: ce,
|
|
570
570
|
navBarOpen: p,
|
|
571
571
|
navBarWidthOpen: g,
|
|
572
572
|
navBarWidthClosed: m,
|
|
573
|
-
children:
|
|
573
|
+
children: D
|
|
574
574
|
}
|
|
575
575
|
),
|
|
576
576
|
P && /* @__PURE__ */ o(
|
|
577
|
-
|
|
577
|
+
Ue,
|
|
578
578
|
{
|
|
579
|
-
"data-testid":
|
|
579
|
+
"data-testid": _t,
|
|
580
580
|
anchor: "right",
|
|
581
|
-
open:
|
|
582
|
-
onClose: () =>
|
|
583
|
-
width:
|
|
584
|
-
titleText:
|
|
581
|
+
open: he,
|
|
582
|
+
onClose: () => Ee(!1),
|
|
583
|
+
width: ue,
|
|
584
|
+
titleText: Bt,
|
|
585
585
|
debugOpacity: s,
|
|
586
586
|
showCloseArrow: te === "both" || te === "close",
|
|
587
|
-
onOpened:
|
|
588
|
-
onClosed:
|
|
587
|
+
onOpened: Nt,
|
|
588
|
+
onClosed: Pt,
|
|
589
589
|
navBarOpen: p,
|
|
590
590
|
navBarWidthOpen: g,
|
|
591
591
|
navBarWidthClosed: m,
|
|
592
|
-
children:
|
|
592
|
+
children: Ft
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ o(
|
|
@@ -599,43 +599,43 @@ function _o({
|
|
|
599
599
|
"data-testid": l
|
|
600
600
|
}, L && M === "push" ? {
|
|
601
601
|
leftPanel: {
|
|
602
|
-
open:
|
|
602
|
+
open: pe,
|
|
603
603
|
width: x,
|
|
604
|
-
onOpen: () =>
|
|
604
|
+
onOpen: () => Te(!0),
|
|
605
605
|
showOpenArrow: A === "both" || A === "open"
|
|
606
606
|
}
|
|
607
|
-
} : {}), P &&
|
|
607
|
+
} : {}), P && De === "push" ? {
|
|
608
608
|
rightPanel: {
|
|
609
|
-
open:
|
|
610
|
-
width:
|
|
611
|
-
onOpen: () =>
|
|
609
|
+
open: he,
|
|
610
|
+
width: ue,
|
|
611
|
+
onOpen: () => Ee(!0),
|
|
612
612
|
showOpenArrow: te === "both" || te === "open"
|
|
613
613
|
}
|
|
614
614
|
} : {})
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ o(
|
|
617
|
-
|
|
618
|
-
|
|
617
|
+
$n,
|
|
618
|
+
y(a(a({}, M === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
|
-
open:
|
|
620
|
+
open: pe,
|
|
621
621
|
width: x
|
|
622
622
|
}
|
|
623
|
-
} : {}),
|
|
623
|
+
} : {}), De === "push" ? {
|
|
624
624
|
rightPanel: {
|
|
625
|
-
open:
|
|
626
|
-
width:
|
|
625
|
+
open: he,
|
|
626
|
+
width: ue
|
|
627
627
|
}
|
|
628
628
|
} : {}), {
|
|
629
|
-
children: /* @__PURE__ */ o(
|
|
629
|
+
children: /* @__PURE__ */ o(Tn, y(a({ "data-testid": c }, d), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
633
633
|
}
|
|
634
|
-
const
|
|
635
|
-
const e =
|
|
636
|
-
return
|
|
637
|
-
},
|
|
638
|
-
function
|
|
634
|
+
const wt = () => {
|
|
635
|
+
const e = le();
|
|
636
|
+
return Wt(e.breakpoints.down("sm"));
|
|
637
|
+
}, En = 64, On = 72, Bn = 256, j = R(!0), At = R(Bn), bt = R(On), we = R(""), Fn = R(void 0), St = R(En), yt = R(void 0);
|
|
638
|
+
function Nn({ links: e }) {
|
|
639
639
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
640
640
|
}
|
|
641
641
|
const re = "Navbar", Y = {
|
|
@@ -646,7 +646,7 @@ const re = "Navbar", Y = {
|
|
|
646
646
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
647
647
|
// settings: `${PREFIX}-settings`,
|
|
648
648
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
649
|
-
},
|
|
649
|
+
}, Pn = W(k, { name: "NavBar" })(({ theme: e }) => ({
|
|
650
650
|
[`&.${Y.root}`]: {
|
|
651
651
|
display: "flex"
|
|
652
652
|
},
|
|
@@ -668,10 +668,10 @@ const re = "Navbar", Y = {
|
|
|
668
668
|
})), X = (e, t, n) => e.transitions.create(t, {
|
|
669
669
|
easing: e.transitions.easing.sharp,
|
|
670
670
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
671
|
-
}),
|
|
672
|
-
const t =
|
|
671
|
+
}), _n = (e) => {
|
|
672
|
+
const t = le();
|
|
673
673
|
return /* @__PURE__ */ o(
|
|
674
|
-
|
|
674
|
+
Ut,
|
|
675
675
|
a({
|
|
676
676
|
easing: t.transitions.easing.sharp,
|
|
677
677
|
timeout: {
|
|
@@ -688,13 +688,13 @@ const re = "Navbar", Y = {
|
|
|
688
688
|
backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
|
|
689
689
|
// Provide default so tests don't need to wrap theme provider
|
|
690
690
|
};
|
|
691
|
-
},
|
|
691
|
+
}, ze = (e, t) => a({
|
|
692
692
|
width: t,
|
|
693
693
|
transition: X(e, "width", "entering")
|
|
694
|
-
}, It(e)),
|
|
694
|
+
}, It(e)), Ge = (e, t) => a({
|
|
695
695
|
width: t,
|
|
696
696
|
transition: X(e, "width", "leaving")
|
|
697
|
-
}, It(e)),
|
|
697
|
+
}, It(e)), Ln = W(Ae, {
|
|
698
698
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
699
699
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
|
|
700
700
|
flexShrink: 0,
|
|
@@ -702,15 +702,41 @@ const re = "Navbar", Y = {
|
|
|
702
702
|
boxSizing: "border-box",
|
|
703
703
|
display: "flex",
|
|
704
704
|
flexDirection: "column"
|
|
705
|
-
}, t &&
|
|
705
|
+
}, t && y(a({}, ze(e, n)), {
|
|
706
706
|
backgroundColor: "",
|
|
707
|
-
"& .MuiDrawer-paper":
|
|
708
|
-
})), !t &&
|
|
707
|
+
"& .MuiDrawer-paper": ze(e, n)
|
|
708
|
+
})), !t && y(a({}, Ge(e, r ? n : i)), {
|
|
709
709
|
backgroundColor: "",
|
|
710
|
-
"& .MuiDrawer-paper":
|
|
711
|
-
})))
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
"& .MuiDrawer-paper": Ge(e, r ? n : i)
|
|
711
|
+
}))), ae = {
|
|
712
|
+
log: console.warn.bind(console),
|
|
713
|
+
error: console.error.bind(console),
|
|
714
|
+
warn: console.warn.bind(console),
|
|
715
|
+
info: console.info.bind(console),
|
|
716
|
+
debug: console.debug.bind(console)
|
|
717
|
+
};
|
|
718
|
+
function Mo(e, t) {
|
|
719
|
+
console[e] = (...n) => {
|
|
720
|
+
for (const i of t)
|
|
721
|
+
if (typeof i == "function") {
|
|
722
|
+
if (i(...n))
|
|
723
|
+
return;
|
|
724
|
+
} else if (i instanceof RegExp && n.length > 0) {
|
|
725
|
+
for (const r of n)
|
|
726
|
+
if (typeof r == "string" && i.test(r))
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
ae[e](n);
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
function Ro(e) {
|
|
733
|
+
if (e)
|
|
734
|
+
console[e] = ae[e];
|
|
735
|
+
else
|
|
736
|
+
for (const t of Object.keys(ae))
|
|
737
|
+
console[t] = ae[t];
|
|
738
|
+
}
|
|
739
|
+
function Mn(e) {
|
|
714
740
|
let t = 0;
|
|
715
741
|
for (let n = 0, i = e.length; n < i; n++) {
|
|
716
742
|
const r = e.charCodeAt(n);
|
|
@@ -718,9 +744,9 @@ function Ln(e) {
|
|
|
718
744
|
}
|
|
719
745
|
return t;
|
|
720
746
|
}
|
|
721
|
-
const
|
|
722
|
-
function
|
|
723
|
-
const r =
|
|
747
|
+
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], qe = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
748
|
+
function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
749
|
+
const r = le();
|
|
724
750
|
return /* @__PURE__ */ u(
|
|
725
751
|
k,
|
|
726
752
|
{
|
|
@@ -741,17 +767,17 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
741
767
|
aspectRatio: 1
|
|
742
768
|
},
|
|
743
769
|
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
|
|
744
|
-
|
|
770
|
+
Pe,
|
|
745
771
|
{
|
|
746
772
|
src: e == null ? void 0 : e.picture,
|
|
747
773
|
sx: {
|
|
748
774
|
width: "100%",
|
|
749
775
|
height: "100%",
|
|
750
|
-
bgcolor:
|
|
776
|
+
bgcolor: Ve[Math.abs(Mn(e == null ? void 0 : e.name)) % Ve.length]
|
|
751
777
|
},
|
|
752
|
-
children:
|
|
778
|
+
children: qe(e == null ? void 0 : e.name)
|
|
753
779
|
}
|
|
754
|
-
) }) : /* @__PURE__ */ o(
|
|
780
|
+
) }) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
|
|
755
781
|
}
|
|
756
782
|
),
|
|
757
783
|
i && /* @__PURE__ */ o(
|
|
@@ -762,23 +788,23 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
762
788
|
transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
|
|
763
789
|
aspectRatio: 1
|
|
764
790
|
},
|
|
765
|
-
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ u(
|
|
791
|
+
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ u(Re, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
|
|
766
792
|
" ",
|
|
767
|
-
|
|
793
|
+
qe(e == null ? void 0 : e.name),
|
|
768
794
|
" ",
|
|
769
795
|
"ab"
|
|
770
|
-
] }) }) : /* @__PURE__ */ o(
|
|
796
|
+
] }) }) : /* @__PURE__ */ o(Re, {})
|
|
771
797
|
}
|
|
772
798
|
),
|
|
773
|
-
/* @__PURE__ */ o(
|
|
774
|
-
e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(
|
|
775
|
-
t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(
|
|
799
|
+
/* @__PURE__ */ o(_n, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ u(k, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
800
|
+
e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(_e, { animation: !1, width: "50%" }),
|
|
801
|
+
t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(_e, { animation: !1, width: "25%" })
|
|
776
802
|
] }) }) })
|
|
777
803
|
]
|
|
778
804
|
}
|
|
779
805
|
);
|
|
780
806
|
}
|
|
781
|
-
function
|
|
807
|
+
function Hn({
|
|
782
808
|
open: e,
|
|
783
809
|
widthClosed: t,
|
|
784
810
|
widthOpen: n,
|
|
@@ -790,9 +816,9 @@ function Rn({
|
|
|
790
816
|
domainCode: l,
|
|
791
817
|
useNewAvatar: p = !1
|
|
792
818
|
}) {
|
|
793
|
-
const g =
|
|
794
|
-
return /* @__PURE__ */ o(
|
|
795
|
-
|
|
819
|
+
const g = wt(), m = ut(j);
|
|
820
|
+
return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
|
|
821
|
+
Ln,
|
|
796
822
|
{
|
|
797
823
|
open: e,
|
|
798
824
|
widthOpen: n,
|
|
@@ -807,22 +833,22 @@ function Rn({
|
|
|
807
833
|
},
|
|
808
834
|
isSmallScreen: g,
|
|
809
835
|
children: [
|
|
810
|
-
!g && /* @__PURE__ */ o(
|
|
836
|
+
!g && /* @__PURE__ */ o(Gt, {}),
|
|
811
837
|
r && /* @__PURE__ */ u(k, { flexGrow: "0", children: [
|
|
812
838
|
r,
|
|
813
|
-
/* @__PURE__ */ o(
|
|
839
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
814
840
|
] }),
|
|
815
|
-
/* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(
|
|
841
|
+
/* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Nn, { links: s }) : s }),
|
|
816
842
|
/* @__PURE__ */ u(k, { flexGrow: "0", children: [
|
|
817
|
-
/* @__PURE__ */ o(
|
|
818
|
-
/* @__PURE__ */ o(
|
|
843
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
844
|
+
/* @__PURE__ */ o(Rn, { user: c, domainCode: l, open: e, useNewAvatar: p }),
|
|
819
845
|
d && /* @__PURE__ */ o(N, { children: d })
|
|
820
846
|
] })
|
|
821
847
|
]
|
|
822
848
|
}
|
|
823
849
|
) });
|
|
824
850
|
}
|
|
825
|
-
function
|
|
851
|
+
function Wn({
|
|
826
852
|
children: e,
|
|
827
853
|
topBarHeight: t,
|
|
828
854
|
maxWidth: n = !1,
|
|
@@ -837,7 +863,7 @@ function Hn({
|
|
|
837
863
|
flexGrow: 1
|
|
838
864
|
},
|
|
839
865
|
children: i ? /* @__PURE__ */ o(k, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
840
|
-
|
|
866
|
+
tt,
|
|
841
867
|
{
|
|
842
868
|
component: "main",
|
|
843
869
|
id: "main-content",
|
|
@@ -849,18 +875,18 @@ function Hn({
|
|
|
849
875
|
}
|
|
850
876
|
);
|
|
851
877
|
}
|
|
852
|
-
const
|
|
853
|
-
titleText: `${
|
|
878
|
+
const Un = "TopBar", zn = {
|
|
879
|
+
titleText: `${Un}-titleText`
|
|
854
880
|
};
|
|
855
|
-
function
|
|
881
|
+
function Gn({
|
|
856
882
|
titleText: e = "",
|
|
857
883
|
height: t,
|
|
858
884
|
"data-testid": n,
|
|
859
885
|
middle: i
|
|
860
886
|
}) {
|
|
861
|
-
const r =
|
|
887
|
+
const r = ut(j), s = () => r((l) => !l), d = le(), c = wt();
|
|
862
888
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
|
|
863
|
-
|
|
889
|
+
et,
|
|
864
890
|
{
|
|
865
891
|
square: !0,
|
|
866
892
|
elevation: 0,
|
|
@@ -884,16 +910,16 @@ function zn({
|
|
|
884
910
|
color: "inherit",
|
|
885
911
|
sx: { padding: 1.5, marginLeft: "12px" },
|
|
886
912
|
onClick: s,
|
|
887
|
-
children: /* @__PURE__ */ o(
|
|
913
|
+
children: /* @__PURE__ */ o(tn, { fontSize: "medium" })
|
|
888
914
|
}
|
|
889
915
|
),
|
|
890
|
-
/* @__PURE__ */ o(T, { className:
|
|
916
|
+
/* @__PURE__ */ o(T, { className: zn.titleText, variant: "h6", component: "h1", children: e }),
|
|
891
917
|
i
|
|
892
918
|
]
|
|
893
919
|
}
|
|
894
920
|
) });
|
|
895
921
|
}
|
|
896
|
-
function
|
|
922
|
+
function Ho({
|
|
897
923
|
children: e,
|
|
898
924
|
initialTitleText: t,
|
|
899
925
|
initialNavBarOpen: n,
|
|
@@ -907,25 +933,25 @@ function Lo({
|
|
|
907
933
|
domainCode: g,
|
|
908
934
|
useNewAvatar: m = !1
|
|
909
935
|
}) {
|
|
910
|
-
|
|
936
|
+
ht([
|
|
911
937
|
[j, n != null ? n : !0],
|
|
912
|
-
[
|
|
938
|
+
[we, t != null ? t : ""]
|
|
913
939
|
]);
|
|
914
|
-
const w =
|
|
940
|
+
const w = Me(j), [h] = V(At), [S] = V(bt), b = Me(we), [I] = V(St), [$] = V(Fn), [E] = V(yt);
|
|
915
941
|
return /* @__PURE__ */ u(k, { children: [
|
|
916
|
-
/* @__PURE__ */ o(
|
|
942
|
+
/* @__PURE__ */ o(Vt, {}),
|
|
917
943
|
/* @__PURE__ */ o(
|
|
918
|
-
|
|
944
|
+
Gn,
|
|
919
945
|
{
|
|
920
946
|
titleText: b,
|
|
921
947
|
"data-testid": s,
|
|
922
|
-
height:
|
|
948
|
+
height: I,
|
|
923
949
|
middle: $
|
|
924
950
|
}
|
|
925
951
|
),
|
|
926
952
|
/* @__PURE__ */ u(k, { sx: { display: "flex" }, children: [
|
|
927
953
|
/* @__PURE__ */ o(
|
|
928
|
-
|
|
954
|
+
Hn,
|
|
929
955
|
{
|
|
930
956
|
open: w,
|
|
931
957
|
top: E,
|
|
@@ -935,16 +961,16 @@ function Lo({
|
|
|
935
961
|
domainCode: g,
|
|
936
962
|
widthOpen: h,
|
|
937
963
|
widthClosed: S,
|
|
938
|
-
offsetTop:
|
|
964
|
+
offsetTop: I,
|
|
939
965
|
"data-testid": d,
|
|
940
966
|
useNewAvatar: m
|
|
941
967
|
}
|
|
942
968
|
),
|
|
943
969
|
/* @__PURE__ */ o(
|
|
944
|
-
|
|
945
|
-
|
|
970
|
+
Wn,
|
|
971
|
+
y(a({
|
|
946
972
|
"data-testid": r,
|
|
947
|
-
topBarHeight:
|
|
973
|
+
topBarHeight: I
|
|
948
974
|
}, i), {
|
|
949
975
|
children: e
|
|
950
976
|
})
|
|
@@ -952,7 +978,7 @@ function Lo({
|
|
|
952
978
|
] })
|
|
953
979
|
] });
|
|
954
980
|
}
|
|
955
|
-
const
|
|
981
|
+
const kt = ({
|
|
956
982
|
isOpen: e,
|
|
957
983
|
dialogTitle: t,
|
|
958
984
|
children: n,
|
|
@@ -968,21 +994,21 @@ const Dt = ({
|
|
|
968
994
|
var h, S;
|
|
969
995
|
const [m, w] = F(!1);
|
|
970
996
|
return /* @__PURE__ */ u(
|
|
971
|
-
|
|
997
|
+
nt,
|
|
972
998
|
{
|
|
973
999
|
open: e,
|
|
974
|
-
onClose: (b,
|
|
975
|
-
p && (
|
|
1000
|
+
onClose: (b, I) => _(void 0, null, function* () {
|
|
1001
|
+
p && (I === "backdropClick" || I === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
|
|
976
1002
|
}),
|
|
977
1003
|
fullWidth: !0,
|
|
978
1004
|
maxWidth: i != null ? i : "xs",
|
|
979
1005
|
"data-testid": l,
|
|
980
1006
|
sx: c,
|
|
981
1007
|
children: [
|
|
982
|
-
g && /* @__PURE__ */ o(
|
|
983
|
-
/* @__PURE__ */ o(
|
|
984
|
-
/* @__PURE__ */ o(
|
|
985
|
-
/* @__PURE__ */ u(
|
|
1008
|
+
g && /* @__PURE__ */ o(ot, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
1009
|
+
/* @__PURE__ */ o(it, { children: t }),
|
|
1010
|
+
/* @__PURE__ */ o(rt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
1011
|
+
/* @__PURE__ */ u(at, { children: [
|
|
986
1012
|
/* @__PURE__ */ o(
|
|
987
1013
|
J,
|
|
988
1014
|
{
|
|
@@ -1010,19 +1036,19 @@ const Dt = ({
|
|
|
1010
1036
|
]
|
|
1011
1037
|
}
|
|
1012
1038
|
);
|
|
1013
|
-
},
|
|
1039
|
+
}, Dt = ({
|
|
1014
1040
|
minLength: e,
|
|
1015
1041
|
preLoadedOptions: t,
|
|
1016
1042
|
lookup: n,
|
|
1017
1043
|
label: i,
|
|
1018
1044
|
inputValue: r
|
|
1019
|
-
}) =>
|
|
1045
|
+
}) => ln({
|
|
1020
1046
|
queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
|
|
1021
1047
|
(s) => s.label.toLowerCase().includes(r.toLowerCase())
|
|
1022
1048
|
) : n(r),
|
|
1023
1049
|
queryKey: ["autocomplete", i, r]
|
|
1024
1050
|
});
|
|
1025
|
-
function
|
|
1051
|
+
function Wo({
|
|
1026
1052
|
lookup: e = () => _(this, null, function* () {
|
|
1027
1053
|
}),
|
|
1028
1054
|
enableHighlighting: t = !0,
|
|
@@ -1037,33 +1063,33 @@ function Mo({
|
|
|
1037
1063
|
textFieldVariant: g = "filled",
|
|
1038
1064
|
loadingText: m = "Loading...",
|
|
1039
1065
|
noOptionsText: w = "No options",
|
|
1040
|
-
popupIcon: h = /* @__PURE__ */ o(
|
|
1066
|
+
popupIcon: h = /* @__PURE__ */ o(on, {}),
|
|
1041
1067
|
error: S = !1,
|
|
1042
1068
|
helperText: b = "",
|
|
1043
|
-
preLoadedOptions:
|
|
1069
|
+
preLoadedOptions: I = void 0,
|
|
1044
1070
|
disablePortal: $ = !1,
|
|
1045
1071
|
disableIconFlip: E = !1
|
|
1046
1072
|
}) {
|
|
1047
1073
|
const [O, L] = F(""), P = (f, C) => {
|
|
1048
1074
|
const x = s.filter((A) => A.id !== C);
|
|
1049
1075
|
n(x, "delete", f);
|
|
1050
|
-
}, { data: v, isLoading:
|
|
1076
|
+
}, { data: v, isLoading: D } = Dt({
|
|
1051
1077
|
inputValue: O,
|
|
1052
1078
|
label: r,
|
|
1053
1079
|
lookup: e,
|
|
1054
1080
|
minLength: i,
|
|
1055
|
-
preLoadedOptions:
|
|
1081
|
+
preLoadedOptions: I
|
|
1056
1082
|
}), M = O.length >= i;
|
|
1057
1083
|
return /* @__PURE__ */ u("div", { "data-testid": d, children: [
|
|
1058
1084
|
/* @__PURE__ */ o(
|
|
1059
|
-
|
|
1085
|
+
Se,
|
|
1060
1086
|
{
|
|
1061
1087
|
sx: a(a({}, c), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1062
1088
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
1063
1089
|
disablePortal: $,
|
|
1064
1090
|
multiple: !0,
|
|
1065
1091
|
getOptionLabel: (f) => typeof f == "string" ? f : f.label,
|
|
1066
|
-
loading: M ?
|
|
1092
|
+
loading: M ? D : !1,
|
|
1067
1093
|
options: [...s, ...v != null ? v : []],
|
|
1068
1094
|
filterSelectedOptions: !0,
|
|
1069
1095
|
includeInputInList: !0,
|
|
@@ -1076,16 +1102,16 @@ function Mo({
|
|
|
1076
1102
|
loadingText: m,
|
|
1077
1103
|
popupIcon: h,
|
|
1078
1104
|
renderInput: (f) => /* @__PURE__ */ o(
|
|
1079
|
-
|
|
1080
|
-
|
|
1105
|
+
ye,
|
|
1106
|
+
y(a({}, f), {
|
|
1081
1107
|
label: r,
|
|
1082
1108
|
fullWidth: !0,
|
|
1083
1109
|
variant: g,
|
|
1084
1110
|
error: S,
|
|
1085
1111
|
helperText: b,
|
|
1086
|
-
InputProps:
|
|
1112
|
+
InputProps: y(a({}, f.InputProps), {
|
|
1087
1113
|
endAdornment: /* @__PURE__ */ u(N, { children: [
|
|
1088
|
-
|
|
1114
|
+
D ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
|
|
1089
1115
|
f.InputProps.endAdornment
|
|
1090
1116
|
] })
|
|
1091
1117
|
}),
|
|
@@ -1100,17 +1126,17 @@ function Mo({
|
|
|
1100
1126
|
isOptionEqualToValue: (f, C) => f.id === C.id,
|
|
1101
1127
|
renderOption: (f, C, x) => {
|
|
1102
1128
|
if (t) {
|
|
1103
|
-
const A =
|
|
1129
|
+
const A = an(C.label, x.inputValue, {
|
|
1104
1130
|
insideWords: !0,
|
|
1105
1131
|
findAllOccurrences: !0
|
|
1106
|
-
}), H =
|
|
1107
|
-
return /* @__PURE__ */
|
|
1132
|
+
}), H = sn(C.label, A);
|
|
1133
|
+
return /* @__PURE__ */ ve(
|
|
1108
1134
|
"li",
|
|
1109
|
-
|
|
1135
|
+
y(a({}, f), {
|
|
1110
1136
|
key: C.id,
|
|
1111
1137
|
"data-testid": d ? `${d}:Autocomplete:option(${C.id.toString()})` : void 0
|
|
1112
1138
|
}),
|
|
1113
|
-
/* @__PURE__ */ o("div", { children: H.map((ee,
|
|
1139
|
+
/* @__PURE__ */ o("div", { children: H.map((ee, ce) => /* @__PURE__ */ o(
|
|
1114
1140
|
"span",
|
|
1115
1141
|
{
|
|
1116
1142
|
style: {
|
|
@@ -1118,13 +1144,13 @@ function Mo({
|
|
|
1118
1144
|
},
|
|
1119
1145
|
children: ee.text
|
|
1120
1146
|
},
|
|
1121
|
-
|
|
1147
|
+
ce
|
|
1122
1148
|
)) })
|
|
1123
1149
|
);
|
|
1124
1150
|
} else
|
|
1125
|
-
return /* @__PURE__ */
|
|
1151
|
+
return /* @__PURE__ */ ve(
|
|
1126
1152
|
"li",
|
|
1127
|
-
|
|
1153
|
+
y(a({}, f), {
|
|
1128
1154
|
key: C.id,
|
|
1129
1155
|
"data-testid": d ? `${d}:option(${C.id.toString()})` : void 0
|
|
1130
1156
|
}),
|
|
@@ -1134,7 +1160,7 @@ function Mo({
|
|
|
1134
1160
|
}
|
|
1135
1161
|
),
|
|
1136
1162
|
s.length > 0 && /* @__PURE__ */ o(k, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
|
|
1137
|
-
|
|
1163
|
+
qt,
|
|
1138
1164
|
{
|
|
1139
1165
|
sx: {
|
|
1140
1166
|
marginTop: 1,
|
|
@@ -1142,7 +1168,7 @@ function Mo({
|
|
|
1142
1168
|
height: "auto"
|
|
1143
1169
|
},
|
|
1144
1170
|
label: /* @__PURE__ */ o(
|
|
1145
|
-
|
|
1171
|
+
Xt,
|
|
1146
1172
|
{
|
|
1147
1173
|
title: f.tooltipContent || "",
|
|
1148
1174
|
placement: "bottom-start",
|
|
@@ -1162,7 +1188,7 @@ function Mo({
|
|
|
1162
1188
|
"data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
|
|
1163
1189
|
onDelete: (C) => P(C, f.id),
|
|
1164
1190
|
deleteIcon: /* @__PURE__ */ o(
|
|
1165
|
-
|
|
1191
|
+
nn,
|
|
1166
1192
|
{
|
|
1167
1193
|
"data-testid": d ? `${d}:Chip(${f.id.toString()}):deleteIcon` : void 0
|
|
1168
1194
|
}
|
|
@@ -1172,7 +1198,7 @@ function Mo({
|
|
|
1172
1198
|
)) })
|
|
1173
1199
|
] });
|
|
1174
1200
|
}
|
|
1175
|
-
const
|
|
1201
|
+
const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
1176
1202
|
lookup: e = () => _(void 0, null, function* () {
|
|
1177
1203
|
}),
|
|
1178
1204
|
onChange: t,
|
|
@@ -1190,24 +1216,24 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1190
1216
|
helperText: h = "",
|
|
1191
1217
|
disabled: S,
|
|
1192
1218
|
popupIcon: b,
|
|
1193
|
-
disableIconFlip:
|
|
1219
|
+
disableIconFlip: I
|
|
1194
1220
|
}) => {
|
|
1195
|
-
const [$, E] = F(""), { data: O, isLoading: L } =
|
|
1221
|
+
const [$, E] = F(""), { data: O, isLoading: L } = Dt({
|
|
1196
1222
|
inputValue: $,
|
|
1197
1223
|
label: n,
|
|
1198
1224
|
lookup: e,
|
|
1199
1225
|
minLength: g != null ? g : 0,
|
|
1200
1226
|
preLoadedOptions: w
|
|
1201
1227
|
}), P = $.length >= g;
|
|
1202
|
-
return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(
|
|
1203
|
-
|
|
1228
|
+
return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(Qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1229
|
+
Se,
|
|
1204
1230
|
{
|
|
1205
|
-
sx: a(a({}, r),
|
|
1231
|
+
sx: a(a({}, r), I ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1206
1232
|
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1207
1233
|
loading: P ? L : !1,
|
|
1208
1234
|
options: O != null ? O : [],
|
|
1209
|
-
onChange: (v,
|
|
1210
|
-
t(v,
|
|
1235
|
+
onChange: (v, D, M) => {
|
|
1236
|
+
t(v, D, M);
|
|
1211
1237
|
},
|
|
1212
1238
|
disablePortal: m,
|
|
1213
1239
|
filterOptions: (v) => v,
|
|
@@ -1216,8 +1242,8 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1216
1242
|
getOptionLabel: (v) => v.label,
|
|
1217
1243
|
popupIcon: b,
|
|
1218
1244
|
renderInput: (v) => /* @__PURE__ */ o(
|
|
1219
|
-
|
|
1220
|
-
|
|
1245
|
+
ye,
|
|
1246
|
+
y(a({
|
|
1221
1247
|
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1222
1248
|
}, v), {
|
|
1223
1249
|
variant: d,
|
|
@@ -1227,27 +1253,27 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1227
1253
|
helperText: h
|
|
1228
1254
|
})
|
|
1229
1255
|
),
|
|
1230
|
-
isOptionEqualToValue: (v,
|
|
1231
|
-
onInputChange: (v,
|
|
1232
|
-
E(
|
|
1256
|
+
isOptionEqualToValue: (v, D) => v.id === D.id,
|
|
1257
|
+
onInputChange: (v, D) => {
|
|
1258
|
+
E(D);
|
|
1233
1259
|
},
|
|
1234
|
-
renderOption: (v,
|
|
1260
|
+
renderOption: (v, D) => /* @__PURE__ */ ve(
|
|
1235
1261
|
"li",
|
|
1236
|
-
|
|
1237
|
-
key:
|
|
1238
|
-
"data-testid": l ? `${l}:Autocomplete:option(${
|
|
1262
|
+
y(a({}, v), {
|
|
1263
|
+
key: D.id,
|
|
1264
|
+
"data-testid": l ? `${l}:Autocomplete:option(${D.id.toString()})` : void 0
|
|
1239
1265
|
}),
|
|
1240
|
-
|
|
1266
|
+
D.label
|
|
1241
1267
|
),
|
|
1242
1268
|
disabled: S
|
|
1243
1269
|
}
|
|
1244
1270
|
) }) });
|
|
1245
|
-
},
|
|
1271
|
+
}, Vn = (e) => {
|
|
1246
1272
|
if (!e)
|
|
1247
1273
|
return -1;
|
|
1248
1274
|
try {
|
|
1249
1275
|
const n = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
|
|
1250
|
-
|
|
1276
|
+
un.from(n, "base64").toString("utf8").split("").map(function(s) {
|
|
1251
1277
|
return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
1252
1278
|
}).join("")
|
|
1253
1279
|
), r = JSON.parse(i);
|
|
@@ -1255,12 +1281,12 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1255
1281
|
} catch (t) {
|
|
1256
1282
|
return -1;
|
|
1257
1283
|
}
|
|
1258
|
-
},
|
|
1284
|
+
}, Go = ({
|
|
1259
1285
|
open: e = !1,
|
|
1260
1286
|
closeHandler: t,
|
|
1261
1287
|
setAuth0ExpiryTime: n
|
|
1262
1288
|
}) => {
|
|
1263
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
1289
|
+
const { logout: i, getAccessTokenSilently: r } = gt(), [s, d] = F(0), c = () => _(void 0, null, function* () {
|
|
1264
1290
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1265
1291
|
}), l = () => _(void 0, null, function* () {
|
|
1266
1292
|
d(s + 1), t();
|
|
@@ -1268,12 +1294,12 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1268
1294
|
return K(() => {
|
|
1269
1295
|
(() => _(void 0, null, function* () {
|
|
1270
1296
|
if (s > 0) {
|
|
1271
|
-
const w = yield r({ cacheMode: "off" }), h =
|
|
1297
|
+
const w = yield r({ cacheMode: "off" }), h = Vn(w) * 1e3;
|
|
1272
1298
|
n(h);
|
|
1273
1299
|
}
|
|
1274
1300
|
}))();
|
|
1275
1301
|
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1276
|
-
|
|
1302
|
+
kt,
|
|
1277
1303
|
{
|
|
1278
1304
|
isOpen: e,
|
|
1279
1305
|
primaryButton: {
|
|
@@ -1297,25 +1323,25 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1297
1323
|
}
|
|
1298
1324
|
);
|
|
1299
1325
|
};
|
|
1300
|
-
function
|
|
1326
|
+
function qn(e) {
|
|
1301
1327
|
return "error" in e;
|
|
1302
1328
|
}
|
|
1303
|
-
function
|
|
1329
|
+
function Xn(e) {
|
|
1304
1330
|
var i;
|
|
1305
1331
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1306
1332
|
return t === "access_denied" && n.startsWith("You do not have the required authorization");
|
|
1307
1333
|
}
|
|
1308
|
-
function
|
|
1334
|
+
function Qn(e) {
|
|
1309
1335
|
var i;
|
|
1310
1336
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1311
1337
|
return t === "access_denied" && n.startsWith("User did not authorize the request");
|
|
1312
1338
|
}
|
|
1313
|
-
function
|
|
1339
|
+
function Yn(e) {
|
|
1314
1340
|
var i;
|
|
1315
1341
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1316
1342
|
return t === "access_denied" && n.match(/Script.*time.*exceeded/);
|
|
1317
1343
|
}
|
|
1318
|
-
function
|
|
1344
|
+
function Vo({
|
|
1319
1345
|
children: e,
|
|
1320
1346
|
appName: t = "the app",
|
|
1321
1347
|
throwErrors: n = "none",
|
|
@@ -1324,11 +1350,11 @@ function Uo({
|
|
|
1324
1350
|
}
|
|
1325
1351
|
}) {
|
|
1326
1352
|
var m, w;
|
|
1327
|
-
const { isAuthenticated: s, isLoading: d, error: c, loginWithRedirect: l, logout: p } =
|
|
1353
|
+
const { isAuthenticated: s, isLoading: d, error: c, loginWithRedirect: l, logout: p } = gt();
|
|
1328
1354
|
K(() => {
|
|
1329
1355
|
c && r(c);
|
|
1330
1356
|
}, [c, r]);
|
|
1331
|
-
const g =
|
|
1357
|
+
const g = Ht(
|
|
1332
1358
|
() => ({
|
|
1333
1359
|
appState: {
|
|
1334
1360
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1344,22 +1370,22 @@ function Uo({
|
|
|
1344
1370
|
c
|
|
1345
1371
|
), n === "all")
|
|
1346
1372
|
throw c;
|
|
1347
|
-
if (
|
|
1373
|
+
if (qn(c)) {
|
|
1348
1374
|
let h = "Auth error", S = "An unknown Auth0 error occurred.";
|
|
1349
|
-
if (
|
|
1375
|
+
if (Xn(c))
|
|
1350
1376
|
h = "Unauthorised", S = `You are not authorised to access ${t}.`;
|
|
1351
|
-
else if (Xn(c))
|
|
1352
|
-
h = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1353
1377
|
else if (Qn(c))
|
|
1378
|
+
h = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1379
|
+
else if (Yn(c))
|
|
1354
1380
|
h = "Auth0 script execution time exceeded", S = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
1355
1381
|
else if (c.message === "Invalid state") {
|
|
1356
1382
|
const b = localStorage.getItem("auth0_redirect_count");
|
|
1357
1383
|
b ? b && parseInt(b) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(b) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
|
|
1358
1384
|
} else if (n === "unknown")
|
|
1359
1385
|
throw c;
|
|
1360
|
-
return /* @__PURE__ */ u(
|
|
1361
|
-
/* @__PURE__ */ o(
|
|
1362
|
-
/* @__PURE__ */ u(
|
|
1386
|
+
return /* @__PURE__ */ u(nt, { open: !0, children: [
|
|
1387
|
+
/* @__PURE__ */ o(it, { children: h }),
|
|
1388
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
1363
1389
|
/* @__PURE__ */ o(T, { children: S }),
|
|
1364
1390
|
/* @__PURE__ */ o("br", {}),
|
|
1365
1391
|
/* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
@@ -1372,7 +1398,7 @@ function Uo({
|
|
|
1372
1398
|
(w = c == null ? void 0 : c.error_description) != null ? w : "N/A"
|
|
1373
1399
|
] })
|
|
1374
1400
|
] }),
|
|
1375
|
-
/* @__PURE__ */ u(
|
|
1401
|
+
/* @__PURE__ */ u(at, { children: [
|
|
1376
1402
|
h === "Auth0 script execution time exceeded" && /* @__PURE__ */ o(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
|
|
1377
1403
|
/* @__PURE__ */ o(J, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1378
1404
|
] })
|
|
@@ -1380,53 +1406,53 @@ function Uo({
|
|
|
1380
1406
|
} else if (n === "unknown")
|
|
1381
1407
|
throw c;
|
|
1382
1408
|
}
|
|
1383
|
-
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(
|
|
1409
|
+
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(pn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1384
1410
|
}
|
|
1385
|
-
const
|
|
1411
|
+
const Kn = {
|
|
1386
1412
|
autoHideDuration: 6e3,
|
|
1387
1413
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1388
1414
|
// The default is false. If we prefer timer to continue when window loses
|
|
1389
1415
|
// focus, change to true
|
|
1390
1416
|
disableWindowBlurListener: !1
|
|
1391
|
-
},
|
|
1417
|
+
}, Jn = {
|
|
1392
1418
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1393
|
-
},
|
|
1419
|
+
}, Xe = {
|
|
1394
1420
|
message: "",
|
|
1395
1421
|
severity: "info",
|
|
1396
1422
|
variant: "standard",
|
|
1397
1423
|
progressIndicator: void 0
|
|
1398
1424
|
// Can use 'circular' or 'linear'
|
|
1399
|
-
},
|
|
1425
|
+
}, Qe = 100, Ye = 2e3, Zn = 2e3, jn = (() => {
|
|
1400
1426
|
let e = 0;
|
|
1401
1427
|
return () => (e += 1, e);
|
|
1402
|
-
})(),
|
|
1428
|
+
})(), eo = {
|
|
1403
1429
|
borderBottomLeftRadius: "0px",
|
|
1404
1430
|
borderBottomRightRadius: "0px"
|
|
1405
|
-
},
|
|
1406
|
-
function
|
|
1431
|
+
}, to = {}, no = {}, $t = Ze(null);
|
|
1432
|
+
function oo(s) {
|
|
1407
1433
|
var d = s, {
|
|
1408
|
-
overrideState: e =
|
|
1409
|
-
overrideActions: t =
|
|
1410
|
-
shouldClose: n =
|
|
1434
|
+
overrideState: e = to,
|
|
1435
|
+
overrideActions: t = no,
|
|
1436
|
+
shouldClose: n = Jn.shouldClose,
|
|
1411
1437
|
children: i
|
|
1412
|
-
} = d, r =
|
|
1438
|
+
} = d, r = Fe(d, [
|
|
1413
1439
|
"overrideState",
|
|
1414
1440
|
"overrideActions",
|
|
1415
1441
|
"shouldClose",
|
|
1416
1442
|
"children"
|
|
1417
1443
|
]);
|
|
1418
1444
|
var C;
|
|
1419
|
-
const [{ open: c }, l] = F({ open: !1 }), p =
|
|
1445
|
+
const [{ open: c }, l] = F({ open: !1 }), p = fe([]), g = fe(Date.now()), m = fe(0), w = se((x) => {
|
|
1420
1446
|
l({ open: x });
|
|
1421
|
-
}, []), h =
|
|
1422
|
-
m.current += 1, p.current.length >=
|
|
1423
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1447
|
+
}, []), h = se((x = {}) => {
|
|
1448
|
+
m.current += 1, p.current.length >= Qe && Date.now() - g.current >= Ye && (g.current = Date.now(), console.error(
|
|
1449
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Qe}) hit ${m.current} times in last ${Ye}ms)`
|
|
1424
1450
|
), m.current = 0);
|
|
1425
|
-
const A = a(
|
|
1426
|
-
key:
|
|
1451
|
+
const A = a(y(a({}, Xe), {
|
|
1452
|
+
key: jn()
|
|
1427
1453
|
}), x);
|
|
1428
1454
|
return p.current.push(A), p.current.length === 1 && l({ open: !0 }), A.key;
|
|
1429
|
-
}, []), S = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), b = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)),
|
|
1455
|
+
}, []), S = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), b = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), I = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
|
|
1430
1456
|
const A = p.current.findIndex((H) => H.key === x);
|
|
1431
1457
|
if (A !== -1)
|
|
1432
1458
|
return A === 0 ? (l({ open: !1 }), p.current[0]) : p.current.splice(A, 1);
|
|
@@ -1435,69 +1461,69 @@ function no(s) {
|
|
|
1435
1461
|
}, L = () => {
|
|
1436
1462
|
}, P = () => {
|
|
1437
1463
|
p.current.shift(), p.current.length > 0 && l({ open: !0 });
|
|
1438
|
-
}, v = (C = p.current[0]) != null ? C : a({},
|
|
1439
|
-
"autoHideDuration" in v && (
|
|
1440
|
-
const M = a(a({},
|
|
1464
|
+
}, v = (C = p.current[0]) != null ? C : a({}, Xe), D = {};
|
|
1465
|
+
"autoHideDuration" in v && (D.autoHideDuration = v.autoHideDuration);
|
|
1466
|
+
const M = a(a({}, Kn), r), f = a(a({
|
|
1441
1467
|
open: c,
|
|
1442
1468
|
setOpen: w,
|
|
1443
1469
|
enqueueNotification: h,
|
|
1444
1470
|
enqueueSuccessNotification: S,
|
|
1445
1471
|
enqueueInfoNotification: b,
|
|
1446
|
-
enqueueWarningNotification:
|
|
1472
|
+
enqueueWarningNotification: I,
|
|
1447
1473
|
enqueueErrorNotification: $,
|
|
1448
1474
|
removeNotification: E
|
|
1449
1475
|
}, e), t);
|
|
1450
|
-
return /* @__PURE__ */ u(
|
|
1476
|
+
return /* @__PURE__ */ u($t.Provider, { value: f, children: [
|
|
1451
1477
|
i,
|
|
1452
1478
|
/* @__PURE__ */ o(
|
|
1453
|
-
|
|
1454
|
-
|
|
1479
|
+
Yt,
|
|
1480
|
+
y(a(a({}, M), D), {
|
|
1455
1481
|
open: c,
|
|
1456
1482
|
onClose: O,
|
|
1457
1483
|
TransitionProps: {
|
|
1458
1484
|
onExited: P,
|
|
1459
1485
|
onExit: L
|
|
1460
1486
|
},
|
|
1461
|
-
sx: { zIndex:
|
|
1487
|
+
sx: { zIndex: Zn },
|
|
1462
1488
|
children: /* @__PURE__ */ u("div", { children: [
|
|
1463
1489
|
/* @__PURE__ */ o(
|
|
1464
|
-
|
|
1490
|
+
Kt,
|
|
1465
1491
|
{
|
|
1466
1492
|
onClose: (x) => O(x, "closeAlert"),
|
|
1467
1493
|
severity: v.severity,
|
|
1468
1494
|
variant: "filled",
|
|
1469
1495
|
icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(Ie, { size: "1em" }) : void 0,
|
|
1470
|
-
style: v.progressIndicator === "linear" ?
|
|
1496
|
+
style: v.progressIndicator === "linear" ? eo : void 0,
|
|
1471
1497
|
children: v.message
|
|
1472
1498
|
}
|
|
1473
1499
|
),
|
|
1474
|
-
v.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1500
|
+
v.progressIndicator === "linear" && /* @__PURE__ */ o(ot, { color: "primary" })
|
|
1475
1501
|
] })
|
|
1476
1502
|
})
|
|
1477
1503
|
)
|
|
1478
1504
|
] });
|
|
1479
1505
|
}
|
|
1480
|
-
function
|
|
1481
|
-
const e =
|
|
1506
|
+
function io() {
|
|
1507
|
+
const e = je($t);
|
|
1482
1508
|
if (e === null)
|
|
1483
|
-
throw new
|
|
1509
|
+
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1484
1510
|
return e;
|
|
1485
1511
|
}
|
|
1486
|
-
const
|
|
1487
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(
|
|
1488
|
-
),
|
|
1512
|
+
const qo = Q(
|
|
1513
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(oo, y(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1514
|
+
), ro = rn(), Xo = ({
|
|
1489
1515
|
children: e,
|
|
1490
1516
|
store: t
|
|
1491
|
-
}) => /* @__PURE__ */ o(
|
|
1492
|
-
var
|
|
1493
|
-
const
|
|
1494
|
-
JSON.parse((
|
|
1495
|
-
),
|
|
1496
|
-
(e) => e(
|
|
1517
|
+
}) => /* @__PURE__ */ o(pt, { store: t != null ? t : ro, children: e }), Tt = "domainCode";
|
|
1518
|
+
var Je;
|
|
1519
|
+
const Ke = R(
|
|
1520
|
+
JSON.parse((Je = localStorage.getItem(Tt)) != null ? Je : '{"domainCode": ""}').domainCode
|
|
1521
|
+
), Et = R(
|
|
1522
|
+
(e) => e(Ke),
|
|
1497
1523
|
(e, t, n) => {
|
|
1498
|
-
t(
|
|
1524
|
+
t(Ke, n), localStorage.setItem(Tt, JSON.stringify({ domainCode: n }));
|
|
1499
1525
|
}
|
|
1500
|
-
),
|
|
1526
|
+
), ao = {
|
|
1501
1527
|
act: "ACT",
|
|
1502
1528
|
nsw: "NSW",
|
|
1503
1529
|
nt: "NT",
|
|
@@ -1509,10 +1535,10 @@ const Ye = R(
|
|
|
1509
1535
|
ag: "AG",
|
|
1510
1536
|
fedmps: "Fedmps",
|
|
1511
1537
|
"": ""
|
|
1512
|
-
},
|
|
1538
|
+
}, so = (e) => {
|
|
1513
1539
|
var t;
|
|
1514
|
-
return e === null ? "N/A" : (t =
|
|
1515
|
-
},
|
|
1540
|
+
return e === null ? "N/A" : (t = ao[e]) != null ? t : "";
|
|
1541
|
+
}, Qo = ({
|
|
1516
1542
|
isLoading: e,
|
|
1517
1543
|
isOpen: t,
|
|
1518
1544
|
onClose: n,
|
|
@@ -1520,14 +1546,14 @@ const Ye = R(
|
|
|
1520
1546
|
applicationName: r,
|
|
1521
1547
|
handleLogout: s
|
|
1522
1548
|
}) => {
|
|
1523
|
-
const [d, c] = V(
|
|
1549
|
+
const [d, c] = V(Et), [l, p] = F(d), { enqueueSuccessNotification: g } = io(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, S = () => _(void 0, null, function* () {
|
|
1524
1550
|
l ? (c(l), g(`Set organisation to ${l}`), n()) : c("");
|
|
1525
1551
|
}), b = () => _(void 0, null, function* () {
|
|
1526
1552
|
d && !m && !w ? (p(d), n()) : h && s();
|
|
1527
1553
|
});
|
|
1528
|
-
let
|
|
1529
|
-
return m ?
|
|
1530
|
-
|
|
1554
|
+
let I;
|
|
1555
|
+
return m ? I = "Unable to retrieve your active organisations. Try logging in again." : w && (I = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
|
|
1556
|
+
kt,
|
|
1531
1557
|
{
|
|
1532
1558
|
isOpen: t,
|
|
1533
1559
|
dialogTitle: "Select an organisation",
|
|
@@ -1550,21 +1576,21 @@ const Ye = R(
|
|
|
1550
1576
|
"."
|
|
1551
1577
|
] }),
|
|
1552
1578
|
/* @__PURE__ */ o(
|
|
1553
|
-
|
|
1579
|
+
Se,
|
|
1554
1580
|
{
|
|
1555
1581
|
loading: e,
|
|
1556
1582
|
multiple: !1,
|
|
1557
1583
|
disableClearable: !1,
|
|
1558
1584
|
value: l !== "" ? l : null,
|
|
1559
1585
|
onChange: ($, E) => p(E != null ? E : ""),
|
|
1560
|
-
getOptionLabel:
|
|
1586
|
+
getOptionLabel: so,
|
|
1561
1587
|
options: [...i],
|
|
1562
1588
|
renderInput: ($) => /* @__PURE__ */ o(
|
|
1563
|
-
|
|
1564
|
-
|
|
1589
|
+
ye,
|
|
1590
|
+
y(a({}, $), {
|
|
1565
1591
|
variant: "filled",
|
|
1566
1592
|
label: "Select organisation",
|
|
1567
|
-
InputProps:
|
|
1593
|
+
InputProps: y(a({}, $.InputProps), {
|
|
1568
1594
|
endAdornment: /* @__PURE__ */ u(N, { children: [
|
|
1569
1595
|
e ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1570
1596
|
$.InputProps.endAdornment
|
|
@@ -1574,11 +1600,38 @@ const Ye = R(
|
|
|
1574
1600
|
)
|
|
1575
1601
|
}
|
|
1576
1602
|
),
|
|
1577
|
-
|
|
1603
|
+
I && /* @__PURE__ */ o(Jt, { error: !0, children: I })
|
|
1578
1604
|
]
|
|
1579
1605
|
}
|
|
1580
1606
|
);
|
|
1581
|
-
},
|
|
1607
|
+
}, lo = {
|
|
1608
|
+
domainCode: Et,
|
|
1609
|
+
navBarOpen: j,
|
|
1610
|
+
navBarWidthOpen: At,
|
|
1611
|
+
navBarWidthClosed: bt,
|
|
1612
|
+
titleText: we,
|
|
1613
|
+
topBarHeight: St,
|
|
1614
|
+
navBarTop: yt
|
|
1615
|
+
}, Yo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), co = ({
|
|
1616
|
+
initialValues: e,
|
|
1617
|
+
children: t
|
|
1618
|
+
}) => (ht(e), /* @__PURE__ */ o(N, { children: t })), Ko = Q(
|
|
1619
|
+
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1620
|
+
co,
|
|
1621
|
+
{
|
|
1622
|
+
initialValues: Object.entries(e).map(
|
|
1623
|
+
([n, i]) => [
|
|
1624
|
+
lo[n],
|
|
1625
|
+
i
|
|
1626
|
+
]
|
|
1627
|
+
),
|
|
1628
|
+
children: t
|
|
1629
|
+
}
|
|
1630
|
+
)
|
|
1631
|
+
), Jo = Q(() => ({ children: e }) => {
|
|
1632
|
+
const t = new cn();
|
|
1633
|
+
return /* @__PURE__ */ o(dn, { client: t, children: e });
|
|
1634
|
+
}), Zo = st({
|
|
1582
1635
|
palette: {
|
|
1583
1636
|
primary: {
|
|
1584
1637
|
dark: "#00A651",
|
|
@@ -1629,7 +1682,7 @@ const Ye = R(
|
|
|
1629
1682
|
navBar: {
|
|
1630
1683
|
backgroundColor: "#E8E8E8"
|
|
1631
1684
|
}
|
|
1632
|
-
}),
|
|
1685
|
+
}), jo = st({
|
|
1633
1686
|
palette: {
|
|
1634
1687
|
primary: {
|
|
1635
1688
|
main: "#007236",
|
|
@@ -1683,18 +1736,18 @@ const Ye = R(
|
|
|
1683
1736
|
styleOverrides: {
|
|
1684
1737
|
root: ({ theme: e }) => ({
|
|
1685
1738
|
"&.Mui-selected": {
|
|
1686
|
-
backgroundColor:
|
|
1739
|
+
backgroundColor: me(
|
|
1687
1740
|
e.palette.secondary.main,
|
|
1688
1741
|
e.palette.action.selectedOpacity
|
|
1689
1742
|
),
|
|
1690
1743
|
"&:hover": {
|
|
1691
|
-
backgroundColor:
|
|
1744
|
+
backgroundColor: me(
|
|
1692
1745
|
e.palette.secondary.main,
|
|
1693
1746
|
e.palette.action.selectedOpacity
|
|
1694
1747
|
)
|
|
1695
1748
|
},
|
|
1696
1749
|
"&.Mui-focusVisible": {
|
|
1697
|
-
backgroundColor:
|
|
1750
|
+
backgroundColor: me(
|
|
1698
1751
|
e.palette.secondary.main,
|
|
1699
1752
|
e.palette.action.focusOpacity
|
|
1700
1753
|
)
|
|
@@ -1723,78 +1776,54 @@ const Ye = R(
|
|
|
1723
1776
|
navBar: {
|
|
1724
1777
|
backgroundColor: "#E8E8E8"
|
|
1725
1778
|
}
|
|
1726
|
-
}), so = {
|
|
1727
|
-
domainCode: Tt,
|
|
1728
|
-
navBarOpen: j,
|
|
1729
|
-
navBarWidthOpen: wt,
|
|
1730
|
-
navBarWidthClosed: At,
|
|
1731
|
-
titleText: ve,
|
|
1732
|
-
topBarHeight: bt,
|
|
1733
|
-
navBarTop: St
|
|
1734
|
-
}, Qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), lo = ({
|
|
1735
|
-
initialValues: e,
|
|
1736
|
-
children: t
|
|
1737
|
-
}) => (pt(e), /* @__PURE__ */ o(N, { children: t })), Yo = Q(
|
|
1738
|
-
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1739
|
-
lo,
|
|
1740
|
-
{
|
|
1741
|
-
initialValues: Object.entries(e).map(
|
|
1742
|
-
([n, i]) => [
|
|
1743
|
-
so[n],
|
|
1744
|
-
i
|
|
1745
|
-
]
|
|
1746
|
-
),
|
|
1747
|
-
children: t
|
|
1748
|
-
}
|
|
1749
|
-
)
|
|
1750
|
-
), Ko = Q(() => ({ children: e }) => {
|
|
1751
|
-
const t = new ln();
|
|
1752
|
-
return /* @__PURE__ */ o(cn, { client: t, children: e });
|
|
1753
1779
|
});
|
|
1754
1780
|
export {
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1781
|
+
kt as AgDialog,
|
|
1782
|
+
Ho as AppLayout,
|
|
1783
|
+
Xo as AtomProvider,
|
|
1784
|
+
Vo as AuthGuard,
|
|
1785
|
+
$t as Context,
|
|
1786
|
+
ke as ContextError,
|
|
1787
|
+
Qo as DomainCodeDialog,
|
|
1788
|
+
Oo as ExampleComponent,
|
|
1789
|
+
Wo as FetchAutocomplete,
|
|
1790
|
+
co as HydrateAtoms,
|
|
1791
|
+
Uo as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1792
|
+
mt as NAVBAR_WIDTH_CLOSED,
|
|
1793
|
+
ft as NAVBAR_WIDTH_OPENED,
|
|
1794
|
+
_o as NavBar,
|
|
1795
|
+
No as NavBarDarkStyledList,
|
|
1796
|
+
Po as NavBarLightStyledList,
|
|
1797
|
+
vn as NavBarProvider,
|
|
1798
|
+
Lo as PageLayout,
|
|
1799
|
+
oo as SaladBarProvider,
|
|
1800
|
+
Go as SessionExpiryDialog,
|
|
1801
|
+
zo as SingleAutocomplete,
|
|
1802
|
+
ro as atomStore,
|
|
1803
|
+
An as buildNavBarState,
|
|
1804
|
+
Et as domainCodeAtom,
|
|
1805
|
+
Zo as fed21Theme,
|
|
1806
|
+
Vn as getAuth0Expiry,
|
|
1807
|
+
jo as internalAgSystemsTheme,
|
|
1782
1808
|
q as navBarClasses,
|
|
1783
1809
|
j as navBarOpenAtom,
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
Yo as
|
|
1797
|
-
|
|
1798
|
-
|
|
1810
|
+
yt as navBarTopAtom,
|
|
1811
|
+
bt as navBarWidthClosedAtom,
|
|
1812
|
+
At as navBarWidthOpenAtom,
|
|
1813
|
+
Mn as simpleHashCode,
|
|
1814
|
+
Mo as suppressConsole,
|
|
1815
|
+
we as titleTextAtom,
|
|
1816
|
+
St as topBarHeightAtom,
|
|
1817
|
+
Fn as topBarMiddleAtom,
|
|
1818
|
+
Ro as unsuppressConsole,
|
|
1819
|
+
Dt as useAutocompleteOptions,
|
|
1820
|
+
wn as useNavBar,
|
|
1821
|
+
io as useSaladBar,
|
|
1822
|
+
Yo as withAtomProvider,
|
|
1823
|
+
Fo as withBrowserRouter,
|
|
1824
|
+
Bo as withNavBarProvider,
|
|
1825
|
+
Ko as withOverrideDefaults,
|
|
1826
|
+
Jo as withQueryClient,
|
|
1827
|
+
qo as withSaladBarProvider
|
|
1799
1828
|
};
|
|
1800
1829
|
//# sourceMappingURL=index.js.map
|