@australiangreens/ag-internal-components 0.1.24 → 0.1.25
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/esm/index.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var nt = Object.defineProperty, it = Object.defineProperties;
|
|
2
|
+
var rt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var G = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var j = (e, t, o) => t in e ?
|
|
4
|
+
var ue = Object.prototype.hasOwnProperty, pe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var j = (e, t, o) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, d = (e, t) => {
|
|
6
6
|
for (var o in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
ue.call(t, o) && j(e, o, t[o]);
|
|
8
8
|
if (G)
|
|
9
9
|
for (var o of G(t))
|
|
10
|
-
|
|
10
|
+
pe.call(t, o) && j(e, o, t[o]);
|
|
11
11
|
return e;
|
|
12
|
-
}, D = (e, t) =>
|
|
13
|
-
var
|
|
12
|
+
}, D = (e, t) => it(e, rt(t));
|
|
13
|
+
var he = (e, t) => {
|
|
14
14
|
var o = {};
|
|
15
15
|
for (var i in e)
|
|
16
|
-
|
|
16
|
+
ue.call(e, i) && t.indexOf(i) < 0 && (o[i] = e[i]);
|
|
17
17
|
if (e != null && G)
|
|
18
18
|
for (var i of G(e))
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
19
|
+
t.indexOf(i) < 0 && pe.call(e, i) && (o[i] = e[i]);
|
|
20
20
|
return o;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
22
|
+
var fe = (e, t, o) => j(e, typeof t != "symbol" ? t + "" : t, o);
|
|
23
|
+
var N = (e, t, o) => new Promise((i, r) => {
|
|
24
|
+
var a = (l) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
s(o.next(l));
|
|
27
27
|
} catch (u) {
|
|
28
28
|
r(u);
|
|
29
29
|
}
|
|
30
30
|
}, c = (l) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
s(o.throw(l));
|
|
33
33
|
} catch (u) {
|
|
34
34
|
r(u);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, s = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, c);
|
|
37
|
+
s((o = o.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as m, Fragment as B, jsx as n } from "react/jsx-runtime";
|
|
40
|
-
import { useState as T, createContext as
|
|
41
|
-
import { Typography as
|
|
42
|
-
import
|
|
43
|
-
import { styled as z, createTheme as
|
|
40
|
+
import { useState as T, createContext as _e, useCallback as K, useContext as Me, createElement as oe, useEffect as ne, useMemo as at, useRef as ee } from "react";
|
|
41
|
+
import { Typography as _, Button as W, Paper as Te, Box as F, Drawer as Le, useTheme as J, useMediaQuery as st, Collapse as lt, Avatar as me, Fade as ct, Skeleton as ge, Toolbar as dt, Divider as xe, Container as ut, IconButton as pt, CssBaseline as ht, Dialog as Be, LinearProgress as Pe, DialogTitle as Re, DialogContent as Oe, DialogActions as He, Autocomplete as ie, TextField as re, CircularProgress as ae, Chip as ft, Tooltip as mt, Stack as gt, Snackbar as xt, Alert as Ct, FormHelperText as vt } from "@mui/material";
|
|
42
|
+
import At from "@mui/material/CssBaseline";
|
|
43
|
+
import { styled as z, createTheme as Ue, alpha as te } from "@mui/material/styles";
|
|
44
44
|
import { createHelper as se } from "souvlaki";
|
|
45
|
-
import { BrowserRouter as
|
|
46
|
-
import
|
|
47
|
-
import { ViewHeadline as
|
|
48
|
-
import { atom as M, useSetAtom as
|
|
49
|
-
import { useHydrateAtoms as
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import { Buffer as
|
|
56
|
-
import
|
|
45
|
+
import { BrowserRouter as wt } from "react-router-dom";
|
|
46
|
+
import We from "@mui/material/List";
|
|
47
|
+
import { ViewHeadline as St, Cancel as bt, ArrowDropDown as kt } from "@mui/icons-material";
|
|
48
|
+
import { atom as M, useSetAtom as ze, useAtomValue as Ce, useAtom as O } from "jotai";
|
|
49
|
+
import { useHydrateAtoms as yt } from "jotai/utils";
|
|
50
|
+
import ve from "react-avatar";
|
|
51
|
+
import { useAuth0 as le } from "@auth0/auth0-react";
|
|
52
|
+
import { useQuery as Ve } from "@tanstack/react-query";
|
|
53
|
+
import Dt from "autosuggest-highlight/match";
|
|
54
|
+
import It from "autosuggest-highlight/parse";
|
|
55
|
+
import { Buffer as $t } from "buffer";
|
|
56
|
+
import Ft from "@mui/material/Skeleton";
|
|
57
57
|
function Uo({ text: e }) {
|
|
58
58
|
const [t, o] = T(0);
|
|
59
59
|
return /* @__PURE__ */ m(B, { children: [
|
|
60
|
-
/* @__PURE__ */ n(
|
|
61
|
-
/* @__PURE__ */ n(
|
|
60
|
+
/* @__PURE__ */ n(_, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
61
|
+
/* @__PURE__ */ n(_, { variant: "caption", display: "block", children: /* @__PURE__ */ n("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
62
|
/* @__PURE__ */ n(
|
|
63
63
|
W,
|
|
64
64
|
{
|
|
@@ -72,13 +72,13 @@ function Uo({ text: e }) {
|
|
|
72
72
|
"This is some text: ",
|
|
73
73
|
/* @__PURE__ */ n("span", { children: e })
|
|
74
74
|
] }),
|
|
75
|
-
/* @__PURE__ */ m(
|
|
75
|
+
/* @__PURE__ */ m(Te, { children: [
|
|
76
76
|
"This number will incremember when button pressed: ",
|
|
77
77
|
t
|
|
78
78
|
] })
|
|
79
79
|
] });
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const qe = 330, Ge = 73, L = "Navbar", H = {
|
|
82
82
|
root: `${L}-root`,
|
|
83
83
|
menuButton: `${L}-menuButton`,
|
|
84
84
|
hide: `${L}-hide`,
|
|
@@ -86,28 +86,28 @@ const Ve = 330, qe = 73, L = "Navbar", O = {
|
|
|
86
86
|
userInfoHolder: `${L}-userInfoHolder`,
|
|
87
87
|
settings: `${L}-settings`,
|
|
88
88
|
pieChartIcon: `${L}-pieChartIcon`
|
|
89
|
-
}, Et = z(
|
|
89
|
+
}, Et = z(F, {
|
|
90
90
|
name: "NavBar"
|
|
91
91
|
})(({ theme: e }) => ({
|
|
92
|
-
[`&.${
|
|
92
|
+
[`&.${H.root}`]: {
|
|
93
93
|
display: "flex"
|
|
94
94
|
},
|
|
95
|
-
[`& .${
|
|
95
|
+
[`& .${H.menuButton}`]: {
|
|
96
96
|
marginRight: 36
|
|
97
97
|
},
|
|
98
|
-
[`& .${
|
|
98
|
+
[`& .${H.hide}`]: {
|
|
99
99
|
display: "none"
|
|
100
100
|
},
|
|
101
|
-
[`& .${
|
|
101
|
+
[`& .${H.content}`]: {
|
|
102
102
|
flexGrow: 1,
|
|
103
103
|
padding: e.spacing(3)
|
|
104
104
|
},
|
|
105
|
-
[`& .${
|
|
105
|
+
[`& .${H.userInfoHolder}`]: {
|
|
106
106
|
height: "148px",
|
|
107
107
|
marginTop: "64px",
|
|
108
108
|
marginBottom: "16px"
|
|
109
109
|
}
|
|
110
|
-
})),
|
|
110
|
+
})), Xe = () => ({
|
|
111
111
|
position: "absolute",
|
|
112
112
|
height: "100%",
|
|
113
113
|
overflowX: "hidden",
|
|
@@ -115,51 +115,51 @@ const Ve = 330, qe = 73, L = "Navbar", O = {
|
|
|
115
115
|
color: "white",
|
|
116
116
|
backgroundColor: "black"
|
|
117
117
|
// backgroundColor: '#e8e8e8',
|
|
118
|
-
}),
|
|
119
|
-
width: Ve
|
|
120
|
-
}, Ge()), Nt = () => d({
|
|
118
|
+
}), Nt = () => d({
|
|
121
119
|
width: qe
|
|
122
|
-
},
|
|
120
|
+
}, Xe()), _t = () => d({
|
|
121
|
+
width: Ge
|
|
122
|
+
}, Xe()), Mt = z(Le, {
|
|
123
123
|
shouldForwardProp: (e) => e !== "open"
|
|
124
124
|
})(({ theme: e, open: t }) => d(d({
|
|
125
|
-
width: t ?
|
|
125
|
+
width: t ? qe : Ge,
|
|
126
126
|
flexShrink: 0,
|
|
127
127
|
whiteSpace: "nowrap",
|
|
128
128
|
boxSizing: "border-box",
|
|
129
129
|
zIndex: e.zIndex.drawer + 100
|
|
130
130
|
}, t && {
|
|
131
|
-
"& .MuiDrawer-paper": Ft()
|
|
132
|
-
}), !t && {
|
|
133
131
|
"& .MuiDrawer-paper": Nt()
|
|
132
|
+
}), !t && {
|
|
133
|
+
"& .MuiDrawer-paper": _t()
|
|
134
134
|
}));
|
|
135
|
-
class
|
|
135
|
+
class ce extends Error {
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
overrideState: e =
|
|
140
|
-
overrideActions: t =
|
|
137
|
+
fe(ce, "errorName", "ContextError");
|
|
138
|
+
const Ye = _e(null), Tt = {}, Lt = {}, Bt = ({
|
|
139
|
+
overrideState: e = Tt,
|
|
140
|
+
overrideActions: t = Lt,
|
|
141
141
|
children: o
|
|
142
142
|
}) => {
|
|
143
|
-
const [{ open: i }, r] = T({ open: !0 }),
|
|
143
|
+
const [{ open: i }, r] = T({ open: !0 }), a = K((l) => {
|
|
144
144
|
r({ open: l });
|
|
145
145
|
}, []), c = K(() => {
|
|
146
146
|
r((l) => D(d({}, l), { open: !l.open }));
|
|
147
|
-
}, []),
|
|
147
|
+
}, []), s = d(d({
|
|
148
148
|
open: i,
|
|
149
|
-
setOpen:
|
|
149
|
+
setOpen: a,
|
|
150
150
|
toggleOpen: c
|
|
151
151
|
}, e), t);
|
|
152
|
-
return /* @__PURE__ */ n(
|
|
153
|
-
},
|
|
154
|
-
const e =
|
|
152
|
+
return /* @__PURE__ */ n(Ye.Provider, { value: s, children: o });
|
|
153
|
+
}, Pt = () => {
|
|
154
|
+
const e = Me(Ye);
|
|
155
155
|
if (e === null)
|
|
156
|
-
throw new
|
|
156
|
+
throw new ce("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
157
157
|
return e;
|
|
158
|
-
},
|
|
158
|
+
}, Rt = (e = {}) => d({
|
|
159
159
|
open: !0
|
|
160
160
|
}, e), Wo = se(
|
|
161
|
-
(e =
|
|
162
|
-
), zo = se(() => ({ children: e }) => /* @__PURE__ */ n(
|
|
161
|
+
(e = Rt(), t = {}) => ({ children: o }) => /* @__PURE__ */ n(Bt, { overrideState: e, overrideActions: t, children: o })
|
|
162
|
+
), zo = se(() => ({ children: e }) => /* @__PURE__ */ n(wt, { children: e })), Ae = 7, Vo = z(We)(({ theme: e }) => ({
|
|
163
163
|
backgroundColor: "black",
|
|
164
164
|
color: "white",
|
|
165
165
|
"& .MuiListItem-root": {
|
|
@@ -168,7 +168,7 @@ const Xe = Ne(null), Mt = {}, Tt = {}, Lt = ({
|
|
|
168
168
|
"& .MuiListItemButton-root": {
|
|
169
169
|
" .MuiListItemIcon-root": {
|
|
170
170
|
color: "white",
|
|
171
|
-
padding: `${
|
|
171
|
+
padding: `${Ae}px`
|
|
172
172
|
},
|
|
173
173
|
// Focus state
|
|
174
174
|
"&.Mui-focusVisible": {
|
|
@@ -179,7 +179,7 @@ const Xe = Ne(null), Mt = {}, Tt = {}, Lt = ({
|
|
|
179
179
|
borderLeftStyle: "solid",
|
|
180
180
|
borderLeftWidth: "7px",
|
|
181
181
|
borderLeftColor: e.palette.primary.main,
|
|
182
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
182
|
+
paddingLeft: `calc(${e.spacing(2)} - ${Ae}px)`
|
|
183
183
|
},
|
|
184
184
|
// Hover state
|
|
185
185
|
"&:hover": {
|
|
@@ -197,7 +197,7 @@ const Xe = Ne(null), Mt = {}, Tt = {}, Lt = ({
|
|
|
197
197
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
198
198
|
// },
|
|
199
199
|
}
|
|
200
|
-
})),
|
|
200
|
+
})), we = 7, qo = z(We)(({ theme: e }) => ({
|
|
201
201
|
backgroundColor: "#e8e8e8",
|
|
202
202
|
color: "inherit",
|
|
203
203
|
"& .MuiListItem-root": {
|
|
@@ -206,7 +206,7 @@ const Xe = Ne(null), Mt = {}, Tt = {}, Lt = ({
|
|
|
206
206
|
"& .MuiListItemButton-root": {
|
|
207
207
|
" .MuiListItemIcon-root": {
|
|
208
208
|
color: "inherit",
|
|
209
|
-
padding: `${
|
|
209
|
+
padding: `${we}px`
|
|
210
210
|
},
|
|
211
211
|
// Focus state
|
|
212
212
|
"&.Mui-focusVisible": {
|
|
@@ -217,7 +217,7 @@ const Xe = Ne(null), Mt = {}, Tt = {}, Lt = ({
|
|
|
217
217
|
borderLeftStyle: "solid",
|
|
218
218
|
borderLeftWidth: "7px",
|
|
219
219
|
borderLeftColor: e.palette.primary.main,
|
|
220
|
-
paddingLeft: `calc(${e.spacing(2)} - ${
|
|
220
|
+
paddingLeft: `calc(${e.spacing(2)} - ${we}px)`
|
|
221
221
|
},
|
|
222
222
|
// Hover state
|
|
223
223
|
"&:hover": {
|
|
@@ -240,11 +240,11 @@ function Go({
|
|
|
240
240
|
"data-testid": e,
|
|
241
241
|
children: t
|
|
242
242
|
}) {
|
|
243
|
-
const { open: o } =
|
|
244
|
-
return /* @__PURE__ */ m(Et, { className:
|
|
245
|
-
/* @__PURE__ */ n(
|
|
243
|
+
const { open: o } = Pt();
|
|
244
|
+
return /* @__PURE__ */ m(Et, { className: H.root, "data-testid": e, children: [
|
|
245
|
+
/* @__PURE__ */ n(At, {}),
|
|
246
246
|
/* @__PURE__ */ n(
|
|
247
|
-
|
|
247
|
+
Mt,
|
|
248
248
|
{
|
|
249
249
|
variant: "permanent",
|
|
250
250
|
anchor: "left",
|
|
@@ -255,11 +255,11 @@ function Go({
|
|
|
255
255
|
)
|
|
256
256
|
] });
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const Ke = () => {
|
|
259
259
|
const e = J();
|
|
260
|
-
return
|
|
261
|
-
},
|
|
262
|
-
function
|
|
260
|
+
return st(e.breakpoints.down("sm"));
|
|
261
|
+
}, Ot = 64, Ht = 72, Ut = 256, Q = M(!0), Wt = M(Ut), zt = M(Ht), Se = M(""), Vt = M(void 0), qt = M(Ot), Gt = M(void 0);
|
|
262
|
+
function Xt({ links: e }) {
|
|
263
263
|
return /* @__PURE__ */ n("div", { children: "LinksMenu not implemented yet" });
|
|
264
264
|
}
|
|
265
265
|
const X = "Navbar", q = {
|
|
@@ -270,7 +270,7 @@ const X = "Navbar", q = {
|
|
|
270
270
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
271
271
|
// settings: `${PREFIX}-settings`,
|
|
272
272
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
273
|
-
},
|
|
273
|
+
}, Yt = z(F, { name: "NavBar" })(({ theme: e }) => ({
|
|
274
274
|
[`&.${q.root}`]: {
|
|
275
275
|
display: "flex"
|
|
276
276
|
},
|
|
@@ -292,10 +292,10 @@ const X = "Navbar", q = {
|
|
|
292
292
|
})), U = (e, t, o) => e.transitions.create(t, {
|
|
293
293
|
easing: e.transitions.easing.sharp,
|
|
294
294
|
duration: o === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
295
|
-
}),
|
|
295
|
+
}), Kt = (e) => {
|
|
296
296
|
const t = J();
|
|
297
297
|
return /* @__PURE__ */ n(
|
|
298
|
-
|
|
298
|
+
lt,
|
|
299
299
|
d({
|
|
300
300
|
easing: t.transitions.easing.sharp,
|
|
301
301
|
timeout: {
|
|
@@ -304,7 +304,7 @@ const X = "Navbar", q = {
|
|
|
304
304
|
}
|
|
305
305
|
}, e)
|
|
306
306
|
);
|
|
307
|
-
},
|
|
307
|
+
}, Qe = (e) => {
|
|
308
308
|
var t, o;
|
|
309
309
|
return {
|
|
310
310
|
overflowX: "hidden",
|
|
@@ -312,13 +312,13 @@ const X = "Navbar", q = {
|
|
|
312
312
|
backgroundColor: (o = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? o : "white"
|
|
313
313
|
// Provide default so tests don't need to wrap theme provider
|
|
314
314
|
};
|
|
315
|
-
},
|
|
315
|
+
}, be = (e, t) => d({
|
|
316
316
|
width: t,
|
|
317
317
|
transition: U(e, "width", "entering")
|
|
318
|
-
},
|
|
318
|
+
}, Qe(e)), ke = (e, t) => d({
|
|
319
319
|
width: t,
|
|
320
320
|
transition: U(e, "width", "leaving")
|
|
321
|
-
},
|
|
321
|
+
}, Qe(e)), Qt = z(Le, {
|
|
322
322
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
323
323
|
})(({ theme: e, open: t, widthOpen: o, widthClosed: i, isSmallScreen: r }) => d(d({
|
|
324
324
|
flexShrink: 0,
|
|
@@ -326,9 +326,9 @@ const X = "Navbar", q = {
|
|
|
326
326
|
boxSizing: "border-box",
|
|
327
327
|
display: "flex",
|
|
328
328
|
flexDirection: "column"
|
|
329
|
-
}, t && D(d({},
|
|
329
|
+
}, t && D(d({}, be(e, o)), {
|
|
330
330
|
backgroundColor: "",
|
|
331
|
-
"& .MuiDrawer-paper":
|
|
331
|
+
"& .MuiDrawer-paper": be(e, o)
|
|
332
332
|
})), !t && D(d({}, ke(e, r ? o : i)), {
|
|
333
333
|
backgroundColor: "",
|
|
334
334
|
"& .MuiDrawer-paper": ke(e, r ? o : i)
|
|
@@ -359,7 +359,7 @@ function Yo(e) {
|
|
|
359
359
|
for (const t of Object.keys(Y))
|
|
360
360
|
console[t] = Y[t];
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Je(e) {
|
|
363
363
|
return e.replace(
|
|
364
364
|
/(^|-)([a-z])/g,
|
|
365
365
|
(t, o, i) => o === "-" ? " " + i.toUpperCase() : i.toUpperCase()
|
|
@@ -368,18 +368,32 @@ function Qt(e) {
|
|
|
368
368
|
function Ko(e, t, o, i) {
|
|
369
369
|
var c;
|
|
370
370
|
if (!e) return "None";
|
|
371
|
-
const
|
|
372
|
-
([
|
|
371
|
+
const a = Object.entries(e).filter(
|
|
372
|
+
([s, l]) => s.startsWith("https://greens.org.au/roles/") && l.includes(t)
|
|
373
373
|
).map(
|
|
374
|
-
([
|
|
374
|
+
([s]) => {
|
|
375
375
|
var l;
|
|
376
|
-
return
|
|
376
|
+
return Je((l = s.split("/").at(-1)) != null ? l : "");
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
379
|
return (c = i.find(
|
|
380
|
-
(
|
|
380
|
+
(s) => o[s].some((l) => a.includes(l))
|
|
381
381
|
)) != null ? c : "None";
|
|
382
382
|
}
|
|
383
|
+
const Qo = (e) => {
|
|
384
|
+
const { getIdTokenClaims: t, user: o } = le();
|
|
385
|
+
return Ve({
|
|
386
|
+
queryKey: ["availableDomains", o == null ? void 0 : o.sub],
|
|
387
|
+
queryFn: () => N(void 0, null, function* () {
|
|
388
|
+
const i = yield t();
|
|
389
|
+
return i ? Object.entries(i).reduce((r, [a, c]) => {
|
|
390
|
+
var u;
|
|
391
|
+
const s = Je((u = a.split("/").at(-1)) != null ? u : ""), l = a.startsWith("https://greens.org.au/roles/") && e.includes(s) ? c : [];
|
|
392
|
+
return [.../* @__PURE__ */ new Set([...r, ...l])];
|
|
393
|
+
}, []) : [];
|
|
394
|
+
})
|
|
395
|
+
});
|
|
396
|
+
};
|
|
383
397
|
function Jt(e) {
|
|
384
398
|
let t = 0;
|
|
385
399
|
for (let o = 0, i = e.length; o < i; o++) {
|
|
@@ -388,11 +402,11 @@ function Jt(e) {
|
|
|
388
402
|
}
|
|
389
403
|
return t;
|
|
390
404
|
}
|
|
391
|
-
const
|
|
405
|
+
const ye = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], De = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
392
406
|
function Zt({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
|
|
393
407
|
const r = J();
|
|
394
408
|
return /* @__PURE__ */ m(
|
|
395
|
-
|
|
409
|
+
F,
|
|
396
410
|
{
|
|
397
411
|
sx: {
|
|
398
412
|
paddingTop: 3,
|
|
@@ -403,7 +417,7 @@ function Zt({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
|
|
|
403
417
|
},
|
|
404
418
|
children: [
|
|
405
419
|
!i && /* @__PURE__ */ n(
|
|
406
|
-
|
|
420
|
+
F,
|
|
407
421
|
{
|
|
408
422
|
sx: {
|
|
409
423
|
width: o ? "5rem" : "2rem",
|
|
@@ -411,38 +425,38 @@ function Zt({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
|
|
|
411
425
|
aspectRatio: 1
|
|
412
426
|
},
|
|
413
427
|
children: e != null && e.name ? /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(
|
|
414
|
-
|
|
428
|
+
me,
|
|
415
429
|
{
|
|
416
430
|
src: e == null ? void 0 : e.picture,
|
|
417
431
|
sx: {
|
|
418
432
|
width: "100%",
|
|
419
433
|
height: "100%",
|
|
420
|
-
bgcolor:
|
|
434
|
+
bgcolor: ye[Math.abs(Jt(e == null ? void 0 : e.name)) % ye.length]
|
|
421
435
|
},
|
|
422
|
-
children:
|
|
436
|
+
children: De(e == null ? void 0 : e.name)
|
|
423
437
|
}
|
|
424
|
-
) }) : /* @__PURE__ */ n(
|
|
438
|
+
) }) : /* @__PURE__ */ n(me, { sx: { width: "100%", height: "100%" } })
|
|
425
439
|
}
|
|
426
440
|
),
|
|
427
441
|
i && /* @__PURE__ */ n(
|
|
428
|
-
|
|
442
|
+
F,
|
|
429
443
|
{
|
|
430
444
|
sx: {
|
|
431
445
|
width: o ? "5rem" : "2rem",
|
|
432
446
|
transition: o ? U(r, ["width", "height"], "entering") : U(r, ["width", "height"], "leaving"),
|
|
433
447
|
aspectRatio: 1
|
|
434
448
|
},
|
|
435
|
-
children: e != null && e.name ? /* @__PURE__ */ n(B, { children: /* @__PURE__ */ m(
|
|
449
|
+
children: e != null && e.name ? /* @__PURE__ */ n(B, { children: /* @__PURE__ */ m(ve, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
|
|
436
450
|
" ",
|
|
437
|
-
|
|
451
|
+
De(e == null ? void 0 : e.name),
|
|
438
452
|
" ",
|
|
439
453
|
"ab"
|
|
440
|
-
] }) }) : /* @__PURE__ */ n(
|
|
454
|
+
] }) }) : /* @__PURE__ */ n(ve, {})
|
|
441
455
|
}
|
|
442
456
|
),
|
|
443
|
-
/* @__PURE__ */ n(
|
|
444
|
-
e != null && e.name ? /* @__PURE__ */ n(
|
|
445
|
-
t ? /* @__PURE__ */ n(
|
|
457
|
+
/* @__PURE__ */ n(Kt, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ n(ct, { in: o, children: /* @__PURE__ */ m(F, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
458
|
+
e != null && e.name ? /* @__PURE__ */ n(_, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ n(ge, { animation: !1, width: "50%" }),
|
|
459
|
+
t ? /* @__PURE__ */ n(_, { children: t.toUpperCase() }) : /* @__PURE__ */ n(ge, { animation: !1, width: "25%" })
|
|
446
460
|
] }) }) })
|
|
447
461
|
]
|
|
448
462
|
}
|
|
@@ -454,15 +468,15 @@ function jt({
|
|
|
454
468
|
widthOpen: o,
|
|
455
469
|
"data-testid": i,
|
|
456
470
|
top: r,
|
|
457
|
-
middle:
|
|
471
|
+
middle: a,
|
|
458
472
|
bottom: c,
|
|
459
|
-
user:
|
|
473
|
+
user: s,
|
|
460
474
|
domainCode: l,
|
|
461
475
|
useNewAvatar: u = !1
|
|
462
476
|
}) {
|
|
463
|
-
const g =
|
|
464
|
-
return /* @__PURE__ */ n(
|
|
465
|
-
|
|
477
|
+
const g = Ke(), S = ze(Q);
|
|
478
|
+
return /* @__PURE__ */ n(Yt, { className: q.root, "data-testid": i, children: /* @__PURE__ */ m(
|
|
479
|
+
Qt,
|
|
466
480
|
{
|
|
467
481
|
open: e,
|
|
468
482
|
widthOpen: o,
|
|
@@ -477,15 +491,15 @@ function jt({
|
|
|
477
491
|
},
|
|
478
492
|
isSmallScreen: g,
|
|
479
493
|
children: [
|
|
480
|
-
!g && /* @__PURE__ */ n(
|
|
481
|
-
r && /* @__PURE__ */ m(
|
|
494
|
+
!g && /* @__PURE__ */ n(dt, {}),
|
|
495
|
+
r && /* @__PURE__ */ m(F, { flexGrow: "0", children: [
|
|
482
496
|
r,
|
|
483
|
-
/* @__PURE__ */ n(
|
|
497
|
+
/* @__PURE__ */ n(xe, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
484
498
|
] }),
|
|
485
|
-
/* @__PURE__ */ n(
|
|
486
|
-
/* @__PURE__ */ m(
|
|
487
|
-
/* @__PURE__ */ n(
|
|
488
|
-
/* @__PURE__ */ n(Zt, { user:
|
|
499
|
+
/* @__PURE__ */ n(F, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ n(Xt, { links: a }) : a }),
|
|
500
|
+
/* @__PURE__ */ m(F, { flexGrow: "0", children: [
|
|
501
|
+
/* @__PURE__ */ n(xe, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
502
|
+
/* @__PURE__ */ n(Zt, { user: s, domainCode: l, open: e, useNewAvatar: u }),
|
|
489
503
|
c && /* @__PURE__ */ n(B, { children: c })
|
|
490
504
|
] })
|
|
491
505
|
]
|
|
@@ -499,15 +513,15 @@ function eo({
|
|
|
499
513
|
noPadding: i
|
|
500
514
|
}) {
|
|
501
515
|
return /* @__PURE__ */ n(
|
|
502
|
-
|
|
516
|
+
F,
|
|
503
517
|
{
|
|
504
518
|
sx: {
|
|
505
519
|
overflow: "auto",
|
|
506
520
|
height: `calc(100vh - ${t}px)`,
|
|
507
521
|
flexGrow: 1
|
|
508
522
|
},
|
|
509
|
-
children: i ? /* @__PURE__ */ n(
|
|
510
|
-
|
|
523
|
+
children: i ? /* @__PURE__ */ n(F, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ n(
|
|
524
|
+
ut,
|
|
511
525
|
{
|
|
512
526
|
component: "main",
|
|
513
527
|
id: "main-content",
|
|
@@ -528,9 +542,9 @@ function no({
|
|
|
528
542
|
"data-testid": o,
|
|
529
543
|
middle: i
|
|
530
544
|
}) {
|
|
531
|
-
const r =
|
|
545
|
+
const r = ze(Q), a = () => r((l) => !l), c = J(), s = Ke();
|
|
532
546
|
return /* @__PURE__ */ n("header", { "data-testid": o, children: /* @__PURE__ */ m(
|
|
533
|
-
|
|
547
|
+
Te,
|
|
534
548
|
{
|
|
535
549
|
square: !0,
|
|
536
550
|
elevation: 0,
|
|
@@ -544,67 +558,67 @@ function no({
|
|
|
544
558
|
gap: 2,
|
|
545
559
|
flexShrink: 0,
|
|
546
560
|
height: t,
|
|
547
|
-
zIndex:
|
|
561
|
+
zIndex: s ? 0 : c.zIndex.drawer + 101
|
|
548
562
|
},
|
|
549
563
|
children: [
|
|
550
564
|
/* @__PURE__ */ n(
|
|
551
|
-
|
|
565
|
+
pt,
|
|
552
566
|
{
|
|
553
567
|
size: "medium",
|
|
554
568
|
color: "inherit",
|
|
555
569
|
sx: { padding: 1.5, marginLeft: "12px" },
|
|
556
|
-
onClick:
|
|
557
|
-
children: /* @__PURE__ */ n(
|
|
570
|
+
onClick: a,
|
|
571
|
+
children: /* @__PURE__ */ n(St, { fontSize: "medium" })
|
|
558
572
|
}
|
|
559
573
|
),
|
|
560
|
-
/* @__PURE__ */ n(
|
|
574
|
+
/* @__PURE__ */ n(_, { className: oo.titleText, variant: "h6", component: "h1", children: e }),
|
|
561
575
|
i
|
|
562
576
|
]
|
|
563
577
|
}
|
|
564
578
|
) });
|
|
565
579
|
}
|
|
566
|
-
function
|
|
580
|
+
function Jo({
|
|
567
581
|
children: e,
|
|
568
582
|
initialTitleText: t,
|
|
569
583
|
initialNavBarOpen: o,
|
|
570
584
|
pageContainerProps: i,
|
|
571
585
|
pageContentDataTestId: r,
|
|
572
|
-
topBarDataTestId:
|
|
586
|
+
topBarDataTestId: a,
|
|
573
587
|
navBarDataTestId: c,
|
|
574
|
-
navBarMiddle:
|
|
588
|
+
navBarMiddle: s,
|
|
575
589
|
navBarBottom: l,
|
|
576
590
|
user: u,
|
|
577
591
|
domainCode: g,
|
|
578
592
|
useNewAvatar: S = !1
|
|
579
593
|
}) {
|
|
580
|
-
|
|
594
|
+
yt([
|
|
581
595
|
[Q, o != null ? o : !0],
|
|
582
|
-
[
|
|
596
|
+
[Se, t != null ? t : ""]
|
|
583
597
|
]);
|
|
584
|
-
const A =
|
|
585
|
-
return /* @__PURE__ */ m(
|
|
586
|
-
/* @__PURE__ */ n(
|
|
598
|
+
const A = Ce(Q), [f] = O(Wt), [b] = O(zt), y = Ce(Se), [p] = O(qt), [k] = O(Vt), [I] = O(Gt);
|
|
599
|
+
return /* @__PURE__ */ m(F, { children: [
|
|
600
|
+
/* @__PURE__ */ n(ht, {}),
|
|
587
601
|
/* @__PURE__ */ n(
|
|
588
602
|
no,
|
|
589
603
|
{
|
|
590
604
|
titleText: y,
|
|
591
|
-
"data-testid":
|
|
605
|
+
"data-testid": a,
|
|
592
606
|
height: p,
|
|
593
|
-
middle:
|
|
607
|
+
middle: k
|
|
594
608
|
}
|
|
595
609
|
),
|
|
596
|
-
/* @__PURE__ */ m(
|
|
610
|
+
/* @__PURE__ */ m(F, { sx: { display: "flex" }, children: [
|
|
597
611
|
/* @__PURE__ */ n(
|
|
598
612
|
jt,
|
|
599
613
|
{
|
|
600
614
|
open: A,
|
|
601
615
|
top: I,
|
|
602
|
-
middle:
|
|
616
|
+
middle: s,
|
|
603
617
|
bottom: l,
|
|
604
618
|
user: u,
|
|
605
619
|
domainCode: g,
|
|
606
620
|
widthOpen: f,
|
|
607
|
-
widthClosed:
|
|
621
|
+
widthClosed: b,
|
|
608
622
|
offsetTop: p,
|
|
609
623
|
"data-testid": c,
|
|
610
624
|
useNewAvatar: S
|
|
@@ -622,49 +636,49 @@ function Qo({
|
|
|
622
636
|
] })
|
|
623
637
|
] });
|
|
624
638
|
}
|
|
625
|
-
const
|
|
639
|
+
const Ze = ({
|
|
626
640
|
isOpen: e,
|
|
627
641
|
dialogTitle: t,
|
|
628
642
|
children: o,
|
|
629
643
|
maxWidth: i,
|
|
630
644
|
primaryButton: r,
|
|
631
|
-
secondaryButton:
|
|
645
|
+
secondaryButton: a,
|
|
632
646
|
additionalButtons: c,
|
|
633
|
-
onClose:
|
|
647
|
+
onClose: s,
|
|
634
648
|
sx: l,
|
|
635
649
|
"data-testid": u,
|
|
636
650
|
disableCloseOnBackdropOrEscape: g = !1,
|
|
637
651
|
isLoading: S = !1
|
|
638
652
|
}) => {
|
|
639
|
-
var
|
|
653
|
+
var b, y;
|
|
640
654
|
const [A, f] = T(!1);
|
|
641
655
|
return /* @__PURE__ */ m(
|
|
642
|
-
|
|
656
|
+
Be,
|
|
643
657
|
{
|
|
644
658
|
open: e,
|
|
645
|
-
onClose: (p,
|
|
646
|
-
g && (
|
|
659
|
+
onClose: (p, k) => N(void 0, null, function* () {
|
|
660
|
+
g && (k === "backdropClick" || k === "escapeKeyDown") || A || (a != null && a.onClick ? yield a.onClick() : s());
|
|
647
661
|
}),
|
|
648
662
|
fullWidth: !0,
|
|
649
663
|
maxWidth: i != null ? i : "xs",
|
|
650
664
|
"data-testid": u,
|
|
651
665
|
sx: l,
|
|
652
666
|
children: [
|
|
653
|
-
S && /* @__PURE__ */ n(
|
|
654
|
-
/* @__PURE__ */ n(
|
|
655
|
-
/* @__PURE__ */ n(
|
|
667
|
+
S && /* @__PURE__ */ n(Pe, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
668
|
+
/* @__PURE__ */ n(Re, { children: t }),
|
|
669
|
+
/* @__PURE__ */ n(Oe, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
|
|
656
670
|
/* @__PURE__ */ m(He, { children: [
|
|
657
671
|
/* @__PURE__ */ n(
|
|
658
672
|
W,
|
|
659
673
|
{
|
|
660
|
-
onClick: (
|
|
661
|
-
"data-testid":
|
|
662
|
-
disabled: (
|
|
663
|
-
color:
|
|
664
|
-
children: (y =
|
|
674
|
+
onClick: (b = a == null ? void 0 : a.onClick) != null ? b : s,
|
|
675
|
+
"data-testid": a == null ? void 0 : a.testId,
|
|
676
|
+
disabled: (a == null ? void 0 : a.disabled) || A,
|
|
677
|
+
color: a == null ? void 0 : a.buttonColor,
|
|
678
|
+
children: (y = a == null ? void 0 : a.text) != null ? y : "Cancel"
|
|
665
679
|
}
|
|
666
680
|
),
|
|
667
|
-
c && c.map((p,
|
|
681
|
+
c && c.map((p, k) => {
|
|
668
682
|
var I;
|
|
669
683
|
return /* @__PURE__ */ n(
|
|
670
684
|
W,
|
|
@@ -673,15 +687,15 @@ const Qe = ({
|
|
|
673
687
|
"data-testid": p == null ? void 0 : p.testId,
|
|
674
688
|
disabled: (p == null ? void 0 : p.disabled) || A,
|
|
675
689
|
color: p == null ? void 0 : p.buttonColor,
|
|
676
|
-
children: (I = p.text) != null ? I : `Button ${
|
|
690
|
+
children: (I = p.text) != null ? I : `Button ${k}`
|
|
677
691
|
},
|
|
678
|
-
|
|
692
|
+
k
|
|
679
693
|
);
|
|
680
694
|
}),
|
|
681
695
|
r && /* @__PURE__ */ n(
|
|
682
696
|
W,
|
|
683
697
|
{
|
|
684
|
-
onClick: () =>
|
|
698
|
+
onClick: () => N(void 0, null, function* () {
|
|
685
699
|
var p;
|
|
686
700
|
f(!0), yield (p = r.onClick) == null ? void 0 : p.call(r), f(!1);
|
|
687
701
|
}),
|
|
@@ -695,64 +709,64 @@ const Qe = ({
|
|
|
695
709
|
]
|
|
696
710
|
}
|
|
697
711
|
);
|
|
698
|
-
},
|
|
712
|
+
}, je = ({
|
|
699
713
|
minLength: e,
|
|
700
714
|
preLoadedOptions: t,
|
|
701
715
|
lookup: o,
|
|
702
716
|
label: i,
|
|
703
717
|
inputValue: r
|
|
704
|
-
}) =>
|
|
718
|
+
}) => Ve({
|
|
705
719
|
queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
|
|
706
|
-
(
|
|
720
|
+
(a) => a.label.toLowerCase().includes(r.toLowerCase())
|
|
707
721
|
) : o(r),
|
|
708
722
|
queryKey: ["autocomplete", i, r]
|
|
709
723
|
});
|
|
710
|
-
function
|
|
711
|
-
lookup: e = () =>
|
|
724
|
+
function Zo({
|
|
725
|
+
lookup: e = () => N(this, null, function* () {
|
|
712
726
|
}),
|
|
713
727
|
enableHighlighting: t = !0,
|
|
714
728
|
onChange: o,
|
|
715
729
|
minLength: i = 0,
|
|
716
730
|
label: r,
|
|
717
|
-
value:
|
|
731
|
+
value: a,
|
|
718
732
|
"data-testid": c,
|
|
719
|
-
sx:
|
|
733
|
+
sx: s,
|
|
720
734
|
boxSx: l,
|
|
721
735
|
textFieldColor: u,
|
|
722
736
|
textFieldVariant: g = "filled",
|
|
723
737
|
loadingText: S = "Loading...",
|
|
724
738
|
noOptionsText: A = "No options",
|
|
725
|
-
popupIcon: f = /* @__PURE__ */ n(
|
|
726
|
-
error:
|
|
739
|
+
popupIcon: f = /* @__PURE__ */ n(kt, {}),
|
|
740
|
+
error: b = !1,
|
|
727
741
|
helperText: y = "",
|
|
728
742
|
preLoadedOptions: p = void 0,
|
|
729
|
-
disablePortal:
|
|
743
|
+
disablePortal: k = !1,
|
|
730
744
|
disableIconFlip: I = !1
|
|
731
745
|
}) {
|
|
732
|
-
const [
|
|
733
|
-
const v =
|
|
746
|
+
const [E, V] = T(""), P = (h, C) => {
|
|
747
|
+
const v = a.filter((w) => w.id !== C);
|
|
734
748
|
o(v, "delete", h);
|
|
735
|
-
}, { data: x, isLoading: $ } =
|
|
736
|
-
inputValue:
|
|
749
|
+
}, { data: x, isLoading: $ } = je({
|
|
750
|
+
inputValue: E,
|
|
737
751
|
label: r,
|
|
738
752
|
lookup: e,
|
|
739
753
|
minLength: i,
|
|
740
754
|
preLoadedOptions: p
|
|
741
|
-
}), R =
|
|
755
|
+
}), R = E.length >= i;
|
|
742
756
|
return /* @__PURE__ */ m("div", { "data-testid": c, children: [
|
|
743
757
|
/* @__PURE__ */ n(
|
|
744
758
|
ie,
|
|
745
759
|
{
|
|
746
|
-
sx: d(d({},
|
|
760
|
+
sx: d(d({}, s), I ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
747
761
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
748
|
-
disablePortal:
|
|
762
|
+
disablePortal: k,
|
|
749
763
|
multiple: !0,
|
|
750
764
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
751
765
|
loading: R ? $ : !1,
|
|
752
|
-
options: [...
|
|
766
|
+
options: [...a, ...x != null ? x : []],
|
|
753
767
|
filterSelectedOptions: !0,
|
|
754
768
|
includeInputInList: !0,
|
|
755
|
-
value:
|
|
769
|
+
value: a,
|
|
756
770
|
onChange: (h, C, v) => {
|
|
757
771
|
o(C, v, h);
|
|
758
772
|
},
|
|
@@ -766,7 +780,7 @@ function Jo({
|
|
|
766
780
|
label: r,
|
|
767
781
|
fullWidth: !0,
|
|
768
782
|
variant: g,
|
|
769
|
-
error:
|
|
783
|
+
error: b,
|
|
770
784
|
helperText: y,
|
|
771
785
|
InputProps: D(d({}, h.InputProps), {
|
|
772
786
|
endAdornment: /* @__PURE__ */ m(B, { children: [
|
|
@@ -785,25 +799,25 @@ function Jo({
|
|
|
785
799
|
isOptionEqualToValue: (h, C) => h.id === C.id,
|
|
786
800
|
renderOption: (h, C, v) => {
|
|
787
801
|
if (t) {
|
|
788
|
-
const w =
|
|
802
|
+
const w = Dt(C.label, v.inputValue, {
|
|
789
803
|
insideWords: !0,
|
|
790
804
|
findAllOccurrences: !0
|
|
791
|
-
}), Z =
|
|
805
|
+
}), Z = It(C.label, w);
|
|
792
806
|
return /* @__PURE__ */ oe(
|
|
793
807
|
"li",
|
|
794
808
|
D(d({}, h), {
|
|
795
809
|
key: C.id,
|
|
796
810
|
"data-testid": c ? `${c}:Autocomplete:option(${C.id.toString()})` : void 0
|
|
797
811
|
}),
|
|
798
|
-
/* @__PURE__ */ n("div", { children: Z.map((
|
|
812
|
+
/* @__PURE__ */ n("div", { children: Z.map((de, ot) => /* @__PURE__ */ n(
|
|
799
813
|
"span",
|
|
800
814
|
{
|
|
801
815
|
style: {
|
|
802
|
-
fontWeight:
|
|
816
|
+
fontWeight: de.highlight ? 700 : 400
|
|
803
817
|
},
|
|
804
|
-
children:
|
|
818
|
+
children: de.text
|
|
805
819
|
},
|
|
806
|
-
|
|
820
|
+
ot
|
|
807
821
|
)) })
|
|
808
822
|
);
|
|
809
823
|
} else
|
|
@@ -818,8 +832,8 @@ function Jo({
|
|
|
818
832
|
}
|
|
819
833
|
}
|
|
820
834
|
),
|
|
821
|
-
|
|
822
|
-
|
|
835
|
+
a.length > 0 && /* @__PURE__ */ n(F, { sx: l, children: a.map((h) => /* @__PURE__ */ n(
|
|
836
|
+
ft,
|
|
823
837
|
{
|
|
824
838
|
sx: {
|
|
825
839
|
marginTop: 1,
|
|
@@ -827,7 +841,7 @@ function Jo({
|
|
|
827
841
|
height: "auto"
|
|
828
842
|
},
|
|
829
843
|
label: /* @__PURE__ */ n(
|
|
830
|
-
|
|
844
|
+
mt,
|
|
831
845
|
{
|
|
832
846
|
title: h.tooltipContent || "",
|
|
833
847
|
placement: "bottom-start",
|
|
@@ -841,13 +855,13 @@ function Jo({
|
|
|
841
855
|
}
|
|
842
856
|
]
|
|
843
857
|
},
|
|
844
|
-
children: /* @__PURE__ */ n(
|
|
858
|
+
children: /* @__PURE__ */ n(_, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
|
|
845
859
|
}
|
|
846
860
|
),
|
|
847
861
|
"data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
|
|
848
862
|
onDelete: (C) => P(C, h.id),
|
|
849
863
|
deleteIcon: /* @__PURE__ */ n(
|
|
850
|
-
|
|
864
|
+
bt,
|
|
851
865
|
{
|
|
852
866
|
"data-testid": c ? `${c}:Chip(${h.id.toString()}):deleteIcon` : void 0
|
|
853
867
|
}
|
|
@@ -857,40 +871,40 @@ function Jo({
|
|
|
857
871
|
)) })
|
|
858
872
|
] });
|
|
859
873
|
}
|
|
860
|
-
const
|
|
861
|
-
lookup: e = () =>
|
|
874
|
+
const jo = /MUI: The value provided to.*is invalid/i, en = ({
|
|
875
|
+
lookup: e = () => N(void 0, null, function* () {
|
|
862
876
|
}),
|
|
863
877
|
onChange: t,
|
|
864
878
|
label: o,
|
|
865
879
|
value: i,
|
|
866
880
|
sx: r,
|
|
867
|
-
textFieldColor:
|
|
881
|
+
textFieldColor: a,
|
|
868
882
|
textFieldVariant: c = "filled",
|
|
869
|
-
error:
|
|
883
|
+
error: s = !1,
|
|
870
884
|
"data-testid": l,
|
|
871
885
|
noOptionsText: u = "No options",
|
|
872
886
|
minLength: g = 3,
|
|
873
887
|
disablePortal: S = !1,
|
|
874
888
|
preLoadedOptions: A,
|
|
875
889
|
helperText: f = "",
|
|
876
|
-
disabled:
|
|
890
|
+
disabled: b,
|
|
877
891
|
popupIcon: y,
|
|
878
892
|
disableIconFlip: p
|
|
879
893
|
}) => {
|
|
880
|
-
const [
|
|
881
|
-
inputValue:
|
|
894
|
+
const [k, I] = T(""), { data: E, isLoading: V } = je({
|
|
895
|
+
inputValue: k,
|
|
882
896
|
label: o,
|
|
883
897
|
lookup: e,
|
|
884
898
|
minLength: g != null ? g : 0,
|
|
885
899
|
preLoadedOptions: A
|
|
886
|
-
}), P =
|
|
887
|
-
return /* @__PURE__ */ n("div", { "data-testid": l, children: /* @__PURE__ */ n(
|
|
900
|
+
}), P = k.length >= g;
|
|
901
|
+
return /* @__PURE__ */ n("div", { "data-testid": l, children: /* @__PURE__ */ n(gt, { direction: "row", spacing: 1, children: /* @__PURE__ */ n(
|
|
888
902
|
ie,
|
|
889
903
|
{
|
|
890
904
|
sx: d(d({}, r), p ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
|
|
891
905
|
"data-testid": l ? `${l}:Autocomplete` : void 0,
|
|
892
906
|
loading: P ? V : !1,
|
|
893
|
-
options:
|
|
907
|
+
options: E != null ? E : [],
|
|
894
908
|
onChange: (x, $, R) => {
|
|
895
909
|
t(x, $, R);
|
|
896
910
|
},
|
|
@@ -907,8 +921,8 @@ const Zo = /MUI: The value provided to.*is invalid/i, jo = ({
|
|
|
907
921
|
}, x), {
|
|
908
922
|
variant: c,
|
|
909
923
|
label: o,
|
|
910
|
-
color:
|
|
911
|
-
error:
|
|
924
|
+
color: a,
|
|
925
|
+
error: s,
|
|
912
926
|
helperText: f
|
|
913
927
|
})
|
|
914
928
|
),
|
|
@@ -924,7 +938,7 @@ const Zo = /MUI: The value provided to.*is invalid/i, jo = ({
|
|
|
924
938
|
}),
|
|
925
939
|
$.label
|
|
926
940
|
),
|
|
927
|
-
disabled:
|
|
941
|
+
disabled: b
|
|
928
942
|
}
|
|
929
943
|
) }) });
|
|
930
944
|
}, io = (e) => {
|
|
@@ -932,33 +946,33 @@ const Zo = /MUI: The value provided to.*is invalid/i, jo = ({
|
|
|
932
946
|
return -1;
|
|
933
947
|
try {
|
|
934
948
|
const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
|
|
935
|
-
|
|
936
|
-
return "%" + ("00" +
|
|
949
|
+
$t.from(o, "base64").toString("utf8").split("").map(function(a) {
|
|
950
|
+
return "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2);
|
|
937
951
|
}).join("")
|
|
938
952
|
), r = JSON.parse(i);
|
|
939
953
|
return r != null && r.exp ? r.exp : -1;
|
|
940
954
|
} catch (t) {
|
|
941
955
|
return -1;
|
|
942
956
|
}
|
|
943
|
-
},
|
|
957
|
+
}, tn = ({
|
|
944
958
|
open: e = !1,
|
|
945
959
|
closeHandler: t,
|
|
946
960
|
setAuth0ExpiryTime: o
|
|
947
961
|
}) => {
|
|
948
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
962
|
+
const { logout: i, getAccessTokenSilently: r } = le(), [a, c] = T(0), s = () => N(void 0, null, function* () {
|
|
949
963
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
950
|
-
}), l = () =>
|
|
951
|
-
c(
|
|
964
|
+
}), l = () => N(void 0, null, function* () {
|
|
965
|
+
c(a + 1), t();
|
|
952
966
|
});
|
|
953
967
|
return ne(() => {
|
|
954
|
-
|
|
955
|
-
if (
|
|
968
|
+
N(void 0, null, function* () {
|
|
969
|
+
if (a > 0) {
|
|
956
970
|
const A = yield r({ cacheMode: "off" }), f = io(A) * 1e3;
|
|
957
971
|
o(f);
|
|
958
972
|
}
|
|
959
973
|
});
|
|
960
|
-
}, [
|
|
961
|
-
|
|
974
|
+
}, [a, r, o]), /* @__PURE__ */ n(
|
|
975
|
+
Ze,
|
|
962
976
|
{
|
|
963
977
|
isOpen: e,
|
|
964
978
|
primaryButton: {
|
|
@@ -970,7 +984,7 @@ const Zo = /MUI: The value provided to.*is invalid/i, jo = ({
|
|
|
970
984
|
},
|
|
971
985
|
secondaryButton: {
|
|
972
986
|
text: "Log out",
|
|
973
|
-
onClick:
|
|
987
|
+
onClick: s,
|
|
974
988
|
disabled: !1,
|
|
975
989
|
testId: "PreferencesDialog",
|
|
976
990
|
buttonColor: "secondary"
|
|
@@ -1000,7 +1014,7 @@ function lo(e) {
|
|
|
1000
1014
|
const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
|
|
1001
1015
|
return t === "access_denied" && o.match(/Script.*time.*exceeded/);
|
|
1002
1016
|
}
|
|
1003
|
-
function
|
|
1017
|
+
function on({
|
|
1004
1018
|
children: e,
|
|
1005
1019
|
appName: t = "the app",
|
|
1006
1020
|
throwErrors: o = "none",
|
|
@@ -1009,11 +1023,11 @@ function tn({
|
|
|
1009
1023
|
}
|
|
1010
1024
|
}) {
|
|
1011
1025
|
var S, A;
|
|
1012
|
-
const { isAuthenticated:
|
|
1026
|
+
const { isAuthenticated: a, isLoading: c, error: s, loginWithRedirect: l, logout: u } = le();
|
|
1013
1027
|
ne(() => {
|
|
1014
|
-
|
|
1015
|
-
}, [
|
|
1016
|
-
const g =
|
|
1028
|
+
s && r(s);
|
|
1029
|
+
}, [s, r]);
|
|
1030
|
+
const g = at(
|
|
1017
1031
|
() => ({
|
|
1018
1032
|
appState: {
|
|
1019
1033
|
returnTo: `${window.location.pathname}${window.location.search}`
|
|
@@ -1022,38 +1036,38 @@ function tn({
|
|
|
1022
1036
|
[]
|
|
1023
1037
|
);
|
|
1024
1038
|
if (ne(() => {
|
|
1025
|
-
c ||
|
|
1026
|
-
}, [c,
|
|
1039
|
+
c || a || s || l(g);
|
|
1040
|
+
}, [c, a, s, l, r, g]), s) {
|
|
1027
1041
|
if (i || console.error(
|
|
1028
|
-
`Error detected in AuthGuard [isAuthenticated=${
|
|
1029
|
-
|
|
1042
|
+
`Error detected in AuthGuard [isAuthenticated=${a},isLoading=${c}]`,
|
|
1043
|
+
s
|
|
1030
1044
|
), o === "all")
|
|
1031
|
-
throw
|
|
1032
|
-
if (ro(
|
|
1033
|
-
let f = "Auth error",
|
|
1034
|
-
if (ao(
|
|
1035
|
-
f = "Unauthorised",
|
|
1036
|
-
else if (so(
|
|
1037
|
-
f = "App not authorised",
|
|
1038
|
-
else if (lo(
|
|
1039
|
-
f = "Auth0 script execution time exceeded",
|
|
1040
|
-
else if (
|
|
1045
|
+
throw s;
|
|
1046
|
+
if (ro(s)) {
|
|
1047
|
+
let f = "Auth error", b = "An unknown Auth0 error occurred.";
|
|
1048
|
+
if (ao(s))
|
|
1049
|
+
f = "Unauthorised", b = `You are not authorised to access ${t}.`;
|
|
1050
|
+
else if (so(s))
|
|
1051
|
+
f = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
|
|
1052
|
+
else if (lo(s))
|
|
1053
|
+
f = "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.";
|
|
1054
|
+
else if (s.message === "Invalid state") {
|
|
1041
1055
|
const y = localStorage.getItem("auth0_redirect_count");
|
|
1042
1056
|
y ? y && parseInt(y) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(y) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
|
|
1043
|
-
} else if (o === "unknown") throw
|
|
1044
|
-
return /* @__PURE__ */ m(
|
|
1045
|
-
/* @__PURE__ */ n(
|
|
1046
|
-
/* @__PURE__ */ m(
|
|
1047
|
-
/* @__PURE__ */ n(
|
|
1057
|
+
} else if (o === "unknown") throw s;
|
|
1058
|
+
return /* @__PURE__ */ m(Be, { open: !0, children: [
|
|
1059
|
+
/* @__PURE__ */ n(Re, { children: f }),
|
|
1060
|
+
/* @__PURE__ */ m(Oe, { children: [
|
|
1061
|
+
/* @__PURE__ */ n(_, { children: b }),
|
|
1048
1062
|
/* @__PURE__ */ n("br", {}),
|
|
1049
|
-
/* @__PURE__ */ n(
|
|
1050
|
-
/* @__PURE__ */ m(
|
|
1063
|
+
/* @__PURE__ */ n(_, { variant: "subtitle2", children: "Details from Auth0" }),
|
|
1064
|
+
/* @__PURE__ */ m(_, { variant: "body2", children: [
|
|
1051
1065
|
"error: ",
|
|
1052
|
-
(S =
|
|
1066
|
+
(S = s == null ? void 0 : s.error) != null ? S : "N/A"
|
|
1053
1067
|
] }),
|
|
1054
|
-
/* @__PURE__ */ m(
|
|
1068
|
+
/* @__PURE__ */ m(_, { variant: "body2", children: [
|
|
1055
1069
|
"description: ",
|
|
1056
|
-
(A =
|
|
1070
|
+
(A = s == null ? void 0 : s.error_description) != null ? A : "N/A"
|
|
1057
1071
|
] })
|
|
1058
1072
|
] }),
|
|
1059
1073
|
/* @__PURE__ */ m(He, { children: [
|
|
@@ -1061,9 +1075,9 @@ function tn({
|
|
|
1061
1075
|
/* @__PURE__ */ n(W, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
|
|
1062
1076
|
] })
|
|
1063
1077
|
] });
|
|
1064
|
-
} else if (o === "unknown") throw
|
|
1078
|
+
} else if (o === "unknown") throw s;
|
|
1065
1079
|
}
|
|
1066
|
-
return
|
|
1080
|
+
return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ n(B, { children: e })) : /* @__PURE__ */ n(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
1067
1081
|
}
|
|
1068
1082
|
const co = {
|
|
1069
1083
|
autoHideDuration: 6e3,
|
|
@@ -1073,70 +1087,70 @@ const co = {
|
|
|
1073
1087
|
disableWindowBlurListener: !1
|
|
1074
1088
|
}, uo = {
|
|
1075
1089
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1076
|
-
},
|
|
1090
|
+
}, Ie = {
|
|
1077
1091
|
message: "",
|
|
1078
1092
|
severity: "info",
|
|
1079
1093
|
variant: "standard",
|
|
1080
1094
|
progressIndicator: void 0
|
|
1081
1095
|
// Can use 'circular' or 'linear'
|
|
1082
|
-
},
|
|
1096
|
+
}, $e = 100, Fe = 2e3, po = 2e3, ho = /* @__PURE__ */ (() => {
|
|
1083
1097
|
let e = 0;
|
|
1084
1098
|
return () => (e += 1, e);
|
|
1085
1099
|
})(), fo = {
|
|
1086
1100
|
borderBottomLeftRadius: "0px",
|
|
1087
1101
|
borderBottomRightRadius: "0px"
|
|
1088
|
-
}, mo = {}, go = {},
|
|
1089
|
-
function xo(
|
|
1090
|
-
var c =
|
|
1102
|
+
}, mo = {}, go = {}, et = _e(null);
|
|
1103
|
+
function xo(a) {
|
|
1104
|
+
var c = a, {
|
|
1091
1105
|
overrideState: e = mo,
|
|
1092
1106
|
overrideActions: t = go,
|
|
1093
1107
|
shouldClose: o = uo.shouldClose,
|
|
1094
1108
|
children: i
|
|
1095
|
-
} = c, r =
|
|
1109
|
+
} = c, r = he(c, [
|
|
1096
1110
|
"overrideState",
|
|
1097
1111
|
"overrideActions",
|
|
1098
1112
|
"shouldClose",
|
|
1099
1113
|
"children"
|
|
1100
1114
|
]);
|
|
1101
1115
|
var C;
|
|
1102
|
-
const [{ open:
|
|
1116
|
+
const [{ open: s }, l] = T({ open: !1 }), u = ee([]), g = ee(Date.now()), S = ee(0), A = K((v) => {
|
|
1103
1117
|
l({ open: v });
|
|
1104
1118
|
}, []), f = K((v = {}) => {
|
|
1105
|
-
S.current += 1, u.current.length >=
|
|
1106
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${
|
|
1119
|
+
S.current += 1, u.current.length >= $e && Date.now() - g.current >= Fe && (g.current = Date.now(), console.error(
|
|
1120
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${$e}) hit ${S.current} times in last ${Fe}ms)`
|
|
1107
1121
|
), S.current = 0);
|
|
1108
|
-
const w = d(D(d({},
|
|
1122
|
+
const w = d(D(d({}, Ie), {
|
|
1109
1123
|
key: ho()
|
|
1110
1124
|
}), v);
|
|
1111
1125
|
return u.current.push(w), u.current.length === 1 && l({ open: !0 }), w.key;
|
|
1112
|
-
}, []),
|
|
1126
|
+
}, []), b = (v = "", w = {}) => f(d({ message: v, severity: "success" }, w)), y = (v = "", w = {}) => f(d({ message: v, severity: "info" }, w)), p = (v = "", w = {}) => f(d({ message: v, severity: "warning" }, w)), k = (v = "", w = {}) => f(d({ message: v, severity: "error" }, w)), I = (v) => {
|
|
1113
1127
|
const w = u.current.findIndex((Z) => Z.key === v);
|
|
1114
1128
|
if (w !== -1)
|
|
1115
1129
|
return w === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(w, 1);
|
|
1116
|
-
},
|
|
1130
|
+
}, E = (v, w) => {
|
|
1117
1131
|
o(v, w) && l({ open: !1 });
|
|
1118
1132
|
}, V = () => {
|
|
1119
1133
|
}, P = () => {
|
|
1120
1134
|
u.current.shift(), u.current.length > 0 && l({ open: !0 });
|
|
1121
|
-
}, x = (C = u.current[0]) != null ? C : d({},
|
|
1135
|
+
}, x = (C = u.current[0]) != null ? C : d({}, Ie), $ = {};
|
|
1122
1136
|
"autoHideDuration" in x && ($.autoHideDuration = x.autoHideDuration);
|
|
1123
1137
|
const R = d(d({}, co), r), h = d(d({
|
|
1124
|
-
open:
|
|
1138
|
+
open: s,
|
|
1125
1139
|
setOpen: A,
|
|
1126
1140
|
enqueueNotification: f,
|
|
1127
|
-
enqueueSuccessNotification:
|
|
1141
|
+
enqueueSuccessNotification: b,
|
|
1128
1142
|
enqueueInfoNotification: y,
|
|
1129
1143
|
enqueueWarningNotification: p,
|
|
1130
|
-
enqueueErrorNotification:
|
|
1144
|
+
enqueueErrorNotification: k,
|
|
1131
1145
|
removeNotification: I
|
|
1132
1146
|
}, e), t);
|
|
1133
|
-
return /* @__PURE__ */ m(
|
|
1147
|
+
return /* @__PURE__ */ m(et.Provider, { value: h, children: [
|
|
1134
1148
|
i,
|
|
1135
1149
|
/* @__PURE__ */ n(
|
|
1136
|
-
|
|
1150
|
+
xt,
|
|
1137
1151
|
D(d(d({}, R), $), {
|
|
1138
|
-
open:
|
|
1139
|
-
onClose:
|
|
1152
|
+
open: s,
|
|
1153
|
+
onClose: E,
|
|
1140
1154
|
TransitionProps: {
|
|
1141
1155
|
onExited: P,
|
|
1142
1156
|
onExit: V
|
|
@@ -1144,9 +1158,9 @@ function xo(s) {
|
|
|
1144
1158
|
sx: { zIndex: po },
|
|
1145
1159
|
children: /* @__PURE__ */ m("div", { children: [
|
|
1146
1160
|
/* @__PURE__ */ n(
|
|
1147
|
-
|
|
1161
|
+
Ct,
|
|
1148
1162
|
{
|
|
1149
|
-
onClose: (v) =>
|
|
1163
|
+
onClose: (v) => E(v, "closeAlert"),
|
|
1150
1164
|
severity: x.severity,
|
|
1151
1165
|
variant: "filled",
|
|
1152
1166
|
icon: x.progressIndicator === "circular" ? /* @__PURE__ */ n(ae, { size: "1em" }) : void 0,
|
|
@@ -1154,28 +1168,28 @@ function xo(s) {
|
|
|
1154
1168
|
children: x.message
|
|
1155
1169
|
}
|
|
1156
1170
|
),
|
|
1157
|
-
x.progressIndicator === "linear" && /* @__PURE__ */ n(
|
|
1171
|
+
x.progressIndicator === "linear" && /* @__PURE__ */ n(Pe, { color: "primary" })
|
|
1158
1172
|
] })
|
|
1159
1173
|
})
|
|
1160
1174
|
)
|
|
1161
1175
|
] });
|
|
1162
1176
|
}
|
|
1163
1177
|
function Co() {
|
|
1164
|
-
const e =
|
|
1178
|
+
const e = Me(et);
|
|
1165
1179
|
if (e === null)
|
|
1166
|
-
throw new
|
|
1180
|
+
throw new ce("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1167
1181
|
return e;
|
|
1168
1182
|
}
|
|
1169
|
-
const
|
|
1183
|
+
const nn = se(
|
|
1170
1184
|
(e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: i }) => /* @__PURE__ */ n(xo, D(d({}, e), { overrideState: t, overrideActions: o, children: i }))
|
|
1171
|
-
),
|
|
1172
|
-
var
|
|
1185
|
+
), tt = "domainCode";
|
|
1186
|
+
var Ne;
|
|
1173
1187
|
const Ee = M(
|
|
1174
|
-
JSON.parse((
|
|
1188
|
+
JSON.parse((Ne = localStorage.getItem(tt)) != null ? Ne : '{"domainCode": ""}').domainCode
|
|
1175
1189
|
), vo = M(
|
|
1176
1190
|
(e) => e(Ee),
|
|
1177
1191
|
(e, t, o) => {
|
|
1178
|
-
t(Ee, o), localStorage.setItem(
|
|
1192
|
+
t(Ee, o), localStorage.setItem(tt, JSON.stringify({ domainCode: o }));
|
|
1179
1193
|
}
|
|
1180
1194
|
), Ao = {
|
|
1181
1195
|
act: "ACT",
|
|
@@ -1192,23 +1206,23 @@ const Ee = M(
|
|
|
1192
1206
|
}, wo = (e) => {
|
|
1193
1207
|
var t;
|
|
1194
1208
|
return e === null ? "N/A" : (t = Ao[e]) != null ? t : "";
|
|
1195
|
-
},
|
|
1209
|
+
}, rn = ({
|
|
1196
1210
|
isLoading: e,
|
|
1197
1211
|
isOpen: t,
|
|
1198
1212
|
onClose: o,
|
|
1199
1213
|
onDomainChange: i,
|
|
1200
1214
|
domainOptions: r,
|
|
1201
|
-
applicationName:
|
|
1215
|
+
applicationName: a,
|
|
1202
1216
|
handleLogout: c
|
|
1203
1217
|
}) => {
|
|
1204
|
-
const [
|
|
1218
|
+
const [s, l] = O(vo), [u, g] = T(s), { enqueueSuccessNotification: S } = Co(), A = r.length === 0, f = !!s && !r.includes(s) && !r.includes(u), b = !s || A || f, y = () => N(void 0, null, function* () {
|
|
1205
1219
|
u ? (l(u), i == null || i(u), S(`Set organisation to ${u}`), o()) : (l(""), i == null || i(""));
|
|
1206
|
-
}), p = () =>
|
|
1207
|
-
|
|
1220
|
+
}), p = () => N(void 0, null, function* () {
|
|
1221
|
+
s && !A && !f ? (g(s), o()) : b && c();
|
|
1208
1222
|
});
|
|
1209
|
-
let
|
|
1210
|
-
return A ?
|
|
1211
|
-
|
|
1223
|
+
let k;
|
|
1224
|
+
return A ? k = "Unable to retrieve your active organisations. Try logging in again." : f && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ m(
|
|
1225
|
+
Ze,
|
|
1212
1226
|
{
|
|
1213
1227
|
isOpen: t,
|
|
1214
1228
|
dialogTitle: "Select an organisation",
|
|
@@ -1219,15 +1233,15 @@ const Ee = M(
|
|
|
1219
1233
|
buttonColor: "primary"
|
|
1220
1234
|
},
|
|
1221
1235
|
secondaryButton: {
|
|
1222
|
-
text:
|
|
1236
|
+
text: b ? "Logout" : "Cancel",
|
|
1223
1237
|
onClick: p
|
|
1224
1238
|
},
|
|
1225
|
-
onClose:
|
|
1239
|
+
onClose: b ? () => {
|
|
1226
1240
|
} : o,
|
|
1227
1241
|
children: [
|
|
1228
|
-
/* @__PURE__ */ m(
|
|
1242
|
+
/* @__PURE__ */ m(_, { marginBottom: 2, children: [
|
|
1229
1243
|
"Select the default organisation that you want to use with the ",
|
|
1230
|
-
|
|
1244
|
+
a,
|
|
1231
1245
|
"."
|
|
1232
1246
|
] }),
|
|
1233
1247
|
/* @__PURE__ */ n(
|
|
@@ -1237,7 +1251,7 @@ const Ee = M(
|
|
|
1237
1251
|
multiple: !1,
|
|
1238
1252
|
disableClearable: !1,
|
|
1239
1253
|
value: u !== "" ? u : null,
|
|
1240
|
-
onChange: (I,
|
|
1254
|
+
onChange: (I, E) => g(E != null ? E : ""),
|
|
1241
1255
|
getOptionLabel: wo,
|
|
1242
1256
|
options: [...r],
|
|
1243
1257
|
renderInput: (I) => /* @__PURE__ */ n(
|
|
@@ -1255,11 +1269,11 @@ const Ee = M(
|
|
|
1255
1269
|
)
|
|
1256
1270
|
}
|
|
1257
1271
|
),
|
|
1258
|
-
|
|
1272
|
+
k && /* @__PURE__ */ n(vt, { error: !0, children: k })
|
|
1259
1273
|
]
|
|
1260
1274
|
}
|
|
1261
1275
|
);
|
|
1262
|
-
},
|
|
1276
|
+
}, an = Ue({
|
|
1263
1277
|
palette: {
|
|
1264
1278
|
primary: {
|
|
1265
1279
|
dark: "#00A651",
|
|
@@ -1310,7 +1324,7 @@ const Ee = M(
|
|
|
1310
1324
|
navBar: {
|
|
1311
1325
|
backgroundColor: "#E8E8E8"
|
|
1312
1326
|
}
|
|
1313
|
-
}),
|
|
1327
|
+
}), sn = Ue({
|
|
1314
1328
|
palette: {
|
|
1315
1329
|
primary: {
|
|
1316
1330
|
main: "#007236",
|
|
@@ -1406,46 +1420,47 @@ const Ee = M(
|
|
|
1406
1420
|
}
|
|
1407
1421
|
});
|
|
1408
1422
|
export {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1423
|
+
Ze as AgDialog,
|
|
1424
|
+
Jo as AppLayout,
|
|
1425
|
+
on as AuthGuard,
|
|
1426
|
+
et as Context,
|
|
1427
|
+
ce as ContextError,
|
|
1428
|
+
rn as DomainCodeDialog,
|
|
1415
1429
|
Uo as ExampleComponent,
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1430
|
+
Zo as FetchAutocomplete,
|
|
1431
|
+
jo as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
|
|
1432
|
+
Ge as NAVBAR_WIDTH_CLOSED,
|
|
1433
|
+
qe as NAVBAR_WIDTH_OPENED,
|
|
1420
1434
|
Go as NavBar,
|
|
1421
1435
|
Vo as NavBarDarkStyledList,
|
|
1422
1436
|
qo as NavBarLightStyledList,
|
|
1423
|
-
|
|
1437
|
+
Bt as NavBarProvider,
|
|
1424
1438
|
xo as SaladBarProvider,
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1439
|
+
tn as SessionExpiryDialog,
|
|
1440
|
+
en as SingleAutocomplete,
|
|
1441
|
+
Rt as buildNavBarState,
|
|
1428
1442
|
Ko as determineUserLevelFromClaims,
|
|
1429
1443
|
vo as domainCodeAtom,
|
|
1430
|
-
|
|
1444
|
+
an as fed21Theme,
|
|
1431
1445
|
io as getAuth0Expiry,
|
|
1432
|
-
|
|
1433
|
-
|
|
1446
|
+
sn as internalAgSystemsTheme,
|
|
1447
|
+
H as navBarClasses,
|
|
1434
1448
|
Q as navBarOpenAtom,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1449
|
+
Gt as navBarTopAtom,
|
|
1450
|
+
zt as navBarWidthClosedAtom,
|
|
1451
|
+
Wt as navBarWidthOpenAtom,
|
|
1438
1452
|
Jt as simpleHashCode,
|
|
1439
1453
|
Xo as suppressConsole,
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1454
|
+
Se as titleTextAtom,
|
|
1455
|
+
qt as topBarHeightAtom,
|
|
1456
|
+
Vt as topBarMiddleAtom,
|
|
1443
1457
|
Yo as unsuppressConsole,
|
|
1444
|
-
|
|
1445
|
-
|
|
1458
|
+
je as useAutocompleteOptions,
|
|
1459
|
+
Pt as useNavBar,
|
|
1446
1460
|
Co as useSaladBar,
|
|
1461
|
+
Qo as useValidDomains,
|
|
1447
1462
|
zo as withBrowserRouter,
|
|
1448
1463
|
Wo as withNavBarProvider,
|
|
1449
|
-
|
|
1464
|
+
nn as withSaladBarProvider
|
|
1450
1465
|
};
|
|
1451
1466
|
//# sourceMappingURL=index.js.map
|