@australiangreens/ag-internal-components 0.0.51 → 0.0.53

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