@australiangreens/ag-internal-components 0.0.89 → 0.0.90
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/FetchAutocomplete/FetchAutocomplete.d.ts +2 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/esm/index.js +419 -418
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
var Pt = Object.defineProperty, Nt = Object.defineProperties;
|
|
2
2
|
var Lt = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var Te = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
3
|
+
var ee = Object.getOwnPropertySymbols;
|
|
4
|
+
var Te = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var he = (e, t, n) => t in e ? Pt(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
|
-
Te.call(t, n) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
Te.call(t, n) && he(e, n, t[n]);
|
|
8
|
+
if (ee)
|
|
9
|
+
for (var n of ee(t))
|
|
10
|
+
Be.call(t, n) && he(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, S = (e, t) => Nt(e, Lt(t));
|
|
13
|
-
var
|
|
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
|
-
if (e != null &&
|
|
18
|
-
for (var i of
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
17
|
+
if (e != null && ee)
|
|
18
|
+
for (var i of ee(e))
|
|
19
|
+
t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
22
|
+
var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
+
var P = (e, t, n) => new Promise((i, r) => {
|
|
24
|
+
var s = (l) => {
|
|
25
25
|
try {
|
|
26
26
|
d(n.next(l));
|
|
27
27
|
} catch (u) {
|
|
@@ -33,34 +33,34 @@ var N = (e, t, n) => new Promise((i, r) => {
|
|
|
33
33
|
} catch (u) {
|
|
34
34
|
r(u);
|
|
35
35
|
}
|
|
36
|
-
}, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(
|
|
36
|
+
}, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, c);
|
|
37
37
|
d((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as E, createContext as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as h, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as E, createContext as Ye, useCallback as oe, useContext as Ke, useEffect as ie, createElement as xe, useRef as ge } from "react";
|
|
41
|
+
import { Typography as F, Button as re, Paper as Je, Box as $, Drawer as we, styled as Ae, IconButton as Y, Container as Ze, useTheme as se, useMediaQuery as _t, Collapse as Mt, Avatar as Pe, Fade as Rt, Skeleton as Ne, Toolbar as Ht, Divider as Le, CssBaseline as Wt, Dialog as je, LinearProgress as et, DialogTitle as tt, DialogContent as nt, DialogActions as ot, Autocomplete as be, TextField as Se, CircularProgress as ke, Chip as zt, Tooltip as Ut, Stack 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 M, createTheme as it, alpha as fe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Yt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as X } from "souvlaki";
|
|
46
46
|
import { BrowserRouter as Kt } from "react-router-dom";
|
|
47
|
-
import
|
|
48
|
-
import { ArrowForward as
|
|
49
|
-
import { atom as
|
|
50
|
-
import { useHydrateAtoms as
|
|
47
|
+
import rt from "@mui/material/List";
|
|
48
|
+
import { ArrowForward as at, ArrowBack as st, ViewHeadline as Jt, Cancel as Zt, ArrowDropDown as jt } from "@mui/icons-material";
|
|
49
|
+
import { atom as L, useSetAtom as lt, useAtomValue as _e, useAtom as V, getDefaultStore as en, Provider as ct } from "jotai";
|
|
50
|
+
import { useHydrateAtoms as dt } from "jotai/utils";
|
|
51
51
|
import tn from "autosuggest-highlight/match";
|
|
52
52
|
import nn from "autosuggest-highlight/parse";
|
|
53
53
|
import { useQuery as on, QueryClient as rn, QueryClientProvider as an } from "@tanstack/react-query";
|
|
54
|
-
import { useAuth0 as
|
|
54
|
+
import { useAuth0 as ut } from "@auth0/auth0-react";
|
|
55
55
|
import { Buffer as sn } from "buffer";
|
|
56
56
|
import ln from "@mui/material/Skeleton";
|
|
57
57
|
function $o({ text: e }) {
|
|
58
58
|
const [t, n] = E(0);
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */ o(
|
|
61
|
-
/* @__PURE__ */ o(
|
|
59
|
+
return /* @__PURE__ */ h(N, { children: [
|
|
60
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
61
|
+
/* @__PURE__ */ o(F, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
62
|
/* @__PURE__ */ o(
|
|
63
|
-
|
|
63
|
+
re,
|
|
64
64
|
{
|
|
65
65
|
variant: "outlined",
|
|
66
66
|
onClick: () => n((i) => i + 1),
|
|
@@ -68,17 +68,17 @@ function $o({ text: e }) {
|
|
|
68
68
|
children: "Hello I am a button"
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ h("p", { children: [
|
|
72
72
|
"This is some text: ",
|
|
73
73
|
/* @__PURE__ */ o("span", { children: e })
|
|
74
74
|
] }),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ h(Je, { children: [
|
|
76
76
|
"This number will incremember when button pressed: ",
|
|
77
77
|
t
|
|
78
78
|
] })
|
|
79
79
|
] });
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const pt = 330, ht = 73, U = "Navbar", q = {
|
|
82
82
|
root: `${U}-root`,
|
|
83
83
|
menuButton: `${U}-menuButton`,
|
|
84
84
|
hide: `${U}-hide`,
|
|
@@ -86,7 +86,7 @@ const ut = 330, pt = 73, U = "Navbar", q = {
|
|
|
86
86
|
userInfoHolder: `${U}-userInfoHolder`,
|
|
87
87
|
settings: `${U}-settings`,
|
|
88
88
|
pieChartIcon: `${U}-pieChartIcon`
|
|
89
|
-
}, cn =
|
|
89
|
+
}, cn = M($, {
|
|
90
90
|
name: "NavBar"
|
|
91
91
|
})(({ theme: e }) => ({
|
|
92
92
|
[`&.${q.root}`]: {
|
|
@@ -107,7 +107,7 @@ const ut = 330, pt = 73, U = "Navbar", q = {
|
|
|
107
107
|
marginTop: "64px",
|
|
108
108
|
marginBottom: "16px"
|
|
109
109
|
}
|
|
110
|
-
})),
|
|
110
|
+
})), gt = () => ({
|
|
111
111
|
position: "absolute",
|
|
112
112
|
height: "100%",
|
|
113
113
|
overflowX: "hidden",
|
|
@@ -115,14 +115,14 @@ const ut = 330, pt = 73, U = "Navbar", q = {
|
|
|
115
115
|
color: "white",
|
|
116
116
|
backgroundColor: "black"
|
|
117
117
|
// backgroundColor: '#e8e8e8',
|
|
118
|
-
}), dn = () =>
|
|
119
|
-
width: ut
|
|
120
|
-
}, ht()), un = () => s({
|
|
118
|
+
}), dn = () => a({
|
|
121
119
|
width: pt
|
|
122
|
-
},
|
|
120
|
+
}, gt()), un = () => a({
|
|
121
|
+
width: ht
|
|
122
|
+
}, gt()), pn = M(we, {
|
|
123
123
|
shouldForwardProp: (e) => e !== "open"
|
|
124
|
-
})(({ theme: e, open: t }) =>
|
|
125
|
-
width: t ?
|
|
124
|
+
})(({ theme: e, open: t }) => a(a({
|
|
125
|
+
width: t ? pt : ht,
|
|
126
126
|
flexShrink: 0,
|
|
127
127
|
whiteSpace: "nowrap",
|
|
128
128
|
boxSizing: "border-box",
|
|
@@ -132,34 +132,34 @@ const ut = 330, pt = 73, U = "Navbar", q = {
|
|
|
132
132
|
}), !t && {
|
|
133
133
|
"& .MuiDrawer-paper": un()
|
|
134
134
|
}));
|
|
135
|
-
class
|
|
135
|
+
class De extends Yt {
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
const
|
|
137
|
+
Fe(De, "errorName", "ContextError");
|
|
138
|
+
const ft = Ye(null), hn = {}, gn = {}, fn = ({
|
|
139
139
|
overrideState: e = hn,
|
|
140
140
|
overrideActions: t = gn,
|
|
141
141
|
children: n
|
|
142
142
|
}) => {
|
|
143
|
-
const [{ open: i }, r] = E({ open: !0 }),
|
|
143
|
+
const [{ open: i }, r] = E({ open: !0 }), s = oe((l) => {
|
|
144
144
|
r({ open: l });
|
|
145
|
-
}, []), c =
|
|
146
|
-
r((l) => S(
|
|
147
|
-
}, []), d =
|
|
145
|
+
}, []), c = oe(() => {
|
|
146
|
+
r((l) => S(a({}, l), { open: !l.open }));
|
|
147
|
+
}, []), d = a(a({
|
|
148
148
|
open: i,
|
|
149
|
-
setOpen:
|
|
149
|
+
setOpen: s,
|
|
150
150
|
toggleOpen: c
|
|
151
151
|
}, e), t);
|
|
152
|
-
return /* @__PURE__ */ o(
|
|
152
|
+
return /* @__PURE__ */ o(ft.Provider, { value: d, children: n });
|
|
153
153
|
}, mn = () => {
|
|
154
|
-
const e =
|
|
154
|
+
const e = Ke(ft);
|
|
155
155
|
if (e === null)
|
|
156
|
-
throw new
|
|
156
|
+
throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
157
157
|
return e;
|
|
158
|
-
}, Cn = (e = {}) =>
|
|
158
|
+
}, Cn = (e = {}) => a({
|
|
159
159
|
open: !0
|
|
160
160
|
}, e), Io = X(
|
|
161
161
|
(e = Cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(fn, { overrideState: e, overrideActions: t, children: n })
|
|
162
|
-
),
|
|
162
|
+
), Oo = X(() => ({ children: e }) => /* @__PURE__ */ o(Kt, { children: e })), Me = 7, To = M(rt)(({ theme: e }) => ({
|
|
163
163
|
backgroundColor: "black",
|
|
164
164
|
color: "white",
|
|
165
165
|
"& .MuiListItem-root": {
|
|
@@ -168,7 +168,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
|
|
|
168
168
|
"& .MuiListItemButton-root": {
|
|
169
169
|
" .MuiListItemIcon-root": {
|
|
170
170
|
color: "white",
|
|
171
|
-
padding: `${
|
|
171
|
+
padding: `${Me}px`
|
|
172
172
|
},
|
|
173
173
|
// Focus state
|
|
174
174
|
"&.Mui-focusVisible": {
|
|
@@ -179,7 +179,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
|
|
|
179
179
|
borderLeftStyle: "solid",
|
|
180
180
|
borderLeftWidth: "7px",
|
|
181
181
|
borderLeftColor: e.palette.primary.main,
|
|
182
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
182
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
|
|
183
183
|
},
|
|
184
184
|
// Hover state
|
|
185
185
|
"&:hover": {
|
|
@@ -197,7 +197,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
|
|
|
197
197
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
198
198
|
// },
|
|
199
199
|
}
|
|
200
|
-
})),
|
|
200
|
+
})), Re = 7, Bo = M(rt)(({ theme: e }) => ({
|
|
201
201
|
backgroundColor: "#e8e8e8",
|
|
202
202
|
color: "inherit",
|
|
203
203
|
"& .MuiListItem-root": {
|
|
@@ -206,7 +206,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
|
|
|
206
206
|
"& .MuiListItemButton-root": {
|
|
207
207
|
" .MuiListItemIcon-root": {
|
|
208
208
|
color: "inherit",
|
|
209
|
-
padding: `${
|
|
209
|
+
padding: `${Re}px`
|
|
210
210
|
},
|
|
211
211
|
// Focus state
|
|
212
212
|
"&.Mui-focusVisible": {
|
|
@@ -217,7 +217,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
|
|
|
217
217
|
borderLeftStyle: "solid",
|
|
218
218
|
borderLeftWidth: "7px",
|
|
219
219
|
borderLeftColor: e.palette.primary.main,
|
|
220
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
220
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Re}px)`
|
|
221
221
|
},
|
|
222
222
|
// Hover state
|
|
223
223
|
"&:hover": {
|
|
@@ -241,7 +241,7 @@ function Eo({
|
|
|
241
241
|
children: t
|
|
242
242
|
}) {
|
|
243
243
|
const { open: n } = mn();
|
|
244
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ h(cn, { className: q.root, "data-testid": e, children: [
|
|
245
245
|
/* @__PURE__ */ o(Qt, {}),
|
|
246
246
|
/* @__PURE__ */ o(
|
|
247
247
|
pn,
|
|
@@ -262,7 +262,7 @@ const xn = 24, vn = 64, G = "TopBar", B = {
|
|
|
262
262
|
titleText: `${G}-titleText`,
|
|
263
263
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
264
264
|
rightPanelButton: `${G}-leftPanelButton`
|
|
265
|
-
}, wn =
|
|
265
|
+
}, wn = Ae("div", {
|
|
266
266
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
267
267
|
name: G
|
|
268
268
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -280,7 +280,7 @@ const xn = 24, vn = 64, G = "TopBar", B = {
|
|
|
280
280
|
padding: e.spacing(0, 3),
|
|
281
281
|
width: "100%"
|
|
282
282
|
},
|
|
283
|
-
[`& .${B.titleSlider}`]:
|
|
283
|
+
[`& .${B.titleSlider}`]: a(a({
|
|
284
284
|
height: "100%",
|
|
285
285
|
display: "flex",
|
|
286
286
|
alignItems: "center",
|
|
@@ -320,10 +320,10 @@ function An({
|
|
|
320
320
|
rightPanel: n,
|
|
321
321
|
"data-testid": i
|
|
322
322
|
}) {
|
|
323
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ h(wn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
324
324
|
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
325
|
-
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */
|
|
326
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ h($, { className: B.titleSlider, children: [
|
|
326
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
|
|
327
327
|
Y,
|
|
328
328
|
{
|
|
329
329
|
className: B.leftPanelButton,
|
|
@@ -334,12 +334,12 @@ function An({
|
|
|
334
334
|
size: "large",
|
|
335
335
|
children: [
|
|
336
336
|
" ",
|
|
337
|
-
/* @__PURE__ */ o(
|
|
337
|
+
/* @__PURE__ */ o(at, {})
|
|
338
338
|
]
|
|
339
339
|
}
|
|
340
340
|
),
|
|
341
|
-
/* @__PURE__ */ o(
|
|
342
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ o(F, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
342
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
|
|
343
343
|
Y,
|
|
344
344
|
{
|
|
345
345
|
className: B.rightPanelButton,
|
|
@@ -350,14 +350,14 @@ function An({
|
|
|
350
350
|
size: "large",
|
|
351
351
|
children: [
|
|
352
352
|
" ",
|
|
353
|
-
/* @__PURE__ */ o(
|
|
353
|
+
/* @__PURE__ */ o(st, {})
|
|
354
354
|
]
|
|
355
355
|
}
|
|
356
356
|
)
|
|
357
357
|
] }) })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const mt = 400, bn = Ae(we, {
|
|
361
361
|
shouldForwardProp: (e) => (
|
|
362
362
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
363
363
|
![
|
|
@@ -371,9 +371,9 @@ const ft = 400, bn = we(ve, {
|
|
|
371
371
|
),
|
|
372
372
|
name: "SidePanelDrawer"
|
|
373
373
|
})(
|
|
374
|
-
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: r, navBarWidthClosed:
|
|
374
|
+
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: r, navBarWidthClosed: s }) => ({
|
|
375
375
|
width: e,
|
|
376
|
-
"& .MuiDrawer-paper":
|
|
376
|
+
"& .MuiDrawer-paper": a(a({
|
|
377
377
|
position: "absolute",
|
|
378
378
|
width: e,
|
|
379
379
|
boxSizing: "border-box",
|
|
@@ -381,15 +381,15 @@ const ft = 400, bn = we(ve, {
|
|
|
381
381
|
boxShadow: "0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"
|
|
382
382
|
}, t && {
|
|
383
383
|
opacity: "50%"
|
|
384
|
-
}), n === "left" &&
|
|
385
|
-
marginLeft: `${
|
|
384
|
+
}), n === "left" && a({
|
|
385
|
+
marginLeft: `${s}px`
|
|
386
386
|
}, i && {
|
|
387
387
|
marginLeft: `${r}px`
|
|
388
388
|
}))
|
|
389
389
|
})
|
|
390
|
-
), Sn =
|
|
390
|
+
), Sn = Ae($, {
|
|
391
391
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
392
|
-
})(({ theme: e, anchor: t }) => S(
|
|
392
|
+
})(({ theme: e, anchor: t }) => S(a({
|
|
393
393
|
display: "flex",
|
|
394
394
|
alignItems: "center",
|
|
395
395
|
padding: e.spacing(2)
|
|
@@ -407,25 +407,25 @@ const ft = 400, bn = we(ve, {
|
|
|
407
407
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
408
408
|
}
|
|
409
409
|
}));
|
|
410
|
-
function
|
|
410
|
+
function He({
|
|
411
411
|
children: e,
|
|
412
412
|
anchor: t = "left",
|
|
413
413
|
open: n,
|
|
414
414
|
onClose: i = () => {
|
|
415
415
|
},
|
|
416
416
|
titleText: r = "",
|
|
417
|
-
width:
|
|
417
|
+
width: s = mt,
|
|
418
418
|
showCloseArrow: c = !0,
|
|
419
419
|
debugOpacity: d = !1,
|
|
420
420
|
headerBoxProps: l = {},
|
|
421
421
|
onOpened: u,
|
|
422
422
|
onClosed: v,
|
|
423
|
-
"data-testid":
|
|
423
|
+
"data-testid": x,
|
|
424
424
|
navBarOpen: w = !1,
|
|
425
425
|
navBarWidthOpen: g = 0,
|
|
426
426
|
navBarWidthClosed: D = 0
|
|
427
427
|
}) {
|
|
428
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ h(
|
|
429
429
|
bn,
|
|
430
430
|
{
|
|
431
431
|
SlideProps: {
|
|
@@ -435,37 +435,37 @@ function Re({
|
|
|
435
435
|
variant: "persistent",
|
|
436
436
|
anchor: t,
|
|
437
437
|
open: n,
|
|
438
|
-
width:
|
|
438
|
+
width: s,
|
|
439
439
|
debugOpacity: d,
|
|
440
|
-
"data-testid":
|
|
440
|
+
"data-testid": x,
|
|
441
441
|
navBarOpen: w,
|
|
442
442
|
navBarWidthOpen: g,
|
|
443
443
|
navBarWidthClosed: D,
|
|
444
444
|
children: [
|
|
445
|
-
/* @__PURE__ */ o(Sn, S(
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
c && /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */ o(
|
|
445
|
+
/* @__PURE__ */ o(Sn, S(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ h(N, { children: [
|
|
446
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
447
|
+
c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
448
|
+
/* @__PURE__ */ o(st, { "data-testid": "arrowbackicon" }),
|
|
449
449
|
" "
|
|
450
450
|
] })
|
|
451
|
-
] }) : /* @__PURE__ */
|
|
452
|
-
c && /* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */ o(
|
|
451
|
+
] }) : /* @__PURE__ */ h(N, { children: [
|
|
452
|
+
c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
453
|
+
/* @__PURE__ */ o(at, {}),
|
|
454
454
|
" "
|
|
455
455
|
] }),
|
|
456
|
-
/* @__PURE__ */ o(
|
|
456
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
457
457
|
] }) })),
|
|
458
458
|
e
|
|
459
459
|
]
|
|
460
460
|
}
|
|
461
461
|
);
|
|
462
462
|
}
|
|
463
|
-
const kn =
|
|
463
|
+
const kn = M($, {
|
|
464
464
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
465
465
|
name: "PanelAwareMargins"
|
|
466
466
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
467
467
|
var i, r;
|
|
468
|
-
return
|
|
468
|
+
return a(a({
|
|
469
469
|
transition: e.transitions.create("margin", {
|
|
470
470
|
easing: e.transitions.easing.sharp,
|
|
471
471
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -483,22 +483,22 @@ const kn = H($, {
|
|
|
483
483
|
}),
|
|
484
484
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
485
485
|
});
|
|
486
|
-
}), Dn =
|
|
486
|
+
}), Dn = M(Ze, {
|
|
487
487
|
name: "PageContainer"
|
|
488
488
|
})(({ theme: e }) => ({
|
|
489
489
|
// Horizontal padding comes from the Container's gutter
|
|
490
490
|
paddingTop: e.spacing(3),
|
|
491
491
|
paddingBottom: e.spacing(3)
|
|
492
492
|
// TODO: Remove max width
|
|
493
|
-
})),
|
|
493
|
+
})), me = !1, Ce = !1, te = {
|
|
494
494
|
titleText: "",
|
|
495
495
|
flavour: "push",
|
|
496
|
-
width:
|
|
496
|
+
width: mt,
|
|
497
497
|
arrowButtons: "both",
|
|
498
498
|
startOpen: !1,
|
|
499
499
|
open: void 0,
|
|
500
500
|
onChangeOpen: void 0,
|
|
501
|
-
content: /* @__PURE__ */ o(
|
|
501
|
+
content: /* @__PURE__ */ o(N, {}),
|
|
502
502
|
onOpened: void 0,
|
|
503
503
|
onClosed: void 0,
|
|
504
504
|
dataTestId: void 0
|
|
@@ -509,143 +509,143 @@ function Fo({
|
|
|
509
509
|
leftPanel: n,
|
|
510
510
|
rightPanel: i,
|
|
511
511
|
sidePanelsAreMutuallyExclusive: r = !0,
|
|
512
|
-
debugOpacity:
|
|
512
|
+
debugOpacity: s = !1,
|
|
513
513
|
pageContainerProps: c,
|
|
514
514
|
pageContentDataTestId: d,
|
|
515
515
|
topBarDataTestId: l,
|
|
516
516
|
navBarOpen: u,
|
|
517
517
|
navBarWidthOpen: v,
|
|
518
|
-
navBarWidthClosed:
|
|
518
|
+
navBarWidthClosed: x
|
|
519
519
|
}) {
|
|
520
|
-
const [w, g] = E(
|
|
520
|
+
const [w, g] = E(me), [D, b] = E(Ce), [k, I] = E(me), [T, A] = E(Ce), y = n !== void 0, R = i !== void 0, {
|
|
521
521
|
titleText: O,
|
|
522
|
-
content:
|
|
523
|
-
flavour:
|
|
524
|
-
open:
|
|
525
|
-
onChangeOpen:
|
|
522
|
+
content: H,
|
|
523
|
+
flavour: W,
|
|
524
|
+
open: p,
|
|
525
|
+
onChangeOpen: f,
|
|
526
526
|
width: m,
|
|
527
|
-
arrowButtons:
|
|
527
|
+
arrowButtons: C,
|
|
528
528
|
startOpen: _,
|
|
529
|
-
onOpened:
|
|
530
|
-
onClosed:
|
|
529
|
+
onOpened: J,
|
|
530
|
+
onClosed: le,
|
|
531
531
|
dataTestId: It
|
|
532
|
-
} = n ?
|
|
533
|
-
titleText:
|
|
534
|
-
content:
|
|
535
|
-
flavour:
|
|
536
|
-
open:
|
|
537
|
-
onChangeOpen:
|
|
538
|
-
width:
|
|
539
|
-
arrowButtons:
|
|
540
|
-
startOpen:
|
|
532
|
+
} = n ? a(a({}, te), n) : a({}, te), {
|
|
533
|
+
titleText: Ot,
|
|
534
|
+
content: Tt,
|
|
535
|
+
flavour: ye,
|
|
536
|
+
open: ce,
|
|
537
|
+
onChangeOpen: $e,
|
|
538
|
+
width: de,
|
|
539
|
+
arrowButtons: Z,
|
|
540
|
+
startOpen: j,
|
|
541
541
|
onOpened: Bt,
|
|
542
542
|
onClosed: Et,
|
|
543
543
|
dataTestId: Ft
|
|
544
|
-
} = i ?
|
|
545
|
-
|
|
546
|
-
_ !==
|
|
547
|
-
}, [_]),
|
|
548
|
-
|
|
549
|
-
}, [
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
|
|
544
|
+
} = i ? a(a({}, te), i) : a({}, te);
|
|
545
|
+
ie(() => {
|
|
546
|
+
_ !== me && (g(_), I(_));
|
|
547
|
+
}, [_]), ie(() => {
|
|
548
|
+
j !== Ce && (b(j), A(j));
|
|
549
|
+
}, [j]);
|
|
550
|
+
const ue = p === void 0 ? w : p, pe = ce === void 0 ? D : ce, Ie = (z) => {
|
|
551
|
+
p === void 0 && (g(z), r && R && (z ? (b(!1), A(D)) : b(T))), f && f(z);
|
|
552
|
+
}, Oe = (z) => {
|
|
553
|
+
ce === void 0 && (b(z), r && y && (z ? (g(!1), I(w)) : g(k))), $e && $e(z);
|
|
554
554
|
};
|
|
555
|
-
return /* @__PURE__ */
|
|
555
|
+
return /* @__PURE__ */ h($, { children: [
|
|
556
556
|
y && /* @__PURE__ */ o(
|
|
557
|
-
|
|
557
|
+
He,
|
|
558
558
|
{
|
|
559
559
|
"data-testid": It,
|
|
560
560
|
anchor: "left",
|
|
561
|
-
open:
|
|
562
|
-
onClose: () =>
|
|
561
|
+
open: ue,
|
|
562
|
+
onClose: () => Ie(!1),
|
|
563
563
|
width: m,
|
|
564
564
|
titleText: O,
|
|
565
|
-
debugOpacity:
|
|
566
|
-
showCloseArrow:
|
|
567
|
-
onOpened:
|
|
568
|
-
onClosed:
|
|
565
|
+
debugOpacity: s,
|
|
566
|
+
showCloseArrow: C === "both" || C === "close",
|
|
567
|
+
onOpened: J,
|
|
568
|
+
onClosed: le,
|
|
569
569
|
navBarOpen: u,
|
|
570
570
|
navBarWidthOpen: v,
|
|
571
|
-
navBarWidthClosed:
|
|
572
|
-
children:
|
|
571
|
+
navBarWidthClosed: x,
|
|
572
|
+
children: H
|
|
573
573
|
}
|
|
574
574
|
),
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
R && /* @__PURE__ */ o(
|
|
576
|
+
He,
|
|
577
577
|
{
|
|
578
578
|
"data-testid": Ft,
|
|
579
579
|
anchor: "right",
|
|
580
|
-
open:
|
|
581
|
-
onClose: () =>
|
|
582
|
-
width:
|
|
583
|
-
titleText:
|
|
584
|
-
debugOpacity:
|
|
585
|
-
showCloseArrow:
|
|
580
|
+
open: pe,
|
|
581
|
+
onClose: () => Oe(!1),
|
|
582
|
+
width: de,
|
|
583
|
+
titleText: Ot,
|
|
584
|
+
debugOpacity: s,
|
|
585
|
+
showCloseArrow: Z === "both" || Z === "close",
|
|
586
586
|
onOpened: Bt,
|
|
587
587
|
onClosed: Et,
|
|
588
588
|
navBarOpen: u,
|
|
589
589
|
navBarWidthOpen: v,
|
|
590
|
-
navBarWidthClosed:
|
|
591
|
-
children:
|
|
590
|
+
navBarWidthClosed: x,
|
|
591
|
+
children: Tt
|
|
592
592
|
}
|
|
593
593
|
),
|
|
594
594
|
/* @__PURE__ */ o(
|
|
595
595
|
An,
|
|
596
|
-
|
|
596
|
+
a(a({
|
|
597
597
|
titleText: t,
|
|
598
598
|
"data-testid": l
|
|
599
|
-
}, y &&
|
|
599
|
+
}, y && W === "push" ? {
|
|
600
600
|
leftPanel: {
|
|
601
|
-
open:
|
|
601
|
+
open: ue,
|
|
602
602
|
width: m,
|
|
603
|
-
onOpen: () =>
|
|
604
|
-
showOpenArrow:
|
|
603
|
+
onOpen: () => Ie(!0),
|
|
604
|
+
showOpenArrow: C === "both" || C === "open"
|
|
605
605
|
}
|
|
606
|
-
} : {}),
|
|
606
|
+
} : {}), R && ye === "push" ? {
|
|
607
607
|
rightPanel: {
|
|
608
|
-
open:
|
|
609
|
-
width:
|
|
610
|
-
onOpen: () =>
|
|
611
|
-
showOpenArrow:
|
|
608
|
+
open: pe,
|
|
609
|
+
width: de,
|
|
610
|
+
onOpen: () => Oe(!0),
|
|
611
|
+
showOpenArrow: Z === "both" || Z === "open"
|
|
612
612
|
}
|
|
613
613
|
} : {})
|
|
614
614
|
),
|
|
615
615
|
/* @__PURE__ */ o(
|
|
616
616
|
kn,
|
|
617
|
-
S(
|
|
617
|
+
S(a(a({}, W === "push" ? {
|
|
618
618
|
leftPanel: {
|
|
619
|
-
open:
|
|
619
|
+
open: ue,
|
|
620
620
|
width: m
|
|
621
621
|
}
|
|
622
|
-
} : {}),
|
|
622
|
+
} : {}), ye === "push" ? {
|
|
623
623
|
rightPanel: {
|
|
624
|
-
open:
|
|
625
|
-
width:
|
|
624
|
+
open: pe,
|
|
625
|
+
width: de
|
|
626
626
|
}
|
|
627
627
|
} : {}), {
|
|
628
|
-
children: /* @__PURE__ */ o(Dn, S(
|
|
628
|
+
children: /* @__PURE__ */ o(Dn, S(a({ "data-testid": d }, c), { children: e }))
|
|
629
629
|
})
|
|
630
630
|
)
|
|
631
631
|
] });
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
const e =
|
|
633
|
+
const Ct = () => {
|
|
634
|
+
const e = se();
|
|
635
635
|
return _t(e.breakpoints.down("sm"));
|
|
636
|
-
}, yn = 64, $n = 72, In = 256, K =
|
|
637
|
-
function
|
|
636
|
+
}, yn = 64, $n = 72, In = 256, K = L(!0), xt = L(In), vt = L($n), ve = L(""), On = L(void 0), wt = L(yn), At = L(void 0);
|
|
637
|
+
function Tn({ links: e }) {
|
|
638
638
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
639
639
|
}
|
|
640
|
-
const
|
|
641
|
-
root: `${
|
|
642
|
-
menuButton: `${
|
|
643
|
-
hide: `${
|
|
644
|
-
content: `${
|
|
640
|
+
const ne = "Navbar", Q = {
|
|
641
|
+
root: `${ne}-root`,
|
|
642
|
+
menuButton: `${ne}-menuButton`,
|
|
643
|
+
hide: `${ne}-hide`,
|
|
644
|
+
content: `${ne}-content`
|
|
645
645
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
646
646
|
// settings: `${PREFIX}-settings`,
|
|
647
647
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
648
|
-
}, Bn =
|
|
648
|
+
}, Bn = M($, { name: "NavBar" })(({ theme: e }) => ({
|
|
649
649
|
[`&.${Q.root}`]: {
|
|
650
650
|
display: "flex"
|
|
651
651
|
},
|
|
@@ -664,14 +664,14 @@ const te = "Navbar", Q = {
|
|
|
664
664
|
// marginTop: '64px',
|
|
665
665
|
// marginBottom: '16px',
|
|
666
666
|
// },
|
|
667
|
-
})),
|
|
667
|
+
})), ae = (e, t, n) => e.transitions.create(t, {
|
|
668
668
|
easing: e.transitions.easing.sharp,
|
|
669
669
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
670
670
|
}), En = (e) => {
|
|
671
|
-
const t =
|
|
671
|
+
const t = se();
|
|
672
672
|
return /* @__PURE__ */ o(
|
|
673
673
|
Mt,
|
|
674
|
-
|
|
674
|
+
a({
|
|
675
675
|
easing: t.transitions.easing.sharp,
|
|
676
676
|
timeout: {
|
|
677
677
|
enter: t.transitions.duration.enteringScreen,
|
|
@@ -679,7 +679,7 @@ const te = "Navbar", Q = {
|
|
|
679
679
|
}
|
|
680
680
|
}, e)
|
|
681
681
|
);
|
|
682
|
-
},
|
|
682
|
+
}, bt = (e) => {
|
|
683
683
|
var t, n;
|
|
684
684
|
return {
|
|
685
685
|
overflowX: "hidden",
|
|
@@ -687,26 +687,26 @@ const te = "Navbar", Q = {
|
|
|
687
687
|
backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
|
|
688
688
|
// Provide default so tests don't need to wrap theme provider
|
|
689
689
|
};
|
|
690
|
-
},
|
|
690
|
+
}, We = (e, t) => a({
|
|
691
691
|
width: t,
|
|
692
|
-
transition:
|
|
693
|
-
},
|
|
692
|
+
transition: ae(e, "width", "entering")
|
|
693
|
+
}, bt(e)), ze = (e, t) => a({
|
|
694
694
|
width: t,
|
|
695
|
-
transition:
|
|
696
|
-
},
|
|
695
|
+
transition: ae(e, "width", "leaving")
|
|
696
|
+
}, bt(e)), Fn = M(we, {
|
|
697
697
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
698
|
-
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) =>
|
|
698
|
+
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
|
|
699
699
|
flexShrink: 0,
|
|
700
700
|
whiteSpace: "nowrap",
|
|
701
701
|
boxSizing: "border-box",
|
|
702
702
|
display: "flex",
|
|
703
703
|
flexDirection: "column"
|
|
704
|
-
}, t && S(
|
|
704
|
+
}, t && S(a({}, We(e, n)), {
|
|
705
705
|
backgroundColor: "",
|
|
706
|
-
"& .MuiDrawer-paper":
|
|
707
|
-
})), !t && S(
|
|
706
|
+
"& .MuiDrawer-paper": We(e, n)
|
|
707
|
+
})), !t && S(a({}, ze(e, r ? n : i)), {
|
|
708
708
|
backgroundColor: "",
|
|
709
|
-
"& .MuiDrawer-paper":
|
|
709
|
+
"& .MuiDrawer-paper": ze(e, r ? n : i)
|
|
710
710
|
})));
|
|
711
711
|
function Pn(e) {
|
|
712
712
|
let t = 0;
|
|
@@ -716,10 +716,10 @@ function Pn(e) {
|
|
|
716
716
|
}
|
|
717
717
|
return t;
|
|
718
718
|
}
|
|
719
|
-
const
|
|
719
|
+
const Ue = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Nn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
720
720
|
function Ln({ user: e, domainCode: t, open: n }) {
|
|
721
|
-
const i =
|
|
722
|
-
return /* @__PURE__ */
|
|
721
|
+
const i = se();
|
|
722
|
+
return /* @__PURE__ */ h(
|
|
723
723
|
$,
|
|
724
724
|
{
|
|
725
725
|
sx: {
|
|
@@ -735,26 +735,26 @@ function Ln({ user: e, domainCode: t, open: n }) {
|
|
|
735
735
|
{
|
|
736
736
|
sx: {
|
|
737
737
|
width: n ? "5rem" : "2rem",
|
|
738
|
-
transition: n ?
|
|
738
|
+
transition: n ? ae(i, ["width", "height"], "entering") : ae(i, ["width", "height"], "leaving"),
|
|
739
739
|
aspectRatio: 1
|
|
740
740
|
},
|
|
741
741
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
742
|
-
|
|
742
|
+
Pe,
|
|
743
743
|
{
|
|
744
744
|
src: e == null ? void 0 : e.picture,
|
|
745
745
|
sx: {
|
|
746
746
|
width: "100%",
|
|
747
747
|
height: "100%",
|
|
748
|
-
bgcolor:
|
|
748
|
+
bgcolor: Ue[Math.abs(Pn(e.name)) % Ue.length]
|
|
749
749
|
},
|
|
750
750
|
children: Nn(e.name)
|
|
751
751
|
}
|
|
752
|
-
) : /* @__PURE__ */ o(
|
|
752
|
+
) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
|
|
753
753
|
}
|
|
754
754
|
),
|
|
755
|
-
/* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */
|
|
756
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
757
|
-
t ? /* @__PURE__ */ o(
|
|
755
|
+
/* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */ h($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
756
|
+
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
|
|
757
|
+
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
|
|
758
758
|
] }) }) })
|
|
759
759
|
]
|
|
760
760
|
}
|
|
@@ -766,13 +766,13 @@ function _n({
|
|
|
766
766
|
widthOpen: n,
|
|
767
767
|
"data-testid": i,
|
|
768
768
|
top: r,
|
|
769
|
-
middle:
|
|
769
|
+
middle: s,
|
|
770
770
|
bottom: c,
|
|
771
771
|
user: d,
|
|
772
772
|
domainCode: l
|
|
773
773
|
}) {
|
|
774
|
-
const u =
|
|
775
|
-
return /* @__PURE__ */ o(Bn, { className: Q.root, "data-testid": i, children: /* @__PURE__ */
|
|
774
|
+
const u = Ct(), v = lt(K);
|
|
775
|
+
return /* @__PURE__ */ o(Bn, { className: Q.root, "data-testid": i, children: /* @__PURE__ */ h(
|
|
776
776
|
Fn,
|
|
777
777
|
{
|
|
778
778
|
open: e,
|
|
@@ -789,15 +789,15 @@ function _n({
|
|
|
789
789
|
isSmallScreen: u,
|
|
790
790
|
children: [
|
|
791
791
|
!u && /* @__PURE__ */ o(Ht, {}),
|
|
792
|
-
r && /* @__PURE__ */
|
|
792
|
+
r && /* @__PURE__ */ h($, { flexGrow: "0", children: [
|
|
793
793
|
r,
|
|
794
|
-
/* @__PURE__ */ o(
|
|
794
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
795
795
|
] }),
|
|
796
|
-
/* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */ o(
|
|
796
|
+
/* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Tn, { links: s }) : s }),
|
|
797
|
+
/* @__PURE__ */ h($, { flexGrow: "0", children: [
|
|
798
|
+
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
799
799
|
/* @__PURE__ */ o(Ln, { user: d, domainCode: l, open: e }),
|
|
800
|
-
c && /* @__PURE__ */ o(
|
|
800
|
+
c && /* @__PURE__ */ o(N, { children: c })
|
|
801
801
|
] })
|
|
802
802
|
]
|
|
803
803
|
}
|
|
@@ -820,7 +820,7 @@ function Mn({
|
|
|
820
820
|
flexGrow: 1
|
|
821
821
|
},
|
|
822
822
|
children: i ? /* @__PURE__ */ o($, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
|
|
823
|
-
|
|
823
|
+
Ze,
|
|
824
824
|
{
|
|
825
825
|
component: "main",
|
|
826
826
|
id: "main-content",
|
|
@@ -841,9 +841,9 @@ function Wn({
|
|
|
841
841
|
"data-testid": n,
|
|
842
842
|
middle: i
|
|
843
843
|
}) {
|
|
844
|
-
const r =
|
|
845
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
846
|
-
|
|
844
|
+
const r = lt(K), s = () => r((l) => !l), c = se(), d = Ct();
|
|
845
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
|
|
846
|
+
Je,
|
|
847
847
|
{
|
|
848
848
|
square: !0,
|
|
849
849
|
elevation: 0,
|
|
@@ -866,11 +866,11 @@ function Wn({
|
|
|
866
866
|
size: "medium",
|
|
867
867
|
color: "inherit",
|
|
868
868
|
sx: { padding: 1.5, marginLeft: "12px" },
|
|
869
|
-
onClick:
|
|
869
|
+
onClick: s,
|
|
870
870
|
children: /* @__PURE__ */ o(Jt, { fontSize: "medium" })
|
|
871
871
|
}
|
|
872
872
|
),
|
|
873
|
-
/* @__PURE__ */ o(
|
|
873
|
+
/* @__PURE__ */ o(F, { className: Hn.titleText, variant: "h6", children: e }),
|
|
874
874
|
i
|
|
875
875
|
]
|
|
876
876
|
}
|
|
@@ -882,34 +882,34 @@ function Po({
|
|
|
882
882
|
initialNavBarOpen: n,
|
|
883
883
|
pageContainerProps: i,
|
|
884
884
|
pageContentDataTestId: r,
|
|
885
|
-
topBarDataTestId:
|
|
885
|
+
topBarDataTestId: s,
|
|
886
886
|
navBarDataTestId: c,
|
|
887
887
|
navBarMiddle: d,
|
|
888
888
|
navBarBottom: l,
|
|
889
889
|
user: u,
|
|
890
890
|
domainCode: v
|
|
891
891
|
}) {
|
|
892
|
-
|
|
892
|
+
dt([
|
|
893
893
|
[K, n != null ? n : !0],
|
|
894
|
-
[
|
|
894
|
+
[ve, t != null ? t : ""]
|
|
895
895
|
]);
|
|
896
|
-
const
|
|
897
|
-
return /* @__PURE__ */
|
|
896
|
+
const x = _e(K), [w] = V(xt), [g] = V(vt), D = _e(ve), [b] = V(wt), [k] = V(On), [I] = V(At);
|
|
897
|
+
return /* @__PURE__ */ h($, { children: [
|
|
898
898
|
/* @__PURE__ */ o(Wt, {}),
|
|
899
899
|
/* @__PURE__ */ o(
|
|
900
900
|
Wn,
|
|
901
901
|
{
|
|
902
902
|
titleText: D,
|
|
903
|
-
"data-testid":
|
|
904
|
-
height:
|
|
903
|
+
"data-testid": s,
|
|
904
|
+
height: b,
|
|
905
905
|
middle: k
|
|
906
906
|
}
|
|
907
907
|
),
|
|
908
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ h($, { sx: { display: "flex" }, children: [
|
|
909
909
|
/* @__PURE__ */ o(
|
|
910
910
|
_n,
|
|
911
911
|
{
|
|
912
|
-
open:
|
|
912
|
+
open: x,
|
|
913
913
|
top: I,
|
|
914
914
|
middle: d,
|
|
915
915
|
bottom: l,
|
|
@@ -917,15 +917,15 @@ function Po({
|
|
|
917
917
|
domainCode: v,
|
|
918
918
|
widthOpen: w,
|
|
919
919
|
widthClosed: g,
|
|
920
|
-
offsetTop:
|
|
920
|
+
offsetTop: b,
|
|
921
921
|
"data-testid": c
|
|
922
922
|
}
|
|
923
923
|
),
|
|
924
924
|
/* @__PURE__ */ o(
|
|
925
925
|
Mn,
|
|
926
|
-
S(
|
|
926
|
+
S(a({
|
|
927
927
|
"data-testid": r,
|
|
928
|
-
topBarHeight:
|
|
928
|
+
topBarHeight: b
|
|
929
929
|
}, i), {
|
|
930
930
|
children: e
|
|
931
931
|
})
|
|
@@ -933,13 +933,13 @@ function Po({
|
|
|
933
933
|
] })
|
|
934
934
|
] });
|
|
935
935
|
}
|
|
936
|
-
const
|
|
936
|
+
const St = ({
|
|
937
937
|
isOpen: e,
|
|
938
938
|
dialogTitle: t,
|
|
939
939
|
children: n,
|
|
940
940
|
maxWidth: i,
|
|
941
941
|
primaryButton: r,
|
|
942
|
-
secondaryButton:
|
|
942
|
+
secondaryButton: s,
|
|
943
943
|
onClose: c,
|
|
944
944
|
sx: d,
|
|
945
945
|
"data-testid": l,
|
|
@@ -947,42 +947,42 @@ const bt = ({
|
|
|
947
947
|
isLoading: v = !1
|
|
948
948
|
}) => {
|
|
949
949
|
var g, D;
|
|
950
|
-
const [
|
|
951
|
-
return /* @__PURE__ */
|
|
952
|
-
|
|
950
|
+
const [x, w] = E(!1);
|
|
951
|
+
return /* @__PURE__ */ h(
|
|
952
|
+
je,
|
|
953
953
|
{
|
|
954
954
|
open: e,
|
|
955
|
-
onClose: (
|
|
956
|
-
u && (k === "backdropClick" || k === "escapeKeyDown") ||
|
|
955
|
+
onClose: (b, k) => P(void 0, null, function* () {
|
|
956
|
+
u && (k === "backdropClick" || k === "escapeKeyDown") || x || (s != null && s.onClick ? yield s.onClick() : c());
|
|
957
957
|
}),
|
|
958
958
|
fullWidth: !0,
|
|
959
959
|
maxWidth: i != null ? i : "xs",
|
|
960
960
|
"data-testid": l,
|
|
961
961
|
sx: d,
|
|
962
962
|
children: [
|
|
963
|
-
v && /* @__PURE__ */ o(
|
|
964
|
-
/* @__PURE__ */ o(
|
|
965
|
-
/* @__PURE__ */ o(
|
|
966
|
-
/* @__PURE__ */
|
|
963
|
+
v && /* @__PURE__ */ o(et, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
964
|
+
/* @__PURE__ */ o(tt, { children: t }),
|
|
965
|
+
/* @__PURE__ */ o(nt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
966
|
+
/* @__PURE__ */ h(ot, { children: [
|
|
967
967
|
/* @__PURE__ */ o(
|
|
968
|
-
|
|
968
|
+
re,
|
|
969
969
|
{
|
|
970
|
-
onClick: (g =
|
|
971
|
-
"data-testid":
|
|
972
|
-
disabled: (
|
|
973
|
-
color:
|
|
974
|
-
children: (D =
|
|
970
|
+
onClick: (g = s == null ? void 0 : s.onClick) != null ? g : c,
|
|
971
|
+
"data-testid": s == null ? void 0 : s.testId,
|
|
972
|
+
disabled: (s == null ? void 0 : s.disabled) || x,
|
|
973
|
+
color: s == null ? void 0 : s.buttonColor,
|
|
974
|
+
children: (D = s == null ? void 0 : s.text) != null ? D : "Cancel"
|
|
975
975
|
}
|
|
976
976
|
),
|
|
977
977
|
r && /* @__PURE__ */ o(
|
|
978
|
-
|
|
978
|
+
re,
|
|
979
979
|
{
|
|
980
|
-
onClick: () =>
|
|
981
|
-
var
|
|
982
|
-
w(!0), yield (
|
|
980
|
+
onClick: () => P(void 0, null, function* () {
|
|
981
|
+
var b;
|
|
982
|
+
w(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), w(!1);
|
|
983
983
|
}),
|
|
984
984
|
"data-testid": r.testId,
|
|
985
|
-
disabled: r.disabled ||
|
|
985
|
+
disabled: r.disabled || x,
|
|
986
986
|
color: r == null ? void 0 : r.buttonColor,
|
|
987
987
|
children: r.text
|
|
988
988
|
}
|
|
@@ -991,7 +991,7 @@ const bt = ({
|
|
|
991
991
|
]
|
|
992
992
|
}
|
|
993
993
|
);
|
|
994
|
-
},
|
|
994
|
+
}, kt = ({
|
|
995
995
|
minLength: e,
|
|
996
996
|
preLoadedOptions: t,
|
|
997
997
|
lookup: n,
|
|
@@ -999,74 +999,75 @@ const bt = ({
|
|
|
999
999
|
inputValue: r
|
|
1000
1000
|
}) => on({
|
|
1001
1001
|
queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
|
|
1002
|
-
(
|
|
1002
|
+
(s) => s.label.toLowerCase().includes(r.toLowerCase())
|
|
1003
1003
|
) : n(r),
|
|
1004
1004
|
queryKey: ["autocomplete", i, r]
|
|
1005
1005
|
});
|
|
1006
1006
|
function No({
|
|
1007
|
-
lookup: e = () =>
|
|
1007
|
+
lookup: e = () => P(this, null, function* () {
|
|
1008
1008
|
}),
|
|
1009
1009
|
enableHighlighting: t = !0,
|
|
1010
1010
|
onChange: n,
|
|
1011
1011
|
minLength: i = 0,
|
|
1012
1012
|
label: r,
|
|
1013
|
-
value:
|
|
1013
|
+
value: s,
|
|
1014
1014
|
"data-testid": c,
|
|
1015
1015
|
sx: d,
|
|
1016
1016
|
boxSx: l,
|
|
1017
1017
|
textFieldColor: u,
|
|
1018
1018
|
textFieldVariant: v = "filled",
|
|
1019
|
-
loadingText:
|
|
1019
|
+
loadingText: x = "Loading...",
|
|
1020
1020
|
noOptionsText: w = "No options",
|
|
1021
1021
|
popupIcon: g = /* @__PURE__ */ o(jt, {}),
|
|
1022
1022
|
error: D = !1,
|
|
1023
|
-
helperText:
|
|
1023
|
+
helperText: b = "",
|
|
1024
1024
|
preLoadedOptions: k = void 0,
|
|
1025
|
-
disablePortal: I = !1
|
|
1025
|
+
disablePortal: I = !1,
|
|
1026
|
+
disableIconFlip: T = !1
|
|
1026
1027
|
}) {
|
|
1027
|
-
const [
|
|
1028
|
-
const
|
|
1029
|
-
n(
|
|
1030
|
-
}, { data:
|
|
1031
|
-
inputValue:
|
|
1028
|
+
const [A, y] = E(""), R = (p, f) => {
|
|
1029
|
+
const m = s.filter((C) => C.id !== f);
|
|
1030
|
+
n(m, "delete", p);
|
|
1031
|
+
}, { data: O, isLoading: H } = kt({
|
|
1032
|
+
inputValue: A,
|
|
1032
1033
|
label: r,
|
|
1033
1034
|
lookup: e,
|
|
1034
1035
|
minLength: i,
|
|
1035
1036
|
preLoadedOptions: k
|
|
1036
|
-
}), W =
|
|
1037
|
-
return /* @__PURE__ */
|
|
1037
|
+
}), W = A.length >= i;
|
|
1038
|
+
return /* @__PURE__ */ h("div", { "data-testid": c, children: [
|
|
1038
1039
|
/* @__PURE__ */ o(
|
|
1039
|
-
|
|
1040
|
+
be,
|
|
1040
1041
|
{
|
|
1041
|
-
sx: d,
|
|
1042
|
+
sx: a(a({}, d), T ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1042
1043
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1043
1044
|
disablePortal: I,
|
|
1044
1045
|
multiple: !0,
|
|
1045
|
-
getOptionLabel: (
|
|
1046
|
-
loading: W ?
|
|
1047
|
-
options: [...
|
|
1046
|
+
getOptionLabel: (p) => typeof p == "string" ? p : p.label,
|
|
1047
|
+
loading: W ? H : !1,
|
|
1048
|
+
options: [...s, ...O != null ? O : []],
|
|
1048
1049
|
filterSelectedOptions: !0,
|
|
1049
1050
|
includeInputInList: !0,
|
|
1050
|
-
value:
|
|
1051
|
-
onChange: (
|
|
1052
|
-
n(f,
|
|
1051
|
+
value: s,
|
|
1052
|
+
onChange: (p, f, m) => {
|
|
1053
|
+
n(f, m, p);
|
|
1053
1054
|
},
|
|
1054
|
-
onInputChange: (
|
|
1055
|
+
onInputChange: (p, f) => y(f),
|
|
1055
1056
|
noOptionsText: W ? w : "Start typing to search",
|
|
1056
|
-
loadingText:
|
|
1057
|
+
loadingText: x,
|
|
1057
1058
|
popupIcon: g,
|
|
1058
|
-
renderInput: (
|
|
1059
|
-
|
|
1060
|
-
S(
|
|
1059
|
+
renderInput: (p) => /* @__PURE__ */ o(
|
|
1060
|
+
Se,
|
|
1061
|
+
S(a({}, p), {
|
|
1061
1062
|
label: r,
|
|
1062
1063
|
fullWidth: !0,
|
|
1063
1064
|
variant: v,
|
|
1064
1065
|
error: D,
|
|
1065
|
-
helperText:
|
|
1066
|
-
InputProps: S(
|
|
1067
|
-
endAdornment: /* @__PURE__ */
|
|
1068
|
-
|
|
1069
|
-
|
|
1066
|
+
helperText: b,
|
|
1067
|
+
InputProps: S(a({}, p.InputProps), {
|
|
1068
|
+
endAdornment: /* @__PURE__ */ h(N, { children: [
|
|
1069
|
+
H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
|
|
1070
|
+
p.InputProps.endAdornment
|
|
1070
1071
|
] })
|
|
1071
1072
|
}),
|
|
1072
1073
|
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
|
|
@@ -1077,34 +1078,34 @@ function No({
|
|
|
1077
1078
|
})
|
|
1078
1079
|
),
|
|
1079
1080
|
renderTags: () => null,
|
|
1080
|
-
isOptionEqualToValue: (
|
|
1081
|
-
renderOption: (
|
|
1081
|
+
isOptionEqualToValue: (p, f) => p.id === f.id,
|
|
1082
|
+
renderOption: (p, f, m) => {
|
|
1082
1083
|
if (t) {
|
|
1083
|
-
const
|
|
1084
|
+
const C = tn(f.label, m.inputValue, {
|
|
1084
1085
|
insideWords: !0,
|
|
1085
1086
|
findAllOccurrences: !0
|
|
1086
|
-
}),
|
|
1087
|
-
return /* @__PURE__ */
|
|
1087
|
+
}), _ = nn(f.label, C);
|
|
1088
|
+
return /* @__PURE__ */ xe(
|
|
1088
1089
|
"li",
|
|
1089
|
-
S(
|
|
1090
|
+
S(a({}, p), {
|
|
1090
1091
|
key: f.id,
|
|
1091
1092
|
"data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
|
|
1092
1093
|
}),
|
|
1093
|
-
/* @__PURE__ */ o("div", { children:
|
|
1094
|
+
/* @__PURE__ */ o("div", { children: _.map((J, le) => /* @__PURE__ */ o(
|
|
1094
1095
|
"span",
|
|
1095
1096
|
{
|
|
1096
1097
|
style: {
|
|
1097
|
-
fontWeight:
|
|
1098
|
+
fontWeight: J.highlight ? 700 : 400
|
|
1098
1099
|
},
|
|
1099
|
-
children:
|
|
1100
|
+
children: J.text
|
|
1100
1101
|
},
|
|
1101
|
-
|
|
1102
|
+
le
|
|
1102
1103
|
)) })
|
|
1103
1104
|
);
|
|
1104
1105
|
} else
|
|
1105
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ xe(
|
|
1106
1107
|
"li",
|
|
1107
|
-
S(
|
|
1108
|
+
S(a({}, p), {
|
|
1108
1109
|
key: f.id,
|
|
1109
1110
|
"data-testid": c ? `${c}:option(${f.id.toString()})` : void 0
|
|
1110
1111
|
}),
|
|
@@ -1113,7 +1114,7 @@ function No({
|
|
|
1113
1114
|
}
|
|
1114
1115
|
}
|
|
1115
1116
|
),
|
|
1116
|
-
|
|
1117
|
+
s.length > 0 && /* @__PURE__ */ o($, { sx: l, children: s.map((p) => /* @__PURE__ */ o(
|
|
1117
1118
|
zt,
|
|
1118
1119
|
{
|
|
1119
1120
|
sx: {
|
|
@@ -1124,7 +1125,7 @@ function No({
|
|
|
1124
1125
|
label: /* @__PURE__ */ o(
|
|
1125
1126
|
Ut,
|
|
1126
1127
|
{
|
|
1127
|
-
title:
|
|
1128
|
+
title: p.tooltipContent || "",
|
|
1128
1129
|
placement: "bottom-start",
|
|
1129
1130
|
PopperProps: {
|
|
1130
1131
|
modifiers: [
|
|
@@ -1136,79 +1137,79 @@ function No({
|
|
|
1136
1137
|
}
|
|
1137
1138
|
]
|
|
1138
1139
|
},
|
|
1139
|
-
children: /* @__PURE__ */ o(
|
|
1140
|
+
children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
|
|
1140
1141
|
}
|
|
1141
1142
|
),
|
|
1142
|
-
"data-testid": c ? `${c}:Chip(${
|
|
1143
|
-
onDelete: (f) =>
|
|
1143
|
+
"data-testid": c ? `${c}:Chip(${p.id.toString()})` : void 0,
|
|
1144
|
+
onDelete: (f) => R(f, p.id),
|
|
1144
1145
|
deleteIcon: /* @__PURE__ */ o(
|
|
1145
1146
|
Zt,
|
|
1146
1147
|
{
|
|
1147
|
-
"data-testid": c ? `${c}:Chip(${
|
|
1148
|
+
"data-testid": c ? `${c}:Chip(${p.id.toString()}):deleteIcon` : void 0
|
|
1148
1149
|
}
|
|
1149
1150
|
)
|
|
1150
1151
|
},
|
|
1151
|
-
|
|
1152
|
+
p.id
|
|
1152
1153
|
)) })
|
|
1153
1154
|
] });
|
|
1154
1155
|
}
|
|
1155
1156
|
const Lo = ({
|
|
1156
|
-
lookup: e = () =>
|
|
1157
|
+
lookup: e = () => P(void 0, null, function* () {
|
|
1157
1158
|
}),
|
|
1158
1159
|
onChange: t,
|
|
1159
1160
|
label: n,
|
|
1160
1161
|
value: i,
|
|
1161
1162
|
sx: r,
|
|
1162
|
-
textFieldColor:
|
|
1163
|
+
textFieldColor: s,
|
|
1163
1164
|
textFieldVariant: c = "filled",
|
|
1164
1165
|
"data-testid": d,
|
|
1165
1166
|
noOptionsText: l = "No options",
|
|
1166
1167
|
minLength: u = 3,
|
|
1167
1168
|
disablePortal: v = !1,
|
|
1168
|
-
preLoadedOptions:
|
|
1169
|
+
preLoadedOptions: x,
|
|
1169
1170
|
helperText: w = "",
|
|
1170
1171
|
disabled: g
|
|
1171
1172
|
}) => {
|
|
1172
|
-
const [D,
|
|
1173
|
+
const [D, b] = E(""), { data: k, isLoading: I } = kt({
|
|
1173
1174
|
inputValue: D,
|
|
1174
1175
|
label: n,
|
|
1175
1176
|
lookup: e,
|
|
1176
1177
|
minLength: u != null ? u : 0,
|
|
1177
|
-
preLoadedOptions:
|
|
1178
|
+
preLoadedOptions: x
|
|
1178
1179
|
}), T = D.length >= u;
|
|
1179
1180
|
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Gt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1180
|
-
|
|
1181
|
+
be,
|
|
1181
1182
|
{
|
|
1182
1183
|
sx: r,
|
|
1183
1184
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
1184
1185
|
loading: T ? I : !1,
|
|
1185
1186
|
options: k != null ? k : [],
|
|
1186
|
-
onChange: (
|
|
1187
|
-
t(
|
|
1187
|
+
onChange: (A, y) => {
|
|
1188
|
+
t(A, y);
|
|
1188
1189
|
},
|
|
1189
1190
|
disablePortal: v,
|
|
1190
|
-
filterOptions: (
|
|
1191
|
+
filterOptions: (A) => A,
|
|
1191
1192
|
value: i,
|
|
1192
1193
|
noOptionsText: T ? l : "Start typing to search",
|
|
1193
|
-
getOptionLabel: (
|
|
1194
|
-
renderInput: (
|
|
1195
|
-
|
|
1196
|
-
S(
|
|
1194
|
+
getOptionLabel: (A) => A.label,
|
|
1195
|
+
renderInput: (A) => /* @__PURE__ */ o(
|
|
1196
|
+
Se,
|
|
1197
|
+
S(a({
|
|
1197
1198
|
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0
|
|
1198
|
-
},
|
|
1199
|
+
}, A), {
|
|
1199
1200
|
variant: c,
|
|
1200
1201
|
label: n,
|
|
1201
|
-
color:
|
|
1202
|
+
color: s,
|
|
1202
1203
|
helperText: w
|
|
1203
1204
|
})
|
|
1204
1205
|
),
|
|
1205
|
-
isOptionEqualToValue: (
|
|
1206
|
-
onInputChange: (
|
|
1207
|
-
|
|
1206
|
+
isOptionEqualToValue: (A, y) => A.id === y.id,
|
|
1207
|
+
onInputChange: (A, y) => {
|
|
1208
|
+
b(y);
|
|
1208
1209
|
},
|
|
1209
|
-
renderOption: (
|
|
1210
|
+
renderOption: (A, y) => /* @__PURE__ */ xe(
|
|
1210
1211
|
"li",
|
|
1211
|
-
S(
|
|
1212
|
+
S(a({}, A), {
|
|
1212
1213
|
key: y.id,
|
|
1213
1214
|
"data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
|
|
1214
1215
|
}),
|
|
@@ -1222,8 +1223,8 @@ const Lo = ({
|
|
|
1222
1223
|
return -1;
|
|
1223
1224
|
try {
|
|
1224
1225
|
const n = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
|
|
1225
|
-
sn.from(n, "base64").toString("utf8").split("").map(function(
|
|
1226
|
-
return "%" + ("00" +
|
|
1226
|
+
sn.from(n, "base64").toString("utf8").split("").map(function(s) {
|
|
1227
|
+
return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
1227
1228
|
}).join("")
|
|
1228
1229
|
), r = JSON.parse(i);
|
|
1229
1230
|
return r != null && r.exp ? r.exp : -1;
|
|
@@ -1235,20 +1236,20 @@ const Lo = ({
|
|
|
1235
1236
|
closeHandler: t,
|
|
1236
1237
|
setAuth0ExpiryTime: n
|
|
1237
1238
|
}) => {
|
|
1238
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
1239
|
+
const { logout: i, getAccessTokenSilently: r } = ut(), [s, c] = E(0), d = () => P(void 0, null, function* () {
|
|
1239
1240
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1240
|
-
}), l = () =>
|
|
1241
|
-
c(
|
|
1241
|
+
}), l = () => P(void 0, null, function* () {
|
|
1242
|
+
c(s + 1), t();
|
|
1242
1243
|
});
|
|
1243
|
-
return
|
|
1244
|
-
(() =>
|
|
1245
|
-
if (
|
|
1244
|
+
return ie(() => {
|
|
1245
|
+
(() => P(void 0, null, function* () {
|
|
1246
|
+
if (s > 0) {
|
|
1246
1247
|
const w = yield r({ cacheMode: "off" }), g = zn(w) * 1e3;
|
|
1247
1248
|
n(g);
|
|
1248
1249
|
}
|
|
1249
1250
|
}))();
|
|
1250
|
-
}, [
|
|
1251
|
-
|
|
1251
|
+
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1252
|
+
St,
|
|
1252
1253
|
{
|
|
1253
1254
|
isOpen: e,
|
|
1254
1255
|
primaryButton: {
|
|
@@ -1292,8 +1293,8 @@ function Mo({
|
|
|
1292
1293
|
children: e,
|
|
1293
1294
|
appName: t = "the app"
|
|
1294
1295
|
}) {
|
|
1295
|
-
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect:
|
|
1296
|
-
if (
|
|
1296
|
+
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: s, logout: c } = ut();
|
|
1297
|
+
if (ie(() => {
|
|
1297
1298
|
if (i || n || r)
|
|
1298
1299
|
return;
|
|
1299
1300
|
const d = {
|
|
@@ -1301,16 +1302,16 @@ function Mo({
|
|
|
1301
1302
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
1302
1303
|
}
|
|
1303
1304
|
};
|
|
1304
|
-
|
|
1305
|
-
}, [i, n, r,
|
|
1305
|
+
s(d);
|
|
1306
|
+
}, [i, n, r, s]), r && Un(r)) {
|
|
1306
1307
|
let d = "Auth error", l = "An unknown Auth0 error occurred.";
|
|
1307
|
-
return Vn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : qn(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : Gn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */
|
|
1308
|
-
/* @__PURE__ */ o(
|
|
1309
|
-
/* @__PURE__ */ o(
|
|
1310
|
-
/* @__PURE__ */ o(
|
|
1308
|
+
return Vn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : qn(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : Gn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ h(je, { open: !0, children: [
|
|
1309
|
+
/* @__PURE__ */ o(tt, { children: d }),
|
|
1310
|
+
/* @__PURE__ */ o(nt, { children: /* @__PURE__ */ o(F, { children: l }) }),
|
|
1311
|
+
/* @__PURE__ */ o(ot, { children: /* @__PURE__ */ o(re, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
1311
1312
|
] });
|
|
1312
1313
|
}
|
|
1313
|
-
return n ? /* @__PURE__ */ o(
|
|
1314
|
+
return n ? /* @__PURE__ */ o(N, { children: e }) : /* @__PURE__ */ o(ln, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1314
1315
|
}
|
|
1315
1316
|
const Xn = {
|
|
1316
1317
|
autoHideDuration: 6e3,
|
|
@@ -1320,112 +1321,112 @@ const Xn = {
|
|
|
1320
1321
|
disableWindowBlurListener: !1
|
|
1321
1322
|
}, Qn = {
|
|
1322
1323
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1323
|
-
},
|
|
1324
|
+
}, Ge = {
|
|
1324
1325
|
message: "",
|
|
1325
1326
|
severity: "info",
|
|
1326
1327
|
variant: "standard",
|
|
1327
1328
|
progressIndicator: void 0
|
|
1328
1329
|
// Can use 'circular' or 'linear'
|
|
1329
|
-
},
|
|
1330
|
+
}, Ve = 100, qe = 2e3, Yn = 2e3, Kn = (() => {
|
|
1330
1331
|
let e = 0;
|
|
1331
1332
|
return () => (e += 1, e);
|
|
1332
1333
|
})(), Jn = {
|
|
1333
1334
|
borderBottomLeftRadius: "0px",
|
|
1334
1335
|
borderBottomRightRadius: "0px"
|
|
1335
|
-
}, Zn = {}, jn = {},
|
|
1336
|
-
function eo(
|
|
1337
|
-
var c =
|
|
1336
|
+
}, Zn = {}, jn = {}, Dt = Ye(null);
|
|
1337
|
+
function eo(s) {
|
|
1338
|
+
var c = s, {
|
|
1338
1339
|
overrideState: e = Zn,
|
|
1339
1340
|
overrideActions: t = jn,
|
|
1340
1341
|
shouldClose: n = Qn.shouldClose,
|
|
1341
1342
|
children: i
|
|
1342
|
-
} = c, r =
|
|
1343
|
+
} = c, r = Ee(c, [
|
|
1343
1344
|
"overrideState",
|
|
1344
1345
|
"overrideActions",
|
|
1345
1346
|
"shouldClose",
|
|
1346
1347
|
"children"
|
|
1347
1348
|
]);
|
|
1348
|
-
var
|
|
1349
|
-
const [{ open: d }, l] = E({ open: !1 }), u =
|
|
1349
|
+
var f;
|
|
1350
|
+
const [{ open: d }, l] = E({ open: !1 }), u = ge([]), v = ge(Date.now()), x = ge(0), w = oe((m) => {
|
|
1350
1351
|
l({ open: m });
|
|
1351
|
-
}, []), g =
|
|
1352
|
-
|
|
1353
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1354
|
-
),
|
|
1355
|
-
const
|
|
1352
|
+
}, []), g = oe((m = {}) => {
|
|
1353
|
+
x.current += 1, u.current.length >= Ve && Date.now() - v.current >= qe && (v.current = Date.now(), console.error(
|
|
1354
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ve}) hit ${x.current} times in last ${qe}ms)`
|
|
1355
|
+
), x.current = 0);
|
|
1356
|
+
const C = a(S(a({}, Ge), {
|
|
1356
1357
|
key: Kn()
|
|
1357
1358
|
}), m);
|
|
1358
|
-
return u.current.push(
|
|
1359
|
-
}, []), D = (m = "",
|
|
1360
|
-
const
|
|
1361
|
-
if (
|
|
1362
|
-
return
|
|
1363
|
-
},
|
|
1364
|
-
n(m,
|
|
1359
|
+
return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
|
|
1360
|
+
}, []), D = (m = "", C = {}) => g(a({ message: m, severity: "success" }, C)), b = (m = "", C = {}) => g(a({ message: m, severity: "info" }, C)), k = (m = "", C = {}) => g(a({ message: m, severity: "warning" }, C)), I = (m = "", C = {}) => g(a({ message: m, severity: "error" }, C)), T = (m) => {
|
|
1361
|
+
const C = u.current.findIndex((_) => _.key === m);
|
|
1362
|
+
if (C !== -1)
|
|
1363
|
+
return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
|
|
1364
|
+
}, A = (m, C) => {
|
|
1365
|
+
n(m, C) && l({ open: !1 });
|
|
1365
1366
|
}, y = () => {
|
|
1366
|
-
},
|
|
1367
|
+
}, R = () => {
|
|
1367
1368
|
u.current.shift(), u.current.length > 0 && l({ open: !0 });
|
|
1368
|
-
}, O = (
|
|
1369
|
-
"autoHideDuration" in O && (
|
|
1370
|
-
const
|
|
1369
|
+
}, O = (f = u.current[0]) != null ? f : a({}, Ge), H = {};
|
|
1370
|
+
"autoHideDuration" in O && (H.autoHideDuration = O.autoHideDuration);
|
|
1371
|
+
const W = a(a({}, Xn), r), p = a(a({
|
|
1371
1372
|
open: d,
|
|
1372
1373
|
setOpen: w,
|
|
1373
1374
|
enqueueNotification: g,
|
|
1374
1375
|
enqueueSuccessNotification: D,
|
|
1375
|
-
enqueueInfoNotification:
|
|
1376
|
+
enqueueInfoNotification: b,
|
|
1376
1377
|
enqueueWarningNotification: k,
|
|
1377
1378
|
enqueueErrorNotification: I,
|
|
1378
1379
|
removeNotification: T
|
|
1379
1380
|
}, e), t);
|
|
1380
|
-
return /* @__PURE__ */
|
|
1381
|
+
return /* @__PURE__ */ h(Dt.Provider, { value: p, children: [
|
|
1381
1382
|
i,
|
|
1382
1383
|
/* @__PURE__ */ o(
|
|
1383
1384
|
Vt,
|
|
1384
|
-
S(
|
|
1385
|
+
S(a(a({}, W), H), {
|
|
1385
1386
|
open: d,
|
|
1386
|
-
onClose:
|
|
1387
|
+
onClose: A,
|
|
1387
1388
|
TransitionProps: {
|
|
1388
|
-
onExited:
|
|
1389
|
+
onExited: R,
|
|
1389
1390
|
onExit: y
|
|
1390
1391
|
},
|
|
1391
1392
|
sx: { zIndex: Yn },
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1393
|
+
children: /* @__PURE__ */ h("div", { children: [
|
|
1393
1394
|
/* @__PURE__ */ o(
|
|
1394
1395
|
qt,
|
|
1395
1396
|
{
|
|
1396
|
-
onClose: (m) =>
|
|
1397
|
+
onClose: (m) => A(m, "closeAlert"),
|
|
1397
1398
|
severity: O.severity,
|
|
1398
1399
|
variant: "filled",
|
|
1399
|
-
icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(
|
|
1400
|
+
icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
|
|
1400
1401
|
style: O.progressIndicator === "linear" ? Jn : void 0,
|
|
1401
1402
|
children: O.message
|
|
1402
1403
|
}
|
|
1403
1404
|
),
|
|
1404
|
-
O.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1405
|
+
O.progressIndicator === "linear" && /* @__PURE__ */ o(et, { color: "primary" })
|
|
1405
1406
|
] })
|
|
1406
1407
|
})
|
|
1407
1408
|
)
|
|
1408
1409
|
] });
|
|
1409
1410
|
}
|
|
1410
1411
|
function to() {
|
|
1411
|
-
const e =
|
|
1412
|
+
const e = Ke(Dt);
|
|
1412
1413
|
if (e === null)
|
|
1413
|
-
throw new
|
|
1414
|
+
throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1414
1415
|
return e;
|
|
1415
1416
|
}
|
|
1416
1417
|
const Ro = X(
|
|
1417
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, S(
|
|
1418
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, S(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1418
1419
|
), no = en(), Ho = ({
|
|
1419
1420
|
children: e,
|
|
1420
1421
|
store: t
|
|
1421
|
-
}) => /* @__PURE__ */ o(
|
|
1422
|
-
var
|
|
1423
|
-
const
|
|
1424
|
-
JSON.parse((
|
|
1425
|
-
),
|
|
1426
|
-
(e) => e(
|
|
1422
|
+
}) => /* @__PURE__ */ o(ct, { store: t != null ? t : no, children: e }), yt = "domainCode";
|
|
1423
|
+
var Qe;
|
|
1424
|
+
const Xe = L(
|
|
1425
|
+
JSON.parse((Qe = localStorage.getItem(yt)) != null ? Qe : '{"domainCode": ""}').domainCode
|
|
1426
|
+
), $t = L(
|
|
1427
|
+
(e) => e(Xe),
|
|
1427
1428
|
(e, t, n) => {
|
|
1428
|
-
t(
|
|
1429
|
+
t(Xe, n), localStorage.setItem(yt, JSON.stringify({ domainCode: n }));
|
|
1429
1430
|
}
|
|
1430
1431
|
), oo = {
|
|
1431
1432
|
act: "ACT",
|
|
@@ -1448,39 +1449,39 @@ const qe = R(
|
|
|
1448
1449
|
onClose: n,
|
|
1449
1450
|
domainOptions: i,
|
|
1450
1451
|
applicationName: r,
|
|
1451
|
-
handleLogout:
|
|
1452
|
+
handleLogout: s
|
|
1452
1453
|
}) => {
|
|
1453
|
-
const [c, d] = V(
|
|
1454
|
+
const [c, d] = V($t), [l, u] = E(c), { enqueueSuccessNotification: v } = to(), x = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || x || w, D = () => P(void 0, null, function* () {
|
|
1454
1455
|
l ? (d(l), v(`Set domain to ${l}`), n()) : d("");
|
|
1455
|
-
}),
|
|
1456
|
-
c && !
|
|
1456
|
+
}), b = () => P(void 0, null, function* () {
|
|
1457
|
+
c && !x && !w ? (u(c), n()) : g && s();
|
|
1457
1458
|
});
|
|
1458
1459
|
let k;
|
|
1459
|
-
return
|
|
1460
|
-
|
|
1460
|
+
return x ? k = "Unable to retrieve your active organisations. Try logging in again." : w && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
|
|
1461
|
+
St,
|
|
1461
1462
|
{
|
|
1462
1463
|
isOpen: t,
|
|
1463
1464
|
dialogTitle: "Select an organisation",
|
|
1464
1465
|
primaryButton: {
|
|
1465
1466
|
text: "Confirm",
|
|
1466
1467
|
onClick: D,
|
|
1467
|
-
disabled: !l ||
|
|
1468
|
+
disabled: !l || x || w,
|
|
1468
1469
|
buttonColor: "primary"
|
|
1469
1470
|
},
|
|
1470
1471
|
secondaryButton: {
|
|
1471
1472
|
text: g ? "Logout" : "Cancel",
|
|
1472
|
-
onClick:
|
|
1473
|
+
onClick: b
|
|
1473
1474
|
},
|
|
1474
1475
|
onClose: g ? () => {
|
|
1475
1476
|
} : n,
|
|
1476
1477
|
children: [
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ h(F, { marginBottom: 2, children: [
|
|
1478
1479
|
"Select the default organisation that you want to use with the ",
|
|
1479
1480
|
r,
|
|
1480
1481
|
"."
|
|
1481
1482
|
] }),
|
|
1482
1483
|
/* @__PURE__ */ o(
|
|
1483
|
-
|
|
1484
|
+
be,
|
|
1484
1485
|
{
|
|
1485
1486
|
loading: e,
|
|
1486
1487
|
multiple: !1,
|
|
@@ -1490,13 +1491,13 @@ const qe = R(
|
|
|
1490
1491
|
getOptionLabel: io,
|
|
1491
1492
|
options: [...i],
|
|
1492
1493
|
renderInput: (I) => /* @__PURE__ */ o(
|
|
1493
|
-
|
|
1494
|
-
S(
|
|
1494
|
+
Se,
|
|
1495
|
+
S(a({}, I), {
|
|
1495
1496
|
variant: "filled",
|
|
1496
1497
|
label: "Select organisation",
|
|
1497
|
-
InputProps: S(
|
|
1498
|
-
endAdornment: /* @__PURE__ */
|
|
1499
|
-
e ? /* @__PURE__ */ o(
|
|
1498
|
+
InputProps: S(a({}, I.InputProps), {
|
|
1499
|
+
endAdornment: /* @__PURE__ */ h(N, { children: [
|
|
1500
|
+
e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1500
1501
|
I.InputProps.endAdornment
|
|
1501
1502
|
] })
|
|
1502
1503
|
})
|
|
@@ -1508,7 +1509,7 @@ const qe = R(
|
|
|
1508
1509
|
]
|
|
1509
1510
|
}
|
|
1510
1511
|
);
|
|
1511
|
-
}, zo =
|
|
1512
|
+
}, zo = it({
|
|
1512
1513
|
palette: {
|
|
1513
1514
|
primary: {
|
|
1514
1515
|
dark: "#00A651",
|
|
@@ -1559,7 +1560,7 @@ const qe = R(
|
|
|
1559
1560
|
navBar: {
|
|
1560
1561
|
backgroundColor: "#E8E8E8"
|
|
1561
1562
|
}
|
|
1562
|
-
}), Uo =
|
|
1563
|
+
}), Uo = it({
|
|
1563
1564
|
palette: {
|
|
1564
1565
|
primary: {
|
|
1565
1566
|
main: "#007236",
|
|
@@ -1613,18 +1614,18 @@ const qe = R(
|
|
|
1613
1614
|
styleOverrides: {
|
|
1614
1615
|
root: ({ theme: e }) => ({
|
|
1615
1616
|
"&.Mui-selected": {
|
|
1616
|
-
backgroundColor:
|
|
1617
|
+
backgroundColor: fe(
|
|
1617
1618
|
e.palette.secondary.main,
|
|
1618
1619
|
e.palette.action.selectedOpacity
|
|
1619
1620
|
),
|
|
1620
1621
|
"&:hover": {
|
|
1621
|
-
backgroundColor:
|
|
1622
|
+
backgroundColor: fe(
|
|
1622
1623
|
e.palette.secondary.main,
|
|
1623
1624
|
e.palette.action.selectedOpacity
|
|
1624
1625
|
)
|
|
1625
1626
|
},
|
|
1626
1627
|
"&.Mui-focusVisible": {
|
|
1627
|
-
backgroundColor:
|
|
1628
|
+
backgroundColor: fe(
|
|
1628
1629
|
e.palette.secondary.main,
|
|
1629
1630
|
e.palette.action.focusOpacity
|
|
1630
1631
|
)
|
|
@@ -1651,17 +1652,17 @@ const qe = R(
|
|
|
1651
1652
|
backgroundColor: "#E8E8E8"
|
|
1652
1653
|
}
|
|
1653
1654
|
}), ro = {
|
|
1654
|
-
domainCode:
|
|
1655
|
+
domainCode: $t,
|
|
1655
1656
|
navBarOpen: K,
|
|
1656
|
-
navBarWidthOpen:
|
|
1657
|
-
navBarWidthClosed:
|
|
1658
|
-
titleText:
|
|
1659
|
-
topBarHeight:
|
|
1660
|
-
navBarTop:
|
|
1661
|
-
}, Go = X(() => ({ children: e }) => /* @__PURE__ */ o(
|
|
1657
|
+
navBarWidthOpen: xt,
|
|
1658
|
+
navBarWidthClosed: vt,
|
|
1659
|
+
titleText: ve,
|
|
1660
|
+
topBarHeight: wt,
|
|
1661
|
+
navBarTop: At
|
|
1662
|
+
}, Go = X(() => ({ children: e }) => /* @__PURE__ */ o(ct, { children: e })), ao = ({
|
|
1662
1663
|
initialValues: e,
|
|
1663
1664
|
children: t
|
|
1664
|
-
}) => (
|
|
1665
|
+
}) => (dt(e), /* @__PURE__ */ o(N, { children: t })), Vo = X(
|
|
1665
1666
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1666
1667
|
ao,
|
|
1667
1668
|
{
|
|
@@ -1679,20 +1680,20 @@ const qe = R(
|
|
|
1679
1680
|
return /* @__PURE__ */ o(an, { client: t, children: e });
|
|
1680
1681
|
});
|
|
1681
1682
|
export {
|
|
1682
|
-
|
|
1683
|
+
St as AgDialog,
|
|
1683
1684
|
Po as AppLayout,
|
|
1684
1685
|
Ho as AtomProvider,
|
|
1685
1686
|
Mo as AuthGuard,
|
|
1686
|
-
|
|
1687
|
-
|
|
1687
|
+
Dt as Context,
|
|
1688
|
+
De as ContextError,
|
|
1688
1689
|
Wo as DomainCodeDialog,
|
|
1689
1690
|
$o as ExampleComponent,
|
|
1690
1691
|
No as FetchAutocomplete,
|
|
1691
1692
|
ao as HydrateAtoms,
|
|
1692
|
-
|
|
1693
|
-
|
|
1693
|
+
ht as NAVBAR_WIDTH_CLOSED,
|
|
1694
|
+
pt as NAVBAR_WIDTH_OPENED,
|
|
1694
1695
|
Eo as NavBar,
|
|
1695
|
-
|
|
1696
|
+
To as NavBarDarkStyledList,
|
|
1696
1697
|
Bo as NavBarLightStyledList,
|
|
1697
1698
|
fn as NavBarProvider,
|
|
1698
1699
|
Fo as PageLayout,
|
|
@@ -1701,23 +1702,23 @@ export {
|
|
|
1701
1702
|
Lo as SingleAutocomplete,
|
|
1702
1703
|
no as atomStore,
|
|
1703
1704
|
Cn as buildNavBarState,
|
|
1704
|
-
|
|
1705
|
+
$t as domainCodeAtom,
|
|
1705
1706
|
zo as fed21Theme,
|
|
1706
1707
|
zn as getAuth0Expiry,
|
|
1707
1708
|
Uo as internalAgSystemsTheme,
|
|
1708
1709
|
q as navBarClasses,
|
|
1709
1710
|
K as navBarOpenAtom,
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1711
|
+
At as navBarTopAtom,
|
|
1712
|
+
vt as navBarWidthClosedAtom,
|
|
1713
|
+
xt as navBarWidthOpenAtom,
|
|
1714
|
+
ve as titleTextAtom,
|
|
1715
|
+
wt as topBarHeightAtom,
|
|
1716
|
+
On as topBarMiddleAtom,
|
|
1717
|
+
kt as useAutocompleteOptions,
|
|
1717
1718
|
mn as useNavBar,
|
|
1718
1719
|
to as useSaladBar,
|
|
1719
1720
|
Go as withAtomProvider,
|
|
1720
|
-
|
|
1721
|
+
Oo as withBrowserRouter,
|
|
1721
1722
|
Io as withNavBarProvider,
|
|
1722
1723
|
Vo as withOverrideDefaults,
|
|
1723
1724
|
qo as withQueryClient,
|