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