@australiangreens/ag-internal-components 0.0.64 → 0.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts +2 -1
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +10 -2
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +166 -164
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
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
|
-
},
|
|
12
|
+
}, S = (e, t) => kt(e, It(t));
|
|
13
13
|
var Fe = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var r in e)
|
|
@@ -19,7 +19,7 @@ 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 {
|
|
@@ -36,11 +36,11 @@ var z = (e, t, n) => new Promise((r, s) => {
|
|
|
36
36
|
}, g = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(c, d);
|
|
37
37
|
g((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,18 +132,18 @@ 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
|
-
s((p) =>
|
|
146
|
+
s((p) => S(i({}, p), { open: !p.open }));
|
|
147
147
|
}, []), g = i(i({
|
|
148
148
|
open: r,
|
|
149
149
|
setOpen: c,
|
|
@@ -153,13 +153,13 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
|
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": {
|
|
@@ -262,19 +262,21 @@ const pn = ({
|
|
|
262
262
|
maxWidth: r,
|
|
263
263
|
primaryButton: s,
|
|
264
264
|
secondaryButton: c,
|
|
265
|
-
onClose: d
|
|
265
|
+
onClose: d,
|
|
266
|
+
"data-testid": g
|
|
266
267
|
}) => {
|
|
267
|
-
var
|
|
268
|
-
const [
|
|
268
|
+
var w, b;
|
|
269
|
+
const [p, u] = $(!1);
|
|
269
270
|
return /* @__PURE__ */ f(
|
|
270
271
|
Vt,
|
|
271
272
|
{
|
|
272
273
|
open: e,
|
|
273
274
|
onClose: () => {
|
|
274
|
-
|
|
275
|
+
p || d();
|
|
275
276
|
},
|
|
276
277
|
fullWidth: !0,
|
|
277
278
|
maxWidth: r != null ? r : "xs",
|
|
279
|
+
"data-testid": g,
|
|
278
280
|
children: [
|
|
279
281
|
/* @__PURE__ */ o(jt, { children: t }),
|
|
280
282
|
/* @__PURE__ */ o(Xt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
@@ -282,22 +284,22 @@ const pn = ({
|
|
|
282
284
|
/* @__PURE__ */ o(
|
|
283
285
|
_e,
|
|
284
286
|
{
|
|
285
|
-
onClick: (
|
|
287
|
+
onClick: (w = c == null ? void 0 : c.onClick) != null ? w : d,
|
|
286
288
|
"data-testid": c == null ? void 0 : c.testId,
|
|
287
|
-
disabled: (c == null ? void 0 : c.disabled) ||
|
|
289
|
+
disabled: (c == null ? void 0 : c.disabled) || p,
|
|
288
290
|
color: c == null ? void 0 : c.buttonColor,
|
|
289
|
-
children: (
|
|
291
|
+
children: (b = c == null ? void 0 : c.text) != null ? b : "Cancel"
|
|
290
292
|
}
|
|
291
293
|
),
|
|
292
294
|
s && /* @__PURE__ */ o(
|
|
293
295
|
_e,
|
|
294
296
|
{
|
|
295
297
|
onClick: () => z(void 0, null, function* () {
|
|
296
|
-
var
|
|
297
|
-
|
|
298
|
+
var A;
|
|
299
|
+
u(!0), yield (A = s.onClick) == null ? void 0 : A.call(s), u(!1);
|
|
298
300
|
}),
|
|
299
301
|
"data-testid": s.testId,
|
|
300
|
-
disabled: s.disabled ||
|
|
302
|
+
disabled: s.disabled || p,
|
|
301
303
|
color: s == null ? void 0 : s.buttonColor,
|
|
302
304
|
children: s.text
|
|
303
305
|
}
|
|
@@ -321,13 +323,13 @@ function wo({
|
|
|
321
323
|
textFieldVariant: u = "filled",
|
|
322
324
|
loadingText: w = "Loading...",
|
|
323
325
|
noOptionsText: b = "No options",
|
|
324
|
-
popupIcon:
|
|
326
|
+
popupIcon: A = /* @__PURE__ */ o(Kt, {}),
|
|
325
327
|
error: v = !1,
|
|
326
328
|
helperText: O = "",
|
|
327
329
|
preLoadedOptions: C = void 0,
|
|
328
330
|
disablePortal: m = !1
|
|
329
331
|
}) {
|
|
330
|
-
const [h,
|
|
332
|
+
const [h, T] = $(""), [M, y] = $(C || []), [B, k] = $(!1), [_, F] = $(!1), H = (a, l) => {
|
|
331
333
|
const x = c.filter((q) => q.id !== l);
|
|
332
334
|
n(x, "delete", a);
|
|
333
335
|
};
|
|
@@ -337,7 +339,7 @@ function wo({
|
|
|
337
339
|
a = new AbortController();
|
|
338
340
|
try {
|
|
339
341
|
const x = yield e(h, a.signal);
|
|
340
|
-
y(x != null ? x : []),
|
|
342
|
+
y(x != null ? x : []), F(!1);
|
|
341
343
|
} catch (x) {
|
|
342
344
|
if (x instanceof Error && x.name === "AbortError")
|
|
343
345
|
console.debug("Previous lookup request was cancelled");
|
|
@@ -346,13 +348,13 @@ function wo({
|
|
|
346
348
|
}
|
|
347
349
|
});
|
|
348
350
|
if (h !== "")
|
|
349
|
-
return (!r || h.length >= r) && !C ? (
|
|
351
|
+
return (!r || h.length >= r) && !C ? (F(!0), l()) : F(!1), function() {
|
|
350
352
|
a && a.abort();
|
|
351
353
|
};
|
|
352
354
|
}, [h, e, r, C]), re(() => {
|
|
353
355
|
!B && !C && y([]), !B && C && y(C);
|
|
354
356
|
}, [B, C]);
|
|
355
|
-
const R =
|
|
357
|
+
const R = Et(() => C ? (a, l) => a.filter(
|
|
356
358
|
(x) => x.label.toLowerCase().includes(l.inputValue.toLowerCase())
|
|
357
359
|
) : (a) => a, [C]);
|
|
358
360
|
return /* @__PURE__ */ f("div", { "data-testid": d, children: [
|
|
@@ -370,30 +372,30 @@ function wo({
|
|
|
370
372
|
filterSelectedOptions: !0,
|
|
371
373
|
includeInputInList: !0,
|
|
372
374
|
value: c,
|
|
373
|
-
onOpen: () =>
|
|
374
|
-
onClose: () =>
|
|
375
|
+
onOpen: () => k(!0),
|
|
376
|
+
onClose: () => k(!1),
|
|
375
377
|
onChange: (a, l, x) => {
|
|
376
378
|
n(l, x, a);
|
|
377
379
|
},
|
|
378
|
-
onInputChange: (a, l) =>
|
|
380
|
+
onInputChange: (a, l) => T(l),
|
|
379
381
|
noOptionsText: b,
|
|
380
382
|
loadingText: w,
|
|
381
|
-
popupIcon:
|
|
383
|
+
popupIcon: A,
|
|
382
384
|
renderInput: (a) => /* @__PURE__ */ o(
|
|
383
385
|
Se,
|
|
384
|
-
|
|
386
|
+
S(i({}, a), {
|
|
385
387
|
label: s,
|
|
386
388
|
fullWidth: !0,
|
|
387
389
|
variant: u,
|
|
388
390
|
error: v,
|
|
389
391
|
helperText: O,
|
|
390
|
-
InputProps:
|
|
391
|
-
endAdornment: /* @__PURE__ */ f(
|
|
392
|
+
InputProps: S(i({}, a.InputProps), {
|
|
393
|
+
endAdornment: /* @__PURE__ */ f(P, { children: [
|
|
392
394
|
_ ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
|
|
393
395
|
a.InputProps.endAdornment
|
|
394
396
|
] })
|
|
395
397
|
}),
|
|
396
|
-
"data-testid": d ? `${d}:TextField` : void 0,
|
|
398
|
+
"data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
|
|
397
399
|
onKeyDown: (l) => {
|
|
398
400
|
(l.key === "Backspace" || l.key === "Delete") && l.stopPropagation();
|
|
399
401
|
},
|
|
@@ -410,9 +412,9 @@ function wo({
|
|
|
410
412
|
}), le = Yt(l.label, q);
|
|
411
413
|
return /* @__PURE__ */ xe(
|
|
412
414
|
"li",
|
|
413
|
-
|
|
415
|
+
S(i({}, a), {
|
|
414
416
|
key: l.id,
|
|
415
|
-
"data-testid": d ? `${d}:Autocomplete:
|
|
417
|
+
"data-testid": d ? `${d}:Autocomplete:option(${l.id.toString()})` : void 0
|
|
416
418
|
}),
|
|
417
419
|
/* @__PURE__ */ o("div", { children: le.map((J, ce) => /* @__PURE__ */ o(
|
|
418
420
|
"span",
|
|
@@ -428,9 +430,9 @@ function wo({
|
|
|
428
430
|
} else
|
|
429
431
|
return /* @__PURE__ */ xe(
|
|
430
432
|
"li",
|
|
431
|
-
|
|
433
|
+
S(i({}, a), {
|
|
432
434
|
key: l.id,
|
|
433
|
-
"data-testid": d ? `${d}:
|
|
435
|
+
"data-testid": d ? `${d}:option(${l.id.toString()})` : void 0
|
|
434
436
|
}),
|
|
435
437
|
l.label
|
|
436
438
|
);
|
|
@@ -460,7 +462,7 @@ function wo({
|
|
|
460
462
|
}
|
|
461
463
|
]
|
|
462
464
|
},
|
|
463
|
-
children: /* @__PURE__ */ o(
|
|
465
|
+
children: /* @__PURE__ */ o(E, { style: { whiteSpace: "normal" }, children: a.chipLabel ? a.chipLabel : a.label })
|
|
464
466
|
}
|
|
465
467
|
),
|
|
466
468
|
"data-testid": d ? `${d}:Chip(${a.id.toString()})` : void 0,
|
|
@@ -484,11 +486,11 @@ const bo = ({
|
|
|
484
486
|
sx: s,
|
|
485
487
|
textFieldColor: c,
|
|
486
488
|
textFieldVariant: d = "filled",
|
|
487
|
-
|
|
489
|
+
"data-testid": g,
|
|
488
490
|
minLength: p = 3,
|
|
489
491
|
disablePortal: u = !1
|
|
490
492
|
}) => {
|
|
491
|
-
const [w, b] =
|
|
493
|
+
const [w, b] = $([]), [A, v] = $(!1);
|
|
492
494
|
let O;
|
|
493
495
|
const C = (m) => z(void 0, null, function* () {
|
|
494
496
|
O = new AbortController();
|
|
@@ -502,12 +504,12 @@ const bo = ({
|
|
|
502
504
|
throw h;
|
|
503
505
|
}
|
|
504
506
|
});
|
|
505
|
-
return /* @__PURE__ */ o(
|
|
507
|
+
return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(Ft, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
506
508
|
Ae,
|
|
507
509
|
{
|
|
508
510
|
sx: s,
|
|
509
|
-
"data-testid": g ? g
|
|
510
|
-
loading:
|
|
511
|
+
"data-testid": g ? `${g}:Autocomplete` : void 0,
|
|
512
|
+
loading: A,
|
|
511
513
|
options: w,
|
|
512
514
|
onChange: (m, h) => {
|
|
513
515
|
t(m, h);
|
|
@@ -518,8 +520,8 @@ const bo = ({
|
|
|
518
520
|
getOptionLabel: (m) => m.label,
|
|
519
521
|
renderInput: (m) => /* @__PURE__ */ o(
|
|
520
522
|
Se,
|
|
521
|
-
|
|
522
|
-
"data-testid": g ? g
|
|
523
|
+
S(i({
|
|
524
|
+
"data-testid": g ? `${g}:Autocomplete:TextField` : void 0
|
|
523
525
|
}, m), {
|
|
524
526
|
variant: d,
|
|
525
527
|
label: n,
|
|
@@ -532,15 +534,15 @@ const bo = ({
|
|
|
532
534
|
},
|
|
533
535
|
renderOption: (m, h) => /* @__PURE__ */ xe(
|
|
534
536
|
"li",
|
|
535
|
-
|
|
537
|
+
S(i({}, m), {
|
|
536
538
|
key: h.id,
|
|
537
|
-
"data-testid": g ? g
|
|
539
|
+
"data-testid": g ? `${g}:Autocomplete:option(${h.id.toString()})` : void 0
|
|
538
540
|
}),
|
|
539
541
|
h.label
|
|
540
542
|
)
|
|
541
543
|
}
|
|
542
544
|
) }) });
|
|
543
|
-
}, un = 24, hn = 64, U = "TopBar",
|
|
545
|
+
}, un = 24, hn = 64, U = "TopBar", I = {
|
|
544
546
|
topStripe: `${U}-topStripe`,
|
|
545
547
|
titleBar: `${U}-titleBar`,
|
|
546
548
|
titleSlider: `${U}-titleSlider`,
|
|
@@ -554,18 +556,18 @@ const bo = ({
|
|
|
554
556
|
var r, s;
|
|
555
557
|
return {
|
|
556
558
|
width: "100%",
|
|
557
|
-
[`& .${
|
|
559
|
+
[`& .${I.topStripe}`]: {
|
|
558
560
|
width: "100%",
|
|
559
561
|
height: `${un}px`,
|
|
560
562
|
backgroundColor: e.palette.primary.main
|
|
561
563
|
},
|
|
562
|
-
[`& .${
|
|
564
|
+
[`& .${I.titleBar}`]: {
|
|
563
565
|
backgroundColor: e.palette.primary.light,
|
|
564
566
|
height: `${hn}px`,
|
|
565
567
|
padding: e.spacing(0, 3),
|
|
566
568
|
width: "100%"
|
|
567
569
|
},
|
|
568
|
-
[`& .${
|
|
570
|
+
[`& .${I.titleSlider}`]: i(i({
|
|
569
571
|
height: "100%",
|
|
570
572
|
display: "flex",
|
|
571
573
|
alignItems: "center",
|
|
@@ -574,14 +576,14 @@ const bo = ({
|
|
|
574
576
|
easing: e.transitions.easing.sharp,
|
|
575
577
|
duration: e.transitions.duration.leavingScreen
|
|
576
578
|
}),
|
|
577
|
-
[`& .${
|
|
579
|
+
[`& .${I.leftPanelButton}`]: {
|
|
578
580
|
marginRight: e.spacing(2),
|
|
579
581
|
flexGrow: 0
|
|
580
582
|
},
|
|
581
|
-
[`& .${
|
|
583
|
+
[`& .${I.titleText}`]: {
|
|
582
584
|
flexGrow: 1
|
|
583
585
|
},
|
|
584
|
-
[`& .${
|
|
586
|
+
[`& .${I.rightPanelButton}`]: {
|
|
585
587
|
flexGrow: 0
|
|
586
588
|
}
|
|
587
589
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -606,12 +608,12 @@ function fn({
|
|
|
606
608
|
"data-testid": r
|
|
607
609
|
}) {
|
|
608
610
|
return /* @__PURE__ */ f(gn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
|
|
609
|
-
/* @__PURE__ */ o("div", { className:
|
|
610
|
-
/* @__PURE__ */ o("div", { className:
|
|
611
|
+
/* @__PURE__ */ o("div", { className: I.topStripe }),
|
|
612
|
+
/* @__PURE__ */ o("div", { className: I.titleBar, children: /* @__PURE__ */ f(D, { className: I.titleSlider, children: [
|
|
611
613
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ f(
|
|
612
614
|
Q,
|
|
613
615
|
{
|
|
614
|
-
className:
|
|
616
|
+
className: I.leftPanelButton,
|
|
615
617
|
color: "inherit",
|
|
616
618
|
"aria-label": "Open left side panel",
|
|
617
619
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -623,11 +625,11 @@ function fn({
|
|
|
623
625
|
]
|
|
624
626
|
}
|
|
625
627
|
),
|
|
626
|
-
/* @__PURE__ */ o(
|
|
628
|
+
/* @__PURE__ */ o(E, { className: I.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
627
629
|
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ f(
|
|
628
630
|
Q,
|
|
629
631
|
{
|
|
630
|
-
className:
|
|
632
|
+
className: I.rightPanelButton,
|
|
631
633
|
color: "inherit",
|
|
632
634
|
"aria-label": "Open right side panel",
|
|
633
635
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -674,7 +676,7 @@ const ut = 400, mn = Oe(be, {
|
|
|
674
676
|
})
|
|
675
677
|
), Cn = Oe(D, {
|
|
676
678
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
677
|
-
})(({ theme: e, anchor: t }) =>
|
|
679
|
+
})(({ theme: e, anchor: t }) => S(i({
|
|
678
680
|
display: "flex",
|
|
679
681
|
alignItems: "center",
|
|
680
682
|
padding: e.spacing(2)
|
|
@@ -706,7 +708,7 @@ function ze({
|
|
|
706
708
|
onOpened: u,
|
|
707
709
|
onClosed: w,
|
|
708
710
|
"data-testid": b,
|
|
709
|
-
navBarOpen:
|
|
711
|
+
navBarOpen: A = !1,
|
|
710
712
|
navBarWidthOpen: v = 0,
|
|
711
713
|
navBarWidthClosed: O = 0
|
|
712
714
|
}) {
|
|
@@ -723,29 +725,29 @@ function ze({
|
|
|
723
725
|
width: c,
|
|
724
726
|
debugOpacity: g,
|
|
725
727
|
"data-testid": b,
|
|
726
|
-
navBarOpen:
|
|
728
|
+
navBarOpen: A,
|
|
727
729
|
navBarWidthOpen: v,
|
|
728
730
|
navBarWidthClosed: O,
|
|
729
731
|
children: [
|
|
730
|
-
/* @__PURE__ */ o(Cn,
|
|
731
|
-
/* @__PURE__ */ o(
|
|
732
|
+
/* @__PURE__ */ o(Cn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(P, { children: [
|
|
733
|
+
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s }),
|
|
732
734
|
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
|
|
733
735
|
/* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
|
|
734
736
|
" "
|
|
735
737
|
] })
|
|
736
|
-
] }) : /* @__PURE__ */ f(
|
|
738
|
+
] }) : /* @__PURE__ */ f(P, { children: [
|
|
737
739
|
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
|
|
738
740
|
/* @__PURE__ */ o(ot, {}),
|
|
739
741
|
" "
|
|
740
742
|
] }),
|
|
741
|
-
/* @__PURE__ */ o(
|
|
743
|
+
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s })
|
|
742
744
|
] }) })),
|
|
743
745
|
e
|
|
744
746
|
]
|
|
745
747
|
}
|
|
746
748
|
);
|
|
747
749
|
}
|
|
748
|
-
const vn =
|
|
750
|
+
const vn = N(D, {
|
|
749
751
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
750
752
|
name: "PanelAwareMargins"
|
|
751
753
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -768,7 +770,7 @@ const vn = P(D, {
|
|
|
768
770
|
}),
|
|
769
771
|
marginRight: `${(s = n == null ? void 0 : n.width) != null ? s : 0}px`
|
|
770
772
|
});
|
|
771
|
-
}), xn =
|
|
773
|
+
}), xn = N(et, {
|
|
772
774
|
name: "PageContainer"
|
|
773
775
|
})(({ theme: e }) => ({
|
|
774
776
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -783,7 +785,7 @@ const vn = P(D, {
|
|
|
783
785
|
startOpen: !1,
|
|
784
786
|
open: void 0,
|
|
785
787
|
onChangeOpen: void 0,
|
|
786
|
-
content: /* @__PURE__ */ o(
|
|
788
|
+
content: /* @__PURE__ */ o(P, {}),
|
|
787
789
|
onOpened: void 0,
|
|
788
790
|
onClosed: void 0,
|
|
789
791
|
dataTestId: void 0
|
|
@@ -802,10 +804,10 @@ function Ao({
|
|
|
802
804
|
navBarWidthOpen: w,
|
|
803
805
|
navBarWidthClosed: b
|
|
804
806
|
}) {
|
|
805
|
-
const [
|
|
806
|
-
titleText:
|
|
807
|
+
const [A, v] = $(Ce), [O, C] = $(ve), [m, h] = $(Ce), [T, M] = $(ve), y = n !== void 0, B = r !== void 0, {
|
|
808
|
+
titleText: k,
|
|
807
809
|
content: _,
|
|
808
|
-
flavour:
|
|
810
|
+
flavour: F,
|
|
809
811
|
open: H,
|
|
810
812
|
onChangeOpen: R,
|
|
811
813
|
width: a,
|
|
@@ -817,9 +819,9 @@ function Ao({
|
|
|
817
819
|
} = n ? i(i({}, te), n) : i({}, te), {
|
|
818
820
|
titleText: ce,
|
|
819
821
|
content: At,
|
|
820
|
-
flavour:
|
|
822
|
+
flavour: ke,
|
|
821
823
|
open: de,
|
|
822
|
-
onChangeOpen:
|
|
824
|
+
onChangeOpen: Ie,
|
|
823
825
|
width: pe,
|
|
824
826
|
arrowButtons: Y,
|
|
825
827
|
startOpen: Z,
|
|
@@ -832,10 +834,10 @@ function Ao({
|
|
|
832
834
|
}, [x]), re(() => {
|
|
833
835
|
Z !== ve && (C(Z), M(Z));
|
|
834
836
|
}, [Z]);
|
|
835
|
-
const ue = H === void 0 ?
|
|
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), h(
|
|
837
|
+
const ue = H === void 0 ? A : H, he = de === void 0 ? O : de, Ee = (W) => {
|
|
838
|
+
H === void 0 && (v(W), s && B && (W ? (C(!1), M(O)) : C(T))), R && R(W);
|
|
839
|
+
}, Te = (W) => {
|
|
840
|
+
de === void 0 && (C(W), s && y && (W ? (v(!1), h(A)) : v(m))), Ie && Ie(W);
|
|
839
841
|
};
|
|
840
842
|
return /* @__PURE__ */ f(D, { children: [
|
|
841
843
|
y && /* @__PURE__ */ o(
|
|
@@ -844,9 +846,9 @@ function Ao({
|
|
|
844
846
|
"data-testid": J,
|
|
845
847
|
anchor: "left",
|
|
846
848
|
open: ue,
|
|
847
|
-
onClose: () =>
|
|
849
|
+
onClose: () => Ee(!1),
|
|
848
850
|
width: a,
|
|
849
|
-
titleText:
|
|
851
|
+
titleText: k,
|
|
850
852
|
debugOpacity: c,
|
|
851
853
|
showCloseArrow: l === "both" || l === "close",
|
|
852
854
|
onOpened: q,
|
|
@@ -863,7 +865,7 @@ function Ao({
|
|
|
863
865
|
"data-testid": Ot,
|
|
864
866
|
anchor: "right",
|
|
865
867
|
open: he,
|
|
866
|
-
onClose: () =>
|
|
868
|
+
onClose: () => Te(!1),
|
|
867
869
|
width: pe,
|
|
868
870
|
titleText: ce,
|
|
869
871
|
debugOpacity: c,
|
|
@@ -881,43 +883,43 @@ function Ao({
|
|
|
881
883
|
i(i({
|
|
882
884
|
titleText: t,
|
|
883
885
|
"data-testid": p
|
|
884
|
-
}, y &&
|
|
886
|
+
}, y && F === "push" ? {
|
|
885
887
|
leftPanel: {
|
|
886
888
|
open: ue,
|
|
887
889
|
width: a,
|
|
888
|
-
onOpen: () =>
|
|
890
|
+
onOpen: () => Ee(!0),
|
|
889
891
|
showOpenArrow: l === "both" || l === "open"
|
|
890
892
|
}
|
|
891
|
-
} : {}), B &&
|
|
893
|
+
} : {}), B && ke === "push" ? {
|
|
892
894
|
rightPanel: {
|
|
893
895
|
open: he,
|
|
894
896
|
width: pe,
|
|
895
|
-
onOpen: () =>
|
|
897
|
+
onOpen: () => Te(!0),
|
|
896
898
|
showOpenArrow: Y === "both" || Y === "open"
|
|
897
899
|
}
|
|
898
900
|
} : {})
|
|
899
901
|
),
|
|
900
902
|
/* @__PURE__ */ o(
|
|
901
903
|
vn,
|
|
902
|
-
|
|
904
|
+
S(i(i({}, F === "push" ? {
|
|
903
905
|
leftPanel: {
|
|
904
906
|
open: ue,
|
|
905
907
|
width: a
|
|
906
908
|
}
|
|
907
|
-
} : {}),
|
|
909
|
+
} : {}), ke === "push" ? {
|
|
908
910
|
rightPanel: {
|
|
909
911
|
open: he,
|
|
910
912
|
width: pe
|
|
911
913
|
}
|
|
912
914
|
} : {}), {
|
|
913
|
-
children: /* @__PURE__ */ o(xn,
|
|
915
|
+
children: /* @__PURE__ */ o(xn, S(i({ "data-testid": g }, d), { children: e }))
|
|
914
916
|
})
|
|
915
917
|
)
|
|
916
918
|
] });
|
|
917
919
|
}
|
|
918
920
|
const ht = () => {
|
|
919
921
|
const e = ae();
|
|
920
|
-
return
|
|
922
|
+
return Pt(e.breakpoints.down("sm"));
|
|
921
923
|
}, 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
924
|
function Sn({ links: e }) {
|
|
923
925
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
@@ -930,7 +932,7 @@ const ne = "Navbar", j = {
|
|
|
930
932
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
931
933
|
// settings: `${PREFIX}-settings`,
|
|
932
934
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
933
|
-
}, Dn =
|
|
935
|
+
}, Dn = N(D, { name: "NavBar" })(({ theme: e }) => ({
|
|
934
936
|
[`&.${j.root}`]: {
|
|
935
937
|
display: "flex"
|
|
936
938
|
},
|
|
@@ -955,7 +957,7 @@ const ne = "Navbar", j = {
|
|
|
955
957
|
}), On = (e) => {
|
|
956
958
|
const t = ae();
|
|
957
959
|
return /* @__PURE__ */ o(
|
|
958
|
-
|
|
960
|
+
Nt,
|
|
959
961
|
i({
|
|
960
962
|
easing: t.transitions.easing.sharp,
|
|
961
963
|
timeout: {
|
|
@@ -978,7 +980,7 @@ const ne = "Navbar", j = {
|
|
|
978
980
|
}, vt(e)), Ue = (e, t) => i({
|
|
979
981
|
width: t,
|
|
980
982
|
transition: ie(e, "width", "leaving")
|
|
981
|
-
}, vt(e)),
|
|
983
|
+
}, vt(e)), $n = N(be, {
|
|
982
984
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
983
985
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: s }) => i(i({
|
|
984
986
|
flexShrink: 0,
|
|
@@ -986,14 +988,14 @@ const ne = "Navbar", j = {
|
|
|
986
988
|
boxSizing: "border-box",
|
|
987
989
|
display: "flex",
|
|
988
990
|
flexDirection: "column"
|
|
989
|
-
}, t &&
|
|
991
|
+
}, t && S(i({}, Ge(e, n)), {
|
|
990
992
|
backgroundColor: "",
|
|
991
993
|
"& .MuiDrawer-paper": Ge(e, n)
|
|
992
|
-
})), !t &&
|
|
994
|
+
})), !t && S(i({}, Ue(e, s ? n : r)), {
|
|
993
995
|
backgroundColor: "",
|
|
994
996
|
"& .MuiDrawer-paper": Ue(e, s ? n : r)
|
|
995
997
|
})));
|
|
996
|
-
function
|
|
998
|
+
function kn(e) {
|
|
997
999
|
let t = 0;
|
|
998
1000
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
999
1001
|
const s = e.charCodeAt(n);
|
|
@@ -1001,8 +1003,8 @@ function In(e) {
|
|
|
1001
1003
|
}
|
|
1002
1004
|
return t;
|
|
1003
1005
|
}
|
|
1004
|
-
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"],
|
|
1005
|
-
function
|
|
1006
|
+
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();
|
|
1007
|
+
function En({ user: e, domainCode: t, open: n }) {
|
|
1006
1008
|
const r = ae();
|
|
1007
1009
|
return /* @__PURE__ */ f(
|
|
1008
1010
|
D,
|
|
@@ -1024,28 +1026,28 @@ function Tn({ user: e, domainCode: t, open: n }) {
|
|
|
1024
1026
|
aspectRatio: 1
|
|
1025
1027
|
},
|
|
1026
1028
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1027
|
-
|
|
1029
|
+
Ne,
|
|
1028
1030
|
{
|
|
1029
1031
|
src: e == null ? void 0 : e.picture,
|
|
1030
1032
|
sx: {
|
|
1031
1033
|
width: "100%",
|
|
1032
1034
|
height: "100%",
|
|
1033
|
-
bgcolor: Ve[Math.abs(
|
|
1035
|
+
bgcolor: Ve[Math.abs(kn(e.name)) % Ve.length]
|
|
1034
1036
|
},
|
|
1035
|
-
children:
|
|
1037
|
+
children: In(e.name)
|
|
1036
1038
|
}
|
|
1037
|
-
) : /* @__PURE__ */ o(
|
|
1039
|
+
) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
|
|
1038
1040
|
}
|
|
1039
1041
|
),
|
|
1040
1042
|
/* @__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(
|
|
1043
|
+
e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(Le, { animation: !1, width: "50%" }),
|
|
1044
|
+
t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Le, { animation: !1, width: "25%" })
|
|
1043
1045
|
] }) }) })
|
|
1044
1046
|
]
|
|
1045
1047
|
}
|
|
1046
1048
|
);
|
|
1047
1049
|
}
|
|
1048
|
-
function
|
|
1050
|
+
function Tn({
|
|
1049
1051
|
open: e,
|
|
1050
1052
|
widthClosed: t,
|
|
1051
1053
|
widthOpen: n,
|
|
@@ -1058,7 +1060,7 @@ function En({
|
|
|
1058
1060
|
}) {
|
|
1059
1061
|
const u = ht(), w = it(K);
|
|
1060
1062
|
return /* @__PURE__ */ o(Dn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
|
|
1061
|
-
|
|
1063
|
+
$n,
|
|
1062
1064
|
{
|
|
1063
1065
|
open: e,
|
|
1064
1066
|
widthOpen: n,
|
|
@@ -1081,8 +1083,8 @@ function En({
|
|
|
1081
1083
|
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(c) ? /* @__PURE__ */ o(Sn, { links: c }) : c }),
|
|
1082
1084
|
/* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1083
1085
|
/* @__PURE__ */ o(Me, { variant: "middle" }),
|
|
1084
|
-
/* @__PURE__ */ o(
|
|
1085
|
-
d && /* @__PURE__ */ o(
|
|
1086
|
+
/* @__PURE__ */ o(En, { user: g, domainCode: p, open: e }),
|
|
1087
|
+
d && /* @__PURE__ */ o(P, { children: d })
|
|
1086
1088
|
] })
|
|
1087
1089
|
]
|
|
1088
1090
|
}
|
|
@@ -1119,7 +1121,7 @@ function yn({
|
|
|
1119
1121
|
const Bn = "TopBar", Fn = {
|
|
1120
1122
|
titleText: `${Bn}-titleText`
|
|
1121
1123
|
};
|
|
1122
|
-
function
|
|
1124
|
+
function Pn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
1123
1125
|
const r = it(K), s = () => r((g) => !g), c = ae(), d = ht();
|
|
1124
1126
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
|
|
1125
1127
|
Ze,
|
|
@@ -1140,7 +1142,7 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
1140
1142
|
},
|
|
1141
1143
|
children: [
|
|
1142
1144
|
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Jt, { fontSize: "medium" }) }),
|
|
1143
|
-
/* @__PURE__ */ o(
|
|
1145
|
+
/* @__PURE__ */ o(E, { className: Fn.titleText, variant: "h6", children: e })
|
|
1144
1146
|
]
|
|
1145
1147
|
}
|
|
1146
1148
|
) });
|
|
@@ -1162,13 +1164,13 @@ function So({
|
|
|
1162
1164
|
[K, n != null ? n : !0],
|
|
1163
1165
|
[we, t != null ? t : ""]
|
|
1164
1166
|
]);
|
|
1165
|
-
const b = He(K), [
|
|
1167
|
+
const b = He(K), [A] = X(gt), [v] = X(ft), O = He(we), [C] = X(mt), [m] = X(Ct);
|
|
1166
1168
|
return /* @__PURE__ */ f(D, { children: [
|
|
1167
1169
|
/* @__PURE__ */ o(_t, {}),
|
|
1168
|
-
/* @__PURE__ */ o(
|
|
1170
|
+
/* @__PURE__ */ o(Pn, { titleText: O, "data-testid": c, height: C }),
|
|
1169
1171
|
/* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
|
|
1170
1172
|
/* @__PURE__ */ o(
|
|
1171
|
-
|
|
1173
|
+
Tn,
|
|
1172
1174
|
{
|
|
1173
1175
|
open: b,
|
|
1174
1176
|
top: m,
|
|
@@ -1176,7 +1178,7 @@ function So({
|
|
|
1176
1178
|
bottom: p,
|
|
1177
1179
|
user: u,
|
|
1178
1180
|
domainCode: w,
|
|
1179
|
-
widthOpen:
|
|
1181
|
+
widthOpen: A,
|
|
1180
1182
|
widthClosed: v,
|
|
1181
1183
|
offsetTop: C,
|
|
1182
1184
|
"data-testid": d
|
|
@@ -1184,7 +1186,7 @@ function So({
|
|
|
1184
1186
|
),
|
|
1185
1187
|
/* @__PURE__ */ o(
|
|
1186
1188
|
yn,
|
|
1187
|
-
|
|
1189
|
+
S(i({
|
|
1188
1190
|
"data-testid": s,
|
|
1189
1191
|
topBarHeight: C
|
|
1190
1192
|
}, r), {
|
|
@@ -1194,7 +1196,7 @@ function So({
|
|
|
1194
1196
|
] })
|
|
1195
1197
|
] });
|
|
1196
1198
|
}
|
|
1197
|
-
const
|
|
1199
|
+
const Nn = {
|
|
1198
1200
|
autoHideDuration: 6e3,
|
|
1199
1201
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1200
1202
|
// The default is false. If we prefer timer to continue when window loses
|
|
@@ -1228,17 +1230,17 @@ function zn(c) {
|
|
|
1228
1230
|
"children"
|
|
1229
1231
|
]);
|
|
1230
1232
|
var R;
|
|
1231
|
-
const [{ open: g }, p] =
|
|
1233
|
+
const [{ open: g }, p] = $({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), A = oe((a) => {
|
|
1232
1234
|
p({ open: a });
|
|
1233
1235
|
}, []), v = oe((a = {}) => {
|
|
1234
1236
|
b.current += 1, u.current.length >= Xe && Date.now() - w.current >= je && (w.current = Date.now(), console.error(
|
|
1235
1237
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${b.current} times in last ${je}ms)`
|
|
1236
1238
|
), b.current = 0);
|
|
1237
|
-
const l = i(
|
|
1239
|
+
const l = i(S(i({}, qe), {
|
|
1238
1240
|
key: _n()
|
|
1239
1241
|
}), a);
|
|
1240
1242
|
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)), h = (a = "", l = {}) => v(i({ message: a, severity: "error" }, l)),
|
|
1243
|
+
}, []), 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)), h = (a = "", l = {}) => v(i({ message: a, severity: "error" }, l)), T = (a) => {
|
|
1242
1244
|
const l = u.current.findIndex((x) => x.key === a);
|
|
1243
1245
|
if (l !== -1)
|
|
1244
1246
|
return l === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(l, 1);
|
|
@@ -1247,23 +1249,23 @@ function zn(c) {
|
|
|
1247
1249
|
}, y = () => {
|
|
1248
1250
|
}, B = () => {
|
|
1249
1251
|
u.current.shift(), u.current.length > 0 && p({ open: !0 });
|
|
1250
|
-
},
|
|
1251
|
-
"autoHideDuration" in
|
|
1252
|
-
const
|
|
1252
|
+
}, k = (R = u.current[0]) != null ? R : i({}, qe), _ = {};
|
|
1253
|
+
"autoHideDuration" in k && (_.autoHideDuration = k.autoHideDuration);
|
|
1254
|
+
const F = i(i({}, Nn), s), H = i(i({
|
|
1253
1255
|
open: g,
|
|
1254
|
-
setOpen:
|
|
1256
|
+
setOpen: A,
|
|
1255
1257
|
enqueueNotification: v,
|
|
1256
1258
|
enqueueSuccessNotification: O,
|
|
1257
1259
|
enqueueInfoNotification: C,
|
|
1258
1260
|
enqueueWarningNotification: m,
|
|
1259
1261
|
enqueueErrorNotification: h,
|
|
1260
|
-
removeNotification:
|
|
1262
|
+
removeNotification: T
|
|
1261
1263
|
}, e), t);
|
|
1262
1264
|
return /* @__PURE__ */ f(xt.Provider, { value: H, children: [
|
|
1263
1265
|
r,
|
|
1264
1266
|
/* @__PURE__ */ o(
|
|
1265
1267
|
Ht,
|
|
1266
|
-
|
|
1268
|
+
S(i(i({}, F), _), {
|
|
1267
1269
|
open: g,
|
|
1268
1270
|
onClose: M,
|
|
1269
1271
|
TransitionProps: {
|
|
@@ -1276,14 +1278,14 @@ function zn(c) {
|
|
|
1276
1278
|
Rt,
|
|
1277
1279
|
{
|
|
1278
1280
|
onClose: (a) => M(a, "closeAlert"),
|
|
1279
|
-
severity:
|
|
1281
|
+
severity: k.severity,
|
|
1280
1282
|
variant: "filled",
|
|
1281
|
-
icon:
|
|
1282
|
-
style:
|
|
1283
|
-
children:
|
|
1283
|
+
icon: k.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
|
|
1284
|
+
style: k.progressIndicator === "linear" ? Hn : void 0,
|
|
1285
|
+
children: k.message
|
|
1284
1286
|
}
|
|
1285
1287
|
),
|
|
1286
|
-
|
|
1288
|
+
k.progressIndicator === "linear" && /* @__PURE__ */ o(Wt, { color: "primary" })
|
|
1287
1289
|
] })
|
|
1288
1290
|
})
|
|
1289
1291
|
)
|
|
@@ -1292,11 +1294,11 @@ function zn(c) {
|
|
|
1292
1294
|
function Gn() {
|
|
1293
1295
|
const e = Ye(xt);
|
|
1294
1296
|
if (e === null)
|
|
1295
|
-
throw new
|
|
1297
|
+
throw new $e("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1296
1298
|
return e;
|
|
1297
1299
|
}
|
|
1298
1300
|
const Do = se(
|
|
1299
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(zn,
|
|
1301
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(zn, S(i({}, e), { overrideState: t, overrideActions: n, children: r }))
|
|
1300
1302
|
), Un = en(), Oo = ({
|
|
1301
1303
|
children: e,
|
|
1302
1304
|
store: t
|
|
@@ -1324,7 +1326,7 @@ const Qe = L(
|
|
|
1324
1326
|
}, qn = (e) => {
|
|
1325
1327
|
var t;
|
|
1326
1328
|
return e === null ? "N/A" : (t = Vn[e]) != null ? t : "";
|
|
1327
|
-
},
|
|
1329
|
+
}, $o = ({
|
|
1328
1330
|
isLoading: e,
|
|
1329
1331
|
isOpen: t,
|
|
1330
1332
|
onClose: n,
|
|
@@ -1332,13 +1334,13 @@ const Qe = L(
|
|
|
1332
1334
|
applicationName: s,
|
|
1333
1335
|
handleLogout: c
|
|
1334
1336
|
}) => {
|
|
1335
|
-
const [d, g] = X(bt), [p, u] =
|
|
1337
|
+
const [d, g] = X(bt), [p, u] = $(d), { enqueueSuccessNotification: w } = Gn(), b = r.length === 0, A = !!d && !r.includes(d) && !r.includes(p), v = !d || b || A, O = () => z(void 0, null, function* () {
|
|
1336
1338
|
p ? (g(p), w(`Set domain to ${p}`), n()) : g("");
|
|
1337
1339
|
}), C = () => z(void 0, null, function* () {
|
|
1338
|
-
d && !b && !
|
|
1340
|
+
d && !b && !A ? (u(d), n()) : v && c();
|
|
1339
1341
|
});
|
|
1340
1342
|
let m;
|
|
1341
|
-
return b ? m = "Unable to retrieve your active organisations. Try logging in again." :
|
|
1343
|
+
return b ? m = "Unable to retrieve your active organisations. Try logging in again." : A && (m = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ f(
|
|
1342
1344
|
pn,
|
|
1343
1345
|
{
|
|
1344
1346
|
isOpen: t,
|
|
@@ -1346,7 +1348,7 @@ const Qe = L(
|
|
|
1346
1348
|
primaryButton: {
|
|
1347
1349
|
text: "Confirm",
|
|
1348
1350
|
onClick: O,
|
|
1349
|
-
disabled: !p || b ||
|
|
1351
|
+
disabled: !p || b || A,
|
|
1350
1352
|
buttonColor: "primary"
|
|
1351
1353
|
},
|
|
1352
1354
|
secondaryButton: {
|
|
@@ -1356,7 +1358,7 @@ const Qe = L(
|
|
|
1356
1358
|
onClose: v ? () => {
|
|
1357
1359
|
} : n,
|
|
1358
1360
|
children: [
|
|
1359
|
-
/* @__PURE__ */ f(
|
|
1361
|
+
/* @__PURE__ */ f(E, { marginBottom: 2, children: [
|
|
1360
1362
|
"Select the default organisation that you want to use with the ",
|
|
1361
1363
|
s,
|
|
1362
1364
|
"."
|
|
@@ -1368,16 +1370,16 @@ const Qe = L(
|
|
|
1368
1370
|
multiple: !1,
|
|
1369
1371
|
disableClearable: !1,
|
|
1370
1372
|
value: p !== "" ? p : null,
|
|
1371
|
-
onChange: (h,
|
|
1373
|
+
onChange: (h, T) => u(T != null ? T : ""),
|
|
1372
1374
|
getOptionLabel: qn,
|
|
1373
1375
|
options: [...r],
|
|
1374
1376
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
1375
1377
|
Se,
|
|
1376
|
-
|
|
1378
|
+
S(i({}, h), {
|
|
1377
1379
|
variant: "filled",
|
|
1378
1380
|
label: "Select organisation",
|
|
1379
|
-
InputProps:
|
|
1380
|
-
endAdornment: /* @__PURE__ */ f(
|
|
1381
|
+
InputProps: S(i({}, h.InputProps), {
|
|
1382
|
+
endAdornment: /* @__PURE__ */ f(P, { children: [
|
|
1381
1383
|
e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1382
1384
|
h.InputProps.endAdornment
|
|
1383
1385
|
] })
|
|
@@ -1390,7 +1392,7 @@ const Qe = L(
|
|
|
1390
1392
|
]
|
|
1391
1393
|
}
|
|
1392
1394
|
);
|
|
1393
|
-
},
|
|
1395
|
+
}, ko = tt({
|
|
1394
1396
|
palette: {
|
|
1395
1397
|
primary: {
|
|
1396
1398
|
dark: "#00A651",
|
|
@@ -1441,7 +1443,7 @@ const Qe = L(
|
|
|
1441
1443
|
navBar: {
|
|
1442
1444
|
backgroundColor: "#E8E8E8"
|
|
1443
1445
|
}
|
|
1444
|
-
}),
|
|
1446
|
+
}), Io = tt({
|
|
1445
1447
|
palette: {
|
|
1446
1448
|
primary: {
|
|
1447
1449
|
main: "#007236",
|
|
@@ -1540,10 +1542,10 @@ const Qe = L(
|
|
|
1540
1542
|
titleText: we,
|
|
1541
1543
|
topBarHeight: mt,
|
|
1542
1544
|
navBarTop: Ct
|
|
1543
|
-
},
|
|
1545
|
+
}, Eo = se(() => ({ children: e }) => /* @__PURE__ */ o(at, { children: e })), jn = ({
|
|
1544
1546
|
initialValues: e,
|
|
1545
1547
|
children: t
|
|
1546
|
-
}) => (st(e), /* @__PURE__ */ o(
|
|
1548
|
+
}) => (st(e), /* @__PURE__ */ o(P, { children: t })), To = se(
|
|
1547
1549
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1548
1550
|
jn,
|
|
1549
1551
|
{
|
|
@@ -1562,8 +1564,8 @@ export {
|
|
|
1562
1564
|
So as AppLayout,
|
|
1563
1565
|
Oo as AtomProvider,
|
|
1564
1566
|
xt as Context,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
+
$e as ContextError,
|
|
1568
|
+
$o as DomainCodeDialog,
|
|
1567
1569
|
fo as ExampleComponent,
|
|
1568
1570
|
wo as FetchAutocomplete,
|
|
1569
1571
|
jn as HydrateAtoms,
|
|
@@ -1579,8 +1581,8 @@ export {
|
|
|
1579
1581
|
Un as atomStore,
|
|
1580
1582
|
dn as buildNavBarState,
|
|
1581
1583
|
bt as domainCodeAtom,
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
+
ko as fed21Theme,
|
|
1585
|
+
Io as internalAgSystemsTheme,
|
|
1584
1586
|
V as navBarClasses,
|
|
1585
1587
|
K as navBarOpenAtom,
|
|
1586
1588
|
Ct as navBarTopAtom,
|
|
@@ -1590,9 +1592,9 @@ export {
|
|
|
1590
1592
|
mt as topBarHeightAtom,
|
|
1591
1593
|
cn as useNavBar,
|
|
1592
1594
|
Gn as useSaladBar,
|
|
1593
|
-
|
|
1595
|
+
Eo as withAtomProvider,
|
|
1594
1596
|
mo as withNavBarProvider,
|
|
1595
|
-
|
|
1597
|
+
To as withOverrideDefaults,
|
|
1596
1598
|
Do as withSaladBarProvider
|
|
1597
1599
|
};
|
|
1598
1600
|
//# sourceMappingURL=index.js.map
|