@australiangreens/ag-internal-components 0.0.70 → 0.0.72
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/.gitignore +0 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +205 -190
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +10 -5
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/TopBar.d.ts +8 -2
- package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/stateAtoms.d.ts +3 -0
- package/dist/layouts/AppLayout/stateAtoms.d.ts.map +1 -1
- package/package.json +20 -22
package/dist/esm/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var Pe = (e, t) => {
|
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var Be = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
-
var
|
|
23
|
+
var B = (e, t, n) => new Promise((r, s) => {
|
|
24
24
|
var l = (p) => {
|
|
25
25
|
try {
|
|
26
26
|
h(n.next(p));
|
|
@@ -36,22 +36,22 @@ var P = (e, t, n) => new Promise((r, s) => {
|
|
|
36
36
|
}, h = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(l, d);
|
|
37
37
|
h((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
39
|
+
import { jsxs as f, Fragment as L, jsx as o } from "react/jsx-runtime";
|
|
40
40
|
import { useState as O, createContext as Je, useCallback as oe, useContext as Ye, useEffect as re, useMemo as Et, createElement as xe, useRef as fe } from "react";
|
|
41
41
|
import { Typography as T, Button as we, Paper as Ze, Box as D, Drawer as Ae, Dialog as Tt, DialogTitle as Ft, DialogContent as yt, DialogActions as Nt, Autocomplete as Se, TextField as De, CircularProgress as ke, Chip as Pt, Tooltip as Bt, Stack as Lt, styled as Oe, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Mt, Collapse as _t, Avatar as Le, Fade as Ht, Skeleton as Me, Toolbar as Rt, Divider as _e, CssBaseline as Wt, Snackbar as zt, Alert as Gt, LinearProgress as Ut, FormHelperText as Vt } from "@mui/material";
|
|
42
42
|
import qt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as M, createTheme as tt, alpha as me } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Xt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as se } from "souvlaki";
|
|
46
46
|
import nt from "@mui/material/List";
|
|
47
47
|
import { Cancel as jt, ArrowDropDown as Qt, ArrowForward as ot, ArrowBack as rt, ViewHeadline as Kt } from "@mui/icons-material";
|
|
48
48
|
import Jt from "autosuggest-highlight/parse";
|
|
49
49
|
import Yt from "autosuggest-highlight/match";
|
|
50
|
-
import { atom as
|
|
50
|
+
import { atom as N, useSetAtom as it, useAtomValue as He, useAtom as V, getDefaultStore as Zt, Provider as at } from "jotai";
|
|
51
51
|
import { useHydrateAtoms as st } from "jotai/utils";
|
|
52
|
-
function
|
|
52
|
+
function co({ text: e }) {
|
|
53
53
|
const [t, n] = O(0);
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ f(L, { children: [
|
|
55
55
|
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
56
56
|
/* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
57
57
|
/* @__PURE__ */ o(
|
|
@@ -63,17 +63,17 @@ function lo({ text: e }) {
|
|
|
63
63
|
children: "Hello I am a button"
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ f("p", { children: [
|
|
67
67
|
"This is some text: ",
|
|
68
68
|
/* @__PURE__ */ o("span", { children: e })
|
|
69
69
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ f(Ze, { children: [
|
|
71
71
|
"This number will incremember when button pressed: ",
|
|
72
72
|
t
|
|
73
73
|
] })
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
76
|
-
const lt = 330, ct = 73, G = "Navbar",
|
|
76
|
+
const lt = 330, ct = 73, G = "Navbar", q = {
|
|
77
77
|
root: `${G}-root`,
|
|
78
78
|
menuButton: `${G}-menuButton`,
|
|
79
79
|
hide: `${G}-hide`,
|
|
@@ -81,23 +81,23 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
81
81
|
userInfoHolder: `${G}-userInfoHolder`,
|
|
82
82
|
settings: `${G}-settings`,
|
|
83
83
|
pieChartIcon: `${G}-pieChartIcon`
|
|
84
|
-
}, en =
|
|
84
|
+
}, en = M(D, {
|
|
85
85
|
name: "NavBar"
|
|
86
86
|
})(({ theme: e }) => ({
|
|
87
|
-
[`&.${
|
|
87
|
+
[`&.${q.root}`]: {
|
|
88
88
|
display: "flex"
|
|
89
89
|
},
|
|
90
|
-
[`& .${
|
|
90
|
+
[`& .${q.menuButton}`]: {
|
|
91
91
|
marginRight: 36
|
|
92
92
|
},
|
|
93
|
-
[`& .${
|
|
93
|
+
[`& .${q.hide}`]: {
|
|
94
94
|
display: "none"
|
|
95
95
|
},
|
|
96
|
-
[`& .${
|
|
96
|
+
[`& .${q.content}`]: {
|
|
97
97
|
flexGrow: 1,
|
|
98
98
|
padding: e.spacing(3)
|
|
99
99
|
},
|
|
100
|
-
[`& .${
|
|
100
|
+
[`& .${q.userInfoHolder}`]: {
|
|
101
101
|
height: "148px",
|
|
102
102
|
marginTop: "64px",
|
|
103
103
|
marginBottom: "16px"
|
|
@@ -114,7 +114,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
114
114
|
width: lt
|
|
115
115
|
}, dt()), nn = () => i({
|
|
116
116
|
width: ct
|
|
117
|
-
}, dt()), on =
|
|
117
|
+
}, dt()), on = M(Ae, {
|
|
118
118
|
shouldForwardProp: (e) => e !== "open"
|
|
119
119
|
})(({ theme: e, open: t }) => i(i({
|
|
120
120
|
width: t ? lt : ct,
|
|
@@ -152,9 +152,9 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
152
152
|
return e;
|
|
153
153
|
}, cn = (e = {}) => i({
|
|
154
154
|
open: !0
|
|
155
|
-
}, e),
|
|
155
|
+
}, e), po = se(
|
|
156
156
|
(e = cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(sn, { overrideState: e, overrideActions: t, children: n })
|
|
157
|
-
), Re = 7,
|
|
157
|
+
), Re = 7, uo = M(nt)(({ theme: e }) => ({
|
|
158
158
|
backgroundColor: "black",
|
|
159
159
|
color: "white",
|
|
160
160
|
"& .MuiListItem-root": {
|
|
@@ -192,7 +192,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
192
192
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
193
193
|
// },
|
|
194
194
|
}
|
|
195
|
-
})), We = 7,
|
|
195
|
+
})), We = 7, ho = M(nt)(({ theme: e }) => ({
|
|
196
196
|
backgroundColor: "#e8e8e8",
|
|
197
197
|
color: "inherit",
|
|
198
198
|
"& .MuiListItem-root": {
|
|
@@ -231,12 +231,12 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
231
231
|
// },
|
|
232
232
|
}
|
|
233
233
|
}));
|
|
234
|
-
function
|
|
234
|
+
function go({
|
|
235
235
|
"data-testid": e,
|
|
236
236
|
children: t
|
|
237
237
|
}) {
|
|
238
238
|
const { open: n } = ln();
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ f(en, { className: q.root, "data-testid": e, children: [
|
|
240
240
|
/* @__PURE__ */ o(qt, {}),
|
|
241
241
|
/* @__PURE__ */ o(
|
|
242
242
|
on,
|
|
@@ -263,11 +263,11 @@ const dn = ({
|
|
|
263
263
|
}) => {
|
|
264
264
|
var b, A;
|
|
265
265
|
const [u, w] = O(!1);
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ f(
|
|
267
267
|
Tt,
|
|
268
268
|
{
|
|
269
269
|
open: e,
|
|
270
|
-
onClose: () =>
|
|
270
|
+
onClose: () => B(void 0, null, function* () {
|
|
271
271
|
u || (l != null && l.onClick ? yield l.onClick() : d());
|
|
272
272
|
}),
|
|
273
273
|
fullWidth: !0,
|
|
@@ -277,7 +277,7 @@ const dn = ({
|
|
|
277
277
|
children: [
|
|
278
278
|
/* @__PURE__ */ o(Ft, { children: t }),
|
|
279
279
|
/* @__PURE__ */ o(yt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ f(Nt, { children: [
|
|
281
281
|
/* @__PURE__ */ o(
|
|
282
282
|
we,
|
|
283
283
|
{
|
|
@@ -291,7 +291,7 @@ const dn = ({
|
|
|
291
291
|
s && /* @__PURE__ */ o(
|
|
292
292
|
we,
|
|
293
293
|
{
|
|
294
|
-
onClick: () =>
|
|
294
|
+
onClick: () => B(void 0, null, function* () {
|
|
295
295
|
var C;
|
|
296
296
|
w(!0), yield (C = s.onClick) == null ? void 0 : C.call(s), w(!1);
|
|
297
297
|
}),
|
|
@@ -306,8 +306,8 @@ const dn = ({
|
|
|
306
306
|
}
|
|
307
307
|
);
|
|
308
308
|
};
|
|
309
|
-
function
|
|
310
|
-
lookup: e = () =>
|
|
309
|
+
function fo({
|
|
310
|
+
lookup: e = () => B(this, null, function* () {
|
|
311
311
|
}),
|
|
312
312
|
enableHighlighting: t = !0,
|
|
313
313
|
onChange: n,
|
|
@@ -326,17 +326,17 @@ function go({
|
|
|
326
326
|
preLoadedOptions: v = void 0,
|
|
327
327
|
disablePortal: $ = !1
|
|
328
328
|
}) {
|
|
329
|
-
const [
|
|
330
|
-
const x = l.filter((
|
|
329
|
+
const [g, m] = O(""), [_, F] = O(v || []), [y, I] = O(!1), [H, P] = O(!1), R = (a, c) => {
|
|
330
|
+
const x = l.filter((X) => X.id !== c);
|
|
331
331
|
n(x, "delete", a);
|
|
332
332
|
};
|
|
333
333
|
re(() => {
|
|
334
334
|
let a;
|
|
335
|
-
const c = () =>
|
|
335
|
+
const c = () => B(this, null, function* () {
|
|
336
336
|
a = new AbortController();
|
|
337
337
|
try {
|
|
338
|
-
const x = yield e(
|
|
339
|
-
F(x != null ? x : []),
|
|
338
|
+
const x = yield e(g, a.signal);
|
|
339
|
+
F(x != null ? x : []), P(!1);
|
|
340
340
|
} catch (x) {
|
|
341
341
|
if (x instanceof Error && x.name === "AbortError")
|
|
342
342
|
console.debug("Previous lookup request was cancelled");
|
|
@@ -344,17 +344,17 @@ function go({
|
|
|
344
344
|
throw x;
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
if (
|
|
348
|
-
return (!r ||
|
|
347
|
+
if (g !== "")
|
|
348
|
+
return (!r || g.length >= r) && !v ? (P(!0), c()) : P(!1), function() {
|
|
349
349
|
a && a.abort();
|
|
350
350
|
};
|
|
351
|
-
}, [
|
|
351
|
+
}, [g, e, r, v]), re(() => {
|
|
352
352
|
!y && !v && F([]), !y && v && F(v);
|
|
353
353
|
}, [y, v]);
|
|
354
354
|
const W = Et(() => v ? (a, c) => a.filter(
|
|
355
355
|
(x) => x.label.toLowerCase().includes(c.inputValue.toLowerCase())
|
|
356
356
|
) : (a) => a, [v]);
|
|
357
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ f("div", { "data-testid": d, children: [
|
|
358
358
|
/* @__PURE__ */ o(
|
|
359
359
|
Se,
|
|
360
360
|
{
|
|
@@ -374,7 +374,7 @@ function go({
|
|
|
374
374
|
onChange: (a, c, x) => {
|
|
375
375
|
n(c, x, a);
|
|
376
376
|
},
|
|
377
|
-
onInputChange: (a, c) =>
|
|
377
|
+
onInputChange: (a, c) => m(c),
|
|
378
378
|
noOptionsText: b,
|
|
379
379
|
loadingText: w,
|
|
380
380
|
popupIcon: A,
|
|
@@ -387,7 +387,7 @@ function go({
|
|
|
387
387
|
error: C,
|
|
388
388
|
helperText: k,
|
|
389
389
|
InputProps: S(i({}, a.InputProps), {
|
|
390
|
-
endAdornment: /* @__PURE__ */
|
|
390
|
+
endAdornment: /* @__PURE__ */ f(L, { children: [
|
|
391
391
|
H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
|
|
392
392
|
a.InputProps.endAdornment
|
|
393
393
|
] })
|
|
@@ -403,10 +403,10 @@ function go({
|
|
|
403
403
|
isOptionEqualToValue: (a, c) => a.id === c.id,
|
|
404
404
|
renderOption: (a, c, x) => {
|
|
405
405
|
if (t) {
|
|
406
|
-
const
|
|
406
|
+
const X = Yt(c.label, x.inputValue, {
|
|
407
407
|
insideWords: !0,
|
|
408
408
|
findAllOccurrences: !0
|
|
409
|
-
}), le = Jt(c.label,
|
|
409
|
+
}), le = Jt(c.label, X);
|
|
410
410
|
return /* @__PURE__ */ xe(
|
|
411
411
|
"li",
|
|
412
412
|
S(i({}, a), {
|
|
@@ -475,7 +475,7 @@ function go({
|
|
|
475
475
|
)) })
|
|
476
476
|
] });
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const mo = ({
|
|
479
479
|
lookup: e,
|
|
480
480
|
onChange: t,
|
|
481
481
|
label: n,
|
|
@@ -490,16 +490,16 @@ const fo = ({
|
|
|
490
490
|
}) => {
|
|
491
491
|
const [b, A] = O([]), [C, k] = O(!1);
|
|
492
492
|
let v;
|
|
493
|
-
const $ = (
|
|
493
|
+
const $ = (g) => B(void 0, null, function* () {
|
|
494
494
|
v = new AbortController();
|
|
495
495
|
try {
|
|
496
|
-
const
|
|
497
|
-
A(
|
|
498
|
-
} catch (
|
|
499
|
-
if (
|
|
496
|
+
const m = yield e(g, v.signal);
|
|
497
|
+
A(m != null ? m : []), k(!1);
|
|
498
|
+
} catch (m) {
|
|
499
|
+
if (m instanceof Error && m.name === "AbortError")
|
|
500
500
|
console.debug("Previous lookup request was cancelled");
|
|
501
501
|
else
|
|
502
|
-
throw
|
|
502
|
+
throw m;
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
505
|
return /* @__PURE__ */ o("div", { "data-testid": h, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
@@ -509,35 +509,35 @@ const fo = ({
|
|
|
509
509
|
"data-testid": h ? `${h}:Autocomplete` : void 0,
|
|
510
510
|
loading: C,
|
|
511
511
|
options: b,
|
|
512
|
-
onChange: (
|
|
513
|
-
t(
|
|
512
|
+
onChange: (g, m) => {
|
|
513
|
+
t(g, m);
|
|
514
514
|
},
|
|
515
515
|
disablePortal: w,
|
|
516
|
-
filterOptions: (
|
|
516
|
+
filterOptions: (g) => g,
|
|
517
517
|
value: r,
|
|
518
518
|
noOptionsText: p,
|
|
519
|
-
getOptionLabel: (
|
|
520
|
-
renderInput: (
|
|
519
|
+
getOptionLabel: (g) => g.label,
|
|
520
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
521
521
|
De,
|
|
522
522
|
S(i({
|
|
523
523
|
"data-testid": h ? `${h}:Autocomplete:TextField` : void 0
|
|
524
|
-
},
|
|
524
|
+
}, g), {
|
|
525
525
|
variant: d,
|
|
526
526
|
label: n,
|
|
527
527
|
color: l
|
|
528
528
|
})
|
|
529
529
|
),
|
|
530
|
-
isOptionEqualToValue: (
|
|
531
|
-
onInputChange: (
|
|
532
|
-
(
|
|
530
|
+
isOptionEqualToValue: (g, m) => g.id === m.id,
|
|
531
|
+
onInputChange: (g, m) => {
|
|
532
|
+
(m == null ? void 0 : m.length) >= u && (k(!0), $(m));
|
|
533
533
|
},
|
|
534
|
-
renderOption: (
|
|
534
|
+
renderOption: (g, m) => /* @__PURE__ */ xe(
|
|
535
535
|
"li",
|
|
536
|
-
S(i({},
|
|
537
|
-
key:
|
|
538
|
-
"data-testid": h ? `${h}:Autocomplete:option(${
|
|
536
|
+
S(i({}, g), {
|
|
537
|
+
key: m.id,
|
|
538
|
+
"data-testid": h ? `${h}:Autocomplete:option(${m.id.toString()})` : void 0
|
|
539
539
|
}),
|
|
540
|
-
|
|
540
|
+
m.label
|
|
541
541
|
)
|
|
542
542
|
}
|
|
543
543
|
) }) });
|
|
@@ -606,10 +606,10 @@ function gn({
|
|
|
606
606
|
rightPanel: n,
|
|
607
607
|
"data-testid": r
|
|
608
608
|
}) {
|
|
609
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ f(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
|
|
610
610
|
/* @__PURE__ */ o("div", { className: E.topStripe }),
|
|
611
|
-
/* @__PURE__ */ o("div", { className: E.titleBar, children: /* @__PURE__ */
|
|
612
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ o("div", { className: E.titleBar, children: /* @__PURE__ */ f(D, { className: E.titleSlider, children: [
|
|
612
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ f(
|
|
613
613
|
Q,
|
|
614
614
|
{
|
|
615
615
|
className: E.leftPanelButton,
|
|
@@ -625,7 +625,7 @@ function gn({
|
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
627
|
/* @__PURE__ */ o(T, { className: E.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
628
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
628
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ f(
|
|
629
629
|
Q,
|
|
630
630
|
{
|
|
631
631
|
className: E.rightPanelButton,
|
|
@@ -711,7 +711,7 @@ function ze({
|
|
|
711
711
|
navBarWidthOpen: C = 0,
|
|
712
712
|
navBarWidthClosed: k = 0
|
|
713
713
|
}) {
|
|
714
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ f(
|
|
715
715
|
fn,
|
|
716
716
|
{
|
|
717
717
|
SlideProps: {
|
|
@@ -728,14 +728,14 @@ function ze({
|
|
|
728
728
|
navBarWidthOpen: C,
|
|
729
729
|
navBarWidthClosed: k,
|
|
730
730
|
children: [
|
|
731
|
-
/* @__PURE__ */ o(mn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ o(mn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(L, { children: [
|
|
732
732
|
/* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: s }),
|
|
733
|
-
d && /* @__PURE__ */
|
|
733
|
+
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
|
|
734
734
|
/* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
|
|
735
735
|
" "
|
|
736
736
|
] })
|
|
737
|
-
] }) : /* @__PURE__ */
|
|
738
|
-
d && /* @__PURE__ */
|
|
737
|
+
] }) : /* @__PURE__ */ f(L, { children: [
|
|
738
|
+
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
|
|
739
739
|
/* @__PURE__ */ o(ot, {}),
|
|
740
740
|
" "
|
|
741
741
|
] }),
|
|
@@ -746,7 +746,7 @@ function ze({
|
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
748
|
}
|
|
749
|
-
const Cn =
|
|
749
|
+
const Cn = M(D, {
|
|
750
750
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
751
751
|
name: "PanelAwareMargins"
|
|
752
752
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -769,7 +769,7 @@ const Cn = L(D, {
|
|
|
769
769
|
}),
|
|
770
770
|
marginRight: `${(s = n == null ? void 0 : n.width) != null ? s : 0}px`
|
|
771
771
|
});
|
|
772
|
-
}), vn =
|
|
772
|
+
}), vn = M(et, {
|
|
773
773
|
name: "PageContainer"
|
|
774
774
|
})(({ theme: e }) => ({
|
|
775
775
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -784,12 +784,12 @@ const Cn = L(D, {
|
|
|
784
784
|
startOpen: !1,
|
|
785
785
|
open: void 0,
|
|
786
786
|
onChangeOpen: void 0,
|
|
787
|
-
content: /* @__PURE__ */ o(
|
|
787
|
+
content: /* @__PURE__ */ o(L, {}),
|
|
788
788
|
onOpened: void 0,
|
|
789
789
|
onClosed: void 0,
|
|
790
790
|
dataTestId: void 0
|
|
791
791
|
};
|
|
792
|
-
function
|
|
792
|
+
function Co({
|
|
793
793
|
children: e,
|
|
794
794
|
titleText: t = "",
|
|
795
795
|
leftPanel: n,
|
|
@@ -803,16 +803,16 @@ function mo({
|
|
|
803
803
|
navBarWidthOpen: w,
|
|
804
804
|
navBarWidthClosed: b
|
|
805
805
|
}) {
|
|
806
|
-
const [A, C] = O(Ce), [k, v] = O(ve), [$,
|
|
806
|
+
const [A, C] = O(Ce), [k, v] = O(ve), [$, g] = O(Ce), [m, _] = O(ve), F = n !== void 0, y = r !== void 0, {
|
|
807
807
|
titleText: I,
|
|
808
808
|
content: H,
|
|
809
|
-
flavour:
|
|
809
|
+
flavour: P,
|
|
810
810
|
open: R,
|
|
811
811
|
onChangeOpen: W,
|
|
812
812
|
width: a,
|
|
813
813
|
arrowButtons: c,
|
|
814
814
|
startOpen: x,
|
|
815
|
-
onOpened:
|
|
815
|
+
onOpened: X,
|
|
816
816
|
onClosed: le,
|
|
817
817
|
dataTestId: J
|
|
818
818
|
} = n ? i(i({}, te), n) : i({}, te), {
|
|
@@ -829,16 +829,16 @@ function mo({
|
|
|
829
829
|
dataTestId: kt
|
|
830
830
|
} = r ? i(i({}, te), r) : i({}, te);
|
|
831
831
|
re(() => {
|
|
832
|
-
x !== Ce && (C(x),
|
|
832
|
+
x !== Ce && (C(x), g(x));
|
|
833
833
|
}, [x]), re(() => {
|
|
834
834
|
Z !== ve && (v(Z), _(Z));
|
|
835
835
|
}, [Z]);
|
|
836
836
|
const ue = R === void 0 ? A : R, he = de === void 0 ? k : de, Te = (z) => {
|
|
837
|
-
R === void 0 && (C(z), s && y && (z ? (v(!1), _(k)) : v(
|
|
837
|
+
R === void 0 && (C(z), s && y && (z ? (v(!1), _(k)) : v(m))), W && W(z);
|
|
838
838
|
}, Fe = (z) => {
|
|
839
|
-
de === void 0 && (v(z), s && F && (z ? (C(!1),
|
|
839
|
+
de === void 0 && (v(z), s && F && (z ? (C(!1), g(A)) : C($))), Ee && Ee(z);
|
|
840
840
|
};
|
|
841
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ f(D, { children: [
|
|
842
842
|
F && /* @__PURE__ */ o(
|
|
843
843
|
ze,
|
|
844
844
|
{
|
|
@@ -850,7 +850,7 @@ function mo({
|
|
|
850
850
|
titleText: I,
|
|
851
851
|
debugOpacity: l,
|
|
852
852
|
showCloseArrow: c === "both" || c === "close",
|
|
853
|
-
onOpened:
|
|
853
|
+
onOpened: X,
|
|
854
854
|
onClosed: le,
|
|
855
855
|
navBarOpen: u,
|
|
856
856
|
navBarWidthOpen: w,
|
|
@@ -882,7 +882,7 @@ function mo({
|
|
|
882
882
|
i(i({
|
|
883
883
|
titleText: t,
|
|
884
884
|
"data-testid": p
|
|
885
|
-
}, F &&
|
|
885
|
+
}, F && P === "push" ? {
|
|
886
886
|
leftPanel: {
|
|
887
887
|
open: ue,
|
|
888
888
|
width: a,
|
|
@@ -900,7 +900,7 @@ function mo({
|
|
|
900
900
|
),
|
|
901
901
|
/* @__PURE__ */ o(
|
|
902
902
|
Cn,
|
|
903
|
-
S(i(i({},
|
|
903
|
+
S(i(i({}, P === "push" ? {
|
|
904
904
|
leftPanel: {
|
|
905
905
|
open: ue,
|
|
906
906
|
width: a
|
|
@@ -919,8 +919,8 @@ function mo({
|
|
|
919
919
|
const ht = () => {
|
|
920
920
|
const e = ae();
|
|
921
921
|
return Mt(e.breakpoints.down("sm"));
|
|
922
|
-
}, xn = 64, wn = 64, bn = 256, K =
|
|
923
|
-
function
|
|
922
|
+
}, xn = 64, wn = 64, bn = 256, K = N(!0), gt = N(bn), ft = N(wn), be = N(""), An = N(void 0), mt = N(xn), Ct = N(void 0);
|
|
923
|
+
function Sn({ links: e }) {
|
|
924
924
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
925
925
|
}
|
|
926
926
|
const ne = "Navbar", j = {
|
|
@@ -931,7 +931,7 @@ const ne = "Navbar", j = {
|
|
|
931
931
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
932
932
|
// settings: `${PREFIX}-settings`,
|
|
933
933
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
934
|
-
},
|
|
934
|
+
}, Dn = M(D, { name: "NavBar" })(({ theme: e }) => ({
|
|
935
935
|
[`&.${j.root}`]: {
|
|
936
936
|
display: "flex"
|
|
937
937
|
},
|
|
@@ -953,7 +953,7 @@ const ne = "Navbar", j = {
|
|
|
953
953
|
})), ie = (e, t, n) => e.transitions.create(t, {
|
|
954
954
|
easing: e.transitions.easing.sharp,
|
|
955
955
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
956
|
-
}),
|
|
956
|
+
}), kn = (e) => {
|
|
957
957
|
const t = ae();
|
|
958
958
|
return /* @__PURE__ */ o(
|
|
959
959
|
_t,
|
|
@@ -979,7 +979,7 @@ const ne = "Navbar", j = {
|
|
|
979
979
|
}, vt(e)), Ue = (e, t) => i({
|
|
980
980
|
width: t,
|
|
981
981
|
transition: ie(e, "width", "leaving")
|
|
982
|
-
}, vt(e)),
|
|
982
|
+
}, vt(e)), On = M(Ae, {
|
|
983
983
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
984
984
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: s }) => i(i({
|
|
985
985
|
flexShrink: 0,
|
|
@@ -994,7 +994,7 @@ const ne = "Navbar", j = {
|
|
|
994
994
|
backgroundColor: "",
|
|
995
995
|
"& .MuiDrawer-paper": Ue(e, s ? n : r)
|
|
996
996
|
})));
|
|
997
|
-
function
|
|
997
|
+
function $n(e) {
|
|
998
998
|
let t = 0;
|
|
999
999
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
1000
1000
|
const s = e.charCodeAt(n);
|
|
@@ -1002,10 +1002,10 @@ function On(e) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
return t;
|
|
1004
1004
|
}
|
|
1005
|
-
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"],
|
|
1006
|
-
function
|
|
1005
|
+
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], In = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
1006
|
+
function En({ user: e, domainCode: t, open: n }) {
|
|
1007
1007
|
const r = ae();
|
|
1008
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ f(
|
|
1009
1009
|
D,
|
|
1010
1010
|
{
|
|
1011
1011
|
sx: {
|
|
@@ -1031,14 +1031,14 @@ function In({ user: e, domainCode: t, open: n }) {
|
|
|
1031
1031
|
sx: {
|
|
1032
1032
|
width: "100%",
|
|
1033
1033
|
height: "100%",
|
|
1034
|
-
bgcolor: Ve[Math.abs(
|
|
1034
|
+
bgcolor: Ve[Math.abs($n(e.name)) % Ve.length]
|
|
1035
1035
|
},
|
|
1036
|
-
children:
|
|
1036
|
+
children: In(e.name)
|
|
1037
1037
|
}
|
|
1038
1038
|
) : /* @__PURE__ */ o(Le, { sx: { width: "100%", height: "100%" } })
|
|
1039
1039
|
}
|
|
1040
1040
|
),
|
|
1041
|
-
/* @__PURE__ */ o(
|
|
1041
|
+
/* @__PURE__ */ o(kn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ht, { in: n, children: /* @__PURE__ */ f(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1042
1042
|
e != null && e.name ? /* @__PURE__ */ o(T, { children: e.name }) : /* @__PURE__ */ o(Me, { animation: !1, width: "50%" }),
|
|
1043
1043
|
t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Me, { animation: !1, width: "25%" })
|
|
1044
1044
|
] }) }) })
|
|
@@ -1046,7 +1046,7 @@ function In({ user: e, domainCode: t, open: n }) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function Tn({
|
|
1050
1050
|
open: e,
|
|
1051
1051
|
widthClosed: t,
|
|
1052
1052
|
widthOpen: n,
|
|
@@ -1058,8 +1058,8 @@ function En({
|
|
|
1058
1058
|
domainCode: p
|
|
1059
1059
|
}) {
|
|
1060
1060
|
const u = ht(), w = it(K);
|
|
1061
|
-
return /* @__PURE__ */ o(
|
|
1062
|
-
|
|
1061
|
+
return /* @__PURE__ */ o(Dn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
|
|
1062
|
+
On,
|
|
1063
1063
|
{
|
|
1064
1064
|
open: e,
|
|
1065
1065
|
widthOpen: n,
|
|
@@ -1075,21 +1075,21 @@ function En({
|
|
|
1075
1075
|
isSmallScreen: u,
|
|
1076
1076
|
children: [
|
|
1077
1077
|
!u && /* @__PURE__ */ o(Rt, {}),
|
|
1078
|
-
s && /* @__PURE__ */
|
|
1078
|
+
s && /* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1079
1079
|
s,
|
|
1080
1080
|
/* @__PURE__ */ o(_e, { variant: "middle" })
|
|
1081
1081
|
] }),
|
|
1082
|
-
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(
|
|
1083
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(Sn, { links: l }) : l }),
|
|
1083
|
+
/* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1084
1084
|
/* @__PURE__ */ o(_e, { variant: "middle" }),
|
|
1085
|
-
/* @__PURE__ */ o(
|
|
1086
|
-
d && /* @__PURE__ */ o(
|
|
1085
|
+
/* @__PURE__ */ o(En, { user: h, domainCode: p, open: e }),
|
|
1086
|
+
d && /* @__PURE__ */ o(L, { children: d })
|
|
1087
1087
|
] })
|
|
1088
1088
|
]
|
|
1089
1089
|
}
|
|
1090
1090
|
) });
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Fn({
|
|
1093
1093
|
children: e,
|
|
1094
1094
|
topBarHeight: t,
|
|
1095
1095
|
maxWidth: n = !1
|
|
@@ -1117,12 +1117,17 @@ function Tn({
|
|
|
1117
1117
|
}
|
|
1118
1118
|
);
|
|
1119
1119
|
}
|
|
1120
|
-
const
|
|
1121
|
-
titleText: `${
|
|
1120
|
+
const yn = "TopBar", Nn = {
|
|
1121
|
+
titleText: `${yn}-titleText`
|
|
1122
1122
|
};
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1125
|
-
|
|
1123
|
+
function Pn({
|
|
1124
|
+
titleText: e = "",
|
|
1125
|
+
height: t,
|
|
1126
|
+
"data-testid": n,
|
|
1127
|
+
middle: r
|
|
1128
|
+
}) {
|
|
1129
|
+
const s = it(K), l = () => s((p) => !p), d = ae(), h = ht();
|
|
1130
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
|
|
1126
1131
|
Ze,
|
|
1127
1132
|
{
|
|
1128
1133
|
square: !0,
|
|
@@ -1137,16 +1142,17 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
1137
1142
|
gap: 2,
|
|
1138
1143
|
flexShrink: 0,
|
|
1139
1144
|
height: t,
|
|
1140
|
-
zIndex:
|
|
1145
|
+
zIndex: h ? 0 : d.zIndex.drawer + 1
|
|
1141
1146
|
},
|
|
1142
1147
|
children: [
|
|
1143
|
-
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick:
|
|
1144
|
-
/* @__PURE__ */ o(T, { className:
|
|
1148
|
+
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: l, children: /* @__PURE__ */ o(Kt, { fontSize: "medium" }) }),
|
|
1149
|
+
/* @__PURE__ */ o(T, { className: Nn.titleText, variant: "h6", children: e }),
|
|
1150
|
+
r
|
|
1145
1151
|
]
|
|
1146
1152
|
}
|
|
1147
1153
|
) });
|
|
1148
1154
|
}
|
|
1149
|
-
function
|
|
1155
|
+
function vo({
|
|
1150
1156
|
children: e,
|
|
1151
1157
|
initialTitleText: t,
|
|
1152
1158
|
initialNavBarOpen: n,
|
|
@@ -1163,16 +1169,24 @@ function Co({
|
|
|
1163
1169
|
[K, n != null ? n : !0],
|
|
1164
1170
|
[be, t != null ? t : ""]
|
|
1165
1171
|
]);
|
|
1166
|
-
const b = He(K), [A] =
|
|
1167
|
-
return /* @__PURE__ */
|
|
1172
|
+
const b = He(K), [A] = V(gt), [C] = V(ft), k = He(be), [v] = V(mt), [$] = V(An), [g] = V(Ct);
|
|
1173
|
+
return /* @__PURE__ */ f(D, { children: [
|
|
1168
1174
|
/* @__PURE__ */ o(Wt, {}),
|
|
1169
|
-
/* @__PURE__ */ o(
|
|
1170
|
-
|
|
1175
|
+
/* @__PURE__ */ o(
|
|
1176
|
+
Pn,
|
|
1177
|
+
{
|
|
1178
|
+
titleText: k,
|
|
1179
|
+
"data-testid": l,
|
|
1180
|
+
height: v,
|
|
1181
|
+
middle: $
|
|
1182
|
+
}
|
|
1183
|
+
),
|
|
1184
|
+
/* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
|
|
1171
1185
|
/* @__PURE__ */ o(
|
|
1172
|
-
|
|
1186
|
+
Tn,
|
|
1173
1187
|
{
|
|
1174
1188
|
open: b,
|
|
1175
|
-
top:
|
|
1189
|
+
top: g,
|
|
1176
1190
|
middle: h,
|
|
1177
1191
|
bottom: p,
|
|
1178
1192
|
user: u,
|
|
@@ -1184,7 +1198,7 @@ function Co({
|
|
|
1184
1198
|
}
|
|
1185
1199
|
),
|
|
1186
1200
|
/* @__PURE__ */ o(
|
|
1187
|
-
|
|
1201
|
+
Fn,
|
|
1188
1202
|
S(i({
|
|
1189
1203
|
"data-testid": s,
|
|
1190
1204
|
topBarHeight: v
|
|
@@ -1195,13 +1209,13 @@ function Co({
|
|
|
1195
1209
|
] })
|
|
1196
1210
|
] });
|
|
1197
1211
|
}
|
|
1198
|
-
const
|
|
1212
|
+
const Bn = {
|
|
1199
1213
|
autoHideDuration: 6e3,
|
|
1200
1214
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1201
1215
|
// The default is false. If we prefer timer to continue when window loses
|
|
1202
1216
|
// focus, change to true
|
|
1203
1217
|
disableWindowBlurListener: !1
|
|
1204
|
-
},
|
|
1218
|
+
}, Ln = {
|
|
1205
1219
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1206
1220
|
}, qe = {
|
|
1207
1221
|
message: "",
|
|
@@ -1209,18 +1223,18 @@ const Pn = {
|
|
|
1209
1223
|
variant: "standard",
|
|
1210
1224
|
progressIndicator: void 0
|
|
1211
1225
|
// Can use 'circular' or 'linear'
|
|
1212
|
-
}, Xe = 100, je = 2e3,
|
|
1226
|
+
}, Xe = 100, je = 2e3, Mn = 2e3, _n = (() => {
|
|
1213
1227
|
let e = 0;
|
|
1214
1228
|
return () => (e += 1, e);
|
|
1215
|
-
})(),
|
|
1229
|
+
})(), Hn = {
|
|
1216
1230
|
borderBottomLeftRadius: "0px",
|
|
1217
1231
|
borderBottomRightRadius: "0px"
|
|
1218
|
-
},
|
|
1219
|
-
function
|
|
1232
|
+
}, Rn = {}, Wn = {}, xt = Je(null);
|
|
1233
|
+
function zn(l) {
|
|
1220
1234
|
var d = l, {
|
|
1221
|
-
overrideState: e =
|
|
1222
|
-
overrideActions: t =
|
|
1223
|
-
shouldClose: n =
|
|
1235
|
+
overrideState: e = Rn,
|
|
1236
|
+
overrideActions: t = Wn,
|
|
1237
|
+
shouldClose: n = Ln.shouldClose,
|
|
1224
1238
|
children: r
|
|
1225
1239
|
} = d, s = Pe(d, [
|
|
1226
1240
|
"overrideState",
|
|
@@ -1236,10 +1250,10 @@ function Wn(l) {
|
|
|
1236
1250
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${b.current} times in last ${je}ms)`
|
|
1237
1251
|
), b.current = 0);
|
|
1238
1252
|
const c = i(S(i({}, qe), {
|
|
1239
|
-
key:
|
|
1253
|
+
key: _n()
|
|
1240
1254
|
}), a);
|
|
1241
1255
|
return u.current.push(c), u.current.length === 1 && p({ open: !0 }), c.key;
|
|
1242
|
-
}, []), k = (a = "", c = {}) => C(i({ message: a, severity: "success" }, c)), v = (a = "", c = {}) => C(i({ message: a, severity: "info" }, c)), $ = (a = "", c = {}) => C(i({ message: a, severity: "warning" }, c)),
|
|
1256
|
+
}, []), k = (a = "", c = {}) => C(i({ message: a, severity: "success" }, c)), v = (a = "", c = {}) => C(i({ message: a, severity: "info" }, c)), $ = (a = "", c = {}) => C(i({ message: a, severity: "warning" }, c)), g = (a = "", c = {}) => C(i({ message: a, severity: "error" }, c)), m = (a) => {
|
|
1243
1257
|
const c = u.current.findIndex((x) => x.key === a);
|
|
1244
1258
|
if (c !== -1)
|
|
1245
1259
|
return c === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(c, 1);
|
|
@@ -1250,29 +1264,29 @@ function Wn(l) {
|
|
|
1250
1264
|
u.current.shift(), u.current.length > 0 && p({ open: !0 });
|
|
1251
1265
|
}, I = (W = u.current[0]) != null ? W : i({}, qe), H = {};
|
|
1252
1266
|
"autoHideDuration" in I && (H.autoHideDuration = I.autoHideDuration);
|
|
1253
|
-
const
|
|
1267
|
+
const P = i(i({}, Bn), s), R = i(i({
|
|
1254
1268
|
open: h,
|
|
1255
1269
|
setOpen: A,
|
|
1256
1270
|
enqueueNotification: C,
|
|
1257
1271
|
enqueueSuccessNotification: k,
|
|
1258
1272
|
enqueueInfoNotification: v,
|
|
1259
1273
|
enqueueWarningNotification: $,
|
|
1260
|
-
enqueueErrorNotification:
|
|
1261
|
-
removeNotification:
|
|
1274
|
+
enqueueErrorNotification: g,
|
|
1275
|
+
removeNotification: m
|
|
1262
1276
|
}, e), t);
|
|
1263
|
-
return /* @__PURE__ */
|
|
1277
|
+
return /* @__PURE__ */ f(xt.Provider, { value: R, children: [
|
|
1264
1278
|
r,
|
|
1265
1279
|
/* @__PURE__ */ o(
|
|
1266
1280
|
zt,
|
|
1267
|
-
S(i(i({},
|
|
1281
|
+
S(i(i({}, P), H), {
|
|
1268
1282
|
open: h,
|
|
1269
1283
|
onClose: _,
|
|
1270
1284
|
TransitionProps: {
|
|
1271
1285
|
onExited: y,
|
|
1272
1286
|
onExit: F
|
|
1273
1287
|
},
|
|
1274
|
-
sx: { zIndex:
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1288
|
+
sx: { zIndex: Mn },
|
|
1289
|
+
children: /* @__PURE__ */ f("div", { children: [
|
|
1276
1290
|
/* @__PURE__ */ o(
|
|
1277
1291
|
Gt,
|
|
1278
1292
|
{
|
|
@@ -1280,7 +1294,7 @@ function Wn(l) {
|
|
|
1280
1294
|
severity: I.severity,
|
|
1281
1295
|
variant: "filled",
|
|
1282
1296
|
icon: I.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
|
|
1283
|
-
style: I.progressIndicator === "linear" ?
|
|
1297
|
+
style: I.progressIndicator === "linear" ? Hn : void 0,
|
|
1284
1298
|
children: I.message
|
|
1285
1299
|
}
|
|
1286
1300
|
),
|
|
@@ -1290,27 +1304,27 @@ function Wn(l) {
|
|
|
1290
1304
|
)
|
|
1291
1305
|
] });
|
|
1292
1306
|
}
|
|
1293
|
-
function
|
|
1307
|
+
function Gn() {
|
|
1294
1308
|
const e = Ye(xt);
|
|
1295
1309
|
if (e === null)
|
|
1296
1310
|
throw new $e("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1297
1311
|
return e;
|
|
1298
1312
|
}
|
|
1299
|
-
const
|
|
1300
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(
|
|
1301
|
-
),
|
|
1313
|
+
const xo = se(
|
|
1314
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(zn, S(i({}, e), { overrideState: t, overrideActions: n, children: r }))
|
|
1315
|
+
), Un = Zt(), wo = ({
|
|
1302
1316
|
children: e,
|
|
1303
1317
|
store: t
|
|
1304
|
-
}) => /* @__PURE__ */ o(at, { store: t != null ? t :
|
|
1318
|
+
}) => /* @__PURE__ */ o(at, { store: t != null ? t : Un, children: e }), wt = "domainCode";
|
|
1305
1319
|
var Ke;
|
|
1306
|
-
const Qe =
|
|
1320
|
+
const Qe = N(
|
|
1307
1321
|
JSON.parse((Ke = localStorage.getItem(wt)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
1308
|
-
), bt =
|
|
1322
|
+
), bt = N(
|
|
1309
1323
|
(e) => e(Qe),
|
|
1310
1324
|
(e, t, n) => {
|
|
1311
1325
|
t(Qe, n), localStorage.setItem(wt, JSON.stringify({ domainCode: n }));
|
|
1312
1326
|
}
|
|
1313
|
-
),
|
|
1327
|
+
), Vn = {
|
|
1314
1328
|
act: "ACT",
|
|
1315
1329
|
nsw: "NSW",
|
|
1316
1330
|
nt: "NT",
|
|
@@ -1322,10 +1336,10 @@ const Qe = M(
|
|
|
1322
1336
|
ag: "AG",
|
|
1323
1337
|
fedmps: "Fedmps",
|
|
1324
1338
|
"": ""
|
|
1325
|
-
},
|
|
1339
|
+
}, qn = (e) => {
|
|
1326
1340
|
var t;
|
|
1327
|
-
return e === null ? "N/A" : (t =
|
|
1328
|
-
},
|
|
1341
|
+
return e === null ? "N/A" : (t = Vn[e]) != null ? t : "";
|
|
1342
|
+
}, bo = ({
|
|
1329
1343
|
isLoading: e,
|
|
1330
1344
|
isOpen: t,
|
|
1331
1345
|
onClose: n,
|
|
@@ -1333,13 +1347,13 @@ const Qe = M(
|
|
|
1333
1347
|
applicationName: s,
|
|
1334
1348
|
handleLogout: l
|
|
1335
1349
|
}) => {
|
|
1336
|
-
const [d, h] =
|
|
1350
|
+
const [d, h] = V(bt), [p, u] = O(d), { enqueueSuccessNotification: w } = Gn(), b = r.length === 0, A = !!d && !r.includes(d) && !r.includes(p), C = !d || b || A, k = () => B(void 0, null, function* () {
|
|
1337
1351
|
p ? (h(p), w(`Set domain to ${p}`), n()) : h("");
|
|
1338
|
-
}), v = () =>
|
|
1352
|
+
}), v = () => B(void 0, null, function* () {
|
|
1339
1353
|
d && !b && !A ? (u(d), n()) : C && l();
|
|
1340
1354
|
});
|
|
1341
1355
|
let $;
|
|
1342
|
-
return b ? $ = "Unable to retrieve your active organisations. Try logging in again." : A && ($ = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */
|
|
1356
|
+
return b ? $ = "Unable to retrieve your active organisations. Try logging in again." : A && ($ = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ f(
|
|
1343
1357
|
dn,
|
|
1344
1358
|
{
|
|
1345
1359
|
isOpen: t,
|
|
@@ -1357,7 +1371,7 @@ const Qe = M(
|
|
|
1357
1371
|
onClose: C ? () => {
|
|
1358
1372
|
} : n,
|
|
1359
1373
|
children: [
|
|
1360
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ f(T, { marginBottom: 2, children: [
|
|
1361
1375
|
"Select the default organisation that you want to use with the ",
|
|
1362
1376
|
s,
|
|
1363
1377
|
"."
|
|
@@ -1369,18 +1383,18 @@ const Qe = M(
|
|
|
1369
1383
|
multiple: !1,
|
|
1370
1384
|
disableClearable: !1,
|
|
1371
1385
|
value: p !== "" ? p : null,
|
|
1372
|
-
onChange: (
|
|
1373
|
-
getOptionLabel:
|
|
1386
|
+
onChange: (g, m) => u(m != null ? m : ""),
|
|
1387
|
+
getOptionLabel: qn,
|
|
1374
1388
|
options: [...r],
|
|
1375
|
-
renderInput: (
|
|
1389
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
1376
1390
|
De,
|
|
1377
|
-
S(i({},
|
|
1391
|
+
S(i({}, g), {
|
|
1378
1392
|
variant: "filled",
|
|
1379
1393
|
label: "Select organisation",
|
|
1380
|
-
InputProps: S(i({},
|
|
1381
|
-
endAdornment: /* @__PURE__ */
|
|
1394
|
+
InputProps: S(i({}, g.InputProps), {
|
|
1395
|
+
endAdornment: /* @__PURE__ */ f(L, { children: [
|
|
1382
1396
|
e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1383
|
-
|
|
1397
|
+
g.InputProps.endAdornment
|
|
1384
1398
|
] })
|
|
1385
1399
|
})
|
|
1386
1400
|
})
|
|
@@ -1391,7 +1405,7 @@ const Qe = M(
|
|
|
1391
1405
|
]
|
|
1392
1406
|
}
|
|
1393
1407
|
);
|
|
1394
|
-
},
|
|
1408
|
+
}, Ao = tt({
|
|
1395
1409
|
palette: {
|
|
1396
1410
|
primary: {
|
|
1397
1411
|
dark: "#00A651",
|
|
@@ -1442,7 +1456,7 @@ const Qe = M(
|
|
|
1442
1456
|
navBar: {
|
|
1443
1457
|
backgroundColor: "#E8E8E8"
|
|
1444
1458
|
}
|
|
1445
|
-
}),
|
|
1459
|
+
}), So = tt({
|
|
1446
1460
|
palette: {
|
|
1447
1461
|
primary: {
|
|
1448
1462
|
main: "#007236",
|
|
@@ -1533,7 +1547,7 @@ const Qe = M(
|
|
|
1533
1547
|
navBar: {
|
|
1534
1548
|
backgroundColor: "#E8E8E8"
|
|
1535
1549
|
}
|
|
1536
|
-
}),
|
|
1550
|
+
}), Xn = {
|
|
1537
1551
|
domainCode: bt,
|
|
1538
1552
|
navBarOpen: K,
|
|
1539
1553
|
navBarWidthOpen: gt,
|
|
@@ -1541,16 +1555,16 @@ const Qe = M(
|
|
|
1541
1555
|
titleText: be,
|
|
1542
1556
|
topBarHeight: mt,
|
|
1543
1557
|
navBarTop: Ct
|
|
1544
|
-
},
|
|
1558
|
+
}, Do = se(() => ({ children: e }) => /* @__PURE__ */ o(at, { children: e })), jn = ({
|
|
1545
1559
|
initialValues: e,
|
|
1546
1560
|
children: t
|
|
1547
|
-
}) => (st(e), /* @__PURE__ */ o(
|
|
1561
|
+
}) => (st(e), /* @__PURE__ */ o(L, { children: t })), ko = se(
|
|
1548
1562
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1549
|
-
|
|
1563
|
+
jn,
|
|
1550
1564
|
{
|
|
1551
1565
|
initialValues: Object.entries(e).map(
|
|
1552
1566
|
([n, r]) => [
|
|
1553
|
-
|
|
1567
|
+
Xn[n],
|
|
1554
1568
|
r
|
|
1555
1569
|
]
|
|
1556
1570
|
),
|
|
@@ -1560,40 +1574,41 @@ const Qe = M(
|
|
|
1560
1574
|
);
|
|
1561
1575
|
export {
|
|
1562
1576
|
dn as AgDialog,
|
|
1563
|
-
|
|
1564
|
-
|
|
1577
|
+
vo as AppLayout,
|
|
1578
|
+
wo as AtomProvider,
|
|
1565
1579
|
xt as Context,
|
|
1566
1580
|
$e as ContextError,
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1581
|
+
bo as DomainCodeDialog,
|
|
1582
|
+
co as ExampleComponent,
|
|
1583
|
+
fo as FetchAutocomplete,
|
|
1584
|
+
jn as HydrateAtoms,
|
|
1571
1585
|
ct as NAVBAR_WIDTH_CLOSED,
|
|
1572
1586
|
lt as NAVBAR_WIDTH_OPENED,
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1587
|
+
go as NavBar,
|
|
1588
|
+
uo as NavBarDarkStyledList,
|
|
1589
|
+
ho as NavBarLightStyledList,
|
|
1576
1590
|
sn as NavBarProvider,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1591
|
+
Co as PageLayout,
|
|
1592
|
+
zn as SaladBarProvider,
|
|
1593
|
+
mo as SingleAutocomplete,
|
|
1594
|
+
Un as atomStore,
|
|
1581
1595
|
cn as buildNavBarState,
|
|
1582
1596
|
bt as domainCodeAtom,
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1597
|
+
Ao as fed21Theme,
|
|
1598
|
+
So as internalAgSystemsTheme,
|
|
1599
|
+
q as navBarClasses,
|
|
1586
1600
|
K as navBarOpenAtom,
|
|
1587
1601
|
Ct as navBarTopAtom,
|
|
1588
1602
|
ft as navBarWidthClosedAtom,
|
|
1589
1603
|
gt as navBarWidthOpenAtom,
|
|
1590
1604
|
be as titleTextAtom,
|
|
1591
1605
|
mt as topBarHeightAtom,
|
|
1606
|
+
An as topBarMiddleAtom,
|
|
1592
1607
|
ln as useNavBar,
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1608
|
+
Gn as useSaladBar,
|
|
1609
|
+
Do as withAtomProvider,
|
|
1610
|
+
po as withNavBarProvider,
|
|
1611
|
+
ko as withOverrideDefaults,
|
|
1612
|
+
xo as withSaladBarProvider
|
|
1598
1613
|
};
|
|
1599
1614
|
//# sourceMappingURL=index.js.map
|