@australiangreens/ag-internal-components 0.0.83 → 0.0.85
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/README.md +5 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts +2 -1
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts +2 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/esm/index.js +353 -350
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Pt = Object.defineProperty, Nt = Object.defineProperties;
|
|
2
|
+
var Lt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var j = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Te = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var pe = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, s = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
Te.call(t, n) && pe(e, n, t[n]);
|
|
8
8
|
if (j)
|
|
9
9
|
for (var n of j(t))
|
|
10
|
-
|
|
10
|
+
Oe.call(t, n) && pe(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, S = (e, t) =>
|
|
13
|
-
var
|
|
12
|
+
}, S = (e, t) => Nt(e, Lt(t));
|
|
13
|
+
var Ee = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
|
-
|
|
16
|
+
Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
17
|
if (e != null && j)
|
|
18
18
|
for (var i of j(e))
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
19
|
+
t.indexOf(i) < 0 && Oe.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var Be = (e, t, n) => (pe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
23
|
var P = (e, t, n) => new Promise((i, r) => {
|
|
24
24
|
var a = (l) => {
|
|
25
25
|
try {
|
|
@@ -37,22 +37,22 @@ var P = (e, t, n) => new Promise((i, r) => {
|
|
|
37
37
|
d((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
|
|
40
|
-
import { useState as E, createContext as
|
|
41
|
-
import { Typography as F, Button as ie, Paper as
|
|
40
|
+
import { useState as E, createContext as Qe, useCallback as ne, useContext as Ye, createElement as Ce, useEffect as oe, useRef as he } from "react";
|
|
41
|
+
import { Typography as F, Button as ie, Paper as Ke, Box as I, Drawer as ve, Dialog as Je, LinearProgress as Ze, DialogTitle as je, DialogContent as et, DialogActions as tt, Autocomplete as we, TextField as Ae, CircularProgress as be, Chip as _t, Tooltip as Mt, Stack as Rt, styled as Se, IconButton as Q, Container as nt, useTheme as ae, useMediaQuery as Ht, Collapse as Wt, Avatar as Fe, Fade as zt, Skeleton as Pe, Toolbar as Ut, Divider as Ne, CssBaseline as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
|
|
42
42
|
import Qt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as R, createTheme as ot, alpha as ge } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Yt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as K } from "souvlaki";
|
|
46
|
-
import
|
|
47
|
-
import { Cancel as Kt, ArrowDropDown as Jt, ArrowForward as
|
|
46
|
+
import it from "@mui/material/List";
|
|
47
|
+
import { Cancel as Kt, ArrowDropDown as Jt, ArrowForward as rt, ArrowBack as at, ViewHeadline as Zt } from "@mui/icons-material";
|
|
48
48
|
import jt from "autosuggest-highlight/match";
|
|
49
49
|
import en from "autosuggest-highlight/parse";
|
|
50
50
|
import { useQuery as tn, QueryClient as nn, QueryClientProvider as on } from "@tanstack/react-query";
|
|
51
|
-
import { useAuth0 as
|
|
51
|
+
import { useAuth0 as st } from "@auth0/auth0-react";
|
|
52
52
|
import { Buffer as rn } from "buffer";
|
|
53
53
|
import an from "@mui/material/Skeleton";
|
|
54
|
-
import { atom as M, useSetAtom as
|
|
55
|
-
import { useHydrateAtoms as
|
|
54
|
+
import { atom as M, useSetAtom as lt, useAtomValue as Le, useAtom as V, getDefaultStore as sn, Provider as ct } from "jotai";
|
|
55
|
+
import { useHydrateAtoms as dt } from "jotai/utils";
|
|
56
56
|
function Do({ text: e }) {
|
|
57
57
|
const [t, n] = E(0);
|
|
58
58
|
return /* @__PURE__ */ p(_, { children: [
|
|
@@ -71,13 +71,13 @@ function Do({ text: e }) {
|
|
|
71
71
|
"This is some text: ",
|
|
72
72
|
/* @__PURE__ */ o("span", { children: e })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ p(
|
|
74
|
+
/* @__PURE__ */ p(Ke, { children: [
|
|
75
75
|
"This number will incremember when button pressed: ",
|
|
76
76
|
t
|
|
77
77
|
] })
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const ut = 330, pt = 73, U = "Navbar", q = {
|
|
81
81
|
root: `${U}-root`,
|
|
82
82
|
menuButton: `${U}-menuButton`,
|
|
83
83
|
hide: `${U}-hide`,
|
|
@@ -85,7 +85,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
85
85
|
userInfoHolder: `${U}-userInfoHolder`,
|
|
86
86
|
settings: `${U}-settings`,
|
|
87
87
|
pieChartIcon: `${U}-pieChartIcon`
|
|
88
|
-
}, ln =
|
|
88
|
+
}, ln = R(I, {
|
|
89
89
|
name: "NavBar"
|
|
90
90
|
})(({ theme: e }) => ({
|
|
91
91
|
[`&.${q.root}`]: {
|
|
@@ -106,7 +106,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
106
106
|
marginTop: "64px",
|
|
107
107
|
marginBottom: "16px"
|
|
108
108
|
}
|
|
109
|
-
})),
|
|
109
|
+
})), ht = () => ({
|
|
110
110
|
position: "absolute",
|
|
111
111
|
height: "100%",
|
|
112
112
|
overflowX: "hidden",
|
|
@@ -115,13 +115,13 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
115
115
|
backgroundColor: "black"
|
|
116
116
|
// backgroundColor: '#e8e8e8',
|
|
117
117
|
}), cn = () => s({
|
|
118
|
-
width:
|
|
119
|
-
},
|
|
120
|
-
width:
|
|
121
|
-
},
|
|
118
|
+
width: ut
|
|
119
|
+
}, ht()), dn = () => s({
|
|
120
|
+
width: pt
|
|
121
|
+
}, ht()), un = R(ve, {
|
|
122
122
|
shouldForwardProp: (e) => e !== "open"
|
|
123
123
|
})(({ theme: e, open: t }) => s(s({
|
|
124
|
-
width: t ?
|
|
124
|
+
width: t ? ut : pt,
|
|
125
125
|
flexShrink: 0,
|
|
126
126
|
whiteSpace: "nowrap",
|
|
127
127
|
boxSizing: "border-box",
|
|
@@ -131,10 +131,10 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
131
131
|
}), !t && {
|
|
132
132
|
"& .MuiDrawer-paper": dn()
|
|
133
133
|
}));
|
|
134
|
-
class
|
|
134
|
+
class ke extends Yt {
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
const
|
|
136
|
+
Be(ke, "errorName", "ContextError");
|
|
137
|
+
const gt = Qe(null), pn = {}, hn = {}, gn = ({
|
|
138
138
|
overrideState: e = pn,
|
|
139
139
|
overrideActions: t = hn,
|
|
140
140
|
children: n
|
|
@@ -148,17 +148,17 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
148
148
|
setOpen: a,
|
|
149
149
|
toggleOpen: c
|
|
150
150
|
}, e), t);
|
|
151
|
-
return /* @__PURE__ */ o(
|
|
151
|
+
return /* @__PURE__ */ o(gt.Provider, { value: d, children: n });
|
|
152
152
|
}, fn = () => {
|
|
153
|
-
const e =
|
|
153
|
+
const e = Ye(gt);
|
|
154
154
|
if (e === null)
|
|
155
|
-
throw new
|
|
155
|
+
throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
156
156
|
return e;
|
|
157
157
|
}, mn = (e = {}) => s({
|
|
158
158
|
open: !0
|
|
159
159
|
}, e), yo = K(
|
|
160
160
|
(e = mn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(gn, { overrideState: e, overrideActions: t, children: n })
|
|
161
|
-
),
|
|
161
|
+
), _e = 7, $o = R(it)(({ theme: e }) => ({
|
|
162
162
|
backgroundColor: "black",
|
|
163
163
|
color: "white",
|
|
164
164
|
"& .MuiListItem-root": {
|
|
@@ -167,7 +167,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
167
167
|
"& .MuiListItemButton-root": {
|
|
168
168
|
" .MuiListItemIcon-root": {
|
|
169
169
|
color: "white",
|
|
170
|
-
padding: `${
|
|
170
|
+
padding: `${_e}px`
|
|
171
171
|
},
|
|
172
172
|
// Focus state
|
|
173
173
|
"&.Mui-focusVisible": {
|
|
@@ -178,7 +178,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
178
178
|
borderLeftStyle: "solid",
|
|
179
179
|
borderLeftWidth: "7px",
|
|
180
180
|
borderLeftColor: e.palette.primary.main,
|
|
181
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
181
|
+
paddingLeft: `calc(${e.spacing(2)} - ${_e}px)`
|
|
182
182
|
},
|
|
183
183
|
// Hover state
|
|
184
184
|
"&:hover": {
|
|
@@ -196,7 +196,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
196
196
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
197
197
|
// },
|
|
198
198
|
}
|
|
199
|
-
})),
|
|
199
|
+
})), Me = 7, Io = R(it)(({ theme: e }) => ({
|
|
200
200
|
backgroundColor: "#e8e8e8",
|
|
201
201
|
color: "inherit",
|
|
202
202
|
"& .MuiListItem-root": {
|
|
@@ -205,7 +205,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
205
205
|
"& .MuiListItemButton-root": {
|
|
206
206
|
" .MuiListItemIcon-root": {
|
|
207
207
|
color: "inherit",
|
|
208
|
-
padding: `${
|
|
208
|
+
padding: `${Me}px`
|
|
209
209
|
},
|
|
210
210
|
// Focus state
|
|
211
211
|
"&.Mui-focusVisible": {
|
|
@@ -216,7 +216,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
216
216
|
borderLeftStyle: "solid",
|
|
217
217
|
borderLeftWidth: "7px",
|
|
218
218
|
borderLeftColor: e.palette.primary.main,
|
|
219
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
219
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
|
|
220
220
|
},
|
|
221
221
|
// Hover state
|
|
222
222
|
"&:hover": {
|
|
@@ -254,7 +254,7 @@ function To({
|
|
|
254
254
|
)
|
|
255
255
|
] });
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const ft = ({
|
|
258
258
|
isOpen: e,
|
|
259
259
|
dialogTitle: t,
|
|
260
260
|
children: n,
|
|
@@ -264,44 +264,46 @@ const ht = ({
|
|
|
264
264
|
onClose: c,
|
|
265
265
|
sx: d,
|
|
266
266
|
"data-testid": l,
|
|
267
|
-
disableCloseOnBackdropOrEscape: u = !1
|
|
267
|
+
disableCloseOnBackdropOrEscape: u = !1,
|
|
268
|
+
isLoading: w = !1
|
|
268
269
|
}) => {
|
|
269
|
-
var
|
|
270
|
-
const [
|
|
270
|
+
var g, k;
|
|
271
|
+
const [C, A] = E(!1);
|
|
271
272
|
return /* @__PURE__ */ p(
|
|
272
|
-
|
|
273
|
+
Je,
|
|
273
274
|
{
|
|
274
275
|
open: e,
|
|
275
|
-
onClose: (
|
|
276
|
-
u && (
|
|
276
|
+
onClose: (b, D) => P(void 0, null, function* () {
|
|
277
|
+
u && (D === "backdropClick" || D === "escapeKeyDown") || C || (a != null && a.onClick ? yield a.onClick() : c());
|
|
277
278
|
}),
|
|
278
279
|
fullWidth: !0,
|
|
279
280
|
maxWidth: i != null ? i : "xs",
|
|
280
281
|
"data-testid": l,
|
|
281
282
|
sx: d,
|
|
282
283
|
children: [
|
|
283
|
-
/* @__PURE__ */ o(
|
|
284
|
-
/* @__PURE__ */ o(
|
|
285
|
-
/* @__PURE__ */
|
|
284
|
+
w && /* @__PURE__ */ o(Ze, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
285
|
+
/* @__PURE__ */ o(je, { children: t }),
|
|
286
|
+
/* @__PURE__ */ o(et, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
287
|
+
/* @__PURE__ */ p(tt, { children: [
|
|
286
288
|
/* @__PURE__ */ o(
|
|
287
289
|
ie,
|
|
288
290
|
{
|
|
289
|
-
onClick: (
|
|
291
|
+
onClick: (g = a == null ? void 0 : a.onClick) != null ? g : c,
|
|
290
292
|
"data-testid": a == null ? void 0 : a.testId,
|
|
291
|
-
disabled: (a == null ? void 0 : a.disabled) ||
|
|
293
|
+
disabled: (a == null ? void 0 : a.disabled) || C,
|
|
292
294
|
color: a == null ? void 0 : a.buttonColor,
|
|
293
|
-
children: (
|
|
295
|
+
children: (k = a == null ? void 0 : a.text) != null ? k : "Cancel"
|
|
294
296
|
}
|
|
295
297
|
),
|
|
296
298
|
r && /* @__PURE__ */ o(
|
|
297
299
|
ie,
|
|
298
300
|
{
|
|
299
301
|
onClick: () => P(void 0, null, function* () {
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
+
var b;
|
|
303
|
+
A(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), A(!1);
|
|
302
304
|
}),
|
|
303
305
|
"data-testid": r.testId,
|
|
304
|
-
disabled: r.disabled ||
|
|
306
|
+
disabled: r.disabled || C,
|
|
305
307
|
color: r == null ? void 0 : r.buttonColor,
|
|
306
308
|
children: r.text
|
|
307
309
|
}
|
|
@@ -310,7 +312,7 @@ const ht = ({
|
|
|
310
312
|
]
|
|
311
313
|
}
|
|
312
314
|
);
|
|
313
|
-
},
|
|
315
|
+
}, mt = ({
|
|
314
316
|
minLength: e,
|
|
315
317
|
preLoadedOptions: t,
|
|
316
318
|
lookup: n,
|
|
@@ -332,36 +334,37 @@ function Oo({
|
|
|
332
334
|
value: a,
|
|
333
335
|
"data-testid": c,
|
|
334
336
|
sx: d,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
337
|
+
boxSx: l,
|
|
338
|
+
textFieldColor: u,
|
|
339
|
+
textFieldVariant: w = "filled",
|
|
340
|
+
loadingText: C = "Loading...",
|
|
341
|
+
noOptionsText: A = "No options",
|
|
342
|
+
popupIcon: g = /* @__PURE__ */ o(Jt, {}),
|
|
343
|
+
error: k = !1,
|
|
344
|
+
helperText: b = "",
|
|
345
|
+
preLoadedOptions: D = void 0,
|
|
346
|
+
disablePortal: $ = !1
|
|
344
347
|
}) {
|
|
345
|
-
const [
|
|
346
|
-
const B = a.filter((
|
|
348
|
+
const [x, y] = E(""), H = (h, f) => {
|
|
349
|
+
const B = a.filter((m) => m.id !== f);
|
|
347
350
|
n(B, "delete", h);
|
|
348
|
-
}, { data: N, isLoading:
|
|
349
|
-
inputValue:
|
|
351
|
+
}, { data: N, isLoading: T } = mt({
|
|
352
|
+
inputValue: x,
|
|
350
353
|
label: r,
|
|
351
354
|
lookup: e,
|
|
352
355
|
minLength: i,
|
|
353
|
-
preLoadedOptions:
|
|
354
|
-
}),
|
|
356
|
+
preLoadedOptions: D
|
|
357
|
+
}), W = x.length >= i;
|
|
355
358
|
return /* @__PURE__ */ p("div", { "data-testid": c, children: [
|
|
356
359
|
/* @__PURE__ */ o(
|
|
357
|
-
|
|
360
|
+
we,
|
|
358
361
|
{
|
|
359
362
|
sx: d,
|
|
360
363
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
361
|
-
disablePortal:
|
|
364
|
+
disablePortal: $,
|
|
362
365
|
multiple: !0,
|
|
363
366
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
364
|
-
loading:
|
|
367
|
+
loading: W ? T : !1,
|
|
365
368
|
options: [...a, ...N != null ? N : []],
|
|
366
369
|
filterSelectedOptions: !0,
|
|
367
370
|
includeInputInList: !0,
|
|
@@ -369,21 +372,21 @@ function Oo({
|
|
|
369
372
|
onChange: (h, f, B) => {
|
|
370
373
|
n(f, B, h);
|
|
371
374
|
},
|
|
372
|
-
onInputChange: (h, f) =>
|
|
373
|
-
noOptionsText:
|
|
374
|
-
loadingText:
|
|
375
|
-
popupIcon:
|
|
375
|
+
onInputChange: (h, f) => y(f),
|
|
376
|
+
noOptionsText: W ? A : "Start typing to search",
|
|
377
|
+
loadingText: C,
|
|
378
|
+
popupIcon: g,
|
|
376
379
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
377
|
-
|
|
380
|
+
Ae,
|
|
378
381
|
S(s({}, h), {
|
|
379
382
|
label: r,
|
|
380
383
|
fullWidth: !0,
|
|
381
|
-
variant:
|
|
382
|
-
error:
|
|
383
|
-
helperText:
|
|
384
|
+
variant: w,
|
|
385
|
+
error: k,
|
|
386
|
+
helperText: b,
|
|
384
387
|
InputProps: S(s({}, h.InputProps), {
|
|
385
388
|
endAdornment: /* @__PURE__ */ p(_, { children: [
|
|
386
|
-
|
|
389
|
+
T ? /* @__PURE__ */ o(be, { color: "inherit", size: 20 }) : null,
|
|
387
390
|
h.InputProps.endAdornment
|
|
388
391
|
] })
|
|
389
392
|
}),
|
|
@@ -391,36 +394,36 @@ function Oo({
|
|
|
391
394
|
onKeyDown: (f) => {
|
|
392
395
|
(f.key === "Backspace" || f.key === "Delete") && f.stopPropagation();
|
|
393
396
|
},
|
|
394
|
-
color:
|
|
397
|
+
color: u
|
|
395
398
|
})
|
|
396
399
|
),
|
|
397
400
|
renderTags: () => null,
|
|
398
401
|
isOptionEqualToValue: (h, f) => h.id === f.id,
|
|
399
402
|
renderOption: (h, f, B) => {
|
|
400
403
|
if (t) {
|
|
401
|
-
const
|
|
404
|
+
const m = jt(f.label, B.inputValue, {
|
|
402
405
|
insideWords: !0,
|
|
403
406
|
findAllOccurrences: !0
|
|
404
|
-
}), v = en(f.label,
|
|
405
|
-
return /* @__PURE__ */
|
|
407
|
+
}), v = en(f.label, m);
|
|
408
|
+
return /* @__PURE__ */ Ce(
|
|
406
409
|
"li",
|
|
407
410
|
S(s({}, h), {
|
|
408
411
|
key: f.id,
|
|
409
412
|
"data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
|
|
410
413
|
}),
|
|
411
|
-
/* @__PURE__ */ o("div", { children: v.map((
|
|
414
|
+
/* @__PURE__ */ o("div", { children: v.map((L, se) => /* @__PURE__ */ o(
|
|
412
415
|
"span",
|
|
413
416
|
{
|
|
414
417
|
style: {
|
|
415
|
-
fontWeight:
|
|
418
|
+
fontWeight: L.highlight ? 700 : 400
|
|
416
419
|
},
|
|
417
|
-
children:
|
|
420
|
+
children: L.text
|
|
418
421
|
},
|
|
419
|
-
|
|
422
|
+
se
|
|
420
423
|
)) })
|
|
421
424
|
);
|
|
422
425
|
} else
|
|
423
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ Ce(
|
|
424
427
|
"li",
|
|
425
428
|
S(s({}, h), {
|
|
426
429
|
key: f.id,
|
|
@@ -431,8 +434,8 @@ function Oo({
|
|
|
431
434
|
}
|
|
432
435
|
}
|
|
433
436
|
),
|
|
434
|
-
a.length > 0 && /* @__PURE__ */ o(
|
|
435
|
-
|
|
437
|
+
a.length > 0 && /* @__PURE__ */ o(I, { sx: l, children: a.map((h) => /* @__PURE__ */ o(
|
|
438
|
+
_t,
|
|
436
439
|
{
|
|
437
440
|
sx: {
|
|
438
441
|
marginTop: 1,
|
|
@@ -440,7 +443,7 @@ function Oo({
|
|
|
440
443
|
height: "auto"
|
|
441
444
|
},
|
|
442
445
|
label: /* @__PURE__ */ o(
|
|
443
|
-
|
|
446
|
+
Mt,
|
|
444
447
|
{
|
|
445
448
|
title: h.tooltipContent || "",
|
|
446
449
|
placement: "bottom-start",
|
|
@@ -458,7 +461,7 @@ function Oo({
|
|
|
458
461
|
}
|
|
459
462
|
),
|
|
460
463
|
"data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
|
|
461
|
-
onDelete: (f) =>
|
|
464
|
+
onDelete: (f) => H(f, h.id),
|
|
462
465
|
deleteIcon: /* @__PURE__ */ o(
|
|
463
466
|
Kt,
|
|
464
467
|
{
|
|
@@ -482,50 +485,50 @@ const Eo = ({
|
|
|
482
485
|
"data-testid": d,
|
|
483
486
|
noOptionsText: l = "No options",
|
|
484
487
|
minLength: u = 3,
|
|
485
|
-
disablePortal:
|
|
486
|
-
preLoadedOptions:
|
|
487
|
-
helperText:
|
|
488
|
+
disablePortal: w = !1,
|
|
489
|
+
preLoadedOptions: C,
|
|
490
|
+
helperText: A = ""
|
|
488
491
|
}) => {
|
|
489
|
-
const [g, k] = E(""), { data: b, isLoading:
|
|
492
|
+
const [g, k] = E(""), { data: b, isLoading: D } = mt({
|
|
490
493
|
inputValue: g,
|
|
491
494
|
label: n,
|
|
492
495
|
lookup: e,
|
|
493
496
|
minLength: u != null ? u : 0,
|
|
494
|
-
preLoadedOptions:
|
|
495
|
-
}),
|
|
496
|
-
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(
|
|
497
|
-
|
|
497
|
+
preLoadedOptions: C
|
|
498
|
+
}), $ = g.length >= u;
|
|
499
|
+
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Rt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
500
|
+
we,
|
|
498
501
|
{
|
|
499
502
|
sx: r,
|
|
500
503
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
501
|
-
loading:
|
|
504
|
+
loading: $ ? D : !1,
|
|
502
505
|
options: b != null ? b : [],
|
|
503
|
-
onChange: (
|
|
504
|
-
t(
|
|
506
|
+
onChange: (x, y) => {
|
|
507
|
+
t(x, y);
|
|
505
508
|
},
|
|
506
|
-
disablePortal:
|
|
507
|
-
filterOptions: (
|
|
509
|
+
disablePortal: w,
|
|
510
|
+
filterOptions: (x) => x,
|
|
508
511
|
value: i,
|
|
509
|
-
noOptionsText:
|
|
510
|
-
getOptionLabel: (
|
|
511
|
-
renderInput: (
|
|
512
|
-
|
|
512
|
+
noOptionsText: $ ? l : "Start typing to search",
|
|
513
|
+
getOptionLabel: (x) => x.label,
|
|
514
|
+
renderInput: (x) => /* @__PURE__ */ o(
|
|
515
|
+
Ae,
|
|
513
516
|
S(s({
|
|
514
517
|
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0
|
|
515
|
-
},
|
|
518
|
+
}, x), {
|
|
516
519
|
variant: c,
|
|
517
520
|
label: n,
|
|
518
521
|
color: a,
|
|
519
|
-
helperText:
|
|
522
|
+
helperText: A
|
|
520
523
|
})
|
|
521
524
|
),
|
|
522
|
-
isOptionEqualToValue: (
|
|
523
|
-
onInputChange: (
|
|
525
|
+
isOptionEqualToValue: (x, y) => x.id === y.id,
|
|
526
|
+
onInputChange: (x, y) => {
|
|
524
527
|
k(y);
|
|
525
528
|
},
|
|
526
|
-
renderOption: (
|
|
529
|
+
renderOption: (x, y) => /* @__PURE__ */ Ce(
|
|
527
530
|
"li",
|
|
528
|
-
S(s({},
|
|
531
|
+
S(s({}, x), {
|
|
529
532
|
key: y.id,
|
|
530
533
|
"data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
|
|
531
534
|
}),
|
|
@@ -551,7 +554,7 @@ const Eo = ({
|
|
|
551
554
|
closeHandler: t,
|
|
552
555
|
setAuth0ExpiryTime: n
|
|
553
556
|
}) => {
|
|
554
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
557
|
+
const { logout: i, getAccessTokenSilently: r } = st(), [a, c] = E(0), d = () => P(void 0, null, function* () {
|
|
555
558
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
556
559
|
}), l = () => P(void 0, null, function* () {
|
|
557
560
|
c(a + 1), t();
|
|
@@ -559,12 +562,12 @@ const Eo = ({
|
|
|
559
562
|
return oe(() => {
|
|
560
563
|
(() => P(void 0, null, function* () {
|
|
561
564
|
if (a > 0) {
|
|
562
|
-
const
|
|
565
|
+
const A = yield r({ cacheMode: "off" }), g = Cn(A) * 1e3;
|
|
563
566
|
n(g);
|
|
564
567
|
}
|
|
565
568
|
}))();
|
|
566
569
|
}, [a, r, n]), /* @__PURE__ */ o(
|
|
567
|
-
|
|
570
|
+
ft,
|
|
568
571
|
{
|
|
569
572
|
isOpen: e,
|
|
570
573
|
primaryButton: {
|
|
@@ -608,7 +611,7 @@ function Fo({
|
|
|
608
611
|
children: e,
|
|
609
612
|
appName: t = "the app"
|
|
610
613
|
}) {
|
|
611
|
-
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: a, logout: c } =
|
|
614
|
+
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: a, logout: c } = st();
|
|
612
615
|
if (oe(() => {
|
|
613
616
|
if (i || n || r)
|
|
614
617
|
return;
|
|
@@ -620,10 +623,10 @@ function Fo({
|
|
|
620
623
|
a(d);
|
|
621
624
|
}, [i, n, r, a]), r && xn(r)) {
|
|
622
625
|
let d = "Auth error", l = "An unknown Auth0 error occurred.";
|
|
623
|
-
return wn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : An(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : vn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ p(
|
|
624
|
-
/* @__PURE__ */ o(
|
|
625
|
-
/* @__PURE__ */ o(
|
|
626
|
-
/* @__PURE__ */ o(
|
|
626
|
+
return wn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : An(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : vn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ p(Je, { open: !0, children: [
|
|
627
|
+
/* @__PURE__ */ o(je, { children: d }),
|
|
628
|
+
/* @__PURE__ */ o(et, { children: /* @__PURE__ */ o(F, { children: l }) }),
|
|
629
|
+
/* @__PURE__ */ o(tt, { children: /* @__PURE__ */ o(ie, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
627
630
|
] });
|
|
628
631
|
}
|
|
629
632
|
return n ? /* @__PURE__ */ o(_, { children: e }) : /* @__PURE__ */ o(an, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
@@ -635,7 +638,7 @@ const bn = 24, Sn = 64, G = "TopBar", O = {
|
|
|
635
638
|
titleText: `${G}-titleText`,
|
|
636
639
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
637
640
|
rightPanelButton: `${G}-leftPanelButton`
|
|
638
|
-
}, kn =
|
|
641
|
+
}, kn = Se("div", {
|
|
639
642
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
640
643
|
name: G
|
|
641
644
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -695,7 +698,7 @@ function Dn({
|
|
|
695
698
|
}) {
|
|
696
699
|
return /* @__PURE__ */ p(kn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
697
700
|
/* @__PURE__ */ o("div", { className: O.topStripe }),
|
|
698
|
-
/* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ p(
|
|
701
|
+
/* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ p(I, { className: O.titleSlider, children: [
|
|
699
702
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
|
|
700
703
|
Q,
|
|
701
704
|
{
|
|
@@ -707,7 +710,7 @@ function Dn({
|
|
|
707
710
|
size: "large",
|
|
708
711
|
children: [
|
|
709
712
|
" ",
|
|
710
|
-
/* @__PURE__ */ o(
|
|
713
|
+
/* @__PURE__ */ o(rt, {})
|
|
711
714
|
]
|
|
712
715
|
}
|
|
713
716
|
),
|
|
@@ -723,14 +726,14 @@ function Dn({
|
|
|
723
726
|
size: "large",
|
|
724
727
|
children: [
|
|
725
728
|
" ",
|
|
726
|
-
/* @__PURE__ */ o(
|
|
729
|
+
/* @__PURE__ */ o(at, {})
|
|
727
730
|
]
|
|
728
731
|
}
|
|
729
732
|
)
|
|
730
733
|
] }) })
|
|
731
734
|
] });
|
|
732
735
|
}
|
|
733
|
-
const
|
|
736
|
+
const Ct = 400, yn = Se(ve, {
|
|
734
737
|
shouldForwardProp: (e) => (
|
|
735
738
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
736
739
|
![
|
|
@@ -760,7 +763,7 @@ const ft = 400, yn = be(xe, {
|
|
|
760
763
|
marginLeft: `${r}px`
|
|
761
764
|
}))
|
|
762
765
|
})
|
|
763
|
-
), $n =
|
|
766
|
+
), $n = Se(I, {
|
|
764
767
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
765
768
|
})(({ theme: e, anchor: t }) => S(s({
|
|
766
769
|
display: "flex",
|
|
@@ -780,21 +783,21 @@ const ft = 400, yn = be(xe, {
|
|
|
780
783
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
781
784
|
}
|
|
782
785
|
}));
|
|
783
|
-
function
|
|
786
|
+
function Re({
|
|
784
787
|
children: e,
|
|
785
788
|
anchor: t = "left",
|
|
786
789
|
open: n,
|
|
787
790
|
onClose: i = () => {
|
|
788
791
|
},
|
|
789
792
|
titleText: r = "",
|
|
790
|
-
width: a =
|
|
793
|
+
width: a = Ct,
|
|
791
794
|
showCloseArrow: c = !0,
|
|
792
795
|
debugOpacity: d = !1,
|
|
793
796
|
headerBoxProps: l = {},
|
|
794
797
|
onOpened: u,
|
|
795
|
-
onClosed:
|
|
796
|
-
"data-testid":
|
|
797
|
-
navBarOpen:
|
|
798
|
+
onClosed: w,
|
|
799
|
+
"data-testid": C,
|
|
800
|
+
navBarOpen: A = !1,
|
|
798
801
|
navBarWidthOpen: g = 0,
|
|
799
802
|
navBarWidthClosed: k = 0
|
|
800
803
|
}) {
|
|
@@ -803,27 +806,27 @@ function Me({
|
|
|
803
806
|
{
|
|
804
807
|
SlideProps: {
|
|
805
808
|
onEntered: () => u == null ? void 0 : u(),
|
|
806
|
-
onExited: () =>
|
|
809
|
+
onExited: () => w == null ? void 0 : w()
|
|
807
810
|
},
|
|
808
811
|
variant: "persistent",
|
|
809
812
|
anchor: t,
|
|
810
813
|
open: n,
|
|
811
814
|
width: a,
|
|
812
815
|
debugOpacity: d,
|
|
813
|
-
"data-testid":
|
|
814
|
-
navBarOpen:
|
|
816
|
+
"data-testid": C,
|
|
817
|
+
navBarOpen: A,
|
|
815
818
|
navBarWidthOpen: g,
|
|
816
819
|
navBarWidthClosed: k,
|
|
817
820
|
children: [
|
|
818
821
|
/* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
|
|
819
822
|
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
820
823
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
821
|
-
/* @__PURE__ */ o(
|
|
824
|
+
/* @__PURE__ */ o(at, { "data-testid": "arrowbackicon" }),
|
|
822
825
|
" "
|
|
823
826
|
] })
|
|
824
827
|
] }) : /* @__PURE__ */ p(_, { children: [
|
|
825
828
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
826
|
-
/* @__PURE__ */ o(
|
|
829
|
+
/* @__PURE__ */ o(rt, {}),
|
|
827
830
|
" "
|
|
828
831
|
] }),
|
|
829
832
|
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
@@ -833,7 +836,7 @@ function Me({
|
|
|
833
836
|
}
|
|
834
837
|
);
|
|
835
838
|
}
|
|
836
|
-
const In =
|
|
839
|
+
const In = R(I, {
|
|
837
840
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
838
841
|
name: "PanelAwareMargins"
|
|
839
842
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -856,17 +859,17 @@ const In = W($, {
|
|
|
856
859
|
}),
|
|
857
860
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
858
861
|
});
|
|
859
|
-
}), Tn =
|
|
862
|
+
}), Tn = R(nt, {
|
|
860
863
|
name: "PageContainer"
|
|
861
864
|
})(({ theme: e }) => ({
|
|
862
865
|
// Horizontal padding comes from the Container's gutter
|
|
863
866
|
paddingTop: e.spacing(3),
|
|
864
867
|
paddingBottom: e.spacing(3)
|
|
865
868
|
// TODO: Remove max width
|
|
866
|
-
})),
|
|
869
|
+
})), fe = !1, me = !1, ee = {
|
|
867
870
|
titleText: "",
|
|
868
871
|
flavour: "push",
|
|
869
|
-
width:
|
|
872
|
+
width: Ct,
|
|
870
873
|
arrowButtons: "both",
|
|
871
874
|
startOpen: !1,
|
|
872
875
|
open: void 0,
|
|
@@ -887,81 +890,81 @@ function Po({
|
|
|
887
890
|
pageContentDataTestId: d,
|
|
888
891
|
topBarDataTestId: l,
|
|
889
892
|
navBarOpen: u,
|
|
890
|
-
navBarWidthOpen:
|
|
891
|
-
navBarWidthClosed:
|
|
893
|
+
navBarWidthOpen: w,
|
|
894
|
+
navBarWidthClosed: C
|
|
892
895
|
}) {
|
|
893
|
-
const [
|
|
896
|
+
const [A, g] = E(fe), [k, b] = E(me), [D, $] = E(fe), [x, y] = E(me), H = n !== void 0, N = i !== void 0, {
|
|
894
897
|
titleText: T,
|
|
895
|
-
content:
|
|
896
|
-
flavour:
|
|
897
|
-
open:
|
|
898
|
-
onChangeOpen:
|
|
899
|
-
width:
|
|
900
|
-
arrowButtons:
|
|
901
|
-
startOpen:
|
|
902
|
-
onOpened:
|
|
903
|
-
onClosed:
|
|
904
|
-
dataTestId:
|
|
898
|
+
content: W,
|
|
899
|
+
flavour: h,
|
|
900
|
+
open: f,
|
|
901
|
+
onChangeOpen: B,
|
|
902
|
+
width: m,
|
|
903
|
+
arrowButtons: v,
|
|
904
|
+
startOpen: L,
|
|
905
|
+
onOpened: se,
|
|
906
|
+
onClosed: $t,
|
|
907
|
+
dataTestId: It
|
|
905
908
|
} = n ? s(s({}, ee), n) : s({}, ee), {
|
|
906
|
-
titleText:
|
|
907
|
-
content:
|
|
908
|
-
flavour:
|
|
909
|
-
open:
|
|
910
|
-
onChangeOpen:
|
|
911
|
-
width:
|
|
909
|
+
titleText: Tt,
|
|
910
|
+
content: Ot,
|
|
911
|
+
flavour: De,
|
|
912
|
+
open: le,
|
|
913
|
+
onChangeOpen: ye,
|
|
914
|
+
width: ce,
|
|
912
915
|
arrowButtons: J,
|
|
913
916
|
startOpen: Z,
|
|
914
|
-
onOpened:
|
|
915
|
-
onClosed:
|
|
916
|
-
dataTestId:
|
|
917
|
+
onOpened: Et,
|
|
918
|
+
onClosed: Bt,
|
|
919
|
+
dataTestId: Ft
|
|
917
920
|
} = i ? s(s({}, ee), i) : s({}, ee);
|
|
918
921
|
oe(() => {
|
|
919
|
-
|
|
920
|
-
}, [
|
|
921
|
-
Z !==
|
|
922
|
+
L !== fe && (g(L), $(L));
|
|
923
|
+
}, [L]), oe(() => {
|
|
924
|
+
Z !== me && (b(Z), y(Z));
|
|
922
925
|
}, [Z]);
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
},
|
|
926
|
-
|
|
926
|
+
const de = f === void 0 ? A : f, ue = le === void 0 ? k : le, $e = (z) => {
|
|
927
|
+
f === void 0 && (g(z), r && N && (z ? (b(!1), y(k)) : b(x))), B && B(z);
|
|
928
|
+
}, Ie = (z) => {
|
|
929
|
+
le === void 0 && (b(z), r && H && (z ? (g(!1), $(A)) : g(D))), ye && ye(z);
|
|
927
930
|
};
|
|
928
|
-
return /* @__PURE__ */ p(
|
|
929
|
-
|
|
930
|
-
|
|
931
|
+
return /* @__PURE__ */ p(I, { children: [
|
|
932
|
+
H && /* @__PURE__ */ o(
|
|
933
|
+
Re,
|
|
931
934
|
{
|
|
932
|
-
"data-testid":
|
|
935
|
+
"data-testid": It,
|
|
933
936
|
anchor: "left",
|
|
934
|
-
open:
|
|
935
|
-
onClose: () =>
|
|
936
|
-
width:
|
|
937
|
+
open: de,
|
|
938
|
+
onClose: () => $e(!1),
|
|
939
|
+
width: m,
|
|
937
940
|
titleText: T,
|
|
938
941
|
debugOpacity: a,
|
|
939
|
-
showCloseArrow:
|
|
940
|
-
onOpened:
|
|
941
|
-
onClosed:
|
|
942
|
+
showCloseArrow: v === "both" || v === "close",
|
|
943
|
+
onOpened: se,
|
|
944
|
+
onClosed: $t,
|
|
942
945
|
navBarOpen: u,
|
|
943
|
-
navBarWidthOpen:
|
|
944
|
-
navBarWidthClosed:
|
|
945
|
-
children:
|
|
946
|
+
navBarWidthOpen: w,
|
|
947
|
+
navBarWidthClosed: C,
|
|
948
|
+
children: W
|
|
946
949
|
}
|
|
947
950
|
),
|
|
948
|
-
|
|
949
|
-
|
|
951
|
+
N && /* @__PURE__ */ o(
|
|
952
|
+
Re,
|
|
950
953
|
{
|
|
951
|
-
"data-testid":
|
|
954
|
+
"data-testid": Ft,
|
|
952
955
|
anchor: "right",
|
|
953
|
-
open:
|
|
954
|
-
onClose: () =>
|
|
955
|
-
width:
|
|
956
|
-
titleText:
|
|
956
|
+
open: ue,
|
|
957
|
+
onClose: () => Ie(!1),
|
|
958
|
+
width: ce,
|
|
959
|
+
titleText: Tt,
|
|
957
960
|
debugOpacity: a,
|
|
958
961
|
showCloseArrow: J === "both" || J === "close",
|
|
959
|
-
onOpened:
|
|
960
|
-
onClosed:
|
|
962
|
+
onOpened: Et,
|
|
963
|
+
onClosed: Bt,
|
|
961
964
|
navBarOpen: u,
|
|
962
|
-
navBarWidthOpen:
|
|
963
|
-
navBarWidthClosed:
|
|
964
|
-
children:
|
|
965
|
+
navBarWidthOpen: w,
|
|
966
|
+
navBarWidthClosed: C,
|
|
967
|
+
children: Ot
|
|
965
968
|
}
|
|
966
969
|
),
|
|
967
970
|
/* @__PURE__ */ o(
|
|
@@ -969,33 +972,33 @@ function Po({
|
|
|
969
972
|
s(s({
|
|
970
973
|
titleText: t,
|
|
971
974
|
"data-testid": l
|
|
972
|
-
},
|
|
975
|
+
}, H && h === "push" ? {
|
|
973
976
|
leftPanel: {
|
|
974
|
-
open: ce,
|
|
975
|
-
width: v,
|
|
976
|
-
onOpen: () => ye(!0),
|
|
977
|
-
showOpenArrow: C === "both" || C === "open"
|
|
978
|
-
}
|
|
979
|
-
} : {}), R && ke === "push" ? {
|
|
980
|
-
rightPanel: {
|
|
981
977
|
open: de,
|
|
982
|
-
width:
|
|
978
|
+
width: m,
|
|
983
979
|
onOpen: () => $e(!0),
|
|
980
|
+
showOpenArrow: v === "both" || v === "open"
|
|
981
|
+
}
|
|
982
|
+
} : {}), N && De === "push" ? {
|
|
983
|
+
rightPanel: {
|
|
984
|
+
open: ue,
|
|
985
|
+
width: ce,
|
|
986
|
+
onOpen: () => Ie(!0),
|
|
984
987
|
showOpenArrow: J === "both" || J === "open"
|
|
985
988
|
}
|
|
986
989
|
} : {})
|
|
987
990
|
),
|
|
988
991
|
/* @__PURE__ */ o(
|
|
989
992
|
In,
|
|
990
|
-
S(s(s({},
|
|
993
|
+
S(s(s({}, h === "push" ? {
|
|
991
994
|
leftPanel: {
|
|
992
|
-
open:
|
|
993
|
-
width:
|
|
995
|
+
open: de,
|
|
996
|
+
width: m
|
|
994
997
|
}
|
|
995
|
-
} : {}),
|
|
998
|
+
} : {}), De === "push" ? {
|
|
996
999
|
rightPanel: {
|
|
997
|
-
open:
|
|
998
|
-
width:
|
|
1000
|
+
open: ue,
|
|
1001
|
+
width: ce
|
|
999
1002
|
}
|
|
1000
1003
|
} : {}), {
|
|
1001
1004
|
children: /* @__PURE__ */ o(Tn, S(s({ "data-testid": d }, c), { children: e }))
|
|
@@ -1003,10 +1006,10 @@ function Po({
|
|
|
1003
1006
|
)
|
|
1004
1007
|
] });
|
|
1005
1008
|
}
|
|
1006
|
-
const
|
|
1009
|
+
const xt = () => {
|
|
1007
1010
|
const e = ae();
|
|
1008
|
-
return
|
|
1009
|
-
}, On = 64, En = 72, Bn = 256, Y = M(!0),
|
|
1011
|
+
return Ht(e.breakpoints.down("sm"));
|
|
1012
|
+
}, On = 64, En = 72, Bn = 256, Y = M(!0), vt = M(Bn), wt = M(En), xe = M(""), Fn = M(void 0), At = M(On), bt = M(void 0);
|
|
1010
1013
|
function Pn({ links: e }) {
|
|
1011
1014
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
1012
1015
|
}
|
|
@@ -1018,7 +1021,7 @@ const te = "Navbar", X = {
|
|
|
1018
1021
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
1019
1022
|
// settings: `${PREFIX}-settings`,
|
|
1020
1023
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
1021
|
-
}, Nn =
|
|
1024
|
+
}, Nn = R(I, { name: "NavBar" })(({ theme: e }) => ({
|
|
1022
1025
|
[`&.${X.root}`]: {
|
|
1023
1026
|
display: "flex"
|
|
1024
1027
|
},
|
|
@@ -1043,7 +1046,7 @@ const te = "Navbar", X = {
|
|
|
1043
1046
|
}), Ln = (e) => {
|
|
1044
1047
|
const t = ae();
|
|
1045
1048
|
return /* @__PURE__ */ o(
|
|
1046
|
-
|
|
1049
|
+
Wt,
|
|
1047
1050
|
s({
|
|
1048
1051
|
easing: t.transitions.easing.sharp,
|
|
1049
1052
|
timeout: {
|
|
@@ -1052,7 +1055,7 @@ const te = "Navbar", X = {
|
|
|
1052
1055
|
}
|
|
1053
1056
|
}, e)
|
|
1054
1057
|
);
|
|
1055
|
-
},
|
|
1058
|
+
}, St = (e) => {
|
|
1056
1059
|
var t, n;
|
|
1057
1060
|
return {
|
|
1058
1061
|
overflowX: "hidden",
|
|
@@ -1060,13 +1063,13 @@ const te = "Navbar", X = {
|
|
|
1060
1063
|
backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
|
|
1061
1064
|
// Provide default so tests don't need to wrap theme provider
|
|
1062
1065
|
};
|
|
1063
|
-
},
|
|
1066
|
+
}, He = (e, t) => s({
|
|
1064
1067
|
width: t,
|
|
1065
1068
|
transition: re(e, "width", "entering")
|
|
1066
|
-
},
|
|
1069
|
+
}, St(e)), We = (e, t) => s({
|
|
1067
1070
|
width: t,
|
|
1068
1071
|
transition: re(e, "width", "leaving")
|
|
1069
|
-
},
|
|
1072
|
+
}, St(e)), _n = R(ve, {
|
|
1070
1073
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
1071
1074
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => s(s({
|
|
1072
1075
|
flexShrink: 0,
|
|
@@ -1074,12 +1077,12 @@ const te = "Navbar", X = {
|
|
|
1074
1077
|
boxSizing: "border-box",
|
|
1075
1078
|
display: "flex",
|
|
1076
1079
|
flexDirection: "column"
|
|
1077
|
-
}, t && S(s({},
|
|
1080
|
+
}, t && S(s({}, He(e, n)), {
|
|
1078
1081
|
backgroundColor: "",
|
|
1079
|
-
"& .MuiDrawer-paper":
|
|
1080
|
-
})), !t && S(s({},
|
|
1082
|
+
"& .MuiDrawer-paper": He(e, n)
|
|
1083
|
+
})), !t && S(s({}, We(e, r ? n : i)), {
|
|
1081
1084
|
backgroundColor: "",
|
|
1082
|
-
"& .MuiDrawer-paper":
|
|
1085
|
+
"& .MuiDrawer-paper": We(e, r ? n : i)
|
|
1083
1086
|
})));
|
|
1084
1087
|
function Mn(e) {
|
|
1085
1088
|
let t = 0;
|
|
@@ -1089,11 +1092,11 @@ function Mn(e) {
|
|
|
1089
1092
|
}
|
|
1090
1093
|
return t;
|
|
1091
1094
|
}
|
|
1092
|
-
const
|
|
1095
|
+
const ze = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Rn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
1093
1096
|
function Hn({ user: e, domainCode: t, open: n }) {
|
|
1094
1097
|
const i = ae();
|
|
1095
1098
|
return /* @__PURE__ */ p(
|
|
1096
|
-
|
|
1099
|
+
I,
|
|
1097
1100
|
{
|
|
1098
1101
|
sx: {
|
|
1099
1102
|
paddingTop: 3,
|
|
@@ -1104,7 +1107,7 @@ function Hn({ user: e, domainCode: t, open: n }) {
|
|
|
1104
1107
|
},
|
|
1105
1108
|
children: [
|
|
1106
1109
|
/* @__PURE__ */ o(
|
|
1107
|
-
|
|
1110
|
+
I,
|
|
1108
1111
|
{
|
|
1109
1112
|
sx: {
|
|
1110
1113
|
width: n ? "5rem" : "2rem",
|
|
@@ -1112,22 +1115,22 @@ function Hn({ user: e, domainCode: t, open: n }) {
|
|
|
1112
1115
|
aspectRatio: 1
|
|
1113
1116
|
},
|
|
1114
1117
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1115
|
-
|
|
1118
|
+
Fe,
|
|
1116
1119
|
{
|
|
1117
1120
|
src: e == null ? void 0 : e.picture,
|
|
1118
1121
|
sx: {
|
|
1119
1122
|
width: "100%",
|
|
1120
1123
|
height: "100%",
|
|
1121
|
-
bgcolor:
|
|
1124
|
+
bgcolor: ze[Math.abs(Mn(e.name)) % ze.length]
|
|
1122
1125
|
},
|
|
1123
1126
|
children: Rn(e.name)
|
|
1124
1127
|
}
|
|
1125
|
-
) : /* @__PURE__ */ o(
|
|
1128
|
+
) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
|
|
1126
1129
|
}
|
|
1127
1130
|
),
|
|
1128
|
-
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(
|
|
1129
|
-
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(
|
|
1130
|
-
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(
|
|
1131
|
+
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ p(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1132
|
+
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "50%" }),
|
|
1133
|
+
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "25%" })
|
|
1131
1134
|
] }) }) })
|
|
1132
1135
|
]
|
|
1133
1136
|
}
|
|
@@ -1144,7 +1147,7 @@ function Wn({
|
|
|
1144
1147
|
user: d,
|
|
1145
1148
|
domainCode: l
|
|
1146
1149
|
}) {
|
|
1147
|
-
const u =
|
|
1150
|
+
const u = xt(), w = lt(Y);
|
|
1148
1151
|
return /* @__PURE__ */ o(Nn, { className: X.root, "data-testid": i, children: /* @__PURE__ */ p(
|
|
1149
1152
|
_n,
|
|
1150
1153
|
{
|
|
@@ -1157,18 +1160,18 @@ function Wn({
|
|
|
1157
1160
|
component: "nav"
|
|
1158
1161
|
},
|
|
1159
1162
|
onClose: () => {
|
|
1160
|
-
|
|
1163
|
+
w(!1);
|
|
1161
1164
|
},
|
|
1162
1165
|
isSmallScreen: u,
|
|
1163
1166
|
children: [
|
|
1164
|
-
!u && /* @__PURE__ */ o(
|
|
1165
|
-
r && /* @__PURE__ */ p(
|
|
1167
|
+
!u && /* @__PURE__ */ o(Ut, {}),
|
|
1168
|
+
r && /* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
1166
1169
|
r,
|
|
1167
|
-
/* @__PURE__ */ o(
|
|
1170
|
+
/* @__PURE__ */ o(Ne, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
1168
1171
|
] }),
|
|
1169
|
-
/* @__PURE__ */ o(
|
|
1170
|
-
/* @__PURE__ */ p(
|
|
1171
|
-
/* @__PURE__ */ o(
|
|
1172
|
+
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ o(Pn, { links: a }) : a }),
|
|
1173
|
+
/* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
1174
|
+
/* @__PURE__ */ o(Ne, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
1172
1175
|
/* @__PURE__ */ o(Hn, { user: d, domainCode: l, open: e }),
|
|
1173
1176
|
c && /* @__PURE__ */ o(_, { children: c })
|
|
1174
1177
|
] })
|
|
@@ -1182,7 +1185,7 @@ function zn({
|
|
|
1182
1185
|
maxWidth: n = !1
|
|
1183
1186
|
}) {
|
|
1184
1187
|
return /* @__PURE__ */ o(
|
|
1185
|
-
|
|
1188
|
+
I,
|
|
1186
1189
|
{
|
|
1187
1190
|
sx: {
|
|
1188
1191
|
overflow: "auto",
|
|
@@ -1192,7 +1195,7 @@ function zn({
|
|
|
1192
1195
|
flexGrow: 1
|
|
1193
1196
|
},
|
|
1194
1197
|
children: /* @__PURE__ */ o(
|
|
1195
|
-
|
|
1198
|
+
nt,
|
|
1196
1199
|
{
|
|
1197
1200
|
component: "main",
|
|
1198
1201
|
id: "main-content",
|
|
@@ -1213,9 +1216,9 @@ function Vn({
|
|
|
1213
1216
|
"data-testid": n,
|
|
1214
1217
|
middle: i
|
|
1215
1218
|
}) {
|
|
1216
|
-
const r =
|
|
1219
|
+
const r = lt(Y), a = () => r((l) => !l), c = ae(), d = xt();
|
|
1217
1220
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
|
|
1218
|
-
|
|
1221
|
+
Ke,
|
|
1219
1222
|
{
|
|
1220
1223
|
square: !0,
|
|
1221
1224
|
elevation: 0,
|
|
@@ -1259,35 +1262,35 @@ function No({
|
|
|
1259
1262
|
navBarMiddle: d,
|
|
1260
1263
|
navBarBottom: l,
|
|
1261
1264
|
user: u,
|
|
1262
|
-
domainCode:
|
|
1265
|
+
domainCode: w
|
|
1263
1266
|
}) {
|
|
1264
|
-
|
|
1267
|
+
dt([
|
|
1265
1268
|
[Y, n != null ? n : !0],
|
|
1266
|
-
[
|
|
1269
|
+
[xe, t != null ? t : ""]
|
|
1267
1270
|
]);
|
|
1268
|
-
const
|
|
1269
|
-
return /* @__PURE__ */ p(
|
|
1270
|
-
/* @__PURE__ */ o(
|
|
1271
|
+
const C = Le(Y), [A] = V(vt), [g] = V(wt), k = Le(xe), [b] = V(At), [D] = V(Fn), [$] = V(bt);
|
|
1272
|
+
return /* @__PURE__ */ p(I, { children: [
|
|
1273
|
+
/* @__PURE__ */ o(Gt, {}),
|
|
1271
1274
|
/* @__PURE__ */ o(
|
|
1272
1275
|
Vn,
|
|
1273
1276
|
{
|
|
1274
1277
|
titleText: k,
|
|
1275
1278
|
"data-testid": a,
|
|
1276
1279
|
height: b,
|
|
1277
|
-
middle:
|
|
1280
|
+
middle: D
|
|
1278
1281
|
}
|
|
1279
1282
|
),
|
|
1280
|
-
/* @__PURE__ */ p(
|
|
1283
|
+
/* @__PURE__ */ p(I, { sx: { display: "flex" }, children: [
|
|
1281
1284
|
/* @__PURE__ */ o(
|
|
1282
1285
|
Wn,
|
|
1283
1286
|
{
|
|
1284
|
-
open:
|
|
1285
|
-
top:
|
|
1287
|
+
open: C,
|
|
1288
|
+
top: $,
|
|
1286
1289
|
middle: d,
|
|
1287
1290
|
bottom: l,
|
|
1288
1291
|
user: u,
|
|
1289
|
-
domainCode:
|
|
1290
|
-
widthOpen:
|
|
1292
|
+
domainCode: w,
|
|
1293
|
+
widthOpen: A,
|
|
1291
1294
|
widthClosed: g,
|
|
1292
1295
|
offsetTop: b,
|
|
1293
1296
|
"data-testid": c
|
|
@@ -1313,97 +1316,97 @@ const qn = {
|
|
|
1313
1316
|
disableWindowBlurListener: !1
|
|
1314
1317
|
}, Xn = {
|
|
1315
1318
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1316
|
-
},
|
|
1319
|
+
}, Ue = {
|
|
1317
1320
|
message: "",
|
|
1318
1321
|
severity: "info",
|
|
1319
1322
|
variant: "standard",
|
|
1320
1323
|
progressIndicator: void 0
|
|
1321
1324
|
// Can use 'circular' or 'linear'
|
|
1322
|
-
},
|
|
1325
|
+
}, Ge = 100, Ve = 2e3, Qn = 2e3, Yn = (() => {
|
|
1323
1326
|
let e = 0;
|
|
1324
1327
|
return () => (e += 1, e);
|
|
1325
1328
|
})(), Kn = {
|
|
1326
1329
|
borderBottomLeftRadius: "0px",
|
|
1327
1330
|
borderBottomRightRadius: "0px"
|
|
1328
|
-
}, Jn = {}, Zn = {},
|
|
1331
|
+
}, Jn = {}, Zn = {}, kt = Qe(null);
|
|
1329
1332
|
function jn(a) {
|
|
1330
1333
|
var c = a, {
|
|
1331
1334
|
overrideState: e = Jn,
|
|
1332
1335
|
overrideActions: t = Zn,
|
|
1333
1336
|
shouldClose: n = Xn.shouldClose,
|
|
1334
1337
|
children: i
|
|
1335
|
-
} = c, r =
|
|
1338
|
+
} = c, r = Ee(c, [
|
|
1336
1339
|
"overrideState",
|
|
1337
1340
|
"overrideActions",
|
|
1338
1341
|
"shouldClose",
|
|
1339
1342
|
"children"
|
|
1340
1343
|
]);
|
|
1341
|
-
var
|
|
1342
|
-
const [{ open: d }, l] = E({ open: !1 }), u =
|
|
1343
|
-
l({ open:
|
|
1344
|
-
}, []), g = ne((
|
|
1345
|
-
|
|
1346
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1347
|
-
),
|
|
1348
|
-
const
|
|
1344
|
+
var B;
|
|
1345
|
+
const [{ open: d }, l] = E({ open: !1 }), u = he([]), w = he(Date.now()), C = he(0), A = ne((m) => {
|
|
1346
|
+
l({ open: m });
|
|
1347
|
+
}, []), g = ne((m = {}) => {
|
|
1348
|
+
C.current += 1, u.current.length >= Ge && Date.now() - w.current >= Ve && (w.current = Date.now(), console.error(
|
|
1349
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${C.current} times in last ${Ve}ms)`
|
|
1350
|
+
), C.current = 0);
|
|
1351
|
+
const v = s(S(s({}, Ue), {
|
|
1349
1352
|
key: Yn()
|
|
1350
|
-
}),
|
|
1351
|
-
return u.current.push(
|
|
1352
|
-
}, []), k = (
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1356
|
-
}, y = (
|
|
1357
|
-
n(
|
|
1353
|
+
}), m);
|
|
1354
|
+
return u.current.push(v), u.current.length === 1 && l({ open: !0 }), v.key;
|
|
1355
|
+
}, []), k = (m = "", v = {}) => g(s({ message: m, severity: "success" }, v)), b = (m = "", v = {}) => g(s({ message: m, severity: "info" }, v)), D = (m = "", v = {}) => g(s({ message: m, severity: "warning" }, v)), $ = (m = "", v = {}) => g(s({ message: m, severity: "error" }, v)), x = (m) => {
|
|
1356
|
+
const v = u.current.findIndex((L) => L.key === m);
|
|
1357
|
+
if (v !== -1)
|
|
1358
|
+
return v === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(v, 1);
|
|
1359
|
+
}, y = (m, v) => {
|
|
1360
|
+
n(m, v) && l({ open: !1 });
|
|
1361
|
+
}, H = () => {
|
|
1358
1362
|
}, N = () => {
|
|
1359
|
-
}, R = () => {
|
|
1360
1363
|
u.current.shift(), u.current.length > 0 && l({ open: !0 });
|
|
1361
|
-
}, T = (
|
|
1362
|
-
"autoHideDuration" in T && (
|
|
1363
|
-
const
|
|
1364
|
+
}, T = (B = u.current[0]) != null ? B : s({}, Ue), W = {};
|
|
1365
|
+
"autoHideDuration" in T && (W.autoHideDuration = T.autoHideDuration);
|
|
1366
|
+
const h = s(s({}, qn), r), f = s(s({
|
|
1364
1367
|
open: d,
|
|
1365
|
-
setOpen:
|
|
1368
|
+
setOpen: A,
|
|
1366
1369
|
enqueueNotification: g,
|
|
1367
1370
|
enqueueSuccessNotification: k,
|
|
1368
1371
|
enqueueInfoNotification: b,
|
|
1369
|
-
enqueueWarningNotification:
|
|
1370
|
-
enqueueErrorNotification:
|
|
1371
|
-
removeNotification:
|
|
1372
|
+
enqueueWarningNotification: D,
|
|
1373
|
+
enqueueErrorNotification: $,
|
|
1374
|
+
removeNotification: x
|
|
1372
1375
|
}, e), t);
|
|
1373
|
-
return /* @__PURE__ */ p(
|
|
1376
|
+
return /* @__PURE__ */ p(kt.Provider, { value: f, children: [
|
|
1374
1377
|
i,
|
|
1375
1378
|
/* @__PURE__ */ o(
|
|
1376
|
-
|
|
1377
|
-
S(s(s({},
|
|
1379
|
+
Vt,
|
|
1380
|
+
S(s(s({}, h), W), {
|
|
1378
1381
|
open: d,
|
|
1379
1382
|
onClose: y,
|
|
1380
1383
|
TransitionProps: {
|
|
1381
|
-
onExited:
|
|
1382
|
-
onExit:
|
|
1384
|
+
onExited: N,
|
|
1385
|
+
onExit: H
|
|
1383
1386
|
},
|
|
1384
1387
|
sx: { zIndex: Qn },
|
|
1385
1388
|
children: /* @__PURE__ */ p("div", { children: [
|
|
1386
1389
|
/* @__PURE__ */ o(
|
|
1387
|
-
|
|
1390
|
+
qt,
|
|
1388
1391
|
{
|
|
1389
|
-
onClose: (
|
|
1392
|
+
onClose: (m) => y(m, "closeAlert"),
|
|
1390
1393
|
severity: T.severity,
|
|
1391
1394
|
variant: "filled",
|
|
1392
|
-
icon: T.progressIndicator === "circular" ? /* @__PURE__ */ o(
|
|
1395
|
+
icon: T.progressIndicator === "circular" ? /* @__PURE__ */ o(be, { size: "1em" }) : void 0,
|
|
1393
1396
|
style: T.progressIndicator === "linear" ? Kn : void 0,
|
|
1394
1397
|
children: T.message
|
|
1395
1398
|
}
|
|
1396
1399
|
),
|
|
1397
|
-
T.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1400
|
+
T.progressIndicator === "linear" && /* @__PURE__ */ o(Ze, { color: "primary" })
|
|
1398
1401
|
] })
|
|
1399
1402
|
})
|
|
1400
1403
|
)
|
|
1401
1404
|
] });
|
|
1402
1405
|
}
|
|
1403
1406
|
function eo() {
|
|
1404
|
-
const e =
|
|
1407
|
+
const e = Ye(kt);
|
|
1405
1408
|
if (e === null)
|
|
1406
|
-
throw new
|
|
1409
|
+
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1407
1410
|
return e;
|
|
1408
1411
|
}
|
|
1409
1412
|
const Lo = K(
|
|
@@ -1411,14 +1414,14 @@ const Lo = K(
|
|
|
1411
1414
|
), to = sn(), _o = ({
|
|
1412
1415
|
children: e,
|
|
1413
1416
|
store: t
|
|
1414
|
-
}) => /* @__PURE__ */ o(
|
|
1415
|
-
var
|
|
1416
|
-
const
|
|
1417
|
-
JSON.parse((
|
|
1418
|
-
),
|
|
1419
|
-
(e) => e(
|
|
1417
|
+
}) => /* @__PURE__ */ o(ct, { store: t != null ? t : to, children: e }), Dt = "domainCode";
|
|
1418
|
+
var Xe;
|
|
1419
|
+
const qe = M(
|
|
1420
|
+
JSON.parse((Xe = localStorage.getItem(Dt)) != null ? Xe : '{"domainCode": ""}').domainCode
|
|
1421
|
+
), yt = M(
|
|
1422
|
+
(e) => e(qe),
|
|
1420
1423
|
(e, t, n) => {
|
|
1421
|
-
t(
|
|
1424
|
+
t(qe, n), localStorage.setItem(Dt, JSON.stringify({ domainCode: n }));
|
|
1422
1425
|
}
|
|
1423
1426
|
), no = {
|
|
1424
1427
|
act: "ACT",
|
|
@@ -1443,21 +1446,21 @@ const Ve = M(
|
|
|
1443
1446
|
applicationName: r,
|
|
1444
1447
|
handleLogout: a
|
|
1445
1448
|
}) => {
|
|
1446
|
-
const [c, d] = V(
|
|
1447
|
-
l ? (d(l),
|
|
1449
|
+
const [c, d] = V(yt), [l, u] = E(c), { enqueueSuccessNotification: w } = eo(), C = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || C || A, k = () => P(void 0, null, function* () {
|
|
1450
|
+
l ? (d(l), w(`Set domain to ${l}`), n()) : d("");
|
|
1448
1451
|
}), b = () => P(void 0, null, function* () {
|
|
1449
|
-
c && !
|
|
1452
|
+
c && !C && !A ? (u(c), n()) : g && a();
|
|
1450
1453
|
});
|
|
1451
|
-
let
|
|
1452
|
-
return
|
|
1453
|
-
|
|
1454
|
+
let D;
|
|
1455
|
+
return C ? D = "Unable to retrieve your active organisations. Try logging in again." : A && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
|
|
1456
|
+
ft,
|
|
1454
1457
|
{
|
|
1455
1458
|
isOpen: t,
|
|
1456
1459
|
dialogTitle: "Select an organisation",
|
|
1457
1460
|
primaryButton: {
|
|
1458
1461
|
text: "Confirm",
|
|
1459
1462
|
onClick: k,
|
|
1460
|
-
disabled: !l ||
|
|
1463
|
+
disabled: !l || C || A,
|
|
1461
1464
|
buttonColor: "primary"
|
|
1462
1465
|
},
|
|
1463
1466
|
secondaryButton: {
|
|
@@ -1473,35 +1476,35 @@ const Ve = M(
|
|
|
1473
1476
|
"."
|
|
1474
1477
|
] }),
|
|
1475
1478
|
/* @__PURE__ */ o(
|
|
1476
|
-
|
|
1479
|
+
we,
|
|
1477
1480
|
{
|
|
1478
1481
|
loading: e,
|
|
1479
1482
|
multiple: !1,
|
|
1480
1483
|
disableClearable: !1,
|
|
1481
1484
|
value: l !== "" ? l : null,
|
|
1482
|
-
onChange: (
|
|
1485
|
+
onChange: ($, x) => u(x != null ? x : ""),
|
|
1483
1486
|
getOptionLabel: oo,
|
|
1484
1487
|
options: [...i],
|
|
1485
|
-
renderInput: (
|
|
1486
|
-
|
|
1487
|
-
S(s({},
|
|
1488
|
+
renderInput: ($) => /* @__PURE__ */ o(
|
|
1489
|
+
Ae,
|
|
1490
|
+
S(s({}, $), {
|
|
1488
1491
|
variant: "filled",
|
|
1489
1492
|
label: "Select organisation",
|
|
1490
|
-
InputProps: S(s({},
|
|
1493
|
+
InputProps: S(s({}, $.InputProps), {
|
|
1491
1494
|
endAdornment: /* @__PURE__ */ p(_, { children: [
|
|
1492
|
-
e ? /* @__PURE__ */ o(
|
|
1493
|
-
|
|
1495
|
+
e ? /* @__PURE__ */ o(be, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1496
|
+
$.InputProps.endAdornment
|
|
1494
1497
|
] })
|
|
1495
1498
|
})
|
|
1496
1499
|
})
|
|
1497
1500
|
)
|
|
1498
1501
|
}
|
|
1499
1502
|
),
|
|
1500
|
-
|
|
1503
|
+
D && /* @__PURE__ */ o(Xt, { error: !0, children: D })
|
|
1501
1504
|
]
|
|
1502
1505
|
}
|
|
1503
1506
|
);
|
|
1504
|
-
}, Ro =
|
|
1507
|
+
}, Ro = ot({
|
|
1505
1508
|
palette: {
|
|
1506
1509
|
primary: {
|
|
1507
1510
|
dark: "#00A651",
|
|
@@ -1552,7 +1555,7 @@ const Ve = M(
|
|
|
1552
1555
|
navBar: {
|
|
1553
1556
|
backgroundColor: "#E8E8E8"
|
|
1554
1557
|
}
|
|
1555
|
-
}), Ho =
|
|
1558
|
+
}), Ho = ot({
|
|
1556
1559
|
palette: {
|
|
1557
1560
|
primary: {
|
|
1558
1561
|
main: "#007236",
|
|
@@ -1606,18 +1609,18 @@ const Ve = M(
|
|
|
1606
1609
|
styleOverrides: {
|
|
1607
1610
|
root: ({ theme: e }) => ({
|
|
1608
1611
|
"&.Mui-selected": {
|
|
1609
|
-
backgroundColor:
|
|
1612
|
+
backgroundColor: ge(
|
|
1610
1613
|
e.palette.secondary.main,
|
|
1611
1614
|
e.palette.action.selectedOpacity
|
|
1612
1615
|
),
|
|
1613
1616
|
"&:hover": {
|
|
1614
|
-
backgroundColor:
|
|
1617
|
+
backgroundColor: ge(
|
|
1615
1618
|
e.palette.secondary.main,
|
|
1616
1619
|
e.palette.action.selectedOpacity
|
|
1617
1620
|
)
|
|
1618
1621
|
},
|
|
1619
1622
|
"&.Mui-focusVisible": {
|
|
1620
|
-
backgroundColor:
|
|
1623
|
+
backgroundColor: ge(
|
|
1621
1624
|
e.palette.secondary.main,
|
|
1622
1625
|
e.palette.action.focusOpacity
|
|
1623
1626
|
)
|
|
@@ -1644,17 +1647,17 @@ const Ve = M(
|
|
|
1644
1647
|
backgroundColor: "#E8E8E8"
|
|
1645
1648
|
}
|
|
1646
1649
|
}), io = {
|
|
1647
|
-
domainCode:
|
|
1650
|
+
domainCode: yt,
|
|
1648
1651
|
navBarOpen: Y,
|
|
1649
|
-
navBarWidthOpen:
|
|
1650
|
-
navBarWidthClosed:
|
|
1651
|
-
titleText:
|
|
1652
|
-
topBarHeight:
|
|
1653
|
-
navBarTop:
|
|
1654
|
-
}, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(
|
|
1652
|
+
navBarWidthOpen: vt,
|
|
1653
|
+
navBarWidthClosed: wt,
|
|
1654
|
+
titleText: xe,
|
|
1655
|
+
topBarHeight: At,
|
|
1656
|
+
navBarTop: bt
|
|
1657
|
+
}, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(ct, { children: e })), ro = ({
|
|
1655
1658
|
initialValues: e,
|
|
1656
1659
|
children: t
|
|
1657
|
-
}) => (
|
|
1660
|
+
}) => (dt(e), /* @__PURE__ */ o(_, { children: t })), zo = K(
|
|
1658
1661
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1659
1662
|
ro,
|
|
1660
1663
|
{
|
|
@@ -1672,18 +1675,18 @@ const Ve = M(
|
|
|
1672
1675
|
return /* @__PURE__ */ o(on, { client: t, children: e });
|
|
1673
1676
|
});
|
|
1674
1677
|
export {
|
|
1675
|
-
|
|
1678
|
+
ft as AgDialog,
|
|
1676
1679
|
No as AppLayout,
|
|
1677
1680
|
_o as AtomProvider,
|
|
1678
1681
|
Fo as AuthGuard,
|
|
1679
|
-
|
|
1680
|
-
|
|
1682
|
+
kt as Context,
|
|
1683
|
+
ke as ContextError,
|
|
1681
1684
|
Mo as DomainCodeDialog,
|
|
1682
1685
|
Do as ExampleComponent,
|
|
1683
1686
|
Oo as FetchAutocomplete,
|
|
1684
1687
|
ro as HydrateAtoms,
|
|
1685
|
-
|
|
1686
|
-
|
|
1688
|
+
pt as NAVBAR_WIDTH_CLOSED,
|
|
1689
|
+
ut as NAVBAR_WIDTH_OPENED,
|
|
1687
1690
|
To as NavBar,
|
|
1688
1691
|
$o as NavBarDarkStyledList,
|
|
1689
1692
|
Io as NavBarLightStyledList,
|
|
@@ -1694,19 +1697,19 @@ export {
|
|
|
1694
1697
|
Eo as SingleAutocomplete,
|
|
1695
1698
|
to as atomStore,
|
|
1696
1699
|
mn as buildNavBarState,
|
|
1697
|
-
|
|
1700
|
+
yt as domainCodeAtom,
|
|
1698
1701
|
Ro as fed21Theme,
|
|
1699
1702
|
Cn as getAuth0Expiry,
|
|
1700
1703
|
Ho as internalAgSystemsTheme,
|
|
1701
1704
|
q as navBarClasses,
|
|
1702
1705
|
Y as navBarOpenAtom,
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1706
|
+
bt as navBarTopAtom,
|
|
1707
|
+
wt as navBarWidthClosedAtom,
|
|
1708
|
+
vt as navBarWidthOpenAtom,
|
|
1709
|
+
xe as titleTextAtom,
|
|
1710
|
+
At as topBarHeightAtom,
|
|
1708
1711
|
Fn as topBarMiddleAtom,
|
|
1709
|
-
|
|
1712
|
+
mt as useAutocompleteOptions,
|
|
1710
1713
|
fn as useNavBar,
|
|
1711
1714
|
eo as useSaladBar,
|
|
1712
1715
|
Wo as withAtomProvider,
|