@australiangreens/ag-internal-components 0.0.72 → 0.0.74
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/components/FetchAutocomplete/FetchAutocomplete.d.ts +12 -5
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +12 -7
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +723 -733
- package/dist/esm/index.js.map +1 -1
- package/dist/testing/wrappers.d.ts +1 -0
- package/dist/testing/wrappers.d.ts.map +1 -1
- package/package.json +24 -20
- package/dist/.gitignore +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,87 +1,88 @@
|
|
|
1
1
|
var Ot = Object.defineProperty, $t = Object.defineProperties;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
var Tt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Z = Object.getOwnPropertySymbols;
|
|
4
|
+
var Oe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ce = (e, t, n) => t in e ? Ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
Oe.call(t, n) && ce(e, n, t[n]);
|
|
8
|
+
if (Z)
|
|
9
|
+
for (var n of Z(t))
|
|
10
|
+
$e.call(t, n) && ce(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, A = (e, t) => $t(e, Tt(t));
|
|
13
|
+
var Te = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var
|
|
19
|
-
t.indexOf(
|
|
15
|
+
for (var i in e)
|
|
16
|
+
Oe.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
|
+
if (e != null && Z)
|
|
18
|
+
for (var i of Z(e))
|
|
19
|
+
t.indexOf(i) < 0 && $e.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
22
|
+
var ye = (e, t, n) => (ce(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
+
var V = (e, t, n) => new Promise((i, a) => {
|
|
24
|
+
var s = (c) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
27
|
-
} catch (
|
|
28
|
-
|
|
26
|
+
p(n.next(c));
|
|
27
|
+
} catch (d) {
|
|
28
|
+
a(d);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, l = (c) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
|
|
32
|
+
p(n.throw(c));
|
|
33
|
+
} catch (d) {
|
|
34
|
+
a(d);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, p = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(s, l);
|
|
37
|
+
p((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as h, Fragment as _, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as E, createContext as Xe, useCallback as ne, useContext as Qe, createElement as ge, useEffect as Ee, useRef as de } from "react";
|
|
41
|
+
import { Typography as F, Button as fe, Paper as je, Box as I, Drawer as Ce, Dialog as yt, DialogTitle as Et, DialogContent as Ft, DialogActions as Nt, Autocomplete as ve, TextField as xe, CircularProgress as we, Chip as Pt, Tooltip as Bt, Stack as Lt, styled as be, IconButton as Q, Container as Ke, useTheme as ie, useMediaQuery as Mt, Collapse as _t, Avatar as Fe, Fade as Ht, Skeleton as Ne, Toolbar as Rt, Divider as Pe, CssBaseline as Wt, Snackbar as zt, Alert as Gt, LinearProgress as Vt, FormHelperText as Ut } from "@mui/material";
|
|
42
42
|
import qt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as H, createTheme as Je, alpha as pe } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Xt } from "@australiangreens/ag-error";
|
|
45
|
-
import { createHelper as
|
|
46
|
-
import
|
|
47
|
-
import { Cancel as
|
|
48
|
-
import Jt from "autosuggest-highlight/
|
|
49
|
-
import Yt from "autosuggest-highlight/
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ o(
|
|
45
|
+
import { createHelper as K } from "souvlaki";
|
|
46
|
+
import Ye from "@mui/material/List";
|
|
47
|
+
import { Cancel as Qt, ArrowDropDown as jt, ArrowForward as Ze, ArrowBack as et, ViewHeadline as Kt } from "@mui/icons-material";
|
|
48
|
+
import Jt from "autosuggest-highlight/match";
|
|
49
|
+
import Yt from "autosuggest-highlight/parse";
|
|
50
|
+
import { useQuery as Zt, QueryClient as en, QueryClientProvider as tn } from "@tanstack/react-query";
|
|
51
|
+
import { atom as B, useSetAtom as tt, useAtomValue as Be, useAtom as U, getDefaultStore as nn, Provider as nt } from "jotai";
|
|
52
|
+
import { useHydrateAtoms as ot } from "jotai/utils";
|
|
53
|
+
function go({ text: e }) {
|
|
54
|
+
const [t, n] = E(0);
|
|
55
|
+
return /* @__PURE__ */ h(_, { children: [
|
|
56
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
57
|
+
/* @__PURE__ */ o(F, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
57
58
|
/* @__PURE__ */ o(
|
|
58
|
-
|
|
59
|
+
fe,
|
|
59
60
|
{
|
|
60
61
|
variant: "outlined",
|
|
61
|
-
onClick: () => n((
|
|
62
|
+
onClick: () => n((i) => i + 1),
|
|
62
63
|
"aria-label": "Increment",
|
|
63
64
|
children: "Hello I am a button"
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ h("p", { children: [
|
|
67
68
|
"This is some text: ",
|
|
68
69
|
/* @__PURE__ */ o("span", { children: e })
|
|
69
70
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ h(je, { children: [
|
|
71
72
|
"This number will incremember when button pressed: ",
|
|
72
73
|
t
|
|
73
74
|
] })
|
|
74
75
|
] });
|
|
75
76
|
}
|
|
76
|
-
const
|
|
77
|
-
root: `${
|
|
78
|
-
menuButton: `${
|
|
79
|
-
hide: `${
|
|
80
|
-
content: `${
|
|
81
|
-
userInfoHolder: `${
|
|
82
|
-
settings: `${
|
|
83
|
-
pieChartIcon: `${
|
|
84
|
-
},
|
|
77
|
+
const it = 330, rt = 73, z = "Navbar", q = {
|
|
78
|
+
root: `${z}-root`,
|
|
79
|
+
menuButton: `${z}-menuButton`,
|
|
80
|
+
hide: `${z}-hide`,
|
|
81
|
+
content: `${z}-content`,
|
|
82
|
+
userInfoHolder: `${z}-userInfoHolder`,
|
|
83
|
+
settings: `${z}-settings`,
|
|
84
|
+
pieChartIcon: `${z}-pieChartIcon`
|
|
85
|
+
}, on = H(I, {
|
|
85
86
|
name: "NavBar"
|
|
86
87
|
})(({ theme: e }) => ({
|
|
87
88
|
[`&.${q.root}`]: {
|
|
@@ -102,7 +103,7 @@ const lt = 330, ct = 73, G = "Navbar", q = {
|
|
|
102
103
|
marginTop: "64px",
|
|
103
104
|
marginBottom: "16px"
|
|
104
105
|
}
|
|
105
|
-
})),
|
|
106
|
+
})), at = () => ({
|
|
106
107
|
position: "absolute",
|
|
107
108
|
height: "100%",
|
|
108
109
|
overflowX: "hidden",
|
|
@@ -110,51 +111,51 @@ const lt = 330, ct = 73, G = "Navbar", q = {
|
|
|
110
111
|
color: "white",
|
|
111
112
|
backgroundColor: "black"
|
|
112
113
|
// backgroundColor: '#e8e8e8',
|
|
113
|
-
}),
|
|
114
|
-
width:
|
|
115
|
-
},
|
|
116
|
-
width:
|
|
117
|
-
},
|
|
114
|
+
}), rn = () => r({
|
|
115
|
+
width: it
|
|
116
|
+
}, at()), an = () => r({
|
|
117
|
+
width: rt
|
|
118
|
+
}, at()), sn = H(Ce, {
|
|
118
119
|
shouldForwardProp: (e) => e !== "open"
|
|
119
|
-
})(({ theme: e, open: t }) =>
|
|
120
|
-
width: t ?
|
|
120
|
+
})(({ theme: e, open: t }) => r(r({
|
|
121
|
+
width: t ? it : rt,
|
|
121
122
|
flexShrink: 0,
|
|
122
123
|
whiteSpace: "nowrap",
|
|
123
124
|
boxSizing: "border-box",
|
|
124
125
|
zIndex: e.zIndex.drawer + 100
|
|
125
126
|
}, t && {
|
|
126
|
-
"& .MuiDrawer-paper":
|
|
127
|
+
"& .MuiDrawer-paper": rn()
|
|
127
128
|
}), !t && {
|
|
128
|
-
"& .MuiDrawer-paper":
|
|
129
|
+
"& .MuiDrawer-paper": an()
|
|
129
130
|
}));
|
|
130
|
-
class
|
|
131
|
+
class Ae extends Xt {
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
overrideState: e =
|
|
135
|
-
overrideActions: t =
|
|
133
|
+
ye(Ae, "errorName", "ContextError");
|
|
134
|
+
const st = Xe(null), ln = {}, cn = {}, dn = ({
|
|
135
|
+
overrideState: e = ln,
|
|
136
|
+
overrideActions: t = cn,
|
|
136
137
|
children: n
|
|
137
138
|
}) => {
|
|
138
|
-
const [{ open:
|
|
139
|
-
|
|
140
|
-
}, []),
|
|
141
|
-
|
|
142
|
-
}, []),
|
|
143
|
-
open:
|
|
144
|
-
setOpen:
|
|
145
|
-
toggleOpen:
|
|
139
|
+
const [{ open: i }, a] = E({ open: !0 }), s = ne((c) => {
|
|
140
|
+
a({ open: c });
|
|
141
|
+
}, []), l = ne(() => {
|
|
142
|
+
a((c) => A(r({}, c), { open: !c.open }));
|
|
143
|
+
}, []), p = r(r({
|
|
144
|
+
open: i,
|
|
145
|
+
setOpen: s,
|
|
146
|
+
toggleOpen: l
|
|
146
147
|
}, e), t);
|
|
147
|
-
return /* @__PURE__ */ o(
|
|
148
|
-
},
|
|
149
|
-
const e =
|
|
148
|
+
return /* @__PURE__ */ o(st.Provider, { value: p, children: n });
|
|
149
|
+
}, pn = () => {
|
|
150
|
+
const e = Qe(st);
|
|
150
151
|
if (e === null)
|
|
151
|
-
throw new
|
|
152
|
+
throw new Ae("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
152
153
|
return e;
|
|
153
|
-
},
|
|
154
|
+
}, un = (e = {}) => r({
|
|
154
155
|
open: !0
|
|
155
|
-
}, e),
|
|
156
|
-
(e =
|
|
157
|
-
),
|
|
156
|
+
}, e), fo = K(
|
|
157
|
+
(e = un(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(dn, { overrideState: e, overrideActions: t, children: n })
|
|
158
|
+
), Le = 7, mo = H(Ye)(({ theme: e }) => ({
|
|
158
159
|
backgroundColor: "black",
|
|
159
160
|
color: "white",
|
|
160
161
|
"& .MuiListItem-root": {
|
|
@@ -163,7 +164,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
163
164
|
"& .MuiListItemButton-root": {
|
|
164
165
|
" .MuiListItemIcon-root": {
|
|
165
166
|
color: "white",
|
|
166
|
-
padding: `${
|
|
167
|
+
padding: `${Le}px`
|
|
167
168
|
},
|
|
168
169
|
// Focus state
|
|
169
170
|
"&.Mui-focusVisible": {
|
|
@@ -174,7 +175,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
174
175
|
borderLeftStyle: "solid",
|
|
175
176
|
borderLeftWidth: "7px",
|
|
176
177
|
borderLeftColor: e.palette.primary.main,
|
|
177
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
178
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Le}px)`
|
|
178
179
|
},
|
|
179
180
|
// Hover state
|
|
180
181
|
"&:hover": {
|
|
@@ -192,7 +193,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
192
193
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
193
194
|
// },
|
|
194
195
|
}
|
|
195
|
-
})),
|
|
196
|
+
})), Me = 7, Co = H(Ye)(({ theme: e }) => ({
|
|
196
197
|
backgroundColor: "#e8e8e8",
|
|
197
198
|
color: "inherit",
|
|
198
199
|
"& .MuiListItem-root": {
|
|
@@ -201,7 +202,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
201
202
|
"& .MuiListItemButton-root": {
|
|
202
203
|
" .MuiListItemIcon-root": {
|
|
203
204
|
color: "inherit",
|
|
204
|
-
padding: `${
|
|
205
|
+
padding: `${Me}px`
|
|
205
206
|
},
|
|
206
207
|
// Focus state
|
|
207
208
|
"&.Mui-focusVisible": {
|
|
@@ -212,7 +213,7 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
212
213
|
borderLeftStyle: "solid",
|
|
213
214
|
borderLeftWidth: "7px",
|
|
214
215
|
borderLeftColor: e.palette.primary.main,
|
|
215
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
216
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
|
|
216
217
|
},
|
|
217
218
|
// Hover state
|
|
218
219
|
"&:hover": {
|
|
@@ -231,15 +232,15 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
|
231
232
|
// },
|
|
232
233
|
}
|
|
233
234
|
}));
|
|
234
|
-
function
|
|
235
|
+
function vo({
|
|
235
236
|
"data-testid": e,
|
|
236
237
|
children: t
|
|
237
238
|
}) {
|
|
238
|
-
const { open: n } =
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
const { open: n } = pn();
|
|
240
|
+
return /* @__PURE__ */ h(on, { className: q.root, "data-testid": e, children: [
|
|
240
241
|
/* @__PURE__ */ o(qt, {}),
|
|
241
242
|
/* @__PURE__ */ o(
|
|
242
|
-
|
|
243
|
+
sn,
|
|
243
244
|
{
|
|
244
245
|
variant: "permanent",
|
|
245
246
|
anchor: "left",
|
|
@@ -250,193 +251,183 @@ function go({
|
|
|
250
251
|
)
|
|
251
252
|
] });
|
|
252
253
|
}
|
|
253
|
-
const
|
|
254
|
+
const hn = ({
|
|
254
255
|
isOpen: e,
|
|
255
256
|
dialogTitle: t,
|
|
256
257
|
children: n,
|
|
257
|
-
maxWidth:
|
|
258
|
-
primaryButton:
|
|
259
|
-
secondaryButton:
|
|
260
|
-
onClose:
|
|
261
|
-
sx:
|
|
262
|
-
"data-testid":
|
|
258
|
+
maxWidth: i,
|
|
259
|
+
primaryButton: a,
|
|
260
|
+
secondaryButton: s,
|
|
261
|
+
onClose: l,
|
|
262
|
+
sx: p,
|
|
263
|
+
"data-testid": c
|
|
263
264
|
}) => {
|
|
264
|
-
var
|
|
265
|
-
const [
|
|
266
|
-
return /* @__PURE__ */
|
|
267
|
-
|
|
265
|
+
var w, b;
|
|
266
|
+
const [d, x] = E(!1);
|
|
267
|
+
return /* @__PURE__ */ h(
|
|
268
|
+
yt,
|
|
268
269
|
{
|
|
269
270
|
open: e,
|
|
270
|
-
onClose: () =>
|
|
271
|
-
|
|
271
|
+
onClose: () => V(void 0, null, function* () {
|
|
272
|
+
d || (s != null && s.onClick ? yield s.onClick() : l());
|
|
272
273
|
}),
|
|
273
274
|
fullWidth: !0,
|
|
274
|
-
maxWidth:
|
|
275
|
-
"data-testid":
|
|
276
|
-
sx:
|
|
275
|
+
maxWidth: i != null ? i : "xs",
|
|
276
|
+
"data-testid": c,
|
|
277
|
+
sx: p,
|
|
277
278
|
children: [
|
|
278
|
-
/* @__PURE__ */ o(
|
|
279
|
-
/* @__PURE__ */ o(
|
|
280
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ o(Et, { children: t }),
|
|
280
|
+
/* @__PURE__ */ o(Ft, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
281
|
+
/* @__PURE__ */ h(Nt, { children: [
|
|
281
282
|
/* @__PURE__ */ o(
|
|
282
|
-
|
|
283
|
+
fe,
|
|
283
284
|
{
|
|
284
|
-
onClick: (
|
|
285
|
-
"data-testid":
|
|
286
|
-
disabled: (
|
|
287
|
-
color:
|
|
288
|
-
children: (
|
|
285
|
+
onClick: (w = s == null ? void 0 : s.onClick) != null ? w : l,
|
|
286
|
+
"data-testid": s == null ? void 0 : s.testId,
|
|
287
|
+
disabled: (s == null ? void 0 : s.disabled) || d,
|
|
288
|
+
color: s == null ? void 0 : s.buttonColor,
|
|
289
|
+
children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
|
|
289
290
|
}
|
|
290
291
|
),
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
a && /* @__PURE__ */ o(
|
|
293
|
+
fe,
|
|
293
294
|
{
|
|
294
|
-
onClick: () =>
|
|
295
|
-
var
|
|
296
|
-
|
|
295
|
+
onClick: () => V(void 0, null, function* () {
|
|
296
|
+
var m;
|
|
297
|
+
x(!0), yield (m = a.onClick) == null ? void 0 : m.call(a), x(!1);
|
|
297
298
|
}),
|
|
298
|
-
"data-testid":
|
|
299
|
-
disabled:
|
|
300
|
-
color:
|
|
301
|
-
children:
|
|
299
|
+
"data-testid": a.testId,
|
|
300
|
+
disabled: a.disabled || d,
|
|
301
|
+
color: a == null ? void 0 : a.buttonColor,
|
|
302
|
+
children: a.text
|
|
302
303
|
}
|
|
303
304
|
)
|
|
304
305
|
] })
|
|
305
306
|
]
|
|
306
307
|
}
|
|
307
308
|
);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
}, lt = ({
|
|
310
|
+
minLength: e,
|
|
311
|
+
preLoadedOptions: t,
|
|
312
|
+
lookup: n,
|
|
313
|
+
label: i,
|
|
314
|
+
inputValue: a
|
|
315
|
+
}) => Zt({
|
|
316
|
+
queryFn: () => e && a.length < e ? t != null ? t : [] : t ? t.filter(
|
|
317
|
+
(s) => s.label.toLowerCase().includes(a.toLowerCase())
|
|
318
|
+
) : n(a),
|
|
319
|
+
queryKey: ["autocomplete", i, a]
|
|
320
|
+
});
|
|
321
|
+
function xo({
|
|
322
|
+
lookup: e = () => V(this, null, function* () {
|
|
311
323
|
}),
|
|
312
324
|
enableHighlighting: t = !0,
|
|
313
325
|
onChange: n,
|
|
314
|
-
minLength:
|
|
315
|
-
label:
|
|
316
|
-
value:
|
|
317
|
-
"data-testid":
|
|
318
|
-
sx:
|
|
319
|
-
textFieldColor:
|
|
320
|
-
textFieldVariant:
|
|
321
|
-
loadingText:
|
|
322
|
-
noOptionsText:
|
|
323
|
-
popupIcon:
|
|
324
|
-
error:
|
|
325
|
-
helperText:
|
|
326
|
-
preLoadedOptions:
|
|
327
|
-
disablePortal:
|
|
326
|
+
minLength: i = 0,
|
|
327
|
+
label: a,
|
|
328
|
+
value: s,
|
|
329
|
+
"data-testid": l,
|
|
330
|
+
sx: p,
|
|
331
|
+
textFieldColor: c,
|
|
332
|
+
textFieldVariant: d = "filled",
|
|
333
|
+
loadingText: x = "Loading...",
|
|
334
|
+
noOptionsText: w = "No options",
|
|
335
|
+
popupIcon: b = /* @__PURE__ */ o(jt, {}),
|
|
336
|
+
error: m = !1,
|
|
337
|
+
helperText: D = "",
|
|
338
|
+
preLoadedOptions: k = void 0,
|
|
339
|
+
disablePortal: O = !1
|
|
328
340
|
}) {
|
|
329
|
-
const [g,
|
|
330
|
-
const
|
|
331
|
-
n(
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
} catch (x) {
|
|
341
|
-
if (x instanceof Error && x.name === "AbortError")
|
|
342
|
-
console.debug("Previous lookup request was cancelled");
|
|
343
|
-
else
|
|
344
|
-
throw x;
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
if (g !== "")
|
|
348
|
-
return (!r || g.length >= r) && !v ? (P(!0), c()) : P(!1), function() {
|
|
349
|
-
a && a.abort();
|
|
350
|
-
};
|
|
351
|
-
}, [g, e, r, v]), re(() => {
|
|
352
|
-
!y && !v && F([]), !y && v && F(v);
|
|
353
|
-
}, [y, v]);
|
|
354
|
-
const W = Et(() => v ? (a, c) => a.filter(
|
|
355
|
-
(x) => x.label.toLowerCase().includes(c.inputValue.toLowerCase())
|
|
356
|
-
) : (a) => a, [v]);
|
|
357
|
-
return /* @__PURE__ */ f("div", { "data-testid": d, children: [
|
|
341
|
+
const [g, S] = E(""), R = (u, f) => {
|
|
342
|
+
const y = s.filter((P) => P.id !== f);
|
|
343
|
+
n(y, "delete", u);
|
|
344
|
+
}, { data: N, isLoading: L } = lt({
|
|
345
|
+
inputValue: g,
|
|
346
|
+
label: a,
|
|
347
|
+
lookup: e,
|
|
348
|
+
minLength: i,
|
|
349
|
+
preLoadedOptions: k
|
|
350
|
+
}), $ = g.length >= i;
|
|
351
|
+
return /* @__PURE__ */ h("div", { "data-testid": l, children: [
|
|
358
352
|
/* @__PURE__ */ o(
|
|
359
|
-
|
|
353
|
+
ve,
|
|
360
354
|
{
|
|
361
|
-
sx:
|
|
362
|
-
"data-testid":
|
|
363
|
-
disablePortal:
|
|
355
|
+
sx: p,
|
|
356
|
+
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
357
|
+
disablePortal: O,
|
|
364
358
|
multiple: !0,
|
|
365
|
-
getOptionLabel: (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
options: [...l, ..._],
|
|
359
|
+
getOptionLabel: (u) => typeof u == "string" ? u : u.label,
|
|
360
|
+
loading: $ ? L : !1,
|
|
361
|
+
options: [...s, ...N != null ? N : []],
|
|
369
362
|
filterSelectedOptions: !0,
|
|
370
363
|
includeInputInList: !0,
|
|
371
|
-
value:
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
onChange: (a, c, x) => {
|
|
375
|
-
n(c, x, a);
|
|
364
|
+
value: s,
|
|
365
|
+
onChange: (u, f, y) => {
|
|
366
|
+
n(f, y, u);
|
|
376
367
|
},
|
|
377
|
-
onInputChange: (
|
|
378
|
-
noOptionsText:
|
|
379
|
-
loadingText:
|
|
380
|
-
popupIcon:
|
|
381
|
-
renderInput: (
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
label:
|
|
368
|
+
onInputChange: (u, f) => S(f),
|
|
369
|
+
noOptionsText: $ ? w : "Start typing to search",
|
|
370
|
+
loadingText: x,
|
|
371
|
+
popupIcon: b,
|
|
372
|
+
renderInput: (u) => /* @__PURE__ */ o(
|
|
373
|
+
xe,
|
|
374
|
+
A(r({}, u), {
|
|
375
|
+
label: a,
|
|
385
376
|
fullWidth: !0,
|
|
386
|
-
variant:
|
|
387
|
-
error:
|
|
388
|
-
helperText:
|
|
389
|
-
InputProps:
|
|
390
|
-
endAdornment: /* @__PURE__ */
|
|
391
|
-
|
|
392
|
-
|
|
377
|
+
variant: d,
|
|
378
|
+
error: m,
|
|
379
|
+
helperText: D,
|
|
380
|
+
InputProps: A(r({}, u.InputProps), {
|
|
381
|
+
endAdornment: /* @__PURE__ */ h(_, { children: [
|
|
382
|
+
L ? /* @__PURE__ */ o(we, { color: "inherit", size: 20 }) : null,
|
|
383
|
+
u.InputProps.endAdornment
|
|
393
384
|
] })
|
|
394
385
|
}),
|
|
395
|
-
"data-testid":
|
|
396
|
-
onKeyDown: (
|
|
397
|
-
(
|
|
386
|
+
"data-testid": l ? `${l}:Autocomplete:TextField` : void 0,
|
|
387
|
+
onKeyDown: (f) => {
|
|
388
|
+
(f.key === "Backspace" || f.key === "Delete") && f.stopPropagation();
|
|
398
389
|
},
|
|
399
|
-
color:
|
|
390
|
+
color: c
|
|
400
391
|
})
|
|
401
392
|
),
|
|
402
393
|
renderTags: () => null,
|
|
403
|
-
isOptionEqualToValue: (
|
|
404
|
-
renderOption: (
|
|
394
|
+
isOptionEqualToValue: (u, f) => u.id === f.id,
|
|
395
|
+
renderOption: (u, f, y) => {
|
|
405
396
|
if (t) {
|
|
406
|
-
const
|
|
397
|
+
const P = Jt(f.label, y.inputValue, {
|
|
407
398
|
insideWords: !0,
|
|
408
399
|
findAllOccurrences: !0
|
|
409
|
-
}),
|
|
410
|
-
return /* @__PURE__ */
|
|
400
|
+
}), v = Yt(f.label, P);
|
|
401
|
+
return /* @__PURE__ */ ge(
|
|
411
402
|
"li",
|
|
412
|
-
|
|
413
|
-
key:
|
|
414
|
-
"data-testid":
|
|
403
|
+
A(r({}, u), {
|
|
404
|
+
key: f.id,
|
|
405
|
+
"data-testid": l ? `${l}:Autocomplete:option(${f.id.toString()})` : void 0
|
|
415
406
|
}),
|
|
416
|
-
/* @__PURE__ */ o("div", { children:
|
|
407
|
+
/* @__PURE__ */ o("div", { children: v.map((C, M) => /* @__PURE__ */ o(
|
|
417
408
|
"span",
|
|
418
409
|
{
|
|
419
410
|
style: {
|
|
420
|
-
fontWeight:
|
|
411
|
+
fontWeight: C.highlight ? 700 : 400
|
|
421
412
|
},
|
|
422
|
-
children:
|
|
413
|
+
children: C.text
|
|
423
414
|
},
|
|
424
|
-
|
|
415
|
+
M
|
|
425
416
|
)) })
|
|
426
417
|
);
|
|
427
418
|
} else
|
|
428
|
-
return /* @__PURE__ */
|
|
419
|
+
return /* @__PURE__ */ ge(
|
|
429
420
|
"li",
|
|
430
|
-
|
|
431
|
-
key:
|
|
432
|
-
"data-testid":
|
|
421
|
+
A(r({}, u), {
|
|
422
|
+
key: f.id,
|
|
423
|
+
"data-testid": l ? `${l}:option(${f.id.toString()})` : void 0
|
|
433
424
|
}),
|
|
434
|
-
|
|
425
|
+
f.label
|
|
435
426
|
);
|
|
436
427
|
}
|
|
437
428
|
}
|
|
438
429
|
),
|
|
439
|
-
|
|
430
|
+
s.length > 0 && /* @__PURE__ */ o(I, { children: s.map((u) => /* @__PURE__ */ o(
|
|
440
431
|
Pt,
|
|
441
432
|
{
|
|
442
433
|
sx: {
|
|
@@ -447,7 +438,7 @@ function fo({
|
|
|
447
438
|
label: /* @__PURE__ */ o(
|
|
448
439
|
Bt,
|
|
449
440
|
{
|
|
450
|
-
title:
|
|
441
|
+
title: u.tooltipContent || "",
|
|
451
442
|
placement: "bottom-start",
|
|
452
443
|
PopperProps: {
|
|
453
444
|
modifiers: [
|
|
@@ -459,114 +450,108 @@ function fo({
|
|
|
459
450
|
}
|
|
460
451
|
]
|
|
461
452
|
},
|
|
462
|
-
children: /* @__PURE__ */ o(
|
|
453
|
+
children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: u.chipLabel ? u.chipLabel : u.label })
|
|
463
454
|
}
|
|
464
455
|
),
|
|
465
|
-
"data-testid":
|
|
466
|
-
onDelete: (
|
|
456
|
+
"data-testid": l ? `${l}:Chip(${u.id.toString()})` : void 0,
|
|
457
|
+
onDelete: (f) => R(f, u.id),
|
|
467
458
|
deleteIcon: /* @__PURE__ */ o(
|
|
468
|
-
|
|
459
|
+
Qt,
|
|
469
460
|
{
|
|
470
|
-
"data-testid":
|
|
461
|
+
"data-testid": l ? `${l}:Chip(${u.id.toString()}):deleteIcon` : void 0
|
|
471
462
|
}
|
|
472
463
|
)
|
|
473
464
|
},
|
|
474
|
-
|
|
465
|
+
u.id
|
|
475
466
|
)) })
|
|
476
467
|
] });
|
|
477
468
|
}
|
|
478
|
-
const
|
|
469
|
+
const wo = ({
|
|
479
470
|
lookup: e,
|
|
480
471
|
onChange: t,
|
|
481
472
|
label: n,
|
|
482
|
-
value:
|
|
483
|
-
sx:
|
|
484
|
-
textFieldColor:
|
|
485
|
-
textFieldVariant:
|
|
486
|
-
"data-testid":
|
|
487
|
-
noOptionsText:
|
|
488
|
-
minLength:
|
|
489
|
-
disablePortal:
|
|
473
|
+
value: i,
|
|
474
|
+
sx: a,
|
|
475
|
+
textFieldColor: s,
|
|
476
|
+
textFieldVariant: l = "filled",
|
|
477
|
+
"data-testid": p,
|
|
478
|
+
noOptionsText: c = "No options",
|
|
479
|
+
minLength: d = 3,
|
|
480
|
+
disablePortal: x = !1,
|
|
481
|
+
preLoadedOptions: w
|
|
490
482
|
}) => {
|
|
491
|
-
const [b,
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
console.debug("Previous lookup request was cancelled");
|
|
501
|
-
else
|
|
502
|
-
throw m;
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
return /* @__PURE__ */ o("div", { "data-testid": h, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
506
|
-
Se,
|
|
483
|
+
const [b, m] = E(""), { data: D, isLoading: k } = lt({
|
|
484
|
+
inputValue: b,
|
|
485
|
+
label: n,
|
|
486
|
+
lookup: e,
|
|
487
|
+
minLength: d != null ? d : 0,
|
|
488
|
+
preLoadedOptions: w
|
|
489
|
+
}), O = b.length >= d;
|
|
490
|
+
return /* @__PURE__ */ o("div", { "data-testid": p, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
491
|
+
ve,
|
|
507
492
|
{
|
|
508
|
-
sx:
|
|
509
|
-
"data-testid":
|
|
510
|
-
loading:
|
|
511
|
-
options:
|
|
512
|
-
onChange: (g,
|
|
513
|
-
t(g,
|
|
493
|
+
sx: a,
|
|
494
|
+
"data-testid": p ? `${p}:Autocomplete` : void 0,
|
|
495
|
+
loading: O ? k : !1,
|
|
496
|
+
options: D != null ? D : [],
|
|
497
|
+
onChange: (g, S) => {
|
|
498
|
+
t(g, S);
|
|
514
499
|
},
|
|
515
|
-
disablePortal:
|
|
500
|
+
disablePortal: x,
|
|
516
501
|
filterOptions: (g) => g,
|
|
517
|
-
value:
|
|
518
|
-
noOptionsText:
|
|
502
|
+
value: i,
|
|
503
|
+
noOptionsText: O ? c : "Start typing to search",
|
|
519
504
|
getOptionLabel: (g) => g.label,
|
|
520
505
|
renderInput: (g) => /* @__PURE__ */ o(
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
"data-testid":
|
|
506
|
+
xe,
|
|
507
|
+
A(r({
|
|
508
|
+
"data-testid": p ? `${p}:Autocomplete:TextField` : void 0
|
|
524
509
|
}, g), {
|
|
525
|
-
variant:
|
|
510
|
+
variant: l,
|
|
526
511
|
label: n,
|
|
527
|
-
color:
|
|
512
|
+
color: s
|
|
528
513
|
})
|
|
529
514
|
),
|
|
530
|
-
isOptionEqualToValue: (g,
|
|
531
|
-
onInputChange: (g,
|
|
532
|
-
|
|
515
|
+
isOptionEqualToValue: (g, S) => g.id === S.id,
|
|
516
|
+
onInputChange: (g, S) => {
|
|
517
|
+
m(S);
|
|
533
518
|
},
|
|
534
|
-
renderOption: (g,
|
|
519
|
+
renderOption: (g, S) => /* @__PURE__ */ ge(
|
|
535
520
|
"li",
|
|
536
|
-
|
|
537
|
-
key:
|
|
538
|
-
"data-testid":
|
|
521
|
+
A(r({}, g), {
|
|
522
|
+
key: S.id,
|
|
523
|
+
"data-testid": p ? `${p}:Autocomplete:option(${S.id.toString()})` : void 0
|
|
539
524
|
}),
|
|
540
|
-
|
|
525
|
+
S.label
|
|
541
526
|
)
|
|
542
527
|
}
|
|
543
528
|
) }) });
|
|
544
|
-
},
|
|
545
|
-
topStripe: `${
|
|
546
|
-
titleBar: `${
|
|
547
|
-
titleSlider: `${
|
|
548
|
-
titleText: `${
|
|
549
|
-
leftPanelButton: `${
|
|
550
|
-
rightPanelButton: `${
|
|
551
|
-
},
|
|
529
|
+
}, gn = 24, fn = 64, G = "TopBar", T = {
|
|
530
|
+
topStripe: `${G}-topStripe`,
|
|
531
|
+
titleBar: `${G}-titleBar`,
|
|
532
|
+
titleSlider: `${G}-titleSlider`,
|
|
533
|
+
titleText: `${G}-titleText`,
|
|
534
|
+
leftPanelButton: `${G}-leftPanelButton`,
|
|
535
|
+
rightPanelButton: `${G}-leftPanelButton`
|
|
536
|
+
}, mn = be("div", {
|
|
552
537
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
553
|
-
name:
|
|
538
|
+
name: G
|
|
554
539
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
555
|
-
var
|
|
540
|
+
var i, a;
|
|
556
541
|
return {
|
|
557
542
|
width: "100%",
|
|
558
|
-
[`& .${
|
|
543
|
+
[`& .${T.topStripe}`]: {
|
|
559
544
|
width: "100%",
|
|
560
|
-
height: `${
|
|
545
|
+
height: `${gn}px`,
|
|
561
546
|
backgroundColor: e.palette.primary.main
|
|
562
547
|
},
|
|
563
|
-
[`& .${
|
|
548
|
+
[`& .${T.titleBar}`]: {
|
|
564
549
|
backgroundColor: e.palette.primary.light,
|
|
565
|
-
height: `${
|
|
550
|
+
height: `${fn}px`,
|
|
566
551
|
padding: e.spacing(0, 3),
|
|
567
552
|
width: "100%"
|
|
568
553
|
},
|
|
569
|
-
[`& .${
|
|
554
|
+
[`& .${T.titleSlider}`]: r(r({
|
|
570
555
|
height: "100%",
|
|
571
556
|
display: "flex",
|
|
572
557
|
alignItems: "center",
|
|
@@ -575,14 +560,14 @@ const mo = ({
|
|
|
575
560
|
easing: e.transitions.easing.sharp,
|
|
576
561
|
duration: e.transitions.duration.leavingScreen
|
|
577
562
|
}),
|
|
578
|
-
[`& .${
|
|
563
|
+
[`& .${T.leftPanelButton}`]: {
|
|
579
564
|
marginRight: e.spacing(2),
|
|
580
565
|
flexGrow: 0
|
|
581
566
|
},
|
|
582
|
-
[`& .${
|
|
567
|
+
[`& .${T.titleText}`]: {
|
|
583
568
|
flexGrow: 1
|
|
584
569
|
},
|
|
585
|
-
[`& .${
|
|
570
|
+
[`& .${T.rightPanelButton}`]: {
|
|
586
571
|
flexGrow: 0
|
|
587
572
|
}
|
|
588
573
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -590,29 +575,29 @@ const mo = ({
|
|
|
590
575
|
easing: e.transitions.easing.easeOut,
|
|
591
576
|
duration: e.transitions.duration.enteringScreen
|
|
592
577
|
}),
|
|
593
|
-
marginLeft: `${(
|
|
578
|
+
marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
|
|
594
579
|
}), (n == null ? void 0 : n.open) && {
|
|
595
580
|
transition: e.transitions.create("margin", {
|
|
596
581
|
easing: e.transitions.easing.easeOut,
|
|
597
582
|
duration: e.transitions.duration.enteringScreen
|
|
598
583
|
}),
|
|
599
|
-
marginRight: `${(
|
|
584
|
+
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
600
585
|
})
|
|
601
586
|
};
|
|
602
587
|
});
|
|
603
|
-
function
|
|
588
|
+
function Cn({
|
|
604
589
|
titleText: e = "",
|
|
605
590
|
leftPanel: t,
|
|
606
591
|
rightPanel: n,
|
|
607
|
-
"data-testid":
|
|
592
|
+
"data-testid": i
|
|
608
593
|
}) {
|
|
609
|
-
return /* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */ o("div", { className:
|
|
611
|
-
/* @__PURE__ */ o("div", { className:
|
|
612
|
-
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ h(mn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
595
|
+
/* @__PURE__ */ o("div", { className: T.topStripe }),
|
|
596
|
+
/* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ h(I, { className: T.titleSlider, children: [
|
|
597
|
+
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
|
|
613
598
|
Q,
|
|
614
599
|
{
|
|
615
|
-
className:
|
|
600
|
+
className: T.leftPanelButton,
|
|
616
601
|
color: "inherit",
|
|
617
602
|
"aria-label": "Open left side panel",
|
|
618
603
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -620,15 +605,15 @@ function gn({
|
|
|
620
605
|
size: "large",
|
|
621
606
|
children: [
|
|
622
607
|
" ",
|
|
623
|
-
/* @__PURE__ */ o(
|
|
608
|
+
/* @__PURE__ */ o(Ze, {})
|
|
624
609
|
]
|
|
625
610
|
}
|
|
626
611
|
),
|
|
627
|
-
/* @__PURE__ */ o(
|
|
628
|
-
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ o(F, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
613
|
+
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
|
|
629
614
|
Q,
|
|
630
615
|
{
|
|
631
|
-
className:
|
|
616
|
+
className: T.rightPanelButton,
|
|
632
617
|
color: "inherit",
|
|
633
618
|
"aria-label": "Open right side panel",
|
|
634
619
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -636,14 +621,14 @@ function gn({
|
|
|
636
621
|
size: "large",
|
|
637
622
|
children: [
|
|
638
623
|
" ",
|
|
639
|
-
/* @__PURE__ */ o(
|
|
624
|
+
/* @__PURE__ */ o(et, {})
|
|
640
625
|
]
|
|
641
626
|
}
|
|
642
627
|
)
|
|
643
628
|
] }) })
|
|
644
629
|
] });
|
|
645
630
|
}
|
|
646
|
-
const
|
|
631
|
+
const ct = 400, vn = be(Ce, {
|
|
647
632
|
shouldForwardProp: (e) => (
|
|
648
633
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
649
634
|
![
|
|
@@ -657,9 +642,9 @@ const ut = 400, fn = Oe(Ae, {
|
|
|
657
642
|
),
|
|
658
643
|
name: "SidePanelDrawer"
|
|
659
644
|
})(
|
|
660
|
-
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen:
|
|
645
|
+
({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: s }) => ({
|
|
661
646
|
width: e,
|
|
662
|
-
"& .MuiDrawer-paper":
|
|
647
|
+
"& .MuiDrawer-paper": r(r({
|
|
663
648
|
position: "absolute",
|
|
664
649
|
width: e,
|
|
665
650
|
boxSizing: "border-box",
|
|
@@ -667,15 +652,15 @@ const ut = 400, fn = Oe(Ae, {
|
|
|
667
652
|
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)"
|
|
668
653
|
}, t && {
|
|
669
654
|
opacity: "50%"
|
|
670
|
-
}), n === "left" &&
|
|
671
|
-
marginLeft: `${l}px`
|
|
672
|
-
}, r && {
|
|
655
|
+
}), n === "left" && r({
|
|
673
656
|
marginLeft: `${s}px`
|
|
657
|
+
}, i && {
|
|
658
|
+
marginLeft: `${a}px`
|
|
674
659
|
}))
|
|
675
660
|
})
|
|
676
|
-
),
|
|
661
|
+
), xn = be(I, {
|
|
677
662
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
678
|
-
})(({ theme: e, anchor: t }) =>
|
|
663
|
+
})(({ theme: e, anchor: t }) => A(r({
|
|
679
664
|
display: "flex",
|
|
680
665
|
alignItems: "center",
|
|
681
666
|
padding: e.spacing(2)
|
|
@@ -693,65 +678,65 @@ const ut = 400, fn = Oe(Ae, {
|
|
|
693
678
|
marginRight: t === "right" ? e.spacing(2) : 0
|
|
694
679
|
}
|
|
695
680
|
}));
|
|
696
|
-
function
|
|
681
|
+
function _e({
|
|
697
682
|
children: e,
|
|
698
683
|
anchor: t = "left",
|
|
699
684
|
open: n,
|
|
700
|
-
onClose:
|
|
685
|
+
onClose: i = () => {
|
|
701
686
|
},
|
|
702
|
-
titleText:
|
|
703
|
-
width:
|
|
704
|
-
showCloseArrow:
|
|
705
|
-
debugOpacity:
|
|
706
|
-
headerBoxProps:
|
|
707
|
-
onOpened:
|
|
708
|
-
onClosed:
|
|
709
|
-
"data-testid":
|
|
710
|
-
navBarOpen:
|
|
711
|
-
navBarWidthOpen:
|
|
712
|
-
navBarWidthClosed:
|
|
687
|
+
titleText: a = "",
|
|
688
|
+
width: s = ct,
|
|
689
|
+
showCloseArrow: l = !0,
|
|
690
|
+
debugOpacity: p = !1,
|
|
691
|
+
headerBoxProps: c = {},
|
|
692
|
+
onOpened: d,
|
|
693
|
+
onClosed: x,
|
|
694
|
+
"data-testid": w,
|
|
695
|
+
navBarOpen: b = !1,
|
|
696
|
+
navBarWidthOpen: m = 0,
|
|
697
|
+
navBarWidthClosed: D = 0
|
|
713
698
|
}) {
|
|
714
|
-
return /* @__PURE__ */
|
|
715
|
-
|
|
699
|
+
return /* @__PURE__ */ h(
|
|
700
|
+
vn,
|
|
716
701
|
{
|
|
717
702
|
SlideProps: {
|
|
718
|
-
onEntered: () =>
|
|
719
|
-
onExited: () =>
|
|
703
|
+
onEntered: () => d == null ? void 0 : d(),
|
|
704
|
+
onExited: () => x == null ? void 0 : x()
|
|
720
705
|
},
|
|
721
706
|
variant: "persistent",
|
|
722
707
|
anchor: t,
|
|
723
708
|
open: n,
|
|
724
|
-
width:
|
|
725
|
-
debugOpacity:
|
|
726
|
-
"data-testid":
|
|
727
|
-
navBarOpen:
|
|
728
|
-
navBarWidthOpen:
|
|
729
|
-
navBarWidthClosed:
|
|
709
|
+
width: s,
|
|
710
|
+
debugOpacity: p,
|
|
711
|
+
"data-testid": w,
|
|
712
|
+
navBarOpen: b,
|
|
713
|
+
navBarWidthOpen: m,
|
|
714
|
+
navBarWidthClosed: D,
|
|
730
715
|
children: [
|
|
731
|
-
/* @__PURE__ */ o(
|
|
732
|
-
/* @__PURE__ */ o(
|
|
733
|
-
|
|
734
|
-
/* @__PURE__ */ o(
|
|
716
|
+
/* @__PURE__ */ o(xn, A(r({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ h(_, { children: [
|
|
717
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a }),
|
|
718
|
+
l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
719
|
+
/* @__PURE__ */ o(et, { "data-testid": "arrowbackicon" }),
|
|
735
720
|
" "
|
|
736
721
|
] })
|
|
737
|
-
] }) : /* @__PURE__ */
|
|
738
|
-
|
|
739
|
-
/* @__PURE__ */ o(
|
|
722
|
+
] }) : /* @__PURE__ */ h(_, { children: [
|
|
723
|
+
l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
724
|
+
/* @__PURE__ */ o(Ze, {}),
|
|
740
725
|
" "
|
|
741
726
|
] }),
|
|
742
|
-
/* @__PURE__ */ o(
|
|
727
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a })
|
|
743
728
|
] }) })),
|
|
744
729
|
e
|
|
745
730
|
]
|
|
746
731
|
}
|
|
747
732
|
);
|
|
748
733
|
}
|
|
749
|
-
const
|
|
734
|
+
const wn = H(I, {
|
|
750
735
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
751
736
|
name: "PanelAwareMargins"
|
|
752
737
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
753
|
-
var
|
|
754
|
-
return
|
|
738
|
+
var i, a;
|
|
739
|
+
return r(r({
|
|
755
740
|
transition: e.transitions.create("margin", {
|
|
756
741
|
easing: e.transitions.easing.sharp,
|
|
757
742
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -761,187 +746,187 @@ const Cn = M(D, {
|
|
|
761
746
|
easing: e.transitions.easing.easeOut,
|
|
762
747
|
duration: e.transitions.duration.enteringScreen
|
|
763
748
|
}),
|
|
764
|
-
marginLeft: `${(
|
|
749
|
+
marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
|
|
765
750
|
}), (n == null ? void 0 : n.open) && {
|
|
766
751
|
transition: e.transitions.create("margin", {
|
|
767
752
|
easing: e.transitions.easing.easeOut,
|
|
768
753
|
duration: e.transitions.duration.enteringScreen
|
|
769
754
|
}),
|
|
770
|
-
marginRight: `${(
|
|
755
|
+
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
771
756
|
});
|
|
772
|
-
}),
|
|
757
|
+
}), bn = H(Ke, {
|
|
773
758
|
name: "PageContainer"
|
|
774
759
|
})(({ theme: e }) => ({
|
|
775
760
|
// Horizontal padding comes from the Container's gutter
|
|
776
761
|
paddingTop: e.spacing(3),
|
|
777
762
|
paddingBottom: e.spacing(3)
|
|
778
763
|
// TODO: Remove max width
|
|
779
|
-
})),
|
|
764
|
+
})), ue = !1, he = !1, ee = {
|
|
780
765
|
titleText: "",
|
|
781
766
|
flavour: "push",
|
|
782
|
-
width:
|
|
767
|
+
width: ct,
|
|
783
768
|
arrowButtons: "both",
|
|
784
769
|
startOpen: !1,
|
|
785
770
|
open: void 0,
|
|
786
771
|
onChangeOpen: void 0,
|
|
787
|
-
content: /* @__PURE__ */ o(
|
|
772
|
+
content: /* @__PURE__ */ o(_, {}),
|
|
788
773
|
onOpened: void 0,
|
|
789
774
|
onClosed: void 0,
|
|
790
775
|
dataTestId: void 0
|
|
791
776
|
};
|
|
792
|
-
function
|
|
777
|
+
function bo({
|
|
793
778
|
children: e,
|
|
794
779
|
titleText: t = "",
|
|
795
780
|
leftPanel: n,
|
|
796
|
-
rightPanel:
|
|
797
|
-
sidePanelsAreMutuallyExclusive:
|
|
798
|
-
debugOpacity:
|
|
799
|
-
pageContainerProps:
|
|
800
|
-
pageContentDataTestId:
|
|
801
|
-
topBarDataTestId:
|
|
802
|
-
navBarOpen:
|
|
803
|
-
navBarWidthOpen:
|
|
804
|
-
navBarWidthClosed:
|
|
781
|
+
rightPanel: i,
|
|
782
|
+
sidePanelsAreMutuallyExclusive: a = !0,
|
|
783
|
+
debugOpacity: s = !1,
|
|
784
|
+
pageContainerProps: l,
|
|
785
|
+
pageContentDataTestId: p,
|
|
786
|
+
topBarDataTestId: c,
|
|
787
|
+
navBarOpen: d,
|
|
788
|
+
navBarWidthOpen: x,
|
|
789
|
+
navBarWidthClosed: w
|
|
805
790
|
}) {
|
|
806
|
-
const [
|
|
807
|
-
titleText:
|
|
808
|
-
content:
|
|
809
|
-
flavour:
|
|
810
|
-
open:
|
|
811
|
-
onChangeOpen:
|
|
812
|
-
width:
|
|
813
|
-
arrowButtons:
|
|
814
|
-
startOpen:
|
|
815
|
-
onOpened:
|
|
816
|
-
onClosed:
|
|
817
|
-
dataTestId:
|
|
818
|
-
} = n ?
|
|
819
|
-
titleText:
|
|
820
|
-
content:
|
|
821
|
-
flavour:
|
|
822
|
-
open:
|
|
823
|
-
onChangeOpen:
|
|
824
|
-
width:
|
|
825
|
-
arrowButtons:
|
|
826
|
-
startOpen:
|
|
827
|
-
onOpened:
|
|
828
|
-
onClosed:
|
|
829
|
-
dataTestId:
|
|
830
|
-
} =
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
}, [
|
|
834
|
-
|
|
835
|
-
}, [
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
},
|
|
839
|
-
|
|
791
|
+
const [b, m] = E(ue), [D, k] = E(he), [O, g] = E(ue), [S, R] = E(he), N = n !== void 0, L = i !== void 0, {
|
|
792
|
+
titleText: $,
|
|
793
|
+
content: u,
|
|
794
|
+
flavour: f,
|
|
795
|
+
open: y,
|
|
796
|
+
onChangeOpen: P,
|
|
797
|
+
width: v,
|
|
798
|
+
arrowButtons: C,
|
|
799
|
+
startOpen: M,
|
|
800
|
+
onOpened: xt,
|
|
801
|
+
onClosed: wt,
|
|
802
|
+
dataTestId: bt
|
|
803
|
+
} = n ? r(r({}, ee), n) : r({}, ee), {
|
|
804
|
+
titleText: At,
|
|
805
|
+
content: St,
|
|
806
|
+
flavour: Se,
|
|
807
|
+
open: re,
|
|
808
|
+
onChangeOpen: De,
|
|
809
|
+
width: ae,
|
|
810
|
+
arrowButtons: J,
|
|
811
|
+
startOpen: Y,
|
|
812
|
+
onOpened: Dt,
|
|
813
|
+
onClosed: kt,
|
|
814
|
+
dataTestId: It
|
|
815
|
+
} = i ? r(r({}, ee), i) : r({}, ee);
|
|
816
|
+
Ee(() => {
|
|
817
|
+
M !== ue && (m(M), g(M));
|
|
818
|
+
}, [M]), Ee(() => {
|
|
819
|
+
Y !== he && (k(Y), R(Y));
|
|
820
|
+
}, [Y]);
|
|
821
|
+
const se = y === void 0 ? b : y, le = re === void 0 ? D : re, ke = (W) => {
|
|
822
|
+
y === void 0 && (m(W), a && L && (W ? (k(!1), R(D)) : k(S))), P && P(W);
|
|
823
|
+
}, Ie = (W) => {
|
|
824
|
+
re === void 0 && (k(W), a && N && (W ? (m(!1), g(b)) : m(O))), De && De(W);
|
|
840
825
|
};
|
|
841
|
-
return /* @__PURE__ */
|
|
842
|
-
|
|
843
|
-
|
|
826
|
+
return /* @__PURE__ */ h(I, { children: [
|
|
827
|
+
N && /* @__PURE__ */ o(
|
|
828
|
+
_e,
|
|
844
829
|
{
|
|
845
|
-
"data-testid":
|
|
830
|
+
"data-testid": bt,
|
|
846
831
|
anchor: "left",
|
|
847
|
-
open:
|
|
848
|
-
onClose: () =>
|
|
849
|
-
width:
|
|
850
|
-
titleText:
|
|
851
|
-
debugOpacity:
|
|
852
|
-
showCloseArrow:
|
|
853
|
-
onOpened:
|
|
854
|
-
onClosed:
|
|
855
|
-
navBarOpen:
|
|
856
|
-
navBarWidthOpen:
|
|
857
|
-
navBarWidthClosed:
|
|
858
|
-
children:
|
|
832
|
+
open: se,
|
|
833
|
+
onClose: () => ke(!1),
|
|
834
|
+
width: v,
|
|
835
|
+
titleText: $,
|
|
836
|
+
debugOpacity: s,
|
|
837
|
+
showCloseArrow: C === "both" || C === "close",
|
|
838
|
+
onOpened: xt,
|
|
839
|
+
onClosed: wt,
|
|
840
|
+
navBarOpen: d,
|
|
841
|
+
navBarWidthOpen: x,
|
|
842
|
+
navBarWidthClosed: w,
|
|
843
|
+
children: u
|
|
859
844
|
}
|
|
860
845
|
),
|
|
861
|
-
|
|
862
|
-
|
|
846
|
+
L && /* @__PURE__ */ o(
|
|
847
|
+
_e,
|
|
863
848
|
{
|
|
864
|
-
"data-testid":
|
|
849
|
+
"data-testid": It,
|
|
865
850
|
anchor: "right",
|
|
866
|
-
open:
|
|
867
|
-
onClose: () =>
|
|
868
|
-
width:
|
|
869
|
-
titleText:
|
|
870
|
-
debugOpacity:
|
|
871
|
-
showCloseArrow:
|
|
872
|
-
onOpened:
|
|
873
|
-
onClosed:
|
|
874
|
-
navBarOpen:
|
|
875
|
-
navBarWidthOpen:
|
|
876
|
-
navBarWidthClosed:
|
|
877
|
-
children:
|
|
851
|
+
open: le,
|
|
852
|
+
onClose: () => Ie(!1),
|
|
853
|
+
width: ae,
|
|
854
|
+
titleText: At,
|
|
855
|
+
debugOpacity: s,
|
|
856
|
+
showCloseArrow: J === "both" || J === "close",
|
|
857
|
+
onOpened: Dt,
|
|
858
|
+
onClosed: kt,
|
|
859
|
+
navBarOpen: d,
|
|
860
|
+
navBarWidthOpen: x,
|
|
861
|
+
navBarWidthClosed: w,
|
|
862
|
+
children: St
|
|
878
863
|
}
|
|
879
864
|
),
|
|
880
865
|
/* @__PURE__ */ o(
|
|
881
|
-
|
|
882
|
-
|
|
866
|
+
Cn,
|
|
867
|
+
r(r({
|
|
883
868
|
titleText: t,
|
|
884
|
-
"data-testid":
|
|
885
|
-
},
|
|
869
|
+
"data-testid": c
|
|
870
|
+
}, N && f === "push" ? {
|
|
886
871
|
leftPanel: {
|
|
887
|
-
open:
|
|
888
|
-
width:
|
|
889
|
-
onOpen: () =>
|
|
890
|
-
showOpenArrow:
|
|
872
|
+
open: se,
|
|
873
|
+
width: v,
|
|
874
|
+
onOpen: () => ke(!0),
|
|
875
|
+
showOpenArrow: C === "both" || C === "open"
|
|
891
876
|
}
|
|
892
|
-
} : {}),
|
|
877
|
+
} : {}), L && Se === "push" ? {
|
|
893
878
|
rightPanel: {
|
|
894
|
-
open:
|
|
895
|
-
width:
|
|
896
|
-
onOpen: () =>
|
|
897
|
-
showOpenArrow:
|
|
879
|
+
open: le,
|
|
880
|
+
width: ae,
|
|
881
|
+
onOpen: () => Ie(!0),
|
|
882
|
+
showOpenArrow: J === "both" || J === "open"
|
|
898
883
|
}
|
|
899
884
|
} : {})
|
|
900
885
|
),
|
|
901
886
|
/* @__PURE__ */ o(
|
|
902
|
-
|
|
903
|
-
|
|
887
|
+
wn,
|
|
888
|
+
A(r(r({}, f === "push" ? {
|
|
904
889
|
leftPanel: {
|
|
905
|
-
open:
|
|
906
|
-
width:
|
|
890
|
+
open: se,
|
|
891
|
+
width: v
|
|
907
892
|
}
|
|
908
|
-
} : {}),
|
|
893
|
+
} : {}), Se === "push" ? {
|
|
909
894
|
rightPanel: {
|
|
910
|
-
open:
|
|
911
|
-
width:
|
|
895
|
+
open: le,
|
|
896
|
+
width: ae
|
|
912
897
|
}
|
|
913
898
|
} : {}), {
|
|
914
|
-
children: /* @__PURE__ */ o(
|
|
899
|
+
children: /* @__PURE__ */ o(bn, A(r({ "data-testid": p }, l), { children: e }))
|
|
915
900
|
})
|
|
916
901
|
)
|
|
917
902
|
] });
|
|
918
903
|
}
|
|
919
|
-
const
|
|
920
|
-
const e =
|
|
904
|
+
const dt = () => {
|
|
905
|
+
const e = ie();
|
|
921
906
|
return Mt(e.breakpoints.down("sm"));
|
|
922
|
-
},
|
|
923
|
-
function
|
|
907
|
+
}, An = 64, Sn = 64, Dn = 256, j = B(!0), pt = B(Dn), ut = B(Sn), me = B(""), kn = B(void 0), ht = B(An), gt = B(void 0);
|
|
908
|
+
function In({ links: e }) {
|
|
924
909
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
925
910
|
}
|
|
926
|
-
const
|
|
927
|
-
root: `${
|
|
928
|
-
menuButton: `${
|
|
929
|
-
hide: `${
|
|
930
|
-
content: `${
|
|
911
|
+
const te = "Navbar", X = {
|
|
912
|
+
root: `${te}-root`,
|
|
913
|
+
menuButton: `${te}-menuButton`,
|
|
914
|
+
hide: `${te}-hide`,
|
|
915
|
+
content: `${te}-content`
|
|
931
916
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
932
917
|
// settings: `${PREFIX}-settings`,
|
|
933
918
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
934
|
-
},
|
|
935
|
-
[`&.${
|
|
919
|
+
}, On = H(I, { name: "NavBar" })(({ theme: e }) => ({
|
|
920
|
+
[`&.${X.root}`]: {
|
|
936
921
|
display: "flex"
|
|
937
922
|
},
|
|
938
|
-
[`& .${
|
|
923
|
+
[`& .${X.menuButton}`]: {
|
|
939
924
|
marginRight: 36
|
|
940
925
|
},
|
|
941
|
-
[`& .${
|
|
926
|
+
[`& .${X.hide}`]: {
|
|
942
927
|
display: "none"
|
|
943
928
|
},
|
|
944
|
-
[`& .${
|
|
929
|
+
[`& .${X.content}`]: {
|
|
945
930
|
flexGrow: 1,
|
|
946
931
|
padding: e.spacing(3)
|
|
947
932
|
}
|
|
@@ -950,14 +935,14 @@ const ne = "Navbar", j = {
|
|
|
950
935
|
// marginTop: '64px',
|
|
951
936
|
// marginBottom: '16px',
|
|
952
937
|
// },
|
|
953
|
-
})),
|
|
938
|
+
})), oe = (e, t, n) => e.transitions.create(t, {
|
|
954
939
|
easing: e.transitions.easing.sharp,
|
|
955
940
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
956
|
-
}),
|
|
957
|
-
const t =
|
|
941
|
+
}), $n = (e) => {
|
|
942
|
+
const t = ie();
|
|
958
943
|
return /* @__PURE__ */ o(
|
|
959
944
|
_t,
|
|
960
|
-
|
|
945
|
+
r({
|
|
961
946
|
easing: t.transitions.easing.sharp,
|
|
962
947
|
timeout: {
|
|
963
948
|
enter: t.transitions.duration.enteringScreen,
|
|
@@ -965,7 +950,7 @@ const ne = "Navbar", j = {
|
|
|
965
950
|
}
|
|
966
951
|
}, e)
|
|
967
952
|
);
|
|
968
|
-
},
|
|
953
|
+
}, ft = (e) => {
|
|
969
954
|
var t, n;
|
|
970
955
|
return {
|
|
971
956
|
overflowX: "hidden",
|
|
@@ -973,40 +958,40 @@ const ne = "Navbar", j = {
|
|
|
973
958
|
backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
|
|
974
959
|
// Provide default so tests don't need to wrap theme provider
|
|
975
960
|
};
|
|
976
|
-
},
|
|
961
|
+
}, He = (e, t) => r({
|
|
977
962
|
width: t,
|
|
978
|
-
transition:
|
|
979
|
-
},
|
|
963
|
+
transition: oe(e, "width", "entering")
|
|
964
|
+
}, ft(e)), Re = (e, t) => r({
|
|
980
965
|
width: t,
|
|
981
|
-
transition:
|
|
982
|
-
},
|
|
966
|
+
transition: oe(e, "width", "leaving")
|
|
967
|
+
}, ft(e)), Tn = H(Ce, {
|
|
983
968
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
984
|
-
})(({ theme: e, open: t, widthOpen: n, widthClosed:
|
|
969
|
+
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: a }) => r(r({
|
|
985
970
|
flexShrink: 0,
|
|
986
971
|
whiteSpace: "nowrap",
|
|
987
972
|
boxSizing: "border-box",
|
|
988
973
|
display: "flex",
|
|
989
974
|
flexDirection: "column"
|
|
990
|
-
}, t &&
|
|
975
|
+
}, t && A(r({}, He(e, n)), {
|
|
991
976
|
backgroundColor: "",
|
|
992
|
-
"& .MuiDrawer-paper":
|
|
993
|
-
})), !t &&
|
|
977
|
+
"& .MuiDrawer-paper": He(e, n)
|
|
978
|
+
})), !t && A(r({}, Re(e, a ? n : i)), {
|
|
994
979
|
backgroundColor: "",
|
|
995
|
-
"& .MuiDrawer-paper":
|
|
980
|
+
"& .MuiDrawer-paper": Re(e, a ? n : i)
|
|
996
981
|
})));
|
|
997
|
-
function
|
|
982
|
+
function yn(e) {
|
|
998
983
|
let t = 0;
|
|
999
|
-
for (let n = 0,
|
|
1000
|
-
const
|
|
1001
|
-
t = (t << 5) - t +
|
|
984
|
+
for (let n = 0, i = e.length; n < i; n++) {
|
|
985
|
+
const a = e.charCodeAt(n);
|
|
986
|
+
t = (t << 5) - t + a, t |= 0;
|
|
1002
987
|
}
|
|
1003
988
|
return t;
|
|
1004
989
|
}
|
|
1005
|
-
const
|
|
1006
|
-
function
|
|
1007
|
-
const
|
|
1008
|
-
return /* @__PURE__ */
|
|
1009
|
-
|
|
990
|
+
const We = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], En = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
991
|
+
function Fn({ user: e, domainCode: t, open: n }) {
|
|
992
|
+
const i = ie();
|
|
993
|
+
return /* @__PURE__ */ h(
|
|
994
|
+
I,
|
|
1010
995
|
{
|
|
1011
996
|
sx: {
|
|
1012
997
|
paddingTop: 3,
|
|
@@ -1017,85 +1002,85 @@ function En({ user: e, domainCode: t, open: n }) {
|
|
|
1017
1002
|
},
|
|
1018
1003
|
children: [
|
|
1019
1004
|
/* @__PURE__ */ o(
|
|
1020
|
-
|
|
1005
|
+
I,
|
|
1021
1006
|
{
|
|
1022
1007
|
sx: {
|
|
1023
1008
|
width: n ? "5rem" : "2rem",
|
|
1024
|
-
transition: n ?
|
|
1009
|
+
transition: n ? oe(i, ["width", "height"], "entering") : oe(i, ["width", "height"], "leaving"),
|
|
1025
1010
|
aspectRatio: 1
|
|
1026
1011
|
},
|
|
1027
1012
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1028
|
-
|
|
1013
|
+
Fe,
|
|
1029
1014
|
{
|
|
1030
1015
|
src: e == null ? void 0 : e.picture,
|
|
1031
1016
|
sx: {
|
|
1032
1017
|
width: "100%",
|
|
1033
1018
|
height: "100%",
|
|
1034
|
-
bgcolor:
|
|
1019
|
+
bgcolor: We[Math.abs(yn(e.name)) % We.length]
|
|
1035
1020
|
},
|
|
1036
|
-
children:
|
|
1021
|
+
children: En(e.name)
|
|
1037
1022
|
}
|
|
1038
|
-
) : /* @__PURE__ */ o(
|
|
1023
|
+
) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
|
|
1039
1024
|
}
|
|
1040
1025
|
),
|
|
1041
|
-
/* @__PURE__ */ o(
|
|
1042
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
1043
|
-
t ? /* @__PURE__ */ o(
|
|
1026
|
+
/* @__PURE__ */ o($n, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ht, { in: n, children: /* @__PURE__ */ h(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1027
|
+
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
|
|
1028
|
+
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
|
|
1044
1029
|
] }) }) })
|
|
1045
1030
|
]
|
|
1046
1031
|
}
|
|
1047
1032
|
);
|
|
1048
1033
|
}
|
|
1049
|
-
function
|
|
1034
|
+
function Nn({
|
|
1050
1035
|
open: e,
|
|
1051
1036
|
widthClosed: t,
|
|
1052
1037
|
widthOpen: n,
|
|
1053
|
-
"data-testid":
|
|
1054
|
-
top:
|
|
1055
|
-
middle:
|
|
1056
|
-
bottom:
|
|
1057
|
-
user:
|
|
1058
|
-
domainCode:
|
|
1038
|
+
"data-testid": i,
|
|
1039
|
+
top: a,
|
|
1040
|
+
middle: s,
|
|
1041
|
+
bottom: l,
|
|
1042
|
+
user: p,
|
|
1043
|
+
domainCode: c
|
|
1059
1044
|
}) {
|
|
1060
|
-
const
|
|
1061
|
-
return /* @__PURE__ */ o(
|
|
1062
|
-
|
|
1045
|
+
const d = dt(), x = tt(j);
|
|
1046
|
+
return /* @__PURE__ */ o(On, { className: X.root, "data-testid": i, children: /* @__PURE__ */ h(
|
|
1047
|
+
Tn,
|
|
1063
1048
|
{
|
|
1064
1049
|
open: e,
|
|
1065
1050
|
widthOpen: n,
|
|
1066
1051
|
widthClosed: t,
|
|
1067
1052
|
anchor: "left",
|
|
1068
|
-
variant:
|
|
1053
|
+
variant: d ? "temporary" : "permanent",
|
|
1069
1054
|
PaperProps: {
|
|
1070
1055
|
component: "nav"
|
|
1071
1056
|
},
|
|
1072
1057
|
onClose: () => {
|
|
1073
|
-
|
|
1058
|
+
x(!1);
|
|
1074
1059
|
},
|
|
1075
|
-
isSmallScreen:
|
|
1060
|
+
isSmallScreen: d,
|
|
1076
1061
|
children: [
|
|
1077
|
-
!
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
/* @__PURE__ */ o(
|
|
1062
|
+
!d && /* @__PURE__ */ o(Rt, {}),
|
|
1063
|
+
a && /* @__PURE__ */ h(I, { flexGrow: "0", children: [
|
|
1064
|
+
a,
|
|
1065
|
+
/* @__PURE__ */ o(Pe, { variant: "middle" })
|
|
1081
1066
|
] }),
|
|
1082
|
-
/* @__PURE__ */ o(
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
/* @__PURE__ */ o(
|
|
1085
|
-
/* @__PURE__ */ o(
|
|
1086
|
-
|
|
1067
|
+
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(In, { links: s }) : s }),
|
|
1068
|
+
/* @__PURE__ */ h(I, { flexGrow: "0", children: [
|
|
1069
|
+
/* @__PURE__ */ o(Pe, { variant: "middle" }),
|
|
1070
|
+
/* @__PURE__ */ o(Fn, { user: p, domainCode: c, open: e }),
|
|
1071
|
+
l && /* @__PURE__ */ o(_, { children: l })
|
|
1087
1072
|
] })
|
|
1088
1073
|
]
|
|
1089
1074
|
}
|
|
1090
1075
|
) });
|
|
1091
1076
|
}
|
|
1092
|
-
function
|
|
1077
|
+
function Pn({
|
|
1093
1078
|
children: e,
|
|
1094
1079
|
topBarHeight: t,
|
|
1095
1080
|
maxWidth: n = !1
|
|
1096
1081
|
}) {
|
|
1097
1082
|
return /* @__PURE__ */ o(
|
|
1098
|
-
|
|
1083
|
+
I,
|
|
1099
1084
|
{
|
|
1100
1085
|
sx: {
|
|
1101
1086
|
overflow: "auto",
|
|
@@ -1105,7 +1090,7 @@ function Fn({
|
|
|
1105
1090
|
flexGrow: 1
|
|
1106
1091
|
},
|
|
1107
1092
|
children: /* @__PURE__ */ o(
|
|
1108
|
-
|
|
1093
|
+
Ke,
|
|
1109
1094
|
{
|
|
1110
1095
|
component: "main",
|
|
1111
1096
|
id: "main-content",
|
|
@@ -1117,18 +1102,18 @@ function Fn({
|
|
|
1117
1102
|
}
|
|
1118
1103
|
);
|
|
1119
1104
|
}
|
|
1120
|
-
const
|
|
1121
|
-
titleText: `${
|
|
1105
|
+
const Bn = "TopBar", Ln = {
|
|
1106
|
+
titleText: `${Bn}-titleText`
|
|
1122
1107
|
};
|
|
1123
|
-
function
|
|
1108
|
+
function Mn({
|
|
1124
1109
|
titleText: e = "",
|
|
1125
1110
|
height: t,
|
|
1126
1111
|
"data-testid": n,
|
|
1127
|
-
middle:
|
|
1112
|
+
middle: i
|
|
1128
1113
|
}) {
|
|
1129
|
-
const
|
|
1130
|
-
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */
|
|
1131
|
-
|
|
1114
|
+
const a = tt(j), s = () => a((c) => !c), l = ie(), p = dt();
|
|
1115
|
+
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
|
|
1116
|
+
je,
|
|
1132
1117
|
{
|
|
1133
1118
|
square: !0,
|
|
1134
1119
|
elevation: 0,
|
|
@@ -1142,189 +1127,189 @@ function Pn({
|
|
|
1142
1127
|
gap: 2,
|
|
1143
1128
|
flexShrink: 0,
|
|
1144
1129
|
height: t,
|
|
1145
|
-
zIndex:
|
|
1130
|
+
zIndex: p ? 0 : l.zIndex.drawer + 1
|
|
1146
1131
|
},
|
|
1147
1132
|
children: [
|
|
1148
|
-
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick:
|
|
1149
|
-
/* @__PURE__ */ o(
|
|
1150
|
-
|
|
1133
|
+
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Kt, { fontSize: "medium" }) }),
|
|
1134
|
+
/* @__PURE__ */ o(F, { className: Ln.titleText, variant: "h6", children: e }),
|
|
1135
|
+
i
|
|
1151
1136
|
]
|
|
1152
1137
|
}
|
|
1153
1138
|
) });
|
|
1154
1139
|
}
|
|
1155
|
-
function
|
|
1140
|
+
function Ao({
|
|
1156
1141
|
children: e,
|
|
1157
1142
|
initialTitleText: t,
|
|
1158
1143
|
initialNavBarOpen: n,
|
|
1159
|
-
pageContainerProps:
|
|
1160
|
-
pageContentDataTestId:
|
|
1161
|
-
topBarDataTestId:
|
|
1162
|
-
navBarDataTestId:
|
|
1163
|
-
navBarMiddle:
|
|
1164
|
-
navBarBottom:
|
|
1165
|
-
user:
|
|
1166
|
-
domainCode:
|
|
1144
|
+
pageContainerProps: i,
|
|
1145
|
+
pageContentDataTestId: a,
|
|
1146
|
+
topBarDataTestId: s,
|
|
1147
|
+
navBarDataTestId: l,
|
|
1148
|
+
navBarMiddle: p,
|
|
1149
|
+
navBarBottom: c,
|
|
1150
|
+
user: d,
|
|
1151
|
+
domainCode: x
|
|
1167
1152
|
}) {
|
|
1168
|
-
|
|
1169
|
-
[
|
|
1170
|
-
[
|
|
1153
|
+
ot([
|
|
1154
|
+
[j, n != null ? n : !0],
|
|
1155
|
+
[me, t != null ? t : ""]
|
|
1171
1156
|
]);
|
|
1172
|
-
const
|
|
1173
|
-
return /* @__PURE__ */
|
|
1157
|
+
const w = Be(j), [b] = U(pt), [m] = U(ut), D = Be(me), [k] = U(ht), [O] = U(kn), [g] = U(gt);
|
|
1158
|
+
return /* @__PURE__ */ h(I, { children: [
|
|
1174
1159
|
/* @__PURE__ */ o(Wt, {}),
|
|
1175
1160
|
/* @__PURE__ */ o(
|
|
1176
|
-
|
|
1161
|
+
Mn,
|
|
1177
1162
|
{
|
|
1178
|
-
titleText:
|
|
1179
|
-
"data-testid":
|
|
1180
|
-
height:
|
|
1181
|
-
middle:
|
|
1163
|
+
titleText: D,
|
|
1164
|
+
"data-testid": s,
|
|
1165
|
+
height: k,
|
|
1166
|
+
middle: O
|
|
1182
1167
|
}
|
|
1183
1168
|
),
|
|
1184
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ h(I, { sx: { display: "flex" }, children: [
|
|
1185
1170
|
/* @__PURE__ */ o(
|
|
1186
|
-
|
|
1171
|
+
Nn,
|
|
1187
1172
|
{
|
|
1188
|
-
open:
|
|
1173
|
+
open: w,
|
|
1189
1174
|
top: g,
|
|
1190
|
-
middle:
|
|
1191
|
-
bottom:
|
|
1192
|
-
user:
|
|
1193
|
-
domainCode:
|
|
1194
|
-
widthOpen:
|
|
1195
|
-
widthClosed:
|
|
1196
|
-
offsetTop:
|
|
1197
|
-
"data-testid":
|
|
1175
|
+
middle: p,
|
|
1176
|
+
bottom: c,
|
|
1177
|
+
user: d,
|
|
1178
|
+
domainCode: x,
|
|
1179
|
+
widthOpen: b,
|
|
1180
|
+
widthClosed: m,
|
|
1181
|
+
offsetTop: k,
|
|
1182
|
+
"data-testid": l
|
|
1198
1183
|
}
|
|
1199
1184
|
),
|
|
1200
1185
|
/* @__PURE__ */ o(
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
"data-testid":
|
|
1204
|
-
topBarHeight:
|
|
1205
|
-
},
|
|
1186
|
+
Pn,
|
|
1187
|
+
A(r({
|
|
1188
|
+
"data-testid": a,
|
|
1189
|
+
topBarHeight: k
|
|
1190
|
+
}, i), {
|
|
1206
1191
|
children: e
|
|
1207
1192
|
})
|
|
1208
1193
|
)
|
|
1209
1194
|
] })
|
|
1210
1195
|
] });
|
|
1211
1196
|
}
|
|
1212
|
-
const
|
|
1197
|
+
const _n = {
|
|
1213
1198
|
autoHideDuration: 6e3,
|
|
1214
1199
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1215
1200
|
// The default is false. If we prefer timer to continue when window loses
|
|
1216
1201
|
// focus, change to true
|
|
1217
1202
|
disableWindowBlurListener: !1
|
|
1218
|
-
},
|
|
1203
|
+
}, Hn = {
|
|
1219
1204
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1220
|
-
},
|
|
1205
|
+
}, ze = {
|
|
1221
1206
|
message: "",
|
|
1222
1207
|
severity: "info",
|
|
1223
1208
|
variant: "standard",
|
|
1224
1209
|
progressIndicator: void 0
|
|
1225
1210
|
// Can use 'circular' or 'linear'
|
|
1226
|
-
},
|
|
1211
|
+
}, Ge = 100, Ve = 2e3, Rn = 2e3, Wn = (() => {
|
|
1227
1212
|
let e = 0;
|
|
1228
1213
|
return () => (e += 1, e);
|
|
1229
|
-
})(),
|
|
1214
|
+
})(), zn = {
|
|
1230
1215
|
borderBottomLeftRadius: "0px",
|
|
1231
1216
|
borderBottomRightRadius: "0px"
|
|
1232
|
-
},
|
|
1233
|
-
function
|
|
1234
|
-
var
|
|
1235
|
-
overrideState: e =
|
|
1236
|
-
overrideActions: t =
|
|
1237
|
-
shouldClose: n =
|
|
1238
|
-
children:
|
|
1239
|
-
} =
|
|
1217
|
+
}, Gn = {}, Vn = {}, mt = Xe(null);
|
|
1218
|
+
function Un(s) {
|
|
1219
|
+
var l = s, {
|
|
1220
|
+
overrideState: e = Gn,
|
|
1221
|
+
overrideActions: t = Vn,
|
|
1222
|
+
shouldClose: n = Hn.shouldClose,
|
|
1223
|
+
children: i
|
|
1224
|
+
} = l, a = Te(l, [
|
|
1240
1225
|
"overrideState",
|
|
1241
1226
|
"overrideActions",
|
|
1242
1227
|
"shouldClose",
|
|
1243
1228
|
"children"
|
|
1244
1229
|
]);
|
|
1245
|
-
var
|
|
1246
|
-
const [{ open:
|
|
1247
|
-
|
|
1248
|
-
}, []),
|
|
1249
|
-
|
|
1250
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1251
|
-
),
|
|
1252
|
-
const
|
|
1253
|
-
key:
|
|
1254
|
-
}),
|
|
1255
|
-
return
|
|
1256
|
-
}, []),
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1259
|
-
return
|
|
1260
|
-
},
|
|
1261
|
-
n(
|
|
1262
|
-
},
|
|
1263
|
-
},
|
|
1264
|
-
|
|
1265
|
-
},
|
|
1266
|
-
"autoHideDuration" in
|
|
1267
|
-
const
|
|
1268
|
-
open:
|
|
1269
|
-
setOpen:
|
|
1270
|
-
enqueueNotification:
|
|
1271
|
-
enqueueSuccessNotification:
|
|
1272
|
-
enqueueInfoNotification:
|
|
1273
|
-
enqueueWarningNotification:
|
|
1230
|
+
var P;
|
|
1231
|
+
const [{ open: p }, c] = E({ open: !1 }), d = de([]), x = de(Date.now()), w = de(0), b = ne((v) => {
|
|
1232
|
+
c({ open: v });
|
|
1233
|
+
}, []), m = ne((v = {}) => {
|
|
1234
|
+
w.current += 1, d.current.length >= Ge && Date.now() - x.current >= Ve && (x.current = Date.now(), console.error(
|
|
1235
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${w.current} times in last ${Ve}ms)`
|
|
1236
|
+
), w.current = 0);
|
|
1237
|
+
const C = r(A(r({}, ze), {
|
|
1238
|
+
key: Wn()
|
|
1239
|
+
}), v);
|
|
1240
|
+
return d.current.push(C), d.current.length === 1 && c({ open: !0 }), C.key;
|
|
1241
|
+
}, []), D = (v = "", C = {}) => m(r({ message: v, severity: "success" }, C)), k = (v = "", C = {}) => m(r({ message: v, severity: "info" }, C)), O = (v = "", C = {}) => m(r({ message: v, severity: "warning" }, C)), g = (v = "", C = {}) => m(r({ message: v, severity: "error" }, C)), S = (v) => {
|
|
1242
|
+
const C = d.current.findIndex((M) => M.key === v);
|
|
1243
|
+
if (C !== -1)
|
|
1244
|
+
return C === 0 ? (c({ open: !1 }), d.current[0]) : d.current.splice(C, 1);
|
|
1245
|
+
}, R = (v, C) => {
|
|
1246
|
+
n(v, C) && c({ open: !1 });
|
|
1247
|
+
}, N = () => {
|
|
1248
|
+
}, L = () => {
|
|
1249
|
+
d.current.shift(), d.current.length > 0 && c({ open: !0 });
|
|
1250
|
+
}, $ = (P = d.current[0]) != null ? P : r({}, ze), u = {};
|
|
1251
|
+
"autoHideDuration" in $ && (u.autoHideDuration = $.autoHideDuration);
|
|
1252
|
+
const f = r(r({}, _n), a), y = r(r({
|
|
1253
|
+
open: p,
|
|
1254
|
+
setOpen: b,
|
|
1255
|
+
enqueueNotification: m,
|
|
1256
|
+
enqueueSuccessNotification: D,
|
|
1257
|
+
enqueueInfoNotification: k,
|
|
1258
|
+
enqueueWarningNotification: O,
|
|
1274
1259
|
enqueueErrorNotification: g,
|
|
1275
|
-
removeNotification:
|
|
1260
|
+
removeNotification: S
|
|
1276
1261
|
}, e), t);
|
|
1277
|
-
return /* @__PURE__ */
|
|
1278
|
-
|
|
1262
|
+
return /* @__PURE__ */ h(mt.Provider, { value: y, children: [
|
|
1263
|
+
i,
|
|
1279
1264
|
/* @__PURE__ */ o(
|
|
1280
1265
|
zt,
|
|
1281
|
-
|
|
1282
|
-
open:
|
|
1283
|
-
onClose:
|
|
1266
|
+
A(r(r({}, f), u), {
|
|
1267
|
+
open: p,
|
|
1268
|
+
onClose: R,
|
|
1284
1269
|
TransitionProps: {
|
|
1285
|
-
onExited:
|
|
1286
|
-
onExit:
|
|
1270
|
+
onExited: L,
|
|
1271
|
+
onExit: N
|
|
1287
1272
|
},
|
|
1288
|
-
sx: { zIndex:
|
|
1289
|
-
children: /* @__PURE__ */
|
|
1273
|
+
sx: { zIndex: Rn },
|
|
1274
|
+
children: /* @__PURE__ */ h("div", { children: [
|
|
1290
1275
|
/* @__PURE__ */ o(
|
|
1291
1276
|
Gt,
|
|
1292
1277
|
{
|
|
1293
|
-
onClose: (
|
|
1294
|
-
severity:
|
|
1278
|
+
onClose: (v) => R(v, "closeAlert"),
|
|
1279
|
+
severity: $.severity,
|
|
1295
1280
|
variant: "filled",
|
|
1296
|
-
icon:
|
|
1297
|
-
style:
|
|
1298
|
-
children:
|
|
1281
|
+
icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(we, { size: "1em" }) : void 0,
|
|
1282
|
+
style: $.progressIndicator === "linear" ? zn : void 0,
|
|
1283
|
+
children: $.message
|
|
1299
1284
|
}
|
|
1300
1285
|
),
|
|
1301
|
-
|
|
1286
|
+
$.progressIndicator === "linear" && /* @__PURE__ */ o(Vt, { color: "primary" })
|
|
1302
1287
|
] })
|
|
1303
1288
|
})
|
|
1304
1289
|
)
|
|
1305
1290
|
] });
|
|
1306
1291
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const e =
|
|
1292
|
+
function qn() {
|
|
1293
|
+
const e = Qe(mt);
|
|
1309
1294
|
if (e === null)
|
|
1310
|
-
throw new
|
|
1295
|
+
throw new Ae("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1311
1296
|
return e;
|
|
1312
1297
|
}
|
|
1313
|
-
const
|
|
1314
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children:
|
|
1315
|
-
),
|
|
1298
|
+
const So = K(
|
|
1299
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Un, A(r({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1300
|
+
), Xn = nn(), Do = ({
|
|
1316
1301
|
children: e,
|
|
1317
1302
|
store: t
|
|
1318
|
-
}) => /* @__PURE__ */ o(
|
|
1319
|
-
var
|
|
1320
|
-
const
|
|
1321
|
-
JSON.parse((
|
|
1322
|
-
),
|
|
1323
|
-
(e) => e(
|
|
1303
|
+
}) => /* @__PURE__ */ o(nt, { store: t != null ? t : Xn, children: e }), Ct = "domainCode";
|
|
1304
|
+
var qe;
|
|
1305
|
+
const Ue = B(
|
|
1306
|
+
JSON.parse((qe = localStorage.getItem(Ct)) != null ? qe : '{"domainCode": ""}').domainCode
|
|
1307
|
+
), vt = B(
|
|
1308
|
+
(e) => e(Ue),
|
|
1324
1309
|
(e, t, n) => {
|
|
1325
|
-
t(
|
|
1310
|
+
t(Ue, n), localStorage.setItem(Ct, JSON.stringify({ domainCode: n }));
|
|
1326
1311
|
}
|
|
1327
|
-
),
|
|
1312
|
+
), Qn = {
|
|
1328
1313
|
act: "ACT",
|
|
1329
1314
|
nsw: "NSW",
|
|
1330
1315
|
nt: "NT",
|
|
@@ -1336,64 +1321,64 @@ const Qe = N(
|
|
|
1336
1321
|
ag: "AG",
|
|
1337
1322
|
fedmps: "Fedmps",
|
|
1338
1323
|
"": ""
|
|
1339
|
-
},
|
|
1324
|
+
}, jn = (e) => {
|
|
1340
1325
|
var t;
|
|
1341
|
-
return e === null ? "N/A" : (t =
|
|
1342
|
-
},
|
|
1326
|
+
return e === null ? "N/A" : (t = Qn[e]) != null ? t : "";
|
|
1327
|
+
}, ko = ({
|
|
1343
1328
|
isLoading: e,
|
|
1344
1329
|
isOpen: t,
|
|
1345
1330
|
onClose: n,
|
|
1346
|
-
domainOptions:
|
|
1347
|
-
applicationName:
|
|
1348
|
-
handleLogout:
|
|
1331
|
+
domainOptions: i,
|
|
1332
|
+
applicationName: a,
|
|
1333
|
+
handleLogout: s
|
|
1349
1334
|
}) => {
|
|
1350
|
-
const [
|
|
1351
|
-
|
|
1352
|
-
}),
|
|
1353
|
-
|
|
1335
|
+
const [l, p] = U(vt), [c, d] = E(l), { enqueueSuccessNotification: x } = qn(), w = i.length === 0, b = !!l && !i.includes(l) && !i.includes(c), m = !l || w || b, D = () => V(void 0, null, function* () {
|
|
1336
|
+
c ? (p(c), x(`Set domain to ${c}`), n()) : p("");
|
|
1337
|
+
}), k = () => V(void 0, null, function* () {
|
|
1338
|
+
l && !w && !b ? (d(l), n()) : m && s();
|
|
1354
1339
|
});
|
|
1355
|
-
let
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1340
|
+
let O;
|
|
1341
|
+
return w ? O = "Unable to retrieve your active organisations. Try logging in again." : b && (O = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
|
|
1342
|
+
hn,
|
|
1358
1343
|
{
|
|
1359
1344
|
isOpen: t,
|
|
1360
1345
|
dialogTitle: "Select an organisation",
|
|
1361
1346
|
primaryButton: {
|
|
1362
1347
|
text: "Confirm",
|
|
1363
|
-
onClick:
|
|
1364
|
-
disabled: !
|
|
1348
|
+
onClick: D,
|
|
1349
|
+
disabled: !c || w || b,
|
|
1365
1350
|
buttonColor: "primary"
|
|
1366
1351
|
},
|
|
1367
1352
|
secondaryButton: {
|
|
1368
|
-
text:
|
|
1369
|
-
onClick:
|
|
1353
|
+
text: m ? "Logout" : "Cancel",
|
|
1354
|
+
onClick: k
|
|
1370
1355
|
},
|
|
1371
|
-
onClose:
|
|
1356
|
+
onClose: m ? () => {
|
|
1372
1357
|
} : n,
|
|
1373
1358
|
children: [
|
|
1374
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ h(F, { marginBottom: 2, children: [
|
|
1375
1360
|
"Select the default organisation that you want to use with the ",
|
|
1376
|
-
|
|
1361
|
+
a,
|
|
1377
1362
|
"."
|
|
1378
1363
|
] }),
|
|
1379
1364
|
/* @__PURE__ */ o(
|
|
1380
|
-
|
|
1365
|
+
ve,
|
|
1381
1366
|
{
|
|
1382
1367
|
loading: e,
|
|
1383
1368
|
multiple: !1,
|
|
1384
1369
|
disableClearable: !1,
|
|
1385
|
-
value:
|
|
1386
|
-
onChange: (g,
|
|
1387
|
-
getOptionLabel:
|
|
1388
|
-
options: [...
|
|
1370
|
+
value: c !== "" ? c : null,
|
|
1371
|
+
onChange: (g, S) => d(S != null ? S : ""),
|
|
1372
|
+
getOptionLabel: jn,
|
|
1373
|
+
options: [...i],
|
|
1389
1374
|
renderInput: (g) => /* @__PURE__ */ o(
|
|
1390
|
-
|
|
1391
|
-
|
|
1375
|
+
xe,
|
|
1376
|
+
A(r({}, g), {
|
|
1392
1377
|
variant: "filled",
|
|
1393
1378
|
label: "Select organisation",
|
|
1394
|
-
InputProps:
|
|
1395
|
-
endAdornment: /* @__PURE__ */
|
|
1396
|
-
e ? /* @__PURE__ */ o(
|
|
1379
|
+
InputProps: A(r({}, g.InputProps), {
|
|
1380
|
+
endAdornment: /* @__PURE__ */ h(_, { children: [
|
|
1381
|
+
e ? /* @__PURE__ */ o(we, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1397
1382
|
g.InputProps.endAdornment
|
|
1398
1383
|
] })
|
|
1399
1384
|
})
|
|
@@ -1401,11 +1386,11 @@ const Qe = N(
|
|
|
1401
1386
|
)
|
|
1402
1387
|
}
|
|
1403
1388
|
),
|
|
1404
|
-
|
|
1389
|
+
O && /* @__PURE__ */ o(Ut, { error: !0, children: O })
|
|
1405
1390
|
]
|
|
1406
1391
|
}
|
|
1407
1392
|
);
|
|
1408
|
-
},
|
|
1393
|
+
}, Io = Je({
|
|
1409
1394
|
palette: {
|
|
1410
1395
|
primary: {
|
|
1411
1396
|
dark: "#00A651",
|
|
@@ -1456,7 +1441,7 @@ const Qe = N(
|
|
|
1456
1441
|
navBar: {
|
|
1457
1442
|
backgroundColor: "#E8E8E8"
|
|
1458
1443
|
}
|
|
1459
|
-
}),
|
|
1444
|
+
}), Oo = Je({
|
|
1460
1445
|
palette: {
|
|
1461
1446
|
primary: {
|
|
1462
1447
|
main: "#007236",
|
|
@@ -1510,18 +1495,18 @@ const Qe = N(
|
|
|
1510
1495
|
styleOverrides: {
|
|
1511
1496
|
root: ({ theme: e }) => ({
|
|
1512
1497
|
"&.Mui-selected": {
|
|
1513
|
-
backgroundColor:
|
|
1498
|
+
backgroundColor: pe(
|
|
1514
1499
|
e.palette.secondary.main,
|
|
1515
1500
|
e.palette.action.selectedOpacity
|
|
1516
1501
|
),
|
|
1517
1502
|
"&:hover": {
|
|
1518
|
-
backgroundColor:
|
|
1503
|
+
backgroundColor: pe(
|
|
1519
1504
|
e.palette.secondary.main,
|
|
1520
1505
|
e.palette.action.selectedOpacity
|
|
1521
1506
|
)
|
|
1522
1507
|
},
|
|
1523
1508
|
"&.Mui-focusVisible": {
|
|
1524
|
-
backgroundColor:
|
|
1509
|
+
backgroundColor: pe(
|
|
1525
1510
|
e.palette.secondary.main,
|
|
1526
1511
|
e.palette.action.focusOpacity
|
|
1527
1512
|
)
|
|
@@ -1547,68 +1532,73 @@ const Qe = N(
|
|
|
1547
1532
|
navBar: {
|
|
1548
1533
|
backgroundColor: "#E8E8E8"
|
|
1549
1534
|
}
|
|
1550
|
-
}),
|
|
1551
|
-
domainCode:
|
|
1552
|
-
navBarOpen:
|
|
1553
|
-
navBarWidthOpen:
|
|
1554
|
-
navBarWidthClosed:
|
|
1555
|
-
titleText:
|
|
1556
|
-
topBarHeight:
|
|
1557
|
-
navBarTop:
|
|
1558
|
-
},
|
|
1535
|
+
}), Kn = {
|
|
1536
|
+
domainCode: vt,
|
|
1537
|
+
navBarOpen: j,
|
|
1538
|
+
navBarWidthOpen: pt,
|
|
1539
|
+
navBarWidthClosed: ut,
|
|
1540
|
+
titleText: me,
|
|
1541
|
+
topBarHeight: ht,
|
|
1542
|
+
navBarTop: gt
|
|
1543
|
+
}, $o = K(() => ({ children: e }) => /* @__PURE__ */ o(nt, { children: e })), Jn = ({
|
|
1559
1544
|
initialValues: e,
|
|
1560
1545
|
children: t
|
|
1561
|
-
}) => (
|
|
1546
|
+
}) => (ot(e), /* @__PURE__ */ o(_, { children: t })), To = K(
|
|
1562
1547
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1563
|
-
|
|
1548
|
+
Jn,
|
|
1564
1549
|
{
|
|
1565
1550
|
initialValues: Object.entries(e).map(
|
|
1566
|
-
([n,
|
|
1567
|
-
|
|
1568
|
-
|
|
1551
|
+
([n, i]) => [
|
|
1552
|
+
Kn[n],
|
|
1553
|
+
i
|
|
1569
1554
|
]
|
|
1570
1555
|
),
|
|
1571
1556
|
children: t
|
|
1572
1557
|
}
|
|
1573
1558
|
)
|
|
1574
|
-
)
|
|
1559
|
+
), yo = K(() => ({ children: e }) => {
|
|
1560
|
+
const t = new en();
|
|
1561
|
+
return /* @__PURE__ */ o(tn, { client: t, children: e });
|
|
1562
|
+
});
|
|
1575
1563
|
export {
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1564
|
+
hn as AgDialog,
|
|
1565
|
+
Ao as AppLayout,
|
|
1566
|
+
Do as AtomProvider,
|
|
1567
|
+
mt as Context,
|
|
1568
|
+
Ae as ContextError,
|
|
1569
|
+
ko as DomainCodeDialog,
|
|
1570
|
+
go as ExampleComponent,
|
|
1571
|
+
xo as FetchAutocomplete,
|
|
1572
|
+
Jn as HydrateAtoms,
|
|
1573
|
+
rt as NAVBAR_WIDTH_CLOSED,
|
|
1574
|
+
it as NAVBAR_WIDTH_OPENED,
|
|
1575
|
+
vo as NavBar,
|
|
1576
|
+
mo as NavBarDarkStyledList,
|
|
1577
|
+
Co as NavBarLightStyledList,
|
|
1578
|
+
dn as NavBarProvider,
|
|
1579
|
+
bo as PageLayout,
|
|
1580
|
+
Un as SaladBarProvider,
|
|
1581
|
+
wo as SingleAutocomplete,
|
|
1582
|
+
Xn as atomStore,
|
|
1583
|
+
un as buildNavBarState,
|
|
1584
|
+
vt as domainCodeAtom,
|
|
1585
|
+
Io as fed21Theme,
|
|
1586
|
+
Oo as internalAgSystemsTheme,
|
|
1599
1587
|
q as navBarClasses,
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1588
|
+
j as navBarOpenAtom,
|
|
1589
|
+
gt as navBarTopAtom,
|
|
1590
|
+
ut as navBarWidthClosedAtom,
|
|
1591
|
+
pt as navBarWidthOpenAtom,
|
|
1592
|
+
me as titleTextAtom,
|
|
1593
|
+
ht as topBarHeightAtom,
|
|
1594
|
+
kn as topBarMiddleAtom,
|
|
1595
|
+
lt as useAutocompleteOptions,
|
|
1596
|
+
pn as useNavBar,
|
|
1597
|
+
qn as useSaladBar,
|
|
1598
|
+
$o as withAtomProvider,
|
|
1599
|
+
fo as withNavBarProvider,
|
|
1600
|
+
To as withOverrideDefaults,
|
|
1601
|
+
yo as withQueryClient,
|
|
1602
|
+
So as withSaladBarProvider
|
|
1613
1603
|
};
|
|
1614
1604
|
//# sourceMappingURL=index.js.map
|