@australiangreens/ag-internal-components 0.0.73 → 0.0.74

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 V = (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,17 +64,17 @@ 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 = {
77
+ const it = 330, rt = 73, z = "Navbar", q = {
78
78
  root: `${z}-root`,
79
79
  menuButton: `${z}-menuButton`,
80
80
  hide: `${z}-hide`,
@@ -82,23 +82,23 @@ const it = 330, rt = 73, z = "Navbar", V = {
82
82
  userInfoHolder: `${z}-userInfoHolder`,
83
83
  settings: `${z}-settings`,
84
84
  pieChartIcon: `${z}-pieChartIcon`
85
- }, nn = M(k, {
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: () => V(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: () => V(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 = () => V(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,23 +450,23 @@ 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 = ({
469
+ const wo = ({
458
470
  lookup: e,
459
471
  onChange: t,
460
472
  label: n,
@@ -462,90 +474,84 @@ const xo = ({
462
474
  sx: a,
463
475
  textFieldColor: s,
464
476
  textFieldVariant: l = "filled",
465
- "data-testid": u,
477
+ "data-testid": p,
466
478
  noOptionsText: c = "No options",
467
- minLength: p = 3,
468
- disablePortal: w = !1
479
+ minLength: d = 3,
480
+ disablePortal: x = !1,
481
+ preLoadedOptions: w
469
482
  }) => {
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(
483
+ const [b, m] = E(""), { data: D, isLoading: k } = lt({
484
+ inputValue: b,
485
+ label: n,
486
+ lookup: e,
487
+ minLength: d != null ? d : 0,
488
+ preLoadedOptions: w
489
+ }), O = b.length >= d;
490
+ return /* @__PURE__ */ o("div", { "data-testid": p, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
485
491
  ve,
486
492
  {
487
493
  sx: a,
488
- "data-testid": u ? `${u}:Autocomplete` : void 0,
489
- loading: C,
490
- options: b,
491
- onChange: (h, f) => {
492
- t(h, f);
494
+ "data-testid": p ? `${p}:Autocomplete` : void 0,
495
+ loading: O ? k : !1,
496
+ options: D != null ? D : [],
497
+ onChange: (g, S) => {
498
+ t(g, S);
493
499
  },
494
- disablePortal: w,
495
- filterOptions: (h) => h,
500
+ disablePortal: x,
501
+ filterOptions: (g) => g,
496
502
  value: i,
497
- noOptionsText: c,
498
- getOptionLabel: (h) => h.label,
499
- renderInput: (h) => /* @__PURE__ */ o(
503
+ noOptionsText: O ? c : "Start typing to search",
504
+ getOptionLabel: (g) => g.label,
505
+ renderInput: (g) => /* @__PURE__ */ o(
500
506
  xe,
501
- D(r({
502
- "data-testid": u ? `${u}:Autocomplete:TextField` : void 0
503
- }, h), {
507
+ A(r({
508
+ "data-testid": p ? `${p}:Autocomplete:TextField` : void 0
509
+ }, g), {
504
510
  variant: l,
505
511
  label: n,
506
512
  color: s
507
513
  })
508
514
  ),
509
- isOptionEqualToValue: (h, f) => h.id === f.id,
510
- onInputChange: (h, f) => {
511
- (f == null ? void 0 : f.length) >= p && ($(!0), O(f));
515
+ isOptionEqualToValue: (g, S) => g.id === S.id,
516
+ onInputChange: (g, S) => {
517
+ m(S);
512
518
  },
513
- renderOption: (h, f) => /* @__PURE__ */ ge(
519
+ renderOption: (g, S) => /* @__PURE__ */ ge(
514
520
  "li",
515
- D(r({}, h), {
516
- key: f.id,
517
- "data-testid": u ? `${u}:Autocomplete:option(${f.id.toString()})` : void 0
521
+ A(r({}, g), {
522
+ key: S.id,
523
+ "data-testid": p ? `${p}:Autocomplete:option(${S.id.toString()})` : void 0
518
524
  }),
519
- f.label
525
+ S.label
520
526
  )
521
527
  }
522
528
  ) }) });
523
- }, hn = 24, gn = 64, G = "TopBar", I = {
529
+ }, gn = 24, fn = 64, G = "TopBar", T = {
524
530
  topStripe: `${G}-topStripe`,
525
531
  titleBar: `${G}-titleBar`,
526
532
  titleSlider: `${G}-titleSlider`,
527
533
  titleText: `${G}-titleText`,
528
534
  leftPanelButton: `${G}-leftPanelButton`,
529
535
  rightPanelButton: `${G}-leftPanelButton`
530
- }, fn = be("div", {
536
+ }, mn = be("div", {
531
537
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
532
538
  name: G
533
539
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
534
540
  var i, a;
535
541
  return {
536
542
  width: "100%",
537
- [`& .${I.topStripe}`]: {
543
+ [`& .${T.topStripe}`]: {
538
544
  width: "100%",
539
- height: `${hn}px`,
545
+ height: `${gn}px`,
540
546
  backgroundColor: e.palette.primary.main
541
547
  },
542
- [`& .${I.titleBar}`]: {
548
+ [`& .${T.titleBar}`]: {
543
549
  backgroundColor: e.palette.primary.light,
544
- height: `${gn}px`,
550
+ height: `${fn}px`,
545
551
  padding: e.spacing(0, 3),
546
552
  width: "100%"
547
553
  },
548
- [`& .${I.titleSlider}`]: r(r({
554
+ [`& .${T.titleSlider}`]: r(r({
549
555
  height: "100%",
550
556
  display: "flex",
551
557
  alignItems: "center",
@@ -554,14 +560,14 @@ const xo = ({
554
560
  easing: e.transitions.easing.sharp,
555
561
  duration: e.transitions.duration.leavingScreen
556
562
  }),
557
- [`& .${I.leftPanelButton}`]: {
563
+ [`& .${T.leftPanelButton}`]: {
558
564
  marginRight: e.spacing(2),
559
565
  flexGrow: 0
560
566
  },
561
- [`& .${I.titleText}`]: {
567
+ [`& .${T.titleText}`]: {
562
568
  flexGrow: 1
563
569
  },
564
- [`& .${I.rightPanelButton}`]: {
570
+ [`& .${T.rightPanelButton}`]: {
565
571
  flexGrow: 0
566
572
  }
567
573
  }, (t == null ? void 0 : t.open) && {
@@ -579,19 +585,19 @@ const xo = ({
579
585
  })
580
586
  };
581
587
  });
582
- function mn({
588
+ function Cn({
583
589
  titleText: e = "",
584
590
  leftPanel: t,
585
591
  rightPanel: n,
586
592
  "data-testid": i
587
593
  }) {
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(
594
+ return /* @__PURE__ */ h(mn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
595
+ /* @__PURE__ */ o("div", { className: T.topStripe }),
596
+ /* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ h(I, { className: T.titleSlider, children: [
597
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
592
598
  Q,
593
599
  {
594
- className: I.leftPanelButton,
600
+ className: T.leftPanelButton,
595
601
  color: "inherit",
596
602
  "aria-label": "Open left side panel",
597
603
  onClick: t == null ? void 0 : t.onOpen,
@@ -603,11 +609,11 @@ function mn({
603
609
  ]
604
610
  }
605
611
  ),
606
- /* @__PURE__ */ o(E, { className: I.titleText, variant: "h6", noWrap: !0, children: e }),
607
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ g(
612
+ /* @__PURE__ */ o(F, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
613
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
608
614
  Q,
609
615
  {
610
- className: I.rightPanelButton,
616
+ className: T.rightPanelButton,
611
617
  color: "inherit",
612
618
  "aria-label": "Open right side panel",
613
619
  onClick: n == null ? void 0 : n.onOpen,
@@ -622,7 +628,7 @@ function mn({
622
628
  ] }) })
623
629
  ] });
624
630
  }
625
- const lt = 400, Cn = be(Ce, {
631
+ const ct = 400, vn = be(Ce, {
626
632
  shouldForwardProp: (e) => (
627
633
  // Note we do want anchor to be forwarded to the Drawer component
628
634
  ![
@@ -652,9 +658,9 @@ const lt = 400, Cn = be(Ce, {
652
658
  marginLeft: `${a}px`
653
659
  }))
654
660
  })
655
- ), vn = be(k, {
661
+ ), xn = be(I, {
656
662
  shouldForwardProp: (e) => !["anchor"].includes(e)
657
- })(({ theme: e, anchor: t }) => D(r({
663
+ })(({ theme: e, anchor: t }) => A(r({
658
664
  display: "flex",
659
665
  alignItems: "center",
660
666
  padding: e.spacing(2)
@@ -679,53 +685,53 @@ function _e({
679
685
  onClose: i = () => {
680
686
  },
681
687
  titleText: a = "",
682
- width: s = lt,
688
+ width: s = ct,
683
689
  showCloseArrow: l = !0,
684
- debugOpacity: u = !1,
690
+ debugOpacity: p = !1,
685
691
  headerBoxProps: c = {},
686
- onOpened: p,
687
- onClosed: w,
688
- "data-testid": b,
689
- navBarOpen: S = !1,
690
- navBarWidthOpen: C = 0,
691
- navBarWidthClosed: $ = 0
692
+ onOpened: d,
693
+ onClosed: x,
694
+ "data-testid": w,
695
+ navBarOpen: b = !1,
696
+ navBarWidthOpen: m = 0,
697
+ navBarWidthClosed: D = 0
692
698
  }) {
693
- return /* @__PURE__ */ g(
694
- Cn,
699
+ return /* @__PURE__ */ h(
700
+ vn,
695
701
  {
696
702
  SlideProps: {
697
- onEntered: () => p == null ? void 0 : p(),
698
- onExited: () => w == null ? void 0 : w()
703
+ onEntered: () => d == null ? void 0 : d(),
704
+ onExited: () => x == null ? void 0 : x()
699
705
  },
700
706
  variant: "persistent",
701
707
  anchor: t,
702
708
  open: n,
703
709
  width: s,
704
- debugOpacity: u,
705
- "data-testid": b,
706
- navBarOpen: S,
707
- navBarWidthOpen: C,
708
- navBarWidthClosed: $,
710
+ debugOpacity: p,
711
+ "data-testid": w,
712
+ navBarOpen: b,
713
+ navBarWidthOpen: m,
714
+ navBarWidthClosed: D,
709
715
  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: [
716
+ /* @__PURE__ */ o(xn, A(r({ anchor: t }, c), { children: t === "left" ? /* @__PURE__ */ h(_, { children: [
717
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a }),
718
+ l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
713
719
  /* @__PURE__ */ o(et, { "data-testid": "arrowbackicon" }),
714
720
  " "
715
721
  ] })
716
- ] }) : /* @__PURE__ */ g(L, { children: [
717
- l && /* @__PURE__ */ g(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
722
+ ] }) : /* @__PURE__ */ h(_, { children: [
723
+ l && /* @__PURE__ */ h(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
718
724
  /* @__PURE__ */ o(Ze, {}),
719
725
  " "
720
726
  ] }),
721
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: a })
727
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: a })
722
728
  ] }) })),
723
729
  e
724
730
  ]
725
731
  }
726
732
  );
727
733
  }
728
- const xn = M(k, {
734
+ const wn = H(I, {
729
735
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
730
736
  name: "PanelAwareMargins"
731
737
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -748,7 +754,7 @@ const xn = M(k, {
748
754
  }),
749
755
  marginRight: `${(a = n == null ? void 0 : n.width) != null ? a : 0}px`
750
756
  });
751
- }), wn = M(Ke, {
757
+ }), bn = H(Ke, {
752
758
  name: "PageContainer"
753
759
  })(({ theme: e }) => ({
754
760
  // Horizontal padding comes from the Container's gutter
@@ -758,17 +764,17 @@ const xn = M(k, {
758
764
  })), ue = !1, he = !1, ee = {
759
765
  titleText: "",
760
766
  flavour: "push",
761
- width: lt,
767
+ width: ct,
762
768
  arrowButtons: "both",
763
769
  startOpen: !1,
764
770
  open: void 0,
765
771
  onChangeOpen: void 0,
766
- content: /* @__PURE__ */ o(L, {}),
772
+ content: /* @__PURE__ */ o(_, {}),
767
773
  onOpened: void 0,
768
774
  onClosed: void 0,
769
775
  dataTestId: void 0
770
776
  };
771
- function wo({
777
+ function bo({
772
778
  children: e,
773
779
  titleText: t = "",
774
780
  leftPanel: n,
@@ -776,110 +782,110 @@ function wo({
776
782
  sidePanelsAreMutuallyExclusive: a = !0,
777
783
  debugOpacity: s = !1,
778
784
  pageContainerProps: l,
779
- pageContentDataTestId: u,
785
+ pageContentDataTestId: p,
780
786
  topBarDataTestId: c,
781
- navBarOpen: p,
782
- navBarWidthOpen: w,
783
- navBarWidthClosed: b
787
+ navBarOpen: d,
788
+ navBarWidthOpen: x,
789
+ navBarWidthClosed: w
784
790
  }) {
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,
791
+ 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, {
792
+ titleText: $,
793
+ content: u,
794
+ flavour: f,
795
+ open: y,
796
+ onChangeOpen: P,
791
797
  width: v,
792
- arrowButtons: x,
793
- startOpen: U,
794
- onOpened: vt,
795
- onClosed: xt,
796
- dataTestId: wt
798
+ arrowButtons: C,
799
+ startOpen: M,
800
+ onOpened: xt,
801
+ onClosed: wt,
802
+ dataTestId: bt
797
803
  } = n ? r(r({}, ee), n) : r({}, ee), {
798
- titleText: bt,
799
- content: At,
804
+ titleText: At,
805
+ content: St,
800
806
  flavour: Se,
801
807
  open: re,
802
808
  onChangeOpen: De,
803
809
  width: ae,
804
810
  arrowButtons: J,
805
811
  startOpen: Y,
806
- onOpened: St,
807
- onClosed: Dt,
808
- dataTestId: kt
812
+ onOpened: Dt,
813
+ onClosed: kt,
814
+ dataTestId: It
809
815
  } = i ? r(r({}, ee), i) : r({}, ee);
810
816
  Ee(() => {
811
- U !== ue && (C(U), h(U));
812
- }, [U]), Ee(() => {
813
- Y !== he && (A(Y), _(Y));
817
+ M !== ue && (m(M), g(M));
818
+ }, [M]), Ee(() => {
819
+ Y !== he && (k(Y), R(Y));
814
820
  }, [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);
821
+ const se = y === void 0 ? b : y, le = re === void 0 ? D : re, ke = (W) => {
822
+ y === void 0 && (m(W), a && L && (W ? (k(!1), R(D)) : k(S))), P && P(W);
823
+ }, Ie = (W) => {
824
+ re === void 0 && (k(W), a && N && (W ? (m(!1), g(b)) : m(O))), De && De(W);
819
825
  };
820
- return /* @__PURE__ */ g(k, { children: [
821
- F && /* @__PURE__ */ o(
826
+ return /* @__PURE__ */ h(I, { children: [
827
+ N && /* @__PURE__ */ o(
822
828
  _e,
823
829
  {
824
- "data-testid": wt,
830
+ "data-testid": bt,
825
831
  anchor: "left",
826
832
  open: se,
827
833
  onClose: () => ke(!1),
828
834
  width: v,
829
- titleText: d,
835
+ titleText: $,
830
836
  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
837
+ showCloseArrow: C === "both" || C === "close",
838
+ onOpened: xt,
839
+ onClosed: wt,
840
+ navBarOpen: d,
841
+ navBarWidthOpen: x,
842
+ navBarWidthClosed: w,
843
+ children: u
838
844
  }
839
845
  ),
840
- B && /* @__PURE__ */ o(
846
+ L && /* @__PURE__ */ o(
841
847
  _e,
842
848
  {
843
- "data-testid": kt,
849
+ "data-testid": It,
844
850
  anchor: "right",
845
851
  open: le,
846
- onClose: () => $e(!1),
852
+ onClose: () => Ie(!1),
847
853
  width: ae,
848
- titleText: bt,
854
+ titleText: At,
849
855
  debugOpacity: s,
850
856
  showCloseArrow: J === "both" || J === "close",
851
- onOpened: St,
852
- onClosed: Dt,
853
- navBarOpen: p,
854
- navBarWidthOpen: w,
855
- navBarWidthClosed: b,
856
- children: At
857
+ onOpened: Dt,
858
+ onClosed: kt,
859
+ navBarOpen: d,
860
+ navBarWidthOpen: x,
861
+ navBarWidthClosed: w,
862
+ children: St
857
863
  }
858
864
  ),
859
865
  /* @__PURE__ */ o(
860
- mn,
866
+ Cn,
861
867
  r(r({
862
868
  titleText: t,
863
869
  "data-testid": c
864
- }, F && T === "push" ? {
870
+ }, N && f === "push" ? {
865
871
  leftPanel: {
866
872
  open: se,
867
873
  width: v,
868
874
  onOpen: () => ke(!0),
869
- showOpenArrow: x === "both" || x === "open"
875
+ showOpenArrow: C === "both" || C === "open"
870
876
  }
871
- } : {}), B && Se === "push" ? {
877
+ } : {}), L && Se === "push" ? {
872
878
  rightPanel: {
873
879
  open: le,
874
880
  width: ae,
875
- onOpen: () => $e(!0),
881
+ onOpen: () => Ie(!0),
876
882
  showOpenArrow: J === "both" || J === "open"
877
883
  }
878
884
  } : {})
879
885
  ),
880
886
  /* @__PURE__ */ o(
881
- xn,
882
- D(r(r({}, T === "push" ? {
887
+ wn,
888
+ A(r(r({}, f === "push" ? {
883
889
  leftPanel: {
884
890
  open: se,
885
891
  width: v
@@ -890,16 +896,16 @@ function wo({
890
896
  width: ae
891
897
  }
892
898
  } : {}), {
893
- children: /* @__PURE__ */ o(wn, D(r({ "data-testid": u }, l), { children: e }))
899
+ children: /* @__PURE__ */ o(bn, A(r({ "data-testid": p }, l), { children: e }))
894
900
  })
895
901
  )
896
902
  ] });
897
903
  }
898
- const ct = () => {
904
+ const dt = () => {
899
905
  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 }) {
906
+ return Mt(e.breakpoints.down("sm"));
907
+ }, 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);
908
+ function In({ links: e }) {
903
909
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
904
910
  }
905
911
  const te = "Navbar", X = {
@@ -910,7 +916,7 @@ const te = "Navbar", X = {
910
916
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
911
917
  // settings: `${PREFIX}-settings`,
912
918
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
913
- }, $n = M(k, { name: "NavBar" })(({ theme: e }) => ({
919
+ }, On = H(I, { name: "NavBar" })(({ theme: e }) => ({
914
920
  [`&.${X.root}`]: {
915
921
  display: "flex"
916
922
  },
@@ -932,10 +938,10 @@ const te = "Navbar", X = {
932
938
  })), oe = (e, t, n) => e.transitions.create(t, {
933
939
  easing: e.transitions.easing.sharp,
934
940
  duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
935
- }), On = (e) => {
941
+ }), $n = (e) => {
936
942
  const t = ie();
937
943
  return /* @__PURE__ */ o(
938
- Mt,
944
+ _t,
939
945
  r({
940
946
  easing: t.transitions.easing.sharp,
941
947
  timeout: {
@@ -944,7 +950,7 @@ const te = "Navbar", X = {
944
950
  }
945
951
  }, e)
946
952
  );
947
- }, gt = (e) => {
953
+ }, ft = (e) => {
948
954
  var t, n;
949
955
  return {
950
956
  overflowX: "hidden",
@@ -955,10 +961,10 @@ const te = "Navbar", X = {
955
961
  }, He = (e, t) => r({
956
962
  width: t,
957
963
  transition: oe(e, "width", "entering")
958
- }, gt(e)), Re = (e, t) => r({
964
+ }, ft(e)), Re = (e, t) => r({
959
965
  width: t,
960
966
  transition: oe(e, "width", "leaving")
961
- }, gt(e)), In = M(Ce, {
967
+ }, ft(e)), Tn = H(Ce, {
962
968
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
963
969
  })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: a }) => r(r({
964
970
  flexShrink: 0,
@@ -966,10 +972,10 @@ const te = "Navbar", X = {
966
972
  boxSizing: "border-box",
967
973
  display: "flex",
968
974
  flexDirection: "column"
969
- }, t && D(r({}, He(e, n)), {
975
+ }, t && A(r({}, He(e, n)), {
970
976
  backgroundColor: "",
971
977
  "& .MuiDrawer-paper": He(e, n)
972
- })), !t && D(r({}, Re(e, a ? n : i)), {
978
+ })), !t && A(r({}, Re(e, a ? n : i)), {
973
979
  backgroundColor: "",
974
980
  "& .MuiDrawer-paper": Re(e, a ? n : i)
975
981
  })));
@@ -981,11 +987,11 @@ function yn(e) {
981
987
  }
982
988
  return t;
983
989
  }
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 }) {
990
+ 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();
991
+ function Fn({ user: e, domainCode: t, open: n }) {
986
992
  const i = ie();
987
- return /* @__PURE__ */ g(
988
- k,
993
+ return /* @__PURE__ */ h(
994
+ I,
989
995
  {
990
996
  sx: {
991
997
  paddingTop: 3,
@@ -996,7 +1002,7 @@ function En({ user: e, domainCode: t, open: n }) {
996
1002
  },
997
1003
  children: [
998
1004
  /* @__PURE__ */ o(
999
- k,
1005
+ I,
1000
1006
  {
1001
1007
  sx: {
1002
1008
  width: n ? "5rem" : "2rem",
@@ -1012,20 +1018,20 @@ function En({ user: e, domainCode: t, open: n }) {
1012
1018
  height: "100%",
1013
1019
  bgcolor: We[Math.abs(yn(e.name)) % We.length]
1014
1020
  },
1015
- children: Tn(e.name)
1021
+ children: En(e.name)
1016
1022
  }
1017
1023
  ) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
1018
1024
  }
1019
1025
  ),
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%" })
1026
+ /* @__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: [
1027
+ e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
1028
+ t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
1023
1029
  ] }) }) })
1024
1030
  ]
1025
1031
  }
1026
1032
  );
1027
1033
  }
1028
- function Fn({
1034
+ function Nn({
1029
1035
  open: e,
1030
1036
  widthClosed: t,
1031
1037
  widthOpen: n,
@@ -1033,48 +1039,48 @@ function Fn({
1033
1039
  top: a,
1034
1040
  middle: s,
1035
1041
  bottom: l,
1036
- user: u,
1042
+ user: p,
1037
1043
  domainCode: c
1038
1044
  }) {
1039
- const p = ct(), w = tt(j);
1040
- return /* @__PURE__ */ o($n, { className: X.root, "data-testid": i, children: /* @__PURE__ */ g(
1041
- In,
1045
+ const d = dt(), x = tt(j);
1046
+ return /* @__PURE__ */ o(On, { className: X.root, "data-testid": i, children: /* @__PURE__ */ h(
1047
+ Tn,
1042
1048
  {
1043
1049
  open: e,
1044
1050
  widthOpen: n,
1045
1051
  widthClosed: t,
1046
1052
  anchor: "left",
1047
- variant: p ? "temporary" : "permanent",
1053
+ variant: d ? "temporary" : "permanent",
1048
1054
  PaperProps: {
1049
1055
  component: "nav"
1050
1056
  },
1051
1057
  onClose: () => {
1052
- w(!1);
1058
+ x(!1);
1053
1059
  },
1054
- isSmallScreen: p,
1060
+ isSmallScreen: d,
1055
1061
  children: [
1056
- !p && /* @__PURE__ */ o(Ht, {}),
1057
- a && /* @__PURE__ */ g(k, { flexGrow: "0", children: [
1062
+ !d && /* @__PURE__ */ o(Rt, {}),
1063
+ a && /* @__PURE__ */ h(I, { flexGrow: "0", children: [
1058
1064
  a,
1059
1065
  /* @__PURE__ */ o(Pe, { variant: "middle" })
1060
1066
  ] }),
1061
- /* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(kn, { links: s }) : s }),
1062
- /* @__PURE__ */ g(k, { flexGrow: "0", children: [
1067
+ /* @__PURE__ */ o(I, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(In, { links: s }) : s }),
1068
+ /* @__PURE__ */ h(I, { flexGrow: "0", children: [
1063
1069
  /* @__PURE__ */ o(Pe, { variant: "middle" }),
1064
- /* @__PURE__ */ o(En, { user: u, domainCode: c, open: e }),
1065
- l && /* @__PURE__ */ o(L, { children: l })
1070
+ /* @__PURE__ */ o(Fn, { user: p, domainCode: c, open: e }),
1071
+ l && /* @__PURE__ */ o(_, { children: l })
1066
1072
  ] })
1067
1073
  ]
1068
1074
  }
1069
1075
  ) });
1070
1076
  }
1071
- function Nn({
1077
+ function Pn({
1072
1078
  children: e,
1073
1079
  topBarHeight: t,
1074
1080
  maxWidth: n = !1
1075
1081
  }) {
1076
1082
  return /* @__PURE__ */ o(
1077
- k,
1083
+ I,
1078
1084
  {
1079
1085
  sx: {
1080
1086
  overflow: "auto",
@@ -1096,17 +1102,17 @@ function Nn({
1096
1102
  }
1097
1103
  );
1098
1104
  }
1099
- const Pn = "TopBar", Bn = {
1100
- titleText: `${Pn}-titleText`
1105
+ const Bn = "TopBar", Ln = {
1106
+ titleText: `${Bn}-titleText`
1101
1107
  };
1102
- function Ln({
1108
+ function Mn({
1103
1109
  titleText: e = "",
1104
1110
  height: t,
1105
1111
  "data-testid": n,
1106
1112
  middle: i
1107
1113
  }) {
1108
- const a = tt(j), s = () => a((c) => !c), l = ie(), u = ct();
1109
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ g(
1114
+ const a = tt(j), s = () => a((c) => !c), l = ie(), p = dt();
1115
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
1110
1116
  je,
1111
1117
  {
1112
1118
  square: !0,
@@ -1121,17 +1127,17 @@ function Ln({
1121
1127
  gap: 2,
1122
1128
  flexShrink: 0,
1123
1129
  height: t,
1124
- zIndex: u ? 0 : l.zIndex.drawer + 1
1130
+ zIndex: p ? 0 : l.zIndex.drawer + 1
1125
1131
  },
1126
1132
  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 }),
1133
+ /* @__PURE__ */ o(Q, { size: "medium", color: "inherit", sx: { padding: 1.5 }, onClick: s, children: /* @__PURE__ */ o(Kt, { fontSize: "medium" }) }),
1134
+ /* @__PURE__ */ o(F, { className: Ln.titleText, variant: "h6", children: e }),
1129
1135
  i
1130
1136
  ]
1131
1137
  }
1132
1138
  ) });
1133
1139
  }
1134
- function bo({
1140
+ function Ao({
1135
1141
  children: e,
1136
1142
  initialTitleText: t,
1137
1143
  initialNavBarOpen: n,
@@ -1139,48 +1145,48 @@ function bo({
1139
1145
  pageContentDataTestId: a,
1140
1146
  topBarDataTestId: s,
1141
1147
  navBarDataTestId: l,
1142
- navBarMiddle: u,
1148
+ navBarMiddle: p,
1143
1149
  navBarBottom: c,
1144
- user: p,
1145
- domainCode: w
1150
+ user: d,
1151
+ domainCode: x
1146
1152
  }) {
1147
1153
  ot([
1148
1154
  [j, n != null ? n : !0],
1149
1155
  [me, t != null ? t : ""]
1150
1156
  ]);
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, {}),
1157
+ const w = Be(j), [b] = U(pt), [m] = U(ut), D = Be(me), [k] = U(ht), [O] = U(kn), [g] = U(gt);
1158
+ return /* @__PURE__ */ h(I, { children: [
1159
+ /* @__PURE__ */ o(Wt, {}),
1154
1160
  /* @__PURE__ */ o(
1155
- Ln,
1161
+ Mn,
1156
1162
  {
1157
- titleText: $,
1163
+ titleText: D,
1158
1164
  "data-testid": s,
1159
- height: A,
1165
+ height: k,
1160
1166
  middle: O
1161
1167
  }
1162
1168
  ),
1163
- /* @__PURE__ */ g(k, { sx: { display: "flex" }, children: [
1169
+ /* @__PURE__ */ h(I, { sx: { display: "flex" }, children: [
1164
1170
  /* @__PURE__ */ o(
1165
- Fn,
1171
+ Nn,
1166
1172
  {
1167
- open: b,
1168
- top: h,
1169
- middle: u,
1173
+ open: w,
1174
+ top: g,
1175
+ middle: p,
1170
1176
  bottom: c,
1171
- user: p,
1172
- domainCode: w,
1173
- widthOpen: S,
1174
- widthClosed: C,
1175
- offsetTop: A,
1177
+ user: d,
1178
+ domainCode: x,
1179
+ widthOpen: b,
1180
+ widthClosed: m,
1181
+ offsetTop: k,
1176
1182
  "data-testid": l
1177
1183
  }
1178
1184
  ),
1179
1185
  /* @__PURE__ */ o(
1180
- Nn,
1181
- D(r({
1186
+ Pn,
1187
+ A(r({
1182
1188
  "data-testid": a,
1183
- topBarHeight: A
1189
+ topBarHeight: k
1184
1190
  }, i), {
1185
1191
  children: e
1186
1192
  })
@@ -1188,13 +1194,13 @@ function bo({
1188
1194
  ] })
1189
1195
  ] });
1190
1196
  }
1191
- const Mn = {
1197
+ const _n = {
1192
1198
  autoHideDuration: 6e3,
1193
1199
  anchorOrigin: { vertical: "top", horizontal: "center" },
1194
1200
  // The default is false. If we prefer timer to continue when window loses
1195
1201
  // focus, change to true
1196
1202
  disableWindowBlurListener: !1
1197
- }, _n = {
1203
+ }, Hn = {
1198
1204
  shouldClose: (e, t) => t !== "clickaway"
1199
1205
  }, ze = {
1200
1206
  message: "",
@@ -1202,108 +1208,108 @@ const Mn = {
1202
1208
  variant: "standard",
1203
1209
  progressIndicator: void 0
1204
1210
  // Can use 'circular' or 'linear'
1205
- }, Ge = 100, Ue = 2e3, Hn = 2e3, Rn = (() => {
1211
+ }, Ge = 100, Ve = 2e3, Rn = 2e3, Wn = (() => {
1206
1212
  let e = 0;
1207
1213
  return () => (e += 1, e);
1208
- })(), Wn = {
1214
+ })(), zn = {
1209
1215
  borderBottomLeftRadius: "0px",
1210
1216
  borderBottomRightRadius: "0px"
1211
- }, zn = {}, Gn = {}, ft = Xe(null);
1217
+ }, Gn = {}, Vn = {}, mt = Xe(null);
1212
1218
  function Un(s) {
1213
1219
  var l = s, {
1214
- overrideState: e = zn,
1215
- overrideActions: t = Gn,
1216
- shouldClose: n = _n.shouldClose,
1220
+ overrideState: e = Gn,
1221
+ overrideActions: t = Vn,
1222
+ shouldClose: n = Hn.shouldClose,
1217
1223
  children: i
1218
- } = l, a = ye(l, [
1224
+ } = l, a = Te(l, [
1219
1225
  "overrideState",
1220
1226
  "overrideActions",
1221
1227
  "shouldClose",
1222
1228
  "children"
1223
1229
  ]);
1224
- var H;
1225
- const [{ open: u }, c] = y({ open: !1 }), p = de([]), w = de(Date.now()), b = de(0), S = ne((v) => {
1230
+ var P;
1231
+ const [{ open: p }, c] = E({ open: !1 }), d = de([]), x = de(Date.now()), w = de(0), b = ne((v) => {
1226
1232
  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()
1233
+ }, []), m = ne((v = {}) => {
1234
+ w.current += 1, d.current.length >= Ge && Date.now() - x.current >= Ve && (x.current = Date.now(), console.error(
1235
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${w.current} times in last ${Ve}ms)`
1236
+ ), w.current = 0);
1237
+ const C = r(A(r({}, ze), {
1238
+ key: Wn()
1233
1239
  }), 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,
1240
+ return d.current.push(C), d.current.length === 1 && c({ open: !0 }), C.key;
1241
+ }, []), 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) => {
1242
+ const C = d.current.findIndex((M) => M.key === v);
1243
+ if (C !== -1)
1244
+ return C === 0 ? (c({ open: !1 }), d.current[0]) : d.current.splice(C, 1);
1245
+ }, R = (v, C) => {
1246
+ n(v, C) && c({ open: !1 });
1247
+ }, N = () => {
1248
+ }, L = () => {
1249
+ d.current.shift(), d.current.length > 0 && c({ open: !0 });
1250
+ }, $ = (P = d.current[0]) != null ? P : r({}, ze), u = {};
1251
+ "autoHideDuration" in $ && (u.autoHideDuration = $.autoHideDuration);
1252
+ const f = r(r({}, _n), a), y = r(r({
1253
+ open: p,
1254
+ setOpen: b,
1255
+ enqueueNotification: m,
1256
+ enqueueSuccessNotification: D,
1257
+ enqueueInfoNotification: k,
1252
1258
  enqueueWarningNotification: O,
1253
- enqueueErrorNotification: h,
1254
- removeNotification: f
1259
+ enqueueErrorNotification: g,
1260
+ removeNotification: S
1255
1261
  }, e), t);
1256
- return /* @__PURE__ */ g(ft.Provider, { value: N, children: [
1262
+ return /* @__PURE__ */ h(mt.Provider, { value: y, children: [
1257
1263
  i,
1258
1264
  /* @__PURE__ */ o(
1259
- Wt,
1260
- D(r(r({}, T), m), {
1261
- open: u,
1262
- onClose: _,
1265
+ zt,
1266
+ A(r(r({}, f), u), {
1267
+ open: p,
1268
+ onClose: R,
1263
1269
  TransitionProps: {
1264
- onExited: B,
1265
- onExit: F
1270
+ onExited: L,
1271
+ onExit: N
1266
1272
  },
1267
- sx: { zIndex: Hn },
1268
- children: /* @__PURE__ */ g("div", { children: [
1273
+ sx: { zIndex: Rn },
1274
+ children: /* @__PURE__ */ h("div", { children: [
1269
1275
  /* @__PURE__ */ o(
1270
- zt,
1276
+ Gt,
1271
1277
  {
1272
- onClose: (v) => _(v, "closeAlert"),
1273
- severity: d.severity,
1278
+ onClose: (v) => R(v, "closeAlert"),
1279
+ severity: $.severity,
1274
1280
  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
1281
+ icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(we, { size: "1em" }) : void 0,
1282
+ style: $.progressIndicator === "linear" ? zn : void 0,
1283
+ children: $.message
1278
1284
  }
1279
1285
  ),
1280
- d.progressIndicator === "linear" && /* @__PURE__ */ o(Gt, { color: "primary" })
1286
+ $.progressIndicator === "linear" && /* @__PURE__ */ o(Vt, { color: "primary" })
1281
1287
  ] })
1282
1288
  })
1283
1289
  )
1284
1290
  ] });
1285
1291
  }
1286
1292
  function qn() {
1287
- const e = Qe(ft);
1293
+ const e = Qe(mt);
1288
1294
  if (e === null)
1289
1295
  throw new Ae("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1290
1296
  return e;
1291
1297
  }
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 = ({
1298
+ const So = K(
1299
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(Un, A(r({}, e), { overrideState: t, overrideActions: n, children: i }))
1300
+ ), Xn = nn(), Do = ({
1295
1301
  children: e,
1296
1302
  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),
1303
+ }) => /* @__PURE__ */ o(nt, { store: t != null ? t : Xn, children: e }), Ct = "domainCode";
1304
+ var qe;
1305
+ const Ue = B(
1306
+ JSON.parse((qe = localStorage.getItem(Ct)) != null ? qe : '{"domainCode": ""}').domainCode
1307
+ ), vt = B(
1308
+ (e) => e(Ue),
1303
1309
  (e, t, n) => {
1304
- t(qe, n), localStorage.setItem(mt, JSON.stringify({ domainCode: n }));
1310
+ t(Ue, n), localStorage.setItem(Ct, JSON.stringify({ domainCode: n }));
1305
1311
  }
1306
- ), Xn = {
1312
+ ), Qn = {
1307
1313
  act: "ACT",
1308
1314
  nsw: "NSW",
1309
1315
  nt: "NT",
@@ -1315,10 +1321,10 @@ const qe = P(
1315
1321
  ag: "AG",
1316
1322
  fedmps: "Fedmps",
1317
1323
  "": ""
1318
- }, Qn = (e) => {
1324
+ }, jn = (e) => {
1319
1325
  var t;
1320
- return e === null ? "N/A" : (t = Xn[e]) != null ? t : "";
1321
- }, Do = ({
1326
+ return e === null ? "N/A" : (t = Qn[e]) != null ? t : "";
1327
+ }, ko = ({
1322
1328
  isLoading: e,
1323
1329
  isOpen: t,
1324
1330
  onClose: n,
@@ -1326,31 +1332,31 @@ const qe = P(
1326
1332
  applicationName: a,
1327
1333
  handleLogout: s
1328
1334
  }) => {
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();
1335
+ 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 = () => V(void 0, null, function* () {
1336
+ c ? (p(c), x(`Set domain to ${c}`), n()) : p("");
1337
+ }), k = () => V(void 0, null, function* () {
1338
+ l && !w && !b ? (d(l), n()) : m && s();
1333
1339
  });
1334
1340
  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,
1341
+ 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(
1342
+ hn,
1337
1343
  {
1338
1344
  isOpen: t,
1339
1345
  dialogTitle: "Select an organisation",
1340
1346
  primaryButton: {
1341
1347
  text: "Confirm",
1342
- onClick: $,
1343
- disabled: !c || b || S,
1348
+ onClick: D,
1349
+ disabled: !c || w || b,
1344
1350
  buttonColor: "primary"
1345
1351
  },
1346
1352
  secondaryButton: {
1347
- text: C ? "Logout" : "Cancel",
1348
- onClick: A
1353
+ text: m ? "Logout" : "Cancel",
1354
+ onClick: k
1349
1355
  },
1350
- onClose: C ? () => {
1356
+ onClose: m ? () => {
1351
1357
  } : n,
1352
1358
  children: [
1353
- /* @__PURE__ */ g(E, { marginBottom: 2, children: [
1359
+ /* @__PURE__ */ h(F, { marginBottom: 2, children: [
1354
1360
  "Select the default organisation that you want to use with the ",
1355
1361
  a,
1356
1362
  "."
@@ -1362,18 +1368,18 @@ const qe = P(
1362
1368
  multiple: !1,
1363
1369
  disableClearable: !1,
1364
1370
  value: c !== "" ? c : null,
1365
- onChange: (h, f) => p(f != null ? f : ""),
1366
- getOptionLabel: Qn,
1371
+ onChange: (g, S) => d(S != null ? S : ""),
1372
+ getOptionLabel: jn,
1367
1373
  options: [...i],
1368
- renderInput: (h) => /* @__PURE__ */ o(
1374
+ renderInput: (g) => /* @__PURE__ */ o(
1369
1375
  xe,
1370
- D(r({}, h), {
1376
+ A(r({}, g), {
1371
1377
  variant: "filled",
1372
1378
  label: "Select organisation",
1373
- InputProps: D(r({}, h.InputProps), {
1374
- endAdornment: /* @__PURE__ */ g(L, { children: [
1379
+ InputProps: A(r({}, g.InputProps), {
1380
+ endAdornment: /* @__PURE__ */ h(_, { children: [
1375
1381
  e ? /* @__PURE__ */ o(we, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1376
- h.InputProps.endAdornment
1382
+ g.InputProps.endAdornment
1377
1383
  ] })
1378
1384
  })
1379
1385
  })
@@ -1384,7 +1390,7 @@ const qe = P(
1384
1390
  ]
1385
1391
  }
1386
1392
  );
1387
- }, ko = Je({
1393
+ }, Io = Je({
1388
1394
  palette: {
1389
1395
  primary: {
1390
1396
  dark: "#00A651",
@@ -1435,7 +1441,7 @@ const qe = P(
1435
1441
  navBar: {
1436
1442
  backgroundColor: "#E8E8E8"
1437
1443
  }
1438
- }), $o = Je({
1444
+ }), Oo = Je({
1439
1445
  palette: {
1440
1446
  primary: {
1441
1447
  main: "#007236",
@@ -1526,24 +1532,24 @@ const qe = P(
1526
1532
  navBar: {
1527
1533
  backgroundColor: "#E8E8E8"
1528
1534
  }
1529
- }), jn = {
1530
- domainCode: Ct,
1535
+ }), Kn = {
1536
+ domainCode: vt,
1531
1537
  navBarOpen: j,
1532
- navBarWidthOpen: dt,
1533
- navBarWidthClosed: pt,
1538
+ navBarWidthOpen: pt,
1539
+ navBarWidthClosed: ut,
1534
1540
  titleText: me,
1535
- topBarHeight: ut,
1536
- navBarTop: ht
1537
- }, Oo = K(() => ({ children: e }) => /* @__PURE__ */ o(nt, { children: e })), Kn = ({
1541
+ topBarHeight: ht,
1542
+ navBarTop: gt
1543
+ }, $o = K(() => ({ children: e }) => /* @__PURE__ */ o(nt, { children: e })), Jn = ({
1538
1544
  initialValues: e,
1539
1545
  children: t
1540
- }) => (ot(e), /* @__PURE__ */ o(L, { children: t })), Io = K(
1546
+ }) => (ot(e), /* @__PURE__ */ o(_, { children: t })), To = K(
1541
1547
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1542
- Kn,
1548
+ Jn,
1543
1549
  {
1544
1550
  initialValues: Object.entries(e).map(
1545
1551
  ([n, i]) => [
1546
- jn[n],
1552
+ Kn[n],
1547
1553
  i
1548
1554
  ]
1549
1555
  ),
@@ -1551,47 +1557,48 @@ const qe = P(
1551
1557
  }
1552
1558
  )
1553
1559
  ), yo = K(() => ({ children: e }) => {
1554
- const t = new Zt();
1555
- return /* @__PURE__ */ o(en, { client: t, children: e });
1560
+ const t = new en();
1561
+ return /* @__PURE__ */ o(tn, { client: t, children: e });
1556
1562
  });
1557
1563
  export {
1558
- un as AgDialog,
1559
- bo as AppLayout,
1560
- So as AtomProvider,
1561
- ft as Context,
1564
+ hn as AgDialog,
1565
+ Ao as AppLayout,
1566
+ Do as AtomProvider,
1567
+ mt as Context,
1562
1568
  Ae as ContextError,
1563
- Do as DomainCodeDialog,
1564
- ho as ExampleComponent,
1565
- vo as FetchAutocomplete,
1566
- Kn as HydrateAtoms,
1569
+ ko as DomainCodeDialog,
1570
+ go as ExampleComponent,
1571
+ xo as FetchAutocomplete,
1572
+ Jn as HydrateAtoms,
1567
1573
  rt as NAVBAR_WIDTH_CLOSED,
1568
1574
  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,
1575
+ vo as NavBar,
1576
+ mo as NavBarDarkStyledList,
1577
+ Co as NavBarLightStyledList,
1578
+ dn as NavBarProvider,
1579
+ bo as PageLayout,
1574
1580
  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,
1581
+ wo as SingleAutocomplete,
1582
+ Xn as atomStore,
1583
+ un as buildNavBarState,
1584
+ vt as domainCodeAtom,
1585
+ Io as fed21Theme,
1586
+ Oo as internalAgSystemsTheme,
1587
+ q as navBarClasses,
1582
1588
  j as navBarOpenAtom,
1583
- ht as navBarTopAtom,
1584
- pt as navBarWidthClosedAtom,
1585
- dt as navBarWidthOpenAtom,
1589
+ gt as navBarTopAtom,
1590
+ ut as navBarWidthClosedAtom,
1591
+ pt as navBarWidthOpenAtom,
1586
1592
  me as titleTextAtom,
1587
- ut as topBarHeightAtom,
1588
- Dn as topBarMiddleAtom,
1589
- dn as useNavBar,
1593
+ ht as topBarHeightAtom,
1594
+ kn as topBarMiddleAtom,
1595
+ lt as useAutocompleteOptions,
1596
+ pn as useNavBar,
1590
1597
  qn as useSaladBar,
1591
- Oo as withAtomProvider,
1592
- go as withNavBarProvider,
1593
- Io as withOverrideDefaults,
1598
+ $o as withAtomProvider,
1599
+ fo as withNavBarProvider,
1600
+ To as withOverrideDefaults,
1594
1601
  yo as withQueryClient,
1595
- Ao as withSaladBarProvider
1602
+ So as withSaladBarProvider
1596
1603
  };
1597
1604
  //# sourceMappingURL=index.js.map