@australiangreens/ag-internal-components 0.0.45 → 0.0.47
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/domainCode/DomainCodeDialog.d.ts.map +1 -1
- package/dist/esm/index.js +560 -500
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts +6 -0
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts.map +1 -0
- package/dist/layouts/AppLayout/NavBar/Styling.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +2 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -1
- package/dist/providers/Atom/AtomProvider.d.ts +1 -4
- package/dist/providers/Atom/AtomProvider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,111 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var It = Object.defineProperty, Ot = Object.defineProperties;
|
|
2
|
+
var Tt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Z = Object.getOwnPropertySymbols;
|
|
4
|
+
var Te = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ue = (e, t, n) => t in e ? It(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
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
Te.call(t, n) && ue(e, n, t[n]);
|
|
8
|
+
if (Z)
|
|
9
|
+
for (var n of Z(t))
|
|
10
|
+
De.call(t, n) && ue(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, v = (e, t) => Ot(e, Tt(t));
|
|
13
|
+
var Be = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var
|
|
19
|
-
t.indexOf(
|
|
15
|
+
for (var i in e)
|
|
16
|
+
Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
|
+
if (e != null && Z)
|
|
18
|
+
for (var i of Z(e))
|
|
19
|
+
t.indexOf(i) < 0 && De.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var $e = (e, t, n) => (ue(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
+
var ee = (e, t, n) => new Promise((i, a) => {
|
|
24
24
|
var l = (s) => {
|
|
25
25
|
try {
|
|
26
26
|
u(n.next(s));
|
|
27
|
-
} catch (
|
|
28
|
-
a(
|
|
27
|
+
} catch (c) {
|
|
28
|
+
a(c);
|
|
29
29
|
}
|
|
30
30
|
}, p = (s) => {
|
|
31
31
|
try {
|
|
32
32
|
u(n.throw(s));
|
|
33
|
-
} catch (
|
|
34
|
-
a(
|
|
33
|
+
} catch (c) {
|
|
34
|
+
a(c);
|
|
35
35
|
}
|
|
36
|
-
}, u = (s) => s.done ?
|
|
36
|
+
}, u = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(l, p);
|
|
37
37
|
u((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
42
|
-
import
|
|
43
|
-
import { styled as
|
|
44
|
-
import
|
|
45
|
-
import { AgError as
|
|
46
|
-
import { createHelper as
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import { ArrowForward as
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */ o(
|
|
61
|
-
/* @__PURE__ */ o($, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
39
|
+
import { jsxs as d, Fragment as P, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as T, createContext as qe, useCallback as re, useContext as je, useEffect as ae, useRef as he } from "react";
|
|
41
|
+
import { Typography as B, Button as Dt, Paper as Qe, styled as j, Box as w, IconButton as q, Drawer as Bt, Container as Ye, Avatar as te, Skeleton as ke, List as Ee, ListItemButton as M, ListItemIcon as ge, ListItemText as _, Collapse as $t, Divider as Ne, CssBaseline as kt, Snackbar as Et, Alert as Nt, CircularProgress as Je, LinearProgress as Lt, Autocomplete as Ft, TextField as Pt, FormHelperText as yt } from "@mui/material";
|
|
42
|
+
import Mt from "@mui/material/CssBaseline";
|
|
43
|
+
import { styled as R, createTheme as Ke, alpha as fe } from "@mui/material/styles";
|
|
44
|
+
import Ze from "@mui/material/Drawer";
|
|
45
|
+
import { AgError as _t } from "@australiangreens/ag-error";
|
|
46
|
+
import { createHelper as se } from "souvlaki";
|
|
47
|
+
import et from "@mui/material/List";
|
|
48
|
+
import Le from "@mui/material/Button";
|
|
49
|
+
import Ht from "@mui/material/Dialog";
|
|
50
|
+
import Rt from "@mui/material/DialogActions";
|
|
51
|
+
import Wt from "@mui/material/DialogContent";
|
|
52
|
+
import zt from "@mui/material/DialogTitle";
|
|
53
|
+
import { ArrowForward as tt, ArrowBack as nt, Dashboard as Ut, ExpandLess as Gt, ExpandMore as Vt, Settings as Xt, Logout as qt, ViewHeadline as jt } from "@mui/icons-material";
|
|
54
|
+
import { useAtomValue as Fe, atom as $, useSetAtom as Qt, useAtom as L, getDefaultStore as Yt, Provider as ot } from "jotai";
|
|
55
|
+
import { useHydrateAtoms as Jt } from "jotai/utils";
|
|
56
|
+
function lo({ text: e }) {
|
|
57
|
+
const [t, n] = T(0);
|
|
58
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
59
|
+
/* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
60
|
+
/* @__PURE__ */ o(B, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
61
|
/* @__PURE__ */ o(
|
|
63
|
-
|
|
62
|
+
Dt,
|
|
64
63
|
{
|
|
65
64
|
variant: "outlined",
|
|
66
|
-
onClick: () => n((
|
|
65
|
+
onClick: () => n((i) => i + 1),
|
|
67
66
|
"aria-label": "Increment",
|
|
68
67
|
children: "Hello I am a button"
|
|
69
68
|
}
|
|
70
69
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ d("p", { children: [
|
|
72
71
|
"This is some text: ",
|
|
73
72
|
/* @__PURE__ */ o("span", { children: e })
|
|
74
73
|
] }),
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ d(Qe, { children: [
|
|
76
75
|
"This number will incremember when button pressed: ",
|
|
77
76
|
t
|
|
78
77
|
] })
|
|
79
78
|
] });
|
|
80
79
|
}
|
|
81
|
-
const
|
|
82
|
-
root: `${
|
|
83
|
-
menuButton: `${
|
|
84
|
-
hide: `${
|
|
85
|
-
content: `${
|
|
86
|
-
userInfoHolder: `${
|
|
87
|
-
settings: `${
|
|
88
|
-
pieChartIcon: `${
|
|
89
|
-
},
|
|
90
|
-
[`&.${
|
|
80
|
+
const it = 330, rt = 73, N = "Navbar", H = {
|
|
81
|
+
root: `${N}-root`,
|
|
82
|
+
menuButton: `${N}-menuButton`,
|
|
83
|
+
hide: `${N}-hide`,
|
|
84
|
+
content: `${N}-content`,
|
|
85
|
+
userInfoHolder: `${N}-userInfoHolder`,
|
|
86
|
+
settings: `${N}-settings`,
|
|
87
|
+
pieChartIcon: `${N}-pieChartIcon`
|
|
88
|
+
}, Kt = R("div", { name: "NavBar" })(({ theme: e }) => ({
|
|
89
|
+
[`&.${H.root}`]: {
|
|
91
90
|
display: "flex"
|
|
92
91
|
},
|
|
93
|
-
[`& .${
|
|
92
|
+
[`& .${H.menuButton}`]: {
|
|
94
93
|
marginRight: 36
|
|
95
94
|
},
|
|
96
|
-
[`& .${
|
|
95
|
+
[`& .${H.hide}`]: {
|
|
97
96
|
display: "none"
|
|
98
97
|
},
|
|
99
|
-
[`& .${
|
|
98
|
+
[`& .${H.content}`]: {
|
|
100
99
|
flexGrow: 1,
|
|
101
100
|
padding: e.spacing(3)
|
|
102
101
|
},
|
|
103
|
-
[`& .${
|
|
102
|
+
[`& .${H.userInfoHolder}`]: {
|
|
104
103
|
height: "148px",
|
|
105
104
|
marginTop: "64px",
|
|
106
105
|
marginBottom: "16px"
|
|
107
106
|
}
|
|
108
|
-
})),
|
|
107
|
+
})), at = () => ({
|
|
109
108
|
position: "absolute",
|
|
110
109
|
height: "100%",
|
|
111
110
|
overflowX: "hidden",
|
|
@@ -113,51 +112,51 @@ const Qe = 330, Je = 73, E = "Navbar", P = {
|
|
|
113
112
|
color: "white",
|
|
114
113
|
backgroundColor: "black"
|
|
115
114
|
// backgroundColor: '#e8e8e8',
|
|
116
|
-
}),
|
|
117
|
-
width:
|
|
118
|
-
},
|
|
119
|
-
width:
|
|
120
|
-
},
|
|
115
|
+
}), Zt = () => r({
|
|
116
|
+
width: it
|
|
117
|
+
}, at()), en = () => r({
|
|
118
|
+
width: rt
|
|
119
|
+
}, at()), tn = R(Ze, {
|
|
121
120
|
shouldForwardProp: (e) => e !== "open"
|
|
122
|
-
})(({ theme: e, open: t }) =>
|
|
123
|
-
width: t ?
|
|
121
|
+
})(({ theme: e, open: t }) => r(r({
|
|
122
|
+
width: t ? it : rt,
|
|
124
123
|
flexShrink: 0,
|
|
125
124
|
whiteSpace: "nowrap",
|
|
126
125
|
boxSizing: "border-box",
|
|
127
126
|
zIndex: e.zIndex.drawer + 100
|
|
128
127
|
}, t && {
|
|
129
|
-
"& .MuiDrawer-paper":
|
|
128
|
+
"& .MuiDrawer-paper": Zt()
|
|
130
129
|
}), !t && {
|
|
131
|
-
"& .MuiDrawer-paper":
|
|
130
|
+
"& .MuiDrawer-paper": en()
|
|
132
131
|
}));
|
|
133
|
-
class
|
|
132
|
+
class ve extends _t {
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
overrideState: e =
|
|
138
|
-
overrideActions: t =
|
|
134
|
+
$e(ve, "errorName", "ContextError");
|
|
135
|
+
const st = qe(null), nn = {}, on = {}, rn = ({
|
|
136
|
+
overrideState: e = nn,
|
|
137
|
+
overrideActions: t = on,
|
|
139
138
|
children: n
|
|
140
139
|
}) => {
|
|
141
|
-
const [{ open:
|
|
140
|
+
const [{ open: i }, a] = T({ open: !0 }), l = re((s) => {
|
|
142
141
|
a({ open: s });
|
|
143
|
-
}, []), p =
|
|
144
|
-
a((s) =>
|
|
145
|
-
}, []), u =
|
|
146
|
-
open:
|
|
142
|
+
}, []), p = re(() => {
|
|
143
|
+
a((s) => v(r({}, s), { open: !s.open }));
|
|
144
|
+
}, []), u = r(r({
|
|
145
|
+
open: i,
|
|
147
146
|
setOpen: l,
|
|
148
147
|
toggleOpen: p
|
|
149
148
|
}, e), t);
|
|
150
|
-
return /* @__PURE__ */ o(
|
|
151
|
-
},
|
|
152
|
-
const e =
|
|
149
|
+
return /* @__PURE__ */ o(st.Provider, { value: u, children: n });
|
|
150
|
+
}, an = () => {
|
|
151
|
+
const e = je(st);
|
|
153
152
|
if (e === null)
|
|
154
|
-
throw new
|
|
153
|
+
throw new ve("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
155
154
|
return e;
|
|
156
|
-
},
|
|
155
|
+
}, sn = (e = {}) => r({
|
|
157
156
|
open: !0
|
|
158
|
-
}, e),
|
|
159
|
-
(e =
|
|
160
|
-
),
|
|
157
|
+
}, e), co = se(
|
|
158
|
+
(e = sn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(rn, { overrideState: e, overrideActions: t, children: n })
|
|
159
|
+
), Pe = 7, po = R(et)(({ theme: e }) => ({
|
|
161
160
|
backgroundColor: "black",
|
|
162
161
|
color: "white",
|
|
163
162
|
"& .MuiListItem-root": {
|
|
@@ -166,7 +165,7 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
166
165
|
"& .MuiListItemButton-root": {
|
|
167
166
|
" .MuiListItemIcon-root": {
|
|
168
167
|
color: "white",
|
|
169
|
-
padding: `${
|
|
168
|
+
padding: `${Pe}px`
|
|
170
169
|
},
|
|
171
170
|
// Focus state
|
|
172
171
|
"&.Mui-focusVisible": {
|
|
@@ -177,7 +176,7 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
177
176
|
borderLeftStyle: "solid",
|
|
178
177
|
borderLeftWidth: "7px",
|
|
179
178
|
borderLeftColor: e.palette.primary.main,
|
|
180
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
179
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Pe}px)`
|
|
181
180
|
},
|
|
182
181
|
// Hover state
|
|
183
182
|
"&:hover": {
|
|
@@ -195,7 +194,7 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
195
194
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
196
195
|
// },
|
|
197
196
|
}
|
|
198
|
-
})),
|
|
197
|
+
})), ye = 7, uo = R(et)(({ theme: e }) => ({
|
|
199
198
|
backgroundColor: "#e8e8e8",
|
|
200
199
|
color: "inherit",
|
|
201
200
|
"& .MuiListItem-root": {
|
|
@@ -204,7 +203,7 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
204
203
|
"& .MuiListItemButton-root": {
|
|
205
204
|
" .MuiListItemIcon-root": {
|
|
206
205
|
color: "inherit",
|
|
207
|
-
padding: `${
|
|
206
|
+
padding: `${ye}px`
|
|
208
207
|
},
|
|
209
208
|
// Focus state
|
|
210
209
|
"&.Mui-focusVisible": {
|
|
@@ -215,7 +214,7 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
215
214
|
borderLeftStyle: "solid",
|
|
216
215
|
borderLeftWidth: "7px",
|
|
217
216
|
borderLeftColor: e.palette.primary.main,
|
|
218
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
217
|
+
paddingLeft: `calc(${e.spacing(2)} - ${ye}px)`
|
|
219
218
|
},
|
|
220
219
|
// Hover state
|
|
221
220
|
"&:hover": {
|
|
@@ -234,15 +233,15 @@ const Ze = He(null), Xt = {}, qt = {}, jt = ({
|
|
|
234
233
|
// },
|
|
235
234
|
}
|
|
236
235
|
}));
|
|
237
|
-
function
|
|
236
|
+
function ho({
|
|
238
237
|
"data-testid": e,
|
|
239
238
|
children: t
|
|
240
239
|
}) {
|
|
241
|
-
const { open: n } =
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */ o(
|
|
240
|
+
const { open: n } = an();
|
|
241
|
+
return /* @__PURE__ */ d(Kt, { className: H.root, "data-testid": e, children: [
|
|
242
|
+
/* @__PURE__ */ o(Mt, {}),
|
|
244
243
|
/* @__PURE__ */ o(
|
|
245
|
-
|
|
244
|
+
tn,
|
|
246
245
|
{
|
|
247
246
|
variant: "permanent",
|
|
248
247
|
anchor: "left",
|
|
@@ -253,44 +252,44 @@ function ao({
|
|
|
253
252
|
)
|
|
254
253
|
] });
|
|
255
254
|
}
|
|
256
|
-
const
|
|
255
|
+
const ln = ({
|
|
257
256
|
isOpen: e,
|
|
258
257
|
dialogTitle: t,
|
|
259
258
|
children: n,
|
|
260
|
-
maxWidth:
|
|
259
|
+
maxWidth: i,
|
|
261
260
|
primaryButton: a,
|
|
262
261
|
secondaryButton: l,
|
|
263
262
|
onClose: p
|
|
264
263
|
}) => {
|
|
265
|
-
var
|
|
266
|
-
const [u, s] =
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
|
|
264
|
+
var c, x;
|
|
265
|
+
const [u, s] = T(!1);
|
|
266
|
+
return /* @__PURE__ */ d(
|
|
267
|
+
Ht,
|
|
269
268
|
{
|
|
270
269
|
open: e,
|
|
271
270
|
onClose: () => {
|
|
272
271
|
u || p();
|
|
273
272
|
},
|
|
274
273
|
fullWidth: !0,
|
|
275
|
-
maxWidth:
|
|
274
|
+
maxWidth: i != null ? i : "xs",
|
|
276
275
|
children: [
|
|
277
|
-
/* @__PURE__ */ o(
|
|
278
|
-
/* @__PURE__ */ o(
|
|
279
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ o(zt, { children: t }),
|
|
277
|
+
/* @__PURE__ */ o(Wt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
278
|
+
/* @__PURE__ */ d(Rt, { children: [
|
|
280
279
|
/* @__PURE__ */ o(
|
|
281
|
-
|
|
280
|
+
Le,
|
|
282
281
|
{
|
|
283
|
-
onClick: (
|
|
282
|
+
onClick: (c = l == null ? void 0 : l.onClick) != null ? c : p,
|
|
284
283
|
"data-testid": l == null ? void 0 : l.testId,
|
|
285
284
|
disabled: (l == null ? void 0 : l.disabled) || u,
|
|
286
285
|
color: l == null ? void 0 : l.buttonColor,
|
|
287
|
-
children: (
|
|
286
|
+
children: (x = l == null ? void 0 : l.text) != null ? x : "Cancel"
|
|
288
287
|
}
|
|
289
288
|
),
|
|
290
289
|
a && /* @__PURE__ */ o(
|
|
291
|
-
|
|
290
|
+
Le,
|
|
292
291
|
{
|
|
293
|
-
onClick: () =>
|
|
292
|
+
onClick: () => ee(void 0, null, function* () {
|
|
294
293
|
var f;
|
|
295
294
|
s(!0), yield (f = a.onClick) == null ? void 0 : f.call(a), s(!1);
|
|
296
295
|
}),
|
|
@@ -304,32 +303,32 @@ const Jt = ({
|
|
|
304
303
|
]
|
|
305
304
|
}
|
|
306
305
|
);
|
|
307
|
-
},
|
|
306
|
+
}, dn = 24, cn = 64, F = "TopBar", A = {
|
|
308
307
|
topStripe: `${F}-topStripe`,
|
|
309
308
|
titleBar: `${F}-titleBar`,
|
|
310
309
|
titleSlider: `${F}-titleSlider`,
|
|
311
310
|
titleText: `${F}-titleText`,
|
|
312
311
|
leftPanelButton: `${F}-leftPanelButton`,
|
|
313
312
|
rightPanelButton: `${F}-leftPanelButton`
|
|
314
|
-
},
|
|
313
|
+
}, pn = j("div", {
|
|
315
314
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
316
315
|
name: F
|
|
317
316
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
318
|
-
var
|
|
317
|
+
var i, a;
|
|
319
318
|
return {
|
|
320
319
|
width: "100%",
|
|
321
|
-
[`& .${
|
|
320
|
+
[`& .${A.topStripe}`]: {
|
|
322
321
|
width: "100%",
|
|
323
|
-
height: `${
|
|
322
|
+
height: `${dn}px`,
|
|
324
323
|
backgroundColor: e.palette.primary.main
|
|
325
324
|
},
|
|
326
|
-
[`& .${
|
|
325
|
+
[`& .${A.titleBar}`]: {
|
|
327
326
|
backgroundColor: e.palette.primary.light,
|
|
328
|
-
height: `${
|
|
327
|
+
height: `${cn}px`,
|
|
329
328
|
padding: e.spacing(0, 3),
|
|
330
329
|
width: "100%"
|
|
331
330
|
},
|
|
332
|
-
[`& .${
|
|
331
|
+
[`& .${A.titleSlider}`]: r(r({
|
|
333
332
|
height: "100%",
|
|
334
333
|
display: "flex",
|
|
335
334
|
alignItems: "center",
|
|
@@ -338,14 +337,14 @@ const Jt = ({
|
|
|
338
337
|
easing: e.transitions.easing.sharp,
|
|
339
338
|
duration: e.transitions.duration.leavingScreen
|
|
340
339
|
}),
|
|
341
|
-
[`& .${
|
|
340
|
+
[`& .${A.leftPanelButton}`]: {
|
|
342
341
|
marginRight: e.spacing(2),
|
|
343
342
|
flexGrow: 0
|
|
344
343
|
},
|
|
345
|
-
[`& .${
|
|
344
|
+
[`& .${A.titleText}`]: {
|
|
346
345
|
flexGrow: 1
|
|
347
346
|
},
|
|
348
|
-
[`& .${
|
|
347
|
+
[`& .${A.rightPanelButton}`]: {
|
|
349
348
|
flexGrow: 0
|
|
350
349
|
}
|
|
351
350
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -353,7 +352,7 @@ const Jt = ({
|
|
|
353
352
|
easing: e.transitions.easing.easeOut,
|
|
354
353
|
duration: e.transitions.duration.enteringScreen
|
|
355
354
|
}),
|
|
356
|
-
marginLeft: `${(
|
|
355
|
+
marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
|
|
357
356
|
}), (n == null ? void 0 : n.open) && {
|
|
358
357
|
transition: e.transitions.create("margin", {
|
|
359
358
|
easing: e.transitions.easing.easeOut,
|
|
@@ -363,19 +362,19 @@ const Jt = ({
|
|
|
363
362
|
})
|
|
364
363
|
};
|
|
365
364
|
});
|
|
366
|
-
function
|
|
365
|
+
function un({
|
|
367
366
|
titleText: e = "",
|
|
368
367
|
leftPanel: t,
|
|
369
368
|
rightPanel: n,
|
|
370
|
-
"data-testid":
|
|
369
|
+
"data-testid": i
|
|
371
370
|
}) {
|
|
372
|
-
return /* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */ o("div", { className:
|
|
374
|
-
/* @__PURE__ */ o("div", { className:
|
|
375
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
376
|
-
|
|
371
|
+
return /* @__PURE__ */ d(pn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
372
|
+
/* @__PURE__ */ o("div", { className: A.topStripe }),
|
|
373
|
+
/* @__PURE__ */ o("div", { className: A.titleBar, children: /* @__PURE__ */ d(w, { className: A.titleSlider, children: [
|
|
374
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ d(
|
|
375
|
+
q,
|
|
377
376
|
{
|
|
378
|
-
className:
|
|
377
|
+
className: A.leftPanelButton,
|
|
379
378
|
color: "inherit",
|
|
380
379
|
"aria-label": "Open left side panel",
|
|
381
380
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -383,15 +382,15 @@ function tn({
|
|
|
383
382
|
size: "large",
|
|
384
383
|
children: [
|
|
385
384
|
" ",
|
|
386
|
-
/* @__PURE__ */ o(
|
|
385
|
+
/* @__PURE__ */ o(tt, {})
|
|
387
386
|
]
|
|
388
387
|
}
|
|
389
388
|
),
|
|
390
|
-
/* @__PURE__ */ o(
|
|
391
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
392
|
-
|
|
389
|
+
/* @__PURE__ */ o(B, { className: A.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
390
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ d(
|
|
391
|
+
q,
|
|
393
392
|
{
|
|
394
|
-
className:
|
|
393
|
+
className: A.rightPanelButton,
|
|
395
394
|
color: "inherit",
|
|
396
395
|
"aria-label": "Open right side panel",
|
|
397
396
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -399,14 +398,14 @@ function tn({
|
|
|
399
398
|
size: "large",
|
|
400
399
|
children: [
|
|
401
400
|
" ",
|
|
402
|
-
/* @__PURE__ */ o(
|
|
401
|
+
/* @__PURE__ */ o(nt, {})
|
|
403
402
|
]
|
|
404
403
|
}
|
|
405
404
|
)
|
|
406
405
|
] }) })
|
|
407
406
|
] });
|
|
408
407
|
}
|
|
409
|
-
const
|
|
408
|
+
const lt = 400, hn = j(Bt, {
|
|
410
409
|
shouldForwardProp: (e) => (
|
|
411
410
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
412
411
|
![
|
|
@@ -420,9 +419,9 @@ const et = 400, nn = X(At, {
|
|
|
420
419
|
),
|
|
421
420
|
name: "SidePanelDrawer"
|
|
422
421
|
})(
|
|
423
|
-
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen:
|
|
422
|
+
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: l }) => ({
|
|
424
423
|
width: e,
|
|
425
|
-
"& .MuiDrawer-paper":
|
|
424
|
+
"& .MuiDrawer-paper": r(r({
|
|
426
425
|
position: "absolute",
|
|
427
426
|
width: e,
|
|
428
427
|
boxSizing: "border-box",
|
|
@@ -430,15 +429,15 @@ const et = 400, nn = X(At, {
|
|
|
430
429
|
boxShadow: "0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"
|
|
431
430
|
}, t && {
|
|
432
431
|
opacity: "50%"
|
|
433
|
-
}), n === "left" &&
|
|
432
|
+
}), n === "left" && r({
|
|
434
433
|
marginLeft: `${l}px`
|
|
435
|
-
},
|
|
434
|
+
}, i && {
|
|
436
435
|
marginLeft: `${a}px`
|
|
437
436
|
}))
|
|
438
437
|
})
|
|
439
|
-
),
|
|
438
|
+
), gn = j(w, {
|
|
440
439
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
441
|
-
})(({ theme: e, anchor: t }) =>
|
|
440
|
+
})(({ theme: e, anchor: t }) => v(r({
|
|
442
441
|
display: "flex",
|
|
443
442
|
alignItems: "center",
|
|
444
443
|
padding: e.spacing(2)
|
|
@@ -456,30 +455,30 @@ const et = 400, nn = X(At, {
|
|
|
456
455
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
457
456
|
}
|
|
458
457
|
}));
|
|
459
|
-
function
|
|
458
|
+
function Me({
|
|
460
459
|
children: e,
|
|
461
460
|
anchor: t = "left",
|
|
462
461
|
open: n,
|
|
463
|
-
onClose:
|
|
462
|
+
onClose: i = () => {
|
|
464
463
|
},
|
|
465
464
|
titleText: a = "",
|
|
466
|
-
width: l =
|
|
465
|
+
width: l = lt,
|
|
467
466
|
showCloseArrow: p = !0,
|
|
468
467
|
debugOpacity: u = !1,
|
|
469
468
|
headerBoxProps: s = {},
|
|
470
|
-
onOpened:
|
|
471
|
-
onClosed:
|
|
469
|
+
onOpened: c,
|
|
470
|
+
onClosed: x,
|
|
472
471
|
"data-testid": f,
|
|
473
472
|
navBarOpen: C = !1,
|
|
474
473
|
navBarWidthOpen: m = 0,
|
|
475
|
-
navBarWidthClosed:
|
|
474
|
+
navBarWidthClosed: O = 0
|
|
476
475
|
}) {
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
476
|
+
return /* @__PURE__ */ d(
|
|
477
|
+
hn,
|
|
479
478
|
{
|
|
480
479
|
SlideProps: {
|
|
481
|
-
onEntered: () =>
|
|
482
|
-
onExited: () =>
|
|
480
|
+
onEntered: () => c == null ? void 0 : c(),
|
|
481
|
+
onExited: () => x == null ? void 0 : x()
|
|
483
482
|
},
|
|
484
483
|
variant: "persistent",
|
|
485
484
|
anchor: t,
|
|
@@ -489,32 +488,32 @@ function Be({
|
|
|
489
488
|
"data-testid": f,
|
|
490
489
|
navBarOpen: C,
|
|
491
490
|
navBarWidthOpen: m,
|
|
492
|
-
navBarWidthClosed:
|
|
491
|
+
navBarWidthClosed: O,
|
|
493
492
|
children: [
|
|
494
|
-
/* @__PURE__ */ o(
|
|
495
|
-
/* @__PURE__ */ o(
|
|
496
|
-
p && /* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */ o(
|
|
493
|
+
/* @__PURE__ */ o(gn, v(r({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ d(P, { children: [
|
|
494
|
+
/* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: a }),
|
|
495
|
+
p && /* @__PURE__ */ d(q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
496
|
+
/* @__PURE__ */ o(nt, { "data-testid": "arrowbackicon" }),
|
|
498
497
|
" "
|
|
499
498
|
] })
|
|
500
|
-
] }) : /* @__PURE__ */
|
|
501
|
-
p && /* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */ o(
|
|
499
|
+
] }) : /* @__PURE__ */ d(P, { children: [
|
|
500
|
+
p && /* @__PURE__ */ d(q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
501
|
+
/* @__PURE__ */ o(tt, {}),
|
|
503
502
|
" "
|
|
504
503
|
] }),
|
|
505
|
-
/* @__PURE__ */ o(
|
|
504
|
+
/* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: a })
|
|
506
505
|
] }) })),
|
|
507
506
|
e
|
|
508
507
|
]
|
|
509
508
|
}
|
|
510
509
|
);
|
|
511
510
|
}
|
|
512
|
-
const
|
|
511
|
+
const fn = j("div", {
|
|
513
512
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
514
513
|
name: "PanelAwareMargins"
|
|
515
514
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
516
|
-
var
|
|
517
|
-
return
|
|
515
|
+
var i, a;
|
|
516
|
+
return r(r({
|
|
518
517
|
transition: e.transitions.create("margin", {
|
|
519
518
|
easing: e.transitions.easing.sharp,
|
|
520
519
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -524,7 +523,7 @@ const rn = X("div", {
|
|
|
524
523
|
easing: e.transitions.easing.easeOut,
|
|
525
524
|
duration: e.transitions.duration.enteringScreen
|
|
526
525
|
}),
|
|
527
|
-
marginLeft: `${(
|
|
526
|
+
marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
|
|
528
527
|
}), (n == null ? void 0 : n.open) && {
|
|
529
528
|
transition: e.transitions.create("margin", {
|
|
530
529
|
easing: e.transitions.easing.easeOut,
|
|
@@ -532,171 +531,171 @@ const rn = X("div", {
|
|
|
532
531
|
}),
|
|
533
532
|
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
534
533
|
});
|
|
535
|
-
}),
|
|
534
|
+
}), mn = j(Ye, {
|
|
536
535
|
name: "PageContainer"
|
|
537
536
|
})(({ theme: e }) => ({
|
|
538
537
|
// Horizontal padding comes from the Container's gutter
|
|
539
538
|
paddingTop: e.spacing(3),
|
|
540
539
|
paddingBottom: e.spacing(3)
|
|
541
|
-
})),
|
|
540
|
+
})), me = !1, xe = !1, ne = {
|
|
542
541
|
titleText: "",
|
|
543
542
|
flavour: "push",
|
|
544
|
-
width:
|
|
543
|
+
width: lt,
|
|
545
544
|
arrowButtons: "both",
|
|
546
545
|
startOpen: !1,
|
|
547
546
|
open: void 0,
|
|
548
547
|
onChangeOpen: void 0,
|
|
549
|
-
content: /* @__PURE__ */ o(
|
|
548
|
+
content: /* @__PURE__ */ o(P, {}),
|
|
550
549
|
onOpened: void 0,
|
|
551
550
|
onClosed: void 0,
|
|
552
551
|
dataTestId: void 0
|
|
553
552
|
};
|
|
554
|
-
function
|
|
553
|
+
function go({
|
|
555
554
|
children: e,
|
|
556
555
|
titleText: t = "",
|
|
557
556
|
leftPanel: n,
|
|
558
|
-
rightPanel:
|
|
557
|
+
rightPanel: i,
|
|
559
558
|
sidePanelsAreMutuallyExclusive: a = !0,
|
|
560
559
|
debugOpacity: l = !1,
|
|
561
560
|
pageContainerProps: p,
|
|
562
561
|
pageContentDataTestId: u,
|
|
563
562
|
topBarDataTestId: s,
|
|
564
|
-
navBarOpen:
|
|
565
|
-
navBarWidthOpen:
|
|
563
|
+
navBarOpen: c,
|
|
564
|
+
navBarWidthOpen: x,
|
|
566
565
|
navBarWidthClosed: f
|
|
567
566
|
}) {
|
|
568
|
-
const [C, m] =
|
|
569
|
-
titleText:
|
|
570
|
-
content:
|
|
571
|
-
flavour:
|
|
572
|
-
open:
|
|
573
|
-
onChangeOpen:
|
|
574
|
-
width:
|
|
575
|
-
arrowButtons:
|
|
576
|
-
startOpen:
|
|
577
|
-
onOpened:
|
|
578
|
-
onClosed:
|
|
579
|
-
dataTestId: ut
|
|
580
|
-
} = n ? i(i({}, Z), n) : i({}, Z), {
|
|
581
|
-
titleText: gt,
|
|
582
|
-
content: ht,
|
|
583
|
-
flavour: me,
|
|
584
|
-
open: ie,
|
|
585
|
-
onChangeOpen: ve,
|
|
586
|
-
width: ae,
|
|
587
|
-
arrowButtons: Y,
|
|
588
|
-
startOpen: Q,
|
|
589
|
-
onOpened: ft,
|
|
590
|
-
onClosed: mt,
|
|
567
|
+
const [C, m] = T(me), [O, S] = T(xe), [b, I] = T(me), [k, W] = T(xe), z = n !== void 0, U = i !== void 0, {
|
|
568
|
+
titleText: D,
|
|
569
|
+
content: Q,
|
|
570
|
+
flavour: Y,
|
|
571
|
+
open: G,
|
|
572
|
+
onChangeOpen: V,
|
|
573
|
+
width: h,
|
|
574
|
+
arrowButtons: g,
|
|
575
|
+
startOpen: y,
|
|
576
|
+
onOpened: mt,
|
|
577
|
+
onClosed: xt,
|
|
591
578
|
dataTestId: vt
|
|
592
|
-
} =
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
579
|
+
} = n ? r(r({}, ne), n) : r({}, ne), {
|
|
580
|
+
titleText: Ct,
|
|
581
|
+
content: wt,
|
|
582
|
+
flavour: Ae,
|
|
583
|
+
open: le,
|
|
584
|
+
onChangeOpen: Se,
|
|
585
|
+
width: de,
|
|
586
|
+
arrowButtons: J,
|
|
587
|
+
startOpen: K,
|
|
588
|
+
onOpened: bt,
|
|
589
|
+
onClosed: At,
|
|
590
|
+
dataTestId: St
|
|
591
|
+
} = i ? r(r({}, ne), i) : r({}, ne);
|
|
592
|
+
ae(() => {
|
|
593
|
+
y !== me && (m(y), I(y));
|
|
594
|
+
}, [y]), ae(() => {
|
|
595
|
+
K !== xe && (S(K), W(K));
|
|
596
|
+
}, [K]);
|
|
597
|
+
const ce = G === void 0 ? C : G, pe = le === void 0 ? O : le, Ie = (E) => {
|
|
598
|
+
G === void 0 && (m(E), a && U && (E ? (S(!1), W(O)) : S(k))), V && V(E);
|
|
599
|
+
}, Oe = (E) => {
|
|
600
|
+
le === void 0 && (S(E), a && z && (E ? (m(!1), I(C)) : m(b))), Se && Se(E);
|
|
602
601
|
};
|
|
603
|
-
return /* @__PURE__ */
|
|
604
|
-
|
|
605
|
-
|
|
602
|
+
return /* @__PURE__ */ d(w, { children: [
|
|
603
|
+
z && /* @__PURE__ */ o(
|
|
604
|
+
Me,
|
|
606
605
|
{
|
|
607
|
-
"data-testid":
|
|
606
|
+
"data-testid": vt,
|
|
608
607
|
anchor: "left",
|
|
609
|
-
open:
|
|
610
|
-
onClose: () =>
|
|
611
|
-
width:
|
|
612
|
-
titleText:
|
|
608
|
+
open: ce,
|
|
609
|
+
onClose: () => Ie(!1),
|
|
610
|
+
width: h,
|
|
611
|
+
titleText: D,
|
|
613
612
|
debugOpacity: l,
|
|
614
|
-
showCloseArrow:
|
|
615
|
-
onOpened:
|
|
616
|
-
onClosed:
|
|
617
|
-
navBarOpen:
|
|
618
|
-
navBarWidthOpen:
|
|
613
|
+
showCloseArrow: g === "both" || g === "close",
|
|
614
|
+
onOpened: mt,
|
|
615
|
+
onClosed: xt,
|
|
616
|
+
navBarOpen: c,
|
|
617
|
+
navBarWidthOpen: x,
|
|
619
618
|
navBarWidthClosed: f,
|
|
620
|
-
children:
|
|
619
|
+
children: Q
|
|
621
620
|
}
|
|
622
621
|
),
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
U && /* @__PURE__ */ o(
|
|
623
|
+
Me,
|
|
625
624
|
{
|
|
626
|
-
"data-testid":
|
|
625
|
+
"data-testid": St,
|
|
627
626
|
anchor: "right",
|
|
628
|
-
open:
|
|
629
|
-
onClose: () =>
|
|
630
|
-
width:
|
|
631
|
-
titleText:
|
|
627
|
+
open: pe,
|
|
628
|
+
onClose: () => Oe(!1),
|
|
629
|
+
width: de,
|
|
630
|
+
titleText: Ct,
|
|
632
631
|
debugOpacity: l,
|
|
633
|
-
showCloseArrow:
|
|
634
|
-
onOpened:
|
|
635
|
-
onClosed:
|
|
636
|
-
navBarOpen:
|
|
637
|
-
navBarWidthOpen:
|
|
632
|
+
showCloseArrow: J === "both" || J === "close",
|
|
633
|
+
onOpened: bt,
|
|
634
|
+
onClosed: At,
|
|
635
|
+
navBarOpen: c,
|
|
636
|
+
navBarWidthOpen: x,
|
|
638
637
|
navBarWidthClosed: f,
|
|
639
|
-
children:
|
|
638
|
+
children: wt
|
|
640
639
|
}
|
|
641
640
|
),
|
|
642
641
|
/* @__PURE__ */ o(
|
|
643
|
-
|
|
644
|
-
|
|
642
|
+
un,
|
|
643
|
+
r(r({
|
|
645
644
|
titleText: t,
|
|
646
645
|
"data-testid": s
|
|
647
|
-
},
|
|
646
|
+
}, z && Y === "push" ? {
|
|
648
647
|
leftPanel: {
|
|
649
|
-
open:
|
|
650
|
-
width:
|
|
651
|
-
onOpen: () =>
|
|
652
|
-
showOpenArrow:
|
|
648
|
+
open: ce,
|
|
649
|
+
width: h,
|
|
650
|
+
onOpen: () => Ie(!0),
|
|
651
|
+
showOpenArrow: g === "both" || g === "open"
|
|
653
652
|
}
|
|
654
|
-
} : {}),
|
|
653
|
+
} : {}), U && Ae === "push" ? {
|
|
655
654
|
rightPanel: {
|
|
656
|
-
open:
|
|
657
|
-
width:
|
|
658
|
-
onOpen: () =>
|
|
659
|
-
showOpenArrow:
|
|
655
|
+
open: pe,
|
|
656
|
+
width: de,
|
|
657
|
+
onOpen: () => Oe(!0),
|
|
658
|
+
showOpenArrow: J === "both" || J === "open"
|
|
660
659
|
}
|
|
661
660
|
} : {})
|
|
662
661
|
),
|
|
663
662
|
/* @__PURE__ */ o(
|
|
664
|
-
|
|
665
|
-
|
|
663
|
+
fn,
|
|
664
|
+
v(r(r({}, Y === "push" ? {
|
|
666
665
|
leftPanel: {
|
|
667
|
-
open:
|
|
668
|
-
width:
|
|
666
|
+
open: ce,
|
|
667
|
+
width: h
|
|
669
668
|
}
|
|
670
|
-
} : {}),
|
|
669
|
+
} : {}), Ae === "push" ? {
|
|
671
670
|
rightPanel: {
|
|
672
|
-
open:
|
|
673
|
-
width:
|
|
671
|
+
open: pe,
|
|
672
|
+
width: de
|
|
674
673
|
}
|
|
675
674
|
} : {}), {
|
|
676
|
-
children: /* @__PURE__ */ o(
|
|
675
|
+
children: /* @__PURE__ */ o(mn, v(r({ "data-testid": u }, p), { children: e }))
|
|
677
676
|
})
|
|
678
677
|
)
|
|
679
678
|
] });
|
|
680
679
|
}
|
|
681
|
-
const
|
|
682
|
-
root: `${
|
|
683
|
-
menuButton: `${
|
|
684
|
-
hide: `${
|
|
685
|
-
content: `${
|
|
680
|
+
const oe = "Navbar", X = {
|
|
681
|
+
root: `${oe}-root`,
|
|
682
|
+
menuButton: `${oe}-menuButton`,
|
|
683
|
+
hide: `${oe}-hide`,
|
|
684
|
+
content: `${oe}-content`
|
|
686
685
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
687
686
|
// settings: `${PREFIX}-settings`,
|
|
688
687
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
689
|
-
},
|
|
690
|
-
[`&.${
|
|
688
|
+
}, xn = R("div", { name: "NavBar" })(({ theme: e }) => ({
|
|
689
|
+
[`&.${X.root}`]: {
|
|
691
690
|
display: "flex"
|
|
692
691
|
},
|
|
693
|
-
[`& .${
|
|
692
|
+
[`& .${X.menuButton}`]: {
|
|
694
693
|
marginRight: 36
|
|
695
694
|
},
|
|
696
|
-
[`& .${
|
|
695
|
+
[`& .${X.hide}`]: {
|
|
697
696
|
display: "none"
|
|
698
697
|
},
|
|
699
|
-
[`& .${
|
|
698
|
+
[`& .${X.content}`]: {
|
|
700
699
|
flexGrow: 1,
|
|
701
700
|
padding: e.spacing(3)
|
|
702
701
|
}
|
|
@@ -705,109 +704,173 @@ const ee = "Navbar", U = {
|
|
|
705
704
|
// marginTop: '64px',
|
|
706
705
|
// marginBottom: '16px',
|
|
707
706
|
// },
|
|
708
|
-
})),
|
|
709
|
-
var n,
|
|
707
|
+
})), dt = (e, t) => {
|
|
708
|
+
var n, i;
|
|
710
709
|
return {
|
|
711
|
-
height: `calc(100vh - ${t})`,
|
|
710
|
+
height: `calc(100vh - ${t}px)`,
|
|
712
711
|
top: t,
|
|
713
712
|
overflowX: "hidden",
|
|
714
713
|
overflowY: "hidden",
|
|
715
714
|
color: "inherit",
|
|
716
|
-
backgroundColor: (
|
|
715
|
+
backgroundColor: (i = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? i : "white"
|
|
717
716
|
// Provide default so tests don't need to wrap theme provider
|
|
718
717
|
};
|
|
719
|
-
},
|
|
718
|
+
}, _e = (e, t, n) => r({
|
|
720
719
|
width: t,
|
|
721
720
|
transition: e.transitions.create("width", {
|
|
722
721
|
easing: e.transitions.easing.sharp,
|
|
723
722
|
duration: e.transitions.duration.enteringScreen
|
|
724
723
|
})
|
|
725
|
-
},
|
|
724
|
+
}, dt(e, n)), He = (e, t, n) => r({
|
|
726
725
|
width: t,
|
|
727
726
|
transition: e.transitions.create("width", {
|
|
728
727
|
easing: e.transitions.easing.sharp,
|
|
729
728
|
duration: e.transitions.duration.leavingScreen
|
|
730
729
|
}),
|
|
731
730
|
overflowX: "hidden"
|
|
732
|
-
},
|
|
731
|
+
}, dt(e, n)), vn = R(Ze, {
|
|
733
732
|
shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
|
|
734
|
-
})(({ theme: e, open: t, widthOpen: n, widthClosed:
|
|
733
|
+
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, offsetTop: a }) => r(r({
|
|
735
734
|
flexShrink: 0,
|
|
736
735
|
whiteSpace: "nowrap",
|
|
737
|
-
boxSizing: "border-box"
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
}
|
|
741
|
-
"& .MuiDrawer-paper":
|
|
736
|
+
boxSizing: "border-box",
|
|
737
|
+
display: "flex",
|
|
738
|
+
flexDirection: "column"
|
|
739
|
+
}, t && v(r({}, _e(e, n, a)), {
|
|
740
|
+
"& .MuiDrawer-paper": _e(e, n, a)
|
|
741
|
+
})), !t && v(r({}, He(e, i, a)), {
|
|
742
|
+
"& .MuiDrawer-paper": He(e, i, a)
|
|
742
743
|
})));
|
|
743
|
-
function
|
|
744
|
+
function Cn({ links: e }) {
|
|
744
745
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
745
746
|
}
|
|
746
|
-
function
|
|
747
|
+
function Re(e) {
|
|
747
748
|
let t = 0;
|
|
748
|
-
for (let n = 0,
|
|
749
|
+
for (let n = 0, i = e.length; n < i; n++) {
|
|
749
750
|
const a = e.charCodeAt(n);
|
|
750
751
|
t = (t << 5) - t + a, t |= 0;
|
|
751
752
|
}
|
|
752
753
|
return t;
|
|
753
754
|
}
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
755
|
+
const ie = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], We = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
756
|
+
function wn({ user: e, domainCode: t, open: n }) {
|
|
757
|
+
const i = Fe(be), a = Fe(we);
|
|
758
|
+
return /* @__PURE__ */ o(w, { sx: { paddingTop: 3 }, children: /* @__PURE__ */ o(
|
|
759
|
+
w,
|
|
760
|
+
{
|
|
761
|
+
sx: {
|
|
762
|
+
display: "flex",
|
|
763
|
+
alignItems: "center",
|
|
764
|
+
flexDirection: "column"
|
|
765
|
+
},
|
|
766
|
+
children: n ? /* @__PURE__ */ d(P, { children: [
|
|
767
|
+
/* @__PURE__ */ o(
|
|
768
|
+
w,
|
|
769
|
+
{
|
|
770
|
+
sx: {
|
|
771
|
+
width: `${a * 0.33}px`,
|
|
772
|
+
aspectRatio: 1,
|
|
773
|
+
marginBottom: 1
|
|
774
|
+
},
|
|
775
|
+
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
776
|
+
te,
|
|
777
|
+
{
|
|
778
|
+
src: e == null ? void 0 : e.picture,
|
|
779
|
+
sx: {
|
|
780
|
+
width: "100%",
|
|
781
|
+
height: "100%",
|
|
782
|
+
bgcolor: ie[Math.abs(Re(e.name)) % ie.length]
|
|
783
|
+
},
|
|
784
|
+
children: We(e.name)
|
|
785
|
+
}
|
|
786
|
+
) : /* @__PURE__ */ o(te, { sx: { width: "100%", height: "100%" } })
|
|
787
|
+
}
|
|
788
|
+
),
|
|
789
|
+
e != null && e.name ? /* @__PURE__ */ o(B, { children: e.name }) : /* @__PURE__ */ o(ke, { animation: !1, width: "50%" }),
|
|
790
|
+
t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(ke, { animation: !1, width: "25%" })
|
|
791
|
+
] }) : /* @__PURE__ */ o(w, { sx: { width: `${i * 0.5}px`, aspectRatio: 1, marginBottom: 1 }, children: e != null && e.name ? /* @__PURE__ */ o(
|
|
792
|
+
te,
|
|
793
|
+
{
|
|
794
|
+
src: e == null ? void 0 : e.picture,
|
|
795
|
+
sx: {
|
|
796
|
+
width: "100%",
|
|
797
|
+
height: "100%",
|
|
798
|
+
bgcolor: ie[Math.abs(Re(e.name)) % ie.length]
|
|
799
|
+
},
|
|
800
|
+
children: We(e.name)
|
|
801
|
+
}
|
|
802
|
+
) : /* @__PURE__ */ o(te, { sx: { width: "100%", height: "100%" } }) })
|
|
803
|
+
}
|
|
804
|
+
) });
|
|
805
|
+
}
|
|
806
|
+
function bn({ navBarOpen: e }) {
|
|
807
|
+
const [t, n] = T(!1);
|
|
808
|
+
return /* @__PURE__ */ d(Ee, { children: [
|
|
809
|
+
/* @__PURE__ */ d(M, { onClick: () => n((i) => !i), children: [
|
|
810
|
+
/* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(Ut, {}) }),
|
|
811
|
+
/* @__PURE__ */ o(_, { primary: "Switch to ..." }),
|
|
812
|
+
t && e ? /* @__PURE__ */ o(Gt, {}) : /* @__PURE__ */ o(Vt, {})
|
|
813
|
+
] }),
|
|
814
|
+
/* @__PURE__ */ o($t, { in: t && e, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(Ee, { component: "div", disablePadding: !0, children: [
|
|
815
|
+
/* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "1. Something", inset: !0 }) }),
|
|
816
|
+
/* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "2. Something else", inset: !0 }) }),
|
|
817
|
+
/* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "3. Puppies!", inset: !0 }) })
|
|
818
|
+
] }) }),
|
|
819
|
+
/* @__PURE__ */ d(M, { children: [
|
|
820
|
+
/* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(Xt, {}) }),
|
|
821
|
+
/* @__PURE__ */ o(_, { primary: "Settings" })
|
|
822
|
+
] }),
|
|
823
|
+
/* @__PURE__ */ d(M, { children: [
|
|
824
|
+
/* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(qt, {}) }),
|
|
825
|
+
/* @__PURE__ */ o(_, { primary: "Log out" })
|
|
773
826
|
] })
|
|
774
827
|
] });
|
|
775
828
|
}
|
|
776
|
-
function
|
|
829
|
+
function An({
|
|
777
830
|
open: e,
|
|
778
831
|
offsetTop: t = 0,
|
|
779
832
|
widthOpen: n,
|
|
780
|
-
widthClosed:
|
|
833
|
+
widthClosed: i,
|
|
781
834
|
"data-testid": a,
|
|
782
835
|
top: l,
|
|
783
836
|
middle: p,
|
|
784
837
|
user: u,
|
|
785
838
|
domainCode: s
|
|
786
839
|
}) {
|
|
787
|
-
return /* @__PURE__ */ o(
|
|
788
|
-
|
|
840
|
+
return /* @__PURE__ */ o(xn, { className: X.root, "data-testid": a, children: /* @__PURE__ */ d(
|
|
841
|
+
vn,
|
|
789
842
|
{
|
|
790
843
|
variant: "permanent",
|
|
791
844
|
anchor: "left",
|
|
792
845
|
open: e,
|
|
793
846
|
widthOpen: n,
|
|
794
|
-
widthClosed:
|
|
847
|
+
widthClosed: i,
|
|
795
848
|
offsetTop: t,
|
|
796
|
-
|
|
797
|
-
|
|
849
|
+
PaperProps: {
|
|
850
|
+
// https://github.com/mui/material-ui/issues/27703
|
|
851
|
+
// This isn't fixed in the version we are using at time of writing
|
|
852
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
853
|
+
// @ts-ignore
|
|
854
|
+
component: "nav"
|
|
855
|
+
},
|
|
856
|
+
children: [
|
|
857
|
+
l && /* @__PURE__ */ d(w, { sx: { flex: "0 0 auto" }, children: [
|
|
798
858
|
l,
|
|
799
|
-
/* @__PURE__ */ o(
|
|
859
|
+
/* @__PURE__ */ o(Ne, { variant: "middle" })
|
|
800
860
|
] }),
|
|
801
|
-
Array.isArray(p) ? /* @__PURE__ */ o(
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
|
|
804
|
-
|
|
861
|
+
/* @__PURE__ */ o(w, { sx: { flex: "1 0 auto" }, children: Array.isArray(p) ? /* @__PURE__ */ o(Cn, { links: p }) : p }),
|
|
862
|
+
/* @__PURE__ */ d(w, { sx: { flex: "0 0 auto" }, children: [
|
|
863
|
+
/* @__PURE__ */ o(Ne, { variant: "middle" }),
|
|
864
|
+
/* @__PURE__ */ o(wn, { user: u, domainCode: s, open: e }),
|
|
865
|
+
/* @__PURE__ */ o(bn, { navBarOpen: e })
|
|
866
|
+
] })
|
|
867
|
+
]
|
|
805
868
|
}
|
|
806
869
|
) });
|
|
807
870
|
}
|
|
808
|
-
function
|
|
871
|
+
function Sn({ children: e, topBarHeight: t }) {
|
|
809
872
|
return /* @__PURE__ */ o(
|
|
810
|
-
|
|
873
|
+
w,
|
|
811
874
|
{
|
|
812
875
|
sx: {
|
|
813
876
|
overflow: "auto",
|
|
@@ -817,7 +880,7 @@ function hn({ children: e, topBarHeight: t }) {
|
|
|
817
880
|
flexGrow: 1
|
|
818
881
|
},
|
|
819
882
|
children: /* @__PURE__ */ o(
|
|
820
|
-
|
|
883
|
+
Ye,
|
|
821
884
|
{
|
|
822
885
|
component: "main",
|
|
823
886
|
id: "main-content",
|
|
@@ -828,13 +891,13 @@ function hn({ children: e, topBarHeight: t }) {
|
|
|
828
891
|
}
|
|
829
892
|
);
|
|
830
893
|
}
|
|
831
|
-
const
|
|
832
|
-
titleText: `${
|
|
894
|
+
const In = 64, On = 64, Tn = 256, Ce = $(!0), we = $(Tn), be = $(On), ct = $(""), pt = $(In), ut = $(void 0), Dn = "TopBar", Bn = {
|
|
895
|
+
titleText: `${Dn}-titleText`
|
|
833
896
|
};
|
|
834
|
-
function
|
|
835
|
-
const
|
|
836
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
837
|
-
|
|
897
|
+
function $n({ titleText: e = "", height: t, "data-testid": n }) {
|
|
898
|
+
const i = Qt(Ce);
|
|
899
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ d(
|
|
900
|
+
Qe,
|
|
838
901
|
{
|
|
839
902
|
square: !0,
|
|
840
903
|
elevation: 0,
|
|
@@ -850,175 +913,175 @@ function wn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
850
913
|
height: t
|
|
851
914
|
},
|
|
852
915
|
children: [
|
|
853
|
-
/* @__PURE__ */ o(
|
|
854
|
-
/* @__PURE__ */ o(
|
|
916
|
+
/* @__PURE__ */ o(q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => i((l) => !l), children: /* @__PURE__ */ o(jt, { fontSize: "medium" }) }),
|
|
917
|
+
/* @__PURE__ */ o(B, { className: Bn.titleText, variant: "h6", children: e })
|
|
855
918
|
]
|
|
856
919
|
}
|
|
857
920
|
) });
|
|
858
921
|
}
|
|
859
|
-
function
|
|
922
|
+
function fo({
|
|
860
923
|
children: e,
|
|
861
924
|
initialTitleText: t,
|
|
862
925
|
initialNavBarOpen: n,
|
|
863
|
-
pageContainerProps:
|
|
926
|
+
pageContainerProps: i,
|
|
864
927
|
pageContentDataTestId: a,
|
|
865
928
|
topBarDataTestId: l,
|
|
866
929
|
navBarDataTestId: p,
|
|
867
930
|
navBarMiddle: u,
|
|
868
931
|
user: s,
|
|
869
|
-
domainCode:
|
|
932
|
+
domainCode: c
|
|
870
933
|
}) {
|
|
871
|
-
const [
|
|
872
|
-
return
|
|
873
|
-
t !== void 0 &&
|
|
874
|
-
}, [t,
|
|
934
|
+
const [x, f] = L(Ce), [C] = L(we), [m] = L(be), [O, S] = L(ct), [b] = L(pt), [I] = L(ut);
|
|
935
|
+
return ae(() => {
|
|
936
|
+
t !== void 0 && S(t);
|
|
937
|
+
}, [t, S]), ae(() => {
|
|
875
938
|
n !== void 0 && f(n);
|
|
876
|
-
}, [n, f]), /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */ o(
|
|
878
|
-
/* @__PURE__ */ o(
|
|
879
|
-
/* @__PURE__ */
|
|
939
|
+
}, [n, f]), /* @__PURE__ */ d(w, { children: [
|
|
940
|
+
/* @__PURE__ */ o(kt, {}),
|
|
941
|
+
/* @__PURE__ */ o($n, { titleText: O, "data-testid": l, height: b }),
|
|
942
|
+
/* @__PURE__ */ d(w, { sx: { display: "flex" }, children: [
|
|
880
943
|
/* @__PURE__ */ o(
|
|
881
|
-
|
|
944
|
+
An,
|
|
882
945
|
{
|
|
883
|
-
open:
|
|
884
|
-
top:
|
|
946
|
+
open: x,
|
|
947
|
+
top: I,
|
|
885
948
|
middle: u,
|
|
886
949
|
user: s,
|
|
887
|
-
domainCode:
|
|
950
|
+
domainCode: c,
|
|
888
951
|
widthOpen: C,
|
|
889
952
|
widthClosed: m,
|
|
890
|
-
offsetTop:
|
|
953
|
+
offsetTop: b,
|
|
891
954
|
"data-testid": p
|
|
892
955
|
}
|
|
893
956
|
),
|
|
894
957
|
/* @__PURE__ */ o(
|
|
895
|
-
|
|
896
|
-
|
|
958
|
+
Sn,
|
|
959
|
+
v(r({
|
|
897
960
|
"data-testid": a,
|
|
898
|
-
topBarHeight:
|
|
899
|
-
},
|
|
961
|
+
topBarHeight: b
|
|
962
|
+
}, i), {
|
|
900
963
|
children: e
|
|
901
964
|
})
|
|
902
965
|
)
|
|
903
966
|
] })
|
|
904
967
|
] });
|
|
905
968
|
}
|
|
906
|
-
const
|
|
969
|
+
const kn = {
|
|
907
970
|
autoHideDuration: 6e3,
|
|
908
971
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
909
972
|
// The default is false. If we prefer timer to continue when window loses
|
|
910
973
|
// focus, change to true
|
|
911
974
|
disableWindowBlurListener: !1
|
|
912
|
-
},
|
|
975
|
+
}, En = {
|
|
913
976
|
shouldClose: (e, t) => t !== "clickaway"
|
|
914
|
-
},
|
|
977
|
+
}, ze = {
|
|
915
978
|
message: "",
|
|
916
979
|
severity: "info",
|
|
917
980
|
variant: "standard",
|
|
918
981
|
progressIndicator: void 0
|
|
919
982
|
// Can use 'circular' or 'linear'
|
|
920
|
-
},
|
|
983
|
+
}, Ue = 100, Ge = 2e3, Nn = 2e3, Ln = (() => {
|
|
921
984
|
let e = 0;
|
|
922
985
|
return () => (e += 1, e);
|
|
923
|
-
})(),
|
|
986
|
+
})(), Fn = {
|
|
924
987
|
borderBottomLeftRadius: "0px",
|
|
925
988
|
borderBottomRightRadius: "0px"
|
|
926
|
-
},
|
|
927
|
-
function
|
|
989
|
+
}, Pn = {}, yn = {}, ht = qe(null);
|
|
990
|
+
function Mn(l) {
|
|
928
991
|
var p = l, {
|
|
929
|
-
overrideState: e =
|
|
930
|
-
overrideActions: t =
|
|
931
|
-
shouldClose: n =
|
|
932
|
-
children:
|
|
933
|
-
} = p, a =
|
|
992
|
+
overrideState: e = Pn,
|
|
993
|
+
overrideActions: t = yn,
|
|
994
|
+
shouldClose: n = En.shouldClose,
|
|
995
|
+
children: i
|
|
996
|
+
} = p, a = Be(p, [
|
|
934
997
|
"overrideState",
|
|
935
998
|
"overrideActions",
|
|
936
999
|
"shouldClose",
|
|
937
1000
|
"children"
|
|
938
1001
|
]);
|
|
939
|
-
var
|
|
940
|
-
const [{ open: u }, s] =
|
|
941
|
-
s({ open:
|
|
942
|
-
}, []), m =
|
|
943
|
-
f.current += 1,
|
|
944
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1002
|
+
var V;
|
|
1003
|
+
const [{ open: u }, s] = T({ open: !1 }), c = he([]), x = he(Date.now()), f = he(0), C = re((h) => {
|
|
1004
|
+
s({ open: h });
|
|
1005
|
+
}, []), m = re((h = {}) => {
|
|
1006
|
+
f.current += 1, c.current.length >= Ue && Date.now() - x.current >= Ge && (x.current = Date.now(), console.error(
|
|
1007
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${f.current} times in last ${Ge}ms)`
|
|
945
1008
|
), f.current = 0);
|
|
946
|
-
const
|
|
947
|
-
key:
|
|
948
|
-
}),
|
|
949
|
-
return
|
|
950
|
-
}, []),
|
|
951
|
-
const
|
|
952
|
-
if (
|
|
953
|
-
return
|
|
954
|
-
},
|
|
955
|
-
n(
|
|
956
|
-
},
|
|
957
|
-
},
|
|
958
|
-
|
|
959
|
-
},
|
|
960
|
-
"autoHideDuration" in
|
|
961
|
-
const
|
|
1009
|
+
const g = r(v(r({}, ze), {
|
|
1010
|
+
key: Ln()
|
|
1011
|
+
}), h);
|
|
1012
|
+
return c.current.push(g), c.current.length === 1 && s({ open: !0 }), g.key;
|
|
1013
|
+
}, []), O = (h = "", g = {}) => m(r({ message: h, severity: "success" }, g)), S = (h = "", g = {}) => m(r({ message: h, severity: "info" }, g)), b = (h = "", g = {}) => m(r({ message: h, severity: "warning" }, g)), I = (h = "", g = {}) => m(r({ message: h, severity: "error" }, g)), k = (h) => {
|
|
1014
|
+
const g = c.current.findIndex((y) => y.key === h);
|
|
1015
|
+
if (g !== -1)
|
|
1016
|
+
return g === 0 ? (s({ open: !1 }), c.current[0]) : c.current.splice(g, 1);
|
|
1017
|
+
}, W = (h, g) => {
|
|
1018
|
+
n(h, g) && s({ open: !1 });
|
|
1019
|
+
}, z = () => {
|
|
1020
|
+
}, U = () => {
|
|
1021
|
+
c.current.shift(), c.current.length > 0 && s({ open: !0 });
|
|
1022
|
+
}, D = (V = c.current[0]) != null ? V : r({}, ze), Q = {};
|
|
1023
|
+
"autoHideDuration" in D && (Q.autoHideDuration = D.autoHideDuration);
|
|
1024
|
+
const Y = r(r({}, kn), a), G = r(r({
|
|
962
1025
|
open: u,
|
|
963
1026
|
setOpen: C,
|
|
964
1027
|
enqueueNotification: m,
|
|
965
|
-
enqueueSuccessNotification:
|
|
966
|
-
enqueueInfoNotification:
|
|
967
|
-
enqueueWarningNotification:
|
|
968
|
-
enqueueErrorNotification:
|
|
969
|
-
removeNotification:
|
|
1028
|
+
enqueueSuccessNotification: O,
|
|
1029
|
+
enqueueInfoNotification: S,
|
|
1030
|
+
enqueueWarningNotification: b,
|
|
1031
|
+
enqueueErrorNotification: I,
|
|
1032
|
+
removeNotification: k
|
|
970
1033
|
}, e), t);
|
|
971
|
-
return /* @__PURE__ */
|
|
972
|
-
|
|
1034
|
+
return /* @__PURE__ */ d(ht.Provider, { value: G, children: [
|
|
1035
|
+
i,
|
|
973
1036
|
/* @__PURE__ */ o(
|
|
974
|
-
|
|
975
|
-
|
|
1037
|
+
Et,
|
|
1038
|
+
v(r(r({}, Y), Q), {
|
|
976
1039
|
open: u,
|
|
977
|
-
onClose:
|
|
1040
|
+
onClose: W,
|
|
978
1041
|
TransitionProps: {
|
|
979
|
-
onExited:
|
|
980
|
-
onExit:
|
|
1042
|
+
onExited: U,
|
|
1043
|
+
onExit: z
|
|
981
1044
|
},
|
|
982
|
-
sx: { zIndex:
|
|
983
|
-
children: /* @__PURE__ */
|
|
1045
|
+
sx: { zIndex: Nn },
|
|
1046
|
+
children: /* @__PURE__ */ d("div", { children: [
|
|
984
1047
|
/* @__PURE__ */ o(
|
|
985
|
-
|
|
1048
|
+
Nt,
|
|
986
1049
|
{
|
|
987
|
-
onClose: (
|
|
988
|
-
severity:
|
|
1050
|
+
onClose: (h) => W(h, "closeAlert"),
|
|
1051
|
+
severity: D.severity,
|
|
989
1052
|
variant: "filled",
|
|
990
|
-
icon:
|
|
991
|
-
style:
|
|
992
|
-
children:
|
|
1053
|
+
icon: D.progressIndicator === "circular" ? /* @__PURE__ */ o(Je, { size: "1em" }) : void 0,
|
|
1054
|
+
style: D.progressIndicator === "linear" ? Fn : void 0,
|
|
1055
|
+
children: D.message
|
|
993
1056
|
}
|
|
994
1057
|
),
|
|
995
|
-
|
|
1058
|
+
D.progressIndicator === "linear" && /* @__PURE__ */ o(Lt, { color: "primary" })
|
|
996
1059
|
] })
|
|
997
1060
|
})
|
|
998
1061
|
)
|
|
999
1062
|
] });
|
|
1000
1063
|
}
|
|
1001
|
-
function
|
|
1002
|
-
const e =
|
|
1064
|
+
function _n() {
|
|
1065
|
+
const e = je(ht);
|
|
1003
1066
|
if (e === null)
|
|
1004
|
-
throw new
|
|
1067
|
+
throw new ve("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1005
1068
|
return e;
|
|
1006
1069
|
}
|
|
1007
|
-
const
|
|
1008
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children:
|
|
1009
|
-
),
|
|
1070
|
+
const mo = se(
|
|
1071
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Mn, v(r({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1072
|
+
), Hn = Yt(), xo = ({
|
|
1010
1073
|
children: e,
|
|
1011
1074
|
store: t
|
|
1012
|
-
}) => /* @__PURE__ */ o(
|
|
1013
|
-
var
|
|
1014
|
-
const
|
|
1015
|
-
JSON.parse((
|
|
1016
|
-
),
|
|
1017
|
-
(e) => e(
|
|
1075
|
+
}) => /* @__PURE__ */ o(ot, { store: t != null ? t : Hn, children: e }), gt = "domainCode";
|
|
1076
|
+
var Xe;
|
|
1077
|
+
const Ve = $(
|
|
1078
|
+
JSON.parse((Xe = localStorage.getItem(gt)) != null ? Xe : '{"domainCode": ""}').domainCode
|
|
1079
|
+
), ft = $(
|
|
1080
|
+
(e) => e(Ve),
|
|
1018
1081
|
(e, t, n) => {
|
|
1019
|
-
t(
|
|
1082
|
+
t(Ve, n), localStorage.setItem(gt, JSON.stringify({ domainCode: n }));
|
|
1020
1083
|
}
|
|
1021
|
-
),
|
|
1084
|
+
), Rn = {
|
|
1022
1085
|
act: "ACT",
|
|
1023
1086
|
nsw: "NSW",
|
|
1024
1087
|
nt: "NT",
|
|
@@ -1030,76 +1093,76 @@ const Me = k(
|
|
|
1030
1093
|
ag: "AG",
|
|
1031
1094
|
fedmps: "Fedmps",
|
|
1032
1095
|
"": ""
|
|
1033
|
-
},
|
|
1096
|
+
}, Wn = (e) => {
|
|
1034
1097
|
var t;
|
|
1035
|
-
return e === null ? "N/A" : (t =
|
|
1036
|
-
},
|
|
1098
|
+
return e === null ? "N/A" : (t = Rn[e]) != null ? t : "";
|
|
1099
|
+
}, vo = ({
|
|
1037
1100
|
isLoading: e,
|
|
1038
1101
|
isOpen: t,
|
|
1039
1102
|
onClose: n,
|
|
1040
|
-
domainOptions:
|
|
1103
|
+
domainOptions: i,
|
|
1041
1104
|
applicationName: a,
|
|
1042
1105
|
handleLogout: l
|
|
1043
1106
|
}) => {
|
|
1044
|
-
const [p, u] =
|
|
1045
|
-
s ? (u(s),
|
|
1046
|
-
}),
|
|
1047
|
-
p && !f && !C ? (
|
|
1107
|
+
const [p, u] = L(ft), [s, c] = T(p), { enqueueSuccessNotification: x } = _n(), f = i.length === 0, C = !!p && !i.includes(p) && !i.includes(s), m = !p || f || C, O = () => ee(void 0, null, function* () {
|
|
1108
|
+
s ? (u(s), x(`Set domain to ${s}`), n()) : u("");
|
|
1109
|
+
}), S = () => ee(void 0, null, function* () {
|
|
1110
|
+
p && !f && !C ? (c(p), n()) : m && l();
|
|
1048
1111
|
});
|
|
1049
|
-
let
|
|
1050
|
-
return f ?
|
|
1051
|
-
|
|
1112
|
+
let b;
|
|
1113
|
+
return f ? b = "Unable to retrieve your active organisations. Try logging in again." : C && (b = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ d(
|
|
1114
|
+
ln,
|
|
1052
1115
|
{
|
|
1053
1116
|
isOpen: t,
|
|
1054
1117
|
dialogTitle: "Select an organisation",
|
|
1055
1118
|
primaryButton: {
|
|
1056
1119
|
text: "Confirm",
|
|
1057
|
-
onClick:
|
|
1120
|
+
onClick: O,
|
|
1058
1121
|
disabled: !s || f || C,
|
|
1059
1122
|
buttonColor: "primary"
|
|
1060
1123
|
},
|
|
1061
1124
|
secondaryButton: {
|
|
1062
1125
|
text: m ? "Logout" : "Cancel",
|
|
1063
|
-
onClick:
|
|
1126
|
+
onClick: S
|
|
1064
1127
|
},
|
|
1065
1128
|
onClose: m ? () => {
|
|
1066
1129
|
} : n,
|
|
1067
1130
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ d(B, { marginBottom: 2, children: [
|
|
1069
1132
|
"Select the default organisation that you want to use with the ",
|
|
1070
1133
|
a,
|
|
1071
1134
|
"."
|
|
1072
1135
|
] }),
|
|
1073
1136
|
/* @__PURE__ */ o(
|
|
1074
|
-
|
|
1137
|
+
Ft,
|
|
1075
1138
|
{
|
|
1076
1139
|
loading: e,
|
|
1077
1140
|
multiple: !1,
|
|
1078
1141
|
disableClearable: !1,
|
|
1079
1142
|
value: s !== "" ? s : null,
|
|
1080
|
-
onChange: (
|
|
1081
|
-
getOptionLabel:
|
|
1082
|
-
options: [...
|
|
1083
|
-
renderInput: (
|
|
1084
|
-
|
|
1085
|
-
|
|
1143
|
+
onChange: (I, k) => c(k != null ? k : ""),
|
|
1144
|
+
getOptionLabel: Wn,
|
|
1145
|
+
options: [...i],
|
|
1146
|
+
renderInput: (I) => /* @__PURE__ */ o(
|
|
1147
|
+
Pt,
|
|
1148
|
+
v(r({}, I), {
|
|
1086
1149
|
variant: "filled",
|
|
1087
1150
|
label: "Select organisation",
|
|
1088
|
-
InputProps:
|
|
1089
|
-
endAdornment: /* @__PURE__ */
|
|
1090
|
-
e ? /* @__PURE__ */ o(
|
|
1091
|
-
|
|
1151
|
+
InputProps: v(r({}, I.InputProps), {
|
|
1152
|
+
endAdornment: /* @__PURE__ */ d(P, { children: [
|
|
1153
|
+
e ? /* @__PURE__ */ o(Je, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1154
|
+
I.InputProps.endAdornment
|
|
1092
1155
|
] })
|
|
1093
1156
|
})
|
|
1094
1157
|
})
|
|
1095
1158
|
)
|
|
1096
1159
|
}
|
|
1097
1160
|
),
|
|
1098
|
-
|
|
1161
|
+
b && /* @__PURE__ */ o(yt, { error: !0, children: b })
|
|
1099
1162
|
]
|
|
1100
1163
|
}
|
|
1101
1164
|
);
|
|
1102
|
-
},
|
|
1165
|
+
}, Co = Ke({
|
|
1103
1166
|
palette: {
|
|
1104
1167
|
primary: {
|
|
1105
1168
|
dark: "#00A651",
|
|
@@ -1150,7 +1213,7 @@ const Me = k(
|
|
|
1150
1213
|
navBar: {
|
|
1151
1214
|
backgroundColor: "#E8E8E8"
|
|
1152
1215
|
}
|
|
1153
|
-
}),
|
|
1216
|
+
}), wo = Ke({
|
|
1154
1217
|
palette: {
|
|
1155
1218
|
primary: {
|
|
1156
1219
|
main: "#007236",
|
|
@@ -1204,18 +1267,18 @@ const Me = k(
|
|
|
1204
1267
|
styleOverrides: {
|
|
1205
1268
|
root: ({ theme: e }) => ({
|
|
1206
1269
|
"&.Mui-selected": {
|
|
1207
|
-
backgroundColor:
|
|
1270
|
+
backgroundColor: fe(
|
|
1208
1271
|
e.palette.secondary.main,
|
|
1209
1272
|
e.palette.action.selectedOpacity
|
|
1210
1273
|
),
|
|
1211
1274
|
"&:hover": {
|
|
1212
|
-
backgroundColor:
|
|
1275
|
+
backgroundColor: fe(
|
|
1213
1276
|
e.palette.secondary.main,
|
|
1214
1277
|
e.palette.action.selectedOpacity
|
|
1215
1278
|
)
|
|
1216
1279
|
},
|
|
1217
1280
|
"&.Mui-focusVisible": {
|
|
1218
|
-
backgroundColor:
|
|
1281
|
+
backgroundColor: fe(
|
|
1219
1282
|
e.palette.secondary.main,
|
|
1220
1283
|
e.palette.action.focusOpacity
|
|
1221
1284
|
)
|
|
@@ -1241,25 +1304,25 @@ const Me = k(
|
|
|
1241
1304
|
navBar: {
|
|
1242
1305
|
backgroundColor: "#E8E8E8"
|
|
1243
1306
|
}
|
|
1244
|
-
}),
|
|
1245
|
-
domainCode:
|
|
1246
|
-
navBarOpen:
|
|
1247
|
-
navBarWidthOpen:
|
|
1248
|
-
navBarWidthClosed:
|
|
1249
|
-
titleText:
|
|
1250
|
-
topBarHeight:
|
|
1251
|
-
navBarTop:
|
|
1252
|
-
},
|
|
1307
|
+
}), zn = {
|
|
1308
|
+
domainCode: ft,
|
|
1309
|
+
navBarOpen: Ce,
|
|
1310
|
+
navBarWidthOpen: we,
|
|
1311
|
+
navBarWidthClosed: be,
|
|
1312
|
+
titleText: ct,
|
|
1313
|
+
topBarHeight: pt,
|
|
1314
|
+
navBarTop: ut
|
|
1315
|
+
}, bo = se(() => ({ children: e }) => /* @__PURE__ */ o(ot, { children: e })), Un = ({
|
|
1253
1316
|
initialValues: e,
|
|
1254
1317
|
children: t
|
|
1255
|
-
}) => (
|
|
1318
|
+
}) => (Jt(e), /* @__PURE__ */ o(P, { children: t })), Ao = se(
|
|
1256
1319
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1257
|
-
|
|
1320
|
+
Un,
|
|
1258
1321
|
{
|
|
1259
1322
|
initialValues: Object.entries(e).map(
|
|
1260
|
-
([n,
|
|
1261
|
-
|
|
1262
|
-
|
|
1323
|
+
([n, i]) => [
|
|
1324
|
+
zn[n],
|
|
1325
|
+
i
|
|
1263
1326
|
]
|
|
1264
1327
|
),
|
|
1265
1328
|
children: t
|
|
@@ -1267,42 +1330,39 @@ const Me = k(
|
|
|
1267
1330
|
)
|
|
1268
1331
|
);
|
|
1269
1332
|
export {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
mo as
|
|
1304
|
-
oo as withNavBarProvider,
|
|
1305
|
-
vo as withOverrideDefaults,
|
|
1306
|
-
co as withSaladBarProvider
|
|
1333
|
+
ln as AgDialog,
|
|
1334
|
+
fo as AppLayout,
|
|
1335
|
+
xo as AtomProvider,
|
|
1336
|
+
ht as Context,
|
|
1337
|
+
ve as ContextError,
|
|
1338
|
+
vo as DomainCodeDialog,
|
|
1339
|
+
lo as ExampleComponent,
|
|
1340
|
+
Un as HydrateAtoms,
|
|
1341
|
+
rt as NAVBAR_WIDTH_CLOSED,
|
|
1342
|
+
it as NAVBAR_WIDTH_OPENED,
|
|
1343
|
+
ho as NavBar,
|
|
1344
|
+
po as NavBarDarkStyledList,
|
|
1345
|
+
uo as NavBarLightStyledList,
|
|
1346
|
+
rn as NavBarProvider,
|
|
1347
|
+
go as PageLayout,
|
|
1348
|
+
Mn as SaladBarProvider,
|
|
1349
|
+
Hn as atomStore,
|
|
1350
|
+
sn as buildNavBarState,
|
|
1351
|
+
ft as domainCodeAtom,
|
|
1352
|
+
Co as fed21Theme,
|
|
1353
|
+
wo as internalAgSystemsTheme,
|
|
1354
|
+
H as navBarClasses,
|
|
1355
|
+
Ce as navBarOpenAtom,
|
|
1356
|
+
ut as navBarTopAtom,
|
|
1357
|
+
be as navBarWidthClosedAtom,
|
|
1358
|
+
we as navBarWidthOpenAtom,
|
|
1359
|
+
ct as titleTextAtom,
|
|
1360
|
+
pt as topBarHeightAtom,
|
|
1361
|
+
an as useNavBar,
|
|
1362
|
+
_n as useSaladBar,
|
|
1363
|
+
bo as withAtomProvider,
|
|
1364
|
+
co as withNavBarProvider,
|
|
1365
|
+
Ao as withOverrideDefaults,
|
|
1366
|
+
mo as withSaladBarProvider
|
|
1307
1367
|
};
|
|
1308
1368
|
//# sourceMappingURL=index.js.map
|