@australiangreens/ag-internal-components 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/components/AgDialog/AgDialog.d.ts +1 -1
  4. package/dist/components/AgDialog/AgDialog.d.ts.map +1 -1
  5. package/dist/components/AuthGuard/AuthGuard.d.ts +1 -1
  6. package/dist/components/AuthGuard/AuthGuard.d.ts.map +1 -1
  7. package/dist/components/ExampleComponent/ExampleComponent.d.ts +1 -2
  8. package/dist/components/ExampleComponent/ExampleComponent.d.ts.map +1 -1
  9. package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts +2 -2
  10. package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
  11. package/dist/components/NavBar/NavBar.d.ts +1 -1
  12. package/dist/components/NavBar/NavBar.d.ts.map +1 -1
  13. package/dist/components/NavBar/NavBarContext.d.ts +1 -1
  14. package/dist/components/NavBar/NavBarContext.d.ts.map +1 -1
  15. package/dist/components/NavBar/NavBarDarkStyledList.d.ts +2 -1
  16. package/dist/components/NavBar/NavBarDarkStyledList.d.ts.map +1 -1
  17. package/dist/components/NavBar/NavBarLightStyledList.d.ts +2 -1
  18. package/dist/components/NavBar/NavBarLightStyledList.d.ts.map +1 -1
  19. package/dist/components/NavBar/NavBarLink.d.ts +1 -1
  20. package/dist/components/NavBar/NavBarLink.d.ts.map +1 -1
  21. package/dist/components/SessionExpiryDialog/index.d.ts +1 -2
  22. package/dist/components/SessionExpiryDialog/index.d.ts.map +1 -1
  23. package/dist/components/SingleAutocomplete/index.d.ts +1 -1
  24. package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
  25. package/dist/domainCode/DomainCodeDialog.d.ts +2 -1
  26. package/dist/domainCode/DomainCodeDialog.d.ts.map +1 -1
  27. package/dist/esm/index.js +304 -306
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/layouts/AppLayout/AppLayout.d.ts +1 -1
  30. package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
  31. package/dist/layouts/AppLayout/NavBar/LinksMenu.d.ts +1 -2
  32. package/dist/layouts/AppLayout/NavBar/LinksMenu.d.ts.map +1 -1
  33. package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +1 -1
  34. package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
  35. package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts +1 -2
  36. package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts.map +1 -1
  37. package/dist/layouts/AppLayout/NavBar/Styling.d.ts +2 -2
  38. package/dist/layouts/AppLayout/NavBar/Styling.d.ts.map +1 -1
  39. package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +1 -2
  40. package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -1
  41. package/dist/layouts/AppLayout/PageContainer.d.ts +1 -1
  42. package/dist/layouts/AppLayout/PageContainer.d.ts.map +1 -1
  43. package/dist/layouts/AppLayout/TopBar.d.ts +1 -1
  44. package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -1
  45. package/dist/layouts/PageLayout/PageLayout.d.ts +1 -1
  46. package/dist/layouts/PageLayout/PageLayout.d.ts.map +1 -1
  47. package/dist/layouts/PageLayout/SidePanel.d.ts +1 -1
  48. package/dist/layouts/PageLayout/SidePanel.d.ts.map +1 -1
  49. package/dist/layouts/PageLayout/TopBar.d.ts +1 -2
  50. package/dist/layouts/PageLayout/TopBar.d.ts.map +1 -1
  51. package/dist/providers/SaladBar/SaladBarContext.d.ts +1 -1
  52. package/dist/providers/SaladBar/SaladBarContext.d.ts.map +1 -1
  53. package/dist/providers/SaladBar/defaults.d.ts.map +1 -1
  54. package/dist/testing/wrappers.d.ts +1 -1
  55. package/dist/testing/wrappers.d.ts.map +1 -1
  56. package/package.json +27 -27
  57. package/dist/providers/Atom/AtomProvider.d.ts +0 -99
  58. package/dist/providers/Atom/AtomProvider.d.ts.map +0 -1
package/dist/esm/index.js CHANGED
@@ -19,26 +19,26 @@ var Fe = (e, t) => {
19
19
  t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
20
20
  return n;
21
21
  };
22
- var Ne = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
22
+ var Ne = (e, t, n) => ge(e, typeof t != "symbol" ? t + "" : t, n);
23
23
  var _ = (e, t, n) => new Promise((i, r) => {
24
- var s = (l) => {
24
+ var s = (c) => {
25
25
  try {
26
- c(n.next(l));
27
- } catch (p) {
28
- r(p);
26
+ l(n.next(c));
27
+ } catch (u) {
28
+ r(u);
29
29
  }
30
- }, d = (l) => {
30
+ }, d = (c) => {
31
31
  try {
32
- c(n.throw(l));
33
- } catch (p) {
34
- r(p);
32
+ l(n.throw(c));
33
+ } catch (u) {
34
+ r(u);
35
35
  }
36
- }, c = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, d);
37
- c((n = n.apply(e, t)).next());
36
+ }, l = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(s, d);
37
+ l((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as u, Fragment as N, jsx as o } from "react/jsx-runtime";
39
+ import { jsxs as p, Fragment as N, jsx as o } from "react/jsx-runtime";
40
40
  import { useState as F, createContext as Ze, useCallback as se, useContext as je, useEffect as K, createElement as ve, useMemo as Ht, useRef as fe } from "react";
41
- import { Typography as T, Button as J, Paper as et, Box as k, Drawer as Ae, styled as be, IconButton as Z, Container as tt, useTheme as le, useMediaQuery as Wt, Collapse as Ut, Avatar as Pe, Fade as zt, Skeleton as _e, Toolbar as Gt, Divider as Le, CssBaseline as Vt, Dialog as nt, LinearProgress as ot, DialogTitle as it, DialogContent as rt, DialogActions as at, Autocomplete as Se, TextField as ye, CircularProgress as Ie, Chip as qt, Tooltip as Xt, Stack as Qt, Snackbar as Yt, Alert as Kt, FormHelperText as Jt } from "@mui/material";
41
+ import { Typography as O, Button as J, Paper as et, Box as I, Drawer as Ae, styled as be, IconButton as Z, Container as tt, useTheme as le, useMediaQuery as Wt, Collapse as Ut, Avatar as Pe, Fade as zt, Skeleton as _e, Toolbar as Gt, Divider as Le, CssBaseline as Vt, Dialog as nt, LinearProgress as ot, DialogTitle as it, DialogContent as rt, DialogActions as at, Autocomplete as Se, TextField as ye, CircularProgress as Ie, Chip as qt, Tooltip as Xt, Stack as Qt, Snackbar as Yt, Alert as Kt, FormHelperText as Jt } from "@mui/material";
42
42
  import Zt from "@mui/material/CssBaseline";
43
43
  import { styled as W, createTheme as st, alpha as me } from "@mui/material/styles";
44
44
  import { AgError as jt } from "@australiangreens/ag-error";
@@ -57,9 +57,9 @@ import { Buffer as un } from "buffer";
57
57
  import pn from "@mui/material/Skeleton";
58
58
  function Oo({ text: e }) {
59
59
  const [t, n] = F(0);
60
- return /* @__PURE__ */ u(N, { children: [
61
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
62
- /* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
60
+ return /* @__PURE__ */ p(N, { children: [
61
+ /* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
62
+ /* @__PURE__ */ o(O, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
63
63
  /* @__PURE__ */ o(
64
64
  J,
65
65
  {
@@ -69,11 +69,11 @@ function Oo({ text: e }) {
69
69
  children: "Hello I am a button"
70
70
  }
71
71
  ),
72
- /* @__PURE__ */ u("p", { children: [
72
+ /* @__PURE__ */ p("p", { children: [
73
73
  "This is some text: ",
74
74
  /* @__PURE__ */ o("span", { children: e })
75
75
  ] }),
76
- /* @__PURE__ */ u(et, { children: [
76
+ /* @__PURE__ */ p(et, { children: [
77
77
  "This number will incremember when button pressed: ",
78
78
  t
79
79
  ] })
@@ -87,7 +87,7 @@ const ft = 330, mt = 73, z = "Navbar", q = {
87
87
  userInfoHolder: `${z}-userInfoHolder`,
88
88
  settings: `${z}-settings`,
89
89
  pieChartIcon: `${z}-pieChartIcon`
90
- }, hn = W(k, {
90
+ }, hn = W(I, {
91
91
  name: "NavBar"
92
92
  })(({ theme: e }) => ({
93
93
  [`&.${q.root}`]: {
@@ -108,7 +108,7 @@ const ft = 330, mt = 73, z = "Navbar", q = {
108
108
  marginTop: "64px",
109
109
  marginBottom: "16px"
110
110
  }
111
- })), Ct = () => ({
111
+ })), xt = () => ({
112
112
  position: "absolute",
113
113
  height: "100%",
114
114
  overflowX: "hidden",
@@ -118,9 +118,9 @@ const ft = 330, mt = 73, z = "Navbar", q = {
118
118
  // backgroundColor: '#e8e8e8',
119
119
  }), gn = () => a({
120
120
  width: ft
121
- }, Ct()), fn = () => a({
121
+ }, xt()), fn = () => a({
122
122
  width: mt
123
- }, Ct()), mn = W(Ae, {
123
+ }, xt()), mn = W(Ae, {
124
124
  shouldForwardProp: (e) => e !== "open"
125
125
  })(({ theme: e, open: t }) => a(a({
126
126
  width: t ? ft : mt,
@@ -136,23 +136,23 @@ const ft = 330, mt = 73, z = "Navbar", q = {
136
136
  class ke extends jt {
137
137
  }
138
138
  Ne(ke, "errorName", "ContextError");
139
- const xt = Ze(null), Cn = {}, xn = {}, vn = ({
140
- overrideState: e = Cn,
141
- overrideActions: t = xn,
139
+ const Ct = Ze(null), xn = {}, Cn = {}, vn = ({
140
+ overrideState: e = xn,
141
+ overrideActions: t = Cn,
142
142
  children: n
143
143
  }) => {
144
- const [{ open: i }, r] = F({ open: !0 }), s = se((l) => {
145
- r({ open: l });
144
+ const [{ open: i }, r] = F({ open: !0 }), s = se((c) => {
145
+ r({ open: c });
146
146
  }, []), d = se(() => {
147
- r((l) => y(a({}, l), { open: !l.open }));
148
- }, []), c = a(a({
147
+ r((c) => y(a({}, c), { open: !c.open }));
148
+ }, []), l = a(a({
149
149
  open: i,
150
150
  setOpen: s,
151
151
  toggleOpen: d
152
152
  }, e), t);
153
- return /* @__PURE__ */ o(xt.Provider, { value: c, children: n });
153
+ return /* @__PURE__ */ o(Ct.Provider, { value: l, children: n });
154
154
  }, wn = () => {
155
- const e = je(xt);
155
+ const e = je(Ct);
156
156
  if (e === null)
157
157
  throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
158
158
  return e;
@@ -242,7 +242,7 @@ function _o({
242
242
  children: t
243
243
  }) {
244
244
  const { open: n } = wn();
245
- return /* @__PURE__ */ u(hn, { className: q.root, "data-testid": e, children: [
245
+ return /* @__PURE__ */ p(hn, { className: q.root, "data-testid": e, children: [
246
246
  /* @__PURE__ */ o(Zt, {}),
247
247
  /* @__PURE__ */ o(
248
248
  mn,
@@ -321,10 +321,10 @@ function In({
321
321
  rightPanel: n,
322
322
  "data-testid": i
323
323
  }) {
324
- return /* @__PURE__ */ u(yn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
324
+ return /* @__PURE__ */ p(yn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
325
325
  /* @__PURE__ */ o("div", { className: B.topStripe }),
326
- /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u(k, { className: B.titleSlider, children: [
327
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
326
+ /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ p(I, { className: B.titleSlider, children: [
327
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
328
328
  Z,
329
329
  {
330
330
  className: B.leftPanelButton,
@@ -339,8 +339,8 @@ function In({
339
339
  ]
340
340
  }
341
341
  ),
342
- /* @__PURE__ */ o(T, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
343
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
342
+ /* @__PURE__ */ o(O, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
343
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
344
344
  Z,
345
345
  {
346
346
  className: B.rightPanelButton,
@@ -388,7 +388,7 @@ const vt = 400, kn = be(Ae, {
388
388
  marginLeft: `${r}px`
389
389
  }))
390
390
  })
391
- ), Dn = be(k, {
391
+ ), $n = be(I, {
392
392
  shouldForwardProp: (e) => !["anchor"].includes(e)
393
393
  })(({ theme: e, anchor: t }) => y(a({
394
394
  display: "flex",
@@ -417,51 +417,51 @@ function Ue({
417
417
  titleText: r = "",
418
418
  width: s = vt,
419
419
  showCloseArrow: d = !0,
420
- debugOpacity: c = !1,
421
- headerBoxProps: l = {},
422
- onOpened: p,
420
+ debugOpacity: l = !1,
421
+ headerBoxProps: c = {},
422
+ onOpened: u,
423
423
  onClosed: g,
424
- "data-testid": m,
424
+ "data-testid": C,
425
425
  navBarOpen: w = !1,
426
426
  navBarWidthOpen: h = 0,
427
- navBarWidthClosed: S = 0
427
+ navBarWidthClosed: b = 0
428
428
  }) {
429
- return /* @__PURE__ */ u(
429
+ return /* @__PURE__ */ p(
430
430
  kn,
431
431
  {
432
432
  SlideProps: {
433
- onEntered: () => p == null ? void 0 : p(),
433
+ onEntered: () => u == null ? void 0 : u(),
434
434
  onExited: () => g == null ? void 0 : g()
435
435
  },
436
436
  variant: "persistent",
437
437
  anchor: t,
438
438
  open: n,
439
439
  width: s,
440
- debugOpacity: c,
441
- "data-testid": m,
440
+ debugOpacity: l,
441
+ "data-testid": C,
442
442
  navBarOpen: w,
443
443
  navBarWidthOpen: h,
444
- navBarWidthClosed: S,
444
+ navBarWidthClosed: b,
445
445
  children: [
446
- /* @__PURE__ */ o(Dn, y(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(N, { children: [
447
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
448
- d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
446
+ /* @__PURE__ */ o($n, y(a({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ p(N, { children: [
447
+ /* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", children: r }),
448
+ d && /* @__PURE__ */ p(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
449
449
  /* @__PURE__ */ o(dt, { "data-testid": "arrowbackicon" }),
450
450
  " "
451
451
  ] })
452
- ] }) : /* @__PURE__ */ u(N, { children: [
453
- d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
452
+ ] }) : /* @__PURE__ */ p(N, { children: [
453
+ d && /* @__PURE__ */ p(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
454
454
  /* @__PURE__ */ o(ct, {}),
455
455
  " "
456
456
  ] }),
457
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r })
457
+ /* @__PURE__ */ o(O, { variant: "h6", color: "inherit", component: "div", children: r })
458
458
  ] }) })),
459
459
  e
460
460
  ]
461
461
  }
462
462
  );
463
463
  }
464
- const $n = W(k, {
464
+ const Dn = W(I, {
465
465
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
466
466
  name: "PanelAwareMargins"
467
467
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -491,7 +491,7 @@ const $n = W(k, {
491
491
  paddingTop: e.spacing(3),
492
492
  paddingBottom: e.spacing(3)
493
493
  // TODO: Remove max width
494
- })), Ce = !1, xe = !1, ie = {
494
+ })), xe = !1, Ce = !1, ie = {
495
495
  titleText: "",
496
496
  flavour: "push",
497
497
  width: vt,
@@ -512,18 +512,18 @@ function Lo({
512
512
  sidePanelsAreMutuallyExclusive: r = !0,
513
513
  debugOpacity: s = !1,
514
514
  pageContainerProps: d,
515
- pageContentDataTestId: c,
516
- topBarDataTestId: l,
517
- navBarOpen: p,
515
+ pageContentDataTestId: l,
516
+ topBarDataTestId: c,
517
+ navBarOpen: u,
518
518
  navBarWidthOpen: g,
519
- navBarWidthClosed: m
519
+ navBarWidthClosed: C
520
520
  }) {
521
- const [w, h] = F(Ce), [S, b] = F(xe), [I, $] = F(Ce), [E, O] = F(xe), L = n !== void 0, P = i !== void 0, {
521
+ const [w, h] = F(xe), [b, S] = F(Ce), [$, D] = F(xe), [E, T] = F(Ce), L = n !== void 0, P = i !== void 0, {
522
522
  titleText: v,
523
- content: D,
523
+ content: k,
524
524
  flavour: M,
525
525
  open: f,
526
- onChangeOpen: C,
526
+ onChangeOpen: m,
527
527
  width: x,
528
528
  arrowButtons: A,
529
529
  startOpen: H,
@@ -533,9 +533,9 @@ function Lo({
533
533
  } = n ? a(a({}, ie), n) : a({}, ie), {
534
534
  titleText: Bt,
535
535
  content: Ft,
536
- flavour: De,
536
+ flavour: $e,
537
537
  open: de,
538
- onChangeOpen: $e,
538
+ onChangeOpen: De,
539
539
  width: ue,
540
540
  arrowButtons: te,
541
541
  startOpen: ne,
@@ -544,16 +544,16 @@ function Lo({
544
544
  dataTestId: _t
545
545
  } = i ? a(a({}, ie), i) : a({}, ie);
546
546
  K(() => {
547
- H !== Ce && (h(H), $(H));
547
+ H !== xe && (h(H), D(H));
548
548
  }, [H]), K(() => {
549
- ne !== xe && (b(ne), O(ne));
549
+ ne !== Ce && (S(ne), T(ne));
550
550
  }, [ne]);
551
- const pe = f === void 0 ? w : f, he = de === void 0 ? S : de, Te = (U) => {
552
- f === void 0 && (h(U), r && P && (U ? (b(!1), O(S)) : b(E))), C && C(U);
551
+ const pe = f === void 0 ? w : f, he = de === void 0 ? b : de, Te = (U) => {
552
+ f === void 0 && (h(U), r && P && (U ? (S(!1), T(b)) : S(E))), m && m(U);
553
553
  }, Ee = (U) => {
554
- de === void 0 && (b(U), r && L && (U ? (h(!1), $(w)) : h(I))), $e && $e(U);
554
+ de === void 0 && (S(U), r && L && (U ? (h(!1), D(w)) : h($))), De && De(U);
555
555
  };
556
- return /* @__PURE__ */ u(k, { children: [
556
+ return /* @__PURE__ */ p(I, { children: [
557
557
  L && /* @__PURE__ */ o(
558
558
  Ue,
559
559
  {
@@ -567,10 +567,10 @@ function Lo({
567
567
  showCloseArrow: A === "both" || A === "close",
568
568
  onOpened: ee,
569
569
  onClosed: ce,
570
- navBarOpen: p,
570
+ navBarOpen: u,
571
571
  navBarWidthOpen: g,
572
- navBarWidthClosed: m,
573
- children: D
572
+ navBarWidthClosed: C,
573
+ children: k
574
574
  }
575
575
  ),
576
576
  P && /* @__PURE__ */ o(
@@ -586,9 +586,9 @@ function Lo({
586
586
  showCloseArrow: te === "both" || te === "close",
587
587
  onOpened: Nt,
588
588
  onClosed: Pt,
589
- navBarOpen: p,
589
+ navBarOpen: u,
590
590
  navBarWidthOpen: g,
591
- navBarWidthClosed: m,
591
+ navBarWidthClosed: C,
592
592
  children: Ft
593
593
  }
594
594
  ),
@@ -596,7 +596,7 @@ function Lo({
596
596
  In,
597
597
  a(a({
598
598
  titleText: t,
599
- "data-testid": l
599
+ "data-testid": c
600
600
  }, L && M === "push" ? {
601
601
  leftPanel: {
602
602
  open: pe,
@@ -604,7 +604,7 @@ function Lo({
604
604
  onOpen: () => Te(!0),
605
605
  showOpenArrow: A === "both" || A === "open"
606
606
  }
607
- } : {}), P && De === "push" ? {
607
+ } : {}), P && $e === "push" ? {
608
608
  rightPanel: {
609
609
  open: he,
610
610
  width: ue,
@@ -614,19 +614,19 @@ function Lo({
614
614
  } : {})
615
615
  ),
616
616
  /* @__PURE__ */ o(
617
- $n,
617
+ Dn,
618
618
  y(a(a({}, M === "push" ? {
619
619
  leftPanel: {
620
620
  open: pe,
621
621
  width: x
622
622
  }
623
- } : {}), De === "push" ? {
623
+ } : {}), $e === "push" ? {
624
624
  rightPanel: {
625
625
  open: he,
626
626
  width: ue
627
627
  }
628
628
  } : {}), {
629
- children: /* @__PURE__ */ o(Tn, y(a({ "data-testid": c }, d), { children: e }))
629
+ children: /* @__PURE__ */ o(Tn, y(a({ "data-testid": l }, d), { children: e }))
630
630
  })
631
631
  )
632
632
  ] });
@@ -646,7 +646,7 @@ const re = "Navbar", Y = {
646
646
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
647
647
  // settings: `${PREFIX}-settings`,
648
648
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
649
- }, Pn = W(k, { name: "NavBar" })(({ theme: e }) => ({
649
+ }, Pn = W(I, { name: "NavBar" })(({ theme: e }) => ({
650
650
  [`&.${Y.root}`]: {
651
651
  display: "flex"
652
652
  },
@@ -719,8 +719,7 @@ function Mo(e, t) {
719
719
  console[e] = (...n) => {
720
720
  for (const i of t)
721
721
  if (typeof i == "function") {
722
- if (i(...n))
723
- return;
722
+ if (i(...n)) return;
724
723
  } else if (i instanceof RegExp && n.length > 0) {
725
724
  for (const r of n)
726
725
  if (typeof r == "string" && i.test(r))
@@ -747,8 +746,8 @@ function Mn(e) {
747
746
  const Ve = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], qe = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
748
747
  function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
749
748
  const r = le();
750
- return /* @__PURE__ */ u(
751
- k,
749
+ return /* @__PURE__ */ p(
750
+ I,
752
751
  {
753
752
  sx: {
754
753
  paddingTop: 3,
@@ -759,7 +758,7 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
759
758
  },
760
759
  children: [
761
760
  !i && /* @__PURE__ */ o(
762
- k,
761
+ I,
763
762
  {
764
763
  sx: {
765
764
  width: n ? "5rem" : "2rem",
@@ -781,14 +780,14 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
781
780
  }
782
781
  ),
783
782
  i && /* @__PURE__ */ o(
784
- k,
783
+ I,
785
784
  {
786
785
  sx: {
787
786
  width: n ? "5rem" : "2rem",
788
787
  transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
789
788
  aspectRatio: 1
790
789
  },
791
- children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ u(Re, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
790
+ children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ p(Re, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
792
791
  " ",
793
792
  qe(e == null ? void 0 : e.name),
794
793
  " ",
@@ -796,9 +795,9 @@ function Rn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
796
795
  ] }) }) : /* @__PURE__ */ o(Re, {})
797
796
  }
798
797
  ),
799
- /* @__PURE__ */ o(_n, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ u(k, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
800
- e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(_e, { animation: !1, width: "50%" }),
801
- t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(_e, { animation: !1, width: "25%" })
798
+ /* @__PURE__ */ o(_n, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ p(I, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
799
+ e != null && e.name ? /* @__PURE__ */ o(O, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(_e, { animation: !1, width: "50%" }),
800
+ t ? /* @__PURE__ */ o(O, { children: t.toUpperCase() }) : /* @__PURE__ */ o(_e, { animation: !1, width: "25%" })
802
801
  ] }) }) })
803
802
  ]
804
803
  }
@@ -812,12 +811,12 @@ function Hn({
812
811
  top: r,
813
812
  middle: s,
814
813
  bottom: d,
815
- user: c,
816
- domainCode: l,
817
- useNewAvatar: p = !1
814
+ user: l,
815
+ domainCode: c,
816
+ useNewAvatar: u = !1
818
817
  }) {
819
- const g = wt(), m = ut(j);
820
- return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
818
+ const g = wt(), C = ut(j);
819
+ return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ p(
821
820
  Ln,
822
821
  {
823
822
  open: e,
@@ -829,19 +828,19 @@ function Hn({
829
828
  component: "nav"
830
829
  },
831
830
  onClose: () => {
832
- m(!1);
831
+ C(!1);
833
832
  },
834
833
  isSmallScreen: g,
835
834
  children: [
836
835
  !g && /* @__PURE__ */ o(Gt, {}),
837
- r && /* @__PURE__ */ u(k, { flexGrow: "0", children: [
836
+ r && /* @__PURE__ */ p(I, { flexGrow: "0", children: [
838
837
  r,
839
838
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
840
839
  ] }),
841
- /* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Nn, { links: s }) : s }),
842
- /* @__PURE__ */ u(k, { flexGrow: "0", children: [
840
+ /* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Nn, { links: s }) : s }),
841
+ /* @__PURE__ */ p(I, { flexGrow: "0", children: [
843
842
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
844
- /* @__PURE__ */ o(Rn, { user: c, domainCode: l, open: e, useNewAvatar: p }),
843
+ /* @__PURE__ */ o(Rn, { user: l, domainCode: c, open: e, useNewAvatar: u }),
845
844
  d && /* @__PURE__ */ o(N, { children: d })
846
845
  ] })
847
846
  ]
@@ -855,14 +854,14 @@ function Wn({
855
854
  noPadding: i
856
855
  }) {
857
856
  return /* @__PURE__ */ o(
858
- k,
857
+ I,
859
858
  {
860
859
  sx: {
861
860
  overflow: "auto",
862
861
  height: `calc(100vh - ${t}px)`,
863
862
  flexGrow: 1
864
863
  },
865
- children: i ? /* @__PURE__ */ o(k, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
864
+ children: i ? /* @__PURE__ */ o(I, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
866
865
  tt,
867
866
  {
868
867
  component: "main",
@@ -884,8 +883,8 @@ function Gn({
884
883
  "data-testid": n,
885
884
  middle: i
886
885
  }) {
887
- const r = ut(j), s = () => r((l) => !l), d = le(), c = wt();
888
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ u(
886
+ const r = ut(j), s = () => r((c) => !c), d = le(), l = wt();
887
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
889
888
  et,
890
889
  {
891
890
  square: !0,
@@ -900,7 +899,7 @@ function Gn({
900
899
  gap: 2,
901
900
  flexShrink: 0,
902
901
  height: t,
903
- zIndex: c ? 0 : d.zIndex.drawer + 101
902
+ zIndex: l ? 0 : d.zIndex.drawer + 101
904
903
  },
905
904
  children: [
906
905
  /* @__PURE__ */ o(
@@ -913,7 +912,7 @@ function Gn({
913
912
  children: /* @__PURE__ */ o(tn, { fontSize: "medium" })
914
913
  }
915
914
  ),
916
- /* @__PURE__ */ o(T, { className: zn.titleText, variant: "h6", component: "h1", children: e }),
915
+ /* @__PURE__ */ o(O, { className: zn.titleText, variant: "h6", component: "h1", children: e }),
917
916
  i
918
917
  ]
919
918
  }
@@ -927,50 +926,50 @@ function Ho({
927
926
  pageContentDataTestId: r,
928
927
  topBarDataTestId: s,
929
928
  navBarDataTestId: d,
930
- navBarMiddle: c,
931
- navBarBottom: l,
932
- user: p,
929
+ navBarMiddle: l,
930
+ navBarBottom: c,
931
+ user: u,
933
932
  domainCode: g,
934
- useNewAvatar: m = !1
933
+ useNewAvatar: C = !1
935
934
  }) {
936
935
  ht([
937
936
  [j, n != null ? n : !0],
938
937
  [we, t != null ? t : ""]
939
938
  ]);
940
- const w = Me(j), [h] = V(At), [S] = V(bt), b = Me(we), [I] = V(St), [$] = V(Fn), [E] = V(yt);
941
- return /* @__PURE__ */ u(k, { children: [
939
+ const w = Me(j), [h] = V(At), [b] = V(bt), S = Me(we), [$] = V(St), [D] = V(Fn), [E] = V(yt);
940
+ return /* @__PURE__ */ p(I, { children: [
942
941
  /* @__PURE__ */ o(Vt, {}),
943
942
  /* @__PURE__ */ o(
944
943
  Gn,
945
944
  {
946
- titleText: b,
945
+ titleText: S,
947
946
  "data-testid": s,
948
- height: I,
949
- middle: $
947
+ height: $,
948
+ middle: D
950
949
  }
951
950
  ),
952
- /* @__PURE__ */ u(k, { sx: { display: "flex" }, children: [
951
+ /* @__PURE__ */ p(I, { sx: { display: "flex" }, children: [
953
952
  /* @__PURE__ */ o(
954
953
  Hn,
955
954
  {
956
955
  open: w,
957
956
  top: E,
958
- middle: c,
959
- bottom: l,
960
- user: p,
957
+ middle: l,
958
+ bottom: c,
959
+ user: u,
961
960
  domainCode: g,
962
961
  widthOpen: h,
963
- widthClosed: S,
964
- offsetTop: I,
962
+ widthClosed: b,
963
+ offsetTop: $,
965
964
  "data-testid": d,
966
- useNewAvatar: m
965
+ useNewAvatar: C
967
966
  }
968
967
  ),
969
968
  /* @__PURE__ */ o(
970
969
  Wn,
971
970
  y(a({
972
971
  "data-testid": r,
973
- topBarHeight: I
972
+ topBarHeight: $
974
973
  }, i), {
975
974
  children: e
976
975
  })
@@ -986,48 +985,48 @@ const kt = ({
986
985
  primaryButton: r,
987
986
  secondaryButton: s,
988
987
  onClose: d,
989
- sx: c,
990
- "data-testid": l,
991
- disableCloseOnBackdropOrEscape: p = !1,
988
+ sx: l,
989
+ "data-testid": c,
990
+ disableCloseOnBackdropOrEscape: u = !1,
992
991
  isLoading: g = !1
993
992
  }) => {
994
- var h, S;
995
- const [m, w] = F(!1);
996
- return /* @__PURE__ */ u(
993
+ var h, b;
994
+ const [C, w] = F(!1);
995
+ return /* @__PURE__ */ p(
997
996
  nt,
998
997
  {
999
998
  open: e,
1000
- onClose: (b, I) => _(void 0, null, function* () {
1001
- p && (I === "backdropClick" || I === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
999
+ onClose: (S, $) => _(void 0, null, function* () {
1000
+ u && ($ === "backdropClick" || $ === "escapeKeyDown") || C || (s != null && s.onClick ? yield s.onClick() : d());
1002
1001
  }),
1003
1002
  fullWidth: !0,
1004
1003
  maxWidth: i != null ? i : "xs",
1005
- "data-testid": l,
1006
- sx: c,
1004
+ "data-testid": c,
1005
+ sx: l,
1007
1006
  children: [
1008
1007
  g && /* @__PURE__ */ o(ot, { sx: { height: "4px", marginBottom: "-4px" } }),
1009
1008
  /* @__PURE__ */ o(it, { children: t }),
1010
1009
  /* @__PURE__ */ o(rt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
1011
- /* @__PURE__ */ u(at, { children: [
1010
+ /* @__PURE__ */ p(at, { children: [
1012
1011
  /* @__PURE__ */ o(
1013
1012
  J,
1014
1013
  {
1015
1014
  onClick: (h = s == null ? void 0 : s.onClick) != null ? h : d,
1016
1015
  "data-testid": s == null ? void 0 : s.testId,
1017
- disabled: (s == null ? void 0 : s.disabled) || m,
1016
+ disabled: (s == null ? void 0 : s.disabled) || C,
1018
1017
  color: s == null ? void 0 : s.buttonColor,
1019
- children: (S = s == null ? void 0 : s.text) != null ? S : "Cancel"
1018
+ children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
1020
1019
  }
1021
1020
  ),
1022
1021
  r && /* @__PURE__ */ o(
1023
1022
  J,
1024
1023
  {
1025
1024
  onClick: () => _(void 0, null, function* () {
1026
- var b;
1027
- w(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), w(!1);
1025
+ var S;
1026
+ w(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), w(!1);
1028
1027
  }),
1029
1028
  "data-testid": r.testId,
1030
- disabled: r.disabled || m,
1029
+ disabled: r.disabled || C,
1031
1030
  color: r == null ? void 0 : r.buttonColor,
1032
1031
  children: r.text
1033
1032
  }
@@ -1036,7 +1035,7 @@ const kt = ({
1036
1035
  ]
1037
1036
  }
1038
1037
  );
1039
- }, Dt = ({
1038
+ }, $t = ({
1040
1039
  minLength: e,
1041
1040
  preLoadedOptions: t,
1042
1041
  lookup: n,
@@ -1057,49 +1056,49 @@ function Wo({
1057
1056
  label: r,
1058
1057
  value: s,
1059
1058
  "data-testid": d,
1060
- sx: c,
1061
- boxSx: l,
1062
- textFieldColor: p,
1059
+ sx: l,
1060
+ boxSx: c,
1061
+ textFieldColor: u,
1063
1062
  textFieldVariant: g = "filled",
1064
- loadingText: m = "Loading...",
1063
+ loadingText: C = "Loading...",
1065
1064
  noOptionsText: w = "No options",
1066
1065
  popupIcon: h = /* @__PURE__ */ o(on, {}),
1067
- error: S = !1,
1068
- helperText: b = "",
1069
- preLoadedOptions: I = void 0,
1070
- disablePortal: $ = !1,
1066
+ error: b = !1,
1067
+ helperText: S = "",
1068
+ preLoadedOptions: $ = void 0,
1069
+ disablePortal: D = !1,
1071
1070
  disableIconFlip: E = !1
1072
1071
  }) {
1073
- const [O, L] = F(""), P = (f, C) => {
1074
- const x = s.filter((A) => A.id !== C);
1072
+ const [T, L] = F(""), P = (f, m) => {
1073
+ const x = s.filter((A) => A.id !== m);
1075
1074
  n(x, "delete", f);
1076
- }, { data: v, isLoading: D } = Dt({
1077
- inputValue: O,
1075
+ }, { data: v, isLoading: k } = $t({
1076
+ inputValue: T,
1078
1077
  label: r,
1079
1078
  lookup: e,
1080
1079
  minLength: i,
1081
- preLoadedOptions: I
1082
- }), M = O.length >= i;
1083
- return /* @__PURE__ */ u("div", { "data-testid": d, children: [
1080
+ preLoadedOptions: $
1081
+ }), M = T.length >= i;
1082
+ return /* @__PURE__ */ p("div", { "data-testid": d, children: [
1084
1083
  /* @__PURE__ */ o(
1085
1084
  Se,
1086
1085
  {
1087
- sx: a(a({}, c), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1086
+ sx: a(a({}, l), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1088
1087
  "data-testid": d ? `${d}:Autocomplete` : void 0,
1089
- disablePortal: $,
1088
+ disablePortal: D,
1090
1089
  multiple: !0,
1091
1090
  getOptionLabel: (f) => typeof f == "string" ? f : f.label,
1092
- loading: M ? D : !1,
1091
+ loading: M ? k : !1,
1093
1092
  options: [...s, ...v != null ? v : []],
1094
1093
  filterSelectedOptions: !0,
1095
1094
  includeInputInList: !0,
1096
1095
  value: s,
1097
- onChange: (f, C, x) => {
1098
- n(C, x, f);
1096
+ onChange: (f, m, x) => {
1097
+ n(m, x, f);
1099
1098
  },
1100
- onInputChange: (f, C) => L(C),
1099
+ onInputChange: (f, m) => L(m),
1101
1100
  noOptionsText: M ? w : "Start typing to search",
1102
- loadingText: m,
1101
+ loadingText: C,
1103
1102
  popupIcon: h,
1104
1103
  renderInput: (f) => /* @__PURE__ */ o(
1105
1104
  ye,
@@ -1107,34 +1106,34 @@ function Wo({
1107
1106
  label: r,
1108
1107
  fullWidth: !0,
1109
1108
  variant: g,
1110
- error: S,
1111
- helperText: b,
1109
+ error: b,
1110
+ helperText: S,
1112
1111
  InputProps: y(a({}, f.InputProps), {
1113
- endAdornment: /* @__PURE__ */ u(N, { children: [
1114
- D ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
1112
+ endAdornment: /* @__PURE__ */ p(N, { children: [
1113
+ k ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
1115
1114
  f.InputProps.endAdornment
1116
1115
  ] })
1117
1116
  }),
1118
1117
  "data-testid": d ? `${d}:Autocomplete:TextField` : void 0,
1119
- onKeyDown: (C) => {
1120
- (C.key === "Backspace" || C.key === "Delete") && C.stopPropagation();
1118
+ onKeyDown: (m) => {
1119
+ (m.key === "Backspace" || m.key === "Delete") && m.stopPropagation();
1121
1120
  },
1122
- color: p
1121
+ color: u
1123
1122
  })
1124
1123
  ),
1125
1124
  renderTags: () => null,
1126
- isOptionEqualToValue: (f, C) => f.id === C.id,
1127
- renderOption: (f, C, x) => {
1125
+ isOptionEqualToValue: (f, m) => f.id === m.id,
1126
+ renderOption: (f, m, x) => {
1128
1127
  if (t) {
1129
- const A = an(C.label, x.inputValue, {
1128
+ const A = an(m.label, x.inputValue, {
1130
1129
  insideWords: !0,
1131
1130
  findAllOccurrences: !0
1132
- }), H = sn(C.label, A);
1131
+ }), H = sn(m.label, A);
1133
1132
  return /* @__PURE__ */ ve(
1134
1133
  "li",
1135
1134
  y(a({}, f), {
1136
- key: C.id,
1137
- "data-testid": d ? `${d}:Autocomplete:option(${C.id.toString()})` : void 0
1135
+ key: m.id,
1136
+ "data-testid": d ? `${d}:Autocomplete:option(${m.id.toString()})` : void 0
1138
1137
  }),
1139
1138
  /* @__PURE__ */ o("div", { children: H.map((ee, ce) => /* @__PURE__ */ o(
1140
1139
  "span",
@@ -1151,15 +1150,15 @@ function Wo({
1151
1150
  return /* @__PURE__ */ ve(
1152
1151
  "li",
1153
1152
  y(a({}, f), {
1154
- key: C.id,
1155
- "data-testid": d ? `${d}:option(${C.id.toString()})` : void 0
1153
+ key: m.id,
1154
+ "data-testid": d ? `${d}:option(${m.id.toString()})` : void 0
1156
1155
  }),
1157
- C.label
1156
+ m.label
1158
1157
  );
1159
1158
  }
1160
1159
  }
1161
1160
  ),
1162
- s.length > 0 && /* @__PURE__ */ o(k, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
1161
+ s.length > 0 && /* @__PURE__ */ o(I, { sx: c, children: s.map((f) => /* @__PURE__ */ o(
1163
1162
  qt,
1164
1163
  {
1165
1164
  sx: {
@@ -1182,11 +1181,11 @@ function Wo({
1182
1181
  }
1183
1182
  ]
1184
1183
  },
1185
- children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: f.chipLabel ? f.chipLabel : f.label })
1184
+ children: /* @__PURE__ */ o(O, { style: { whiteSpace: "normal" }, children: f.chipLabel ? f.chipLabel : f.label })
1186
1185
  }
1187
1186
  ),
1188
1187
  "data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
1189
- onDelete: (C) => P(C, f.id),
1188
+ onDelete: (m) => P(m, f.id),
1190
1189
  deleteIcon: /* @__PURE__ */ o(
1191
1190
  nn,
1192
1191
  {
@@ -1207,65 +1206,65 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
1207
1206
  sx: r,
1208
1207
  textFieldColor: s,
1209
1208
  textFieldVariant: d = "filled",
1210
- error: c = !1,
1211
- "data-testid": l,
1212
- noOptionsText: p = "No options",
1209
+ error: l = !1,
1210
+ "data-testid": c,
1211
+ noOptionsText: u = "No options",
1213
1212
  minLength: g = 3,
1214
- disablePortal: m = !1,
1213
+ disablePortal: C = !1,
1215
1214
  preLoadedOptions: w,
1216
1215
  helperText: h = "",
1217
- disabled: S,
1218
- popupIcon: b,
1219
- disableIconFlip: I
1216
+ disabled: b,
1217
+ popupIcon: S,
1218
+ disableIconFlip: $
1220
1219
  }) => {
1221
- const [$, E] = F(""), { data: O, isLoading: L } = Dt({
1222
- inputValue: $,
1220
+ const [D, E] = F(""), { data: T, isLoading: L } = $t({
1221
+ inputValue: D,
1223
1222
  label: n,
1224
1223
  lookup: e,
1225
1224
  minLength: g != null ? g : 0,
1226
1225
  preLoadedOptions: w
1227
- }), P = $.length >= g;
1228
- return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(Qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1226
+ }), P = D.length >= g;
1227
+ return /* @__PURE__ */ o("div", { "data-testid": c, children: /* @__PURE__ */ o(Qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1229
1228
  Se,
1230
1229
  {
1231
- sx: a(a({}, r), I ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1232
- "data-testid": l ? `${l}:Autocomplete` : void 0,
1230
+ sx: a(a({}, r), $ ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1231
+ "data-testid": c ? `${c}:Autocomplete` : void 0,
1233
1232
  loading: P ? L : !1,
1234
- options: O != null ? O : [],
1235
- onChange: (v, D, M) => {
1236
- t(v, D, M);
1233
+ options: T != null ? T : [],
1234
+ onChange: (v, k, M) => {
1235
+ t(v, k, M);
1237
1236
  },
1238
- disablePortal: m,
1237
+ disablePortal: C,
1239
1238
  filterOptions: (v) => v,
1240
1239
  value: i,
1241
- noOptionsText: P ? p : "Start typing to search",
1240
+ noOptionsText: P ? u : "Start typing to search",
1242
1241
  getOptionLabel: (v) => v.label,
1243
- popupIcon: b,
1242
+ popupIcon: S,
1244
1243
  renderInput: (v) => /* @__PURE__ */ o(
1245
1244
  ye,
1246
1245
  y(a({
1247
- "data-testid": l ? `${l}:Autocomplete:TextField` : void 0
1246
+ "data-testid": c ? `${c}:Autocomplete:TextField` : void 0
1248
1247
  }, v), {
1249
1248
  variant: d,
1250
1249
  label: n,
1251
1250
  color: s,
1252
- error: c,
1251
+ error: l,
1253
1252
  helperText: h
1254
1253
  })
1255
1254
  ),
1256
- isOptionEqualToValue: (v, D) => v.id === D.id,
1257
- onInputChange: (v, D) => {
1258
- E(D);
1255
+ isOptionEqualToValue: (v, k) => v.id === k.id,
1256
+ onInputChange: (v, k) => {
1257
+ E(k);
1259
1258
  },
1260
- renderOption: (v, D) => /* @__PURE__ */ ve(
1259
+ renderOption: (v, k) => /* @__PURE__ */ ve(
1261
1260
  "li",
1262
1261
  y(a({}, v), {
1263
- key: D.id,
1264
- "data-testid": l ? `${l}:Autocomplete:option(${D.id.toString()})` : void 0
1262
+ key: k.id,
1263
+ "data-testid": c ? `${c}:Autocomplete:option(${k.id.toString()})` : void 0
1265
1264
  }),
1266
- D.label
1265
+ k.label
1267
1266
  ),
1268
- disabled: S
1267
+ disabled: b
1269
1268
  }
1270
1269
  ) }) });
1271
1270
  }, Vn = (e) => {
@@ -1286,32 +1285,32 @@ const Uo = /MUI: The value provided to.*is invalid/i, zo = ({
1286
1285
  closeHandler: t,
1287
1286
  setAuth0ExpiryTime: n
1288
1287
  }) => {
1289
- const { logout: i, getAccessTokenSilently: r } = gt(), [s, d] = F(0), c = () => _(void 0, null, function* () {
1288
+ const { logout: i, getAccessTokenSilently: r } = gt(), [s, d] = F(0), l = () => _(void 0, null, function* () {
1290
1289
  i({ logoutParams: { returnTo: `${window.location.origin}` } });
1291
- }), l = () => _(void 0, null, function* () {
1290
+ }), c = () => _(void 0, null, function* () {
1292
1291
  d(s + 1), t();
1293
1292
  });
1294
1293
  return K(() => {
1295
- (() => _(void 0, null, function* () {
1294
+ _(void 0, null, function* () {
1296
1295
  if (s > 0) {
1297
1296
  const w = yield r({ cacheMode: "off" }), h = Vn(w) * 1e3;
1298
1297
  n(h);
1299
1298
  }
1300
- }))();
1299
+ });
1301
1300
  }, [s, r, n]), /* @__PURE__ */ o(
1302
1301
  kt,
1303
1302
  {
1304
1303
  isOpen: e,
1305
1304
  primaryButton: {
1306
1305
  text: "Continue",
1307
- onClick: l,
1306
+ onClick: c,
1308
1307
  disabled: !1,
1309
1308
  testId: "PreferencesDialog",
1310
1309
  buttonColor: "secondary"
1311
1310
  },
1312
1311
  secondaryButton: {
1313
1312
  text: "Log out",
1314
- onClick: c,
1313
+ onClick: l,
1315
1314
  disabled: !1,
1316
1315
  testId: "PreferencesDialog",
1317
1316
  buttonColor: "secondary"
@@ -1349,11 +1348,11 @@ function Vo({
1349
1348
  onError: r = () => {
1350
1349
  }
1351
1350
  }) {
1352
- var m, w;
1353
- const { isAuthenticated: s, isLoading: d, error: c, loginWithRedirect: l, logout: p } = gt();
1351
+ var C, w;
1352
+ const { isAuthenticated: s, isLoading: d, error: l, loginWithRedirect: c, logout: u } = gt();
1354
1353
  K(() => {
1355
- c && r(c);
1356
- }, [c, r]);
1354
+ l && r(l);
1355
+ }, [l, r]);
1357
1356
  const g = Ht(
1358
1357
  () => ({
1359
1358
  appState: {
@@ -1363,48 +1362,46 @@ function Vo({
1363
1362
  []
1364
1363
  );
1365
1364
  if (K(() => {
1366
- d || s || c || l(g);
1367
- }, [d, s, c, l, r, g]), c) {
1365
+ d || s || l || c(g);
1366
+ }, [d, s, l, c, r, g]), l) {
1368
1367
  if (i || console.error(
1369
1368
  `Error detected in AuthGuard [isAuthenticated=${s},isLoading=${d}]`,
1370
- c
1369
+ l
1371
1370
  ), n === "all")
1372
- throw c;
1373
- if (qn(c)) {
1374
- let h = "Auth error", S = "An unknown Auth0 error occurred.";
1375
- if (Xn(c))
1376
- h = "Unauthorised", S = `You are not authorised to access ${t}.`;
1377
- else if (Qn(c))
1378
- h = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
1379
- else if (Yn(c))
1380
- h = "Auth0 script execution time exceeded", S = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
1381
- else if (c.message === "Invalid state") {
1382
- const b = localStorage.getItem("auth0_redirect_count");
1383
- b ? b && parseInt(b) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(b) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
1384
- } else if (n === "unknown")
1385
- throw c;
1386
- return /* @__PURE__ */ u(nt, { open: !0, children: [
1371
+ throw l;
1372
+ if (qn(l)) {
1373
+ let h = "Auth error", b = "An unknown Auth0 error occurred.";
1374
+ if (Xn(l))
1375
+ h = "Unauthorised", b = `You are not authorised to access ${t}.`;
1376
+ else if (Qn(l))
1377
+ h = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
1378
+ else if (Yn(l))
1379
+ h = "Auth0 script execution time exceeded", b = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
1380
+ else if (l.message === "Invalid state") {
1381
+ const S = localStorage.getItem("auth0_redirect_count");
1382
+ S ? S && parseInt(S) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(S) + 1)), c(g)) : (localStorage.setItem("auth0_redirect_count", "1"), c(g));
1383
+ } else if (n === "unknown") throw l;
1384
+ return /* @__PURE__ */ p(nt, { open: !0, children: [
1387
1385
  /* @__PURE__ */ o(it, { children: h }),
1388
- /* @__PURE__ */ u(rt, { children: [
1389
- /* @__PURE__ */ o(T, { children: S }),
1386
+ /* @__PURE__ */ p(rt, { children: [
1387
+ /* @__PURE__ */ o(O, { children: b }),
1390
1388
  /* @__PURE__ */ o("br", {}),
1391
- /* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
1392
- /* @__PURE__ */ u(T, { variant: "body2", children: [
1389
+ /* @__PURE__ */ o(O, { variant: "subtitle2", children: "Details from Auth0" }),
1390
+ /* @__PURE__ */ p(O, { variant: "body2", children: [
1393
1391
  "error: ",
1394
- (m = c == null ? void 0 : c.error) != null ? m : "N/A"
1392
+ (C = l == null ? void 0 : l.error) != null ? C : "N/A"
1395
1393
  ] }),
1396
- /* @__PURE__ */ u(T, { variant: "body2", children: [
1394
+ /* @__PURE__ */ p(O, { variant: "body2", children: [
1397
1395
  "description: ",
1398
- (w = c == null ? void 0 : c.error_description) != null ? w : "N/A"
1396
+ (w = l == null ? void 0 : l.error_description) != null ? w : "N/A"
1399
1397
  ] })
1400
1398
  ] }),
1401
- /* @__PURE__ */ u(at, { children: [
1399
+ /* @__PURE__ */ p(at, { children: [
1402
1400
  h === "Auth0 script execution time exceeded" && /* @__PURE__ */ o(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
1403
- /* @__PURE__ */ o(J, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
1401
+ /* @__PURE__ */ o(J, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
1404
1402
  ] })
1405
1403
  ] });
1406
- } else if (n === "unknown")
1407
- throw c;
1404
+ } else if (n === "unknown") throw l;
1408
1405
  }
1409
1406
  return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(pn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1410
1407
  }
@@ -1422,13 +1419,13 @@ const Kn = {
1422
1419
  variant: "standard",
1423
1420
  progressIndicator: void 0
1424
1421
  // Can use 'circular' or 'linear'
1425
- }, Qe = 100, Ye = 2e3, Zn = 2e3, jn = (() => {
1422
+ }, Qe = 100, Ye = 2e3, Zn = 2e3, jn = /* @__PURE__ */ (() => {
1426
1423
  let e = 0;
1427
1424
  return () => (e += 1, e);
1428
1425
  })(), eo = {
1429
1426
  borderBottomLeftRadius: "0px",
1430
1427
  borderBottomRightRadius: "0px"
1431
- }, to = {}, no = {}, $t = Ze(null);
1428
+ }, to = {}, no = {}, Dt = Ze(null);
1432
1429
  function oo(s) {
1433
1430
  var d = s, {
1434
1431
  overrideState: e = to,
@@ -1441,55 +1438,55 @@ function oo(s) {
1441
1438
  "shouldClose",
1442
1439
  "children"
1443
1440
  ]);
1444
- var C;
1445
- const [{ open: c }, l] = F({ open: !1 }), p = fe([]), g = fe(Date.now()), m = fe(0), w = se((x) => {
1446
- l({ open: x });
1441
+ var m;
1442
+ const [{ open: l }, c] = F({ open: !1 }), u = fe([]), g = fe(Date.now()), C = fe(0), w = se((x) => {
1443
+ c({ open: x });
1447
1444
  }, []), h = se((x = {}) => {
1448
- m.current += 1, p.current.length >= Qe && Date.now() - g.current >= Ye && (g.current = Date.now(), console.error(
1449
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Qe}) hit ${m.current} times in last ${Ye}ms)`
1450
- ), m.current = 0);
1445
+ C.current += 1, u.current.length >= Qe && Date.now() - g.current >= Ye && (g.current = Date.now(), console.error(
1446
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Qe}) hit ${C.current} times in last ${Ye}ms)`
1447
+ ), C.current = 0);
1451
1448
  const A = a(y(a({}, Xe), {
1452
1449
  key: jn()
1453
1450
  }), x);
1454
- return p.current.push(A), p.current.length === 1 && l({ open: !0 }), A.key;
1455
- }, []), S = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), b = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), I = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
1456
- const A = p.current.findIndex((H) => H.key === x);
1451
+ return u.current.push(A), u.current.length === 1 && c({ open: !0 }), A.key;
1452
+ }, []), b = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), S = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), D = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
1453
+ const A = u.current.findIndex((H) => H.key === x);
1457
1454
  if (A !== -1)
1458
- return A === 0 ? (l({ open: !1 }), p.current[0]) : p.current.splice(A, 1);
1459
- }, O = (x, A) => {
1460
- n(x, A) && l({ open: !1 });
1455
+ return A === 0 ? (c({ open: !1 }), u.current[0]) : u.current.splice(A, 1);
1456
+ }, T = (x, A) => {
1457
+ n(x, A) && c({ open: !1 });
1461
1458
  }, L = () => {
1462
1459
  }, P = () => {
1463
- p.current.shift(), p.current.length > 0 && l({ open: !0 });
1464
- }, v = (C = p.current[0]) != null ? C : a({}, Xe), D = {};
1465
- "autoHideDuration" in v && (D.autoHideDuration = v.autoHideDuration);
1460
+ u.current.shift(), u.current.length > 0 && c({ open: !0 });
1461
+ }, v = (m = u.current[0]) != null ? m : a({}, Xe), k = {};
1462
+ "autoHideDuration" in v && (k.autoHideDuration = v.autoHideDuration);
1466
1463
  const M = a(a({}, Kn), r), f = a(a({
1467
- open: c,
1464
+ open: l,
1468
1465
  setOpen: w,
1469
1466
  enqueueNotification: h,
1470
- enqueueSuccessNotification: S,
1471
- enqueueInfoNotification: b,
1472
- enqueueWarningNotification: I,
1473
- enqueueErrorNotification: $,
1467
+ enqueueSuccessNotification: b,
1468
+ enqueueInfoNotification: S,
1469
+ enqueueWarningNotification: $,
1470
+ enqueueErrorNotification: D,
1474
1471
  removeNotification: E
1475
1472
  }, e), t);
1476
- return /* @__PURE__ */ u($t.Provider, { value: f, children: [
1473
+ return /* @__PURE__ */ p(Dt.Provider, { value: f, children: [
1477
1474
  i,
1478
1475
  /* @__PURE__ */ o(
1479
1476
  Yt,
1480
- y(a(a({}, M), D), {
1481
- open: c,
1482
- onClose: O,
1477
+ y(a(a({}, M), k), {
1478
+ open: l,
1479
+ onClose: T,
1483
1480
  TransitionProps: {
1484
1481
  onExited: P,
1485
1482
  onExit: L
1486
1483
  },
1487
1484
  sx: { zIndex: Zn },
1488
- children: /* @__PURE__ */ u("div", { children: [
1485
+ children: /* @__PURE__ */ p("div", { children: [
1489
1486
  /* @__PURE__ */ o(
1490
1487
  Kt,
1491
1488
  {
1492
- onClose: (x) => O(x, "closeAlert"),
1489
+ onClose: (x) => T(x, "closeAlert"),
1493
1490
  severity: v.severity,
1494
1491
  variant: "filled",
1495
1492
  icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(Ie, { size: "1em" }) : void 0,
@@ -1504,7 +1501,7 @@ function oo(s) {
1504
1501
  ] });
1505
1502
  }
1506
1503
  function io() {
1507
- const e = je($t);
1504
+ const e = je(Dt);
1508
1505
  if (e === null)
1509
1506
  throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1510
1507
  return e;
@@ -1542,17 +1539,18 @@ const Ke = R(
1542
1539
  isLoading: e,
1543
1540
  isOpen: t,
1544
1541
  onClose: n,
1545
- domainOptions: i,
1546
- applicationName: r,
1547
- handleLogout: s
1542
+ onDomainChange: i,
1543
+ domainOptions: r,
1544
+ applicationName: s,
1545
+ handleLogout: d
1548
1546
  }) => {
1549
- const [d, c] = V(Et), [l, p] = F(d), { enqueueSuccessNotification: g } = io(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, S = () => _(void 0, null, function* () {
1550
- l ? (c(l), g(`Set organisation to ${l}`), n()) : c("");
1551
- }), b = () => _(void 0, null, function* () {
1552
- d && !m && !w ? (p(d), n()) : h && s();
1547
+ const [l, c] = V(Et), [u, g] = F(l), { enqueueSuccessNotification: C } = io(), w = r.length === 0, h = !!l && !r.includes(l) && !r.includes(u), b = !l || w || h, S = () => _(void 0, null, function* () {
1548
+ u ? (c(u), i == null || i(u), C(`Set organisation to ${u}`), n()) : (c(""), i == null || i(""));
1549
+ }), $ = () => _(void 0, null, function* () {
1550
+ l && !w && !h ? (g(l), n()) : b && d();
1553
1551
  });
1554
- let I;
1555
- return m ? I = "Unable to retrieve your active organisations. Try logging in again." : w && (I = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
1552
+ let D;
1553
+ return w ? D = "Unable to retrieve your active organisations. Try logging in again." : h && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1556
1554
  kt,
1557
1555
  {
1558
1556
  isOpen: t,
@@ -1560,19 +1558,19 @@ const Ke = R(
1560
1558
  primaryButton: {
1561
1559
  text: "Confirm",
1562
1560
  onClick: S,
1563
- disabled: !l || m || w,
1561
+ disabled: !u || w || h,
1564
1562
  buttonColor: "primary"
1565
1563
  },
1566
1564
  secondaryButton: {
1567
- text: h ? "Logout" : "Cancel",
1568
- onClick: b
1565
+ text: b ? "Logout" : "Cancel",
1566
+ onClick: $
1569
1567
  },
1570
- onClose: h ? () => {
1568
+ onClose: b ? () => {
1571
1569
  } : n,
1572
1570
  children: [
1573
- /* @__PURE__ */ u(T, { marginBottom: 2, children: [
1571
+ /* @__PURE__ */ p(O, { marginBottom: 2, children: [
1574
1572
  "Select the default organisation that you want to use with the ",
1575
- r,
1573
+ s,
1576
1574
  "."
1577
1575
  ] }),
1578
1576
  /* @__PURE__ */ o(
@@ -1581,26 +1579,26 @@ const Ke = R(
1581
1579
  loading: e,
1582
1580
  multiple: !1,
1583
1581
  disableClearable: !1,
1584
- value: l !== "" ? l : null,
1585
- onChange: ($, E) => p(E != null ? E : ""),
1582
+ value: u !== "" ? u : null,
1583
+ onChange: (E, T) => g(T != null ? T : ""),
1586
1584
  getOptionLabel: so,
1587
- options: [...i],
1588
- renderInput: ($) => /* @__PURE__ */ o(
1585
+ options: [...r],
1586
+ renderInput: (E) => /* @__PURE__ */ o(
1589
1587
  ye,
1590
- y(a({}, $), {
1588
+ y(a({}, E), {
1591
1589
  variant: "filled",
1592
1590
  label: "Select organisation",
1593
- InputProps: y(a({}, $.InputProps), {
1594
- endAdornment: /* @__PURE__ */ u(N, { children: [
1591
+ InputProps: y(a({}, E.InputProps), {
1592
+ endAdornment: /* @__PURE__ */ p(N, { children: [
1595
1593
  e ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1596
- $.InputProps.endAdornment
1594
+ E.InputProps.endAdornment
1597
1595
  ] })
1598
1596
  })
1599
1597
  })
1600
1598
  )
1601
1599
  }
1602
1600
  ),
1603
- I && /* @__PURE__ */ o(Jt, { error: !0, children: I })
1601
+ D && /* @__PURE__ */ o(Jt, { error: !0, children: D })
1604
1602
  ]
1605
1603
  }
1606
1604
  );
@@ -1782,7 +1780,7 @@ export {
1782
1780
  Ho as AppLayout,
1783
1781
  Xo as AtomProvider,
1784
1782
  Vo as AuthGuard,
1785
- $t as Context,
1783
+ Dt as Context,
1786
1784
  ke as ContextError,
1787
1785
  Qo as DomainCodeDialog,
1788
1786
  Oo as ExampleComponent,
@@ -1816,7 +1814,7 @@ export {
1816
1814
  St as topBarHeightAtom,
1817
1815
  Fn as topBarMiddleAtom,
1818
1816
  Ro as unsuppressConsole,
1819
- Dt as useAutocompleteOptions,
1817
+ $t as useAutocompleteOptions,
1820
1818
  wn as useNavBar,
1821
1819
  io as useSaladBar,
1822
1820
  Yo as withAtomProvider,