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