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