@australiangreens/ag-internal-components 0.3.5 → 0.3.7
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/README.md +2 -2
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts +5 -10
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/components/types.d.ts +5 -3
- package/dist/components/types.d.ts.map +1 -1
- package/dist/esm/index.js +389 -394
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ot = Object.defineProperty, nt = Object.defineProperties;
|
|
2
|
+
var it = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var X = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var pe = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var te = (e, t, o) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, u = (e, t) => {
|
|
6
6
|
for (var o in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
pe.call(t, o) && te(e, o, t[o]);
|
|
8
8
|
if (X)
|
|
9
9
|
for (var o of X(t))
|
|
10
|
-
|
|
10
|
+
he.call(t, o) && te(e, o, t[o]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, b = (e, t) => nt(e, it(t));
|
|
13
|
+
var fe = (e, t) => {
|
|
14
14
|
var o = {};
|
|
15
15
|
for (var n in e)
|
|
16
|
-
|
|
16
|
+
pe.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
17
17
|
if (e != null && X)
|
|
18
18
|
for (var n of X(e))
|
|
19
|
-
t.indexOf(n) < 0 &&
|
|
19
|
+
t.indexOf(n) < 0 && he.call(e, n) && (o[n] = e[n]);
|
|
20
20
|
return o;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var me = (e, t, o) => te(e, typeof t != "symbol" ? t + "" : t, o);
|
|
23
|
+
var M = (e, t, o) => new Promise((n, s) => {
|
|
24
24
|
var a = (c) => {
|
|
25
25
|
try {
|
|
26
26
|
r(o.next(c));
|
|
@@ -36,30 +36,30 @@ var P = (e, t, o) => new Promise((n, s) => {
|
|
|
36
36
|
}, r = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(a, p);
|
|
37
37
|
r((o = o.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as m, Fragment as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
42
|
-
import { Cancel as
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import { useQuery as
|
|
46
|
-
import { useAuth0 as
|
|
47
|
-
import { Buffer as
|
|
48
|
-
import
|
|
49
|
-
import { atom as T, useAtom as
|
|
50
|
-
import { createHelper as
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import { useHydrateAtoms as
|
|
54
|
-
import { styled as
|
|
55
|
-
import
|
|
56
|
-
function
|
|
57
|
-
const [t, o] =
|
|
58
|
-
return /* @__PURE__ */ m(
|
|
59
|
-
/* @__PURE__ */ i(
|
|
60
|
-
/* @__PURE__ */ i(
|
|
39
|
+
import { jsxs as m, Fragment as $, jsx as i } from "react/jsx-runtime";
|
|
40
|
+
import { useState as z, createElement as ie, useEffect as ge, useMemo as rt, createContext as st, useRef as oe, useCallback as xe, useContext as at } from "react";
|
|
41
|
+
import { Typography as I, Button as q, Paper as Te, Dialog as $e, LinearProgress as Le, DialogTitle as Oe, DialogContent as Re, DialogActions as Ue, Autocomplete as re, TextField as se, CircularProgress as ae, Box as P, Chip as lt, Tooltip as ct, Stack as dt, Snackbar as ut, Alert as pt, FormHelperText as ht, useTheme as Z, useMediaQuery as ft, Drawer as mt, Collapse as gt, Avatar as Ae, Fade as xt, Skeleton as Ce, Toolbar as At, Divider as Se, Container as Ct, IconButton as St } from "@mui/material";
|
|
42
|
+
import { Cancel as vt, ArrowDropDown as wt, ViewHeadline as Dt } from "@mui/icons-material";
|
|
43
|
+
import kt from "autosuggest-highlight/match";
|
|
44
|
+
import yt from "autosuggest-highlight/parse";
|
|
45
|
+
import { useQuery as Be } from "@tanstack/react-query";
|
|
46
|
+
import { useAuth0 as le } from "@auth0/auth0-react";
|
|
47
|
+
import { Buffer as bt } from "buffer";
|
|
48
|
+
import Ft from "@mui/material/Skeleton";
|
|
49
|
+
import { atom as T, useAtom as H, useSetAtom as He, useAtomValue as ve } from "jotai";
|
|
50
|
+
import { createHelper as Et } from "souvlaki";
|
|
51
|
+
import _t from "@mui/material/CssBaseline";
|
|
52
|
+
import we from "@mui/material/Box";
|
|
53
|
+
import { useHydrateAtoms as It } from "jotai/utils";
|
|
54
|
+
import { styled as We, createTheme as qe, alpha as ne } from "@mui/material/styles";
|
|
55
|
+
import De from "react-avatar";
|
|
56
|
+
function Mo({ text: e }) {
|
|
57
|
+
const [t, o] = z(0);
|
|
58
|
+
return /* @__PURE__ */ m($, { children: [
|
|
59
|
+
/* @__PURE__ */ i(I, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
60
|
+
/* @__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" }) }),
|
|
61
61
|
/* @__PURE__ */ i(
|
|
62
|
-
|
|
62
|
+
q,
|
|
63
63
|
{
|
|
64
64
|
variant: "outlined",
|
|
65
65
|
onClick: () => o((n) => n + 1),
|
|
@@ -71,13 +71,13 @@ function _o({ text: e }) {
|
|
|
71
71
|
"This is some text: ",
|
|
72
72
|
/* @__PURE__ */ i("span", { children: e })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ m(
|
|
74
|
+
/* @__PURE__ */ m(Te, { children: [
|
|
75
75
|
"This number will incremember when button pressed: ",
|
|
76
76
|
t
|
|
77
77
|
] })
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const ze = ({
|
|
81
81
|
isOpen: e,
|
|
82
82
|
dialogTitle: t,
|
|
83
83
|
children: o,
|
|
@@ -91,52 +91,52 @@ const He = ({
|
|
|
91
91
|
disableCloseOnBackdropOrEscape: x = !1,
|
|
92
92
|
isLoading: C = !1
|
|
93
93
|
}) => {
|
|
94
|
-
var w,
|
|
95
|
-
const [v, g] =
|
|
94
|
+
var w, k;
|
|
95
|
+
const [v, g] = z(!1);
|
|
96
96
|
return /* @__PURE__ */ m(
|
|
97
|
-
|
|
97
|
+
$e,
|
|
98
98
|
{
|
|
99
99
|
open: e,
|
|
100
|
-
onClose: (f,
|
|
101
|
-
x && (
|
|
100
|
+
onClose: (f, D) => M(null, null, function* () {
|
|
101
|
+
x && (D === "backdropClick" || D === "escapeKeyDown") || v || (a != null && a.onClick ? yield a.onClick() : r());
|
|
102
102
|
}),
|
|
103
103
|
fullWidth: !0,
|
|
104
104
|
maxWidth: n != null ? n : "xs",
|
|
105
105
|
"data-testid": l,
|
|
106
106
|
sx: c,
|
|
107
107
|
children: [
|
|
108
|
-
C && /* @__PURE__ */ i(
|
|
109
|
-
/* @__PURE__ */ i(
|
|
110
|
-
/* @__PURE__ */ i(
|
|
111
|
-
/* @__PURE__ */ m(
|
|
108
|
+
C && /* @__PURE__ */ i(Le, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
109
|
+
/* @__PURE__ */ i(Oe, { children: t }),
|
|
110
|
+
/* @__PURE__ */ i(Re, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
|
|
111
|
+
/* @__PURE__ */ m(Ue, { children: [
|
|
112
112
|
/* @__PURE__ */ i(
|
|
113
|
-
|
|
113
|
+
q,
|
|
114
114
|
{
|
|
115
115
|
onClick: (w = a == null ? void 0 : a.onClick) != null ? w : r,
|
|
116
116
|
"data-testid": a == null ? void 0 : a.testId,
|
|
117
117
|
disabled: (a == null ? void 0 : a.disabled) || v,
|
|
118
118
|
color: a == null ? void 0 : a.buttonColor,
|
|
119
|
-
children: (
|
|
119
|
+
children: (k = a == null ? void 0 : a.text) != null ? k : "Cancel"
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
p && p.map((f,
|
|
122
|
+
p && p.map((f, D) => {
|
|
123
123
|
var y;
|
|
124
124
|
return /* @__PURE__ */ i(
|
|
125
|
-
|
|
125
|
+
q,
|
|
126
126
|
{
|
|
127
127
|
onClick: f == null ? void 0 : f.onClick,
|
|
128
128
|
"data-testid": f == null ? void 0 : f.testId,
|
|
129
129
|
disabled: (f == null ? void 0 : f.disabled) || v,
|
|
130
130
|
color: f == null ? void 0 : f.buttonColor,
|
|
131
|
-
children: (y = f.text) != null ? y : `Button ${
|
|
131
|
+
children: (y = f.text) != null ? y : `Button ${D}`
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
D
|
|
134
134
|
);
|
|
135
135
|
}),
|
|
136
136
|
s && /* @__PURE__ */ i(
|
|
137
|
-
|
|
137
|
+
q,
|
|
138
138
|
{
|
|
139
|
-
onClick: () =>
|
|
139
|
+
onClick: () => M(null, null, function* () {
|
|
140
140
|
var f;
|
|
141
141
|
g(!0), yield (f = s.onClick) == null ? void 0 : f.call(s), g(!1);
|
|
142
142
|
}),
|
|
@@ -150,7 +150,7 @@ const He = ({
|
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
},
|
|
153
|
+
}, Pt = {
|
|
154
154
|
popper: {
|
|
155
155
|
modifiers: [
|
|
156
156
|
{
|
|
@@ -161,22 +161,22 @@ const He = ({
|
|
|
161
161
|
}
|
|
162
162
|
]
|
|
163
163
|
}
|
|
164
|
-
},
|
|
164
|
+
}, Ge = {
|
|
165
165
|
right: 2
|
|
166
|
-
},
|
|
166
|
+
}, Ve = ({
|
|
167
167
|
minLength: e,
|
|
168
168
|
preLoadedOptions: t,
|
|
169
169
|
lookup: o,
|
|
170
170
|
label: n,
|
|
171
171
|
inputValue: s
|
|
172
|
-
}) =>
|
|
172
|
+
}) => Be({
|
|
173
173
|
queryFn: () => e && s.length < e ? t != null ? t : [] : t ? t.filter(
|
|
174
174
|
(a) => a.label.toLowerCase().includes(s.toLowerCase())
|
|
175
175
|
) : o(s),
|
|
176
176
|
queryKey: ["autocomplete", n, s]
|
|
177
177
|
});
|
|
178
|
-
function
|
|
179
|
-
lookup: e = () =>
|
|
178
|
+
function No({
|
|
179
|
+
lookup: e = () => M(null, null, function* () {
|
|
180
180
|
}),
|
|
181
181
|
enableHighlighting: t = !0,
|
|
182
182
|
onChange: o,
|
|
@@ -189,76 +189,69 @@ function Mo({
|
|
|
189
189
|
boxSx: l,
|
|
190
190
|
textFieldColor: x,
|
|
191
191
|
textFieldVariant: C = "filled",
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
textFieldFocused: v,
|
|
193
|
+
textFieldSx: g,
|
|
194
|
+
loadingText: w = "Loading...",
|
|
195
|
+
noOptionsText: k = "No options",
|
|
196
|
+
popupIcon: f = /* @__PURE__ */ i(wt, {}),
|
|
195
197
|
error: D = !1,
|
|
196
|
-
helperText:
|
|
197
|
-
preLoadedOptions:
|
|
198
|
-
disablePortal:
|
|
199
|
-
disableIconFlip:
|
|
200
|
-
chipToolTipSlotProps:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
onRightClick: U = () => {
|
|
198
|
+
helperText: y = "",
|
|
199
|
+
preLoadedOptions: E = void 0,
|
|
200
|
+
disablePortal: G = !1,
|
|
201
|
+
disableIconFlip: R = !1,
|
|
202
|
+
chipToolTipSlotProps: _ = Pt,
|
|
203
|
+
placeholderText: U = void 0,
|
|
204
|
+
onRightClick: L = () => {
|
|
204
205
|
},
|
|
205
|
-
disableDefaultRightClickBehaviour:
|
|
206
|
+
disableDefaultRightClickBehaviour: B = !1,
|
|
207
|
+
readOnly: O,
|
|
208
|
+
hideInputEndAdornment: S
|
|
206
209
|
}) {
|
|
207
|
-
const [
|
|
208
|
-
const
|
|
209
|
-
o(
|
|
210
|
-
}, { data:
|
|
211
|
-
inputValue:
|
|
210
|
+
const [d, F] = z(""), V = (h, A) => {
|
|
211
|
+
const N = p.filter((ee) => ee.id !== A);
|
|
212
|
+
o(N, "delete", h);
|
|
213
|
+
}, { data: j, isLoading: ce } = Ve({
|
|
214
|
+
inputValue: d,
|
|
212
215
|
label: a,
|
|
213
216
|
lookup: e,
|
|
214
217
|
minLength: s,
|
|
215
|
-
preLoadedOptions:
|
|
216
|
-
}),
|
|
217
|
-
sx: {
|
|
218
|
-
"& .MuiFilledInput-root.Mui-focused": {
|
|
219
|
-
backgroundColor: "hsla(201, 98%, 41%, 0.08)"
|
|
220
|
-
},
|
|
221
|
-
"& .MuiOutlinedInput-root.Mui-focused": {
|
|
222
|
-
backgroundColor: "hsla(201, 98%, 41%, 0.08)"
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
focused: !0
|
|
226
|
-
} : {};
|
|
218
|
+
preLoadedOptions: E
|
|
219
|
+
}), de = d.length >= s;
|
|
227
220
|
return /* @__PURE__ */ m("div", { "data-testid": r, children: [
|
|
228
221
|
/* @__PURE__ */ i(
|
|
229
|
-
|
|
222
|
+
re,
|
|
230
223
|
{
|
|
231
|
-
sx: u(u({}, c),
|
|
224
|
+
sx: u(u({}, c), R ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
232
225
|
"data-testid": r ? `${r}:Autocomplete` : void 0,
|
|
233
|
-
disablePortal:
|
|
226
|
+
disablePortal: G,
|
|
234
227
|
multiple: !0,
|
|
235
228
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
236
|
-
loading:
|
|
237
|
-
options: [...p, ...
|
|
229
|
+
loading: de ? ce : !1,
|
|
230
|
+
options: [...p, ...j != null ? j : []],
|
|
238
231
|
filterSelectedOptions: !0,
|
|
239
232
|
includeInputInList: !0,
|
|
240
233
|
value: p,
|
|
241
|
-
onChange: (h, A,
|
|
242
|
-
o(A,
|
|
234
|
+
onChange: (h, A, N) => {
|
|
235
|
+
o(A, N, h);
|
|
243
236
|
},
|
|
244
|
-
onInputChange: (h, A,
|
|
245
|
-
|
|
237
|
+
onInputChange: (h, A, N) => {
|
|
238
|
+
F(A), n && n(p, N, h);
|
|
246
239
|
},
|
|
247
|
-
noOptionsText:
|
|
248
|
-
loadingText:
|
|
249
|
-
popupIcon:
|
|
240
|
+
noOptionsText: de ? k : "Start typing to search",
|
|
241
|
+
loadingText: w,
|
|
242
|
+
popupIcon: f,
|
|
250
243
|
renderInput: (h) => /* @__PURE__ */ i(
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
se,
|
|
245
|
+
b(u({}, h), {
|
|
253
246
|
label: a,
|
|
254
247
|
fullWidth: !0,
|
|
255
248
|
variant: C,
|
|
256
249
|
error: D,
|
|
257
|
-
helperText:
|
|
250
|
+
helperText: y,
|
|
258
251
|
slotProps: {
|
|
259
|
-
input:
|
|
260
|
-
endAdornment:
|
|
261
|
-
|
|
252
|
+
input: b(u({}, h.InputProps), {
|
|
253
|
+
endAdornment: S ? void 0 : /* @__PURE__ */ m($, { children: [
|
|
254
|
+
ce ? /* @__PURE__ */ i(ae, { color: "inherit", size: 20 }) : null,
|
|
262
255
|
h.InputProps.endAdornment
|
|
263
256
|
] })
|
|
264
257
|
})
|
|
@@ -268,38 +261,40 @@ function Mo({
|
|
|
268
261
|
(A.key === "Backspace" || A.key === "Delete") && A.stopPropagation();
|
|
269
262
|
},
|
|
270
263
|
color: x,
|
|
271
|
-
placeholder:
|
|
272
|
-
|
|
264
|
+
placeholder: U,
|
|
265
|
+
sx: g,
|
|
266
|
+
focused: v
|
|
267
|
+
})
|
|
273
268
|
),
|
|
274
269
|
renderValue: () => null,
|
|
275
270
|
isOptionEqualToValue: (h, A) => h.id === A.id,
|
|
276
|
-
renderOption: (h, A,
|
|
271
|
+
renderOption: (h, A, N) => {
|
|
277
272
|
if (t) {
|
|
278
|
-
const
|
|
273
|
+
const ee = kt(A.label, N.inputValue, {
|
|
279
274
|
insideWords: !0,
|
|
280
275
|
findAllOccurrences: !0
|
|
281
|
-
}),
|
|
282
|
-
return /* @__PURE__ */
|
|
276
|
+
}), et = yt(A.label, ee);
|
|
277
|
+
return /* @__PURE__ */ ie(
|
|
283
278
|
"li",
|
|
284
|
-
|
|
279
|
+
b(u({}, h), {
|
|
285
280
|
key: A.id,
|
|
286
281
|
"data-testid": r ? `${r}:Autocomplete:option(${A.id.toString()})` : void 0
|
|
287
282
|
}),
|
|
288
|
-
/* @__PURE__ */ i("div", { children:
|
|
283
|
+
/* @__PURE__ */ i("div", { children: et.map((ue, tt) => /* @__PURE__ */ i(
|
|
289
284
|
"span",
|
|
290
285
|
{
|
|
291
286
|
style: {
|
|
292
|
-
fontWeight:
|
|
287
|
+
fontWeight: ue.highlight ? 700 : 400
|
|
293
288
|
},
|
|
294
|
-
children:
|
|
289
|
+
children: ue.text
|
|
295
290
|
},
|
|
296
|
-
|
|
291
|
+
tt
|
|
297
292
|
)) })
|
|
298
293
|
);
|
|
299
294
|
} else
|
|
300
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ ie(
|
|
301
296
|
"li",
|
|
302
|
-
|
|
297
|
+
b(u({}, h), {
|
|
303
298
|
key: A.id,
|
|
304
299
|
"data-testid": r ? `${r}:option(${A.id.toString()})` : void 0
|
|
305
300
|
}),
|
|
@@ -307,18 +302,18 @@ function Mo({
|
|
|
307
302
|
);
|
|
308
303
|
},
|
|
309
304
|
onMouseDownCapture: (h) => {
|
|
310
|
-
h.button ===
|
|
305
|
+
h.button === Ge.right && B && (h.preventDefault(), h.stopPropagation());
|
|
311
306
|
},
|
|
312
307
|
onContextMenuCapture: (h) => {
|
|
313
|
-
|
|
308
|
+
B && (h.preventDefault(), h.stopPropagation()), L(h);
|
|
314
309
|
},
|
|
315
|
-
readOnly:
|
|
310
|
+
readOnly: O
|
|
316
311
|
}
|
|
317
312
|
),
|
|
318
|
-
p.length > 0 && /* @__PURE__ */ i(
|
|
313
|
+
p.length > 0 && /* @__PURE__ */ i(P, { sx: l, children: p.map((h) => {
|
|
319
314
|
var A;
|
|
320
315
|
return /* @__PURE__ */ i(
|
|
321
|
-
|
|
316
|
+
lt,
|
|
322
317
|
{
|
|
323
318
|
sx: {
|
|
324
319
|
marginTop: 1,
|
|
@@ -326,18 +321,18 @@ function Mo({
|
|
|
326
321
|
height: "auto"
|
|
327
322
|
},
|
|
328
323
|
label: /* @__PURE__ */ i(
|
|
329
|
-
|
|
324
|
+
ct,
|
|
330
325
|
{
|
|
331
326
|
title: (A = h.tooltipContent) != null ? A : "",
|
|
332
327
|
placement: "bottom-start",
|
|
333
|
-
slotProps:
|
|
334
|
-
children: /* @__PURE__ */ i(
|
|
328
|
+
slotProps: _,
|
|
329
|
+
children: /* @__PURE__ */ i(I, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
|
|
335
330
|
}
|
|
336
331
|
),
|
|
337
332
|
"data-testid": r ? `${r}:Chip(${h.id.toString()})` : void 0,
|
|
338
|
-
onDelete: (
|
|
333
|
+
onDelete: (N) => V(N, h.id),
|
|
339
334
|
deleteIcon: /* @__PURE__ */ i(
|
|
340
|
-
|
|
335
|
+
vt,
|
|
341
336
|
{
|
|
342
337
|
"data-testid": r ? `${r}:Chip(${h.id.toString()}):deleteIcon` : void 0
|
|
343
338
|
}
|
|
@@ -348,8 +343,8 @@ function Mo({
|
|
|
348
343
|
}) })
|
|
349
344
|
] });
|
|
350
345
|
}
|
|
351
|
-
const
|
|
352
|
-
lookup: e = () =>
|
|
346
|
+
const To = /MUI: The value provided to.*is invalid/i, $o = ({
|
|
347
|
+
lookup: e = () => M(null, null, function* () {
|
|
353
348
|
}),
|
|
354
349
|
onChange: t,
|
|
355
350
|
onInputChange: o,
|
|
@@ -365,22 +360,22 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
365
360
|
disablePortal: v = !1,
|
|
366
361
|
preLoadedOptions: g,
|
|
367
362
|
helperText: w = "",
|
|
368
|
-
disabled:
|
|
363
|
+
disabled: k,
|
|
369
364
|
popupIcon: f,
|
|
370
|
-
disableIconFlip:
|
|
365
|
+
disableIconFlip: D,
|
|
371
366
|
isTemplatePlaceholder: y = !1,
|
|
372
|
-
placeholderText:
|
|
373
|
-
onRightClick:
|
|
367
|
+
placeholderText: E = void 0,
|
|
368
|
+
onRightClick: G = () => {
|
|
374
369
|
},
|
|
375
|
-
disableDefaultRightClickBehaviour:
|
|
370
|
+
disableDefaultRightClickBehaviour: R = !1
|
|
376
371
|
}) => {
|
|
377
|
-
const [
|
|
378
|
-
inputValue:
|
|
372
|
+
const [_, U] = z(""), { data: L, isLoading: B } = Ve({
|
|
373
|
+
inputValue: _,
|
|
379
374
|
label: n,
|
|
380
375
|
lookup: e,
|
|
381
376
|
minLength: C != null ? C : 0,
|
|
382
377
|
preLoadedOptions: g
|
|
383
|
-
}),
|
|
378
|
+
}), O = _.length >= C, S = y ? {
|
|
384
379
|
sx: {
|
|
385
380
|
"& .MuiFilledInput-root.Mui-focused": {
|
|
386
381
|
backgroundColor: "hsla(201, 98%, 41%, 0.08)"
|
|
@@ -393,35 +388,35 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
393
388
|
slotProps: { input: { endAdornment: void 0 } }
|
|
394
389
|
} : {};
|
|
395
390
|
return /* @__PURE__ */ i("div", { "data-testid": l, children: /* @__PURE__ */ i(
|
|
396
|
-
|
|
391
|
+
dt,
|
|
397
392
|
{
|
|
398
393
|
direction: "row",
|
|
399
394
|
spacing: 1,
|
|
400
395
|
onMouseDownCapture: (d) => {
|
|
401
|
-
d.button ===
|
|
396
|
+
d.button === Ge.right && R && (d.preventDefault(), d.stopPropagation());
|
|
402
397
|
},
|
|
403
398
|
onContextMenuCapture: (d) => {
|
|
404
|
-
|
|
399
|
+
R && (d.preventDefault(), d.stopPropagation()), G(d);
|
|
405
400
|
},
|
|
406
401
|
children: /* @__PURE__ */ i(
|
|
407
|
-
|
|
402
|
+
re,
|
|
408
403
|
{
|
|
409
|
-
sx: u(u({}, a),
|
|
404
|
+
sx: u(u({}, a), D ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
410
405
|
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
411
|
-
loading:
|
|
406
|
+
loading: O ? B : !1,
|
|
412
407
|
options: L != null ? L : [],
|
|
413
|
-
onChange: (d,
|
|
414
|
-
t(d,
|
|
408
|
+
onChange: (d, F, V) => {
|
|
409
|
+
t(d, F, V);
|
|
415
410
|
},
|
|
416
411
|
disablePortal: v,
|
|
417
412
|
filterOptions: (d) => d,
|
|
418
413
|
value: s,
|
|
419
|
-
noOptionsText:
|
|
414
|
+
noOptionsText: O ? x : "Start typing to search",
|
|
420
415
|
getOptionLabel: (d) => d.label,
|
|
421
416
|
popupIcon: f,
|
|
422
417
|
renderInput: (d) => /* @__PURE__ */ i(
|
|
423
|
-
|
|
424
|
-
u(
|
|
418
|
+
se,
|
|
419
|
+
u(b(u({
|
|
425
420
|
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0
|
|
426
421
|
}, d), {
|
|
427
422
|
variant: r,
|
|
@@ -429,33 +424,33 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
429
424
|
color: p,
|
|
430
425
|
error: c,
|
|
431
426
|
helperText: w,
|
|
432
|
-
placeholder:
|
|
427
|
+
placeholder: E != null ? E : y ? "Placeholder field" : void 0
|
|
433
428
|
}), S)
|
|
434
429
|
),
|
|
435
|
-
isOptionEqualToValue: (d,
|
|
436
|
-
onInputChange: (d,
|
|
437
|
-
U(
|
|
430
|
+
isOptionEqualToValue: (d, F) => d.id === F.id,
|
|
431
|
+
onInputChange: (d, F, V) => {
|
|
432
|
+
U(F), o && o(F, V, d);
|
|
438
433
|
},
|
|
439
|
-
renderOption: (d,
|
|
434
|
+
renderOption: (d, F) => /* @__PURE__ */ ie(
|
|
440
435
|
"li",
|
|
441
|
-
|
|
442
|
-
key:
|
|
443
|
-
"data-testid": l ? `${l}:Autocomplete:option(${
|
|
436
|
+
b(u({}, d), {
|
|
437
|
+
key: F.id,
|
|
438
|
+
"data-testid": l ? `${l}:Autocomplete:option(${F.id.toString()})` : void 0
|
|
444
439
|
}),
|
|
445
|
-
|
|
440
|
+
F.label
|
|
446
441
|
),
|
|
447
|
-
disabled:
|
|
442
|
+
disabled: k,
|
|
448
443
|
readOnly: y
|
|
449
444
|
}
|
|
450
445
|
)
|
|
451
446
|
}
|
|
452
447
|
) });
|
|
453
|
-
},
|
|
448
|
+
}, Mt = (e) => {
|
|
454
449
|
if (!e)
|
|
455
450
|
return -1;
|
|
456
451
|
try {
|
|
457
452
|
const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = decodeURIComponent(
|
|
458
|
-
|
|
453
|
+
bt.from(o, "base64").toString("utf8").split("").map(function(a) {
|
|
459
454
|
return "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2);
|
|
460
455
|
}).join("")
|
|
461
456
|
), s = JSON.parse(n);
|
|
@@ -463,20 +458,20 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
463
458
|
} catch (t) {
|
|
464
459
|
return -1;
|
|
465
460
|
}
|
|
466
|
-
},
|
|
461
|
+
}, Lo = ({
|
|
467
462
|
open: e = !1,
|
|
468
463
|
closeHandler: t,
|
|
469
464
|
setAuth0ExpiryTime: o
|
|
470
465
|
}) => {
|
|
471
|
-
const { logout: n, getAccessTokenSilently: s } =
|
|
466
|
+
const { logout: n, getAccessTokenSilently: s } = le();
|
|
472
467
|
return /* @__PURE__ */ i(
|
|
473
|
-
|
|
468
|
+
ze,
|
|
474
469
|
{
|
|
475
470
|
isOpen: e,
|
|
476
471
|
primaryButton: {
|
|
477
472
|
text: "Continue",
|
|
478
|
-
onClick: () =>
|
|
479
|
-
const l = yield s({ cacheMode: "off" }), x =
|
|
473
|
+
onClick: () => M(null, null, function* () {
|
|
474
|
+
const l = yield s({ cacheMode: "off" }), x = Mt(l) * 1e3;
|
|
480
475
|
o(x), t();
|
|
481
476
|
}),
|
|
482
477
|
disabled: !1,
|
|
@@ -485,7 +480,7 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
485
480
|
},
|
|
486
481
|
secondaryButton: {
|
|
487
482
|
text: "Log out",
|
|
488
|
-
onClick: () =>
|
|
483
|
+
onClick: () => M(null, null, function* () {
|
|
489
484
|
n({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
490
485
|
}),
|
|
491
486
|
disabled: !1,
|
|
@@ -499,25 +494,25 @@ const Po = /MUI: The value provided to.*is invalid/i, No = ({
|
|
|
499
494
|
}
|
|
500
495
|
);
|
|
501
496
|
};
|
|
502
|
-
function
|
|
497
|
+
function Nt(e) {
|
|
503
498
|
return "error" in e;
|
|
504
499
|
}
|
|
505
|
-
function
|
|
500
|
+
function Tt(e) {
|
|
506
501
|
var n;
|
|
507
502
|
const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
|
|
508
503
|
return t === "access_denied" && o.startsWith("You do not have the required authorization");
|
|
509
504
|
}
|
|
510
|
-
function
|
|
505
|
+
function $t(e) {
|
|
511
506
|
var n;
|
|
512
507
|
const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
|
|
513
508
|
return t === "access_denied" && o.startsWith("User did not authorize the request");
|
|
514
509
|
}
|
|
515
|
-
function
|
|
510
|
+
function Lt(e) {
|
|
516
511
|
var n;
|
|
517
512
|
const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
|
|
518
513
|
return t === "access_denied" && o.match(/Script.*time.*exceeded/);
|
|
519
514
|
}
|
|
520
|
-
function
|
|
515
|
+
function Oo({
|
|
521
516
|
children: e,
|
|
522
517
|
appName: t = "the app",
|
|
523
518
|
throwErrors: o = "none",
|
|
@@ -526,11 +521,11 @@ function To({
|
|
|
526
521
|
}
|
|
527
522
|
}) {
|
|
528
523
|
var C, v;
|
|
529
|
-
const { isAuthenticated: a, isLoading: p, error: r, loginWithRedirect: c, logout: l } =
|
|
530
|
-
|
|
524
|
+
const { isAuthenticated: a, isLoading: p, error: r, loginWithRedirect: c, logout: l } = le();
|
|
525
|
+
ge(() => {
|
|
531
526
|
r && s(r);
|
|
532
527
|
}, [r, s]);
|
|
533
|
-
const x =
|
|
528
|
+
const x = rt(
|
|
534
529
|
() => ({
|
|
535
530
|
appState: {
|
|
536
531
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -538,7 +533,7 @@ function To({
|
|
|
538
533
|
}),
|
|
539
534
|
[]
|
|
540
535
|
);
|
|
541
|
-
if (
|
|
536
|
+
if (ge(() => {
|
|
542
537
|
p || a || r || c(x);
|
|
543
538
|
}, [p, a, r, c, s, x]), r) {
|
|
544
539
|
if (n || console.error(
|
|
@@ -546,158 +541,158 @@ function To({
|
|
|
546
541
|
r
|
|
547
542
|
), o === "all")
|
|
548
543
|
throw r;
|
|
549
|
-
if (
|
|
544
|
+
if (Nt(r)) {
|
|
550
545
|
let g = "Auth error", w = "An unknown Auth0 error occurred.";
|
|
551
|
-
if (
|
|
546
|
+
if (Tt(r))
|
|
552
547
|
g = "Unauthorised", w = `You are not authorised to access ${t}.`;
|
|
553
|
-
else if (Nt(r))
|
|
554
|
-
g = "App not authorised", w = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
555
548
|
else if ($t(r))
|
|
549
|
+
g = "App not authorised", w = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
550
|
+
else if (Lt(r))
|
|
556
551
|
g = "Auth0 script execution time exceeded", w = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
557
552
|
else if (r.message === "Invalid state") {
|
|
558
|
-
const
|
|
559
|
-
|
|
553
|
+
const k = localStorage.getItem("auth0_redirect_count");
|
|
554
|
+
k ? k && parseInt(k) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(k) + 1)), c(x)) : (localStorage.setItem("auth0_redirect_count", "1"), c(x));
|
|
560
555
|
} else if (o === "unknown") throw r;
|
|
561
|
-
return /* @__PURE__ */ m(
|
|
562
|
-
/* @__PURE__ */ i(
|
|
563
|
-
/* @__PURE__ */ m(
|
|
564
|
-
/* @__PURE__ */ i(
|
|
556
|
+
return /* @__PURE__ */ m($e, { open: !0, children: [
|
|
557
|
+
/* @__PURE__ */ i(Oe, { children: g }),
|
|
558
|
+
/* @__PURE__ */ m(Re, { children: [
|
|
559
|
+
/* @__PURE__ */ i(I, { children: w }),
|
|
565
560
|
/* @__PURE__ */ i("br", {}),
|
|
566
|
-
/* @__PURE__ */ i(
|
|
567
|
-
/* @__PURE__ */ m(
|
|
561
|
+
/* @__PURE__ */ i(I, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
562
|
+
/* @__PURE__ */ m(I, { variant: "body2", children: [
|
|
568
563
|
"error: ",
|
|
569
564
|
(C = r == null ? void 0 : r.error) != null ? C : "N/A"
|
|
570
565
|
] }),
|
|
571
|
-
/* @__PURE__ */ m(
|
|
566
|
+
/* @__PURE__ */ m(I, { variant: "body2", children: [
|
|
572
567
|
"description: ",
|
|
573
568
|
(v = r == null ? void 0 : r.error_description) != null ? v : "N/A"
|
|
574
569
|
] })
|
|
575
570
|
] }),
|
|
576
|
-
/* @__PURE__ */ m(
|
|
577
|
-
g === "Auth0 script execution time exceeded" && /* @__PURE__ */ i(
|
|
578
|
-
/* @__PURE__ */ i(
|
|
571
|
+
/* @__PURE__ */ m(Ue, { children: [
|
|
572
|
+
g === "Auth0 script execution time exceeded" && /* @__PURE__ */ i(q, { href: window.location.origin + window.location.pathname, children: "Reload" }),
|
|
573
|
+
/* @__PURE__ */ i(q, { onClick: () => l({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
579
574
|
] })
|
|
580
575
|
] });
|
|
581
576
|
} else if (o === "unknown") throw r;
|
|
582
577
|
}
|
|
583
|
-
return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ i(
|
|
578
|
+
return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ i($, { children: e })) : /* @__PURE__ */ i(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
584
579
|
}
|
|
585
|
-
const
|
|
580
|
+
const Ot = {
|
|
586
581
|
autoHideDuration: 6e3,
|
|
587
582
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
588
583
|
// The default is false. If we prefer timer to continue when window loses
|
|
589
584
|
// focus, change to true
|
|
590
585
|
disableWindowBlurListener: !1
|
|
591
|
-
},
|
|
586
|
+
}, Rt = {
|
|
592
587
|
shouldClose: (e, t) => t !== "clickaway"
|
|
593
|
-
},
|
|
588
|
+
}, ke = {
|
|
594
589
|
message: "",
|
|
595
590
|
severity: "info",
|
|
596
591
|
variant: "standard",
|
|
597
592
|
progressIndicator: void 0
|
|
598
593
|
// Can use 'circular' or 'linear'
|
|
599
|
-
},
|
|
594
|
+
}, ye = 100, be = 2e3, Ut = 2e3, Bt = /* @__PURE__ */ (() => {
|
|
600
595
|
let e = 0;
|
|
601
596
|
return () => (e += 1, e);
|
|
602
|
-
})(),
|
|
597
|
+
})(), Ht = {
|
|
603
598
|
borderBottomLeftRadius: "0px",
|
|
604
599
|
borderBottomRightRadius: "0px"
|
|
605
|
-
},
|
|
606
|
-
function
|
|
600
|
+
}, Wt = {}, qt = {}, Ke = st(null);
|
|
601
|
+
function zt(a) {
|
|
607
602
|
var p = a, {
|
|
608
|
-
overrideState: e =
|
|
609
|
-
overrideActions: t =
|
|
610
|
-
shouldClose: o =
|
|
603
|
+
overrideState: e = Wt,
|
|
604
|
+
overrideActions: t = qt,
|
|
605
|
+
shouldClose: o = Rt.shouldClose,
|
|
611
606
|
children: n
|
|
612
|
-
} = p, s =
|
|
607
|
+
} = p, s = fe(p, [
|
|
613
608
|
"overrideState",
|
|
614
609
|
"overrideActions",
|
|
615
610
|
"shouldClose",
|
|
616
611
|
"children"
|
|
617
612
|
]);
|
|
618
|
-
var
|
|
619
|
-
const [{ open: r }, c] =
|
|
613
|
+
var O;
|
|
614
|
+
const [{ open: r }, c] = z({ open: !1 }), l = oe([]), x = oe(Date.now()), C = oe(0), v = xe((S) => {
|
|
620
615
|
c({ open: S });
|
|
621
|
-
}, []), g =
|
|
622
|
-
C.current += 1, l.current.length >=
|
|
623
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
616
|
+
}, []), g = xe((S = {}) => {
|
|
617
|
+
C.current += 1, l.current.length >= ye && Date.now() - x.current >= be && (x.current = Date.now(), console.error(
|
|
618
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${ye}) hit ${C.current} times in last ${be}ms)`
|
|
624
619
|
), C.current = 0);
|
|
625
|
-
const d = u(
|
|
626
|
-
key:
|
|
620
|
+
const d = u(b(u({}, ke), {
|
|
621
|
+
key: Bt()
|
|
627
622
|
}), S);
|
|
628
623
|
return l.current.push(d), l.current.length === 1 && c({ open: !0 }), d.key;
|
|
629
|
-
}, []), w = (S = "", d = {}) => g(u({ message: S, severity: "success" }, d)),
|
|
630
|
-
const d = l.current.findIndex((
|
|
624
|
+
}, []), w = (S = "", d = {}) => g(u({ message: S, severity: "success" }, d)), k = (S = "", d = {}) => g(u({ message: S, severity: "info" }, d)), f = (S = "", d = {}) => g(u({ message: S, severity: "warning" }, d)), D = (S = "", d = {}) => g(u({ message: S, severity: "error" }, d)), y = (S) => {
|
|
625
|
+
const d = l.current.findIndex((F) => F.key === S);
|
|
631
626
|
if (d !== -1)
|
|
632
627
|
return d === 0 ? (c({ open: !1 }), l.current[0]) : l.current.splice(d, 1);
|
|
633
|
-
},
|
|
628
|
+
}, E = (S, d) => {
|
|
634
629
|
o(S, d) && c({ open: !1 });
|
|
635
|
-
},
|
|
636
|
-
},
|
|
630
|
+
}, G = () => {
|
|
631
|
+
}, R = () => {
|
|
637
632
|
l.current.shift(), l.current.length > 0 && c({ open: !0 });
|
|
638
|
-
},
|
|
639
|
-
"autoHideDuration" in
|
|
640
|
-
const L = u(u({},
|
|
633
|
+
}, _ = (O = l.current[0]) != null ? O : u({}, ke), U = {};
|
|
634
|
+
"autoHideDuration" in _ && (U.autoHideDuration = _.autoHideDuration);
|
|
635
|
+
const L = u(u({}, Ot), s), B = u(u({
|
|
641
636
|
open: r,
|
|
642
637
|
setOpen: v,
|
|
643
638
|
enqueueNotification: g,
|
|
644
639
|
enqueueSuccessNotification: w,
|
|
645
|
-
enqueueInfoNotification:
|
|
640
|
+
enqueueInfoNotification: k,
|
|
646
641
|
enqueueWarningNotification: f,
|
|
647
|
-
enqueueErrorNotification:
|
|
642
|
+
enqueueErrorNotification: D,
|
|
648
643
|
removeNotification: y
|
|
649
644
|
}, e), t);
|
|
650
|
-
return /* @__PURE__ */ m(
|
|
645
|
+
return /* @__PURE__ */ m(Ke.Provider, { value: B, children: [
|
|
651
646
|
n,
|
|
652
647
|
/* @__PURE__ */ i(
|
|
653
|
-
|
|
654
|
-
|
|
648
|
+
ut,
|
|
649
|
+
b(u(u({}, L), U), {
|
|
655
650
|
open: r,
|
|
656
|
-
onClose:
|
|
651
|
+
onClose: E,
|
|
657
652
|
TransitionProps: {
|
|
658
|
-
onExited:
|
|
659
|
-
onExit:
|
|
653
|
+
onExited: R,
|
|
654
|
+
onExit: G
|
|
660
655
|
},
|
|
661
|
-
sx: { zIndex:
|
|
656
|
+
sx: { zIndex: Ut },
|
|
662
657
|
children: /* @__PURE__ */ m("div", { children: [
|
|
663
658
|
/* @__PURE__ */ i(
|
|
664
|
-
|
|
659
|
+
pt,
|
|
665
660
|
{
|
|
666
|
-
onClose: (S) =>
|
|
667
|
-
severity:
|
|
661
|
+
onClose: (S) => E(S, "closeAlert"),
|
|
662
|
+
severity: _.severity,
|
|
668
663
|
variant: "filled",
|
|
669
|
-
icon:
|
|
670
|
-
style:
|
|
671
|
-
children:
|
|
664
|
+
icon: _.progressIndicator === "circular" ? /* @__PURE__ */ i(ae, { size: "1em" }) : void 0,
|
|
665
|
+
style: _.progressIndicator === "linear" ? Ht : void 0,
|
|
666
|
+
children: _.message
|
|
672
667
|
}
|
|
673
668
|
),
|
|
674
|
-
|
|
669
|
+
_.progressIndicator === "linear" && /* @__PURE__ */ i(Le, { color: "primary" })
|
|
675
670
|
] })
|
|
676
671
|
})
|
|
677
672
|
)
|
|
678
673
|
] });
|
|
679
674
|
}
|
|
680
|
-
class
|
|
675
|
+
class Xe extends Error {
|
|
681
676
|
}
|
|
682
|
-
|
|
683
|
-
function
|
|
684
|
-
const e =
|
|
677
|
+
me(Xe, "errorName", "ContextError");
|
|
678
|
+
function Gt() {
|
|
679
|
+
const e = at(Ke);
|
|
685
680
|
if (e === null)
|
|
686
|
-
throw new
|
|
681
|
+
throw new Xe("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
687
682
|
return e;
|
|
688
683
|
}
|
|
689
|
-
const
|
|
690
|
-
(e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: n }) => /* @__PURE__ */ i(
|
|
691
|
-
),
|
|
692
|
-
var
|
|
693
|
-
const
|
|
694
|
-
JSON.parse((
|
|
695
|
-
),
|
|
696
|
-
(e) => e(
|
|
684
|
+
const Ro = Et(
|
|
685
|
+
(e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: n }) => /* @__PURE__ */ i(zt, b(u({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ i($, { children: n }) }))
|
|
686
|
+
), Ye = "domainCode";
|
|
687
|
+
var Ne;
|
|
688
|
+
const Fe = T(
|
|
689
|
+
JSON.parse((Ne = localStorage.getItem(Ye)) != null ? Ne : '{"domainCode": ""}').domainCode
|
|
690
|
+
), Vt = T(
|
|
691
|
+
(e) => e(Fe),
|
|
697
692
|
(e, t, o) => {
|
|
698
|
-
t(
|
|
693
|
+
t(Fe, o), localStorage.setItem(Ye, JSON.stringify({ domainCode: o }));
|
|
699
694
|
}
|
|
700
|
-
),
|
|
695
|
+
), Kt = {
|
|
701
696
|
act: "ACT",
|
|
702
697
|
nsw: "NSW",
|
|
703
698
|
nt: "NT",
|
|
@@ -709,10 +704,10 @@ const De = T(
|
|
|
709
704
|
ag: "AG",
|
|
710
705
|
fedmps: "FedMPs",
|
|
711
706
|
"": ""
|
|
712
|
-
},
|
|
707
|
+
}, Qe = (e) => {
|
|
713
708
|
var t;
|
|
714
|
-
return e === null ? "N/A" : (t =
|
|
715
|
-
},
|
|
709
|
+
return e === null ? "N/A" : (t = Kt[e]) != null ? t : "";
|
|
710
|
+
}, Uo = ({
|
|
716
711
|
isLoading: e,
|
|
717
712
|
isOpen: t,
|
|
718
713
|
onClose: o,
|
|
@@ -721,20 +716,20 @@ const De = T(
|
|
|
721
716
|
applicationName: a,
|
|
722
717
|
handleLogout: p
|
|
723
718
|
}) => {
|
|
724
|
-
const [r, c] =
|
|
719
|
+
const [r, c] = H(Vt), [l, x] = z(r), { enqueueSuccessNotification: C } = Gt(), v = s.length === 0, g = !!r && !s.includes(r) && !s.includes(l), w = !r || v || g, k = () => M(null, null, function* () {
|
|
725
720
|
l ? (c(l), n == null || n(l), C(`Set organisation to ${l}`), o()) : (c(""), n == null || n(""));
|
|
726
|
-
}), f = () =>
|
|
721
|
+
}), f = () => M(null, null, function* () {
|
|
727
722
|
r && !v && !g ? (x(r), o()) : w && p();
|
|
728
723
|
});
|
|
729
|
-
let
|
|
730
|
-
return v ?
|
|
731
|
-
|
|
724
|
+
let D;
|
|
725
|
+
return v ? D = "Unable to retrieve your active organisations. Try logging in again." : g && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ m(
|
|
726
|
+
ze,
|
|
732
727
|
{
|
|
733
728
|
isOpen: t,
|
|
734
729
|
dialogTitle: "Select an organisation",
|
|
735
730
|
primaryButton: {
|
|
736
731
|
text: "Confirm",
|
|
737
|
-
onClick:
|
|
732
|
+
onClick: k,
|
|
738
733
|
disabled: !l || v || g,
|
|
739
734
|
buttonColor: "primary"
|
|
740
735
|
},
|
|
@@ -745,29 +740,29 @@ const De = T(
|
|
|
745
740
|
onClose: w ? () => {
|
|
746
741
|
} : o,
|
|
747
742
|
children: [
|
|
748
|
-
/* @__PURE__ */ m(
|
|
743
|
+
/* @__PURE__ */ m(I, { marginBottom: 2, children: [
|
|
749
744
|
"Select the default organisation that you want to use with the ",
|
|
750
745
|
a,
|
|
751
746
|
"."
|
|
752
747
|
] }),
|
|
753
748
|
/* @__PURE__ */ i(
|
|
754
|
-
|
|
749
|
+
re,
|
|
755
750
|
{
|
|
756
751
|
loading: e,
|
|
757
752
|
multiple: !1,
|
|
758
753
|
disableClearable: !1,
|
|
759
754
|
value: l !== "" ? l : null,
|
|
760
|
-
onChange: (y,
|
|
761
|
-
getOptionLabel:
|
|
755
|
+
onChange: (y, E) => x(E != null ? E : ""),
|
|
756
|
+
getOptionLabel: Qe,
|
|
762
757
|
options: [...s.toSorted()],
|
|
763
758
|
renderInput: (y) => /* @__PURE__ */ i(
|
|
764
|
-
|
|
765
|
-
|
|
759
|
+
se,
|
|
760
|
+
b(u({}, y), {
|
|
766
761
|
variant: "filled",
|
|
767
762
|
label: "Select organisation",
|
|
768
|
-
InputProps:
|
|
769
|
-
endAdornment: /* @__PURE__ */ m(
|
|
770
|
-
e ? /* @__PURE__ */ i(
|
|
763
|
+
InputProps: b(u({}, y.InputProps), {
|
|
764
|
+
endAdornment: /* @__PURE__ */ m($, { children: [
|
|
765
|
+
e ? /* @__PURE__ */ i(ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
771
766
|
y.InputProps.endAdornment
|
|
772
767
|
] })
|
|
773
768
|
})
|
|
@@ -775,15 +770,15 @@ const De = T(
|
|
|
775
770
|
)
|
|
776
771
|
}
|
|
777
772
|
),
|
|
778
|
-
|
|
773
|
+
D && /* @__PURE__ */ i(ht, { error: !0, children: D })
|
|
779
774
|
]
|
|
780
775
|
}
|
|
781
776
|
);
|
|
782
|
-
},
|
|
777
|
+
}, Je = () => {
|
|
783
778
|
const e = Z();
|
|
784
|
-
return
|
|
785
|
-
},
|
|
786
|
-
function
|
|
779
|
+
return ft(e.breakpoints.down("sm"));
|
|
780
|
+
}, Xt = 64, Yt = 72, Qt = 256, J = T(!0), Jt = T(Qt), Zt = T(Yt), Ee = T(""), jt = T(void 0), eo = T(Xt), to = T(void 0);
|
|
781
|
+
function oo({ links: e }) {
|
|
787
782
|
return /* @__PURE__ */ i("div", { children: "LinksMenu not implemented yet" });
|
|
788
783
|
}
|
|
789
784
|
const Y = "Navbar", K = {
|
|
@@ -794,7 +789,7 @@ const Y = "Navbar", K = {
|
|
|
794
789
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
795
790
|
// settings: `${PREFIX}-settings`,
|
|
796
791
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
797
|
-
},
|
|
792
|
+
}, no = We(P, { name: "NavBar" })(({ theme: e }) => ({
|
|
798
793
|
[`&.${K.root}`]: {
|
|
799
794
|
display: "flex"
|
|
800
795
|
},
|
|
@@ -813,13 +808,13 @@ const Y = "Navbar", K = {
|
|
|
813
808
|
// marginTop: '64px',
|
|
814
809
|
// marginBottom: '16px',
|
|
815
810
|
// },
|
|
816
|
-
})),
|
|
811
|
+
})), W = (e, t, o) => e.transitions.create(t, {
|
|
817
812
|
easing: e.transitions.easing.sharp,
|
|
818
813
|
duration: o === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
819
|
-
}),
|
|
814
|
+
}), io = (e) => {
|
|
820
815
|
const t = Z();
|
|
821
816
|
return /* @__PURE__ */ i(
|
|
822
|
-
|
|
817
|
+
gt,
|
|
823
818
|
u({
|
|
824
819
|
easing: t.transitions.easing.sharp,
|
|
825
820
|
timeout: {
|
|
@@ -828,7 +823,7 @@ const Y = "Navbar", K = {
|
|
|
828
823
|
}
|
|
829
824
|
}, e)
|
|
830
825
|
);
|
|
831
|
-
},
|
|
826
|
+
}, Ze = (e) => {
|
|
832
827
|
var t, o;
|
|
833
828
|
return {
|
|
834
829
|
overflowX: "hidden",
|
|
@@ -836,13 +831,13 @@ const Y = "Navbar", K = {
|
|
|
836
831
|
backgroundColor: (o = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? o : "white"
|
|
837
832
|
// Provide default so tests don't need to wrap theme provider
|
|
838
833
|
};
|
|
839
|
-
},
|
|
834
|
+
}, _e = (e, t) => u({
|
|
840
835
|
width: t,
|
|
841
|
-
transition:
|
|
842
|
-
},
|
|
836
|
+
transition: W(e, "width", "entering")
|
|
837
|
+
}, Ze(e)), Ie = (e, t) => u({
|
|
843
838
|
width: t,
|
|
844
|
-
transition:
|
|
845
|
-
},
|
|
839
|
+
transition: W(e, "width", "leaving")
|
|
840
|
+
}, Ze(e)), ro = We(mt, {
|
|
846
841
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
847
842
|
})(({ theme: e, open: t, widthOpen: o, widthClosed: n, isSmallScreen: s }) => u(u({
|
|
848
843
|
flexShrink: 0,
|
|
@@ -850,20 +845,20 @@ const Y = "Navbar", K = {
|
|
|
850
845
|
boxSizing: "border-box",
|
|
851
846
|
display: "flex",
|
|
852
847
|
flexDirection: "column"
|
|
853
|
-
}, t &&
|
|
848
|
+
}, t && b(u({}, _e(e, o)), {
|
|
854
849
|
backgroundColor: "",
|
|
855
|
-
"& .MuiDrawer-paper":
|
|
856
|
-
})), !t &&
|
|
850
|
+
"& .MuiDrawer-paper": _e(e, o)
|
|
851
|
+
})), !t && b(u({}, Ie(e, s ? o : n)), {
|
|
857
852
|
backgroundColor: "",
|
|
858
|
-
"& .MuiDrawer-paper":
|
|
853
|
+
"& .MuiDrawer-paper": Ie(e, s ? o : n)
|
|
859
854
|
})));
|
|
860
|
-
function
|
|
855
|
+
function je(e) {
|
|
861
856
|
return e.replace(
|
|
862
857
|
/(^|-)([a-z])/g,
|
|
863
858
|
(t, o, n) => o === "-" ? " " + n.toUpperCase() : n.toUpperCase()
|
|
864
859
|
);
|
|
865
860
|
}
|
|
866
|
-
function
|
|
861
|
+
function Bo(e, t, o, n) {
|
|
867
862
|
var p;
|
|
868
863
|
if (!e) return "None";
|
|
869
864
|
const a = Object.entries(e).filter(
|
|
@@ -871,27 +866,27 @@ function Ro(e, t, o, n) {
|
|
|
871
866
|
).map(
|
|
872
867
|
([r]) => {
|
|
873
868
|
var c;
|
|
874
|
-
return
|
|
869
|
+
return je((c = r.split("/").at(-1)) != null ? c : "");
|
|
875
870
|
}
|
|
876
871
|
);
|
|
877
872
|
return (p = n.find(
|
|
878
873
|
(r) => o[r].some((c) => a.includes(c))
|
|
879
874
|
)) != null ? p : "None";
|
|
880
875
|
}
|
|
881
|
-
const
|
|
882
|
-
const { getIdTokenClaims: t, user: o } =
|
|
883
|
-
return
|
|
876
|
+
const Ho = (e) => {
|
|
877
|
+
const { getIdTokenClaims: t, user: o } = le();
|
|
878
|
+
return Be({
|
|
884
879
|
queryKey: ["availableDomains", o == null ? void 0 : o.sub],
|
|
885
|
-
queryFn: () =>
|
|
880
|
+
queryFn: () => M(null, null, function* () {
|
|
886
881
|
const n = yield t();
|
|
887
882
|
return n ? Object.entries(n).reduce((s, [a, p]) => {
|
|
888
883
|
var l;
|
|
889
|
-
const r =
|
|
884
|
+
const r = je((l = a.split("/").at(-1)) != null ? l : ""), c = a.startsWith("https://greens.org.au/roles/") && e.includes(r) ? p : [];
|
|
890
885
|
return [.../* @__PURE__ */ new Set([...s, ...c])];
|
|
891
886
|
}, []) : [];
|
|
892
887
|
})
|
|
893
888
|
});
|
|
894
|
-
},
|
|
889
|
+
}, Wo = (e) => Object.values(e).reduce(
|
|
895
890
|
(t, o) => [.../* @__PURE__ */ new Set([...t, ...o])],
|
|
896
891
|
[]
|
|
897
892
|
), Q = {
|
|
@@ -901,7 +896,7 @@ const Uo = (e) => {
|
|
|
901
896
|
info: console.info.bind(console),
|
|
902
897
|
debug: console.debug.bind(console)
|
|
903
898
|
};
|
|
904
|
-
function
|
|
899
|
+
function qo(e, t) {
|
|
905
900
|
console[e] = (...o) => {
|
|
906
901
|
for (const n of t)
|
|
907
902
|
if (typeof n == "function") {
|
|
@@ -914,14 +909,14 @@ function Ho(e, t) {
|
|
|
914
909
|
Q[e](o);
|
|
915
910
|
};
|
|
916
911
|
}
|
|
917
|
-
function
|
|
912
|
+
function zo(e) {
|
|
918
913
|
if (e)
|
|
919
914
|
console[e] = Q[e];
|
|
920
915
|
else
|
|
921
916
|
for (const t of Object.keys(Q))
|
|
922
917
|
console[t] = Q[t];
|
|
923
918
|
}
|
|
924
|
-
function
|
|
919
|
+
function so(e) {
|
|
925
920
|
let t = 0;
|
|
926
921
|
for (let o = 0, n = e.length; o < n; o++) {
|
|
927
922
|
const s = e.charCodeAt(o);
|
|
@@ -929,11 +924,11 @@ function io(e) {
|
|
|
929
924
|
}
|
|
930
925
|
return t;
|
|
931
926
|
}
|
|
932
|
-
const
|
|
933
|
-
function
|
|
927
|
+
const Pe = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Me = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
928
|
+
function ao({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
|
|
934
929
|
const s = Z();
|
|
935
930
|
return /* @__PURE__ */ m(
|
|
936
|
-
|
|
931
|
+
P,
|
|
937
932
|
{
|
|
938
933
|
sx: {
|
|
939
934
|
paddingTop: 3,
|
|
@@ -944,52 +939,52 @@ function ro({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
|
|
|
944
939
|
},
|
|
945
940
|
children: [
|
|
946
941
|
!n && /* @__PURE__ */ i(
|
|
947
|
-
|
|
942
|
+
P,
|
|
948
943
|
{
|
|
949
944
|
sx: {
|
|
950
945
|
width: o ? "5rem" : "2rem",
|
|
951
|
-
transition: o ?
|
|
946
|
+
transition: o ? W(s, ["width", "height"], "entering") : W(s, ["width", "height"], "leaving"),
|
|
952
947
|
aspectRatio: 1
|
|
953
948
|
},
|
|
954
|
-
children: e != null && e.name ? /* @__PURE__ */ i(
|
|
955
|
-
|
|
949
|
+
children: e != null && e.name ? /* @__PURE__ */ i($, { children: /* @__PURE__ */ i(
|
|
950
|
+
Ae,
|
|
956
951
|
{
|
|
957
952
|
src: e == null ? void 0 : e.picture,
|
|
958
953
|
sx: {
|
|
959
954
|
width: "100%",
|
|
960
955
|
height: "100%",
|
|
961
|
-
bgcolor:
|
|
956
|
+
bgcolor: Pe[Math.abs(so(e == null ? void 0 : e.name)) % Pe.length]
|
|
962
957
|
},
|
|
963
|
-
children:
|
|
958
|
+
children: Me(e == null ? void 0 : e.name)
|
|
964
959
|
}
|
|
965
|
-
) }) : /* @__PURE__ */ i(
|
|
960
|
+
) }) : /* @__PURE__ */ i(Ae, { sx: { width: "100%", height: "100%" } })
|
|
966
961
|
}
|
|
967
962
|
),
|
|
968
963
|
n && /* @__PURE__ */ i(
|
|
969
|
-
|
|
964
|
+
P,
|
|
970
965
|
{
|
|
971
966
|
sx: {
|
|
972
967
|
width: o ? "5rem" : "2rem",
|
|
973
|
-
transition: o ?
|
|
968
|
+
transition: o ? W(s, ["width", "height"], "entering") : W(s, ["width", "height"], "leaving"),
|
|
974
969
|
aspectRatio: 1
|
|
975
970
|
},
|
|
976
|
-
children: e != null && e.name ? /* @__PURE__ */ i(
|
|
971
|
+
children: e != null && e.name ? /* @__PURE__ */ i($, { children: /* @__PURE__ */ m(De, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
|
|
977
972
|
" ",
|
|
978
|
-
|
|
973
|
+
Me(e == null ? void 0 : e.name),
|
|
979
974
|
" ",
|
|
980
975
|
"ab"
|
|
981
|
-
] }) }) : /* @__PURE__ */ i(
|
|
976
|
+
] }) }) : /* @__PURE__ */ i(De, {})
|
|
982
977
|
}
|
|
983
978
|
),
|
|
984
|
-
/* @__PURE__ */ i(
|
|
985
|
-
e != null && e.name ? /* @__PURE__ */ i(
|
|
986
|
-
t ? /* @__PURE__ */ i(
|
|
979
|
+
/* @__PURE__ */ i(io, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ i(xt, { in: o, children: /* @__PURE__ */ m(P, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
980
|
+
e != null && e.name ? /* @__PURE__ */ i(I, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(Ce, { animation: !1, width: "50%" }),
|
|
981
|
+
t ? /* @__PURE__ */ i(I, { children: Qe(t) }) : /* @__PURE__ */ i(Ce, { animation: !1, width: "25%" })
|
|
987
982
|
] }) }) })
|
|
988
983
|
]
|
|
989
984
|
}
|
|
990
985
|
);
|
|
991
986
|
}
|
|
992
|
-
function
|
|
987
|
+
function lo({
|
|
993
988
|
open: e,
|
|
994
989
|
widthClosed: t,
|
|
995
990
|
widthOpen: o,
|
|
@@ -1001,9 +996,9 @@ function so({
|
|
|
1001
996
|
domainCode: c,
|
|
1002
997
|
useNewAvatar: l = !1
|
|
1003
998
|
}) {
|
|
1004
|
-
const x =
|
|
1005
|
-
return /* @__PURE__ */ i(
|
|
1006
|
-
|
|
999
|
+
const x = Je(), C = He(J);
|
|
1000
|
+
return /* @__PURE__ */ i(no, { className: K.root, "data-testid": n, children: /* @__PURE__ */ m(
|
|
1001
|
+
ro,
|
|
1007
1002
|
{
|
|
1008
1003
|
open: e,
|
|
1009
1004
|
widthOpen: o,
|
|
@@ -1018,37 +1013,37 @@ function so({
|
|
|
1018
1013
|
},
|
|
1019
1014
|
isSmallScreen: x,
|
|
1020
1015
|
children: [
|
|
1021
|
-
!x && /* @__PURE__ */ i(
|
|
1022
|
-
s && /* @__PURE__ */ m(
|
|
1016
|
+
!x && /* @__PURE__ */ i(At, {}),
|
|
1017
|
+
s && /* @__PURE__ */ m(P, { flexGrow: "0", children: [
|
|
1023
1018
|
s,
|
|
1024
|
-
/* @__PURE__ */ i(
|
|
1019
|
+
/* @__PURE__ */ i(Se, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
1025
1020
|
] }),
|
|
1026
|
-
/* @__PURE__ */ i(
|
|
1027
|
-
/* @__PURE__ */ m(
|
|
1028
|
-
/* @__PURE__ */ i(
|
|
1029
|
-
/* @__PURE__ */ i(
|
|
1030
|
-
p && /* @__PURE__ */ i(
|
|
1021
|
+
/* @__PURE__ */ i(P, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ i(oo, { links: a }) : a }),
|
|
1022
|
+
/* @__PURE__ */ m(P, { flexGrow: "0", children: [
|
|
1023
|
+
/* @__PURE__ */ i(Se, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
1024
|
+
/* @__PURE__ */ i(ao, { user: r, domainCode: c, open: e, useNewAvatar: l }),
|
|
1025
|
+
p && /* @__PURE__ */ i($, { children: p })
|
|
1031
1026
|
] })
|
|
1032
1027
|
]
|
|
1033
1028
|
}
|
|
1034
1029
|
) });
|
|
1035
1030
|
}
|
|
1036
|
-
function
|
|
1031
|
+
function co({
|
|
1037
1032
|
children: e,
|
|
1038
1033
|
topBarHeight: t,
|
|
1039
1034
|
maxWidth: o = !1,
|
|
1040
1035
|
noPadding: n
|
|
1041
1036
|
}) {
|
|
1042
1037
|
return /* @__PURE__ */ i(
|
|
1043
|
-
|
|
1038
|
+
P,
|
|
1044
1039
|
{
|
|
1045
1040
|
sx: {
|
|
1046
1041
|
overflow: "auto",
|
|
1047
1042
|
height: `calc(100vh - ${t}px)`,
|
|
1048
1043
|
flexGrow: 1
|
|
1049
1044
|
},
|
|
1050
|
-
children: n ? /* @__PURE__ */ i(
|
|
1051
|
-
|
|
1045
|
+
children: n ? /* @__PURE__ */ i(P, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ i(
|
|
1046
|
+
Ct,
|
|
1052
1047
|
{
|
|
1053
1048
|
component: "main",
|
|
1054
1049
|
id: "main-content",
|
|
@@ -1060,18 +1055,18 @@ function ao({
|
|
|
1060
1055
|
}
|
|
1061
1056
|
);
|
|
1062
1057
|
}
|
|
1063
|
-
const
|
|
1064
|
-
titleText: `${
|
|
1058
|
+
const uo = "TopBar", po = {
|
|
1059
|
+
titleText: `${uo}-titleText`
|
|
1065
1060
|
};
|
|
1066
|
-
function
|
|
1061
|
+
function ho({
|
|
1067
1062
|
titleText: e = "",
|
|
1068
1063
|
height: t,
|
|
1069
1064
|
"data-testid": o,
|
|
1070
1065
|
middle: n
|
|
1071
1066
|
}) {
|
|
1072
|
-
const s =
|
|
1067
|
+
const s = He(J), a = () => s((c) => !c), p = Z(), r = Je();
|
|
1073
1068
|
return /* @__PURE__ */ i("header", { "data-testid": o, children: /* @__PURE__ */ m(
|
|
1074
|
-
|
|
1069
|
+
Te,
|
|
1075
1070
|
{
|
|
1076
1071
|
square: !0,
|
|
1077
1072
|
elevation: 0,
|
|
@@ -1089,22 +1084,22 @@ function uo({
|
|
|
1089
1084
|
},
|
|
1090
1085
|
children: [
|
|
1091
1086
|
/* @__PURE__ */ i(
|
|
1092
|
-
|
|
1087
|
+
St,
|
|
1093
1088
|
{
|
|
1094
1089
|
size: "medium",
|
|
1095
1090
|
color: "inherit",
|
|
1096
1091
|
sx: { padding: 1.5, marginLeft: "12px" },
|
|
1097
1092
|
onClick: a,
|
|
1098
|
-
children: /* @__PURE__ */ i(
|
|
1093
|
+
children: /* @__PURE__ */ i(Dt, { fontSize: "medium" })
|
|
1099
1094
|
}
|
|
1100
1095
|
),
|
|
1101
|
-
/* @__PURE__ */ i(
|
|
1096
|
+
/* @__PURE__ */ i(I, { className: po.titleText, variant: "h6", component: "h1", children: e }),
|
|
1102
1097
|
n
|
|
1103
1098
|
]
|
|
1104
1099
|
}
|
|
1105
1100
|
) });
|
|
1106
1101
|
}
|
|
1107
|
-
function
|
|
1102
|
+
function Go({
|
|
1108
1103
|
children: e,
|
|
1109
1104
|
initialTitleText: t,
|
|
1110
1105
|
initialNavBarOpen: o,
|
|
@@ -1118,25 +1113,25 @@ function qo({
|
|
|
1118
1113
|
domainCode: x,
|
|
1119
1114
|
useNewAvatar: C = !1
|
|
1120
1115
|
}) {
|
|
1121
|
-
|
|
1116
|
+
It([
|
|
1122
1117
|
[J, o != null ? o : !0],
|
|
1123
|
-
[
|
|
1118
|
+
[Ee, t != null ? t : ""]
|
|
1124
1119
|
]);
|
|
1125
|
-
const v =
|
|
1126
|
-
return /* @__PURE__ */ m(
|
|
1127
|
-
/* @__PURE__ */ i(
|
|
1120
|
+
const v = ve(J), [g] = H(Jt), [w] = H(Zt), k = ve(Ee), [f] = H(eo), [D] = H(jt), [y] = H(to);
|
|
1121
|
+
return /* @__PURE__ */ m(we, { children: [
|
|
1122
|
+
/* @__PURE__ */ i(_t, {}),
|
|
1128
1123
|
/* @__PURE__ */ i(
|
|
1129
|
-
|
|
1124
|
+
ho,
|
|
1130
1125
|
{
|
|
1131
|
-
titleText:
|
|
1126
|
+
titleText: k,
|
|
1132
1127
|
"data-testid": a,
|
|
1133
1128
|
height: f,
|
|
1134
|
-
middle:
|
|
1129
|
+
middle: D
|
|
1135
1130
|
}
|
|
1136
1131
|
),
|
|
1137
|
-
/* @__PURE__ */ m(
|
|
1132
|
+
/* @__PURE__ */ m(we, { sx: { display: "flex" }, children: [
|
|
1138
1133
|
/* @__PURE__ */ i(
|
|
1139
|
-
|
|
1134
|
+
lo,
|
|
1140
1135
|
{
|
|
1141
1136
|
open: v,
|
|
1142
1137
|
top: y,
|
|
@@ -1152,8 +1147,8 @@ function qo({
|
|
|
1152
1147
|
}
|
|
1153
1148
|
),
|
|
1154
1149
|
/* @__PURE__ */ i(
|
|
1155
|
-
|
|
1156
|
-
|
|
1150
|
+
co,
|
|
1151
|
+
b(u({
|
|
1157
1152
|
"data-testid": s,
|
|
1158
1153
|
topBarHeight: f
|
|
1159
1154
|
}, n), {
|
|
@@ -1163,7 +1158,7 @@ function qo({
|
|
|
1163
1158
|
] })
|
|
1164
1159
|
] });
|
|
1165
1160
|
}
|
|
1166
|
-
const
|
|
1161
|
+
const Vo = qe({
|
|
1167
1162
|
palette: {
|
|
1168
1163
|
primary: {
|
|
1169
1164
|
dark: "#00A651",
|
|
@@ -1214,7 +1209,7 @@ const zo = Be({
|
|
|
1214
1209
|
navBar: {
|
|
1215
1210
|
backgroundColor: "#E8E8E8"
|
|
1216
1211
|
}
|
|
1217
|
-
}),
|
|
1212
|
+
}), Ko = qe({
|
|
1218
1213
|
palette: {
|
|
1219
1214
|
primary: {
|
|
1220
1215
|
main: "#007236",
|
|
@@ -1268,18 +1263,18 @@ const zo = Be({
|
|
|
1268
1263
|
styleOverrides: {
|
|
1269
1264
|
root: ({ theme: e }) => ({
|
|
1270
1265
|
"&.Mui-selected": {
|
|
1271
|
-
backgroundColor:
|
|
1266
|
+
backgroundColor: ne(
|
|
1272
1267
|
e.palette.secondary.main,
|
|
1273
1268
|
e.palette.action.selectedOpacity
|
|
1274
1269
|
),
|
|
1275
1270
|
"&:hover": {
|
|
1276
|
-
backgroundColor:
|
|
1271
|
+
backgroundColor: ne(
|
|
1277
1272
|
e.palette.secondary.main,
|
|
1278
1273
|
e.palette.action.selectedOpacity
|
|
1279
1274
|
)
|
|
1280
1275
|
},
|
|
1281
1276
|
"&.Mui-focusVisible": {
|
|
1282
|
-
backgroundColor:
|
|
1277
|
+
backgroundColor: ne(
|
|
1283
1278
|
e.palette.secondary.main,
|
|
1284
1279
|
e.palette.action.focusOpacity
|
|
1285
1280
|
)
|
|
@@ -1310,39 +1305,39 @@ const zo = Be({
|
|
|
1310
1305
|
}
|
|
1311
1306
|
});
|
|
1312
1307
|
export {
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1308
|
+
ze as AgDialog,
|
|
1309
|
+
Go as AppLayout,
|
|
1310
|
+
Oo as AuthGuard,
|
|
1311
|
+
Ke as Context,
|
|
1312
|
+
Xe as ContextError,
|
|
1313
|
+
Kt as DOMAIN_CODE_LABELS,
|
|
1314
|
+
Uo as DomainCodeDialog,
|
|
1315
|
+
Mo as ExampleComponent,
|
|
1316
|
+
No as FetchAutocomplete,
|
|
1317
|
+
To as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1318
|
+
zt as SaladBarProvider,
|
|
1319
|
+
Lo as SessionExpiryDialog,
|
|
1320
|
+
$o as SingleAutocomplete,
|
|
1321
|
+
Bo as determineUserLevelFromClaims,
|
|
1322
|
+
Vt as domainCodeAtom,
|
|
1323
|
+
Vo as fed21Theme,
|
|
1324
|
+
Mt as getAuth0Expiry,
|
|
1325
|
+
Qe as getDomainOptionLabel,
|
|
1326
|
+
Wo as getValidBusinessRoles,
|
|
1327
|
+
Ko as internalAgSystemsTheme,
|
|
1333
1328
|
J as navBarOpenAtom,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1329
|
+
to as navBarTopAtom,
|
|
1330
|
+
Zt as navBarWidthClosedAtom,
|
|
1331
|
+
Jt as navBarWidthOpenAtom,
|
|
1332
|
+
so as simpleHashCode,
|
|
1333
|
+
qo as suppressConsole,
|
|
1334
|
+
Ee as titleTextAtom,
|
|
1335
|
+
eo as topBarHeightAtom,
|
|
1336
|
+
jt as topBarMiddleAtom,
|
|
1337
|
+
zo as unsuppressConsole,
|
|
1338
|
+
Ve as useAutocompleteOptions,
|
|
1339
|
+
Gt as useSaladBar,
|
|
1340
|
+
Ho as useValidDomains,
|
|
1341
|
+
Ro as withSaladBarProvider
|
|
1347
1342
|
};
|
|
1348
1343
|
//# sourceMappingURL=index.js.map
|