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