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