@australiangreens/ag-internal-components 0.0.64 → 0.0.65
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,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var $t = Object.defineProperty, kt = Object.defineProperties;
|
|
2
|
+
var It = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var ee = Object.getOwnPropertySymbols;
|
|
4
4
|
var ye = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var ge = (e, t, n) => t in e ?
|
|
5
|
+
var ge = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
ye.call(t, n) && ge(e, n, t[n]);
|
|
8
8
|
if (ee)
|
|
9
9
|
for (var n of ee(t))
|
|
10
10
|
Be.call(t, n) && ge(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
|
-
}, A = (e, t) =>
|
|
12
|
+
}, A = (e, t) => kt(e, It(t));
|
|
13
13
|
var Fe = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var r in e)
|
|
@@ -19,28 +19,28 @@ var Fe = (e, t) => {
|
|
|
19
19
|
t.indexOf(r) < 0 && Be.call(e, r) && (n[r] = e[r]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var Pe = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
23
|
var z = (e, t, n) => new Promise((r, s) => {
|
|
24
24
|
var c = (p) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
h(n.next(p));
|
|
27
27
|
} catch (u) {
|
|
28
28
|
s(u);
|
|
29
29
|
}
|
|
30
30
|
}, d = (p) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
h(n.throw(p));
|
|
33
33
|
} catch (u) {
|
|
34
34
|
s(u);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, h = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(c, d);
|
|
37
|
+
h((n = n.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
import { jsxs as f, Fragment as
|
|
40
|
-
import { useState as
|
|
41
|
-
import { Typography as
|
|
39
|
+
import { jsxs as f, Fragment as P, jsx as o } from "react/jsx-runtime";
|
|
40
|
+
import { useState as $, createContext as Je, useCallback as oe, useContext as Ye, useEffect as re, useMemo as Et, createElement as xe, useRef as fe } from "react";
|
|
41
|
+
import { Typography as E, Button as Tt, Paper as Ze, Box as D, Drawer as be, Autocomplete as Ae, TextField as Se, CircularProgress as De, Chip as yt, Tooltip as Bt, Stack as Ft, styled as Oe, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Pt, Collapse as Nt, Avatar as Ne, Fade as Lt, Skeleton as Le, Toolbar as Mt, Divider as Me, CssBaseline as _t, Snackbar as Ht, Alert as Rt, LinearProgress as Wt, FormHelperText as zt } from "@mui/material";
|
|
42
42
|
import Gt from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as N, createTheme as tt, alpha as me } from "@mui/material/styles";
|
|
44
44
|
import { AgError as Ut } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as se } from "souvlaki";
|
|
46
46
|
import nt from "@mui/material/List";
|
|
@@ -55,12 +55,12 @@ import Zt from "autosuggest-highlight/match";
|
|
|
55
55
|
import { atom as L, useSetAtom as it, useAtomValue as He, useAtom as X, getDefaultStore as en, Provider as at } from "jotai";
|
|
56
56
|
import { useHydrateAtoms as st } from "jotai/utils";
|
|
57
57
|
function fo({ text: e }) {
|
|
58
|
-
const [t, n] =
|
|
59
|
-
return /* @__PURE__ */ f(
|
|
60
|
-
/* @__PURE__ */ o(
|
|
61
|
-
/* @__PURE__ */ o(
|
|
58
|
+
const [t, n] = $(0);
|
|
59
|
+
return /* @__PURE__ */ f(P, { children: [
|
|
60
|
+
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
61
|
+
/* @__PURE__ */ o(E, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
62
|
/* @__PURE__ */ o(
|
|
63
|
-
|
|
63
|
+
Tt,
|
|
64
64
|
{
|
|
65
65
|
variant: "outlined",
|
|
66
66
|
onClick: () => n((r) => r + 1),
|
|
@@ -86,7 +86,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
86
86
|
userInfoHolder: `${G}-userInfoHolder`,
|
|
87
87
|
settings: `${G}-settings`,
|
|
88
88
|
pieChartIcon: `${G}-pieChartIcon`
|
|
89
|
-
}, tn =
|
|
89
|
+
}, tn = N(D, {
|
|
90
90
|
name: "NavBar"
|
|
91
91
|
})(({ theme: e }) => ({
|
|
92
92
|
[`&.${V.root}`]: {
|
|
@@ -119,7 +119,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
119
119
|
width: lt
|
|
120
120
|
}, dt()), on = () => i({
|
|
121
121
|
width: ct
|
|
122
|
-
}, dt()), rn =
|
|
122
|
+
}, dt()), rn = N(be, {
|
|
123
123
|
shouldForwardProp: (e) => e !== "open"
|
|
124
124
|
})(({ theme: e, open: t }) => i(i({
|
|
125
125
|
width: t ? lt : ct,
|
|
@@ -132,34 +132,34 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
132
132
|
}), !t && {
|
|
133
133
|
"& .MuiDrawer-paper": on()
|
|
134
134
|
}));
|
|
135
|
-
class
|
|
135
|
+
class $e extends Ut {
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
Pe($e, "errorName", "ContextError");
|
|
138
138
|
const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
139
139
|
overrideState: e = an,
|
|
140
140
|
overrideActions: t = sn,
|
|
141
141
|
children: n
|
|
142
142
|
}) => {
|
|
143
|
-
const [{ open: r }, s] =
|
|
143
|
+
const [{ open: r }, s] = $({ open: !0 }), c = oe((p) => {
|
|
144
144
|
s({ open: p });
|
|
145
145
|
}, []), d = oe(() => {
|
|
146
146
|
s((p) => A(i({}, p), { open: !p.open }));
|
|
147
|
-
}, []),
|
|
147
|
+
}, []), h = i(i({
|
|
148
148
|
open: r,
|
|
149
149
|
setOpen: c,
|
|
150
150
|
toggleOpen: d
|
|
151
151
|
}, e), t);
|
|
152
|
-
return /* @__PURE__ */ o(pt.Provider, { value:
|
|
152
|
+
return /* @__PURE__ */ o(pt.Provider, { value: h, children: n });
|
|
153
153
|
}, cn = () => {
|
|
154
154
|
const e = Ye(pt);
|
|
155
155
|
if (e === null)
|
|
156
|
-
throw new
|
|
156
|
+
throw new $e("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
157
157
|
return e;
|
|
158
158
|
}, dn = (e = {}) => i({
|
|
159
159
|
open: !0
|
|
160
160
|
}, e), mo = se(
|
|
161
161
|
(e = dn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(ln, { overrideState: e, overrideActions: t, children: n })
|
|
162
|
-
), Re = 7, Co =
|
|
162
|
+
), Re = 7, Co = N(nt)(({ theme: e }) => ({
|
|
163
163
|
backgroundColor: "black",
|
|
164
164
|
color: "white",
|
|
165
165
|
"& .MuiListItem-root": {
|
|
@@ -197,7 +197,7 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
|
197
197
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
198
198
|
// },
|
|
199
199
|
}
|
|
200
|
-
})), We = 7, vo =
|
|
200
|
+
})), We = 7, vo = N(nt)(({ theme: e }) => ({
|
|
201
201
|
backgroundColor: "#e8e8e8",
|
|
202
202
|
color: "inherit",
|
|
203
203
|
"& .MuiListItem-root": {
|
|
@@ -265,13 +265,13 @@ const pn = ({
|
|
|
265
265
|
onClose: d
|
|
266
266
|
}) => {
|
|
267
267
|
var u, w;
|
|
268
|
-
const [
|
|
268
|
+
const [h, p] = $(!1);
|
|
269
269
|
return /* @__PURE__ */ f(
|
|
270
270
|
Vt,
|
|
271
271
|
{
|
|
272
272
|
open: e,
|
|
273
273
|
onClose: () => {
|
|
274
|
-
|
|
274
|
+
h || d();
|
|
275
275
|
},
|
|
276
276
|
fullWidth: !0,
|
|
277
277
|
maxWidth: r != null ? r : "xs",
|
|
@@ -284,7 +284,7 @@ const pn = ({
|
|
|
284
284
|
{
|
|
285
285
|
onClick: (u = c == null ? void 0 : c.onClick) != null ? u : d,
|
|
286
286
|
"data-testid": c == null ? void 0 : c.testId,
|
|
287
|
-
disabled: (c == null ? void 0 : c.disabled) ||
|
|
287
|
+
disabled: (c == null ? void 0 : c.disabled) || h,
|
|
288
288
|
color: c == null ? void 0 : c.buttonColor,
|
|
289
289
|
children: (w = c == null ? void 0 : c.text) != null ? w : "Cancel"
|
|
290
290
|
}
|
|
@@ -297,7 +297,7 @@ const pn = ({
|
|
|
297
297
|
p(!0), yield (b = s.onClick) == null ? void 0 : b.call(s), p(!1);
|
|
298
298
|
}),
|
|
299
299
|
"data-testid": s.testId,
|
|
300
|
-
disabled: s.disabled ||
|
|
300
|
+
disabled: s.disabled || h,
|
|
301
301
|
color: s == null ? void 0 : s.buttonColor,
|
|
302
302
|
children: s.text
|
|
303
303
|
}
|
|
@@ -316,7 +316,7 @@ function wo({
|
|
|
316
316
|
label: s,
|
|
317
317
|
value: c,
|
|
318
318
|
"data-testid": d,
|
|
319
|
-
sx:
|
|
319
|
+
sx: h,
|
|
320
320
|
textFieldColor: p,
|
|
321
321
|
textFieldVariant: u = "filled",
|
|
322
322
|
loadingText: w = "Loading...",
|
|
@@ -327,7 +327,7 @@ function wo({
|
|
|
327
327
|
preLoadedOptions: C = void 0,
|
|
328
328
|
disablePortal: m = !1
|
|
329
329
|
}) {
|
|
330
|
-
const [
|
|
330
|
+
const [g, T] = $(""), [M, y] = $(C || []), [B, k] = $(!1), [_, F] = $(!1), H = (a, l) => {
|
|
331
331
|
const x = c.filter((q) => q.id !== l);
|
|
332
332
|
n(x, "delete", a);
|
|
333
333
|
};
|
|
@@ -336,8 +336,8 @@ function wo({
|
|
|
336
336
|
const l = () => z(this, null, function* () {
|
|
337
337
|
a = new AbortController();
|
|
338
338
|
try {
|
|
339
|
-
const x = yield e(
|
|
340
|
-
y(x != null ? x : []),
|
|
339
|
+
const x = yield e(g, a.signal);
|
|
340
|
+
y(x != null ? x : []), F(!1);
|
|
341
341
|
} catch (x) {
|
|
342
342
|
if (x instanceof Error && x.name === "AbortError")
|
|
343
343
|
console.debug("Previous lookup request was cancelled");
|
|
@@ -345,21 +345,21 @@ function wo({
|
|
|
345
345
|
throw x;
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
-
if (
|
|
349
|
-
return (!r ||
|
|
348
|
+
if (g !== "")
|
|
349
|
+
return (!r || g.length >= r) && !C ? (F(!0), l()) : F(!1), function() {
|
|
350
350
|
a && a.abort();
|
|
351
351
|
};
|
|
352
|
-
}, [
|
|
352
|
+
}, [g, e, r, C]), re(() => {
|
|
353
353
|
!B && !C && y([]), !B && C && y(C);
|
|
354
354
|
}, [B, C]);
|
|
355
|
-
const R =
|
|
355
|
+
const R = Et(() => C ? (a, l) => a.filter(
|
|
356
356
|
(x) => x.label.toLowerCase().includes(l.inputValue.toLowerCase())
|
|
357
357
|
) : (a) => a, [C]);
|
|
358
358
|
return /* @__PURE__ */ f("div", { "data-testid": d, children: [
|
|
359
359
|
/* @__PURE__ */ o(
|
|
360
360
|
Ae,
|
|
361
361
|
{
|
|
362
|
-
sx:
|
|
362
|
+
sx: h,
|
|
363
363
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
364
364
|
disablePortal: m,
|
|
365
365
|
multiple: !0,
|
|
@@ -370,12 +370,12 @@ function wo({
|
|
|
370
370
|
filterSelectedOptions: !0,
|
|
371
371
|
includeInputInList: !0,
|
|
372
372
|
value: c,
|
|
373
|
-
onOpen: () =>
|
|
374
|
-
onClose: () =>
|
|
373
|
+
onOpen: () => k(!0),
|
|
374
|
+
onClose: () => k(!1),
|
|
375
375
|
onChange: (a, l, x) => {
|
|
376
376
|
n(l, x, a);
|
|
377
377
|
},
|
|
378
|
-
onInputChange: (a, l) =>
|
|
378
|
+
onInputChange: (a, l) => T(l),
|
|
379
379
|
noOptionsText: b,
|
|
380
380
|
loadingText: w,
|
|
381
381
|
popupIcon: S,
|
|
@@ -388,12 +388,12 @@ function wo({
|
|
|
388
388
|
error: v,
|
|
389
389
|
helperText: O,
|
|
390
390
|
InputProps: A(i({}, a.InputProps), {
|
|
391
|
-
endAdornment: /* @__PURE__ */ f(
|
|
391
|
+
endAdornment: /* @__PURE__ */ f(P, { children: [
|
|
392
392
|
_ ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
393
393
|
a.InputProps.endAdornment
|
|
394
394
|
] })
|
|
395
395
|
}),
|
|
396
|
-
"data-testid": d ? `${d}:TextField` : void 0,
|
|
396
|
+
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
|
|
397
397
|
onKeyDown: (l) => {
|
|
398
398
|
(l.key === "Backspace" || l.key === "Delete") && l.stopPropagation();
|
|
399
399
|
},
|
|
@@ -412,7 +412,7 @@ function wo({
|
|
|
412
412
|
"li",
|
|
413
413
|
A(i({}, a), {
|
|
414
414
|
key: l.id,
|
|
415
|
-
"data-testid": d ? `${d}:Autocomplete:
|
|
415
|
+
"data-testid": d ? `${d}:Autocomplete:option(${l.id.toString()})` : void 0
|
|
416
416
|
}),
|
|
417
417
|
/* @__PURE__ */ o("div", { children: le.map((J, ce) => /* @__PURE__ */ o(
|
|
418
418
|
"span",
|
|
@@ -430,7 +430,7 @@ function wo({
|
|
|
430
430
|
"li",
|
|
431
431
|
A(i({}, a), {
|
|
432
432
|
key: l.id,
|
|
433
|
-
"data-testid": d ? `${d}:
|
|
433
|
+
"data-testid": d ? `${d}:option(${l.id.toString()})` : void 0
|
|
434
434
|
}),
|
|
435
435
|
l.label
|
|
436
436
|
);
|
|
@@ -460,7 +460,7 @@ function wo({
|
|
|
460
460
|
}
|
|
461
461
|
]
|
|
462
462
|
},
|
|
463
|
-
children: /* @__PURE__ */ o(
|
|
463
|
+
children: /* @__PURE__ */ o(E, { style: { whiteSpace: "normal" }, children: a.chipLabel ? a.chipLabel : a.label })
|
|
464
464
|
}
|
|
465
465
|
),
|
|
466
466
|
"data-testid": d ? `${d}:Chip(${a.id.toString()})` : void 0,
|
|
@@ -484,33 +484,33 @@ const bo = ({
|
|
|
484
484
|
sx: s,
|
|
485
485
|
textFieldColor: c,
|
|
486
486
|
textFieldVariant: d = "filled",
|
|
487
|
-
|
|
487
|
+
"data-testid": h,
|
|
488
488
|
minLength: p = 3,
|
|
489
489
|
disablePortal: u = !1
|
|
490
490
|
}) => {
|
|
491
|
-
const [w, b] =
|
|
491
|
+
const [w, b] = $([]), [S, v] = $(!1);
|
|
492
492
|
let O;
|
|
493
493
|
const C = (m) => z(void 0, null, function* () {
|
|
494
494
|
O = new AbortController();
|
|
495
495
|
try {
|
|
496
|
-
const
|
|
497
|
-
b(
|
|
498
|
-
} catch (
|
|
499
|
-
if (
|
|
496
|
+
const g = yield e(m, O.signal);
|
|
497
|
+
b(g != null ? g : []), v(!1);
|
|
498
|
+
} catch (g) {
|
|
499
|
+
if (g instanceof Error && g.name === "AbortError")
|
|
500
500
|
console.debug("Previous lookup request was cancelled");
|
|
501
501
|
else
|
|
502
|
-
throw
|
|
502
|
+
throw g;
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
|
-
return /* @__PURE__ */ o(
|
|
505
|
+
return /* @__PURE__ */ o("div", { "data-testid": h, children: /* @__PURE__ */ o(Ft, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
506
506
|
Ae,
|
|
507
507
|
{
|
|
508
508
|
sx: s,
|
|
509
|
-
"data-testid":
|
|
509
|
+
"data-testid": h ? `${h}:Autocomplete` : void 0,
|
|
510
510
|
loading: S,
|
|
511
511
|
options: w,
|
|
512
|
-
onChange: (m,
|
|
513
|
-
t(m,
|
|
512
|
+
onChange: (m, g) => {
|
|
513
|
+
t(m, g);
|
|
514
514
|
},
|
|
515
515
|
disablePortal: u,
|
|
516
516
|
filterOptions: (m) => m,
|
|
@@ -519,28 +519,28 @@ const bo = ({
|
|
|
519
519
|
renderInput: (m) => /* @__PURE__ */ o(
|
|
520
520
|
Se,
|
|
521
521
|
A(i({
|
|
522
|
-
"data-testid":
|
|
522
|
+
"data-testid": h ? `${h}:Autocomplete:TextField` : void 0
|
|
523
523
|
}, m), {
|
|
524
524
|
variant: d,
|
|
525
525
|
label: n,
|
|
526
526
|
color: c
|
|
527
527
|
})
|
|
528
528
|
),
|
|
529
|
-
isOptionEqualToValue: (m,
|
|
530
|
-
onInputChange: (m,
|
|
531
|
-
(
|
|
529
|
+
isOptionEqualToValue: (m, g) => m.id === g.id,
|
|
530
|
+
onInputChange: (m, g) => {
|
|
531
|
+
(g == null ? void 0 : g.length) >= p && (v(!0), C(g));
|
|
532
532
|
},
|
|
533
|
-
renderOption: (m,
|
|
533
|
+
renderOption: (m, g) => /* @__PURE__ */ xe(
|
|
534
534
|
"li",
|
|
535
535
|
A(i({}, m), {
|
|
536
|
-
key:
|
|
537
|
-
"data-testid":
|
|
536
|
+
key: g.id,
|
|
537
|
+
"data-testid": h ? `${h}:Autocomplete:option(${g.id.toString()})` : void 0
|
|
538
538
|
}),
|
|
539
|
-
|
|
539
|
+
g.label
|
|
540
540
|
)
|
|
541
541
|
}
|
|
542
542
|
) }) });
|
|
543
|
-
}, un = 24, hn = 64, U = "TopBar",
|
|
543
|
+
}, un = 24, hn = 64, U = "TopBar", I = {
|
|
544
544
|
topStripe: `${U}-topStripe`,
|
|
545
545
|
titleBar: `${U}-titleBar`,
|
|
546
546
|
titleSlider: `${U}-titleSlider`,
|
|
@@ -554,18 +554,18 @@ const bo = ({
|
|
|
554
554
|
var r, s;
|
|
555
555
|
return {
|
|
556
556
|
width: "100%",
|
|
557
|
-
[`& .${
|
|
557
|
+
[`& .${I.topStripe}`]: {
|
|
558
558
|
width: "100%",
|
|
559
559
|
height: `${un}px`,
|
|
560
560
|
backgroundColor: e.palette.primary.main
|
|
561
561
|
},
|
|
562
|
-
[`& .${
|
|
562
|
+
[`& .${I.titleBar}`]: {
|
|
563
563
|
backgroundColor: e.palette.primary.light,
|
|
564
564
|
height: `${hn}px`,
|
|
565
565
|
padding: e.spacing(0, 3),
|
|
566
566
|
width: "100%"
|
|
567
567
|
},
|
|
568
|
-
[`& .${
|
|
568
|
+
[`& .${I.titleSlider}`]: i(i({
|
|
569
569
|
height: "100%",
|
|
570
570
|
display: "flex",
|
|
571
571
|
alignItems: "center",
|
|
@@ -574,14 +574,14 @@ const bo = ({
|
|
|
574
574
|
easing: e.transitions.easing.sharp,
|
|
575
575
|
duration: e.transitions.duration.leavingScreen
|
|
576
576
|
}),
|
|
577
|
-
[`& .${
|
|
577
|
+
[`& .${I.leftPanelButton}`]: {
|
|
578
578
|
marginRight: e.spacing(2),
|
|
579
579
|
flexGrow: 0
|
|
580
580
|
},
|
|
581
|
-
[`& .${
|
|
581
|
+
[`& .${I.titleText}`]: {
|
|
582
582
|
flexGrow: 1
|
|
583
583
|
},
|
|
584
|
-
[`& .${
|
|
584
|
+
[`& .${I.rightPanelButton}`]: {
|
|
585
585
|
flexGrow: 0
|
|
586
586
|
}
|
|
587
587
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -606,12 +606,12 @@ function fn({
|
|
|
606
606
|
"data-testid": r
|
|
607
607
|
}) {
|
|
608
608
|
return /* @__PURE__ */ f(gn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
|
|
609
|
-
/* @__PURE__ */ o("div", { className:
|
|
610
|
-
/* @__PURE__ */ o("div", { className:
|
|
609
|
+
/* @__PURE__ */ o("div", { className: I.topStripe }),
|
|
610
|
+
/* @__PURE__ */ o("div", { className: I.titleBar, children: /* @__PURE__ */ f(D, { className: I.titleSlider, children: [
|
|
611
611
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ f(
|
|
612
612
|
Q,
|
|
613
613
|
{
|
|
614
|
-
className:
|
|
614
|
+
className: I.leftPanelButton,
|
|
615
615
|
color: "inherit",
|
|
616
616
|
"aria-label": "Open left side panel",
|
|
617
617
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -623,11 +623,11 @@ function fn({
|
|
|
623
623
|
]
|
|
624
624
|
}
|
|
625
625
|
),
|
|
626
|
-
/* @__PURE__ */ o(
|
|
626
|
+
/* @__PURE__ */ o(E, { className: I.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
627
627
|
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ f(
|
|
628
628
|
Q,
|
|
629
629
|
{
|
|
630
|
-
className:
|
|
630
|
+
className: I.rightPanelButton,
|
|
631
631
|
color: "inherit",
|
|
632
632
|
"aria-label": "Open right side panel",
|
|
633
633
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -701,7 +701,7 @@ function ze({
|
|
|
701
701
|
titleText: s = "",
|
|
702
702
|
width: c = ut,
|
|
703
703
|
showCloseArrow: d = !0,
|
|
704
|
-
debugOpacity:
|
|
704
|
+
debugOpacity: h = !1,
|
|
705
705
|
headerBoxProps: p = {},
|
|
706
706
|
onOpened: u,
|
|
707
707
|
onClosed: w,
|
|
@@ -721,31 +721,31 @@ function ze({
|
|
|
721
721
|
anchor: t,
|
|
722
722
|
open: n,
|
|
723
723
|
width: c,
|
|
724
|
-
debugOpacity:
|
|
724
|
+
debugOpacity: h,
|
|
725
725
|
"data-testid": b,
|
|
726
726
|
navBarOpen: S,
|
|
727
727
|
navBarWidthOpen: v,
|
|
728
728
|
navBarWidthClosed: O,
|
|
729
729
|
children: [
|
|
730
|
-
/* @__PURE__ */ o(Cn, A(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(
|
|
731
|
-
/* @__PURE__ */ o(
|
|
730
|
+
/* @__PURE__ */ o(Cn, A(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(P, { children: [
|
|
731
|
+
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s }),
|
|
732
732
|
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
|
|
733
733
|
/* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
|
|
734
734
|
" "
|
|
735
735
|
] })
|
|
736
|
-
] }) : /* @__PURE__ */ f(
|
|
736
|
+
] }) : /* @__PURE__ */ f(P, { children: [
|
|
737
737
|
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
|
|
738
738
|
/* @__PURE__ */ o(ot, {}),
|
|
739
739
|
" "
|
|
740
740
|
] }),
|
|
741
|
-
/* @__PURE__ */ o(
|
|
741
|
+
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s })
|
|
742
742
|
] }) })),
|
|
743
743
|
e
|
|
744
744
|
]
|
|
745
745
|
}
|
|
746
746
|
);
|
|
747
747
|
}
|
|
748
|
-
const vn =
|
|
748
|
+
const vn = N(D, {
|
|
749
749
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
750
750
|
name: "PanelAwareMargins"
|
|
751
751
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -768,7 +768,7 @@ const vn = P(D, {
|
|
|
768
768
|
}),
|
|
769
769
|
marginRight: `${(s = n == null ? void 0 : n.width) != null ? s : 0}px`
|
|
770
770
|
});
|
|
771
|
-
}), xn =
|
|
771
|
+
}), xn = N(et, {
|
|
772
772
|
name: "PageContainer"
|
|
773
773
|
})(({ theme: e }) => ({
|
|
774
774
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -783,7 +783,7 @@ const vn = P(D, {
|
|
|
783
783
|
startOpen: !1,
|
|
784
784
|
open: void 0,
|
|
785
785
|
onChangeOpen: void 0,
|
|
786
|
-
content: /* @__PURE__ */ o(
|
|
786
|
+
content: /* @__PURE__ */ o(P, {}),
|
|
787
787
|
onOpened: void 0,
|
|
788
788
|
onClosed: void 0,
|
|
789
789
|
dataTestId: void 0
|
|
@@ -796,16 +796,16 @@ function Ao({
|
|
|
796
796
|
sidePanelsAreMutuallyExclusive: s = !0,
|
|
797
797
|
debugOpacity: c = !1,
|
|
798
798
|
pageContainerProps: d,
|
|
799
|
-
pageContentDataTestId:
|
|
799
|
+
pageContentDataTestId: h,
|
|
800
800
|
topBarDataTestId: p,
|
|
801
801
|
navBarOpen: u,
|
|
802
802
|
navBarWidthOpen: w,
|
|
803
803
|
navBarWidthClosed: b
|
|
804
804
|
}) {
|
|
805
|
-
const [S, v] =
|
|
806
|
-
titleText:
|
|
805
|
+
const [S, v] = $(Ce), [O, C] = $(ve), [m, g] = $(Ce), [T, M] = $(ve), y = n !== void 0, B = r !== void 0, {
|
|
806
|
+
titleText: k,
|
|
807
807
|
content: _,
|
|
808
|
-
flavour:
|
|
808
|
+
flavour: F,
|
|
809
809
|
open: H,
|
|
810
810
|
onChangeOpen: R,
|
|
811
811
|
width: a,
|
|
@@ -817,9 +817,9 @@ function Ao({
|
|
|
817
817
|
} = n ? i(i({}, te), n) : i({}, te), {
|
|
818
818
|
titleText: ce,
|
|
819
819
|
content: At,
|
|
820
|
-
flavour:
|
|
820
|
+
flavour: ke,
|
|
821
821
|
open: de,
|
|
822
|
-
onChangeOpen:
|
|
822
|
+
onChangeOpen: Ie,
|
|
823
823
|
width: pe,
|
|
824
824
|
arrowButtons: Y,
|
|
825
825
|
startOpen: Z,
|
|
@@ -828,14 +828,14 @@ function Ao({
|
|
|
828
828
|
dataTestId: Ot
|
|
829
829
|
} = r ? i(i({}, te), r) : i({}, te);
|
|
830
830
|
re(() => {
|
|
831
|
-
x !== Ce && (v(x),
|
|
831
|
+
x !== Ce && (v(x), g(x));
|
|
832
832
|
}, [x]), re(() => {
|
|
833
833
|
Z !== ve && (C(Z), M(Z));
|
|
834
834
|
}, [Z]);
|
|
835
|
-
const ue = H === void 0 ? S : H, he = de === void 0 ? O : de,
|
|
836
|
-
H === void 0 && (v(W), s && B && (W ? (C(!1), M(O)) : C(
|
|
837
|
-
},
|
|
838
|
-
de === void 0 && (C(W), s && y && (W ? (v(!1),
|
|
835
|
+
const ue = H === void 0 ? S : H, he = de === void 0 ? O : de, Ee = (W) => {
|
|
836
|
+
H === void 0 && (v(W), s && B && (W ? (C(!1), M(O)) : C(T))), R && R(W);
|
|
837
|
+
}, Te = (W) => {
|
|
838
|
+
de === void 0 && (C(W), s && y && (W ? (v(!1), g(S)) : v(m))), Ie && Ie(W);
|
|
839
839
|
};
|
|
840
840
|
return /* @__PURE__ */ f(D, { children: [
|
|
841
841
|
y && /* @__PURE__ */ o(
|
|
@@ -844,9 +844,9 @@ function Ao({
|
|
|
844
844
|
"data-testid": J,
|
|
845
845
|
anchor: "left",
|
|
846
846
|
open: ue,
|
|
847
|
-
onClose: () =>
|
|
847
|
+
onClose: () => Ee(!1),
|
|
848
848
|
width: a,
|
|
849
|
-
titleText:
|
|
849
|
+
titleText: k,
|
|
850
850
|
debugOpacity: c,
|
|
851
851
|
showCloseArrow: l === "both" || l === "close",
|
|
852
852
|
onOpened: q,
|
|
@@ -863,7 +863,7 @@ function Ao({
|
|
|
863
863
|
"data-testid": Ot,
|
|
864
864
|
anchor: "right",
|
|
865
865
|
open: he,
|
|
866
|
-
onClose: () =>
|
|
866
|
+
onClose: () => Te(!1),
|
|
867
867
|
width: pe,
|
|
868
868
|
titleText: ce,
|
|
869
869
|
debugOpacity: c,
|
|
@@ -881,43 +881,43 @@ function Ao({
|
|
|
881
881
|
i(i({
|
|
882
882
|
titleText: t,
|
|
883
883
|
"data-testid": p
|
|
884
|
-
}, y &&
|
|
884
|
+
}, y && F === "push" ? {
|
|
885
885
|
leftPanel: {
|
|
886
886
|
open: ue,
|
|
887
887
|
width: a,
|
|
888
|
-
onOpen: () =>
|
|
888
|
+
onOpen: () => Ee(!0),
|
|
889
889
|
showOpenArrow: l === "both" || l === "open"
|
|
890
890
|
}
|
|
891
|
-
} : {}), B &&
|
|
891
|
+
} : {}), B && ke === "push" ? {
|
|
892
892
|
rightPanel: {
|
|
893
893
|
open: he,
|
|
894
894
|
width: pe,
|
|
895
|
-
onOpen: () =>
|
|
895
|
+
onOpen: () => Te(!0),
|
|
896
896
|
showOpenArrow: Y === "both" || Y === "open"
|
|
897
897
|
}
|
|
898
898
|
} : {})
|
|
899
899
|
),
|
|
900
900
|
/* @__PURE__ */ o(
|
|
901
901
|
vn,
|
|
902
|
-
A(i(i({},
|
|
902
|
+
A(i(i({}, F === "push" ? {
|
|
903
903
|
leftPanel: {
|
|
904
904
|
open: ue,
|
|
905
905
|
width: a
|
|
906
906
|
}
|
|
907
|
-
} : {}),
|
|
907
|
+
} : {}), ke === "push" ? {
|
|
908
908
|
rightPanel: {
|
|
909
909
|
open: he,
|
|
910
910
|
width: pe
|
|
911
911
|
}
|
|
912
912
|
} : {}), {
|
|
913
|
-
children: /* @__PURE__ */ o(xn, A(i({ "data-testid":
|
|
913
|
+
children: /* @__PURE__ */ o(xn, A(i({ "data-testid": h }, d), { children: e }))
|
|
914
914
|
})
|
|
915
915
|
)
|
|
916
916
|
] });
|
|
917
917
|
}
|
|
918
918
|
const ht = () => {
|
|
919
919
|
const e = ae();
|
|
920
|
-
return
|
|
920
|
+
return Pt(e.breakpoints.down("sm"));
|
|
921
921
|
}, wn = 64, bn = 64, An = 256, K = L(!0), gt = L(An), ft = L(bn), we = L(""), mt = L(wn), Ct = L(void 0);
|
|
922
922
|
function Sn({ links: e }) {
|
|
923
923
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
@@ -930,7 +930,7 @@ const ne = "Navbar", j = {
|
|
|
930
930
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
931
931
|
// settings: `${PREFIX}-settings`,
|
|
932
932
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
933
|
-
}, Dn =
|
|
933
|
+
}, Dn = N(D, { name: "NavBar" })(({ theme: e }) => ({
|
|
934
934
|
[`&.${j.root}`]: {
|
|
935
935
|
display: "flex"
|
|
936
936
|
},
|
|
@@ -955,7 +955,7 @@ const ne = "Navbar", j = {
|
|
|
955
955
|
}), On = (e) => {
|
|
956
956
|
const t = ae();
|
|
957
957
|
return /* @__PURE__ */ o(
|
|
958
|
-
|
|
958
|
+
Nt,
|
|
959
959
|
i({
|
|
960
960
|
easing: t.transitions.easing.sharp,
|
|
961
961
|
timeout: {
|
|
@@ -978,7 +978,7 @@ const ne = "Navbar", j = {
|
|
|
978
978
|
}, vt(e)), Ue = (e, t) => i({
|
|
979
979
|
width: t,
|
|
980
980
|
transition: ie(e, "width", "leaving")
|
|
981
|
-
}, vt(e)),
|
|
981
|
+
}, vt(e)), $n = N(be, {
|
|
982
982
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
983
983
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: s }) => i(i({
|
|
984
984
|
flexShrink: 0,
|
|
@@ -993,7 +993,7 @@ const ne = "Navbar", j = {
|
|
|
993
993
|
backgroundColor: "",
|
|
994
994
|
"& .MuiDrawer-paper": Ue(e, s ? n : r)
|
|
995
995
|
})));
|
|
996
|
-
function
|
|
996
|
+
function kn(e) {
|
|
997
997
|
let t = 0;
|
|
998
998
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
999
999
|
const s = e.charCodeAt(n);
|
|
@@ -1001,8 +1001,8 @@ function In(e) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
return t;
|
|
1003
1003
|
}
|
|
1004
|
-
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"],
|
|
1005
|
-
function
|
|
1004
|
+
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], In = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
1005
|
+
function En({ user: e, domainCode: t, open: n }) {
|
|
1006
1006
|
const r = ae();
|
|
1007
1007
|
return /* @__PURE__ */ f(
|
|
1008
1008
|
D,
|
|
@@ -1024,28 +1024,28 @@ function Tn({ user: e, domainCode: t, open: n }) {
|
|
|
1024
1024
|
aspectRatio: 1
|
|
1025
1025
|
},
|
|
1026
1026
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1027
|
-
|
|
1027
|
+
Ne,
|
|
1028
1028
|
{
|
|
1029
1029
|
src: e == null ? void 0 : e.picture,
|
|
1030
1030
|
sx: {
|
|
1031
1031
|
width: "100%",
|
|
1032
1032
|
height: "100%",
|
|
1033
|
-
bgcolor: Ve[Math.abs(
|
|
1033
|
+
bgcolor: Ve[Math.abs(kn(e.name)) % Ve.length]
|
|
1034
1034
|
},
|
|
1035
|
-
children:
|
|
1035
|
+
children: In(e.name)
|
|
1036
1036
|
}
|
|
1037
|
-
) : /* @__PURE__ */ o(
|
|
1037
|
+
) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
|
|
1038
1038
|
}
|
|
1039
1039
|
),
|
|
1040
1040
|
/* @__PURE__ */ o(On, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Lt, { in: n, children: /* @__PURE__ */ f(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1041
|
-
e != null && e.name ? /* @__PURE__ */ o(
|
|
1042
|
-
t ? /* @__PURE__ */ o(
|
|
1041
|
+
e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(Le, { animation: !1, width: "50%" }),
|
|
1042
|
+
t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Le, { animation: !1, width: "25%" })
|
|
1043
1043
|
] }) }) })
|
|
1044
1044
|
]
|
|
1045
1045
|
}
|
|
1046
1046
|
);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function Tn({
|
|
1049
1049
|
open: e,
|
|
1050
1050
|
widthClosed: t,
|
|
1051
1051
|
widthOpen: n,
|
|
@@ -1053,12 +1053,12 @@ function En({
|
|
|
1053
1053
|
top: s,
|
|
1054
1054
|
middle: c,
|
|
1055
1055
|
bottom: d,
|
|
1056
|
-
user:
|
|
1056
|
+
user: h,
|
|
1057
1057
|
domainCode: p
|
|
1058
1058
|
}) {
|
|
1059
1059
|
const u = ht(), w = it(K);
|
|
1060
1060
|
return /* @__PURE__ */ o(Dn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
|
|
1061
|
-
|
|
1061
|
+
$n,
|
|
1062
1062
|
{
|
|
1063
1063
|
open: e,
|
|
1064
1064
|
widthOpen: n,
|
|
@@ -1081,8 +1081,8 @@ function En({
|
|
|
1081
1081
|
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(c) ? /* @__PURE__ */ o(Sn, { links: c }) : c }),
|
|
1082
1082
|
/* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1083
1083
|
/* @__PURE__ */ o(Me, { variant: "middle" }),
|
|
1084
|
-
/* @__PURE__ */ o(
|
|
1085
|
-
d && /* @__PURE__ */ o(
|
|
1084
|
+
/* @__PURE__ */ o(En, { user: h, domainCode: p, open: e }),
|
|
1085
|
+
d && /* @__PURE__ */ o(P, { children: d })
|
|
1086
1086
|
] })
|
|
1087
1087
|
]
|
|
1088
1088
|
}
|
|
@@ -1119,8 +1119,8 @@ function yn({
|
|
|
1119
1119
|
const Bn = "TopBar", Fn = {
|
|
1120
1120
|
titleText: `${Bn}-titleText`
|
|
1121
1121
|
};
|
|
1122
|
-
function
|
|
1123
|
-
const r = it(K), s = () => r((
|
|
1122
|
+
function Pn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
1123
|
+
const r = it(K), s = () => r((h) => !h), c = ae(), d = ht();
|
|
1124
1124
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
|
|
1125
1125
|
Ze,
|
|
1126
1126
|
{
|
|
@@ -1140,7 +1140,7 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
1140
1140
|
},
|
|
1141
1141
|
children: [
|
|
1142
1142
|
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Jt, { fontSize: "medium" }) }),
|
|
1143
|
-
/* @__PURE__ */ o(
|
|
1143
|
+
/* @__PURE__ */ o(E, { className: Fn.titleText, variant: "h6", children: e })
|
|
1144
1144
|
]
|
|
1145
1145
|
}
|
|
1146
1146
|
) });
|
|
@@ -1153,7 +1153,7 @@ function So({
|
|
|
1153
1153
|
pageContentDataTestId: s,
|
|
1154
1154
|
topBarDataTestId: c,
|
|
1155
1155
|
navBarDataTestId: d,
|
|
1156
|
-
navBarMiddle:
|
|
1156
|
+
navBarMiddle: h,
|
|
1157
1157
|
navBarBottom: p,
|
|
1158
1158
|
user: u,
|
|
1159
1159
|
domainCode: w
|
|
@@ -1165,14 +1165,14 @@ function So({
|
|
|
1165
1165
|
const b = He(K), [S] = X(gt), [v] = X(ft), O = He(we), [C] = X(mt), [m] = X(Ct);
|
|
1166
1166
|
return /* @__PURE__ */ f(D, { children: [
|
|
1167
1167
|
/* @__PURE__ */ o(_t, {}),
|
|
1168
|
-
/* @__PURE__ */ o(
|
|
1168
|
+
/* @__PURE__ */ o(Pn, { titleText: O, "data-testid": c, height: C }),
|
|
1169
1169
|
/* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
|
|
1170
1170
|
/* @__PURE__ */ o(
|
|
1171
|
-
|
|
1171
|
+
Tn,
|
|
1172
1172
|
{
|
|
1173
1173
|
open: b,
|
|
1174
1174
|
top: m,
|
|
1175
|
-
middle:
|
|
1175
|
+
middle: h,
|
|
1176
1176
|
bottom: p,
|
|
1177
1177
|
user: u,
|
|
1178
1178
|
domainCode: w,
|
|
@@ -1194,7 +1194,7 @@ function So({
|
|
|
1194
1194
|
] })
|
|
1195
1195
|
] });
|
|
1196
1196
|
}
|
|
1197
|
-
const
|
|
1197
|
+
const Nn = {
|
|
1198
1198
|
autoHideDuration: 6e3,
|
|
1199
1199
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1200
1200
|
// The default is false. If we prefer timer to continue when window loses
|
|
@@ -1228,7 +1228,7 @@ function zn(c) {
|
|
|
1228
1228
|
"children"
|
|
1229
1229
|
]);
|
|
1230
1230
|
var R;
|
|
1231
|
-
const [{ open:
|
|
1231
|
+
const [{ open: h }, p] = $({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), S = oe((a) => {
|
|
1232
1232
|
p({ open: a });
|
|
1233
1233
|
}, []), v = oe((a = {}) => {
|
|
1234
1234
|
b.current += 1, u.current.length >= Xe && Date.now() - w.current >= je && (w.current = Date.now(), console.error(
|
|
@@ -1238,7 +1238,7 @@ function zn(c) {
|
|
|
1238
1238
|
key: _n()
|
|
1239
1239
|
}), a);
|
|
1240
1240
|
return u.current.push(l), u.current.length === 1 && p({ open: !0 }), l.key;
|
|
1241
|
-
}, []), O = (a = "", l = {}) => v(i({ message: a, severity: "success" }, l)), C = (a = "", l = {}) => v(i({ message: a, severity: "info" }, l)), m = (a = "", l = {}) => v(i({ message: a, severity: "warning" }, l)),
|
|
1241
|
+
}, []), O = (a = "", l = {}) => v(i({ message: a, severity: "success" }, l)), C = (a = "", l = {}) => v(i({ message: a, severity: "info" }, l)), m = (a = "", l = {}) => v(i({ message: a, severity: "warning" }, l)), g = (a = "", l = {}) => v(i({ message: a, severity: "error" }, l)), T = (a) => {
|
|
1242
1242
|
const l = u.current.findIndex((x) => x.key === a);
|
|
1243
1243
|
if (l !== -1)
|
|
1244
1244
|
return l === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(l, 1);
|
|
@@ -1247,24 +1247,24 @@ function zn(c) {
|
|
|
1247
1247
|
}, y = () => {
|
|
1248
1248
|
}, B = () => {
|
|
1249
1249
|
u.current.shift(), u.current.length > 0 && p({ open: !0 });
|
|
1250
|
-
},
|
|
1251
|
-
"autoHideDuration" in
|
|
1252
|
-
const
|
|
1253
|
-
open:
|
|
1250
|
+
}, k = (R = u.current[0]) != null ? R : i({}, qe), _ = {};
|
|
1251
|
+
"autoHideDuration" in k && (_.autoHideDuration = k.autoHideDuration);
|
|
1252
|
+
const F = i(i({}, Nn), s), H = i(i({
|
|
1253
|
+
open: h,
|
|
1254
1254
|
setOpen: S,
|
|
1255
1255
|
enqueueNotification: v,
|
|
1256
1256
|
enqueueSuccessNotification: O,
|
|
1257
1257
|
enqueueInfoNotification: C,
|
|
1258
1258
|
enqueueWarningNotification: m,
|
|
1259
|
-
enqueueErrorNotification:
|
|
1260
|
-
removeNotification:
|
|
1259
|
+
enqueueErrorNotification: g,
|
|
1260
|
+
removeNotification: T
|
|
1261
1261
|
}, e), t);
|
|
1262
1262
|
return /* @__PURE__ */ f(xt.Provider, { value: H, children: [
|
|
1263
1263
|
r,
|
|
1264
1264
|
/* @__PURE__ */ o(
|
|
1265
1265
|
Ht,
|
|
1266
|
-
A(i(i({},
|
|
1267
|
-
open:
|
|
1266
|
+
A(i(i({}, F), _), {
|
|
1267
|
+
open: h,
|
|
1268
1268
|
onClose: M,
|
|
1269
1269
|
TransitionProps: {
|
|
1270
1270
|
onExited: B,
|
|
@@ -1276,14 +1276,14 @@ function zn(c) {
|
|
|
1276
1276
|
Rt,
|
|
1277
1277
|
{
|
|
1278
1278
|
onClose: (a) => M(a, "closeAlert"),
|
|
1279
|
-
severity:
|
|
1279
|
+
severity: k.severity,
|
|
1280
1280
|
variant: "filled",
|
|
1281
|
-
icon:
|
|
1282
|
-
style:
|
|
1283
|
-
children:
|
|
1281
|
+
icon: k.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
|
|
1282
|
+
style: k.progressIndicator === "linear" ? Hn : void 0,
|
|
1283
|
+
children: k.message
|
|
1284
1284
|
}
|
|
1285
1285
|
),
|
|
1286
|
-
|
|
1286
|
+
k.progressIndicator === "linear" && /* @__PURE__ */ o(Wt, { color: "primary" })
|
|
1287
1287
|
] })
|
|
1288
1288
|
})
|
|
1289
1289
|
)
|
|
@@ -1292,7 +1292,7 @@ function zn(c) {
|
|
|
1292
1292
|
function Gn() {
|
|
1293
1293
|
const e = Ye(xt);
|
|
1294
1294
|
if (e === null)
|
|
1295
|
-
throw new
|
|
1295
|
+
throw new $e("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1296
1296
|
return e;
|
|
1297
1297
|
}
|
|
1298
1298
|
const Do = se(
|
|
@@ -1324,7 +1324,7 @@ const Qe = L(
|
|
|
1324
1324
|
}, qn = (e) => {
|
|
1325
1325
|
var t;
|
|
1326
1326
|
return e === null ? "N/A" : (t = Vn[e]) != null ? t : "";
|
|
1327
|
-
},
|
|
1327
|
+
}, $o = ({
|
|
1328
1328
|
isLoading: e,
|
|
1329
1329
|
isOpen: t,
|
|
1330
1330
|
onClose: n,
|
|
@@ -1332,8 +1332,8 @@ const Qe = L(
|
|
|
1332
1332
|
applicationName: s,
|
|
1333
1333
|
handleLogout: c
|
|
1334
1334
|
}) => {
|
|
1335
|
-
const [d,
|
|
1336
|
-
p ? (
|
|
1335
|
+
const [d, h] = X(bt), [p, u] = $(d), { enqueueSuccessNotification: w } = Gn(), b = r.length === 0, S = !!d && !r.includes(d) && !r.includes(p), v = !d || b || S, O = () => z(void 0, null, function* () {
|
|
1336
|
+
p ? (h(p), w(`Set domain to ${p}`), n()) : h("");
|
|
1337
1337
|
}), C = () => z(void 0, null, function* () {
|
|
1338
1338
|
d && !b && !S ? (u(d), n()) : v && c();
|
|
1339
1339
|
});
|
|
@@ -1356,7 +1356,7 @@ const Qe = L(
|
|
|
1356
1356
|
onClose: v ? () => {
|
|
1357
1357
|
} : n,
|
|
1358
1358
|
children: [
|
|
1359
|
-
/* @__PURE__ */ f(
|
|
1359
|
+
/* @__PURE__ */ f(E, { marginBottom: 2, children: [
|
|
1360
1360
|
"Select the default organisation that you want to use with the ",
|
|
1361
1361
|
s,
|
|
1362
1362
|
"."
|
|
@@ -1368,18 +1368,18 @@ const Qe = L(
|
|
|
1368
1368
|
multiple: !1,
|
|
1369
1369
|
disableClearable: !1,
|
|
1370
1370
|
value: p !== "" ? p : null,
|
|
1371
|
-
onChange: (
|
|
1371
|
+
onChange: (g, T) => u(T != null ? T : ""),
|
|
1372
1372
|
getOptionLabel: qn,
|
|
1373
1373
|
options: [...r],
|
|
1374
|
-
renderInput: (
|
|
1374
|
+
renderInput: (g) => /* @__PURE__ */ o(
|
|
1375
1375
|
Se,
|
|
1376
|
-
A(i({},
|
|
1376
|
+
A(i({}, g), {
|
|
1377
1377
|
variant: "filled",
|
|
1378
1378
|
label: "Select organisation",
|
|
1379
|
-
InputProps: A(i({},
|
|
1380
|
-
endAdornment: /* @__PURE__ */ f(
|
|
1379
|
+
InputProps: A(i({}, g.InputProps), {
|
|
1380
|
+
endAdornment: /* @__PURE__ */ f(P, { children: [
|
|
1381
1381
|
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1382
|
-
|
|
1382
|
+
g.InputProps.endAdornment
|
|
1383
1383
|
] })
|
|
1384
1384
|
})
|
|
1385
1385
|
})
|
|
@@ -1390,7 +1390,7 @@ const Qe = L(
|
|
|
1390
1390
|
]
|
|
1391
1391
|
}
|
|
1392
1392
|
);
|
|
1393
|
-
},
|
|
1393
|
+
}, ko = tt({
|
|
1394
1394
|
palette: {
|
|
1395
1395
|
primary: {
|
|
1396
1396
|
dark: "#00A651",
|
|
@@ -1441,7 +1441,7 @@ const Qe = L(
|
|
|
1441
1441
|
navBar: {
|
|
1442
1442
|
backgroundColor: "#E8E8E8"
|
|
1443
1443
|
}
|
|
1444
|
-
}),
|
|
1444
|
+
}), Io = tt({
|
|
1445
1445
|
palette: {
|
|
1446
1446
|
primary: {
|
|
1447
1447
|
main: "#007236",
|
|
@@ -1540,10 +1540,10 @@ const Qe = L(
|
|
|
1540
1540
|
titleText: we,
|
|
1541
1541
|
topBarHeight: mt,
|
|
1542
1542
|
navBarTop: Ct
|
|
1543
|
-
},
|
|
1543
|
+
}, Eo = se(() => ({ children: e }) => /* @__PURE__ */ o(at, { children: e })), jn = ({
|
|
1544
1544
|
initialValues: e,
|
|
1545
1545
|
children: t
|
|
1546
|
-
}) => (st(e), /* @__PURE__ */ o(
|
|
1546
|
+
}) => (st(e), /* @__PURE__ */ o(P, { children: t })), To = se(
|
|
1547
1547
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1548
1548
|
jn,
|
|
1549
1549
|
{
|
|
@@ -1562,8 +1562,8 @@ export {
|
|
|
1562
1562
|
So as AppLayout,
|
|
1563
1563
|
Oo as AtomProvider,
|
|
1564
1564
|
xt as Context,
|
|
1565
|
-
|
|
1566
|
-
|
|
1565
|
+
$e as ContextError,
|
|
1566
|
+
$o as DomainCodeDialog,
|
|
1567
1567
|
fo as ExampleComponent,
|
|
1568
1568
|
wo as FetchAutocomplete,
|
|
1569
1569
|
jn as HydrateAtoms,
|
|
@@ -1579,8 +1579,8 @@ export {
|
|
|
1579
1579
|
Un as atomStore,
|
|
1580
1580
|
dn as buildNavBarState,
|
|
1581
1581
|
bt as domainCodeAtom,
|
|
1582
|
-
|
|
1583
|
-
|
|
1582
|
+
ko as fed21Theme,
|
|
1583
|
+
Io as internalAgSystemsTheme,
|
|
1584
1584
|
V as navBarClasses,
|
|
1585
1585
|
K as navBarOpenAtom,
|
|
1586
1586
|
Ct as navBarTopAtom,
|
|
@@ -1590,9 +1590,9 @@ export {
|
|
|
1590
1590
|
mt as topBarHeightAtom,
|
|
1591
1591
|
cn as useNavBar,
|
|
1592
1592
|
Gn as useSaladBar,
|
|
1593
|
-
|
|
1593
|
+
Eo as withAtomProvider,
|
|
1594
1594
|
mo as withNavBarProvider,
|
|
1595
|
-
|
|
1595
|
+
To as withOverrideDefaults,
|
|
1596
1596
|
Do as withSaladBarProvider
|
|
1597
1597
|
};
|
|
1598
1598
|
//# sourceMappingURL=index.js.map
|