@australiangreens/ag-internal-components 0.0.66 → 0.0.68

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