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