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