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