@australiangreens/ag-internal-components 0.0.50 → 0.0.52

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.
Files changed (48) hide show
  1. package/dist/DevDemo/DevDemo.d.ts.map +1 -1
  2. package/dist/DevDemo/DomainCodeDemo.d.ts.map +1 -1
  3. package/dist/cjs/index.cjs +1 -1
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/components/AgDialog/AgDialog.d.ts +24 -0
  6. package/dist/components/AgDialog/AgDialog.d.ts.map +1 -0
  7. package/dist/components/AgDialog/index.d.ts +2 -23
  8. package/dist/components/AgDialog/index.d.ts.map +1 -1
  9. package/dist/components/ExampleComponent/ExampleComponent.comp.test.d.ts +2 -0
  10. package/dist/components/ExampleComponent/ExampleComponent.comp.test.d.ts.map +1 -0
  11. package/dist/components/ExampleComponent/ExampleComponent.d.ts +6 -0
  12. package/dist/components/ExampleComponent/ExampleComponent.d.ts.map +1 -0
  13. package/dist/components/ExampleComponent/{index.stories.d.ts → ExampleComponent.stories.d.ts} +1 -1
  14. package/dist/components/ExampleComponent/ExampleComponent.stories.d.ts.map +1 -0
  15. package/dist/components/ExampleComponent/index.d.ts +2 -5
  16. package/dist/components/ExampleComponent/index.d.ts.map +1 -1
  17. package/dist/components/NavBar/NavBar.comp.test.d.ts +2 -0
  18. package/dist/components/NavBar/NavBar.comp.test.d.ts.map +1 -0
  19. package/dist/components/NavBar/NavBar.d.ts +22 -0
  20. package/dist/components/NavBar/NavBar.d.ts.map +1 -0
  21. package/dist/components/NavBar/index.d.ts +2 -16
  22. package/dist/components/NavBar/index.d.ts.map +1 -1
  23. package/dist/esm/index.js +613 -623
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/layouts/AppLayout/AppLayout.d.ts +3 -1
  26. package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
  27. package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +3 -1
  28. package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
  29. package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts +1 -5
  30. package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts.map +1 -1
  31. package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +7 -1
  32. package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -1
  33. package/dist/layouts/AppLayout/index.d.ts.map +1 -1
  34. package/dist/layouts/PageLayout/PageLayout.comp.test.d.ts +2 -0
  35. package/dist/layouts/PageLayout/PageLayout.comp.test.d.ts.map +1 -0
  36. package/dist/layouts/PageLayout/PageLayout.d.ts +60 -0
  37. package/dist/layouts/PageLayout/PageLayout.d.ts.map +1 -0
  38. package/dist/layouts/PageLayout/index.d.ts +2 -59
  39. package/dist/layouts/PageLayout/index.d.ts.map +1 -1
  40. package/dist/layouts/PageLayout/index.stories.d.ts +4 -4
  41. package/package.json +8 -5
  42. package/dist/components/ExampleComponent/index.comp.test.d.ts +0 -2
  43. package/dist/components/ExampleComponent/index.comp.test.d.ts.map +0 -1
  44. package/dist/components/ExampleComponent/index.stories.d.ts.map +0 -1
  45. package/dist/components/NavBar/index.comp.test.d.ts +0 -2
  46. package/dist/components/NavBar/index.comp.test.d.ts.map +0 -1
  47. package/dist/layouts/PageLayout/index.comp.test.d.ts +0 -2
  48. package/dist/layouts/PageLayout/index.comp.test.d.ts.map +0 -1
package/dist/esm/index.js CHANGED
@@ -1,65 +1,65 @@
1
- var It = Object.defineProperty, Ot = Object.defineProperties;
2
- var Tt = Object.getOwnPropertyDescriptors;
3
- var Z = Object.getOwnPropertySymbols;
4
- var Te = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
5
- var ue = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t) => {
6
- for (var n in t || (t = {}))
7
- Te.call(t, n) && ue(e, n, t[n]);
8
- if (Z)
9
- for (var n of Z(t))
10
- De.call(t, n) && ue(e, n, t[n]);
11
- return e;
12
- }, v = (e, t) => Ot(e, Tt(t));
13
- var Be = (e, t) => {
1
+ var Ce = Object.defineProperty, we = Object.defineProperties;
2
+ var be = Object.getOwnPropertyDescriptors;
3
+ var J = Object.getOwnPropertySymbols;
4
+ var bt = Object.prototype.hasOwnProperty, At = Object.prototype.propertyIsEnumerable;
5
+ var ct = (t, e, n) => e in t ? Ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, r = (t, e) => {
6
+ for (var n in e || (e = {}))
7
+ bt.call(e, n) && ct(t, n, e[n]);
8
+ if (J)
9
+ for (var n of J(e))
10
+ At.call(e, n) && ct(t, n, e[n]);
11
+ return t;
12
+ }, C = (t, e) => we(t, be(e));
13
+ var St = (t, e) => {
14
14
  var n = {};
15
- for (var i in e)
16
- Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
- if (e != null && Z)
18
- for (var i of Z(e))
19
- t.indexOf(i) < 0 && De.call(e, i) && (n[i] = e[i]);
15
+ for (var i in t)
16
+ bt.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
17
+ if (t != null && J)
18
+ for (var i of J(t))
19
+ e.indexOf(i) < 0 && At.call(t, i) && (n[i] = t[i]);
20
20
  return n;
21
21
  };
22
- var $e = (e, t, n) => (ue(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var ee = (e, t, n) => new Promise((i, a) => {
22
+ var Tt = (t, e, n) => (ct(t, typeof e != "symbol" ? e + "" : e, n), n);
23
+ var K = (t, e, n) => new Promise((i, a) => {
24
24
  var l = (s) => {
25
25
  try {
26
26
  u(n.next(s));
27
- } catch (c) {
28
- a(c);
27
+ } catch (d) {
28
+ a(d);
29
29
  }
30
30
  }, p = (s) => {
31
31
  try {
32
32
  u(n.throw(s));
33
- } catch (c) {
34
- a(c);
33
+ } catch (d) {
34
+ a(d);
35
35
  }
36
36
  }, u = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(l, p);
37
- u((n = n.apply(e, t)).next());
37
+ u((n = n.apply(t, e)).next());
38
38
  });
39
- import { jsxs as d, Fragment as P, jsx as o } from "react/jsx-runtime";
40
- import { useState as T, createContext as qe, useCallback as re, useContext as je, useEffect as ae, useRef as he } from "react";
41
- import { Typography as B, Button as Dt, Paper as Qe, styled as j, Box as w, IconButton as q, Drawer as Bt, Container as Ye, Avatar as te, Skeleton as ke, List as Ee, ListItemButton as M, ListItemIcon as ge, ListItemText as _, Collapse as $t, Divider as Ne, CssBaseline as kt, Snackbar as Et, Alert as Nt, CircularProgress as Je, LinearProgress as Lt, Autocomplete as Ft, TextField as Pt, FormHelperText as yt } from "@mui/material";
42
- import Mt from "@mui/material/CssBaseline";
43
- import { styled as R, createTheme as Ke, alpha as fe } from "@mui/material/styles";
44
- import Ze from "@mui/material/Drawer";
45
- import { AgError as _t } from "@australiangreens/ag-error";
46
- import { createHelper as se } from "souvlaki";
47
- import et from "@mui/material/List";
48
- import Le from "@mui/material/Button";
49
- import Ht from "@mui/material/Dialog";
50
- import Rt from "@mui/material/DialogActions";
51
- import Wt from "@mui/material/DialogContent";
52
- import zt from "@mui/material/DialogTitle";
53
- import { ArrowForward as tt, ArrowBack as nt, Dashboard as Ut, ExpandLess as Gt, ExpandMore as Vt, Settings as Xt, Logout as qt, ViewHeadline as jt } from "@mui/icons-material";
54
- import { useAtomValue as Fe, atom as $, useSetAtom as Qt, useAtom as L, getDefaultStore as Yt, Provider as ot } from "jotai";
55
- import { useHydrateAtoms as Jt } from "jotai/utils";
56
- function lo({ text: e }) {
57
- const [t, n] = T(0);
58
- return /* @__PURE__ */ d(P, { children: [
59
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
- /* @__PURE__ */ o(B, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
39
+ import { jsxs as c, Fragment as k, jsx as o } from "react/jsx-runtime";
40
+ import { useState as B, createContext as Rt, useCallback as ot, useContext as Wt, useEffect as it, useRef as pt } from "react";
41
+ import { Typography as $, Button as Ae, Paper as zt, styled as X, Box as b, IconButton as V, Drawer as Se, Container as Ut, Avatar as Z, Skeleton as It, Divider as Ot, CssBaseline as Te, Snackbar as Ie, Alert as Oe, CircularProgress as Gt, LinearProgress as De, Autocomplete as Be, TextField as $e, FormHelperText as ke } from "@mui/material";
42
+ import Ne from "@mui/material/CssBaseline";
43
+ import { styled as _, createTheme as Vt, alpha as ut } from "@mui/material/styles";
44
+ import Xt from "@mui/material/Drawer";
45
+ import { AgError as Ee } from "@australiangreens/ag-error";
46
+ import { createHelper as rt } from "souvlaki";
47
+ import qt from "@mui/material/List";
48
+ import Dt from "@mui/material/Button";
49
+ import Fe from "@mui/material/Dialog";
50
+ import Pe from "@mui/material/DialogActions";
51
+ import Le from "@mui/material/DialogContent";
52
+ import ye from "@mui/material/DialogTitle";
53
+ import { ArrowForward as jt, ArrowBack as Qt, ViewHeadline as Me } from "@mui/icons-material";
54
+ import { atom as N, useSetAtom as _e, useAtom as P, getDefaultStore as He, Provider as Yt } from "jotai";
55
+ import { useHydrateAtoms as Re } from "jotai/utils";
56
+ function Yn({ text: t }) {
57
+ const [e, n] = B(0);
58
+ return /* @__PURE__ */ c(k, { children: [
59
+ /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
+ /* @__PURE__ */ o($, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
61
61
  /* @__PURE__ */ o(
62
- Dt,
62
+ Ae,
63
63
  {
64
64
  variant: "outlined",
65
65
  onClick: () => n((i) => i + 1),
@@ -67,44 +67,44 @@ function lo({ text: e }) {
67
67
  children: "Hello I am a button"
68
68
  }
69
69
  ),
70
- /* @__PURE__ */ d("p", { children: [
70
+ /* @__PURE__ */ c("p", { children: [
71
71
  "This is some text: ",
72
- /* @__PURE__ */ o("span", { children: e })
72
+ /* @__PURE__ */ o("span", { children: t })
73
73
  ] }),
74
- /* @__PURE__ */ d(Qe, { children: [
74
+ /* @__PURE__ */ c(zt, { children: [
75
75
  "This number will incremember when button pressed: ",
76
- t
76
+ e
77
77
  ] })
78
78
  ] });
79
79
  }
80
- const it = 330, rt = 73, N = "Navbar", H = {
81
- root: `${N}-root`,
82
- menuButton: `${N}-menuButton`,
83
- hide: `${N}-hide`,
84
- content: `${N}-content`,
85
- userInfoHolder: `${N}-userInfoHolder`,
86
- settings: `${N}-settings`,
87
- pieChartIcon: `${N}-pieChartIcon`
88
- }, Kt = R("div", { name: "NavBar" })(({ theme: e }) => ({
89
- [`&.${H.root}`]: {
80
+ const Jt = 330, Kt = 73, F = "Navbar", M = {
81
+ root: `${F}-root`,
82
+ menuButton: `${F}-menuButton`,
83
+ hide: `${F}-hide`,
84
+ content: `${F}-content`,
85
+ userInfoHolder: `${F}-userInfoHolder`,
86
+ settings: `${F}-settings`,
87
+ pieChartIcon: `${F}-pieChartIcon`
88
+ }, We = _("div", { name: "NavBar" })(({ theme: t }) => ({
89
+ [`&.${M.root}`]: {
90
90
  display: "flex"
91
91
  },
92
- [`& .${H.menuButton}`]: {
92
+ [`& .${M.menuButton}`]: {
93
93
  marginRight: 36
94
94
  },
95
- [`& .${H.hide}`]: {
95
+ [`& .${M.hide}`]: {
96
96
  display: "none"
97
97
  },
98
- [`& .${H.content}`]: {
98
+ [`& .${M.content}`]: {
99
99
  flexGrow: 1,
100
- padding: e.spacing(3)
100
+ padding: t.spacing(3)
101
101
  },
102
- [`& .${H.userInfoHolder}`]: {
102
+ [`& .${M.userInfoHolder}`]: {
103
103
  height: "148px",
104
104
  marginTop: "64px",
105
105
  marginBottom: "16px"
106
106
  }
107
- })), at = () => ({
107
+ })), Zt = () => ({
108
108
  position: "absolute",
109
109
  height: "100%",
110
110
  overflowX: "hidden",
@@ -112,51 +112,51 @@ const it = 330, rt = 73, N = "Navbar", H = {
112
112
  color: "white",
113
113
  backgroundColor: "black"
114
114
  // backgroundColor: '#e8e8e8',
115
- }), Zt = () => r({
116
- width: it
117
- }, at()), en = () => r({
118
- width: rt
119
- }, at()), tn = R(Ze, {
120
- shouldForwardProp: (e) => e !== "open"
121
- })(({ theme: e, open: t }) => r(r({
122
- width: t ? it : rt,
115
+ }), ze = () => r({
116
+ width: Jt
117
+ }, Zt()), Ue = () => r({
118
+ width: Kt
119
+ }, Zt()), Ge = _(Xt, {
120
+ shouldForwardProp: (t) => t !== "open"
121
+ })(({ theme: t, open: e }) => r(r({
122
+ width: e ? Jt : Kt,
123
123
  flexShrink: 0,
124
124
  whiteSpace: "nowrap",
125
125
  boxSizing: "border-box",
126
- zIndex: e.zIndex.drawer + 100
127
- }, t && {
128
- "& .MuiDrawer-paper": Zt()
129
- }), !t && {
130
- "& .MuiDrawer-paper": en()
126
+ zIndex: t.zIndex.drawer + 100
127
+ }, e && {
128
+ "& .MuiDrawer-paper": ze()
129
+ }), !e && {
130
+ "& .MuiDrawer-paper": Ue()
131
131
  }));
132
- class ve extends _t {
132
+ class ft extends Ee {
133
133
  }
134
- $e(ve, "errorName", "ContextError");
135
- const st = qe(null), nn = {}, on = {}, rn = ({
136
- overrideState: e = nn,
137
- overrideActions: t = on,
134
+ Tt(ft, "errorName", "ContextError");
135
+ const te = Rt(null), Ve = {}, Xe = {}, qe = ({
136
+ overrideState: t = Ve,
137
+ overrideActions: e = Xe,
138
138
  children: n
139
139
  }) => {
140
- const [{ open: i }, a] = T({ open: !0 }), l = re((s) => {
140
+ const [{ open: i }, a] = B({ open: !0 }), l = ot((s) => {
141
141
  a({ open: s });
142
- }, []), p = re(() => {
143
- a((s) => v(r({}, s), { open: !s.open }));
142
+ }, []), p = ot(() => {
143
+ a((s) => C(r({}, s), { open: !s.open }));
144
144
  }, []), u = r(r({
145
145
  open: i,
146
146
  setOpen: l,
147
147
  toggleOpen: p
148
- }, e), t);
149
- return /* @__PURE__ */ o(st.Provider, { value: u, children: n });
150
- }, an = () => {
151
- const e = je(st);
152
- if (e === null)
153
- throw new ve("Error: Tried to useNavBar outside of a <NavBarProvider>");
154
- return e;
155
- }, sn = (e = {}) => r({
148
+ }, t), e);
149
+ return /* @__PURE__ */ o(te.Provider, { value: u, children: n });
150
+ }, je = () => {
151
+ const t = Wt(te);
152
+ if (t === null)
153
+ throw new ft("Error: Tried to useNavBar outside of a <NavBarProvider>");
154
+ return t;
155
+ }, Qe = (t = {}) => r({
156
156
  open: !0
157
- }, e), co = se(
158
- (e = sn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(rn, { overrideState: e, overrideActions: t, children: n })
159
- ), Pe = 7, po = R(et)(({ theme: e }) => ({
157
+ }, t), Jn = rt(
158
+ (t = Qe(), e = {}) => ({ children: n }) => /* @__PURE__ */ o(qe, { overrideState: t, overrideActions: e, children: n })
159
+ ), Bt = 7, Kn = _(qt)(({ theme: t }) => ({
160
160
  backgroundColor: "black",
161
161
  color: "white",
162
162
  "& .MuiListItem-root": {
@@ -165,36 +165,36 @@ const st = qe(null), nn = {}, on = {}, rn = ({
165
165
  "& .MuiListItemButton-root": {
166
166
  " .MuiListItemIcon-root": {
167
167
  color: "white",
168
- padding: `${Pe}px`
168
+ padding: `${Bt}px`
169
169
  },
170
170
  // Focus state
171
171
  "&.Mui-focusVisible": {
172
- backgroundColor: e.palette.grey[700]
172
+ backgroundColor: t.palette.grey[700]
173
173
  },
174
174
  // Selected state
175
175
  "&.Mui-selected": {
176
176
  borderLeftStyle: "solid",
177
177
  borderLeftWidth: "7px",
178
- borderLeftColor: e.palette.primary.main,
179
- paddingLeft: `calc(${e.spacing(2)} - ${Pe}px)`
178
+ borderLeftColor: t.palette.primary.main,
179
+ paddingLeft: `calc(${t.spacing(2)} - ${Bt}px)`
180
180
  },
181
181
  // Hover state
182
182
  "&:hover": {
183
- backgroundColor: e.palette.primary.dark
183
+ backgroundColor: t.palette.primary.dark
184
184
  },
185
185
  // Focus+Selected state
186
186
  "&.Mui-selected.Mui-focusVisible": {
187
- backgroundColor: e.palette.grey[700]
187
+ backgroundColor: t.palette.grey[700]
188
188
  },
189
189
  // Hover+Selected state
190
190
  "&.Mui-selected:hover": {
191
- backgroundColor: e.palette.primary.dark
191
+ backgroundColor: t.palette.primary.dark
192
192
  }
193
193
  // Focus+Hover+Selected state doesn't need to be specified
194
194
  // '&.Mui-selected.Mui-focusVisible:hover': {
195
195
  // },
196
196
  }
197
- })), ye = 7, uo = R(et)(({ theme: e }) => ({
197
+ })), $t = 7, Zn = _(qt)(({ theme: t }) => ({
198
198
  backgroundColor: "#e8e8e8",
199
199
  color: "inherit",
200
200
  "& .MuiListItem-root": {
@@ -203,93 +203,93 @@ const st = qe(null), nn = {}, on = {}, rn = ({
203
203
  "& .MuiListItemButton-root": {
204
204
  " .MuiListItemIcon-root": {
205
205
  color: "inherit",
206
- padding: `${ye}px`
206
+ padding: `${$t}px`
207
207
  },
208
208
  // Focus state
209
209
  "&.Mui-focusVisible": {
210
- backgroundColor: e.palette.grey[700]
210
+ backgroundColor: t.palette.grey[700]
211
211
  },
212
212
  // Selected state
213
213
  "&.Mui-selected": {
214
214
  borderLeftStyle: "solid",
215
215
  borderLeftWidth: "7px",
216
- borderLeftColor: e.palette.primary.main,
217
- paddingLeft: `calc(${e.spacing(2)} - ${ye}px)`
216
+ borderLeftColor: t.palette.primary.main,
217
+ paddingLeft: `calc(${t.spacing(2)} - ${$t}px)`
218
218
  },
219
219
  // Hover state
220
220
  "&:hover": {
221
- backgroundColor: e.palette.primary.dark
221
+ backgroundColor: t.palette.primary.dark
222
222
  },
223
223
  // Focus+Selected state
224
224
  "&.Mui-selected.Mui-focusVisible": {
225
- backgroundColor: e.palette.grey[700]
225
+ backgroundColor: t.palette.grey[700]
226
226
  },
227
227
  // Hover+Selected state
228
228
  "&.Mui-selected:hover": {
229
- backgroundColor: e.palette.primary.dark
229
+ backgroundColor: t.palette.primary.dark
230
230
  }
231
231
  // Focus+Hover+Selected state doesn't need to be specified
232
232
  // '&.Mui-selected.Mui-focusVisible:hover': {
233
233
  // },
234
234
  }
235
235
  }));
236
- function ho({
237
- "data-testid": e,
238
- children: t
236
+ function to({
237
+ "data-testid": t,
238
+ children: e
239
239
  }) {
240
- const { open: n } = an();
241
- return /* @__PURE__ */ d(Kt, { className: H.root, "data-testid": e, children: [
242
- /* @__PURE__ */ o(Mt, {}),
240
+ const { open: n } = je();
241
+ return /* @__PURE__ */ c(We, { className: M.root, "data-testid": t, children: [
242
+ /* @__PURE__ */ o(Ne, {}),
243
243
  /* @__PURE__ */ o(
244
- tn,
244
+ Ge,
245
245
  {
246
246
  variant: "permanent",
247
247
  anchor: "left",
248
248
  transitionDuration: null,
249
249
  open: n,
250
- children: t
250
+ children: e
251
251
  }
252
252
  )
253
253
  ] });
254
254
  }
255
- const ln = ({
256
- isOpen: e,
257
- dialogTitle: t,
255
+ const Ye = ({
256
+ isOpen: t,
257
+ dialogTitle: e,
258
258
  children: n,
259
259
  maxWidth: i,
260
260
  primaryButton: a,
261
261
  secondaryButton: l,
262
262
  onClose: p
263
263
  }) => {
264
- var c, x;
265
- const [u, s] = T(!1);
266
- return /* @__PURE__ */ d(
267
- Ht,
264
+ var d, v;
265
+ const [u, s] = B(!1);
266
+ return /* @__PURE__ */ c(
267
+ Fe,
268
268
  {
269
- open: e,
269
+ open: t,
270
270
  onClose: () => {
271
271
  u || p();
272
272
  },
273
273
  fullWidth: !0,
274
274
  maxWidth: i != null ? i : "xs",
275
275
  children: [
276
- /* @__PURE__ */ o(zt, { children: t }),
277
- /* @__PURE__ */ o(Wt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
- /* @__PURE__ */ d(Rt, { children: [
276
+ /* @__PURE__ */ o(ye, { children: e }),
277
+ /* @__PURE__ */ o(Le, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
278
+ /* @__PURE__ */ c(Pe, { children: [
279
279
  /* @__PURE__ */ o(
280
- Le,
280
+ Dt,
281
281
  {
282
- onClick: (c = l == null ? void 0 : l.onClick) != null ? c : p,
282
+ onClick: (d = l == null ? void 0 : l.onClick) != null ? d : p,
283
283
  "data-testid": l == null ? void 0 : l.testId,
284
284
  disabled: (l == null ? void 0 : l.disabled) || u,
285
285
  color: l == null ? void 0 : l.buttonColor,
286
- children: (x = l == null ? void 0 : l.text) != null ? x : "Cancel"
286
+ children: (v = l == null ? void 0 : l.text) != null ? v : "Cancel"
287
287
  }
288
288
  ),
289
289
  a && /* @__PURE__ */ o(
290
- Le,
290
+ Dt,
291
291
  {
292
- onClick: () => ee(void 0, null, function* () {
292
+ onClick: () => K(void 0, null, function* () {
293
293
  var f;
294
294
  s(!0), yield (f = a.onClick) == null ? void 0 : f.call(a), s(!1);
295
295
  }),
@@ -303,29 +303,29 @@ const ln = ({
303
303
  ]
304
304
  }
305
305
  );
306
- }, dn = 24, cn = 64, F = "TopBar", A = {
307
- topStripe: `${F}-topStripe`,
308
- titleBar: `${F}-titleBar`,
309
- titleSlider: `${F}-titleSlider`,
310
- titleText: `${F}-titleText`,
311
- leftPanelButton: `${F}-leftPanelButton`,
312
- rightPanelButton: `${F}-leftPanelButton`
313
- }, pn = j("div", {
314
- shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
315
- name: F
316
- })(({ theme: e, leftPanel: t, rightPanel: n }) => {
306
+ }, Je = 24, Ke = 64, L = "TopBar", A = {
307
+ topStripe: `${L}-topStripe`,
308
+ titleBar: `${L}-titleBar`,
309
+ titleSlider: `${L}-titleSlider`,
310
+ titleText: `${L}-titleText`,
311
+ leftPanelButton: `${L}-leftPanelButton`,
312
+ rightPanelButton: `${L}-leftPanelButton`
313
+ }, Ze = X("div", {
314
+ shouldForwardProp: (t) => !["leftPanel", "rightPanel"].includes(t),
315
+ name: L
316
+ })(({ theme: t, leftPanel: e, rightPanel: n }) => {
317
317
  var i, a;
318
318
  return {
319
319
  width: "100%",
320
320
  [`& .${A.topStripe}`]: {
321
321
  width: "100%",
322
- height: `${dn}px`,
323
- backgroundColor: e.palette.primary.main
322
+ height: `${Je}px`,
323
+ backgroundColor: t.palette.primary.main
324
324
  },
325
325
  [`& .${A.titleBar}`]: {
326
- backgroundColor: e.palette.primary.light,
327
- height: `${cn}px`,
328
- padding: e.spacing(0, 3),
326
+ backgroundColor: t.palette.primary.light,
327
+ height: `${Ke}px`,
328
+ padding: t.spacing(0, 3),
329
329
  width: "100%"
330
330
  },
331
331
  [`& .${A.titleSlider}`]: r(r({
@@ -333,12 +333,12 @@ const ln = ({
333
333
  display: "flex",
334
334
  alignItems: "center",
335
335
  color: "white",
336
- transition: e.transitions.create("margin", {
337
- easing: e.transitions.easing.sharp,
338
- duration: e.transitions.duration.leavingScreen
336
+ transition: t.transitions.create("margin", {
337
+ easing: t.transitions.easing.sharp,
338
+ duration: t.transitions.duration.leavingScreen
339
339
  }),
340
340
  [`& .${A.leftPanelButton}`]: {
341
- marginRight: e.spacing(2),
341
+ marginRight: t.spacing(2),
342
342
  flexGrow: 0
343
343
  },
344
344
  [`& .${A.titleText}`]: {
@@ -347,48 +347,48 @@ const ln = ({
347
347
  [`& .${A.rightPanelButton}`]: {
348
348
  flexGrow: 0
349
349
  }
350
- }, (t == null ? void 0 : t.open) && {
351
- transition: e.transitions.create("margin", {
352
- easing: e.transitions.easing.easeOut,
353
- duration: e.transitions.duration.enteringScreen
350
+ }, (e == null ? void 0 : e.open) && {
351
+ transition: t.transitions.create("margin", {
352
+ easing: t.transitions.easing.easeOut,
353
+ duration: t.transitions.duration.enteringScreen
354
354
  }),
355
- marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
355
+ marginLeft: `${(i = e == null ? void 0 : e.width) != null ? i : 0}px`
356
356
  }), (n == null ? void 0 : n.open) && {
357
- transition: e.transitions.create("margin", {
358
- easing: e.transitions.easing.easeOut,
359
- duration: e.transitions.duration.enteringScreen
357
+ transition: t.transitions.create("margin", {
358
+ easing: t.transitions.easing.easeOut,
359
+ duration: t.transitions.duration.enteringScreen
360
360
  }),
361
361
  marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
362
362
  })
363
363
  };
364
364
  });
365
- function un({
366
- titleText: e = "",
367
- leftPanel: t,
365
+ function tn({
366
+ titleText: t = "",
367
+ leftPanel: e,
368
368
  rightPanel: n,
369
369
  "data-testid": i
370
370
  }) {
371
- return /* @__PURE__ */ d(pn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
371
+ return /* @__PURE__ */ c(Ze, { leftPanel: e, rightPanel: n, "data-testid": i, children: [
372
372
  /* @__PURE__ */ o("div", { className: A.topStripe }),
373
- /* @__PURE__ */ o("div", { className: A.titleBar, children: /* @__PURE__ */ d(w, { className: A.titleSlider, children: [
374
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ d(
375
- q,
373
+ /* @__PURE__ */ o("div", { className: A.titleBar, children: /* @__PURE__ */ c(b, { className: A.titleSlider, children: [
374
+ e !== void 0 && !e.open && e.showOpenArrow && /* @__PURE__ */ c(
375
+ V,
376
376
  {
377
377
  className: A.leftPanelButton,
378
378
  color: "inherit",
379
379
  "aria-label": "Open left side panel",
380
- onClick: t == null ? void 0 : t.onOpen,
380
+ onClick: e == null ? void 0 : e.onOpen,
381
381
  edge: "start",
382
382
  size: "large",
383
383
  children: [
384
384
  " ",
385
- /* @__PURE__ */ o(tt, {})
385
+ /* @__PURE__ */ o(jt, {})
386
386
  ]
387
387
  }
388
388
  ),
389
- /* @__PURE__ */ o(B, { className: A.titleText, variant: "h6", noWrap: !0, children: e }),
390
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ d(
391
- q,
389
+ /* @__PURE__ */ o($, { className: A.titleText, variant: "h6", noWrap: !0, children: t }),
390
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ c(
391
+ V,
392
392
  {
393
393
  className: A.rightPanelButton,
394
394
  color: "inherit",
@@ -398,15 +398,15 @@ function un({
398
398
  size: "large",
399
399
  children: [
400
400
  " ",
401
- /* @__PURE__ */ o(nt, {})
401
+ /* @__PURE__ */ o(Qt, {})
402
402
  ]
403
403
  }
404
404
  )
405
405
  ] }) })
406
406
  ] });
407
407
  }
408
- const lt = 400, hn = j(Bt, {
409
- shouldForwardProp: (e) => (
408
+ const ee = 400, en = X(Se, {
409
+ shouldForwardProp: (t) => (
410
410
  // Note we do want anchor to be forwarded to the Drawer component
411
411
  ![
412
412
  "width",
@@ -415,19 +415,19 @@ const lt = 400, hn = j(Bt, {
415
415
  "navBarOpen",
416
416
  "navBarWidthOpen",
417
417
  "navBarWidthClosed"
418
- ].includes(e)
418
+ ].includes(t)
419
419
  ),
420
420
  name: "SidePanelDrawer"
421
421
  })(
422
- ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: l }) => ({
423
- width: e,
422
+ ({ width: t, debugOpacity: e = !1, anchor: n, navBarOpen: i, navBarWidthOpen: a, navBarWidthClosed: l }) => ({
423
+ width: t,
424
424
  "& .MuiDrawer-paper": r(r({
425
425
  position: "absolute",
426
- width: e,
426
+ width: t,
427
427
  boxSizing: "border-box",
428
428
  border: "unset",
429
429
  boxShadow: "0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"
430
- }, t && {
430
+ }, e && {
431
431
  opacity: "50%"
432
432
  }), n === "left" && r({
433
433
  marginLeft: `${l}px`
@@ -435,15 +435,15 @@ const lt = 400, hn = j(Bt, {
435
435
  marginLeft: `${a}px`
436
436
  }))
437
437
  })
438
- ), gn = j(w, {
439
- shouldForwardProp: (e) => !["anchor"].includes(e)
440
- })(({ theme: e, anchor: t }) => v(r({
438
+ ), nn = X(b, {
439
+ shouldForwardProp: (t) => !["anchor"].includes(t)
440
+ })(({ theme: t, anchor: e }) => C(r({
441
441
  display: "flex",
442
442
  alignItems: "center",
443
- padding: e.spacing(2)
444
- }, e.mixins.toolbar), {
445
- justifyContent: t === "left" ? "space-between" : "flex-start",
446
- backgroundColor: e.palette.primary.light,
443
+ padding: t.spacing(2)
444
+ }, t.mixins.toolbar), {
445
+ justifyContent: e === "left" ? "space-between" : "flex-start",
446
+ backgroundColor: t.palette.primary.light,
447
447
  height: "88px",
448
448
  "&,*": {
449
449
  color: "white"
@@ -452,107 +452,107 @@ const lt = 400, hn = j(Bt, {
452
452
  fontSize: "22px"
453
453
  },
454
454
  " .MuiButtonBase-root": {
455
- marginRight: t === "right" ? e.spacing(2) : 0
455
+ marginRight: e === "right" ? t.spacing(2) : 0
456
456
  }
457
457
  }));
458
- function Me({
459
- children: e,
460
- anchor: t = "left",
458
+ function kt({
459
+ children: t,
460
+ anchor: e = "left",
461
461
  open: n,
462
462
  onClose: i = () => {
463
463
  },
464
464
  titleText: a = "",
465
- width: l = lt,
465
+ width: l = ee,
466
466
  showCloseArrow: p = !0,
467
467
  debugOpacity: u = !1,
468
468
  headerBoxProps: s = {},
469
- onOpened: c,
470
- onClosed: x,
469
+ onOpened: d,
470
+ onClosed: v,
471
471
  "data-testid": f,
472
- navBarOpen: C = !1,
472
+ navBarOpen: x = !1,
473
473
  navBarWidthOpen: m = 0,
474
- navBarWidthClosed: O = 0
474
+ navBarWidthClosed: T = 0
475
475
  }) {
476
- return /* @__PURE__ */ d(
477
- hn,
476
+ return /* @__PURE__ */ c(
477
+ en,
478
478
  {
479
479
  SlideProps: {
480
- onEntered: () => c == null ? void 0 : c(),
481
- onExited: () => x == null ? void 0 : x()
480
+ onEntered: () => d == null ? void 0 : d(),
481
+ onExited: () => v == null ? void 0 : v()
482
482
  },
483
483
  variant: "persistent",
484
- anchor: t,
484
+ anchor: e,
485
485
  open: n,
486
486
  width: l,
487
487
  debugOpacity: u,
488
488
  "data-testid": f,
489
- navBarOpen: C,
489
+ navBarOpen: x,
490
490
  navBarWidthOpen: m,
491
- navBarWidthClosed: O,
491
+ navBarWidthClosed: T,
492
492
  children: [
493
- /* @__PURE__ */ o(gn, v(r({ anchor: t }, s), { children: t === "left" ? /* @__PURE__ */ d(P, { children: [
494
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: a }),
495
- p && /* @__PURE__ */ d(q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
496
- /* @__PURE__ */ o(nt, { "data-testid": "arrowbackicon" }),
493
+ /* @__PURE__ */ o(nn, C(r({ anchor: e }, s), { children: e === "left" ? /* @__PURE__ */ c(k, { children: [
494
+ /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a }),
495
+ p && /* @__PURE__ */ c(V, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
496
+ /* @__PURE__ */ o(Qt, { "data-testid": "arrowbackicon" }),
497
497
  " "
498
498
  ] })
499
- ] }) : /* @__PURE__ */ d(P, { children: [
500
- p && /* @__PURE__ */ d(q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
501
- /* @__PURE__ */ o(tt, {}),
499
+ ] }) : /* @__PURE__ */ c(k, { children: [
500
+ p && /* @__PURE__ */ c(V, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
501
+ /* @__PURE__ */ o(jt, {}),
502
502
  " "
503
503
  ] }),
504
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: a })
504
+ /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a })
505
505
  ] }) })),
506
- e
506
+ t
507
507
  ]
508
508
  }
509
509
  );
510
510
  }
511
- const fn = j("div", {
512
- shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
511
+ const on = X("div", {
512
+ shouldForwardProp: (t) => !["leftPanel", "rightPanel"].includes(t),
513
513
  name: "PanelAwareMargins"
514
- })(({ theme: e, leftPanel: t, rightPanel: n }) => {
514
+ })(({ theme: t, leftPanel: e, rightPanel: n }) => {
515
515
  var i, a;
516
516
  return r(r({
517
- transition: e.transitions.create("margin", {
518
- easing: e.transitions.easing.sharp,
519
- duration: e.transitions.duration.leavingScreen
517
+ transition: t.transitions.create("margin", {
518
+ easing: t.transitions.easing.sharp,
519
+ duration: t.transitions.duration.leavingScreen
520
520
  })
521
- }, (t == null ? void 0 : t.open) && {
522
- transition: e.transitions.create("margin", {
523
- easing: e.transitions.easing.easeOut,
524
- duration: e.transitions.duration.enteringScreen
521
+ }, (e == null ? void 0 : e.open) && {
522
+ transition: t.transitions.create("margin", {
523
+ easing: t.transitions.easing.easeOut,
524
+ duration: t.transitions.duration.enteringScreen
525
525
  }),
526
- marginLeft: `${(i = t == null ? void 0 : t.width) != null ? i : 0}px`
526
+ marginLeft: `${(i = e == null ? void 0 : e.width) != null ? i : 0}px`
527
527
  }), (n == null ? void 0 : n.open) && {
528
- transition: e.transitions.create("margin", {
529
- easing: e.transitions.easing.easeOut,
530
- duration: e.transitions.duration.enteringScreen
528
+ transition: t.transitions.create("margin", {
529
+ easing: t.transitions.easing.easeOut,
530
+ duration: t.transitions.duration.enteringScreen
531
531
  }),
532
532
  marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
533
533
  });
534
- }), mn = j(Ye, {
534
+ }), rn = X(Ut, {
535
535
  name: "PageContainer"
536
- })(({ theme: e }) => ({
536
+ })(({ theme: t }) => ({
537
537
  // Horizontal padding comes from the Container's gutter
538
- paddingTop: e.spacing(3),
539
- paddingBottom: e.spacing(3)
540
- })), me = !1, xe = !1, ne = {
538
+ paddingTop: t.spacing(3),
539
+ paddingBottom: t.spacing(3)
540
+ })), ht = !1, gt = !1, tt = {
541
541
  titleText: "",
542
542
  flavour: "push",
543
- width: lt,
543
+ width: ee,
544
544
  arrowButtons: "both",
545
545
  startOpen: !1,
546
546
  open: void 0,
547
547
  onChangeOpen: void 0,
548
- content: /* @__PURE__ */ o(P, {}),
548
+ content: /* @__PURE__ */ o(k, {}),
549
549
  onOpened: void 0,
550
550
  onClosed: void 0,
551
551
  dataTestId: void 0
552
552
  };
553
- function go({
554
- children: e,
555
- titleText: t = "",
553
+ function eo({
554
+ children: t,
555
+ titleText: e = "",
556
556
  leftPanel: n,
557
557
  rightPanel: i,
558
558
  sidePanelsAreMutuallyExclusive: a = !0,
@@ -560,344 +560,332 @@ function go({
560
560
  pageContainerProps: p,
561
561
  pageContentDataTestId: u,
562
562
  topBarDataTestId: s,
563
- navBarOpen: c,
564
- navBarWidthOpen: x,
563
+ navBarOpen: d,
564
+ navBarWidthOpen: v,
565
565
  navBarWidthClosed: f
566
566
  }) {
567
- const [C, m] = T(me), [O, S] = T(xe), [b, I] = T(me), [k, W] = T(xe), z = n !== void 0, U = i !== void 0, {
567
+ const [x, m] = B(ht), [T, I] = B(gt), [S, w] = B(ht), [O, H] = B(gt), R = n !== void 0, W = i !== void 0, {
568
568
  titleText: D,
569
- content: Q,
570
- flavour: Y,
571
- open: G,
572
- onChangeOpen: V,
569
+ content: q,
570
+ flavour: j,
571
+ open: z,
572
+ onChangeOpen: U,
573
573
  width: h,
574
574
  arrowButtons: g,
575
575
  startOpen: y,
576
- onOpened: mt,
577
- onClosed: xt,
578
- dataTestId: vt
579
- } = n ? r(r({}, ne), n) : r({}, ne), {
580
- titleText: Ct,
581
- content: wt,
582
- flavour: Ae,
583
- open: le,
584
- onChangeOpen: Se,
585
- width: de,
586
- arrowButtons: J,
587
- startOpen: K,
588
- onOpened: bt,
589
- onClosed: At,
590
- dataTestId: St
591
- } = i ? r(r({}, ne), i) : r({}, ne);
592
- ae(() => {
593
- y !== me && (m(y), I(y));
594
- }, [y]), ae(() => {
595
- K !== xe && (S(K), W(K));
596
- }, [K]);
597
- const ce = G === void 0 ? C : G, pe = le === void 0 ? O : le, Ie = (E) => {
598
- G === void 0 && (m(E), a && U && (E ? (S(!1), W(O)) : S(k))), V && V(E);
599
- }, Oe = (E) => {
600
- le === void 0 && (S(E), a && z && (E ? (m(!1), I(C)) : m(b))), Se && Se(E);
576
+ onOpened: pe,
577
+ onClosed: ue,
578
+ dataTestId: he
579
+ } = n ? r(r({}, tt), n) : r({}, tt), {
580
+ titleText: ge,
581
+ content: fe,
582
+ flavour: vt,
583
+ open: at,
584
+ onChangeOpen: xt,
585
+ width: st,
586
+ arrowButtons: Q,
587
+ startOpen: Y,
588
+ onOpened: me,
589
+ onClosed: ve,
590
+ dataTestId: xe
591
+ } = i ? r(r({}, tt), i) : r({}, tt);
592
+ it(() => {
593
+ y !== ht && (m(y), w(y));
594
+ }, [y]), it(() => {
595
+ Y !== gt && (I(Y), H(Y));
596
+ }, [Y]);
597
+ const lt = z === void 0 ? x : z, dt = at === void 0 ? T : at, Ct = (E) => {
598
+ z === void 0 && (m(E), a && W && (E ? (I(!1), H(T)) : I(O))), U && U(E);
599
+ }, wt = (E) => {
600
+ at === void 0 && (I(E), a && R && (E ? (m(!1), w(x)) : m(S))), xt && xt(E);
601
601
  };
602
- return /* @__PURE__ */ d(w, { children: [
603
- z && /* @__PURE__ */ o(
604
- Me,
602
+ return /* @__PURE__ */ c(b, { children: [
603
+ R && /* @__PURE__ */ o(
604
+ kt,
605
605
  {
606
- "data-testid": vt,
606
+ "data-testid": he,
607
607
  anchor: "left",
608
- open: ce,
609
- onClose: () => Ie(!1),
608
+ open: lt,
609
+ onClose: () => Ct(!1),
610
610
  width: h,
611
611
  titleText: D,
612
612
  debugOpacity: l,
613
613
  showCloseArrow: g === "both" || g === "close",
614
- onOpened: mt,
615
- onClosed: xt,
616
- navBarOpen: c,
617
- navBarWidthOpen: x,
614
+ onOpened: pe,
615
+ onClosed: ue,
616
+ navBarOpen: d,
617
+ navBarWidthOpen: v,
618
618
  navBarWidthClosed: f,
619
- children: Q
619
+ children: q
620
620
  }
621
621
  ),
622
- U && /* @__PURE__ */ o(
623
- Me,
622
+ W && /* @__PURE__ */ o(
623
+ kt,
624
624
  {
625
- "data-testid": St,
625
+ "data-testid": xe,
626
626
  anchor: "right",
627
- open: pe,
628
- onClose: () => Oe(!1),
629
- width: de,
630
- titleText: Ct,
627
+ open: dt,
628
+ onClose: () => wt(!1),
629
+ width: st,
630
+ titleText: ge,
631
631
  debugOpacity: l,
632
- showCloseArrow: J === "both" || J === "close",
633
- onOpened: bt,
634
- onClosed: At,
635
- navBarOpen: c,
636
- navBarWidthOpen: x,
632
+ showCloseArrow: Q === "both" || Q === "close",
633
+ onOpened: me,
634
+ onClosed: ve,
635
+ navBarOpen: d,
636
+ navBarWidthOpen: v,
637
637
  navBarWidthClosed: f,
638
- children: wt
638
+ children: fe
639
639
  }
640
640
  ),
641
641
  /* @__PURE__ */ o(
642
- un,
642
+ tn,
643
643
  r(r({
644
- titleText: t,
644
+ titleText: e,
645
645
  "data-testid": s
646
- }, z && Y === "push" ? {
646
+ }, R && j === "push" ? {
647
647
  leftPanel: {
648
- open: ce,
648
+ open: lt,
649
649
  width: h,
650
- onOpen: () => Ie(!0),
650
+ onOpen: () => Ct(!0),
651
651
  showOpenArrow: g === "both" || g === "open"
652
652
  }
653
- } : {}), U && Ae === "push" ? {
653
+ } : {}), W && vt === "push" ? {
654
654
  rightPanel: {
655
- open: pe,
656
- width: de,
657
- onOpen: () => Oe(!0),
658
- showOpenArrow: J === "both" || J === "open"
655
+ open: dt,
656
+ width: st,
657
+ onOpen: () => wt(!0),
658
+ showOpenArrow: Q === "both" || Q === "open"
659
659
  }
660
660
  } : {})
661
661
  ),
662
662
  /* @__PURE__ */ o(
663
- fn,
664
- v(r(r({}, Y === "push" ? {
663
+ on,
664
+ C(r(r({}, j === "push" ? {
665
665
  leftPanel: {
666
- open: ce,
666
+ open: lt,
667
667
  width: h
668
668
  }
669
- } : {}), Ae === "push" ? {
669
+ } : {}), vt === "push" ? {
670
670
  rightPanel: {
671
- open: pe,
672
- width: de
671
+ open: dt,
672
+ width: st
673
673
  }
674
674
  } : {}), {
675
- children: /* @__PURE__ */ o(mn, v(r({ "data-testid": u }, p), { children: e }))
675
+ children: /* @__PURE__ */ o(rn, C(r({ "data-testid": u }, p), { children: t }))
676
676
  })
677
677
  )
678
678
  ] });
679
679
  }
680
- const oe = "Navbar", X = {
681
- root: `${oe}-root`,
682
- menuButton: `${oe}-menuButton`,
683
- hide: `${oe}-hide`,
684
- content: `${oe}-content`
680
+ const et = "Navbar", G = {
681
+ root: `${et}-root`,
682
+ menuButton: `${et}-menuButton`,
683
+ hide: `${et}-hide`,
684
+ content: `${et}-content`
685
685
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
686
686
  // settings: `${PREFIX}-settings`,
687
687
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
688
- }, xn = R("div", { name: "NavBar" })(({ theme: e }) => ({
689
- [`&.${X.root}`]: {
688
+ }, an = _("div", { name: "NavBar" })(({ theme: t }) => ({
689
+ [`&.${G.root}`]: {
690
690
  display: "flex"
691
691
  },
692
- [`& .${X.menuButton}`]: {
692
+ [`& .${G.menuButton}`]: {
693
693
  marginRight: 36
694
694
  },
695
- [`& .${X.hide}`]: {
695
+ [`& .${G.hide}`]: {
696
696
  display: "none"
697
697
  },
698
- [`& .${X.content}`]: {
698
+ [`& .${G.content}`]: {
699
699
  flexGrow: 1,
700
- padding: e.spacing(3)
700
+ padding: t.spacing(3)
701
701
  }
702
702
  // [`& .${classes.userInfoHolder}`]: {
703
703
  // height: '148px',
704
704
  // marginTop: '64px',
705
705
  // marginBottom: '16px',
706
706
  // },
707
- })), dt = (e, t) => {
707
+ })), ne = (t, e) => {
708
708
  var n, i;
709
709
  return {
710
- height: `calc(100vh - ${t}px)`,
711
- top: t,
710
+ height: `calc(100vh - ${e}px)`,
711
+ top: e,
712
712
  overflowX: "hidden",
713
713
  overflowY: "hidden",
714
714
  color: "inherit",
715
- backgroundColor: (i = (n = e == null ? void 0 : e.navBar) == null ? void 0 : n.backgroundColor) != null ? i : "white"
715
+ backgroundColor: (i = (n = t == null ? void 0 : t.navBar) == null ? void 0 : n.backgroundColor) != null ? i : "white"
716
716
  // Provide default so tests don't need to wrap theme provider
717
717
  };
718
- }, _e = (e, t, n) => r({
719
- width: t,
720
- transition: e.transitions.create("width", {
721
- easing: e.transitions.easing.sharp,
722
- duration: e.transitions.duration.enteringScreen
718
+ }, Nt = (t, e, n) => r({
719
+ width: e,
720
+ transition: t.transitions.create("width", {
721
+ easing: t.transitions.easing.sharp,
722
+ duration: t.transitions.duration.enteringScreen
723
723
  })
724
- }, dt(e, n)), He = (e, t, n) => r({
725
- width: t,
726
- transition: e.transitions.create("width", {
727
- easing: e.transitions.easing.sharp,
728
- duration: e.transitions.duration.leavingScreen
724
+ }, ne(t, n)), Et = (t, e, n) => r({
725
+ width: e,
726
+ transition: t.transitions.create("width", {
727
+ easing: t.transitions.easing.sharp,
728
+ duration: t.transitions.duration.leavingScreen
729
729
  }),
730
730
  overflowX: "hidden"
731
- }, dt(e, n)), vn = R(Ze, {
732
- shouldForwardProp: (e) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(e)
733
- })(({ theme: e, open: t, widthOpen: n, widthClosed: i, offsetTop: a }) => r(r({
731
+ }, ne(t, n)), sn = _(Xt, {
732
+ shouldForwardProp: (t) => !["open", "widthOpen", "widthClosed", "offsetTop"].includes(t)
733
+ })(({ theme: t, open: e, widthOpen: n, widthClosed: i, offsetTop: a }) => r(r({
734
734
  flexShrink: 0,
735
735
  whiteSpace: "nowrap",
736
736
  boxSizing: "border-box",
737
737
  display: "flex",
738
738
  flexDirection: "column"
739
- }, t && v(r({}, _e(e, n, a)), {
740
- "& .MuiDrawer-paper": _e(e, n, a)
741
- })), !t && v(r({}, He(e, i, a)), {
742
- "& .MuiDrawer-paper": He(e, i, a)
739
+ }, e && C(r({}, Nt(t, n, a)), {
740
+ "& .MuiDrawer-paper": Nt(t, n, a)
741
+ })), !e && C(r({}, Et(t, i, a)), {
742
+ "& .MuiDrawer-paper": Et(t, i, a)
743
743
  })));
744
- function Cn({ links: e }) {
744
+ function ln({ links: t }) {
745
745
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
746
746
  }
747
- function Re(e) {
748
- let t = 0;
749
- for (let n = 0, i = e.length; n < i; n++) {
750
- const a = e.charCodeAt(n);
751
- t = (t << 5) - t + a, t |= 0;
747
+ function Ft(t) {
748
+ let e = 0;
749
+ for (let n = 0, i = t.length; n < i; n++) {
750
+ const a = t.charCodeAt(n);
751
+ e = (e << 5) - e + a, e |= 0;
752
752
  }
753
- return t;
753
+ return e;
754
754
  }
755
- const ie = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], We = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
756
- function wn({ user: e, domainCode: t, open: n }) {
757
- const i = Fe(be), a = Fe(we);
758
- return /* @__PURE__ */ o(w, { sx: { paddingTop: 3 }, children: /* @__PURE__ */ o(
759
- w,
755
+ const nt = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Pt = (t) => t.split(/\s/).map((e) => e.substring(0, 1).toUpperCase()).filter((e) => !!e).slice(0, 2).join("").toUpperCase();
756
+ function dn({
757
+ user: t,
758
+ domainCode: e,
759
+ open: n,
760
+ navBarWidthClosed: i,
761
+ navBarWidthOpen: a
762
+ }) {
763
+ return /* @__PURE__ */ o(b, { sx: { paddingTop: 3 }, children: /* @__PURE__ */ o(
764
+ b,
760
765
  {
761
766
  sx: {
762
767
  display: "flex",
763
768
  alignItems: "center",
764
769
  flexDirection: "column"
765
770
  },
766
- children: n ? /* @__PURE__ */ d(P, { children: [
771
+ children: n ? /* @__PURE__ */ c(k, { children: [
767
772
  /* @__PURE__ */ o(
768
- w,
773
+ b,
769
774
  {
770
775
  sx: {
771
776
  width: `${a * 0.33}px`,
772
777
  aspectRatio: 1,
773
778
  marginBottom: 1
774
779
  },
775
- children: e != null && e.name ? /* @__PURE__ */ o(
776
- te,
780
+ children: t != null && t.name ? /* @__PURE__ */ o(
781
+ Z,
777
782
  {
778
- src: e == null ? void 0 : e.picture,
783
+ src: t == null ? void 0 : t.picture,
779
784
  sx: {
780
785
  width: "100%",
781
786
  height: "100%",
782
- bgcolor: ie[Math.abs(Re(e.name)) % ie.length]
787
+ bgcolor: nt[Math.abs(Ft(t.name)) % nt.length]
783
788
  },
784
- children: We(e.name)
789
+ children: Pt(t.name)
785
790
  }
786
- ) : /* @__PURE__ */ o(te, { sx: { width: "100%", height: "100%" } })
791
+ ) : /* @__PURE__ */ o(Z, { sx: { width: "100%", height: "100%" } })
787
792
  }
788
793
  ),
789
- e != null && e.name ? /* @__PURE__ */ o(B, { children: e.name }) : /* @__PURE__ */ o(ke, { animation: !1, width: "50%" }),
790
- t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(ke, { animation: !1, width: "25%" })
791
- ] }) : /* @__PURE__ */ o(w, { sx: { width: `${i * 0.5}px`, aspectRatio: 1, marginBottom: 1 }, children: e != null && e.name ? /* @__PURE__ */ o(
792
- te,
794
+ t != null && t.name ? /* @__PURE__ */ o($, { children: t.name }) : /* @__PURE__ */ o(It, { animation: !1, width: "50%" }),
795
+ e ? /* @__PURE__ */ o($, { children: e.toUpperCase() }) : /* @__PURE__ */ o(It, { animation: !1, width: "25%" })
796
+ ] }) : /* @__PURE__ */ o(b, { sx: { width: `${i * 0.5}px`, aspectRatio: 1, marginBottom: 1 }, children: t != null && t.name ? /* @__PURE__ */ o(
797
+ Z,
793
798
  {
794
- src: e == null ? void 0 : e.picture,
799
+ src: t == null ? void 0 : t.picture,
795
800
  sx: {
796
801
  width: "100%",
797
802
  height: "100%",
798
- bgcolor: ie[Math.abs(Re(e.name)) % ie.length]
803
+ bgcolor: nt[Math.abs(Ft(t.name)) % nt.length]
799
804
  },
800
- children: We(e.name)
805
+ children: Pt(t.name)
801
806
  }
802
- ) : /* @__PURE__ */ o(te, { sx: { width: "100%", height: "100%" } }) })
807
+ ) : /* @__PURE__ */ o(Z, { sx: { width: "100%", height: "100%" } }) })
803
808
  }
804
809
  ) });
805
810
  }
806
- function bn({ navBarOpen: e }) {
807
- const [t, n] = T(!1);
808
- return /* @__PURE__ */ d(Ee, { children: [
809
- /* @__PURE__ */ d(M, { onClick: () => n((i) => !i), children: [
810
- /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(Ut, {}) }),
811
- /* @__PURE__ */ o(_, { primary: "Switch to ..." }),
812
- t && e ? /* @__PURE__ */ o(Gt, {}) : /* @__PURE__ */ o(Vt, {})
813
- ] }),
814
- /* @__PURE__ */ o($t, { in: t && e, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ d(Ee, { component: "div", disablePadding: !0, children: [
815
- /* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "1. Something", inset: !0 }) }),
816
- /* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "2. Something else", inset: !0 }) }),
817
- /* @__PURE__ */ o(M, { sx: { pl: 2 }, children: /* @__PURE__ */ o(_, { primary: "3. Puppies!", inset: !0 }) })
818
- ] }) }),
819
- /* @__PURE__ */ d(M, { children: [
820
- /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(Xt, {}) }),
821
- /* @__PURE__ */ o(_, { primary: "Settings" })
822
- ] }),
823
- /* @__PURE__ */ d(M, { children: [
824
- /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(qt, {}) }),
825
- /* @__PURE__ */ o(_, { primary: "Log out" })
826
- ] })
827
- ] });
828
- }
829
- function An({
830
- open: e,
831
- offsetTop: t = 0,
811
+ function cn({
812
+ open: t,
813
+ offsetTop: e = 0,
832
814
  widthOpen: n,
833
815
  widthClosed: i,
834
816
  "data-testid": a,
835
817
  top: l,
836
818
  middle: p,
837
- user: u,
838
- domainCode: s
819
+ bottom: u,
820
+ user: s,
821
+ domainCode: d
839
822
  }) {
840
- return /* @__PURE__ */ o(xn, { className: X.root, "data-testid": a, children: /* @__PURE__ */ d(
841
- vn,
823
+ return /* @__PURE__ */ o(an, { className: G.root, "data-testid": a, children: /* @__PURE__ */ c(
824
+ sn,
842
825
  {
843
826
  variant: "permanent",
844
827
  anchor: "left",
845
- open: e,
828
+ open: t,
846
829
  widthOpen: n,
847
830
  widthClosed: i,
848
- offsetTop: t,
831
+ offsetTop: e,
849
832
  PaperProps: {
850
- // https://github.com/mui/material-ui/issues/27703
851
- // This isn't fixed in the version we are using at time of writing
852
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
853
- // @ts-ignore
854
833
  component: "nav"
855
834
  },
856
835
  children: [
857
- l && /* @__PURE__ */ d(w, { sx: { flex: "0 0 auto" }, children: [
836
+ l && /* @__PURE__ */ c(b, { sx: { flex: "0 0 auto" }, children: [
858
837
  l,
859
- /* @__PURE__ */ o(Ne, { variant: "middle" })
838
+ /* @__PURE__ */ o(Ot, { variant: "middle" })
860
839
  ] }),
861
- /* @__PURE__ */ o(w, { sx: { flex: "1 0 auto" }, children: Array.isArray(p) ? /* @__PURE__ */ o(Cn, { links: p }) : p }),
862
- /* @__PURE__ */ d(w, { sx: { flex: "0 0 auto" }, children: [
863
- /* @__PURE__ */ o(Ne, { variant: "middle" }),
864
- /* @__PURE__ */ o(wn, { user: u, domainCode: s, open: e }),
865
- /* @__PURE__ */ o(bn, { navBarOpen: e })
840
+ /* @__PURE__ */ o(b, { sx: { flex: "1 0 auto" }, children: Array.isArray(p) ? /* @__PURE__ */ o(ln, { links: p }) : p }),
841
+ /* @__PURE__ */ c(b, { sx: { flex: "0 0 auto" }, children: [
842
+ /* @__PURE__ */ o(Ot, { variant: "middle" }),
843
+ /* @__PURE__ */ o(
844
+ dn,
845
+ {
846
+ user: s,
847
+ domainCode: d,
848
+ open: t,
849
+ navBarWidthClosed: i,
850
+ navBarWidthOpen: n
851
+ }
852
+ ),
853
+ u && /* @__PURE__ */ o(k, { children: u })
866
854
  ] })
867
855
  ]
868
856
  }
869
857
  ) });
870
858
  }
871
- function Sn({ children: e, topBarHeight: t }) {
859
+ function pn({ children: t, topBarHeight: e }) {
872
860
  return /* @__PURE__ */ o(
873
- w,
861
+ b,
874
862
  {
875
863
  sx: {
876
864
  overflow: "auto",
877
- height: `calc(100vh - ${t}px)`,
865
+ height: `calc(100vh - ${e}px)`,
878
866
  scrollbarGutter: "stable",
879
867
  // scrollbarGutter: 'stable both-edges',
880
868
  flexGrow: 1
881
869
  },
882
870
  children: /* @__PURE__ */ o(
883
- Ye,
871
+ Ut,
884
872
  {
885
873
  component: "main",
886
874
  id: "main-content",
887
875
  sx: { paddingTop: 3, paddingBottom: 3, flexGrow: 1 },
888
- children: e
876
+ children: t
889
877
  }
890
878
  )
891
879
  }
892
880
  );
893
881
  }
894
- const In = 64, On = 64, Tn = 256, Ce = $(!0), we = $(Tn), be = $(On), ct = $(""), pt = $(In), ut = $(void 0), Dn = "TopBar", Bn = {
895
- titleText: `${Dn}-titleText`
882
+ const un = 64, hn = 64, gn = 256, mt = N(!0), oe = N(gn), ie = N(hn), re = N(""), ae = N(un), se = N(void 0), fn = "TopBar", mn = {
883
+ titleText: `${fn}-titleText`
896
884
  };
897
- function $n({ titleText: e = "", height: t, "data-testid": n }) {
898
- const i = Qt(Ce);
899
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ d(
900
- Qe,
885
+ function vn({ titleText: t = "", height: e, "data-testid": n }) {
886
+ const i = _e(mt);
887
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ c(
888
+ zt,
901
889
  {
902
890
  square: !0,
903
891
  elevation: 0,
@@ -910,178 +898,180 @@ function $n({ titleText: e = "", height: t, "data-testid": n }) {
910
898
  alignItems: "center",
911
899
  gap: 2,
912
900
  flexShrink: 0,
913
- height: t
901
+ height: e
914
902
  },
915
903
  children: [
916
- /* @__PURE__ */ o(q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => i((l) => !l), children: /* @__PURE__ */ o(jt, { fontSize: "medium" }) }),
917
- /* @__PURE__ */ o(B, { className: Bn.titleText, variant: "h6", children: e })
904
+ /* @__PURE__ */ o(V, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: () => i((l) => !l), children: /* @__PURE__ */ o(Me, { fontSize: "medium" }) }),
905
+ /* @__PURE__ */ o($, { className: mn.titleText, variant: "h6", children: t })
918
906
  ]
919
907
  }
920
908
  ) });
921
909
  }
922
- function fo({
923
- children: e,
924
- initialTitleText: t,
910
+ function no({
911
+ children: t,
912
+ initialTitleText: e,
925
913
  initialNavBarOpen: n,
926
914
  pageContainerProps: i,
927
915
  pageContentDataTestId: a,
928
916
  topBarDataTestId: l,
929
917
  navBarDataTestId: p,
930
918
  navBarMiddle: u,
931
- user: s,
932
- domainCode: c
919
+ navBarBottom: s,
920
+ user: d,
921
+ domainCode: v
933
922
  }) {
934
- const [x, f] = L(Ce), [C] = L(we), [m] = L(be), [O, S] = L(ct), [b] = L(pt), [I] = L(ut);
935
- return ae(() => {
936
- t !== void 0 && S(t);
937
- }, [t, S]), ae(() => {
938
- n !== void 0 && f(n);
939
- }, [n, f]), /* @__PURE__ */ d(w, { children: [
940
- /* @__PURE__ */ o(kt, {}),
941
- /* @__PURE__ */ o($n, { titleText: O, "data-testid": l, height: b }),
942
- /* @__PURE__ */ d(w, { sx: { display: "flex" }, children: [
923
+ const [f, x] = P(mt), [m] = P(oe), [T] = P(ie), [I, S] = P(re), [w] = P(ae), [O] = P(se);
924
+ return it(() => {
925
+ e !== void 0 && S(e);
926
+ }, [e, S]), it(() => {
927
+ n !== void 0 && x(n);
928
+ }, [n, x]), /* @__PURE__ */ c(b, { children: [
929
+ /* @__PURE__ */ o(Te, {}),
930
+ /* @__PURE__ */ o(vn, { titleText: I, "data-testid": l, height: w }),
931
+ /* @__PURE__ */ c(b, { sx: { display: "flex" }, children: [
943
932
  /* @__PURE__ */ o(
944
- An,
933
+ cn,
945
934
  {
946
- open: x,
947
- top: I,
935
+ open: f,
936
+ top: O,
948
937
  middle: u,
949
- user: s,
950
- domainCode: c,
951
- widthOpen: C,
952
- widthClosed: m,
953
- offsetTop: b,
938
+ bottom: s,
939
+ user: d,
940
+ domainCode: v,
941
+ widthOpen: m,
942
+ widthClosed: T,
943
+ offsetTop: w,
954
944
  "data-testid": p
955
945
  }
956
946
  ),
957
947
  /* @__PURE__ */ o(
958
- Sn,
959
- v(r({
948
+ pn,
949
+ C(r({
960
950
  "data-testid": a,
961
- topBarHeight: b
951
+ topBarHeight: w
962
952
  }, i), {
963
- children: e
953
+ children: t
964
954
  })
965
955
  )
966
956
  ] })
967
957
  ] });
968
958
  }
969
- const kn = {
959
+ const xn = {
970
960
  autoHideDuration: 6e3,
971
961
  anchorOrigin: { vertical: "top", horizontal: "center" },
972
962
  // The default is false. If we prefer timer to continue when window loses
973
963
  // focus, change to true
974
964
  disableWindowBlurListener: !1
975
- }, En = {
976
- shouldClose: (e, t) => t !== "clickaway"
977
- }, ze = {
965
+ }, Cn = {
966
+ shouldClose: (t, e) => e !== "clickaway"
967
+ }, Lt = {
978
968
  message: "",
979
969
  severity: "info",
980
970
  variant: "standard",
981
971
  progressIndicator: void 0
982
972
  // Can use 'circular' or 'linear'
983
- }, Ue = 100, Ge = 2e3, Nn = 2e3, Ln = (() => {
984
- let e = 0;
985
- return () => (e += 1, e);
986
- })(), Fn = {
973
+ }, yt = 100, Mt = 2e3, wn = 2e3, bn = (() => {
974
+ let t = 0;
975
+ return () => (t += 1, t);
976
+ })(), An = {
987
977
  borderBottomLeftRadius: "0px",
988
978
  borderBottomRightRadius: "0px"
989
- }, Pn = {}, yn = {}, ht = qe(null);
990
- function Mn(l) {
979
+ }, Sn = {}, Tn = {}, le = Rt(null);
980
+ function In(l) {
991
981
  var p = l, {
992
- overrideState: e = Pn,
993
- overrideActions: t = yn,
994
- shouldClose: n = En.shouldClose,
982
+ overrideState: t = Sn,
983
+ overrideActions: e = Tn,
984
+ shouldClose: n = Cn.shouldClose,
995
985
  children: i
996
- } = p, a = Be(p, [
986
+ } = p, a = St(p, [
997
987
  "overrideState",
998
988
  "overrideActions",
999
989
  "shouldClose",
1000
990
  "children"
1001
991
  ]);
1002
- var V;
1003
- const [{ open: u }, s] = T({ open: !1 }), c = he([]), x = he(Date.now()), f = he(0), C = re((h) => {
992
+ var U;
993
+ const [{ open: u }, s] = B({ open: !1 }), d = pt([]), v = pt(Date.now()), f = pt(0), x = ot((h) => {
1004
994
  s({ open: h });
1005
- }, []), m = re((h = {}) => {
1006
- f.current += 1, c.current.length >= Ue && Date.now() - x.current >= Ge && (x.current = Date.now(), console.error(
1007
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${f.current} times in last ${Ge}ms)`
995
+ }, []), m = ot((h = {}) => {
996
+ f.current += 1, d.current.length >= yt && Date.now() - v.current >= Mt && (v.current = Date.now(), console.error(
997
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${yt}) hit ${f.current} times in last ${Mt}ms)`
1008
998
  ), f.current = 0);
1009
- const g = r(v(r({}, ze), {
1010
- key: Ln()
999
+ const g = r(C(r({}, Lt), {
1000
+ key: bn()
1011
1001
  }), h);
1012
- return c.current.push(g), c.current.length === 1 && s({ open: !0 }), g.key;
1013
- }, []), O = (h = "", g = {}) => m(r({ message: h, severity: "success" }, g)), S = (h = "", g = {}) => m(r({ message: h, severity: "info" }, g)), b = (h = "", g = {}) => m(r({ message: h, severity: "warning" }, g)), I = (h = "", g = {}) => m(r({ message: h, severity: "error" }, g)), k = (h) => {
1014
- const g = c.current.findIndex((y) => y.key === h);
1002
+ return d.current.push(g), d.current.length === 1 && s({ open: !0 }), g.key;
1003
+ }, []), T = (h = "", g = {}) => m(r({ message: h, severity: "success" }, g)), I = (h = "", g = {}) => m(r({ message: h, severity: "info" }, g)), S = (h = "", g = {}) => m(r({ message: h, severity: "warning" }, g)), w = (h = "", g = {}) => m(r({ message: h, severity: "error" }, g)), O = (h) => {
1004
+ const g = d.current.findIndex((y) => y.key === h);
1015
1005
  if (g !== -1)
1016
- return g === 0 ? (s({ open: !1 }), c.current[0]) : c.current.splice(g, 1);
1017
- }, W = (h, g) => {
1006
+ return g === 0 ? (s({ open: !1 }), d.current[0]) : d.current.splice(g, 1);
1007
+ }, H = (h, g) => {
1018
1008
  n(h, g) && s({ open: !1 });
1019
- }, z = () => {
1020
- }, U = () => {
1021
- c.current.shift(), c.current.length > 0 && s({ open: !0 });
1022
- }, D = (V = c.current[0]) != null ? V : r({}, ze), Q = {};
1023
- "autoHideDuration" in D && (Q.autoHideDuration = D.autoHideDuration);
1024
- const Y = r(r({}, kn), a), G = r(r({
1009
+ }, R = () => {
1010
+ }, W = () => {
1011
+ d.current.shift(), d.current.length > 0 && s({ open: !0 });
1012
+ }, D = (U = d.current[0]) != null ? U : r({}, Lt), q = {};
1013
+ "autoHideDuration" in D && (q.autoHideDuration = D.autoHideDuration);
1014
+ const j = r(r({}, xn), a), z = r(r({
1025
1015
  open: u,
1026
- setOpen: C,
1016
+ setOpen: x,
1027
1017
  enqueueNotification: m,
1028
- enqueueSuccessNotification: O,
1029
- enqueueInfoNotification: S,
1030
- enqueueWarningNotification: b,
1031
- enqueueErrorNotification: I,
1032
- removeNotification: k
1033
- }, e), t);
1034
- return /* @__PURE__ */ d(ht.Provider, { value: G, children: [
1018
+ enqueueSuccessNotification: T,
1019
+ enqueueInfoNotification: I,
1020
+ enqueueWarningNotification: S,
1021
+ enqueueErrorNotification: w,
1022
+ removeNotification: O
1023
+ }, t), e);
1024
+ return /* @__PURE__ */ c(le.Provider, { value: z, children: [
1035
1025
  i,
1036
1026
  /* @__PURE__ */ o(
1037
- Et,
1038
- v(r(r({}, Y), Q), {
1027
+ Ie,
1028
+ C(r(r({}, j), q), {
1039
1029
  open: u,
1040
- onClose: W,
1030
+ onClose: H,
1041
1031
  TransitionProps: {
1042
- onExited: U,
1043
- onExit: z
1032
+ onExited: W,
1033
+ onExit: R
1044
1034
  },
1045
- sx: { zIndex: Nn },
1046
- children: /* @__PURE__ */ d("div", { children: [
1035
+ sx: { zIndex: wn },
1036
+ children: /* @__PURE__ */ c("div", { children: [
1047
1037
  /* @__PURE__ */ o(
1048
- Nt,
1038
+ Oe,
1049
1039
  {
1050
- onClose: (h) => W(h, "closeAlert"),
1040
+ onClose: (h) => H(h, "closeAlert"),
1051
1041
  severity: D.severity,
1052
1042
  variant: "filled",
1053
- icon: D.progressIndicator === "circular" ? /* @__PURE__ */ o(Je, { size: "1em" }) : void 0,
1054
- style: D.progressIndicator === "linear" ? Fn : void 0,
1043
+ icon: D.progressIndicator === "circular" ? /* @__PURE__ */ o(Gt, { size: "1em" }) : void 0,
1044
+ style: D.progressIndicator === "linear" ? An : void 0,
1055
1045
  children: D.message
1056
1046
  }
1057
1047
  ),
1058
- D.progressIndicator === "linear" && /* @__PURE__ */ o(Lt, { color: "primary" })
1048
+ D.progressIndicator === "linear" && /* @__PURE__ */ o(De, { color: "primary" })
1059
1049
  ] })
1060
1050
  })
1061
1051
  )
1062
1052
  ] });
1063
1053
  }
1064
- function _n() {
1065
- const e = je(ht);
1066
- if (e === null)
1067
- throw new ve("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1068
- return e;
1054
+ function On() {
1055
+ const t = Wt(le);
1056
+ if (t === null)
1057
+ throw new ft("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1058
+ return t;
1069
1059
  }
1070
- const mo = se(
1071
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Mn, v(r({}, e), { overrideState: t, overrideActions: n, children: i }))
1072
- ), Hn = Yt(), xo = ({
1073
- children: e,
1074
- store: t
1075
- }) => /* @__PURE__ */ o(ot, { store: t != null ? t : Hn, children: e }), gt = "domainCode";
1076
- var Xe;
1077
- const Ve = $(
1078
- JSON.parse((Xe = localStorage.getItem(gt)) != null ? Xe : '{"domainCode": ""}').domainCode
1079
- ), ft = $(
1080
- (e) => e(Ve),
1081
- (e, t, n) => {
1082
- t(Ve, n), localStorage.setItem(gt, JSON.stringify({ domainCode: n }));
1060
+ const oo = rt(
1061
+ (t = { autoHideDuration: 1 }, e = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(In, C(r({}, t), { overrideState: e, overrideActions: n, children: i }))
1062
+ ), Dn = He(), io = ({
1063
+ children: t,
1064
+ store: e
1065
+ }) => /* @__PURE__ */ o(Yt, { store: e != null ? e : Dn, children: t }), de = "domainCode";
1066
+ var Ht;
1067
+ const _t = N(
1068
+ JSON.parse((Ht = localStorage.getItem(de)) != null ? Ht : '{"domainCode": ""}').domainCode
1069
+ ), ce = N(
1070
+ (t) => t(_t),
1071
+ (t, e, n) => {
1072
+ e(_t, n), localStorage.setItem(de, JSON.stringify({ domainCode: n }));
1083
1073
  }
1084
- ), Rn = {
1074
+ ), Bn = {
1085
1075
  act: "ACT",
1086
1076
  nsw: "NSW",
1087
1077
  nt: "NT",
@@ -1093,76 +1083,76 @@ const Ve = $(
1093
1083
  ag: "AG",
1094
1084
  fedmps: "Fedmps",
1095
1085
  "": ""
1096
- }, Wn = (e) => {
1097
- var t;
1098
- return e === null ? "N/A" : (t = Rn[e]) != null ? t : "";
1099
- }, vo = ({
1100
- isLoading: e,
1101
- isOpen: t,
1086
+ }, $n = (t) => {
1087
+ var e;
1088
+ return t === null ? "N/A" : (e = Bn[t]) != null ? e : "";
1089
+ }, ro = ({
1090
+ isLoading: t,
1091
+ isOpen: e,
1102
1092
  onClose: n,
1103
1093
  domainOptions: i,
1104
1094
  applicationName: a,
1105
1095
  handleLogout: l
1106
1096
  }) => {
1107
- const [p, u] = L(ft), [s, c] = T(p), { enqueueSuccessNotification: x } = _n(), f = i.length === 0, C = !!p && !i.includes(p) && !i.includes(s), m = !p || f || C, O = () => ee(void 0, null, function* () {
1108
- s ? (u(s), x(`Set domain to ${s}`), n()) : u("");
1109
- }), S = () => ee(void 0, null, function* () {
1110
- p && !f && !C ? (c(p), n()) : m && l();
1097
+ const [p, u] = P(ce), [s, d] = B(p), { enqueueSuccessNotification: v } = On(), f = i.length === 0, x = !!p && !i.includes(p) && !i.includes(s), m = !p || f || x, T = () => K(void 0, null, function* () {
1098
+ s ? (u(s), v(`Set domain to ${s}`), n()) : u("");
1099
+ }), I = () => K(void 0, null, function* () {
1100
+ p && !f && !x ? (d(p), n()) : m && l();
1111
1101
  });
1112
- let b;
1113
- return f ? b = "Unable to retrieve your active organisations. Try logging in again." : C && (b = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ d(
1114
- ln,
1102
+ let S;
1103
+ return f ? S = "Unable to retrieve your active organisations. Try logging in again." : x && (S = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ c(
1104
+ Ye,
1115
1105
  {
1116
- isOpen: t,
1106
+ isOpen: e,
1117
1107
  dialogTitle: "Select an organisation",
1118
1108
  primaryButton: {
1119
1109
  text: "Confirm",
1120
- onClick: O,
1121
- disabled: !s || f || C,
1110
+ onClick: T,
1111
+ disabled: !s || f || x,
1122
1112
  buttonColor: "primary"
1123
1113
  },
1124
1114
  secondaryButton: {
1125
1115
  text: m ? "Logout" : "Cancel",
1126
- onClick: S
1116
+ onClick: I
1127
1117
  },
1128
1118
  onClose: m ? () => {
1129
1119
  } : n,
1130
1120
  children: [
1131
- /* @__PURE__ */ d(B, { marginBottom: 2, children: [
1121
+ /* @__PURE__ */ c($, { marginBottom: 2, children: [
1132
1122
  "Select the default organisation that you want to use with the ",
1133
1123
  a,
1134
1124
  "."
1135
1125
  ] }),
1136
1126
  /* @__PURE__ */ o(
1137
- Ft,
1127
+ Be,
1138
1128
  {
1139
- loading: e,
1129
+ loading: t,
1140
1130
  multiple: !1,
1141
1131
  disableClearable: !1,
1142
1132
  value: s !== "" ? s : null,
1143
- onChange: (I, k) => c(k != null ? k : ""),
1144
- getOptionLabel: Wn,
1133
+ onChange: (w, O) => d(O != null ? O : ""),
1134
+ getOptionLabel: $n,
1145
1135
  options: [...i],
1146
- renderInput: (I) => /* @__PURE__ */ o(
1147
- Pt,
1148
- v(r({}, I), {
1136
+ renderInput: (w) => /* @__PURE__ */ o(
1137
+ $e,
1138
+ C(r({}, w), {
1149
1139
  variant: "filled",
1150
1140
  label: "Select organisation",
1151
- InputProps: v(r({}, I.InputProps), {
1152
- endAdornment: /* @__PURE__ */ d(P, { children: [
1153
- e ? /* @__PURE__ */ o(Je, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1154
- I.InputProps.endAdornment
1141
+ InputProps: C(r({}, w.InputProps), {
1142
+ endAdornment: /* @__PURE__ */ c(k, { children: [
1143
+ t ? /* @__PURE__ */ o(Gt, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1144
+ w.InputProps.endAdornment
1155
1145
  ] })
1156
1146
  })
1157
1147
  })
1158
1148
  )
1159
1149
  }
1160
1150
  ),
1161
- b && /* @__PURE__ */ o(yt, { error: !0, children: b })
1151
+ S && /* @__PURE__ */ o(ke, { error: !0, children: S })
1162
1152
  ]
1163
1153
  }
1164
1154
  );
1165
- }, Co = Ke({
1155
+ }, ao = Vt({
1166
1156
  palette: {
1167
1157
  primary: {
1168
1158
  dark: "#00A651",
@@ -1213,7 +1203,7 @@ const Ve = $(
1213
1203
  navBar: {
1214
1204
  backgroundColor: "#E8E8E8"
1215
1205
  }
1216
- }), wo = Ke({
1206
+ }), so = Vt({
1217
1207
  palette: {
1218
1208
  primary: {
1219
1209
  main: "#007236",
@@ -1265,22 +1255,22 @@ const Ve = $(
1265
1255
  MuiMenuItem: {
1266
1256
  // Setting defaultProps for color on MenuItem does not work, so update manually
1267
1257
  styleOverrides: {
1268
- root: ({ theme: e }) => ({
1258
+ root: ({ theme: t }) => ({
1269
1259
  "&.Mui-selected": {
1270
- backgroundColor: fe(
1271
- e.palette.secondary.main,
1272
- e.palette.action.selectedOpacity
1260
+ backgroundColor: ut(
1261
+ t.palette.secondary.main,
1262
+ t.palette.action.selectedOpacity
1273
1263
  ),
1274
1264
  "&:hover": {
1275
- backgroundColor: fe(
1276
- e.palette.secondary.main,
1277
- e.palette.action.selectedOpacity
1265
+ backgroundColor: ut(
1266
+ t.palette.secondary.main,
1267
+ t.palette.action.selectedOpacity
1278
1268
  )
1279
1269
  },
1280
1270
  "&.Mui-focusVisible": {
1281
- backgroundColor: fe(
1282
- e.palette.secondary.main,
1283
- e.palette.action.focusOpacity
1271
+ backgroundColor: ut(
1272
+ t.palette.secondary.main,
1273
+ t.palette.action.focusOpacity
1284
1274
  )
1285
1275
  }
1286
1276
  }
@@ -1304,65 +1294,65 @@ const Ve = $(
1304
1294
  navBar: {
1305
1295
  backgroundColor: "#E8E8E8"
1306
1296
  }
1307
- }), zn = {
1308
- domainCode: ft,
1309
- navBarOpen: Ce,
1310
- navBarWidthOpen: we,
1311
- navBarWidthClosed: be,
1312
- titleText: ct,
1313
- topBarHeight: pt,
1314
- navBarTop: ut
1315
- }, bo = se(() => ({ children: e }) => /* @__PURE__ */ o(ot, { children: e })), Un = ({
1316
- initialValues: e,
1317
- children: t
1318
- }) => (Jt(e), /* @__PURE__ */ o(P, { children: t })), Ao = se(
1319
- (e) => ({ children: t }) => /* @__PURE__ */ o(
1320
- Un,
1297
+ }), kn = {
1298
+ domainCode: ce,
1299
+ navBarOpen: mt,
1300
+ navBarWidthOpen: oe,
1301
+ navBarWidthClosed: ie,
1302
+ titleText: re,
1303
+ topBarHeight: ae,
1304
+ navBarTop: se
1305
+ }, lo = rt(() => ({ children: t }) => /* @__PURE__ */ o(Yt, { children: t })), Nn = ({
1306
+ initialValues: t,
1307
+ children: e
1308
+ }) => (Re(t), /* @__PURE__ */ o(k, { children: e })), co = rt(
1309
+ (t) => ({ children: e }) => /* @__PURE__ */ o(
1310
+ Nn,
1321
1311
  {
1322
- initialValues: Object.entries(e).map(
1312
+ initialValues: Object.entries(t).map(
1323
1313
  ([n, i]) => [
1324
- zn[n],
1314
+ kn[n],
1325
1315
  i
1326
1316
  ]
1327
1317
  ),
1328
- children: t
1318
+ children: e
1329
1319
  }
1330
1320
  )
1331
1321
  );
1332
1322
  export {
1333
- ln as AgDialog,
1334
- fo as AppLayout,
1335
- xo as AtomProvider,
1336
- ht as Context,
1337
- ve as ContextError,
1338
- vo as DomainCodeDialog,
1339
- lo as ExampleComponent,
1340
- Un as HydrateAtoms,
1341
- rt as NAVBAR_WIDTH_CLOSED,
1342
- it as NAVBAR_WIDTH_OPENED,
1343
- ho as NavBar,
1344
- po as NavBarDarkStyledList,
1345
- uo as NavBarLightStyledList,
1346
- rn as NavBarProvider,
1347
- go as PageLayout,
1348
- Mn as SaladBarProvider,
1349
- Hn as atomStore,
1350
- sn as buildNavBarState,
1351
- ft as domainCodeAtom,
1352
- Co as fed21Theme,
1353
- wo as internalAgSystemsTheme,
1354
- H as navBarClasses,
1355
- Ce as navBarOpenAtom,
1356
- ut as navBarTopAtom,
1357
- be as navBarWidthClosedAtom,
1358
- we as navBarWidthOpenAtom,
1359
- ct as titleTextAtom,
1360
- pt as topBarHeightAtom,
1361
- an as useNavBar,
1362
- _n as useSaladBar,
1363
- bo as withAtomProvider,
1364
- co as withNavBarProvider,
1365
- Ao as withOverrideDefaults,
1366
- mo as withSaladBarProvider
1323
+ Ye as AgDialog,
1324
+ no as AppLayout,
1325
+ io as AtomProvider,
1326
+ le as Context,
1327
+ ft as ContextError,
1328
+ ro as DomainCodeDialog,
1329
+ Yn as ExampleComponent,
1330
+ Nn as HydrateAtoms,
1331
+ Kt as NAVBAR_WIDTH_CLOSED,
1332
+ Jt as NAVBAR_WIDTH_OPENED,
1333
+ to as NavBar,
1334
+ Kn as NavBarDarkStyledList,
1335
+ Zn as NavBarLightStyledList,
1336
+ qe as NavBarProvider,
1337
+ eo as PageLayout,
1338
+ In as SaladBarProvider,
1339
+ Dn as atomStore,
1340
+ Qe as buildNavBarState,
1341
+ ce as domainCodeAtom,
1342
+ ao as fed21Theme,
1343
+ so as internalAgSystemsTheme,
1344
+ M as navBarClasses,
1345
+ mt as navBarOpenAtom,
1346
+ se as navBarTopAtom,
1347
+ ie as navBarWidthClosedAtom,
1348
+ oe as navBarWidthOpenAtom,
1349
+ re as titleTextAtom,
1350
+ ae as topBarHeightAtom,
1351
+ je as useNavBar,
1352
+ On as useSaladBar,
1353
+ lo as withAtomProvider,
1354
+ Jn as withNavBarProvider,
1355
+ co as withOverrideDefaults,
1356
+ oo as withSaladBarProvider
1367
1357
  };
1368
1358
  //# sourceMappingURL=index.js.map