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