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