@australiangreens/ag-internal-components 0.0.73 → 0.0.75

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