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