@australiangreens/ag-internal-components 0.0.66 → 0.0.67

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,27 +1,27 @@
1
- var $t = Object.defineProperty, kt = Object.defineProperties;
1
+ var Ot = Object.defineProperty, $t = Object.defineProperties;
2
2
  var It = Object.getOwnPropertyDescriptors;
3
3
  var ee = Object.getOwnPropertySymbols;
4
- var ye = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
5
- var ge = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
4
+ var Fe = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable;
5
+ var ge = (e, t, n) => t in e ? Ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- ye.call(t, n) && ge(e, n, t[n]);
7
+ Fe.call(t, n) && ge(e, n, t[n]);
8
8
  if (ee)
9
9
  for (var n of ee(t))
10
- Be.call(t, n) && ge(e, n, t[n]);
10
+ ye.call(t, n) && ge(e, n, t[n]);
11
11
  return e;
12
- }, S = (e, t) => kt(e, It(t));
13
- var Fe = (e, t) => {
12
+ }, S = (e, t) => $t(e, It(t));
13
+ var Pe = (e, t) => {
14
14
  var n = {};
15
15
  for (var r in e)
16
- ye.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
16
+ Fe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
17
17
  if (e != null && ee)
18
18
  for (var r of ee(e))
19
- t.indexOf(r) < 0 && Be.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 Pe = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var z = (e, t, n) => new Promise((r, s) => {
24
- var c = (p) => {
22
+ var Ne = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
23
+ var N = (e, t, n) => new Promise((r, s) => {
24
+ var l = (p) => {
25
25
  try {
26
26
  g(n.next(p));
27
27
  } catch (u) {
@@ -33,14 +33,14 @@ var z = (e, t, n) => new Promise((r, s) => {
33
33
  } catch (u) {
34
34
  s(u);
35
35
  }
36
- }, g = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(c, d);
36
+ }, g = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(l, d);
37
37
  g((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as f, Fragment as P, jsx as o } from "react/jsx-runtime";
40
- import { useState as $, createContext as Je, useCallback as oe, useContext as Ye, useEffect as re, useMemo as Et, createElement as xe, useRef as fe } from "react";
41
- import { Typography as E, Button as Tt, Paper as Ze, Box as D, Drawer as be, Autocomplete as Ae, TextField as Se, CircularProgress as De, Chip as yt, Tooltip as Bt, Stack as Ft, styled as Oe, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Pt, Collapse as Nt, Avatar as Ne, Fade as Lt, Skeleton as Le, Toolbar as Mt, Divider as Me, CssBaseline as _t, Snackbar as Ht, Alert as Rt, LinearProgress as Wt, FormHelperText as zt } from "@mui/material";
39
+ import { jsxs as f, Fragment as B, jsx as o } from "react/jsx-runtime";
40
+ import { useState as O, createContext as Je, useCallback as oe, useContext as Ye, useEffect as re, useMemo as Et, createElement as xe, useRef as fe } from "react";
41
+ import { Typography as E, Button as Tt, Paper as Ze, Box as D, Drawer as be, Autocomplete as Ae, TextField as Se, CircularProgress as De, Chip as Ft, Tooltip as yt, Stack as Pt, styled as ke, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Nt, Collapse as Bt, Avatar as Be, Fade as Lt, Skeleton as Le, Toolbar as Mt, Divider as Me, CssBaseline as _t, Snackbar as Ht, Alert as Rt, LinearProgress as Wt, FormHelperText as zt } from "@mui/material";
42
42
  import Gt from "@mui/material/CssBaseline";
43
- import { styled as N, createTheme as tt, alpha as me } from "@mui/material/styles";
43
+ import { styled as L, createTheme as tt, alpha as me } from "@mui/material/styles";
44
44
  import { AgError as Ut } from "@australiangreens/ag-error";
45
45
  import { createHelper as se } from "souvlaki";
46
46
  import nt from "@mui/material/List";
@@ -52,11 +52,11 @@ import jt from "@mui/material/DialogTitle";
52
52
  import { Cancel as Qt, ArrowDropDown as Kt, ArrowForward as ot, ArrowBack as rt, ViewHeadline as Jt } from "@mui/icons-material";
53
53
  import Yt from "autosuggest-highlight/parse";
54
54
  import Zt from "autosuggest-highlight/match";
55
- import { atom as L, useSetAtom as it, useAtomValue as He, useAtom as X, getDefaultStore as en, Provider as at } from "jotai";
55
+ import { atom as M, useSetAtom as it, useAtomValue as He, useAtom as X, getDefaultStore as en, Provider as at } from "jotai";
56
56
  import { useHydrateAtoms as st } from "jotai/utils";
57
57
  function fo({ text: e }) {
58
- const [t, n] = $(0);
59
- return /* @__PURE__ */ f(P, { children: [
58
+ const [t, n] = O(0);
59
+ return /* @__PURE__ */ f(B, { children: [
60
60
  /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
61
  /* @__PURE__ */ o(E, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
62
62
  /* @__PURE__ */ o(
@@ -86,7 +86,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
86
86
  userInfoHolder: `${G}-userInfoHolder`,
87
87
  settings: `${G}-settings`,
88
88
  pieChartIcon: `${G}-pieChartIcon`
89
- }, tn = N(D, {
89
+ }, tn = L(D, {
90
90
  name: "NavBar"
91
91
  })(({ theme: e }) => ({
92
92
  [`&.${V.root}`]: {
@@ -119,7 +119,7 @@ const lt = 330, ct = 73, G = "Navbar", V = {
119
119
  width: lt
120
120
  }, dt()), on = () => i({
121
121
  width: ct
122
- }, dt()), rn = N(be, {
122
+ }, dt()), rn = L(be, {
123
123
  shouldForwardProp: (e) => e !== "open"
124
124
  })(({ theme: e, open: t }) => i(i({
125
125
  width: t ? lt : ct,
@@ -132,34 +132,34 @@ const lt = 330, ct = 73, G = "Navbar", V = {
132
132
  }), !t && {
133
133
  "& .MuiDrawer-paper": on()
134
134
  }));
135
- class $e extends Ut {
135
+ class Oe extends Ut {
136
136
  }
137
- Pe($e, "errorName", "ContextError");
137
+ Ne(Oe, "errorName", "ContextError");
138
138
  const pt = Je(null), an = {}, sn = {}, ln = ({
139
139
  overrideState: e = an,
140
140
  overrideActions: t = sn,
141
141
  children: n
142
142
  }) => {
143
- const [{ open: r }, s] = $({ open: !0 }), c = oe((p) => {
143
+ const [{ open: r }, s] = O({ open: !0 }), l = oe((p) => {
144
144
  s({ open: p });
145
145
  }, []), d = oe(() => {
146
146
  s((p) => S(i({}, p), { open: !p.open }));
147
147
  }, []), g = i(i({
148
148
  open: r,
149
- setOpen: c,
149
+ setOpen: l,
150
150
  toggleOpen: d
151
151
  }, e), t);
152
152
  return /* @__PURE__ */ o(pt.Provider, { value: g, children: n });
153
153
  }, cn = () => {
154
154
  const e = Ye(pt);
155
155
  if (e === null)
156
- throw new $e("Error: Tried to useNavBar outside of a <NavBarProvider>");
156
+ throw new Oe("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
157
  return e;
158
158
  }, dn = (e = {}) => i({
159
159
  open: !0
160
160
  }, e), mo = se(
161
161
  (e = dn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(ln, { overrideState: e, overrideActions: t, children: n })
162
- ), Re = 7, Co = N(nt)(({ theme: e }) => ({
162
+ ), Re = 7, Co = L(nt)(({ theme: e }) => ({
163
163
  backgroundColor: "black",
164
164
  color: "white",
165
165
  "& .MuiListItem-root": {
@@ -197,7 +197,7 @@ const pt = Je(null), an = {}, sn = {}, ln = ({
197
197
  // '&.Mui-selected.Mui-focusVisible:hover': {
198
198
  // },
199
199
  }
200
- })), We = 7, vo = N(nt)(({ theme: e }) => ({
200
+ })), We = 7, vo = L(nt)(({ theme: e }) => ({
201
201
  backgroundColor: "#e8e8e8",
202
202
  color: "inherit",
203
203
  "& .MuiListItem-root": {
@@ -261,22 +261,24 @@ const pn = ({
261
261
  children: n,
262
262
  maxWidth: r,
263
263
  primaryButton: s,
264
- secondaryButton: c,
264
+ secondaryButton: l,
265
265
  onClose: d,
266
- "data-testid": g
266
+ sx: g,
267
+ "data-testid": p
267
268
  }) => {
268
- var w, b;
269
- const [p, u] = $(!1);
269
+ var b, A;
270
+ const [u, w] = O(!1);
270
271
  return /* @__PURE__ */ f(
271
272
  Vt,
272
273
  {
273
274
  open: e,
274
- onClose: () => {
275
- p || d();
276
- },
275
+ onClose: () => N(void 0, null, function* () {
276
+ u || (l != null && l.onClick ? yield l.onClick() : d());
277
+ }),
277
278
  fullWidth: !0,
278
279
  maxWidth: r != null ? r : "xs",
279
- "data-testid": g,
280
+ "data-testid": p,
281
+ sx: g,
280
282
  children: [
281
283
  /* @__PURE__ */ o(jt, { children: t }),
282
284
  /* @__PURE__ */ o(Xt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
@@ -284,22 +286,22 @@ const pn = ({
284
286
  /* @__PURE__ */ o(
285
287
  _e,
286
288
  {
287
- onClick: (w = c == null ? void 0 : c.onClick) != null ? w : d,
288
- "data-testid": c == null ? void 0 : c.testId,
289
- disabled: (c == null ? void 0 : c.disabled) || p,
290
- color: c == null ? void 0 : c.buttonColor,
291
- children: (b = c == null ? void 0 : c.text) != null ? b : "Cancel"
289
+ onClick: (b = l == null ? void 0 : l.onClick) != null ? b : d,
290
+ "data-testid": l == null ? void 0 : l.testId,
291
+ disabled: (l == null ? void 0 : l.disabled) || u,
292
+ color: l == null ? void 0 : l.buttonColor,
293
+ children: (A = l == null ? void 0 : l.text) != null ? A : "Cancel"
292
294
  }
293
295
  ),
294
296
  s && /* @__PURE__ */ o(
295
297
  _e,
296
298
  {
297
- onClick: () => z(void 0, null, function* () {
298
- var A;
299
- u(!0), yield (A = s.onClick) == null ? void 0 : A.call(s), u(!1);
299
+ onClick: () => N(void 0, null, function* () {
300
+ var C;
301
+ w(!0), yield (C = s.onClick) == null ? void 0 : C.call(s), w(!1);
300
302
  }),
301
303
  "data-testid": s.testId,
302
- disabled: s.disabled || p,
304
+ disabled: s.disabled || u,
303
305
  color: s == null ? void 0 : s.buttonColor,
304
306
  children: s.text
305
307
  }
@@ -310,13 +312,13 @@ const pn = ({
310
312
  );
311
313
  };
312
314
  function wo({
313
- lookup: e = () => z(this, null, function* () {
315
+ lookup: e = () => N(this, null, function* () {
314
316
  }),
315
317
  enableHighlighting: t = !0,
316
318
  onChange: n,
317
319
  minLength: r,
318
320
  label: s,
319
- value: c,
321
+ value: l,
320
322
  "data-testid": d,
321
323
  sx: g,
322
324
  textFieldColor: p,
@@ -324,22 +326,22 @@ function wo({
324
326
  loadingText: w = "Loading...",
325
327
  noOptionsText: b = "No options",
326
328
  popupIcon: A = /* @__PURE__ */ o(Kt, {}),
327
- error: v = !1,
328
- helperText: O = "",
329
- preLoadedOptions: C = void 0,
329
+ error: C = !1,
330
+ helperText: k = "",
331
+ preLoadedOptions: v = void 0,
330
332
  disablePortal: m = !1
331
333
  }) {
332
- const [h, T] = $(""), [M, y] = $(C || []), [B, k] = $(!1), [_, F] = $(!1), H = (a, l) => {
333
- const x = c.filter((q) => q.id !== l);
334
+ const [h, T] = O(""), [_, F] = O(v || []), [y, $] = O(!1), [H, P] = O(!1), R = (a, c) => {
335
+ const x = l.filter((q) => q.id !== c);
334
336
  n(x, "delete", a);
335
337
  };
336
338
  re(() => {
337
339
  let a;
338
- const l = () => z(this, null, function* () {
340
+ const c = () => N(this, null, function* () {
339
341
  a = new AbortController();
340
342
  try {
341
343
  const x = yield e(h, a.signal);
342
- y(x != null ? x : []), F(!1);
344
+ F(x != null ? x : []), P(!1);
343
345
  } catch (x) {
344
346
  if (x instanceof Error && x.name === "AbortError")
345
347
  console.debug("Previous lookup request was cancelled");
@@ -348,15 +350,15 @@ function wo({
348
350
  }
349
351
  });
350
352
  if (h !== "")
351
- return (!r || h.length >= r) && !C ? (F(!0), l()) : F(!1), function() {
353
+ return (!r || h.length >= r) && !v ? (P(!0), c()) : P(!1), function() {
352
354
  a && a.abort();
353
355
  };
354
- }, [h, e, r, C]), re(() => {
355
- !B && !C && y([]), !B && C && y(C);
356
- }, [B, C]);
357
- const R = Et(() => C ? (a, l) => a.filter(
358
- (x) => x.label.toLowerCase().includes(l.inputValue.toLowerCase())
359
- ) : (a) => a, [C]);
356
+ }, [h, e, r, v]), re(() => {
357
+ !y && !v && F([]), !y && v && F(v);
358
+ }, [y, v]);
359
+ const W = Et(() => v ? (a, c) => a.filter(
360
+ (x) => x.label.toLowerCase().includes(c.inputValue.toLowerCase())
361
+ ) : (a) => a, [v]);
360
362
  return /* @__PURE__ */ f("div", { "data-testid": d, children: [
361
363
  /* @__PURE__ */ o(
362
364
  Ae,
@@ -366,18 +368,18 @@ function wo({
366
368
  disablePortal: m,
367
369
  multiple: !0,
368
370
  getOptionLabel: (a) => typeof a == "string" ? a : a.label,
369
- filterOptions: R,
370
- loading: _,
371
- options: [...c, ...M],
371
+ filterOptions: W,
372
+ loading: H,
373
+ options: [...l, ..._],
372
374
  filterSelectedOptions: !0,
373
375
  includeInputInList: !0,
374
- value: c,
375
- onOpen: () => k(!0),
376
- onClose: () => k(!1),
377
- onChange: (a, l, x) => {
378
- n(l, x, a);
376
+ value: l,
377
+ onOpen: () => $(!0),
378
+ onClose: () => $(!1),
379
+ onChange: (a, c, x) => {
380
+ n(c, x, a);
379
381
  },
380
- onInputChange: (a, l) => T(l),
382
+ onInputChange: (a, c) => T(c),
381
383
  noOptionsText: b,
382
384
  loadingText: w,
383
385
  popupIcon: A,
@@ -387,34 +389,34 @@ function wo({
387
389
  label: s,
388
390
  fullWidth: !0,
389
391
  variant: u,
390
- error: v,
391
- helperText: O,
392
+ error: C,
393
+ helperText: k,
392
394
  InputProps: S(i({}, a.InputProps), {
393
- endAdornment: /* @__PURE__ */ f(P, { children: [
394
- _ ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
395
+ endAdornment: /* @__PURE__ */ f(B, { children: [
396
+ H ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
395
397
  a.InputProps.endAdornment
396
398
  ] })
397
399
  }),
398
400
  "data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
399
- onKeyDown: (l) => {
400
- (l.key === "Backspace" || l.key === "Delete") && l.stopPropagation();
401
+ onKeyDown: (c) => {
402
+ (c.key === "Backspace" || c.key === "Delete") && c.stopPropagation();
401
403
  },
402
404
  color: p
403
405
  })
404
406
  ),
405
407
  renderTags: () => null,
406
- isOptionEqualToValue: (a, l) => a.id === l.id,
407
- renderOption: (a, l, x) => {
408
+ isOptionEqualToValue: (a, c) => a.id === c.id,
409
+ renderOption: (a, c, x) => {
408
410
  if (t) {
409
- const q = Zt(l.label, x.inputValue, {
411
+ const q = Zt(c.label, x.inputValue, {
410
412
  insideWords: !0,
411
413
  findAllOccurrences: !0
412
- }), le = Yt(l.label, q);
414
+ }), le = Yt(c.label, q);
413
415
  return /* @__PURE__ */ xe(
414
416
  "li",
415
417
  S(i({}, a), {
416
- key: l.id,
417
- "data-testid": d ? `${d}:Autocomplete:option(${l.id.toString()})` : void 0
418
+ key: c.id,
419
+ "data-testid": d ? `${d}:Autocomplete:option(${c.id.toString()})` : void 0
418
420
  }),
419
421
  /* @__PURE__ */ o("div", { children: le.map((J, ce) => /* @__PURE__ */ o(
420
422
  "span",
@@ -431,16 +433,16 @@ function wo({
431
433
  return /* @__PURE__ */ xe(
432
434
  "li",
433
435
  S(i({}, a), {
434
- key: l.id,
435
- "data-testid": d ? `${d}:option(${l.id.toString()})` : void 0
436
+ key: c.id,
437
+ "data-testid": d ? `${d}:option(${c.id.toString()})` : void 0
436
438
  }),
437
- l.label
439
+ c.label
438
440
  );
439
441
  }
440
442
  }
441
443
  ),
442
- c.length > 0 && /* @__PURE__ */ o(D, { children: c.map((a) => /* @__PURE__ */ o(
443
- yt,
444
+ l.length > 0 && /* @__PURE__ */ o(D, { children: l.map((a) => /* @__PURE__ */ o(
445
+ Ft,
444
446
  {
445
447
  sx: {
446
448
  marginTop: 1,
@@ -448,7 +450,7 @@ function wo({
448
450
  height: "auto"
449
451
  },
450
452
  label: /* @__PURE__ */ o(
451
- Bt,
453
+ yt,
452
454
  {
453
455
  title: a.tooltipContent || "",
454
456
  placement: "bottom-start",
@@ -466,7 +468,7 @@ function wo({
466
468
  }
467
469
  ),
468
470
  "data-testid": d ? `${d}:Chip(${a.id.toString()})` : void 0,
469
- onDelete: (l) => H(l, a.id),
471
+ onDelete: (c) => R(c, a.id),
470
472
  deleteIcon: /* @__PURE__ */ o(
471
473
  Qt,
472
474
  {
@@ -484,19 +486,19 @@ const bo = ({
484
486
  label: n,
485
487
  value: r,
486
488
  sx: s,
487
- textFieldColor: c,
489
+ textFieldColor: l,
488
490
  textFieldVariant: d = "filled",
489
491
  "data-testid": g,
490
492
  minLength: p = 3,
491
493
  disablePortal: u = !1
492
494
  }) => {
493
- const [w, b] = $([]), [A, v] = $(!1);
494
- let O;
495
- const C = (m) => z(void 0, null, function* () {
496
- O = new AbortController();
495
+ const [w, b] = O([]), [A, C] = O(!1);
496
+ let k;
497
+ const v = (m) => N(void 0, null, function* () {
498
+ k = new AbortController();
497
499
  try {
498
- const h = yield e(m, O.signal);
499
- b(h != null ? h : []), v(!1);
500
+ const h = yield e(m, k.signal);
501
+ b(h != null ? h : []), C(!1);
500
502
  } catch (h) {
501
503
  if (h instanceof Error && h.name === "AbortError")
502
504
  console.debug("Previous lookup request was cancelled");
@@ -504,7 +506,7 @@ const bo = ({
504
506
  throw h;
505
507
  }
506
508
  });
507
- return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(Ft, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
509
+ return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(Pt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
508
510
  Ae,
509
511
  {
510
512
  sx: s,
@@ -525,12 +527,12 @@ const bo = ({
525
527
  }, m), {
526
528
  variant: d,
527
529
  label: n,
528
- color: c
530
+ color: l
529
531
  })
530
532
  ),
531
533
  isOptionEqualToValue: (m, h) => m.id === h.id,
532
534
  onInputChange: (m, h) => {
533
- (h == null ? void 0 : h.length) >= p && (v(!0), C(h));
535
+ (h == null ? void 0 : h.length) >= p && (C(!0), v(h));
534
536
  },
535
537
  renderOption: (m, h) => /* @__PURE__ */ xe(
536
538
  "li",
@@ -549,7 +551,7 @@ const bo = ({
549
551
  titleText: `${U}-titleText`,
550
552
  leftPanelButton: `${U}-leftPanelButton`,
551
553
  rightPanelButton: `${U}-leftPanelButton`
552
- }, gn = Oe("div", {
554
+ }, gn = ke("div", {
553
555
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
554
556
  name: U
555
557
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -644,7 +646,7 @@ function fn({
644
646
  ] }) })
645
647
  ] });
646
648
  }
647
- const ut = 400, mn = Oe(be, {
649
+ const ut = 400, mn = ke(be, {
648
650
  shouldForwardProp: (e) => (
649
651
  // Note we do want anchor to be forwarded to the Drawer component
650
652
  ![
@@ -658,7 +660,7 @@ const ut = 400, mn = Oe(be, {
658
660
  ),
659
661
  name: "SidePanelDrawer"
660
662
  })(
661
- ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: r, navBarWidthOpen: s, navBarWidthClosed: c }) => ({
663
+ ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: r, navBarWidthOpen: s, navBarWidthClosed: l }) => ({
662
664
  width: e,
663
665
  "& .MuiDrawer-paper": i(i({
664
666
  position: "absolute",
@@ -669,12 +671,12 @@ const ut = 400, mn = Oe(be, {
669
671
  }, t && {
670
672
  opacity: "50%"
671
673
  }), n === "left" && i({
672
- marginLeft: `${c}px`
674
+ marginLeft: `${l}px`
673
675
  }, r && {
674
676
  marginLeft: `${s}px`
675
677
  }))
676
678
  })
677
- ), Cn = Oe(D, {
679
+ ), Cn = ke(D, {
678
680
  shouldForwardProp: (e) => !["anchor"].includes(e)
679
681
  })(({ theme: e, anchor: t }) => S(i({
680
682
  display: "flex",
@@ -701,7 +703,7 @@ function ze({
701
703
  onClose: r = () => {
702
704
  },
703
705
  titleText: s = "",
704
- width: c = ut,
706
+ width: l = ut,
705
707
  showCloseArrow: d = !0,
706
708
  debugOpacity: g = !1,
707
709
  headerBoxProps: p = {},
@@ -709,8 +711,8 @@ function ze({
709
711
  onClosed: w,
710
712
  "data-testid": b,
711
713
  navBarOpen: A = !1,
712
- navBarWidthOpen: v = 0,
713
- navBarWidthClosed: O = 0
714
+ navBarWidthOpen: C = 0,
715
+ navBarWidthClosed: k = 0
714
716
  }) {
715
717
  return /* @__PURE__ */ f(
716
718
  mn,
@@ -722,20 +724,20 @@ function ze({
722
724
  variant: "persistent",
723
725
  anchor: t,
724
726
  open: n,
725
- width: c,
727
+ width: l,
726
728
  debugOpacity: g,
727
729
  "data-testid": b,
728
730
  navBarOpen: A,
729
- navBarWidthOpen: v,
730
- navBarWidthClosed: O,
731
+ navBarWidthOpen: C,
732
+ navBarWidthClosed: k,
731
733
  children: [
732
- /* @__PURE__ */ o(Cn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(P, { children: [
734
+ /* @__PURE__ */ o(Cn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(B, { children: [
733
735
  /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s }),
734
736
  d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
735
737
  /* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
736
738
  " "
737
739
  ] })
738
- ] }) : /* @__PURE__ */ f(P, { children: [
740
+ ] }) : /* @__PURE__ */ f(B, { children: [
739
741
  d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
740
742
  /* @__PURE__ */ o(ot, {}),
741
743
  " "
@@ -747,7 +749,7 @@ function ze({
747
749
  }
748
750
  );
749
751
  }
750
- const vn = N(D, {
752
+ const vn = L(D, {
751
753
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
752
754
  name: "PanelAwareMargins"
753
755
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -770,7 +772,7 @@ const vn = N(D, {
770
772
  }),
771
773
  marginRight: `${(s = n == null ? void 0 : n.width) != null ? s : 0}px`
772
774
  });
773
- }), xn = N(et, {
775
+ }), xn = L(et, {
774
776
  name: "PageContainer"
775
777
  })(({ theme: e }) => ({
776
778
  // Horizontal padding comes from the Container's gutter
@@ -785,7 +787,7 @@ const vn = N(D, {
785
787
  startOpen: !1,
786
788
  open: void 0,
787
789
  onChangeOpen: void 0,
788
- content: /* @__PURE__ */ o(P, {}),
790
+ content: /* @__PURE__ */ o(B, {}),
789
791
  onOpened: void 0,
790
792
  onClosed: void 0,
791
793
  dataTestId: void 0
@@ -796,7 +798,7 @@ function Ao({
796
798
  leftPanel: n,
797
799
  rightPanel: r,
798
800
  sidePanelsAreMutuallyExclusive: s = !0,
799
- debugOpacity: c = !1,
801
+ debugOpacity: l = !1,
800
802
  pageContainerProps: d,
801
803
  pageContentDataTestId: g,
802
804
  topBarDataTestId: p,
@@ -804,14 +806,14 @@ function Ao({
804
806
  navBarWidthOpen: w,
805
807
  navBarWidthClosed: b
806
808
  }) {
807
- const [A, v] = $(Ce), [O, C] = $(ve), [m, h] = $(Ce), [T, M] = $(ve), y = n !== void 0, B = r !== void 0, {
808
- titleText: k,
809
- content: _,
810
- flavour: F,
811
- open: H,
812
- onChangeOpen: R,
809
+ const [A, C] = O(Ce), [k, v] = O(ve), [m, h] = O(Ce), [T, _] = O(ve), F = n !== void 0, y = r !== void 0, {
810
+ titleText: $,
811
+ content: H,
812
+ flavour: P,
813
+ open: R,
814
+ onChangeOpen: W,
813
815
  width: a,
814
- arrowButtons: l,
816
+ arrowButtons: c,
815
817
  startOpen: x,
816
818
  onOpened: q,
817
819
  onClosed: le,
@@ -819,7 +821,7 @@ function Ao({
819
821
  } = n ? i(i({}, te), n) : i({}, te), {
820
822
  titleText: ce,
821
823
  content: At,
822
- flavour: ke,
824
+ flavour: $e,
823
825
  open: de,
824
826
  onChangeOpen: Ie,
825
827
  width: pe,
@@ -827,20 +829,20 @@ function Ao({
827
829
  startOpen: Z,
828
830
  onOpened: St,
829
831
  onClosed: Dt,
830
- dataTestId: Ot
832
+ dataTestId: kt
831
833
  } = r ? i(i({}, te), r) : i({}, te);
832
834
  re(() => {
833
- x !== Ce && (v(x), h(x));
835
+ x !== Ce && (C(x), h(x));
834
836
  }, [x]), re(() => {
835
- Z !== ve && (C(Z), M(Z));
837
+ Z !== ve && (v(Z), _(Z));
836
838
  }, [Z]);
837
- const ue = H === void 0 ? A : H, he = de === void 0 ? O : de, Ee = (W) => {
838
- H === void 0 && (v(W), s && B && (W ? (C(!1), M(O)) : C(T))), R && R(W);
839
- }, Te = (W) => {
840
- de === void 0 && (C(W), s && y && (W ? (v(!1), h(A)) : v(m))), Ie && Ie(W);
839
+ const ue = R === void 0 ? A : R, he = de === void 0 ? k : de, Ee = (z) => {
840
+ R === void 0 && (C(z), s && y && (z ? (v(!1), _(k)) : v(T))), W && W(z);
841
+ }, Te = (z) => {
842
+ de === void 0 && (v(z), s && F && (z ? (C(!1), h(A)) : C(m))), Ie && Ie(z);
841
843
  };
842
844
  return /* @__PURE__ */ f(D, { children: [
843
- y && /* @__PURE__ */ o(
845
+ F && /* @__PURE__ */ o(
844
846
  ze,
845
847
  {
846
848
  "data-testid": J,
@@ -848,27 +850,27 @@ function Ao({
848
850
  open: ue,
849
851
  onClose: () => Ee(!1),
850
852
  width: a,
851
- titleText: k,
852
- debugOpacity: c,
853
- showCloseArrow: l === "both" || l === "close",
853
+ titleText: $,
854
+ debugOpacity: l,
855
+ showCloseArrow: c === "both" || c === "close",
854
856
  onOpened: q,
855
857
  onClosed: le,
856
858
  navBarOpen: u,
857
859
  navBarWidthOpen: w,
858
860
  navBarWidthClosed: b,
859
- children: _
861
+ children: H
860
862
  }
861
863
  ),
862
- B && /* @__PURE__ */ o(
864
+ y && /* @__PURE__ */ o(
863
865
  ze,
864
866
  {
865
- "data-testid": Ot,
867
+ "data-testid": kt,
866
868
  anchor: "right",
867
869
  open: he,
868
870
  onClose: () => Te(!1),
869
871
  width: pe,
870
872
  titleText: ce,
871
- debugOpacity: c,
873
+ debugOpacity: l,
872
874
  showCloseArrow: Y === "both" || Y === "close",
873
875
  onOpened: St,
874
876
  onClosed: Dt,
@@ -883,14 +885,14 @@ function Ao({
883
885
  i(i({
884
886
  titleText: t,
885
887
  "data-testid": p
886
- }, y && F === "push" ? {
888
+ }, F && P === "push" ? {
887
889
  leftPanel: {
888
890
  open: ue,
889
891
  width: a,
890
892
  onOpen: () => Ee(!0),
891
- showOpenArrow: l === "both" || l === "open"
893
+ showOpenArrow: c === "both" || c === "open"
892
894
  }
893
- } : {}), B && ke === "push" ? {
895
+ } : {}), y && $e === "push" ? {
894
896
  rightPanel: {
895
897
  open: he,
896
898
  width: pe,
@@ -901,12 +903,12 @@ function Ao({
901
903
  ),
902
904
  /* @__PURE__ */ o(
903
905
  vn,
904
- S(i(i({}, F === "push" ? {
906
+ S(i(i({}, P === "push" ? {
905
907
  leftPanel: {
906
908
  open: ue,
907
909
  width: a
908
910
  }
909
- } : {}), ke === "push" ? {
911
+ } : {}), $e === "push" ? {
910
912
  rightPanel: {
911
913
  open: he,
912
914
  width: pe
@@ -919,8 +921,8 @@ function Ao({
919
921
  }
920
922
  const ht = () => {
921
923
  const e = ae();
922
- return Pt(e.breakpoints.down("sm"));
923
- }, wn = 64, bn = 64, An = 256, K = L(!0), gt = L(An), ft = L(bn), we = L(""), mt = L(wn), Ct = L(void 0);
924
+ return Nt(e.breakpoints.down("sm"));
925
+ }, wn = 64, bn = 64, An = 256, K = M(!0), gt = M(An), ft = M(bn), we = M(""), mt = M(wn), Ct = M(void 0);
924
926
  function Sn({ links: e }) {
925
927
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
926
928
  }
@@ -932,7 +934,7 @@ const ne = "Navbar", j = {
932
934
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
933
935
  // settings: `${PREFIX}-settings`,
934
936
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
935
- }, Dn = N(D, { name: "NavBar" })(({ theme: e }) => ({
937
+ }, Dn = L(D, { name: "NavBar" })(({ theme: e }) => ({
936
938
  [`&.${j.root}`]: {
937
939
  display: "flex"
938
940
  },
@@ -954,10 +956,10 @@ const ne = "Navbar", j = {
954
956
  })), ie = (e, t, n) => e.transitions.create(t, {
955
957
  easing: e.transitions.easing.sharp,
956
958
  duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
957
- }), On = (e) => {
959
+ }), kn = (e) => {
958
960
  const t = ae();
959
961
  return /* @__PURE__ */ o(
960
- Nt,
962
+ Bt,
961
963
  i({
962
964
  easing: t.transitions.easing.sharp,
963
965
  timeout: {
@@ -980,7 +982,7 @@ const ne = "Navbar", j = {
980
982
  }, vt(e)), Ue = (e, t) => i({
981
983
  width: t,
982
984
  transition: ie(e, "width", "leaving")
983
- }, vt(e)), $n = N(be, {
985
+ }, vt(e)), On = L(be, {
984
986
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
985
987
  })(({ theme: e, open: t, widthOpen: n, widthClosed: r, isSmallScreen: s }) => i(i({
986
988
  flexShrink: 0,
@@ -995,7 +997,7 @@ const ne = "Navbar", j = {
995
997
  backgroundColor: "",
996
998
  "& .MuiDrawer-paper": Ue(e, s ? n : r)
997
999
  })));
998
- function kn(e) {
1000
+ function $n(e) {
999
1001
  let t = 0;
1000
1002
  for (let n = 0, r = e.length; n < r; n++) {
1001
1003
  const s = e.charCodeAt(n);
@@ -1026,20 +1028,20 @@ function En({ user: e, domainCode: t, open: n }) {
1026
1028
  aspectRatio: 1
1027
1029
  },
1028
1030
  children: e != null && e.name ? /* @__PURE__ */ o(
1029
- Ne,
1031
+ Be,
1030
1032
  {
1031
1033
  src: e == null ? void 0 : e.picture,
1032
1034
  sx: {
1033
1035
  width: "100%",
1034
1036
  height: "100%",
1035
- bgcolor: Ve[Math.abs(kn(e.name)) % Ve.length]
1037
+ bgcolor: Ve[Math.abs($n(e.name)) % Ve.length]
1036
1038
  },
1037
1039
  children: In(e.name)
1038
1040
  }
1039
- ) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
1041
+ ) : /* @__PURE__ */ o(Be, { sx: { width: "100%", height: "100%" } })
1040
1042
  }
1041
1043
  ),
1042
- /* @__PURE__ */ o(On, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Lt, { in: n, children: /* @__PURE__ */ f(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1044
+ /* @__PURE__ */ o(kn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Lt, { in: n, children: /* @__PURE__ */ f(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1043
1045
  e != null && e.name ? /* @__PURE__ */ o(E, { children: e.name }) : /* @__PURE__ */ o(Le, { animation: !1, width: "50%" }),
1044
1046
  t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Le, { animation: !1, width: "25%" })
1045
1047
  ] }) }) })
@@ -1053,14 +1055,14 @@ function Tn({
1053
1055
  widthOpen: n,
1054
1056
  "data-testid": r,
1055
1057
  top: s,
1056
- middle: c,
1058
+ middle: l,
1057
1059
  bottom: d,
1058
1060
  user: g,
1059
1061
  domainCode: p
1060
1062
  }) {
1061
1063
  const u = ht(), w = it(K);
1062
1064
  return /* @__PURE__ */ o(Dn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
1063
- $n,
1065
+ On,
1064
1066
  {
1065
1067
  open: e,
1066
1068
  widthOpen: n,
@@ -1080,17 +1082,17 @@ function Tn({
1080
1082
  s,
1081
1083
  /* @__PURE__ */ o(Me, { variant: "middle" })
1082
1084
  ] }),
1083
- /* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(c) ? /* @__PURE__ */ o(Sn, { links: c }) : c }),
1085
+ /* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(Sn, { links: l }) : l }),
1084
1086
  /* @__PURE__ */ f(D, { flexGrow: "0", children: [
1085
1087
  /* @__PURE__ */ o(Me, { variant: "middle" }),
1086
1088
  /* @__PURE__ */ o(En, { user: g, domainCode: p, open: e }),
1087
- d && /* @__PURE__ */ o(P, { children: d })
1089
+ d && /* @__PURE__ */ o(B, { children: d })
1088
1090
  ] })
1089
1091
  ]
1090
1092
  }
1091
1093
  ) });
1092
1094
  }
1093
- function yn({
1095
+ function Fn({
1094
1096
  children: e,
1095
1097
  topBarHeight: t,
1096
1098
  maxWidth: n = !1
@@ -1118,11 +1120,11 @@ function yn({
1118
1120
  }
1119
1121
  );
1120
1122
  }
1121
- const Bn = "TopBar", Fn = {
1122
- titleText: `${Bn}-titleText`
1123
+ const yn = "TopBar", Pn = {
1124
+ titleText: `${yn}-titleText`
1123
1125
  };
1124
- function Pn({ titleText: e = "", height: t, "data-testid": n }) {
1125
- const r = it(K), s = () => r((g) => !g), c = ae(), d = ht();
1126
+ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
1127
+ const r = it(K), s = () => r((g) => !g), l = ae(), d = ht();
1126
1128
  return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
1127
1129
  Ze,
1128
1130
  {
@@ -1138,11 +1140,11 @@ function Pn({ titleText: e = "", height: t, "data-testid": n }) {
1138
1140
  gap: 2,
1139
1141
  flexShrink: 0,
1140
1142
  height: t,
1141
- zIndex: d ? 0 : c.zIndex.drawer + 1
1143
+ zIndex: d ? 0 : l.zIndex.drawer + 1
1142
1144
  },
1143
1145
  children: [
1144
1146
  /* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Jt, { fontSize: "medium" }) }),
1145
- /* @__PURE__ */ o(E, { className: Fn.titleText, variant: "h6", children: e })
1147
+ /* @__PURE__ */ o(E, { className: Pn.titleText, variant: "h6", children: e })
1146
1148
  ]
1147
1149
  }
1148
1150
  ) });
@@ -1153,7 +1155,7 @@ function So({
1153
1155
  initialNavBarOpen: n,
1154
1156
  pageContainerProps: r,
1155
1157
  pageContentDataTestId: s,
1156
- topBarDataTestId: c,
1158
+ topBarDataTestId: l,
1157
1159
  navBarDataTestId: d,
1158
1160
  navBarMiddle: g,
1159
1161
  navBarBottom: p,
@@ -1164,10 +1166,10 @@ function So({
1164
1166
  [K, n != null ? n : !0],
1165
1167
  [we, t != null ? t : ""]
1166
1168
  ]);
1167
- const b = He(K), [A] = X(gt), [v] = X(ft), O = He(we), [C] = X(mt), [m] = X(Ct);
1169
+ const b = He(K), [A] = X(gt), [C] = X(ft), k = He(we), [v] = X(mt), [m] = X(Ct);
1168
1170
  return /* @__PURE__ */ f(D, { children: [
1169
1171
  /* @__PURE__ */ o(_t, {}),
1170
- /* @__PURE__ */ o(Pn, { titleText: O, "data-testid": c, height: C }),
1172
+ /* @__PURE__ */ o(Nn, { titleText: k, "data-testid": l, height: v }),
1171
1173
  /* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
1172
1174
  /* @__PURE__ */ o(
1173
1175
  Tn,
@@ -1179,16 +1181,16 @@ function So({
1179
1181
  user: u,
1180
1182
  domainCode: w,
1181
1183
  widthOpen: A,
1182
- widthClosed: v,
1183
- offsetTop: C,
1184
+ widthClosed: C,
1185
+ offsetTop: v,
1184
1186
  "data-testid": d
1185
1187
  }
1186
1188
  ),
1187
1189
  /* @__PURE__ */ o(
1188
- yn,
1190
+ Fn,
1189
1191
  S(i({
1190
1192
  "data-testid": s,
1191
- topBarHeight: C
1193
+ topBarHeight: v
1192
1194
  }, r), {
1193
1195
  children: e
1194
1196
  })
@@ -1196,7 +1198,7 @@ function So({
1196
1198
  ] })
1197
1199
  ] });
1198
1200
  }
1199
- const Nn = {
1201
+ const Bn = {
1200
1202
  autoHideDuration: 6e3,
1201
1203
  anchorOrigin: { vertical: "top", horizontal: "center" },
1202
1204
  // The default is false. If we prefer timer to continue when window loses
@@ -1217,75 +1219,75 @@ const Nn = {
1217
1219
  borderBottomLeftRadius: "0px",
1218
1220
  borderBottomRightRadius: "0px"
1219
1221
  }, Rn = {}, Wn = {}, xt = Je(null);
1220
- function zn(c) {
1221
- var d = c, {
1222
+ function zn(l) {
1223
+ var d = l, {
1222
1224
  overrideState: e = Rn,
1223
1225
  overrideActions: t = Wn,
1224
1226
  shouldClose: n = Ln.shouldClose,
1225
1227
  children: r
1226
- } = d, s = Fe(d, [
1228
+ } = d, s = Pe(d, [
1227
1229
  "overrideState",
1228
1230
  "overrideActions",
1229
1231
  "shouldClose",
1230
1232
  "children"
1231
1233
  ]);
1232
- var R;
1233
- const [{ open: g }, p] = $({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), A = oe((a) => {
1234
+ var W;
1235
+ const [{ open: g }, p] = O({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), A = oe((a) => {
1234
1236
  p({ open: a });
1235
- }, []), v = oe((a = {}) => {
1237
+ }, []), C = oe((a = {}) => {
1236
1238
  b.current += 1, u.current.length >= Xe && Date.now() - w.current >= je && (w.current = Date.now(), console.error(
1237
1239
  `SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${b.current} times in last ${je}ms)`
1238
1240
  ), b.current = 0);
1239
- const l = i(S(i({}, qe), {
1241
+ const c = i(S(i({}, qe), {
1240
1242
  key: _n()
1241
1243
  }), a);
1242
- return u.current.push(l), u.current.length === 1 && p({ open: !0 }), l.key;
1243
- }, []), O = (a = "", l = {}) => v(i({ message: a, severity: "success" }, l)), C = (a = "", l = {}) => v(i({ message: a, severity: "info" }, l)), m = (a = "", l = {}) => v(i({ message: a, severity: "warning" }, l)), h = (a = "", l = {}) => v(i({ message: a, severity: "error" }, l)), T = (a) => {
1244
- const l = u.current.findIndex((x) => x.key === a);
1245
- if (l !== -1)
1246
- return l === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(l, 1);
1247
- }, M = (a, l) => {
1248
- n(a, l) && p({ open: !1 });
1244
+ return u.current.push(c), u.current.length === 1 && p({ open: !0 }), c.key;
1245
+ }, []), k = (a = "", c = {}) => C(i({ message: a, severity: "success" }, c)), v = (a = "", c = {}) => C(i({ message: a, severity: "info" }, c)), m = (a = "", c = {}) => C(i({ message: a, severity: "warning" }, c)), h = (a = "", c = {}) => C(i({ message: a, severity: "error" }, c)), T = (a) => {
1246
+ const c = u.current.findIndex((x) => x.key === a);
1247
+ if (c !== -1)
1248
+ return c === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(c, 1);
1249
+ }, _ = (a, c) => {
1250
+ n(a, c) && p({ open: !1 });
1251
+ }, F = () => {
1249
1252
  }, y = () => {
1250
- }, B = () => {
1251
1253
  u.current.shift(), u.current.length > 0 && p({ open: !0 });
1252
- }, k = (R = u.current[0]) != null ? R : i({}, qe), _ = {};
1253
- "autoHideDuration" in k && (_.autoHideDuration = k.autoHideDuration);
1254
- const F = i(i({}, Nn), s), H = i(i({
1254
+ }, $ = (W = u.current[0]) != null ? W : i({}, qe), H = {};
1255
+ "autoHideDuration" in $ && (H.autoHideDuration = $.autoHideDuration);
1256
+ const P = i(i({}, Bn), s), R = i(i({
1255
1257
  open: g,
1256
1258
  setOpen: A,
1257
- enqueueNotification: v,
1258
- enqueueSuccessNotification: O,
1259
- enqueueInfoNotification: C,
1259
+ enqueueNotification: C,
1260
+ enqueueSuccessNotification: k,
1261
+ enqueueInfoNotification: v,
1260
1262
  enqueueWarningNotification: m,
1261
1263
  enqueueErrorNotification: h,
1262
1264
  removeNotification: T
1263
1265
  }, e), t);
1264
- return /* @__PURE__ */ f(xt.Provider, { value: H, children: [
1266
+ return /* @__PURE__ */ f(xt.Provider, { value: R, children: [
1265
1267
  r,
1266
1268
  /* @__PURE__ */ o(
1267
1269
  Ht,
1268
- S(i(i({}, F), _), {
1270
+ S(i(i({}, P), H), {
1269
1271
  open: g,
1270
- onClose: M,
1272
+ onClose: _,
1271
1273
  TransitionProps: {
1272
- onExited: B,
1273
- onExit: y
1274
+ onExited: y,
1275
+ onExit: F
1274
1276
  },
1275
1277
  sx: { zIndex: Mn },
1276
1278
  children: /* @__PURE__ */ f("div", { children: [
1277
1279
  /* @__PURE__ */ o(
1278
1280
  Rt,
1279
1281
  {
1280
- onClose: (a) => M(a, "closeAlert"),
1281
- severity: k.severity,
1282
+ onClose: (a) => _(a, "closeAlert"),
1283
+ severity: $.severity,
1282
1284
  variant: "filled",
1283
- icon: k.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
1284
- style: k.progressIndicator === "linear" ? Hn : void 0,
1285
- children: k.message
1285
+ icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
1286
+ style: $.progressIndicator === "linear" ? Hn : void 0,
1287
+ children: $.message
1286
1288
  }
1287
1289
  ),
1288
- k.progressIndicator === "linear" && /* @__PURE__ */ o(Wt, { color: "primary" })
1290
+ $.progressIndicator === "linear" && /* @__PURE__ */ o(Wt, { color: "primary" })
1289
1291
  ] })
1290
1292
  })
1291
1293
  )
@@ -1294,19 +1296,19 @@ function zn(c) {
1294
1296
  function Gn() {
1295
1297
  const e = Ye(xt);
1296
1298
  if (e === null)
1297
- throw new $e("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1299
+ throw new Oe("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1298
1300
  return e;
1299
1301
  }
1300
1302
  const Do = se(
1301
1303
  (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: r }) => /* @__PURE__ */ o(zn, S(i({}, e), { overrideState: t, overrideActions: n, children: r }))
1302
- ), Un = en(), Oo = ({
1304
+ ), Un = en(), ko = ({
1303
1305
  children: e,
1304
1306
  store: t
1305
1307
  }) => /* @__PURE__ */ o(at, { store: t != null ? t : Un, children: e }), wt = "domainCode";
1306
1308
  var Ke;
1307
- const Qe = L(
1309
+ const Qe = M(
1308
1310
  JSON.parse((Ke = localStorage.getItem(wt)) != null ? Ke : '{"domainCode": ""}').domainCode
1309
- ), bt = L(
1311
+ ), bt = M(
1310
1312
  (e) => e(Qe),
1311
1313
  (e, t, n) => {
1312
1314
  t(Qe, n), localStorage.setItem(wt, JSON.stringify({ domainCode: n }));
@@ -1326,18 +1328,18 @@ const Qe = L(
1326
1328
  }, qn = (e) => {
1327
1329
  var t;
1328
1330
  return e === null ? "N/A" : (t = Vn[e]) != null ? t : "";
1329
- }, $o = ({
1331
+ }, Oo = ({
1330
1332
  isLoading: e,
1331
1333
  isOpen: t,
1332
1334
  onClose: n,
1333
1335
  domainOptions: r,
1334
1336
  applicationName: s,
1335
- handleLogout: c
1337
+ handleLogout: l
1336
1338
  }) => {
1337
- const [d, g] = X(bt), [p, u] = $(d), { enqueueSuccessNotification: w } = Gn(), b = r.length === 0, A = !!d && !r.includes(d) && !r.includes(p), v = !d || b || A, O = () => z(void 0, null, function* () {
1339
+ const [d, g] = X(bt), [p, u] = O(d), { enqueueSuccessNotification: w } = Gn(), b = r.length === 0, A = !!d && !r.includes(d) && !r.includes(p), C = !d || b || A, k = () => N(void 0, null, function* () {
1338
1340
  p ? (g(p), w(`Set domain to ${p}`), n()) : g("");
1339
- }), C = () => z(void 0, null, function* () {
1340
- d && !b && !A ? (u(d), n()) : v && c();
1341
+ }), v = () => N(void 0, null, function* () {
1342
+ d && !b && !A ? (u(d), n()) : C && l();
1341
1343
  });
1342
1344
  let m;
1343
1345
  return b ? m = "Unable to retrieve your active organisations. Try logging in again." : A && (m = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ f(
@@ -1347,15 +1349,15 @@ const Qe = L(
1347
1349
  dialogTitle: "Select an organisation",
1348
1350
  primaryButton: {
1349
1351
  text: "Confirm",
1350
- onClick: O,
1352
+ onClick: k,
1351
1353
  disabled: !p || b || A,
1352
1354
  buttonColor: "primary"
1353
1355
  },
1354
1356
  secondaryButton: {
1355
- text: v ? "Logout" : "Cancel",
1356
- onClick: C
1357
+ text: C ? "Logout" : "Cancel",
1358
+ onClick: v
1357
1359
  },
1358
- onClose: v ? () => {
1360
+ onClose: C ? () => {
1359
1361
  } : n,
1360
1362
  children: [
1361
1363
  /* @__PURE__ */ f(E, { marginBottom: 2, children: [
@@ -1379,7 +1381,7 @@ const Qe = L(
1379
1381
  variant: "filled",
1380
1382
  label: "Select organisation",
1381
1383
  InputProps: S(i({}, h.InputProps), {
1382
- endAdornment: /* @__PURE__ */ f(P, { children: [
1384
+ endAdornment: /* @__PURE__ */ f(B, { children: [
1383
1385
  e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1384
1386
  h.InputProps.endAdornment
1385
1387
  ] })
@@ -1392,7 +1394,7 @@ const Qe = L(
1392
1394
  ]
1393
1395
  }
1394
1396
  );
1395
- }, ko = tt({
1397
+ }, $o = tt({
1396
1398
  palette: {
1397
1399
  primary: {
1398
1400
  dark: "#00A651",
@@ -1545,7 +1547,7 @@ const Qe = L(
1545
1547
  }, Eo = se(() => ({ children: e }) => /* @__PURE__ */ o(at, { children: e })), jn = ({
1546
1548
  initialValues: e,
1547
1549
  children: t
1548
- }) => (st(e), /* @__PURE__ */ o(P, { children: t })), To = se(
1550
+ }) => (st(e), /* @__PURE__ */ o(B, { children: t })), To = se(
1549
1551
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1550
1552
  jn,
1551
1553
  {
@@ -1562,10 +1564,10 @@ const Qe = L(
1562
1564
  export {
1563
1565
  pn as AgDialog,
1564
1566
  So as AppLayout,
1565
- Oo as AtomProvider,
1567
+ ko as AtomProvider,
1566
1568
  xt as Context,
1567
- $e as ContextError,
1568
- $o as DomainCodeDialog,
1569
+ Oe as ContextError,
1570
+ Oo as DomainCodeDialog,
1569
1571
  fo as ExampleComponent,
1570
1572
  wo as FetchAutocomplete,
1571
1573
  jn as HydrateAtoms,
@@ -1581,7 +1583,7 @@ export {
1581
1583
  Un as atomStore,
1582
1584
  dn as buildNavBarState,
1583
1585
  bt as domainCodeAtom,
1584
- ko as fed21Theme,
1586
+ $o as fed21Theme,
1585
1587
  Io as internalAgSystemsTheme,
1586
1588
  V as navBarClasses,
1587
1589
  K as navBarOpenAtom,