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