@australiangreens/ag-internal-components 0.1.14 → 0.1.16
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/AgDialog/AgDialog.d.ts +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts.map +1 -1
- package/dist/components/ExampleComponent/ExampleComponent.d.ts +1 -2
- package/dist/components/ExampleComponent/ExampleComponent.d.ts.map +1 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts +2 -2
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/components/NavBar/NavBar.d.ts +1 -1
- package/dist/components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarContext.d.ts +1 -1
- package/dist/components/NavBar/NavBarContext.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarDarkStyledList.d.ts +2 -1
- package/dist/components/NavBar/NavBarDarkStyledList.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarLightStyledList.d.ts +2 -1
- package/dist/components/NavBar/NavBarLightStyledList.d.ts.map +1 -1
- package/dist/components/NavBar/NavBarLink.d.ts +1 -1
- package/dist/components/NavBar/NavBarLink.d.ts.map +1 -1
- package/dist/components/SessionExpiryDialog/index.d.ts +1 -2
- package/dist/components/SessionExpiryDialog/index.d.ts.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/domainCode/DomainCodeDialog.d.ts +1 -1
- package/dist/domainCode/DomainCodeDialog.d.ts.map +1 -1
- package/dist/esm/index.js +276 -284
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/LinksMenu.d.ts +1 -2
- package/dist/layouts/AppLayout/NavBar/LinksMenu.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts +1 -2
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/Styling.d.ts +2 -2
- package/dist/layouts/AppLayout/NavBar/Styling.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +1 -2
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -1
- package/dist/layouts/AppLayout/PageContainer.d.ts +1 -1
- package/dist/layouts/AppLayout/PageContainer.d.ts.map +1 -1
- package/dist/layouts/AppLayout/TopBar.d.ts +1 -1
- package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -1
- package/dist/layouts/PageLayout/PageLayout.d.ts +1 -1
- package/dist/layouts/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/layouts/PageLayout/SidePanel.d.ts +1 -1
- package/dist/layouts/PageLayout/SidePanel.d.ts.map +1 -1
- package/dist/layouts/PageLayout/TopBar.d.ts +1 -2
- package/dist/layouts/PageLayout/TopBar.d.ts.map +1 -1
- package/dist/providers/SaladBar/SaladBarContext.d.ts +1 -1
- package/dist/providers/SaladBar/SaladBarContext.d.ts.map +1 -1
- package/dist/providers/SaladBar/defaults.d.ts.map +1 -1
- package/dist/providers/index.d.ts +1 -2
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/testing/wrappers.d.ts +1 -1
- package/dist/testing/wrappers.d.ts.map +1 -1
- package/package.json +26 -26
- package/dist/providers/Atom/AtomProvider.d.ts +0 -99
- package/dist/providers/Atom/AtomProvider.d.ts.map +0 -1
- package/dist/providers/Atom/index.d.ts +0 -2
- package/dist/providers/Atom/index.d.ts.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var _t = Object.defineProperty, Lt = Object.defineProperties;
|
|
2
|
+
var Mt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var oe = Object.getOwnPropertySymbols;
|
|
4
4
|
var Oe = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var ge = (e, t, n) => t in e ?
|
|
5
|
+
var ge = (e, t, n) => t in e ? _t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
Oe.call(t, n) && ge(e, n, t[n]);
|
|
8
8
|
if (oe)
|
|
9
9
|
for (var n of oe(t))
|
|
10
10
|
Be.call(t, n) && ge(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, y = (e, t) =>
|
|
12
|
+
}, y = (e, t) => Lt(e, Mt(t));
|
|
13
13
|
var Fe = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
@@ -19,7 +19,7 @@ var Fe = (e, t) => {
|
|
|
19
19
|
t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var Ne = (e, t, n) =>
|
|
22
|
+
var Ne = (e, t, n) => ge(e, typeof t != "symbol" ? t + "" : t, n);
|
|
23
23
|
var _ = (e, t, n) => new Promise((i, r) => {
|
|
24
24
|
var s = (c) => {
|
|
25
25
|
try {
|
|
@@ -37,25 +37,25 @@ var _ = (e, t, n) => new Promise((i, r) => {
|
|
|
37
37
|
l((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as p, Fragment as N, jsx as o } from "react/jsx-runtime";
|
|
40
|
-
import { useState as F, createContext as Ze, useCallback as se, useContext as je, useEffect as K, createElement as
|
|
41
|
-
import { Typography as O, Button as J, Paper as et, Box as I, Drawer as Ae, styled as be, IconButton as Z, Container as tt, useTheme as le, useMediaQuery as
|
|
42
|
-
import
|
|
40
|
+
import { useState as F, createContext as Ze, useCallback as se, useContext as je, useEffect as K, createElement as we, useMemo as Rt, useRef as fe } from "react";
|
|
41
|
+
import { Typography as O, Button as J, Paper as et, Box as I, Drawer as Ae, styled as be, IconButton as Z, Container as tt, useTheme as le, useMediaQuery as Ht, Collapse as Wt, Avatar as Pe, Fade as Ut, Skeleton as _e, Toolbar as zt, Divider as Le, CssBaseline as Gt, Dialog as nt, LinearProgress as ot, DialogTitle as it, DialogContent as rt, DialogActions as at, Autocomplete as Se, TextField as ye, CircularProgress as Ie, Chip as Vt, Tooltip as qt, Stack as Xt, Snackbar as Qt, Alert as Yt, FormHelperText as Kt } from "@mui/material";
|
|
42
|
+
import Jt from "@mui/material/CssBaseline";
|
|
43
43
|
import { styled as W, createTheme as st, alpha as me } from "@mui/material/styles";
|
|
44
|
-
import { AgError as
|
|
44
|
+
import { AgError as Zt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as Q } from "souvlaki";
|
|
46
|
-
import { BrowserRouter as
|
|
46
|
+
import { BrowserRouter as jt } from "react-router-dom";
|
|
47
47
|
import lt from "@mui/material/List";
|
|
48
|
-
import { ArrowForward as ct, ArrowBack as dt, ViewHeadline as
|
|
49
|
-
import { atom as R, useSetAtom as ut, useAtomValue as Me, useAtom as V,
|
|
50
|
-
import { useHydrateAtoms as
|
|
48
|
+
import { ArrowForward as ct, ArrowBack as dt, ViewHeadline as en, Cancel as tn, ArrowDropDown as nn } from "@mui/icons-material";
|
|
49
|
+
import { atom as R, useSetAtom as ut, useAtomValue as Me, useAtom as V, Provider as on } from "jotai";
|
|
50
|
+
import { useHydrateAtoms as pt } from "jotai/utils";
|
|
51
51
|
import Re from "react-avatar";
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import { useQuery as
|
|
55
|
-
import { useAuth0 as
|
|
56
|
-
import { Buffer as
|
|
57
|
-
import
|
|
58
|
-
function
|
|
52
|
+
import rn from "autosuggest-highlight/match";
|
|
53
|
+
import an from "autosuggest-highlight/parse";
|
|
54
|
+
import { useQuery as sn, QueryClient as ln, QueryClientProvider as cn } from "@tanstack/react-query";
|
|
55
|
+
import { useAuth0 as ht } from "@auth0/auth0-react";
|
|
56
|
+
import { Buffer as dn } from "buffer";
|
|
57
|
+
import un from "@mui/material/Skeleton";
|
|
58
|
+
function To({ text: e }) {
|
|
59
59
|
const [t, n] = F(0);
|
|
60
60
|
return /* @__PURE__ */ p(N, { children: [
|
|
61
61
|
/* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
@@ -79,7 +79,7 @@ function Oo({ text: e }) {
|
|
|
79
79
|
] })
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const gt = 330, ft = 73, z = "Navbar", q = {
|
|
83
83
|
root: `${z}-root`,
|
|
84
84
|
menuButton: `${z}-menuButton`,
|
|
85
85
|
hide: `${z}-hide`,
|
|
@@ -87,7 +87,7 @@ const ft = 330, mt = 73, z = "Navbar", q = {
|
|
|
87
87
|
userInfoHolder: `${z}-userInfoHolder`,
|
|
88
88
|
settings: `${z}-settings`,
|
|
89
89
|
pieChartIcon: `${z}-pieChartIcon`
|
|
90
|
-
},
|
|
90
|
+
}, pn = W(I, {
|
|
91
91
|
name: "NavBar"
|
|
92
92
|
})(({ theme: e }) => ({
|
|
93
93
|
[`&.${q.root}`]: {
|
|
@@ -108,7 +108,7 @@ const ft = 330, mt = 73, z = "Navbar", q = {
|
|
|
108
108
|
marginTop: "64px",
|
|
109
109
|
marginBottom: "16px"
|
|
110
110
|
}
|
|
111
|
-
})),
|
|
111
|
+
})), mt = () => ({
|
|
112
112
|
position: "absolute",
|
|
113
113
|
height: "100%",
|
|
114
114
|
overflowX: "hidden",
|
|
@@ -116,29 +116,29 @@ const ft = 330, mt = 73, z = "Navbar", q = {
|
|
|
116
116
|
color: "white",
|
|
117
117
|
backgroundColor: "black"
|
|
118
118
|
// backgroundColor: '#e8e8e8',
|
|
119
|
-
}),
|
|
119
|
+
}), hn = () => a({
|
|
120
|
+
width: gt
|
|
121
|
+
}, mt()), gn = () => a({
|
|
120
122
|
width: ft
|
|
121
|
-
},
|
|
122
|
-
width: mt
|
|
123
|
-
}, xt()), mn = W(Ae, {
|
|
123
|
+
}, mt()), fn = W(Ae, {
|
|
124
124
|
shouldForwardProp: (e) => e !== "open"
|
|
125
125
|
})(({ theme: e, open: t }) => a(a({
|
|
126
|
-
width: t ?
|
|
126
|
+
width: t ? gt : ft,
|
|
127
127
|
flexShrink: 0,
|
|
128
128
|
whiteSpace: "nowrap",
|
|
129
129
|
boxSizing: "border-box",
|
|
130
130
|
zIndex: e.zIndex.drawer + 100
|
|
131
131
|
}, t && {
|
|
132
|
-
"& .MuiDrawer-paper":
|
|
132
|
+
"& .MuiDrawer-paper": hn()
|
|
133
133
|
}), !t && {
|
|
134
|
-
"& .MuiDrawer-paper":
|
|
134
|
+
"& .MuiDrawer-paper": gn()
|
|
135
135
|
}));
|
|
136
|
-
class ke extends
|
|
136
|
+
class ke extends Zt {
|
|
137
137
|
}
|
|
138
138
|
Ne(ke, "errorName", "ContextError");
|
|
139
|
-
const
|
|
140
|
-
overrideState: e =
|
|
141
|
-
overrideActions: t =
|
|
139
|
+
const xt = Ze(null), mn = {}, xn = {}, Cn = ({
|
|
140
|
+
overrideState: e = mn,
|
|
141
|
+
overrideActions: t = xn,
|
|
142
142
|
children: n
|
|
143
143
|
}) => {
|
|
144
144
|
const [{ open: i }, r] = F({ open: !0 }), s = se((c) => {
|
|
@@ -150,17 +150,17 @@ const Ct = Ze(null), xn = {}, Cn = {}, vn = ({
|
|
|
150
150
|
setOpen: s,
|
|
151
151
|
toggleOpen: d
|
|
152
152
|
}, e), t);
|
|
153
|
-
return /* @__PURE__ */ o(
|
|
153
|
+
return /* @__PURE__ */ o(xt.Provider, { value: l, children: n });
|
|
154
154
|
}, wn = () => {
|
|
155
|
-
const e = je(
|
|
155
|
+
const e = je(xt);
|
|
156
156
|
if (e === null)
|
|
157
157
|
throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
158
158
|
return e;
|
|
159
|
-
},
|
|
159
|
+
}, vn = (e = {}) => a({
|
|
160
160
|
open: !0
|
|
161
|
-
}, e),
|
|
162
|
-
(e =
|
|
163
|
-
),
|
|
161
|
+
}, e), Eo = Q(
|
|
162
|
+
(e = vn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Cn, { overrideState: e, overrideActions: t, children: n })
|
|
163
|
+
), Oo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), He = 7, Bo = W(lt)(({ theme: e }) => ({
|
|
164
164
|
backgroundColor: "black",
|
|
165
165
|
color: "white",
|
|
166
166
|
"& .MuiListItem-root": {
|
|
@@ -198,7 +198,7 @@ const Ct = Ze(null), xn = {}, Cn = {}, vn = ({
|
|
|
198
198
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
199
199
|
// },
|
|
200
200
|
}
|
|
201
|
-
})), We = 7,
|
|
201
|
+
})), We = 7, Fo = W(lt)(({ theme: e }) => ({
|
|
202
202
|
backgroundColor: "#e8e8e8",
|
|
203
203
|
color: "inherit",
|
|
204
204
|
"& .MuiListItem-root": {
|
|
@@ -237,15 +237,15 @@ const Ct = Ze(null), xn = {}, Cn = {}, vn = ({
|
|
|
237
237
|
// },
|
|
238
238
|
}
|
|
239
239
|
}));
|
|
240
|
-
function
|
|
240
|
+
function No({
|
|
241
241
|
"data-testid": e,
|
|
242
242
|
children: t
|
|
243
243
|
}) {
|
|
244
244
|
const { open: n } = wn();
|
|
245
|
-
return /* @__PURE__ */ p(
|
|
246
|
-
/* @__PURE__ */ o(
|
|
245
|
+
return /* @__PURE__ */ p(pn, { className: q.root, "data-testid": e, children: [
|
|
246
|
+
/* @__PURE__ */ o(Jt, {}),
|
|
247
247
|
/* @__PURE__ */ o(
|
|
248
|
-
|
|
248
|
+
fn,
|
|
249
249
|
{
|
|
250
250
|
variant: "permanent",
|
|
251
251
|
anchor: "left",
|
|
@@ -256,14 +256,14 @@ function _o({
|
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
const
|
|
259
|
+
const An = 24, bn = 64, G = "TopBar", B = {
|
|
260
260
|
topStripe: `${G}-topStripe`,
|
|
261
261
|
titleBar: `${G}-titleBar`,
|
|
262
262
|
titleSlider: `${G}-titleSlider`,
|
|
263
263
|
titleText: `${G}-titleText`,
|
|
264
264
|
leftPanelButton: `${G}-leftPanelButton`,
|
|
265
265
|
rightPanelButton: `${G}-leftPanelButton`
|
|
266
|
-
},
|
|
266
|
+
}, Sn = be("div", {
|
|
267
267
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
268
268
|
name: G
|
|
269
269
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -272,12 +272,12 @@ const bn = 24, Sn = 64, G = "TopBar", B = {
|
|
|
272
272
|
width: "100%",
|
|
273
273
|
[`& .${B.topStripe}`]: {
|
|
274
274
|
width: "100%",
|
|
275
|
-
height: `${
|
|
275
|
+
height: `${An}px`,
|
|
276
276
|
backgroundColor: e.palette.primary.main
|
|
277
277
|
},
|
|
278
278
|
[`& .${B.titleBar}`]: {
|
|
279
279
|
backgroundColor: e.palette.primary.light,
|
|
280
|
-
height: `${
|
|
280
|
+
height: `${bn}px`,
|
|
281
281
|
padding: e.spacing(0, 3),
|
|
282
282
|
width: "100%"
|
|
283
283
|
},
|
|
@@ -315,13 +315,13 @@ const bn = 24, Sn = 64, G = "TopBar", B = {
|
|
|
315
315
|
})
|
|
316
316
|
};
|
|
317
317
|
});
|
|
318
|
-
function
|
|
318
|
+
function yn({
|
|
319
319
|
titleText: e = "",
|
|
320
320
|
leftPanel: t,
|
|
321
321
|
rightPanel: n,
|
|
322
322
|
"data-testid": i
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */ p(
|
|
324
|
+
return /* @__PURE__ */ p(Sn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
325
325
|
/* @__PURE__ */ o("div", { className: B.topStripe }),
|
|
326
326
|
/* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ p(I, { className: B.titleSlider, children: [
|
|
327
327
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
|
|
@@ -358,7 +358,7 @@ function In({
|
|
|
358
358
|
] }) })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const Ct = 400, In = be(Ae, {
|
|
362
362
|
shouldForwardProp: (e) => (
|
|
363
363
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
364
364
|
![
|
|
@@ -388,7 +388,7 @@ const vt = 400, kn = be(Ae, {
|
|
|
388
388
|
marginLeft: `${r}px`
|
|
389
389
|
}))
|
|
390
390
|
})
|
|
391
|
-
),
|
|
391
|
+
), kn = be(I, {
|
|
392
392
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
393
393
|
})(({ theme: e, anchor: t }) => y(a({
|
|
394
394
|
display: "flex",
|
|
@@ -415,19 +415,19 @@ function Ue({
|
|
|
415
415
|
onClose: i = () => {
|
|
416
416
|
},
|
|
417
417
|
titleText: r = "",
|
|
418
|
-
width: s =
|
|
418
|
+
width: s = Ct,
|
|
419
419
|
showCloseArrow: d = !0,
|
|
420
420
|
debugOpacity: l = !1,
|
|
421
421
|
headerBoxProps: c = {},
|
|
422
422
|
onOpened: u,
|
|
423
423
|
onClosed: g,
|
|
424
424
|
"data-testid": C,
|
|
425
|
-
navBarOpen:
|
|
425
|
+
navBarOpen: v = !1,
|
|
426
426
|
navBarWidthOpen: h = 0,
|
|
427
427
|
navBarWidthClosed: b = 0
|
|
428
428
|
}) {
|
|
429
429
|
return /* @__PURE__ */ p(
|
|
430
|
-
|
|
430
|
+
In,
|
|
431
431
|
{
|
|
432
432
|
SlideProps: {
|
|
433
433
|
onEntered: () => u == null ? void 0 : u(),
|
|
@@ -439,11 +439,11 @@ function Ue({
|
|
|
439
439
|
width: s,
|
|
440
440
|
debugOpacity: l,
|
|
441
441
|
"data-testid": C,
|
|
442
|
-
navBarOpen:
|
|
442
|
+
navBarOpen: v,
|
|
443
443
|
navBarWidthOpen: h,
|
|
444
444
|
navBarWidthClosed: b,
|
|
445
445
|
children: [
|
|
446
|
-
/* @__PURE__ */ o(
|
|
446
|
+
/* @__PURE__ */ o(kn, y(a({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ p(N, { children: [
|
|
447
447
|
/* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
448
448
|
d && /* @__PURE__ */ p(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
449
449
|
/* @__PURE__ */ o(dt, { "data-testid": "arrowbackicon" }),
|
|
@@ -461,7 +461,7 @@ function Ue({
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const $n = W(I, {
|
|
465
465
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
466
466
|
name: "PanelAwareMargins"
|
|
467
467
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -484,7 +484,7 @@ const Dn = W(I, {
|
|
|
484
484
|
}),
|
|
485
485
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
486
486
|
});
|
|
487
|
-
}),
|
|
487
|
+
}), Dn = W(tt, {
|
|
488
488
|
name: "PageContainer"
|
|
489
489
|
})(({ theme: e }) => ({
|
|
490
490
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -494,7 +494,7 @@ const Dn = W(I, {
|
|
|
494
494
|
})), xe = !1, Ce = !1, ie = {
|
|
495
495
|
titleText: "",
|
|
496
496
|
flavour: "push",
|
|
497
|
-
width:
|
|
497
|
+
width: Ct,
|
|
498
498
|
arrowButtons: "both",
|
|
499
499
|
startOpen: !1,
|
|
500
500
|
open: void 0,
|
|
@@ -504,7 +504,7 @@ const Dn = W(I, {
|
|
|
504
504
|
onClosed: void 0,
|
|
505
505
|
dataTestId: void 0
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function Po({
|
|
508
508
|
children: e,
|
|
509
509
|
titleText: t = "",
|
|
510
510
|
leftPanel: n,
|
|
@@ -518,8 +518,8 @@ function Lo({
|
|
|
518
518
|
navBarWidthOpen: g,
|
|
519
519
|
navBarWidthClosed: C
|
|
520
520
|
}) {
|
|
521
|
-
const [
|
|
522
|
-
titleText:
|
|
521
|
+
const [v, h] = F(xe), [b, S] = F(Ce), [$, D] = F(xe), [E, T] = F(Ce), L = n !== void 0, P = i !== void 0, {
|
|
522
|
+
titleText: w,
|
|
523
523
|
content: k,
|
|
524
524
|
flavour: M,
|
|
525
525
|
open: f,
|
|
@@ -529,40 +529,40 @@ function Lo({
|
|
|
529
529
|
startOpen: H,
|
|
530
530
|
onOpened: ee,
|
|
531
531
|
onClosed: ce,
|
|
532
|
-
dataTestId:
|
|
532
|
+
dataTestId: Et
|
|
533
533
|
} = n ? a(a({}, ie), n) : a({}, ie), {
|
|
534
|
-
titleText:
|
|
535
|
-
content:
|
|
534
|
+
titleText: Ot,
|
|
535
|
+
content: Bt,
|
|
536
536
|
flavour: $e,
|
|
537
537
|
open: de,
|
|
538
538
|
onChangeOpen: De,
|
|
539
539
|
width: ue,
|
|
540
540
|
arrowButtons: te,
|
|
541
541
|
startOpen: ne,
|
|
542
|
-
onOpened:
|
|
543
|
-
onClosed:
|
|
544
|
-
dataTestId:
|
|
542
|
+
onOpened: Ft,
|
|
543
|
+
onClosed: Nt,
|
|
544
|
+
dataTestId: Pt
|
|
545
545
|
} = i ? a(a({}, ie), i) : a({}, ie);
|
|
546
546
|
K(() => {
|
|
547
547
|
H !== xe && (h(H), D(H));
|
|
548
548
|
}, [H]), K(() => {
|
|
549
549
|
ne !== Ce && (S(ne), T(ne));
|
|
550
550
|
}, [ne]);
|
|
551
|
-
const pe = f === void 0 ?
|
|
551
|
+
const pe = f === void 0 ? v : f, he = de === void 0 ? b : de, Te = (U) => {
|
|
552
552
|
f === void 0 && (h(U), r && P && (U ? (S(!1), T(b)) : S(E))), m && m(U);
|
|
553
553
|
}, Ee = (U) => {
|
|
554
|
-
de === void 0 && (S(U), r && L && (U ? (h(!1), D(
|
|
554
|
+
de === void 0 && (S(U), r && L && (U ? (h(!1), D(v)) : h($))), De && De(U);
|
|
555
555
|
};
|
|
556
556
|
return /* @__PURE__ */ p(I, { children: [
|
|
557
557
|
L && /* @__PURE__ */ o(
|
|
558
558
|
Ue,
|
|
559
559
|
{
|
|
560
|
-
"data-testid":
|
|
560
|
+
"data-testid": Et,
|
|
561
561
|
anchor: "left",
|
|
562
562
|
open: pe,
|
|
563
563
|
onClose: () => Te(!1),
|
|
564
564
|
width: x,
|
|
565
|
-
titleText:
|
|
565
|
+
titleText: w,
|
|
566
566
|
debugOpacity: s,
|
|
567
567
|
showCloseArrow: A === "both" || A === "close",
|
|
568
568
|
onOpened: ee,
|
|
@@ -576,24 +576,24 @@ function Lo({
|
|
|
576
576
|
P && /* @__PURE__ */ o(
|
|
577
577
|
Ue,
|
|
578
578
|
{
|
|
579
|
-
"data-testid":
|
|
579
|
+
"data-testid": Pt,
|
|
580
580
|
anchor: "right",
|
|
581
581
|
open: he,
|
|
582
582
|
onClose: () => Ee(!1),
|
|
583
583
|
width: ue,
|
|
584
|
-
titleText:
|
|
584
|
+
titleText: Ot,
|
|
585
585
|
debugOpacity: s,
|
|
586
586
|
showCloseArrow: te === "both" || te === "close",
|
|
587
|
-
onOpened:
|
|
588
|
-
onClosed:
|
|
587
|
+
onOpened: Ft,
|
|
588
|
+
onClosed: Nt,
|
|
589
589
|
navBarOpen: u,
|
|
590
590
|
navBarWidthOpen: g,
|
|
591
591
|
navBarWidthClosed: C,
|
|
592
|
-
children:
|
|
592
|
+
children: Bt
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ o(
|
|
596
|
-
|
|
596
|
+
yn,
|
|
597
597
|
a(a({
|
|
598
598
|
titleText: t,
|
|
599
599
|
"data-testid": c
|
|
@@ -614,7 +614,7 @@ function Lo({
|
|
|
614
614
|
} : {})
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ o(
|
|
617
|
-
|
|
617
|
+
$n,
|
|
618
618
|
y(a(a({}, M === "push" ? {
|
|
619
619
|
leftPanel: {
|
|
620
620
|
open: pe,
|
|
@@ -626,16 +626,16 @@ function Lo({
|
|
|
626
626
|
width: ue
|
|
627
627
|
}
|
|
628
628
|
} : {}), {
|
|
629
|
-
children: /* @__PURE__ */ o(
|
|
629
|
+
children: /* @__PURE__ */ o(Dn, y(a({ "data-testid": l }, d), { children: e }))
|
|
630
630
|
})
|
|
631
631
|
)
|
|
632
632
|
] });
|
|
633
633
|
}
|
|
634
634
|
const wt = () => {
|
|
635
635
|
const e = le();
|
|
636
|
-
return
|
|
637
|
-
},
|
|
638
|
-
function
|
|
636
|
+
return Ht(e.breakpoints.down("sm"));
|
|
637
|
+
}, Tn = 64, En = 72, On = 256, j = R(!0), vt = R(On), At = R(En), ve = R(""), Bn = R(void 0), bt = R(Tn), St = R(void 0);
|
|
638
|
+
function Fn({ links: e }) {
|
|
639
639
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
640
640
|
}
|
|
641
641
|
const re = "Navbar", Y = {
|
|
@@ -646,7 +646,7 @@ const re = "Navbar", Y = {
|
|
|
646
646
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
647
647
|
// settings: `${PREFIX}-settings`,
|
|
648
648
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
649
|
-
},
|
|
649
|
+
}, Nn = W(I, { name: "NavBar" })(({ theme: e }) => ({
|
|
650
650
|
[`&.${Y.root}`]: {
|
|
651
651
|
display: "flex"
|
|
652
652
|
},
|
|
@@ -668,10 +668,10 @@ const re = "Navbar", Y = {
|
|
|
668
668
|
})), X = (e, t, n) => e.transitions.create(t, {
|
|
669
669
|
easing: e.transitions.easing.sharp,
|
|
670
670
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
671
|
-
}),
|
|
671
|
+
}), Pn = (e) => {
|
|
672
672
|
const t = le();
|
|
673
673
|
return /* @__PURE__ */ o(
|
|
674
|
-
|
|
674
|
+
Wt,
|
|
675
675
|
a({
|
|
676
676
|
easing: t.transitions.easing.sharp,
|
|
677
677
|
timeout: {
|
|
@@ -680,7 +680,7 @@ const re = "Navbar", Y = {
|
|
|
680
680
|
}
|
|
681
681
|
}, e)
|
|
682
682
|
);
|
|
683
|
-
},
|
|
683
|
+
}, yt = (e) => {
|
|
684
684
|
var t, n;
|
|
685
685
|
return {
|
|
686
686
|
overflowX: "hidden",
|
|
@@ -691,10 +691,10 @@ const re = "Navbar", Y = {
|
|
|
691
691
|
}, ze = (e, t) => a({
|
|
692
692
|
width: t,
|
|
693
693
|
transition: X(e, "width", "entering")
|
|
694
|
-
},
|
|
694
|
+
}, yt(e)), Ge = (e, t) => a({
|
|
695
695
|
width: t,
|
|
696
696
|
transition: X(e, "width", "leaving")
|
|
697
|
-
},
|
|
697
|
+
}, yt(e)), _n = W(Ae, {
|
|
698
698
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
699
699
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
|
|
700
700
|
flexShrink: 0,
|
|
@@ -715,12 +715,11 @@ const re = "Navbar", Y = {
|
|
|
715
715
|
info: console.info.bind(console),
|
|
716
716
|
debug: console.debug.bind(console)
|
|
717
717
|
};
|
|
718
|
-
function
|
|
718
|
+
function _o(e, t) {
|
|
719
719
|
console[e] = (...n) => {
|
|
720
720
|
for (const i of t)
|
|
721
721
|
if (typeof i == "function") {
|
|
722
|
-
if (i(...n))
|
|
723
|
-
return;
|
|
722
|
+
if (i(...n)) return;
|
|
724
723
|
} else if (i instanceof RegExp && n.length > 0) {
|
|
725
724
|
for (const r of n)
|
|
726
725
|
if (typeof r == "string" && i.test(r))
|
|
@@ -729,14 +728,14 @@ function Mo(e, t) {
|
|
|
729
728
|
ae[e](n);
|
|
730
729
|
};
|
|
731
730
|
}
|
|
732
|
-
function
|
|
731
|
+
function Lo(e) {
|
|
733
732
|
if (e)
|
|
734
733
|
console[e] = ae[e];
|
|
735
734
|
else
|
|
736
735
|
for (const t of Object.keys(ae))
|
|
737
736
|
console[t] = ae[t];
|
|
738
737
|
}
|
|
739
|
-
function
|
|
738
|
+
function Ln(e) {
|
|
740
739
|
let t = 0;
|
|
741
740
|
for (let n = 0, i = e.length; n < i; n++) {
|
|
742
741
|
const r = e.charCodeAt(n);
|
|
@@ -745,7 +744,7 @@ function Mn(e) {
|
|
|
745
744
|
return t;
|
|
746
745
|
}
|
|
747
746
|
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], qe = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
748
|
-
function
|
|
747
|
+
function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
749
748
|
const r = le();
|
|
750
749
|
return /* @__PURE__ */ p(
|
|
751
750
|
I,
|
|
@@ -773,7 +772,7 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
773
772
|
sx: {
|
|
774
773
|
width: "100%",
|
|
775
774
|
height: "100%",
|
|
776
|
-
bgcolor: Ve[Math.abs(
|
|
775
|
+
bgcolor: Ve[Math.abs(Ln(e == null ? void 0 : e.name)) % Ve.length]
|
|
777
776
|
},
|
|
778
777
|
children: qe(e == null ? void 0 : e.name)
|
|
779
778
|
}
|
|
@@ -796,7 +795,7 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
796
795
|
] }) }) : /* @__PURE__ */ o(Re, {})
|
|
797
796
|
}
|
|
798
797
|
),
|
|
799
|
-
/* @__PURE__ */ o(
|
|
798
|
+
/* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ut, { in: n, children: /* @__PURE__ */ p(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
800
799
|
e != null && e.name ? /* @__PURE__ */ o(O, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(_e, { animation: !1, width: "50%" }),
|
|
801
800
|
t ? /* @__PURE__ */ o(O, { children: t.toUpperCase() }) : /* @__PURE__ */ o(_e, { animation: !1, width: "25%" })
|
|
802
801
|
] }) }) })
|
|
@@ -804,7 +803,7 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
|
|
|
804
803
|
}
|
|
805
804
|
);
|
|
806
805
|
}
|
|
807
|
-
function
|
|
806
|
+
function Rn({
|
|
808
807
|
open: e,
|
|
809
808
|
widthClosed: t,
|
|
810
809
|
widthOpen: n,
|
|
@@ -817,8 +816,8 @@ function Hn({
|
|
|
817
816
|
useNewAvatar: u = !1
|
|
818
817
|
}) {
|
|
819
818
|
const g = wt(), C = ut(j);
|
|
820
|
-
return /* @__PURE__ */ o(
|
|
821
|
-
|
|
819
|
+
return /* @__PURE__ */ o(Nn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ p(
|
|
820
|
+
_n,
|
|
822
821
|
{
|
|
823
822
|
open: e,
|
|
824
823
|
widthOpen: n,
|
|
@@ -833,22 +832,22 @@ function Hn({
|
|
|
833
832
|
},
|
|
834
833
|
isSmallScreen: g,
|
|
835
834
|
children: [
|
|
836
|
-
!g && /* @__PURE__ */ o(
|
|
835
|
+
!g && /* @__PURE__ */ o(zt, {}),
|
|
837
836
|
r && /* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
838
837
|
r,
|
|
839
838
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
840
839
|
] }),
|
|
841
|
-
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(
|
|
840
|
+
/* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Fn, { links: s }) : s }),
|
|
842
841
|
/* @__PURE__ */ p(I, { flexGrow: "0", children: [
|
|
843
842
|
/* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
844
|
-
/* @__PURE__ */ o(
|
|
843
|
+
/* @__PURE__ */ o(Mn, { user: l, domainCode: c, open: e, useNewAvatar: u }),
|
|
845
844
|
d && /* @__PURE__ */ o(N, { children: d })
|
|
846
845
|
] })
|
|
847
846
|
]
|
|
848
847
|
}
|
|
849
848
|
) });
|
|
850
849
|
}
|
|
851
|
-
function
|
|
850
|
+
function Hn({
|
|
852
851
|
children: e,
|
|
853
852
|
topBarHeight: t,
|
|
854
853
|
maxWidth: n = !1,
|
|
@@ -875,10 +874,10 @@ function Wn({
|
|
|
875
874
|
}
|
|
876
875
|
);
|
|
877
876
|
}
|
|
878
|
-
const
|
|
879
|
-
titleText: `${
|
|
877
|
+
const Wn = "TopBar", Un = {
|
|
878
|
+
titleText: `${Wn}-titleText`
|
|
880
879
|
};
|
|
881
|
-
function
|
|
880
|
+
function zn({
|
|
882
881
|
titleText: e = "",
|
|
883
882
|
height: t,
|
|
884
883
|
"data-testid": n,
|
|
@@ -910,16 +909,16 @@ function Gn({
|
|
|
910
909
|
color: "inherit",
|
|
911
910
|
sx: { padding: 1.5, marginLeft: "12px" },
|
|
912
911
|
onClick: s,
|
|
913
|
-
children: /* @__PURE__ */ o(
|
|
912
|
+
children: /* @__PURE__ */ o(en, { fontSize: "medium" })
|
|
914
913
|
}
|
|
915
914
|
),
|
|
916
|
-
/* @__PURE__ */ o(O, { className:
|
|
915
|
+
/* @__PURE__ */ o(O, { className: Un.titleText, variant: "h6", component: "h1", children: e }),
|
|
917
916
|
i
|
|
918
917
|
]
|
|
919
918
|
}
|
|
920
919
|
) });
|
|
921
920
|
}
|
|
922
|
-
function
|
|
921
|
+
function Mo({
|
|
923
922
|
children: e,
|
|
924
923
|
initialTitleText: t,
|
|
925
924
|
initialNavBarOpen: n,
|
|
@@ -933,15 +932,15 @@ function Ho({
|
|
|
933
932
|
domainCode: g,
|
|
934
933
|
useNewAvatar: C = !1
|
|
935
934
|
}) {
|
|
936
|
-
|
|
935
|
+
pt([
|
|
937
936
|
[j, n != null ? n : !0],
|
|
938
|
-
[
|
|
937
|
+
[ve, t != null ? t : ""]
|
|
939
938
|
]);
|
|
940
|
-
const
|
|
939
|
+
const v = Me(j), [h] = V(vt), [b] = V(At), S = Me(ve), [$] = V(bt), [D] = V(Bn), [E] = V(St);
|
|
941
940
|
return /* @__PURE__ */ p(I, { children: [
|
|
942
|
-
/* @__PURE__ */ o(
|
|
941
|
+
/* @__PURE__ */ o(Gt, {}),
|
|
943
942
|
/* @__PURE__ */ o(
|
|
944
|
-
|
|
943
|
+
zn,
|
|
945
944
|
{
|
|
946
945
|
titleText: S,
|
|
947
946
|
"data-testid": s,
|
|
@@ -951,9 +950,9 @@ function Ho({
|
|
|
951
950
|
),
|
|
952
951
|
/* @__PURE__ */ p(I, { sx: { display: "flex" }, children: [
|
|
953
952
|
/* @__PURE__ */ o(
|
|
954
|
-
|
|
953
|
+
Rn,
|
|
955
954
|
{
|
|
956
|
-
open:
|
|
955
|
+
open: v,
|
|
957
956
|
top: E,
|
|
958
957
|
middle: l,
|
|
959
958
|
bottom: c,
|
|
@@ -967,7 +966,7 @@ function Ho({
|
|
|
967
966
|
}
|
|
968
967
|
),
|
|
969
968
|
/* @__PURE__ */ o(
|
|
970
|
-
|
|
969
|
+
Hn,
|
|
971
970
|
y(a({
|
|
972
971
|
"data-testid": r,
|
|
973
972
|
topBarHeight: $
|
|
@@ -978,7 +977,7 @@ function Ho({
|
|
|
978
977
|
] })
|
|
979
978
|
] });
|
|
980
979
|
}
|
|
981
|
-
const
|
|
980
|
+
const It = ({
|
|
982
981
|
isOpen: e,
|
|
983
982
|
dialogTitle: t,
|
|
984
983
|
children: n,
|
|
@@ -992,7 +991,7 @@ const kt = ({
|
|
|
992
991
|
isLoading: g = !1
|
|
993
992
|
}) => {
|
|
994
993
|
var h, b;
|
|
995
|
-
const [C,
|
|
994
|
+
const [C, v] = F(!1);
|
|
996
995
|
return /* @__PURE__ */ p(
|
|
997
996
|
nt,
|
|
998
997
|
{
|
|
@@ -1024,7 +1023,7 @@ const kt = ({
|
|
|
1024
1023
|
{
|
|
1025
1024
|
onClick: () => _(void 0, null, function* () {
|
|
1026
1025
|
var S;
|
|
1027
|
-
|
|
1026
|
+
v(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), v(!1);
|
|
1028
1027
|
}),
|
|
1029
1028
|
"data-testid": r.testId,
|
|
1030
1029
|
disabled: r.disabled || C,
|
|
@@ -1036,19 +1035,19 @@ const kt = ({
|
|
|
1036
1035
|
]
|
|
1037
1036
|
}
|
|
1038
1037
|
);
|
|
1039
|
-
},
|
|
1038
|
+
}, kt = ({
|
|
1040
1039
|
minLength: e,
|
|
1041
1040
|
preLoadedOptions: t,
|
|
1042
1041
|
lookup: n,
|
|
1043
1042
|
label: i,
|
|
1044
1043
|
inputValue: r
|
|
1045
|
-
}) =>
|
|
1044
|
+
}) => sn({
|
|
1046
1045
|
queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
|
|
1047
1046
|
(s) => s.label.toLowerCase().includes(r.toLowerCase())
|
|
1048
1047
|
) : n(r),
|
|
1049
1048
|
queryKey: ["autocomplete", i, r]
|
|
1050
1049
|
});
|
|
1051
|
-
function
|
|
1050
|
+
function Ro({
|
|
1052
1051
|
lookup: e = () => _(this, null, function* () {
|
|
1053
1052
|
}),
|
|
1054
1053
|
enableHighlighting: t = !0,
|
|
@@ -1062,8 +1061,8 @@ function Wo({
|
|
|
1062
1061
|
textFieldColor: u,
|
|
1063
1062
|
textFieldVariant: g = "filled",
|
|
1064
1063
|
loadingText: C = "Loading...",
|
|
1065
|
-
noOptionsText:
|
|
1066
|
-
popupIcon: h = /* @__PURE__ */ o(
|
|
1064
|
+
noOptionsText: v = "No options",
|
|
1065
|
+
popupIcon: h = /* @__PURE__ */ o(nn, {}),
|
|
1067
1066
|
error: b = !1,
|
|
1068
1067
|
helperText: S = "",
|
|
1069
1068
|
preLoadedOptions: $ = void 0,
|
|
@@ -1073,7 +1072,7 @@ function Wo({
|
|
|
1073
1072
|
const [T, L] = F(""), P = (f, m) => {
|
|
1074
1073
|
const x = s.filter((A) => A.id !== m);
|
|
1075
1074
|
n(x, "delete", f);
|
|
1076
|
-
}, { data:
|
|
1075
|
+
}, { data: w, isLoading: k } = kt({
|
|
1077
1076
|
inputValue: T,
|
|
1078
1077
|
label: r,
|
|
1079
1078
|
lookup: e,
|
|
@@ -1090,7 +1089,7 @@ function Wo({
|
|
|
1090
1089
|
multiple: !0,
|
|
1091
1090
|
getOptionLabel: (f) => typeof f == "string" ? f : f.label,
|
|
1092
1091
|
loading: M ? k : !1,
|
|
1093
|
-
options: [...s, ...
|
|
1092
|
+
options: [...s, ...w != null ? w : []],
|
|
1094
1093
|
filterSelectedOptions: !0,
|
|
1095
1094
|
includeInputInList: !0,
|
|
1096
1095
|
value: s,
|
|
@@ -1098,7 +1097,7 @@ function Wo({
|
|
|
1098
1097
|
n(m, x, f);
|
|
1099
1098
|
},
|
|
1100
1099
|
onInputChange: (f, m) => L(m),
|
|
1101
|
-
noOptionsText: M ?
|
|
1100
|
+
noOptionsText: M ? v : "Start typing to search",
|
|
1102
1101
|
loadingText: C,
|
|
1103
1102
|
popupIcon: h,
|
|
1104
1103
|
renderInput: (f) => /* @__PURE__ */ o(
|
|
@@ -1126,11 +1125,11 @@ function Wo({
|
|
|
1126
1125
|
isOptionEqualToValue: (f, m) => f.id === m.id,
|
|
1127
1126
|
renderOption: (f, m, x) => {
|
|
1128
1127
|
if (t) {
|
|
1129
|
-
const A =
|
|
1128
|
+
const A = rn(m.label, x.inputValue, {
|
|
1130
1129
|
insideWords: !0,
|
|
1131
1130
|
findAllOccurrences: !0
|
|
1132
|
-
}), H =
|
|
1133
|
-
return /* @__PURE__ */
|
|
1131
|
+
}), H = an(m.label, A);
|
|
1132
|
+
return /* @__PURE__ */ we(
|
|
1134
1133
|
"li",
|
|
1135
1134
|
y(a({}, f), {
|
|
1136
1135
|
key: m.id,
|
|
@@ -1148,7 +1147,7 @@ function Wo({
|
|
|
1148
1147
|
)) })
|
|
1149
1148
|
);
|
|
1150
1149
|
} else
|
|
1151
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ we(
|
|
1152
1151
|
"li",
|
|
1153
1152
|
y(a({}, f), {
|
|
1154
1153
|
key: m.id,
|
|
@@ -1160,7 +1159,7 @@ function Wo({
|
|
|
1160
1159
|
}
|
|
1161
1160
|
),
|
|
1162
1161
|
s.length > 0 && /* @__PURE__ */ o(I, { sx: c, children: s.map((f) => /* @__PURE__ */ o(
|
|
1163
|
-
|
|
1162
|
+
Vt,
|
|
1164
1163
|
{
|
|
1165
1164
|
sx: {
|
|
1166
1165
|
marginTop: 1,
|
|
@@ -1168,7 +1167,7 @@ function Wo({
|
|
|
1168
1167
|
height: "auto"
|
|
1169
1168
|
},
|
|
1170
1169
|
label: /* @__PURE__ */ o(
|
|
1171
|
-
|
|
1170
|
+
qt,
|
|
1172
1171
|
{
|
|
1173
1172
|
title: f.tooltipContent || "",
|
|
1174
1173
|
placement: "bottom-start",
|
|
@@ -1188,7 +1187,7 @@ function Wo({
|
|
|
1188
1187
|
"data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
|
|
1189
1188
|
onDelete: (m) => P(m, f.id),
|
|
1190
1189
|
deleteIcon: /* @__PURE__ */ o(
|
|
1191
|
-
|
|
1190
|
+
tn,
|
|
1192
1191
|
{
|
|
1193
1192
|
"data-testid": d ? `${d}:Chip(${f.id.toString()}):deleteIcon` : void 0
|
|
1194
1193
|
}
|
|
@@ -1198,7 +1197,7 @@ function Wo({
|
|
|
1198
1197
|
)) })
|
|
1199
1198
|
] });
|
|
1200
1199
|
}
|
|
1201
|
-
const
|
|
1200
|
+
const Ho = /MUI: The value provided to.*is invalid/i, Wo = ({
|
|
1202
1201
|
lookup: e = () => _(void 0, null, function* () {
|
|
1203
1202
|
}),
|
|
1204
1203
|
onChange: t,
|
|
@@ -1212,40 +1211,40 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
|
1212
1211
|
noOptionsText: u = "No options",
|
|
1213
1212
|
minLength: g = 3,
|
|
1214
1213
|
disablePortal: C = !1,
|
|
1215
|
-
preLoadedOptions:
|
|
1214
|
+
preLoadedOptions: v,
|
|
1216
1215
|
helperText: h = "",
|
|
1217
1216
|
disabled: b,
|
|
1218
1217
|
popupIcon: S,
|
|
1219
1218
|
disableIconFlip: $
|
|
1220
1219
|
}) => {
|
|
1221
|
-
const [D, E] = F(""), { data: T, isLoading: L } =
|
|
1220
|
+
const [D, E] = F(""), { data: T, isLoading: L } = kt({
|
|
1222
1221
|
inputValue: D,
|
|
1223
1222
|
label: n,
|
|
1224
1223
|
lookup: e,
|
|
1225
1224
|
minLength: g != null ? g : 0,
|
|
1226
|
-
preLoadedOptions:
|
|
1225
|
+
preLoadedOptions: v
|
|
1227
1226
|
}), P = D.length >= g;
|
|
1228
|
-
return /* @__PURE__ */ o("div", { "data-testid": c, children: /* @__PURE__ */ o(
|
|
1227
|
+
return /* @__PURE__ */ o("div", { "data-testid": c, children: /* @__PURE__ */ o(Xt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
1229
1228
|
Se,
|
|
1230
1229
|
{
|
|
1231
1230
|
sx: a(a({}, r), $ ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
1232
1231
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
1233
1232
|
loading: P ? L : !1,
|
|
1234
1233
|
options: T != null ? T : [],
|
|
1235
|
-
onChange: (
|
|
1236
|
-
t(
|
|
1234
|
+
onChange: (w, k, M) => {
|
|
1235
|
+
t(w, k, M);
|
|
1237
1236
|
},
|
|
1238
1237
|
disablePortal: C,
|
|
1239
|
-
filterOptions: (
|
|
1238
|
+
filterOptions: (w) => w,
|
|
1240
1239
|
value: i,
|
|
1241
1240
|
noOptionsText: P ? u : "Start typing to search",
|
|
1242
|
-
getOptionLabel: (
|
|
1241
|
+
getOptionLabel: (w) => w.label,
|
|
1243
1242
|
popupIcon: S,
|
|
1244
|
-
renderInput: (
|
|
1243
|
+
renderInput: (w) => /* @__PURE__ */ o(
|
|
1245
1244
|
ye,
|
|
1246
1245
|
y(a({
|
|
1247
1246
|
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0
|
|
1248
|
-
},
|
|
1247
|
+
}, w), {
|
|
1249
1248
|
variant: d,
|
|
1250
1249
|
label: n,
|
|
1251
1250
|
color: s,
|
|
@@ -1253,13 +1252,13 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
|
1253
1252
|
helperText: h
|
|
1254
1253
|
})
|
|
1255
1254
|
),
|
|
1256
|
-
isOptionEqualToValue: (
|
|
1257
|
-
onInputChange: (
|
|
1255
|
+
isOptionEqualToValue: (w, k) => w.id === k.id,
|
|
1256
|
+
onInputChange: (w, k) => {
|
|
1258
1257
|
E(k);
|
|
1259
1258
|
},
|
|
1260
|
-
renderOption: (
|
|
1259
|
+
renderOption: (w, k) => /* @__PURE__ */ we(
|
|
1261
1260
|
"li",
|
|
1262
|
-
y(a({},
|
|
1261
|
+
y(a({}, w), {
|
|
1263
1262
|
key: k.id,
|
|
1264
1263
|
"data-testid": c ? `${c}:Autocomplete:option(${k.id.toString()})` : void 0
|
|
1265
1264
|
}),
|
|
@@ -1268,12 +1267,12 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
|
1268
1267
|
disabled: b
|
|
1269
1268
|
}
|
|
1270
1269
|
) }) });
|
|
1271
|
-
},
|
|
1270
|
+
}, Gn = (e) => {
|
|
1272
1271
|
if (!e)
|
|
1273
1272
|
return -1;
|
|
1274
1273
|
try {
|
|
1275
1274
|
const n = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
|
|
1276
|
-
|
|
1275
|
+
dn.from(n, "base64").toString("utf8").split("").map(function(s) {
|
|
1277
1276
|
return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
1278
1277
|
}).join("")
|
|
1279
1278
|
), r = JSON.parse(i);
|
|
@@ -1281,25 +1280,25 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
|
1281
1280
|
} catch (t) {
|
|
1282
1281
|
return -1;
|
|
1283
1282
|
}
|
|
1284
|
-
},
|
|
1283
|
+
}, Uo = ({
|
|
1285
1284
|
open: e = !1,
|
|
1286
1285
|
closeHandler: t,
|
|
1287
1286
|
setAuth0ExpiryTime: n
|
|
1288
1287
|
}) => {
|
|
1289
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
1288
|
+
const { logout: i, getAccessTokenSilently: r } = ht(), [s, d] = F(0), l = () => _(void 0, null, function* () {
|
|
1290
1289
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
1291
1290
|
}), c = () => _(void 0, null, function* () {
|
|
1292
1291
|
d(s + 1), t();
|
|
1293
1292
|
});
|
|
1294
1293
|
return K(() => {
|
|
1295
|
-
|
|
1294
|
+
_(void 0, null, function* () {
|
|
1296
1295
|
if (s > 0) {
|
|
1297
|
-
const
|
|
1296
|
+
const v = yield r({ cacheMode: "off" }), h = Gn(v) * 1e3;
|
|
1298
1297
|
n(h);
|
|
1299
1298
|
}
|
|
1300
|
-
})
|
|
1299
|
+
});
|
|
1301
1300
|
}, [s, r, n]), /* @__PURE__ */ o(
|
|
1302
|
-
|
|
1301
|
+
It,
|
|
1303
1302
|
{
|
|
1304
1303
|
isOpen: e,
|
|
1305
1304
|
primaryButton: {
|
|
@@ -1323,25 +1322,25 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
|
|
|
1323
1322
|
}
|
|
1324
1323
|
);
|
|
1325
1324
|
};
|
|
1326
|
-
function
|
|
1325
|
+
function Vn(e) {
|
|
1327
1326
|
return "error" in e;
|
|
1328
1327
|
}
|
|
1329
|
-
function
|
|
1328
|
+
function qn(e) {
|
|
1330
1329
|
var i;
|
|
1331
1330
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1332
1331
|
return t === "access_denied" && n.startsWith("You do not have the required authorization");
|
|
1333
1332
|
}
|
|
1334
|
-
function
|
|
1333
|
+
function Xn(e) {
|
|
1335
1334
|
var i;
|
|
1336
1335
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1337
1336
|
return t === "access_denied" && n.startsWith("User did not authorize the request");
|
|
1338
1337
|
}
|
|
1339
|
-
function
|
|
1338
|
+
function Qn(e) {
|
|
1340
1339
|
var i;
|
|
1341
1340
|
const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1342
1341
|
return t === "access_denied" && n.match(/Script.*time.*exceeded/);
|
|
1343
1342
|
}
|
|
1344
|
-
function
|
|
1343
|
+
function zo({
|
|
1345
1344
|
children: e,
|
|
1346
1345
|
appName: t = "the app",
|
|
1347
1346
|
throwErrors: n = "none",
|
|
@@ -1349,12 +1348,12 @@ function Vo({
|
|
|
1349
1348
|
onError: r = () => {
|
|
1350
1349
|
}
|
|
1351
1350
|
}) {
|
|
1352
|
-
var C,
|
|
1353
|
-
const { isAuthenticated: s, isLoading: d, error: l, loginWithRedirect: c, logout: u } =
|
|
1351
|
+
var C, v;
|
|
1352
|
+
const { isAuthenticated: s, isLoading: d, error: l, loginWithRedirect: c, logout: u } = ht();
|
|
1354
1353
|
K(() => {
|
|
1355
1354
|
l && r(l);
|
|
1356
1355
|
}, [l, r]);
|
|
1357
|
-
const g =
|
|
1356
|
+
const g = Rt(
|
|
1358
1357
|
() => ({
|
|
1359
1358
|
appState: {
|
|
1360
1359
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1370,19 +1369,18 @@ function Vo({
|
|
|
1370
1369
|
l
|
|
1371
1370
|
), n === "all")
|
|
1372
1371
|
throw l;
|
|
1373
|
-
if (
|
|
1372
|
+
if (Vn(l)) {
|
|
1374
1373
|
let h = "Auth error", b = "An unknown Auth0 error occurred.";
|
|
1375
|
-
if (
|
|
1374
|
+
if (qn(l))
|
|
1376
1375
|
h = "Unauthorised", b = `You are not authorised to access ${t}.`;
|
|
1377
|
-
else if (
|
|
1376
|
+
else if (Xn(l))
|
|
1378
1377
|
h = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1379
|
-
else if (
|
|
1378
|
+
else if (Qn(l))
|
|
1380
1379
|
h = "Auth0 script execution time exceeded", b = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
|
|
1381
1380
|
else if (l.message === "Invalid state") {
|
|
1382
1381
|
const S = localStorage.getItem("auth0_redirect_count");
|
|
1383
1382
|
S ? S && parseInt(S) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(S) + 1)), c(g)) : (localStorage.setItem("auth0_redirect_count", "1"), c(g));
|
|
1384
|
-
} else if (n === "unknown")
|
|
1385
|
-
throw l;
|
|
1383
|
+
} else if (n === "unknown") throw l;
|
|
1386
1384
|
return /* @__PURE__ */ p(nt, { open: !0, children: [
|
|
1387
1385
|
/* @__PURE__ */ o(it, { children: h }),
|
|
1388
1386
|
/* @__PURE__ */ p(rt, { children: [
|
|
@@ -1395,7 +1393,7 @@ function Vo({
|
|
|
1395
1393
|
] }),
|
|
1396
1394
|
/* @__PURE__ */ p(O, { variant: "body2", children: [
|
|
1397
1395
|
"description: ",
|
|
1398
|
-
(
|
|
1396
|
+
(v = l == null ? void 0 : l.error_description) != null ? v : "N/A"
|
|
1399
1397
|
] })
|
|
1400
1398
|
] }),
|
|
1401
1399
|
/* @__PURE__ */ p(at, { children: [
|
|
@@ -1403,18 +1401,17 @@ function Vo({
|
|
|
1403
1401
|
/* @__PURE__ */ o(J, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1404
1402
|
] })
|
|
1405
1403
|
] });
|
|
1406
|
-
} else if (n === "unknown")
|
|
1407
|
-
throw l;
|
|
1404
|
+
} else if (n === "unknown") throw l;
|
|
1408
1405
|
}
|
|
1409
|
-
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(
|
|
1406
|
+
return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(un, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1410
1407
|
}
|
|
1411
|
-
const
|
|
1408
|
+
const Yn = {
|
|
1412
1409
|
autoHideDuration: 6e3,
|
|
1413
1410
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1414
1411
|
// The default is false. If we prefer timer to continue when window loses
|
|
1415
1412
|
// focus, change to true
|
|
1416
1413
|
disableWindowBlurListener: !1
|
|
1417
|
-
},
|
|
1414
|
+
}, Kn = {
|
|
1418
1415
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1419
1416
|
}, Xe = {
|
|
1420
1417
|
message: "",
|
|
@@ -1422,18 +1419,18 @@ const Kn = {
|
|
|
1422
1419
|
variant: "standard",
|
|
1423
1420
|
progressIndicator: void 0
|
|
1424
1421
|
// Can use 'circular' or 'linear'
|
|
1425
|
-
}, Qe = 100, Ye = 2e3,
|
|
1422
|
+
}, Qe = 100, Ye = 2e3, Jn = 2e3, Zn = /* @__PURE__ */ (() => {
|
|
1426
1423
|
let e = 0;
|
|
1427
1424
|
return () => (e += 1, e);
|
|
1428
|
-
})(),
|
|
1425
|
+
})(), jn = {
|
|
1429
1426
|
borderBottomLeftRadius: "0px",
|
|
1430
1427
|
borderBottomRightRadius: "0px"
|
|
1431
|
-
},
|
|
1432
|
-
function
|
|
1428
|
+
}, eo = {}, to = {}, $t = Ze(null);
|
|
1429
|
+
function no(s) {
|
|
1433
1430
|
var d = s, {
|
|
1434
|
-
overrideState: e =
|
|
1435
|
-
overrideActions: t =
|
|
1436
|
-
shouldClose: n =
|
|
1431
|
+
overrideState: e = eo,
|
|
1432
|
+
overrideActions: t = to,
|
|
1433
|
+
shouldClose: n = Kn.shouldClose,
|
|
1437
1434
|
children: i
|
|
1438
1435
|
} = d, r = Fe(d, [
|
|
1439
1436
|
"overrideState",
|
|
@@ -1442,14 +1439,14 @@ function oo(s) {
|
|
|
1442
1439
|
"children"
|
|
1443
1440
|
]);
|
|
1444
1441
|
var m;
|
|
1445
|
-
const [{ open: l }, c] = F({ open: !1 }), u = fe([]), g = fe(Date.now()), C = fe(0),
|
|
1442
|
+
const [{ open: l }, c] = F({ open: !1 }), u = fe([]), g = fe(Date.now()), C = fe(0), v = se((x) => {
|
|
1446
1443
|
c({ open: x });
|
|
1447
1444
|
}, []), h = se((x = {}) => {
|
|
1448
1445
|
C.current += 1, u.current.length >= Qe && Date.now() - g.current >= Ye && (g.current = Date.now(), console.error(
|
|
1449
1446
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Qe}) hit ${C.current} times in last ${Ye}ms)`
|
|
1450
1447
|
), C.current = 0);
|
|
1451
1448
|
const A = a(y(a({}, Xe), {
|
|
1452
|
-
key:
|
|
1449
|
+
key: Zn()
|
|
1453
1450
|
}), x);
|
|
1454
1451
|
return u.current.push(A), u.current.length === 1 && c({ open: !0 }), A.key;
|
|
1455
1452
|
}, []), b = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), S = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), D = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
|
|
@@ -1461,11 +1458,11 @@ function oo(s) {
|
|
|
1461
1458
|
}, L = () => {
|
|
1462
1459
|
}, P = () => {
|
|
1463
1460
|
u.current.shift(), u.current.length > 0 && c({ open: !0 });
|
|
1464
|
-
},
|
|
1465
|
-
"autoHideDuration" in
|
|
1466
|
-
const M = a(a({},
|
|
1461
|
+
}, w = (m = u.current[0]) != null ? m : a({}, Xe), k = {};
|
|
1462
|
+
"autoHideDuration" in w && (k.autoHideDuration = w.autoHideDuration);
|
|
1463
|
+
const M = a(a({}, Yn), r), f = a(a({
|
|
1467
1464
|
open: l,
|
|
1468
|
-
setOpen:
|
|
1465
|
+
setOpen: v,
|
|
1469
1466
|
enqueueNotification: h,
|
|
1470
1467
|
enqueueSuccessNotification: b,
|
|
1471
1468
|
enqueueInfoNotification: S,
|
|
@@ -1473,10 +1470,10 @@ function oo(s) {
|
|
|
1473
1470
|
enqueueErrorNotification: D,
|
|
1474
1471
|
removeNotification: E
|
|
1475
1472
|
}, e), t);
|
|
1476
|
-
return /* @__PURE__ */ p(
|
|
1473
|
+
return /* @__PURE__ */ p($t.Provider, { value: f, children: [
|
|
1477
1474
|
i,
|
|
1478
1475
|
/* @__PURE__ */ o(
|
|
1479
|
-
|
|
1476
|
+
Qt,
|
|
1480
1477
|
y(a(a({}, M), k), {
|
|
1481
1478
|
open: l,
|
|
1482
1479
|
onClose: T,
|
|
@@ -1484,46 +1481,43 @@ function oo(s) {
|
|
|
1484
1481
|
onExited: P,
|
|
1485
1482
|
onExit: L
|
|
1486
1483
|
},
|
|
1487
|
-
sx: { zIndex:
|
|
1484
|
+
sx: { zIndex: Jn },
|
|
1488
1485
|
children: /* @__PURE__ */ p("div", { children: [
|
|
1489
1486
|
/* @__PURE__ */ o(
|
|
1490
|
-
|
|
1487
|
+
Yt,
|
|
1491
1488
|
{
|
|
1492
1489
|
onClose: (x) => T(x, "closeAlert"),
|
|
1493
|
-
severity:
|
|
1490
|
+
severity: w.severity,
|
|
1494
1491
|
variant: "filled",
|
|
1495
|
-
icon:
|
|
1496
|
-
style:
|
|
1497
|
-
children:
|
|
1492
|
+
icon: w.progressIndicator === "circular" ? /* @__PURE__ */ o(Ie, { size: "1em" }) : void 0,
|
|
1493
|
+
style: w.progressIndicator === "linear" ? jn : void 0,
|
|
1494
|
+
children: w.message
|
|
1498
1495
|
}
|
|
1499
1496
|
),
|
|
1500
|
-
|
|
1497
|
+
w.progressIndicator === "linear" && /* @__PURE__ */ o(ot, { color: "primary" })
|
|
1501
1498
|
] })
|
|
1502
1499
|
})
|
|
1503
1500
|
)
|
|
1504
1501
|
] });
|
|
1505
1502
|
}
|
|
1506
|
-
function
|
|
1507
|
-
const e = je(
|
|
1503
|
+
function oo() {
|
|
1504
|
+
const e = je($t);
|
|
1508
1505
|
if (e === null)
|
|
1509
1506
|
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1510
1507
|
return e;
|
|
1511
1508
|
}
|
|
1512
|
-
const
|
|
1513
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(
|
|
1514
|
-
),
|
|
1515
|
-
children: e,
|
|
1516
|
-
store: t
|
|
1517
|
-
}) => /* @__PURE__ */ o(pt, { store: t != null ? t : ro, children: e }), Tt = "domainCode";
|
|
1509
|
+
const Go = Q(
|
|
1510
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no, y(a({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1511
|
+
), Dt = "domainCode";
|
|
1518
1512
|
var Je;
|
|
1519
1513
|
const Ke = R(
|
|
1520
|
-
JSON.parse((Je = localStorage.getItem(
|
|
1521
|
-
),
|
|
1514
|
+
JSON.parse((Je = localStorage.getItem(Dt)) != null ? Je : '{"domainCode": ""}').domainCode
|
|
1515
|
+
), Tt = R(
|
|
1522
1516
|
(e) => e(Ke),
|
|
1523
1517
|
(e, t, n) => {
|
|
1524
|
-
t(Ke, n), localStorage.setItem(
|
|
1518
|
+
t(Ke, n), localStorage.setItem(Dt, JSON.stringify({ domainCode: n }));
|
|
1525
1519
|
}
|
|
1526
|
-
),
|
|
1520
|
+
), io = {
|
|
1527
1521
|
act: "ACT",
|
|
1528
1522
|
nsw: "NSW",
|
|
1529
1523
|
nt: "NT",
|
|
@@ -1535,10 +1529,10 @@ const Ke = R(
|
|
|
1535
1529
|
ag: "AG",
|
|
1536
1530
|
fedmps: "Fedmps",
|
|
1537
1531
|
"": ""
|
|
1538
|
-
},
|
|
1532
|
+
}, ro = (e) => {
|
|
1539
1533
|
var t;
|
|
1540
|
-
return e === null ? "N/A" : (t =
|
|
1541
|
-
},
|
|
1534
|
+
return e === null ? "N/A" : (t = io[e]) != null ? t : "";
|
|
1535
|
+
}, Vo = ({
|
|
1542
1536
|
isLoading: e,
|
|
1543
1537
|
isOpen: t,
|
|
1544
1538
|
onClose: n,
|
|
@@ -1547,21 +1541,21 @@ const Ke = R(
|
|
|
1547
1541
|
applicationName: s,
|
|
1548
1542
|
handleLogout: d
|
|
1549
1543
|
}) => {
|
|
1550
|
-
const [l, c] = V(
|
|
1544
|
+
const [l, c] = V(Tt), [u, g] = F(l), { enqueueSuccessNotification: C } = oo(), v = r.length === 0, h = !!l && !r.includes(l) && !r.includes(u), b = !l || v || h, S = () => _(void 0, null, function* () {
|
|
1551
1545
|
u ? (c(u), i == null || i(u), C(`Set organisation to ${u}`), n()) : (c(""), i == null || i(""));
|
|
1552
1546
|
}), $ = () => _(void 0, null, function* () {
|
|
1553
|
-
l && !
|
|
1547
|
+
l && !v && !h ? (g(l), n()) : b && d();
|
|
1554
1548
|
});
|
|
1555
1549
|
let D;
|
|
1556
|
-
return
|
|
1557
|
-
|
|
1550
|
+
return v ? D = "Unable to retrieve your active organisations. Try logging in again." : h && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
|
|
1551
|
+
It,
|
|
1558
1552
|
{
|
|
1559
1553
|
isOpen: t,
|
|
1560
1554
|
dialogTitle: "Select an organisation",
|
|
1561
1555
|
primaryButton: {
|
|
1562
1556
|
text: "Confirm",
|
|
1563
1557
|
onClick: S,
|
|
1564
|
-
disabled: !u ||
|
|
1558
|
+
disabled: !u || v || h,
|
|
1565
1559
|
buttonColor: "primary"
|
|
1566
1560
|
},
|
|
1567
1561
|
secondaryButton: {
|
|
@@ -1584,7 +1578,7 @@ const Ke = R(
|
|
|
1584
1578
|
disableClearable: !1,
|
|
1585
1579
|
value: u !== "" ? u : null,
|
|
1586
1580
|
onChange: (E, T) => g(T != null ? T : ""),
|
|
1587
|
-
getOptionLabel:
|
|
1581
|
+
getOptionLabel: ro,
|
|
1588
1582
|
options: [...r],
|
|
1589
1583
|
renderInput: (E) => /* @__PURE__ */ o(
|
|
1590
1584
|
ye,
|
|
@@ -1601,38 +1595,38 @@ const Ke = R(
|
|
|
1601
1595
|
)
|
|
1602
1596
|
}
|
|
1603
1597
|
),
|
|
1604
|
-
D && /* @__PURE__ */ o(
|
|
1598
|
+
D && /* @__PURE__ */ o(Kt, { error: !0, children: D })
|
|
1605
1599
|
]
|
|
1606
1600
|
}
|
|
1607
1601
|
);
|
|
1608
|
-
},
|
|
1609
|
-
domainCode:
|
|
1602
|
+
}, ao = {
|
|
1603
|
+
domainCode: Tt,
|
|
1610
1604
|
navBarOpen: j,
|
|
1611
|
-
navBarWidthOpen:
|
|
1612
|
-
navBarWidthClosed:
|
|
1613
|
-
titleText:
|
|
1614
|
-
topBarHeight:
|
|
1615
|
-
navBarTop:
|
|
1616
|
-
},
|
|
1605
|
+
navBarWidthOpen: vt,
|
|
1606
|
+
navBarWidthClosed: At,
|
|
1607
|
+
titleText: ve,
|
|
1608
|
+
topBarHeight: bt,
|
|
1609
|
+
navBarTop: St
|
|
1610
|
+
}, qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(on, { children: e })), so = ({
|
|
1617
1611
|
initialValues: e,
|
|
1618
1612
|
children: t
|
|
1619
|
-
}) => (
|
|
1613
|
+
}) => (pt(e), /* @__PURE__ */ o(N, { children: t })), Xo = Q(
|
|
1620
1614
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1621
|
-
|
|
1615
|
+
so,
|
|
1622
1616
|
{
|
|
1623
1617
|
initialValues: Object.entries(e).map(
|
|
1624
1618
|
([n, i]) => [
|
|
1625
|
-
|
|
1619
|
+
ao[n],
|
|
1626
1620
|
i
|
|
1627
1621
|
]
|
|
1628
1622
|
),
|
|
1629
1623
|
children: t
|
|
1630
1624
|
}
|
|
1631
1625
|
)
|
|
1632
|
-
),
|
|
1633
|
-
const t = new
|
|
1634
|
-
return /* @__PURE__ */ o(
|
|
1635
|
-
}),
|
|
1626
|
+
), Qo = Q(() => ({ children: e }) => {
|
|
1627
|
+
const t = new ln();
|
|
1628
|
+
return /* @__PURE__ */ o(cn, { client: t, children: e });
|
|
1629
|
+
}), Yo = st({
|
|
1636
1630
|
palette: {
|
|
1637
1631
|
primary: {
|
|
1638
1632
|
dark: "#00A651",
|
|
@@ -1683,7 +1677,7 @@ const Ke = R(
|
|
|
1683
1677
|
navBar: {
|
|
1684
1678
|
backgroundColor: "#E8E8E8"
|
|
1685
1679
|
}
|
|
1686
|
-
}),
|
|
1680
|
+
}), Ko = st({
|
|
1687
1681
|
palette: {
|
|
1688
1682
|
primary: {
|
|
1689
1683
|
main: "#007236",
|
|
@@ -1779,52 +1773,50 @@ const Ke = R(
|
|
|
1779
1773
|
}
|
|
1780
1774
|
});
|
|
1781
1775
|
export {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
Dt as Context,
|
|
1776
|
+
It as AgDialog,
|
|
1777
|
+
Mo as AppLayout,
|
|
1778
|
+
zo as AuthGuard,
|
|
1779
|
+
$t as Context,
|
|
1787
1780
|
ke as ContextError,
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
jo as internalAgSystemsTheme,
|
|
1781
|
+
Vo as DomainCodeDialog,
|
|
1782
|
+
To as ExampleComponent,
|
|
1783
|
+
Ro as FetchAutocomplete,
|
|
1784
|
+
so as HydrateAtoms,
|
|
1785
|
+
Ho as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1786
|
+
ft as NAVBAR_WIDTH_CLOSED,
|
|
1787
|
+
gt as NAVBAR_WIDTH_OPENED,
|
|
1788
|
+
No as NavBar,
|
|
1789
|
+
Bo as NavBarDarkStyledList,
|
|
1790
|
+
Fo as NavBarLightStyledList,
|
|
1791
|
+
Cn as NavBarProvider,
|
|
1792
|
+
Po as PageLayout,
|
|
1793
|
+
no as SaladBarProvider,
|
|
1794
|
+
Uo as SessionExpiryDialog,
|
|
1795
|
+
Wo as SingleAutocomplete,
|
|
1796
|
+
vn as buildNavBarState,
|
|
1797
|
+
Tt as domainCodeAtom,
|
|
1798
|
+
Yo as fed21Theme,
|
|
1799
|
+
Gn as getAuth0Expiry,
|
|
1800
|
+
Ko as internalAgSystemsTheme,
|
|
1809
1801
|
q as navBarClasses,
|
|
1810
1802
|
j as navBarOpenAtom,
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1803
|
+
St as navBarTopAtom,
|
|
1804
|
+
At as navBarWidthClosedAtom,
|
|
1805
|
+
vt as navBarWidthOpenAtom,
|
|
1806
|
+
Ln as simpleHashCode,
|
|
1807
|
+
_o as suppressConsole,
|
|
1808
|
+
ve as titleTextAtom,
|
|
1809
|
+
bt as topBarHeightAtom,
|
|
1810
|
+
Bn as topBarMiddleAtom,
|
|
1811
|
+
Lo as unsuppressConsole,
|
|
1812
|
+
kt as useAutocompleteOptions,
|
|
1821
1813
|
wn as useNavBar,
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1814
|
+
oo as useSaladBar,
|
|
1815
|
+
qo as withAtomProvider,
|
|
1816
|
+
Oo as withBrowserRouter,
|
|
1817
|
+
Eo as withNavBarProvider,
|
|
1818
|
+
Xo as withOverrideDefaults,
|
|
1819
|
+
Qo as withQueryClient,
|
|
1820
|
+
Go as withSaladBarProvider
|
|
1829
1821
|
};
|
|
1830
1822
|
//# sourceMappingURL=index.js.map
|