@australiangreens/ag-internal-components 0.0.31 → 0.0.32
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,22 +1,22 @@
|
|
|
1
1
|
var nt = Object.defineProperty, rt = Object.defineProperties;
|
|
2
2
|
var ot = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var q = Object.getOwnPropertySymbols;
|
|
4
|
-
var we = Object.prototype.hasOwnProperty,
|
|
4
|
+
var we = Object.prototype.hasOwnProperty, Ce = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var ie = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
we.call(t, n) && ie(e, n, t[n]);
|
|
8
8
|
if (q)
|
|
9
9
|
for (var n of q(t))
|
|
10
|
-
|
|
10
|
+
Ce.call(t, n) && ie(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, v = (e, t) => rt(e, ot(t));
|
|
13
|
-
var
|
|
13
|
+
var me = (e, t) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in e)
|
|
16
16
|
we.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
|
17
17
|
if (e != null && q)
|
|
18
18
|
for (var i of q(e))
|
|
19
|
-
t.indexOf(i) < 0 &&
|
|
19
|
+
t.indexOf(i) < 0 && Ce.call(e, i) && (n[i] = e[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var Te = (e, t, n) => (ie(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
@@ -38,9 +38,9 @@ var ae = (e, t, n) => new Promise((i, a) => {
|
|
|
38
38
|
});
|
|
39
39
|
import { jsxs as c, Fragment as M, jsx as o } from "react/jsx-runtime";
|
|
40
40
|
import { useState as B, createContext as ce, useCallback as Y, useContext as pe, useEffect as K, useReducer as it, useMemo as at, useRef as se } from "react";
|
|
41
|
-
import { Typography as
|
|
41
|
+
import { Typography as y, Button as st, Paper as ue, styled as F, Box as T, IconButton as W, Drawer as dt, Container as De, Divider as Oe, CssBaseline as lt, Snackbar as ct, Alert as pt, CircularProgress as Ee, LinearProgress as ut, Autocomplete as ht, TextField as gt } from "@mui/material";
|
|
42
42
|
import ft from "@mui/material/CssBaseline";
|
|
43
|
-
import { styled as
|
|
43
|
+
import { styled as D } from "@mui/material/styles";
|
|
44
44
|
import Pe from "@mui/material/Drawer";
|
|
45
45
|
import { AgError as vt } from "@australiangreens/ag-error";
|
|
46
46
|
import { createHelper as ke } from "souvlaki";
|
|
@@ -48,17 +48,16 @@ import _e from "@mui/material/List";
|
|
|
48
48
|
import Be from "@mui/material/Button";
|
|
49
49
|
import xt from "@mui/material/Dialog";
|
|
50
50
|
import wt from "@mui/material/DialogActions";
|
|
51
|
-
import
|
|
52
|
-
import
|
|
51
|
+
import Ct from "@mui/material/DialogContent";
|
|
52
|
+
import mt from "@mui/material/DialogTitle";
|
|
53
53
|
import { ArrowForward as Re, ArrowBack as He, ViewHeadline as Tt } from "@mui/icons-material";
|
|
54
|
-
import Ot from "
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
function Mn({ text: e }) {
|
|
54
|
+
import { useAtom as Ot, useAtomValue as Bt, useSetAtom as bt } from "jotai";
|
|
55
|
+
import { atomWithStorage as It, RESET as Nt } from "jotai/utils";
|
|
56
|
+
function Hn({ text: e }) {
|
|
58
57
|
const [t, n] = B(0);
|
|
59
58
|
return /* @__PURE__ */ c(M, { children: [
|
|
60
|
-
/* @__PURE__ */ o(
|
|
61
|
-
/* @__PURE__ */ o(
|
|
59
|
+
/* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
|
|
60
|
+
/* @__PURE__ */ o(y, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
|
|
62
61
|
/* @__PURE__ */ o(
|
|
63
62
|
st,
|
|
64
63
|
{
|
|
@@ -86,7 +85,7 @@ const Me = 330, We = 73, S = "Navbar", L = {
|
|
|
86
85
|
userInfoHolder: `${S}-userInfoHolder`,
|
|
87
86
|
settings: `${S}-settings`,
|
|
88
87
|
pieChartIcon: `${S}-pieChartIcon`
|
|
89
|
-
},
|
|
88
|
+
}, St = D("div", { name: "NavBar" })(({ theme: e }) => ({
|
|
90
89
|
[`&.${L.root}`]: {
|
|
91
90
|
display: "flex"
|
|
92
91
|
},
|
|
@@ -113,11 +112,11 @@ const Me = 330, We = 73, S = "Navbar", L = {
|
|
|
113
112
|
color: "white",
|
|
114
113
|
backgroundColor: "black"
|
|
115
114
|
// backgroundColor: '#e8e8e8',
|
|
116
|
-
}),
|
|
115
|
+
}), At = () => r({
|
|
117
116
|
width: Me
|
|
118
|
-
}, Fe()),
|
|
117
|
+
}, Fe()), $t = () => r({
|
|
119
118
|
width: We
|
|
120
|
-
}, Fe()),
|
|
119
|
+
}, Fe()), Lt = D(Pe, {
|
|
121
120
|
shouldForwardProp: (e) => e !== "open"
|
|
122
121
|
})(({ theme: e, open: t }) => r(r({
|
|
123
122
|
width: t ? Me : We,
|
|
@@ -126,16 +125,16 @@ const Me = 330, We = 73, S = "Navbar", L = {
|
|
|
126
125
|
boxSizing: "border-box",
|
|
127
126
|
zIndex: e.zIndex.drawer + 100
|
|
128
127
|
}, t && {
|
|
129
|
-
"& .MuiDrawer-paper":
|
|
128
|
+
"& .MuiDrawer-paper": At()
|
|
130
129
|
}), !t && {
|
|
131
|
-
"& .MuiDrawer-paper":
|
|
130
|
+
"& .MuiDrawer-paper": $t()
|
|
132
131
|
}));
|
|
133
132
|
class J extends vt {
|
|
134
133
|
}
|
|
135
134
|
Te(J, "errorName", "ContextError");
|
|
136
|
-
const ze = ce(null), yt = {},
|
|
135
|
+
const ze = ce(null), yt = {}, Dt = {}, Et = ({
|
|
137
136
|
overrideState: e = yt,
|
|
138
|
-
overrideActions: t =
|
|
137
|
+
overrideActions: t = Dt,
|
|
139
138
|
children: n
|
|
140
139
|
}) => {
|
|
141
140
|
const [{ open: i }, a] = B({ open: !0 }), l = Y((d) => {
|
|
@@ -148,16 +147,16 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
148
147
|
toggleOpen: p
|
|
149
148
|
}, e), t);
|
|
150
149
|
return /* @__PURE__ */ o(ze.Provider, { value: u, children: n });
|
|
151
|
-
},
|
|
150
|
+
}, Pt = () => {
|
|
152
151
|
const e = pe(ze);
|
|
153
152
|
if (e === null)
|
|
154
153
|
throw new J("Error: Tried to useNavBar outside of a <NavBarProvider>");
|
|
155
154
|
return e;
|
|
156
|
-
},
|
|
155
|
+
}, kt = (e = {}) => r({
|
|
157
156
|
open: !0
|
|
158
|
-
}, e),
|
|
159
|
-
(e =
|
|
160
|
-
), be = 7,
|
|
157
|
+
}, e), Mn = ke(
|
|
158
|
+
(e = kt(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Et, { overrideState: e, overrideActions: t, children: n })
|
|
159
|
+
), be = 7, Wn = D(_e)(({ theme: e }) => ({
|
|
161
160
|
backgroundColor: "black",
|
|
162
161
|
color: "white",
|
|
163
162
|
"& .MuiListItem-root": {
|
|
@@ -195,7 +194,7 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
195
194
|
// '&.Mui-selected.Mui-focusVisible:hover': {
|
|
196
195
|
// },
|
|
197
196
|
}
|
|
198
|
-
})), Ie = 7,
|
|
197
|
+
})), Ie = 7, Fn = D(_e)(({ theme: e }) => ({
|
|
199
198
|
backgroundColor: "#e8e8e8",
|
|
200
199
|
color: "inherit",
|
|
201
200
|
"& .MuiListItem-root": {
|
|
@@ -234,15 +233,15 @@ const ze = ce(null), yt = {}, Et = {}, Pt = ({
|
|
|
234
233
|
// },
|
|
235
234
|
}
|
|
236
235
|
}));
|
|
237
|
-
function
|
|
236
|
+
function zn({
|
|
238
237
|
"data-testid": e,
|
|
239
238
|
children: t
|
|
240
239
|
}) {
|
|
241
|
-
const { open: n } =
|
|
242
|
-
return /* @__PURE__ */ c(
|
|
240
|
+
const { open: n } = Pt();
|
|
241
|
+
return /* @__PURE__ */ c(St, { className: L.root, "data-testid": e, children: [
|
|
243
242
|
/* @__PURE__ */ o(ft, {}),
|
|
244
243
|
/* @__PURE__ */ o(
|
|
245
|
-
|
|
244
|
+
Lt,
|
|
246
245
|
{
|
|
247
246
|
variant: "permanent",
|
|
248
247
|
anchor: "left",
|
|
@@ -253,7 +252,7 @@ function Gn({
|
|
|
253
252
|
)
|
|
254
253
|
] });
|
|
255
254
|
}
|
|
256
|
-
const
|
|
255
|
+
const _t = ({
|
|
257
256
|
isOpen: e,
|
|
258
257
|
dialogTitle: t,
|
|
259
258
|
children: n,
|
|
@@ -274,8 +273,8 @@ const Un = ({
|
|
|
274
273
|
fullWidth: !0,
|
|
275
274
|
maxWidth: i != null ? i : "xs",
|
|
276
275
|
children: [
|
|
277
|
-
/* @__PURE__ */ o(
|
|
278
|
-
/* @__PURE__ */ o(
|
|
276
|
+
/* @__PURE__ */ o(mt, { children: t }),
|
|
277
|
+
/* @__PURE__ */ o(Ct, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
|
|
279
278
|
/* @__PURE__ */ c(wt, { children: [
|
|
280
279
|
/* @__PURE__ */ o(
|
|
281
280
|
Be,
|
|
@@ -302,7 +301,7 @@ const Un = ({
|
|
|
302
301
|
]
|
|
303
302
|
}
|
|
304
303
|
);
|
|
305
|
-
}, Rt = 24, Ht = 64, A = "TopBar",
|
|
304
|
+
}, Rt = 24, Ht = 64, A = "TopBar", m = {
|
|
306
305
|
topStripe: `${A}-topStripe`,
|
|
307
306
|
titleBar: `${A}-titleBar`,
|
|
308
307
|
titleSlider: `${A}-titleSlider`,
|
|
@@ -316,18 +315,18 @@ const Un = ({
|
|
|
316
315
|
var i, a;
|
|
317
316
|
return {
|
|
318
317
|
width: "100%",
|
|
319
|
-
[`& .${
|
|
318
|
+
[`& .${m.topStripe}`]: {
|
|
320
319
|
width: "100%",
|
|
321
320
|
height: `${Rt}px`,
|
|
322
321
|
backgroundColor: e.palette.primary.main
|
|
323
322
|
},
|
|
324
|
-
[`& .${
|
|
323
|
+
[`& .${m.titleBar}`]: {
|
|
325
324
|
backgroundColor: e.palette.primary.light,
|
|
326
325
|
height: `${Ht}px`,
|
|
327
326
|
padding: e.spacing(0, 3),
|
|
328
327
|
width: "100%"
|
|
329
328
|
},
|
|
330
|
-
[`& .${
|
|
329
|
+
[`& .${m.titleSlider}`]: r(r({
|
|
331
330
|
height: "100%",
|
|
332
331
|
display: "flex",
|
|
333
332
|
alignItems: "center",
|
|
@@ -336,14 +335,14 @@ const Un = ({
|
|
|
336
335
|
easing: e.transitions.easing.sharp,
|
|
337
336
|
duration: e.transitions.duration.leavingScreen
|
|
338
337
|
}),
|
|
339
|
-
[`& .${
|
|
338
|
+
[`& .${m.leftPanelButton}`]: {
|
|
340
339
|
marginRight: e.spacing(2),
|
|
341
340
|
flexGrow: 0
|
|
342
341
|
},
|
|
343
|
-
[`& .${
|
|
342
|
+
[`& .${m.titleText}`]: {
|
|
344
343
|
flexGrow: 1
|
|
345
344
|
},
|
|
346
|
-
[`& .${
|
|
345
|
+
[`& .${m.rightPanelButton}`]: {
|
|
347
346
|
flexGrow: 0
|
|
348
347
|
}
|
|
349
348
|
}, (t == null ? void 0 : t.open) && {
|
|
@@ -368,12 +367,12 @@ function Wt({
|
|
|
368
367
|
"data-testid": i
|
|
369
368
|
}) {
|
|
370
369
|
return /* @__PURE__ */ c(Mt, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
|
|
371
|
-
/* @__PURE__ */ o("div", { className:
|
|
372
|
-
/* @__PURE__ */ o("div", { className:
|
|
370
|
+
/* @__PURE__ */ o("div", { className: m.topStripe }),
|
|
371
|
+
/* @__PURE__ */ o("div", { className: m.titleBar, children: /* @__PURE__ */ c(T, { className: m.titleSlider, children: [
|
|
373
372
|
t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ c(
|
|
374
373
|
W,
|
|
375
374
|
{
|
|
376
|
-
className:
|
|
375
|
+
className: m.leftPanelButton,
|
|
377
376
|
color: "inherit",
|
|
378
377
|
"aria-label": "Open left side panel",
|
|
379
378
|
onClick: t == null ? void 0 : t.onOpen,
|
|
@@ -385,11 +384,11 @@ function Wt({
|
|
|
385
384
|
]
|
|
386
385
|
}
|
|
387
386
|
),
|
|
388
|
-
/* @__PURE__ */ o(
|
|
387
|
+
/* @__PURE__ */ o(y, { className: m.titleText, variant: "h6", noWrap: !0, children: e }),
|
|
389
388
|
n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ c(
|
|
390
389
|
W,
|
|
391
390
|
{
|
|
392
|
-
className:
|
|
391
|
+
className: m.rightPanelButton,
|
|
393
392
|
color: "inherit",
|
|
394
393
|
"aria-label": "Open right side panel",
|
|
395
394
|
onClick: n == null ? void 0 : n.onOpen,
|
|
@@ -468,8 +467,8 @@ function Ne({
|
|
|
468
467
|
onOpened: s,
|
|
469
468
|
onClosed: x,
|
|
470
469
|
"data-testid": w,
|
|
471
|
-
navBarOpen:
|
|
472
|
-
navBarWidthOpen:
|
|
470
|
+
navBarOpen: h = !1,
|
|
471
|
+
navBarWidthOpen: C = 0,
|
|
473
472
|
navBarWidthClosed: b = 0
|
|
474
473
|
}) {
|
|
475
474
|
return /* @__PURE__ */ c(
|
|
@@ -485,12 +484,12 @@ function Ne({
|
|
|
485
484
|
width: l,
|
|
486
485
|
debugOpacity: u,
|
|
487
486
|
"data-testid": w,
|
|
488
|
-
navBarOpen:
|
|
489
|
-
navBarWidthOpen:
|
|
487
|
+
navBarOpen: h,
|
|
488
|
+
navBarWidthOpen: C,
|
|
490
489
|
navBarWidthClosed: b,
|
|
491
490
|
children: [
|
|
492
491
|
/* @__PURE__ */ o(zt, v(r({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ c(M, { children: [
|
|
493
|
-
/* @__PURE__ */ o(
|
|
492
|
+
/* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a }),
|
|
494
493
|
p && /* @__PURE__ */ c(W, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
|
|
495
494
|
/* @__PURE__ */ o(He, { "data-testid": "arrowbackicon" }),
|
|
496
495
|
" "
|
|
@@ -500,7 +499,7 @@ function Ne({
|
|
|
500
499
|
/* @__PURE__ */ o(Re, {}),
|
|
501
500
|
" "
|
|
502
501
|
] }),
|
|
503
|
-
/* @__PURE__ */ o(
|
|
502
|
+
/* @__PURE__ */ o(y, { variant: "h6", color: "inherit", component: "div", children: a })
|
|
504
503
|
] }) })),
|
|
505
504
|
e
|
|
506
505
|
]
|
|
@@ -530,7 +529,7 @@ const Gt = F("div", {
|
|
|
530
529
|
}),
|
|
531
530
|
marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
|
|
532
531
|
});
|
|
533
|
-
}), Ut = F(
|
|
532
|
+
}), Ut = F(De, {
|
|
534
533
|
name: "PageContainer"
|
|
535
534
|
})(({ theme: e }) => ({
|
|
536
535
|
// Horizontal padding comes from the Container's gutter
|
|
@@ -549,7 +548,7 @@ const Gt = F("div", {
|
|
|
549
548
|
onClosed: void 0,
|
|
550
549
|
dataTestId: void 0
|
|
551
550
|
};
|
|
552
|
-
function
|
|
551
|
+
function Gn({
|
|
553
552
|
children: e,
|
|
554
553
|
titleText: t = "",
|
|
555
554
|
leftPanel: n,
|
|
@@ -563,13 +562,13 @@ function Vn({
|
|
|
563
562
|
navBarWidthOpen: x,
|
|
564
563
|
navBarWidthClosed: w
|
|
565
564
|
}) {
|
|
566
|
-
const [
|
|
565
|
+
const [h, C] = B(de), [b, I] = B(le), [Z, z] = B(de), [ee, E] = B(le), P = n !== void 0, k = i !== void 0, {
|
|
567
566
|
titleText: O,
|
|
568
567
|
content: G,
|
|
569
568
|
flavour: U,
|
|
570
569
|
open: _,
|
|
571
570
|
onChangeOpen: R,
|
|
572
|
-
width:
|
|
571
|
+
width: g,
|
|
573
572
|
arrowButtons: f,
|
|
574
573
|
startOpen: $,
|
|
575
574
|
onOpened: Qe,
|
|
@@ -578,7 +577,7 @@ function Vn({
|
|
|
578
577
|
} = n ? r(r({}, Q), n) : r({}, Q), {
|
|
579
578
|
titleText: Ke,
|
|
580
579
|
content: Je,
|
|
581
|
-
flavour:
|
|
580
|
+
flavour: ge,
|
|
582
581
|
open: te,
|
|
583
582
|
onChangeOpen: fe,
|
|
584
583
|
width: ne,
|
|
@@ -589,14 +588,14 @@ function Vn({
|
|
|
589
588
|
dataTestId: tt
|
|
590
589
|
} = i ? r(r({}, Q), i) : r({}, Q);
|
|
591
590
|
K(() => {
|
|
592
|
-
$ !== de && (
|
|
591
|
+
$ !== de && (C($), z($));
|
|
593
592
|
}, [$]), K(() => {
|
|
594
593
|
X !== le && (I(X), E(X));
|
|
595
594
|
}, [X]);
|
|
596
|
-
const re = _ === void 0 ?
|
|
597
|
-
_ === void 0 && (
|
|
595
|
+
const re = _ === void 0 ? h : _, oe = te === void 0 ? b : te, ve = (N) => {
|
|
596
|
+
_ === void 0 && (C(N), a && k && (N ? (I(!1), E(b)) : I(ee))), R && R(N);
|
|
598
597
|
}, xe = (N) => {
|
|
599
|
-
te === void 0 && (I(N), a && P && (N ? (
|
|
598
|
+
te === void 0 && (I(N), a && P && (N ? (C(!1), z(h)) : C(Z))), fe && fe(N);
|
|
600
599
|
};
|
|
601
600
|
return /* @__PURE__ */ c(T, { children: [
|
|
602
601
|
P && /* @__PURE__ */ o(
|
|
@@ -606,7 +605,7 @@ function Vn({
|
|
|
606
605
|
anchor: "left",
|
|
607
606
|
open: re,
|
|
608
607
|
onClose: () => ve(!1),
|
|
609
|
-
width:
|
|
608
|
+
width: g,
|
|
610
609
|
titleText: O,
|
|
611
610
|
debugOpacity: l,
|
|
612
611
|
showCloseArrow: f === "both" || f === "close",
|
|
@@ -645,11 +644,11 @@ function Vn({
|
|
|
645
644
|
}, P && U === "push" ? {
|
|
646
645
|
leftPanel: {
|
|
647
646
|
open: re,
|
|
648
|
-
width:
|
|
647
|
+
width: g,
|
|
649
648
|
onOpen: () => ve(!0),
|
|
650
649
|
showOpenArrow: f === "both" || f === "open"
|
|
651
650
|
}
|
|
652
|
-
} : {}), k &&
|
|
651
|
+
} : {}), k && ge === "push" ? {
|
|
653
652
|
rightPanel: {
|
|
654
653
|
open: oe,
|
|
655
654
|
width: ne,
|
|
@@ -663,9 +662,9 @@ function Vn({
|
|
|
663
662
|
v(r(r({}, U === "push" ? {
|
|
664
663
|
leftPanel: {
|
|
665
664
|
open: re,
|
|
666
|
-
width:
|
|
665
|
+
width: g
|
|
667
666
|
}
|
|
668
|
-
} : {}),
|
|
667
|
+
} : {}), ge === "push" ? {
|
|
669
668
|
rightPanel: {
|
|
670
669
|
open: oe,
|
|
671
670
|
width: ne
|
|
@@ -725,12 +724,12 @@ const Ue = ce(null), Yt = {}, Kt = {}, Jt = ({
|
|
|
725
724
|
] = it(jt, Qt), x = at(
|
|
726
725
|
() => ({
|
|
727
726
|
toggleNavBarOpen: () => s({ type: "toggleNavBarOpen" }),
|
|
728
|
-
setNavBarOpen: (
|
|
729
|
-
setNavBarWidthOpen: (
|
|
730
|
-
setNavBarWidthClosed: (
|
|
731
|
-
setTitleText: (
|
|
732
|
-
setTopBarHeight: (
|
|
733
|
-
setNavBarTop: (
|
|
727
|
+
setNavBarOpen: (h) => s({ type: "setNavBarOpen", payload: h }),
|
|
728
|
+
setNavBarWidthOpen: (h) => s({ type: "setNavBarWidthOpen", payload: h }),
|
|
729
|
+
setNavBarWidthClosed: (h) => s({ type: "setNavBarWidthClosed", payload: h }),
|
|
730
|
+
setTitleText: (h) => s({ type: "setTitleText", payload: h }),
|
|
731
|
+
setTopBarHeight: (h) => s({ type: "setTopBarHeight", payload: h }),
|
|
732
|
+
setNavBarTop: (h) => s({ type: "setNavBarTop", payload: h }),
|
|
734
733
|
clearNavBarTop: () => s({ type: "setNavBarTop", payload: void 0 })
|
|
735
734
|
}),
|
|
736
735
|
[]
|
|
@@ -771,7 +770,7 @@ function tn({ titleText: e = "", height: t, "data-testid": n }) {
|
|
|
771
770
|
},
|
|
772
771
|
children: [
|
|
773
772
|
/* @__PURE__ */ o(W, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: i, children: /* @__PURE__ */ o(Tt, { fontSize: "medium" }) }),
|
|
774
|
-
/* @__PURE__ */ o(
|
|
773
|
+
/* @__PURE__ */ o(y, { className: en.titleText, variant: "h6", children: e })
|
|
775
774
|
]
|
|
776
775
|
}
|
|
777
776
|
) });
|
|
@@ -784,7 +783,7 @@ const j = "Navbar", H = {
|
|
|
784
783
|
// userInfoHolder: `${PREFIX}-userInfoHolder`,
|
|
785
784
|
// settings: `${PREFIX}-settings`,
|
|
786
785
|
// pieChartIcon: `${PREFIX}-pieChartIcon`,
|
|
787
|
-
}, nn =
|
|
786
|
+
}, nn = D("div", { name: "NavBar" })(({ theme: e }) => ({
|
|
788
787
|
[`&.${H.root}`]: {
|
|
789
788
|
display: "flex"
|
|
790
789
|
},
|
|
@@ -827,7 +826,7 @@ const j = "Navbar", H = {
|
|
|
827
826
|
duration: e.transitions.duration.leavingScreen
|
|
828
827
|
}),
|
|
829
828
|
overflowX: "hidden"
|
|
830
|
-
}, Xe(e, n)), rn =
|
|
829
|
+
}, Xe(e, n)), rn = D(Pe, {
|
|
831
830
|
shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
|
|
832
831
|
})(({ theme: e, open: t, widthOpen: n, widthClosed: i, offsetTop: a }) => r(r({
|
|
833
832
|
flexShrink: 0,
|
|
@@ -886,7 +885,7 @@ function sn({ children: e, topBarHeight: t }) {
|
|
|
886
885
|
flexGrow: 1
|
|
887
886
|
},
|
|
888
887
|
children: /* @__PURE__ */ o(
|
|
889
|
-
|
|
888
|
+
De,
|
|
890
889
|
{
|
|
891
890
|
component: "main",
|
|
892
891
|
id: "main-content",
|
|
@@ -912,8 +911,8 @@ function dn({
|
|
|
912
911
|
setNavBarOpen: s,
|
|
913
912
|
titleText: x,
|
|
914
913
|
setTitleText: w,
|
|
915
|
-
topBarHeight:
|
|
916
|
-
navBarWidthOpen:
|
|
914
|
+
topBarHeight: h,
|
|
915
|
+
navBarWidthOpen: C,
|
|
917
916
|
navBarWidthClosed: b,
|
|
918
917
|
navBarTop: I
|
|
919
918
|
} = Ve();
|
|
@@ -923,7 +922,7 @@ function dn({
|
|
|
923
922
|
console.log(n), n !== void 0 && s(n);
|
|
924
923
|
}, [n, s]), /* @__PURE__ */ c(T, { children: [
|
|
925
924
|
/* @__PURE__ */ o(lt, {}),
|
|
926
|
-
/* @__PURE__ */ o(tn, { titleText: x, "data-testid": l, height:
|
|
925
|
+
/* @__PURE__ */ o(tn, { titleText: x, "data-testid": l, height: h }),
|
|
927
926
|
/* @__PURE__ */ c(T, { sx: { display: "flex" }, children: [
|
|
928
927
|
/* @__PURE__ */ o(
|
|
929
928
|
an,
|
|
@@ -932,9 +931,9 @@ function dn({
|
|
|
932
931
|
top: I,
|
|
933
932
|
middle: u,
|
|
934
933
|
bottom: /* @__PURE__ */ o(T, { sx: { padding: 2 }, children: /* @__PURE__ */ o(ue, { sx: { padding: 2, textWrap: "initial" }, variant: "outlined", children: "Placeholder for standard user settings, domain selector etc. It should be at the very bottom, but WIP" }) }),
|
|
935
|
-
widthOpen:
|
|
934
|
+
widthOpen: C,
|
|
936
935
|
widthClosed: b,
|
|
937
|
-
offsetTop:
|
|
936
|
+
offsetTop: h,
|
|
938
937
|
"data-testid": p
|
|
939
938
|
}
|
|
940
939
|
),
|
|
@@ -942,7 +941,7 @@ function dn({
|
|
|
942
941
|
sn,
|
|
943
942
|
v(r({
|
|
944
943
|
"data-testid": a,
|
|
945
|
-
topBarHeight:
|
|
944
|
+
topBarHeight: h
|
|
946
945
|
}, i), {
|
|
947
946
|
children: e
|
|
948
947
|
})
|
|
@@ -950,7 +949,7 @@ function dn({
|
|
|
950
949
|
] })
|
|
951
950
|
] });
|
|
952
951
|
}
|
|
953
|
-
function
|
|
952
|
+
function Un(e) {
|
|
954
953
|
return /* @__PURE__ */ o(Jt, { children: /* @__PURE__ */ o(dn, r({}, e)) });
|
|
955
954
|
}
|
|
956
955
|
const ln = {
|
|
@@ -967,42 +966,42 @@ const ln = {
|
|
|
967
966
|
variant: "standard",
|
|
968
967
|
progressIndicator: void 0
|
|
969
968
|
// Can use 'circular' or 'linear'
|
|
970
|
-
}, Le = 100,
|
|
969
|
+
}, Le = 100, ye = 2e3, pn = 2e3, un = (() => {
|
|
971
970
|
let e = 0;
|
|
972
971
|
return () => (e += 1, e);
|
|
973
|
-
})(),
|
|
972
|
+
})(), hn = {
|
|
974
973
|
borderBottomLeftRadius: "0px",
|
|
975
974
|
borderBottomRightRadius: "0px"
|
|
976
|
-
},
|
|
975
|
+
}, gn = {}, fn = {}, qe = ce(null);
|
|
977
976
|
function vn(l) {
|
|
978
977
|
var p = l, {
|
|
979
|
-
overrideState: e =
|
|
978
|
+
overrideState: e = gn,
|
|
980
979
|
overrideActions: t = fn,
|
|
981
980
|
shouldClose: n = cn.shouldClose,
|
|
982
981
|
children: i
|
|
983
|
-
} = p, a =
|
|
982
|
+
} = p, a = me(p, [
|
|
984
983
|
"overrideState",
|
|
985
984
|
"overrideActions",
|
|
986
985
|
"shouldClose",
|
|
987
986
|
"children"
|
|
988
987
|
]);
|
|
989
988
|
var R;
|
|
990
|
-
const [{ open: u }, d] = B({ open: !1 }), s = se([]), x = se(Date.now()), w = se(0),
|
|
991
|
-
d({ open:
|
|
992
|
-
}, []),
|
|
993
|
-
w.current += 1, s.current.length >= Le && Date.now() - x.current >=
|
|
994
|
-
`SaladBarProvider: MAX_QUEUE_LENGTH (${Le}) hit ${w.current} times in last ${
|
|
989
|
+
const [{ open: u }, d] = B({ open: !1 }), s = se([]), x = se(Date.now()), w = se(0), h = Y((g) => {
|
|
990
|
+
d({ open: g });
|
|
991
|
+
}, []), C = Y((g = {}) => {
|
|
992
|
+
w.current += 1, s.current.length >= Le && Date.now() - x.current >= ye && (x.current = Date.now(), console.error(
|
|
993
|
+
`SaladBarProvider: MAX_QUEUE_LENGTH (${Le}) hit ${w.current} times in last ${ye}ms)`
|
|
995
994
|
), w.current = 0);
|
|
996
995
|
const f = r(v(r({}, $e), {
|
|
997
996
|
key: un()
|
|
998
|
-
}),
|
|
997
|
+
}), g);
|
|
999
998
|
return s.current.push(f), s.current.length === 1 && d({ open: !0 }), f.key;
|
|
1000
|
-
}, []), b = (
|
|
1001
|
-
const f = s.current.findIndex(($) => $.key ===
|
|
999
|
+
}, []), b = (g = "", f = {}) => C(r({ message: g, severity: "success" }, f)), I = (g = "", f = {}) => C(r({ message: g, severity: "info" }, f)), Z = (g = "", f = {}) => C(r({ message: g, severity: "warning" }, f)), z = (g = "", f = {}) => C(r({ message: g, severity: "error" }, f)), ee = (g) => {
|
|
1000
|
+
const f = s.current.findIndex(($) => $.key === g);
|
|
1002
1001
|
if (f !== -1)
|
|
1003
1002
|
return f === 0 ? (d({ open: !1 }), s.current[0]) : s.current.splice(f, 1);
|
|
1004
|
-
}, E = (
|
|
1005
|
-
n(
|
|
1003
|
+
}, E = (g, f) => {
|
|
1004
|
+
n(g, f) && d({ open: !1 });
|
|
1006
1005
|
}, P = () => {
|
|
1007
1006
|
}, k = () => {
|
|
1008
1007
|
s.current.shift(), s.current.length > 0 && d({ open: !0 });
|
|
@@ -1010,8 +1009,8 @@ function vn(l) {
|
|
|
1010
1009
|
"autoHideDuration" in O && (G.autoHideDuration = O.autoHideDuration);
|
|
1011
1010
|
const U = r(r({}, ln), a), _ = r(r({
|
|
1012
1011
|
open: u,
|
|
1013
|
-
setOpen:
|
|
1014
|
-
enqueueNotification:
|
|
1012
|
+
setOpen: h,
|
|
1013
|
+
enqueueNotification: C,
|
|
1015
1014
|
enqueueSuccessNotification: b,
|
|
1016
1015
|
enqueueInfoNotification: I,
|
|
1017
1016
|
enqueueWarningNotification: Z,
|
|
@@ -1034,11 +1033,11 @@ function vn(l) {
|
|
|
1034
1033
|
/* @__PURE__ */ o(
|
|
1035
1034
|
pt,
|
|
1036
1035
|
{
|
|
1037
|
-
onClose: (
|
|
1036
|
+
onClose: (g) => E(g, "closeAlert"),
|
|
1038
1037
|
severity: O.severity,
|
|
1039
1038
|
variant: "filled",
|
|
1040
1039
|
icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(Ee, { size: "1em" }) : void 0,
|
|
1041
|
-
style: O.progressIndicator === "linear" ?
|
|
1040
|
+
style: O.progressIndicator === "linear" ? hn : void 0,
|
|
1042
1041
|
children: O.message
|
|
1043
1042
|
}
|
|
1044
1043
|
),
|
|
@@ -1048,18 +1047,18 @@ function vn(l) {
|
|
|
1048
1047
|
)
|
|
1049
1048
|
] });
|
|
1050
1049
|
}
|
|
1051
|
-
function
|
|
1050
|
+
function Vn() {
|
|
1052
1051
|
const e = pe(qe);
|
|
1053
1052
|
if (e === null)
|
|
1054
1053
|
throw new J("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
|
|
1055
1054
|
return e;
|
|
1056
1055
|
}
|
|
1057
|
-
const
|
|
1056
|
+
const Xn = ke(
|
|
1058
1057
|
(e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(vn, v(r({}, e), { overrideState: t, overrideActions: n, children: i }))
|
|
1059
|
-
),
|
|
1060
|
-
const [e, t] =
|
|
1061
|
-
return [e, t, () => t(
|
|
1062
|
-
},
|
|
1058
|
+
), he = It("domainCode", "ag"), xn = () => {
|
|
1059
|
+
const [e, t] = Ot(he);
|
|
1060
|
+
return [e, t, () => t(Nt)];
|
|
1061
|
+
}, qn = () => Bt(he), Qn = () => bt(he), wn = {
|
|
1063
1062
|
act: "ACT",
|
|
1064
1063
|
nsw: "NSW",
|
|
1065
1064
|
nt: "NT",
|
|
@@ -1071,10 +1070,10 @@ const Qn = ke(
|
|
|
1071
1070
|
ag: "AG",
|
|
1072
1071
|
fedmps: "Fedmps",
|
|
1073
1072
|
"": ""
|
|
1074
|
-
},
|
|
1073
|
+
}, Cn = (e) => {
|
|
1075
1074
|
var t;
|
|
1076
1075
|
return e === null ? "N/A" : (t = wn[e]) != null ? t : "";
|
|
1077
|
-
},
|
|
1076
|
+
}, jn = ({
|
|
1078
1077
|
isLoading: e,
|
|
1079
1078
|
isOpen: t,
|
|
1080
1079
|
onClose: n,
|
|
@@ -1082,7 +1081,7 @@ const Qn = ke(
|
|
|
1082
1081
|
}) => {
|
|
1083
1082
|
const [a, l] = xn(), [p, u] = B(a);
|
|
1084
1083
|
return /* @__PURE__ */ c(
|
|
1085
|
-
|
|
1084
|
+
_t,
|
|
1086
1085
|
{
|
|
1087
1086
|
isOpen: t,
|
|
1088
1087
|
dialogTitle: "Select an organisation",
|
|
@@ -1096,17 +1095,17 @@ const Qn = ke(
|
|
|
1096
1095
|
children: [
|
|
1097
1096
|
/* @__PURE__ */ o("p", { children: "Select the default organisation that you want to use with the List Manager." }),
|
|
1098
1097
|
/* @__PURE__ */ o(
|
|
1099
|
-
|
|
1098
|
+
ht,
|
|
1100
1099
|
{
|
|
1101
1100
|
loading: e,
|
|
1102
1101
|
multiple: !1,
|
|
1103
1102
|
disableClearable: !1,
|
|
1104
1103
|
value: p,
|
|
1105
1104
|
onChange: (d, s) => u(s != null ? s : ""),
|
|
1106
|
-
getOptionLabel:
|
|
1105
|
+
getOptionLabel: Cn,
|
|
1107
1106
|
options: i,
|
|
1108
1107
|
renderInput: (d) => /* @__PURE__ */ o(
|
|
1109
|
-
|
|
1108
|
+
gt,
|
|
1110
1109
|
v(r({}, d), {
|
|
1111
1110
|
variant: "filled",
|
|
1112
1111
|
label: "Select organisation",
|
|
@@ -1125,30 +1124,30 @@ const Qn = ke(
|
|
|
1125
1124
|
);
|
|
1126
1125
|
};
|
|
1127
1126
|
export {
|
|
1128
|
-
|
|
1129
|
-
|
|
1127
|
+
_t as AgDialog,
|
|
1128
|
+
Un as AppLayout,
|
|
1130
1129
|
Jt as AppLayoutProvider,
|
|
1131
1130
|
qe as Context,
|
|
1132
1131
|
J as ContextError,
|
|
1133
|
-
|
|
1134
|
-
|
|
1132
|
+
jn as DomainCodeDialog,
|
|
1133
|
+
Hn as ExampleComponent,
|
|
1135
1134
|
We as NAVBAR_WIDTH_CLOSED,
|
|
1136
1135
|
Me as NAVBAR_WIDTH_OPENED,
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1136
|
+
zn as NavBar,
|
|
1137
|
+
Wn as NavBarDarkStyledList,
|
|
1138
|
+
Fn as NavBarLightStyledList,
|
|
1139
|
+
Et as NavBarProvider,
|
|
1140
|
+
Gn as PageLayout,
|
|
1142
1141
|
vn as SaladBarProvider,
|
|
1143
|
-
|
|
1142
|
+
kt as buildNavBarState,
|
|
1144
1143
|
L as navBarClasses,
|
|
1145
1144
|
Ve as useAppLayout,
|
|
1146
1145
|
xn as useDomainCode,
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1146
|
+
qn as useDomainCodeValue,
|
|
1147
|
+
Pt as useNavBar,
|
|
1148
|
+
Vn as useSaladBar,
|
|
1149
|
+
Qn as useSetDomainCode,
|
|
1150
|
+
Mn as withNavBarProvider,
|
|
1151
|
+
Xn as withSaladBarProvider
|
|
1153
1152
|
};
|
|
1154
1153
|
//# sourceMappingURL=index.js.map
|