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