@australiangreens/ag-internal-components 0.0.73 → 0.0.74
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 +504 -497
- 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 V = (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,17 +64,17 @@ 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, z = "Navbar",
|
|
77
|
+
const it = 330, rt = 73, z = "Navbar", q = {
|
|
78
78
|
root: `${z}-root`,
|
|
79
79
|
menuButton: `${z}-menuButton`,
|
|
80
80
|
hide: `${z}-hide`,
|
|
@@ -82,23 +82,23 @@ const it = 330, rt = 73, z = "Navbar", V = {
|
|
|
82
82
|
userInfoHolder: `${z}-userInfoHolder`,
|
|
83
83
|
settings: `${z}-settings`,
|
|
84
84
|
pieChartIcon: `${z}-pieChartIcon`
|
|
85
|
-
},
|
|
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: () => V(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: () => V(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 = () => V(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,23 +450,23 @@ 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
|
|
469
|
+
const wo = ({
|
|
458
470
|
lookup: e,
|
|
459
471
|
onChange: t,
|
|
460
472
|
label: n,
|
|
@@ -462,90 +474,84 @@ const xo = ({
|
|
|
462
474
|
sx: a,
|
|
463
475
|
textFieldColor: s,
|
|
464
476
|
textFieldVariant: l = "filled",
|
|
465
|
-
"data-testid":
|
|
477
|
+
"data-testid": p,
|
|
466
478
|
noOptionsText: c = "No options",
|
|
467
|
-
minLength:
|
|
468
|
-
disablePortal:
|
|
479
|
+
minLength: d = 3,
|
|
480
|
+
disablePortal: x = !1,
|
|
481
|
+
preLoadedOptions: w
|
|
469
482
|
}) => {
|
|
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(
|
|
483
|
+
const [b, m] = E(""), { data: D, isLoading: k } = lt({
|
|
484
|
+
inputValue: b,
|
|
485
|
+
label: n,
|
|
486
|
+
lookup: e,
|
|
487
|
+
minLength: d != null ? d : 0,
|
|
488
|
+
preLoadedOptions: w
|
|
489
|
+
}), O = b.length >= d;
|
|
490
|
+
return /* @__PURE__ */ o("div", { "data-testid": p, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
485
491
|
ve,
|
|
486
492
|
{
|
|
487
493
|
sx: a,
|
|
488
|
-
"data-testid":
|
|
489
|
-
loading:
|
|
490
|
-
options:
|
|
491
|
-
onChange: (
|
|
492
|
-
t(
|
|
494
|
+
"data-testid": p ? `${p}:Autocomplete` : void 0,
|
|
495
|
+
loading: O ? k : !1,
|
|
496
|
+
options: D != null ? D : [],
|
|
497
|
+
onChange: (g, S) => {
|
|
498
|
+
t(g, S);
|
|
493
499
|
},
|
|
494
|
-
disablePortal:
|
|
495
|
-
filterOptions: (
|
|
500
|
+
disablePortal: x,
|
|
501
|
+
filterOptions: (g) => g,
|
|
496
502
|
value: i,
|
|
497
|
-
noOptionsText: c,
|
|
498
|
-
getOptionLabel: (
|
|
499
|
-
renderInput: (
|
|
503
|
+
noOptionsText: O ? c : "Start typing to search",
|
|
504
|
+
getOptionLabel: (g) => g.label,
|
|
505
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
500
506
|
xe,
|
|
501
|
-
|
|
502
|
-
"data-testid":
|
|
503
|
-
},
|
|
507
|
+
A(r({
|
|
508
|
+
"data-testid": p ? `${p}:Autocomplete:TextField` : void 0
|
|
509
|
+
}, g), {
|
|
504
510
|
variant: l,
|
|
505
511
|
label: n,
|
|
506
512
|
color: s
|
|
507
513
|
})
|
|
508
514
|
),
|
|
509
|
-
isOptionEqualToValue: (
|
|
510
|
-
onInputChange: (
|
|
511
|
-
(
|
|
515
|
+
isOptionEqualToValue: (g, S) => g.id === S.id,
|
|
516
|
+
onInputChange: (g, S) => {
|
|
517
|
+
m(S);
|
|
512
518
|
},
|
|
513
|
-
renderOption: (
|
|
519
|
+
renderOption: (g, S) => /* @__PURE__ */ ge(
|
|
514
520
|
"li",
|
|
515
|
-
|
|
516
|
-
key:
|
|
517
|
-
"data-testid":
|
|
521
|
+
A(r({}, g), {
|
|
522
|
+
key: S.id,
|
|
523
|
+
"data-testid": p ? `${p}:Autocomplete:option(${S.id.toString()})` : void 0
|
|
518
524
|
}),
|
|
519
|
-
|
|
525
|
+
S.label
|
|
520
526
|
)
|
|
521
527
|
}
|
|
522
528
|
) }) });
|
|
523
|
-
},
|
|
529
|
+
}, gn = 24, fn = 64, G = "TopBar", T = {
|
|
524
530
|
topStripe: `${G}-topStripe`,
|
|
525
531
|
titleBar: `${G}-titleBar`,
|
|
526
532
|
titleSlider: `${G}-titleSlider`,
|
|
527
533
|
titleText: `${G}-titleText`,
|
|
528
534
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
529
535
|
rightPanelButton: `${G}-leftPanelButton`
|
|
530
|
-
},
|
|
536
|
+
}, mn = be("div", {
|
|
531
537
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
532
538
|
name: G
|
|
533
539
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
534
540
|
var i, a;
|
|
535
541
|
return {
|
|
536
542
|
width: "100%",
|
|
537
|
-
[`& .${
|
|
543
|
+
[`& .${T.topStripe}`]: {
|
|
538
544
|
width: "100%",
|
|
539
|
-
height: `${
|
|
545
|
+
height: `${gn}px`,
|
|
540
546
|
backgroundColor: e.palette.primary.main
|
|
541
547
|
},
|
|
542
|
-
[`& .${
|
|
548
|
+
[`& .${T.titleBar}`]: {
|
|
543
549
|
backgroundColor: e.palette.primary.light,
|
|
544
|
-
height: `${
|
|
550
|
+
height: `${fn}px`,
|
|
545
551
|
padding: e.spacing(0, 3),
|
|
546
552
|
width: "100%"
|
|
547
553
|
},
|
|
548
|
-
[`& .${
|
|
554
|
+
[`& .${T.titleSlider}`]: r(r({
|
|
549
555
|
height: "100%",
|
|
550
556
|
display: "flex",
|
|
551
557
|
alignItems: "center",
|
|
@@ -554,14 +560,14 @@ const xo = ({
|
|
|
554
560
|
easing: e.transitions.easing.sharp,
|
|
555
561
|
duration: e.transitions.duration.leavingScreen
|
|
556
562
|
}),
|
|
557
|
-
[`& .${
|
|
563
|
+
[`& .${T.leftPanelButton}`]: {
|
|
558
564
|
marginRight: e.spacing(2),
|
|
559
565
|
flexGrow: 0
|
|
560
566
|
},
|
|
561
|
-
[`& .${
|
|
567
|
+
[`& .${T.titleText}`]: {
|
|
562
568
|
flexGrow: 1
|
|
563
569
|
},
|
|
564
|
-
[`& .${
|
|
570
|
+
[`& .${T.rightPanelButton}`]: {
|
|
565
571
|
flexGrow: 0
|
|
566
572
|
}
|
|
567
573
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -579,19 +585,19 @@ const xo = ({
|
|
|
579
585
|
})
|
|
580
586
|
};
|
|
581
587
|
});
|
|
582
|
-
function
|
|
588
|
+
function Cn({
|
|
583
589
|
titleText: e = "",
|
|
584
590
|
leftPanel: t,
|
|
585
591
|
rightPanel: n,
|
|
586
592
|
"data-testid": i
|
|
587
593
|
}) {
|
|
588
|
-
return /* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */ o("div", { className:
|
|
590
|
-
/* @__PURE__ */ o("div", { className:
|
|
591
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ h(mn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
595
|
+
/* @__PURE__ */ o("div", { className: T.topStripe }),
|
|
596
|
+
/* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ h(I, { className: T.titleSlider, children: [
|
|
597
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
|
|
592
598
|
Q,
|
|
593
599
|
{
|
|
594
|
-
className:
|
|
600
|
+
className: T.leftPanelButton,
|
|
595
601
|
color: "inherit",
|
|
596
602
|
"aria-label": "Open left side panel",
|
|
597
603
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -603,11 +609,11 @@ function mn({
|
|
|
603
609
|
]
|
|
604
610
|
}
|
|
605
611
|
),
|
|
606
|
-
/* @__PURE__ */ o(
|
|
607
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ o(F, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
613
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
|
|
608
614
|
Q,
|
|
609
615
|
{
|
|
610
|
-
className:
|
|
616
|
+
className: T.rightPanelButton,
|
|
611
617
|
color: "inherit",
|
|
612
618
|
"aria-label": "Open right side panel",
|
|
613
619
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -622,7 +628,7 @@ function mn({
|
|
|
622
628
|
] }) })
|
|
623
629
|
] });
|
|
624
630
|
}
|
|
625
|
-
const
|
|
631
|
+
const ct = 400, vn = be(Ce, {
|
|
626
632
|
shouldForwardProp: (e) => (
|
|
627
633
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
628
634
|
![
|
|
@@ -652,9 +658,9 @@ const lt = 400, Cn = be(Ce, {
|
|
|
652
658
|
marginLeft: `${a}px`
|
|
653
659
|
}))
|
|
654
660
|
})
|
|
655
|
-
),
|
|
661
|
+
), xn = be(I, {
|
|
656
662
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
657
|
-
})(({ theme: e, anchor: t }) =>
|
|
663
|
+
})(({ theme: e, anchor: t }) => A(r({
|
|
658
664
|
display: "flex",
|
|
659
665
|
alignItems: "center",
|
|
660
666
|
padding: e.spacing(2)
|
|
@@ -679,53 +685,53 @@ function _e({
|
|
|
679
685
|
onClose: i = () => {
|
|
680
686
|
},
|
|
681
687
|
titleText: a = "",
|
|
682
|
-
width: s =
|
|
688
|
+
width: s = ct,
|
|
683
689
|
showCloseArrow: l = !0,
|
|
684
|
-
debugOpacity:
|
|
690
|
+
debugOpacity: p = !1,
|
|
685
691
|
headerBoxProps: c = {},
|
|
686
|
-
onOpened:
|
|
687
|
-
onClosed:
|
|
688
|
-
"data-testid":
|
|
689
|
-
navBarOpen:
|
|
690
|
-
navBarWidthOpen:
|
|
691
|
-
navBarWidthClosed:
|
|
692
|
+
onOpened: d,
|
|
693
|
+
onClosed: x,
|
|
694
|
+
"data-testid": w,
|
|
695
|
+
navBarOpen: b = !1,
|
|
696
|
+
navBarWidthOpen: m = 0,
|
|
697
|
+
navBarWidthClosed: D = 0
|
|
692
698
|
}) {
|
|
693
|
-
return /* @__PURE__ */
|
|
694
|
-
|
|
699
|
+
return /* @__PURE__ */ h(
|
|
700
|
+
vn,
|
|
695
701
|
{
|
|
696
702
|
SlideProps: {
|
|
697
|
-
onEntered: () =>
|
|
698
|
-
onExited: () =>
|
|
703
|
+
onEntered: () => d == null ? void 0 : d(),
|
|
704
|
+
onExited: () => x == null ? void 0 : x()
|
|
699
705
|
},
|
|
700
706
|
variant: "persistent",
|
|
701
707
|
anchor: t,
|
|
702
708
|
open: n,
|
|
703
709
|
width: s,
|
|
704
|
-
debugOpacity:
|
|
705
|
-
"data-testid":
|
|
706
|
-
navBarOpen:
|
|
707
|
-
navBarWidthOpen:
|
|
708
|
-
navBarWidthClosed:
|
|
710
|
+
debugOpacity: p,
|
|
711
|
+
"data-testid": w,
|
|
712
|
+
navBarOpen: b,
|
|
713
|
+
navBarWidthOpen: m,
|
|
714
|
+
navBarWidthClosed: D,
|
|
709
715
|
children: [
|
|
710
|
-
/* @__PURE__ */ o(
|
|
711
|
-
/* @__PURE__ */ o(
|
|
712
|
-
l && /* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ o(xn, A(r({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ h(_, { children: [
|
|
717
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a }),
|
|
718
|
+
l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
713
719
|
/* @__PURE__ */ o(et, { "data-testid": "arrowbackicon" }),
|
|
714
720
|
" "
|
|
715
721
|
] })
|
|
716
|
-
] }) : /* @__PURE__ */
|
|
717
|
-
l && /* @__PURE__ */
|
|
722
|
+
] }) : /* @__PURE__ */ h(_, { children: [
|
|
723
|
+
l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
718
724
|
/* @__PURE__ */ o(Ze, {}),
|
|
719
725
|
" "
|
|
720
726
|
] }),
|
|
721
|
-
/* @__PURE__ */ o(
|
|
727
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a })
|
|
722
728
|
] }) })),
|
|
723
729
|
e
|
|
724
730
|
]
|
|
725
731
|
}
|
|
726
732
|
);
|
|
727
733
|
}
|
|
728
|
-
const
|
|
734
|
+
const wn = H(I, {
|
|
729
735
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
730
736
|
name: "PanelAwareMargins"
|
|
731
737
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -748,7 +754,7 @@ const xn = M(k, {
|
|
|
748
754
|
}),
|
|
749
755
|
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
750
756
|
});
|
|
751
|
-
}),
|
|
757
|
+
}), bn = H(Ke, {
|
|
752
758
|
name: "PageContainer"
|
|
753
759
|
})(({ theme: e }) => ({
|
|
754
760
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -758,17 +764,17 @@ const xn = M(k, {
|
|
|
758
764
|
})), ue = !1, he = !1, ee = {
|
|
759
765
|
titleText: "",
|
|
760
766
|
flavour: "push",
|
|
761
|
-
width:
|
|
767
|
+
width: ct,
|
|
762
768
|
arrowButtons: "both",
|
|
763
769
|
startOpen: !1,
|
|
764
770
|
open: void 0,
|
|
765
771
|
onChangeOpen: void 0,
|
|
766
|
-
content: /* @__PURE__ */ o(
|
|
772
|
+
content: /* @__PURE__ */ o(_, {}),
|
|
767
773
|
onOpened: void 0,
|
|
768
774
|
onClosed: void 0,
|
|
769
775
|
dataTestId: void 0
|
|
770
776
|
};
|
|
771
|
-
function
|
|
777
|
+
function bo({
|
|
772
778
|
children: e,
|
|
773
779
|
titleText: t = "",
|
|
774
780
|
leftPanel: n,
|
|
@@ -776,110 +782,110 @@ function wo({
|
|
|
776
782
|
sidePanelsAreMutuallyExclusive: a = !0,
|
|
777
783
|
debugOpacity: s = !1,
|
|
778
784
|
pageContainerProps: l,
|
|
779
|
-
pageContentDataTestId:
|
|
785
|
+
pageContentDataTestId: p,
|
|
780
786
|
topBarDataTestId: c,
|
|
781
|
-
navBarOpen:
|
|
782
|
-
navBarWidthOpen:
|
|
783
|
-
navBarWidthClosed:
|
|
787
|
+
navBarOpen: d,
|
|
788
|
+
navBarWidthOpen: x,
|
|
789
|
+
navBarWidthClosed: w
|
|
784
790
|
}) {
|
|
785
|
-
const [
|
|
786
|
-
titleText:
|
|
787
|
-
content:
|
|
788
|
-
flavour:
|
|
789
|
-
open:
|
|
790
|
-
onChangeOpen:
|
|
791
|
+
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, {
|
|
792
|
+
titleText: $,
|
|
793
|
+
content: u,
|
|
794
|
+
flavour: f,
|
|
795
|
+
open: y,
|
|
796
|
+
onChangeOpen: P,
|
|
791
797
|
width: v,
|
|
792
|
-
arrowButtons:
|
|
793
|
-
startOpen:
|
|
794
|
-
onOpened:
|
|
795
|
-
onClosed:
|
|
796
|
-
dataTestId:
|
|
798
|
+
arrowButtons: C,
|
|
799
|
+
startOpen: M,
|
|
800
|
+
onOpened: xt,
|
|
801
|
+
onClosed: wt,
|
|
802
|
+
dataTestId: bt
|
|
797
803
|
} = n ? r(r({}, ee), n) : r({}, ee), {
|
|
798
|
-
titleText:
|
|
799
|
-
content:
|
|
804
|
+
titleText: At,
|
|
805
|
+
content: St,
|
|
800
806
|
flavour: Se,
|
|
801
807
|
open: re,
|
|
802
808
|
onChangeOpen: De,
|
|
803
809
|
width: ae,
|
|
804
810
|
arrowButtons: J,
|
|
805
811
|
startOpen: Y,
|
|
806
|
-
onOpened:
|
|
807
|
-
onClosed:
|
|
808
|
-
dataTestId:
|
|
812
|
+
onOpened: Dt,
|
|
813
|
+
onClosed: kt,
|
|
814
|
+
dataTestId: It
|
|
809
815
|
} = i ? r(r({}, ee), i) : r({}, ee);
|
|
810
816
|
Ee(() => {
|
|
811
|
-
|
|
812
|
-
}, [
|
|
813
|
-
Y !== he && (
|
|
817
|
+
M !== ue && (m(M), g(M));
|
|
818
|
+
}, [M]), Ee(() => {
|
|
819
|
+
Y !== he && (k(Y), R(Y));
|
|
814
820
|
}, [Y]);
|
|
815
|
-
const se =
|
|
816
|
-
|
|
817
|
-
},
|
|
818
|
-
re === void 0 && (
|
|
821
|
+
const se = y === void 0 ? b : y, le = re === void 0 ? D : re, ke = (W) => {
|
|
822
|
+
y === void 0 && (m(W), a && L && (W ? (k(!1), R(D)) : k(S))), P && P(W);
|
|
823
|
+
}, Ie = (W) => {
|
|
824
|
+
re === void 0 && (k(W), a && N && (W ? (m(!1), g(b)) : m(O))), De && De(W);
|
|
819
825
|
};
|
|
820
|
-
return /* @__PURE__ */
|
|
821
|
-
|
|
826
|
+
return /* @__PURE__ */ h(I, { children: [
|
|
827
|
+
N && /* @__PURE__ */ o(
|
|
822
828
|
_e,
|
|
823
829
|
{
|
|
824
|
-
"data-testid":
|
|
830
|
+
"data-testid": bt,
|
|
825
831
|
anchor: "left",
|
|
826
832
|
open: se,
|
|
827
833
|
onClose: () => ke(!1),
|
|
828
834
|
width: v,
|
|
829
|
-
titleText:
|
|
835
|
+
titleText: $,
|
|
830
836
|
debugOpacity: s,
|
|
831
|
-
showCloseArrow:
|
|
832
|
-
onOpened:
|
|
833
|
-
onClosed:
|
|
834
|
-
navBarOpen:
|
|
835
|
-
navBarWidthOpen:
|
|
836
|
-
navBarWidthClosed:
|
|
837
|
-
children:
|
|
837
|
+
showCloseArrow: C === "both" || C === "close",
|
|
838
|
+
onOpened: xt,
|
|
839
|
+
onClosed: wt,
|
|
840
|
+
navBarOpen: d,
|
|
841
|
+
navBarWidthOpen: x,
|
|
842
|
+
navBarWidthClosed: w,
|
|
843
|
+
children: u
|
|
838
844
|
}
|
|
839
845
|
),
|
|
840
|
-
|
|
846
|
+
L && /* @__PURE__ */ o(
|
|
841
847
|
_e,
|
|
842
848
|
{
|
|
843
|
-
"data-testid":
|
|
849
|
+
"data-testid": It,
|
|
844
850
|
anchor: "right",
|
|
845
851
|
open: le,
|
|
846
|
-
onClose: () =>
|
|
852
|
+
onClose: () => Ie(!1),
|
|
847
853
|
width: ae,
|
|
848
|
-
titleText:
|
|
854
|
+
titleText: At,
|
|
849
855
|
debugOpacity: s,
|
|
850
856
|
showCloseArrow: J === "both" || J === "close",
|
|
851
|
-
onOpened:
|
|
852
|
-
onClosed:
|
|
853
|
-
navBarOpen:
|
|
854
|
-
navBarWidthOpen:
|
|
855
|
-
navBarWidthClosed:
|
|
856
|
-
children:
|
|
857
|
+
onOpened: Dt,
|
|
858
|
+
onClosed: kt,
|
|
859
|
+
navBarOpen: d,
|
|
860
|
+
navBarWidthOpen: x,
|
|
861
|
+
navBarWidthClosed: w,
|
|
862
|
+
children: St
|
|
857
863
|
}
|
|
858
864
|
),
|
|
859
865
|
/* @__PURE__ */ o(
|
|
860
|
-
|
|
866
|
+
Cn,
|
|
861
867
|
r(r({
|
|
862
868
|
titleText: t,
|
|
863
869
|
"data-testid": c
|
|
864
|
-
},
|
|
870
|
+
}, N && f === "push" ? {
|
|
865
871
|
leftPanel: {
|
|
866
872
|
open: se,
|
|
867
873
|
width: v,
|
|
868
874
|
onOpen: () => ke(!0),
|
|
869
|
-
showOpenArrow:
|
|
875
|
+
showOpenArrow: C === "both" || C === "open"
|
|
870
876
|
}
|
|
871
|
-
} : {}),
|
|
877
|
+
} : {}), L && Se === "push" ? {
|
|
872
878
|
rightPanel: {
|
|
873
879
|
open: le,
|
|
874
880
|
width: ae,
|
|
875
|
-
onOpen: () =>
|
|
881
|
+
onOpen: () => Ie(!0),
|
|
876
882
|
showOpenArrow: J === "both" || J === "open"
|
|
877
883
|
}
|
|
878
884
|
} : {})
|
|
879
885
|
),
|
|
880
886
|
/* @__PURE__ */ o(
|
|
881
|
-
|
|
882
|
-
|
|
887
|
+
wn,
|
|
888
|
+
A(r(r({}, f === "push" ? {
|
|
883
889
|
leftPanel: {
|
|
884
890
|
open: se,
|
|
885
891
|
width: v
|
|
@@ -890,16 +896,16 @@ function wo({
|
|
|
890
896
|
width: ae
|
|
891
897
|
}
|
|
892
898
|
} : {}), {
|
|
893
|
-
children: /* @__PURE__ */ o(
|
|
899
|
+
children: /* @__PURE__ */ o(bn, A(r({ "data-testid": p }, l), { children: e }))
|
|
894
900
|
})
|
|
895
901
|
)
|
|
896
902
|
] });
|
|
897
903
|
}
|
|
898
|
-
const
|
|
904
|
+
const dt = () => {
|
|
899
905
|
const e = ie();
|
|
900
|
-
return
|
|
901
|
-
},
|
|
902
|
-
function
|
|
906
|
+
return Mt(e.breakpoints.down("sm"));
|
|
907
|
+
}, 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);
|
|
908
|
+
function In({ links: e }) {
|
|
903
909
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
904
910
|
}
|
|
905
911
|
const te = "Navbar", X = {
|
|
@@ -910,7 +916,7 @@ const te = "Navbar", X = {
|
|
|
910
916
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
911
917
|
// settings: `${PREFIX}-settings`,
|
|
912
918
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
913
|
-
},
|
|
919
|
+
}, On = H(I, { name: "NavBar" })(({ theme: e }) => ({
|
|
914
920
|
[`&.${X.root}`]: {
|
|
915
921
|
display: "flex"
|
|
916
922
|
},
|
|
@@ -932,10 +938,10 @@ const te = "Navbar", X = {
|
|
|
932
938
|
})), oe = (e, t, n) => e.transitions.create(t, {
|
|
933
939
|
easing: e.transitions.easing.sharp,
|
|
934
940
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
935
|
-
}),
|
|
941
|
+
}), $n = (e) => {
|
|
936
942
|
const t = ie();
|
|
937
943
|
return /* @__PURE__ */ o(
|
|
938
|
-
|
|
944
|
+
_t,
|
|
939
945
|
r({
|
|
940
946
|
easing: t.transitions.easing.sharp,
|
|
941
947
|
timeout: {
|
|
@@ -944,7 +950,7 @@ const te = "Navbar", X = {
|
|
|
944
950
|
}
|
|
945
951
|
}, e)
|
|
946
952
|
);
|
|
947
|
-
},
|
|
953
|
+
}, ft = (e) => {
|
|
948
954
|
var t, n;
|
|
949
955
|
return {
|
|
950
956
|
overflowX: "hidden",
|
|
@@ -955,10 +961,10 @@ const te = "Navbar", X = {
|
|
|
955
961
|
}, He = (e, t) => r({
|
|
956
962
|
width: t,
|
|
957
963
|
transition: oe(e, "width", "entering")
|
|
958
|
-
},
|
|
964
|
+
}, ft(e)), Re = (e, t) => r({
|
|
959
965
|
width: t,
|
|
960
966
|
transition: oe(e, "width", "leaving")
|
|
961
|
-
},
|
|
967
|
+
}, ft(e)), Tn = H(Ce, {
|
|
962
968
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
963
969
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: a }) => r(r({
|
|
964
970
|
flexShrink: 0,
|
|
@@ -966,10 +972,10 @@ const te = "Navbar", X = {
|
|
|
966
972
|
boxSizing: "border-box",
|
|
967
973
|
display: "flex",
|
|
968
974
|
flexDirection: "column"
|
|
969
|
-
}, t &&
|
|
975
|
+
}, t && A(r({}, He(e, n)), {
|
|
970
976
|
backgroundColor: "",
|
|
971
977
|
"& .MuiDrawer-paper": He(e, n)
|
|
972
|
-
})), !t &&
|
|
978
|
+
})), !t && A(r({}, Re(e, a ? n : i)), {
|
|
973
979
|
backgroundColor: "",
|
|
974
980
|
"& .MuiDrawer-paper": Re(e, a ? n : i)
|
|
975
981
|
})));
|
|
@@ -981,11 +987,11 @@ function yn(e) {
|
|
|
981
987
|
}
|
|
982
988
|
return t;
|
|
983
989
|
}
|
|
984
|
-
const We = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"],
|
|
985
|
-
function
|
|
990
|
+
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();
|
|
991
|
+
function Fn({ user: e, domainCode: t, open: n }) {
|
|
986
992
|
const i = ie();
|
|
987
|
-
return /* @__PURE__ */
|
|
988
|
-
|
|
993
|
+
return /* @__PURE__ */ h(
|
|
994
|
+
I,
|
|
989
995
|
{
|
|
990
996
|
sx: {
|
|
991
997
|
paddingTop: 3,
|
|
@@ -996,7 +1002,7 @@ function En({ user: e, domainCode: t, open: n }) {
|
|
|
996
1002
|
},
|
|
997
1003
|
children: [
|
|
998
1004
|
/* @__PURE__ */ o(
|
|
999
|
-
|
|
1005
|
+
I,
|
|
1000
1006
|
{
|
|
1001
1007
|
sx: {
|
|
1002
1008
|
width: n ? "5rem" : "2rem",
|
|
@@ -1012,20 +1018,20 @@ function En({ user: e, domainCode: t, open: n }) {
|
|
|
1012
1018
|
height: "100%",
|
|
1013
1019
|
bgcolor: We[Math.abs(yn(e.name)) % We.length]
|
|
1014
1020
|
},
|
|
1015
|
-
children:
|
|
1021
|
+
children: En(e.name)
|
|
1016
1022
|
}
|
|
1017
1023
|
) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
|
|
1018
1024
|
}
|
|
1019
1025
|
),
|
|
1020
|
-
/* @__PURE__ */ o(
|
|
1021
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
1022
|
-
t ? /* @__PURE__ */ o(
|
|
1026
|
+
/* @__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: [
|
|
1027
|
+
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
|
|
1028
|
+
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
|
|
1023
1029
|
] }) }) })
|
|
1024
1030
|
]
|
|
1025
1031
|
}
|
|
1026
1032
|
);
|
|
1027
1033
|
}
|
|
1028
|
-
function
|
|
1034
|
+
function Nn({
|
|
1029
1035
|
open: e,
|
|
1030
1036
|
widthClosed: t,
|
|
1031
1037
|
widthOpen: n,
|
|
@@ -1033,48 +1039,48 @@ function Fn({
|
|
|
1033
1039
|
top: a,
|
|
1034
1040
|
middle: s,
|
|
1035
1041
|
bottom: l,
|
|
1036
|
-
user:
|
|
1042
|
+
user: p,
|
|
1037
1043
|
domainCode: c
|
|
1038
1044
|
}) {
|
|
1039
|
-
const
|
|
1040
|
-
return /* @__PURE__ */ o(
|
|
1041
|
-
|
|
1045
|
+
const d = dt(), x = tt(j);
|
|
1046
|
+
return /* @__PURE__ */ o(On, { className: X.root, "data-testid": i, children: /* @__PURE__ */ h(
|
|
1047
|
+
Tn,
|
|
1042
1048
|
{
|
|
1043
1049
|
open: e,
|
|
1044
1050
|
widthOpen: n,
|
|
1045
1051
|
widthClosed: t,
|
|
1046
1052
|
anchor: "left",
|
|
1047
|
-
variant:
|
|
1053
|
+
variant: d ? "temporary" : "permanent",
|
|
1048
1054
|
PaperProps: {
|
|
1049
1055
|
component: "nav"
|
|
1050
1056
|
},
|
|
1051
1057
|
onClose: () => {
|
|
1052
|
-
|
|
1058
|
+
x(!1);
|
|
1053
1059
|
},
|
|
1054
|
-
isSmallScreen:
|
|
1060
|
+
isSmallScreen: d,
|
|
1055
1061
|
children: [
|
|
1056
|
-
!
|
|
1057
|
-
a && /* @__PURE__ */
|
|
1062
|
+
!d && /* @__PURE__ */ o(Rt, {}),
|
|
1063
|
+
a && /* @__PURE__ */ h(I, { flexGrow: "0", children: [
|
|
1058
1064
|
a,
|
|
1059
1065
|
/* @__PURE__ */ o(Pe, { variant: "middle" })
|
|
1060
1066
|
] }),
|
|
1061
|
-
/* @__PURE__ */ o(
|
|
1062
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(In, { links: s }) : s }),
|
|
1068
|
+
/* @__PURE__ */ h(I, { flexGrow: "0", children: [
|
|
1063
1069
|
/* @__PURE__ */ o(Pe, { variant: "middle" }),
|
|
1064
|
-
/* @__PURE__ */ o(
|
|
1065
|
-
l && /* @__PURE__ */ o(
|
|
1070
|
+
/* @__PURE__ */ o(Fn, { user: p, domainCode: c, open: e }),
|
|
1071
|
+
l && /* @__PURE__ */ o(_, { children: l })
|
|
1066
1072
|
] })
|
|
1067
1073
|
]
|
|
1068
1074
|
}
|
|
1069
1075
|
) });
|
|
1070
1076
|
}
|
|
1071
|
-
function
|
|
1077
|
+
function Pn({
|
|
1072
1078
|
children: e,
|
|
1073
1079
|
topBarHeight: t,
|
|
1074
1080
|
maxWidth: n = !1
|
|
1075
1081
|
}) {
|
|
1076
1082
|
return /* @__PURE__ */ o(
|
|
1077
|
-
|
|
1083
|
+
I,
|
|
1078
1084
|
{
|
|
1079
1085
|
sx: {
|
|
1080
1086
|
overflow: "auto",
|
|
@@ -1096,17 +1102,17 @@ function Nn({
|
|
|
1096
1102
|
}
|
|
1097
1103
|
);
|
|
1098
1104
|
}
|
|
1099
|
-
const
|
|
1100
|
-
titleText: `${
|
|
1105
|
+
const Bn = "TopBar", Ln = {
|
|
1106
|
+
titleText: `${Bn}-titleText`
|
|
1101
1107
|
};
|
|
1102
|
-
function
|
|
1108
|
+
function Mn({
|
|
1103
1109
|
titleText: e = "",
|
|
1104
1110
|
height: t,
|
|
1105
1111
|
"data-testid": n,
|
|
1106
1112
|
middle: i
|
|
1107
1113
|
}) {
|
|
1108
|
-
const a = tt(j), s = () => a((c) => !c), l = ie(),
|
|
1109
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
1114
|
+
const a = tt(j), s = () => a((c) => !c), l = ie(), p = dt();
|
|
1115
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
|
|
1110
1116
|
je,
|
|
1111
1117
|
{
|
|
1112
1118
|
square: !0,
|
|
@@ -1121,17 +1127,17 @@ function Ln({
|
|
|
1121
1127
|
gap: 2,
|
|
1122
1128
|
flexShrink: 0,
|
|
1123
1129
|
height: t,
|
|
1124
|
-
zIndex:
|
|
1130
|
+
zIndex: p ? 0 : l.zIndex.drawer + 1
|
|
1125
1131
|
},
|
|
1126
1132
|
children: [
|
|
1127
|
-
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(
|
|
1128
|
-
/* @__PURE__ */ o(
|
|
1133
|
+
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Kt, { fontSize: "medium" }) }),
|
|
1134
|
+
/* @__PURE__ */ o(F, { className: Ln.titleText, variant: "h6", children: e }),
|
|
1129
1135
|
i
|
|
1130
1136
|
]
|
|
1131
1137
|
}
|
|
1132
1138
|
) });
|
|
1133
1139
|
}
|
|
1134
|
-
function
|
|
1140
|
+
function Ao({
|
|
1135
1141
|
children: e,
|
|
1136
1142
|
initialTitleText: t,
|
|
1137
1143
|
initialNavBarOpen: n,
|
|
@@ -1139,48 +1145,48 @@ function bo({
|
|
|
1139
1145
|
pageContentDataTestId: a,
|
|
1140
1146
|
topBarDataTestId: s,
|
|
1141
1147
|
navBarDataTestId: l,
|
|
1142
|
-
navBarMiddle:
|
|
1148
|
+
navBarMiddle: p,
|
|
1143
1149
|
navBarBottom: c,
|
|
1144
|
-
user:
|
|
1145
|
-
domainCode:
|
|
1150
|
+
user: d,
|
|
1151
|
+
domainCode: x
|
|
1146
1152
|
}) {
|
|
1147
1153
|
ot([
|
|
1148
1154
|
[j, n != null ? n : !0],
|
|
1149
1155
|
[me, t != null ? t : ""]
|
|
1150
1156
|
]);
|
|
1151
|
-
const
|
|
1152
|
-
return /* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */ o(
|
|
1157
|
+
const w = Be(j), [b] = U(pt), [m] = U(ut), D = Be(me), [k] = U(ht), [O] = U(kn), [g] = U(gt);
|
|
1158
|
+
return /* @__PURE__ */ h(I, { children: [
|
|
1159
|
+
/* @__PURE__ */ o(Wt, {}),
|
|
1154
1160
|
/* @__PURE__ */ o(
|
|
1155
|
-
|
|
1161
|
+
Mn,
|
|
1156
1162
|
{
|
|
1157
|
-
titleText:
|
|
1163
|
+
titleText: D,
|
|
1158
1164
|
"data-testid": s,
|
|
1159
|
-
height:
|
|
1165
|
+
height: k,
|
|
1160
1166
|
middle: O
|
|
1161
1167
|
}
|
|
1162
1168
|
),
|
|
1163
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ h(I, { sx: { display: "flex" }, children: [
|
|
1164
1170
|
/* @__PURE__ */ o(
|
|
1165
|
-
|
|
1171
|
+
Nn,
|
|
1166
1172
|
{
|
|
1167
|
-
open:
|
|
1168
|
-
top:
|
|
1169
|
-
middle:
|
|
1173
|
+
open: w,
|
|
1174
|
+
top: g,
|
|
1175
|
+
middle: p,
|
|
1170
1176
|
bottom: c,
|
|
1171
|
-
user:
|
|
1172
|
-
domainCode:
|
|
1173
|
-
widthOpen:
|
|
1174
|
-
widthClosed:
|
|
1175
|
-
offsetTop:
|
|
1177
|
+
user: d,
|
|
1178
|
+
domainCode: x,
|
|
1179
|
+
widthOpen: b,
|
|
1180
|
+
widthClosed: m,
|
|
1181
|
+
offsetTop: k,
|
|
1176
1182
|
"data-testid": l
|
|
1177
1183
|
}
|
|
1178
1184
|
),
|
|
1179
1185
|
/* @__PURE__ */ o(
|
|
1180
|
-
|
|
1181
|
-
|
|
1186
|
+
Pn,
|
|
1187
|
+
A(r({
|
|
1182
1188
|
"data-testid": a,
|
|
1183
|
-
topBarHeight:
|
|
1189
|
+
topBarHeight: k
|
|
1184
1190
|
}, i), {
|
|
1185
1191
|
children: e
|
|
1186
1192
|
})
|
|
@@ -1188,13 +1194,13 @@ function bo({
|
|
|
1188
1194
|
] })
|
|
1189
1195
|
] });
|
|
1190
1196
|
}
|
|
1191
|
-
const
|
|
1197
|
+
const _n = {
|
|
1192
1198
|
autoHideDuration: 6e3,
|
|
1193
1199
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1194
1200
|
// The default is false. If we prefer timer to continue when window loses
|
|
1195
1201
|
// focus, change to true
|
|
1196
1202
|
disableWindowBlurListener: !1
|
|
1197
|
-
},
|
|
1203
|
+
}, Hn = {
|
|
1198
1204
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1199
1205
|
}, ze = {
|
|
1200
1206
|
message: "",
|
|
@@ -1202,108 +1208,108 @@ const Mn = {
|
|
|
1202
1208
|
variant: "standard",
|
|
1203
1209
|
progressIndicator: void 0
|
|
1204
1210
|
// Can use 'circular' or 'linear'
|
|
1205
|
-
}, Ge = 100,
|
|
1211
|
+
}, Ge = 100, Ve = 2e3, Rn = 2e3, Wn = (() => {
|
|
1206
1212
|
let e = 0;
|
|
1207
1213
|
return () => (e += 1, e);
|
|
1208
|
-
})(),
|
|
1214
|
+
})(), zn = {
|
|
1209
1215
|
borderBottomLeftRadius: "0px",
|
|
1210
1216
|
borderBottomRightRadius: "0px"
|
|
1211
|
-
},
|
|
1217
|
+
}, Gn = {}, Vn = {}, mt = Xe(null);
|
|
1212
1218
|
function Un(s) {
|
|
1213
1219
|
var l = s, {
|
|
1214
|
-
overrideState: e =
|
|
1215
|
-
overrideActions: t =
|
|
1216
|
-
shouldClose: n =
|
|
1220
|
+
overrideState: e = Gn,
|
|
1221
|
+
overrideActions: t = Vn,
|
|
1222
|
+
shouldClose: n = Hn.shouldClose,
|
|
1217
1223
|
children: i
|
|
1218
|
-
} = l, a =
|
|
1224
|
+
} = l, a = Te(l, [
|
|
1219
1225
|
"overrideState",
|
|
1220
1226
|
"overrideActions",
|
|
1221
1227
|
"shouldClose",
|
|
1222
1228
|
"children"
|
|
1223
1229
|
]);
|
|
1224
|
-
var
|
|
1225
|
-
const [{ open:
|
|
1230
|
+
var P;
|
|
1231
|
+
const [{ open: p }, c] = E({ open: !1 }), d = de([]), x = de(Date.now()), w = de(0), b = ne((v) => {
|
|
1226
1232
|
c({ open: v });
|
|
1227
|
-
}, []),
|
|
1228
|
-
|
|
1229
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${
|
|
1230
|
-
),
|
|
1231
|
-
const
|
|
1232
|
-
key:
|
|
1233
|
+
}, []), m = ne((v = {}) => {
|
|
1234
|
+
w.current += 1, d.current.length >= Ge && Date.now() - x.current >= Ve && (x.current = Date.now(), console.error(
|
|
1235
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${w.current} times in last ${Ve}ms)`
|
|
1236
|
+
), w.current = 0);
|
|
1237
|
+
const C = r(A(r({}, ze), {
|
|
1238
|
+
key: Wn()
|
|
1233
1239
|
}), 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:
|
|
1240
|
+
return d.current.push(C), d.current.length === 1 && c({ open: !0 }), C.key;
|
|
1241
|
+
}, []), 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) => {
|
|
1242
|
+
const C = d.current.findIndex((M) => M.key === v);
|
|
1243
|
+
if (C !== -1)
|
|
1244
|
+
return C === 0 ? (c({ open: !1 }), d.current[0]) : d.current.splice(C, 1);
|
|
1245
|
+
}, R = (v, C) => {
|
|
1246
|
+
n(v, C) && c({ open: !1 });
|
|
1247
|
+
}, N = () => {
|
|
1248
|
+
}, L = () => {
|
|
1249
|
+
d.current.shift(), d.current.length > 0 && c({ open: !0 });
|
|
1250
|
+
}, $ = (P = d.current[0]) != null ? P : r({}, ze), u = {};
|
|
1251
|
+
"autoHideDuration" in $ && (u.autoHideDuration = $.autoHideDuration);
|
|
1252
|
+
const f = r(r({}, _n), a), y = r(r({
|
|
1253
|
+
open: p,
|
|
1254
|
+
setOpen: b,
|
|
1255
|
+
enqueueNotification: m,
|
|
1256
|
+
enqueueSuccessNotification: D,
|
|
1257
|
+
enqueueInfoNotification: k,
|
|
1252
1258
|
enqueueWarningNotification: O,
|
|
1253
|
-
enqueueErrorNotification:
|
|
1254
|
-
removeNotification:
|
|
1259
|
+
enqueueErrorNotification: g,
|
|
1260
|
+
removeNotification: S
|
|
1255
1261
|
}, e), t);
|
|
1256
|
-
return /* @__PURE__ */
|
|
1262
|
+
return /* @__PURE__ */ h(mt.Provider, { value: y, children: [
|
|
1257
1263
|
i,
|
|
1258
1264
|
/* @__PURE__ */ o(
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
open:
|
|
1262
|
-
onClose:
|
|
1265
|
+
zt,
|
|
1266
|
+
A(r(r({}, f), u), {
|
|
1267
|
+
open: p,
|
|
1268
|
+
onClose: R,
|
|
1263
1269
|
TransitionProps: {
|
|
1264
|
-
onExited:
|
|
1265
|
-
onExit:
|
|
1270
|
+
onExited: L,
|
|
1271
|
+
onExit: N
|
|
1266
1272
|
},
|
|
1267
|
-
sx: { zIndex:
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1273
|
+
sx: { zIndex: Rn },
|
|
1274
|
+
children: /* @__PURE__ */ h("div", { children: [
|
|
1269
1275
|
/* @__PURE__ */ o(
|
|
1270
|
-
|
|
1276
|
+
Gt,
|
|
1271
1277
|
{
|
|
1272
|
-
onClose: (v) =>
|
|
1273
|
-
severity:
|
|
1278
|
+
onClose: (v) => R(v, "closeAlert"),
|
|
1279
|
+
severity: $.severity,
|
|
1274
1280
|
variant: "filled",
|
|
1275
|
-
icon:
|
|
1276
|
-
style:
|
|
1277
|
-
children:
|
|
1281
|
+
icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(we, { size: "1em" }) : void 0,
|
|
1282
|
+
style: $.progressIndicator === "linear" ? zn : void 0,
|
|
1283
|
+
children: $.message
|
|
1278
1284
|
}
|
|
1279
1285
|
),
|
|
1280
|
-
|
|
1286
|
+
$.progressIndicator === "linear" && /* @__PURE__ */ o(Vt, { color: "primary" })
|
|
1281
1287
|
] })
|
|
1282
1288
|
})
|
|
1283
1289
|
)
|
|
1284
1290
|
] });
|
|
1285
1291
|
}
|
|
1286
1292
|
function qn() {
|
|
1287
|
-
const e = Qe(
|
|
1293
|
+
const e = Qe(mt);
|
|
1288
1294
|
if (e === null)
|
|
1289
1295
|
throw new Ae("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1290
1296
|
return e;
|
|
1291
1297
|
}
|
|
1292
|
-
const
|
|
1293
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Un,
|
|
1294
|
-
),
|
|
1298
|
+
const So = K(
|
|
1299
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Un, A(r({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1300
|
+
), Xn = nn(), Do = ({
|
|
1295
1301
|
children: e,
|
|
1296
1302
|
store: t
|
|
1297
|
-
}) => /* @__PURE__ */ o(nt, { store: t != null ? t :
|
|
1298
|
-
var
|
|
1299
|
-
const
|
|
1300
|
-
JSON.parse((
|
|
1301
|
-
),
|
|
1302
|
-
(e) => e(
|
|
1303
|
+
}) => /* @__PURE__ */ o(nt, { store: t != null ? t : Xn, children: e }), Ct = "domainCode";
|
|
1304
|
+
var qe;
|
|
1305
|
+
const Ue = B(
|
|
1306
|
+
JSON.parse((qe = localStorage.getItem(Ct)) != null ? qe : '{"domainCode": ""}').domainCode
|
|
1307
|
+
), vt = B(
|
|
1308
|
+
(e) => e(Ue),
|
|
1303
1309
|
(e, t, n) => {
|
|
1304
|
-
t(
|
|
1310
|
+
t(Ue, n), localStorage.setItem(Ct, JSON.stringify({ domainCode: n }));
|
|
1305
1311
|
}
|
|
1306
|
-
),
|
|
1312
|
+
), Qn = {
|
|
1307
1313
|
act: "ACT",
|
|
1308
1314
|
nsw: "NSW",
|
|
1309
1315
|
nt: "NT",
|
|
@@ -1315,10 +1321,10 @@ const qe = P(
|
|
|
1315
1321
|
ag: "AG",
|
|
1316
1322
|
fedmps: "Fedmps",
|
|
1317
1323
|
"": ""
|
|
1318
|
-
},
|
|
1324
|
+
}, jn = (e) => {
|
|
1319
1325
|
var t;
|
|
1320
|
-
return e === null ? "N/A" : (t =
|
|
1321
|
-
},
|
|
1326
|
+
return e === null ? "N/A" : (t = Qn[e]) != null ? t : "";
|
|
1327
|
+
}, ko = ({
|
|
1322
1328
|
isLoading: e,
|
|
1323
1329
|
isOpen: t,
|
|
1324
1330
|
onClose: n,
|
|
@@ -1326,31 +1332,31 @@ const qe = P(
|
|
|
1326
1332
|
applicationName: a,
|
|
1327
1333
|
handleLogout: s
|
|
1328
1334
|
}) => {
|
|
1329
|
-
const [l,
|
|
1330
|
-
c ? (
|
|
1331
|
-
}),
|
|
1332
|
-
l && !
|
|
1335
|
+
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 = () => V(void 0, null, function* () {
|
|
1336
|
+
c ? (p(c), x(`Set domain to ${c}`), n()) : p("");
|
|
1337
|
+
}), k = () => V(void 0, null, function* () {
|
|
1338
|
+
l && !w && !b ? (d(l), n()) : m && s();
|
|
1333
1339
|
});
|
|
1334
1340
|
let O;
|
|
1335
|
-
return
|
|
1336
|
-
|
|
1341
|
+
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(
|
|
1342
|
+
hn,
|
|
1337
1343
|
{
|
|
1338
1344
|
isOpen: t,
|
|
1339
1345
|
dialogTitle: "Select an organisation",
|
|
1340
1346
|
primaryButton: {
|
|
1341
1347
|
text: "Confirm",
|
|
1342
|
-
onClick:
|
|
1343
|
-
disabled: !c ||
|
|
1348
|
+
onClick: D,
|
|
1349
|
+
disabled: !c || w || b,
|
|
1344
1350
|
buttonColor: "primary"
|
|
1345
1351
|
},
|
|
1346
1352
|
secondaryButton: {
|
|
1347
|
-
text:
|
|
1348
|
-
onClick:
|
|
1353
|
+
text: m ? "Logout" : "Cancel",
|
|
1354
|
+
onClick: k
|
|
1349
1355
|
},
|
|
1350
|
-
onClose:
|
|
1356
|
+
onClose: m ? () => {
|
|
1351
1357
|
} : n,
|
|
1352
1358
|
children: [
|
|
1353
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ h(F, { marginBottom: 2, children: [
|
|
1354
1360
|
"Select the default organisation that you want to use with the ",
|
|
1355
1361
|
a,
|
|
1356
1362
|
"."
|
|
@@ -1362,18 +1368,18 @@ const qe = P(
|
|
|
1362
1368
|
multiple: !1,
|
|
1363
1369
|
disableClearable: !1,
|
|
1364
1370
|
value: c !== "" ? c : null,
|
|
1365
|
-
onChange: (
|
|
1366
|
-
getOptionLabel:
|
|
1371
|
+
onChange: (g, S) => d(S != null ? S : ""),
|
|
1372
|
+
getOptionLabel: jn,
|
|
1367
1373
|
options: [...i],
|
|
1368
|
-
renderInput: (
|
|
1374
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
1369
1375
|
xe,
|
|
1370
|
-
|
|
1376
|
+
A(r({}, g), {
|
|
1371
1377
|
variant: "filled",
|
|
1372
1378
|
label: "Select organisation",
|
|
1373
|
-
InputProps:
|
|
1374
|
-
endAdornment: /* @__PURE__ */
|
|
1379
|
+
InputProps: A(r({}, g.InputProps), {
|
|
1380
|
+
endAdornment: /* @__PURE__ */ h(_, { children: [
|
|
1375
1381
|
e ? /* @__PURE__ */ o(we, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1376
|
-
|
|
1382
|
+
g.InputProps.endAdornment
|
|
1377
1383
|
] })
|
|
1378
1384
|
})
|
|
1379
1385
|
})
|
|
@@ -1384,7 +1390,7 @@ const qe = P(
|
|
|
1384
1390
|
]
|
|
1385
1391
|
}
|
|
1386
1392
|
);
|
|
1387
|
-
},
|
|
1393
|
+
}, Io = Je({
|
|
1388
1394
|
palette: {
|
|
1389
1395
|
primary: {
|
|
1390
1396
|
dark: "#00A651",
|
|
@@ -1435,7 +1441,7 @@ const qe = P(
|
|
|
1435
1441
|
navBar: {
|
|
1436
1442
|
backgroundColor: "#E8E8E8"
|
|
1437
1443
|
}
|
|
1438
|
-
}),
|
|
1444
|
+
}), Oo = Je({
|
|
1439
1445
|
palette: {
|
|
1440
1446
|
primary: {
|
|
1441
1447
|
main: "#007236",
|
|
@@ -1526,24 +1532,24 @@ const qe = P(
|
|
|
1526
1532
|
navBar: {
|
|
1527
1533
|
backgroundColor: "#E8E8E8"
|
|
1528
1534
|
}
|
|
1529
|
-
}),
|
|
1530
|
-
domainCode:
|
|
1535
|
+
}), Kn = {
|
|
1536
|
+
domainCode: vt,
|
|
1531
1537
|
navBarOpen: j,
|
|
1532
|
-
navBarWidthOpen:
|
|
1533
|
-
navBarWidthClosed:
|
|
1538
|
+
navBarWidthOpen: pt,
|
|
1539
|
+
navBarWidthClosed: ut,
|
|
1534
1540
|
titleText: me,
|
|
1535
|
-
topBarHeight:
|
|
1536
|
-
navBarTop:
|
|
1537
|
-
},
|
|
1541
|
+
topBarHeight: ht,
|
|
1542
|
+
navBarTop: gt
|
|
1543
|
+
}, $o = K(() => ({ children: e }) => /* @__PURE__ */ o(nt, { children: e })), Jn = ({
|
|
1538
1544
|
initialValues: e,
|
|
1539
1545
|
children: t
|
|
1540
|
-
}) => (ot(e), /* @__PURE__ */ o(
|
|
1546
|
+
}) => (ot(e), /* @__PURE__ */ o(_, { children: t })), To = K(
|
|
1541
1547
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1542
|
-
|
|
1548
|
+
Jn,
|
|
1543
1549
|
{
|
|
1544
1550
|
initialValues: Object.entries(e).map(
|
|
1545
1551
|
([n, i]) => [
|
|
1546
|
-
|
|
1552
|
+
Kn[n],
|
|
1547
1553
|
i
|
|
1548
1554
|
]
|
|
1549
1555
|
),
|
|
@@ -1551,47 +1557,48 @@ const qe = P(
|
|
|
1551
1557
|
}
|
|
1552
1558
|
)
|
|
1553
1559
|
), yo = K(() => ({ children: e }) => {
|
|
1554
|
-
const t = new
|
|
1555
|
-
return /* @__PURE__ */ o(
|
|
1560
|
+
const t = new en();
|
|
1561
|
+
return /* @__PURE__ */ o(tn, { client: t, children: e });
|
|
1556
1562
|
});
|
|
1557
1563
|
export {
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1564
|
+
hn as AgDialog,
|
|
1565
|
+
Ao as AppLayout,
|
|
1566
|
+
Do as AtomProvider,
|
|
1567
|
+
mt as Context,
|
|
1562
1568
|
Ae as ContextError,
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1569
|
+
ko as DomainCodeDialog,
|
|
1570
|
+
go as ExampleComponent,
|
|
1571
|
+
xo as FetchAutocomplete,
|
|
1572
|
+
Jn as HydrateAtoms,
|
|
1567
1573
|
rt as NAVBAR_WIDTH_CLOSED,
|
|
1568
1574
|
it as NAVBAR_WIDTH_OPENED,
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1575
|
+
vo as NavBar,
|
|
1576
|
+
mo as NavBarDarkStyledList,
|
|
1577
|
+
Co as NavBarLightStyledList,
|
|
1578
|
+
dn as NavBarProvider,
|
|
1579
|
+
bo as PageLayout,
|
|
1574
1580
|
Un as SaladBarProvider,
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1581
|
+
wo as SingleAutocomplete,
|
|
1582
|
+
Xn as atomStore,
|
|
1583
|
+
un as buildNavBarState,
|
|
1584
|
+
vt as domainCodeAtom,
|
|
1585
|
+
Io as fed21Theme,
|
|
1586
|
+
Oo as internalAgSystemsTheme,
|
|
1587
|
+
q as navBarClasses,
|
|
1582
1588
|
j as navBarOpenAtom,
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1589
|
+
gt as navBarTopAtom,
|
|
1590
|
+
ut as navBarWidthClosedAtom,
|
|
1591
|
+
pt as navBarWidthOpenAtom,
|
|
1586
1592
|
me as titleTextAtom,
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1593
|
+
ht as topBarHeightAtom,
|
|
1594
|
+
kn as topBarMiddleAtom,
|
|
1595
|
+
lt as useAutocompleteOptions,
|
|
1596
|
+
pn as useNavBar,
|
|
1590
1597
|
qn as useSaladBar,
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1598
|
+
$o as withAtomProvider,
|
|
1599
|
+
fo as withNavBarProvider,
|
|
1600
|
+
To as withOverrideDefaults,
|
|
1594
1601
|
yo as withQueryClient,
|
|
1595
|
-
|
|
1602
|
+
So as withSaladBarProvider
|
|
1596
1603
|
};
|
|
1597
1604
|
//# sourceMappingURL=index.js.map
|