@australiangreens/ag-internal-components 0.1.25 → 0.1.26

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
@@ -36,18 +36,18 @@ var N = (e, t, o) => new Promise((i, r) => {
36
36
  }, s = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, c);
37
37
  s((o = o.apply(e, t)).next());
38
38
  });
39
- import { jsxs as m, Fragment as B, jsx as n } from "react/jsx-runtime";
39
+ import { jsxs as m, Fragment as L, jsx as n } from "react/jsx-runtime";
40
40
  import { useState as T, createContext as _e, useCallback as K, useContext as Me, createElement as oe, useEffect as ne, useMemo as at, useRef as ee } from "react";
41
- import { Typography as _, Button as W, Paper as Te, Box as F, Drawer as Le, useTheme as J, useMediaQuery as st, Collapse as lt, Avatar as me, Fade as ct, Skeleton as ge, Toolbar as dt, Divider as xe, Container as ut, IconButton as pt, CssBaseline as ht, Dialog as Be, LinearProgress as Pe, DialogTitle as Re, DialogContent as Oe, DialogActions as He, Autocomplete as ie, TextField as re, CircularProgress as ae, Chip as ft, Tooltip as mt, Stack as gt, Snackbar as xt, Alert as Ct, FormHelperText as vt } from "@mui/material";
41
+ import { Typography as _, Button as W, Paper as Te, Box as F, Drawer as Be, useTheme as J, useMediaQuery as st, Collapse as lt, Avatar as me, Fade as ct, Skeleton as ge, Toolbar as dt, Divider as xe, Container as ut, IconButton as pt, CssBaseline as ht, Dialog as Le, LinearProgress as Pe, DialogTitle as Re, DialogContent as Oe, DialogActions as He, Autocomplete as ie, TextField as re, CircularProgress as ae, Chip as ft, Tooltip as mt, Stack as gt, Snackbar as xt, Alert as vt, FormHelperText as Ct } from "@mui/material";
42
42
  import At from "@mui/material/CssBaseline";
43
43
  import { styled as z, createTheme as Ue, alpha as te } from "@mui/material/styles";
44
44
  import { createHelper as se } from "souvlaki";
45
45
  import { BrowserRouter as wt } from "react-router-dom";
46
46
  import We from "@mui/material/List";
47
47
  import { ViewHeadline as St, Cancel as bt, ArrowDropDown as kt } from "@mui/icons-material";
48
- import { atom as M, useSetAtom as ze, useAtomValue as Ce, useAtom as O } from "jotai";
48
+ import { atom as M, useSetAtom as ze, useAtomValue as ve, useAtom as O } from "jotai";
49
49
  import { useHydrateAtoms as yt } from "jotai/utils";
50
- import ve from "react-avatar";
50
+ import Ce from "react-avatar";
51
51
  import { useAuth0 as le } from "@auth0/auth0-react";
52
52
  import { useQuery as Ve } from "@tanstack/react-query";
53
53
  import Dt from "autosuggest-highlight/match";
@@ -56,7 +56,7 @@ import { Buffer as $t } from "buffer";
56
56
  import Ft from "@mui/material/Skeleton";
57
57
  function Uo({ text: e }) {
58
58
  const [t, o] = T(0);
59
- return /* @__PURE__ */ m(B, { children: [
59
+ return /* @__PURE__ */ m(L, { children: [
60
60
  /* @__PURE__ */ n(_, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
61
  /* @__PURE__ */ n(_, { variant: "caption", display: "block", children: /* @__PURE__ */ n("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
62
62
  /* @__PURE__ */ n(
@@ -78,14 +78,14 @@ function Uo({ text: e }) {
78
78
  ] })
79
79
  ] });
80
80
  }
81
- const qe = 330, Ge = 73, L = "Navbar", H = {
82
- root: `${L}-root`,
83
- menuButton: `${L}-menuButton`,
84
- hide: `${L}-hide`,
85
- content: `${L}-content`,
86
- userInfoHolder: `${L}-userInfoHolder`,
87
- settings: `${L}-settings`,
88
- pieChartIcon: `${L}-pieChartIcon`
81
+ const qe = 330, Ge = 73, B = "Navbar", H = {
82
+ root: `${B}-root`,
83
+ menuButton: `${B}-menuButton`,
84
+ hide: `${B}-hide`,
85
+ content: `${B}-content`,
86
+ userInfoHolder: `${B}-userInfoHolder`,
87
+ settings: `${B}-settings`,
88
+ pieChartIcon: `${B}-pieChartIcon`
89
89
  }, Et = z(F, {
90
90
  name: "NavBar"
91
91
  })(({ theme: e }) => ({
@@ -119,7 +119,7 @@ const qe = 330, Ge = 73, L = "Navbar", H = {
119
119
  width: qe
120
120
  }, Xe()), _t = () => d({
121
121
  width: Ge
122
- }, Xe()), Mt = z(Le, {
122
+ }, Xe()), Mt = z(Be, {
123
123
  shouldForwardProp: (e) => e !== "open"
124
124
  })(({ theme: e, open: t }) => d(d({
125
125
  width: t ? qe : Ge,
@@ -135,9 +135,9 @@ const qe = 330, Ge = 73, L = "Navbar", H = {
135
135
  class ce extends Error {
136
136
  }
137
137
  fe(ce, "errorName", "ContextError");
138
- const Ye = _e(null), Tt = {}, Lt = {}, Bt = ({
138
+ const Ye = _e(null), Tt = {}, Bt = {}, Lt = ({
139
139
  overrideState: e = Tt,
140
- overrideActions: t = Lt,
140
+ overrideActions: t = Bt,
141
141
  children: o
142
142
  }) => {
143
143
  const [{ open: i }, r] = T({ open: !0 }), a = K((l) => {
@@ -158,7 +158,7 @@ const Ye = _e(null), Tt = {}, Lt = {}, Bt = ({
158
158
  }, Rt = (e = {}) => d({
159
159
  open: !0
160
160
  }, e), Wo = se(
161
- (e = Rt(), t = {}) => ({ children: o }) => /* @__PURE__ */ n(Bt, { overrideState: e, overrideActions: t, children: o })
161
+ (e = Rt(), t = {}) => ({ children: o }) => /* @__PURE__ */ n(Lt, { overrideState: e, overrideActions: t, children: o })
162
162
  ), zo = se(() => ({ children: e }) => /* @__PURE__ */ n(wt, { children: e })), Ae = 7, Vo = z(We)(({ theme: e }) => ({
163
163
  backgroundColor: "black",
164
164
  color: "white",
@@ -318,7 +318,7 @@ const X = "Navbar", q = {
318
318
  }, Qe(e)), ke = (e, t) => d({
319
319
  width: t,
320
320
  transition: U(e, "width", "leaving")
321
- }, Qe(e)), Qt = z(Le, {
321
+ }, Qe(e)), Qt = z(Be, {
322
322
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
323
323
  })(({ theme: e, open: t, widthOpen: o, widthClosed: i, isSmallScreen: r }) => d(d({
324
324
  flexShrink: 0,
@@ -332,40 +332,14 @@ const X = "Navbar", q = {
332
332
  })), !t && D(d({}, ke(e, r ? o : i)), {
333
333
  backgroundColor: "",
334
334
  "& .MuiDrawer-paper": ke(e, r ? o : i)
335
- }))), Y = {
336
- log: console.warn.bind(console),
337
- error: console.error.bind(console),
338
- warn: console.warn.bind(console),
339
- info: console.info.bind(console),
340
- debug: console.debug.bind(console)
341
- };
342
- function Xo(e, t) {
343
- console[e] = (...o) => {
344
- for (const i of t)
345
- if (typeof i == "function") {
346
- if (i(...o)) return;
347
- } else if (i instanceof RegExp && o.length > 0) {
348
- for (const r of o)
349
- if (typeof r == "string" && i.test(r))
350
- return;
351
- }
352
- Y[e](o);
353
- };
354
- }
355
- function Yo(e) {
356
- if (e)
357
- console[e] = Y[e];
358
- else
359
- for (const t of Object.keys(Y))
360
- console[t] = Y[t];
361
- }
335
+ })));
362
336
  function Je(e) {
363
337
  return e.replace(
364
338
  /(^|-)([a-z])/g,
365
339
  (t, o, i) => o === "-" ? " " + i.toUpperCase() : i.toUpperCase()
366
340
  );
367
341
  }
368
- function Ko(e, t, o, i) {
342
+ function Xo(e, t, o, i) {
369
343
  var c;
370
344
  if (!e) return "None";
371
345
  const a = Object.entries(e).filter(
@@ -380,7 +354,7 @@ function Ko(e, t, o, i) {
380
354
  (s) => o[s].some((l) => a.includes(l))
381
355
  )) != null ? c : "None";
382
356
  }
383
- const Qo = (e) => {
357
+ const Yo = (e) => {
384
358
  const { getIdTokenClaims: t, user: o } = le();
385
359
  return Ve({
386
360
  queryKey: ["availableDomains", o == null ? void 0 : o.sub],
@@ -393,7 +367,36 @@ const Qo = (e) => {
393
367
  }, []) : [];
394
368
  })
395
369
  });
370
+ }, Ko = (e) => Object.values(e).reduce(
371
+ (t, o) => [.../* @__PURE__ */ new Set([...t, ...o])],
372
+ []
373
+ ), Y = {
374
+ log: console.warn.bind(console),
375
+ error: console.error.bind(console),
376
+ warn: console.warn.bind(console),
377
+ info: console.info.bind(console),
378
+ debug: console.debug.bind(console)
396
379
  };
380
+ function Qo(e, t) {
381
+ console[e] = (...o) => {
382
+ for (const i of t)
383
+ if (typeof i == "function") {
384
+ if (i(...o)) return;
385
+ } else if (i instanceof RegExp && o.length > 0) {
386
+ for (const r of o)
387
+ if (typeof r == "string" && i.test(r))
388
+ return;
389
+ }
390
+ Y[e](o);
391
+ };
392
+ }
393
+ function Jo(e) {
394
+ if (e)
395
+ console[e] = Y[e];
396
+ else
397
+ for (const t of Object.keys(Y))
398
+ console[t] = Y[t];
399
+ }
397
400
  function Jt(e) {
398
401
  let t = 0;
399
402
  for (let o = 0, i = e.length; o < i; o++) {
@@ -424,7 +427,7 @@ function Zt({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
424
427
  transition: o ? U(r, ["width", "height"], "entering") : U(r, ["width", "height"], "leaving"),
425
428
  aspectRatio: 1
426
429
  },
427
- children: e != null && e.name ? /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(
430
+ children: e != null && e.name ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(
428
431
  me,
429
432
  {
430
433
  src: e == null ? void 0 : e.picture,
@@ -446,12 +449,12 @@ function Zt({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
446
449
  transition: o ? U(r, ["width", "height"], "entering") : U(r, ["width", "height"], "leaving"),
447
450
  aspectRatio: 1
448
451
  },
449
- children: e != null && e.name ? /* @__PURE__ */ n(B, { children: /* @__PURE__ */ m(ve, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
452
+ children: e != null && e.name ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ m(Ce, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
450
453
  " ",
451
454
  De(e == null ? void 0 : e.name),
452
455
  " ",
453
456
  "ab"
454
- ] }) }) : /* @__PURE__ */ n(ve, {})
457
+ ] }) }) : /* @__PURE__ */ n(Ce, {})
455
458
  }
456
459
  ),
457
460
  /* @__PURE__ */ n(Kt, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ n(ct, { in: o, children: /* @__PURE__ */ m(F, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
@@ -500,7 +503,7 @@ function jt({
500
503
  /* @__PURE__ */ m(F, { flexGrow: "0", children: [
501
504
  /* @__PURE__ */ n(xe, { variant: "middle", sx: { marginY: "0.5rem" } }),
502
505
  /* @__PURE__ */ n(Zt, { user: s, domainCode: l, open: e, useNewAvatar: u }),
503
- c && /* @__PURE__ */ n(B, { children: c })
506
+ c && /* @__PURE__ */ n(L, { children: c })
504
507
  ] })
505
508
  ]
506
509
  }
@@ -577,7 +580,7 @@ function no({
577
580
  }
578
581
  ) });
579
582
  }
580
- function Jo({
583
+ function Zo({
581
584
  children: e,
582
585
  initialTitleText: t,
583
586
  initialNavBarOpen: o,
@@ -595,7 +598,7 @@ function Jo({
595
598
  [Q, o != null ? o : !0],
596
599
  [Se, t != null ? t : ""]
597
600
  ]);
598
- const A = Ce(Q), [f] = O(Wt), [b] = O(zt), y = Ce(Se), [p] = O(qt), [k] = O(Vt), [I] = O(Gt);
601
+ const A = ve(Q), [f] = O(Wt), [b] = O(zt), y = ve(Se), [p] = O(qt), [k] = O(Vt), [I] = O(Gt);
599
602
  return /* @__PURE__ */ m(F, { children: [
600
603
  /* @__PURE__ */ n(ht, {}),
601
604
  /* @__PURE__ */ n(
@@ -653,7 +656,7 @@ const Ze = ({
653
656
  var b, y;
654
657
  const [A, f] = T(!1);
655
658
  return /* @__PURE__ */ m(
656
- Be,
659
+ Le,
657
660
  {
658
661
  open: e,
659
662
  onClose: (p, k) => N(void 0, null, function* () {
@@ -721,7 +724,7 @@ const Ze = ({
721
724
  ) : o(r),
722
725
  queryKey: ["autocomplete", i, r]
723
726
  });
724
- function Zo({
727
+ function jo({
725
728
  lookup: e = () => N(this, null, function* () {
726
729
  }),
727
730
  enableHighlighting: t = !0,
@@ -743,9 +746,9 @@ function Zo({
743
746
  disablePortal: k = !1,
744
747
  disableIconFlip: I = !1
745
748
  }) {
746
- const [E, V] = T(""), P = (h, C) => {
747
- const v = a.filter((w) => w.id !== C);
748
- o(v, "delete", h);
749
+ const [E, V] = T(""), P = (h, v) => {
750
+ const C = a.filter((w) => w.id !== v);
751
+ o(C, "delete", h);
749
752
  }, { data: x, isLoading: $ } = je({
750
753
  inputValue: E,
751
754
  label: r,
@@ -767,10 +770,10 @@ function Zo({
767
770
  filterSelectedOptions: !0,
768
771
  includeInputInList: !0,
769
772
  value: a,
770
- onChange: (h, C, v) => {
771
- o(C, v, h);
773
+ onChange: (h, v, C) => {
774
+ o(v, C, h);
772
775
  },
773
- onInputChange: (h, C) => V(C),
776
+ onInputChange: (h, v) => V(v),
774
777
  noOptionsText: R ? A : "Start typing to search",
775
778
  loadingText: S,
776
779
  popupIcon: f,
@@ -783,31 +786,31 @@ function Zo({
783
786
  error: b,
784
787
  helperText: y,
785
788
  InputProps: D(d({}, h.InputProps), {
786
- endAdornment: /* @__PURE__ */ m(B, { children: [
789
+ endAdornment: /* @__PURE__ */ m(L, { children: [
787
790
  $ ? /* @__PURE__ */ n(ae, { color: "inherit", size: 20 }) : null,
788
791
  h.InputProps.endAdornment
789
792
  ] })
790
793
  }),
791
794
  "data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
792
- onKeyDown: (C) => {
793
- (C.key === "Backspace" || C.key === "Delete") && C.stopPropagation();
795
+ onKeyDown: (v) => {
796
+ (v.key === "Backspace" || v.key === "Delete") && v.stopPropagation();
794
797
  },
795
798
  color: u
796
799
  })
797
800
  ),
798
801
  renderTags: () => null,
799
- isOptionEqualToValue: (h, C) => h.id === C.id,
800
- renderOption: (h, C, v) => {
802
+ isOptionEqualToValue: (h, v) => h.id === v.id,
803
+ renderOption: (h, v, C) => {
801
804
  if (t) {
802
- const w = Dt(C.label, v.inputValue, {
805
+ const w = Dt(v.label, C.inputValue, {
803
806
  insideWords: !0,
804
807
  findAllOccurrences: !0
805
- }), Z = It(C.label, w);
808
+ }), Z = It(v.label, w);
806
809
  return /* @__PURE__ */ oe(
807
810
  "li",
808
811
  D(d({}, h), {
809
- key: C.id,
810
- "data-testid": c ? `${c}:Autocomplete:option(${C.id.toString()})` : void 0
812
+ key: v.id,
813
+ "data-testid": c ? `${c}:Autocomplete:option(${v.id.toString()})` : void 0
811
814
  }),
812
815
  /* @__PURE__ */ n("div", { children: Z.map((de, ot) => /* @__PURE__ */ n(
813
816
  "span",
@@ -824,10 +827,10 @@ function Zo({
824
827
  return /* @__PURE__ */ oe(
825
828
  "li",
826
829
  D(d({}, h), {
827
- key: C.id,
828
- "data-testid": c ? `${c}:option(${C.id.toString()})` : void 0
830
+ key: v.id,
831
+ "data-testid": c ? `${c}:option(${v.id.toString()})` : void 0
829
832
  }),
830
- C.label
833
+ v.label
831
834
  );
832
835
  }
833
836
  }
@@ -859,7 +862,7 @@ function Zo({
859
862
  }
860
863
  ),
861
864
  "data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
862
- onDelete: (C) => P(C, h.id),
865
+ onDelete: (v) => P(v, h.id),
863
866
  deleteIcon: /* @__PURE__ */ n(
864
867
  bt,
865
868
  {
@@ -871,7 +874,7 @@ function Zo({
871
874
  )) })
872
875
  ] });
873
876
  }
874
- const jo = /MUI: The value provided to.*is invalid/i, en = ({
877
+ const en = /MUI: The value provided to.*is invalid/i, tn = ({
875
878
  lookup: e = () => N(void 0, null, function* () {
876
879
  }),
877
880
  onChange: t,
@@ -954,7 +957,7 @@ const jo = /MUI: The value provided to.*is invalid/i, en = ({
954
957
  } catch (t) {
955
958
  return -1;
956
959
  }
957
- }, tn = ({
960
+ }, on = ({
958
961
  open: e = !1,
959
962
  closeHandler: t,
960
963
  setAuth0ExpiryTime: o
@@ -1014,7 +1017,7 @@ function lo(e) {
1014
1017
  const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1015
1018
  return t === "access_denied" && o.match(/Script.*time.*exceeded/);
1016
1019
  }
1017
- function on({
1020
+ function nn({
1018
1021
  children: e,
1019
1022
  appName: t = "the app",
1020
1023
  throwErrors: o = "none",
@@ -1055,7 +1058,7 @@ function on({
1055
1058
  const y = localStorage.getItem("auth0_redirect_count");
1056
1059
  y ? y && parseInt(y) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(y) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
1057
1060
  } else if (o === "unknown") throw s;
1058
- return /* @__PURE__ */ m(Be, { open: !0, children: [
1061
+ return /* @__PURE__ */ m(Le, { open: !0, children: [
1059
1062
  /* @__PURE__ */ n(Re, { children: f }),
1060
1063
  /* @__PURE__ */ m(Oe, { children: [
1061
1064
  /* @__PURE__ */ n(_, { children: b }),
@@ -1077,7 +1080,7 @@ function on({
1077
1080
  ] });
1078
1081
  } else if (o === "unknown") throw s;
1079
1082
  }
1080
- return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ n(B, { children: e })) : /* @__PURE__ */ n(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1083
+ return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ n(L, { children: e })) : /* @__PURE__ */ n(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1081
1084
  }
1082
1085
  const co = {
1083
1086
  autoHideDuration: 6e3,
@@ -1112,27 +1115,27 @@ function xo(a) {
1112
1115
  "shouldClose",
1113
1116
  "children"
1114
1117
  ]);
1115
- var C;
1116
- const [{ open: s }, l] = T({ open: !1 }), u = ee([]), g = ee(Date.now()), S = ee(0), A = K((v) => {
1117
- l({ open: v });
1118
- }, []), f = K((v = {}) => {
1118
+ var v;
1119
+ const [{ open: s }, l] = T({ open: !1 }), u = ee([]), g = ee(Date.now()), S = ee(0), A = K((C) => {
1120
+ l({ open: C });
1121
+ }, []), f = K((C = {}) => {
1119
1122
  S.current += 1, u.current.length >= $e && Date.now() - g.current >= Fe && (g.current = Date.now(), console.error(
1120
1123
  `SaladBarProvider: MAX_QUEUE_LENGTH (${$e}) hit ${S.current} times in last ${Fe}ms)`
1121
1124
  ), S.current = 0);
1122
1125
  const w = d(D(d({}, Ie), {
1123
1126
  key: ho()
1124
- }), v);
1127
+ }), C);
1125
1128
  return u.current.push(w), u.current.length === 1 && l({ open: !0 }), w.key;
1126
- }, []), b = (v = "", w = {}) => f(d({ message: v, severity: "success" }, w)), y = (v = "", w = {}) => f(d({ message: v, severity: "info" }, w)), p = (v = "", w = {}) => f(d({ message: v, severity: "warning" }, w)), k = (v = "", w = {}) => f(d({ message: v, severity: "error" }, w)), I = (v) => {
1127
- const w = u.current.findIndex((Z) => Z.key === v);
1129
+ }, []), b = (C = "", w = {}) => f(d({ message: C, severity: "success" }, w)), y = (C = "", w = {}) => f(d({ message: C, severity: "info" }, w)), p = (C = "", w = {}) => f(d({ message: C, severity: "warning" }, w)), k = (C = "", w = {}) => f(d({ message: C, severity: "error" }, w)), I = (C) => {
1130
+ const w = u.current.findIndex((Z) => Z.key === C);
1128
1131
  if (w !== -1)
1129
1132
  return w === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(w, 1);
1130
- }, E = (v, w) => {
1131
- o(v, w) && l({ open: !1 });
1133
+ }, E = (C, w) => {
1134
+ o(C, w) && l({ open: !1 });
1132
1135
  }, V = () => {
1133
1136
  }, P = () => {
1134
1137
  u.current.shift(), u.current.length > 0 && l({ open: !0 });
1135
- }, x = (C = u.current[0]) != null ? C : d({}, Ie), $ = {};
1138
+ }, x = (v = u.current[0]) != null ? v : d({}, Ie), $ = {};
1136
1139
  "autoHideDuration" in x && ($.autoHideDuration = x.autoHideDuration);
1137
1140
  const R = d(d({}, co), r), h = d(d({
1138
1141
  open: s,
@@ -1158,9 +1161,9 @@ function xo(a) {
1158
1161
  sx: { zIndex: po },
1159
1162
  children: /* @__PURE__ */ m("div", { children: [
1160
1163
  /* @__PURE__ */ n(
1161
- Ct,
1164
+ vt,
1162
1165
  {
1163
- onClose: (v) => E(v, "closeAlert"),
1166
+ onClose: (C) => E(C, "closeAlert"),
1164
1167
  severity: x.severity,
1165
1168
  variant: "filled",
1166
1169
  icon: x.progressIndicator === "circular" ? /* @__PURE__ */ n(ae, { size: "1em" }) : void 0,
@@ -1174,19 +1177,19 @@ function xo(a) {
1174
1177
  )
1175
1178
  ] });
1176
1179
  }
1177
- function Co() {
1180
+ function vo() {
1178
1181
  const e = Me(et);
1179
1182
  if (e === null)
1180
1183
  throw new ce("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1181
1184
  return e;
1182
1185
  }
1183
- const nn = se(
1186
+ const rn = se(
1184
1187
  (e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: i }) => /* @__PURE__ */ n(xo, D(d({}, e), { overrideState: t, overrideActions: o, children: i }))
1185
1188
  ), tt = "domainCode";
1186
1189
  var Ne;
1187
1190
  const Ee = M(
1188
1191
  JSON.parse((Ne = localStorage.getItem(tt)) != null ? Ne : '{"domainCode": ""}').domainCode
1189
- ), vo = M(
1192
+ ), Co = M(
1190
1193
  (e) => e(Ee),
1191
1194
  (e, t, o) => {
1192
1195
  t(Ee, o), localStorage.setItem(tt, JSON.stringify({ domainCode: o }));
@@ -1206,7 +1209,7 @@ const Ee = M(
1206
1209
  }, wo = (e) => {
1207
1210
  var t;
1208
1211
  return e === null ? "N/A" : (t = Ao[e]) != null ? t : "";
1209
- }, rn = ({
1212
+ }, an = ({
1210
1213
  isLoading: e,
1211
1214
  isOpen: t,
1212
1215
  onClose: o,
@@ -1215,7 +1218,7 @@ const Ee = M(
1215
1218
  applicationName: a,
1216
1219
  handleLogout: c
1217
1220
  }) => {
1218
- const [s, l] = O(vo), [u, g] = T(s), { enqueueSuccessNotification: S } = Co(), A = r.length === 0, f = !!s && !r.includes(s) && !r.includes(u), b = !s || A || f, y = () => N(void 0, null, function* () {
1221
+ const [s, l] = O(Co), [u, g] = T(s), { enqueueSuccessNotification: S } = vo(), A = r.length === 0, f = !!s && !r.includes(s) && !r.includes(u), b = !s || A || f, y = () => N(void 0, null, function* () {
1219
1222
  u ? (l(u), i == null || i(u), S(`Set organisation to ${u}`), o()) : (l(""), i == null || i(""));
1220
1223
  }), p = () => N(void 0, null, function* () {
1221
1224
  s && !A && !f ? (g(s), o()) : b && c();
@@ -1260,7 +1263,7 @@ const Ee = M(
1260
1263
  variant: "filled",
1261
1264
  label: "Select organisation",
1262
1265
  InputProps: D(d({}, I.InputProps), {
1263
- endAdornment: /* @__PURE__ */ m(B, { children: [
1266
+ endAdornment: /* @__PURE__ */ m(L, { children: [
1264
1267
  e ? /* @__PURE__ */ n(ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1265
1268
  I.InputProps.endAdornment
1266
1269
  ] })
@@ -1269,11 +1272,11 @@ const Ee = M(
1269
1272
  )
1270
1273
  }
1271
1274
  ),
1272
- k && /* @__PURE__ */ n(vt, { error: !0, children: k })
1275
+ k && /* @__PURE__ */ n(Ct, { error: !0, children: k })
1273
1276
  ]
1274
1277
  }
1275
1278
  );
1276
- }, an = Ue({
1279
+ }, sn = Ue({
1277
1280
  palette: {
1278
1281
  primary: {
1279
1282
  dark: "#00A651",
@@ -1324,7 +1327,7 @@ const Ee = M(
1324
1327
  navBar: {
1325
1328
  backgroundColor: "#E8E8E8"
1326
1329
  }
1327
- }), sn = Ue({
1330
+ }), ln = Ue({
1328
1331
  palette: {
1329
1332
  primary: {
1330
1333
  main: "#007236",
@@ -1421,46 +1424,47 @@ const Ee = M(
1421
1424
  });
1422
1425
  export {
1423
1426
  Ze as AgDialog,
1424
- Jo as AppLayout,
1425
- on as AuthGuard,
1427
+ Zo as AppLayout,
1428
+ nn as AuthGuard,
1426
1429
  et as Context,
1427
1430
  ce as ContextError,
1428
- rn as DomainCodeDialog,
1431
+ an as DomainCodeDialog,
1429
1432
  Uo as ExampleComponent,
1430
- Zo as FetchAutocomplete,
1431
- jo as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1433
+ jo as FetchAutocomplete,
1434
+ en as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1432
1435
  Ge as NAVBAR_WIDTH_CLOSED,
1433
1436
  qe as NAVBAR_WIDTH_OPENED,
1434
1437
  Go as NavBar,
1435
1438
  Vo as NavBarDarkStyledList,
1436
1439
  qo as NavBarLightStyledList,
1437
- Bt as NavBarProvider,
1440
+ Lt as NavBarProvider,
1438
1441
  xo as SaladBarProvider,
1439
- tn as SessionExpiryDialog,
1440
- en as SingleAutocomplete,
1442
+ on as SessionExpiryDialog,
1443
+ tn as SingleAutocomplete,
1441
1444
  Rt as buildNavBarState,
1442
- Ko as determineUserLevelFromClaims,
1443
- vo as domainCodeAtom,
1444
- an as fed21Theme,
1445
+ Xo as determineUserLevelFromClaims,
1446
+ Co as domainCodeAtom,
1447
+ sn as fed21Theme,
1445
1448
  io as getAuth0Expiry,
1446
- sn as internalAgSystemsTheme,
1449
+ Ko as getValidBusinessRoles,
1450
+ ln as internalAgSystemsTheme,
1447
1451
  H as navBarClasses,
1448
1452
  Q as navBarOpenAtom,
1449
1453
  Gt as navBarTopAtom,
1450
1454
  zt as navBarWidthClosedAtom,
1451
1455
  Wt as navBarWidthOpenAtom,
1452
1456
  Jt as simpleHashCode,
1453
- Xo as suppressConsole,
1457
+ Qo as suppressConsole,
1454
1458
  Se as titleTextAtom,
1455
1459
  qt as topBarHeightAtom,
1456
1460
  Vt as topBarMiddleAtom,
1457
- Yo as unsuppressConsole,
1461
+ Jo as unsuppressConsole,
1458
1462
  je as useAutocompleteOptions,
1459
1463
  Pt as useNavBar,
1460
- Co as useSaladBar,
1461
- Qo as useValidDomains,
1464
+ vo as useSaladBar,
1465
+ Yo as useValidDomains,
1462
1466
  zo as withBrowserRouter,
1463
1467
  Wo as withNavBarProvider,
1464
- nn as withSaladBarProvider
1468
+ rn as withSaladBarProvider
1465
1469
  };
1466
1470
  //# sourceMappingURL=index.js.map