@australiangreens/ag-internal-components 0.1.12 → 0.1.14
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/domainCode/DomainCodeDialog.d.ts +2 -1
- package/dist/domainCode/DomainCodeDialog.d.ts.map +1 -1
- package/dist/esm/index.js +624 -594
- 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 +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
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
|
-
var s = (
|
|
24
|
+
var s = (c) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
r(
|
|
26
|
+
l(n.next(c));
|
|
27
|
+
} catch (u) {
|
|
28
|
+
r(u);
|
|
29
29
|
}
|
|
30
|
-
}, d = (
|
|
30
|
+
}, d = (c) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
r(
|
|
32
|
+
l(n.throw(c));
|
|
33
|
+
} catch (u) {
|
|
34
|
+
r(u);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, l = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(s, d);
|
|
37
|
+
l((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as F, createContext as
|
|
41
|
-
import { Typography as
|
|
42
|
-
import
|
|
43
|
-
import { styled as W, createTheme as
|
|
44
|
-
import { AgError as
|
|
39
|
+
import { jsxs as p, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
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 O, Button as J, Paper as et, Box as I, 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
|
-
return /* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
/* @__PURE__ */ o(
|
|
60
|
+
return /* @__PURE__ */ p(N, { children: [
|
|
61
|
+
/* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
62
|
+
/* @__PURE__ */ o(O, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
63
63
|
/* @__PURE__ */ o(
|
|
64
64
|
J,
|
|
65
65
|
{
|
|
@@ -69,17 +69,17 @@ function Eo({ text: e }) {
|
|
|
69
69
|
children: "Hello I am a button"
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ p("p", { children: [
|
|
73
73
|
"This is some text: ",
|
|
74
74
|
/* @__PURE__ */ o("span", { children: e })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ p(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(I, {
|
|
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
|
+
})), xt = () => ({
|
|
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
|
+
}, xt()), fn = () => a({
|
|
122
|
+
width: mt
|
|
123
|
+
}, xt()), 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 Ct =
|
|
140
|
-
overrideState: e =
|
|
138
|
+
Ne(ke, "errorName", "ContextError");
|
|
139
|
+
const Ct = Ze(null), xn = {}, Cn = {}, vn = ({
|
|
140
|
+
overrideState: e = xn,
|
|
141
141
|
overrideActions: t = Cn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
|
-
const [{ open: i }, r] = F({ open: !0 }), s =
|
|
145
|
-
r({ open:
|
|
146
|
-
}, []), d =
|
|
147
|
-
r((
|
|
148
|
-
}, []),
|
|
144
|
+
const [{ open: i }, r] = F({ open: !0 }), s = se((c) => {
|
|
145
|
+
r({ open: c });
|
|
146
|
+
}, []), d = se(() => {
|
|
147
|
+
r((c) => y(a({}, c), { open: !c.open }));
|
|
148
|
+
}, []), l = a(a({
|
|
149
149
|
open: i,
|
|
150
150
|
setOpen: s,
|
|
151
151
|
toggleOpen: d
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(Ct.Provider, { value:
|
|
154
|
-
},
|
|
155
|
-
const e =
|
|
153
|
+
return /* @__PURE__ */ o(Ct.Provider, { value: l, children: n });
|
|
154
|
+
}, wn = () => {
|
|
155
|
+
const e = je(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
|
+
}, 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__ */
|
|
246
|
-
/* @__PURE__ */ o(
|
|
244
|
+
const { open: n } = wn();
|
|
245
|
+
return /* @__PURE__ */ p(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,10 +321,10 @@ function In({
|
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ p(yn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
325
|
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
326
|
-
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */
|
|
327
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ p(I, { className: B.titleSlider, children: [
|
|
327
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
|
|
328
328
|
Z,
|
|
329
329
|
{
|
|
330
330
|
className: B.leftPanelButton,
|
|
@@ -335,12 +335,12 @@ function In({
|
|
|
335
335
|
size: "large",
|
|
336
336
|
children: [
|
|
337
337
|
" ",
|
|
338
|
-
/* @__PURE__ */ o(
|
|
338
|
+
/* @__PURE__ */ o(ct, {})
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ o(
|
|
343
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ o(O, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
343
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
|
|
344
344
|
Z,
|
|
345
345
|
{
|
|
346
346
|
className: B.rightPanelButton,
|
|
@@ -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
|
+
), $n = be(I, {
|
|
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,60 +408,60 @@ 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
|
-
debugOpacity:
|
|
421
|
-
headerBoxProps:
|
|
422
|
-
onOpened:
|
|
420
|
+
debugOpacity: l = !1,
|
|
421
|
+
headerBoxProps: c = {},
|
|
422
|
+
onOpened: u,
|
|
423
423
|
onClosed: g,
|
|
424
|
-
"data-testid":
|
|
424
|
+
"data-testid": C,
|
|
425
425
|
navBarOpen: w = !1,
|
|
426
426
|
navBarWidthOpen: h = 0,
|
|
427
|
-
navBarWidthClosed:
|
|
427
|
+
navBarWidthClosed: b = 0
|
|
428
428
|
}) {
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
|
|
429
|
+
return /* @__PURE__ */ p(
|
|
430
|
+
kn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
|
-
onEntered: () =>
|
|
433
|
+
onEntered: () => u == null ? void 0 : u(),
|
|
434
434
|
onExited: () => g == null ? void 0 : g()
|
|
435
435
|
},
|
|
436
436
|
variant: "persistent",
|
|
437
437
|
anchor: t,
|
|
438
438
|
open: n,
|
|
439
439
|
width: s,
|
|
440
|
-
debugOpacity:
|
|
441
|
-
"data-testid":
|
|
440
|
+
debugOpacity: l,
|
|
441
|
+
"data-testid": C,
|
|
442
442
|
navBarOpen: w,
|
|
443
443
|
navBarWidthOpen: h,
|
|
444
|
-
navBarWidthClosed:
|
|
444
|
+
navBarWidthClosed: b,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
/* @__PURE__ */ o(
|
|
448
|
-
d && /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */ o(
|
|
446
|
+
/* @__PURE__ */ o($n, y(a({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ p(N, { children: [
|
|
447
|
+
/* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
|
+
d && /* @__PURE__ */ p(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
449
|
+
/* @__PURE__ */ o(dt, { "data-testid": "arrowbackicon" }),
|
|
450
450
|
" "
|
|
451
451
|
] })
|
|
452
|
-
] }) : /* @__PURE__ */
|
|
453
|
-
d && /* @__PURE__ */
|
|
454
|
-
/* @__PURE__ */ o(
|
|
452
|
+
] }) : /* @__PURE__ */ p(N, { children: [
|
|
453
|
+
d && /* @__PURE__ */ p(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
454
|
+
/* @__PURE__ */ o(ct, {}),
|
|
455
455
|
" "
|
|
456
456
|
] }),
|
|
457
|
-
/* @__PURE__ */ o(
|
|
457
|
+
/* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
458
458
|
] }) })),
|
|
459
459
|
e
|
|
460
460
|
]
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const Dn = W(I, {
|
|
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
|
+
})), xe = !1, Ce = !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,
|
|
@@ -512,130 +512,130 @@ function _o({
|
|
|
512
512
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
513
513
|
debugOpacity: s = !1,
|
|
514
514
|
pageContainerProps: d,
|
|
515
|
-
pageContentDataTestId:
|
|
516
|
-
topBarDataTestId:
|
|
517
|
-
navBarOpen:
|
|
515
|
+
pageContentDataTestId: l,
|
|
516
|
+
topBarDataTestId: c,
|
|
517
|
+
navBarOpen: u,
|
|
518
518
|
navBarWidthOpen: g,
|
|
519
|
-
navBarWidthClosed:
|
|
519
|
+
navBarWidthClosed: C
|
|
520
520
|
}) {
|
|
521
|
-
const [w, h] = F(
|
|
521
|
+
const [w, h] = F(xe), [b, S] = F(Ce), [$, D] = F(xe), [E, T] = F(Ce), L = n !== void 0, P = i !== void 0, {
|
|
522
522
|
titleText: v,
|
|
523
|
-
content:
|
|
523
|
+
content: k,
|
|
524
524
|
flavour: M,
|
|
525
525
|
open: f,
|
|
526
|
-
onChangeOpen:
|
|
526
|
+
onChangeOpen: m,
|
|
527
527
|
width: x,
|
|
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: $e,
|
|
537
|
+
open: de,
|
|
538
|
+
onChangeOpen: De,
|
|
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 !== xe && (h(H), D(H));
|
|
548
548
|
}, [H]), K(() => {
|
|
549
|
-
ne !== Ce && (
|
|
549
|
+
ne !== Ce && (S(ne), T(ne));
|
|
550
550
|
}, [ne]);
|
|
551
|
-
const
|
|
552
|
-
f === void 0 && (h(U), r && P && (U ? (
|
|
553
|
-
},
|
|
554
|
-
|
|
551
|
+
const pe = f === void 0 ? w : f, he = de === void 0 ? b : de, Te = (U) => {
|
|
552
|
+
f === void 0 && (h(U), r && P && (U ? (S(!1), T(b)) : S(E))), m && m(U);
|
|
553
|
+
}, Ee = (U) => {
|
|
554
|
+
de === void 0 && (S(U), r && L && (U ? (h(!1), D(w)) : h($))), De && De(U);
|
|
555
555
|
};
|
|
556
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ p(I, { 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:
|
|
570
|
-
navBarOpen:
|
|
569
|
+
onClosed: ce,
|
|
570
|
+
navBarOpen: u,
|
|
571
571
|
navBarWidthOpen: g,
|
|
572
|
-
navBarWidthClosed:
|
|
573
|
-
children:
|
|
572
|
+
navBarWidthClosed: C,
|
|
573
|
+
children: k
|
|
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:
|
|
589
|
-
navBarOpen:
|
|
587
|
+
onOpened: Nt,
|
|
588
|
+
onClosed: Pt,
|
|
589
|
+
navBarOpen: u,
|
|
590
590
|
navBarWidthOpen: g,
|
|
591
|
-
navBarWidthClosed:
|
|
592
|
-
children:
|
|
591
|
+
navBarWidthClosed: C,
|
|
592
|
+
children: Ft
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ o(
|
|
596
596
|
In,
|
|
597
597
|
a(a({
|
|
598
598
|
titleText: t,
|
|
599
|
-
"data-testid":
|
|
599
|
+
"data-testid": c
|
|
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 && $e === "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
|
+
Dn,
|
|
618
|
+
y(a(a({}, M === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
|
-
open:
|
|
620
|
+
open: pe,
|
|
621
621
|
width: x
|
|
622
622
|
}
|
|
623
|
-
} : {}),
|
|
623
|
+
} : {}), $e === "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": l }, 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(I, { 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,11 +744,11 @@ function Ln(e) {
|
|
|
718
744
|
}
|
|
719
745
|
return t;
|
|
720
746
|
}
|
|
721
|
-
const
|
|
722
|
-
function
|
|
723
|
-
const r =
|
|
724
|
-
return /* @__PURE__ */
|
|
725
|
-
|
|
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();
|
|
750
|
+
return /* @__PURE__ */ p(
|
|
751
|
+
I,
|
|
726
752
|
{
|
|
727
753
|
sx: {
|
|
728
754
|
paddingTop: 3,
|
|
@@ -733,7 +759,7 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
733
759
|
},
|
|
734
760
|
children: [
|
|
735
761
|
!i && /* @__PURE__ */ o(
|
|
736
|
-
|
|
762
|
+
I,
|
|
737
763
|
{
|
|
738
764
|
sx: {
|
|
739
765
|
width: n ? "5rem" : "2rem",
|
|
@@ -741,44 +767,44 @@ 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(
|
|
758
|
-
|
|
784
|
+
I,
|
|
759
785
|
{
|
|
760
786
|
sx: {
|
|
761
787
|
width: n ? "5rem" : "2rem",
|
|
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__ */
|
|
791
|
+
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ p(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(
|
|
775
|
-
t ? /* @__PURE__ */ o(
|
|
799
|
+
/* @__PURE__ */ o(_n, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ p(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
800
|
+
e != null && e.name ? /* @__PURE__ */ o(O, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(_e, { animation: !1, width: "50%" }),
|
|
801
|
+
t ? /* @__PURE__ */ o(O, { 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,
|
|
@@ -786,13 +812,13 @@ function Rn({
|
|
|
786
812
|
top: r,
|
|
787
813
|
middle: s,
|
|
788
814
|
bottom: d,
|
|
789
|
-
user:
|
|
790
|
-
domainCode:
|
|
791
|
-
useNewAvatar:
|
|
815
|
+
user: l,
|
|
816
|
+
domainCode: c,
|
|
817
|
+
useNewAvatar: u = !1
|
|
792
818
|
}) {
|
|
793
|
-
const g =
|
|
794
|
-
return /* @__PURE__ */ o(
|
|
795
|
-
|
|
819
|
+
const g = wt(), C = ut(j);
|
|
820
|
+
return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ p(
|
|
821
|
+
Ln,
|
|
796
822
|
{
|
|
797
823
|
open: e,
|
|
798
824
|
widthOpen: n,
|
|
@@ -803,41 +829,41 @@ function Rn({
|
|
|
803
829
|
component: "nav"
|
|
804
830
|
},
|
|
805
831
|
onClose: () => {
|
|
806
|
-
|
|
832
|
+
C(!1);
|
|
807
833
|
},
|
|
808
834
|
isSmallScreen: g,
|
|
809
835
|
children: [
|
|
810
|
-
!g && /* @__PURE__ */ o(
|
|
811
|
-
r && /* @__PURE__ */
|
|
836
|
+
!g && /* @__PURE__ */ o(Gt, {}),
|
|
837
|
+
r && /* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
812
838
|
r,
|
|
813
|
-
/* @__PURE__ */ o(
|
|
839
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
814
840
|
] }),
|
|
815
|
-
/* @__PURE__ */ o(
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */ o(
|
|
818
|
-
/* @__PURE__ */ o(
|
|
841
|
+
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Nn, { links: s }) : s }),
|
|
842
|
+
/* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
843
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
844
|
+
/* @__PURE__ */ o(Rn, { user: l, domainCode: c, open: e, useNewAvatar: u }),
|
|
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,
|
|
829
855
|
noPadding: i
|
|
830
856
|
}) {
|
|
831
857
|
return /* @__PURE__ */ o(
|
|
832
|
-
|
|
858
|
+
I,
|
|
833
859
|
{
|
|
834
860
|
sx: {
|
|
835
861
|
overflow: "auto",
|
|
836
862
|
height: `calc(100vh - ${t}px)`,
|
|
837
863
|
flexGrow: 1
|
|
838
864
|
},
|
|
839
|
-
children: i ? /* @__PURE__ */ o(
|
|
840
|
-
|
|
865
|
+
children: i ? /* @__PURE__ */ o(I, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
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 =
|
|
862
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
863
|
-
|
|
887
|
+
const r = ut(j), s = () => r((c) => !c), d = le(), l = wt();
|
|
888
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
|
|
889
|
+
et,
|
|
864
890
|
{
|
|
865
891
|
square: !0,
|
|
866
892
|
elevation: 0,
|
|
@@ -874,7 +900,7 @@ function zn({
|
|
|
874
900
|
gap: 2,
|
|
875
901
|
flexShrink: 0,
|
|
876
902
|
height: t,
|
|
877
|
-
zIndex:
|
|
903
|
+
zIndex: l ? 0 : d.zIndex.drawer + 101
|
|
878
904
|
},
|
|
879
905
|
children: [
|
|
880
906
|
/* @__PURE__ */ o(
|
|
@@ -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(
|
|
916
|
+
/* @__PURE__ */ o(O, { 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,
|
|
@@ -901,50 +927,50 @@ function Lo({
|
|
|
901
927
|
pageContentDataTestId: r,
|
|
902
928
|
topBarDataTestId: s,
|
|
903
929
|
navBarDataTestId: d,
|
|
904
|
-
navBarMiddle:
|
|
905
|
-
navBarBottom:
|
|
906
|
-
user:
|
|
930
|
+
navBarMiddle: l,
|
|
931
|
+
navBarBottom: c,
|
|
932
|
+
user: u,
|
|
907
933
|
domainCode: g,
|
|
908
|
-
useNewAvatar:
|
|
934
|
+
useNewAvatar: C = !1
|
|
909
935
|
}) {
|
|
910
|
-
|
|
936
|
+
ht([
|
|
911
937
|
[j, n != null ? n : !0],
|
|
912
|
-
[
|
|
938
|
+
[we, t != null ? t : ""]
|
|
913
939
|
]);
|
|
914
|
-
const w =
|
|
915
|
-
return /* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */ o(
|
|
940
|
+
const w = Me(j), [h] = V(At), [b] = V(bt), S = Me(we), [$] = V(St), [D] = V(Fn), [E] = V(yt);
|
|
941
|
+
return /* @__PURE__ */ p(I, { children: [
|
|
942
|
+
/* @__PURE__ */ o(Vt, {}),
|
|
917
943
|
/* @__PURE__ */ o(
|
|
918
|
-
|
|
944
|
+
Gn,
|
|
919
945
|
{
|
|
920
|
-
titleText:
|
|
946
|
+
titleText: S,
|
|
921
947
|
"data-testid": s,
|
|
922
|
-
height:
|
|
923
|
-
middle:
|
|
948
|
+
height: $,
|
|
949
|
+
middle: D
|
|
924
950
|
}
|
|
925
951
|
),
|
|
926
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ p(I, { sx: { display: "flex" }, children: [
|
|
927
953
|
/* @__PURE__ */ o(
|
|
928
|
-
|
|
954
|
+
Hn,
|
|
929
955
|
{
|
|
930
956
|
open: w,
|
|
931
957
|
top: E,
|
|
932
|
-
middle:
|
|
933
|
-
bottom:
|
|
934
|
-
user:
|
|
958
|
+
middle: l,
|
|
959
|
+
bottom: c,
|
|
960
|
+
user: u,
|
|
935
961
|
domainCode: g,
|
|
936
962
|
widthOpen: h,
|
|
937
|
-
widthClosed:
|
|
938
|
-
offsetTop:
|
|
963
|
+
widthClosed: b,
|
|
964
|
+
offsetTop: $,
|
|
939
965
|
"data-testid": d,
|
|
940
|
-
useNewAvatar:
|
|
966
|
+
useNewAvatar: C
|
|
941
967
|
}
|
|
942
968
|
),
|
|
943
969
|
/* @__PURE__ */ o(
|
|
944
|
-
|
|
945
|
-
|
|
970
|
+
Wn,
|
|
971
|
+
y(a({
|
|
946
972
|
"data-testid": r,
|
|
947
|
-
topBarHeight:
|
|
973
|
+
topBarHeight: $
|
|
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,
|
|
@@ -960,48 +986,48 @@ const Dt = ({
|
|
|
960
986
|
primaryButton: r,
|
|
961
987
|
secondaryButton: s,
|
|
962
988
|
onClose: d,
|
|
963
|
-
sx:
|
|
964
|
-
"data-testid":
|
|
965
|
-
disableCloseOnBackdropOrEscape:
|
|
989
|
+
sx: l,
|
|
990
|
+
"data-testid": c,
|
|
991
|
+
disableCloseOnBackdropOrEscape: u = !1,
|
|
966
992
|
isLoading: g = !1
|
|
967
993
|
}) => {
|
|
968
|
-
var h,
|
|
969
|
-
const [
|
|
970
|
-
return /* @__PURE__ */
|
|
971
|
-
|
|
994
|
+
var h, b;
|
|
995
|
+
const [C, w] = F(!1);
|
|
996
|
+
return /* @__PURE__ */ p(
|
|
997
|
+
nt,
|
|
972
998
|
{
|
|
973
999
|
open: e,
|
|
974
|
-
onClose: (
|
|
975
|
-
|
|
1000
|
+
onClose: (S, $) => _(void 0, null, function* () {
|
|
1001
|
+
u && ($ === "backdropClick" || $ === "escapeKeyDown") || C || (s != null && s.onClick ? yield s.onClick() : d());
|
|
976
1002
|
}),
|
|
977
1003
|
fullWidth: !0,
|
|
978
1004
|
maxWidth: i != null ? i : "xs",
|
|
979
|
-
"data-testid":
|
|
980
|
-
sx:
|
|
1005
|
+
"data-testid": c,
|
|
1006
|
+
sx: l,
|
|
981
1007
|
children: [
|
|
982
|
-
g && /* @__PURE__ */ o(
|
|
983
|
-
/* @__PURE__ */ o(
|
|
984
|
-
/* @__PURE__ */ o(
|
|
985
|
-
/* @__PURE__ */
|
|
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__ */ p(at, { children: [
|
|
986
1012
|
/* @__PURE__ */ o(
|
|
987
1013
|
J,
|
|
988
1014
|
{
|
|
989
1015
|
onClick: (h = s == null ? void 0 : s.onClick) != null ? h : d,
|
|
990
1016
|
"data-testid": s == null ? void 0 : s.testId,
|
|
991
|
-
disabled: (s == null ? void 0 : s.disabled) ||
|
|
1017
|
+
disabled: (s == null ? void 0 : s.disabled) || C,
|
|
992
1018
|
color: s == null ? void 0 : s.buttonColor,
|
|
993
|
-
children: (
|
|
1019
|
+
children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
|
|
994
1020
|
}
|
|
995
1021
|
),
|
|
996
1022
|
r && /* @__PURE__ */ o(
|
|
997
1023
|
J,
|
|
998
1024
|
{
|
|
999
1025
|
onClick: () => _(void 0, null, function* () {
|
|
1000
|
-
var
|
|
1001
|
-
w(!0), yield (
|
|
1026
|
+
var S;
|
|
1027
|
+
w(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), w(!1);
|
|
1002
1028
|
}),
|
|
1003
1029
|
"data-testid": r.testId,
|
|
1004
|
-
disabled: r.disabled ||
|
|
1030
|
+
disabled: r.disabled || C,
|
|
1005
1031
|
color: r == null ? void 0 : r.buttonColor,
|
|
1006
1032
|
children: r.text
|
|
1007
1033
|
}
|
|
@@ -1010,19 +1036,19 @@ const Dt = ({
|
|
|
1010
1036
|
]
|
|
1011
1037
|
}
|
|
1012
1038
|
);
|
|
1013
|
-
},
|
|
1039
|
+
}, $t = ({
|
|
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,
|
|
@@ -1031,86 +1057,86 @@ function Mo({
|
|
|
1031
1057
|
label: r,
|
|
1032
1058
|
value: s,
|
|
1033
1059
|
"data-testid": d,
|
|
1034
|
-
sx:
|
|
1035
|
-
boxSx:
|
|
1036
|
-
textFieldColor:
|
|
1060
|
+
sx: l,
|
|
1061
|
+
boxSx: c,
|
|
1062
|
+
textFieldColor: u,
|
|
1037
1063
|
textFieldVariant: g = "filled",
|
|
1038
|
-
loadingText:
|
|
1064
|
+
loadingText: C = "Loading...",
|
|
1039
1065
|
noOptionsText: w = "No options",
|
|
1040
|
-
popupIcon: h = /* @__PURE__ */ o(
|
|
1041
|
-
error:
|
|
1042
|
-
helperText:
|
|
1043
|
-
preLoadedOptions:
|
|
1044
|
-
disablePortal:
|
|
1066
|
+
popupIcon: h = /* @__PURE__ */ o(on, {}),
|
|
1067
|
+
error: b = !1,
|
|
1068
|
+
helperText: S = "",
|
|
1069
|
+
preLoadedOptions: $ = void 0,
|
|
1070
|
+
disablePortal: D = !1,
|
|
1045
1071
|
disableIconFlip: E = !1
|
|
1046
1072
|
}) {
|
|
1047
|
-
const [
|
|
1048
|
-
const x = s.filter((A) => A.id !==
|
|
1073
|
+
const [T, L] = F(""), P = (f, m) => {
|
|
1074
|
+
const x = s.filter((A) => A.id !== m);
|
|
1049
1075
|
n(x, "delete", f);
|
|
1050
|
-
}, { data: v, isLoading:
|
|
1051
|
-
inputValue:
|
|
1076
|
+
}, { data: v, isLoading: k } = $t({
|
|
1077
|
+
inputValue: T,
|
|
1052
1078
|
label: r,
|
|
1053
1079
|
lookup: e,
|
|
1054
1080
|
minLength: i,
|
|
1055
|
-
preLoadedOptions:
|
|
1056
|
-
}), M =
|
|
1057
|
-
return /* @__PURE__ */
|
|
1081
|
+
preLoadedOptions: $
|
|
1082
|
+
}), M = T.length >= i;
|
|
1083
|
+
return /* @__PURE__ */ p("div", { "data-testid": d, children: [
|
|
1058
1084
|
/* @__PURE__ */ o(
|
|
1059
|
-
|
|
1085
|
+
Se,
|
|
1060
1086
|
{
|
|
1061
|
-
sx: a(a({},
|
|
1087
|
+
sx: a(a({}, l), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1062
1088
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
1063
|
-
disablePortal:
|
|
1089
|
+
disablePortal: D,
|
|
1064
1090
|
multiple: !0,
|
|
1065
1091
|
getOptionLabel: (f) => typeof f == "string" ? f : f.label,
|
|
1066
|
-
loading: M ?
|
|
1092
|
+
loading: M ? k : !1,
|
|
1067
1093
|
options: [...s, ...v != null ? v : []],
|
|
1068
1094
|
filterSelectedOptions: !0,
|
|
1069
1095
|
includeInputInList: !0,
|
|
1070
1096
|
value: s,
|
|
1071
|
-
onChange: (f,
|
|
1072
|
-
n(
|
|
1097
|
+
onChange: (f, m, x) => {
|
|
1098
|
+
n(m, x, f);
|
|
1073
1099
|
},
|
|
1074
|
-
onInputChange: (f,
|
|
1100
|
+
onInputChange: (f, m) => L(m),
|
|
1075
1101
|
noOptionsText: M ? w : "Start typing to search",
|
|
1076
|
-
loadingText:
|
|
1102
|
+
loadingText: C,
|
|
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
|
-
error:
|
|
1085
|
-
helperText:
|
|
1086
|
-
InputProps:
|
|
1087
|
-
endAdornment: /* @__PURE__ */
|
|
1088
|
-
|
|
1110
|
+
error: b,
|
|
1111
|
+
helperText: S,
|
|
1112
|
+
InputProps: y(a({}, f.InputProps), {
|
|
1113
|
+
endAdornment: /* @__PURE__ */ p(N, { children: [
|
|
1114
|
+
k ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
|
|
1089
1115
|
f.InputProps.endAdornment
|
|
1090
1116
|
] })
|
|
1091
1117
|
}),
|
|
1092
1118
|
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
|
|
1093
|
-
onKeyDown: (
|
|
1094
|
-
(
|
|
1119
|
+
onKeyDown: (m) => {
|
|
1120
|
+
(m.key === "Backspace" || m.key === "Delete") && m.stopPropagation();
|
|
1095
1121
|
},
|
|
1096
|
-
color:
|
|
1122
|
+
color: u
|
|
1097
1123
|
})
|
|
1098
1124
|
),
|
|
1099
1125
|
renderTags: () => null,
|
|
1100
|
-
isOptionEqualToValue: (f,
|
|
1101
|
-
renderOption: (f,
|
|
1126
|
+
isOptionEqualToValue: (f, m) => f.id === m.id,
|
|
1127
|
+
renderOption: (f, m, x) => {
|
|
1102
1128
|
if (t) {
|
|
1103
|
-
const A =
|
|
1129
|
+
const A = an(m.label, x.inputValue, {
|
|
1104
1130
|
insideWords: !0,
|
|
1105
1131
|
findAllOccurrences: !0
|
|
1106
|
-
}), H =
|
|
1107
|
-
return /* @__PURE__ */
|
|
1132
|
+
}), H = sn(m.label, A);
|
|
1133
|
+
return /* @__PURE__ */ ve(
|
|
1108
1134
|
"li",
|
|
1109
|
-
|
|
1110
|
-
key:
|
|
1111
|
-
"data-testid": d ? `${d}:Autocomplete:option(${
|
|
1135
|
+
y(a({}, f), {
|
|
1136
|
+
key: m.id,
|
|
1137
|
+
"data-testid": d ? `${d}:Autocomplete:option(${m.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,23 +1144,23 @@ 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
|
-
|
|
1128
|
-
key:
|
|
1129
|
-
"data-testid": d ? `${d}:option(${
|
|
1153
|
+
y(a({}, f), {
|
|
1154
|
+
key: m.id,
|
|
1155
|
+
"data-testid": d ? `${d}:option(${m.id.toString()})` : void 0
|
|
1130
1156
|
}),
|
|
1131
|
-
|
|
1157
|
+
m.label
|
|
1132
1158
|
);
|
|
1133
1159
|
}
|
|
1134
1160
|
}
|
|
1135
1161
|
),
|
|
1136
|
-
s.length > 0 && /* @__PURE__ */ o(
|
|
1137
|
-
|
|
1162
|
+
s.length > 0 && /* @__PURE__ */ o(I, { sx: c, children: s.map((f) => /* @__PURE__ */ o(
|
|
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",
|
|
@@ -1156,13 +1182,13 @@ function Mo({
|
|
|
1156
1182
|
}
|
|
1157
1183
|
]
|
|
1158
1184
|
},
|
|
1159
|
-
children: /* @__PURE__ */ o(
|
|
1185
|
+
children: /* @__PURE__ */ o(O, { style: { whiteSpace: "normal" }, children: f.chipLabel ? f.chipLabel : f.label })
|
|
1160
1186
|
}
|
|
1161
1187
|
),
|
|
1162
1188
|
"data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
|
|
1163
|
-
onDelete: (
|
|
1189
|
+
onDelete: (m) => P(m, 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,
|
|
@@ -1181,73 +1207,73 @@ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
|
1181
1207
|
sx: r,
|
|
1182
1208
|
textFieldColor: s,
|
|
1183
1209
|
textFieldVariant: d = "filled",
|
|
1184
|
-
error:
|
|
1185
|
-
"data-testid":
|
|
1186
|
-
noOptionsText:
|
|
1210
|
+
error: l = !1,
|
|
1211
|
+
"data-testid": c,
|
|
1212
|
+
noOptionsText: u = "No options",
|
|
1187
1213
|
minLength: g = 3,
|
|
1188
|
-
disablePortal:
|
|
1214
|
+
disablePortal: C = !1,
|
|
1189
1215
|
preLoadedOptions: w,
|
|
1190
1216
|
helperText: h = "",
|
|
1191
|
-
disabled:
|
|
1192
|
-
popupIcon:
|
|
1193
|
-
disableIconFlip:
|
|
1217
|
+
disabled: b,
|
|
1218
|
+
popupIcon: S,
|
|
1219
|
+
disableIconFlip: $
|
|
1194
1220
|
}) => {
|
|
1195
|
-
const [
|
|
1196
|
-
inputValue:
|
|
1221
|
+
const [D, E] = F(""), { data: T, isLoading: L } = $t({
|
|
1222
|
+
inputValue: D,
|
|
1197
1223
|
label: n,
|
|
1198
1224
|
lookup: e,
|
|
1199
1225
|
minLength: g != null ? g : 0,
|
|
1200
1226
|
preLoadedOptions: w
|
|
1201
|
-
}), P =
|
|
1202
|
-
return /* @__PURE__ */ o("div", { "data-testid":
|
|
1203
|
-
|
|
1227
|
+
}), P = D.length >= g;
|
|
1228
|
+
return /* @__PURE__ */ o("div", { "data-testid": c, children: /* @__PURE__ */ o(Qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1229
|
+
Se,
|
|
1204
1230
|
{
|
|
1205
|
-
sx: a(a({}, r),
|
|
1206
|
-
"data-testid":
|
|
1231
|
+
sx: a(a({}, r), $ ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1232
|
+
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1207
1233
|
loading: P ? L : !1,
|
|
1208
|
-
options:
|
|
1209
|
-
onChange: (v,
|
|
1210
|
-
t(v,
|
|
1234
|
+
options: T != null ? T : [],
|
|
1235
|
+
onChange: (v, k, M) => {
|
|
1236
|
+
t(v, k, M);
|
|
1211
1237
|
},
|
|
1212
|
-
disablePortal:
|
|
1238
|
+
disablePortal: C,
|
|
1213
1239
|
filterOptions: (v) => v,
|
|
1214
1240
|
value: i,
|
|
1215
|
-
noOptionsText: P ?
|
|
1241
|
+
noOptionsText: P ? u : "Start typing to search",
|
|
1216
1242
|
getOptionLabel: (v) => v.label,
|
|
1217
|
-
popupIcon:
|
|
1243
|
+
popupIcon: S,
|
|
1218
1244
|
renderInput: (v) => /* @__PURE__ */ o(
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
"data-testid":
|
|
1245
|
+
ye,
|
|
1246
|
+
y(a({
|
|
1247
|
+
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0
|
|
1222
1248
|
}, v), {
|
|
1223
1249
|
variant: d,
|
|
1224
1250
|
label: n,
|
|
1225
1251
|
color: s,
|
|
1226
|
-
error:
|
|
1252
|
+
error: l,
|
|
1227
1253
|
helperText: h
|
|
1228
1254
|
})
|
|
1229
1255
|
),
|
|
1230
|
-
isOptionEqualToValue: (v,
|
|
1231
|
-
onInputChange: (v,
|
|
1232
|
-
E(
|
|
1256
|
+
isOptionEqualToValue: (v, k) => v.id === k.id,
|
|
1257
|
+
onInputChange: (v, k) => {
|
|
1258
|
+
E(k);
|
|
1233
1259
|
},
|
|
1234
|
-
renderOption: (v,
|
|
1260
|
+
renderOption: (v, k) => /* @__PURE__ */ ve(
|
|
1235
1261
|
"li",
|
|
1236
|
-
|
|
1237
|
-
key:
|
|
1238
|
-
"data-testid":
|
|
1262
|
+
y(a({}, v), {
|
|
1263
|
+
key: k.id,
|
|
1264
|
+
"data-testid": c ? `${c}:Autocomplete:option(${k.id.toString()})` : void 0
|
|
1239
1265
|
}),
|
|
1240
|
-
|
|
1266
|
+
k.label
|
|
1241
1267
|
),
|
|
1242
|
-
disabled:
|
|
1268
|
+
disabled: b
|
|
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,37 +1281,37 @@ 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), l = () => _(void 0, null, function* () {
|
|
1264
1290
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1265
|
-
}),
|
|
1291
|
+
}), c = () => _(void 0, null, function* () {
|
|
1266
1292
|
d(s + 1), t();
|
|
1267
1293
|
});
|
|
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: {
|
|
1280
1306
|
text: "Continue",
|
|
1281
|
-
onClick:
|
|
1307
|
+
onClick: c,
|
|
1282
1308
|
disabled: !1,
|
|
1283
1309
|
testId: "PreferencesDialog",
|
|
1284
1310
|
buttonColor: "secondary"
|
|
1285
1311
|
},
|
|
1286
1312
|
secondaryButton: {
|
|
1287
1313
|
text: "Log out",
|
|
1288
|
-
onClick:
|
|
1314
|
+
onClick: l,
|
|
1289
1315
|
disabled: !1,
|
|
1290
1316
|
testId: "PreferencesDialog",
|
|
1291
1317
|
buttonColor: "secondary"
|
|
@@ -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",
|
|
@@ -1323,12 +1349,12 @@ function Uo({
|
|
|
1323
1349
|
onError: r = () => {
|
|
1324
1350
|
}
|
|
1325
1351
|
}) {
|
|
1326
|
-
var
|
|
1327
|
-
const { isAuthenticated: s, isLoading: d, error:
|
|
1352
|
+
var C, w;
|
|
1353
|
+
const { isAuthenticated: s, isLoading: d, error: l, loginWithRedirect: c, logout: u } = gt();
|
|
1328
1354
|
K(() => {
|
|
1329
|
-
|
|
1330
|
-
}, [
|
|
1331
|
-
const g =
|
|
1355
|
+
l && r(l);
|
|
1356
|
+
}, [l, r]);
|
|
1357
|
+
const g = Ht(
|
|
1332
1358
|
() => ({
|
|
1333
1359
|
appState: {
|
|
1334
1360
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1337,167 +1363,167 @@ function Uo({
|
|
|
1337
1363
|
[]
|
|
1338
1364
|
);
|
|
1339
1365
|
if (K(() => {
|
|
1340
|
-
d || s ||
|
|
1341
|
-
}, [d, s,
|
|
1366
|
+
d || s || l || c(g);
|
|
1367
|
+
}, [d, s, l, c, r, g]), l) {
|
|
1342
1368
|
if (i || console.error(
|
|
1343
1369
|
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${d}]`,
|
|
1344
|
-
|
|
1370
|
+
l
|
|
1345
1371
|
), n === "all")
|
|
1346
|
-
throw
|
|
1347
|
-
if (
|
|
1348
|
-
let h = "Auth error",
|
|
1349
|
-
if (
|
|
1350
|
-
h = "Unauthorised",
|
|
1351
|
-
else if (
|
|
1352
|
-
h = "App not authorised",
|
|
1353
|
-
else if (
|
|
1354
|
-
h = "Auth0 script execution time exceeded",
|
|
1355
|
-
else if (
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1372
|
+
throw l;
|
|
1373
|
+
if (qn(l)) {
|
|
1374
|
+
let h = "Auth error", b = "An unknown Auth0 error occurred.";
|
|
1375
|
+
if (Xn(l))
|
|
1376
|
+
h = "Unauthorised", b = `You are not authorised to access ${t}.`;
|
|
1377
|
+
else if (Qn(l))
|
|
1378
|
+
h = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1379
|
+
else if (Yn(l))
|
|
1380
|
+
h = "Auth0 script execution time exceeded", b = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
1381
|
+
else if (l.message === "Invalid state") {
|
|
1382
|
+
const S = localStorage.getItem("auth0_redirect_count");
|
|
1383
|
+
S ? S && parseInt(S) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(S) + 1)), c(g)) : (localStorage.setItem("auth0_redirect_count", "1"), c(g));
|
|
1358
1384
|
} else if (n === "unknown")
|
|
1359
|
-
throw
|
|
1360
|
-
return /* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */ o(
|
|
1362
|
-
/* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */ o(
|
|
1385
|
+
throw l;
|
|
1386
|
+
return /* @__PURE__ */ p(nt, { open: !0, children: [
|
|
1387
|
+
/* @__PURE__ */ o(it, { children: h }),
|
|
1388
|
+
/* @__PURE__ */ p(rt, { children: [
|
|
1389
|
+
/* @__PURE__ */ o(O, { children: b }),
|
|
1364
1390
|
/* @__PURE__ */ o("br", {}),
|
|
1365
|
-
/* @__PURE__ */ o(
|
|
1366
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ o(O, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1392
|
+
/* @__PURE__ */ p(O, { variant: "body2", children: [
|
|
1367
1393
|
"error: ",
|
|
1368
|
-
(
|
|
1394
|
+
(C = l == null ? void 0 : l.error) != null ? C : "N/A"
|
|
1369
1395
|
] }),
|
|
1370
|
-
/* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ p(O, { variant: "body2", children: [
|
|
1371
1397
|
"description: ",
|
|
1372
|
-
(w =
|
|
1398
|
+
(w = l == null ? void 0 : l.error_description) != null ? w : "N/A"
|
|
1373
1399
|
] })
|
|
1374
1400
|
] }),
|
|
1375
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ p(at, { children: [
|
|
1376
1402
|
h === "Auth0 script execution time exceeded" && /* @__PURE__ */ o(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
|
|
1377
|
-
/* @__PURE__ */ o(J, { onClick: () =>
|
|
1403
|
+
/* @__PURE__ */ o(J, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1378
1404
|
] })
|
|
1379
1405
|
] });
|
|
1380
1406
|
} else if (n === "unknown")
|
|
1381
|
-
throw
|
|
1407
|
+
throw l;
|
|
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 = {}, Dt = 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
|
-
var
|
|
1419
|
-
const [{ open:
|
|
1420
|
-
|
|
1421
|
-
}, []), h =
|
|
1422
|
-
|
|
1423
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1424
|
-
),
|
|
1425
|
-
const A = a(
|
|
1426
|
-
key:
|
|
1444
|
+
var m;
|
|
1445
|
+
const [{ open: l }, c] = F({ open: !1 }), u = fe([]), g = fe(Date.now()), C = fe(0), w = se((x) => {
|
|
1446
|
+
c({ open: x });
|
|
1447
|
+
}, []), h = se((x = {}) => {
|
|
1448
|
+
C.current += 1, u.current.length >= Qe && Date.now() - g.current >= Ye && (g.current = Date.now(), console.error(
|
|
1449
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Qe}) hit ${C.current} times in last ${Ye}ms)`
|
|
1450
|
+
), C.current = 0);
|
|
1451
|
+
const A = a(y(a({}, Xe), {
|
|
1452
|
+
key: jn()
|
|
1427
1453
|
}), x);
|
|
1428
|
-
return
|
|
1429
|
-
}, []),
|
|
1430
|
-
const A =
|
|
1454
|
+
return u.current.push(A), u.current.length === 1 && c({ open: !0 }), A.key;
|
|
1455
|
+
}, []), b = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), S = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), D = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
|
|
1456
|
+
const A = u.current.findIndex((H) => H.key === x);
|
|
1431
1457
|
if (A !== -1)
|
|
1432
|
-
return A === 0 ? (
|
|
1433
|
-
},
|
|
1434
|
-
n(x, A) &&
|
|
1458
|
+
return A === 0 ? (c({ open: !1 }), u.current[0]) : u.current.splice(A, 1);
|
|
1459
|
+
}, T = (x, A) => {
|
|
1460
|
+
n(x, A) && c({ open: !1 });
|
|
1435
1461
|
}, L = () => {
|
|
1436
1462
|
}, P = () => {
|
|
1437
|
-
|
|
1438
|
-
}, v = (
|
|
1439
|
-
"autoHideDuration" in v && (
|
|
1440
|
-
const M = a(a({},
|
|
1441
|
-
open:
|
|
1463
|
+
u.current.shift(), u.current.length > 0 && c({ open: !0 });
|
|
1464
|
+
}, v = (m = u.current[0]) != null ? m : a({}, Xe), k = {};
|
|
1465
|
+
"autoHideDuration" in v && (k.autoHideDuration = v.autoHideDuration);
|
|
1466
|
+
const M = a(a({}, Kn), r), f = a(a({
|
|
1467
|
+
open: l,
|
|
1442
1468
|
setOpen: w,
|
|
1443
1469
|
enqueueNotification: h,
|
|
1444
|
-
enqueueSuccessNotification:
|
|
1445
|
-
enqueueInfoNotification:
|
|
1446
|
-
enqueueWarningNotification:
|
|
1447
|
-
enqueueErrorNotification:
|
|
1470
|
+
enqueueSuccessNotification: b,
|
|
1471
|
+
enqueueInfoNotification: S,
|
|
1472
|
+
enqueueWarningNotification: $,
|
|
1473
|
+
enqueueErrorNotification: D,
|
|
1448
1474
|
removeNotification: E
|
|
1449
1475
|
}, e), t);
|
|
1450
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ p(Dt.Provider, { value: f, children: [
|
|
1451
1477
|
i,
|
|
1452
1478
|
/* @__PURE__ */ o(
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
open:
|
|
1456
|
-
onClose:
|
|
1479
|
+
Yt,
|
|
1480
|
+
y(a(a({}, M), k), {
|
|
1481
|
+
open: l,
|
|
1482
|
+
onClose: T,
|
|
1457
1483
|
TransitionProps: {
|
|
1458
1484
|
onExited: P,
|
|
1459
1485
|
onExit: L
|
|
1460
1486
|
},
|
|
1461
|
-
sx: { zIndex:
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1487
|
+
sx: { zIndex: Zn },
|
|
1488
|
+
children: /* @__PURE__ */ p("div", { children: [
|
|
1463
1489
|
/* @__PURE__ */ o(
|
|
1464
|
-
|
|
1490
|
+
Kt,
|
|
1465
1491
|
{
|
|
1466
|
-
onClose: (x) =>
|
|
1492
|
+
onClose: (x) => T(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(Dt);
|
|
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,76 +1535,104 @@ 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,
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1545
|
+
onDomainChange: i,
|
|
1546
|
+
domainOptions: r,
|
|
1547
|
+
applicationName: s,
|
|
1548
|
+
handleLogout: d
|
|
1522
1549
|
}) => {
|
|
1523
|
-
const [
|
|
1524
|
-
|
|
1525
|
-
}),
|
|
1526
|
-
|
|
1550
|
+
const [l, c] = V(Et), [u, g] = F(l), { enqueueSuccessNotification: C } = io(), w = r.length === 0, h = !!l && !r.includes(l) && !r.includes(u), b = !l || w || h, S = () => _(void 0, null, function* () {
|
|
1551
|
+
u ? (c(u), i == null || i(u), C(`Set organisation to ${u}`), n()) : (c(""), i == null || i(""));
|
|
1552
|
+
}), $ = () => _(void 0, null, function* () {
|
|
1553
|
+
l && !w && !h ? (g(l), n()) : b && d();
|
|
1527
1554
|
});
|
|
1528
1555
|
let D;
|
|
1529
|
-
return
|
|
1530
|
-
|
|
1556
|
+
return w ? D = "Unable to retrieve your active organisations. Try logging in again." : h && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
|
|
1557
|
+
kt,
|
|
1531
1558
|
{
|
|
1532
1559
|
isOpen: t,
|
|
1533
1560
|
dialogTitle: "Select an organisation",
|
|
1534
1561
|
primaryButton: {
|
|
1535
1562
|
text: "Confirm",
|
|
1536
1563
|
onClick: S,
|
|
1537
|
-
disabled: !
|
|
1564
|
+
disabled: !u || w || h,
|
|
1538
1565
|
buttonColor: "primary"
|
|
1539
1566
|
},
|
|
1540
1567
|
secondaryButton: {
|
|
1541
|
-
text:
|
|
1542
|
-
onClick:
|
|
1568
|
+
text: b ? "Logout" : "Cancel",
|
|
1569
|
+
onClick: $
|
|
1543
1570
|
},
|
|
1544
|
-
onClose:
|
|
1571
|
+
onClose: b ? () => {
|
|
1545
1572
|
} : n,
|
|
1546
1573
|
children: [
|
|
1547
|
-
/* @__PURE__ */
|
|
1574
|
+
/* @__PURE__ */ p(O, { marginBottom: 2, children: [
|
|
1548
1575
|
"Select the default organisation that you want to use with the ",
|
|
1549
|
-
|
|
1576
|
+
s,
|
|
1550
1577
|
"."
|
|
1551
1578
|
] }),
|
|
1552
1579
|
/* @__PURE__ */ o(
|
|
1553
|
-
|
|
1580
|
+
Se,
|
|
1554
1581
|
{
|
|
1555
1582
|
loading: e,
|
|
1556
1583
|
multiple: !1,
|
|
1557
1584
|
disableClearable: !1,
|
|
1558
|
-
value:
|
|
1559
|
-
onChange: (
|
|
1560
|
-
getOptionLabel:
|
|
1561
|
-
options: [...
|
|
1562
|
-
renderInput: (
|
|
1563
|
-
|
|
1564
|
-
|
|
1585
|
+
value: u !== "" ? u : null,
|
|
1586
|
+
onChange: (E, T) => g(T != null ? T : ""),
|
|
1587
|
+
getOptionLabel: so,
|
|
1588
|
+
options: [...r],
|
|
1589
|
+
renderInput: (E) => /* @__PURE__ */ o(
|
|
1590
|
+
ye,
|
|
1591
|
+
y(a({}, E), {
|
|
1565
1592
|
variant: "filled",
|
|
1566
1593
|
label: "Select organisation",
|
|
1567
|
-
InputProps:
|
|
1568
|
-
endAdornment: /* @__PURE__ */
|
|
1594
|
+
InputProps: y(a({}, E.InputProps), {
|
|
1595
|
+
endAdornment: /* @__PURE__ */ p(N, { children: [
|
|
1569
1596
|
e ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1570
|
-
|
|
1597
|
+
E.InputProps.endAdornment
|
|
1571
1598
|
] })
|
|
1572
1599
|
})
|
|
1573
1600
|
})
|
|
1574
1601
|
)
|
|
1575
1602
|
}
|
|
1576
1603
|
),
|
|
1577
|
-
D && /* @__PURE__ */ o(
|
|
1604
|
+
D && /* @__PURE__ */ o(Jt, { error: !0, children: D })
|
|
1578
1605
|
]
|
|
1579
1606
|
}
|
|
1580
1607
|
);
|
|
1581
|
-
},
|
|
1608
|
+
}, lo = {
|
|
1609
|
+
domainCode: Et,
|
|
1610
|
+
navBarOpen: j,
|
|
1611
|
+
navBarWidthOpen: At,
|
|
1612
|
+
navBarWidthClosed: bt,
|
|
1613
|
+
titleText: we,
|
|
1614
|
+
topBarHeight: St,
|
|
1615
|
+
navBarTop: yt
|
|
1616
|
+
}, Yo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), co = ({
|
|
1617
|
+
initialValues: e,
|
|
1618
|
+
children: t
|
|
1619
|
+
}) => (ht(e), /* @__PURE__ */ o(N, { children: t })), Ko = Q(
|
|
1620
|
+
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1621
|
+
co,
|
|
1622
|
+
{
|
|
1623
|
+
initialValues: Object.entries(e).map(
|
|
1624
|
+
([n, i]) => [
|
|
1625
|
+
lo[n],
|
|
1626
|
+
i
|
|
1627
|
+
]
|
|
1628
|
+
),
|
|
1629
|
+
children: t
|
|
1630
|
+
}
|
|
1631
|
+
)
|
|
1632
|
+
), Jo = Q(() => ({ children: e }) => {
|
|
1633
|
+
const t = new cn();
|
|
1634
|
+
return /* @__PURE__ */ o(dn, { client: t, children: e });
|
|
1635
|
+
}), Zo = st({
|
|
1582
1636
|
palette: {
|
|
1583
1637
|
primary: {
|
|
1584
1638
|
dark: "#00A651",
|
|
@@ -1629,7 +1683,7 @@ const Ye = R(
|
|
|
1629
1683
|
navBar: {
|
|
1630
1684
|
backgroundColor: "#E8E8E8"
|
|
1631
1685
|
}
|
|
1632
|
-
}),
|
|
1686
|
+
}), jo = st({
|
|
1633
1687
|
palette: {
|
|
1634
1688
|
primary: {
|
|
1635
1689
|
main: "#007236",
|
|
@@ -1683,18 +1737,18 @@ const Ye = R(
|
|
|
1683
1737
|
styleOverrides: {
|
|
1684
1738
|
root: ({ theme: e }) => ({
|
|
1685
1739
|
"&.Mui-selected": {
|
|
1686
|
-
backgroundColor:
|
|
1740
|
+
backgroundColor: me(
|
|
1687
1741
|
e.palette.secondary.main,
|
|
1688
1742
|
e.palette.action.selectedOpacity
|
|
1689
1743
|
),
|
|
1690
1744
|
"&:hover": {
|
|
1691
|
-
backgroundColor:
|
|
1745
|
+
backgroundColor: me(
|
|
1692
1746
|
e.palette.secondary.main,
|
|
1693
1747
|
e.palette.action.selectedOpacity
|
|
1694
1748
|
)
|
|
1695
1749
|
},
|
|
1696
1750
|
"&.Mui-focusVisible": {
|
|
1697
|
-
backgroundColor:
|
|
1751
|
+
backgroundColor: me(
|
|
1698
1752
|
e.palette.secondary.main,
|
|
1699
1753
|
e.palette.action.focusOpacity
|
|
1700
1754
|
)
|
|
@@ -1723,78 +1777,54 @@ const Ye = R(
|
|
|
1723
1777
|
navBar: {
|
|
1724
1778
|
backgroundColor: "#E8E8E8"
|
|
1725
1779
|
}
|
|
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
1780
|
});
|
|
1754
1781
|
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
|
-
|
|
1782
|
+
kt as AgDialog,
|
|
1783
|
+
Ho as AppLayout,
|
|
1784
|
+
Xo as AtomProvider,
|
|
1785
|
+
Vo as AuthGuard,
|
|
1786
|
+
Dt as Context,
|
|
1787
|
+
ke as ContextError,
|
|
1788
|
+
Qo as DomainCodeDialog,
|
|
1789
|
+
Oo as ExampleComponent,
|
|
1790
|
+
Wo as FetchAutocomplete,
|
|
1791
|
+
co as HydrateAtoms,
|
|
1792
|
+
Uo as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1793
|
+
mt as NAVBAR_WIDTH_CLOSED,
|
|
1794
|
+
ft as NAVBAR_WIDTH_OPENED,
|
|
1795
|
+
_o as NavBar,
|
|
1796
|
+
No as NavBarDarkStyledList,
|
|
1797
|
+
Po as NavBarLightStyledList,
|
|
1798
|
+
vn as NavBarProvider,
|
|
1799
|
+
Lo as PageLayout,
|
|
1800
|
+
oo as SaladBarProvider,
|
|
1801
|
+
Go as SessionExpiryDialog,
|
|
1802
|
+
zo as SingleAutocomplete,
|
|
1803
|
+
ro as atomStore,
|
|
1804
|
+
An as buildNavBarState,
|
|
1805
|
+
Et as domainCodeAtom,
|
|
1806
|
+
Zo as fed21Theme,
|
|
1807
|
+
Vn as getAuth0Expiry,
|
|
1808
|
+
jo as internalAgSystemsTheme,
|
|
1782
1809
|
q as navBarClasses,
|
|
1783
1810
|
j as navBarOpenAtom,
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
Yo as
|
|
1797
|
-
|
|
1798
|
-
|
|
1811
|
+
yt as navBarTopAtom,
|
|
1812
|
+
bt as navBarWidthClosedAtom,
|
|
1813
|
+
At as navBarWidthOpenAtom,
|
|
1814
|
+
Mn as simpleHashCode,
|
|
1815
|
+
Mo as suppressConsole,
|
|
1816
|
+
we as titleTextAtom,
|
|
1817
|
+
St as topBarHeightAtom,
|
|
1818
|
+
Fn as topBarMiddleAtom,
|
|
1819
|
+
Ro as unsuppressConsole,
|
|
1820
|
+
$t as useAutocompleteOptions,
|
|
1821
|
+
wn as useNavBar,
|
|
1822
|
+
io as useSaladBar,
|
|
1823
|
+
Yo as withAtomProvider,
|
|
1824
|
+
Fo as withBrowserRouter,
|
|
1825
|
+
Bo as withNavBarProvider,
|
|
1826
|
+
Ko as withOverrideDefaults,
|
|
1827
|
+
Jo as withQueryClient,
|
|
1828
|
+
qo as withSaladBarProvider
|
|
1799
1829
|
};
|
|
1800
1830
|
//# sourceMappingURL=index.js.map
|