@australiangreens/ag-internal-components 0.0.46 → 0.0.47

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