@australiangreens/ag-internal-components 0.0.84 → 0.0.86
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/README.md +5 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts +2 -1
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
- package/dist/esm/index.js +207 -204
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/PageContainer.d.ts +3 -2
- package/dist/layouts/AppLayout/PageContainer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Pt = Object.defineProperty, Nt = Object.defineProperties;
|
|
2
|
+
var Lt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var j = Object.getOwnPropertySymbols;
|
|
4
4
|
var Te = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var pe = (e, t, n) => t in e ?
|
|
5
|
+
var pe = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, s = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
Te.call(t, n) && pe(e, n, t[n]);
|
|
8
8
|
if (j)
|
|
9
9
|
for (var n of j(t))
|
|
10
10
|
Oe.call(t, n) && pe(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, S = (e, t) =>
|
|
12
|
+
}, S = (e, t) => Nt(e, Lt(t));
|
|
13
13
|
var Ee = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
@@ -38,21 +38,21 @@ var P = (e, t, n) => new Promise((i, r) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
|
|
40
40
|
import { useState as E, createContext as Qe, useCallback as ne, useContext as Ye, createElement as Ce, useEffect as oe, useRef as he } from "react";
|
|
41
|
-
import { Typography as F, Button as ie, Paper as Ke, Box as $, Drawer as ve, Dialog as Je,
|
|
41
|
+
import { Typography as F, Button as ie, Paper as Ke, Box as $, Drawer as ve, Dialog as Je, LinearProgress as Ze, DialogTitle as je, DialogContent as et, DialogActions as tt, Autocomplete as we, TextField as Ae, CircularProgress as be, Chip as _t, Tooltip as Mt, Stack as Rt, styled as Se, IconButton as Q, Container as nt, useTheme as ae, useMediaQuery as Ht, Collapse as Wt, Avatar as Fe, Fade as zt, Skeleton as Pe, Toolbar as Ut, Divider as Ne, CssBaseline as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
|
|
42
42
|
import Qt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as R, createTheme as
|
|
43
|
+
import { styled as R, createTheme as ot, alpha as ge } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Yt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as K } from "souvlaki";
|
|
46
|
-
import
|
|
47
|
-
import { Cancel as Kt, ArrowDropDown as Jt, ArrowForward as
|
|
46
|
+
import it from "@mui/material/List";
|
|
47
|
+
import { Cancel as Kt, ArrowDropDown as Jt, ArrowForward as rt, ArrowBack as at, ViewHeadline as Zt } from "@mui/icons-material";
|
|
48
48
|
import jt from "autosuggest-highlight/match";
|
|
49
49
|
import en from "autosuggest-highlight/parse";
|
|
50
50
|
import { useQuery as tn, QueryClient as nn, QueryClientProvider as on } from "@tanstack/react-query";
|
|
51
|
-
import { useAuth0 as
|
|
51
|
+
import { useAuth0 as st } from "@auth0/auth0-react";
|
|
52
52
|
import { Buffer as rn } from "buffer";
|
|
53
53
|
import an from "@mui/material/Skeleton";
|
|
54
|
-
import { atom as M, useSetAtom as
|
|
55
|
-
import { useHydrateAtoms as
|
|
54
|
+
import { atom as M, useSetAtom as lt, useAtomValue as Le, useAtom as V, getDefaultStore as sn, Provider as ct } from "jotai";
|
|
55
|
+
import { useHydrateAtoms as dt } from "jotai/utils";
|
|
56
56
|
function Do({ text: e }) {
|
|
57
57
|
const [t, n] = E(0);
|
|
58
58
|
return /* @__PURE__ */ p(_, { children: [
|
|
@@ -77,7 +77,7 @@ function Do({ text: e }) {
|
|
|
77
77
|
] })
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const ut = 330, pt = 73, U = "Navbar", q = {
|
|
81
81
|
root: `${U}-root`,
|
|
82
82
|
menuButton: `${U}-menuButton`,
|
|
83
83
|
hide: `${U}-hide`,
|
|
@@ -106,7 +106,7 @@ const dt = 330, ut = 73, U = "Navbar", q = {
|
|
|
106
106
|
marginTop: "64px",
|
|
107
107
|
marginBottom: "16px"
|
|
108
108
|
}
|
|
109
|
-
})),
|
|
109
|
+
})), ht = () => ({
|
|
110
110
|
position: "absolute",
|
|
111
111
|
height: "100%",
|
|
112
112
|
overflowX: "hidden",
|
|
@@ -115,13 +115,13 @@ const dt = 330, ut = 73, U = "Navbar", q = {
|
|
|
115
115
|
backgroundColor: "black"
|
|
116
116
|
// backgroundColor: '#e8e8e8',
|
|
117
117
|
}), cn = () => s({
|
|
118
|
-
width: dt
|
|
119
|
-
}, pt()), dn = () => s({
|
|
120
118
|
width: ut
|
|
121
|
-
},
|
|
119
|
+
}, ht()), dn = () => s({
|
|
120
|
+
width: pt
|
|
121
|
+
}, ht()), un = R(ve, {
|
|
122
122
|
shouldForwardProp: (e) => e !== "open"
|
|
123
123
|
})(({ theme: e, open: t }) => s(s({
|
|
124
|
-
width: t ?
|
|
124
|
+
width: t ? ut : pt,
|
|
125
125
|
flexShrink: 0,
|
|
126
126
|
whiteSpace: "nowrap",
|
|
127
127
|
boxSizing: "border-box",
|
|
@@ -134,7 +134,7 @@ const dt = 330, ut = 73, U = "Navbar", q = {
|
|
|
134
134
|
class ke extends Yt {
|
|
135
135
|
}
|
|
136
136
|
Be(ke, "errorName", "ContextError");
|
|
137
|
-
const
|
|
137
|
+
const gt = Qe(null), pn = {}, hn = {}, gn = ({
|
|
138
138
|
overrideState: e = pn,
|
|
139
139
|
overrideActions: t = hn,
|
|
140
140
|
children: n
|
|
@@ -148,9 +148,9 @@ const ht = Qe(null), pn = {}, hn = {}, gn = ({
|
|
|
148
148
|
setOpen: a,
|
|
149
149
|
toggleOpen: c
|
|
150
150
|
}, e), t);
|
|
151
|
-
return /* @__PURE__ */ o(
|
|
151
|
+
return /* @__PURE__ */ o(gt.Provider, { value: d, children: n });
|
|
152
152
|
}, fn = () => {
|
|
153
|
-
const e = Ye(
|
|
153
|
+
const e = Ye(gt);
|
|
154
154
|
if (e === null)
|
|
155
155
|
throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
156
156
|
return e;
|
|
@@ -158,7 +158,7 @@ const ht = Qe(null), pn = {}, hn = {}, gn = ({
|
|
|
158
158
|
open: !0
|
|
159
159
|
}, e), yo = K(
|
|
160
160
|
(e = mn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(gn, { overrideState: e, overrideActions: t, children: n })
|
|
161
|
-
), _e = 7, $o = R(
|
|
161
|
+
), _e = 7, $o = R(it)(({ theme: e }) => ({
|
|
162
162
|
backgroundColor: "black",
|
|
163
163
|
color: "white",
|
|
164
164
|
"& .MuiListItem-root": {
|
|
@@ -196,7 +196,7 @@ const ht = Qe(null), pn = {}, hn = {}, gn = ({
|
|
|
196
196
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
197
197
|
// },
|
|
198
198
|
}
|
|
199
|
-
})), Me = 7, Io = R(
|
|
199
|
+
})), Me = 7, Io = R(it)(({ theme: e }) => ({
|
|
200
200
|
backgroundColor: "#e8e8e8",
|
|
201
201
|
color: "inherit",
|
|
202
202
|
"& .MuiListItem-root": {
|
|
@@ -254,7 +254,7 @@ function To({
|
|
|
254
254
|
)
|
|
255
255
|
] });
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const ft = ({
|
|
258
258
|
isOpen: e,
|
|
259
259
|
dialogTitle: t,
|
|
260
260
|
children: n,
|
|
@@ -264,41 +264,43 @@ const gt = ({
|
|
|
264
264
|
onClose: c,
|
|
265
265
|
sx: d,
|
|
266
266
|
"data-testid": l,
|
|
267
|
-
disableCloseOnBackdropOrEscape: u = !1
|
|
267
|
+
disableCloseOnBackdropOrEscape: u = !1,
|
|
268
|
+
isLoading: w = !1
|
|
268
269
|
}) => {
|
|
269
|
-
var
|
|
270
|
-
const [C,
|
|
270
|
+
var g, k;
|
|
271
|
+
const [C, A] = E(!1);
|
|
271
272
|
return /* @__PURE__ */ p(
|
|
272
273
|
Je,
|
|
273
274
|
{
|
|
274
275
|
open: e,
|
|
275
|
-
onClose: (
|
|
276
|
-
u && (
|
|
276
|
+
onClose: (b, D) => P(void 0, null, function* () {
|
|
277
|
+
u && (D === "backdropClick" || D === "escapeKeyDown") || C || (a != null && a.onClick ? yield a.onClick() : c());
|
|
277
278
|
}),
|
|
278
279
|
fullWidth: !0,
|
|
279
280
|
maxWidth: i != null ? i : "xs",
|
|
280
281
|
"data-testid": l,
|
|
281
282
|
sx: d,
|
|
282
283
|
children: [
|
|
283
|
-
/* @__PURE__ */ o(Ze, {
|
|
284
|
-
/* @__PURE__ */ o(je, {
|
|
285
|
-
/* @__PURE__ */
|
|
284
|
+
w && /* @__PURE__ */ o(Ze, { sx: { height: "4px", marginBottom: "-4px" } }),
|
|
285
|
+
/* @__PURE__ */ o(je, { children: t }),
|
|
286
|
+
/* @__PURE__ */ o(et, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
287
|
+
/* @__PURE__ */ p(tt, { children: [
|
|
286
288
|
/* @__PURE__ */ o(
|
|
287
289
|
ie,
|
|
288
290
|
{
|
|
289
|
-
onClick: (
|
|
291
|
+
onClick: (g = a == null ? void 0 : a.onClick) != null ? g : c,
|
|
290
292
|
"data-testid": a == null ? void 0 : a.testId,
|
|
291
293
|
disabled: (a == null ? void 0 : a.disabled) || C,
|
|
292
294
|
color: a == null ? void 0 : a.buttonColor,
|
|
293
|
-
children: (
|
|
295
|
+
children: (k = a == null ? void 0 : a.text) != null ? k : "Cancel"
|
|
294
296
|
}
|
|
295
297
|
),
|
|
296
298
|
r && /* @__PURE__ */ o(
|
|
297
299
|
ie,
|
|
298
300
|
{
|
|
299
301
|
onClick: () => P(void 0, null, function* () {
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
+
var b;
|
|
303
|
+
A(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), A(!1);
|
|
302
304
|
}),
|
|
303
305
|
"data-testid": r.testId,
|
|
304
306
|
disabled: r.disabled || C,
|
|
@@ -310,7 +312,7 @@ const gt = ({
|
|
|
310
312
|
]
|
|
311
313
|
}
|
|
312
314
|
);
|
|
313
|
-
},
|
|
315
|
+
}, mt = ({
|
|
314
316
|
minLength: e,
|
|
315
317
|
preLoadedOptions: t,
|
|
316
318
|
lookup: n,
|
|
@@ -334,32 +336,32 @@ function Oo({
|
|
|
334
336
|
sx: d,
|
|
335
337
|
boxSx: l,
|
|
336
338
|
textFieldColor: u,
|
|
337
|
-
textFieldVariant:
|
|
338
|
-
loadingText:
|
|
339
|
+
textFieldVariant: w = "filled",
|
|
340
|
+
loadingText: C = "Loading...",
|
|
339
341
|
noOptionsText: A = "No options",
|
|
340
342
|
popupIcon: g = /* @__PURE__ */ o(Jt, {}),
|
|
341
343
|
error: k = !1,
|
|
342
344
|
helperText: b = "",
|
|
343
|
-
preLoadedOptions:
|
|
344
|
-
disablePortal:
|
|
345
|
+
preLoadedOptions: D = void 0,
|
|
346
|
+
disablePortal: I = !1
|
|
345
347
|
}) {
|
|
346
|
-
const [
|
|
348
|
+
const [x, y] = E(""), H = (h, f) => {
|
|
347
349
|
const B = a.filter((m) => m.id !== f);
|
|
348
350
|
n(B, "delete", h);
|
|
349
|
-
}, { data: N, isLoading: T } =
|
|
350
|
-
inputValue:
|
|
351
|
+
}, { data: N, isLoading: T } = mt({
|
|
352
|
+
inputValue: x,
|
|
351
353
|
label: r,
|
|
352
354
|
lookup: e,
|
|
353
355
|
minLength: i,
|
|
354
|
-
preLoadedOptions:
|
|
355
|
-
}), W =
|
|
356
|
+
preLoadedOptions: D
|
|
357
|
+
}), W = x.length >= i;
|
|
356
358
|
return /* @__PURE__ */ p("div", { "data-testid": c, children: [
|
|
357
359
|
/* @__PURE__ */ o(
|
|
358
360
|
we,
|
|
359
361
|
{
|
|
360
362
|
sx: d,
|
|
361
363
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
362
|
-
disablePortal:
|
|
364
|
+
disablePortal: I,
|
|
363
365
|
multiple: !0,
|
|
364
366
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
365
367
|
loading: W ? T : !1,
|
|
@@ -370,16 +372,16 @@ function Oo({
|
|
|
370
372
|
onChange: (h, f, B) => {
|
|
371
373
|
n(f, B, h);
|
|
372
374
|
},
|
|
373
|
-
onInputChange: (h, f) =>
|
|
375
|
+
onInputChange: (h, f) => y(f),
|
|
374
376
|
noOptionsText: W ? A : "Start typing to search",
|
|
375
|
-
loadingText:
|
|
377
|
+
loadingText: C,
|
|
376
378
|
popupIcon: g,
|
|
377
379
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
378
380
|
Ae,
|
|
379
381
|
S(s({}, h), {
|
|
380
382
|
label: r,
|
|
381
383
|
fullWidth: !0,
|
|
382
|
-
variant:
|
|
384
|
+
variant: w,
|
|
383
385
|
error: k,
|
|
384
386
|
helperText: b,
|
|
385
387
|
InputProps: S(s({}, h.InputProps), {
|
|
@@ -402,14 +404,14 @@ function Oo({
|
|
|
402
404
|
const m = jt(f.label, B.inputValue, {
|
|
403
405
|
insideWords: !0,
|
|
404
406
|
findAllOccurrences: !0
|
|
405
|
-
}),
|
|
407
|
+
}), v = en(f.label, m);
|
|
406
408
|
return /* @__PURE__ */ Ce(
|
|
407
409
|
"li",
|
|
408
410
|
S(s({}, h), {
|
|
409
411
|
key: f.id,
|
|
410
412
|
"data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
|
|
411
413
|
}),
|
|
412
|
-
/* @__PURE__ */ o("div", { children:
|
|
414
|
+
/* @__PURE__ */ o("div", { children: v.map((L, se) => /* @__PURE__ */ o(
|
|
413
415
|
"span",
|
|
414
416
|
{
|
|
415
417
|
style: {
|
|
@@ -433,7 +435,7 @@ function Oo({
|
|
|
433
435
|
}
|
|
434
436
|
),
|
|
435
437
|
a.length > 0 && /* @__PURE__ */ o($, { sx: l, children: a.map((h) => /* @__PURE__ */ o(
|
|
436
|
-
|
|
438
|
+
_t,
|
|
437
439
|
{
|
|
438
440
|
sx: {
|
|
439
441
|
marginTop: 1,
|
|
@@ -441,7 +443,7 @@ function Oo({
|
|
|
441
443
|
height: "auto"
|
|
442
444
|
},
|
|
443
445
|
label: /* @__PURE__ */ o(
|
|
444
|
-
|
|
446
|
+
Mt,
|
|
445
447
|
{
|
|
446
448
|
title: h.tooltipContent || "",
|
|
447
449
|
placement: "bottom-start",
|
|
@@ -483,54 +485,54 @@ const Eo = ({
|
|
|
483
485
|
"data-testid": d,
|
|
484
486
|
noOptionsText: l = "No options",
|
|
485
487
|
minLength: u = 3,
|
|
486
|
-
disablePortal:
|
|
487
|
-
preLoadedOptions:
|
|
488
|
+
disablePortal: w = !1,
|
|
489
|
+
preLoadedOptions: C,
|
|
488
490
|
helperText: A = ""
|
|
489
491
|
}) => {
|
|
490
|
-
const [g, k] = E(""), { data: b, isLoading:
|
|
492
|
+
const [g, k] = E(""), { data: b, isLoading: D } = mt({
|
|
491
493
|
inputValue: g,
|
|
492
494
|
label: n,
|
|
493
495
|
lookup: e,
|
|
494
496
|
minLength: u != null ? u : 0,
|
|
495
|
-
preLoadedOptions:
|
|
496
|
-
}),
|
|
497
|
-
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(
|
|
497
|
+
preLoadedOptions: C
|
|
498
|
+
}), I = g.length >= u;
|
|
499
|
+
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Rt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
498
500
|
we,
|
|
499
501
|
{
|
|
500
502
|
sx: r,
|
|
501
503
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
502
|
-
loading:
|
|
504
|
+
loading: I ? D : !1,
|
|
503
505
|
options: b != null ? b : [],
|
|
504
|
-
onChange: (
|
|
505
|
-
t(
|
|
506
|
+
onChange: (x, y) => {
|
|
507
|
+
t(x, y);
|
|
506
508
|
},
|
|
507
|
-
disablePortal:
|
|
508
|
-
filterOptions: (
|
|
509
|
+
disablePortal: w,
|
|
510
|
+
filterOptions: (x) => x,
|
|
509
511
|
value: i,
|
|
510
|
-
noOptionsText:
|
|
511
|
-
getOptionLabel: (
|
|
512
|
-
renderInput: (
|
|
512
|
+
noOptionsText: I ? l : "Start typing to search",
|
|
513
|
+
getOptionLabel: (x) => x.label,
|
|
514
|
+
renderInput: (x) => /* @__PURE__ */ o(
|
|
513
515
|
Ae,
|
|
514
516
|
S(s({
|
|
515
517
|
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0
|
|
516
|
-
},
|
|
518
|
+
}, x), {
|
|
517
519
|
variant: c,
|
|
518
520
|
label: n,
|
|
519
521
|
color: a,
|
|
520
522
|
helperText: A
|
|
521
523
|
})
|
|
522
524
|
),
|
|
523
|
-
isOptionEqualToValue: (
|
|
524
|
-
onInputChange: (
|
|
525
|
-
k(
|
|
525
|
+
isOptionEqualToValue: (x, y) => x.id === y.id,
|
|
526
|
+
onInputChange: (x, y) => {
|
|
527
|
+
k(y);
|
|
526
528
|
},
|
|
527
|
-
renderOption: (
|
|
529
|
+
renderOption: (x, y) => /* @__PURE__ */ Ce(
|
|
528
530
|
"li",
|
|
529
|
-
S(s({},
|
|
530
|
-
key:
|
|
531
|
-
"data-testid": d ? `${d}:Autocomplete:option(${
|
|
531
|
+
S(s({}, x), {
|
|
532
|
+
key: y.id,
|
|
533
|
+
"data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
|
|
532
534
|
}),
|
|
533
|
-
|
|
535
|
+
y.label
|
|
534
536
|
)
|
|
535
537
|
}
|
|
536
538
|
) }) });
|
|
@@ -552,7 +554,7 @@ const Eo = ({
|
|
|
552
554
|
closeHandler: t,
|
|
553
555
|
setAuth0ExpiryTime: n
|
|
554
556
|
}) => {
|
|
555
|
-
const { logout: i, getAccessTokenSilently: r } =
|
|
557
|
+
const { logout: i, getAccessTokenSilently: r } = st(), [a, c] = E(0), d = () => P(void 0, null, function* () {
|
|
556
558
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
557
559
|
}), l = () => P(void 0, null, function* () {
|
|
558
560
|
c(a + 1), t();
|
|
@@ -565,7 +567,7 @@ const Eo = ({
|
|
|
565
567
|
}
|
|
566
568
|
}))();
|
|
567
569
|
}, [a, r, n]), /* @__PURE__ */ o(
|
|
568
|
-
|
|
570
|
+
ft,
|
|
569
571
|
{
|
|
570
572
|
isOpen: e,
|
|
571
573
|
primaryButton: {
|
|
@@ -609,7 +611,7 @@ function Fo({
|
|
|
609
611
|
children: e,
|
|
610
612
|
appName: t = "the app"
|
|
611
613
|
}) {
|
|
612
|
-
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: a, logout: c } =
|
|
614
|
+
const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: a, logout: c } = st();
|
|
613
615
|
if (oe(() => {
|
|
614
616
|
if (i || n || r)
|
|
615
617
|
return;
|
|
@@ -622,9 +624,9 @@ function Fo({
|
|
|
622
624
|
}, [i, n, r, a]), r && xn(r)) {
|
|
623
625
|
let d = "Auth error", l = "An unknown Auth0 error occurred.";
|
|
624
626
|
return wn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : An(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : vn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ p(Je, { open: !0, children: [
|
|
625
|
-
/* @__PURE__ */ o(
|
|
626
|
-
/* @__PURE__ */ o(
|
|
627
|
-
/* @__PURE__ */ o(
|
|
627
|
+
/* @__PURE__ */ o(je, { children: d }),
|
|
628
|
+
/* @__PURE__ */ o(et, { children: /* @__PURE__ */ o(F, { children: l }) }),
|
|
629
|
+
/* @__PURE__ */ o(tt, { children: /* @__PURE__ */ o(ie, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
628
630
|
] });
|
|
629
631
|
}
|
|
630
632
|
return n ? /* @__PURE__ */ o(_, { children: e }) : /* @__PURE__ */ o(an, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
@@ -708,7 +710,7 @@ function Dn({
|
|
|
708
710
|
size: "large",
|
|
709
711
|
children: [
|
|
710
712
|
" ",
|
|
711
|
-
/* @__PURE__ */ o(
|
|
713
|
+
/* @__PURE__ */ o(rt, {})
|
|
712
714
|
]
|
|
713
715
|
}
|
|
714
716
|
),
|
|
@@ -724,14 +726,14 @@ function Dn({
|
|
|
724
726
|
size: "large",
|
|
725
727
|
children: [
|
|
726
728
|
" ",
|
|
727
|
-
/* @__PURE__ */ o(
|
|
729
|
+
/* @__PURE__ */ o(at, {})
|
|
728
730
|
]
|
|
729
731
|
}
|
|
730
732
|
)
|
|
731
733
|
] }) })
|
|
732
734
|
] });
|
|
733
735
|
}
|
|
734
|
-
const
|
|
736
|
+
const Ct = 400, yn = Se(ve, {
|
|
735
737
|
shouldForwardProp: (e) => (
|
|
736
738
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
737
739
|
![
|
|
@@ -788,13 +790,13 @@ function Re({
|
|
|
788
790
|
onClose: i = () => {
|
|
789
791
|
},
|
|
790
792
|
titleText: r = "",
|
|
791
|
-
width: a =
|
|
793
|
+
width: a = Ct,
|
|
792
794
|
showCloseArrow: c = !0,
|
|
793
795
|
debugOpacity: d = !1,
|
|
794
796
|
headerBoxProps: l = {},
|
|
795
797
|
onOpened: u,
|
|
796
|
-
onClosed:
|
|
797
|
-
"data-testid":
|
|
798
|
+
onClosed: w,
|
|
799
|
+
"data-testid": C,
|
|
798
800
|
navBarOpen: A = !1,
|
|
799
801
|
navBarWidthOpen: g = 0,
|
|
800
802
|
navBarWidthClosed: k = 0
|
|
@@ -804,14 +806,14 @@ function Re({
|
|
|
804
806
|
{
|
|
805
807
|
SlideProps: {
|
|
806
808
|
onEntered: () => u == null ? void 0 : u(),
|
|
807
|
-
onExited: () =>
|
|
809
|
+
onExited: () => w == null ? void 0 : w()
|
|
808
810
|
},
|
|
809
811
|
variant: "persistent",
|
|
810
812
|
anchor: t,
|
|
811
813
|
open: n,
|
|
812
814
|
width: a,
|
|
813
815
|
debugOpacity: d,
|
|
814
|
-
"data-testid":
|
|
816
|
+
"data-testid": C,
|
|
815
817
|
navBarOpen: A,
|
|
816
818
|
navBarWidthOpen: g,
|
|
817
819
|
navBarWidthClosed: k,
|
|
@@ -819,12 +821,12 @@ function Re({
|
|
|
819
821
|
/* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
|
|
820
822
|
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
821
823
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
822
|
-
/* @__PURE__ */ o(
|
|
824
|
+
/* @__PURE__ */ o(at, { "data-testid": "arrowbackicon" }),
|
|
823
825
|
" "
|
|
824
826
|
] })
|
|
825
827
|
] }) : /* @__PURE__ */ p(_, { children: [
|
|
826
828
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
827
|
-
/* @__PURE__ */ o(
|
|
829
|
+
/* @__PURE__ */ o(rt, {}),
|
|
828
830
|
" "
|
|
829
831
|
] }),
|
|
830
832
|
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
@@ -857,7 +859,7 @@ const In = R($, {
|
|
|
857
859
|
}),
|
|
858
860
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
859
861
|
});
|
|
860
|
-
}), Tn = R(
|
|
862
|
+
}), Tn = R(nt, {
|
|
861
863
|
name: "PageContainer"
|
|
862
864
|
})(({ theme: e }) => ({
|
|
863
865
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -867,7 +869,7 @@ const In = R($, {
|
|
|
867
869
|
})), fe = !1, me = !1, ee = {
|
|
868
870
|
titleText: "",
|
|
869
871
|
flavour: "push",
|
|
870
|
-
width:
|
|
872
|
+
width: Ct,
|
|
871
873
|
arrowButtons: "both",
|
|
872
874
|
startOpen: !1,
|
|
873
875
|
open: void 0,
|
|
@@ -888,81 +890,81 @@ function Po({
|
|
|
888
890
|
pageContentDataTestId: d,
|
|
889
891
|
topBarDataTestId: l,
|
|
890
892
|
navBarOpen: u,
|
|
891
|
-
navBarWidthOpen:
|
|
892
|
-
navBarWidthClosed:
|
|
893
|
+
navBarWidthOpen: w,
|
|
894
|
+
navBarWidthClosed: C
|
|
893
895
|
}) {
|
|
894
|
-
const [A, g] = E(fe), [k, b] = E(me), [
|
|
896
|
+
const [A, g] = E(fe), [k, b] = E(me), [D, I] = E(fe), [x, y] = E(me), H = n !== void 0, N = i !== void 0, {
|
|
895
897
|
titleText: T,
|
|
896
898
|
content: W,
|
|
897
899
|
flavour: h,
|
|
898
900
|
open: f,
|
|
899
901
|
onChangeOpen: B,
|
|
900
902
|
width: m,
|
|
901
|
-
arrowButtons:
|
|
903
|
+
arrowButtons: v,
|
|
902
904
|
startOpen: L,
|
|
903
905
|
onOpened: se,
|
|
904
|
-
onClosed:
|
|
905
|
-
dataTestId:
|
|
906
|
+
onClosed: $t,
|
|
907
|
+
dataTestId: It
|
|
906
908
|
} = n ? s(s({}, ee), n) : s({}, ee), {
|
|
907
|
-
titleText:
|
|
908
|
-
content:
|
|
909
|
+
titleText: Tt,
|
|
910
|
+
content: Ot,
|
|
909
911
|
flavour: De,
|
|
910
912
|
open: le,
|
|
911
913
|
onChangeOpen: ye,
|
|
912
914
|
width: ce,
|
|
913
915
|
arrowButtons: J,
|
|
914
916
|
startOpen: Z,
|
|
915
|
-
onOpened:
|
|
916
|
-
onClosed:
|
|
917
|
-
dataTestId:
|
|
917
|
+
onOpened: Et,
|
|
918
|
+
onClosed: Bt,
|
|
919
|
+
dataTestId: Ft
|
|
918
920
|
} = i ? s(s({}, ee), i) : s({}, ee);
|
|
919
921
|
oe(() => {
|
|
920
|
-
L !== fe && (g(L),
|
|
922
|
+
L !== fe && (g(L), I(L));
|
|
921
923
|
}, [L]), oe(() => {
|
|
922
|
-
Z !== me && (b(Z),
|
|
924
|
+
Z !== me && (b(Z), y(Z));
|
|
923
925
|
}, [Z]);
|
|
924
926
|
const de = f === void 0 ? A : f, ue = le === void 0 ? k : le, $e = (z) => {
|
|
925
|
-
f === void 0 && (g(z), r && N && (z ? (b(!1),
|
|
927
|
+
f === void 0 && (g(z), r && N && (z ? (b(!1), y(k)) : b(x))), B && B(z);
|
|
926
928
|
}, Ie = (z) => {
|
|
927
|
-
le === void 0 && (b(z), r && H && (z ? (g(!1),
|
|
929
|
+
le === void 0 && (b(z), r && H && (z ? (g(!1), I(A)) : g(D))), ye && ye(z);
|
|
928
930
|
};
|
|
929
931
|
return /* @__PURE__ */ p($, { children: [
|
|
930
932
|
H && /* @__PURE__ */ o(
|
|
931
933
|
Re,
|
|
932
934
|
{
|
|
933
|
-
"data-testid":
|
|
935
|
+
"data-testid": It,
|
|
934
936
|
anchor: "left",
|
|
935
937
|
open: de,
|
|
936
938
|
onClose: () => $e(!1),
|
|
937
939
|
width: m,
|
|
938
940
|
titleText: T,
|
|
939
941
|
debugOpacity: a,
|
|
940
|
-
showCloseArrow:
|
|
942
|
+
showCloseArrow: v === "both" || v === "close",
|
|
941
943
|
onOpened: se,
|
|
942
|
-
onClosed:
|
|
944
|
+
onClosed: $t,
|
|
943
945
|
navBarOpen: u,
|
|
944
|
-
navBarWidthOpen:
|
|
945
|
-
navBarWidthClosed:
|
|
946
|
+
navBarWidthOpen: w,
|
|
947
|
+
navBarWidthClosed: C,
|
|
946
948
|
children: W
|
|
947
949
|
}
|
|
948
950
|
),
|
|
949
951
|
N && /* @__PURE__ */ o(
|
|
950
952
|
Re,
|
|
951
953
|
{
|
|
952
|
-
"data-testid":
|
|
954
|
+
"data-testid": Ft,
|
|
953
955
|
anchor: "right",
|
|
954
956
|
open: ue,
|
|
955
957
|
onClose: () => Ie(!1),
|
|
956
958
|
width: ce,
|
|
957
|
-
titleText:
|
|
959
|
+
titleText: Tt,
|
|
958
960
|
debugOpacity: a,
|
|
959
961
|
showCloseArrow: J === "both" || J === "close",
|
|
960
|
-
onOpened:
|
|
961
|
-
onClosed:
|
|
962
|
+
onOpened: Et,
|
|
963
|
+
onClosed: Bt,
|
|
962
964
|
navBarOpen: u,
|
|
963
|
-
navBarWidthOpen:
|
|
964
|
-
navBarWidthClosed:
|
|
965
|
-
children:
|
|
965
|
+
navBarWidthOpen: w,
|
|
966
|
+
navBarWidthClosed: C,
|
|
967
|
+
children: Ot
|
|
966
968
|
}
|
|
967
969
|
),
|
|
968
970
|
/* @__PURE__ */ o(
|
|
@@ -975,7 +977,7 @@ function Po({
|
|
|
975
977
|
open: de,
|
|
976
978
|
width: m,
|
|
977
979
|
onOpen: () => $e(!0),
|
|
978
|
-
showOpenArrow:
|
|
980
|
+
showOpenArrow: v === "both" || v === "open"
|
|
979
981
|
}
|
|
980
982
|
} : {}), N && De === "push" ? {
|
|
981
983
|
rightPanel: {
|
|
@@ -1004,10 +1006,10 @@ function Po({
|
|
|
1004
1006
|
)
|
|
1005
1007
|
] });
|
|
1006
1008
|
}
|
|
1007
|
-
const
|
|
1009
|
+
const xt = () => {
|
|
1008
1010
|
const e = ae();
|
|
1009
|
-
return
|
|
1010
|
-
}, On = 64, En = 72, Bn = 256, Y = M(!0),
|
|
1011
|
+
return Ht(e.breakpoints.down("sm"));
|
|
1012
|
+
}, On = 64, En = 72, Bn = 256, Y = M(!0), vt = M(Bn), wt = M(En), xe = M(""), Fn = M(void 0), At = M(On), bt = M(void 0);
|
|
1011
1013
|
function Pn({ links: e }) {
|
|
1012
1014
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
1013
1015
|
}
|
|
@@ -1044,7 +1046,7 @@ const te = "Navbar", X = {
|
|
|
1044
1046
|
}), Ln = (e) => {
|
|
1045
1047
|
const t = ae();
|
|
1046
1048
|
return /* @__PURE__ */ o(
|
|
1047
|
-
|
|
1049
|
+
Wt,
|
|
1048
1050
|
s({
|
|
1049
1051
|
easing: t.transitions.easing.sharp,
|
|
1050
1052
|
timeout: {
|
|
@@ -1053,7 +1055,7 @@ const te = "Navbar", X = {
|
|
|
1053
1055
|
}
|
|
1054
1056
|
}, e)
|
|
1055
1057
|
);
|
|
1056
|
-
},
|
|
1058
|
+
}, St = (e) => {
|
|
1057
1059
|
var t, n;
|
|
1058
1060
|
return {
|
|
1059
1061
|
overflowX: "hidden",
|
|
@@ -1064,10 +1066,10 @@ const te = "Navbar", X = {
|
|
|
1064
1066
|
}, He = (e, t) => s({
|
|
1065
1067
|
width: t,
|
|
1066
1068
|
transition: re(e, "width", "entering")
|
|
1067
|
-
},
|
|
1069
|
+
}, St(e)), We = (e, t) => s({
|
|
1068
1070
|
width: t,
|
|
1069
1071
|
transition: re(e, "width", "leaving")
|
|
1070
|
-
},
|
|
1072
|
+
}, St(e)), _n = R(ve, {
|
|
1071
1073
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
1072
1074
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => s(s({
|
|
1073
1075
|
flexShrink: 0,
|
|
@@ -1126,7 +1128,7 @@ function Hn({ user: e, domainCode: t, open: n }) {
|
|
|
1126
1128
|
) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
|
|
1127
1129
|
}
|
|
1128
1130
|
),
|
|
1129
|
-
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(
|
|
1131
|
+
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ p($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1130
1132
|
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "50%" }),
|
|
1131
1133
|
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "25%" })
|
|
1132
1134
|
] }) }) })
|
|
@@ -1145,7 +1147,7 @@ function Wn({
|
|
|
1145
1147
|
user: d,
|
|
1146
1148
|
domainCode: l
|
|
1147
1149
|
}) {
|
|
1148
|
-
const u =
|
|
1150
|
+
const u = xt(), w = lt(Y);
|
|
1149
1151
|
return /* @__PURE__ */ o(Nn, { className: X.root, "data-testid": i, children: /* @__PURE__ */ p(
|
|
1150
1152
|
_n,
|
|
1151
1153
|
{
|
|
@@ -1158,11 +1160,11 @@ function Wn({
|
|
|
1158
1160
|
component: "nav"
|
|
1159
1161
|
},
|
|
1160
1162
|
onClose: () => {
|
|
1161
|
-
|
|
1163
|
+
w(!1);
|
|
1162
1164
|
},
|
|
1163
1165
|
isSmallScreen: u,
|
|
1164
1166
|
children: [
|
|
1165
|
-
!u && /* @__PURE__ */ o(
|
|
1167
|
+
!u && /* @__PURE__ */ o(Ut, {}),
|
|
1166
1168
|
r && /* @__PURE__ */ p($, { flexGrow: "0", children: [
|
|
1167
1169
|
r,
|
|
1168
1170
|
/* @__PURE__ */ o(Ne, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
@@ -1180,7 +1182,8 @@ function Wn({
|
|
|
1180
1182
|
function zn({
|
|
1181
1183
|
children: e,
|
|
1182
1184
|
topBarHeight: t,
|
|
1183
|
-
maxWidth: n = !1
|
|
1185
|
+
maxWidth: n = !1,
|
|
1186
|
+
noPadding: i
|
|
1184
1187
|
}) {
|
|
1185
1188
|
return /* @__PURE__ */ o(
|
|
1186
1189
|
$,
|
|
@@ -1192,8 +1195,8 @@ function zn({
|
|
|
1192
1195
|
// scrollbarGutter: 'stable both-edges',
|
|
1193
1196
|
flexGrow: 1
|
|
1194
1197
|
},
|
|
1195
|
-
children: /* @__PURE__ */ o(
|
|
1196
|
-
|
|
1198
|
+
children: i ? /* @__PURE__ */ o($, { component: "main", id: "main-content", children: e }) : /* @__PURE__ */ o(
|
|
1199
|
+
nt,
|
|
1197
1200
|
{
|
|
1198
1201
|
component: "main",
|
|
1199
1202
|
id: "main-content",
|
|
@@ -1214,7 +1217,7 @@ function Vn({
|
|
|
1214
1217
|
"data-testid": n,
|
|
1215
1218
|
middle: i
|
|
1216
1219
|
}) {
|
|
1217
|
-
const r =
|
|
1220
|
+
const r = lt(Y), a = () => r((l) => !l), c = ae(), d = xt();
|
|
1218
1221
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
|
|
1219
1222
|
Ke,
|
|
1220
1223
|
{
|
|
@@ -1260,34 +1263,34 @@ function No({
|
|
|
1260
1263
|
navBarMiddle: d,
|
|
1261
1264
|
navBarBottom: l,
|
|
1262
1265
|
user: u,
|
|
1263
|
-
domainCode:
|
|
1266
|
+
domainCode: w
|
|
1264
1267
|
}) {
|
|
1265
|
-
|
|
1268
|
+
dt([
|
|
1266
1269
|
[Y, n != null ? n : !0],
|
|
1267
1270
|
[xe, t != null ? t : ""]
|
|
1268
1271
|
]);
|
|
1269
|
-
const
|
|
1272
|
+
const C = Le(Y), [A] = V(vt), [g] = V(wt), k = Le(xe), [b] = V(At), [D] = V(Fn), [I] = V(bt);
|
|
1270
1273
|
return /* @__PURE__ */ p($, { children: [
|
|
1271
|
-
/* @__PURE__ */ o(
|
|
1274
|
+
/* @__PURE__ */ o(Gt, {}),
|
|
1272
1275
|
/* @__PURE__ */ o(
|
|
1273
1276
|
Vn,
|
|
1274
1277
|
{
|
|
1275
1278
|
titleText: k,
|
|
1276
1279
|
"data-testid": a,
|
|
1277
1280
|
height: b,
|
|
1278
|
-
middle:
|
|
1281
|
+
middle: D
|
|
1279
1282
|
}
|
|
1280
1283
|
),
|
|
1281
1284
|
/* @__PURE__ */ p($, { sx: { display: "flex" }, children: [
|
|
1282
1285
|
/* @__PURE__ */ o(
|
|
1283
1286
|
Wn,
|
|
1284
1287
|
{
|
|
1285
|
-
open:
|
|
1286
|
-
top:
|
|
1288
|
+
open: C,
|
|
1289
|
+
top: I,
|
|
1287
1290
|
middle: d,
|
|
1288
1291
|
bottom: l,
|
|
1289
1292
|
user: u,
|
|
1290
|
-
domainCode:
|
|
1293
|
+
domainCode: w,
|
|
1291
1294
|
widthOpen: A,
|
|
1292
1295
|
widthClosed: g,
|
|
1293
1296
|
offsetTop: b,
|
|
@@ -1326,7 +1329,7 @@ const qn = {
|
|
|
1326
1329
|
})(), Kn = {
|
|
1327
1330
|
borderBottomLeftRadius: "0px",
|
|
1328
1331
|
borderBottomRightRadius: "0px"
|
|
1329
|
-
}, Jn = {}, Zn = {},
|
|
1332
|
+
}, Jn = {}, Zn = {}, kt = Qe(null);
|
|
1330
1333
|
function jn(a) {
|
|
1331
1334
|
var c = a, {
|
|
1332
1335
|
overrideState: e = Jn,
|
|
@@ -1340,22 +1343,22 @@ function jn(a) {
|
|
|
1340
1343
|
"children"
|
|
1341
1344
|
]);
|
|
1342
1345
|
var B;
|
|
1343
|
-
const [{ open: d }, l] = E({ open: !1 }), u = he([]),
|
|
1346
|
+
const [{ open: d }, l] = E({ open: !1 }), u = he([]), w = he(Date.now()), C = he(0), A = ne((m) => {
|
|
1344
1347
|
l({ open: m });
|
|
1345
1348
|
}, []), g = ne((m = {}) => {
|
|
1346
|
-
|
|
1347
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${
|
|
1348
|
-
),
|
|
1349
|
-
const
|
|
1349
|
+
C.current += 1, u.current.length >= Ge && Date.now() - w.current >= Ve && (w.current = Date.now(), console.error(
|
|
1350
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${C.current} times in last ${Ve}ms)`
|
|
1351
|
+
), C.current = 0);
|
|
1352
|
+
const v = s(S(s({}, Ue), {
|
|
1350
1353
|
key: Yn()
|
|
1351
1354
|
}), m);
|
|
1352
|
-
return u.current.push(
|
|
1353
|
-
}, []), k = (m = "",
|
|
1354
|
-
const
|
|
1355
|
-
if (
|
|
1356
|
-
return
|
|
1357
|
-
},
|
|
1358
|
-
n(m,
|
|
1355
|
+
return u.current.push(v), u.current.length === 1 && l({ open: !0 }), v.key;
|
|
1356
|
+
}, []), k = (m = "", v = {}) => g(s({ message: m, severity: "success" }, v)), b = (m = "", v = {}) => g(s({ message: m, severity: "info" }, v)), D = (m = "", v = {}) => g(s({ message: m, severity: "warning" }, v)), I = (m = "", v = {}) => g(s({ message: m, severity: "error" }, v)), x = (m) => {
|
|
1357
|
+
const v = u.current.findIndex((L) => L.key === m);
|
|
1358
|
+
if (v !== -1)
|
|
1359
|
+
return v === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(v, 1);
|
|
1360
|
+
}, y = (m, v) => {
|
|
1361
|
+
n(m, v) && l({ open: !1 });
|
|
1359
1362
|
}, H = () => {
|
|
1360
1363
|
}, N = () => {
|
|
1361
1364
|
u.current.shift(), u.current.length > 0 && l({ open: !0 });
|
|
@@ -1367,17 +1370,17 @@ function jn(a) {
|
|
|
1367
1370
|
enqueueNotification: g,
|
|
1368
1371
|
enqueueSuccessNotification: k,
|
|
1369
1372
|
enqueueInfoNotification: b,
|
|
1370
|
-
enqueueWarningNotification:
|
|
1371
|
-
enqueueErrorNotification:
|
|
1372
|
-
removeNotification:
|
|
1373
|
+
enqueueWarningNotification: D,
|
|
1374
|
+
enqueueErrorNotification: I,
|
|
1375
|
+
removeNotification: x
|
|
1373
1376
|
}, e), t);
|
|
1374
|
-
return /* @__PURE__ */ p(
|
|
1377
|
+
return /* @__PURE__ */ p(kt.Provider, { value: f, children: [
|
|
1375
1378
|
i,
|
|
1376
1379
|
/* @__PURE__ */ o(
|
|
1377
|
-
|
|
1380
|
+
Vt,
|
|
1378
1381
|
S(s(s({}, h), W), {
|
|
1379
1382
|
open: d,
|
|
1380
|
-
onClose:
|
|
1383
|
+
onClose: y,
|
|
1381
1384
|
TransitionProps: {
|
|
1382
1385
|
onExited: N,
|
|
1383
1386
|
onExit: H
|
|
@@ -1385,9 +1388,9 @@ function jn(a) {
|
|
|
1385
1388
|
sx: { zIndex: Qn },
|
|
1386
1389
|
children: /* @__PURE__ */ p("div", { children: [
|
|
1387
1390
|
/* @__PURE__ */ o(
|
|
1388
|
-
|
|
1391
|
+
qt,
|
|
1389
1392
|
{
|
|
1390
|
-
onClose: (m) =>
|
|
1393
|
+
onClose: (m) => y(m, "closeAlert"),
|
|
1391
1394
|
severity: T.severity,
|
|
1392
1395
|
variant: "filled",
|
|
1393
1396
|
icon: T.progressIndicator === "circular" ? /* @__PURE__ */ o(be, { size: "1em" }) : void 0,
|
|
@@ -1395,14 +1398,14 @@ function jn(a) {
|
|
|
1395
1398
|
children: T.message
|
|
1396
1399
|
}
|
|
1397
1400
|
),
|
|
1398
|
-
T.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1401
|
+
T.progressIndicator === "linear" && /* @__PURE__ */ o(Ze, { color: "primary" })
|
|
1399
1402
|
] })
|
|
1400
1403
|
})
|
|
1401
1404
|
)
|
|
1402
1405
|
] });
|
|
1403
1406
|
}
|
|
1404
1407
|
function eo() {
|
|
1405
|
-
const e = Ye(
|
|
1408
|
+
const e = Ye(kt);
|
|
1406
1409
|
if (e === null)
|
|
1407
1410
|
throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1408
1411
|
return e;
|
|
@@ -1412,14 +1415,14 @@ const Lo = K(
|
|
|
1412
1415
|
), to = sn(), _o = ({
|
|
1413
1416
|
children: e,
|
|
1414
1417
|
store: t
|
|
1415
|
-
}) => /* @__PURE__ */ o(
|
|
1418
|
+
}) => /* @__PURE__ */ o(ct, { store: t != null ? t : to, children: e }), Dt = "domainCode";
|
|
1416
1419
|
var Xe;
|
|
1417
1420
|
const qe = M(
|
|
1418
|
-
JSON.parse((Xe = localStorage.getItem(
|
|
1419
|
-
),
|
|
1421
|
+
JSON.parse((Xe = localStorage.getItem(Dt)) != null ? Xe : '{"domainCode": ""}').domainCode
|
|
1422
|
+
), yt = M(
|
|
1420
1423
|
(e) => e(qe),
|
|
1421
1424
|
(e, t, n) => {
|
|
1422
|
-
t(qe, n), localStorage.setItem(
|
|
1425
|
+
t(qe, n), localStorage.setItem(Dt, JSON.stringify({ domainCode: n }));
|
|
1423
1426
|
}
|
|
1424
1427
|
), no = {
|
|
1425
1428
|
act: "ACT",
|
|
@@ -1444,21 +1447,21 @@ const qe = M(
|
|
|
1444
1447
|
applicationName: r,
|
|
1445
1448
|
handleLogout: a
|
|
1446
1449
|
}) => {
|
|
1447
|
-
const [c, d] = V(
|
|
1448
|
-
l ? (d(l),
|
|
1450
|
+
const [c, d] = V(yt), [l, u] = E(c), { enqueueSuccessNotification: w } = eo(), C = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || C || A, k = () => P(void 0, null, function* () {
|
|
1451
|
+
l ? (d(l), w(`Set domain to ${l}`), n()) : d("");
|
|
1449
1452
|
}), b = () => P(void 0, null, function* () {
|
|
1450
|
-
c && !
|
|
1453
|
+
c && !C && !A ? (u(c), n()) : g && a();
|
|
1451
1454
|
});
|
|
1452
|
-
let
|
|
1453
|
-
return
|
|
1454
|
-
|
|
1455
|
+
let D;
|
|
1456
|
+
return C ? D = "Unable to retrieve your active organisations. Try logging in again." : A && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
|
|
1457
|
+
ft,
|
|
1455
1458
|
{
|
|
1456
1459
|
isOpen: t,
|
|
1457
1460
|
dialogTitle: "Select an organisation",
|
|
1458
1461
|
primaryButton: {
|
|
1459
1462
|
text: "Confirm",
|
|
1460
1463
|
onClick: k,
|
|
1461
|
-
disabled: !l ||
|
|
1464
|
+
disabled: !l || C || A,
|
|
1462
1465
|
buttonColor: "primary"
|
|
1463
1466
|
},
|
|
1464
1467
|
secondaryButton: {
|
|
@@ -1480,29 +1483,29 @@ const qe = M(
|
|
|
1480
1483
|
multiple: !1,
|
|
1481
1484
|
disableClearable: !1,
|
|
1482
1485
|
value: l !== "" ? l : null,
|
|
1483
|
-
onChange: (
|
|
1486
|
+
onChange: (I, x) => u(x != null ? x : ""),
|
|
1484
1487
|
getOptionLabel: oo,
|
|
1485
1488
|
options: [...i],
|
|
1486
|
-
renderInput: (
|
|
1489
|
+
renderInput: (I) => /* @__PURE__ */ o(
|
|
1487
1490
|
Ae,
|
|
1488
|
-
S(s({},
|
|
1491
|
+
S(s({}, I), {
|
|
1489
1492
|
variant: "filled",
|
|
1490
1493
|
label: "Select organisation",
|
|
1491
|
-
InputProps: S(s({},
|
|
1494
|
+
InputProps: S(s({}, I.InputProps), {
|
|
1492
1495
|
endAdornment: /* @__PURE__ */ p(_, { children: [
|
|
1493
1496
|
e ? /* @__PURE__ */ o(be, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1494
|
-
|
|
1497
|
+
I.InputProps.endAdornment
|
|
1495
1498
|
] })
|
|
1496
1499
|
})
|
|
1497
1500
|
})
|
|
1498
1501
|
)
|
|
1499
1502
|
}
|
|
1500
1503
|
),
|
|
1501
|
-
|
|
1504
|
+
D && /* @__PURE__ */ o(Xt, { error: !0, children: D })
|
|
1502
1505
|
]
|
|
1503
1506
|
}
|
|
1504
1507
|
);
|
|
1505
|
-
}, Ro =
|
|
1508
|
+
}, Ro = ot({
|
|
1506
1509
|
palette: {
|
|
1507
1510
|
primary: {
|
|
1508
1511
|
dark: "#00A651",
|
|
@@ -1553,7 +1556,7 @@ const qe = M(
|
|
|
1553
1556
|
navBar: {
|
|
1554
1557
|
backgroundColor: "#E8E8E8"
|
|
1555
1558
|
}
|
|
1556
|
-
}), Ho =
|
|
1559
|
+
}), Ho = ot({
|
|
1557
1560
|
palette: {
|
|
1558
1561
|
primary: {
|
|
1559
1562
|
main: "#007236",
|
|
@@ -1645,17 +1648,17 @@ const qe = M(
|
|
|
1645
1648
|
backgroundColor: "#E8E8E8"
|
|
1646
1649
|
}
|
|
1647
1650
|
}), io = {
|
|
1648
|
-
domainCode:
|
|
1651
|
+
domainCode: yt,
|
|
1649
1652
|
navBarOpen: Y,
|
|
1650
|
-
navBarWidthOpen:
|
|
1651
|
-
navBarWidthClosed:
|
|
1653
|
+
navBarWidthOpen: vt,
|
|
1654
|
+
navBarWidthClosed: wt,
|
|
1652
1655
|
titleText: xe,
|
|
1653
|
-
topBarHeight:
|
|
1654
|
-
navBarTop:
|
|
1655
|
-
}, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(
|
|
1656
|
+
topBarHeight: At,
|
|
1657
|
+
navBarTop: bt
|
|
1658
|
+
}, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(ct, { children: e })), ro = ({
|
|
1656
1659
|
initialValues: e,
|
|
1657
1660
|
children: t
|
|
1658
|
-
}) => (
|
|
1661
|
+
}) => (dt(e), /* @__PURE__ */ o(_, { children: t })), zo = K(
|
|
1659
1662
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1660
1663
|
ro,
|
|
1661
1664
|
{
|
|
@@ -1673,18 +1676,18 @@ const qe = M(
|
|
|
1673
1676
|
return /* @__PURE__ */ o(on, { client: t, children: e });
|
|
1674
1677
|
});
|
|
1675
1678
|
export {
|
|
1676
|
-
|
|
1679
|
+
ft as AgDialog,
|
|
1677
1680
|
No as AppLayout,
|
|
1678
1681
|
_o as AtomProvider,
|
|
1679
1682
|
Fo as AuthGuard,
|
|
1680
|
-
|
|
1683
|
+
kt as Context,
|
|
1681
1684
|
ke as ContextError,
|
|
1682
1685
|
Mo as DomainCodeDialog,
|
|
1683
1686
|
Do as ExampleComponent,
|
|
1684
1687
|
Oo as FetchAutocomplete,
|
|
1685
1688
|
ro as HydrateAtoms,
|
|
1686
|
-
|
|
1687
|
-
|
|
1689
|
+
pt as NAVBAR_WIDTH_CLOSED,
|
|
1690
|
+
ut as NAVBAR_WIDTH_OPENED,
|
|
1688
1691
|
To as NavBar,
|
|
1689
1692
|
$o as NavBarDarkStyledList,
|
|
1690
1693
|
Io as NavBarLightStyledList,
|
|
@@ -1695,19 +1698,19 @@ export {
|
|
|
1695
1698
|
Eo as SingleAutocomplete,
|
|
1696
1699
|
to as atomStore,
|
|
1697
1700
|
mn as buildNavBarState,
|
|
1698
|
-
|
|
1701
|
+
yt as domainCodeAtom,
|
|
1699
1702
|
Ro as fed21Theme,
|
|
1700
1703
|
Cn as getAuth0Expiry,
|
|
1701
1704
|
Ho as internalAgSystemsTheme,
|
|
1702
1705
|
q as navBarClasses,
|
|
1703
1706
|
Y as navBarOpenAtom,
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
+
bt as navBarTopAtom,
|
|
1708
|
+
wt as navBarWidthClosedAtom,
|
|
1709
|
+
vt as navBarWidthOpenAtom,
|
|
1707
1710
|
xe as titleTextAtom,
|
|
1708
|
-
|
|
1711
|
+
At as topBarHeightAtom,
|
|
1709
1712
|
Fn as topBarMiddleAtom,
|
|
1710
|
-
|
|
1713
|
+
mt as useAutocompleteOptions,
|
|
1711
1714
|
fn as useNavBar,
|
|
1712
1715
|
eo as useSaladBar,
|
|
1713
1716
|
Wo as withAtomProvider,
|