@australiangreens/ag-internal-components 0.0.31 → 0.0.33
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 +4 -2
- 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 +730 -564
- 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 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,111 +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
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */ o(
|
|
63
|
-
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,
|
|
64
62
|
{
|
|
65
63
|
variant: "outlined",
|
|
66
|
-
onClick: () => n((
|
|
64
|
+
onClick: () => n((a) => a + 1),
|
|
67
65
|
"aria-label": "Increment",
|
|
68
66
|
children: "Hello I am a button"
|
|
69
67
|
}
|
|
70
68
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ u("p", { children: [
|
|
72
70
|
"This is some text: ",
|
|
73
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ r("span", { children: e })
|
|
74
72
|
] }),
|
|
75
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ u(ee, { children: [
|
|
76
74
|
"This number will incremember when button pressed: ",
|
|
77
75
|
t
|
|
78
76
|
] })
|
|
79
77
|
] });
|
|
80
78
|
}
|
|
81
|
-
const
|
|
82
|
-
root: `${
|
|
83
|
-
menuButton: `${
|
|
84
|
-
hide: `${
|
|
85
|
-
content: `${
|
|
86
|
-
userInfoHolder: `${
|
|
87
|
-
settings: `${
|
|
88
|
-
pieChartIcon: `${
|
|
89
|
-
},
|
|
90
|
-
[`&.${
|
|
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}`]: {
|
|
91
89
|
display: "flex"
|
|
92
90
|
},
|
|
93
|
-
[`& .${
|
|
91
|
+
[`& .${E.menuButton}`]: {
|
|
94
92
|
marginRight: 36
|
|
95
93
|
},
|
|
96
|
-
[`& .${
|
|
94
|
+
[`& .${E.hide}`]: {
|
|
97
95
|
display: "none"
|
|
98
96
|
},
|
|
99
|
-
[`& .${
|
|
97
|
+
[`& .${E.content}`]: {
|
|
100
98
|
flexGrow: 1,
|
|
101
99
|
padding: e.spacing(3)
|
|
102
100
|
},
|
|
103
|
-
[`& .${
|
|
101
|
+
[`& .${E.userInfoHolder}`]: {
|
|
104
102
|
height: "148px",
|
|
105
103
|
marginTop: "64px",
|
|
106
104
|
marginBottom: "16px"
|
|
107
105
|
}
|
|
108
|
-
})),
|
|
106
|
+
})), Xe = () => ({
|
|
109
107
|
position: "absolute",
|
|
110
108
|
height: "100%",
|
|
111
109
|
overflowX: "hidden",
|
|
@@ -113,51 +111,51 @@ const Me = 330, We = 73, S = "Navbar", L = {
|
|
|
113
111
|
color: "white",
|
|
114
112
|
backgroundColor: "black"
|
|
115
113
|
// backgroundColor: '#e8e8e8',
|
|
116
|
-
}),
|
|
117
|
-
width:
|
|
118
|
-
},
|
|
119
|
-
width:
|
|
120
|
-
},
|
|
114
|
+
}), Et = () => o({
|
|
115
|
+
width: Ue
|
|
116
|
+
}, Xe()), Lt = () => o({
|
|
117
|
+
width: Ve
|
|
118
|
+
}, Xe()), Ft = L(Me, {
|
|
121
119
|
shouldForwardProp: (e) => e !== "open"
|
|
122
|
-
})(({ theme: e, open: t }) =>
|
|
123
|
-
width: t ?
|
|
120
|
+
})(({ theme: e, open: t }) => o(o({
|
|
121
|
+
width: t ? Ue : Ve,
|
|
124
122
|
flexShrink: 0,
|
|
125
123
|
whiteSpace: "nowrap",
|
|
126
124
|
boxSizing: "border-box",
|
|
127
125
|
zIndex: e.zIndex.drawer + 100
|
|
128
126
|
}, t && {
|
|
129
|
-
"& .MuiDrawer-paper":
|
|
127
|
+
"& .MuiDrawer-paper": Et()
|
|
130
128
|
}), !t && {
|
|
131
129
|
"& .MuiDrawer-paper": Lt()
|
|
132
130
|
}));
|
|
133
|
-
class
|
|
131
|
+
class te extends bt {
|
|
134
132
|
}
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
overrideState: e =
|
|
138
|
-
overrideActions: t =
|
|
133
|
+
Be(te, "errorName", "ContextError");
|
|
134
|
+
const qe = ue(null), Pt = {}, _t = {}, Mt = ({
|
|
135
|
+
overrideState: e = Pt,
|
|
136
|
+
overrideActions: t = _t,
|
|
139
137
|
children: n
|
|
140
138
|
}) => {
|
|
141
|
-
const [{ open:
|
|
142
|
-
|
|
143
|
-
}, []),
|
|
144
|
-
|
|
145
|
-
}, []),
|
|
146
|
-
open:
|
|
147
|
-
setOpen:
|
|
148
|
-
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
|
|
149
147
|
}, e), t);
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
},
|
|
152
|
-
const e =
|
|
148
|
+
return /* @__PURE__ */ r(qe.Provider, { value: g, children: n });
|
|
149
|
+
}, Ht = () => {
|
|
150
|
+
const e = ge(qe);
|
|
153
151
|
if (e === null)
|
|
154
|
-
throw new
|
|
152
|
+
throw new te("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
155
153
|
return e;
|
|
156
|
-
},
|
|
154
|
+
}, Rt = (e = {}) => o({
|
|
157
155
|
open: !0
|
|
158
|
-
}, e),
|
|
159
|
-
(e =
|
|
160
|
-
),
|
|
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 }) => ({
|
|
161
159
|
backgroundColor: "black",
|
|
162
160
|
color: "white",
|
|
163
161
|
"& .MuiListItem-root": {
|
|
@@ -166,7 +164,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
166
164
|
"& .MuiListItemButton-root": {
|
|
167
165
|
" .MuiListItemIcon-root": {
|
|
168
166
|
color: "white",
|
|
169
|
-
padding: `${
|
|
167
|
+
padding: `${ye}px`
|
|
170
168
|
},
|
|
171
169
|
// Focus state
|
|
172
170
|
"&.Mui-focusVisible": {
|
|
@@ -177,7 +175,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
177
175
|
borderLeftStyle: "solid",
|
|
178
176
|
borderLeftWidth: "7px",
|
|
179
177
|
borderLeftColor: e.palette.primary.main,
|
|
180
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
178
|
+
paddingLeft: `calc(${e.spacing(2)} - ${ye}px)`
|
|
181
179
|
},
|
|
182
180
|
// Hover state
|
|
183
181
|
"&:hover": {
|
|
@@ -195,7 +193,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
195
193
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
196
194
|
// },
|
|
197
195
|
}
|
|
198
|
-
})),
|
|
196
|
+
})), Ae = 7, Xn = L(Re)(({ theme: e }) => ({
|
|
199
197
|
backgroundColor: "#e8e8e8",
|
|
200
198
|
color: "inherit",
|
|
201
199
|
"& .MuiListItem-root": {
|
|
@@ -204,7 +202,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
204
202
|
"& .MuiListItemButton-root": {
|
|
205
203
|
" .MuiListItemIcon-root": {
|
|
206
204
|
color: "inherit",
|
|
207
|
-
padding: `${
|
|
205
|
+
padding: `${Ae}px`
|
|
208
206
|
},
|
|
209
207
|
// Focus state
|
|
210
208
|
"&.Mui-focusVisible": {
|
|
@@ -215,7 +213,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
215
213
|
borderLeftStyle: "solid",
|
|
216
214
|
borderLeftWidth: "7px",
|
|
217
215
|
borderLeftColor: e.palette.primary.main,
|
|
218
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
216
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Ae}px)`
|
|
219
217
|
},
|
|
220
218
|
// Hover state
|
|
221
219
|
"&:hover": {
|
|
@@ -234,15 +232,15 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
234
232
|
// },
|
|
235
233
|
}
|
|
236
234
|
}));
|
|
237
|
-
function
|
|
235
|
+
function qn({
|
|
238
236
|
"data-testid": e,
|
|
239
237
|
children: t
|
|
240
238
|
}) {
|
|
241
|
-
const { open: n } =
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
|
|
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,
|
|
246
244
|
{
|
|
247
245
|
variant: "permanent",
|
|
248
246
|
anchor: "left",
|
|
@@ -253,81 +251,81 @@ function Gn({
|
|
|
253
251
|
)
|
|
254
252
|
] });
|
|
255
253
|
}
|
|
256
|
-
const
|
|
254
|
+
const Wt = ({
|
|
257
255
|
isOpen: e,
|
|
258
256
|
dialogTitle: t,
|
|
259
257
|
children: n,
|
|
260
|
-
maxWidth:
|
|
261
|
-
primaryButton:
|
|
262
|
-
secondaryButton:
|
|
263
|
-
onClose:
|
|
258
|
+
maxWidth: a,
|
|
259
|
+
primaryButton: i,
|
|
260
|
+
secondaryButton: d,
|
|
261
|
+
onClose: c
|
|
264
262
|
}) => {
|
|
265
|
-
var
|
|
266
|
-
const [
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
|
|
263
|
+
var l, m;
|
|
264
|
+
const [g, s] = y(!1);
|
|
265
|
+
return /* @__PURE__ */ u(
|
|
266
|
+
Ot,
|
|
269
267
|
{
|
|
270
268
|
open: e,
|
|
271
269
|
onClose: () => {
|
|
272
|
-
|
|
270
|
+
g || c();
|
|
273
271
|
},
|
|
274
272
|
fullWidth: !0,
|
|
275
|
-
maxWidth:
|
|
273
|
+
maxWidth: a != null ? a : "xs",
|
|
276
274
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
|
|
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,
|
|
282
280
|
{
|
|
283
|
-
onClick: (
|
|
284
|
-
"data-testid":
|
|
285
|
-
disabled: (
|
|
286
|
-
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"
|
|
287
285
|
}
|
|
288
286
|
),
|
|
289
|
-
|
|
290
|
-
|
|
287
|
+
i && /* @__PURE__ */ r(
|
|
288
|
+
Oe,
|
|
291
289
|
{
|
|
292
|
-
onClick: () =>
|
|
293
|
-
var
|
|
294
|
-
|
|
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);
|
|
295
293
|
}),
|
|
296
|
-
"data-testid":
|
|
297
|
-
disabled:
|
|
298
|
-
children:
|
|
294
|
+
"data-testid": i.testId,
|
|
295
|
+
disabled: i.disabled || g,
|
|
296
|
+
children: i.text
|
|
299
297
|
}
|
|
300
298
|
)
|
|
301
299
|
] })
|
|
302
300
|
]
|
|
303
301
|
}
|
|
304
302
|
);
|
|
305
|
-
},
|
|
306
|
-
topStripe: `${
|
|
307
|
-
titleBar: `${
|
|
308
|
-
titleSlider: `${
|
|
309
|
-
titleText: `${
|
|
310
|
-
leftPanelButton: `${
|
|
311
|
-
rightPanelButton: `${
|
|
312
|
-
},
|
|
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", {
|
|
313
311
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
314
|
-
name:
|
|
312
|
+
name: N
|
|
315
313
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
316
|
-
var
|
|
314
|
+
var a, i;
|
|
317
315
|
return {
|
|
318
316
|
width: "100%",
|
|
319
|
-
[`& .${
|
|
317
|
+
[`& .${T.topStripe}`]: {
|
|
320
318
|
width: "100%",
|
|
321
|
-
height: `${
|
|
319
|
+
height: `${zt}px`,
|
|
322
320
|
backgroundColor: e.palette.primary.main
|
|
323
321
|
},
|
|
324
|
-
[`& .${
|
|
322
|
+
[`& .${T.titleBar}`]: {
|
|
325
323
|
backgroundColor: e.palette.primary.light,
|
|
326
|
-
height: `${
|
|
324
|
+
height: `${Gt}px`,
|
|
327
325
|
padding: e.spacing(0, 3),
|
|
328
326
|
width: "100%"
|
|
329
327
|
},
|
|
330
|
-
[`& .${
|
|
328
|
+
[`& .${T.titleSlider}`]: o(o({
|
|
331
329
|
height: "100%",
|
|
332
330
|
display: "flex",
|
|
333
331
|
alignItems: "center",
|
|
@@ -336,14 +334,14 @@ const Un = ({
|
|
|
336
334
|
easing: e.transitions.easing.sharp,
|
|
337
335
|
duration: e.transitions.duration.leavingScreen
|
|
338
336
|
}),
|
|
339
|
-
[`& .${
|
|
337
|
+
[`& .${T.leftPanelButton}`]: {
|
|
340
338
|
marginRight: e.spacing(2),
|
|
341
339
|
flexGrow: 0
|
|
342
340
|
},
|
|
343
|
-
[`& .${
|
|
341
|
+
[`& .${T.titleText}`]: {
|
|
344
342
|
flexGrow: 1
|
|
345
343
|
},
|
|
346
|
-
[`& .${
|
|
344
|
+
[`& .${T.rightPanelButton}`]: {
|
|
347
345
|
flexGrow: 0
|
|
348
346
|
}
|
|
349
347
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -351,29 +349,29 @@ const Un = ({
|
|
|
351
349
|
easing: e.transitions.easing.easeOut,
|
|
352
350
|
duration: e.transitions.duration.enteringScreen
|
|
353
351
|
}),
|
|
354
|
-
marginLeft: `${(
|
|
352
|
+
marginLeft: `${(a = t == null ? void 0 : t.width) != null ? a : 0}px`
|
|
355
353
|
}), (n == null ? void 0 : n.open) && {
|
|
356
354
|
transition: e.transitions.create("margin", {
|
|
357
355
|
easing: e.transitions.easing.easeOut,
|
|
358
356
|
duration: e.transitions.duration.enteringScreen
|
|
359
357
|
}),
|
|
360
|
-
marginRight: `${(
|
|
358
|
+
marginRight: `${(i = n == null ? void 0 : n.width) != null ? i : 0}px`
|
|
361
359
|
})
|
|
362
360
|
};
|
|
363
361
|
});
|
|
364
|
-
function
|
|
362
|
+
function Vt({
|
|
365
363
|
titleText: e = "",
|
|
366
364
|
leftPanel: t,
|
|
367
365
|
rightPanel: n,
|
|
368
|
-
"data-testid":
|
|
366
|
+
"data-testid": a
|
|
369
367
|
}) {
|
|
370
|
-
return /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
374
|
-
|
|
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,
|
|
375
373
|
{
|
|
376
|
-
className:
|
|
374
|
+
className: T.leftPanelButton,
|
|
377
375
|
color: "inherit",
|
|
378
376
|
"aria-label": "Open left side panel",
|
|
379
377
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -381,15 +379,15 @@ function Wt({
|
|
|
381
379
|
size: "large",
|
|
382
380
|
children: [
|
|
383
381
|
" ",
|
|
384
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ r(We, {})
|
|
385
383
|
]
|
|
386
384
|
}
|
|
387
385
|
),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
390
|
-
|
|
386
|
+
/* @__PURE__ */ r($, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
387
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
|
|
388
|
+
z,
|
|
391
389
|
{
|
|
392
|
-
className:
|
|
390
|
+
className: T.rightPanelButton,
|
|
393
391
|
color: "inherit",
|
|
394
392
|
"aria-label": "Open right side panel",
|
|
395
393
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -397,14 +395,14 @@ function Wt({
|
|
|
397
395
|
size: "large",
|
|
398
396
|
children: [
|
|
399
397
|
" ",
|
|
400
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ r(ze, {})
|
|
401
399
|
]
|
|
402
400
|
}
|
|
403
401
|
)
|
|
404
402
|
] }) })
|
|
405
403
|
] });
|
|
406
404
|
}
|
|
407
|
-
const
|
|
405
|
+
const Ye = 400, Xt = G(ht, {
|
|
408
406
|
shouldForwardProp: (e) => (
|
|
409
407
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
410
408
|
![
|
|
@@ -418,9 +416,9 @@ const Ge = 400, Ft = F(dt, {
|
|
|
418
416
|
),
|
|
419
417
|
name: "SidePanelDrawer"
|
|
420
418
|
})(
|
|
421
|
-
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen:
|
|
419
|
+
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: a, navBarWidthOpen: i, navBarWidthClosed: d }) => ({
|
|
422
420
|
width: e,
|
|
423
|
-
"& .MuiDrawer-paper":
|
|
421
|
+
"& .MuiDrawer-paper": o(o({
|
|
424
422
|
position: "absolute",
|
|
425
423
|
width: e,
|
|
426
424
|
boxSizing: "border-box",
|
|
@@ -428,15 +426,15 @@ const Ge = 400, Ft = F(dt, {
|
|
|
428
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)"
|
|
429
427
|
}, t && {
|
|
430
428
|
opacity: "50%"
|
|
431
|
-
}), n === "left" &&
|
|
432
|
-
marginLeft: `${
|
|
433
|
-
},
|
|
434
|
-
marginLeft: `${
|
|
429
|
+
}), n === "left" && o({
|
|
430
|
+
marginLeft: `${d}px`
|
|
431
|
+
}, a && {
|
|
432
|
+
marginLeft: `${i}px`
|
|
435
433
|
}))
|
|
436
434
|
})
|
|
437
|
-
),
|
|
435
|
+
), qt = G(B, {
|
|
438
436
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
439
|
-
})(({ theme: e, anchor: t }) =>
|
|
437
|
+
})(({ theme: e, anchor: t }) => x(o({
|
|
440
438
|
display: "flex",
|
|
441
439
|
alignItems: "center",
|
|
442
440
|
padding: e.spacing(2)
|
|
@@ -454,65 +452,65 @@ const Ge = 400, Ft = F(dt, {
|
|
|
454
452
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
455
453
|
}
|
|
456
454
|
}));
|
|
457
|
-
function
|
|
455
|
+
function Ie({
|
|
458
456
|
children: e,
|
|
459
457
|
anchor: t = "left",
|
|
460
458
|
open: n,
|
|
461
|
-
onClose:
|
|
459
|
+
onClose: a = () => {
|
|
462
460
|
},
|
|
463
|
-
titleText:
|
|
464
|
-
width:
|
|
465
|
-
showCloseArrow:
|
|
466
|
-
debugOpacity:
|
|
467
|
-
headerBoxProps:
|
|
468
|
-
onOpened:
|
|
469
|
-
onClosed:
|
|
470
|
-
"data-testid":
|
|
471
|
-
navBarOpen:
|
|
472
|
-
navBarWidthOpen:
|
|
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,
|
|
470
|
+
navBarWidthOpen: C = 0,
|
|
473
471
|
navBarWidthClosed: b = 0
|
|
474
472
|
}) {
|
|
475
|
-
return /* @__PURE__ */
|
|
476
|
-
|
|
473
|
+
return /* @__PURE__ */ u(
|
|
474
|
+
Xt,
|
|
477
475
|
{
|
|
478
476
|
SlideProps: {
|
|
479
|
-
onEntered: () =>
|
|
480
|
-
onExited: () =>
|
|
477
|
+
onEntered: () => l == null ? void 0 : l(),
|
|
478
|
+
onExited: () => m == null ? void 0 : m()
|
|
481
479
|
},
|
|
482
480
|
variant: "persistent",
|
|
483
481
|
anchor: t,
|
|
484
482
|
open: n,
|
|
485
|
-
width:
|
|
486
|
-
debugOpacity:
|
|
487
|
-
"data-testid":
|
|
488
|
-
navBarOpen:
|
|
489
|
-
navBarWidthOpen:
|
|
483
|
+
width: d,
|
|
484
|
+
debugOpacity: g,
|
|
485
|
+
"data-testid": h,
|
|
486
|
+
navBarOpen: p,
|
|
487
|
+
navBarWidthOpen: C,
|
|
490
488
|
navBarWidthClosed: b,
|
|
491
489
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
|
|
495
|
-
/* @__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" }),
|
|
496
494
|
" "
|
|
497
495
|
] })
|
|
498
|
-
] }) : /* @__PURE__ */
|
|
499
|
-
|
|
500
|
-
/* @__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, {}),
|
|
501
499
|
" "
|
|
502
500
|
] }),
|
|
503
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ r($, { variant: "h6", color: "inherit", component: "div", children: i })
|
|
504
502
|
] }) })),
|
|
505
503
|
e
|
|
506
504
|
]
|
|
507
505
|
}
|
|
508
506
|
);
|
|
509
507
|
}
|
|
510
|
-
const
|
|
508
|
+
const Yt = G("div", {
|
|
511
509
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
512
510
|
name: "PanelAwareMargins"
|
|
513
511
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
514
|
-
var
|
|
515
|
-
return
|
|
512
|
+
var a, i;
|
|
513
|
+
return o(o({
|
|
516
514
|
transition: e.transitions.create("margin", {
|
|
517
515
|
easing: e.transitions.easing.sharp,
|
|
518
516
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -522,239 +520,239 @@ const Gt = F("div", {
|
|
|
522
520
|
easing: e.transitions.easing.easeOut,
|
|
523
521
|
duration: e.transitions.duration.enteringScreen
|
|
524
522
|
}),
|
|
525
|
-
marginLeft: `${(
|
|
523
|
+
marginLeft: `${(a = t == null ? void 0 : t.width) != null ? a : 0}px`
|
|
526
524
|
}), (n == null ? void 0 : n.open) && {
|
|
527
525
|
transition: e.transitions.create("margin", {
|
|
528
526
|
easing: e.transitions.easing.easeOut,
|
|
529
527
|
duration: e.transitions.duration.enteringScreen
|
|
530
528
|
}),
|
|
531
|
-
marginRight: `${(
|
|
529
|
+
marginRight: `${(i = n == null ? void 0 : n.width) != null ? i : 0}px`
|
|
532
530
|
});
|
|
533
|
-
}),
|
|
531
|
+
}), Qt = G(Fe, {
|
|
534
532
|
name: "PageContainer"
|
|
535
533
|
})(({ theme: e }) => ({
|
|
536
534
|
// Horizontal padding comes from the Container's gutter
|
|
537
535
|
paddingTop: e.spacing(3),
|
|
538
536
|
paddingBottom: e.spacing(3)
|
|
539
|
-
})),
|
|
537
|
+
})), ce = !1, pe = !1, j = {
|
|
540
538
|
titleText: "",
|
|
541
539
|
flavour: "push",
|
|
542
|
-
width:
|
|
540
|
+
width: Ye,
|
|
543
541
|
arrowButtons: "both",
|
|
544
542
|
startOpen: !1,
|
|
545
543
|
open: void 0,
|
|
546
544
|
onChangeOpen: void 0,
|
|
547
|
-
content: /* @__PURE__ */
|
|
545
|
+
content: /* @__PURE__ */ r(W, {}),
|
|
548
546
|
onOpened: void 0,
|
|
549
547
|
onClosed: void 0,
|
|
550
548
|
dataTestId: void 0
|
|
551
549
|
};
|
|
552
|
-
function
|
|
550
|
+
function Yn({
|
|
553
551
|
children: e,
|
|
554
552
|
titleText: t = "",
|
|
555
553
|
leftPanel: n,
|
|
556
|
-
rightPanel:
|
|
557
|
-
sidePanelsAreMutuallyExclusive:
|
|
558
|
-
debugOpacity:
|
|
559
|
-
pageContainerProps:
|
|
560
|
-
pageContentDataTestId:
|
|
561
|
-
topBarDataTestId:
|
|
562
|
-
navBarOpen:
|
|
563
|
-
navBarWidthOpen:
|
|
564
|
-
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
|
|
565
563
|
}) {
|
|
566
|
-
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, {
|
|
567
565
|
titleText: O,
|
|
568
|
-
content:
|
|
569
|
-
flavour:
|
|
570
|
-
open:
|
|
571
|
-
onChangeOpen:
|
|
572
|
-
width:
|
|
573
|
-
arrowButtons:
|
|
574
|
-
startOpen:
|
|
575
|
-
onOpened:
|
|
576
|
-
onClosed:
|
|
577
|
-
dataTestId:
|
|
578
|
-
} = n ?
|
|
579
|
-
titleText:
|
|
580
|
-
content:
|
|
581
|
-
flavour:
|
|
582
|
-
open:
|
|
583
|
-
onChangeOpen:
|
|
584
|
-
width:
|
|
585
|
-
arrowButtons:
|
|
586
|
-
startOpen:
|
|
587
|
-
onOpened:
|
|
588
|
-
onClosed:
|
|
589
|
-
dataTestId:
|
|
590
|
-
} =
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}, [
|
|
594
|
-
|
|
595
|
-
}, [
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
},
|
|
599
|
-
|
|
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);
|
|
600
598
|
};
|
|
601
|
-
return /* @__PURE__ */
|
|
602
|
-
P && /* @__PURE__ */
|
|
603
|
-
|
|
599
|
+
return /* @__PURE__ */ u(B, { children: [
|
|
600
|
+
P && /* @__PURE__ */ r(
|
|
601
|
+
Ie,
|
|
604
602
|
{
|
|
605
|
-
"data-testid":
|
|
603
|
+
"data-testid": nt,
|
|
606
604
|
anchor: "left",
|
|
607
|
-
open:
|
|
608
|
-
onClose: () =>
|
|
609
|
-
width:
|
|
605
|
+
open: ae,
|
|
606
|
+
onClose: () => xe(!1),
|
|
607
|
+
width: f,
|
|
610
608
|
titleText: O,
|
|
611
|
-
debugOpacity:
|
|
612
|
-
showCloseArrow:
|
|
613
|
-
onOpened:
|
|
614
|
-
onClosed:
|
|
615
|
-
navBarOpen:
|
|
616
|
-
navBarWidthOpen:
|
|
617
|
-
navBarWidthClosed:
|
|
618
|
-
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
|
|
619
617
|
}
|
|
620
618
|
),
|
|
621
|
-
|
|
622
|
-
|
|
619
|
+
_ && /* @__PURE__ */ r(
|
|
620
|
+
Ie,
|
|
623
621
|
{
|
|
624
|
-
"data-testid":
|
|
622
|
+
"data-testid": st,
|
|
625
623
|
anchor: "right",
|
|
626
|
-
open:
|
|
627
|
-
onClose: () =>
|
|
628
|
-
width:
|
|
629
|
-
titleText:
|
|
630
|
-
debugOpacity:
|
|
631
|
-
showCloseArrow:
|
|
632
|
-
onOpened:
|
|
633
|
-
onClosed:
|
|
634
|
-
navBarOpen:
|
|
635
|
-
navBarWidthOpen:
|
|
636
|
-
navBarWidthClosed:
|
|
637
|
-
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
|
|
638
636
|
}
|
|
639
637
|
),
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
|
|
642
|
-
|
|
638
|
+
/* @__PURE__ */ r(
|
|
639
|
+
Vt,
|
|
640
|
+
o(o({
|
|
643
641
|
titleText: t,
|
|
644
|
-
"data-testid":
|
|
645
|
-
}, P &&
|
|
642
|
+
"data-testid": s
|
|
643
|
+
}, P && V === "push" ? {
|
|
646
644
|
leftPanel: {
|
|
647
|
-
open:
|
|
648
|
-
width:
|
|
649
|
-
onOpen: () =>
|
|
650
|
-
showOpenArrow:
|
|
645
|
+
open: ae,
|
|
646
|
+
width: f,
|
|
647
|
+
onOpen: () => xe(!0),
|
|
648
|
+
showOpenArrow: v === "both" || v === "open"
|
|
651
649
|
}
|
|
652
|
-
} : {}),
|
|
650
|
+
} : {}), _ && fe === "push" ? {
|
|
653
651
|
rightPanel: {
|
|
654
|
-
open:
|
|
655
|
-
width:
|
|
656
|
-
onOpen: () =>
|
|
657
|
-
showOpenArrow:
|
|
652
|
+
open: ie,
|
|
653
|
+
width: re,
|
|
654
|
+
onOpen: () => me(!0),
|
|
655
|
+
showOpenArrow: X === "both" || X === "open"
|
|
658
656
|
}
|
|
659
657
|
} : {})
|
|
660
658
|
),
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
|
|
663
|
-
|
|
659
|
+
/* @__PURE__ */ r(
|
|
660
|
+
Yt,
|
|
661
|
+
x(o(o({}, V === "push" ? {
|
|
664
662
|
leftPanel: {
|
|
665
|
-
open:
|
|
666
|
-
width:
|
|
663
|
+
open: ae,
|
|
664
|
+
width: f
|
|
667
665
|
}
|
|
668
|
-
} : {}),
|
|
666
|
+
} : {}), fe === "push" ? {
|
|
669
667
|
rightPanel: {
|
|
670
|
-
open:
|
|
671
|
-
width:
|
|
668
|
+
open: ie,
|
|
669
|
+
width: re
|
|
672
670
|
}
|
|
673
671
|
} : {}), {
|
|
674
|
-
children: /* @__PURE__ */
|
|
672
|
+
children: /* @__PURE__ */ r(Qt, x(o({ "data-testid": g }, c), { children: e }))
|
|
675
673
|
})
|
|
676
674
|
)
|
|
677
675
|
] });
|
|
678
676
|
}
|
|
679
|
-
const
|
|
677
|
+
const jt = 64, Kt = 64, Jt = 256, Zt = {
|
|
680
678
|
navBarOpen: !0,
|
|
681
679
|
titleText: "",
|
|
682
|
-
navBarWidthOpen:
|
|
683
|
-
navBarWidthClosed:
|
|
684
|
-
topBarHeight:
|
|
680
|
+
navBarWidthOpen: Jt,
|
|
681
|
+
navBarWidthClosed: Kt,
|
|
682
|
+
topBarHeight: jt,
|
|
685
683
|
navBarTop: void 0
|
|
686
684
|
};
|
|
687
|
-
function
|
|
685
|
+
function en(e, t) {
|
|
688
686
|
switch (t.type) {
|
|
689
687
|
case "toggleNavBarOpen":
|
|
690
|
-
return
|
|
688
|
+
return x(o({}, e), {
|
|
691
689
|
navBarOpen: !e.navBarOpen
|
|
692
690
|
});
|
|
693
691
|
case "setNavBarOpen":
|
|
694
|
-
return
|
|
692
|
+
return x(o({}, e), {
|
|
695
693
|
navBarOpen: t.payload
|
|
696
694
|
});
|
|
697
695
|
case "setTitleText":
|
|
698
|
-
return
|
|
696
|
+
return x(o({}, e), {
|
|
699
697
|
titleText: t.payload
|
|
700
698
|
});
|
|
701
699
|
case "setNavBarWidthOpen":
|
|
702
|
-
return
|
|
700
|
+
return x(o({}, e), {
|
|
703
701
|
navBarWidthOpen: t.payload
|
|
704
702
|
});
|
|
705
703
|
case "setTopBarHeight":
|
|
706
|
-
return
|
|
704
|
+
return x(o({}, e), {
|
|
707
705
|
topBarHeight: t.payload
|
|
708
706
|
});
|
|
709
707
|
case "setNavBarTop":
|
|
710
|
-
return
|
|
708
|
+
return x(o({}, e), {
|
|
711
709
|
navBarTop: t.payload
|
|
712
710
|
});
|
|
713
711
|
default:
|
|
714
712
|
throw new Error("Invalid action.type");
|
|
715
713
|
}
|
|
716
714
|
}
|
|
717
|
-
const
|
|
718
|
-
overrideState: e =
|
|
719
|
-
overrideActions: t =
|
|
715
|
+
const Qe = ue(null), tn = {}, nn = {}, on = ({
|
|
716
|
+
overrideState: e = tn,
|
|
717
|
+
overrideActions: t = nn,
|
|
720
718
|
children: n
|
|
721
719
|
}) => {
|
|
722
720
|
const [
|
|
723
|
-
{ titleText:
|
|
724
|
-
|
|
725
|
-
] =
|
|
721
|
+
{ titleText: a, topBarHeight: i, navBarOpen: d, navBarWidthOpen: c, navBarWidthClosed: g, navBarTop: s },
|
|
722
|
+
l
|
|
723
|
+
] = pt(en, Zt), m = ut(
|
|
726
724
|
() => ({
|
|
727
|
-
toggleNavBarOpen: () =>
|
|
728
|
-
setNavBarOpen: (
|
|
729
|
-
setNavBarWidthOpen: (
|
|
730
|
-
setNavBarWidthClosed: (
|
|
731
|
-
setTitleText: (
|
|
732
|
-
setTopBarHeight: (
|
|
733
|
-
setNavBarTop: (
|
|
734
|
-
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 })
|
|
735
733
|
}),
|
|
736
734
|
[]
|
|
737
|
-
),
|
|
738
|
-
navBarOpen:
|
|
739
|
-
navBarWidthOpen:
|
|
740
|
-
navBarWidthClosed:
|
|
741
|
-
titleText:
|
|
742
|
-
topBarHeight:
|
|
743
|
-
navBarTop:
|
|
744
|
-
},
|
|
745
|
-
return /* @__PURE__ */
|
|
746
|
-
},
|
|
747
|
-
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);
|
|
748
746
|
if (e === null)
|
|
749
|
-
throw new
|
|
747
|
+
throw new te("Error: Tried to call useAppLayout() outside of a <AppLayoutProvider>");
|
|
750
748
|
return e;
|
|
751
|
-
},
|
|
752
|
-
titleText: `${
|
|
749
|
+
}, rn = "TopBar", an = {
|
|
750
|
+
titleText: `${rn}-titleText`
|
|
753
751
|
};
|
|
754
|
-
function
|
|
755
|
-
const { toggleNavBarOpen:
|
|
756
|
-
return /* @__PURE__ */
|
|
757
|
-
|
|
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,
|
|
758
756
|
{
|
|
759
757
|
square: !0,
|
|
760
758
|
elevation: 0,
|
|
@@ -770,31 +768,31 @@ function tn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
770
768
|
height: t
|
|
771
769
|
},
|
|
772
770
|
children: [
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
/* @__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 })
|
|
775
773
|
]
|
|
776
774
|
}
|
|
777
775
|
) });
|
|
778
776
|
}
|
|
779
|
-
const
|
|
780
|
-
root: `${
|
|
781
|
-
menuButton: `${
|
|
782
|
-
hide: `${
|
|
783
|
-
content: `${
|
|
777
|
+
const K = "Navbar", R = {
|
|
778
|
+
root: `${K}-root`,
|
|
779
|
+
menuButton: `${K}-menuButton`,
|
|
780
|
+
hide: `${K}-hide`,
|
|
781
|
+
content: `${K}-content`
|
|
784
782
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
785
783
|
// settings: `${PREFIX}-settings`,
|
|
786
784
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
787
|
-
},
|
|
788
|
-
[`&.${
|
|
785
|
+
}, ln = L("div", { name: "NavBar" })(({ theme: e }) => ({
|
|
786
|
+
[`&.${R.root}`]: {
|
|
789
787
|
display: "flex"
|
|
790
788
|
},
|
|
791
|
-
[`& .${
|
|
789
|
+
[`& .${R.menuButton}`]: {
|
|
792
790
|
marginRight: 36
|
|
793
791
|
},
|
|
794
|
-
[`& .${
|
|
792
|
+
[`& .${R.hide}`]: {
|
|
795
793
|
display: "none"
|
|
796
794
|
},
|
|
797
|
-
[`& .${
|
|
795
|
+
[`& .${R.content}`]: {
|
|
798
796
|
flexGrow: 1,
|
|
799
797
|
padding: e.spacing(3)
|
|
800
798
|
}
|
|
@@ -803,80 +801,80 @@ const j = "Navbar", H = {
|
|
|
803
801
|
// marginTop: '64px',
|
|
804
802
|
// marginBottom: '16px',
|
|
805
803
|
// },
|
|
806
|
-
})),
|
|
807
|
-
var n,
|
|
804
|
+
})), Ke = (e, t) => {
|
|
805
|
+
var n, a;
|
|
808
806
|
return {
|
|
809
807
|
height: `calc(100vh - ${t})`,
|
|
810
808
|
top: t,
|
|
811
809
|
overflowX: "hidden",
|
|
812
810
|
overflowY: "hidden",
|
|
813
811
|
color: "inherit",
|
|
814
|
-
backgroundColor: (
|
|
812
|
+
backgroundColor: (a = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? a : "white"
|
|
815
813
|
// Provide default so tests don't need to wrap theme provider
|
|
816
814
|
};
|
|
817
|
-
}, Se = (e, t, n) =>
|
|
815
|
+
}, Se = (e, t, n) => o({
|
|
818
816
|
width: t,
|
|
819
817
|
transition: e.transitions.create("width", {
|
|
820
818
|
easing: e.transitions.easing.sharp,
|
|
821
819
|
duration: e.transitions.duration.enteringScreen
|
|
822
820
|
})
|
|
823
|
-
},
|
|
821
|
+
}, Ke(e, n)), De = (e, t, n) => o({
|
|
824
822
|
width: t,
|
|
825
823
|
transition: e.transitions.create("width", {
|
|
826
824
|
easing: e.transitions.easing.sharp,
|
|
827
825
|
duration: e.transitions.duration.leavingScreen
|
|
828
826
|
}),
|
|
829
827
|
overflowX: "hidden"
|
|
830
|
-
},
|
|
828
|
+
}, Ke(e, n)), dn = L(Me, {
|
|
831
829
|
shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
|
|
832
|
-
})(({ theme: e, open: t, widthOpen: n, widthClosed:
|
|
830
|
+
})(({ theme: e, open: t, widthOpen: n, widthClosed: a, offsetTop: i }) => o(o({
|
|
833
831
|
flexShrink: 0,
|
|
834
832
|
whiteSpace: "nowrap",
|
|
835
833
|
boxSizing: "border-box"
|
|
836
|
-
}, t &&
|
|
837
|
-
"& .MuiDrawer-paper": Se(e, n,
|
|
838
|
-
})), !t &&
|
|
839
|
-
"& .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)
|
|
840
838
|
})));
|
|
841
|
-
function
|
|
842
|
-
return /* @__PURE__ */
|
|
839
|
+
function cn({ links: e }) {
|
|
840
|
+
return /* @__PURE__ */ r("div", { children: "LinksMenu not implemented yet" });
|
|
843
841
|
}
|
|
844
|
-
function
|
|
842
|
+
function pn({
|
|
845
843
|
open: e,
|
|
846
844
|
offsetTop: t = 0,
|
|
847
845
|
widthOpen: n,
|
|
848
|
-
widthClosed:
|
|
849
|
-
"data-testid":
|
|
850
|
-
top:
|
|
851
|
-
middle:
|
|
852
|
-
bottom:
|
|
846
|
+
widthClosed: a,
|
|
847
|
+
"data-testid": i,
|
|
848
|
+
top: d,
|
|
849
|
+
middle: c,
|
|
850
|
+
bottom: g
|
|
853
851
|
}) {
|
|
854
|
-
return /* @__PURE__ */
|
|
855
|
-
|
|
852
|
+
return /* @__PURE__ */ r(ln, { className: R.root, "data-testid": i, children: /* @__PURE__ */ r(
|
|
853
|
+
dn,
|
|
856
854
|
{
|
|
857
855
|
variant: "permanent",
|
|
858
856
|
anchor: "left",
|
|
859
857
|
open: e,
|
|
860
858
|
widthOpen: n,
|
|
861
|
-
widthClosed:
|
|
859
|
+
widthClosed: a,
|
|
862
860
|
offsetTop: t,
|
|
863
|
-
children: /* @__PURE__ */
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
/* @__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" })
|
|
867
865
|
] }),
|
|
868
|
-
Array.isArray(
|
|
869
|
-
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
|
|
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
|
|
872
870
|
] })
|
|
873
871
|
] })
|
|
874
872
|
}
|
|
875
873
|
) });
|
|
876
874
|
}
|
|
877
|
-
function
|
|
878
|
-
return /* @__PURE__ */
|
|
879
|
-
|
|
875
|
+
function un({ children: e, topBarHeight: t }) {
|
|
876
|
+
return /* @__PURE__ */ r(
|
|
877
|
+
B,
|
|
880
878
|
{
|
|
881
879
|
sx: {
|
|
882
880
|
overflow: "auto",
|
|
@@ -885,8 +883,8 @@ function sn({ children: e, topBarHeight: t }) {
|
|
|
885
883
|
// scrollbarGutter: 'stable both-edges',
|
|
886
884
|
flexGrow: 1
|
|
887
885
|
},
|
|
888
|
-
children: /* @__PURE__ */
|
|
889
|
-
|
|
886
|
+
children: /* @__PURE__ */ r(
|
|
887
|
+
Fe,
|
|
890
888
|
{
|
|
891
889
|
component: "main",
|
|
892
890
|
id: "main-content",
|
|
@@ -897,169 +895,178 @@ function sn({ children: e, topBarHeight: t }) {
|
|
|
897
895
|
}
|
|
898
896
|
);
|
|
899
897
|
}
|
|
900
|
-
function
|
|
898
|
+
function gn({
|
|
901
899
|
children: e,
|
|
902
900
|
initialTitleText: t,
|
|
903
901
|
initialNavBarOpen: n,
|
|
904
|
-
pageContainerProps:
|
|
905
|
-
pageContentDataTestId:
|
|
906
|
-
topBarDataTestId:
|
|
907
|
-
navBarDataTestId:
|
|
908
|
-
navBarMiddle:
|
|
902
|
+
pageContainerProps: a,
|
|
903
|
+
pageContentDataTestId: i,
|
|
904
|
+
topBarDataTestId: d,
|
|
905
|
+
navBarDataTestId: c,
|
|
906
|
+
navBarMiddle: g
|
|
909
907
|
}) {
|
|
910
908
|
const {
|
|
911
|
-
navBarOpen:
|
|
912
|
-
setNavBarOpen:
|
|
913
|
-
titleText:
|
|
914
|
-
setTitleText:
|
|
915
|
-
topBarHeight:
|
|
916
|
-
navBarWidthOpen:
|
|
909
|
+
navBarOpen: s,
|
|
910
|
+
setNavBarOpen: l,
|
|
911
|
+
titleText: m,
|
|
912
|
+
setTitleText: h,
|
|
913
|
+
topBarHeight: p,
|
|
914
|
+
navBarWidthOpen: C,
|
|
917
915
|
navBarWidthClosed: b,
|
|
918
|
-
navBarTop:
|
|
919
|
-
} =
|
|
920
|
-
return
|
|
921
|
-
t !== void 0 &&
|
|
922
|
-
}, [t,
|
|
923
|
-
console.log(n), n !== void 0 &&
|
|
924
|
-
}, [n,
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
|
|
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,
|
|
930
928
|
{
|
|
931
|
-
open:
|
|
932
|
-
top:
|
|
933
|
-
middle:
|
|
934
|
-
bottom: /* @__PURE__ */
|
|
935
|
-
widthOpen:
|
|
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" }) }),
|
|
933
|
+
widthOpen: C,
|
|
936
934
|
widthClosed: b,
|
|
937
|
-
offsetTop:
|
|
938
|
-
"data-testid":
|
|
935
|
+
offsetTop: p,
|
|
936
|
+
"data-testid": c
|
|
939
937
|
}
|
|
940
938
|
),
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
"data-testid":
|
|
945
|
-
topBarHeight:
|
|
946
|
-
},
|
|
939
|
+
/* @__PURE__ */ r(
|
|
940
|
+
un,
|
|
941
|
+
x(o({
|
|
942
|
+
"data-testid": i,
|
|
943
|
+
topBarHeight: p
|
|
944
|
+
}, a), {
|
|
947
945
|
children: e
|
|
948
946
|
})
|
|
949
947
|
)
|
|
950
948
|
] })
|
|
951
949
|
] });
|
|
952
950
|
}
|
|
953
|
-
function
|
|
954
|
-
return /* @__PURE__ */
|
|
951
|
+
function Qn(e) {
|
|
952
|
+
return /* @__PURE__ */ r(on, { children: /* @__PURE__ */ r(gn, o({}, e)) });
|
|
955
953
|
}
|
|
956
|
-
const
|
|
954
|
+
const hn = {
|
|
957
955
|
autoHideDuration: 6e3,
|
|
958
956
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
959
957
|
// The default is false. If we prefer timer to continue when window loses
|
|
960
958
|
// focus, change to true
|
|
961
959
|
disableWindowBlurListener: !1
|
|
962
|
-
},
|
|
960
|
+
}, fn = {
|
|
963
961
|
shouldClose: (e, t) => t !== "clickaway"
|
|
964
|
-
},
|
|
962
|
+
}, Ne = {
|
|
965
963
|
message: "",
|
|
966
964
|
severity: "info",
|
|
967
965
|
variant: "standard",
|
|
968
966
|
progressIndicator: void 0
|
|
969
967
|
// Can use 'circular' or 'linear'
|
|
970
|
-
},
|
|
968
|
+
}, $e = 100, ke = 2e3, vn = 2e3, xn = (() => {
|
|
971
969
|
let e = 0;
|
|
972
970
|
return () => (e += 1, e);
|
|
973
|
-
})(),
|
|
971
|
+
})(), mn = {
|
|
974
972
|
borderBottomLeftRadius: "0px",
|
|
975
973
|
borderBottomRightRadius: "0px"
|
|
976
|
-
},
|
|
977
|
-
function
|
|
978
|
-
var
|
|
979
|
-
overrideState: e =
|
|
980
|
-
overrideActions: t =
|
|
981
|
-
shouldClose: n =
|
|
982
|
-
children:
|
|
983
|
-
} =
|
|
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, [
|
|
984
982
|
"overrideState",
|
|
985
983
|
"overrideActions",
|
|
986
984
|
"shouldClose",
|
|
987
985
|
"children"
|
|
988
986
|
]);
|
|
989
|
-
var
|
|
990
|
-
const [{ open:
|
|
991
|
-
|
|
992
|
-
}, []),
|
|
993
|
-
|
|
994
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
995
|
-
),
|
|
996
|
-
const
|
|
997
|
-
key:
|
|
998
|
-
}),
|
|
999
|
-
return
|
|
1000
|
-
}, []), b = (
|
|
1001
|
-
const
|
|
1002
|
-
if (
|
|
1003
|
-
return
|
|
1004
|
-
},
|
|
1005
|
-
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 });
|
|
1006
1004
|
}, P = () => {
|
|
1007
|
-
},
|
|
1008
|
-
|
|
1009
|
-
}, O = (
|
|
1010
|
-
"autoHideDuration" in O && (
|
|
1011
|
-
const
|
|
1012
|
-
open:
|
|
1013
|
-
setOpen:
|
|
1014
|
-
enqueueNotification:
|
|
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,
|
|
1012
|
+
enqueueNotification: C,
|
|
1015
1013
|
enqueueSuccessNotification: b,
|
|
1016
|
-
enqueueInfoNotification:
|
|
1017
|
-
enqueueWarningNotification:
|
|
1018
|
-
enqueueErrorNotification:
|
|
1019
|
-
removeNotification:
|
|
1014
|
+
enqueueInfoNotification: w,
|
|
1015
|
+
enqueueWarningNotification: A,
|
|
1016
|
+
enqueueErrorNotification: I,
|
|
1017
|
+
removeNotification: ne
|
|
1020
1018
|
}, e), t);
|
|
1021
|
-
return /* @__PURE__ */
|
|
1022
|
-
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
open:
|
|
1027
|
-
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,
|
|
1028
1026
|
TransitionProps: {
|
|
1029
|
-
onExited:
|
|
1027
|
+
onExited: _,
|
|
1030
1028
|
onExit: P
|
|
1031
1029
|
},
|
|
1032
|
-
sx: { zIndex:
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
|
|
1030
|
+
sx: { zIndex: vn },
|
|
1031
|
+
children: /* @__PURE__ */ u("div", { children: [
|
|
1032
|
+
/* @__PURE__ */ r(
|
|
1033
|
+
xt,
|
|
1036
1034
|
{
|
|
1037
|
-
onClose: (
|
|
1035
|
+
onClose: (f) => F(f, "closeAlert"),
|
|
1038
1036
|
severity: O.severity,
|
|
1039
1037
|
variant: "filled",
|
|
1040
|
-
icon: O.progressIndicator === "circular" ? /* @__PURE__ */
|
|
1041
|
-
style: O.progressIndicator === "linear" ?
|
|
1038
|
+
icon: O.progressIndicator === "circular" ? /* @__PURE__ */ r(Pe, { size: "1em" }) : void 0,
|
|
1039
|
+
style: O.progressIndicator === "linear" ? mn : void 0,
|
|
1042
1040
|
children: O.message
|
|
1043
1041
|
}
|
|
1044
1042
|
),
|
|
1045
|
-
O.progressIndicator === "linear" && /* @__PURE__ */
|
|
1043
|
+
O.progressIndicator === "linear" && /* @__PURE__ */ r(mt, { color: "primary" })
|
|
1046
1044
|
] })
|
|
1047
1045
|
})
|
|
1048
1046
|
)
|
|
1049
1047
|
] });
|
|
1050
1048
|
}
|
|
1051
|
-
function
|
|
1052
|
-
const e =
|
|
1049
|
+
function Bn() {
|
|
1050
|
+
const e = ge(Je);
|
|
1053
1051
|
if (e === null)
|
|
1054
|
-
throw new
|
|
1052
|
+
throw new te("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1055
1053
|
return e;
|
|
1056
1054
|
}
|
|
1057
|
-
const
|
|
1058
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children:
|
|
1059
|
-
),
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
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 = {
|
|
1063
1070
|
act: "ACT",
|
|
1064
1071
|
nsw: "NSW",
|
|
1065
1072
|
nt: "NT",
|
|
@@ -1071,84 +1078,243 @@ const Qn = ke(
|
|
|
1071
1078
|
ag: "AG",
|
|
1072
1079
|
fedmps: "Fedmps",
|
|
1073
1080
|
"": ""
|
|
1074
|
-
},
|
|
1081
|
+
}, yn = (e) => {
|
|
1075
1082
|
var t;
|
|
1076
|
-
return e === null ? "N/A" : (t =
|
|
1077
|
-
},
|
|
1083
|
+
return e === null ? "N/A" : (t = On[e]) != null ? t : "";
|
|
1084
|
+
}, Zn = ({
|
|
1078
1085
|
isLoading: e,
|
|
1079
1086
|
isOpen: t,
|
|
1080
1087
|
onClose: n,
|
|
1081
|
-
domainOptions:
|
|
1088
|
+
domainOptions: a,
|
|
1089
|
+
applicationName: i,
|
|
1090
|
+
handleLogout: d
|
|
1082
1091
|
}) => {
|
|
1083
|
-
const [
|
|
1084
|
-
|
|
1085
|
-
|
|
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,
|
|
1086
1100
|
{
|
|
1087
1101
|
isOpen: t,
|
|
1088
1102
|
dialogTitle: "Select an organisation",
|
|
1089
1103
|
primaryButton: {
|
|
1090
1104
|
text: "Confirm",
|
|
1091
|
-
onClick:
|
|
1092
|
-
|
|
1093
|
-
|
|
1105
|
+
onClick: C,
|
|
1106
|
+
disabled: !s || h || p
|
|
1107
|
+
},
|
|
1108
|
+
secondaryButton: {
|
|
1109
|
+
text: !s || h || p ? "Logout" : "Cancel",
|
|
1110
|
+
onClick: b
|
|
1094
1111
|
},
|
|
1095
1112
|
onClose: n,
|
|
1096
1113
|
children: [
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
|
|
1099
|
-
|
|
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,
|
|
1100
1121
|
{
|
|
1101
1122
|
loading: e,
|
|
1102
1123
|
multiple: !1,
|
|
1103
1124
|
disableClearable: !1,
|
|
1104
|
-
value:
|
|
1105
|
-
onChange: (
|
|
1106
|
-
getOptionLabel:
|
|
1107
|
-
options:
|
|
1108
|
-
renderInput: (
|
|
1109
|
-
|
|
1110
|
-
|
|
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), {
|
|
1111
1132
|
variant: "filled",
|
|
1112
1133
|
label: "Select organisation",
|
|
1113
|
-
InputProps:
|
|
1114
|
-
endAdornment: /* @__PURE__ */
|
|
1115
|
-
e ? /* @__PURE__ */
|
|
1116
|
-
|
|
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
|
|
1117
1138
|
] })
|
|
1118
1139
|
})
|
|
1119
1140
|
})
|
|
1120
1141
|
)
|
|
1121
1142
|
}
|
|
1122
|
-
)
|
|
1143
|
+
),
|
|
1144
|
+
w && /* @__PURE__ */ r(Tt, { error: !0, children: w })
|
|
1123
1145
|
]
|
|
1124
1146
|
}
|
|
1125
1147
|
);
|
|
1126
|
-
}
|
|
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
|
+
});
|
|
1127
1291
|
export {
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
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
|
|
1153
1319
|
};
|
|
1154
1320
|
//# sourceMappingURL=index.js.map
|