@australiangreens/ag-internal-components 0.0.81 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/SessionExpiryDialog/index.comp.test.d.ts +2 -0
- package/dist/components/SessionExpiryDialog/index.comp.test.d.ts.map +1 -0
- package/dist/components/SingleAutocomplete/index.d.ts +3 -2
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +252 -241
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/defaults.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/SessionExpiryDialog/index.unit.test.d.ts +0 -2
- package/dist/components/SessionExpiryDialog/index.unit.test.d.ts.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var Oe = (e, t) => {
|
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var Ee = (e, t, n) => (ue(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
-
var
|
|
23
|
+
var P = (e, t, n) => new Promise((i, r) => {
|
|
24
24
|
var a = (l) => {
|
|
25
25
|
try {
|
|
26
26
|
d(n.next(l));
|
|
@@ -36,11 +36,11 @@ var F = (e, t, n) => new Promise((i, r) => {
|
|
|
36
36
|
}, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, c);
|
|
37
37
|
d((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as p, Fragment as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as E, createContext as Xe, useCallback as ne, useContext as Qe, createElement as me, useEffect as oe, useRef as pe } from "react";
|
|
41
|
+
import { Typography as F, Button as ie, Paper as Ye, Box as $, Drawer as xe, Dialog as Ke, DialogTitle as Je, DialogContent as Ze, DialogActions as je, Autocomplete as ve, TextField as we, CircularProgress as Ae, Chip as Lt, Tooltip as _t, Stack as Mt, styled as be, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Rt, Collapse as Ht, Avatar as Be, Fade as Wt, Skeleton as Fe, Toolbar as zt, Divider as Pe, CssBaseline as Ut, Snackbar as Gt, Alert as Vt, LinearProgress as qt, FormHelperText as Xt } from "@mui/material";
|
|
42
42
|
import Qt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as W, createTheme as tt, alpha as he } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Yt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as K } from "souvlaki";
|
|
46
46
|
import nt from "@mui/material/List";
|
|
@@ -51,13 +51,13 @@ import { useQuery as tn, QueryClient as nn, QueryClientProvider as on } from "@t
|
|
|
51
51
|
import { useAuth0 as rt } from "@auth0/auth0-react";
|
|
52
52
|
import { Buffer as rn } from "buffer";
|
|
53
53
|
import an from "@mui/material/Skeleton";
|
|
54
|
-
import { atom as
|
|
54
|
+
import { atom as M, useSetAtom as at, useAtomValue as Ne, useAtom as V, getDefaultStore as sn, Provider as st } from "jotai";
|
|
55
55
|
import { useHydrateAtoms as lt } from "jotai/utils";
|
|
56
56
|
function Do({ text: e }) {
|
|
57
|
-
const [t, n] =
|
|
58
|
-
return /* @__PURE__ */ p(
|
|
59
|
-
/* @__PURE__ */ o(
|
|
60
|
-
/* @__PURE__ */ o(
|
|
57
|
+
const [t, n] = E(0);
|
|
58
|
+
return /* @__PURE__ */ p(_, { children: [
|
|
59
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
60
|
+
/* @__PURE__ */ o(F, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
61
61
|
/* @__PURE__ */ o(
|
|
62
62
|
ie,
|
|
63
63
|
{
|
|
@@ -85,7 +85,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
85
85
|
userInfoHolder: `${U}-userInfoHolder`,
|
|
86
86
|
settings: `${U}-settings`,
|
|
87
87
|
pieChartIcon: `${U}-pieChartIcon`
|
|
88
|
-
}, ln =
|
|
88
|
+
}, ln = W($, {
|
|
89
89
|
name: "NavBar"
|
|
90
90
|
})(({ theme: e }) => ({
|
|
91
91
|
[`&.${q.root}`]: {
|
|
@@ -118,7 +118,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
|
|
|
118
118
|
width: ct
|
|
119
119
|
}, ut()), dn = () => s({
|
|
120
120
|
width: dt
|
|
121
|
-
}, ut()), un =
|
|
121
|
+
}, ut()), un = W(xe, {
|
|
122
122
|
shouldForwardProp: (e) => e !== "open"
|
|
123
123
|
})(({ theme: e, open: t }) => s(s({
|
|
124
124
|
width: t ? ct : dt,
|
|
@@ -139,7 +139,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
139
139
|
overrideActions: t = hn,
|
|
140
140
|
children: n
|
|
141
141
|
}) => {
|
|
142
|
-
const [{ open: i }, r] =
|
|
142
|
+
const [{ open: i }, r] = E({ open: !0 }), a = ne((l) => {
|
|
143
143
|
r({ open: l });
|
|
144
144
|
}, []), c = ne(() => {
|
|
145
145
|
r((l) => S(s({}, l), { open: !l.open }));
|
|
@@ -158,7 +158,7 @@ const pt = Xe(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
|
-
), Le = 7, $o =
|
|
161
|
+
), Le = 7, $o = W(nt)(({ theme: e }) => ({
|
|
162
162
|
backgroundColor: "black",
|
|
163
163
|
color: "white",
|
|
164
164
|
"& .MuiListItem-root": {
|
|
@@ -196,7 +196,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
|
|
|
196
196
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
197
197
|
// },
|
|
198
198
|
}
|
|
199
|
-
})), _e = 7, Io =
|
|
199
|
+
})), _e = 7, Io = W(nt)(({ theme: e }) => ({
|
|
200
200
|
backgroundColor: "#e8e8e8",
|
|
201
201
|
color: "inherit",
|
|
202
202
|
"& .MuiListItem-root": {
|
|
@@ -267,13 +267,13 @@ const ht = ({
|
|
|
267
267
|
disableCloseOnBackdropOrEscape: u = !1
|
|
268
268
|
}) => {
|
|
269
269
|
var w, g;
|
|
270
|
-
const [
|
|
270
|
+
const [m, x] = E(!1);
|
|
271
271
|
return /* @__PURE__ */ p(
|
|
272
272
|
Ke,
|
|
273
273
|
{
|
|
274
274
|
open: e,
|
|
275
|
-
onClose: (
|
|
276
|
-
u && (
|
|
275
|
+
onClose: (k, b) => P(void 0, null, function* () {
|
|
276
|
+
u && (b === "backdropClick" || b === "escapeKeyDown") || m || (a != null && a.onClick ? yield a.onClick() : c());
|
|
277
277
|
}),
|
|
278
278
|
fullWidth: !0,
|
|
279
279
|
maxWidth: i != null ? i : "xs",
|
|
@@ -288,7 +288,7 @@ const ht = ({
|
|
|
288
288
|
{
|
|
289
289
|
onClick: (w = a == null ? void 0 : a.onClick) != null ? w : c,
|
|
290
290
|
"data-testid": a == null ? void 0 : a.testId,
|
|
291
|
-
disabled: (a == null ? void 0 : a.disabled) ||
|
|
291
|
+
disabled: (a == null ? void 0 : a.disabled) || m,
|
|
292
292
|
color: a == null ? void 0 : a.buttonColor,
|
|
293
293
|
children: (g = a == null ? void 0 : a.text) != null ? g : "Cancel"
|
|
294
294
|
}
|
|
@@ -296,12 +296,12 @@ const ht = ({
|
|
|
296
296
|
r && /* @__PURE__ */ o(
|
|
297
297
|
ie,
|
|
298
298
|
{
|
|
299
|
-
onClick: () =>
|
|
300
|
-
var
|
|
301
|
-
|
|
299
|
+
onClick: () => P(void 0, null, function* () {
|
|
300
|
+
var k;
|
|
301
|
+
x(!0), yield (k = r.onClick) == null ? void 0 : k.call(r), x(!1);
|
|
302
302
|
}),
|
|
303
303
|
"data-testid": r.testId,
|
|
304
|
-
disabled: r.disabled ||
|
|
304
|
+
disabled: r.disabled || m,
|
|
305
305
|
color: r == null ? void 0 : r.buttonColor,
|
|
306
306
|
children: r.text
|
|
307
307
|
}
|
|
@@ -323,7 +323,7 @@ const ht = ({
|
|
|
323
323
|
queryKey: ["autocomplete", i, r]
|
|
324
324
|
});
|
|
325
325
|
function Oo({
|
|
326
|
-
lookup: e = () =>
|
|
326
|
+
lookup: e = () => P(this, null, function* () {
|
|
327
327
|
}),
|
|
328
328
|
enableHighlighting: t = !0,
|
|
329
329
|
onChange: n,
|
|
@@ -334,44 +334,44 @@ function Oo({
|
|
|
334
334
|
sx: d,
|
|
335
335
|
textFieldColor: l,
|
|
336
336
|
textFieldVariant: u = "filled",
|
|
337
|
-
loadingText:
|
|
338
|
-
noOptionsText:
|
|
337
|
+
loadingText: m = "Loading...",
|
|
338
|
+
noOptionsText: x = "No options",
|
|
339
339
|
popupIcon: w = /* @__PURE__ */ o(Jt, {}),
|
|
340
340
|
error: g = !1,
|
|
341
|
-
helperText:
|
|
342
|
-
preLoadedOptions:
|
|
343
|
-
disablePortal:
|
|
341
|
+
helperText: k = "",
|
|
342
|
+
preLoadedOptions: b = void 0,
|
|
343
|
+
disablePortal: I = !1
|
|
344
344
|
}) {
|
|
345
|
-
const [
|
|
346
|
-
const
|
|
347
|
-
n(
|
|
348
|
-
}, { data:
|
|
349
|
-
inputValue:
|
|
345
|
+
const [D, A] = E(""), y = (h, f) => {
|
|
346
|
+
const B = a.filter((L) => L.id !== f);
|
|
347
|
+
n(B, "delete", h);
|
|
348
|
+
}, { data: N, isLoading: R } = gt({
|
|
349
|
+
inputValue: D,
|
|
350
350
|
label: r,
|
|
351
351
|
lookup: e,
|
|
352
352
|
minLength: i,
|
|
353
|
-
preLoadedOptions:
|
|
354
|
-
}),
|
|
353
|
+
preLoadedOptions: b
|
|
354
|
+
}), T = D.length >= i;
|
|
355
355
|
return /* @__PURE__ */ p("div", { "data-testid": c, children: [
|
|
356
356
|
/* @__PURE__ */ o(
|
|
357
357
|
ve,
|
|
358
358
|
{
|
|
359
359
|
sx: d,
|
|
360
360
|
"data-testid": c ? `${c}:Autocomplete` : void 0,
|
|
361
|
-
disablePortal:
|
|
361
|
+
disablePortal: I,
|
|
362
362
|
multiple: !0,
|
|
363
363
|
getOptionLabel: (h) => typeof h == "string" ? h : h.label,
|
|
364
|
-
loading:
|
|
365
|
-
options: [...a, ...
|
|
364
|
+
loading: T ? R : !1,
|
|
365
|
+
options: [...a, ...N != null ? N : []],
|
|
366
366
|
filterSelectedOptions: !0,
|
|
367
367
|
includeInputInList: !0,
|
|
368
368
|
value: a,
|
|
369
|
-
onChange: (h,
|
|
370
|
-
n(
|
|
369
|
+
onChange: (h, f, B) => {
|
|
370
|
+
n(f, B, h);
|
|
371
371
|
},
|
|
372
|
-
onInputChange: (h,
|
|
373
|
-
noOptionsText:
|
|
374
|
-
loadingText:
|
|
372
|
+
onInputChange: (h, f) => A(f),
|
|
373
|
+
noOptionsText: T ? x : "Start typing to search",
|
|
374
|
+
loadingText: m,
|
|
375
375
|
popupIcon: w,
|
|
376
376
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
377
377
|
we,
|
|
@@ -380,58 +380,58 @@ function Oo({
|
|
|
380
380
|
fullWidth: !0,
|
|
381
381
|
variant: u,
|
|
382
382
|
error: g,
|
|
383
|
-
helperText:
|
|
383
|
+
helperText: k,
|
|
384
384
|
InputProps: S(s({}, h.InputProps), {
|
|
385
|
-
endAdornment: /* @__PURE__ */ p(
|
|
386
|
-
|
|
385
|
+
endAdornment: /* @__PURE__ */ p(_, { children: [
|
|
386
|
+
R ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20 }) : null,
|
|
387
387
|
h.InputProps.endAdornment
|
|
388
388
|
] })
|
|
389
389
|
}),
|
|
390
390
|
"data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
|
|
391
|
-
onKeyDown: (
|
|
392
|
-
(
|
|
391
|
+
onKeyDown: (f) => {
|
|
392
|
+
(f.key === "Backspace" || f.key === "Delete") && f.stopPropagation();
|
|
393
393
|
},
|
|
394
394
|
color: l
|
|
395
395
|
})
|
|
396
396
|
),
|
|
397
397
|
renderTags: () => null,
|
|
398
|
-
isOptionEqualToValue: (h,
|
|
399
|
-
renderOption: (h,
|
|
398
|
+
isOptionEqualToValue: (h, f) => h.id === f.id,
|
|
399
|
+
renderOption: (h, f, B) => {
|
|
400
400
|
if (t) {
|
|
401
|
-
const
|
|
401
|
+
const L = jt(f.label, B.inputValue, {
|
|
402
402
|
insideWords: !0,
|
|
403
403
|
findAllOccurrences: !0
|
|
404
|
-
}),
|
|
404
|
+
}), v = en(f.label, L);
|
|
405
405
|
return /* @__PURE__ */ me(
|
|
406
406
|
"li",
|
|
407
407
|
S(s({}, h), {
|
|
408
|
-
key:
|
|
409
|
-
"data-testid": c ? `${c}:Autocomplete:option(${
|
|
408
|
+
key: f.id,
|
|
409
|
+
"data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
|
|
410
410
|
}),
|
|
411
|
-
/* @__PURE__ */ o("div", { children:
|
|
411
|
+
/* @__PURE__ */ o("div", { children: v.map((C, H) => /* @__PURE__ */ o(
|
|
412
412
|
"span",
|
|
413
413
|
{
|
|
414
414
|
style: {
|
|
415
|
-
fontWeight:
|
|
415
|
+
fontWeight: C.highlight ? 700 : 400
|
|
416
416
|
},
|
|
417
|
-
children:
|
|
417
|
+
children: C.text
|
|
418
418
|
},
|
|
419
|
-
|
|
419
|
+
H
|
|
420
420
|
)) })
|
|
421
421
|
);
|
|
422
422
|
} else
|
|
423
423
|
return /* @__PURE__ */ me(
|
|
424
424
|
"li",
|
|
425
425
|
S(s({}, h), {
|
|
426
|
-
key:
|
|
427
|
-
"data-testid": c ? `${c}:option(${
|
|
426
|
+
key: f.id,
|
|
427
|
+
"data-testid": c ? `${c}:option(${f.id.toString()})` : void 0
|
|
428
428
|
}),
|
|
429
|
-
|
|
429
|
+
f.label
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
|
-
a.length > 0 && /* @__PURE__ */ o(
|
|
434
|
+
a.length > 0 && /* @__PURE__ */ o($, { children: a.map((h) => /* @__PURE__ */ o(
|
|
435
435
|
Lt,
|
|
436
436
|
{
|
|
437
437
|
sx: {
|
|
@@ -454,11 +454,11 @@ function Oo({
|
|
|
454
454
|
}
|
|
455
455
|
]
|
|
456
456
|
},
|
|
457
|
-
children: /* @__PURE__ */ o(
|
|
457
|
+
children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
460
|
"data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
|
|
461
|
-
onDelete: (
|
|
461
|
+
onDelete: (f) => y(f, h.id),
|
|
462
462
|
deleteIcon: /* @__PURE__ */ o(
|
|
463
463
|
Kt,
|
|
464
464
|
{
|
|
@@ -471,7 +471,7 @@ function Oo({
|
|
|
471
471
|
] });
|
|
472
472
|
}
|
|
473
473
|
const Eo = ({
|
|
474
|
-
lookup: e = () =>
|
|
474
|
+
lookup: e = () => P(void 0, null, function* () {
|
|
475
475
|
}),
|
|
476
476
|
onChange: t,
|
|
477
477
|
label: n,
|
|
@@ -482,52 +482,54 @@ const Eo = ({
|
|
|
482
482
|
"data-testid": d,
|
|
483
483
|
noOptionsText: l = "No options",
|
|
484
484
|
minLength: u = 3,
|
|
485
|
-
disablePortal:
|
|
486
|
-
preLoadedOptions:
|
|
485
|
+
disablePortal: m = !1,
|
|
486
|
+
preLoadedOptions: x,
|
|
487
|
+
helperText: w = ""
|
|
487
488
|
}) => {
|
|
488
|
-
const [
|
|
489
|
-
inputValue:
|
|
489
|
+
const [g, k] = E(""), { data: b, isLoading: I } = gt({
|
|
490
|
+
inputValue: g,
|
|
490
491
|
label: n,
|
|
491
492
|
lookup: e,
|
|
492
493
|
minLength: u != null ? u : 0,
|
|
493
|
-
preLoadedOptions:
|
|
494
|
-
}),
|
|
494
|
+
preLoadedOptions: x
|
|
495
|
+
}), D = g.length >= u;
|
|
495
496
|
return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Mt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
496
497
|
ve,
|
|
497
498
|
{
|
|
498
499
|
sx: r,
|
|
499
500
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
500
|
-
loading:
|
|
501
|
+
loading: D ? I : !1,
|
|
501
502
|
options: b != null ? b : [],
|
|
502
|
-
onChange: (
|
|
503
|
-
t(
|
|
503
|
+
onChange: (A, y) => {
|
|
504
|
+
t(A, y);
|
|
504
505
|
},
|
|
505
|
-
disablePortal:
|
|
506
|
-
filterOptions: (
|
|
506
|
+
disablePortal: m,
|
|
507
|
+
filterOptions: (A) => A,
|
|
507
508
|
value: i,
|
|
508
|
-
noOptionsText:
|
|
509
|
-
getOptionLabel: (
|
|
510
|
-
renderInput: (
|
|
509
|
+
noOptionsText: D ? l : "Start typing to search",
|
|
510
|
+
getOptionLabel: (A) => A.label,
|
|
511
|
+
renderInput: (A) => /* @__PURE__ */ o(
|
|
511
512
|
we,
|
|
512
513
|
S(s({
|
|
513
514
|
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0
|
|
514
|
-
},
|
|
515
|
+
}, A), {
|
|
515
516
|
variant: c,
|
|
516
517
|
label: n,
|
|
517
|
-
color: a
|
|
518
|
+
color: a,
|
|
519
|
+
helperText: w
|
|
518
520
|
})
|
|
519
521
|
),
|
|
520
|
-
isOptionEqualToValue: (
|
|
521
|
-
onInputChange: (
|
|
522
|
-
|
|
522
|
+
isOptionEqualToValue: (A, y) => A.id === y.id,
|
|
523
|
+
onInputChange: (A, y) => {
|
|
524
|
+
k(y);
|
|
523
525
|
},
|
|
524
|
-
renderOption: (
|
|
526
|
+
renderOption: (A, y) => /* @__PURE__ */ me(
|
|
525
527
|
"li",
|
|
526
|
-
S(s({},
|
|
527
|
-
key:
|
|
528
|
-
"data-testid": d ? `${d}:Autocomplete:option(${
|
|
528
|
+
S(s({}, A), {
|
|
529
|
+
key: y.id,
|
|
530
|
+
"data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
|
|
529
531
|
}),
|
|
530
|
-
|
|
532
|
+
y.label
|
|
531
533
|
)
|
|
532
534
|
}
|
|
533
535
|
) }) });
|
|
@@ -549,13 +551,13 @@ const Eo = ({
|
|
|
549
551
|
closeHandler: t,
|
|
550
552
|
setAuth0ExpiryTime: n
|
|
551
553
|
}) => {
|
|
552
|
-
const { logout: i, getAccessTokenSilently: r } = rt(), [a, c] =
|
|
554
|
+
const { logout: i, getAccessTokenSilently: r } = rt(), [a, c] = E(0), d = () => P(void 0, null, function* () {
|
|
553
555
|
i({ logoutParams: { returnTo: `${window.location.origin}` } });
|
|
554
|
-
}), l = () =>
|
|
556
|
+
}), l = () => P(void 0, null, function* () {
|
|
555
557
|
c(a + 1), t();
|
|
556
558
|
});
|
|
557
559
|
return oe(() => {
|
|
558
|
-
(() =>
|
|
560
|
+
(() => P(void 0, null, function* () {
|
|
559
561
|
if (a > 0) {
|
|
560
562
|
const w = yield r({ cacheMode: "off" }), g = Cn(w) * 1e3;
|
|
561
563
|
n(g);
|
|
@@ -620,13 +622,13 @@ function Fo({
|
|
|
620
622
|
let d = "Auth error", l = "An unknown Auth0 error occurred.";
|
|
621
623
|
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(Ke, { open: !0, children: [
|
|
622
624
|
/* @__PURE__ */ o(Je, { children: d }),
|
|
623
|
-
/* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(
|
|
625
|
+
/* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(F, { children: l }) }),
|
|
624
626
|
/* @__PURE__ */ o(je, { children: /* @__PURE__ */ o(ie, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
|
|
625
627
|
] });
|
|
626
628
|
}
|
|
627
|
-
return n ? /* @__PURE__ */ o(
|
|
629
|
+
return n ? /* @__PURE__ */ o(_, { children: e }) : /* @__PURE__ */ o(an, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
|
|
628
630
|
}
|
|
629
|
-
const bn = 24, Sn = 64, G = "TopBar",
|
|
631
|
+
const bn = 24, Sn = 64, G = "TopBar", O = {
|
|
630
632
|
topStripe: `${G}-topStripe`,
|
|
631
633
|
titleBar: `${G}-titleBar`,
|
|
632
634
|
titleSlider: `${G}-titleSlider`,
|
|
@@ -640,18 +642,18 @@ const bn = 24, Sn = 64, G = "TopBar", T = {
|
|
|
640
642
|
var i, r;
|
|
641
643
|
return {
|
|
642
644
|
width: "100%",
|
|
643
|
-
[`& .${
|
|
645
|
+
[`& .${O.topStripe}`]: {
|
|
644
646
|
width: "100%",
|
|
645
647
|
height: `${bn}px`,
|
|
646
648
|
backgroundColor: e.palette.primary.main
|
|
647
649
|
},
|
|
648
|
-
[`& .${
|
|
650
|
+
[`& .${O.titleBar}`]: {
|
|
649
651
|
backgroundColor: e.palette.primary.light,
|
|
650
652
|
height: `${Sn}px`,
|
|
651
653
|
padding: e.spacing(0, 3),
|
|
652
654
|
width: "100%"
|
|
653
655
|
},
|
|
654
|
-
[`& .${
|
|
656
|
+
[`& .${O.titleSlider}`]: s(s({
|
|
655
657
|
height: "100%",
|
|
656
658
|
display: "flex",
|
|
657
659
|
alignItems: "center",
|
|
@@ -660,14 +662,14 @@ const bn = 24, Sn = 64, G = "TopBar", T = {
|
|
|
660
662
|
easing: e.transitions.easing.sharp,
|
|
661
663
|
duration: e.transitions.duration.leavingScreen
|
|
662
664
|
}),
|
|
663
|
-
[`& .${
|
|
665
|
+
[`& .${O.leftPanelButton}`]: {
|
|
664
666
|
marginRight: e.spacing(2),
|
|
665
667
|
flexGrow: 0
|
|
666
668
|
},
|
|
667
|
-
[`& .${
|
|
669
|
+
[`& .${O.titleText}`]: {
|
|
668
670
|
flexGrow: 1
|
|
669
671
|
},
|
|
670
|
-
[`& .${
|
|
672
|
+
[`& .${O.rightPanelButton}`]: {
|
|
671
673
|
flexGrow: 0
|
|
672
674
|
}
|
|
673
675
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -692,12 +694,12 @@ function Dn({
|
|
|
692
694
|
"data-testid": i
|
|
693
695
|
}) {
|
|
694
696
|
return /* @__PURE__ */ p(kn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
695
|
-
/* @__PURE__ */ o("div", { className:
|
|
696
|
-
/* @__PURE__ */ o("div", { className:
|
|
697
|
+
/* @__PURE__ */ o("div", { className: O.topStripe }),
|
|
698
|
+
/* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ p($, { className: O.titleSlider, children: [
|
|
697
699
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
|
|
698
700
|
Q,
|
|
699
701
|
{
|
|
700
|
-
className:
|
|
702
|
+
className: O.leftPanelButton,
|
|
701
703
|
color: "inherit",
|
|
702
704
|
"aria-label": "Open left side panel",
|
|
703
705
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -709,11 +711,11 @@ function Dn({
|
|
|
709
711
|
]
|
|
710
712
|
}
|
|
711
713
|
),
|
|
712
|
-
/* @__PURE__ */ o(
|
|
714
|
+
/* @__PURE__ */ o(F, { className: O.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
713
715
|
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
|
|
714
716
|
Q,
|
|
715
717
|
{
|
|
716
|
-
className:
|
|
718
|
+
className: O.rightPanelButton,
|
|
717
719
|
color: "inherit",
|
|
718
720
|
"aria-label": "Open right side panel",
|
|
719
721
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -758,7 +760,7 @@ const ft = 400, yn = be(xe, {
|
|
|
758
760
|
marginLeft: `${r}px`
|
|
759
761
|
}))
|
|
760
762
|
})
|
|
761
|
-
), $n = be(
|
|
763
|
+
), $n = be($, {
|
|
762
764
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
763
765
|
})(({ theme: e, anchor: t }) => S(s({
|
|
764
766
|
display: "flex",
|
|
@@ -790,48 +792,48 @@ function Me({
|
|
|
790
792
|
debugOpacity: d = !1,
|
|
791
793
|
headerBoxProps: l = {},
|
|
792
794
|
onOpened: u,
|
|
793
|
-
onClosed:
|
|
794
|
-
"data-testid":
|
|
795
|
+
onClosed: m,
|
|
796
|
+
"data-testid": x,
|
|
795
797
|
navBarOpen: w = !1,
|
|
796
798
|
navBarWidthOpen: g = 0,
|
|
797
|
-
navBarWidthClosed:
|
|
799
|
+
navBarWidthClosed: k = 0
|
|
798
800
|
}) {
|
|
799
801
|
return /* @__PURE__ */ p(
|
|
800
802
|
yn,
|
|
801
803
|
{
|
|
802
804
|
SlideProps: {
|
|
803
805
|
onEntered: () => u == null ? void 0 : u(),
|
|
804
|
-
onExited: () =>
|
|
806
|
+
onExited: () => m == null ? void 0 : m()
|
|
805
807
|
},
|
|
806
808
|
variant: "persistent",
|
|
807
809
|
anchor: t,
|
|
808
810
|
open: n,
|
|
809
811
|
width: a,
|
|
810
812
|
debugOpacity: d,
|
|
811
|
-
"data-testid":
|
|
813
|
+
"data-testid": x,
|
|
812
814
|
navBarOpen: w,
|
|
813
815
|
navBarWidthOpen: g,
|
|
814
|
-
navBarWidthClosed:
|
|
816
|
+
navBarWidthClosed: k,
|
|
815
817
|
children: [
|
|
816
|
-
/* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(
|
|
817
|
-
/* @__PURE__ */ o(
|
|
818
|
+
/* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
|
|
819
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
|
|
818
820
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
819
821
|
/* @__PURE__ */ o(it, { "data-testid": "arrowbackicon" }),
|
|
820
822
|
" "
|
|
821
823
|
] })
|
|
822
|
-
] }) : /* @__PURE__ */ p(
|
|
824
|
+
] }) : /* @__PURE__ */ p(_, { children: [
|
|
823
825
|
c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
|
|
824
826
|
/* @__PURE__ */ o(ot, {}),
|
|
825
827
|
" "
|
|
826
828
|
] }),
|
|
827
|
-
/* @__PURE__ */ o(
|
|
829
|
+
/* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
|
|
828
830
|
] }) })),
|
|
829
831
|
e
|
|
830
832
|
]
|
|
831
833
|
}
|
|
832
834
|
);
|
|
833
835
|
}
|
|
834
|
-
const In =
|
|
836
|
+
const In = W($, {
|
|
835
837
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
836
838
|
name: "PanelAwareMargins"
|
|
837
839
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -854,7 +856,7 @@ const In = H(y, {
|
|
|
854
856
|
}),
|
|
855
857
|
marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
|
|
856
858
|
});
|
|
857
|
-
}), Tn =
|
|
859
|
+
}), Tn = W(et, {
|
|
858
860
|
name: "PageContainer"
|
|
859
861
|
})(({ theme: e }) => ({
|
|
860
862
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -869,7 +871,7 @@ const In = H(y, {
|
|
|
869
871
|
startOpen: !1,
|
|
870
872
|
open: void 0,
|
|
871
873
|
onChangeOpen: void 0,
|
|
872
|
-
content: /* @__PURE__ */ o(
|
|
874
|
+
content: /* @__PURE__ */ o(_, {}),
|
|
873
875
|
onOpened: void 0,
|
|
874
876
|
onClosed: void 0,
|
|
875
877
|
dataTestId: void 0
|
|
@@ -885,18 +887,18 @@ function Po({
|
|
|
885
887
|
pageContentDataTestId: d,
|
|
886
888
|
topBarDataTestId: l,
|
|
887
889
|
navBarOpen: u,
|
|
888
|
-
navBarWidthOpen:
|
|
889
|
-
navBarWidthClosed:
|
|
890
|
+
navBarWidthOpen: m,
|
|
891
|
+
navBarWidthClosed: x
|
|
890
892
|
}) {
|
|
891
|
-
const [w, g] =
|
|
892
|
-
titleText:
|
|
893
|
+
const [w, g] = E(ge), [k, b] = E(fe), [I, D] = E(ge), [A, y] = E(fe), N = n !== void 0, R = i !== void 0, {
|
|
894
|
+
titleText: T,
|
|
893
895
|
content: h,
|
|
894
|
-
flavour:
|
|
895
|
-
open:
|
|
896
|
-
onChangeOpen:
|
|
897
|
-
width:
|
|
898
|
-
arrowButtons:
|
|
899
|
-
startOpen:
|
|
896
|
+
flavour: f,
|
|
897
|
+
open: B,
|
|
898
|
+
onChangeOpen: L,
|
|
899
|
+
width: v,
|
|
900
|
+
arrowButtons: C,
|
|
901
|
+
startOpen: H,
|
|
900
902
|
onOpened: Dt,
|
|
901
903
|
onClosed: yt,
|
|
902
904
|
dataTestId: $t
|
|
@@ -914,36 +916,36 @@ function Po({
|
|
|
914
916
|
dataTestId: Bt
|
|
915
917
|
} = i ? s(s({}, ee), i) : s({}, ee);
|
|
916
918
|
oe(() => {
|
|
917
|
-
|
|
918
|
-
}, [
|
|
919
|
-
Z !== fe && (
|
|
919
|
+
H !== ge && (g(H), D(H));
|
|
920
|
+
}, [H]), oe(() => {
|
|
921
|
+
Z !== fe && (b(Z), y(Z));
|
|
920
922
|
}, [Z]);
|
|
921
|
-
const ce =
|
|
922
|
-
|
|
923
|
+
const ce = B === void 0 ? w : B, de = se === void 0 ? k : se, ye = (z) => {
|
|
924
|
+
B === void 0 && (g(z), r && R && (z ? (b(!1), y(k)) : b(A))), L && L(z);
|
|
923
925
|
}, $e = (z) => {
|
|
924
|
-
se === void 0 && (
|
|
926
|
+
se === void 0 && (b(z), r && N && (z ? (g(!1), D(w)) : g(I))), De && De(z);
|
|
925
927
|
};
|
|
926
|
-
return /* @__PURE__ */ p(
|
|
927
|
-
|
|
928
|
+
return /* @__PURE__ */ p($, { children: [
|
|
929
|
+
N && /* @__PURE__ */ o(
|
|
928
930
|
Me,
|
|
929
931
|
{
|
|
930
932
|
"data-testid": $t,
|
|
931
933
|
anchor: "left",
|
|
932
934
|
open: ce,
|
|
933
935
|
onClose: () => ye(!1),
|
|
934
|
-
width:
|
|
935
|
-
titleText:
|
|
936
|
+
width: v,
|
|
937
|
+
titleText: T,
|
|
936
938
|
debugOpacity: a,
|
|
937
|
-
showCloseArrow:
|
|
939
|
+
showCloseArrow: C === "both" || C === "close",
|
|
938
940
|
onOpened: Dt,
|
|
939
941
|
onClosed: yt,
|
|
940
942
|
navBarOpen: u,
|
|
941
|
-
navBarWidthOpen:
|
|
942
|
-
navBarWidthClosed:
|
|
943
|
+
navBarWidthOpen: m,
|
|
944
|
+
navBarWidthClosed: x,
|
|
943
945
|
children: h
|
|
944
946
|
}
|
|
945
947
|
),
|
|
946
|
-
|
|
948
|
+
R && /* @__PURE__ */ o(
|
|
947
949
|
Me,
|
|
948
950
|
{
|
|
949
951
|
"data-testid": Bt,
|
|
@@ -957,8 +959,8 @@ function Po({
|
|
|
957
959
|
onOpened: Ot,
|
|
958
960
|
onClosed: Et,
|
|
959
961
|
navBarOpen: u,
|
|
960
|
-
navBarWidthOpen:
|
|
961
|
-
navBarWidthClosed:
|
|
962
|
+
navBarWidthOpen: m,
|
|
963
|
+
navBarWidthClosed: x,
|
|
962
964
|
children: Tt
|
|
963
965
|
}
|
|
964
966
|
),
|
|
@@ -967,14 +969,14 @@ function Po({
|
|
|
967
969
|
s(s({
|
|
968
970
|
titleText: t,
|
|
969
971
|
"data-testid": l
|
|
970
|
-
},
|
|
972
|
+
}, N && f === "push" ? {
|
|
971
973
|
leftPanel: {
|
|
972
974
|
open: ce,
|
|
973
|
-
width:
|
|
975
|
+
width: v,
|
|
974
976
|
onOpen: () => ye(!0),
|
|
975
|
-
showOpenArrow:
|
|
977
|
+
showOpenArrow: C === "both" || C === "open"
|
|
976
978
|
}
|
|
977
|
-
} : {}),
|
|
979
|
+
} : {}), R && ke === "push" ? {
|
|
978
980
|
rightPanel: {
|
|
979
981
|
open: de,
|
|
980
982
|
width: le,
|
|
@@ -985,10 +987,10 @@ function Po({
|
|
|
985
987
|
),
|
|
986
988
|
/* @__PURE__ */ o(
|
|
987
989
|
In,
|
|
988
|
-
S(s(s({},
|
|
990
|
+
S(s(s({}, f === "push" ? {
|
|
989
991
|
leftPanel: {
|
|
990
992
|
open: ce,
|
|
991
|
-
width:
|
|
993
|
+
width: v
|
|
992
994
|
}
|
|
993
995
|
} : {}), ke === "push" ? {
|
|
994
996
|
rightPanel: {
|
|
@@ -1004,7 +1006,7 @@ function Po({
|
|
|
1004
1006
|
const mt = () => {
|
|
1005
1007
|
const e = ae();
|
|
1006
1008
|
return Rt(e.breakpoints.down("sm"));
|
|
1007
|
-
}, On = 64, En =
|
|
1009
|
+
}, On = 64, En = 72, Bn = 256, Y = M(!0), Ct = M(Bn), xt = M(En), Ce = M(""), Fn = M(void 0), vt = M(On), wt = M(void 0);
|
|
1008
1010
|
function Pn({ links: e }) {
|
|
1009
1011
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
1010
1012
|
}
|
|
@@ -1016,7 +1018,7 @@ const te = "Navbar", X = {
|
|
|
1016
1018
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
1017
1019
|
// settings: `${PREFIX}-settings`,
|
|
1018
1020
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
1019
|
-
}, Nn =
|
|
1021
|
+
}, Nn = W($, { name: "NavBar" })(({ theme: e }) => ({
|
|
1020
1022
|
[`&.${X.root}`]: {
|
|
1021
1023
|
display: "flex"
|
|
1022
1024
|
},
|
|
@@ -1064,7 +1066,7 @@ const te = "Navbar", X = {
|
|
|
1064
1066
|
}, At(e)), He = (e, t) => s({
|
|
1065
1067
|
width: t,
|
|
1066
1068
|
transition: re(e, "width", "leaving")
|
|
1067
|
-
}, At(e)), _n =
|
|
1069
|
+
}, At(e)), _n = W(xe, {
|
|
1068
1070
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
1069
1071
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => s(s({
|
|
1070
1072
|
flexShrink: 0,
|
|
@@ -1091,7 +1093,7 @@ const We = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], R
|
|
|
1091
1093
|
function Hn({ user: e, domainCode: t, open: n }) {
|
|
1092
1094
|
const i = ae();
|
|
1093
1095
|
return /* @__PURE__ */ p(
|
|
1094
|
-
|
|
1096
|
+
$,
|
|
1095
1097
|
{
|
|
1096
1098
|
sx: {
|
|
1097
1099
|
paddingTop: 3,
|
|
@@ -1102,7 +1104,7 @@ function Hn({ user: e, domainCode: t, open: n }) {
|
|
|
1102
1104
|
},
|
|
1103
1105
|
children: [
|
|
1104
1106
|
/* @__PURE__ */ o(
|
|
1105
|
-
|
|
1107
|
+
$,
|
|
1106
1108
|
{
|
|
1107
1109
|
sx: {
|
|
1108
1110
|
width: n ? "5rem" : "2rem",
|
|
@@ -1123,9 +1125,9 @@ function Hn({ user: e, domainCode: t, open: n }) {
|
|
|
1123
1125
|
) : /* @__PURE__ */ o(Be, { sx: { width: "100%", height: "100%" } })
|
|
1124
1126
|
}
|
|
1125
1127
|
),
|
|
1126
|
-
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ p(
|
|
1127
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
1128
|
-
t ? /* @__PURE__ */ o(
|
|
1128
|
+
/* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ p($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1129
|
+
e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "50%" }),
|
|
1130
|
+
t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "25%" })
|
|
1129
1131
|
] }) }) })
|
|
1130
1132
|
]
|
|
1131
1133
|
}
|
|
@@ -1142,7 +1144,7 @@ function Wn({
|
|
|
1142
1144
|
user: d,
|
|
1143
1145
|
domainCode: l
|
|
1144
1146
|
}) {
|
|
1145
|
-
const u = mt(),
|
|
1147
|
+
const u = mt(), m = at(Y);
|
|
1146
1148
|
return /* @__PURE__ */ o(Nn, { className: X.root, "data-testid": i, children: /* @__PURE__ */ p(
|
|
1147
1149
|
_n,
|
|
1148
1150
|
{
|
|
@@ -1155,20 +1157,20 @@ function Wn({
|
|
|
1155
1157
|
component: "nav"
|
|
1156
1158
|
},
|
|
1157
1159
|
onClose: () => {
|
|
1158
|
-
|
|
1160
|
+
m(!1);
|
|
1159
1161
|
},
|
|
1160
1162
|
isSmallScreen: u,
|
|
1161
1163
|
children: [
|
|
1162
1164
|
!u && /* @__PURE__ */ o(zt, {}),
|
|
1163
|
-
r && /* @__PURE__ */ p(
|
|
1165
|
+
r && /* @__PURE__ */ p($, { flexGrow: "0", children: [
|
|
1164
1166
|
r,
|
|
1165
|
-
/* @__PURE__ */ o(Pe, { variant: "middle" })
|
|
1167
|
+
/* @__PURE__ */ o(Pe, { variant: "middle", sx: { marginY: "0.5rem" } })
|
|
1166
1168
|
] }),
|
|
1167
|
-
/* @__PURE__ */ o(
|
|
1168
|
-
/* @__PURE__ */ p(
|
|
1169
|
-
/* @__PURE__ */ o(Pe, { variant: "middle" }),
|
|
1169
|
+
/* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ o(Pn, { links: a }) : a }),
|
|
1170
|
+
/* @__PURE__ */ p($, { flexGrow: "0", children: [
|
|
1171
|
+
/* @__PURE__ */ o(Pe, { variant: "middle", sx: { marginY: "0.5rem" } }),
|
|
1170
1172
|
/* @__PURE__ */ o(Hn, { user: d, domainCode: l, open: e }),
|
|
1171
|
-
c && /* @__PURE__ */ o(
|
|
1173
|
+
c && /* @__PURE__ */ o(_, { children: c })
|
|
1172
1174
|
] })
|
|
1173
1175
|
]
|
|
1174
1176
|
}
|
|
@@ -1180,7 +1182,7 @@ function zn({
|
|
|
1180
1182
|
maxWidth: n = !1
|
|
1181
1183
|
}) {
|
|
1182
1184
|
return /* @__PURE__ */ o(
|
|
1183
|
-
|
|
1185
|
+
$,
|
|
1184
1186
|
{
|
|
1185
1187
|
sx: {
|
|
1186
1188
|
overflow: "auto",
|
|
@@ -1230,8 +1232,17 @@ function Vn({
|
|
|
1230
1232
|
zIndex: d ? 0 : c.zIndex.drawer + 1
|
|
1231
1233
|
},
|
|
1232
1234
|
children: [
|
|
1233
|
-
/* @__PURE__ */ o(
|
|
1234
|
-
|
|
1235
|
+
/* @__PURE__ */ o(
|
|
1236
|
+
Q,
|
|
1237
|
+
{
|
|
1238
|
+
size: "medium",
|
|
1239
|
+
color: "inherit",
|
|
1240
|
+
sx: { padding: 1.5, marginLeft: "12px" },
|
|
1241
|
+
onClick: a,
|
|
1242
|
+
children: /* @__PURE__ */ o(Zt, { fontSize: "medium" })
|
|
1243
|
+
}
|
|
1244
|
+
),
|
|
1245
|
+
/* @__PURE__ */ o(F, { className: Gn.titleText, variant: "h6", children: e }),
|
|
1235
1246
|
i
|
|
1236
1247
|
]
|
|
1237
1248
|
}
|
|
@@ -1248,37 +1259,37 @@ function No({
|
|
|
1248
1259
|
navBarMiddle: d,
|
|
1249
1260
|
navBarBottom: l,
|
|
1250
1261
|
user: u,
|
|
1251
|
-
domainCode:
|
|
1262
|
+
domainCode: m
|
|
1252
1263
|
}) {
|
|
1253
1264
|
lt([
|
|
1254
1265
|
[Y, n != null ? n : !0],
|
|
1255
1266
|
[Ce, t != null ? t : ""]
|
|
1256
1267
|
]);
|
|
1257
|
-
const
|
|
1258
|
-
return /* @__PURE__ */ p(
|
|
1268
|
+
const x = Ne(Y), [w] = V(Ct), [g] = V(xt), k = Ne(Ce), [b] = V(vt), [I] = V(Fn), [D] = V(wt);
|
|
1269
|
+
return /* @__PURE__ */ p($, { children: [
|
|
1259
1270
|
/* @__PURE__ */ o(Ut, {}),
|
|
1260
1271
|
/* @__PURE__ */ o(
|
|
1261
1272
|
Vn,
|
|
1262
1273
|
{
|
|
1263
|
-
titleText:
|
|
1274
|
+
titleText: k,
|
|
1264
1275
|
"data-testid": a,
|
|
1265
|
-
height:
|
|
1266
|
-
middle:
|
|
1276
|
+
height: b,
|
|
1277
|
+
middle: I
|
|
1267
1278
|
}
|
|
1268
1279
|
),
|
|
1269
|
-
/* @__PURE__ */ p(
|
|
1280
|
+
/* @__PURE__ */ p($, { sx: { display: "flex" }, children: [
|
|
1270
1281
|
/* @__PURE__ */ o(
|
|
1271
1282
|
Wn,
|
|
1272
1283
|
{
|
|
1273
|
-
open:
|
|
1274
|
-
top:
|
|
1284
|
+
open: x,
|
|
1285
|
+
top: D,
|
|
1275
1286
|
middle: d,
|
|
1276
1287
|
bottom: l,
|
|
1277
1288
|
user: u,
|
|
1278
|
-
domainCode:
|
|
1289
|
+
domainCode: m,
|
|
1279
1290
|
widthOpen: w,
|
|
1280
1291
|
widthClosed: g,
|
|
1281
|
-
offsetTop:
|
|
1292
|
+
offsetTop: b,
|
|
1282
1293
|
"data-testid": c
|
|
1283
1294
|
}
|
|
1284
1295
|
),
|
|
@@ -1286,7 +1297,7 @@ function No({
|
|
|
1286
1297
|
zn,
|
|
1287
1298
|
S(s({
|
|
1288
1299
|
"data-testid": r,
|
|
1289
|
-
topBarHeight:
|
|
1300
|
+
topBarHeight: b
|
|
1290
1301
|
}, i), {
|
|
1291
1302
|
children: e
|
|
1292
1303
|
})
|
|
@@ -1327,63 +1338,63 @@ function jn(a) {
|
|
|
1327
1338
|
"shouldClose",
|
|
1328
1339
|
"children"
|
|
1329
1340
|
]);
|
|
1330
|
-
var
|
|
1331
|
-
const [{ open: d }, l] =
|
|
1332
|
-
l({ open:
|
|
1333
|
-
}, []), g = ne((
|
|
1334
|
-
|
|
1335
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${
|
|
1336
|
-
),
|
|
1337
|
-
const
|
|
1341
|
+
var L;
|
|
1342
|
+
const [{ open: d }, l] = E({ open: !1 }), u = pe([]), m = pe(Date.now()), x = pe(0), w = ne((v) => {
|
|
1343
|
+
l({ open: v });
|
|
1344
|
+
}, []), g = ne((v = {}) => {
|
|
1345
|
+
x.current += 1, u.current.length >= Ue && Date.now() - m.current >= Ge && (m.current = Date.now(), console.error(
|
|
1346
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${x.current} times in last ${Ge}ms)`
|
|
1347
|
+
), x.current = 0);
|
|
1348
|
+
const C = s(S(s({}, ze), {
|
|
1338
1349
|
key: Yn()
|
|
1339
|
-
}),
|
|
1340
|
-
return u.current.push(
|
|
1341
|
-
}, []),
|
|
1342
|
-
const
|
|
1343
|
-
if (
|
|
1344
|
-
return
|
|
1345
|
-
},
|
|
1346
|
-
n(
|
|
1347
|
-
},
|
|
1348
|
-
},
|
|
1350
|
+
}), v);
|
|
1351
|
+
return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
|
|
1352
|
+
}, []), k = (v = "", C = {}) => g(s({ message: v, severity: "success" }, C)), b = (v = "", C = {}) => g(s({ message: v, severity: "info" }, C)), I = (v = "", C = {}) => g(s({ message: v, severity: "warning" }, C)), D = (v = "", C = {}) => g(s({ message: v, severity: "error" }, C)), A = (v) => {
|
|
1353
|
+
const C = u.current.findIndex((H) => H.key === v);
|
|
1354
|
+
if (C !== -1)
|
|
1355
|
+
return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
|
|
1356
|
+
}, y = (v, C) => {
|
|
1357
|
+
n(v, C) && l({ open: !1 });
|
|
1358
|
+
}, N = () => {
|
|
1359
|
+
}, R = () => {
|
|
1349
1360
|
u.current.shift(), u.current.length > 0 && l({ open: !0 });
|
|
1350
|
-
},
|
|
1351
|
-
"autoHideDuration" in
|
|
1352
|
-
const
|
|
1361
|
+
}, T = (L = u.current[0]) != null ? L : s({}, ze), h = {};
|
|
1362
|
+
"autoHideDuration" in T && (h.autoHideDuration = T.autoHideDuration);
|
|
1363
|
+
const f = s(s({}, qn), r), B = s(s({
|
|
1353
1364
|
open: d,
|
|
1354
1365
|
setOpen: w,
|
|
1355
1366
|
enqueueNotification: g,
|
|
1356
|
-
enqueueSuccessNotification:
|
|
1357
|
-
enqueueInfoNotification:
|
|
1358
|
-
enqueueWarningNotification:
|
|
1359
|
-
enqueueErrorNotification:
|
|
1360
|
-
removeNotification:
|
|
1367
|
+
enqueueSuccessNotification: k,
|
|
1368
|
+
enqueueInfoNotification: b,
|
|
1369
|
+
enqueueWarningNotification: I,
|
|
1370
|
+
enqueueErrorNotification: D,
|
|
1371
|
+
removeNotification: A
|
|
1361
1372
|
}, e), t);
|
|
1362
|
-
return /* @__PURE__ */ p(bt.Provider, { value:
|
|
1373
|
+
return /* @__PURE__ */ p(bt.Provider, { value: B, children: [
|
|
1363
1374
|
i,
|
|
1364
1375
|
/* @__PURE__ */ o(
|
|
1365
1376
|
Gt,
|
|
1366
|
-
S(s(s({},
|
|
1377
|
+
S(s(s({}, f), h), {
|
|
1367
1378
|
open: d,
|
|
1368
|
-
onClose:
|
|
1379
|
+
onClose: y,
|
|
1369
1380
|
TransitionProps: {
|
|
1370
|
-
onExited:
|
|
1371
|
-
onExit:
|
|
1381
|
+
onExited: R,
|
|
1382
|
+
onExit: N
|
|
1372
1383
|
},
|
|
1373
1384
|
sx: { zIndex: Qn },
|
|
1374
1385
|
children: /* @__PURE__ */ p("div", { children: [
|
|
1375
1386
|
/* @__PURE__ */ o(
|
|
1376
1387
|
Vt,
|
|
1377
1388
|
{
|
|
1378
|
-
onClose: (
|
|
1379
|
-
severity:
|
|
1389
|
+
onClose: (v) => y(v, "closeAlert"),
|
|
1390
|
+
severity: T.severity,
|
|
1380
1391
|
variant: "filled",
|
|
1381
|
-
icon:
|
|
1382
|
-
style:
|
|
1383
|
-
children:
|
|
1392
|
+
icon: T.progressIndicator === "circular" ? /* @__PURE__ */ o(Ae, { size: "1em" }) : void 0,
|
|
1393
|
+
style: T.progressIndicator === "linear" ? Kn : void 0,
|
|
1394
|
+
children: T.message
|
|
1384
1395
|
}
|
|
1385
1396
|
),
|
|
1386
|
-
|
|
1397
|
+
T.progressIndicator === "linear" && /* @__PURE__ */ o(qt, { color: "primary" })
|
|
1387
1398
|
] })
|
|
1388
1399
|
})
|
|
1389
1400
|
)
|
|
@@ -1402,9 +1413,9 @@ const Lo = K(
|
|
|
1402
1413
|
store: t
|
|
1403
1414
|
}) => /* @__PURE__ */ o(st, { store: t != null ? t : to, children: e }), St = "domainCode";
|
|
1404
1415
|
var qe;
|
|
1405
|
-
const Ve =
|
|
1416
|
+
const Ve = M(
|
|
1406
1417
|
JSON.parse((qe = localStorage.getItem(St)) != null ? qe : '{"domainCode": ""}').domainCode
|
|
1407
|
-
), kt =
|
|
1418
|
+
), kt = M(
|
|
1408
1419
|
(e) => e(Ve),
|
|
1409
1420
|
(e, t, n) => {
|
|
1410
1421
|
t(Ve, n), localStorage.setItem(St, JSON.stringify({ domainCode: n }));
|
|
@@ -1432,31 +1443,31 @@ const Ve = _(
|
|
|
1432
1443
|
applicationName: r,
|
|
1433
1444
|
handleLogout: a
|
|
1434
1445
|
}) => {
|
|
1435
|
-
const [c, d] = V(kt), [l, u] =
|
|
1436
|
-
l ? (d(l),
|
|
1437
|
-
}),
|
|
1438
|
-
c && !
|
|
1446
|
+
const [c, d] = V(kt), [l, u] = E(c), { enqueueSuccessNotification: m } = eo(), x = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || x || w, k = () => P(void 0, null, function* () {
|
|
1447
|
+
l ? (d(l), m(`Set domain to ${l}`), n()) : d("");
|
|
1448
|
+
}), b = () => P(void 0, null, function* () {
|
|
1449
|
+
c && !x && !w ? (u(c), n()) : g && a();
|
|
1439
1450
|
});
|
|
1440
|
-
let
|
|
1441
|
-
return
|
|
1451
|
+
let I;
|
|
1452
|
+
return x ? I = "Unable to retrieve your active organisations. Try logging in again." : w && (I = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
|
|
1442
1453
|
ht,
|
|
1443
1454
|
{
|
|
1444
1455
|
isOpen: t,
|
|
1445
1456
|
dialogTitle: "Select an organisation",
|
|
1446
1457
|
primaryButton: {
|
|
1447
1458
|
text: "Confirm",
|
|
1448
|
-
onClick:
|
|
1449
|
-
disabled: !l ||
|
|
1459
|
+
onClick: k,
|
|
1460
|
+
disabled: !l || x || w,
|
|
1450
1461
|
buttonColor: "primary"
|
|
1451
1462
|
},
|
|
1452
1463
|
secondaryButton: {
|
|
1453
1464
|
text: g ? "Logout" : "Cancel",
|
|
1454
|
-
onClick:
|
|
1465
|
+
onClick: b
|
|
1455
1466
|
},
|
|
1456
1467
|
onClose: g ? () => {
|
|
1457
1468
|
} : n,
|
|
1458
1469
|
children: [
|
|
1459
|
-
/* @__PURE__ */ p(
|
|
1470
|
+
/* @__PURE__ */ p(F, { marginBottom: 2, children: [
|
|
1460
1471
|
"Select the default organisation that you want to use with the ",
|
|
1461
1472
|
r,
|
|
1462
1473
|
"."
|
|
@@ -1468,25 +1479,25 @@ const Ve = _(
|
|
|
1468
1479
|
multiple: !1,
|
|
1469
1480
|
disableClearable: !1,
|
|
1470
1481
|
value: l !== "" ? l : null,
|
|
1471
|
-
onChange: (
|
|
1482
|
+
onChange: (D, A) => u(A != null ? A : ""),
|
|
1472
1483
|
getOptionLabel: oo,
|
|
1473
1484
|
options: [...i],
|
|
1474
|
-
renderInput: (
|
|
1485
|
+
renderInput: (D) => /* @__PURE__ */ o(
|
|
1475
1486
|
we,
|
|
1476
|
-
S(s({},
|
|
1487
|
+
S(s({}, D), {
|
|
1477
1488
|
variant: "filled",
|
|
1478
1489
|
label: "Select organisation",
|
|
1479
|
-
InputProps: S(s({},
|
|
1480
|
-
endAdornment: /* @__PURE__ */ p(
|
|
1490
|
+
InputProps: S(s({}, D.InputProps), {
|
|
1491
|
+
endAdornment: /* @__PURE__ */ p(_, { children: [
|
|
1481
1492
|
e ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1482
|
-
|
|
1493
|
+
D.InputProps.endAdornment
|
|
1483
1494
|
] })
|
|
1484
1495
|
})
|
|
1485
1496
|
})
|
|
1486
1497
|
)
|
|
1487
1498
|
}
|
|
1488
1499
|
),
|
|
1489
|
-
|
|
1500
|
+
I && /* @__PURE__ */ o(Xt, { error: !0, children: I })
|
|
1490
1501
|
]
|
|
1491
1502
|
}
|
|
1492
1503
|
);
|
|
@@ -1643,7 +1654,7 @@ const Ve = _(
|
|
|
1643
1654
|
}, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(st, { children: e })), ro = ({
|
|
1644
1655
|
initialValues: e,
|
|
1645
1656
|
children: t
|
|
1646
|
-
}) => (lt(e), /* @__PURE__ */ o(
|
|
1657
|
+
}) => (lt(e), /* @__PURE__ */ o(_, { children: t })), zo = K(
|
|
1647
1658
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1648
1659
|
ro,
|
|
1649
1660
|
{
|