@australiangreens/ag-internal-components 0.0.67 → 0.0.69
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/.gitignore +0 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
- package/dist/esm/index.js +194 -199
- package/dist/esm/index.js.map +1 -1
- package/package.json +32 -28
package/dist/esm/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var Ot = Object.defineProperty, $t = Object.defineProperties;
|
|
2
2
|
var It = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var ee = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
4
|
+
var ye = Object.prototype.hasOwnProperty, Pe = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var ge = (e, t, n) => t in e ? Ot(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
|
+
Pe.call(t, n) && ge(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, S = (e, t) => $t(e, It(t));
|
|
13
|
-
var
|
|
13
|
+
var Ne = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var r in e)
|
|
16
|
-
|
|
16
|
+
ye.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
17
17
|
if (e != null && ee)
|
|
18
18
|
for (var r of ee(e))
|
|
19
|
-
t.indexOf(r) < 0 &&
|
|
19
|
+
t.indexOf(r) < 0 && Pe.call(e, r) && (n[r] = e[r]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var Be = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
23
|
var N = (e, t, n) => new Promise((r, s) => {
|
|
24
24
|
var l = (p) => {
|
|
25
25
|
try {
|
|
@@ -38,29 +38,24 @@ var N = (e, t, n) => new Promise((r, s) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as f, Fragment as B, jsx as o } from "react/jsx-runtime";
|
|
40
40
|
import { useState as O, 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
|
|
42
|
-
import
|
|
41
|
+
import { Typography as E, Button as we, Paper as Ze, Box as D, Drawer as Ae, Dialog as Tt, DialogTitle as Ft, DialogContent as yt, DialogActions as Pt, Autocomplete as Se, TextField as De, CircularProgress as ke, Chip as Nt, Tooltip as Bt, Stack as Lt, styled as Oe, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Mt, Collapse as _t, Avatar as Le, Fade as Ht, Skeleton as Me, Toolbar as Rt, Divider as _e, CssBaseline as Wt, Snackbar as zt, Alert as Gt, LinearProgress as Ut, FormHelperText as Vt } from "@mui/material";
|
|
42
|
+
import qt from "@mui/material/CssBaseline";
|
|
43
43
|
import { styled as L, createTheme as tt, alpha as me } from "@mui/material/styles";
|
|
44
|
-
import { AgError as
|
|
44
|
+
import { AgError as Xt } from "@australiangreens/ag-error";
|
|
45
45
|
import { createHelper as se } from "souvlaki";
|
|
46
46
|
import nt from "@mui/material/List";
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import jt from "@mui/material/DialogTitle";
|
|
52
|
-
import { Cancel as Qt, ArrowDropDown as Kt, ArrowForward as ot, ArrowBack as rt, ViewHeadline as Jt } from "@mui/icons-material";
|
|
53
|
-
import Yt from "autosuggest-highlight/parse";
|
|
54
|
-
import Zt from "autosuggest-highlight/match";
|
|
55
|
-
import { atom as M, useSetAtom as it, useAtomValue as He, useAtom as X, getDefaultStore as en, Provider as at } from "jotai";
|
|
47
|
+
import { Cancel as jt, ArrowDropDown as Qt, ArrowForward as ot, ArrowBack as rt, ViewHeadline as Kt } from "@mui/icons-material";
|
|
48
|
+
import Jt from "autosuggest-highlight/parse";
|
|
49
|
+
import Yt from "autosuggest-highlight/match";
|
|
50
|
+
import { atom as M, useSetAtom as it, useAtomValue as He, useAtom as X, getDefaultStore as Zt, Provider as at } from "jotai";
|
|
56
51
|
import { useHydrateAtoms as st } from "jotai/utils";
|
|
57
|
-
function
|
|
52
|
+
function lo({ text: e }) {
|
|
58
53
|
const [t, n] = O(0);
|
|
59
54
|
return /* @__PURE__ */ f(B, { children: [
|
|
60
55
|
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
61
56
|
/* @__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
57
|
/* @__PURE__ */ o(
|
|
63
|
-
|
|
58
|
+
we,
|
|
64
59
|
{
|
|
65
60
|
variant: "outlined",
|
|
66
61
|
onClick: () => n((r) => r + 1),
|
|
@@ -86,7 +81,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
86
81
|
userInfoHolder: `${G}-userInfoHolder`,
|
|
87
82
|
settings: `${G}-settings`,
|
|
88
83
|
pieChartIcon: `${G}-pieChartIcon`
|
|
89
|
-
},
|
|
84
|
+
}, en = L(D, {
|
|
90
85
|
name: "NavBar"
|
|
91
86
|
})(({ theme: e }) => ({
|
|
92
87
|
[`&.${V.root}`]: {
|
|
@@ -115,11 +110,11 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
115
110
|
color: "white",
|
|
116
111
|
backgroundColor: "black"
|
|
117
112
|
// backgroundColor: '#e8e8e8',
|
|
118
|
-
}),
|
|
113
|
+
}), tn = () => i({
|
|
119
114
|
width: lt
|
|
120
|
-
}, dt()),
|
|
115
|
+
}, dt()), nn = () => i({
|
|
121
116
|
width: ct
|
|
122
|
-
}, dt()),
|
|
117
|
+
}, dt()), on = L(Ae, {
|
|
123
118
|
shouldForwardProp: (e) => e !== "open"
|
|
124
119
|
})(({ theme: e, open: t }) => i(i({
|
|
125
120
|
width: t ? lt : ct,
|
|
@@ -128,16 +123,16 @@ const lt = 330, ct = 73, G = "Navbar", V = {
|
|
|
128
123
|
boxSizing: "border-box",
|
|
129
124
|
zIndex: e.zIndex.drawer + 100
|
|
130
125
|
}, t && {
|
|
131
|
-
"& .MuiDrawer-paper":
|
|
126
|
+
"& .MuiDrawer-paper": tn()
|
|
132
127
|
}), !t && {
|
|
133
|
-
"& .MuiDrawer-paper":
|
|
128
|
+
"& .MuiDrawer-paper": nn()
|
|
134
129
|
}));
|
|
135
|
-
class
|
|
130
|
+
class $e extends Xt {
|
|
136
131
|
}
|
|
137
|
-
|
|
138
|
-
const pt = Je(null),
|
|
139
|
-
overrideState: e =
|
|
140
|
-
overrideActions: t =
|
|
132
|
+
Be($e, "errorName", "ContextError");
|
|
133
|
+
const pt = Je(null), rn = {}, an = {}, sn = ({
|
|
134
|
+
overrideState: e = rn,
|
|
135
|
+
overrideActions: t = an,
|
|
141
136
|
children: n
|
|
142
137
|
}) => {
|
|
143
138
|
const [{ open: r }, s] = O({ open: !0 }), l = oe((p) => {
|
|
@@ -150,16 +145,16 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
|
150
145
|
toggleOpen: d
|
|
151
146
|
}, e), t);
|
|
152
147
|
return /* @__PURE__ */ o(pt.Provider, { value: g, children: n });
|
|
153
|
-
},
|
|
148
|
+
}, ln = () => {
|
|
154
149
|
const e = Ye(pt);
|
|
155
150
|
if (e === null)
|
|
156
|
-
throw new
|
|
151
|
+
throw new $e("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
157
152
|
return e;
|
|
158
|
-
},
|
|
153
|
+
}, cn = (e = {}) => i({
|
|
159
154
|
open: !0
|
|
160
|
-
}, e),
|
|
161
|
-
(e =
|
|
162
|
-
), Re = 7,
|
|
155
|
+
}, e), co = se(
|
|
156
|
+
(e = cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(sn, { overrideState: e, overrideActions: t, children: n })
|
|
157
|
+
), Re = 7, po = L(nt)(({ theme: e }) => ({
|
|
163
158
|
backgroundColor: "black",
|
|
164
159
|
color: "white",
|
|
165
160
|
"& .MuiListItem-root": {
|
|
@@ -197,7 +192,7 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
|
197
192
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
198
193
|
// },
|
|
199
194
|
}
|
|
200
|
-
})), We = 7,
|
|
195
|
+
})), We = 7, uo = L(nt)(({ theme: e }) => ({
|
|
201
196
|
backgroundColor: "#e8e8e8",
|
|
202
197
|
color: "inherit",
|
|
203
198
|
"& .MuiListItem-root": {
|
|
@@ -236,15 +231,15 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
|
|
|
236
231
|
// },
|
|
237
232
|
}
|
|
238
233
|
}));
|
|
239
|
-
function
|
|
234
|
+
function ho({
|
|
240
235
|
"data-testid": e,
|
|
241
236
|
children: t
|
|
242
237
|
}) {
|
|
243
|
-
const { open: n } =
|
|
244
|
-
return /* @__PURE__ */ f(
|
|
245
|
-
/* @__PURE__ */ o(
|
|
238
|
+
const { open: n } = ln();
|
|
239
|
+
return /* @__PURE__ */ f(en, { className: V.root, "data-testid": e, children: [
|
|
240
|
+
/* @__PURE__ */ o(qt, {}),
|
|
246
241
|
/* @__PURE__ */ o(
|
|
247
|
-
|
|
242
|
+
on,
|
|
248
243
|
{
|
|
249
244
|
variant: "permanent",
|
|
250
245
|
anchor: "left",
|
|
@@ -255,7 +250,7 @@ function xo({
|
|
|
255
250
|
)
|
|
256
251
|
] });
|
|
257
252
|
}
|
|
258
|
-
const
|
|
253
|
+
const dn = ({
|
|
259
254
|
isOpen: e,
|
|
260
255
|
dialogTitle: t,
|
|
261
256
|
children: n,
|
|
@@ -269,7 +264,7 @@ const pn = ({
|
|
|
269
264
|
var b, A;
|
|
270
265
|
const [u, w] = O(!1);
|
|
271
266
|
return /* @__PURE__ */ f(
|
|
272
|
-
|
|
267
|
+
Tt,
|
|
273
268
|
{
|
|
274
269
|
open: e,
|
|
275
270
|
onClose: () => N(void 0, null, function* () {
|
|
@@ -280,11 +275,11 @@ const pn = ({
|
|
|
280
275
|
"data-testid": p,
|
|
281
276
|
sx: g,
|
|
282
277
|
children: [
|
|
283
|
-
/* @__PURE__ */ o(
|
|
284
|
-
/* @__PURE__ */ o(
|
|
285
|
-
/* @__PURE__ */ f(
|
|
278
|
+
/* @__PURE__ */ o(Ft, { children: t }),
|
|
279
|
+
/* @__PURE__ */ o(yt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
280
|
+
/* @__PURE__ */ f(Pt, { children: [
|
|
286
281
|
/* @__PURE__ */ o(
|
|
287
|
-
|
|
282
|
+
we,
|
|
288
283
|
{
|
|
289
284
|
onClick: (b = l == null ? void 0 : l.onClick) != null ? b : d,
|
|
290
285
|
"data-testid": l == null ? void 0 : l.testId,
|
|
@@ -294,7 +289,7 @@ const pn = ({
|
|
|
294
289
|
}
|
|
295
290
|
),
|
|
296
291
|
s && /* @__PURE__ */ o(
|
|
297
|
-
|
|
292
|
+
we,
|
|
298
293
|
{
|
|
299
294
|
onClick: () => N(void 0, null, function* () {
|
|
300
295
|
var C;
|
|
@@ -311,7 +306,7 @@ const pn = ({
|
|
|
311
306
|
}
|
|
312
307
|
);
|
|
313
308
|
};
|
|
314
|
-
function
|
|
309
|
+
function go({
|
|
315
310
|
lookup: e = () => N(this, null, function* () {
|
|
316
311
|
}),
|
|
317
312
|
enableHighlighting: t = !0,
|
|
@@ -325,7 +320,7 @@ function wo({
|
|
|
325
320
|
textFieldVariant: u = "filled",
|
|
326
321
|
loadingText: w = "Loading...",
|
|
327
322
|
noOptionsText: b = "No options",
|
|
328
|
-
popupIcon: A = /* @__PURE__ */ o(
|
|
323
|
+
popupIcon: A = /* @__PURE__ */ o(Qt, {}),
|
|
329
324
|
error: C = !1,
|
|
330
325
|
helperText: k = "",
|
|
331
326
|
preLoadedOptions: v = void 0,
|
|
@@ -361,7 +356,7 @@ function wo({
|
|
|
361
356
|
) : (a) => a, [v]);
|
|
362
357
|
return /* @__PURE__ */ f("div", { "data-testid": d, children: [
|
|
363
358
|
/* @__PURE__ */ o(
|
|
364
|
-
|
|
359
|
+
Se,
|
|
365
360
|
{
|
|
366
361
|
sx: g,
|
|
367
362
|
"data-testid": d ? `${d}:Autocomplete` : void 0,
|
|
@@ -384,7 +379,7 @@ function wo({
|
|
|
384
379
|
loadingText: w,
|
|
385
380
|
popupIcon: A,
|
|
386
381
|
renderInput: (a) => /* @__PURE__ */ o(
|
|
387
|
-
|
|
382
|
+
De,
|
|
388
383
|
S(i({}, a), {
|
|
389
384
|
label: s,
|
|
390
385
|
fullWidth: !0,
|
|
@@ -393,7 +388,7 @@ function wo({
|
|
|
393
388
|
helperText: k,
|
|
394
389
|
InputProps: S(i({}, a.InputProps), {
|
|
395
390
|
endAdornment: /* @__PURE__ */ f(B, { children: [
|
|
396
|
-
H ? /* @__PURE__ */ o(
|
|
391
|
+
H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
|
|
397
392
|
a.InputProps.endAdornment
|
|
398
393
|
] })
|
|
399
394
|
}),
|
|
@@ -408,10 +403,10 @@ function wo({
|
|
|
408
403
|
isOptionEqualToValue: (a, c) => a.id === c.id,
|
|
409
404
|
renderOption: (a, c, x) => {
|
|
410
405
|
if (t) {
|
|
411
|
-
const q =
|
|
406
|
+
const q = Yt(c.label, x.inputValue, {
|
|
412
407
|
insideWords: !0,
|
|
413
408
|
findAllOccurrences: !0
|
|
414
|
-
}), le =
|
|
409
|
+
}), le = Jt(c.label, q);
|
|
415
410
|
return /* @__PURE__ */ xe(
|
|
416
411
|
"li",
|
|
417
412
|
S(i({}, a), {
|
|
@@ -442,7 +437,7 @@ function wo({
|
|
|
442
437
|
}
|
|
443
438
|
),
|
|
444
439
|
l.length > 0 && /* @__PURE__ */ o(D, { children: l.map((a) => /* @__PURE__ */ o(
|
|
445
|
-
|
|
440
|
+
Nt,
|
|
446
441
|
{
|
|
447
442
|
sx: {
|
|
448
443
|
marginTop: 1,
|
|
@@ -450,7 +445,7 @@ function wo({
|
|
|
450
445
|
height: "auto"
|
|
451
446
|
},
|
|
452
447
|
label: /* @__PURE__ */ o(
|
|
453
|
-
|
|
448
|
+
Bt,
|
|
454
449
|
{
|
|
455
450
|
title: a.tooltipContent || "",
|
|
456
451
|
placement: "bottom-start",
|
|
@@ -470,7 +465,7 @@ function wo({
|
|
|
470
465
|
"data-testid": d ? `${d}:Chip(${a.id.toString()})` : void 0,
|
|
471
466
|
onDelete: (c) => R(c, a.id),
|
|
472
467
|
deleteIcon: /* @__PURE__ */ o(
|
|
473
|
-
|
|
468
|
+
jt,
|
|
474
469
|
{
|
|
475
470
|
"data-testid": d ? `${d}:Chip(${a.id.toString()}):deleteIcon` : void 0
|
|
476
471
|
}
|
|
@@ -480,7 +475,7 @@ function wo({
|
|
|
480
475
|
)) })
|
|
481
476
|
] });
|
|
482
477
|
}
|
|
483
|
-
const
|
|
478
|
+
const fo = ({
|
|
484
479
|
lookup: e,
|
|
485
480
|
onChange: t,
|
|
486
481
|
label: n,
|
|
@@ -506,8 +501,8 @@ const bo = ({
|
|
|
506
501
|
throw h;
|
|
507
502
|
}
|
|
508
503
|
});
|
|
509
|
-
return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(
|
|
510
|
-
|
|
504
|
+
return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
|
|
505
|
+
Se,
|
|
511
506
|
{
|
|
512
507
|
sx: s,
|
|
513
508
|
"data-testid": g ? `${g}:Autocomplete` : void 0,
|
|
@@ -521,7 +516,7 @@ const bo = ({
|
|
|
521
516
|
value: r,
|
|
522
517
|
getOptionLabel: (m) => m.label,
|
|
523
518
|
renderInput: (m) => /* @__PURE__ */ o(
|
|
524
|
-
|
|
519
|
+
De,
|
|
525
520
|
S(i({
|
|
526
521
|
"data-testid": g ? `${g}:Autocomplete:TextField` : void 0
|
|
527
522
|
}, m), {
|
|
@@ -544,14 +539,14 @@ const bo = ({
|
|
|
544
539
|
)
|
|
545
540
|
}
|
|
546
541
|
) }) });
|
|
547
|
-
},
|
|
542
|
+
}, pn = 24, un = 64, U = "TopBar", I = {
|
|
548
543
|
topStripe: `${U}-topStripe`,
|
|
549
544
|
titleBar: `${U}-titleBar`,
|
|
550
545
|
titleSlider: `${U}-titleSlider`,
|
|
551
546
|
titleText: `${U}-titleText`,
|
|
552
547
|
leftPanelButton: `${U}-leftPanelButton`,
|
|
553
548
|
rightPanelButton: `${U}-leftPanelButton`
|
|
554
|
-
},
|
|
549
|
+
}, hn = Oe("div", {
|
|
555
550
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
556
551
|
name: U
|
|
557
552
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -560,12 +555,12 @@ const bo = ({
|
|
|
560
555
|
width: "100%",
|
|
561
556
|
[`& .${I.topStripe}`]: {
|
|
562
557
|
width: "100%",
|
|
563
|
-
height: `${
|
|
558
|
+
height: `${pn}px`,
|
|
564
559
|
backgroundColor: e.palette.primary.main
|
|
565
560
|
},
|
|
566
561
|
[`& .${I.titleBar}`]: {
|
|
567
562
|
backgroundColor: e.palette.primary.light,
|
|
568
|
-
height: `${
|
|
563
|
+
height: `${un}px`,
|
|
569
564
|
padding: e.spacing(0, 3),
|
|
570
565
|
width: "100%"
|
|
571
566
|
},
|
|
@@ -603,13 +598,13 @@ const bo = ({
|
|
|
603
598
|
})
|
|
604
599
|
};
|
|
605
600
|
});
|
|
606
|
-
function
|
|
601
|
+
function gn({
|
|
607
602
|
titleText: e = "",
|
|
608
603
|
leftPanel: t,
|
|
609
604
|
rightPanel: n,
|
|
610
605
|
"data-testid": r
|
|
611
606
|
}) {
|
|
612
|
-
return /* @__PURE__ */ f(
|
|
607
|
+
return /* @__PURE__ */ f(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
|
|
613
608
|
/* @__PURE__ */ o("div", { className: I.topStripe }),
|
|
614
609
|
/* @__PURE__ */ o("div", { className: I.titleBar, children: /* @__PURE__ */ f(D, { className: I.titleSlider, children: [
|
|
615
610
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ f(
|
|
@@ -646,7 +641,7 @@ function fn({
|
|
|
646
641
|
] }) })
|
|
647
642
|
] });
|
|
648
643
|
}
|
|
649
|
-
const ut = 400,
|
|
644
|
+
const ut = 400, fn = Oe(Ae, {
|
|
650
645
|
shouldForwardProp: (e) => (
|
|
651
646
|
// Note we do want anchor to be forwarded to the Drawer component
|
|
652
647
|
![
|
|
@@ -676,7 +671,7 @@ const ut = 400, mn = ke(be, {
|
|
|
676
671
|
marginLeft: `${s}px`
|
|
677
672
|
}))
|
|
678
673
|
})
|
|
679
|
-
),
|
|
674
|
+
), mn = Oe(D, {
|
|
680
675
|
shouldForwardProp: (e) => !["anchor"].includes(e)
|
|
681
676
|
})(({ theme: e, anchor: t }) => S(i({
|
|
682
677
|
display: "flex",
|
|
@@ -715,7 +710,7 @@ function ze({
|
|
|
715
710
|
navBarWidthClosed: k = 0
|
|
716
711
|
}) {
|
|
717
712
|
return /* @__PURE__ */ f(
|
|
718
|
-
|
|
713
|
+
fn,
|
|
719
714
|
{
|
|
720
715
|
SlideProps: {
|
|
721
716
|
onEntered: () => u == null ? void 0 : u(),
|
|
@@ -731,7 +726,7 @@ function ze({
|
|
|
731
726
|
navBarWidthOpen: C,
|
|
732
727
|
navBarWidthClosed: k,
|
|
733
728
|
children: [
|
|
734
|
-
/* @__PURE__ */ o(
|
|
729
|
+
/* @__PURE__ */ o(mn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(B, { children: [
|
|
735
730
|
/* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s }),
|
|
736
731
|
d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
|
|
737
732
|
/* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
|
|
@@ -749,7 +744,7 @@ function ze({
|
|
|
749
744
|
}
|
|
750
745
|
);
|
|
751
746
|
}
|
|
752
|
-
const
|
|
747
|
+
const Cn = L(D, {
|
|
753
748
|
shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
|
|
754
749
|
name: "PanelAwareMargins"
|
|
755
750
|
})(({ theme: e, leftPanel: t, rightPanel: n }) => {
|
|
@@ -772,7 +767,7 @@ const vn = L(D, {
|
|
|
772
767
|
}),
|
|
773
768
|
marginRight: `${(s = n == null ? void 0 : n.width) != null ? s : 0}px`
|
|
774
769
|
});
|
|
775
|
-
}),
|
|
770
|
+
}), vn = L(et, {
|
|
776
771
|
name: "PageContainer"
|
|
777
772
|
})(({ theme: e }) => ({
|
|
778
773
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -792,7 +787,7 @@ const vn = L(D, {
|
|
|
792
787
|
onClosed: void 0,
|
|
793
788
|
dataTestId: void 0
|
|
794
789
|
};
|
|
795
|
-
function
|
|
790
|
+
function mo({
|
|
796
791
|
children: e,
|
|
797
792
|
titleText: t = "",
|
|
798
793
|
leftPanel: n,
|
|
@@ -821,9 +816,9 @@ function Ao({
|
|
|
821
816
|
} = n ? i(i({}, te), n) : i({}, te), {
|
|
822
817
|
titleText: ce,
|
|
823
818
|
content: At,
|
|
824
|
-
flavour:
|
|
819
|
+
flavour: Ie,
|
|
825
820
|
open: de,
|
|
826
|
-
onChangeOpen:
|
|
821
|
+
onChangeOpen: Ee,
|
|
827
822
|
width: pe,
|
|
828
823
|
arrowButtons: Y,
|
|
829
824
|
startOpen: Z,
|
|
@@ -836,10 +831,10 @@ function Ao({
|
|
|
836
831
|
}, [x]), re(() => {
|
|
837
832
|
Z !== ve && (v(Z), _(Z));
|
|
838
833
|
}, [Z]);
|
|
839
|
-
const ue = R === void 0 ? A : R, he = de === void 0 ? k : de,
|
|
834
|
+
const ue = R === void 0 ? A : R, he = de === void 0 ? k : de, Te = (z) => {
|
|
840
835
|
R === void 0 && (C(z), s && y && (z ? (v(!1), _(k)) : v(T))), W && W(z);
|
|
841
|
-
},
|
|
842
|
-
de === void 0 && (v(z), s && F && (z ? (C(!1), h(A)) : C(m))),
|
|
836
|
+
}, Fe = (z) => {
|
|
837
|
+
de === void 0 && (v(z), s && F && (z ? (C(!1), h(A)) : C(m))), Ee && Ee(z);
|
|
843
838
|
};
|
|
844
839
|
return /* @__PURE__ */ f(D, { children: [
|
|
845
840
|
F && /* @__PURE__ */ o(
|
|
@@ -848,7 +843,7 @@ function Ao({
|
|
|
848
843
|
"data-testid": J,
|
|
849
844
|
anchor: "left",
|
|
850
845
|
open: ue,
|
|
851
|
-
onClose: () =>
|
|
846
|
+
onClose: () => Te(!1),
|
|
852
847
|
width: a,
|
|
853
848
|
titleText: $,
|
|
854
849
|
debugOpacity: l,
|
|
@@ -867,7 +862,7 @@ function Ao({
|
|
|
867
862
|
"data-testid": kt,
|
|
868
863
|
anchor: "right",
|
|
869
864
|
open: he,
|
|
870
|
-
onClose: () =>
|
|
865
|
+
onClose: () => Fe(!1),
|
|
871
866
|
width: pe,
|
|
872
867
|
titleText: ce,
|
|
873
868
|
debugOpacity: l,
|
|
@@ -881,7 +876,7 @@ function Ao({
|
|
|
881
876
|
}
|
|
882
877
|
),
|
|
883
878
|
/* @__PURE__ */ o(
|
|
884
|
-
|
|
879
|
+
gn,
|
|
885
880
|
i(i({
|
|
886
881
|
titleText: t,
|
|
887
882
|
"data-testid": p
|
|
@@ -889,41 +884,41 @@ function Ao({
|
|
|
889
884
|
leftPanel: {
|
|
890
885
|
open: ue,
|
|
891
886
|
width: a,
|
|
892
|
-
onOpen: () =>
|
|
887
|
+
onOpen: () => Te(!0),
|
|
893
888
|
showOpenArrow: c === "both" || c === "open"
|
|
894
889
|
}
|
|
895
|
-
} : {}), y &&
|
|
890
|
+
} : {}), y && Ie === "push" ? {
|
|
896
891
|
rightPanel: {
|
|
897
892
|
open: he,
|
|
898
893
|
width: pe,
|
|
899
|
-
onOpen: () =>
|
|
894
|
+
onOpen: () => Fe(!0),
|
|
900
895
|
showOpenArrow: Y === "both" || Y === "open"
|
|
901
896
|
}
|
|
902
897
|
} : {})
|
|
903
898
|
),
|
|
904
899
|
/* @__PURE__ */ o(
|
|
905
|
-
|
|
900
|
+
Cn,
|
|
906
901
|
S(i(i({}, P === "push" ? {
|
|
907
902
|
leftPanel: {
|
|
908
903
|
open: ue,
|
|
909
904
|
width: a
|
|
910
905
|
}
|
|
911
|
-
} : {}),
|
|
906
|
+
} : {}), Ie === "push" ? {
|
|
912
907
|
rightPanel: {
|
|
913
908
|
open: he,
|
|
914
909
|
width: pe
|
|
915
910
|
}
|
|
916
911
|
} : {}), {
|
|
917
|
-
children: /* @__PURE__ */ o(
|
|
912
|
+
children: /* @__PURE__ */ o(vn, S(i({ "data-testid": g }, d), { children: e }))
|
|
918
913
|
})
|
|
919
914
|
)
|
|
920
915
|
] });
|
|
921
916
|
}
|
|
922
917
|
const ht = () => {
|
|
923
918
|
const e = ae();
|
|
924
|
-
return
|
|
925
|
-
},
|
|
926
|
-
function
|
|
919
|
+
return Mt(e.breakpoints.down("sm"));
|
|
920
|
+
}, xn = 64, wn = 64, bn = 256, K = M(!0), gt = M(bn), ft = M(wn), be = M(""), mt = M(xn), Ct = M(void 0);
|
|
921
|
+
function An({ links: e }) {
|
|
927
922
|
return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
|
|
928
923
|
}
|
|
929
924
|
const ne = "Navbar", j = {
|
|
@@ -934,7 +929,7 @@ const ne = "Navbar", j = {
|
|
|
934
929
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
935
930
|
// settings: `${PREFIX}-settings`,
|
|
936
931
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
937
|
-
},
|
|
932
|
+
}, Sn = L(D, { name: "NavBar" })(({ theme: e }) => ({
|
|
938
933
|
[`&.${j.root}`]: {
|
|
939
934
|
display: "flex"
|
|
940
935
|
},
|
|
@@ -956,10 +951,10 @@ const ne = "Navbar", j = {
|
|
|
956
951
|
})), ie = (e, t, n) => e.transitions.create(t, {
|
|
957
952
|
easing: e.transitions.easing.sharp,
|
|
958
953
|
duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
|
|
959
|
-
}),
|
|
954
|
+
}), Dn = (e) => {
|
|
960
955
|
const t = ae();
|
|
961
956
|
return /* @__PURE__ */ o(
|
|
962
|
-
|
|
957
|
+
_t,
|
|
963
958
|
i({
|
|
964
959
|
easing: t.transitions.easing.sharp,
|
|
965
960
|
timeout: {
|
|
@@ -982,7 +977,7 @@ const ne = "Navbar", j = {
|
|
|
982
977
|
}, vt(e)), Ue = (e, t) => i({
|
|
983
978
|
width: t,
|
|
984
979
|
transition: ie(e, "width", "leaving")
|
|
985
|
-
}, vt(e)),
|
|
980
|
+
}, vt(e)), kn = L(Ae, {
|
|
986
981
|
shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
|
|
987
982
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: s }) => i(i({
|
|
988
983
|
flexShrink: 0,
|
|
@@ -997,7 +992,7 @@ const ne = "Navbar", j = {
|
|
|
997
992
|
backgroundColor: "",
|
|
998
993
|
"& .MuiDrawer-paper": Ue(e, s ? n : r)
|
|
999
994
|
})));
|
|
1000
|
-
function
|
|
995
|
+
function On(e) {
|
|
1001
996
|
let t = 0;
|
|
1002
997
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
1003
998
|
const s = e.charCodeAt(n);
|
|
@@ -1005,8 +1000,8 @@ function $n(e) {
|
|
|
1005
1000
|
}
|
|
1006
1001
|
return t;
|
|
1007
1002
|
}
|
|
1008
|
-
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"],
|
|
1009
|
-
function
|
|
1003
|
+
const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], $n = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
|
|
1004
|
+
function In({ user: e, domainCode: t, open: n }) {
|
|
1010
1005
|
const r = ae();
|
|
1011
1006
|
return /* @__PURE__ */ f(
|
|
1012
1007
|
D,
|
|
@@ -1028,28 +1023,28 @@ function En({ user: e, domainCode: t, open: n }) {
|
|
|
1028
1023
|
aspectRatio: 1
|
|
1029
1024
|
},
|
|
1030
1025
|
children: e != null && e.name ? /* @__PURE__ */ o(
|
|
1031
|
-
|
|
1026
|
+
Le,
|
|
1032
1027
|
{
|
|
1033
1028
|
src: e == null ? void 0 : e.picture,
|
|
1034
1029
|
sx: {
|
|
1035
1030
|
width: "100%",
|
|
1036
1031
|
height: "100%",
|
|
1037
|
-
bgcolor: Ve[Math.abs(
|
|
1032
|
+
bgcolor: Ve[Math.abs(On(e.name)) % Ve.length]
|
|
1038
1033
|
},
|
|
1039
|
-
children:
|
|
1034
|
+
children: $n(e.name)
|
|
1040
1035
|
}
|
|
1041
|
-
) : /* @__PURE__ */ o(
|
|
1036
|
+
) : /* @__PURE__ */ o(Le, { sx: { width: "100%", height: "100%" } })
|
|
1042
1037
|
}
|
|
1043
1038
|
),
|
|
1044
|
-
/* @__PURE__ */ o(
|
|
1045
|
-
e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(
|
|
1046
|
-
t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(
|
|
1039
|
+
/* @__PURE__ */ o(Dn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ht, { in: n, children: /* @__PURE__ */ f(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
1040
|
+
e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(Me, { animation: !1, width: "50%" }),
|
|
1041
|
+
t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Me, { animation: !1, width: "25%" })
|
|
1047
1042
|
] }) }) })
|
|
1048
1043
|
]
|
|
1049
1044
|
}
|
|
1050
1045
|
);
|
|
1051
1046
|
}
|
|
1052
|
-
function
|
|
1047
|
+
function En({
|
|
1053
1048
|
open: e,
|
|
1054
1049
|
widthClosed: t,
|
|
1055
1050
|
widthOpen: n,
|
|
@@ -1061,8 +1056,8 @@ function Tn({
|
|
|
1061
1056
|
domainCode: p
|
|
1062
1057
|
}) {
|
|
1063
1058
|
const u = ht(), w = it(K);
|
|
1064
|
-
return /* @__PURE__ */ o(
|
|
1065
|
-
|
|
1059
|
+
return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
|
|
1060
|
+
kn,
|
|
1066
1061
|
{
|
|
1067
1062
|
open: e,
|
|
1068
1063
|
widthOpen: n,
|
|
@@ -1077,22 +1072,22 @@ function Tn({
|
|
|
1077
1072
|
},
|
|
1078
1073
|
isSmallScreen: u,
|
|
1079
1074
|
children: [
|
|
1080
|
-
!u && /* @__PURE__ */ o(
|
|
1075
|
+
!u && /* @__PURE__ */ o(Rt, {}),
|
|
1081
1076
|
s && /* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1082
1077
|
s,
|
|
1083
|
-
/* @__PURE__ */ o(
|
|
1078
|
+
/* @__PURE__ */ o(_e, { variant: "middle" })
|
|
1084
1079
|
] }),
|
|
1085
|
-
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(
|
|
1080
|
+
/* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(An, { links: l }) : l }),
|
|
1086
1081
|
/* @__PURE__ */ f(D, { flexGrow: "0", children: [
|
|
1087
|
-
/* @__PURE__ */ o(
|
|
1088
|
-
/* @__PURE__ */ o(
|
|
1082
|
+
/* @__PURE__ */ o(_e, { variant: "middle" }),
|
|
1083
|
+
/* @__PURE__ */ o(In, { user: g, domainCode: p, open: e }),
|
|
1089
1084
|
d && /* @__PURE__ */ o(B, { children: d })
|
|
1090
1085
|
] })
|
|
1091
1086
|
]
|
|
1092
1087
|
}
|
|
1093
1088
|
) });
|
|
1094
1089
|
}
|
|
1095
|
-
function
|
|
1090
|
+
function Tn({
|
|
1096
1091
|
children: e,
|
|
1097
1092
|
topBarHeight: t,
|
|
1098
1093
|
maxWidth: n = !1
|
|
@@ -1120,10 +1115,10 @@ function Fn({
|
|
|
1120
1115
|
}
|
|
1121
1116
|
);
|
|
1122
1117
|
}
|
|
1123
|
-
const
|
|
1124
|
-
titleText: `${
|
|
1118
|
+
const Fn = "TopBar", yn = {
|
|
1119
|
+
titleText: `${Fn}-titleText`
|
|
1125
1120
|
};
|
|
1126
|
-
function
|
|
1121
|
+
function Pn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
1127
1122
|
const r = it(K), s = () => r((g) => !g), l = ae(), d = ht();
|
|
1128
1123
|
return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
|
|
1129
1124
|
Ze,
|
|
@@ -1143,13 +1138,13 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
1143
1138
|
zIndex: d ? 0 : l.zIndex.drawer + 1
|
|
1144
1139
|
},
|
|
1145
1140
|
children: [
|
|
1146
|
-
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(
|
|
1147
|
-
/* @__PURE__ */ o(E, { className:
|
|
1141
|
+
/* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Kt, { fontSize: "medium" }) }),
|
|
1142
|
+
/* @__PURE__ */ o(E, { className: yn.titleText, variant: "h6", children: e })
|
|
1148
1143
|
]
|
|
1149
1144
|
}
|
|
1150
1145
|
) });
|
|
1151
1146
|
}
|
|
1152
|
-
function
|
|
1147
|
+
function Co({
|
|
1153
1148
|
children: e,
|
|
1154
1149
|
initialTitleText: t,
|
|
1155
1150
|
initialNavBarOpen: n,
|
|
@@ -1164,15 +1159,15 @@ function So({
|
|
|
1164
1159
|
}) {
|
|
1165
1160
|
st([
|
|
1166
1161
|
[K, n != null ? n : !0],
|
|
1167
|
-
[
|
|
1162
|
+
[be, t != null ? t : ""]
|
|
1168
1163
|
]);
|
|
1169
|
-
const b = He(K), [A] = X(gt), [C] = X(ft), k = He(
|
|
1164
|
+
const b = He(K), [A] = X(gt), [C] = X(ft), k = He(be), [v] = X(mt), [m] = X(Ct);
|
|
1170
1165
|
return /* @__PURE__ */ f(D, { children: [
|
|
1171
|
-
/* @__PURE__ */ o(
|
|
1172
|
-
/* @__PURE__ */ o(
|
|
1166
|
+
/* @__PURE__ */ o(Wt, {}),
|
|
1167
|
+
/* @__PURE__ */ o(Pn, { titleText: k, "data-testid": l, height: v }),
|
|
1173
1168
|
/* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
|
|
1174
1169
|
/* @__PURE__ */ o(
|
|
1175
|
-
|
|
1170
|
+
En,
|
|
1176
1171
|
{
|
|
1177
1172
|
open: b,
|
|
1178
1173
|
top: m,
|
|
@@ -1187,7 +1182,7 @@ function So({
|
|
|
1187
1182
|
}
|
|
1188
1183
|
),
|
|
1189
1184
|
/* @__PURE__ */ o(
|
|
1190
|
-
|
|
1185
|
+
Tn,
|
|
1191
1186
|
S(i({
|
|
1192
1187
|
"data-testid": s,
|
|
1193
1188
|
topBarHeight: v
|
|
@@ -1198,13 +1193,13 @@ function So({
|
|
|
1198
1193
|
] })
|
|
1199
1194
|
] });
|
|
1200
1195
|
}
|
|
1201
|
-
const
|
|
1196
|
+
const Nn = {
|
|
1202
1197
|
autoHideDuration: 6e3,
|
|
1203
1198
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
1204
1199
|
// The default is false. If we prefer timer to continue when window loses
|
|
1205
1200
|
// focus, change to true
|
|
1206
1201
|
disableWindowBlurListener: !1
|
|
1207
|
-
},
|
|
1202
|
+
}, Bn = {
|
|
1208
1203
|
shouldClose: (e, t) => t !== "clickaway"
|
|
1209
1204
|
}, qe = {
|
|
1210
1205
|
message: "",
|
|
@@ -1212,20 +1207,20 @@ const Bn = {
|
|
|
1212
1207
|
variant: "standard",
|
|
1213
1208
|
progressIndicator: void 0
|
|
1214
1209
|
// Can use 'circular' or 'linear'
|
|
1215
|
-
}, Xe = 100, je = 2e3,
|
|
1210
|
+
}, Xe = 100, je = 2e3, Ln = 2e3, Mn = (() => {
|
|
1216
1211
|
let e = 0;
|
|
1217
1212
|
return () => (e += 1, e);
|
|
1218
|
-
})(),
|
|
1213
|
+
})(), _n = {
|
|
1219
1214
|
borderBottomLeftRadius: "0px",
|
|
1220
1215
|
borderBottomRightRadius: "0px"
|
|
1221
|
-
},
|
|
1222
|
-
function
|
|
1216
|
+
}, Hn = {}, Rn = {}, xt = Je(null);
|
|
1217
|
+
function Wn(l) {
|
|
1223
1218
|
var d = l, {
|
|
1224
|
-
overrideState: e =
|
|
1225
|
-
overrideActions: t =
|
|
1226
|
-
shouldClose: n =
|
|
1219
|
+
overrideState: e = Hn,
|
|
1220
|
+
overrideActions: t = Rn,
|
|
1221
|
+
shouldClose: n = Bn.shouldClose,
|
|
1227
1222
|
children: r
|
|
1228
|
-
} = d, s =
|
|
1223
|
+
} = d, s = Ne(d, [
|
|
1229
1224
|
"overrideState",
|
|
1230
1225
|
"overrideActions",
|
|
1231
1226
|
"shouldClose",
|
|
@@ -1239,7 +1234,7 @@ function zn(l) {
|
|
|
1239
1234
|
`SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${b.current} times in last ${je}ms)`
|
|
1240
1235
|
), b.current = 0);
|
|
1241
1236
|
const c = i(S(i({}, qe), {
|
|
1242
|
-
key:
|
|
1237
|
+
key: Mn()
|
|
1243
1238
|
}), a);
|
|
1244
1239
|
return u.current.push(c), u.current.length === 1 && p({ open: !0 }), c.key;
|
|
1245
1240
|
}, []), k = (a = "", c = {}) => C(i({ message: a, severity: "success" }, c)), v = (a = "", c = {}) => C(i({ message: a, severity: "info" }, c)), m = (a = "", c = {}) => C(i({ message: a, severity: "warning" }, c)), h = (a = "", c = {}) => C(i({ message: a, severity: "error" }, c)), T = (a) => {
|
|
@@ -1253,7 +1248,7 @@ function zn(l) {
|
|
|
1253
1248
|
u.current.shift(), u.current.length > 0 && p({ open: !0 });
|
|
1254
1249
|
}, $ = (W = u.current[0]) != null ? W : i({}, qe), H = {};
|
|
1255
1250
|
"autoHideDuration" in $ && (H.autoHideDuration = $.autoHideDuration);
|
|
1256
|
-
const P = i(i({},
|
|
1251
|
+
const P = i(i({}, Nn), s), R = i(i({
|
|
1257
1252
|
open: g,
|
|
1258
1253
|
setOpen: A,
|
|
1259
1254
|
enqueueNotification: C,
|
|
@@ -1266,7 +1261,7 @@ function zn(l) {
|
|
|
1266
1261
|
return /* @__PURE__ */ f(xt.Provider, { value: R, children: [
|
|
1267
1262
|
r,
|
|
1268
1263
|
/* @__PURE__ */ o(
|
|
1269
|
-
|
|
1264
|
+
zt,
|
|
1270
1265
|
S(i(i({}, P), H), {
|
|
1271
1266
|
open: g,
|
|
1272
1267
|
onClose: _,
|
|
@@ -1274,37 +1269,37 @@ function zn(l) {
|
|
|
1274
1269
|
onExited: y,
|
|
1275
1270
|
onExit: F
|
|
1276
1271
|
},
|
|
1277
|
-
sx: { zIndex:
|
|
1272
|
+
sx: { zIndex: Ln },
|
|
1278
1273
|
children: /* @__PURE__ */ f("div", { children: [
|
|
1279
1274
|
/* @__PURE__ */ o(
|
|
1280
|
-
|
|
1275
|
+
Gt,
|
|
1281
1276
|
{
|
|
1282
1277
|
onClose: (a) => _(a, "closeAlert"),
|
|
1283
1278
|
severity: $.severity,
|
|
1284
1279
|
variant: "filled",
|
|
1285
|
-
icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(
|
|
1286
|
-
style: $.progressIndicator === "linear" ?
|
|
1280
|
+
icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
|
|
1281
|
+
style: $.progressIndicator === "linear" ? _n : void 0,
|
|
1287
1282
|
children: $.message
|
|
1288
1283
|
}
|
|
1289
1284
|
),
|
|
1290
|
-
$.progressIndicator === "linear" && /* @__PURE__ */ o(
|
|
1285
|
+
$.progressIndicator === "linear" && /* @__PURE__ */ o(Ut, { color: "primary" })
|
|
1291
1286
|
] })
|
|
1292
1287
|
})
|
|
1293
1288
|
)
|
|
1294
1289
|
] });
|
|
1295
1290
|
}
|
|
1296
|
-
function
|
|
1291
|
+
function zn() {
|
|
1297
1292
|
const e = Ye(xt);
|
|
1298
1293
|
if (e === null)
|
|
1299
|
-
throw new
|
|
1294
|
+
throw new $e("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1300
1295
|
return e;
|
|
1301
1296
|
}
|
|
1302
|
-
const
|
|
1303
|
-
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(
|
|
1304
|
-
),
|
|
1297
|
+
const vo = se(
|
|
1298
|
+
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Wn, S(i({}, e), { overrideState: t, overrideActions: n, children: r }))
|
|
1299
|
+
), Gn = Zt(), xo = ({
|
|
1305
1300
|
children: e,
|
|
1306
1301
|
store: t
|
|
1307
|
-
}) => /* @__PURE__ */ o(at, { store: t != null ? t :
|
|
1302
|
+
}) => /* @__PURE__ */ o(at, { store: t != null ? t : Gn, children: e }), wt = "domainCode";
|
|
1308
1303
|
var Ke;
|
|
1309
1304
|
const Qe = M(
|
|
1310
1305
|
JSON.parse((Ke = localStorage.getItem(wt)) != null ? Ke : '{"domainCode": ""}').domainCode
|
|
@@ -1313,7 +1308,7 @@ const Qe = M(
|
|
|
1313
1308
|
(e, t, n) => {
|
|
1314
1309
|
t(Qe, n), localStorage.setItem(wt, JSON.stringify({ domainCode: n }));
|
|
1315
1310
|
}
|
|
1316
|
-
),
|
|
1311
|
+
), Un = {
|
|
1317
1312
|
act: "ACT",
|
|
1318
1313
|
nsw: "NSW",
|
|
1319
1314
|
nt: "NT",
|
|
@@ -1325,10 +1320,10 @@ const Qe = M(
|
|
|
1325
1320
|
ag: "AG",
|
|
1326
1321
|
fedmps: "Fedmps",
|
|
1327
1322
|
"": ""
|
|
1328
|
-
},
|
|
1323
|
+
}, Vn = (e) => {
|
|
1329
1324
|
var t;
|
|
1330
|
-
return e === null ? "N/A" : (t =
|
|
1331
|
-
},
|
|
1325
|
+
return e === null ? "N/A" : (t = Un[e]) != null ? t : "";
|
|
1326
|
+
}, wo = ({
|
|
1332
1327
|
isLoading: e,
|
|
1333
1328
|
isOpen: t,
|
|
1334
1329
|
onClose: n,
|
|
@@ -1336,14 +1331,14 @@ const Qe = M(
|
|
|
1336
1331
|
applicationName: s,
|
|
1337
1332
|
handleLogout: l
|
|
1338
1333
|
}) => {
|
|
1339
|
-
const [d, g] = X(bt), [p, u] = O(d), { enqueueSuccessNotification: w } =
|
|
1334
|
+
const [d, g] = X(bt), [p, u] = O(d), { enqueueSuccessNotification: w } = zn(), b = r.length === 0, A = !!d && !r.includes(d) && !r.includes(p), C = !d || b || A, k = () => N(void 0, null, function* () {
|
|
1340
1335
|
p ? (g(p), w(`Set domain to ${p}`), n()) : g("");
|
|
1341
1336
|
}), v = () => N(void 0, null, function* () {
|
|
1342
1337
|
d && !b && !A ? (u(d), n()) : C && l();
|
|
1343
1338
|
});
|
|
1344
1339
|
let m;
|
|
1345
1340
|
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(
|
|
1346
|
-
|
|
1341
|
+
dn,
|
|
1347
1342
|
{
|
|
1348
1343
|
isOpen: t,
|
|
1349
1344
|
dialogTitle: "Select an organisation",
|
|
@@ -1366,23 +1361,23 @@ const Qe = M(
|
|
|
1366
1361
|
"."
|
|
1367
1362
|
] }),
|
|
1368
1363
|
/* @__PURE__ */ o(
|
|
1369
|
-
|
|
1364
|
+
Se,
|
|
1370
1365
|
{
|
|
1371
1366
|
loading: e,
|
|
1372
1367
|
multiple: !1,
|
|
1373
1368
|
disableClearable: !1,
|
|
1374
1369
|
value: p !== "" ? p : null,
|
|
1375
1370
|
onChange: (h, T) => u(T != null ? T : ""),
|
|
1376
|
-
getOptionLabel:
|
|
1371
|
+
getOptionLabel: Vn,
|
|
1377
1372
|
options: [...r],
|
|
1378
1373
|
renderInput: (h) => /* @__PURE__ */ o(
|
|
1379
|
-
|
|
1374
|
+
De,
|
|
1380
1375
|
S(i({}, h), {
|
|
1381
1376
|
variant: "filled",
|
|
1382
1377
|
label: "Select organisation",
|
|
1383
1378
|
InputProps: S(i({}, h.InputProps), {
|
|
1384
1379
|
endAdornment: /* @__PURE__ */ f(B, { children: [
|
|
1385
|
-
e ? /* @__PURE__ */ o(
|
|
1380
|
+
e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
|
|
1386
1381
|
h.InputProps.endAdornment
|
|
1387
1382
|
] })
|
|
1388
1383
|
})
|
|
@@ -1390,11 +1385,11 @@ const Qe = M(
|
|
|
1390
1385
|
)
|
|
1391
1386
|
}
|
|
1392
1387
|
),
|
|
1393
|
-
m && /* @__PURE__ */ o(
|
|
1388
|
+
m && /* @__PURE__ */ o(Vt, { error: !0, children: m })
|
|
1394
1389
|
]
|
|
1395
1390
|
}
|
|
1396
1391
|
);
|
|
1397
|
-
},
|
|
1392
|
+
}, bo = tt({
|
|
1398
1393
|
palette: {
|
|
1399
1394
|
primary: {
|
|
1400
1395
|
dark: "#00A651",
|
|
@@ -1445,7 +1440,7 @@ const Qe = M(
|
|
|
1445
1440
|
navBar: {
|
|
1446
1441
|
backgroundColor: "#E8E8E8"
|
|
1447
1442
|
}
|
|
1448
|
-
}),
|
|
1443
|
+
}), Ao = tt({
|
|
1449
1444
|
palette: {
|
|
1450
1445
|
primary: {
|
|
1451
1446
|
main: "#007236",
|
|
@@ -1536,24 +1531,24 @@ const Qe = M(
|
|
|
1536
1531
|
navBar: {
|
|
1537
1532
|
backgroundColor: "#E8E8E8"
|
|
1538
1533
|
}
|
|
1539
|
-
}),
|
|
1534
|
+
}), qn = {
|
|
1540
1535
|
domainCode: bt,
|
|
1541
1536
|
navBarOpen: K,
|
|
1542
1537
|
navBarWidthOpen: gt,
|
|
1543
1538
|
navBarWidthClosed: ft,
|
|
1544
|
-
titleText:
|
|
1539
|
+
titleText: be,
|
|
1545
1540
|
topBarHeight: mt,
|
|
1546
1541
|
navBarTop: Ct
|
|
1547
|
-
},
|
|
1542
|
+
}, So = se(() => ({ children: e }) => /* @__PURE__ */ o(at, { children: e })), Xn = ({
|
|
1548
1543
|
initialValues: e,
|
|
1549
1544
|
children: t
|
|
1550
|
-
}) => (st(e), /* @__PURE__ */ o(B, { children: t })),
|
|
1545
|
+
}) => (st(e), /* @__PURE__ */ o(B, { children: t })), Do = se(
|
|
1551
1546
|
(e) => ({ children: t }) => /* @__PURE__ */ o(
|
|
1552
|
-
|
|
1547
|
+
Xn,
|
|
1553
1548
|
{
|
|
1554
1549
|
initialValues: Object.entries(e).map(
|
|
1555
1550
|
([n, r]) => [
|
|
1556
|
-
|
|
1551
|
+
qn[n],
|
|
1557
1552
|
r
|
|
1558
1553
|
]
|
|
1559
1554
|
),
|
|
@@ -1562,41 +1557,41 @@ const Qe = M(
|
|
|
1562
1557
|
)
|
|
1563
1558
|
);
|
|
1564
1559
|
export {
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1560
|
+
dn as AgDialog,
|
|
1561
|
+
Co as AppLayout,
|
|
1562
|
+
xo as AtomProvider,
|
|
1568
1563
|
xt as Context,
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1564
|
+
$e as ContextError,
|
|
1565
|
+
wo as DomainCodeDialog,
|
|
1566
|
+
lo as ExampleComponent,
|
|
1567
|
+
go as FetchAutocomplete,
|
|
1568
|
+
Xn as HydrateAtoms,
|
|
1574
1569
|
ct as NAVBAR_WIDTH_CLOSED,
|
|
1575
1570
|
lt as NAVBAR_WIDTH_OPENED,
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1571
|
+
ho as NavBar,
|
|
1572
|
+
po as NavBarDarkStyledList,
|
|
1573
|
+
uo as NavBarLightStyledList,
|
|
1574
|
+
sn as NavBarProvider,
|
|
1575
|
+
mo as PageLayout,
|
|
1576
|
+
Wn as SaladBarProvider,
|
|
1577
|
+
fo as SingleAutocomplete,
|
|
1578
|
+
Gn as atomStore,
|
|
1579
|
+
cn as buildNavBarState,
|
|
1585
1580
|
bt as domainCodeAtom,
|
|
1586
|
-
|
|
1587
|
-
|
|
1581
|
+
bo as fed21Theme,
|
|
1582
|
+
Ao as internalAgSystemsTheme,
|
|
1588
1583
|
V as navBarClasses,
|
|
1589
1584
|
K as navBarOpenAtom,
|
|
1590
1585
|
Ct as navBarTopAtom,
|
|
1591
1586
|
ft as navBarWidthClosedAtom,
|
|
1592
1587
|
gt as navBarWidthOpenAtom,
|
|
1593
|
-
|
|
1588
|
+
be as titleTextAtom,
|
|
1594
1589
|
mt as topBarHeightAtom,
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1590
|
+
ln as useNavBar,
|
|
1591
|
+
zn as useSaladBar,
|
|
1592
|
+
So as withAtomProvider,
|
|
1593
|
+
co as withNavBarProvider,
|
|
1594
|
+
Do as withOverrideDefaults,
|
|
1595
|
+
vo as withSaladBarProvider
|
|
1601
1596
|
};
|
|
1602
1597
|
//# sourceMappingURL=index.js.map
|