@australiangreens/ag-internal-components 0.0.60 → 0.0.61

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,62 +1,62 @@
1
1
  var It = Object.defineProperty, Dt = Object.defineProperties;
2
2
  var Ot = Object.getOwnPropertyDescriptors;
3
3
  var Z = Object.getOwnPropertySymbols;
4
- var Te = Object.prototype.hasOwnProperty, Ee = 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, i = (e, t) => {
4
+ var Ee = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable;
5
+ var he = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- Te.call(t, n) && ue(e, n, t[n]);
7
+ Ee.call(t, n) && he(e, n, t[n]);
8
8
  if (Z)
9
9
  for (var n of Z(t))
10
- Ee.call(t, n) && ue(e, n, t[n]);
10
+ ye.call(t, n) && he(e, n, t[n]);
11
11
  return e;
12
- }, A = (e, t) => Dt(e, Ot(t));
13
- var ye = (e, t) => {
12
+ }, b = (e, t) => Dt(e, Ot(t));
13
+ var Be = (e, t) => {
14
14
  var n = {};
15
15
  for (var r in e)
16
- Te.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
16
+ Ee.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
17
17
  if (e != null && Z)
18
18
  for (var r of Z(e))
19
- t.indexOf(r) < 0 && Ee.call(e, r) && (n[r] = e[r]);
19
+ t.indexOf(r) < 0 && ye.call(e, r) && (n[r] = e[r]);
20
20
  return n;
21
21
  };
22
- var Be = (e, t, n) => (ue(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var R = (e, t, n) => new Promise((r, a) => {
24
- var l = (c) => {
22
+ var $e = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
23
+ var W = (e, t, n) => new Promise((r, a) => {
24
+ var l = (d) => {
25
25
  try {
26
- C(n.next(c));
27
- } catch (u) {
28
- a(u);
26
+ m(n.next(d));
27
+ } catch (g) {
28
+ a(g);
29
29
  }
30
- }, s = (c) => {
30
+ }, c = (d) => {
31
31
  try {
32
- C(n.throw(c));
33
- } catch (u) {
34
- a(u);
32
+ m(n.throw(d));
33
+ } catch (g) {
34
+ a(g);
35
35
  }
36
- }, C = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(l, s);
37
- C((n = n.apply(e, t)).next());
36
+ }, m = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(l, c);
37
+ m((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as m, Fragment as B, jsx as o } from "react/jsx-runtime";
40
- import { useState as O, createContext as Xe, useCallback as ne, useContext as je, useEffect as X, useMemo as kt, createElement as Ce, useRef as he } from "react";
41
- import { Typography as $, Button as Tt, Paper as Qe, Box as I, Drawer as ve, Autocomplete as we, TextField as xe, CircularProgress as be, Chip as Et, Tooltip as yt, Stack as Bt, styled as Ae, IconButton as Q, Container as Ke, useTheme as re, useMediaQuery as $t, Collapse as Nt, Avatar as $e, Fade as Ft, Skeleton as Ne, Toolbar as Lt, Divider as Fe, CssBaseline as Pt, Snackbar as Mt, Alert as _t, LinearProgress as Ht, FormHelperText as Rt } from "@mui/material";
39
+ import { jsxs as C, Fragment as B, jsx as o } from "react/jsx-runtime";
40
+ import { useState as D, createContext as je, useCallback as ne, useContext as Qe, useEffect as X, useMemo as kt, createElement as ve, useRef as ge } from "react";
41
+ import { Typography as $, Button as Tt, Paper as Ke, Box as S, Drawer as we, Autocomplete as xe, TextField as be, CircularProgress as Ae, Chip as Et, Tooltip as yt, Stack as Bt, styled as Se, IconButton as Q, Container as Je, useTheme as re, useMediaQuery as $t, Collapse as Nt, Avatar as Ne, Fade as Ft, Skeleton as Fe, Toolbar as Lt, Divider as Le, CssBaseline as Pt, Snackbar as Mt, Alert as _t, LinearProgress as Ht, FormHelperText as Rt } from "@mui/material";
42
42
  import Wt from "@mui/material/CssBaseline";
43
- import { styled as M, createTheme as Je, alpha as ge } from "@mui/material/styles";
43
+ import { styled as M, createTheme as Ye, alpha as fe } from "@mui/material/styles";
44
44
  import { AgError as zt } from "@australiangreens/ag-error";
45
45
  import { createHelper as ie } from "souvlaki";
46
- import Ye from "@mui/material/List";
47
- import Le from "@mui/material/Button";
46
+ import Ze from "@mui/material/List";
47
+ import Pe from "@mui/material/Button";
48
48
  import Gt from "@mui/material/Dialog";
49
49
  import Ut from "@mui/material/DialogActions";
50
50
  import qt from "@mui/material/DialogContent";
51
51
  import Vt from "@mui/material/DialogTitle";
52
- import { Cancel as Xt, ArrowDropDown as jt, ArrowForward as Ze, ArrowBack as et, ViewHeadline as Qt } from "@mui/icons-material";
52
+ import { Cancel as Xt, ArrowDropDown as jt, ArrowForward as et, ArrowBack as tt, ViewHeadline as Qt } from "@mui/icons-material";
53
53
  import Kt from "autosuggest-highlight/parse";
54
54
  import Jt from "autosuggest-highlight/match";
55
- import { atom as _, useSetAtom as tt, useAtom as z, getDefaultStore as Yt, Provider as nt } from "jotai";
55
+ import { atom as _, useSetAtom as nt, useAtom as G, getDefaultStore as Yt, Provider as ot } from "jotai";
56
56
  import { useHydrateAtoms as Zt } from "jotai/utils";
57
57
  function go({ text: e }) {
58
- const [t, n] = O(0);
59
- return /* @__PURE__ */ m(B, { children: [
58
+ const [t, n] = D(0);
59
+ return /* @__PURE__ */ C(B, { children: [
60
60
  /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
61
  /* @__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" }) }),
62
62
  /* @__PURE__ */ o(
@@ -68,25 +68,25 @@ function go({ text: e }) {
68
68
  children: "Hello I am a button"
69
69
  }
70
70
  ),
71
- /* @__PURE__ */ m("p", { children: [
71
+ /* @__PURE__ */ C("p", { children: [
72
72
  "This is some text: ",
73
73
  /* @__PURE__ */ o("span", { children: e })
74
74
  ] }),
75
- /* @__PURE__ */ m(Qe, { children: [
75
+ /* @__PURE__ */ C(Ke, { children: [
76
76
  "This number will incremember when button pressed: ",
77
77
  t
78
78
  ] })
79
79
  ] });
80
80
  }
81
- const ot = 330, rt = 73, W = "Navbar", V = {
82
- root: `${W}-root`,
83
- menuButton: `${W}-menuButton`,
84
- hide: `${W}-hide`,
85
- content: `${W}-content`,
86
- userInfoHolder: `${W}-userInfoHolder`,
87
- settings: `${W}-settings`,
88
- pieChartIcon: `${W}-pieChartIcon`
89
- }, en = M(I, {
81
+ const rt = 330, it = 73, z = "Navbar", V = {
82
+ root: `${z}-root`,
83
+ menuButton: `${z}-menuButton`,
84
+ hide: `${z}-hide`,
85
+ content: `${z}-content`,
86
+ userInfoHolder: `${z}-userInfoHolder`,
87
+ settings: `${z}-settings`,
88
+ pieChartIcon: `${z}-pieChartIcon`
89
+ }, en = M(S, {
90
90
  name: "NavBar"
91
91
  })(({ theme: e }) => ({
92
92
  [`&.${V.root}`]: {
@@ -107,7 +107,7 @@ const ot = 330, rt = 73, W = "Navbar", V = {
107
107
  marginTop: "64px",
108
108
  marginBottom: "16px"
109
109
  }
110
- })), it = () => ({
110
+ })), at = () => ({
111
111
  position: "absolute",
112
112
  height: "100%",
113
113
  overflowX: "hidden",
@@ -116,13 +116,13 @@ const ot = 330, rt = 73, W = "Navbar", V = {
116
116
  backgroundColor: "black"
117
117
  // backgroundColor: '#e8e8e8',
118
118
  }), tn = () => i({
119
- width: ot
120
- }, it()), nn = () => i({
121
119
  width: rt
122
- }, it()), on = M(ve, {
120
+ }, at()), nn = () => i({
121
+ width: it
122
+ }, at()), on = M(we, {
123
123
  shouldForwardProp: (e) => e !== "open"
124
124
  })(({ theme: e, open: t }) => i(i({
125
- width: t ? ot : rt,
125
+ width: t ? rt : it,
126
126
  flexShrink: 0,
127
127
  whiteSpace: "nowrap",
128
128
  boxSizing: "border-box",
@@ -132,34 +132,34 @@ const ot = 330, rt = 73, W = "Navbar", V = {
132
132
  }), !t && {
133
133
  "& .MuiDrawer-paper": nn()
134
134
  }));
135
- class Se extends zt {
135
+ class Ie extends zt {
136
136
  }
137
- Be(Se, "errorName", "ContextError");
138
- const at = Xe(null), rn = {}, an = {}, sn = ({
137
+ $e(Ie, "errorName", "ContextError");
138
+ const st = je(null), rn = {}, an = {}, sn = ({
139
139
  overrideState: e = rn,
140
140
  overrideActions: t = an,
141
141
  children: n
142
142
  }) => {
143
- const [{ open: r }, a] = O({ open: !0 }), l = ne((c) => {
144
- a({ open: c });
145
- }, []), s = ne(() => {
146
- a((c) => A(i({}, c), { open: !c.open }));
147
- }, []), C = i(i({
143
+ const [{ open: r }, a] = D({ open: !0 }), l = ne((d) => {
144
+ a({ open: d });
145
+ }, []), c = ne(() => {
146
+ a((d) => b(i({}, d), { open: !d.open }));
147
+ }, []), m = i(i({
148
148
  open: r,
149
149
  setOpen: l,
150
- toggleOpen: s
150
+ toggleOpen: c
151
151
  }, e), t);
152
- return /* @__PURE__ */ o(at.Provider, { value: C, children: n });
152
+ return /* @__PURE__ */ o(st.Provider, { value: m, children: n });
153
153
  }, ln = () => {
154
- const e = je(at);
154
+ const e = Qe(st);
155
155
  if (e === null)
156
- throw new Se("Error: Tried to useNavBar outside of a <NavBarProvider>");
156
+ throw new Ie("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
157
  return e;
158
158
  }, cn = (e = {}) => i({
159
159
  open: !0
160
160
  }, e), fo = ie(
161
161
  (e = cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(sn, { overrideState: e, overrideActions: t, children: n })
162
- ), Pe = 7, mo = M(Ye)(({ theme: e }) => ({
162
+ ), Me = 7, mo = M(Ze)(({ theme: e }) => ({
163
163
  backgroundColor: "black",
164
164
  color: "white",
165
165
  "& .MuiListItem-root": {
@@ -168,7 +168,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
168
168
  "& .MuiListItemButton-root": {
169
169
  " .MuiListItemIcon-root": {
170
170
  color: "white",
171
- padding: `${Pe}px`
171
+ padding: `${Me}px`
172
172
  },
173
173
  // Focus state
174
174
  "&.Mui-focusVisible": {
@@ -179,7 +179,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
179
179
  borderLeftStyle: "solid",
180
180
  borderLeftWidth: "7px",
181
181
  borderLeftColor: e.palette.primary.main,
182
- paddingLeft: `calc(${e.spacing(2)} - ${Pe}px)`
182
+ paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
183
183
  },
184
184
  // Hover state
185
185
  "&:hover": {
@@ -197,7 +197,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
197
197
  // '&.Mui-selected.Mui-focusVisible:hover': {
198
198
  // },
199
199
  }
200
- })), Me = 7, Co = M(Ye)(({ theme: e }) => ({
200
+ })), _e = 7, Co = M(Ze)(({ theme: e }) => ({
201
201
  backgroundColor: "#e8e8e8",
202
202
  color: "inherit",
203
203
  "& .MuiListItem-root": {
@@ -206,7 +206,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
206
206
  "& .MuiListItemButton-root": {
207
207
  " .MuiListItemIcon-root": {
208
208
  color: "inherit",
209
- padding: `${Me}px`
209
+ padding: `${_e}px`
210
210
  },
211
211
  // Focus state
212
212
  "&.Mui-focusVisible": {
@@ -217,7 +217,7 @@ const at = Xe(null), rn = {}, an = {}, sn = ({
217
217
  borderLeftStyle: "solid",
218
218
  borderLeftWidth: "7px",
219
219
  borderLeftColor: e.palette.primary.main,
220
- paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
220
+ paddingLeft: `calc(${e.spacing(2)} - ${_e}px)`
221
221
  },
222
222
  // Hover state
223
223
  "&:hover": {
@@ -241,7 +241,7 @@ function vo({
241
241
  children: t
242
242
  }) {
243
243
  const { open: n } = ln();
244
- return /* @__PURE__ */ m(en, { className: V.root, "data-testid": e, children: [
244
+ return /* @__PURE__ */ C(en, { className: V.root, "data-testid": e, children: [
245
245
  /* @__PURE__ */ o(Wt, {}),
246
246
  /* @__PURE__ */ o(
247
247
  on,
@@ -262,42 +262,42 @@ const dn = ({
262
262
  maxWidth: r,
263
263
  primaryButton: a,
264
264
  secondaryButton: l,
265
- onClose: s
265
+ onClose: c
266
266
  }) => {
267
- var u, x;
268
- const [C, c] = O(!1);
269
- return /* @__PURE__ */ m(
267
+ var g, w;
268
+ const [m, d] = D(!1);
269
+ return /* @__PURE__ */ C(
270
270
  Gt,
271
271
  {
272
272
  open: e,
273
273
  onClose: () => {
274
- C || s();
274
+ m || c();
275
275
  },
276
276
  fullWidth: !0,
277
277
  maxWidth: r != null ? r : "xs",
278
278
  children: [
279
279
  /* @__PURE__ */ o(Vt, { children: t }),
280
280
  /* @__PURE__ */ o(qt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
281
- /* @__PURE__ */ m(Ut, { children: [
281
+ /* @__PURE__ */ C(Ut, { children: [
282
282
  /* @__PURE__ */ o(
283
- Le,
283
+ Pe,
284
284
  {
285
- onClick: (u = l == null ? void 0 : l.onClick) != null ? u : s,
285
+ onClick: (g = l == null ? void 0 : l.onClick) != null ? g : c,
286
286
  "data-testid": l == null ? void 0 : l.testId,
287
- disabled: (l == null ? void 0 : l.disabled) || C,
287
+ disabled: (l == null ? void 0 : l.disabled) || m,
288
288
  color: l == null ? void 0 : l.buttonColor,
289
- children: (x = l == null ? void 0 : l.text) != null ? x : "Cancel"
289
+ children: (w = l == null ? void 0 : l.text) != null ? w : "Cancel"
290
290
  }
291
291
  ),
292
292
  a && /* @__PURE__ */ o(
293
- Le,
293
+ Pe,
294
294
  {
295
- onClick: () => R(void 0, null, function* () {
296
- var w;
297
- c(!0), yield (w = a.onClick) == null ? void 0 : w.call(a), c(!1);
295
+ onClick: () => W(void 0, null, function* () {
296
+ var x;
297
+ d(!0), yield (x = a.onClick) == null ? void 0 : x.call(a), d(!1);
298
298
  }),
299
299
  "data-testid": a.testId,
300
- disabled: a.disabled || C,
300
+ disabled: a.disabled || m,
301
301
  color: a == null ? void 0 : a.buttonColor,
302
302
  children: a.text
303
303
  }
@@ -308,111 +308,112 @@ const dn = ({
308
308
  );
309
309
  };
310
310
  function wo({
311
- lookup: e = () => R(this, null, function* () {
311
+ lookup: e = () => W(this, null, function* () {
312
312
  }),
313
313
  enableHighlighting: t = !0,
314
314
  onChange: n,
315
315
  minLength: r,
316
316
  label: a,
317
317
  value: l,
318
- dataTestidPrefix: s,
319
- sx: C,
320
- textFieldColor: c,
321
- loadingText: u = "Loading...",
318
+ dataTestidPrefix: c,
319
+ sx: m,
320
+ textFieldColor: d,
321
+ textFieldVariant: g = "filled",
322
+ loadingText: w = "Loading...",
322
323
  noOptionsText: x = "No options",
323
- popupIcon: w = /* @__PURE__ */ o(jt, {}),
324
- error: S = !1,
325
- helperText: b = "",
326
- preLoadedOptions: g = void 0
324
+ popupIcon: A = /* @__PURE__ */ o(jt, {}),
325
+ error: v = !1,
326
+ helperText: O = "",
327
+ preLoadedOptions: f = void 0
327
328
  }) {
328
- const [h, k] = O(""), [D, T] = O(g || []), [N, F] = O(!1), [L, E] = O(!1), U = (d, f) => {
329
- const p = l.filter((v) => v.id !== f);
330
- n(p, "delete", d);
329
+ const [h, I] = D(""), [E, N] = D(f || []), [F, L] = D(!1), [k, P] = D(!1), q = (p, s) => {
330
+ const u = l.filter((y) => y.id !== s);
331
+ n(u, "delete", p);
331
332
  };
332
333
  X(() => {
333
- let d;
334
- const f = () => R(this, null, function* () {
335
- d = new AbortController();
334
+ let p;
335
+ const s = () => W(this, null, function* () {
336
+ p = new AbortController();
336
337
  try {
337
- const p = yield e(h, d.signal);
338
- T(p != null ? p : []), E(!1);
339
- } catch (p) {
340
- if (p instanceof Error && p.name === "AbortError")
338
+ const u = yield e(h, p.signal);
339
+ N(u != null ? u : []), P(!1);
340
+ } catch (u) {
341
+ if (u instanceof Error && u.name === "AbortError")
341
342
  console.debug("Previous lookup request was cancelled");
342
343
  else
343
- throw p;
344
+ throw u;
344
345
  }
345
346
  });
346
347
  if (h !== "")
347
- return (!r || h.length >= r) && !g ? (E(!0), f()) : E(!1), function() {
348
- d && d.abort();
348
+ return (!r || h.length >= r) && !f ? (P(!0), s()) : P(!1), function() {
349
+ p && p.abort();
349
350
  };
350
- }, [h, e, r, g]), X(() => {
351
- !N && !g && T([]), !N && g && T(g);
352
- }, [N, g]);
353
- const q = kt(() => g ? (d, f) => d.filter(
354
- (p) => p.label.toLowerCase().includes(f.inputValue.toLowerCase())
355
- ) : (d) => d, [g]);
356
- return /* @__PURE__ */ m(B, { children: [
351
+ }, [h, e, r, f]), X(() => {
352
+ !F && !f && N([]), !F && f && N(f);
353
+ }, [F, f]);
354
+ const H = kt(() => f ? (p, s) => p.filter(
355
+ (u) => u.label.toLowerCase().includes(s.inputValue.toLowerCase())
356
+ ) : (p) => p, [f]);
357
+ return /* @__PURE__ */ C(B, { children: [
357
358
  /* @__PURE__ */ o(
358
- we,
359
+ xe,
359
360
  {
360
- sx: C,
361
- "data-testid": s ? s + "Autocomplete" : void 0,
361
+ sx: m,
362
+ "data-testid": c ? c + "Autocomplete" : void 0,
362
363
  disablePortal: !0,
363
364
  multiple: !0,
364
- getOptionLabel: (d) => typeof d == "string" ? d : d.label,
365
- filterOptions: q,
366
- loading: L,
367
- options: [...l, ...D],
365
+ getOptionLabel: (p) => typeof p == "string" ? p : p.label,
366
+ filterOptions: H,
367
+ loading: k,
368
+ options: [...l, ...E],
368
369
  filterSelectedOptions: !0,
369
370
  includeInputInList: !0,
370
371
  value: l,
371
- onOpen: () => F(!0),
372
- onClose: () => F(!1),
373
- onChange: (d, f, p) => {
374
- n(f, p, d);
372
+ onOpen: () => L(!0),
373
+ onClose: () => L(!1),
374
+ onChange: (p, s, u) => {
375
+ n(s, u, p);
375
376
  },
376
- onInputChange: (d, f) => k(f),
377
+ onInputChange: (p, s) => I(s),
377
378
  noOptionsText: x,
378
- loadingText: u,
379
- popupIcon: w,
380
- renderInput: (d) => /* @__PURE__ */ o(
381
- xe,
382
- A(i({}, d), {
379
+ loadingText: w,
380
+ popupIcon: A,
381
+ renderInput: (p) => /* @__PURE__ */ o(
382
+ be,
383
+ b(i({}, p), {
383
384
  label: a,
384
385
  fullWidth: !0,
385
- variant: "filled",
386
- error: S,
387
- helperText: b,
388
- InputProps: A(i({}, d.InputProps), {
389
- endAdornment: /* @__PURE__ */ m(B, { children: [
390
- L ? /* @__PURE__ */ o(be, { color: "inherit", size: 20 }) : null,
391
- d.InputProps.endAdornment
386
+ variant: g,
387
+ error: v,
388
+ helperText: O,
389
+ InputProps: b(i({}, p.InputProps), {
390
+ endAdornment: /* @__PURE__ */ C(B, { children: [
391
+ k ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20 }) : null,
392
+ p.InputProps.endAdornment
392
393
  ] })
393
394
  }),
394
- "data-testid": s ? s + "TextField" : void 0,
395
- onKeyDown: (f) => {
396
- (f.key === "Backspace" || f.key === "Delete") && f.stopPropagation();
395
+ "data-testid": c ? c + "TextField" : void 0,
396
+ onKeyDown: (s) => {
397
+ (s.key === "Backspace" || s.key === "Delete") && s.stopPropagation();
397
398
  },
398
- color: c
399
+ color: d
399
400
  })
400
401
  ),
401
402
  renderTags: () => null,
402
- isOptionEqualToValue: (d, f) => d.id === f.id,
403
- renderOption: (d, f, p) => {
403
+ isOptionEqualToValue: (p, s) => p.id === s.id,
404
+ renderOption: (p, s, u) => {
404
405
  if (t) {
405
- const v = Jt(f.label, p.inputValue, {
406
+ const y = Jt(s.label, u.inputValue, {
406
407
  insideWords: !0,
407
408
  findAllOccurrences: !0
408
- }), P = Kt(f.label, v);
409
- return /* @__PURE__ */ Ce(
409
+ }), se = Kt(s.label, y);
410
+ return /* @__PURE__ */ ve(
410
411
  "li",
411
- A(i({}, d), {
412
- key: f.id,
413
- "data-testid": s ? s + "li" + f.id.toString() : void 0
412
+ b(i({}, p), {
413
+ key: s.id,
414
+ "data-testid": c ? c + "li" + s.id.toString() : void 0
414
415
  }),
415
- /* @__PURE__ */ o("div", { children: P.map((K, se) => /* @__PURE__ */ o(
416
+ /* @__PURE__ */ o("div", { children: se.map((K, le) => /* @__PURE__ */ o(
416
417
  "span",
417
418
  {
418
419
  style: {
@@ -420,22 +421,22 @@ function wo({
420
421
  },
421
422
  children: K.text
422
423
  },
423
- se
424
+ le
424
425
  )) })
425
426
  );
426
427
  } else
427
- return /* @__PURE__ */ Ce(
428
+ return /* @__PURE__ */ ve(
428
429
  "li",
429
- A(i({}, d), {
430
- key: f.id,
431
- "data-testid": s ? s + "li" + f.id.toString() : void 0
430
+ b(i({}, p), {
431
+ key: s.id,
432
+ "data-testid": c ? c + "li" + s.id.toString() : void 0
432
433
  }),
433
- f.label
434
+ s.label
434
435
  );
435
436
  }
436
437
  }
437
438
  ),
438
- l.length > 0 && /* @__PURE__ */ o(I, { children: l.map((d) => /* @__PURE__ */ o(
439
+ l.length > 0 && /* @__PURE__ */ o(S, { children: l.map((p) => /* @__PURE__ */ o(
439
440
  Et,
440
441
  {
441
442
  sx: {
@@ -446,7 +447,7 @@ function wo({
446
447
  label: /* @__PURE__ */ o(
447
448
  yt,
448
449
  {
449
- title: d.tooltipContent || "",
450
+ title: p.tooltipContent || "",
450
451
  placement: "bottom-start",
451
452
  PopperProps: {
452
453
  modifiers: [
@@ -458,19 +459,19 @@ function wo({
458
459
  }
459
460
  ]
460
461
  },
461
- children: /* @__PURE__ */ o($, { style: { whiteSpace: "normal" }, children: d.chipLabel ? d.chipLabel : d.label })
462
+ children: /* @__PURE__ */ o($, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
462
463
  }
463
464
  ),
464
- "data-testid": s ? s + "Chip" + d.id.toString() : void 0,
465
- onDelete: (f) => U(f, d.id),
465
+ "data-testid": c ? c + "Chip" + p.id.toString() : void 0,
466
+ onDelete: (s) => q(s, p.id),
466
467
  deleteIcon: /* @__PURE__ */ o(
467
468
  Xt,
468
469
  {
469
- "data-testid": s ? s + "ChipDelete" + d.id.toString() : "CancelIcon"
470
+ "data-testid": c ? c + "ChipDelete" + p.id.toString() : "CancelIcon"
470
471
  }
471
472
  )
472
473
  },
473
- d.id
474
+ p.id
474
475
  )) })
475
476
  ] });
476
477
  }
@@ -481,16 +482,17 @@ const xo = ({
481
482
  value: r,
482
483
  sx: a,
483
484
  textFieldColor: l,
484
- dataTestidPrefix: s = "",
485
- minLength: C = 3
485
+ textFieldVariant: c = "filled",
486
+ dataTestidPrefix: m = "",
487
+ minLength: d = 3
486
488
  }) => {
487
- const [c, u] = O([]), [x, w] = O(!1);
488
- let S;
489
- const b = (g) => R(void 0, null, function* () {
490
- S = new AbortController();
489
+ const [g, w] = D([]), [x, A] = D(!1);
490
+ let v;
491
+ const O = (f) => W(void 0, null, function* () {
492
+ v = new AbortController();
491
493
  try {
492
- const h = yield e(g, S.signal);
493
- u(h != null ? h : []), w(!1);
494
+ const h = yield e(f, v.signal);
495
+ w(h != null ? h : []), A(!1);
494
496
  } catch (h) {
495
497
  if (h instanceof Error && h.name === "AbortError")
496
498
  console.debug("Previous lookup request was cancelled");
@@ -499,68 +501,68 @@ const xo = ({
499
501
  }
500
502
  });
501
503
  return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(Bt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
502
- we,
504
+ xe,
503
505
  {
504
506
  sx: a,
505
- "data-testid": s ? s + "Autocomplete" : void 0,
507
+ "data-testid": m ? m + "Autocomplete" : void 0,
506
508
  loading: x,
507
- options: c,
508
- onChange: (g, h) => {
509
- t(g, h);
509
+ options: g,
510
+ onChange: (f, h) => {
511
+ t(f, h);
510
512
  },
511
- filterOptions: (g) => g,
513
+ filterOptions: (f) => f,
512
514
  value: r,
513
- getOptionLabel: (g) => g.label,
514
- renderInput: (g) => /* @__PURE__ */ o(
515
- xe,
516
- A(i({
517
- "data-testid": s ? s + "TextField" : void 0
518
- }, g), {
519
- variant: "filled",
515
+ getOptionLabel: (f) => f.label,
516
+ renderInput: (f) => /* @__PURE__ */ o(
517
+ be,
518
+ b(i({
519
+ "data-testid": m ? m + "TextField" : void 0
520
+ }, f), {
521
+ variant: c,
520
522
  label: n,
521
523
  color: l
522
524
  })
523
525
  ),
524
- isOptionEqualToValue: (g, h) => g.id === h.id,
525
- onInputChange: (g, h) => {
526
- (h == null ? void 0 : h.length) >= C && (w(!0), b(h));
526
+ isOptionEqualToValue: (f, h) => f.id === h.id,
527
+ onInputChange: (f, h) => {
528
+ (h == null ? void 0 : h.length) >= d && (A(!0), O(h));
527
529
  },
528
- renderOption: (g, h) => /* @__PURE__ */ Ce(
530
+ renderOption: (f, h) => /* @__PURE__ */ ve(
529
531
  "li",
530
- A(i({}, g), {
532
+ b(i({}, f), {
531
533
  key: h.id,
532
- "data-testid": s ? s + "li" + h.id.toString() : void 0
534
+ "data-testid": m ? m + "li" + h.id.toString() : void 0
533
535
  }),
534
536
  h.label
535
537
  )
536
538
  }
537
539
  ) }) });
538
- }, pn = 24, un = 64, G = "TopBar", y = {
539
- topStripe: `${G}-topStripe`,
540
- titleBar: `${G}-titleBar`,
541
- titleSlider: `${G}-titleSlider`,
542
- titleText: `${G}-titleText`,
543
- leftPanelButton: `${G}-leftPanelButton`,
544
- rightPanelButton: `${G}-leftPanelButton`
545
- }, hn = Ae("div", {
540
+ }, pn = 24, un = 64, U = "TopBar", T = {
541
+ topStripe: `${U}-topStripe`,
542
+ titleBar: `${U}-titleBar`,
543
+ titleSlider: `${U}-titleSlider`,
544
+ titleText: `${U}-titleText`,
545
+ leftPanelButton: `${U}-leftPanelButton`,
546
+ rightPanelButton: `${U}-leftPanelButton`
547
+ }, hn = Se("div", {
546
548
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
547
- name: G
549
+ name: U
548
550
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
549
551
  var r, a;
550
552
  return {
551
553
  width: "100%",
552
- [`& .${y.topStripe}`]: {
554
+ [`& .${T.topStripe}`]: {
553
555
  width: "100%",
554
556
  height: `${pn}px`,
555
557
  backgroundColor: e.palette.primary.main
556
558
  },
557
- [`& .${y.titleBar}`]: {
559
+ [`& .${T.titleBar}`]: {
558
560
  backgroundColor: e.palette.primary.light,
559
561
  height: `${un}px`,
560
562
  padding: e.spacing(0, 3),
561
563
  width: "100%"
562
564
  },
563
- [`& .${y.titleSlider}`]: i(i({
565
+ [`& .${T.titleSlider}`]: i(i({
564
566
  height: "100%",
565
567
  display: "flex",
566
568
  alignItems: "center",
@@ -569,14 +571,14 @@ const xo = ({
569
571
  easing: e.transitions.easing.sharp,
570
572
  duration: e.transitions.duration.leavingScreen
571
573
  }),
572
- [`& .${y.leftPanelButton}`]: {
574
+ [`& .${T.leftPanelButton}`]: {
573
575
  marginRight: e.spacing(2),
574
576
  flexGrow: 0
575
577
  },
576
- [`& .${y.titleText}`]: {
578
+ [`& .${T.titleText}`]: {
577
579
  flexGrow: 1
578
580
  },
579
- [`& .${y.rightPanelButton}`]: {
581
+ [`& .${T.rightPanelButton}`]: {
580
582
  flexGrow: 0
581
583
  }
582
584
  }, (t == null ? void 0 : t.open) && {
@@ -600,13 +602,13 @@ function gn({
600
602
  rightPanel: n,
601
603
  "data-testid": r
602
604
  }) {
603
- return /* @__PURE__ */ m(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
604
- /* @__PURE__ */ o("div", { className: y.topStripe }),
605
- /* @__PURE__ */ o("div", { className: y.titleBar, children: /* @__PURE__ */ m(I, { className: y.titleSlider, children: [
606
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ m(
605
+ return /* @__PURE__ */ C(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
606
+ /* @__PURE__ */ o("div", { className: T.topStripe }),
607
+ /* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ C(S, { className: T.titleSlider, children: [
608
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ C(
607
609
  Q,
608
610
  {
609
- className: y.leftPanelButton,
611
+ className: T.leftPanelButton,
610
612
  color: "inherit",
611
613
  "aria-label": "Open left side panel",
612
614
  onClick: t == null ? void 0 : t.onOpen,
@@ -614,15 +616,15 @@ function gn({
614
616
  size: "large",
615
617
  children: [
616
618
  " ",
617
- /* @__PURE__ */ o(Ze, {})
619
+ /* @__PURE__ */ o(et, {})
618
620
  ]
619
621
  }
620
622
  ),
621
- /* @__PURE__ */ o($, { className: y.titleText, variant: "h6", noWrap: !0, children: e }),
622
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ m(
623
+ /* @__PURE__ */ o($, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
624
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ C(
623
625
  Q,
624
626
  {
625
- className: y.rightPanelButton,
627
+ className: T.rightPanelButton,
626
628
  color: "inherit",
627
629
  "aria-label": "Open right side panel",
628
630
  onClick: n == null ? void 0 : n.onOpen,
@@ -630,14 +632,14 @@ function gn({
630
632
  size: "large",
631
633
  children: [
632
634
  " ",
633
- /* @__PURE__ */ o(et, {})
635
+ /* @__PURE__ */ o(tt, {})
634
636
  ]
635
637
  }
636
638
  )
637
639
  ] }) })
638
640
  ] });
639
641
  }
640
- const st = 400, fn = Ae(ve, {
642
+ const lt = 400, fn = Se(we, {
641
643
  shouldForwardProp: (e) => (
642
644
  // Note we do want anchor to be forwarded to the Drawer component
643
645
  ![
@@ -667,9 +669,9 @@ const st = 400, fn = Ae(ve, {
667
669
  marginLeft: `${a}px`
668
670
  }))
669
671
  })
670
- ), mn = Ae(I, {
672
+ ), mn = Se(S, {
671
673
  shouldForwardProp: (e) => !["anchor"].includes(e)
672
- })(({ theme: e, anchor: t }) => A(i({
674
+ })(({ theme: e, anchor: t }) => b(i({
673
675
  display: "flex",
674
676
  alignItems: "center",
675
677
  padding: e.spacing(2)
@@ -687,50 +689,50 @@ const st = 400, fn = Ae(ve, {
687
689
  marginRight: t === "right" ? e.spacing(2) : 0
688
690
  }
689
691
  }));
690
- function _e({
692
+ function He({
691
693
  children: e,
692
694
  anchor: t = "left",
693
695
  open: n,
694
696
  onClose: r = () => {
695
697
  },
696
698
  titleText: a = "",
697
- width: l = st,
698
- showCloseArrow: s = !0,
699
- debugOpacity: C = !1,
700
- headerBoxProps: c = {},
701
- onOpened: u,
702
- onClosed: x,
703
- "data-testid": w,
704
- navBarOpen: S = !1,
705
- navBarWidthOpen: b = 0,
706
- navBarWidthClosed: g = 0
699
+ width: l = lt,
700
+ showCloseArrow: c = !0,
701
+ debugOpacity: m = !1,
702
+ headerBoxProps: d = {},
703
+ onOpened: g,
704
+ onClosed: w,
705
+ "data-testid": x,
706
+ navBarOpen: A = !1,
707
+ navBarWidthOpen: v = 0,
708
+ navBarWidthClosed: O = 0
707
709
  }) {
708
- return /* @__PURE__ */ m(
710
+ return /* @__PURE__ */ C(
709
711
  fn,
710
712
  {
711
713
  SlideProps: {
712
- onEntered: () => u == null ? void 0 : u(),
713
- onExited: () => x == null ? void 0 : x()
714
+ onEntered: () => g == null ? void 0 : g(),
715
+ onExited: () => w == null ? void 0 : w()
714
716
  },
715
717
  variant: "persistent",
716
718
  anchor: t,
717
719
  open: n,
718
720
  width: l,
719
- debugOpacity: C,
720
- "data-testid": w,
721
- navBarOpen: S,
722
- navBarWidthOpen: b,
723
- navBarWidthClosed: g,
721
+ debugOpacity: m,
722
+ "data-testid": x,
723
+ navBarOpen: A,
724
+ navBarWidthOpen: v,
725
+ navBarWidthClosed: O,
724
726
  children: [
725
- /* @__PURE__ */ o(mn, A(i({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ m(B, { children: [
727
+ /* @__PURE__ */ o(mn, b(i({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ C(B, { children: [
726
728
  /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a }),
727
- s && /* @__PURE__ */ m(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
728
- /* @__PURE__ */ o(et, { "data-testid": "arrowbackicon" }),
729
+ c && /* @__PURE__ */ C(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
730
+ /* @__PURE__ */ o(tt, { "data-testid": "arrowbackicon" }),
729
731
  " "
730
732
  ] })
731
- ] }) : /* @__PURE__ */ m(B, { children: [
732
- s && /* @__PURE__ */ m(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
733
- /* @__PURE__ */ o(Ze, {}),
733
+ ] }) : /* @__PURE__ */ C(B, { children: [
734
+ c && /* @__PURE__ */ C(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
735
+ /* @__PURE__ */ o(et, {}),
734
736
  " "
735
737
  ] }),
736
738
  /* @__PURE__ */ o($, { variant: "h6", color: "inherit", component: "div", children: a })
@@ -740,7 +742,7 @@ function _e({
740
742
  }
741
743
  );
742
744
  }
743
- const Cn = M(I, {
745
+ const Cn = M(S, {
744
746
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
745
747
  name: "PanelAwareMargins"
746
748
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -763,17 +765,17 @@ const Cn = M(I, {
763
765
  }),
764
766
  marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
765
767
  });
766
- }), vn = M(Ke, {
768
+ }), vn = M(Je, {
767
769
  name: "PageContainer"
768
770
  })(({ theme: e }) => ({
769
771
  // Horizontal padding comes from the Container's gutter
770
772
  paddingTop: e.spacing(3),
771
773
  paddingBottom: e.spacing(3)
772
774
  // TODO: Remove max width
773
- })), fe = !1, me = !1, ee = {
775
+ })), me = !1, Ce = !1, ee = {
774
776
  titleText: "",
775
777
  flavour: "push",
776
- width: st,
778
+ width: lt,
777
779
  arrowButtons: "both",
778
780
  startOpen: !1,
779
781
  open: void 0,
@@ -790,32 +792,32 @@ function bo({
790
792
  rightPanel: r,
791
793
  sidePanelsAreMutuallyExclusive: a = !0,
792
794
  debugOpacity: l = !1,
793
- pageContainerProps: s,
794
- pageContentDataTestId: C,
795
- topBarDataTestId: c,
796
- navBarOpen: u,
797
- navBarWidthOpen: x,
798
- navBarWidthClosed: w
795
+ pageContainerProps: c,
796
+ pageContentDataTestId: m,
797
+ topBarDataTestId: d,
798
+ navBarOpen: g,
799
+ navBarWidthOpen: w,
800
+ navBarWidthClosed: x
799
801
  }) {
800
- const [S, b] = O(fe), [g, h] = O(me), [k, D] = O(fe), [T, N] = O(me), F = n !== void 0, L = r !== void 0, {
801
- titleText: E,
802
- content: U,
802
+ const [A, v] = D(me), [O, f] = D(Ce), [h, I] = D(me), [E, N] = D(Ce), F = n !== void 0, L = r !== void 0, {
803
+ titleText: k,
804
+ content: P,
803
805
  flavour: q,
804
- open: d,
805
- onChangeOpen: f,
806
- width: p,
807
- arrowButtons: v,
808
- startOpen: P,
809
- onOpened: K,
810
- onClosed: se,
811
- dataTestId: vt
806
+ open: H,
807
+ onChangeOpen: p,
808
+ width: s,
809
+ arrowButtons: u,
810
+ startOpen: y,
811
+ onOpened: se,
812
+ onClosed: K,
813
+ dataTestId: le
812
814
  } = n ? i(i({}, ee), n) : i({}, ee), {
813
815
  titleText: wt,
814
816
  content: xt,
815
- flavour: Ie,
816
- open: le,
817
- onChangeOpen: De,
818
- width: ce,
817
+ flavour: De,
818
+ open: ce,
819
+ onChangeOpen: Oe,
820
+ width: de,
819
821
  arrowButtons: J,
820
822
  startOpen: Y,
821
823
  onOpened: bt,
@@ -823,51 +825,51 @@ function bo({
823
825
  dataTestId: St
824
826
  } = r ? i(i({}, ee), r) : i({}, ee);
825
827
  X(() => {
826
- P !== fe && (b(P), D(P));
827
- }, [P]), X(() => {
828
- Y !== me && (h(Y), N(Y));
828
+ y !== me && (v(y), I(y));
829
+ }, [y]), X(() => {
830
+ Y !== Ce && (f(Y), N(Y));
829
831
  }, [Y]);
830
- const de = d === void 0 ? S : d, pe = le === void 0 ? g : le, Oe = (H) => {
831
- d === void 0 && (b(H), a && L && (H ? (h(!1), N(g)) : h(T))), f && f(H);
832
- }, ke = (H) => {
833
- le === void 0 && (h(H), a && F && (H ? (b(!1), D(S)) : b(k))), De && De(H);
832
+ const pe = H === void 0 ? A : H, ue = ce === void 0 ? O : ce, ke = (R) => {
833
+ H === void 0 && (v(R), a && L && (R ? (f(!1), N(O)) : f(E))), p && p(R);
834
+ }, Te = (R) => {
835
+ ce === void 0 && (f(R), a && F && (R ? (v(!1), I(A)) : v(h))), Oe && Oe(R);
834
836
  };
835
- return /* @__PURE__ */ m(I, { children: [
837
+ return /* @__PURE__ */ C(S, { children: [
836
838
  F && /* @__PURE__ */ o(
837
- _e,
839
+ He,
838
840
  {
839
- "data-testid": vt,
841
+ "data-testid": le,
840
842
  anchor: "left",
841
- open: de,
842
- onClose: () => Oe(!1),
843
- width: p,
844
- titleText: E,
843
+ open: pe,
844
+ onClose: () => ke(!1),
845
+ width: s,
846
+ titleText: k,
845
847
  debugOpacity: l,
846
- showCloseArrow: v === "both" || v === "close",
847
- onOpened: K,
848
- onClosed: se,
849
- navBarOpen: u,
850
- navBarWidthOpen: x,
851
- navBarWidthClosed: w,
852
- children: U
848
+ showCloseArrow: u === "both" || u === "close",
849
+ onOpened: se,
850
+ onClosed: K,
851
+ navBarOpen: g,
852
+ navBarWidthOpen: w,
853
+ navBarWidthClosed: x,
854
+ children: P
853
855
  }
854
856
  ),
855
857
  L && /* @__PURE__ */ o(
856
- _e,
858
+ He,
857
859
  {
858
860
  "data-testid": St,
859
861
  anchor: "right",
860
- open: pe,
861
- onClose: () => ke(!1),
862
- width: ce,
862
+ open: ue,
863
+ onClose: () => Te(!1),
864
+ width: de,
863
865
  titleText: wt,
864
866
  debugOpacity: l,
865
867
  showCloseArrow: J === "both" || J === "close",
866
868
  onOpened: bt,
867
869
  onClosed: At,
868
- navBarOpen: u,
869
- navBarWidthOpen: x,
870
- navBarWidthClosed: w,
870
+ navBarOpen: g,
871
+ navBarWidthOpen: w,
872
+ navBarWidthClosed: x,
871
873
  children: xt
872
874
  }
873
875
  ),
@@ -875,45 +877,45 @@ function bo({
875
877
  gn,
876
878
  i(i({
877
879
  titleText: t,
878
- "data-testid": c
880
+ "data-testid": d
879
881
  }, F && q === "push" ? {
880
882
  leftPanel: {
881
- open: de,
882
- width: p,
883
- onOpen: () => Oe(!0),
884
- showOpenArrow: v === "both" || v === "open"
885
- }
886
- } : {}), L && Ie === "push" ? {
887
- rightPanel: {
888
883
  open: pe,
889
- width: ce,
884
+ width: s,
890
885
  onOpen: () => ke(!0),
886
+ showOpenArrow: u === "both" || u === "open"
887
+ }
888
+ } : {}), L && De === "push" ? {
889
+ rightPanel: {
890
+ open: ue,
891
+ width: de,
892
+ onOpen: () => Te(!0),
891
893
  showOpenArrow: J === "both" || J === "open"
892
894
  }
893
895
  } : {})
894
896
  ),
895
897
  /* @__PURE__ */ o(
896
898
  Cn,
897
- A(i(i({}, q === "push" ? {
899
+ b(i(i({}, q === "push" ? {
898
900
  leftPanel: {
899
- open: de,
900
- width: p
901
+ open: pe,
902
+ width: s
901
903
  }
902
- } : {}), Ie === "push" ? {
904
+ } : {}), De === "push" ? {
903
905
  rightPanel: {
904
- open: pe,
905
- width: ce
906
+ open: ue,
907
+ width: de
906
908
  }
907
909
  } : {}), {
908
- children: /* @__PURE__ */ o(vn, A(i({ "data-testid": C }, s), { children: e }))
910
+ children: /* @__PURE__ */ o(vn, b(i({ "data-testid": m }, c), { children: e }))
909
911
  })
910
912
  )
911
913
  ] });
912
914
  }
913
- const lt = () => {
915
+ const ct = () => {
914
916
  const e = re();
915
917
  return $t(e.breakpoints.down("sm"));
916
- }, wn = 64, xn = 64, bn = 256, ae = _(!0), ct = _(bn), dt = _(xn), pt = _(""), ut = _(wn), ht = _(void 0);
918
+ }, wn = 64, xn = 64, bn = 256, ae = _(!0), dt = _(bn), pt = _(xn), ut = _(""), ht = _(wn), gt = _(void 0);
917
919
  function An({ links: e }) {
918
920
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
919
921
  }
@@ -925,7 +927,7 @@ const te = "Navbar", j = {
925
927
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
926
928
  // settings: `${PREFIX}-settings`,
927
929
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
928
- }, Sn = M(I, { name: "NavBar" })(({ theme: e }) => ({
930
+ }, Sn = M(S, { name: "NavBar" })(({ theme: e }) => ({
929
931
  [`&.${j.root}`]: {
930
932
  display: "flex"
931
933
  },
@@ -959,7 +961,7 @@ const te = "Navbar", j = {
959
961
  }
960
962
  }, e)
961
963
  );
962
- }, gt = (e) => {
964
+ }, ft = (e) => {
963
965
  var t, n;
964
966
  return {
965
967
  overflowX: "hidden",
@@ -967,13 +969,13 @@ const te = "Navbar", j = {
967
969
  backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
968
970
  // Provide default so tests don't need to wrap theme provider
969
971
  };
970
- }, He = (e, t) => i({
972
+ }, Re = (e, t) => i({
971
973
  width: t,
972
974
  transition: oe(e, "width", "entering")
973
- }, gt(e)), Re = (e, t) => i({
975
+ }, ft(e)), We = (e, t) => i({
974
976
  width: t,
975
977
  transition: oe(e, "width", "leaving")
976
- }, gt(e)), Dn = M(ve, {
978
+ }, ft(e)), Dn = M(we, {
977
979
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
978
980
  })(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: a }) => i(i({
979
981
  flexShrink: 0,
@@ -981,12 +983,12 @@ const te = "Navbar", j = {
981
983
  boxSizing: "border-box",
982
984
  display: "flex",
983
985
  flexDirection: "column"
984
- }, t && A(i({}, He(e, n)), {
986
+ }, t && b(i({}, Re(e, n)), {
985
987
  backgroundColor: "",
986
- "& .MuiDrawer-paper": He(e, n)
987
- })), !t && A(i({}, Re(e, a ? n : r)), {
988
+ "& .MuiDrawer-paper": Re(e, n)
989
+ })), !t && b(i({}, We(e, a ? n : r)), {
988
990
  backgroundColor: "",
989
- "& .MuiDrawer-paper": Re(e, a ? n : r)
991
+ "& .MuiDrawer-paper": We(e, a ? n : r)
990
992
  })));
991
993
  function On(e) {
992
994
  let t = 0;
@@ -996,11 +998,11 @@ function On(e) {
996
998
  }
997
999
  return t;
998
1000
  }
999
- const We = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], kn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
1001
+ const ze = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], kn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
1000
1002
  function Tn({ user: e, domainCode: t, open: n }) {
1001
1003
  const r = re();
1002
- return /* @__PURE__ */ m(
1003
- I,
1004
+ return /* @__PURE__ */ C(
1005
+ S,
1004
1006
  {
1005
1007
  sx: {
1006
1008
  paddingTop: 3,
@@ -1011,7 +1013,7 @@ function Tn({ user: e, domainCode: t, open: n }) {
1011
1013
  },
1012
1014
  children: [
1013
1015
  /* @__PURE__ */ o(
1014
- I,
1016
+ S,
1015
1017
  {
1016
1018
  sx: {
1017
1019
  width: n ? "5rem" : "2rem",
@@ -1019,22 +1021,22 @@ function Tn({ user: e, domainCode: t, open: n }) {
1019
1021
  aspectRatio: 1
1020
1022
  },
1021
1023
  children: e != null && e.name ? /* @__PURE__ */ o(
1022
- $e,
1024
+ Ne,
1023
1025
  {
1024
1026
  src: e == null ? void 0 : e.picture,
1025
1027
  sx: {
1026
1028
  width: "100%",
1027
1029
  height: "100%",
1028
- bgcolor: We[Math.abs(On(e.name)) % We.length]
1030
+ bgcolor: ze[Math.abs(On(e.name)) % ze.length]
1029
1031
  },
1030
1032
  children: kn(e.name)
1031
1033
  }
1032
- ) : /* @__PURE__ */ o($e, { sx: { width: "100%", height: "100%" } })
1034
+ ) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
1033
1035
  }
1034
1036
  ),
1035
- /* @__PURE__ */ o(In, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ft, { in: n, children: /* @__PURE__ */ m(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1036
- e != null && e.name ? /* @__PURE__ */ o($, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
1037
- t ? /* @__PURE__ */ o($, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
1037
+ /* @__PURE__ */ o(In, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ft, { in: n, children: /* @__PURE__ */ C(S, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1038
+ e != null && e.name ? /* @__PURE__ */ o($, { children: e.name }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "50%" }),
1039
+ t ? /* @__PURE__ */ o($, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "25%" })
1038
1040
  ] }) }) })
1039
1041
  ]
1040
1042
  }
@@ -1047,37 +1049,37 @@ function En({
1047
1049
  "data-testid": r,
1048
1050
  top: a,
1049
1051
  middle: l,
1050
- bottom: s,
1051
- user: C,
1052
- domainCode: c
1052
+ bottom: c,
1053
+ user: m,
1054
+ domainCode: d
1053
1055
  }) {
1054
- const u = lt(), x = tt(ae);
1055
- return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ m(
1056
+ const g = ct(), w = nt(ae);
1057
+ return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ C(
1056
1058
  Dn,
1057
1059
  {
1058
1060
  open: e,
1059
1061
  widthOpen: n,
1060
1062
  widthClosed: t,
1061
1063
  anchor: "left",
1062
- variant: u ? "temporary" : "permanent",
1064
+ variant: g ? "temporary" : "permanent",
1063
1065
  PaperProps: {
1064
1066
  component: "nav"
1065
1067
  },
1066
1068
  onClose: () => {
1067
- x(!1);
1069
+ w(!1);
1068
1070
  },
1069
- isSmallScreen: u,
1071
+ isSmallScreen: g,
1070
1072
  children: [
1071
- !u && /* @__PURE__ */ o(Lt, {}),
1072
- a && /* @__PURE__ */ m(I, { flexGrow: "0", children: [
1073
+ !g && /* @__PURE__ */ o(Lt, {}),
1074
+ a && /* @__PURE__ */ C(S, { flexGrow: "0", children: [
1073
1075
  a,
1074
- /* @__PURE__ */ o(Fe, { variant: "middle" })
1076
+ /* @__PURE__ */ o(Le, { variant: "middle" })
1075
1077
  ] }),
1076
- /* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(An, { links: l }) : l }),
1077
- /* @__PURE__ */ m(I, { flexGrow: "0", children: [
1078
- /* @__PURE__ */ o(Fe, { variant: "middle" }),
1079
- /* @__PURE__ */ o(Tn, { user: C, domainCode: c, open: e }),
1080
- s && /* @__PURE__ */ o(B, { children: s })
1078
+ /* @__PURE__ */ o(S, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(An, { links: l }) : l }),
1079
+ /* @__PURE__ */ C(S, { flexGrow: "0", children: [
1080
+ /* @__PURE__ */ o(Le, { variant: "middle" }),
1081
+ /* @__PURE__ */ o(Tn, { user: m, domainCode: d, open: e }),
1082
+ c && /* @__PURE__ */ o(B, { children: c })
1081
1083
  ] })
1082
1084
  ]
1083
1085
  }
@@ -1089,7 +1091,7 @@ function yn({
1089
1091
  maxWidth: n = !1
1090
1092
  }) {
1091
1093
  return /* @__PURE__ */ o(
1092
- I,
1094
+ S,
1093
1095
  {
1094
1096
  sx: {
1095
1097
  overflow: "auto",
@@ -1099,7 +1101,7 @@ function yn({
1099
1101
  flexGrow: 1
1100
1102
  },
1101
1103
  children: /* @__PURE__ */ o(
1102
- Ke,
1104
+ Je,
1103
1105
  {
1104
1106
  component: "main",
1105
1107
  id: "main-content",
@@ -1115,9 +1117,9 @@ const Bn = "TopBar", $n = {
1115
1117
  titleText: `${Bn}-titleText`
1116
1118
  };
1117
1119
  function Nn({ titleText: e = "", height: t, "data-testid": n }) {
1118
- const r = tt(ae), a = () => r((C) => !C), l = re(), s = lt();
1119
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ m(
1120
- Qe,
1120
+ const r = nt(ae), a = () => r((m) => !m), l = re(), c = ct();
1121
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ C(
1122
+ Ke,
1121
1123
  {
1122
1124
  square: !0,
1123
1125
  elevation: 0,
@@ -1131,7 +1133,7 @@ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
1131
1133
  gap: 2,
1132
1134
  flexShrink: 0,
1133
1135
  height: t,
1134
- zIndex: s ? 0 : l.zIndex.drawer + 1
1136
+ zIndex: c ? 0 : l.zIndex.drawer + 1
1135
1137
  },
1136
1138
  children: [
1137
1139
  /* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: a, children: /* @__PURE__ */ o(Qt, { fontSize: "medium" }) }),
@@ -1147,41 +1149,41 @@ function Ao({
1147
1149
  pageContainerProps: r,
1148
1150
  pageContentDataTestId: a,
1149
1151
  topBarDataTestId: l,
1150
- navBarDataTestId: s,
1151
- navBarMiddle: C,
1152
- navBarBottom: c,
1153
- user: u,
1154
- domainCode: x
1152
+ navBarDataTestId: c,
1153
+ navBarMiddle: m,
1154
+ navBarBottom: d,
1155
+ user: g,
1156
+ domainCode: w
1155
1157
  }) {
1156
- const [w, S] = z(ae), [b] = z(ct), [g] = z(dt), [h, k] = z(pt), [D] = z(ut), [T] = z(ht);
1158
+ const [x, A] = G(ae), [v] = G(dt), [O] = G(pt), [f, h] = G(ut), [I] = G(ht), [E] = G(gt);
1157
1159
  return X(() => {
1158
- t !== void 0 && k(t);
1159
- }, [t, k]), X(() => {
1160
- n !== void 0 && S(n);
1161
- }, [n, S]), /* @__PURE__ */ m(I, { children: [
1160
+ t !== void 0 && h(t);
1161
+ }, [t, h]), X(() => {
1162
+ n !== void 0 && A(n);
1163
+ }, [n, A]), /* @__PURE__ */ C(S, { children: [
1162
1164
  /* @__PURE__ */ o(Pt, {}),
1163
- /* @__PURE__ */ o(Nn, { titleText: h, "data-testid": l, height: D }),
1164
- /* @__PURE__ */ m(I, { sx: { display: "flex" }, children: [
1165
+ /* @__PURE__ */ o(Nn, { titleText: f, "data-testid": l, height: I }),
1166
+ /* @__PURE__ */ C(S, { sx: { display: "flex" }, children: [
1165
1167
  /* @__PURE__ */ o(
1166
1168
  En,
1167
1169
  {
1168
- open: w,
1169
- top: T,
1170
- middle: C,
1171
- bottom: c,
1172
- user: u,
1173
- domainCode: x,
1174
- widthOpen: b,
1175
- widthClosed: g,
1176
- offsetTop: D,
1177
- "data-testid": s
1170
+ open: x,
1171
+ top: E,
1172
+ middle: m,
1173
+ bottom: d,
1174
+ user: g,
1175
+ domainCode: w,
1176
+ widthOpen: v,
1177
+ widthClosed: O,
1178
+ offsetTop: I,
1179
+ "data-testid": c
1178
1180
  }
1179
1181
  ),
1180
1182
  /* @__PURE__ */ o(
1181
1183
  yn,
1182
- A(i({
1184
+ b(i({
1183
1185
  "data-testid": a,
1184
- topBarHeight: D
1186
+ topBarHeight: I
1185
1187
  }, r), {
1186
1188
  children: e
1187
1189
  })
@@ -1197,112 +1199,112 @@ const Fn = {
1197
1199
  disableWindowBlurListener: !1
1198
1200
  }, Ln = {
1199
1201
  shouldClose: (e, t) => t !== "clickaway"
1200
- }, ze = {
1202
+ }, Ge = {
1201
1203
  message: "",
1202
1204
  severity: "info",
1203
1205
  variant: "standard",
1204
1206
  progressIndicator: void 0
1205
1207
  // Can use 'circular' or 'linear'
1206
- }, Ge = 100, Ue = 2e3, Pn = 2e3, Mn = (() => {
1208
+ }, Ue = 100, qe = 2e3, Pn = 2e3, Mn = (() => {
1207
1209
  let e = 0;
1208
1210
  return () => (e += 1, e);
1209
1211
  })(), _n = {
1210
1212
  borderBottomLeftRadius: "0px",
1211
1213
  borderBottomRightRadius: "0px"
1212
- }, Hn = {}, Rn = {}, ft = Xe(null);
1214
+ }, Hn = {}, Rn = {}, mt = je(null);
1213
1215
  function Wn(l) {
1214
- var s = l, {
1216
+ var c = l, {
1215
1217
  overrideState: e = Hn,
1216
1218
  overrideActions: t = Rn,
1217
1219
  shouldClose: n = Ln.shouldClose,
1218
1220
  children: r
1219
- } = s, a = ye(s, [
1221
+ } = c, a = Be(c, [
1220
1222
  "overrideState",
1221
1223
  "overrideActions",
1222
1224
  "shouldClose",
1223
1225
  "children"
1224
1226
  ]);
1225
- var f;
1226
- const [{ open: C }, c] = O({ open: !1 }), u = he([]), x = he(Date.now()), w = he(0), S = ne((p) => {
1227
- c({ open: p });
1228
- }, []), b = ne((p = {}) => {
1229
- w.current += 1, u.current.length >= Ge && Date.now() - x.current >= Ue && (x.current = Date.now(), console.error(
1230
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${w.current} times in last ${Ue}ms)`
1231
- ), w.current = 0);
1232
- const v = i(A(i({}, ze), {
1227
+ var p;
1228
+ const [{ open: m }, d] = D({ open: !1 }), g = ge([]), w = ge(Date.now()), x = ge(0), A = ne((s) => {
1229
+ d({ open: s });
1230
+ }, []), v = ne((s = {}) => {
1231
+ x.current += 1, g.current.length >= Ue && Date.now() - w.current >= qe && (w.current = Date.now(), console.error(
1232
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${x.current} times in last ${qe}ms)`
1233
+ ), x.current = 0);
1234
+ const u = i(b(i({}, Ge), {
1233
1235
  key: Mn()
1234
- }), p);
1235
- return u.current.push(v), u.current.length === 1 && c({ open: !0 }), v.key;
1236
- }, []), g = (p = "", v = {}) => b(i({ message: p, severity: "success" }, v)), h = (p = "", v = {}) => b(i({ message: p, severity: "info" }, v)), k = (p = "", v = {}) => b(i({ message: p, severity: "warning" }, v)), D = (p = "", v = {}) => b(i({ message: p, severity: "error" }, v)), T = (p) => {
1237
- const v = u.current.findIndex((P) => P.key === p);
1238
- if (v !== -1)
1239
- return v === 0 ? (c({ open: !1 }), u.current[0]) : u.current.splice(v, 1);
1240
- }, N = (p, v) => {
1241
- n(p, v) && c({ open: !1 });
1236
+ }), s);
1237
+ return g.current.push(u), g.current.length === 1 && d({ open: !0 }), u.key;
1238
+ }, []), O = (s = "", u = {}) => v(i({ message: s, severity: "success" }, u)), f = (s = "", u = {}) => v(i({ message: s, severity: "info" }, u)), h = (s = "", u = {}) => v(i({ message: s, severity: "warning" }, u)), I = (s = "", u = {}) => v(i({ message: s, severity: "error" }, u)), E = (s) => {
1239
+ const u = g.current.findIndex((y) => y.key === s);
1240
+ if (u !== -1)
1241
+ return u === 0 ? (d({ open: !1 }), g.current[0]) : g.current.splice(u, 1);
1242
+ }, N = (s, u) => {
1243
+ n(s, u) && d({ open: !1 });
1242
1244
  }, F = () => {
1243
1245
  }, L = () => {
1244
- u.current.shift(), u.current.length > 0 && c({ open: !0 });
1245
- }, E = (f = u.current[0]) != null ? f : i({}, ze), U = {};
1246
- "autoHideDuration" in E && (U.autoHideDuration = E.autoHideDuration);
1247
- const q = i(i({}, Fn), a), d = i(i({
1248
- open: C,
1249
- setOpen: S,
1250
- enqueueNotification: b,
1251
- enqueueSuccessNotification: g,
1252
- enqueueInfoNotification: h,
1253
- enqueueWarningNotification: k,
1254
- enqueueErrorNotification: D,
1255
- removeNotification: T
1246
+ g.current.shift(), g.current.length > 0 && d({ open: !0 });
1247
+ }, k = (p = g.current[0]) != null ? p : i({}, Ge), P = {};
1248
+ "autoHideDuration" in k && (P.autoHideDuration = k.autoHideDuration);
1249
+ const q = i(i({}, Fn), a), H = i(i({
1250
+ open: m,
1251
+ setOpen: A,
1252
+ enqueueNotification: v,
1253
+ enqueueSuccessNotification: O,
1254
+ enqueueInfoNotification: f,
1255
+ enqueueWarningNotification: h,
1256
+ enqueueErrorNotification: I,
1257
+ removeNotification: E
1256
1258
  }, e), t);
1257
- return /* @__PURE__ */ m(ft.Provider, { value: d, children: [
1259
+ return /* @__PURE__ */ C(mt.Provider, { value: H, children: [
1258
1260
  r,
1259
1261
  /* @__PURE__ */ o(
1260
1262
  Mt,
1261
- A(i(i({}, q), U), {
1262
- open: C,
1263
+ b(i(i({}, q), P), {
1264
+ open: m,
1263
1265
  onClose: N,
1264
1266
  TransitionProps: {
1265
1267
  onExited: L,
1266
1268
  onExit: F
1267
1269
  },
1268
1270
  sx: { zIndex: Pn },
1269
- children: /* @__PURE__ */ m("div", { children: [
1271
+ children: /* @__PURE__ */ C("div", { children: [
1270
1272
  /* @__PURE__ */ o(
1271
1273
  _t,
1272
1274
  {
1273
- onClose: (p) => N(p, "closeAlert"),
1274
- severity: E.severity,
1275
+ onClose: (s) => N(s, "closeAlert"),
1276
+ severity: k.severity,
1275
1277
  variant: "filled",
1276
- icon: E.progressIndicator === "circular" ? /* @__PURE__ */ o(be, { size: "1em" }) : void 0,
1277
- style: E.progressIndicator === "linear" ? _n : void 0,
1278
- children: E.message
1278
+ icon: k.progressIndicator === "circular" ? /* @__PURE__ */ o(Ae, { size: "1em" }) : void 0,
1279
+ style: k.progressIndicator === "linear" ? _n : void 0,
1280
+ children: k.message
1279
1281
  }
1280
1282
  ),
1281
- E.progressIndicator === "linear" && /* @__PURE__ */ o(Ht, { color: "primary" })
1283
+ k.progressIndicator === "linear" && /* @__PURE__ */ o(Ht, { color: "primary" })
1282
1284
  ] })
1283
1285
  })
1284
1286
  )
1285
1287
  ] });
1286
1288
  }
1287
1289
  function zn() {
1288
- const e = je(ft);
1290
+ const e = Qe(mt);
1289
1291
  if (e === null)
1290
- throw new Se("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1292
+ throw new Ie("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1291
1293
  return e;
1292
1294
  }
1293
1295
  const So = ie(
1294
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Wn, A(i({}, e), { overrideState: t, overrideActions: n, children: r }))
1296
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(Wn, b(i({}, e), { overrideState: t, overrideActions: n, children: r }))
1295
1297
  ), Gn = Yt(), Io = ({
1296
1298
  children: e,
1297
1299
  store: t
1298
- }) => /* @__PURE__ */ o(nt, { store: t != null ? t : Gn, children: e }), mt = "domainCode";
1299
- var Ve;
1300
- const qe = _(
1301
- JSON.parse((Ve = localStorage.getItem(mt)) != null ? Ve : '{"domainCode": ""}').domainCode
1302
- ), Ct = _(
1303
- (e) => e(qe),
1300
+ }) => /* @__PURE__ */ o(ot, { store: t != null ? t : Gn, children: e }), Ct = "domainCode";
1301
+ var Xe;
1302
+ const Ve = _(
1303
+ JSON.parse((Xe = localStorage.getItem(Ct)) != null ? Xe : '{"domainCode": ""}').domainCode
1304
+ ), vt = _(
1305
+ (e) => e(Ve),
1304
1306
  (e, t, n) => {
1305
- t(qe, n), localStorage.setItem(mt, JSON.stringify({ domainCode: n }));
1307
+ t(Ve, n), localStorage.setItem(Ct, JSON.stringify({ domainCode: n }));
1306
1308
  }
1307
1309
  ), Un = {
1308
1310
  act: "ACT",
@@ -1327,65 +1329,65 @@ const qe = _(
1327
1329
  applicationName: a,
1328
1330
  handleLogout: l
1329
1331
  }) => {
1330
- const [s, C] = z(Ct), [c, u] = O(s), { enqueueSuccessNotification: x } = zn(), w = r.length === 0, S = !!s && !r.includes(s) && !r.includes(c), b = !s || w || S, g = () => R(void 0, null, function* () {
1331
- c ? (C(c), x(`Set domain to ${c}`), n()) : C("");
1332
- }), h = () => R(void 0, null, function* () {
1333
- s && !w && !S ? (u(s), n()) : b && l();
1332
+ const [c, m] = G(vt), [d, g] = D(c), { enqueueSuccessNotification: w } = zn(), x = r.length === 0, A = !!c && !r.includes(c) && !r.includes(d), v = !c || x || A, O = () => W(void 0, null, function* () {
1333
+ d ? (m(d), w(`Set domain to ${d}`), n()) : m("");
1334
+ }), f = () => W(void 0, null, function* () {
1335
+ c && !x && !A ? (g(c), n()) : v && l();
1334
1336
  });
1335
- let k;
1336
- return w ? k = "Unable to retrieve your active organisations. Try logging in again." : S && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ m(
1337
+ let h;
1338
+ return x ? h = "Unable to retrieve your active organisations. Try logging in again." : A && (h = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ C(
1337
1339
  dn,
1338
1340
  {
1339
1341
  isOpen: t,
1340
1342
  dialogTitle: "Select an organisation",
1341
1343
  primaryButton: {
1342
1344
  text: "Confirm",
1343
- onClick: g,
1344
- disabled: !c || w || S,
1345
+ onClick: O,
1346
+ disabled: !d || x || A,
1345
1347
  buttonColor: "primary"
1346
1348
  },
1347
1349
  secondaryButton: {
1348
- text: b ? "Logout" : "Cancel",
1349
- onClick: h
1350
+ text: v ? "Logout" : "Cancel",
1351
+ onClick: f
1350
1352
  },
1351
- onClose: b ? () => {
1353
+ onClose: v ? () => {
1352
1354
  } : n,
1353
1355
  children: [
1354
- /* @__PURE__ */ m($, { marginBottom: 2, children: [
1356
+ /* @__PURE__ */ C($, { marginBottom: 2, children: [
1355
1357
  "Select the default organisation that you want to use with the ",
1356
1358
  a,
1357
1359
  "."
1358
1360
  ] }),
1359
1361
  /* @__PURE__ */ o(
1360
- we,
1362
+ xe,
1361
1363
  {
1362
1364
  loading: e,
1363
1365
  multiple: !1,
1364
1366
  disableClearable: !1,
1365
- value: c !== "" ? c : null,
1366
- onChange: (D, T) => u(T != null ? T : ""),
1367
+ value: d !== "" ? d : null,
1368
+ onChange: (I, E) => g(E != null ? E : ""),
1367
1369
  getOptionLabel: qn,
1368
1370
  options: [...r],
1369
- renderInput: (D) => /* @__PURE__ */ o(
1370
- xe,
1371
- A(i({}, D), {
1371
+ renderInput: (I) => /* @__PURE__ */ o(
1372
+ be,
1373
+ b(i({}, I), {
1372
1374
  variant: "filled",
1373
1375
  label: "Select organisation",
1374
- InputProps: A(i({}, D.InputProps), {
1375
- endAdornment: /* @__PURE__ */ m(B, { children: [
1376
- e ? /* @__PURE__ */ o(be, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1377
- D.InputProps.endAdornment
1376
+ InputProps: b(i({}, I.InputProps), {
1377
+ endAdornment: /* @__PURE__ */ C(B, { children: [
1378
+ e ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1379
+ I.InputProps.endAdornment
1378
1380
  ] })
1379
1381
  })
1380
1382
  })
1381
1383
  )
1382
1384
  }
1383
1385
  ),
1384
- k && /* @__PURE__ */ o(Rt, { error: !0, children: k })
1386
+ h && /* @__PURE__ */ o(Rt, { error: !0, children: h })
1385
1387
  ]
1386
1388
  }
1387
1389
  );
1388
- }, Oo = Je({
1390
+ }, Oo = Ye({
1389
1391
  palette: {
1390
1392
  primary: {
1391
1393
  dark: "#00A651",
@@ -1436,7 +1438,7 @@ const qe = _(
1436
1438
  navBar: {
1437
1439
  backgroundColor: "#E8E8E8"
1438
1440
  }
1439
- }), ko = Je({
1441
+ }), ko = Ye({
1440
1442
  palette: {
1441
1443
  primary: {
1442
1444
  main: "#007236",
@@ -1490,18 +1492,18 @@ const qe = _(
1490
1492
  styleOverrides: {
1491
1493
  root: ({ theme: e }) => ({
1492
1494
  "&.Mui-selected": {
1493
- backgroundColor: ge(
1495
+ backgroundColor: fe(
1494
1496
  e.palette.secondary.main,
1495
1497
  e.palette.action.selectedOpacity
1496
1498
  ),
1497
1499
  "&:hover": {
1498
- backgroundColor: ge(
1500
+ backgroundColor: fe(
1499
1501
  e.palette.secondary.main,
1500
1502
  e.palette.action.selectedOpacity
1501
1503
  )
1502
1504
  },
1503
1505
  "&.Mui-focusVisible": {
1504
- backgroundColor: ge(
1506
+ backgroundColor: fe(
1505
1507
  e.palette.secondary.main,
1506
1508
  e.palette.action.focusOpacity
1507
1509
  )
@@ -1528,14 +1530,14 @@ const qe = _(
1528
1530
  backgroundColor: "#E8E8E8"
1529
1531
  }
1530
1532
  }), Vn = {
1531
- domainCode: Ct,
1533
+ domainCode: vt,
1532
1534
  navBarOpen: ae,
1533
- navBarWidthOpen: ct,
1534
- navBarWidthClosed: dt,
1535
- titleText: pt,
1536
- topBarHeight: ut,
1537
- navBarTop: ht
1538
- }, To = ie(() => ({ children: e }) => /* @__PURE__ */ o(nt, { children: e })), Xn = ({
1535
+ navBarWidthOpen: dt,
1536
+ navBarWidthClosed: pt,
1537
+ titleText: ut,
1538
+ topBarHeight: ht,
1539
+ navBarTop: gt
1540
+ }, To = ie(() => ({ children: e }) => /* @__PURE__ */ o(ot, { children: e })), Xn = ({
1539
1541
  initialValues: e,
1540
1542
  children: t
1541
1543
  }) => (Zt(e), /* @__PURE__ */ o(B, { children: t })), Eo = ie(
@@ -1556,14 +1558,14 @@ export {
1556
1558
  dn as AgDialog,
1557
1559
  Ao as AppLayout,
1558
1560
  Io as AtomProvider,
1559
- ft as Context,
1560
- Se as ContextError,
1561
+ mt as Context,
1562
+ Ie as ContextError,
1561
1563
  Do as DomainCodeDialog,
1562
1564
  go as ExampleComponent,
1563
1565
  wo as FetchAutocomplete,
1564
1566
  Xn as HydrateAtoms,
1565
- rt as NAVBAR_WIDTH_CLOSED,
1566
- ot as NAVBAR_WIDTH_OPENED,
1567
+ it as NAVBAR_WIDTH_CLOSED,
1568
+ rt as NAVBAR_WIDTH_OPENED,
1567
1569
  vo as NavBar,
1568
1570
  mo as NavBarDarkStyledList,
1569
1571
  Co as NavBarLightStyledList,
@@ -1573,19 +1575,19 @@ export {
1573
1575
  xo as SingleAutocomplete,
1574
1576
  Gn as atomStore,
1575
1577
  cn as buildNavBarState,
1576
- Ct as domainCodeAtom,
1578
+ vt as domainCodeAtom,
1577
1579
  Oo as fed21Theme,
1578
1580
  ko as internalAgSystemsTheme,
1579
1581
  V as navBarClasses,
1580
1582
  ae as navBarOpenAtom,
1581
- ht as navBarTopAtom,
1582
- dt as navBarWidthClosedAtom,
1583
- ct as navBarWidthOpenAtom,
1584
- pt as titleTextAtom,
1585
- ut as topBarHeightAtom,
1583
+ gt as navBarTopAtom,
1584
+ pt as navBarWidthClosedAtom,
1585
+ dt as navBarWidthOpenAtom,
1586
+ ut as titleTextAtom,
1587
+ ht as topBarHeightAtom,
1586
1588
  ln as useNavBar,
1587
1589
  zn as useSaladBar,
1588
- lt as useSmallScreen,
1590
+ ct as useSmallScreen,
1589
1591
  To as withAtomProvider,
1590
1592
  fo as withNavBarProvider,
1591
1593
  Eo as withOverrideDefaults,