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