@australiangreens/ag-internal-components 0.0.60 → 0.0.61
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/FetchAutocomplete/FetchAutocomplete.d.ts +2 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +2 -1
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +476 -474
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
var It = Object.defineProperty, Dt = Object.defineProperties;
|
|
2
2
|
var Ot = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Z = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Ee = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var he = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
Ee.call(t, n) && he(e, n, t[n]);
|
|
8
8
|
if (Z)
|
|
9
9
|
for (var n of Z(t))
|
|
10
|
-
|
|
10
|
+
ye.call(t, n) && he(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, b = (e, t) => Dt(e, Ot(t));
|
|
13
|
+
var Be = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var r in e)
|
|
16
|
-
|
|
16
|
+
Ee.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
17
17
|
if (e != null && Z)
|
|
18
18
|
for (var r of Z(e))
|
|
19
|
-
t.indexOf(r) < 0 &&
|
|
19
|
+
t.indexOf(r) < 0 && ye.call(e, r) && (n[r] = e[r]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var l = (
|
|
22
|
+
var $e = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
+
var W = (e, t, n) => new Promise((r, a) => {
|
|
24
|
+
var l = (d) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
a(
|
|
26
|
+
m(n.next(d));
|
|
27
|
+
} catch (g) {
|
|
28
|
+
a(g);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, c = (d) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
a(
|
|
32
|
+
m(n.throw(d));
|
|
33
|
+
} catch (g) {
|
|
34
|
+
a(g);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, m = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(l, c);
|
|
37
|
+
m((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as $, Button as Tt, Paper as
|
|
39
|
+
import { jsxs as C, Fragment as B, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as D, createContext as je, useCallback as ne, useContext as Qe, useEffect as X, useMemo as kt, createElement as ve, useRef as ge } from "react";
|
|
41
|
+
import { Typography as $, Button as Tt, Paper as Ke, Box as S, Drawer as we, Autocomplete as xe, TextField as be, CircularProgress as Ae, Chip as Et, Tooltip as yt, Stack as Bt, styled as Se, IconButton as Q, Container as Je, useTheme as re, useMediaQuery as $t, Collapse as Nt, Avatar as Ne, Fade as Ft, Skeleton as Fe, Toolbar as Lt, Divider as Le, CssBaseline as Pt, Snackbar as Mt, Alert as _t, LinearProgress as Ht, FormHelperText as Rt } from "@mui/material";
|
|
42
42
|
import Wt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as M, createTheme as
|
|
43
|
+
import { styled as M, createTheme as Ye, alpha as fe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as zt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as ie } from "souvlaki";
|
|
46
|
-
import
|
|
47
|
-
import
|
|
46
|
+
import Ze from "@mui/material/List";
|
|
47
|
+
import Pe from "@mui/material/Button";
|
|
48
48
|
import Gt from "@mui/material/Dialog";
|
|
49
49
|
import Ut from "@mui/material/DialogActions";
|
|
50
50
|
import qt from "@mui/material/DialogContent";
|
|
51
51
|
import Vt from "@mui/material/DialogTitle";
|
|
52
|
-
import { Cancel as Xt, ArrowDropDown as jt, ArrowForward as
|
|
52
|
+
import { Cancel as Xt, ArrowDropDown as jt, ArrowForward as et, ArrowBack as tt, ViewHeadline as Qt } from "@mui/icons-material";
|
|
53
53
|
import Kt from "autosuggest-highlight/parse";
|
|
54
54
|
import Jt from "autosuggest-highlight/match";
|
|
55
|
-
import { atom as _, useSetAtom as
|
|
55
|
+
import { atom as _, useSetAtom as nt, useAtom as G, getDefaultStore as Yt, Provider as ot } from "jotai";
|
|
56
56
|
import { useHydrateAtoms as Zt } from "jotai/utils";
|
|
57
57
|
function go({ text: e }) {
|
|
58
|
-
const [t, n] =
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
const [t, n] = D(0);
|
|
59
|
+
return /* @__PURE__ */ C(B, { children: [
|
|
60
60
|
/* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
61
61
|
/* @__PURE__ */ o($, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
62
|
/* @__PURE__ */ o(
|
|
@@ -68,25 +68,25 @@ function go({ text: e }) {
|
|
|
68
68
|
children: "Hello I am a button"
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ C("p", { children: [
|
|
72
72
|
"This is some text: ",
|
|
73
73
|
/* @__PURE__ */ o("span", { children: e })
|
|
74
74
|
] }),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ C(Ke, { children: [
|
|
76
76
|
"This number will incremember when button pressed: ",
|
|
77
77
|
t
|
|
78
78
|
] })
|
|
79
79
|
] });
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
root: `${
|
|
83
|
-
menuButton: `${
|
|
84
|
-
hide: `${
|
|
85
|
-
content: `${
|
|
86
|
-
userInfoHolder: `${
|
|
87
|
-
settings: `${
|
|
88
|
-
pieChartIcon: `${
|
|
89
|
-
}, en = M(
|
|
81
|
+
const rt = 330, it = 73, z = "Navbar", V = {
|
|
82
|
+
root: `${z}-root`,
|
|
83
|
+
menuButton: `${z}-menuButton`,
|
|
84
|
+
hide: `${z}-hide`,
|
|
85
|
+
content: `${z}-content`,
|
|
86
|
+
userInfoHolder: `${z}-userInfoHolder`,
|
|
87
|
+
settings: `${z}-settings`,
|
|
88
|
+
pieChartIcon: `${z}-pieChartIcon`
|
|
89
|
+
}, en = M(S, {
|
|
90
90
|
name: "NavBar"
|
|
91
91
|
})(({ theme: e }) => ({
|
|
92
92
|
[`&.${V.root}`]: {
|
|
@@ -107,7 +107,7 @@ const ot = 330, rt = 73, W = "Navbar", V = {
|
|
|
107
107
|
marginTop: "64px",
|
|
108
108
|
marginBottom: "16px"
|
|
109
109
|
}
|
|
110
|
-
})),
|
|
110
|
+
})), at = () => ({
|
|
111
111
|
position: "absolute",
|
|
112
112
|
height: "100%",
|
|
113
113
|
overflowX: "hidden",
|
|
@@ -116,13 +116,13 @@ const ot = 330, rt = 73, W = "Navbar", V = {
|
|
|
116
116
|
backgroundColor: "black"
|
|
117
117
|
// backgroundColor: '#e8e8e8',
|
|
118
118
|
}), tn = () => i({
|
|
119
|
-
width: ot
|
|
120
|
-
}, it()), nn = () => i({
|
|
121
119
|
width: rt
|
|
122
|
-
},
|
|
120
|
+
}, at()), nn = () => i({
|
|
121
|
+
width: it
|
|
122
|
+
}, at()), on = M(we, {
|
|
123
123
|
shouldForwardProp: (e) => e !== "open"
|
|
124
124
|
})(({ theme: e, open: t }) => i(i({
|
|
125
|
-
width: t ?
|
|
125
|
+
width: t ? rt : it,
|
|
126
126
|
flexShrink: 0,
|
|
127
127
|
whiteSpace: "nowrap",
|
|
128
128
|
boxSizing: "border-box",
|
|
@@ -132,34 +132,34 @@ const ot = 330, rt = 73, W = "Navbar", V = {
|
|
|
132
132
|
}), !t && {
|
|
133
133
|
"& .MuiDrawer-paper": nn()
|
|
134
134
|
}));
|
|
135
|
-
class
|
|
135
|
+
class Ie extends zt {
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
const
|
|
137
|
+
$e(Ie, "errorName", "ContextError");
|
|
138
|
+
const st = je(null), rn = {}, an = {}, sn = ({
|
|
139
139
|
overrideState: e = rn,
|
|
140
140
|
overrideActions: t = an,
|
|
141
141
|
children: n
|
|
142
142
|
}) => {
|
|
143
|
-
const [{ open: r }, a] =
|
|
144
|
-
a({ open:
|
|
145
|
-
}, []),
|
|
146
|
-
a((
|
|
147
|
-
}, []),
|
|
143
|
+
const [{ open: r }, a] = D({ open: !0 }), l = ne((d) => {
|
|
144
|
+
a({ open: d });
|
|
145
|
+
}, []), c = ne(() => {
|
|
146
|
+
a((d) => b(i({}, d), { open: !d.open }));
|
|
147
|
+
}, []), m = i(i({
|
|
148
148
|
open: r,
|
|
149
149
|
setOpen: l,
|
|
150
|
-
toggleOpen:
|
|
150
|
+
toggleOpen: c
|
|
151
151
|
}, e), t);
|
|
152
|
-
return /* @__PURE__ */ o(
|
|
152
|
+
return /* @__PURE__ */ o(st.Provider, { value: m, children: n });
|
|
153
153
|
}, ln = () => {
|
|
154
|
-
const e =
|
|
154
|
+
const e = Qe(st);
|
|
155
155
|
if (e === null)
|
|
156
|
-
throw new
|
|
156
|
+
throw new Ie("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
157
157
|
return e;
|
|
158
158
|
}, cn = (e = {}) => i({
|
|
159
159
|
open: !0
|
|
160
160
|
}, e), fo = ie(
|
|
161
161
|
(e = cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(sn, { overrideState: e, overrideActions: t, children: n })
|
|
162
|
-
),
|
|
162
|
+
), Me = 7, mo = M(Ze)(({ theme: e }) => ({
|
|
163
163
|
backgroundColor: "black",
|
|
164
164
|
color: "white",
|
|
165
165
|
"& .MuiListItem-root": {
|
|
@@ -168,7 +168,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
|
|
|
168
168
|
"& .MuiListItemButton-root": {
|
|
169
169
|
" .MuiListItemIcon-root": {
|
|
170
170
|
color: "white",
|
|
171
|
-
padding: `${
|
|
171
|
+
padding: `${Me}px`
|
|
172
172
|
},
|
|
173
173
|
// Focus state
|
|
174
174
|
"&.Mui-focusVisible": {
|
|
@@ -179,7 +179,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
|
|
|
179
179
|
borderLeftStyle: "solid",
|
|
180
180
|
borderLeftWidth: "7px",
|
|
181
181
|
borderLeftColor: e.palette.primary.main,
|
|
182
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
182
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
|
|
183
183
|
},
|
|
184
184
|
// Hover state
|
|
185
185
|
"&:hover": {
|
|
@@ -197,7 +197,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
|
|
|
197
197
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
198
198
|
// },
|
|
199
199
|
}
|
|
200
|
-
})),
|
|
200
|
+
})), _e = 7, Co = M(Ze)(({ theme: e }) => ({
|
|
201
201
|
backgroundColor: "#e8e8e8",
|
|
202
202
|
color: "inherit",
|
|
203
203
|
"& .MuiListItem-root": {
|
|
@@ -206,7 +206,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
|
|
|
206
206
|
"& .MuiListItemButton-root": {
|
|
207
207
|
" .MuiListItemIcon-root": {
|
|
208
208
|
color: "inherit",
|
|
209
|
-
padding: `${
|
|
209
|
+
padding: `${_e}px`
|
|
210
210
|
},
|
|
211
211
|
// Focus state
|
|
212
212
|
"&.Mui-focusVisible": {
|
|
@@ -217,7 +217,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
|
|
|
217
217
|
borderLeftStyle: "solid",
|
|
218
218
|
borderLeftWidth: "7px",
|
|
219
219
|
borderLeftColor: e.palette.primary.main,
|
|
220
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
220
|
+
paddingLeft: `calc(${e.spacing(2)} - ${_e}px)`
|
|
221
221
|
},
|
|
222
222
|
// Hover state
|
|
223
223
|
"&:hover": {
|
|
@@ -241,7 +241,7 @@ function vo({
|
|
|
241
241
|
children: t
|
|
242
242
|
}) {
|
|
243
243
|
const { open: n } = ln();
|
|
244
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ C(en, { className: V.root, "data-testid": e, children: [
|
|
245
245
|
/* @__PURE__ */ o(Wt, {}),
|
|
246
246
|
/* @__PURE__ */ o(
|
|
247
247
|
on,
|
|
@@ -262,42 +262,42 @@ const dn = ({
|
|
|
262
262
|
maxWidth: r,
|
|
263
263
|
primaryButton: a,
|
|
264
264
|
secondaryButton: l,
|
|
265
|
-
onClose:
|
|
265
|
+
onClose: c
|
|
266
266
|
}) => {
|
|
267
|
-
var
|
|
268
|
-
const [
|
|
269
|
-
return /* @__PURE__ */
|
|
267
|
+
var g, w;
|
|
268
|
+
const [m, d] = D(!1);
|
|
269
|
+
return /* @__PURE__ */ C(
|
|
270
270
|
Gt,
|
|
271
271
|
{
|
|
272
272
|
open: e,
|
|
273
273
|
onClose: () => {
|
|
274
|
-
|
|
274
|
+
m || c();
|
|
275
275
|
},
|
|
276
276
|
fullWidth: !0,
|
|
277
277
|
maxWidth: r != null ? r : "xs",
|
|
278
278
|
children: [
|
|
279
279
|
/* @__PURE__ */ o(Vt, { children: t }),
|
|
280
280
|
/* @__PURE__ */ o(qt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ C(Ut, { children: [
|
|
282
282
|
/* @__PURE__ */ o(
|
|
283
|
-
|
|
283
|
+
Pe,
|
|
284
284
|
{
|
|
285
|
-
onClick: (
|
|
285
|
+
onClick: (g = l == null ? void 0 : l.onClick) != null ? g : c,
|
|
286
286
|
"data-testid": l == null ? void 0 : l.testId,
|
|
287
|
-
disabled: (l == null ? void 0 : l.disabled) ||
|
|
287
|
+
disabled: (l == null ? void 0 : l.disabled) || m,
|
|
288
288
|
color: l == null ? void 0 : l.buttonColor,
|
|
289
|
-
children: (
|
|
289
|
+
children: (w = l == null ? void 0 : l.text) != null ? w : "Cancel"
|
|
290
290
|
}
|
|
291
291
|
),
|
|
292
292
|
a && /* @__PURE__ */ o(
|
|
293
|
-
|
|
293
|
+
Pe,
|
|
294
294
|
{
|
|
295
|
-
onClick: () =>
|
|
296
|
-
var
|
|
297
|
-
|
|
295
|
+
onClick: () => W(void 0, null, function* () {
|
|
296
|
+
var x;
|
|
297
|
+
d(!0), yield (x = a.onClick) == null ? void 0 : x.call(a), d(!1);
|
|
298
298
|
}),
|
|
299
299
|
"data-testid": a.testId,
|
|
300
|
-
disabled: a.disabled ||
|
|
300
|
+
disabled: a.disabled || m,
|
|
301
301
|
color: a == null ? void 0 : a.buttonColor,
|
|
302
302
|
children: a.text
|
|
303
303
|
}
|
|
@@ -308,111 +308,112 @@ const dn = ({
|
|
|
308
308
|
);
|
|
309
309
|
};
|
|
310
310
|
function wo({
|
|
311
|
-
lookup: e = () =>
|
|
311
|
+
lookup: e = () => W(this, null, function* () {
|
|
312
312
|
}),
|
|
313
313
|
enableHighlighting: t = !0,
|
|
314
314
|
onChange: n,
|
|
315
315
|
minLength: r,
|
|
316
316
|
label: a,
|
|
317
317
|
value: l,
|
|
318
|
-
dataTestidPrefix:
|
|
319
|
-
sx:
|
|
320
|
-
textFieldColor:
|
|
321
|
-
|
|
318
|
+
dataTestidPrefix: c,
|
|
319
|
+
sx: m,
|
|
320
|
+
textFieldColor: d,
|
|
321
|
+
textFieldVariant: g = "filled",
|
|
322
|
+
loadingText: w = "Loading...",
|
|
322
323
|
noOptionsText: x = "No options",
|
|
323
|
-
popupIcon:
|
|
324
|
-
error:
|
|
325
|
-
helperText:
|
|
326
|
-
preLoadedOptions:
|
|
324
|
+
popupIcon: A = /* @__PURE__ */ o(jt, {}),
|
|
325
|
+
error: v = !1,
|
|
326
|
+
helperText: O = "",
|
|
327
|
+
preLoadedOptions: f = void 0
|
|
327
328
|
}) {
|
|
328
|
-
const [h,
|
|
329
|
-
const
|
|
330
|
-
n(
|
|
329
|
+
const [h, I] = D(""), [E, N] = D(f || []), [F, L] = D(!1), [k, P] = D(!1), q = (p, s) => {
|
|
330
|
+
const u = l.filter((y) => y.id !== s);
|
|
331
|
+
n(u, "delete", p);
|
|
331
332
|
};
|
|
332
333
|
X(() => {
|
|
333
|
-
let
|
|
334
|
-
const
|
|
335
|
-
|
|
334
|
+
let p;
|
|
335
|
+
const s = () => W(this, null, function* () {
|
|
336
|
+
p = new AbortController();
|
|
336
337
|
try {
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
} catch (
|
|
340
|
-
if (
|
|
338
|
+
const u = yield e(h, p.signal);
|
|
339
|
+
N(u != null ? u : []), P(!1);
|
|
340
|
+
} catch (u) {
|
|
341
|
+
if (u instanceof Error && u.name === "AbortError")
|
|
341
342
|
console.debug("Previous lookup request was cancelled");
|
|
342
343
|
else
|
|
343
|
-
throw
|
|
344
|
+
throw u;
|
|
344
345
|
}
|
|
345
346
|
});
|
|
346
347
|
if (h !== "")
|
|
347
|
-
return (!r || h.length >= r) && !
|
|
348
|
-
|
|
348
|
+
return (!r || h.length >= r) && !f ? (P(!0), s()) : P(!1), function() {
|
|
349
|
+
p && p.abort();
|
|
349
350
|
};
|
|
350
|
-
}, [h, e, r,
|
|
351
|
-
!
|
|
352
|
-
}, [
|
|
353
|
-
const
|
|
354
|
-
(
|
|
355
|
-
) : (
|
|
356
|
-
return /* @__PURE__ */
|
|
351
|
+
}, [h, e, r, f]), X(() => {
|
|
352
|
+
!F && !f && N([]), !F && f && N(f);
|
|
353
|
+
}, [F, f]);
|
|
354
|
+
const H = kt(() => f ? (p, s) => p.filter(
|
|
355
|
+
(u) => u.label.toLowerCase().includes(s.inputValue.toLowerCase())
|
|
356
|
+
) : (p) => p, [f]);
|
|
357
|
+
return /* @__PURE__ */ C(B, { children: [
|
|
357
358
|
/* @__PURE__ */ o(
|
|
358
|
-
|
|
359
|
+
xe,
|
|
359
360
|
{
|
|
360
|
-
sx:
|
|
361
|
-
"data-testid":
|
|
361
|
+
sx: m,
|
|
362
|
+
"data-testid": c ? c + "Autocomplete" : void 0,
|
|
362
363
|
disablePortal: !0,
|
|
363
364
|
multiple: !0,
|
|
364
|
-
getOptionLabel: (
|
|
365
|
-
filterOptions:
|
|
366
|
-
loading:
|
|
367
|
-
options: [...l, ...
|
|
365
|
+
getOptionLabel: (p) => typeof p == "string" ? p : p.label,
|
|
366
|
+
filterOptions: H,
|
|
367
|
+
loading: k,
|
|
368
|
+
options: [...l, ...E],
|
|
368
369
|
filterSelectedOptions: !0,
|
|
369
370
|
includeInputInList: !0,
|
|
370
371
|
value: l,
|
|
371
|
-
onOpen: () =>
|
|
372
|
-
onClose: () =>
|
|
373
|
-
onChange: (
|
|
374
|
-
n(
|
|
372
|
+
onOpen: () => L(!0),
|
|
373
|
+
onClose: () => L(!1),
|
|
374
|
+
onChange: (p, s, u) => {
|
|
375
|
+
n(s, u, p);
|
|
375
376
|
},
|
|
376
|
-
onInputChange: (
|
|
377
|
+
onInputChange: (p, s) => I(s),
|
|
377
378
|
noOptionsText: x,
|
|
378
|
-
loadingText:
|
|
379
|
-
popupIcon:
|
|
380
|
-
renderInput: (
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
loadingText: w,
|
|
380
|
+
popupIcon: A,
|
|
381
|
+
renderInput: (p) => /* @__PURE__ */ o(
|
|
382
|
+
be,
|
|
383
|
+
b(i({}, p), {
|
|
383
384
|
label: a,
|
|
384
385
|
fullWidth: !0,
|
|
385
|
-
variant:
|
|
386
|
-
error:
|
|
387
|
-
helperText:
|
|
388
|
-
InputProps:
|
|
389
|
-
endAdornment: /* @__PURE__ */
|
|
390
|
-
|
|
391
|
-
|
|
386
|
+
variant: g,
|
|
387
|
+
error: v,
|
|
388
|
+
helperText: O,
|
|
389
|
+
InputProps: b(i({}, p.InputProps), {
|
|
390
|
+
endAdornment: /* @__PURE__ */ C(B, { children: [
|
|
391
|
+
k ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20 }) : null,
|
|
392
|
+
p.InputProps.endAdornment
|
|
392
393
|
] })
|
|
393
394
|
}),
|
|
394
|
-
"data-testid":
|
|
395
|
-
onKeyDown: (
|
|
396
|
-
(
|
|
395
|
+
"data-testid": c ? c + "TextField" : void 0,
|
|
396
|
+
onKeyDown: (s) => {
|
|
397
|
+
(s.key === "Backspace" || s.key === "Delete") && s.stopPropagation();
|
|
397
398
|
},
|
|
398
|
-
color:
|
|
399
|
+
color: d
|
|
399
400
|
})
|
|
400
401
|
),
|
|
401
402
|
renderTags: () => null,
|
|
402
|
-
isOptionEqualToValue: (
|
|
403
|
-
renderOption: (
|
|
403
|
+
isOptionEqualToValue: (p, s) => p.id === s.id,
|
|
404
|
+
renderOption: (p, s, u) => {
|
|
404
405
|
if (t) {
|
|
405
|
-
const
|
|
406
|
+
const y = Jt(s.label, u.inputValue, {
|
|
406
407
|
insideWords: !0,
|
|
407
408
|
findAllOccurrences: !0
|
|
408
|
-
}),
|
|
409
|
-
return /* @__PURE__ */
|
|
409
|
+
}), se = Kt(s.label, y);
|
|
410
|
+
return /* @__PURE__ */ ve(
|
|
410
411
|
"li",
|
|
411
|
-
|
|
412
|
-
key:
|
|
413
|
-
"data-testid":
|
|
412
|
+
b(i({}, p), {
|
|
413
|
+
key: s.id,
|
|
414
|
+
"data-testid": c ? c + "li" + s.id.toString() : void 0
|
|
414
415
|
}),
|
|
415
|
-
/* @__PURE__ */ o("div", { children:
|
|
416
|
+
/* @__PURE__ */ o("div", { children: se.map((K, le) => /* @__PURE__ */ o(
|
|
416
417
|
"span",
|
|
417
418
|
{
|
|
418
419
|
style: {
|
|
@@ -420,22 +421,22 @@ function wo({
|
|
|
420
421
|
},
|
|
421
422
|
children: K.text
|
|
422
423
|
},
|
|
423
|
-
|
|
424
|
+
le
|
|
424
425
|
)) })
|
|
425
426
|
);
|
|
426
427
|
} else
|
|
427
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ ve(
|
|
428
429
|
"li",
|
|
429
|
-
|
|
430
|
-
key:
|
|
431
|
-
"data-testid":
|
|
430
|
+
b(i({}, p), {
|
|
431
|
+
key: s.id,
|
|
432
|
+
"data-testid": c ? c + "li" + s.id.toString() : void 0
|
|
432
433
|
}),
|
|
433
|
-
|
|
434
|
+
s.label
|
|
434
435
|
);
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
438
|
),
|
|
438
|
-
l.length > 0 && /* @__PURE__ */ o(
|
|
439
|
+
l.length > 0 && /* @__PURE__ */ o(S, { children: l.map((p) => /* @__PURE__ */ o(
|
|
439
440
|
Et,
|
|
440
441
|
{
|
|
441
442
|
sx: {
|
|
@@ -446,7 +447,7 @@ function wo({
|
|
|
446
447
|
label: /* @__PURE__ */ o(
|
|
447
448
|
yt,
|
|
448
449
|
{
|
|
449
|
-
title:
|
|
450
|
+
title: p.tooltipContent || "",
|
|
450
451
|
placement: "bottom-start",
|
|
451
452
|
PopperProps: {
|
|
452
453
|
modifiers: [
|
|
@@ -458,19 +459,19 @@ function wo({
|
|
|
458
459
|
}
|
|
459
460
|
]
|
|
460
461
|
},
|
|
461
|
-
children: /* @__PURE__ */ o($, { style: { whiteSpace: "normal" }, children:
|
|
462
|
+
children: /* @__PURE__ */ o($, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
|
|
462
463
|
}
|
|
463
464
|
),
|
|
464
|
-
"data-testid":
|
|
465
|
-
onDelete: (
|
|
465
|
+
"data-testid": c ? c + "Chip" + p.id.toString() : void 0,
|
|
466
|
+
onDelete: (s) => q(s, p.id),
|
|
466
467
|
deleteIcon: /* @__PURE__ */ o(
|
|
467
468
|
Xt,
|
|
468
469
|
{
|
|
469
|
-
"data-testid":
|
|
470
|
+
"data-testid": c ? c + "ChipDelete" + p.id.toString() : "CancelIcon"
|
|
470
471
|
}
|
|
471
472
|
)
|
|
472
473
|
},
|
|
473
|
-
|
|
474
|
+
p.id
|
|
474
475
|
)) })
|
|
475
476
|
] });
|
|
476
477
|
}
|
|
@@ -481,16 +482,17 @@ const xo = ({
|
|
|
481
482
|
value: r,
|
|
482
483
|
sx: a,
|
|
483
484
|
textFieldColor: l,
|
|
484
|
-
|
|
485
|
-
|
|
485
|
+
textFieldVariant: c = "filled",
|
|
486
|
+
dataTestidPrefix: m = "",
|
|
487
|
+
minLength: d = 3
|
|
486
488
|
}) => {
|
|
487
|
-
const [
|
|
488
|
-
let
|
|
489
|
-
const
|
|
490
|
-
|
|
489
|
+
const [g, w] = D([]), [x, A] = D(!1);
|
|
490
|
+
let v;
|
|
491
|
+
const O = (f) => W(void 0, null, function* () {
|
|
492
|
+
v = new AbortController();
|
|
491
493
|
try {
|
|
492
|
-
const h = yield e(
|
|
493
|
-
|
|
494
|
+
const h = yield e(f, v.signal);
|
|
495
|
+
w(h != null ? h : []), A(!1);
|
|
494
496
|
} catch (h) {
|
|
495
497
|
if (h instanceof Error && h.name === "AbortError")
|
|
496
498
|
console.debug("Previous lookup request was cancelled");
|
|
@@ -499,68 +501,68 @@ const xo = ({
|
|
|
499
501
|
}
|
|
500
502
|
});
|
|
501
503
|
return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(Bt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
502
|
-
|
|
504
|
+
xe,
|
|
503
505
|
{
|
|
504
506
|
sx: a,
|
|
505
|
-
"data-testid":
|
|
507
|
+
"data-testid": m ? m + "Autocomplete" : void 0,
|
|
506
508
|
loading: x,
|
|
507
|
-
options:
|
|
508
|
-
onChange: (
|
|
509
|
-
t(
|
|
509
|
+
options: g,
|
|
510
|
+
onChange: (f, h) => {
|
|
511
|
+
t(f, h);
|
|
510
512
|
},
|
|
511
|
-
filterOptions: (
|
|
513
|
+
filterOptions: (f) => f,
|
|
512
514
|
value: r,
|
|
513
|
-
getOptionLabel: (
|
|
514
|
-
renderInput: (
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
"data-testid":
|
|
518
|
-
},
|
|
519
|
-
variant:
|
|
515
|
+
getOptionLabel: (f) => f.label,
|
|
516
|
+
renderInput: (f) => /* @__PURE__ */ o(
|
|
517
|
+
be,
|
|
518
|
+
b(i({
|
|
519
|
+
"data-testid": m ? m + "TextField" : void 0
|
|
520
|
+
}, f), {
|
|
521
|
+
variant: c,
|
|
520
522
|
label: n,
|
|
521
523
|
color: l
|
|
522
524
|
})
|
|
523
525
|
),
|
|
524
|
-
isOptionEqualToValue: (
|
|
525
|
-
onInputChange: (
|
|
526
|
-
(h == null ? void 0 : h.length) >=
|
|
526
|
+
isOptionEqualToValue: (f, h) => f.id === h.id,
|
|
527
|
+
onInputChange: (f, h) => {
|
|
528
|
+
(h == null ? void 0 : h.length) >= d && (A(!0), O(h));
|
|
527
529
|
},
|
|
528
|
-
renderOption: (
|
|
530
|
+
renderOption: (f, h) => /* @__PURE__ */ ve(
|
|
529
531
|
"li",
|
|
530
|
-
|
|
532
|
+
b(i({}, f), {
|
|
531
533
|
key: h.id,
|
|
532
|
-
"data-testid":
|
|
534
|
+
"data-testid": m ? m + "li" + h.id.toString() : void 0
|
|
533
535
|
}),
|
|
534
536
|
h.label
|
|
535
537
|
)
|
|
536
538
|
}
|
|
537
539
|
) }) });
|
|
538
|
-
}, pn = 24, un = 64,
|
|
539
|
-
topStripe: `${
|
|
540
|
-
titleBar: `${
|
|
541
|
-
titleSlider: `${
|
|
542
|
-
titleText: `${
|
|
543
|
-
leftPanelButton: `${
|
|
544
|
-
rightPanelButton: `${
|
|
545
|
-
}, hn =
|
|
540
|
+
}, pn = 24, un = 64, U = "TopBar", T = {
|
|
541
|
+
topStripe: `${U}-topStripe`,
|
|
542
|
+
titleBar: `${U}-titleBar`,
|
|
543
|
+
titleSlider: `${U}-titleSlider`,
|
|
544
|
+
titleText: `${U}-titleText`,
|
|
545
|
+
leftPanelButton: `${U}-leftPanelButton`,
|
|
546
|
+
rightPanelButton: `${U}-leftPanelButton`
|
|
547
|
+
}, hn = Se("div", {
|
|
546
548
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
547
|
-
name:
|
|
549
|
+
name: U
|
|
548
550
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
549
551
|
var r, a;
|
|
550
552
|
return {
|
|
551
553
|
width: "100%",
|
|
552
|
-
[`& .${
|
|
554
|
+
[`& .${T.topStripe}`]: {
|
|
553
555
|
width: "100%",
|
|
554
556
|
height: `${pn}px`,
|
|
555
557
|
backgroundColor: e.palette.primary.main
|
|
556
558
|
},
|
|
557
|
-
[`& .${
|
|
559
|
+
[`& .${T.titleBar}`]: {
|
|
558
560
|
backgroundColor: e.palette.primary.light,
|
|
559
561
|
height: `${un}px`,
|
|
560
562
|
padding: e.spacing(0, 3),
|
|
561
563
|
width: "100%"
|
|
562
564
|
},
|
|
563
|
-
[`& .${
|
|
565
|
+
[`& .${T.titleSlider}`]: i(i({
|
|
564
566
|
height: "100%",
|
|
565
567
|
display: "flex",
|
|
566
568
|
alignItems: "center",
|
|
@@ -569,14 +571,14 @@ const xo = ({
|
|
|
569
571
|
easing: e.transitions.easing.sharp,
|
|
570
572
|
duration: e.transitions.duration.leavingScreen
|
|
571
573
|
}),
|
|
572
|
-
[`& .${
|
|
574
|
+
[`& .${T.leftPanelButton}`]: {
|
|
573
575
|
marginRight: e.spacing(2),
|
|
574
576
|
flexGrow: 0
|
|
575
577
|
},
|
|
576
|
-
[`& .${
|
|
578
|
+
[`& .${T.titleText}`]: {
|
|
577
579
|
flexGrow: 1
|
|
578
580
|
},
|
|
579
|
-
[`& .${
|
|
581
|
+
[`& .${T.rightPanelButton}`]: {
|
|
580
582
|
flexGrow: 0
|
|
581
583
|
}
|
|
582
584
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -600,13 +602,13 @@ function gn({
|
|
|
600
602
|
rightPanel: n,
|
|
601
603
|
"data-testid": r
|
|
602
604
|
}) {
|
|
603
|
-
return /* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */ o("div", { className:
|
|
605
|
-
/* @__PURE__ */ o("div", { className:
|
|
606
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ C(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
|
|
606
|
+
/* @__PURE__ */ o("div", { className: T.topStripe }),
|
|
607
|
+
/* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ C(S, { className: T.titleSlider, children: [
|
|
608
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ C(
|
|
607
609
|
Q,
|
|
608
610
|
{
|
|
609
|
-
className:
|
|
611
|
+
className: T.leftPanelButton,
|
|
610
612
|
color: "inherit",
|
|
611
613
|
"aria-label": "Open left side panel",
|
|
612
614
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -614,15 +616,15 @@ function gn({
|
|
|
614
616
|
size: "large",
|
|
615
617
|
children: [
|
|
616
618
|
" ",
|
|
617
|
-
/* @__PURE__ */ o(
|
|
619
|
+
/* @__PURE__ */ o(et, {})
|
|
618
620
|
]
|
|
619
621
|
}
|
|
620
622
|
),
|
|
621
|
-
/* @__PURE__ */ o($, { className:
|
|
622
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ o($, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
624
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ C(
|
|
623
625
|
Q,
|
|
624
626
|
{
|
|
625
|
-
className:
|
|
627
|
+
className: T.rightPanelButton,
|
|
626
628
|
color: "inherit",
|
|
627
629
|
"aria-label": "Open right side panel",
|
|
628
630
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -630,14 +632,14 @@ function gn({
|
|
|
630
632
|
size: "large",
|
|
631
633
|
children: [
|
|
632
634
|
" ",
|
|
633
|
-
/* @__PURE__ */ o(
|
|
635
|
+
/* @__PURE__ */ o(tt, {})
|
|
634
636
|
]
|
|
635
637
|
}
|
|
636
638
|
)
|
|
637
639
|
] }) })
|
|
638
640
|
] });
|
|
639
641
|
}
|
|
640
|
-
const
|
|
642
|
+
const lt = 400, fn = Se(we, {
|
|
641
643
|
shouldForwardProp: (e) => (
|
|
642
644
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
643
645
|
![
|
|
@@ -667,9 +669,9 @@ const st = 400, fn = Ae(ve, {
|
|
|
667
669
|
marginLeft: `${a}px`
|
|
668
670
|
}))
|
|
669
671
|
})
|
|
670
|
-
), mn =
|
|
672
|
+
), mn = Se(S, {
|
|
671
673
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
672
|
-
})(({ theme: e, anchor: t }) =>
|
|
674
|
+
})(({ theme: e, anchor: t }) => b(i({
|
|
673
675
|
display: "flex",
|
|
674
676
|
alignItems: "center",
|
|
675
677
|
padding: e.spacing(2)
|
|
@@ -687,50 +689,50 @@ const st = 400, fn = Ae(ve, {
|
|
|
687
689
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
688
690
|
}
|
|
689
691
|
}));
|
|
690
|
-
function
|
|
692
|
+
function He({
|
|
691
693
|
children: e,
|
|
692
694
|
anchor: t = "left",
|
|
693
695
|
open: n,
|
|
694
696
|
onClose: r = () => {
|
|
695
697
|
},
|
|
696
698
|
titleText: a = "",
|
|
697
|
-
width: l =
|
|
698
|
-
showCloseArrow:
|
|
699
|
-
debugOpacity:
|
|
700
|
-
headerBoxProps:
|
|
701
|
-
onOpened:
|
|
702
|
-
onClosed:
|
|
703
|
-
"data-testid":
|
|
704
|
-
navBarOpen:
|
|
705
|
-
navBarWidthOpen:
|
|
706
|
-
navBarWidthClosed:
|
|
699
|
+
width: l = lt,
|
|
700
|
+
showCloseArrow: c = !0,
|
|
701
|
+
debugOpacity: m = !1,
|
|
702
|
+
headerBoxProps: d = {},
|
|
703
|
+
onOpened: g,
|
|
704
|
+
onClosed: w,
|
|
705
|
+
"data-testid": x,
|
|
706
|
+
navBarOpen: A = !1,
|
|
707
|
+
navBarWidthOpen: v = 0,
|
|
708
|
+
navBarWidthClosed: O = 0
|
|
707
709
|
}) {
|
|
708
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ C(
|
|
709
711
|
fn,
|
|
710
712
|
{
|
|
711
713
|
SlideProps: {
|
|
712
|
-
onEntered: () =>
|
|
713
|
-
onExited: () =>
|
|
714
|
+
onEntered: () => g == null ? void 0 : g(),
|
|
715
|
+
onExited: () => w == null ? void 0 : w()
|
|
714
716
|
},
|
|
715
717
|
variant: "persistent",
|
|
716
718
|
anchor: t,
|
|
717
719
|
open: n,
|
|
718
720
|
width: l,
|
|
719
|
-
debugOpacity:
|
|
720
|
-
"data-testid":
|
|
721
|
-
navBarOpen:
|
|
722
|
-
navBarWidthOpen:
|
|
723
|
-
navBarWidthClosed:
|
|
721
|
+
debugOpacity: m,
|
|
722
|
+
"data-testid": x,
|
|
723
|
+
navBarOpen: A,
|
|
724
|
+
navBarWidthOpen: v,
|
|
725
|
+
navBarWidthClosed: O,
|
|
724
726
|
children: [
|
|
725
|
-
/* @__PURE__ */ o(mn,
|
|
727
|
+
/* @__PURE__ */ o(mn, b(i({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ C(B, { children: [
|
|
726
728
|
/* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a }),
|
|
727
|
-
|
|
728
|
-
/* @__PURE__ */ o(
|
|
729
|
+
c && /* @__PURE__ */ C(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
|
|
730
|
+
/* @__PURE__ */ o(tt, { "data-testid": "arrowbackicon" }),
|
|
729
731
|
" "
|
|
730
732
|
] })
|
|
731
|
-
] }) : /* @__PURE__ */
|
|
732
|
-
|
|
733
|
-
/* @__PURE__ */ o(
|
|
733
|
+
] }) : /* @__PURE__ */ C(B, { children: [
|
|
734
|
+
c && /* @__PURE__ */ C(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
|
|
735
|
+
/* @__PURE__ */ o(et, {}),
|
|
734
736
|
" "
|
|
735
737
|
] }),
|
|
736
738
|
/* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a })
|
|
@@ -740,7 +742,7 @@ function _e({
|
|
|
740
742
|
}
|
|
741
743
|
);
|
|
742
744
|
}
|
|
743
|
-
const Cn = M(
|
|
745
|
+
const Cn = M(S, {
|
|
744
746
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
745
747
|
name: "PanelAwareMargins"
|
|
746
748
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -763,17 +765,17 @@ const Cn = M(I, {
|
|
|
763
765
|
}),
|
|
764
766
|
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
765
767
|
});
|
|
766
|
-
}), vn = M(
|
|
768
|
+
}), vn = M(Je, {
|
|
767
769
|
name: "PageContainer"
|
|
768
770
|
})(({ theme: e }) => ({
|
|
769
771
|
// Horizontal padding comes from the Container's gutter
|
|
770
772
|
paddingTop: e.spacing(3),
|
|
771
773
|
paddingBottom: e.spacing(3)
|
|
772
774
|
// TODO: Remove max width
|
|
773
|
-
})),
|
|
775
|
+
})), me = !1, Ce = !1, ee = {
|
|
774
776
|
titleText: "",
|
|
775
777
|
flavour: "push",
|
|
776
|
-
width:
|
|
778
|
+
width: lt,
|
|
777
779
|
arrowButtons: "both",
|
|
778
780
|
startOpen: !1,
|
|
779
781
|
open: void 0,
|
|
@@ -790,32 +792,32 @@ function bo({
|
|
|
790
792
|
rightPanel: r,
|
|
791
793
|
sidePanelsAreMutuallyExclusive: a = !0,
|
|
792
794
|
debugOpacity: l = !1,
|
|
793
|
-
pageContainerProps:
|
|
794
|
-
pageContentDataTestId:
|
|
795
|
-
topBarDataTestId:
|
|
796
|
-
navBarOpen:
|
|
797
|
-
navBarWidthOpen:
|
|
798
|
-
navBarWidthClosed:
|
|
795
|
+
pageContainerProps: c,
|
|
796
|
+
pageContentDataTestId: m,
|
|
797
|
+
topBarDataTestId: d,
|
|
798
|
+
navBarOpen: g,
|
|
799
|
+
navBarWidthOpen: w,
|
|
800
|
+
navBarWidthClosed: x
|
|
799
801
|
}) {
|
|
800
|
-
const [
|
|
801
|
-
titleText:
|
|
802
|
-
content:
|
|
802
|
+
const [A, v] = D(me), [O, f] = D(Ce), [h, I] = D(me), [E, N] = D(Ce), F = n !== void 0, L = r !== void 0, {
|
|
803
|
+
titleText: k,
|
|
804
|
+
content: P,
|
|
803
805
|
flavour: q,
|
|
804
|
-
open:
|
|
805
|
-
onChangeOpen:
|
|
806
|
-
width:
|
|
807
|
-
arrowButtons:
|
|
808
|
-
startOpen:
|
|
809
|
-
onOpened:
|
|
810
|
-
onClosed:
|
|
811
|
-
dataTestId:
|
|
806
|
+
open: H,
|
|
807
|
+
onChangeOpen: p,
|
|
808
|
+
width: s,
|
|
809
|
+
arrowButtons: u,
|
|
810
|
+
startOpen: y,
|
|
811
|
+
onOpened: se,
|
|
812
|
+
onClosed: K,
|
|
813
|
+
dataTestId: le
|
|
812
814
|
} = n ? i(i({}, ee), n) : i({}, ee), {
|
|
813
815
|
titleText: wt,
|
|
814
816
|
content: xt,
|
|
815
|
-
flavour:
|
|
816
|
-
open:
|
|
817
|
-
onChangeOpen:
|
|
818
|
-
width:
|
|
817
|
+
flavour: De,
|
|
818
|
+
open: ce,
|
|
819
|
+
onChangeOpen: Oe,
|
|
820
|
+
width: de,
|
|
819
821
|
arrowButtons: J,
|
|
820
822
|
startOpen: Y,
|
|
821
823
|
onOpened: bt,
|
|
@@ -823,51 +825,51 @@ function bo({
|
|
|
823
825
|
dataTestId: St
|
|
824
826
|
} = r ? i(i({}, ee), r) : i({}, ee);
|
|
825
827
|
X(() => {
|
|
826
|
-
|
|
827
|
-
}, [
|
|
828
|
-
Y !==
|
|
828
|
+
y !== me && (v(y), I(y));
|
|
829
|
+
}, [y]), X(() => {
|
|
830
|
+
Y !== Ce && (f(Y), N(Y));
|
|
829
831
|
}, [Y]);
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
},
|
|
833
|
-
|
|
832
|
+
const pe = H === void 0 ? A : H, ue = ce === void 0 ? O : ce, ke = (R) => {
|
|
833
|
+
H === void 0 && (v(R), a && L && (R ? (f(!1), N(O)) : f(E))), p && p(R);
|
|
834
|
+
}, Te = (R) => {
|
|
835
|
+
ce === void 0 && (f(R), a && F && (R ? (v(!1), I(A)) : v(h))), Oe && Oe(R);
|
|
834
836
|
};
|
|
835
|
-
return /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ C(S, { children: [
|
|
836
838
|
F && /* @__PURE__ */ o(
|
|
837
|
-
|
|
839
|
+
He,
|
|
838
840
|
{
|
|
839
|
-
"data-testid":
|
|
841
|
+
"data-testid": le,
|
|
840
842
|
anchor: "left",
|
|
841
|
-
open:
|
|
842
|
-
onClose: () =>
|
|
843
|
-
width:
|
|
844
|
-
titleText:
|
|
843
|
+
open: pe,
|
|
844
|
+
onClose: () => ke(!1),
|
|
845
|
+
width: s,
|
|
846
|
+
titleText: k,
|
|
845
847
|
debugOpacity: l,
|
|
846
|
-
showCloseArrow:
|
|
847
|
-
onOpened:
|
|
848
|
-
onClosed:
|
|
849
|
-
navBarOpen:
|
|
850
|
-
navBarWidthOpen:
|
|
851
|
-
navBarWidthClosed:
|
|
852
|
-
children:
|
|
848
|
+
showCloseArrow: u === "both" || u === "close",
|
|
849
|
+
onOpened: se,
|
|
850
|
+
onClosed: K,
|
|
851
|
+
navBarOpen: g,
|
|
852
|
+
navBarWidthOpen: w,
|
|
853
|
+
navBarWidthClosed: x,
|
|
854
|
+
children: P
|
|
853
855
|
}
|
|
854
856
|
),
|
|
855
857
|
L && /* @__PURE__ */ o(
|
|
856
|
-
|
|
858
|
+
He,
|
|
857
859
|
{
|
|
858
860
|
"data-testid": St,
|
|
859
861
|
anchor: "right",
|
|
860
|
-
open:
|
|
861
|
-
onClose: () =>
|
|
862
|
-
width:
|
|
862
|
+
open: ue,
|
|
863
|
+
onClose: () => Te(!1),
|
|
864
|
+
width: de,
|
|
863
865
|
titleText: wt,
|
|
864
866
|
debugOpacity: l,
|
|
865
867
|
showCloseArrow: J === "both" || J === "close",
|
|
866
868
|
onOpened: bt,
|
|
867
869
|
onClosed: At,
|
|
868
|
-
navBarOpen:
|
|
869
|
-
navBarWidthOpen:
|
|
870
|
-
navBarWidthClosed:
|
|
870
|
+
navBarOpen: g,
|
|
871
|
+
navBarWidthOpen: w,
|
|
872
|
+
navBarWidthClosed: x,
|
|
871
873
|
children: xt
|
|
872
874
|
}
|
|
873
875
|
),
|
|
@@ -875,45 +877,45 @@ function bo({
|
|
|
875
877
|
gn,
|
|
876
878
|
i(i({
|
|
877
879
|
titleText: t,
|
|
878
|
-
"data-testid":
|
|
880
|
+
"data-testid": d
|
|
879
881
|
}, F && q === "push" ? {
|
|
880
882
|
leftPanel: {
|
|
881
|
-
open: de,
|
|
882
|
-
width: p,
|
|
883
|
-
onOpen: () => Oe(!0),
|
|
884
|
-
showOpenArrow: v === "both" || v === "open"
|
|
885
|
-
}
|
|
886
|
-
} : {}), L && Ie === "push" ? {
|
|
887
|
-
rightPanel: {
|
|
888
883
|
open: pe,
|
|
889
|
-
width:
|
|
884
|
+
width: s,
|
|
890
885
|
onOpen: () => ke(!0),
|
|
886
|
+
showOpenArrow: u === "both" || u === "open"
|
|
887
|
+
}
|
|
888
|
+
} : {}), L && De === "push" ? {
|
|
889
|
+
rightPanel: {
|
|
890
|
+
open: ue,
|
|
891
|
+
width: de,
|
|
892
|
+
onOpen: () => Te(!0),
|
|
891
893
|
showOpenArrow: J === "both" || J === "open"
|
|
892
894
|
}
|
|
893
895
|
} : {})
|
|
894
896
|
),
|
|
895
897
|
/* @__PURE__ */ o(
|
|
896
898
|
Cn,
|
|
897
|
-
|
|
899
|
+
b(i(i({}, q === "push" ? {
|
|
898
900
|
leftPanel: {
|
|
899
|
-
open:
|
|
900
|
-
width:
|
|
901
|
+
open: pe,
|
|
902
|
+
width: s
|
|
901
903
|
}
|
|
902
|
-
} : {}),
|
|
904
|
+
} : {}), De === "push" ? {
|
|
903
905
|
rightPanel: {
|
|
904
|
-
open:
|
|
905
|
-
width:
|
|
906
|
+
open: ue,
|
|
907
|
+
width: de
|
|
906
908
|
}
|
|
907
909
|
} : {}), {
|
|
908
|
-
children: /* @__PURE__ */ o(vn,
|
|
910
|
+
children: /* @__PURE__ */ o(vn, b(i({ "data-testid": m }, c), { children: e }))
|
|
909
911
|
})
|
|
910
912
|
)
|
|
911
913
|
] });
|
|
912
914
|
}
|
|
913
|
-
const
|
|
915
|
+
const ct = () => {
|
|
914
916
|
const e = re();
|
|
915
917
|
return $t(e.breakpoints.down("sm"));
|
|
916
|
-
}, wn = 64, xn = 64, bn = 256, ae = _(!0),
|
|
918
|
+
}, wn = 64, xn = 64, bn = 256, ae = _(!0), dt = _(bn), pt = _(xn), ut = _(""), ht = _(wn), gt = _(void 0);
|
|
917
919
|
function An({ links: e }) {
|
|
918
920
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
919
921
|
}
|
|
@@ -925,7 +927,7 @@ const te = "Navbar", j = {
|
|
|
925
927
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
926
928
|
// settings: `${PREFIX}-settings`,
|
|
927
929
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
928
|
-
}, Sn = M(
|
|
930
|
+
}, Sn = M(S, { name: "NavBar" })(({ theme: e }) => ({
|
|
929
931
|
[`&.${j.root}`]: {
|
|
930
932
|
display: "flex"
|
|
931
933
|
},
|
|
@@ -959,7 +961,7 @@ const te = "Navbar", j = {
|
|
|
959
961
|
}
|
|
960
962
|
}, e)
|
|
961
963
|
);
|
|
962
|
-
},
|
|
964
|
+
}, ft = (e) => {
|
|
963
965
|
var t, n;
|
|
964
966
|
return {
|
|
965
967
|
overflowX: "hidden",
|
|
@@ -967,13 +969,13 @@ const te = "Navbar", j = {
|
|
|
967
969
|
backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
|
|
968
970
|
// Provide default so tests don't need to wrap theme provider
|
|
969
971
|
};
|
|
970
|
-
},
|
|
972
|
+
}, Re = (e, t) => i({
|
|
971
973
|
width: t,
|
|
972
974
|
transition: oe(e, "width", "entering")
|
|
973
|
-
},
|
|
975
|
+
}, ft(e)), We = (e, t) => i({
|
|
974
976
|
width: t,
|
|
975
977
|
transition: oe(e, "width", "leaving")
|
|
976
|
-
},
|
|
978
|
+
}, ft(e)), Dn = M(we, {
|
|
977
979
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
978
980
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: a }) => i(i({
|
|
979
981
|
flexShrink: 0,
|
|
@@ -981,12 +983,12 @@ const te = "Navbar", j = {
|
|
|
981
983
|
boxSizing: "border-box",
|
|
982
984
|
display: "flex",
|
|
983
985
|
flexDirection: "column"
|
|
984
|
-
}, t &&
|
|
986
|
+
}, t && b(i({}, Re(e, n)), {
|
|
985
987
|
backgroundColor: "",
|
|
986
|
-
"& .MuiDrawer-paper":
|
|
987
|
-
})), !t &&
|
|
988
|
+
"& .MuiDrawer-paper": Re(e, n)
|
|
989
|
+
})), !t && b(i({}, We(e, a ? n : r)), {
|
|
988
990
|
backgroundColor: "",
|
|
989
|
-
"& .MuiDrawer-paper":
|
|
991
|
+
"& .MuiDrawer-paper": We(e, a ? n : r)
|
|
990
992
|
})));
|
|
991
993
|
function On(e) {
|
|
992
994
|
let t = 0;
|
|
@@ -996,11 +998,11 @@ function On(e) {
|
|
|
996
998
|
}
|
|
997
999
|
return t;
|
|
998
1000
|
}
|
|
999
|
-
const
|
|
1001
|
+
const ze = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], kn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
1000
1002
|
function Tn({ user: e, domainCode: t, open: n }) {
|
|
1001
1003
|
const r = re();
|
|
1002
|
-
return /* @__PURE__ */
|
|
1003
|
-
|
|
1004
|
+
return /* @__PURE__ */ C(
|
|
1005
|
+
S,
|
|
1004
1006
|
{
|
|
1005
1007
|
sx: {
|
|
1006
1008
|
paddingTop: 3,
|
|
@@ -1011,7 +1013,7 @@ function Tn({ user: e, domainCode: t, open: n }) {
|
|
|
1011
1013
|
},
|
|
1012
1014
|
children: [
|
|
1013
1015
|
/* @__PURE__ */ o(
|
|
1014
|
-
|
|
1016
|
+
S,
|
|
1015
1017
|
{
|
|
1016
1018
|
sx: {
|
|
1017
1019
|
width: n ? "5rem" : "2rem",
|
|
@@ -1019,22 +1021,22 @@ function Tn({ user: e, domainCode: t, open: n }) {
|
|
|
1019
1021
|
aspectRatio: 1
|
|
1020
1022
|
},
|
|
1021
1023
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1022
|
-
|
|
1024
|
+
Ne,
|
|
1023
1025
|
{
|
|
1024
1026
|
src: e == null ? void 0 : e.picture,
|
|
1025
1027
|
sx: {
|
|
1026
1028
|
width: "100%",
|
|
1027
1029
|
height: "100%",
|
|
1028
|
-
bgcolor:
|
|
1030
|
+
bgcolor: ze[Math.abs(On(e.name)) % ze.length]
|
|
1029
1031
|
},
|
|
1030
1032
|
children: kn(e.name)
|
|
1031
1033
|
}
|
|
1032
|
-
) : /* @__PURE__ */ o(
|
|
1034
|
+
) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
|
|
1033
1035
|
}
|
|
1034
1036
|
),
|
|
1035
|
-
/* @__PURE__ */ o(In, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ft, { in: n, children: /* @__PURE__ */
|
|
1036
|
-
e != null && e.name ? /* @__PURE__ */ o($, { children: e.name }) : /* @__PURE__ */ o(
|
|
1037
|
-
t ? /* @__PURE__ */ o($, { children: t.toUpperCase() }) : /* @__PURE__ */ o(
|
|
1037
|
+
/* @__PURE__ */ o(In, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ft, { in: n, children: /* @__PURE__ */ C(S, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1038
|
+
e != null && e.name ? /* @__PURE__ */ o($, { children: e.name }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "50%" }),
|
|
1039
|
+
t ? /* @__PURE__ */ o($, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "25%" })
|
|
1038
1040
|
] }) }) })
|
|
1039
1041
|
]
|
|
1040
1042
|
}
|
|
@@ -1047,37 +1049,37 @@ function En({
|
|
|
1047
1049
|
"data-testid": r,
|
|
1048
1050
|
top: a,
|
|
1049
1051
|
middle: l,
|
|
1050
|
-
bottom:
|
|
1051
|
-
user:
|
|
1052
|
-
domainCode:
|
|
1052
|
+
bottom: c,
|
|
1053
|
+
user: m,
|
|
1054
|
+
domainCode: d
|
|
1053
1055
|
}) {
|
|
1054
|
-
const
|
|
1055
|
-
return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */
|
|
1056
|
+
const g = ct(), w = nt(ae);
|
|
1057
|
+
return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ C(
|
|
1056
1058
|
Dn,
|
|
1057
1059
|
{
|
|
1058
1060
|
open: e,
|
|
1059
1061
|
widthOpen: n,
|
|
1060
1062
|
widthClosed: t,
|
|
1061
1063
|
anchor: "left",
|
|
1062
|
-
variant:
|
|
1064
|
+
variant: g ? "temporary" : "permanent",
|
|
1063
1065
|
PaperProps: {
|
|
1064
1066
|
component: "nav"
|
|
1065
1067
|
},
|
|
1066
1068
|
onClose: () => {
|
|
1067
|
-
|
|
1069
|
+
w(!1);
|
|
1068
1070
|
},
|
|
1069
|
-
isSmallScreen:
|
|
1071
|
+
isSmallScreen: g,
|
|
1070
1072
|
children: [
|
|
1071
|
-
!
|
|
1072
|
-
a && /* @__PURE__ */
|
|
1073
|
+
!g && /* @__PURE__ */ o(Lt, {}),
|
|
1074
|
+
a && /* @__PURE__ */ C(S, { flexGrow: "0", children: [
|
|
1073
1075
|
a,
|
|
1074
|
-
/* @__PURE__ */ o(
|
|
1076
|
+
/* @__PURE__ */ o(Le, { variant: "middle" })
|
|
1075
1077
|
] }),
|
|
1076
|
-
/* @__PURE__ */ o(
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
/* @__PURE__ */ o(
|
|
1079
|
-
/* @__PURE__ */ o(Tn, { user:
|
|
1080
|
-
|
|
1078
|
+
/* @__PURE__ */ o(S, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(An, { links: l }) : l }),
|
|
1079
|
+
/* @__PURE__ */ C(S, { flexGrow: "0", children: [
|
|
1080
|
+
/* @__PURE__ */ o(Le, { variant: "middle" }),
|
|
1081
|
+
/* @__PURE__ */ o(Tn, { user: m, domainCode: d, open: e }),
|
|
1082
|
+
c && /* @__PURE__ */ o(B, { children: c })
|
|
1081
1083
|
] })
|
|
1082
1084
|
]
|
|
1083
1085
|
}
|
|
@@ -1089,7 +1091,7 @@ function yn({
|
|
|
1089
1091
|
maxWidth: n = !1
|
|
1090
1092
|
}) {
|
|
1091
1093
|
return /* @__PURE__ */ o(
|
|
1092
|
-
|
|
1094
|
+
S,
|
|
1093
1095
|
{
|
|
1094
1096
|
sx: {
|
|
1095
1097
|
overflow: "auto",
|
|
@@ -1099,7 +1101,7 @@ function yn({
|
|
|
1099
1101
|
flexGrow: 1
|
|
1100
1102
|
},
|
|
1101
1103
|
children: /* @__PURE__ */ o(
|
|
1102
|
-
|
|
1104
|
+
Je,
|
|
1103
1105
|
{
|
|
1104
1106
|
component: "main",
|
|
1105
1107
|
id: "main-content",
|
|
@@ -1115,9 +1117,9 @@ const Bn = "TopBar", $n = {
|
|
|
1115
1117
|
titleText: `${Bn}-titleText`
|
|
1116
1118
|
};
|
|
1117
1119
|
function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
1118
|
-
const r =
|
|
1119
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
1120
|
-
|
|
1120
|
+
const r = nt(ae), a = () => r((m) => !m), l = re(), c = ct();
|
|
1121
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ C(
|
|
1122
|
+
Ke,
|
|
1121
1123
|
{
|
|
1122
1124
|
square: !0,
|
|
1123
1125
|
elevation: 0,
|
|
@@ -1131,7 +1133,7 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
1131
1133
|
gap: 2,
|
|
1132
1134
|
flexShrink: 0,
|
|
1133
1135
|
height: t,
|
|
1134
|
-
zIndex:
|
|
1136
|
+
zIndex: c ? 0 : l.zIndex.drawer + 1
|
|
1135
1137
|
},
|
|
1136
1138
|
children: [
|
|
1137
1139
|
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: a, children: /* @__PURE__ */ o(Qt, { fontSize: "medium" }) }),
|
|
@@ -1147,41 +1149,41 @@ function Ao({
|
|
|
1147
1149
|
pageContainerProps: r,
|
|
1148
1150
|
pageContentDataTestId: a,
|
|
1149
1151
|
topBarDataTestId: l,
|
|
1150
|
-
navBarDataTestId:
|
|
1151
|
-
navBarMiddle:
|
|
1152
|
-
navBarBottom:
|
|
1153
|
-
user:
|
|
1154
|
-
domainCode:
|
|
1152
|
+
navBarDataTestId: c,
|
|
1153
|
+
navBarMiddle: m,
|
|
1154
|
+
navBarBottom: d,
|
|
1155
|
+
user: g,
|
|
1156
|
+
domainCode: w
|
|
1155
1157
|
}) {
|
|
1156
|
-
const [
|
|
1158
|
+
const [x, A] = G(ae), [v] = G(dt), [O] = G(pt), [f, h] = G(ut), [I] = G(ht), [E] = G(gt);
|
|
1157
1159
|
return X(() => {
|
|
1158
|
-
t !== void 0 &&
|
|
1159
|
-
}, [t,
|
|
1160
|
-
n !== void 0 &&
|
|
1161
|
-
}, [n,
|
|
1160
|
+
t !== void 0 && h(t);
|
|
1161
|
+
}, [t, h]), X(() => {
|
|
1162
|
+
n !== void 0 && A(n);
|
|
1163
|
+
}, [n, A]), /* @__PURE__ */ C(S, { children: [
|
|
1162
1164
|
/* @__PURE__ */ o(Pt, {}),
|
|
1163
|
-
/* @__PURE__ */ o(Nn, { titleText:
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ o(Nn, { titleText: f, "data-testid": l, height: I }),
|
|
1166
|
+
/* @__PURE__ */ C(S, { sx: { display: "flex" }, children: [
|
|
1165
1167
|
/* @__PURE__ */ o(
|
|
1166
1168
|
En,
|
|
1167
1169
|
{
|
|
1168
|
-
open:
|
|
1169
|
-
top:
|
|
1170
|
-
middle:
|
|
1171
|
-
bottom:
|
|
1172
|
-
user:
|
|
1173
|
-
domainCode:
|
|
1174
|
-
widthOpen:
|
|
1175
|
-
widthClosed:
|
|
1176
|
-
offsetTop:
|
|
1177
|
-
"data-testid":
|
|
1170
|
+
open: x,
|
|
1171
|
+
top: E,
|
|
1172
|
+
middle: m,
|
|
1173
|
+
bottom: d,
|
|
1174
|
+
user: g,
|
|
1175
|
+
domainCode: w,
|
|
1176
|
+
widthOpen: v,
|
|
1177
|
+
widthClosed: O,
|
|
1178
|
+
offsetTop: I,
|
|
1179
|
+
"data-testid": c
|
|
1178
1180
|
}
|
|
1179
1181
|
),
|
|
1180
1182
|
/* @__PURE__ */ o(
|
|
1181
1183
|
yn,
|
|
1182
|
-
|
|
1184
|
+
b(i({
|
|
1183
1185
|
"data-testid": a,
|
|
1184
|
-
topBarHeight:
|
|
1186
|
+
topBarHeight: I
|
|
1185
1187
|
}, r), {
|
|
1186
1188
|
children: e
|
|
1187
1189
|
})
|
|
@@ -1197,112 +1199,112 @@ const Fn = {
|
|
|
1197
1199
|
disableWindowBlurListener: !1
|
|
1198
1200
|
}, Ln = {
|
|
1199
1201
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1200
|
-
},
|
|
1202
|
+
}, Ge = {
|
|
1201
1203
|
message: "",
|
|
1202
1204
|
severity: "info",
|
|
1203
1205
|
variant: "standard",
|
|
1204
1206
|
progressIndicator: void 0
|
|
1205
1207
|
// Can use 'circular' or 'linear'
|
|
1206
|
-
},
|
|
1208
|
+
}, Ue = 100, qe = 2e3, Pn = 2e3, Mn = (() => {
|
|
1207
1209
|
let e = 0;
|
|
1208
1210
|
return () => (e += 1, e);
|
|
1209
1211
|
})(), _n = {
|
|
1210
1212
|
borderBottomLeftRadius: "0px",
|
|
1211
1213
|
borderBottomRightRadius: "0px"
|
|
1212
|
-
}, Hn = {}, Rn = {},
|
|
1214
|
+
}, Hn = {}, Rn = {}, mt = je(null);
|
|
1213
1215
|
function Wn(l) {
|
|
1214
|
-
var
|
|
1216
|
+
var c = l, {
|
|
1215
1217
|
overrideState: e = Hn,
|
|
1216
1218
|
overrideActions: t = Rn,
|
|
1217
1219
|
shouldClose: n = Ln.shouldClose,
|
|
1218
1220
|
children: r
|
|
1219
|
-
} =
|
|
1221
|
+
} = c, a = Be(c, [
|
|
1220
1222
|
"overrideState",
|
|
1221
1223
|
"overrideActions",
|
|
1222
1224
|
"shouldClose",
|
|
1223
1225
|
"children"
|
|
1224
1226
|
]);
|
|
1225
|
-
var
|
|
1226
|
-
const [{ open:
|
|
1227
|
-
|
|
1228
|
-
}, []),
|
|
1229
|
-
|
|
1230
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1231
|
-
),
|
|
1232
|
-
const
|
|
1227
|
+
var p;
|
|
1228
|
+
const [{ open: m }, d] = D({ open: !1 }), g = ge([]), w = ge(Date.now()), x = ge(0), A = ne((s) => {
|
|
1229
|
+
d({ open: s });
|
|
1230
|
+
}, []), v = ne((s = {}) => {
|
|
1231
|
+
x.current += 1, g.current.length >= Ue && Date.now() - w.current >= qe && (w.current = Date.now(), console.error(
|
|
1232
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${x.current} times in last ${qe}ms)`
|
|
1233
|
+
), x.current = 0);
|
|
1234
|
+
const u = i(b(i({}, Ge), {
|
|
1233
1235
|
key: Mn()
|
|
1234
|
-
}),
|
|
1235
|
-
return
|
|
1236
|
-
}, []),
|
|
1237
|
-
const
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1240
|
-
}, N = (
|
|
1241
|
-
n(
|
|
1236
|
+
}), s);
|
|
1237
|
+
return g.current.push(u), g.current.length === 1 && d({ open: !0 }), u.key;
|
|
1238
|
+
}, []), O = (s = "", u = {}) => v(i({ message: s, severity: "success" }, u)), f = (s = "", u = {}) => v(i({ message: s, severity: "info" }, u)), h = (s = "", u = {}) => v(i({ message: s, severity: "warning" }, u)), I = (s = "", u = {}) => v(i({ message: s, severity: "error" }, u)), E = (s) => {
|
|
1239
|
+
const u = g.current.findIndex((y) => y.key === s);
|
|
1240
|
+
if (u !== -1)
|
|
1241
|
+
return u === 0 ? (d({ open: !1 }), g.current[0]) : g.current.splice(u, 1);
|
|
1242
|
+
}, N = (s, u) => {
|
|
1243
|
+
n(s, u) && d({ open: !1 });
|
|
1242
1244
|
}, F = () => {
|
|
1243
1245
|
}, L = () => {
|
|
1244
|
-
|
|
1245
|
-
},
|
|
1246
|
-
"autoHideDuration" in
|
|
1247
|
-
const q = i(i({}, Fn), a),
|
|
1248
|
-
open:
|
|
1249
|
-
setOpen:
|
|
1250
|
-
enqueueNotification:
|
|
1251
|
-
enqueueSuccessNotification:
|
|
1252
|
-
enqueueInfoNotification:
|
|
1253
|
-
enqueueWarningNotification:
|
|
1254
|
-
enqueueErrorNotification:
|
|
1255
|
-
removeNotification:
|
|
1246
|
+
g.current.shift(), g.current.length > 0 && d({ open: !0 });
|
|
1247
|
+
}, k = (p = g.current[0]) != null ? p : i({}, Ge), P = {};
|
|
1248
|
+
"autoHideDuration" in k && (P.autoHideDuration = k.autoHideDuration);
|
|
1249
|
+
const q = i(i({}, Fn), a), H = i(i({
|
|
1250
|
+
open: m,
|
|
1251
|
+
setOpen: A,
|
|
1252
|
+
enqueueNotification: v,
|
|
1253
|
+
enqueueSuccessNotification: O,
|
|
1254
|
+
enqueueInfoNotification: f,
|
|
1255
|
+
enqueueWarningNotification: h,
|
|
1256
|
+
enqueueErrorNotification: I,
|
|
1257
|
+
removeNotification: E
|
|
1256
1258
|
}, e), t);
|
|
1257
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ C(mt.Provider, { value: H, children: [
|
|
1258
1260
|
r,
|
|
1259
1261
|
/* @__PURE__ */ o(
|
|
1260
1262
|
Mt,
|
|
1261
|
-
|
|
1262
|
-
open:
|
|
1263
|
+
b(i(i({}, q), P), {
|
|
1264
|
+
open: m,
|
|
1263
1265
|
onClose: N,
|
|
1264
1266
|
TransitionProps: {
|
|
1265
1267
|
onExited: L,
|
|
1266
1268
|
onExit: F
|
|
1267
1269
|
},
|
|
1268
1270
|
sx: { zIndex: Pn },
|
|
1269
|
-
children: /* @__PURE__ */
|
|
1271
|
+
children: /* @__PURE__ */ C("div", { children: [
|
|
1270
1272
|
/* @__PURE__ */ o(
|
|
1271
1273
|
_t,
|
|
1272
1274
|
{
|
|
1273
|
-
onClose: (
|
|
1274
|
-
severity:
|
|
1275
|
+
onClose: (s) => N(s, "closeAlert"),
|
|
1276
|
+
severity: k.severity,
|
|
1275
1277
|
variant: "filled",
|
|
1276
|
-
icon:
|
|
1277
|
-
style:
|
|
1278
|
-
children:
|
|
1278
|
+
icon: k.progressIndicator === "circular" ? /* @__PURE__ */ o(Ae, { size: "1em" }) : void 0,
|
|
1279
|
+
style: k.progressIndicator === "linear" ? _n : void 0,
|
|
1280
|
+
children: k.message
|
|
1279
1281
|
}
|
|
1280
1282
|
),
|
|
1281
|
-
|
|
1283
|
+
k.progressIndicator === "linear" && /* @__PURE__ */ o(Ht, { color: "primary" })
|
|
1282
1284
|
] })
|
|
1283
1285
|
})
|
|
1284
1286
|
)
|
|
1285
1287
|
] });
|
|
1286
1288
|
}
|
|
1287
1289
|
function zn() {
|
|
1288
|
-
const e =
|
|
1290
|
+
const e = Qe(mt);
|
|
1289
1291
|
if (e === null)
|
|
1290
|
-
throw new
|
|
1292
|
+
throw new Ie("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1291
1293
|
return e;
|
|
1292
1294
|
}
|
|
1293
1295
|
const So = ie(
|
|
1294
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Wn,
|
|
1296
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Wn, b(i({}, e), { overrideState: t, overrideActions: n, children: r }))
|
|
1295
1297
|
), Gn = Yt(), Io = ({
|
|
1296
1298
|
children: e,
|
|
1297
1299
|
store: t
|
|
1298
|
-
}) => /* @__PURE__ */ o(
|
|
1299
|
-
var
|
|
1300
|
-
const
|
|
1301
|
-
JSON.parse((
|
|
1302
|
-
),
|
|
1303
|
-
(e) => e(
|
|
1300
|
+
}) => /* @__PURE__ */ o(ot, { store: t != null ? t : Gn, children: e }), Ct = "domainCode";
|
|
1301
|
+
var Xe;
|
|
1302
|
+
const Ve = _(
|
|
1303
|
+
JSON.parse((Xe = localStorage.getItem(Ct)) != null ? Xe : '{"domainCode": ""}').domainCode
|
|
1304
|
+
), vt = _(
|
|
1305
|
+
(e) => e(Ve),
|
|
1304
1306
|
(e, t, n) => {
|
|
1305
|
-
t(
|
|
1307
|
+
t(Ve, n), localStorage.setItem(Ct, JSON.stringify({ domainCode: n }));
|
|
1306
1308
|
}
|
|
1307
1309
|
), Un = {
|
|
1308
1310
|
act: "ACT",
|
|
@@ -1327,65 +1329,65 @@ const qe = _(
|
|
|
1327
1329
|
applicationName: a,
|
|
1328
1330
|
handleLogout: l
|
|
1329
1331
|
}) => {
|
|
1330
|
-
const [
|
|
1331
|
-
|
|
1332
|
-
}),
|
|
1333
|
-
|
|
1332
|
+
const [c, m] = G(vt), [d, g] = D(c), { enqueueSuccessNotification: w } = zn(), x = r.length === 0, A = !!c && !r.includes(c) && !r.includes(d), v = !c || x || A, O = () => W(void 0, null, function* () {
|
|
1333
|
+
d ? (m(d), w(`Set domain to ${d}`), n()) : m("");
|
|
1334
|
+
}), f = () => W(void 0, null, function* () {
|
|
1335
|
+
c && !x && !A ? (g(c), n()) : v && l();
|
|
1334
1336
|
});
|
|
1335
|
-
let
|
|
1336
|
-
return
|
|
1337
|
+
let h;
|
|
1338
|
+
return x ? h = "Unable to retrieve your active organisations. Try logging in again." : A && (h = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ C(
|
|
1337
1339
|
dn,
|
|
1338
1340
|
{
|
|
1339
1341
|
isOpen: t,
|
|
1340
1342
|
dialogTitle: "Select an organisation",
|
|
1341
1343
|
primaryButton: {
|
|
1342
1344
|
text: "Confirm",
|
|
1343
|
-
onClick:
|
|
1344
|
-
disabled: !
|
|
1345
|
+
onClick: O,
|
|
1346
|
+
disabled: !d || x || A,
|
|
1345
1347
|
buttonColor: "primary"
|
|
1346
1348
|
},
|
|
1347
1349
|
secondaryButton: {
|
|
1348
|
-
text:
|
|
1349
|
-
onClick:
|
|
1350
|
+
text: v ? "Logout" : "Cancel",
|
|
1351
|
+
onClick: f
|
|
1350
1352
|
},
|
|
1351
|
-
onClose:
|
|
1353
|
+
onClose: v ? () => {
|
|
1352
1354
|
} : n,
|
|
1353
1355
|
children: [
|
|
1354
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ C($, { marginBottom: 2, children: [
|
|
1355
1357
|
"Select the default organisation that you want to use with the ",
|
|
1356
1358
|
a,
|
|
1357
1359
|
"."
|
|
1358
1360
|
] }),
|
|
1359
1361
|
/* @__PURE__ */ o(
|
|
1360
|
-
|
|
1362
|
+
xe,
|
|
1361
1363
|
{
|
|
1362
1364
|
loading: e,
|
|
1363
1365
|
multiple: !1,
|
|
1364
1366
|
disableClearable: !1,
|
|
1365
|
-
value:
|
|
1366
|
-
onChange: (
|
|
1367
|
+
value: d !== "" ? d : null,
|
|
1368
|
+
onChange: (I, E) => g(E != null ? E : ""),
|
|
1367
1369
|
getOptionLabel: qn,
|
|
1368
1370
|
options: [...r],
|
|
1369
|
-
renderInput: (
|
|
1370
|
-
|
|
1371
|
-
|
|
1371
|
+
renderInput: (I) => /* @__PURE__ */ o(
|
|
1372
|
+
be,
|
|
1373
|
+
b(i({}, I), {
|
|
1372
1374
|
variant: "filled",
|
|
1373
1375
|
label: "Select organisation",
|
|
1374
|
-
InputProps:
|
|
1375
|
-
endAdornment: /* @__PURE__ */
|
|
1376
|
-
e ? /* @__PURE__ */ o(
|
|
1377
|
-
|
|
1376
|
+
InputProps: b(i({}, I.InputProps), {
|
|
1377
|
+
endAdornment: /* @__PURE__ */ C(B, { children: [
|
|
1378
|
+
e ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1379
|
+
I.InputProps.endAdornment
|
|
1378
1380
|
] })
|
|
1379
1381
|
})
|
|
1380
1382
|
})
|
|
1381
1383
|
)
|
|
1382
1384
|
}
|
|
1383
1385
|
),
|
|
1384
|
-
|
|
1386
|
+
h && /* @__PURE__ */ o(Rt, { error: !0, children: h })
|
|
1385
1387
|
]
|
|
1386
1388
|
}
|
|
1387
1389
|
);
|
|
1388
|
-
}, Oo =
|
|
1390
|
+
}, Oo = Ye({
|
|
1389
1391
|
palette: {
|
|
1390
1392
|
primary: {
|
|
1391
1393
|
dark: "#00A651",
|
|
@@ -1436,7 +1438,7 @@ const qe = _(
|
|
|
1436
1438
|
navBar: {
|
|
1437
1439
|
backgroundColor: "#E8E8E8"
|
|
1438
1440
|
}
|
|
1439
|
-
}), ko =
|
|
1441
|
+
}), ko = Ye({
|
|
1440
1442
|
palette: {
|
|
1441
1443
|
primary: {
|
|
1442
1444
|
main: "#007236",
|
|
@@ -1490,18 +1492,18 @@ const qe = _(
|
|
|
1490
1492
|
styleOverrides: {
|
|
1491
1493
|
root: ({ theme: e }) => ({
|
|
1492
1494
|
"&.Mui-selected": {
|
|
1493
|
-
backgroundColor:
|
|
1495
|
+
backgroundColor: fe(
|
|
1494
1496
|
e.palette.secondary.main,
|
|
1495
1497
|
e.palette.action.selectedOpacity
|
|
1496
1498
|
),
|
|
1497
1499
|
"&:hover": {
|
|
1498
|
-
backgroundColor:
|
|
1500
|
+
backgroundColor: fe(
|
|
1499
1501
|
e.palette.secondary.main,
|
|
1500
1502
|
e.palette.action.selectedOpacity
|
|
1501
1503
|
)
|
|
1502
1504
|
},
|
|
1503
1505
|
"&.Mui-focusVisible": {
|
|
1504
|
-
backgroundColor:
|
|
1506
|
+
backgroundColor: fe(
|
|
1505
1507
|
e.palette.secondary.main,
|
|
1506
1508
|
e.palette.action.focusOpacity
|
|
1507
1509
|
)
|
|
@@ -1528,14 +1530,14 @@ const qe = _(
|
|
|
1528
1530
|
backgroundColor: "#E8E8E8"
|
|
1529
1531
|
}
|
|
1530
1532
|
}), Vn = {
|
|
1531
|
-
domainCode:
|
|
1533
|
+
domainCode: vt,
|
|
1532
1534
|
navBarOpen: ae,
|
|
1533
|
-
navBarWidthOpen:
|
|
1534
|
-
navBarWidthClosed:
|
|
1535
|
-
titleText:
|
|
1536
|
-
topBarHeight:
|
|
1537
|
-
navBarTop:
|
|
1538
|
-
}, To = ie(() => ({ children: e }) => /* @__PURE__ */ o(
|
|
1535
|
+
navBarWidthOpen: dt,
|
|
1536
|
+
navBarWidthClosed: pt,
|
|
1537
|
+
titleText: ut,
|
|
1538
|
+
topBarHeight: ht,
|
|
1539
|
+
navBarTop: gt
|
|
1540
|
+
}, To = ie(() => ({ children: e }) => /* @__PURE__ */ o(ot, { children: e })), Xn = ({
|
|
1539
1541
|
initialValues: e,
|
|
1540
1542
|
children: t
|
|
1541
1543
|
}) => (Zt(e), /* @__PURE__ */ o(B, { children: t })), Eo = ie(
|
|
@@ -1556,14 +1558,14 @@ export {
|
|
|
1556
1558
|
dn as AgDialog,
|
|
1557
1559
|
Ao as AppLayout,
|
|
1558
1560
|
Io as AtomProvider,
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
+
mt as Context,
|
|
1562
|
+
Ie as ContextError,
|
|
1561
1563
|
Do as DomainCodeDialog,
|
|
1562
1564
|
go as ExampleComponent,
|
|
1563
1565
|
wo as FetchAutocomplete,
|
|
1564
1566
|
Xn as HydrateAtoms,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
+
it as NAVBAR_WIDTH_CLOSED,
|
|
1568
|
+
rt as NAVBAR_WIDTH_OPENED,
|
|
1567
1569
|
vo as NavBar,
|
|
1568
1570
|
mo as NavBarDarkStyledList,
|
|
1569
1571
|
Co as NavBarLightStyledList,
|
|
@@ -1573,19 +1575,19 @@ export {
|
|
|
1573
1575
|
xo as SingleAutocomplete,
|
|
1574
1576
|
Gn as atomStore,
|
|
1575
1577
|
cn as buildNavBarState,
|
|
1576
|
-
|
|
1578
|
+
vt as domainCodeAtom,
|
|
1577
1579
|
Oo as fed21Theme,
|
|
1578
1580
|
ko as internalAgSystemsTheme,
|
|
1579
1581
|
V as navBarClasses,
|
|
1580
1582
|
ae as navBarOpenAtom,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1583
|
+
gt as navBarTopAtom,
|
|
1584
|
+
pt as navBarWidthClosedAtom,
|
|
1585
|
+
dt as navBarWidthOpenAtom,
|
|
1586
|
+
ut as titleTextAtom,
|
|
1587
|
+
ht as topBarHeightAtom,
|
|
1586
1588
|
ln as useNavBar,
|
|
1587
1589
|
zn as useSaladBar,
|
|
1588
|
-
|
|
1590
|
+
ct as useSmallScreen,
|
|
1589
1591
|
To as withAtomProvider,
|
|
1590
1592
|
fo as withNavBarProvider,
|
|
1591
1593
|
Eo as withOverrideDefaults,
|