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