@australiangreens/ag-internal-components 0.0.58 → 0.0.60

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