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