@australiangreens/ag-internal-components 0.1.9 → 0.1.11
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 +10 -1
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +470 -466
- package/dist/esm/index.js.map +1 -1
- package/dist/utils/consoleSupression.d.ts +20 -0
- package/dist/utils/consoleSupression.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _t = Object.defineProperty, Lt = Object.defineProperties;
|
|
2
2
|
var Mt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var oe = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var he = (e, t, n) => t in e ?
|
|
4
|
+
var Ee = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var he = (e, t, n) => t in e ? _t(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
|
+
Ee.call(t, n) && he(e, n, t[n]);
|
|
8
8
|
if (oe)
|
|
9
9
|
for (var n of oe(t))
|
|
10
|
-
|
|
10
|
+
Oe.call(t, n) && he(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, I = (e, t) => Lt(e, Mt(t));
|
|
13
|
+
var Be = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
|
-
|
|
16
|
+
Ee.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 && Oe.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
-
var
|
|
24
|
-
var s = (
|
|
23
|
+
var _ = (e, t, n) => new Promise((i, r) => {
|
|
24
|
+
var s = (l) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
r(
|
|
26
|
+
c(n.next(l));
|
|
27
|
+
} catch (p) {
|
|
28
|
+
r(p);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, d = (l) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
r(
|
|
32
|
+
c(n.throw(l));
|
|
33
|
+
} catch (p) {
|
|
34
|
+
r(p);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, c = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, d);
|
|
37
|
+
c((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as u, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as F, createContext as Je, useCallback as ae, useContext as Ze, useEffect as K, createElement as xe, useMemo as Rt, useRef as ge } from "react";
|
|
41
|
+
import { Typography as T, Button as J, Paper as je, Box as k, Drawer as we, styled as Ae, IconButton as Z, Container as et, useTheme as se, useMediaQuery as Ht, Collapse as Wt, Avatar as Ne, Fade as Ut, Skeleton as Pe, Toolbar as zt, Divider as _e, CssBaseline as Gt, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as be, TextField as Se, CircularProgress as Ie, Chip as Vt, Tooltip as qt, Stack as Xt, Snackbar as Qt, Alert as Yt, FormHelperText as Kt } from "@mui/material";
|
|
42
42
|
import Jt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as W, createTheme as at, alpha as fe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Zt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as Q } from "souvlaki";
|
|
46
46
|
import { BrowserRouter as jt } from "react-router-dom";
|
|
47
47
|
import st from "@mui/material/List";
|
|
48
48
|
import { ArrowForward as lt, ArrowBack as ct, ViewHeadline as en, Cancel as tn, ArrowDropDown as nn } from "@mui/icons-material";
|
|
49
|
-
import { atom as
|
|
49
|
+
import { atom as R, useSetAtom as dt, useAtomValue as Le, useAtom as V, getDefaultStore as on, Provider as ut } from "jotai";
|
|
50
50
|
import { useHydrateAtoms as pt } from "jotai/utils";
|
|
51
51
|
import Me from "react-avatar";
|
|
52
52
|
import rn from "autosuggest-highlight/match";
|
|
@@ -55,11 +55,11 @@ import { useQuery as sn, QueryClient as ln, QueryClientProvider as cn } from "@t
|
|
|
55
55
|
import { useAuth0 as ht } from "@auth0/auth0-react";
|
|
56
56
|
import { Buffer as dn } from "buffer";
|
|
57
57
|
import un from "@mui/material/Skeleton";
|
|
58
|
-
function
|
|
59
|
-
const [t, n] =
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
/* @__PURE__ */ o(
|
|
58
|
+
function Eo({ text: e }) {
|
|
59
|
+
const [t, n] = F(0);
|
|
60
|
+
return /* @__PURE__ */ u(N, { children: [
|
|
61
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
62
|
+
/* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
63
63
|
/* @__PURE__ */ o(
|
|
64
64
|
J,
|
|
65
65
|
{
|
|
@@ -69,25 +69,25 @@ function Oo({ text: e }) {
|
|
|
69
69
|
children: "Hello I am a button"
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ u("p", { children: [
|
|
73
73
|
"This is some text: ",
|
|
74
74
|
/* @__PURE__ */ o("span", { children: e })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ u(je, { children: [
|
|
77
77
|
"This number will incremember when button pressed: ",
|
|
78
78
|
t
|
|
79
79
|
] })
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
|
-
const gt = 330, ft = 73,
|
|
83
|
-
root: `${
|
|
84
|
-
menuButton: `${
|
|
85
|
-
hide: `${
|
|
86
|
-
content: `${
|
|
87
|
-
userInfoHolder: `${
|
|
88
|
-
settings: `${
|
|
89
|
-
pieChartIcon: `${
|
|
90
|
-
}, pn =
|
|
82
|
+
const gt = 330, ft = 73, z = "Navbar", q = {
|
|
83
|
+
root: `${z}-root`,
|
|
84
|
+
menuButton: `${z}-menuButton`,
|
|
85
|
+
hide: `${z}-hide`,
|
|
86
|
+
content: `${z}-content`,
|
|
87
|
+
userInfoHolder: `${z}-userInfoHolder`,
|
|
88
|
+
settings: `${z}-settings`,
|
|
89
|
+
pieChartIcon: `${z}-pieChartIcon`
|
|
90
|
+
}, pn = W(k, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -120,7 +120,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
120
120
|
width: gt
|
|
121
121
|
}, mt()), gn = () => a({
|
|
122
122
|
width: ft
|
|
123
|
-
}, mt()), fn =
|
|
123
|
+
}, mt()), fn = W(we, {
|
|
124
124
|
shouldForwardProp: (e) => e !== "open"
|
|
125
125
|
})(({ theme: e, open: t }) => a(a({
|
|
126
126
|
width: t ? gt : ft,
|
|
@@ -133,34 +133,34 @@ const gt = 330, ft = 73, U = "Navbar", q = {
|
|
|
133
133
|
}), !t && {
|
|
134
134
|
"& .MuiDrawer-paper": gn()
|
|
135
135
|
}));
|
|
136
|
-
class
|
|
136
|
+
class De extends Zt {
|
|
137
137
|
}
|
|
138
|
-
Fe(
|
|
138
|
+
Fe(De, "errorName", "ContextError");
|
|
139
139
|
const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
140
140
|
overrideState: e = mn,
|
|
141
141
|
overrideActions: t = Cn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
|
-
const [{ open: i }, r] =
|
|
145
|
-
r({ open:
|
|
146
|
-
}, []),
|
|
147
|
-
r((
|
|
148
|
-
}, []),
|
|
144
|
+
const [{ open: i }, r] = F({ open: !0 }), s = ae((l) => {
|
|
145
|
+
r({ open: l });
|
|
146
|
+
}, []), d = ae(() => {
|
|
147
|
+
r((l) => I(a({}, l), { open: !l.open }));
|
|
148
|
+
}, []), c = a(a({
|
|
149
149
|
open: i,
|
|
150
150
|
setOpen: s,
|
|
151
|
-
toggleOpen:
|
|
151
|
+
toggleOpen: d
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(Ct.Provider, { value:
|
|
153
|
+
return /* @__PURE__ */ o(Ct.Provider, { value: c, children: n });
|
|
154
154
|
}, vn = () => {
|
|
155
155
|
const e = Ze(Ct);
|
|
156
156
|
if (e === null)
|
|
157
|
-
throw new
|
|
157
|
+
throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
158
158
|
return e;
|
|
159
159
|
}, wn = (e = {}) => a({
|
|
160
160
|
open: !0
|
|
161
|
-
}, e),
|
|
161
|
+
}, e), Oo = Q(
|
|
162
162
|
(e = wn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(xn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
-
),
|
|
163
|
+
), Bo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), Re = 7, Fo = W(st)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -198,7 +198,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
198
198
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
199
199
|
// },
|
|
200
200
|
}
|
|
201
|
-
})), He = 7,
|
|
201
|
+
})), He = 7, No = W(st)(({ theme: e }) => ({
|
|
202
202
|
backgroundColor: "#e8e8e8",
|
|
203
203
|
color: "inherit",
|
|
204
204
|
"& .MuiListItem-root": {
|
|
@@ -237,12 +237,12 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
|
|
|
237
237
|
// },
|
|
238
238
|
}
|
|
239
239
|
}));
|
|
240
|
-
function
|
|
240
|
+
function Po({
|
|
241
241
|
"data-testid": e,
|
|
242
242
|
children: t
|
|
243
243
|
}) {
|
|
244
244
|
const { open: n } = vn();
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ u(pn, { className: q.root, "data-testid": e, children: [
|
|
246
246
|
/* @__PURE__ */ o(Jt, {}),
|
|
247
247
|
/* @__PURE__ */ o(
|
|
248
248
|
fn,
|
|
@@ -256,14 +256,14 @@ function No({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const An = 24,
|
|
259
|
+
const An = 24, bn = 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
|
+
}, Sn = Ae("div", {
|
|
267
267
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
268
268
|
name: G
|
|
269
269
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -277,7 +277,7 @@ const An = 24, Sn = 64, G = "TopBar", B = {
|
|
|
277
277
|
},
|
|
278
278
|
[`& .${B.titleBar}`]: {
|
|
279
279
|
backgroundColor: e.palette.primary.light,
|
|
280
|
-
height: `${
|
|
280
|
+
height: `${bn}px`,
|
|
281
281
|
padding: e.spacing(0, 3),
|
|
282
282
|
width: "100%"
|
|
283
283
|
},
|
|
@@ -315,16 +315,16 @@ const An = 24, Sn = 64, G = "TopBar", B = {
|
|
|
315
315
|
})
|
|
316
316
|
};
|
|
317
317
|
});
|
|
318
|
-
function
|
|
318
|
+
function In({
|
|
319
319
|
titleText: e = "",
|
|
320
320
|
leftPanel: t,
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ u(Sn, { 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__ */ u(k, { className: B.titleSlider, children: [
|
|
327
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
|
|
328
328
|
Z,
|
|
329
329
|
{
|
|
330
330
|
className: B.leftPanelButton,
|
|
@@ -339,8 +339,8 @@ function Dn({
|
|
|
339
339
|
]
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ o(
|
|
343
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ o(T, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
343
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
|
|
344
344
|
Z,
|
|
345
345
|
{
|
|
346
346
|
className: B.rightPanelButton,
|
|
@@ -358,7 +358,7 @@ function Dn({
|
|
|
358
358
|
] }) })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
const xt = 400,
|
|
361
|
+
const xt = 400, Dn = Ae(we, {
|
|
362
362
|
shouldForwardProp: (e) => (
|
|
363
363
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
364
364
|
![
|
|
@@ -388,9 +388,9 @@ const xt = 400, kn = Ae(we, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
),
|
|
391
|
+
), kn = Ae(k, {
|
|
392
392
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
393
|
-
})(({ theme: e, anchor: t }) =>
|
|
393
|
+
})(({ theme: e, anchor: t }) => I(a({
|
|
394
394
|
display: "flex",
|
|
395
395
|
alignItems: "center",
|
|
396
396
|
padding: e.spacing(2)
|
|
@@ -416,52 +416,52 @@ function We({
|
|
|
416
416
|
},
|
|
417
417
|
titleText: r = "",
|
|
418
418
|
width: s = xt,
|
|
419
|
-
showCloseArrow:
|
|
420
|
-
debugOpacity:
|
|
421
|
-
headerBoxProps:
|
|
422
|
-
onOpened:
|
|
423
|
-
onClosed:
|
|
419
|
+
showCloseArrow: d = !0,
|
|
420
|
+
debugOpacity: c = !1,
|
|
421
|
+
headerBoxProps: l = {},
|
|
422
|
+
onOpened: p,
|
|
423
|
+
onClosed: g,
|
|
424
424
|
"data-testid": m,
|
|
425
|
-
navBarOpen:
|
|
425
|
+
navBarOpen: w = !1,
|
|
426
426
|
navBarWidthOpen: h = 0,
|
|
427
|
-
navBarWidthClosed:
|
|
427
|
+
navBarWidthClosed: S = 0
|
|
428
428
|
}) {
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
|
|
429
|
+
return /* @__PURE__ */ u(
|
|
430
|
+
Dn,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
|
-
onEntered: () =>
|
|
434
|
-
onExited: () =>
|
|
433
|
+
onEntered: () => p == null ? void 0 : p(),
|
|
434
|
+
onExited: () => 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:
|
|
440
|
+
debugOpacity: c,
|
|
441
441
|
"data-testid": m,
|
|
442
|
-
navBarOpen:
|
|
442
|
+
navBarOpen: w,
|
|
443
443
|
navBarWidthOpen: h,
|
|
444
|
-
navBarWidthClosed:
|
|
444
|
+
navBarWidthClosed: S,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
/* @__PURE__ */ o(
|
|
448
|
-
|
|
446
|
+
/* @__PURE__ */ o(kn, I(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(N, { children: [
|
|
447
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
|
+
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
449
449
|
/* @__PURE__ */ o(ct, { "data-testid": "arrowbackicon" }),
|
|
450
450
|
" "
|
|
451
451
|
] })
|
|
452
|
-
] }) : /* @__PURE__ */
|
|
453
|
-
|
|
452
|
+
] }) : /* @__PURE__ */ u(N, { children: [
|
|
453
|
+
d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
454
454
|
/* @__PURE__ */ o(lt, {}),
|
|
455
455
|
" "
|
|
456
456
|
] }),
|
|
457
|
-
/* @__PURE__ */ o(
|
|
457
|
+
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
458
458
|
] }) })),
|
|
459
459
|
e
|
|
460
460
|
]
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const yn = W(k, {
|
|
465
465
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
466
466
|
name: "PanelAwareMargins"
|
|
467
467
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -484,7 +484,7 @@ const In = H(I, {
|
|
|
484
484
|
}),
|
|
485
485
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
486
486
|
});
|
|
487
|
-
}), $n =
|
|
487
|
+
}), $n = W(et, {
|
|
488
488
|
name: "PageContainer"
|
|
489
489
|
})(({ theme: e }) => ({
|
|
490
490
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -499,112 +499,112 @@ const In = H(I, {
|
|
|
499
499
|
startOpen: !1,
|
|
500
500
|
open: void 0,
|
|
501
501
|
onChangeOpen: void 0,
|
|
502
|
-
content: /* @__PURE__ */ o(
|
|
502
|
+
content: /* @__PURE__ */ o(N, {}),
|
|
503
503
|
onOpened: void 0,
|
|
504
504
|
onClosed: void 0,
|
|
505
505
|
dataTestId: void 0
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function _o({
|
|
508
508
|
children: e,
|
|
509
509
|
titleText: t = "",
|
|
510
510
|
leftPanel: n,
|
|
511
511
|
rightPanel: i,
|
|
512
512
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
513
513
|
debugOpacity: s = !1,
|
|
514
|
-
pageContainerProps:
|
|
515
|
-
pageContentDataTestId:
|
|
516
|
-
topBarDataTestId:
|
|
517
|
-
navBarOpen:
|
|
518
|
-
navBarWidthOpen:
|
|
514
|
+
pageContainerProps: d,
|
|
515
|
+
pageContentDataTestId: c,
|
|
516
|
+
topBarDataTestId: l,
|
|
517
|
+
navBarOpen: p,
|
|
518
|
+
navBarWidthOpen: g,
|
|
519
519
|
navBarWidthClosed: m
|
|
520
520
|
}) {
|
|
521
|
-
const [
|
|
522
|
-
titleText:
|
|
523
|
-
content:
|
|
524
|
-
flavour:
|
|
525
|
-
open:
|
|
521
|
+
const [w, h] = F(me), [S, b] = F(Ce), [D, $] = F(me), [E, O] = F(Ce), L = n !== void 0, P = i !== void 0, {
|
|
522
|
+
titleText: v,
|
|
523
|
+
content: y,
|
|
524
|
+
flavour: M,
|
|
525
|
+
open: f,
|
|
526
526
|
onChangeOpen: C,
|
|
527
527
|
width: x,
|
|
528
|
-
arrowButtons:
|
|
529
|
-
startOpen:
|
|
528
|
+
arrowButtons: A,
|
|
529
|
+
startOpen: H,
|
|
530
530
|
onOpened: ee,
|
|
531
531
|
onClosed: le,
|
|
532
|
-
dataTestId:
|
|
532
|
+
dataTestId: Et
|
|
533
533
|
} = n ? a(a({}, ie), n) : a({}, ie), {
|
|
534
|
-
titleText:
|
|
535
|
-
content:
|
|
536
|
-
flavour:
|
|
534
|
+
titleText: Ot,
|
|
535
|
+
content: Bt,
|
|
536
|
+
flavour: ke,
|
|
537
537
|
open: ce,
|
|
538
|
-
onChangeOpen:
|
|
538
|
+
onChangeOpen: ye,
|
|
539
539
|
width: de,
|
|
540
540
|
arrowButtons: te,
|
|
541
541
|
startOpen: ne,
|
|
542
542
|
onOpened: Ft,
|
|
543
|
-
onClosed:
|
|
544
|
-
dataTestId:
|
|
543
|
+
onClosed: Nt,
|
|
544
|
+
dataTestId: Pt
|
|
545
545
|
} = i ? a(a({}, ie), i) : a({}, ie);
|
|
546
546
|
K(() => {
|
|
547
|
-
|
|
548
|
-
}, [
|
|
549
|
-
ne !== Ce && (
|
|
547
|
+
H !== me && (h(H), $(H));
|
|
548
|
+
}, [H]), K(() => {
|
|
549
|
+
ne !== Ce && (b(ne), O(ne));
|
|
550
550
|
}, [ne]);
|
|
551
|
-
const ue =
|
|
552
|
-
|
|
553
|
-
}, Te = (
|
|
554
|
-
ce === void 0 && (
|
|
551
|
+
const ue = f === void 0 ? w : f, pe = ce === void 0 ? S : ce, $e = (U) => {
|
|
552
|
+
f === void 0 && (h(U), r && P && (U ? (b(!1), O(S)) : b(E))), C && C(U);
|
|
553
|
+
}, Te = (U) => {
|
|
554
|
+
ce === void 0 && (b(U), r && L && (U ? (h(!1), $(w)) : h(D))), ye && ye(U);
|
|
555
555
|
};
|
|
556
|
-
return /* @__PURE__ */
|
|
557
|
-
|
|
556
|
+
return /* @__PURE__ */ u(k, { children: [
|
|
557
|
+
L && /* @__PURE__ */ o(
|
|
558
558
|
We,
|
|
559
559
|
{
|
|
560
|
-
"data-testid":
|
|
560
|
+
"data-testid": Et,
|
|
561
561
|
anchor: "left",
|
|
562
562
|
open: ue,
|
|
563
563
|
onClose: () => $e(!1),
|
|
564
564
|
width: x,
|
|
565
|
-
titleText:
|
|
565
|
+
titleText: v,
|
|
566
566
|
debugOpacity: s,
|
|
567
|
-
showCloseArrow:
|
|
567
|
+
showCloseArrow: A === "both" || A === "close",
|
|
568
568
|
onOpened: ee,
|
|
569
569
|
onClosed: le,
|
|
570
|
-
navBarOpen:
|
|
571
|
-
navBarWidthOpen:
|
|
570
|
+
navBarOpen: p,
|
|
571
|
+
navBarWidthOpen: g,
|
|
572
572
|
navBarWidthClosed: m,
|
|
573
|
-
children:
|
|
573
|
+
children: y
|
|
574
574
|
}
|
|
575
575
|
),
|
|
576
|
-
|
|
576
|
+
P && /* @__PURE__ */ o(
|
|
577
577
|
We,
|
|
578
578
|
{
|
|
579
|
-
"data-testid":
|
|
579
|
+
"data-testid": Pt,
|
|
580
580
|
anchor: "right",
|
|
581
581
|
open: pe,
|
|
582
582
|
onClose: () => Te(!1),
|
|
583
583
|
width: de,
|
|
584
|
-
titleText:
|
|
584
|
+
titleText: Ot,
|
|
585
585
|
debugOpacity: s,
|
|
586
586
|
showCloseArrow: te === "both" || te === "close",
|
|
587
587
|
onOpened: Ft,
|
|
588
|
-
onClosed:
|
|
589
|
-
navBarOpen:
|
|
590
|
-
navBarWidthOpen:
|
|
588
|
+
onClosed: Nt,
|
|
589
|
+
navBarOpen: p,
|
|
590
|
+
navBarWidthOpen: g,
|
|
591
591
|
navBarWidthClosed: m,
|
|
592
|
-
children:
|
|
592
|
+
children: Bt
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ o(
|
|
596
|
-
|
|
596
|
+
In,
|
|
597
597
|
a(a({
|
|
598
598
|
titleText: t,
|
|
599
|
-
"data-testid":
|
|
600
|
-
},
|
|
599
|
+
"data-testid": l
|
|
600
|
+
}, L && M === "push" ? {
|
|
601
601
|
leftPanel: {
|
|
602
602
|
open: ue,
|
|
603
603
|
width: x,
|
|
604
604
|
onOpen: () => $e(!0),
|
|
605
|
-
showOpenArrow:
|
|
605
|
+
showOpenArrow: A === "both" || A === "open"
|
|
606
606
|
}
|
|
607
|
-
} : {}),
|
|
607
|
+
} : {}), P && ke === "push" ? {
|
|
608
608
|
rightPanel: {
|
|
609
609
|
open: pe,
|
|
610
610
|
width: de,
|
|
@@ -614,19 +614,19 @@ function Lo({
|
|
|
614
614
|
} : {})
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ o(
|
|
617
|
-
|
|
618
|
-
|
|
617
|
+
yn,
|
|
618
|
+
I(a(a({}, M === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
620
|
open: ue,
|
|
621
621
|
width: x
|
|
622
622
|
}
|
|
623
|
-
} : {}),
|
|
623
|
+
} : {}), ke === "push" ? {
|
|
624
624
|
rightPanel: {
|
|
625
625
|
open: pe,
|
|
626
626
|
width: de
|
|
627
627
|
}
|
|
628
628
|
} : {}), {
|
|
629
|
-
children: /* @__PURE__ */ o($n,
|
|
629
|
+
children: /* @__PURE__ */ o($n, I(a({ "data-testid": c }, d), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
@@ -634,7 +634,7 @@ function Lo({
|
|
|
634
634
|
const vt = () => {
|
|
635
635
|
const e = se();
|
|
636
636
|
return Ht(e.breakpoints.down("sm"));
|
|
637
|
-
}, Tn = 64,
|
|
637
|
+
}, Tn = 64, En = 72, On = 256, j = R(!0), wt = R(On), At = R(En), ve = R(""), Bn = R(void 0), bt = R(Tn), St = R(void 0);
|
|
638
638
|
function Fn({ links: e }) {
|
|
639
639
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
640
640
|
}
|
|
@@ -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
|
+
}, Nn = W(k, { name: "NavBar" })(({ theme: e }) => ({
|
|
650
650
|
[`&.${Y.root}`]: {
|
|
651
651
|
display: "flex"
|
|
652
652
|
},
|
|
@@ -668,7 +668,7 @@ 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
|
-
}),
|
|
671
|
+
}), Pn = (e) => {
|
|
672
672
|
const t = se();
|
|
673
673
|
return /* @__PURE__ */ o(
|
|
674
674
|
Wt,
|
|
@@ -680,7 +680,7 @@ const re = "Navbar", Y = {
|
|
|
680
680
|
}
|
|
681
681
|
}, e)
|
|
682
682
|
);
|
|
683
|
-
},
|
|
683
|
+
}, It = (e) => {
|
|
684
684
|
var t, n;
|
|
685
685
|
return {
|
|
686
686
|
overflowX: "hidden",
|
|
@@ -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
|
+
}, Ue = (e, t) => a({
|
|
692
692
|
width: t,
|
|
693
693
|
transition: X(e, "width", "entering")
|
|
694
|
-
},
|
|
694
|
+
}, It(e)), ze = (e, t) => a({
|
|
695
695
|
width: t,
|
|
696
696
|
transition: X(e, "width", "leaving")
|
|
697
|
-
},
|
|
697
|
+
}, It(e)), _n = W(we, {
|
|
698
698
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
699
699
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
|
|
700
700
|
flexShrink: 0,
|
|
@@ -702,14 +702,15 @@ const re = "Navbar", Y = {
|
|
|
702
702
|
boxSizing: "border-box",
|
|
703
703
|
display: "flex",
|
|
704
704
|
flexDirection: "column"
|
|
705
|
-
}, t &&
|
|
705
|
+
}, t && I(a({}, Ue(e, n)), {
|
|
706
706
|
backgroundColor: "",
|
|
707
|
-
"& .MuiDrawer-paper":
|
|
708
|
-
})), !t &&
|
|
707
|
+
"& .MuiDrawer-paper": Ue(e, n)
|
|
708
|
+
})), !t && I(a({}, ze(e, r ? n : i)), {
|
|
709
709
|
backgroundColor: "",
|
|
710
|
-
"& .MuiDrawer-paper":
|
|
710
|
+
"& .MuiDrawer-paper": ze(e, r ? n : i)
|
|
711
711
|
})));
|
|
712
|
-
|
|
712
|
+
console.warn.bind(console), console.error.bind(console), console.warn.bind(console), console.info.bind(console), console.debug.bind(console);
|
|
713
|
+
function Ln(e) {
|
|
713
714
|
let t = 0;
|
|
714
715
|
for (let n = 0, i = e.length; n < i; n++) {
|
|
715
716
|
const r = e.charCodeAt(n);
|
|
@@ -720,8 +721,8 @@ function _n(e) {
|
|
|
720
721
|
const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Ve = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
721
722
|
function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
722
723
|
const r = se();
|
|
723
|
-
return /* @__PURE__ */
|
|
724
|
-
|
|
724
|
+
return /* @__PURE__ */ u(
|
|
725
|
+
k,
|
|
725
726
|
{
|
|
726
727
|
sx: {
|
|
727
728
|
paddingTop: 3,
|
|
@@ -732,36 +733,36 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
732
733
|
},
|
|
733
734
|
children: [
|
|
734
735
|
!i && /* @__PURE__ */ o(
|
|
735
|
-
|
|
736
|
+
k,
|
|
736
737
|
{
|
|
737
738
|
sx: {
|
|
738
739
|
width: n ? "5rem" : "2rem",
|
|
739
740
|
transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
|
|
740
741
|
aspectRatio: 1
|
|
741
742
|
},
|
|
742
|
-
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
743
|
-
|
|
743
|
+
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
|
|
744
|
+
Ne,
|
|
744
745
|
{
|
|
745
746
|
src: e == null ? void 0 : e.picture,
|
|
746
747
|
sx: {
|
|
747
748
|
width: "100%",
|
|
748
749
|
height: "100%",
|
|
749
|
-
bgcolor: Ge[Math.abs(
|
|
750
|
+
bgcolor: Ge[Math.abs(Ln(e == null ? void 0 : e.name)) % Ge.length]
|
|
750
751
|
},
|
|
751
752
|
children: Ve(e == null ? void 0 : e.name)
|
|
752
753
|
}
|
|
753
|
-
) }) : /* @__PURE__ */ o(
|
|
754
|
+
) }) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
|
|
754
755
|
}
|
|
755
756
|
),
|
|
756
757
|
i && /* @__PURE__ */ o(
|
|
757
|
-
|
|
758
|
+
k,
|
|
758
759
|
{
|
|
759
760
|
sx: {
|
|
760
761
|
width: n ? "5rem" : "2rem",
|
|
761
762
|
transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
|
|
762
763
|
aspectRatio: 1
|
|
763
764
|
},
|
|
764
|
-
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
765
|
+
children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ u(Me, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
|
|
765
766
|
" ",
|
|
766
767
|
Ve(e == null ? void 0 : e.name),
|
|
767
768
|
" ",
|
|
@@ -769,9 +770,9 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
769
770
|
] }) }) : /* @__PURE__ */ o(Me, {})
|
|
770
771
|
}
|
|
771
772
|
),
|
|
772
|
-
/* @__PURE__ */ o(
|
|
773
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
774
|
-
t ? /* @__PURE__ */ o(
|
|
773
|
+
/* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ut, { in: n, children: /* @__PURE__ */ u(k, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
774
|
+
e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "50%" }),
|
|
775
|
+
t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "25%" })
|
|
775
776
|
] }) }) })
|
|
776
777
|
]
|
|
777
778
|
}
|
|
@@ -784,38 +785,38 @@ function Rn({
|
|
|
784
785
|
"data-testid": i,
|
|
785
786
|
top: r,
|
|
786
787
|
middle: s,
|
|
787
|
-
bottom:
|
|
788
|
-
user:
|
|
789
|
-
domainCode:
|
|
790
|
-
useNewAvatar:
|
|
788
|
+
bottom: d,
|
|
789
|
+
user: c,
|
|
790
|
+
domainCode: l,
|
|
791
|
+
useNewAvatar: p = !1
|
|
791
792
|
}) {
|
|
792
|
-
const
|
|
793
|
-
return /* @__PURE__ */ o(
|
|
794
|
-
|
|
793
|
+
const g = vt(), m = dt(j);
|
|
794
|
+
return /* @__PURE__ */ o(Nn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
|
|
795
|
+
_n,
|
|
795
796
|
{
|
|
796
797
|
open: e,
|
|
797
798
|
widthOpen: n,
|
|
798
799
|
widthClosed: t,
|
|
799
800
|
anchor: "left",
|
|
800
|
-
variant:
|
|
801
|
+
variant: g ? "temporary" : "permanent",
|
|
801
802
|
PaperProps: {
|
|
802
803
|
component: "nav"
|
|
803
804
|
},
|
|
804
805
|
onClose: () => {
|
|
805
806
|
m(!1);
|
|
806
807
|
},
|
|
807
|
-
isSmallScreen:
|
|
808
|
+
isSmallScreen: g,
|
|
808
809
|
children: [
|
|
809
|
-
!
|
|
810
|
-
r && /* @__PURE__ */
|
|
810
|
+
!g && /* @__PURE__ */ o(zt, {}),
|
|
811
|
+
r && /* @__PURE__ */ u(k, { flexGrow: "0", children: [
|
|
811
812
|
r,
|
|
812
|
-
/* @__PURE__ */ o(
|
|
813
|
+
/* @__PURE__ */ o(_e, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
813
814
|
] }),
|
|
814
|
-
/* @__PURE__ */ o(
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */ o(
|
|
817
|
-
/* @__PURE__ */ o(Mn, { user:
|
|
818
|
-
|
|
815
|
+
/* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Fn, { links: s }) : s }),
|
|
816
|
+
/* @__PURE__ */ u(k, { flexGrow: "0", children: [
|
|
817
|
+
/* @__PURE__ */ o(_e, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
818
|
+
/* @__PURE__ */ o(Mn, { user: c, domainCode: l, open: e, useNewAvatar: p }),
|
|
819
|
+
d && /* @__PURE__ */ o(N, { children: d })
|
|
819
820
|
] })
|
|
820
821
|
]
|
|
821
822
|
}
|
|
@@ -828,14 +829,14 @@ function Hn({
|
|
|
828
829
|
noPadding: i
|
|
829
830
|
}) {
|
|
830
831
|
return /* @__PURE__ */ o(
|
|
831
|
-
|
|
832
|
+
k,
|
|
832
833
|
{
|
|
833
834
|
sx: {
|
|
834
835
|
overflow: "auto",
|
|
835
836
|
height: `calc(100vh - ${t}px)`,
|
|
836
837
|
flexGrow: 1
|
|
837
838
|
},
|
|
838
|
-
children: i ? /* @__PURE__ */ o(
|
|
839
|
+
children: i ? /* @__PURE__ */ o(k, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
839
840
|
et,
|
|
840
841
|
{
|
|
841
842
|
component: "main",
|
|
@@ -848,17 +849,17 @@ function Hn({
|
|
|
848
849
|
}
|
|
849
850
|
);
|
|
850
851
|
}
|
|
851
|
-
const Wn = "TopBar",
|
|
852
|
+
const Wn = "TopBar", Un = {
|
|
852
853
|
titleText: `${Wn}-titleText`
|
|
853
854
|
};
|
|
854
|
-
function
|
|
855
|
+
function zn({
|
|
855
856
|
titleText: e = "",
|
|
856
857
|
height: t,
|
|
857
858
|
"data-testid": n,
|
|
858
859
|
middle: i
|
|
859
860
|
}) {
|
|
860
|
-
const r = dt(j), s = () => r((
|
|
861
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
861
|
+
const r = dt(j), s = () => r((l) => !l), d = se(), c = vt();
|
|
862
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
|
|
862
863
|
je,
|
|
863
864
|
{
|
|
864
865
|
square: !0,
|
|
@@ -873,7 +874,7 @@ function Un({
|
|
|
873
874
|
gap: 2,
|
|
874
875
|
flexShrink: 0,
|
|
875
876
|
height: t,
|
|
876
|
-
zIndex:
|
|
877
|
+
zIndex: c ? 0 : d.zIndex.drawer + 101
|
|
877
878
|
},
|
|
878
879
|
children: [
|
|
879
880
|
/* @__PURE__ */ o(
|
|
@@ -886,62 +887,62 @@ function Un({
|
|
|
886
887
|
children: /* @__PURE__ */ o(en, { fontSize: "medium" })
|
|
887
888
|
}
|
|
888
889
|
),
|
|
889
|
-
/* @__PURE__ */ o(
|
|
890
|
+
/* @__PURE__ */ o(T, { className: Un.titleText, variant: "h6", component: "h1", children: e }),
|
|
890
891
|
i
|
|
891
892
|
]
|
|
892
893
|
}
|
|
893
894
|
) });
|
|
894
895
|
}
|
|
895
|
-
function
|
|
896
|
+
function Lo({
|
|
896
897
|
children: e,
|
|
897
898
|
initialTitleText: t,
|
|
898
899
|
initialNavBarOpen: n,
|
|
899
900
|
pageContainerProps: i,
|
|
900
901
|
pageContentDataTestId: r,
|
|
901
902
|
topBarDataTestId: s,
|
|
902
|
-
navBarDataTestId:
|
|
903
|
-
navBarMiddle:
|
|
904
|
-
navBarBottom:
|
|
905
|
-
user:
|
|
906
|
-
domainCode:
|
|
903
|
+
navBarDataTestId: d,
|
|
904
|
+
navBarMiddle: c,
|
|
905
|
+
navBarBottom: l,
|
|
906
|
+
user: p,
|
|
907
|
+
domainCode: g,
|
|
907
908
|
useNewAvatar: m = !1
|
|
908
909
|
}) {
|
|
909
910
|
pt([
|
|
910
911
|
[j, n != null ? n : !0],
|
|
911
912
|
[ve, t != null ? t : ""]
|
|
912
913
|
]);
|
|
913
|
-
const
|
|
914
|
-
return /* @__PURE__ */
|
|
914
|
+
const w = Le(j), [h] = V(wt), [S] = V(At), b = Le(ve), [D] = V(bt), [$] = V(Bn), [E] = V(St);
|
|
915
|
+
return /* @__PURE__ */ u(k, { children: [
|
|
915
916
|
/* @__PURE__ */ o(Gt, {}),
|
|
916
917
|
/* @__PURE__ */ o(
|
|
917
|
-
|
|
918
|
+
zn,
|
|
918
919
|
{
|
|
919
|
-
titleText:
|
|
920
|
+
titleText: b,
|
|
920
921
|
"data-testid": s,
|
|
921
922
|
height: D,
|
|
922
923
|
middle: $
|
|
923
924
|
}
|
|
924
925
|
),
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ u(k, { sx: { display: "flex" }, children: [
|
|
926
927
|
/* @__PURE__ */ o(
|
|
927
928
|
Rn,
|
|
928
929
|
{
|
|
929
|
-
open:
|
|
930
|
-
top:
|
|
931
|
-
middle:
|
|
932
|
-
bottom:
|
|
933
|
-
user:
|
|
934
|
-
domainCode:
|
|
930
|
+
open: w,
|
|
931
|
+
top: E,
|
|
932
|
+
middle: c,
|
|
933
|
+
bottom: l,
|
|
934
|
+
user: p,
|
|
935
|
+
domainCode: g,
|
|
935
936
|
widthOpen: h,
|
|
936
|
-
widthClosed:
|
|
937
|
+
widthClosed: S,
|
|
937
938
|
offsetTop: D,
|
|
938
|
-
"data-testid":
|
|
939
|
+
"data-testid": d,
|
|
939
940
|
useNewAvatar: m
|
|
940
941
|
}
|
|
941
942
|
),
|
|
942
943
|
/* @__PURE__ */ o(
|
|
943
944
|
Hn,
|
|
944
|
-
|
|
945
|
+
I(a({
|
|
945
946
|
"data-testid": r,
|
|
946
947
|
topBarHeight: D
|
|
947
948
|
}, i), {
|
|
@@ -951,53 +952,53 @@ function _o({
|
|
|
951
952
|
] })
|
|
952
953
|
] });
|
|
953
954
|
}
|
|
954
|
-
const
|
|
955
|
+
const Dt = ({
|
|
955
956
|
isOpen: e,
|
|
956
957
|
dialogTitle: t,
|
|
957
958
|
children: n,
|
|
958
959
|
maxWidth: i,
|
|
959
960
|
primaryButton: r,
|
|
960
961
|
secondaryButton: s,
|
|
961
|
-
onClose:
|
|
962
|
-
sx:
|
|
963
|
-
"data-testid":
|
|
964
|
-
disableCloseOnBackdropOrEscape:
|
|
965
|
-
isLoading:
|
|
962
|
+
onClose: d,
|
|
963
|
+
sx: c,
|
|
964
|
+
"data-testid": l,
|
|
965
|
+
disableCloseOnBackdropOrEscape: p = !1,
|
|
966
|
+
isLoading: g = !1
|
|
966
967
|
}) => {
|
|
967
|
-
var h,
|
|
968
|
-
const [m,
|
|
969
|
-
return /* @__PURE__ */
|
|
968
|
+
var h, S;
|
|
969
|
+
const [m, w] = F(!1);
|
|
970
|
+
return /* @__PURE__ */ u(
|
|
970
971
|
tt,
|
|
971
972
|
{
|
|
972
973
|
open: e,
|
|
973
|
-
onClose: (
|
|
974
|
-
|
|
974
|
+
onClose: (b, D) => _(void 0, null, function* () {
|
|
975
|
+
p && (D === "backdropClick" || D === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
|
|
975
976
|
}),
|
|
976
977
|
fullWidth: !0,
|
|
977
978
|
maxWidth: i != null ? i : "xs",
|
|
978
|
-
"data-testid":
|
|
979
|
-
sx:
|
|
979
|
+
"data-testid": l,
|
|
980
|
+
sx: c,
|
|
980
981
|
children: [
|
|
981
|
-
|
|
982
|
+
g && /* @__PURE__ */ o(nt, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
982
983
|
/* @__PURE__ */ o(ot, { children: t }),
|
|
983
984
|
/* @__PURE__ */ o(it, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
985
986
|
/* @__PURE__ */ o(
|
|
986
987
|
J,
|
|
987
988
|
{
|
|
988
|
-
onClick: (h = s == null ? void 0 : s.onClick) != null ? h :
|
|
989
|
+
onClick: (h = s == null ? void 0 : s.onClick) != null ? h : d,
|
|
989
990
|
"data-testid": s == null ? void 0 : s.testId,
|
|
990
991
|
disabled: (s == null ? void 0 : s.disabled) || m,
|
|
991
992
|
color: s == null ? void 0 : s.buttonColor,
|
|
992
|
-
children: (
|
|
993
|
+
children: (S = s == null ? void 0 : s.text) != null ? S : "Cancel"
|
|
993
994
|
}
|
|
994
995
|
),
|
|
995
996
|
r && /* @__PURE__ */ o(
|
|
996
997
|
J,
|
|
997
998
|
{
|
|
998
|
-
onClick: () =>
|
|
999
|
-
var
|
|
1000
|
-
|
|
999
|
+
onClick: () => _(void 0, null, function* () {
|
|
1000
|
+
var b;
|
|
1001
|
+
w(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), w(!1);
|
|
1001
1002
|
}),
|
|
1002
1003
|
"data-testid": r.testId,
|
|
1003
1004
|
disabled: r.disabled || m,
|
|
@@ -1009,7 +1010,7 @@ const kt = ({
|
|
|
1009
1010
|
]
|
|
1010
1011
|
}
|
|
1011
1012
|
);
|
|
1012
|
-
},
|
|
1013
|
+
}, kt = ({
|
|
1013
1014
|
minLength: e,
|
|
1014
1015
|
preLoadedOptions: t,
|
|
1015
1016
|
lookup: n,
|
|
@@ -1022,94 +1023,94 @@ const kt = ({
|
|
|
1022
1023
|
queryKey: ["autocomplete", i, r]
|
|
1023
1024
|
});
|
|
1024
1025
|
function Mo({
|
|
1025
|
-
lookup: e = () =>
|
|
1026
|
+
lookup: e = () => _(this, null, function* () {
|
|
1026
1027
|
}),
|
|
1027
1028
|
enableHighlighting: t = !0,
|
|
1028
1029
|
onChange: n,
|
|
1029
1030
|
minLength: i = 0,
|
|
1030
1031
|
label: r,
|
|
1031
1032
|
value: s,
|
|
1032
|
-
"data-testid":
|
|
1033
|
-
sx:
|
|
1034
|
-
boxSx:
|
|
1035
|
-
textFieldColor:
|
|
1036
|
-
textFieldVariant:
|
|
1033
|
+
"data-testid": d,
|
|
1034
|
+
sx: c,
|
|
1035
|
+
boxSx: l,
|
|
1036
|
+
textFieldColor: p,
|
|
1037
|
+
textFieldVariant: g = "filled",
|
|
1037
1038
|
loadingText: m = "Loading...",
|
|
1038
|
-
noOptionsText:
|
|
1039
|
+
noOptionsText: w = "No options",
|
|
1039
1040
|
popupIcon: h = /* @__PURE__ */ o(nn, {}),
|
|
1040
|
-
error:
|
|
1041
|
-
helperText:
|
|
1041
|
+
error: S = !1,
|
|
1042
|
+
helperText: b = "",
|
|
1042
1043
|
preLoadedOptions: D = void 0,
|
|
1043
1044
|
disablePortal: $ = !1,
|
|
1044
|
-
disableIconFlip:
|
|
1045
|
+
disableIconFlip: E = !1
|
|
1045
1046
|
}) {
|
|
1046
|
-
const [
|
|
1047
|
-
const x = s.filter((
|
|
1048
|
-
n(x, "delete",
|
|
1049
|
-
}, { data:
|
|
1050
|
-
inputValue:
|
|
1047
|
+
const [O, L] = F(""), P = (f, C) => {
|
|
1048
|
+
const x = s.filter((A) => A.id !== C);
|
|
1049
|
+
n(x, "delete", f);
|
|
1050
|
+
}, { data: v, isLoading: y } = kt({
|
|
1051
|
+
inputValue: O,
|
|
1051
1052
|
label: r,
|
|
1052
1053
|
lookup: e,
|
|
1053
1054
|
minLength: i,
|
|
1054
1055
|
preLoadedOptions: D
|
|
1055
|
-
}),
|
|
1056
|
-
return /* @__PURE__ */
|
|
1056
|
+
}), M = O.length >= i;
|
|
1057
|
+
return /* @__PURE__ */ u("div", { "data-testid": d, children: [
|
|
1057
1058
|
/* @__PURE__ */ o(
|
|
1058
|
-
|
|
1059
|
+
be,
|
|
1059
1060
|
{
|
|
1060
|
-
sx: a(a({},
|
|
1061
|
-
"data-testid":
|
|
1061
|
+
sx: a(a({}, c), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1062
|
+
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
1062
1063
|
disablePortal: $,
|
|
1063
1064
|
multiple: !0,
|
|
1064
|
-
getOptionLabel: (
|
|
1065
|
-
loading:
|
|
1066
|
-
options: [...s, ...
|
|
1065
|
+
getOptionLabel: (f) => typeof f == "string" ? f : f.label,
|
|
1066
|
+
loading: M ? y : !1,
|
|
1067
|
+
options: [...s, ...v != null ? v : []],
|
|
1067
1068
|
filterSelectedOptions: !0,
|
|
1068
1069
|
includeInputInList: !0,
|
|
1069
1070
|
value: s,
|
|
1070
|
-
onChange: (
|
|
1071
|
-
n(C, x,
|
|
1071
|
+
onChange: (f, C, x) => {
|
|
1072
|
+
n(C, x, f);
|
|
1072
1073
|
},
|
|
1073
|
-
onInputChange: (
|
|
1074
|
-
noOptionsText:
|
|
1074
|
+
onInputChange: (f, C) => L(C),
|
|
1075
|
+
noOptionsText: M ? w : "Start typing to search",
|
|
1075
1076
|
loadingText: m,
|
|
1076
1077
|
popupIcon: h,
|
|
1077
|
-
renderInput: (
|
|
1078
|
-
|
|
1079
|
-
|
|
1078
|
+
renderInput: (f) => /* @__PURE__ */ o(
|
|
1079
|
+
Se,
|
|
1080
|
+
I(a({}, f), {
|
|
1080
1081
|
label: r,
|
|
1081
1082
|
fullWidth: !0,
|
|
1082
|
-
variant:
|
|
1083
|
-
error:
|
|
1084
|
-
helperText:
|
|
1085
|
-
InputProps:
|
|
1086
|
-
endAdornment: /* @__PURE__ */
|
|
1087
|
-
|
|
1088
|
-
|
|
1083
|
+
variant: g,
|
|
1084
|
+
error: S,
|
|
1085
|
+
helperText: b,
|
|
1086
|
+
InputProps: I(a({}, f.InputProps), {
|
|
1087
|
+
endAdornment: /* @__PURE__ */ u(N, { children: [
|
|
1088
|
+
y ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
|
|
1089
|
+
f.InputProps.endAdornment
|
|
1089
1090
|
] })
|
|
1090
1091
|
}),
|
|
1091
|
-
"data-testid":
|
|
1092
|
+
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
|
|
1092
1093
|
onKeyDown: (C) => {
|
|
1093
1094
|
(C.key === "Backspace" || C.key === "Delete") && C.stopPropagation();
|
|
1094
1095
|
},
|
|
1095
|
-
color:
|
|
1096
|
+
color: p
|
|
1096
1097
|
})
|
|
1097
1098
|
),
|
|
1098
1099
|
renderTags: () => null,
|
|
1099
|
-
isOptionEqualToValue: (
|
|
1100
|
-
renderOption: (
|
|
1100
|
+
isOptionEqualToValue: (f, C) => f.id === C.id,
|
|
1101
|
+
renderOption: (f, C, x) => {
|
|
1101
1102
|
if (t) {
|
|
1102
|
-
const
|
|
1103
|
+
const A = rn(C.label, x.inputValue, {
|
|
1103
1104
|
insideWords: !0,
|
|
1104
1105
|
findAllOccurrences: !0
|
|
1105
|
-
}),
|
|
1106
|
+
}), H = an(C.label, A);
|
|
1106
1107
|
return /* @__PURE__ */ xe(
|
|
1107
1108
|
"li",
|
|
1108
|
-
|
|
1109
|
+
I(a({}, f), {
|
|
1109
1110
|
key: C.id,
|
|
1110
|
-
"data-testid":
|
|
1111
|
+
"data-testid": d ? `${d}:Autocomplete:option(${C.id.toString()})` : void 0
|
|
1111
1112
|
}),
|
|
1112
|
-
/* @__PURE__ */ o("div", { children:
|
|
1113
|
+
/* @__PURE__ */ o("div", { children: H.map((ee, le) => /* @__PURE__ */ o(
|
|
1113
1114
|
"span",
|
|
1114
1115
|
{
|
|
1115
1116
|
style: {
|
|
@@ -1123,16 +1124,16 @@ function Mo({
|
|
|
1123
1124
|
} else
|
|
1124
1125
|
return /* @__PURE__ */ xe(
|
|
1125
1126
|
"li",
|
|
1126
|
-
|
|
1127
|
+
I(a({}, f), {
|
|
1127
1128
|
key: C.id,
|
|
1128
|
-
"data-testid":
|
|
1129
|
+
"data-testid": d ? `${d}:option(${C.id.toString()})` : void 0
|
|
1129
1130
|
}),
|
|
1130
1131
|
C.label
|
|
1131
1132
|
);
|
|
1132
1133
|
}
|
|
1133
1134
|
}
|
|
1134
1135
|
),
|
|
1135
|
-
s.length > 0 && /* @__PURE__ */ o(
|
|
1136
|
+
s.length > 0 && /* @__PURE__ */ o(k, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
|
|
1136
1137
|
Vt,
|
|
1137
1138
|
{
|
|
1138
1139
|
sx: {
|
|
@@ -1143,7 +1144,7 @@ function Mo({
|
|
|
1143
1144
|
label: /* @__PURE__ */ o(
|
|
1144
1145
|
qt,
|
|
1145
1146
|
{
|
|
1146
|
-
title:
|
|
1147
|
+
title: f.tooltipContent || "",
|
|
1147
1148
|
placement: "bottom-start",
|
|
1148
1149
|
PopperProps: {
|
|
1149
1150
|
modifiers: [
|
|
@@ -1155,88 +1156,90 @@ function Mo({
|
|
|
1155
1156
|
}
|
|
1156
1157
|
]
|
|
1157
1158
|
},
|
|
1158
|
-
children: /* @__PURE__ */ o(
|
|
1159
|
+
children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: f.chipLabel ? f.chipLabel : f.label })
|
|
1159
1160
|
}
|
|
1160
1161
|
),
|
|
1161
|
-
"data-testid":
|
|
1162
|
-
onDelete: (C) =>
|
|
1162
|
+
"data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
|
|
1163
|
+
onDelete: (C) => P(C, f.id),
|
|
1163
1164
|
deleteIcon: /* @__PURE__ */ o(
|
|
1164
1165
|
tn,
|
|
1165
1166
|
{
|
|
1166
|
-
"data-testid":
|
|
1167
|
+
"data-testid": d ? `${d}:Chip(${f.id.toString()}):deleteIcon` : void 0
|
|
1167
1168
|
}
|
|
1168
1169
|
)
|
|
1169
1170
|
},
|
|
1170
|
-
|
|
1171
|
+
f.id
|
|
1171
1172
|
)) })
|
|
1172
1173
|
] });
|
|
1173
1174
|
}
|
|
1174
|
-
const Ro = ({
|
|
1175
|
-
lookup: e = () =>
|
|
1175
|
+
const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
|
|
1176
|
+
lookup: e = () => _(void 0, null, function* () {
|
|
1176
1177
|
}),
|
|
1177
1178
|
onChange: t,
|
|
1178
1179
|
label: n,
|
|
1179
1180
|
value: i,
|
|
1180
1181
|
sx: r,
|
|
1181
1182
|
textFieldColor: s,
|
|
1182
|
-
textFieldVariant:
|
|
1183
|
+
textFieldVariant: d = "filled",
|
|
1184
|
+
error: c = !1,
|
|
1183
1185
|
"data-testid": l,
|
|
1184
|
-
noOptionsText:
|
|
1185
|
-
minLength:
|
|
1186
|
-
disablePortal:
|
|
1187
|
-
preLoadedOptions:
|
|
1188
|
-
helperText:
|
|
1189
|
-
disabled:
|
|
1186
|
+
noOptionsText: p = "No options",
|
|
1187
|
+
minLength: g = 3,
|
|
1188
|
+
disablePortal: m = !1,
|
|
1189
|
+
preLoadedOptions: w,
|
|
1190
|
+
helperText: h = "",
|
|
1191
|
+
disabled: S,
|
|
1190
1192
|
popupIcon: b,
|
|
1191
|
-
disableIconFlip:
|
|
1193
|
+
disableIconFlip: D
|
|
1192
1194
|
}) => {
|
|
1193
|
-
const [
|
|
1194
|
-
inputValue:
|
|
1195
|
+
const [$, E] = F(""), { data: O, isLoading: L } = kt({
|
|
1196
|
+
inputValue: $,
|
|
1195
1197
|
label: n,
|
|
1196
1198
|
lookup: e,
|
|
1197
|
-
minLength:
|
|
1198
|
-
preLoadedOptions:
|
|
1199
|
-
}),
|
|
1199
|
+
minLength: g != null ? g : 0,
|
|
1200
|
+
preLoadedOptions: w
|
|
1201
|
+
}), P = $.length >= g;
|
|
1200
1202
|
return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(Xt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1201
|
-
|
|
1203
|
+
be,
|
|
1202
1204
|
{
|
|
1203
|
-
sx: a(a({}, r),
|
|
1205
|
+
sx: a(a({}, r), D ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1204
1206
|
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
1205
|
-
loading:
|
|
1206
|
-
options:
|
|
1207
|
-
onChange: (
|
|
1208
|
-
t(
|
|
1207
|
+
loading: P ? L : !1,
|
|
1208
|
+
options: O != null ? O : [],
|
|
1209
|
+
onChange: (v, y, M) => {
|
|
1210
|
+
t(v, y, M);
|
|
1209
1211
|
},
|
|
1210
|
-
disablePortal:
|
|
1211
|
-
filterOptions: (
|
|
1212
|
+
disablePortal: m,
|
|
1213
|
+
filterOptions: (v) => v,
|
|
1212
1214
|
value: i,
|
|
1213
|
-
noOptionsText:
|
|
1214
|
-
getOptionLabel: (
|
|
1215
|
+
noOptionsText: P ? p : "Start typing to search",
|
|
1216
|
+
getOptionLabel: (v) => v.label,
|
|
1215
1217
|
popupIcon: b,
|
|
1216
|
-
renderInput: (
|
|
1217
|
-
|
|
1218
|
-
|
|
1218
|
+
renderInput: (v) => /* @__PURE__ */ o(
|
|
1219
|
+
Se,
|
|
1220
|
+
I(a({
|
|
1219
1221
|
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
1220
|
-
},
|
|
1221
|
-
variant:
|
|
1222
|
+
}, v), {
|
|
1223
|
+
variant: d,
|
|
1222
1224
|
label: n,
|
|
1223
1225
|
color: s,
|
|
1224
|
-
|
|
1226
|
+
error: c,
|
|
1227
|
+
helperText: h
|
|
1225
1228
|
})
|
|
1226
1229
|
),
|
|
1227
|
-
isOptionEqualToValue: (
|
|
1228
|
-
onInputChange: (
|
|
1229
|
-
|
|
1230
|
+
isOptionEqualToValue: (v, y) => v.id === y.id,
|
|
1231
|
+
onInputChange: (v, y) => {
|
|
1232
|
+
E(y);
|
|
1230
1233
|
},
|
|
1231
|
-
renderOption: (
|
|
1234
|
+
renderOption: (v, y) => /* @__PURE__ */ xe(
|
|
1232
1235
|
"li",
|
|
1233
|
-
|
|
1234
|
-
key:
|
|
1235
|
-
"data-testid": l ? `${l}:Autocomplete:option(${
|
|
1236
|
+
I(a({}, v), {
|
|
1237
|
+
key: y.id,
|
|
1238
|
+
"data-testid": l ? `${l}:Autocomplete:option(${y.id.toString()})` : void 0
|
|
1236
1239
|
}),
|
|
1237
|
-
|
|
1240
|
+
y.label
|
|
1238
1241
|
),
|
|
1239
|
-
disabled:
|
|
1242
|
+
disabled: S
|
|
1240
1243
|
}
|
|
1241
1244
|
) }) });
|
|
1242
1245
|
}, Gn = (e) => {
|
|
@@ -1252,37 +1255,37 @@ const Ro = ({
|
|
|
1252
1255
|
} catch (t) {
|
|
1253
1256
|
return -1;
|
|
1254
1257
|
}
|
|
1255
|
-
},
|
|
1258
|
+
}, Wo = ({
|
|
1256
1259
|
open: e = !1,
|
|
1257
1260
|
closeHandler: t,
|
|
1258
1261
|
setAuth0ExpiryTime: n
|
|
1259
1262
|
}) => {
|
|
1260
|
-
const { logout: i, getAccessTokenSilently: r } = ht(), [s,
|
|
1263
|
+
const { logout: i, getAccessTokenSilently: r } = ht(), [s, d] = F(0), c = () => _(void 0, null, function* () {
|
|
1261
1264
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1262
|
-
}),
|
|
1263
|
-
|
|
1265
|
+
}), l = () => _(void 0, null, function* () {
|
|
1266
|
+
d(s + 1), t();
|
|
1264
1267
|
});
|
|
1265
1268
|
return K(() => {
|
|
1266
|
-
(() =>
|
|
1269
|
+
(() => _(void 0, null, function* () {
|
|
1267
1270
|
if (s > 0) {
|
|
1268
|
-
const
|
|
1271
|
+
const w = yield r({ cacheMode: "off" }), h = Gn(w) * 1e3;
|
|
1269
1272
|
n(h);
|
|
1270
1273
|
}
|
|
1271
1274
|
}))();
|
|
1272
1275
|
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1273
|
-
|
|
1276
|
+
Dt,
|
|
1274
1277
|
{
|
|
1275
1278
|
isOpen: e,
|
|
1276
1279
|
primaryButton: {
|
|
1277
1280
|
text: "Continue",
|
|
1278
|
-
onClick:
|
|
1281
|
+
onClick: l,
|
|
1279
1282
|
disabled: !1,
|
|
1280
1283
|
testId: "PreferencesDialog",
|
|
1281
1284
|
buttonColor: "secondary"
|
|
1282
1285
|
},
|
|
1283
1286
|
secondaryButton: {
|
|
1284
1287
|
text: "Log out",
|
|
1285
|
-
onClick:
|
|
1288
|
+
onClick: c,
|
|
1286
1289
|
disabled: !1,
|
|
1287
1290
|
testId: "PreferencesDialog",
|
|
1288
1291
|
buttonColor: "secondary"
|
|
@@ -1312,7 +1315,7 @@ function Qn(e) {
|
|
|
1312
1315
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1313
1316
|
return t === "access_denied" && n.match(/Script.*time.*exceeded/);
|
|
1314
1317
|
}
|
|
1315
|
-
function
|
|
1318
|
+
function Uo({
|
|
1316
1319
|
children: e,
|
|
1317
1320
|
appName: t = "the app",
|
|
1318
1321
|
throwErrors: n = "none",
|
|
@@ -1320,12 +1323,12 @@ function Wo({
|
|
|
1320
1323
|
onError: r = () => {
|
|
1321
1324
|
}
|
|
1322
1325
|
}) {
|
|
1323
|
-
var m,
|
|
1324
|
-
const { isAuthenticated: s, isLoading:
|
|
1326
|
+
var m, w;
|
|
1327
|
+
const { isAuthenticated: s, isLoading: d, error: c, loginWithRedirect: l, logout: p } = ht();
|
|
1325
1328
|
K(() => {
|
|
1326
|
-
|
|
1327
|
-
}, [
|
|
1328
|
-
const
|
|
1329
|
+
c && r(c);
|
|
1330
|
+
}, [c, r]);
|
|
1331
|
+
const g = Rt(
|
|
1329
1332
|
() => ({
|
|
1330
1333
|
appState: {
|
|
1331
1334
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1334,50 +1337,50 @@ function Wo({
|
|
|
1334
1337
|
[]
|
|
1335
1338
|
);
|
|
1336
1339
|
if (K(() => {
|
|
1337
|
-
|
|
1338
|
-
}, [
|
|
1340
|
+
d || s || c || l(g);
|
|
1341
|
+
}, [d, s, c, l, r, g]), c) {
|
|
1339
1342
|
if (i || console.error(
|
|
1340
|
-
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${
|
|
1341
|
-
|
|
1343
|
+
`Error detected in AuthGuard [isAuthenticated=${s},isLoading=${d}]`,
|
|
1344
|
+
c
|
|
1342
1345
|
), n === "all")
|
|
1343
|
-
throw
|
|
1344
|
-
if (Vn(
|
|
1345
|
-
let h = "Auth error",
|
|
1346
|
-
if (qn(
|
|
1347
|
-
h = "Unauthorised",
|
|
1348
|
-
else if (Xn(
|
|
1349
|
-
h = "App not authorised",
|
|
1350
|
-
else if (Qn(
|
|
1351
|
-
h = "Auth0 script execution time exceeded",
|
|
1352
|
-
else if (
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1346
|
+
throw c;
|
|
1347
|
+
if (Vn(c)) {
|
|
1348
|
+
let h = "Auth error", S = "An unknown Auth0 error occurred.";
|
|
1349
|
+
if (qn(c))
|
|
1350
|
+
h = "Unauthorised", S = `You are not authorised to access ${t}.`;
|
|
1351
|
+
else if (Xn(c))
|
|
1352
|
+
h = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1353
|
+
else if (Qn(c))
|
|
1354
|
+
h = "Auth0 script execution time exceeded", S = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
1355
|
+
else if (c.message === "Invalid state") {
|
|
1356
|
+
const b = localStorage.getItem("auth0_redirect_count");
|
|
1357
|
+
b ? b && parseInt(b) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(b) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
|
|
1355
1358
|
} else if (n === "unknown")
|
|
1356
|
-
throw
|
|
1357
|
-
return /* @__PURE__ */
|
|
1359
|
+
throw c;
|
|
1360
|
+
return /* @__PURE__ */ u(tt, { open: !0, children: [
|
|
1358
1361
|
/* @__PURE__ */ o(ot, { children: h }),
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */ o(
|
|
1362
|
+
/* @__PURE__ */ u(it, { children: [
|
|
1363
|
+
/* @__PURE__ */ o(T, { children: S }),
|
|
1361
1364
|
/* @__PURE__ */ o("br", {}),
|
|
1362
|
-
/* @__PURE__ */ o(
|
|
1363
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1366
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1364
1367
|
"error: ",
|
|
1365
|
-
(m =
|
|
1368
|
+
(m = c == null ? void 0 : c.error) != null ? m : "N/A"
|
|
1366
1369
|
] }),
|
|
1367
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ u(T, { variant: "body2", children: [
|
|
1368
1371
|
"description: ",
|
|
1369
|
-
(
|
|
1372
|
+
(w = c == null ? void 0 : c.error_description) != null ? w : "N/A"
|
|
1370
1373
|
] })
|
|
1371
1374
|
] }),
|
|
1372
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
1373
1376
|
h === "Auth0 script execution time exceeded" && /* @__PURE__ */ o(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
|
|
1374
|
-
/* @__PURE__ */ o(J, { onClick: () =>
|
|
1377
|
+
/* @__PURE__ */ o(J, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1375
1378
|
] })
|
|
1376
1379
|
] });
|
|
1377
1380
|
} else if (n === "unknown")
|
|
1378
|
-
throw
|
|
1381
|
+
throw c;
|
|
1379
1382
|
}
|
|
1380
|
-
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(
|
|
1383
|
+
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(un, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1381
1384
|
}
|
|
1382
1385
|
const Yn = {
|
|
1383
1386
|
autoHideDuration: 6e3,
|
|
@@ -1399,97 +1402,97 @@ const Yn = {
|
|
|
1399
1402
|
})(), jn = {
|
|
1400
1403
|
borderBottomLeftRadius: "0px",
|
|
1401
1404
|
borderBottomRightRadius: "0px"
|
|
1402
|
-
}, eo = {}, to = {},
|
|
1405
|
+
}, eo = {}, to = {}, yt = Je(null);
|
|
1403
1406
|
function no(s) {
|
|
1404
|
-
var
|
|
1407
|
+
var d = s, {
|
|
1405
1408
|
overrideState: e = eo,
|
|
1406
1409
|
overrideActions: t = to,
|
|
1407
1410
|
shouldClose: n = Kn.shouldClose,
|
|
1408
1411
|
children: i
|
|
1409
|
-
} =
|
|
1412
|
+
} = d, r = Be(d, [
|
|
1410
1413
|
"overrideState",
|
|
1411
1414
|
"overrideActions",
|
|
1412
1415
|
"shouldClose",
|
|
1413
1416
|
"children"
|
|
1414
1417
|
]);
|
|
1415
1418
|
var C;
|
|
1416
|
-
const [{ open:
|
|
1417
|
-
|
|
1419
|
+
const [{ open: c }, l] = F({ open: !1 }), p = ge([]), g = ge(Date.now()), m = ge(0), w = ae((x) => {
|
|
1420
|
+
l({ open: x });
|
|
1418
1421
|
}, []), h = ae((x = {}) => {
|
|
1419
|
-
m.current += 1,
|
|
1422
|
+
m.current += 1, p.current.length >= Xe && Date.now() - g.current >= Qe && (g.current = Date.now(), console.error(
|
|
1420
1423
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${m.current} times in last ${Qe}ms)`
|
|
1421
1424
|
), m.current = 0);
|
|
1422
|
-
const
|
|
1425
|
+
const A = a(I(a({}, qe), {
|
|
1423
1426
|
key: Zn()
|
|
1424
1427
|
}), x);
|
|
1425
|
-
return
|
|
1426
|
-
}, []),
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1429
|
-
return
|
|
1430
|
-
},
|
|
1431
|
-
n(x,
|
|
1432
|
-
},
|
|
1433
|
-
},
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
"autoHideDuration" in
|
|
1437
|
-
const
|
|
1438
|
-
open:
|
|
1439
|
-
setOpen:
|
|
1428
|
+
return p.current.push(A), p.current.length === 1 && l({ open: !0 }), A.key;
|
|
1429
|
+
}, []), S = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), b = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), D = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
|
|
1430
|
+
const A = p.current.findIndex((H) => H.key === x);
|
|
1431
|
+
if (A !== -1)
|
|
1432
|
+
return A === 0 ? (l({ open: !1 }), p.current[0]) : p.current.splice(A, 1);
|
|
1433
|
+
}, O = (x, A) => {
|
|
1434
|
+
n(x, A) && l({ open: !1 });
|
|
1435
|
+
}, L = () => {
|
|
1436
|
+
}, P = () => {
|
|
1437
|
+
p.current.shift(), p.current.length > 0 && l({ open: !0 });
|
|
1438
|
+
}, v = (C = p.current[0]) != null ? C : a({}, qe), y = {};
|
|
1439
|
+
"autoHideDuration" in v && (y.autoHideDuration = v.autoHideDuration);
|
|
1440
|
+
const M = a(a({}, Yn), r), f = a(a({
|
|
1441
|
+
open: c,
|
|
1442
|
+
setOpen: w,
|
|
1440
1443
|
enqueueNotification: h,
|
|
1441
|
-
enqueueSuccessNotification:
|
|
1442
|
-
enqueueInfoNotification:
|
|
1444
|
+
enqueueSuccessNotification: S,
|
|
1445
|
+
enqueueInfoNotification: b,
|
|
1443
1446
|
enqueueWarningNotification: D,
|
|
1444
1447
|
enqueueErrorNotification: $,
|
|
1445
|
-
removeNotification:
|
|
1448
|
+
removeNotification: E
|
|
1446
1449
|
}, e), t);
|
|
1447
|
-
return /* @__PURE__ */
|
|
1450
|
+
return /* @__PURE__ */ u(yt.Provider, { value: f, children: [
|
|
1448
1451
|
i,
|
|
1449
1452
|
/* @__PURE__ */ o(
|
|
1450
1453
|
Qt,
|
|
1451
|
-
|
|
1452
|
-
open:
|
|
1453
|
-
onClose:
|
|
1454
|
+
I(a(a({}, M), y), {
|
|
1455
|
+
open: c,
|
|
1456
|
+
onClose: O,
|
|
1454
1457
|
TransitionProps: {
|
|
1455
|
-
onExited:
|
|
1456
|
-
onExit:
|
|
1458
|
+
onExited: P,
|
|
1459
|
+
onExit: L
|
|
1457
1460
|
},
|
|
1458
1461
|
sx: { zIndex: Jn },
|
|
1459
|
-
children: /* @__PURE__ */
|
|
1462
|
+
children: /* @__PURE__ */ u("div", { children: [
|
|
1460
1463
|
/* @__PURE__ */ o(
|
|
1461
1464
|
Yt,
|
|
1462
1465
|
{
|
|
1463
|
-
onClose: (x) =>
|
|
1464
|
-
severity:
|
|
1466
|
+
onClose: (x) => O(x, "closeAlert"),
|
|
1467
|
+
severity: v.severity,
|
|
1465
1468
|
variant: "filled",
|
|
1466
|
-
icon:
|
|
1467
|
-
style:
|
|
1468
|
-
children:
|
|
1469
|
+
icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(Ie, { size: "1em" }) : void 0,
|
|
1470
|
+
style: v.progressIndicator === "linear" ? jn : void 0,
|
|
1471
|
+
children: v.message
|
|
1469
1472
|
}
|
|
1470
1473
|
),
|
|
1471
|
-
|
|
1474
|
+
v.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
|
|
1472
1475
|
] })
|
|
1473
1476
|
})
|
|
1474
1477
|
)
|
|
1475
1478
|
] });
|
|
1476
1479
|
}
|
|
1477
1480
|
function oo() {
|
|
1478
|
-
const e = Ze(
|
|
1481
|
+
const e = Ze(yt);
|
|
1479
1482
|
if (e === null)
|
|
1480
|
-
throw new
|
|
1483
|
+
throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1481
1484
|
return e;
|
|
1482
1485
|
}
|
|
1483
1486
|
const zo = Q(
|
|
1484
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no,
|
|
1485
|
-
), io = on(),
|
|
1487
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no, I(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1488
|
+
), io = on(), Go = ({
|
|
1486
1489
|
children: e,
|
|
1487
1490
|
store: t
|
|
1488
1491
|
}) => /* @__PURE__ */ o(ut, { store: t != null ? t : io, children: e }), $t = "domainCode";
|
|
1489
1492
|
var Ke;
|
|
1490
|
-
const Ye =
|
|
1493
|
+
const Ye = R(
|
|
1491
1494
|
JSON.parse((Ke = localStorage.getItem($t)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
1492
|
-
), Tt =
|
|
1495
|
+
), Tt = R(
|
|
1493
1496
|
(e) => e(Ye),
|
|
1494
1497
|
(e, t, n) => {
|
|
1495
1498
|
t(Ye, n), localStorage.setItem($t, JSON.stringify({ domainCode: n }));
|
|
@@ -1509,7 +1512,7 @@ const Ye = M(
|
|
|
1509
1512
|
}, ao = (e) => {
|
|
1510
1513
|
var t;
|
|
1511
1514
|
return e === null ? "N/A" : (t = ro[e]) != null ? t : "";
|
|
1512
|
-
},
|
|
1515
|
+
}, Vo = ({
|
|
1513
1516
|
isLoading: e,
|
|
1514
1517
|
isOpen: t,
|
|
1515
1518
|
onClose: n,
|
|
@@ -1517,53 +1520,53 @@ const Ye = M(
|
|
|
1517
1520
|
applicationName: r,
|
|
1518
1521
|
handleLogout: s
|
|
1519
1522
|
}) => {
|
|
1520
|
-
const [
|
|
1521
|
-
|
|
1522
|
-
}),
|
|
1523
|
-
|
|
1523
|
+
const [d, c] = V(Tt), [l, p] = F(d), { enqueueSuccessNotification: g } = oo(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, S = () => _(void 0, null, function* () {
|
|
1524
|
+
l ? (c(l), g(`Set organisation to ${l}`), n()) : c("");
|
|
1525
|
+
}), b = () => _(void 0, null, function* () {
|
|
1526
|
+
d && !m && !w ? (p(d), n()) : h && s();
|
|
1524
1527
|
});
|
|
1525
1528
|
let D;
|
|
1526
|
-
return m ? D = "Unable to retrieve your active organisations. Try logging in again." :
|
|
1527
|
-
|
|
1529
|
+
return m ? D = "Unable to retrieve your active organisations. Try logging in again." : w && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
|
|
1530
|
+
Dt,
|
|
1528
1531
|
{
|
|
1529
1532
|
isOpen: t,
|
|
1530
1533
|
dialogTitle: "Select an organisation",
|
|
1531
1534
|
primaryButton: {
|
|
1532
1535
|
text: "Confirm",
|
|
1533
|
-
onClick:
|
|
1534
|
-
disabled: !
|
|
1536
|
+
onClick: S,
|
|
1537
|
+
disabled: !l || m || w,
|
|
1535
1538
|
buttonColor: "primary"
|
|
1536
1539
|
},
|
|
1537
1540
|
secondaryButton: {
|
|
1538
1541
|
text: h ? "Logout" : "Cancel",
|
|
1539
|
-
onClick:
|
|
1542
|
+
onClick: b
|
|
1540
1543
|
},
|
|
1541
1544
|
onClose: h ? () => {
|
|
1542
1545
|
} : n,
|
|
1543
1546
|
children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1547
|
+
/* @__PURE__ */ u(T, { marginBottom: 2, children: [
|
|
1545
1548
|
"Select the default organisation that you want to use with the ",
|
|
1546
1549
|
r,
|
|
1547
1550
|
"."
|
|
1548
1551
|
] }),
|
|
1549
1552
|
/* @__PURE__ */ o(
|
|
1550
|
-
|
|
1553
|
+
be,
|
|
1551
1554
|
{
|
|
1552
1555
|
loading: e,
|
|
1553
1556
|
multiple: !1,
|
|
1554
1557
|
disableClearable: !1,
|
|
1555
|
-
value:
|
|
1556
|
-
onChange: ($,
|
|
1558
|
+
value: l !== "" ? l : null,
|
|
1559
|
+
onChange: ($, E) => p(E != null ? E : ""),
|
|
1557
1560
|
getOptionLabel: ao,
|
|
1558
1561
|
options: [...i],
|
|
1559
1562
|
renderInput: ($) => /* @__PURE__ */ o(
|
|
1560
|
-
|
|
1561
|
-
|
|
1563
|
+
Se,
|
|
1564
|
+
I(a({}, $), {
|
|
1562
1565
|
variant: "filled",
|
|
1563
1566
|
label: "Select organisation",
|
|
1564
|
-
InputProps:
|
|
1565
|
-
endAdornment: /* @__PURE__ */
|
|
1566
|
-
e ? /* @__PURE__ */ o(
|
|
1567
|
+
InputProps: I(a({}, $.InputProps), {
|
|
1568
|
+
endAdornment: /* @__PURE__ */ u(N, { children: [
|
|
1569
|
+
e ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1567
1570
|
$.InputProps.endAdornment
|
|
1568
1571
|
] })
|
|
1569
1572
|
})
|
|
@@ -1575,7 +1578,7 @@ const Ye = M(
|
|
|
1575
1578
|
]
|
|
1576
1579
|
}
|
|
1577
1580
|
);
|
|
1578
|
-
},
|
|
1581
|
+
}, qo = at({
|
|
1579
1582
|
palette: {
|
|
1580
1583
|
primary: {
|
|
1581
1584
|
dark: "#00A651",
|
|
@@ -1626,7 +1629,7 @@ const Ye = M(
|
|
|
1626
1629
|
navBar: {
|
|
1627
1630
|
backgroundColor: "#E8E8E8"
|
|
1628
1631
|
}
|
|
1629
|
-
}),
|
|
1632
|
+
}), Xo = at({
|
|
1630
1633
|
palette: {
|
|
1631
1634
|
primary: {
|
|
1632
1635
|
main: "#007236",
|
|
@@ -1726,12 +1729,12 @@ const Ye = M(
|
|
|
1726
1729
|
navBarWidthOpen: wt,
|
|
1727
1730
|
navBarWidthClosed: At,
|
|
1728
1731
|
titleText: ve,
|
|
1729
|
-
topBarHeight:
|
|
1730
|
-
navBarTop:
|
|
1731
|
-
},
|
|
1732
|
+
topBarHeight: bt,
|
|
1733
|
+
navBarTop: St
|
|
1734
|
+
}, Qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), lo = ({
|
|
1732
1735
|
initialValues: e,
|
|
1733
1736
|
children: t
|
|
1734
|
-
}) => (pt(e), /* @__PURE__ */ o(
|
|
1737
|
+
}) => (pt(e), /* @__PURE__ */ o(N, { children: t })), Yo = Q(
|
|
1735
1738
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1736
1739
|
lo,
|
|
1737
1740
|
{
|
|
@@ -1744,53 +1747,54 @@ const Ye = M(
|
|
|
1744
1747
|
children: t
|
|
1745
1748
|
}
|
|
1746
1749
|
)
|
|
1747
|
-
),
|
|
1750
|
+
), Ko = Q(() => ({ children: e }) => {
|
|
1748
1751
|
const t = new ln();
|
|
1749
1752
|
return /* @__PURE__ */ o(cn, { client: t, children: e });
|
|
1750
1753
|
});
|
|
1751
1754
|
export {
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1755
|
+
Dt as AgDialog,
|
|
1756
|
+
Lo as AppLayout,
|
|
1757
|
+
Go as AtomProvider,
|
|
1758
|
+
Uo as AuthGuard,
|
|
1759
|
+
yt as Context,
|
|
1760
|
+
De as ContextError,
|
|
1761
|
+
Vo as DomainCodeDialog,
|
|
1762
|
+
Eo as ExampleComponent,
|
|
1760
1763
|
Mo as FetchAutocomplete,
|
|
1761
1764
|
lo as HydrateAtoms,
|
|
1765
|
+
Ro as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1762
1766
|
ft as NAVBAR_WIDTH_CLOSED,
|
|
1763
1767
|
gt as NAVBAR_WIDTH_OPENED,
|
|
1764
|
-
|
|
1768
|
+
Po as NavBar,
|
|
1765
1769
|
Fo as NavBarDarkStyledList,
|
|
1766
|
-
|
|
1770
|
+
No as NavBarLightStyledList,
|
|
1767
1771
|
xn as NavBarProvider,
|
|
1768
|
-
|
|
1772
|
+
_o as PageLayout,
|
|
1769
1773
|
no as SaladBarProvider,
|
|
1770
|
-
|
|
1771
|
-
|
|
1774
|
+
Wo as SessionExpiryDialog,
|
|
1775
|
+
Ho as SingleAutocomplete,
|
|
1772
1776
|
io as atomStore,
|
|
1773
1777
|
wn as buildNavBarState,
|
|
1774
1778
|
Tt as domainCodeAtom,
|
|
1775
|
-
|
|
1779
|
+
qo as fed21Theme,
|
|
1776
1780
|
Gn as getAuth0Expiry,
|
|
1777
|
-
|
|
1781
|
+
Xo as internalAgSystemsTheme,
|
|
1778
1782
|
q as navBarClasses,
|
|
1779
1783
|
j as navBarOpenAtom,
|
|
1780
|
-
|
|
1784
|
+
St as navBarTopAtom,
|
|
1781
1785
|
At as navBarWidthClosedAtom,
|
|
1782
1786
|
wt as navBarWidthOpenAtom,
|
|
1783
1787
|
ve as titleTextAtom,
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1788
|
+
bt as topBarHeightAtom,
|
|
1789
|
+
Bn as topBarMiddleAtom,
|
|
1790
|
+
kt as useAutocompleteOptions,
|
|
1787
1791
|
vn as useNavBar,
|
|
1788
1792
|
oo as useSaladBar,
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1793
|
+
Qo as withAtomProvider,
|
|
1794
|
+
Bo as withBrowserRouter,
|
|
1795
|
+
Oo as withNavBarProvider,
|
|
1796
|
+
Yo as withOverrideDefaults,
|
|
1797
|
+
Ko as withQueryClient,
|
|
1794
1798
|
zo as withSaladBarProvider
|
|
1795
1799
|
};
|
|
1796
1800
|
//# sourceMappingURL=index.js.map
|