@australiangreens/ag-internal-components 0.0.60 → 0.0.62

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