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