@australiangreens/ag-internal-components 0.0.57 → 0.0.58

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