@australiangreens/ag-internal-components 0.0.55 → 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 +494 -487
- 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
|
|
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)
|
|
@@ -460,46 +460,46 @@ 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 Ee({
|
|
|
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
|
-
|
|
623
|
+
z && /* @__PURE__ */ o(
|
|
624
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: {
|
|
@@ -761,7 +775,7 @@ function pn({ user: e, domainCode: t, open: n }) {
|
|
|
761
775
|
display: "flex",
|
|
762
776
|
alignItems: "center",
|
|
763
777
|
flexDirection: "column",
|
|
764
|
-
gap: "
|
|
778
|
+
gap: "0.5rem"
|
|
765
779
|
},
|
|
766
780
|
children: [
|
|
767
781
|
/* @__PURE__ */ o(
|
|
@@ -769,84 +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 - 37
|
|
797
|
-
},
|
|
798
|
-
in: n,
|
|
799
|
-
unmountOnExit: !0,
|
|
800
|
-
children: /* @__PURE__ */ c(x, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
801
|
-
e != null && e.name ? /* @__PURE__ */ o(B, { children: e.name }) : /* @__PURE__ */ o(Oe, { animation: !1, width: "50%" }),
|
|
802
|
-
t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Oe, { animation: !1, width: "25%" })
|
|
803
|
-
] })
|
|
804
|
-
}
|
|
805
|
-
)
|
|
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
|
+
] }) }) })
|
|
806
807
|
]
|
|
807
808
|
}
|
|
808
809
|
);
|
|
809
810
|
}
|
|
810
|
-
function
|
|
811
|
+
function wn({
|
|
811
812
|
open: e,
|
|
812
|
-
|
|
813
|
+
widthClosed: t,
|
|
813
814
|
widthOpen: n,
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
domainCode: d
|
|
815
|
+
"data-testid": r,
|
|
816
|
+
top: a,
|
|
817
|
+
middle: s,
|
|
818
|
+
bottom: p,
|
|
819
|
+
user: u,
|
|
820
|
+
domainCode: l
|
|
821
821
|
}) {
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
const c = ot(), f = Je(ie);
|
|
823
|
+
return /* @__PURE__ */ o(gn, { className: U.root, "data-testid": r, children: /* @__PURE__ */ d(
|
|
824
|
+
mn,
|
|
824
825
|
{
|
|
825
|
-
variant: "permanent",
|
|
826
|
-
anchor: "left",
|
|
827
826
|
open: e,
|
|
828
827
|
widthOpen: n,
|
|
829
|
-
widthClosed:
|
|
830
|
-
|
|
828
|
+
widthClosed: t,
|
|
829
|
+
anchor: "left",
|
|
830
|
+
variant: c ? "temporary" : "permanent",
|
|
831
831
|
PaperProps: {
|
|
832
832
|
component: "nav"
|
|
833
833
|
},
|
|
834
|
+
onClose: () => {
|
|
835
|
+
f(!1);
|
|
836
|
+
},
|
|
837
|
+
isSmallScreen: c,
|
|
834
838
|
children: [
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
839
|
+
!c && /* @__PURE__ */ o(kt, {}),
|
|
840
|
+
a && /* @__PURE__ */ d(x, { flexGrow: "0", children: [
|
|
841
|
+
a,
|
|
842
|
+
/* @__PURE__ */ o(ke, { variant: "middle" })
|
|
838
843
|
] }),
|
|
839
|
-
/* @__PURE__ */ o(x, { flexGrow: "1", children: Array.isArray(
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */ o(
|
|
842
|
-
/* @__PURE__ */ o(
|
|
843
|
-
|
|
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 })
|
|
844
849
|
] })
|
|
845
850
|
]
|
|
846
851
|
}
|
|
847
852
|
) });
|
|
848
853
|
}
|
|
849
|
-
function
|
|
854
|
+
function bn({ children: e, topBarHeight: t }) {
|
|
850
855
|
return /* @__PURE__ */ o(
|
|
851
856
|
x,
|
|
852
857
|
{
|
|
@@ -858,7 +863,7 @@ function hn({ children: e, topBarHeight: t }) {
|
|
|
858
863
|
flexGrow: 1
|
|
859
864
|
},
|
|
860
865
|
children: /* @__PURE__ */ o(
|
|
861
|
-
|
|
866
|
+
Ue,
|
|
862
867
|
{
|
|
863
868
|
component: "main",
|
|
864
869
|
id: "main-content",
|
|
@@ -869,13 +874,13 @@ function hn({ children: e, topBarHeight: t }) {
|
|
|
869
874
|
}
|
|
870
875
|
);
|
|
871
876
|
}
|
|
872
|
-
const
|
|
873
|
-
titleText: `${
|
|
877
|
+
const Sn = "TopBar", An = {
|
|
878
|
+
titleText: `${Sn}-titleText`
|
|
874
879
|
};
|
|
875
|
-
function
|
|
876
|
-
const
|
|
877
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
878
|
-
|
|
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,
|
|
879
884
|
{
|
|
880
885
|
square: !0,
|
|
881
886
|
elevation: 0,
|
|
@@ -888,71 +893,72 @@ function Cn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
888
893
|
alignItems: "center",
|
|
889
894
|
gap: 2,
|
|
890
895
|
flexShrink: 0,
|
|
891
|
-
height: t
|
|
896
|
+
height: t,
|
|
897
|
+
zIndex: p ? 0 : s.zIndex.drawer + 1
|
|
892
898
|
},
|
|
893
899
|
children: [
|
|
894
|
-
/* @__PURE__ */ o(V, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick:
|
|
895
|
-
/* @__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 })
|
|
896
902
|
]
|
|
897
903
|
}
|
|
898
904
|
) });
|
|
899
905
|
}
|
|
900
|
-
function
|
|
906
|
+
function lo({
|
|
901
907
|
children: e,
|
|
902
908
|
initialTitleText: t,
|
|
903
909
|
initialNavBarOpen: n,
|
|
904
|
-
pageContainerProps:
|
|
910
|
+
pageContainerProps: r,
|
|
905
911
|
pageContentDataTestId: a,
|
|
906
|
-
topBarDataTestId:
|
|
912
|
+
topBarDataTestId: s,
|
|
907
913
|
navBarDataTestId: p,
|
|
908
914
|
navBarMiddle: u,
|
|
909
|
-
navBarBottom:
|
|
910
|
-
user:
|
|
911
|
-
domainCode:
|
|
915
|
+
navBarBottom: l,
|
|
916
|
+
user: c,
|
|
917
|
+
domainCode: f
|
|
912
918
|
}) {
|
|
913
|
-
const [
|
|
919
|
+
const [m, C] = P(ie), [v] = P(rt), [T] = P(it), [I, A] = P(at), [b] = P(st), [O] = P(lt);
|
|
914
920
|
return te(() => {
|
|
915
|
-
t !== void 0 &&
|
|
916
|
-
}, [t,
|
|
921
|
+
t !== void 0 && A(t);
|
|
922
|
+
}, [t, A]), te(() => {
|
|
917
923
|
n !== void 0 && C(n);
|
|
918
|
-
}, [n, C]), /* @__PURE__ */
|
|
919
|
-
/* @__PURE__ */ o(
|
|
920
|
-
/* @__PURE__ */ o(
|
|
921
|
-
/* @__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: [
|
|
922
928
|
/* @__PURE__ */ o(
|
|
923
|
-
|
|
929
|
+
wn,
|
|
924
930
|
{
|
|
925
|
-
open:
|
|
931
|
+
open: m,
|
|
926
932
|
top: O,
|
|
927
933
|
middle: u,
|
|
928
|
-
bottom:
|
|
929
|
-
user:
|
|
930
|
-
domainCode:
|
|
931
|
-
widthOpen:
|
|
934
|
+
bottom: l,
|
|
935
|
+
user: c,
|
|
936
|
+
domainCode: f,
|
|
937
|
+
widthOpen: v,
|
|
932
938
|
widthClosed: T,
|
|
933
939
|
offsetTop: b,
|
|
934
940
|
"data-testid": p
|
|
935
941
|
}
|
|
936
942
|
),
|
|
937
943
|
/* @__PURE__ */ o(
|
|
938
|
-
|
|
939
|
-
w(
|
|
944
|
+
bn,
|
|
945
|
+
w(i({
|
|
940
946
|
"data-testid": a,
|
|
941
947
|
topBarHeight: b
|
|
942
|
-
},
|
|
948
|
+
}, r), {
|
|
943
949
|
children: e
|
|
944
950
|
})
|
|
945
951
|
)
|
|
946
952
|
] })
|
|
947
953
|
] });
|
|
948
954
|
}
|
|
949
|
-
const
|
|
955
|
+
const In = {
|
|
950
956
|
autoHideDuration: 6e3,
|
|
951
957
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
952
958
|
// The default is false. If we prefer timer to continue when window loses
|
|
953
959
|
// focus, change to true
|
|
954
960
|
disableWindowBlurListener: !1
|
|
955
|
-
},
|
|
961
|
+
}, On = {
|
|
956
962
|
shouldClose: (e, t) => t !== "clickaway"
|
|
957
963
|
}, Le = {
|
|
958
964
|
message: "",
|
|
@@ -960,108 +966,108 @@ const wn = {
|
|
|
960
966
|
variant: "standard",
|
|
961
967
|
progressIndicator: void 0
|
|
962
968
|
// Can use 'circular' or 'linear'
|
|
963
|
-
},
|
|
969
|
+
}, Me = 100, _e = 2e3, Dn = 2e3, kn = (() => {
|
|
964
970
|
let e = 0;
|
|
965
971
|
return () => (e += 1, e);
|
|
966
|
-
})(),
|
|
972
|
+
})(), Bn = {
|
|
967
973
|
borderBottomLeftRadius: "0px",
|
|
968
974
|
borderBottomRightRadius: "0px"
|
|
969
|
-
},
|
|
970
|
-
function
|
|
971
|
-
var p =
|
|
972
|
-
overrideState: e =
|
|
973
|
-
overrideActions: t =
|
|
974
|
-
shouldClose: n =
|
|
975
|
-
children:
|
|
976
|
-
} = 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, [
|
|
977
983
|
"overrideState",
|
|
978
984
|
"overrideActions",
|
|
979
985
|
"shouldClose",
|
|
980
986
|
"children"
|
|
981
987
|
]);
|
|
982
988
|
var G;
|
|
983
|
-
const [{ open: u },
|
|
984
|
-
|
|
985
|
-
}, []),
|
|
986
|
-
|
|
987
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
988
|
-
),
|
|
989
|
-
const g =
|
|
990
|
-
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()
|
|
991
997
|
}), h);
|
|
992
|
-
return
|
|
993
|
-
}, []), T = (h = "", g = {}) =>
|
|
994
|
-
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);
|
|
995
1001
|
if (g !== -1)
|
|
996
|
-
return g === 0 ? (
|
|
1002
|
+
return g === 0 ? (l({ open: !1 }), c.current[0]) : c.current.splice(g, 1);
|
|
997
1003
|
}, H = (h, g) => {
|
|
998
|
-
n(h, g) &&
|
|
1004
|
+
n(h, g) && l({ open: !1 });
|
|
999
1005
|
}, R = () => {
|
|
1000
|
-
},
|
|
1001
|
-
|
|
1002
|
-
}, D = (G =
|
|
1003
|
-
"autoHideDuration" in D && (
|
|
1004
|
-
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({
|
|
1005
1011
|
open: u,
|
|
1006
1012
|
setOpen: C,
|
|
1007
|
-
enqueueNotification:
|
|
1013
|
+
enqueueNotification: v,
|
|
1008
1014
|
enqueueSuccessNotification: T,
|
|
1009
1015
|
enqueueInfoNotification: I,
|
|
1010
|
-
enqueueWarningNotification:
|
|
1016
|
+
enqueueWarningNotification: A,
|
|
1011
1017
|
enqueueErrorNotification: b,
|
|
1012
1018
|
removeNotification: O
|
|
1013
1019
|
}, e), t);
|
|
1014
|
-
return /* @__PURE__ */
|
|
1015
|
-
|
|
1020
|
+
return /* @__PURE__ */ d(dt.Provider, { value: W, children: [
|
|
1021
|
+
r,
|
|
1016
1022
|
/* @__PURE__ */ o(
|
|
1017
|
-
|
|
1018
|
-
w(
|
|
1023
|
+
$t,
|
|
1024
|
+
w(i(i({}, X), q), {
|
|
1019
1025
|
open: u,
|
|
1020
1026
|
onClose: H,
|
|
1021
1027
|
TransitionProps: {
|
|
1022
|
-
onExited:
|
|
1028
|
+
onExited: z,
|
|
1023
1029
|
onExit: R
|
|
1024
1030
|
},
|
|
1025
|
-
sx: { zIndex:
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1031
|
+
sx: { zIndex: Dn },
|
|
1032
|
+
children: /* @__PURE__ */ d("div", { children: [
|
|
1027
1033
|
/* @__PURE__ */ o(
|
|
1028
|
-
|
|
1034
|
+
Nt,
|
|
1029
1035
|
{
|
|
1030
1036
|
onClose: (h) => H(h, "closeAlert"),
|
|
1031
1037
|
severity: D.severity,
|
|
1032
1038
|
variant: "filled",
|
|
1033
|
-
icon: D.progressIndicator === "circular" ? /* @__PURE__ */ o(
|
|
1034
|
-
style: D.progressIndicator === "linear" ?
|
|
1039
|
+
icon: D.progressIndicator === "circular" ? /* @__PURE__ */ o(Ve, { size: "1em" }) : void 0,
|
|
1040
|
+
style: D.progressIndicator === "linear" ? Bn : void 0,
|
|
1035
1041
|
children: D.message
|
|
1036
1042
|
}
|
|
1037
1043
|
),
|
|
1038
|
-
D.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1044
|
+
D.progressIndicator === "linear" && /* @__PURE__ */ o(Et, { color: "primary" })
|
|
1039
1045
|
] })
|
|
1040
1046
|
})
|
|
1041
1047
|
)
|
|
1042
1048
|
] });
|
|
1043
1049
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const e = We(
|
|
1050
|
+
function Fn() {
|
|
1051
|
+
const e = We(dt);
|
|
1046
1052
|
if (e === null)
|
|
1047
|
-
throw new
|
|
1053
|
+
throw new ve("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1048
1054
|
return e;
|
|
1049
1055
|
}
|
|
1050
|
-
const
|
|
1051
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children:
|
|
1052
|
-
),
|
|
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 = ({
|
|
1053
1059
|
children: e,
|
|
1054
1060
|
store: t
|
|
1055
|
-
}) => /* @__PURE__ */ o(
|
|
1056
|
-
var
|
|
1057
|
-
const
|
|
1058
|
-
JSON.parse((
|
|
1059
|
-
),
|
|
1060
|
-
(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),
|
|
1061
1067
|
(e, t, n) => {
|
|
1062
|
-
t(
|
|
1068
|
+
t(He, n), localStorage.setItem(pt, JSON.stringify({ domainCode: n }));
|
|
1063
1069
|
}
|
|
1064
|
-
),
|
|
1070
|
+
), yn = {
|
|
1065
1071
|
act: "ACT",
|
|
1066
1072
|
nsw: "NSW",
|
|
1067
1073
|
nt: "NT",
|
|
@@ -1073,64 +1079,64 @@ const _e = E(
|
|
|
1073
1079
|
ag: "AG",
|
|
1074
1080
|
fedmps: "Fedmps",
|
|
1075
1081
|
"": ""
|
|
1076
|
-
},
|
|
1082
|
+
}, Ln = (e) => {
|
|
1077
1083
|
var t;
|
|
1078
|
-
return e === null ? "N/A" : (t =
|
|
1079
|
-
},
|
|
1084
|
+
return e === null ? "N/A" : (t = yn[e]) != null ? t : "";
|
|
1085
|
+
}, uo = ({
|
|
1080
1086
|
isLoading: e,
|
|
1081
1087
|
isOpen: t,
|
|
1082
1088
|
onClose: n,
|
|
1083
|
-
domainOptions:
|
|
1089
|
+
domainOptions: r,
|
|
1084
1090
|
applicationName: a,
|
|
1085
|
-
handleLogout:
|
|
1091
|
+
handleLogout: s
|
|
1086
1092
|
}) => {
|
|
1087
|
-
const [p, u] = P(
|
|
1088
|
-
|
|
1089
|
-
}), I = () =>
|
|
1090
|
-
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();
|
|
1091
1097
|
});
|
|
1092
|
-
let
|
|
1093
|
-
return
|
|
1094
|
-
|
|
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,
|
|
1095
1101
|
{
|
|
1096
1102
|
isOpen: t,
|
|
1097
1103
|
dialogTitle: "Select an organisation",
|
|
1098
1104
|
primaryButton: {
|
|
1099
1105
|
text: "Confirm",
|
|
1100
1106
|
onClick: T,
|
|
1101
|
-
disabled: !
|
|
1107
|
+
disabled: !l || m || C,
|
|
1102
1108
|
buttonColor: "primary"
|
|
1103
1109
|
},
|
|
1104
1110
|
secondaryButton: {
|
|
1105
|
-
text:
|
|
1111
|
+
text: v ? "Logout" : "Cancel",
|
|
1106
1112
|
onClick: I
|
|
1107
1113
|
},
|
|
1108
|
-
onClose:
|
|
1114
|
+
onClose: v ? () => {
|
|
1109
1115
|
} : n,
|
|
1110
1116
|
children: [
|
|
1111
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ d(B, { marginBottom: 2, children: [
|
|
1112
1118
|
"Select the default organisation that you want to use with the ",
|
|
1113
1119
|
a,
|
|
1114
1120
|
"."
|
|
1115
1121
|
] }),
|
|
1116
1122
|
/* @__PURE__ */ o(
|
|
1117
|
-
|
|
1123
|
+
Ft,
|
|
1118
1124
|
{
|
|
1119
1125
|
loading: e,
|
|
1120
1126
|
multiple: !1,
|
|
1121
1127
|
disableClearable: !1,
|
|
1122
|
-
value:
|
|
1123
|
-
onChange: (b, O) =>
|
|
1124
|
-
getOptionLabel:
|
|
1125
|
-
options: [...
|
|
1128
|
+
value: l !== "" ? l : null,
|
|
1129
|
+
onChange: (b, O) => c(O != null ? O : ""),
|
|
1130
|
+
getOptionLabel: Ln,
|
|
1131
|
+
options: [...r],
|
|
1126
1132
|
renderInput: (b) => /* @__PURE__ */ o(
|
|
1127
|
-
|
|
1128
|
-
w(
|
|
1133
|
+
Pt,
|
|
1134
|
+
w(i({}, b), {
|
|
1129
1135
|
variant: "filled",
|
|
1130
1136
|
label: "Select organisation",
|
|
1131
|
-
InputProps: w(
|
|
1132
|
-
endAdornment: /* @__PURE__ */
|
|
1133
|
-
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,
|
|
1134
1140
|
b.InputProps.endAdornment
|
|
1135
1141
|
] })
|
|
1136
1142
|
})
|
|
@@ -1138,11 +1144,11 @@ const _e = E(
|
|
|
1138
1144
|
)
|
|
1139
1145
|
}
|
|
1140
1146
|
),
|
|
1141
|
-
|
|
1147
|
+
A && /* @__PURE__ */ o(yt, { error: !0, children: A })
|
|
1142
1148
|
]
|
|
1143
1149
|
}
|
|
1144
1150
|
);
|
|
1145
|
-
},
|
|
1151
|
+
}, ho = qe({
|
|
1146
1152
|
palette: {
|
|
1147
1153
|
primary: {
|
|
1148
1154
|
dark: "#00A651",
|
|
@@ -1193,7 +1199,7 @@ const _e = E(
|
|
|
1193
1199
|
navBar: {
|
|
1194
1200
|
backgroundColor: "#E8E8E8"
|
|
1195
1201
|
}
|
|
1196
|
-
}),
|
|
1202
|
+
}), go = qe({
|
|
1197
1203
|
palette: {
|
|
1198
1204
|
primary: {
|
|
1199
1205
|
main: "#007236",
|
|
@@ -1247,18 +1253,18 @@ const _e = E(
|
|
|
1247
1253
|
styleOverrides: {
|
|
1248
1254
|
root: ({ theme: e }) => ({
|
|
1249
1255
|
"&.Mui-selected": {
|
|
1250
|
-
backgroundColor:
|
|
1256
|
+
backgroundColor: ue(
|
|
1251
1257
|
e.palette.secondary.main,
|
|
1252
1258
|
e.palette.action.selectedOpacity
|
|
1253
1259
|
),
|
|
1254
1260
|
"&:hover": {
|
|
1255
|
-
backgroundColor:
|
|
1261
|
+
backgroundColor: ue(
|
|
1256
1262
|
e.palette.secondary.main,
|
|
1257
1263
|
e.palette.action.selectedOpacity
|
|
1258
1264
|
)
|
|
1259
1265
|
},
|
|
1260
1266
|
"&.Mui-focusVisible": {
|
|
1261
|
-
backgroundColor:
|
|
1267
|
+
backgroundColor: ue(
|
|
1262
1268
|
e.palette.secondary.main,
|
|
1263
1269
|
e.palette.action.focusOpacity
|
|
1264
1270
|
)
|
|
@@ -1284,25 +1290,25 @@ const _e = E(
|
|
|
1284
1290
|
navBar: {
|
|
1285
1291
|
backgroundColor: "#E8E8E8"
|
|
1286
1292
|
}
|
|
1287
|
-
}),
|
|
1288
|
-
domainCode:
|
|
1289
|
-
navBarOpen:
|
|
1290
|
-
navBarWidthOpen:
|
|
1291
|
-
navBarWidthClosed:
|
|
1292
|
-
titleText:
|
|
1293
|
-
topBarHeight:
|
|
1294
|
-
navBarTop:
|
|
1295
|
-
},
|
|
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 = ({
|
|
1296
1302
|
initialValues: e,
|
|
1297
1303
|
children: t
|
|
1298
|
-
}) => (
|
|
1304
|
+
}) => (Ut(e), /* @__PURE__ */ o(L, { children: t })), mo = re(
|
|
1299
1305
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1300
|
-
|
|
1306
|
+
_n,
|
|
1301
1307
|
{
|
|
1302
1308
|
initialValues: Object.entries(e).map(
|
|
1303
|
-
([n,
|
|
1304
|
-
|
|
1305
|
-
|
|
1309
|
+
([n, r]) => [
|
|
1310
|
+
Mn[n],
|
|
1311
|
+
r
|
|
1306
1312
|
]
|
|
1307
1313
|
),
|
|
1308
1314
|
children: t
|
|
@@ -1310,39 +1316,40 @@ const _e = E(
|
|
|
1310
1316
|
)
|
|
1311
1317
|
);
|
|
1312
1318
|
export {
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
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,
|
|
1322
1328
|
Ye as NAVBAR_WIDTH_OPENED,
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
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,
|
|
1334
1340
|
_ as navBarClasses,
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
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
|
|
1347
1354
|
};
|
|
1348
1355
|
//# sourceMappingURL=index.js.map
|