@australiangreens/ag-internal-components 0.0.69 → 0.0.70

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,44 +1,44 @@
1
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, Pe = Object.prototype.propertyIsEnumerable;
4
+ var ye = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
5
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
- Pe.call(t, n) && ge(e, n, t[n]);
10
+ Ne.call(t, n) && ge(e, n, t[n]);
11
11
  return e;
12
12
  }, S = (e, t) => $t(e, It(t));
13
- var Ne = (e, t) => {
13
+ var Pe = (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 && Pe.call(e, r) && (n[r] = e[r]);
19
+ t.indexOf(r) < 0 && Ne.call(e, r) && (n[r] = e[r]);
20
20
  return n;
21
21
  };
22
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) => {
23
+ var P = (e, t, n) => new Promise((r, s) => {
24
24
  var l = (p) => {
25
25
  try {
26
- g(n.next(p));
26
+ h(n.next(p));
27
27
  } catch (u) {
28
28
  s(u);
29
29
  }
30
30
  }, d = (p) => {
31
31
  try {
32
- g(n.throw(p));
32
+ h(n.throw(p));
33
33
  } catch (u) {
34
34
  s(u);
35
35
  }
36
- }, g = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(l, d);
37
- g((n = n.apply(e, t)).next());
36
+ }, h = (p) => p.done ? r(p.value) : Promise.resolve(p.value).then(l, d);
37
+ h((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as f, Fragment as B, jsx as o } from "react/jsx-runtime";
39
+ import { jsxs as g, Fragment as B, jsx as o } from "react/jsx-runtime";
40
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";
41
+ import { Typography as T, Button as we, Paper as Ze, Box as D, Drawer as Ae, Dialog as Tt, DialogTitle as Ft, DialogContent as yt, DialogActions as Nt, Autocomplete as Se, TextField as De, CircularProgress as ke, Chip as Pt, 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
42
  import qt from "@mui/material/CssBaseline";
43
43
  import { styled as L, createTheme as tt, alpha as me } from "@mui/material/styles";
44
44
  import { AgError as Xt } from "@australiangreens/ag-error";
@@ -51,9 +51,9 @@ import { atom as M, useSetAtom as it, useAtomValue as He, useAtom as X, getDefau
51
51
  import { useHydrateAtoms as st } from "jotai/utils";
52
52
  function lo({ text: e }) {
53
53
  const [t, n] = O(0);
54
- return /* @__PURE__ */ f(B, { children: [
55
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
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" }) }),
54
+ return /* @__PURE__ */ g(B, { children: [
55
+ /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
56
+ /* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
57
57
  /* @__PURE__ */ o(
58
58
  we,
59
59
  {
@@ -63,11 +63,11 @@ function lo({ text: e }) {
63
63
  children: "Hello I am a button"
64
64
  }
65
65
  ),
66
- /* @__PURE__ */ f("p", { children: [
66
+ /* @__PURE__ */ g("p", { children: [
67
67
  "This is some text: ",
68
68
  /* @__PURE__ */ o("span", { children: e })
69
69
  ] }),
70
- /* @__PURE__ */ f(Ze, { children: [
70
+ /* @__PURE__ */ g(Ze, { children: [
71
71
  "This number will incremember when button pressed: ",
72
72
  t
73
73
  ] })
@@ -139,12 +139,12 @@ const pt = Je(null), rn = {}, an = {}, sn = ({
139
139
  s({ open: p });
140
140
  }, []), d = oe(() => {
141
141
  s((p) => S(i({}, p), { open: !p.open }));
142
- }, []), g = i(i({
142
+ }, []), h = i(i({
143
143
  open: r,
144
144
  setOpen: l,
145
145
  toggleOpen: d
146
146
  }, e), t);
147
- return /* @__PURE__ */ o(pt.Provider, { value: g, children: n });
147
+ return /* @__PURE__ */ o(pt.Provider, { value: h, children: n });
148
148
  }, ln = () => {
149
149
  const e = Ye(pt);
150
150
  if (e === null)
@@ -236,7 +236,7 @@ function ho({
236
236
  children: t
237
237
  }) {
238
238
  const { open: n } = ln();
239
- return /* @__PURE__ */ f(en, { className: V.root, "data-testid": e, children: [
239
+ return /* @__PURE__ */ g(en, { className: V.root, "data-testid": e, children: [
240
240
  /* @__PURE__ */ o(qt, {}),
241
241
  /* @__PURE__ */ o(
242
242
  on,
@@ -258,26 +258,26 @@ const dn = ({
258
258
  primaryButton: s,
259
259
  secondaryButton: l,
260
260
  onClose: d,
261
- sx: g,
261
+ sx: h,
262
262
  "data-testid": p
263
263
  }) => {
264
264
  var b, A;
265
265
  const [u, w] = O(!1);
266
- return /* @__PURE__ */ f(
266
+ return /* @__PURE__ */ g(
267
267
  Tt,
268
268
  {
269
269
  open: e,
270
- onClose: () => N(void 0, null, function* () {
270
+ onClose: () => P(void 0, null, function* () {
271
271
  u || (l != null && l.onClick ? yield l.onClick() : d());
272
272
  }),
273
273
  fullWidth: !0,
274
274
  maxWidth: r != null ? r : "xs",
275
275
  "data-testid": p,
276
- sx: g,
276
+ sx: h,
277
277
  children: [
278
278
  /* @__PURE__ */ o(Ft, { children: t }),
279
279
  /* @__PURE__ */ o(yt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
280
- /* @__PURE__ */ f(Pt, { children: [
280
+ /* @__PURE__ */ g(Nt, { children: [
281
281
  /* @__PURE__ */ o(
282
282
  we,
283
283
  {
@@ -291,7 +291,7 @@ const dn = ({
291
291
  s && /* @__PURE__ */ o(
292
292
  we,
293
293
  {
294
- onClick: () => N(void 0, null, function* () {
294
+ onClick: () => P(void 0, null, function* () {
295
295
  var C;
296
296
  w(!0), yield (C = s.onClick) == null ? void 0 : C.call(s), w(!1);
297
297
  }),
@@ -307,7 +307,7 @@ const dn = ({
307
307
  );
308
308
  };
309
309
  function go({
310
- lookup: e = () => N(this, null, function* () {
310
+ lookup: e = () => P(this, null, function* () {
311
311
  }),
312
312
  enableHighlighting: t = !0,
313
313
  onChange: n,
@@ -315,7 +315,7 @@ function go({
315
315
  label: s,
316
316
  value: l,
317
317
  "data-testid": d,
318
- sx: g,
318
+ sx: h,
319
319
  textFieldColor: p,
320
320
  textFieldVariant: u = "filled",
321
321
  loadingText: w = "Loading...",
@@ -324,19 +324,19 @@ function go({
324
324
  error: C = !1,
325
325
  helperText: k = "",
326
326
  preLoadedOptions: v = void 0,
327
- disablePortal: m = !1
327
+ disablePortal: $ = !1
328
328
  }) {
329
- const [h, T] = O(""), [_, F] = O(v || []), [y, $] = O(!1), [H, P] = O(!1), R = (a, c) => {
329
+ const [m, f] = O(""), [_, F] = O(v || []), [y, I] = O(!1), [H, N] = O(!1), R = (a, c) => {
330
330
  const x = l.filter((q) => q.id !== c);
331
331
  n(x, "delete", a);
332
332
  };
333
333
  re(() => {
334
334
  let a;
335
- const c = () => N(this, null, function* () {
335
+ const c = () => P(this, null, function* () {
336
336
  a = new AbortController();
337
337
  try {
338
- const x = yield e(h, a.signal);
339
- F(x != null ? x : []), P(!1);
338
+ const x = yield e(m, a.signal);
339
+ F(x != null ? x : []), N(!1);
340
340
  } catch (x) {
341
341
  if (x instanceof Error && x.name === "AbortError")
342
342
  console.debug("Previous lookup request was cancelled");
@@ -344,23 +344,23 @@ function go({
344
344
  throw x;
345
345
  }
346
346
  });
347
- if (h !== "")
348
- return (!r || h.length >= r) && !v ? (P(!0), c()) : P(!1), function() {
347
+ if (m !== "")
348
+ return (!r || m.length >= r) && !v ? (N(!0), c()) : N(!1), function() {
349
349
  a && a.abort();
350
350
  };
351
- }, [h, e, r, v]), re(() => {
351
+ }, [m, e, r, v]), re(() => {
352
352
  !y && !v && F([]), !y && v && F(v);
353
353
  }, [y, v]);
354
354
  const W = Et(() => v ? (a, c) => a.filter(
355
355
  (x) => x.label.toLowerCase().includes(c.inputValue.toLowerCase())
356
356
  ) : (a) => a, [v]);
357
- return /* @__PURE__ */ f("div", { "data-testid": d, children: [
357
+ return /* @__PURE__ */ g("div", { "data-testid": d, children: [
358
358
  /* @__PURE__ */ o(
359
359
  Se,
360
360
  {
361
- sx: g,
361
+ sx: h,
362
362
  "data-testid": d ? `${d}:Autocomplete` : void 0,
363
- disablePortal: m,
363
+ disablePortal: $,
364
364
  multiple: !0,
365
365
  getOptionLabel: (a) => typeof a == "string" ? a : a.label,
366
366
  filterOptions: W,
@@ -369,12 +369,12 @@ function go({
369
369
  filterSelectedOptions: !0,
370
370
  includeInputInList: !0,
371
371
  value: l,
372
- onOpen: () => $(!0),
373
- onClose: () => $(!1),
372
+ onOpen: () => I(!0),
373
+ onClose: () => I(!1),
374
374
  onChange: (a, c, x) => {
375
375
  n(c, x, a);
376
376
  },
377
- onInputChange: (a, c) => T(c),
377
+ onInputChange: (a, c) => f(c),
378
378
  noOptionsText: b,
379
379
  loadingText: w,
380
380
  popupIcon: A,
@@ -387,7 +387,7 @@ function go({
387
387
  error: C,
388
388
  helperText: k,
389
389
  InputProps: S(i({}, a.InputProps), {
390
- endAdornment: /* @__PURE__ */ f(B, { children: [
390
+ endAdornment: /* @__PURE__ */ g(B, { children: [
391
391
  H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
392
392
  a.InputProps.endAdornment
393
393
  ] })
@@ -437,7 +437,7 @@ function go({
437
437
  }
438
438
  ),
439
439
  l.length > 0 && /* @__PURE__ */ o(D, { children: l.map((a) => /* @__PURE__ */ o(
440
- Nt,
440
+ Pt,
441
441
  {
442
442
  sx: {
443
443
  marginTop: 1,
@@ -459,7 +459,7 @@ function go({
459
459
  }
460
460
  ]
461
461
  },
462
- children: /* @__PURE__ */ o(E, { style: { whiteSpace: "normal" }, children: a.chipLabel ? a.chipLabel : a.label })
462
+ children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: a.chipLabel ? a.chipLabel : a.label })
463
463
  }
464
464
  ),
465
465
  "data-testid": d ? `${d}:Chip(${a.id.toString()})` : void 0,
@@ -483,63 +483,65 @@ const fo = ({
483
483
  sx: s,
484
484
  textFieldColor: l,
485
485
  textFieldVariant: d = "filled",
486
- "data-testid": g,
487
- minLength: p = 3,
488
- disablePortal: u = !1
486
+ "data-testid": h,
487
+ noOptionsText: p = "No options",
488
+ minLength: u = 3,
489
+ disablePortal: w = !1
489
490
  }) => {
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();
491
+ const [b, A] = O([]), [C, k] = O(!1);
492
+ let v;
493
+ const $ = (m) => P(void 0, null, function* () {
494
+ v = new AbortController();
494
495
  try {
495
- const h = yield e(m, k.signal);
496
- b(h != null ? h : []), C(!1);
497
- } catch (h) {
498
- if (h instanceof Error && h.name === "AbortError")
496
+ const f = yield e(m, v.signal);
497
+ A(f != null ? f : []), k(!1);
498
+ } catch (f) {
499
+ if (f instanceof Error && f.name === "AbortError")
499
500
  console.debug("Previous lookup request was cancelled");
500
501
  else
501
- throw h;
502
+ throw f;
502
503
  }
503
504
  });
504
- return /* @__PURE__ */ o("div", { "data-testid": g, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
505
+ return /* @__PURE__ */ o("div", { "data-testid": h, children: /* @__PURE__ */ o(Lt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
505
506
  Se,
506
507
  {
507
508
  sx: s,
508
- "data-testid": g ? `${g}:Autocomplete` : void 0,
509
- loading: A,
510
- options: w,
511
- onChange: (m, h) => {
512
- t(m, h);
509
+ "data-testid": h ? `${h}:Autocomplete` : void 0,
510
+ loading: C,
511
+ options: b,
512
+ onChange: (m, f) => {
513
+ t(m, f);
513
514
  },
514
- disablePortal: u,
515
+ disablePortal: w,
515
516
  filterOptions: (m) => m,
516
517
  value: r,
518
+ noOptionsText: p,
517
519
  getOptionLabel: (m) => m.label,
518
520
  renderInput: (m) => /* @__PURE__ */ o(
519
521
  De,
520
522
  S(i({
521
- "data-testid": g ? `${g}:Autocomplete:TextField` : void 0
523
+ "data-testid": h ? `${h}:Autocomplete:TextField` : void 0
522
524
  }, m), {
523
525
  variant: d,
524
526
  label: n,
525
527
  color: l
526
528
  })
527
529
  ),
528
- isOptionEqualToValue: (m, h) => m.id === h.id,
529
- onInputChange: (m, h) => {
530
- (h == null ? void 0 : h.length) >= p && (C(!0), v(h));
530
+ isOptionEqualToValue: (m, f) => m.id === f.id,
531
+ onInputChange: (m, f) => {
532
+ (f == null ? void 0 : f.length) >= u && (k(!0), $(f));
531
533
  },
532
- renderOption: (m, h) => /* @__PURE__ */ xe(
534
+ renderOption: (m, f) => /* @__PURE__ */ xe(
533
535
  "li",
534
536
  S(i({}, m), {
535
- key: h.id,
536
- "data-testid": g ? `${g}:Autocomplete:option(${h.id.toString()})` : void 0
537
+ key: f.id,
538
+ "data-testid": h ? `${h}:Autocomplete:option(${f.id.toString()})` : void 0
537
539
  }),
538
- h.label
540
+ f.label
539
541
  )
540
542
  }
541
543
  ) }) });
542
- }, pn = 24, un = 64, U = "TopBar", I = {
544
+ }, pn = 24, un = 64, U = "TopBar", E = {
543
545
  topStripe: `${U}-topStripe`,
544
546
  titleBar: `${U}-titleBar`,
545
547
  titleSlider: `${U}-titleSlider`,
@@ -553,18 +555,18 @@ const fo = ({
553
555
  var r, s;
554
556
  return {
555
557
  width: "100%",
556
- [`& .${I.topStripe}`]: {
558
+ [`& .${E.topStripe}`]: {
557
559
  width: "100%",
558
560
  height: `${pn}px`,
559
561
  backgroundColor: e.palette.primary.main
560
562
  },
561
- [`& .${I.titleBar}`]: {
563
+ [`& .${E.titleBar}`]: {
562
564
  backgroundColor: e.palette.primary.light,
563
565
  height: `${un}px`,
564
566
  padding: e.spacing(0, 3),
565
567
  width: "100%"
566
568
  },
567
- [`& .${I.titleSlider}`]: i(i({
569
+ [`& .${E.titleSlider}`]: i(i({
568
570
  height: "100%",
569
571
  display: "flex",
570
572
  alignItems: "center",
@@ -573,14 +575,14 @@ const fo = ({
573
575
  easing: e.transitions.easing.sharp,
574
576
  duration: e.transitions.duration.leavingScreen
575
577
  }),
576
- [`& .${I.leftPanelButton}`]: {
578
+ [`& .${E.leftPanelButton}`]: {
577
579
  marginRight: e.spacing(2),
578
580
  flexGrow: 0
579
581
  },
580
- [`& .${I.titleText}`]: {
582
+ [`& .${E.titleText}`]: {
581
583
  flexGrow: 1
582
584
  },
583
- [`& .${I.rightPanelButton}`]: {
585
+ [`& .${E.rightPanelButton}`]: {
584
586
  flexGrow: 0
585
587
  }
586
588
  }, (t == null ? void 0 : t.open) && {
@@ -604,13 +606,13 @@ function gn({
604
606
  rightPanel: n,
605
607
  "data-testid": r
606
608
  }) {
607
- return /* @__PURE__ */ f(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
608
- /* @__PURE__ */ o("div", { className: I.topStripe }),
609
- /* @__PURE__ */ o("div", { className: I.titleBar, children: /* @__PURE__ */ f(D, { className: I.titleSlider, children: [
610
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ f(
609
+ return /* @__PURE__ */ g(hn, { leftPanel: t, rightPanel: n, "data-testid": r, children: [
610
+ /* @__PURE__ */ o("div", { className: E.topStripe }),
611
+ /* @__PURE__ */ o("div", { className: E.titleBar, children: /* @__PURE__ */ g(D, { className: E.titleSlider, children: [
612
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ g(
611
613
  Q,
612
614
  {
613
- className: I.leftPanelButton,
615
+ className: E.leftPanelButton,
614
616
  color: "inherit",
615
617
  "aria-label": "Open left side panel",
616
618
  onClick: t == null ? void 0 : t.onOpen,
@@ -622,11 +624,11 @@ function gn({
622
624
  ]
623
625
  }
624
626
  ),
625
- /* @__PURE__ */ o(E, { className: I.titleText, variant: "h6", noWrap: !0, children: e }),
626
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ f(
627
+ /* @__PURE__ */ o(T, { className: E.titleText, variant: "h6", noWrap: !0, children: e }),
628
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ g(
627
629
  Q,
628
630
  {
629
- className: I.rightPanelButton,
631
+ className: E.rightPanelButton,
630
632
  color: "inherit",
631
633
  "aria-label": "Open right side panel",
632
634
  onClick: n == null ? void 0 : n.onOpen,
@@ -700,7 +702,7 @@ function ze({
700
702
  titleText: s = "",
701
703
  width: l = ut,
702
704
  showCloseArrow: d = !0,
703
- debugOpacity: g = !1,
705
+ debugOpacity: h = !1,
704
706
  headerBoxProps: p = {},
705
707
  onOpened: u,
706
708
  onClosed: w,
@@ -709,7 +711,7 @@ function ze({
709
711
  navBarWidthOpen: C = 0,
710
712
  navBarWidthClosed: k = 0
711
713
  }) {
712
- return /* @__PURE__ */ f(
714
+ return /* @__PURE__ */ g(
713
715
  fn,
714
716
  {
715
717
  SlideProps: {
@@ -720,24 +722,24 @@ function ze({
720
722
  anchor: t,
721
723
  open: n,
722
724
  width: l,
723
- debugOpacity: g,
725
+ debugOpacity: h,
724
726
  "data-testid": b,
725
727
  navBarOpen: A,
726
728
  navBarWidthOpen: C,
727
729
  navBarWidthClosed: k,
728
730
  children: [
729
- /* @__PURE__ */ o(mn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ f(B, { children: [
730
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s }),
731
- d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
731
+ /* @__PURE__ */ o(mn, S(i({ anchor: t }, p), { children: t === "left" ? /* @__PURE__ */ g(B, { children: [
732
+ /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: s }),
733
+ d && /* @__PURE__ */ g(Q, { onClick: r, size: "large", "aria-label": "Close left side panel", children: [
732
734
  /* @__PURE__ */ o(rt, { "data-testid": "arrowbackicon" }),
733
735
  " "
734
736
  ] })
735
- ] }) : /* @__PURE__ */ f(B, { children: [
736
- d && /* @__PURE__ */ f(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
737
+ ] }) : /* @__PURE__ */ g(B, { children: [
738
+ d && /* @__PURE__ */ g(Q, { onClick: r, size: "large", "aria-label": "Close right side panel", children: [
737
739
  /* @__PURE__ */ o(ot, {}),
738
740
  " "
739
741
  ] }),
740
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: s })
742
+ /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: s })
741
743
  ] }) })),
742
744
  e
743
745
  ]
@@ -795,16 +797,16 @@ function mo({
795
797
  sidePanelsAreMutuallyExclusive: s = !0,
796
798
  debugOpacity: l = !1,
797
799
  pageContainerProps: d,
798
- pageContentDataTestId: g,
800
+ pageContentDataTestId: h,
799
801
  topBarDataTestId: p,
800
802
  navBarOpen: u,
801
803
  navBarWidthOpen: w,
802
804
  navBarWidthClosed: b
803
805
  }) {
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
+ const [A, C] = O(Ce), [k, v] = O(ve), [$, m] = O(Ce), [f, _] = O(ve), F = n !== void 0, y = r !== void 0, {
807
+ titleText: I,
806
808
  content: H,
807
- flavour: P,
809
+ flavour: N,
808
810
  open: R,
809
811
  onChangeOpen: W,
810
812
  width: a,
@@ -827,16 +829,16 @@ function mo({
827
829
  dataTestId: kt
828
830
  } = r ? i(i({}, te), r) : i({}, te);
829
831
  re(() => {
830
- x !== Ce && (C(x), h(x));
832
+ x !== Ce && (C(x), m(x));
831
833
  }, [x]), re(() => {
832
834
  Z !== ve && (v(Z), _(Z));
833
835
  }, [Z]);
834
836
  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);
837
+ R === void 0 && (C(z), s && y && (z ? (v(!1), _(k)) : v(f))), W && W(z);
836
838
  }, Fe = (z) => {
837
- de === void 0 && (v(z), s && F && (z ? (C(!1), h(A)) : C(m))), Ee && Ee(z);
839
+ de === void 0 && (v(z), s && F && (z ? (C(!1), m(A)) : C($))), Ee && Ee(z);
838
840
  };
839
- return /* @__PURE__ */ f(D, { children: [
841
+ return /* @__PURE__ */ g(D, { children: [
840
842
  F && /* @__PURE__ */ o(
841
843
  ze,
842
844
  {
@@ -845,7 +847,7 @@ function mo({
845
847
  open: ue,
846
848
  onClose: () => Te(!1),
847
849
  width: a,
848
- titleText: $,
850
+ titleText: I,
849
851
  debugOpacity: l,
850
852
  showCloseArrow: c === "both" || c === "close",
851
853
  onOpened: q,
@@ -880,7 +882,7 @@ function mo({
880
882
  i(i({
881
883
  titleText: t,
882
884
  "data-testid": p
883
- }, F && P === "push" ? {
885
+ }, F && N === "push" ? {
884
886
  leftPanel: {
885
887
  open: ue,
886
888
  width: a,
@@ -898,7 +900,7 @@ function mo({
898
900
  ),
899
901
  /* @__PURE__ */ o(
900
902
  Cn,
901
- S(i(i({}, P === "push" ? {
903
+ S(i(i({}, N === "push" ? {
902
904
  leftPanel: {
903
905
  open: ue,
904
906
  width: a
@@ -909,7 +911,7 @@ function mo({
909
911
  width: pe
910
912
  }
911
913
  } : {}), {
912
- children: /* @__PURE__ */ o(vn, S(i({ "data-testid": g }, d), { children: e }))
914
+ children: /* @__PURE__ */ o(vn, S(i({ "data-testid": h }, d), { children: e }))
913
915
  })
914
916
  )
915
917
  ] });
@@ -1003,7 +1005,7 @@ function On(e) {
1003
1005
  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
1006
  function In({ user: e, domainCode: t, open: n }) {
1005
1007
  const r = ae();
1006
- return /* @__PURE__ */ f(
1008
+ return /* @__PURE__ */ g(
1007
1009
  D,
1008
1010
  {
1009
1011
  sx: {
@@ -1036,9 +1038,9 @@ function In({ user: e, domainCode: t, open: n }) {
1036
1038
  ) : /* @__PURE__ */ o(Le, { sx: { width: "100%", height: "100%" } })
1037
1039
  }
1038
1040
  ),
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%" })
1041
+ /* @__PURE__ */ o(Dn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ht, { in: n, children: /* @__PURE__ */ g(D, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1042
+ e != null && e.name ? /* @__PURE__ */ o(T, { children: e.name }) : /* @__PURE__ */ o(Me, { animation: !1, width: "50%" }),
1043
+ t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Me, { animation: !1, width: "25%" })
1042
1044
  ] }) }) })
1043
1045
  ]
1044
1046
  }
@@ -1052,11 +1054,11 @@ function En({
1052
1054
  top: s,
1053
1055
  middle: l,
1054
1056
  bottom: d,
1055
- user: g,
1057
+ user: h,
1056
1058
  domainCode: p
1057
1059
  }) {
1058
1060
  const u = ht(), w = it(K);
1059
- return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ f(
1061
+ return /* @__PURE__ */ o(Sn, { className: j.root, "data-testid": r, children: /* @__PURE__ */ g(
1060
1062
  kn,
1061
1063
  {
1062
1064
  open: e,
@@ -1073,14 +1075,14 @@ function En({
1073
1075
  isSmallScreen: u,
1074
1076
  children: [
1075
1077
  !u && /* @__PURE__ */ o(Rt, {}),
1076
- s && /* @__PURE__ */ f(D, { flexGrow: "0", children: [
1078
+ s && /* @__PURE__ */ g(D, { flexGrow: "0", children: [
1077
1079
  s,
1078
1080
  /* @__PURE__ */ o(_e, { variant: "middle" })
1079
1081
  ] }),
1080
1082
  /* @__PURE__ */ o(D, { flexGrow: "1", children: Array.isArray(l) ? /* @__PURE__ */ o(An, { links: l }) : l }),
1081
- /* @__PURE__ */ f(D, { flexGrow: "0", children: [
1083
+ /* @__PURE__ */ g(D, { flexGrow: "0", children: [
1082
1084
  /* @__PURE__ */ o(_e, { variant: "middle" }),
1083
- /* @__PURE__ */ o(In, { user: g, domainCode: p, open: e }),
1085
+ /* @__PURE__ */ o(In, { user: h, domainCode: p, open: e }),
1084
1086
  d && /* @__PURE__ */ o(B, { children: d })
1085
1087
  ] })
1086
1088
  ]
@@ -1118,9 +1120,9 @@ function Tn({
1118
1120
  const Fn = "TopBar", yn = {
1119
1121
  titleText: `${Fn}-titleText`
1120
1122
  };
1121
- function Pn({ titleText: e = "", height: t, "data-testid": n }) {
1122
- const r = it(K), s = () => r((g) => !g), l = ae(), d = ht();
1123
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ f(
1123
+ function Nn({ titleText: e = "", height: t, "data-testid": n }) {
1124
+ const r = it(K), s = () => r((h) => !h), l = ae(), d = ht();
1125
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ g(
1124
1126
  Ze,
1125
1127
  {
1126
1128
  square: !0,
@@ -1139,7 +1141,7 @@ function Pn({ titleText: e = "", height: t, "data-testid": n }) {
1139
1141
  },
1140
1142
  children: [
1141
1143
  /* @__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 })
1144
+ /* @__PURE__ */ o(T, { className: yn.titleText, variant: "h6", children: e })
1143
1145
  ]
1144
1146
  }
1145
1147
  ) });
@@ -1152,7 +1154,7 @@ function Co({
1152
1154
  pageContentDataTestId: s,
1153
1155
  topBarDataTestId: l,
1154
1156
  navBarDataTestId: d,
1155
- navBarMiddle: g,
1157
+ navBarMiddle: h,
1156
1158
  navBarBottom: p,
1157
1159
  user: u,
1158
1160
  domainCode: w
@@ -1161,17 +1163,17 @@ function Co({
1161
1163
  [K, n != null ? n : !0],
1162
1164
  [be, t != null ? t : ""]
1163
1165
  ]);
1164
- const b = He(K), [A] = X(gt), [C] = X(ft), k = He(be), [v] = X(mt), [m] = X(Ct);
1165
- return /* @__PURE__ */ f(D, { children: [
1166
+ const b = He(K), [A] = X(gt), [C] = X(ft), k = He(be), [v] = X(mt), [$] = X(Ct);
1167
+ return /* @__PURE__ */ g(D, { children: [
1166
1168
  /* @__PURE__ */ o(Wt, {}),
1167
- /* @__PURE__ */ o(Pn, { titleText: k, "data-testid": l, height: v }),
1168
- /* @__PURE__ */ f(D, { sx: { display: "flex" }, children: [
1169
+ /* @__PURE__ */ o(Nn, { titleText: k, "data-testid": l, height: v }),
1170
+ /* @__PURE__ */ g(D, { sx: { display: "flex" }, children: [
1169
1171
  /* @__PURE__ */ o(
1170
1172
  En,
1171
1173
  {
1172
1174
  open: b,
1173
- top: m,
1174
- middle: g,
1175
+ top: $,
1176
+ middle: h,
1175
1177
  bottom: p,
1176
1178
  user: u,
1177
1179
  domainCode: w,
@@ -1193,7 +1195,7 @@ function Co({
1193
1195
  ] })
1194
1196
  ] });
1195
1197
  }
1196
- const Nn = {
1198
+ const Pn = {
1197
1199
  autoHideDuration: 6e3,
1198
1200
  anchorOrigin: { vertical: "top", horizontal: "center" },
1199
1201
  // The default is false. If we prefer timer to continue when window loses
@@ -1220,14 +1222,14 @@ function Wn(l) {
1220
1222
  overrideActions: t = Rn,
1221
1223
  shouldClose: n = Bn.shouldClose,
1222
1224
  children: r
1223
- } = d, s = Ne(d, [
1225
+ } = d, s = Pe(d, [
1224
1226
  "overrideState",
1225
1227
  "overrideActions",
1226
1228
  "shouldClose",
1227
1229
  "children"
1228
1230
  ]);
1229
1231
  var W;
1230
- const [{ open: g }, p] = O({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), A = oe((a) => {
1232
+ const [{ open: h }, p] = O({ open: !1 }), u = fe([]), w = fe(Date.now()), b = fe(0), A = oe((a) => {
1231
1233
  p({ open: a });
1232
1234
  }, []), C = oe((a = {}) => {
1233
1235
  b.current += 1, u.current.length >= Xe && Date.now() - w.current >= je && (w.current = Date.now(), console.error(
@@ -1237,7 +1239,7 @@ function Wn(l) {
1237
1239
  key: Mn()
1238
1240
  }), a);
1239
1241
  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) => {
1242
+ }, []), k = (a = "", c = {}) => C(i({ message: a, severity: "success" }, c)), v = (a = "", c = {}) => C(i({ message: a, severity: "info" }, c)), $ = (a = "", c = {}) => C(i({ message: a, severity: "warning" }, c)), m = (a = "", c = {}) => C(i({ message: a, severity: "error" }, c)), f = (a) => {
1241
1243
  const c = u.current.findIndex((x) => x.key === a);
1242
1244
  if (c !== -1)
1243
1245
  return c === 0 ? (p({ open: !1 }), u.current[0]) : u.current.splice(c, 1);
@@ -1246,43 +1248,43 @@ function Wn(l) {
1246
1248
  }, F = () => {
1247
1249
  }, y = () => {
1248
1250
  u.current.shift(), u.current.length > 0 && p({ open: !0 });
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({
1252
- open: g,
1251
+ }, I = (W = u.current[0]) != null ? W : i({}, qe), H = {};
1252
+ "autoHideDuration" in I && (H.autoHideDuration = I.autoHideDuration);
1253
+ const N = i(i({}, Pn), s), R = i(i({
1254
+ open: h,
1253
1255
  setOpen: A,
1254
1256
  enqueueNotification: C,
1255
1257
  enqueueSuccessNotification: k,
1256
1258
  enqueueInfoNotification: v,
1257
- enqueueWarningNotification: m,
1258
- enqueueErrorNotification: h,
1259
- removeNotification: T
1259
+ enqueueWarningNotification: $,
1260
+ enqueueErrorNotification: m,
1261
+ removeNotification: f
1260
1262
  }, e), t);
1261
- return /* @__PURE__ */ f(xt.Provider, { value: R, children: [
1263
+ return /* @__PURE__ */ g(xt.Provider, { value: R, children: [
1262
1264
  r,
1263
1265
  /* @__PURE__ */ o(
1264
1266
  zt,
1265
- S(i(i({}, P), H), {
1266
- open: g,
1267
+ S(i(i({}, N), H), {
1268
+ open: h,
1267
1269
  onClose: _,
1268
1270
  TransitionProps: {
1269
1271
  onExited: y,
1270
1272
  onExit: F
1271
1273
  },
1272
1274
  sx: { zIndex: Ln },
1273
- children: /* @__PURE__ */ f("div", { children: [
1275
+ children: /* @__PURE__ */ g("div", { children: [
1274
1276
  /* @__PURE__ */ o(
1275
1277
  Gt,
1276
1278
  {
1277
1279
  onClose: (a) => _(a, "closeAlert"),
1278
- severity: $.severity,
1280
+ severity: I.severity,
1279
1281
  variant: "filled",
1280
- icon: $.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
1281
- style: $.progressIndicator === "linear" ? _n : void 0,
1282
- children: $.message
1282
+ icon: I.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
1283
+ style: I.progressIndicator === "linear" ? _n : void 0,
1284
+ children: I.message
1283
1285
  }
1284
1286
  ),
1285
- $.progressIndicator === "linear" && /* @__PURE__ */ o(Ut, { color: "primary" })
1287
+ I.progressIndicator === "linear" && /* @__PURE__ */ o(Ut, { color: "primary" })
1286
1288
  ] })
1287
1289
  })
1288
1290
  )
@@ -1331,13 +1333,13 @@ const Qe = M(
1331
1333
  applicationName: s,
1332
1334
  handleLogout: l
1333
1335
  }) => {
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* () {
1335
- p ? (g(p), w(`Set domain to ${p}`), n()) : g("");
1336
- }), v = () => N(void 0, null, function* () {
1336
+ const [d, h] = 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 = () => P(void 0, null, function* () {
1337
+ p ? (h(p), w(`Set domain to ${p}`), n()) : h("");
1338
+ }), v = () => P(void 0, null, function* () {
1337
1339
  d && !b && !A ? (u(d), n()) : C && l();
1338
1340
  });
1339
- let m;
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(
1341
+ let $;
1342
+ return b ? $ = "Unable to retrieve your active organisations. Try logging in again." : A && ($ = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ g(
1341
1343
  dn,
1342
1344
  {
1343
1345
  isOpen: t,
@@ -1355,7 +1357,7 @@ const Qe = M(
1355
1357
  onClose: C ? () => {
1356
1358
  } : n,
1357
1359
  children: [
1358
- /* @__PURE__ */ f(E, { marginBottom: 2, children: [
1360
+ /* @__PURE__ */ g(T, { marginBottom: 2, children: [
1359
1361
  "Select the default organisation that you want to use with the ",
1360
1362
  s,
1361
1363
  "."
@@ -1367,25 +1369,25 @@ const Qe = M(
1367
1369
  multiple: !1,
1368
1370
  disableClearable: !1,
1369
1371
  value: p !== "" ? p : null,
1370
- onChange: (h, T) => u(T != null ? T : ""),
1372
+ onChange: (m, f) => u(f != null ? f : ""),
1371
1373
  getOptionLabel: Vn,
1372
1374
  options: [...r],
1373
- renderInput: (h) => /* @__PURE__ */ o(
1375
+ renderInput: (m) => /* @__PURE__ */ o(
1374
1376
  De,
1375
- S(i({}, h), {
1377
+ S(i({}, m), {
1376
1378
  variant: "filled",
1377
1379
  label: "Select organisation",
1378
- InputProps: S(i({}, h.InputProps), {
1379
- endAdornment: /* @__PURE__ */ f(B, { children: [
1380
+ InputProps: S(i({}, m.InputProps), {
1381
+ endAdornment: /* @__PURE__ */ g(B, { children: [
1380
1382
  e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1381
- h.InputProps.endAdornment
1383
+ m.InputProps.endAdornment
1382
1384
  ] })
1383
1385
  })
1384
1386
  })
1385
1387
  )
1386
1388
  }
1387
1389
  ),
1388
- m && /* @__PURE__ */ o(Vt, { error: !0, children: m })
1390
+ $ && /* @__PURE__ */ o(Vt, { error: !0, children: $ })
1389
1391
  ]
1390
1392
  }
1391
1393
  );