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