@gen-epix/ui-client-common 4.6.0 → 4.6.1

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.
@@ -14,8 +14,8 @@ import { useOrganizationMapQuery as f } from "../../../dataHooks/useOrganization
14
14
  import { n as p } from "../../../_chunks/Notifications.js";
15
15
  import { withPermissions as m } from "../../../hoc/withPermissions/index.js";
16
16
  import { UserSettingsService as h } from "../../../classes/services/UserSettingsService/index.js";
17
- import { UserFeedbackDialog as ee } from "../UserFeedbackDialog/index.js";
18
- import { OutagesDialog as g } from "../OutagesDialog/index.js";
17
+ import { UserFeedbackDialog as g } from "../UserFeedbackDialog/index.js";
18
+ import { OutagesDialog as ee } from "../OutagesDialog/index.js";
19
19
  import { OrganizationSwitcherDialog as _ } from "../OrganizationSwitcherDialog/index.js";
20
20
  import { MyPermissionsDialog as v } from "../MyPermissionsDialog/index.js";
21
21
  import { LicensesDialog as y } from "../LicensesDialog/index.js";
@@ -24,16 +24,16 @@ import { FeatureFlagsService as x } from "../../../classes/services/FeatureFlags
24
24
  import { container as S } from "tsyringe";
25
25
  import { StringUtil as C } from "@gen-epix/ui-core/utils/StringUtil";
26
26
  import { CommonDbCommandName as w, CommonDbLogLevel as T, CommonDbPermissionType as E } from "@gen-epix/api-commondb";
27
- import { AppBar as D, Badge as O, Box as k, CircularProgress as te, Container as ne, IconButton as A, Link as re, List as j, ListItem as M, ListItemButton as N, ListItemIcon as P, ListItemText as F, Popover as I, Toolbar as L, Tooltip as R, Typography as z, styled as B, useTheme as V } from "@mui/material";
27
+ import { AppBar as D, Badge as O, Box as k, CircularProgress as A, Container as te, IconButton as j, Link as ne, List as M, ListItem as N, ListItemButton as P, ListItemIcon as F, ListItemText as I, Popover as L, Toolbar as R, Tooltip as z, Typography as re, styled as B, useTheme as V } from "@mui/material";
28
28
  import { useCallback as H, useEffect as U, useId as W, useMemo as G, useRef as K, useState as q } from "react";
29
29
  import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
30
30
  import { useTranslation as Z } from "react-i18next";
31
31
  import { TestIdUtil as Q } from "@gen-epix/ui-core/utils/TestIdUtil";
32
32
  import ie from "@mui/icons-material/ContentCopy";
33
- import { NavLink as ae } from "react-router-dom";
34
- import { useSubscribable as oe } from "@gen-epix/ui-core/hooks/useSubscribable";
35
- import se from "@mui/icons-material/Menu";
36
- import $ from "@mui/icons-material/MoreVert";
33
+ import { NavLink as $ } from "react-router-dom";
34
+ import { useSubscribable as ae } from "@gen-epix/ui-core/hooks/useSubscribable";
35
+ import oe from "@mui/icons-material/Menu";
36
+ import se from "@mui/icons-material/MoreVert";
37
37
  import { Confirmation as ce } from "@gen-epix/ui-core-components/components/Confirmation";
38
38
  import { useAuth as le } from "react-oidc-context";
39
39
  import ue from "@mui/icons-material/Notifications";
@@ -47,51 +47,57 @@ import _e from "@mui/icons-material/Logout";
47
47
  import ve from "@mui/icons-material/Key";
48
48
  import ye from "@mui/icons-material/ChangeCircle";
49
49
  // src/components/ui/ApplicationBar/ApplicationBarNavigationMenu.tsx
50
- var be = B(ae)(({ theme: e }) => ({
50
+ var be = B($)(({ theme: e }) => ({
51
51
  "&:hover": { textDecoration: "underline" },
52
52
  color: e.palette.secondary.contrastText,
53
53
  display: "inline-block",
54
54
  fontSize: "1.3rem",
55
55
  textDecoration: "none"
56
56
  })), xe = ({ fullWidth: e }) => {
57
- let { t } = Z(), n = V(), r = G(() => S.resolve(i), []), o = W(), s = G(() => {
57
+ let { t } = Z(), n = V(), r = G(() => ({
58
+ activeBackground: n.palette.primary.contrastText,
59
+ activeColor: n.palette.primary.main,
60
+ background: n.palette.primary.main,
61
+ primaryColor: n.palette.primary.contrastText,
62
+ ...n.components?.GenEpixUiClientCommonApplicationBarNavigationMenu ?? {}
63
+ }), [n]), o = G(() => S.resolve(i), []), s = W(), c = G(() => {
58
64
  let e = S.resolve(a).routes.find((e) => e.handle.root);
59
65
  return [e, ...e.children.filter((e) => !e.handle.hidden)];
60
- }, []), [c, l] = q(!1);
66
+ }, []), [l, u] = q(!1);
61
67
  U(() => {
62
- if (c) {
68
+ if (l) {
63
69
  let e = (e) => {
64
- e.key === "Escape" && l(!1);
70
+ e.key === "Escape" && u(!1);
65
71
  };
66
72
  return document.addEventListener("keydown", e), () => {
67
73
  document.removeEventListener("keydown", e);
68
74
  };
69
75
  }
70
- }, [c]);
71
- let u = H(() => {
72
- l((e) => !e);
73
- }, []), d = H((e) => {
76
+ }, [l]);
77
+ let d = H(() => {
78
+ u((e) => !e);
79
+ }, []), f = H((e) => {
74
80
  e.currentTarget.ariaDisabled === "true" && e.preventDefault();
75
81
  }, []);
76
82
  return /* @__PURE__ */ X(k, {
77
83
  sx: { flexGrow: 1 },
78
- children: [/* @__PURE__ */ Y(A, {
79
- "aria-controls": o,
84
+ children: [/* @__PURE__ */ Y(j, {
85
+ "aria-controls": s,
80
86
  "aria-label": t`Toggle navigation menu`,
81
- onClick: u,
87
+ onClick: d,
82
88
  sx: {
83
- color: n.components.GenEpixUiClientCommonNavbar.primaryColor,
89
+ color: r.primaryColor,
84
90
  [n.breakpoints.up("md")]: { display: "none" }
85
91
  },
86
- children: /* @__PURE__ */ Y(se, {})
92
+ children: /* @__PURE__ */ Y(oe, {})
87
93
  }), /* @__PURE__ */ Y(k, {
88
94
  component: "nav",
89
- id: o,
95
+ id: s,
90
96
  sx: {
91
97
  flexGrow: 1,
92
98
  [n.breakpoints.down("md")]: {
93
- background: n.components.GenEpixUiClientCommonNavbar.background,
94
- display: c ? "block" : "none",
99
+ background: r.background,
100
+ display: l ? "block" : "none",
95
101
  left: 0,
96
102
  paddingBottom: 4,
97
103
  position: "absolute",
@@ -111,22 +117,22 @@ var be = B(ae)(({ theme: e }) => ({
111
117
  margin: 0
112
118
  }
113
119
  },
114
- children: s.filter((e) => r.doesUserHavePermissionForRoute(e)).map((e) => {
120
+ children: c.filter((e) => o.doesUserHavePermissionForRoute(e)).map((e) => {
115
121
  let t = !!e.handle.disabled;
116
122
  return /* @__PURE__ */ Y(k, {
117
123
  component: "li",
118
124
  sx: {
119
125
  "&:has(.active:not([aria-disabled=\"true\"]))": {
120
- "& svg": { color: n.components.GenEpixUiClientCommonNavbar.activeColor },
121
- a: { color: n.components.GenEpixUiClientCommonNavbar.activeColor },
122
- background: n.components.GenEpixUiClientCommonNavbar.activeBackground
126
+ "& svg": { color: r.activeColor },
127
+ a: { color: r.activeColor },
128
+ background: r.activeBackground
123
129
  },
124
130
  "& svg": {
125
131
  color: t ? n.palette.grey[400] : void 0,
126
132
  marginTop: "6px"
127
133
  },
128
134
  alignItems: "center",
129
- color: t ? n.palette.grey[400] : n.components.GenEpixUiClientCommonNavbar.primaryColor,
135
+ color: t ? n.palette.grey[400] : r.primaryColor,
130
136
  display: "flex",
131
137
  fontWeight: 800,
132
138
  height: 48,
@@ -136,7 +142,7 @@ var be = B(ae)(({ theme: e }) => ({
136
142
  children: /* @__PURE__ */ X(be, {
137
143
  "aria-disabled": t || void 0,
138
144
  "aria-label": e.handle.title,
139
- onClick: d,
145
+ onClick: f,
140
146
  sx: {
141
147
  "&:hover": { textDecoration: t ? "none" : void 0 },
142
148
  color: t ? n.palette.grey[400] : void 0,
@@ -168,7 +174,7 @@ var be = B(ae)(({ theme: e }) => ({
168
174
  }, []), c = H(() => {
169
175
  a(!1), S.resolve(h).showShowUserFeedbackTooltip = !1;
170
176
  }, []);
171
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(R, {
177
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(z, {
172
178
  arrow: !0,
173
179
  color: "secondary",
174
180
  onMouseEnter: c,
@@ -183,7 +189,7 @@ var be = B(ae)(({ theme: e }) => ({
183
189
  } }
184
190
  },
185
191
  title: e`Would you like to share your feedback?`,
186
- children: /* @__PURE__ */ X(A, {
192
+ children: /* @__PURE__ */ X(j, {
187
193
  "aria-label": e`Feedback`,
188
194
  color: "inherit",
189
195
  onClick: s,
@@ -199,7 +205,7 @@ var be = B(ae)(({ theme: e }) => ({
199
205
  children: e`Feedback`
200
206
  })]
201
207
  })
202
- }), /* @__PURE__ */ Y(ee, { ref: r })] });
208
+ }), /* @__PURE__ */ Y(g, { ref: r })] });
203
209
  }, we = ({ anchorElement: e, onClose: t }) => {
204
210
  let n = G(() => C.createUuid(), []), r = K(null), i = !!e, { t: a } = Z(), s = o(), [c, l] = q(!1), u = H(() => {
205
211
  r.current.open();
@@ -207,7 +213,7 @@ var be = B(ae)(({ theme: e }) => ({
207
213
  let e = `Frontend version: ${s.getSoftwareVersion()}\nBackend version: ${S.resolve(b).version}\nURL: ${window.location.href}\nDate/time: ${(/* @__PURE__ */ new Date()).toISOString()}`;
208
214
  await navigator.clipboard.writeText(e), l(!0), setTimeout(() => l(!1), 2e3);
209
215
  }, [s]);
210
- return /* @__PURE__ */ Y(I, {
216
+ return /* @__PURE__ */ Y(L, {
211
217
  ...Q.createAttributes("InfoMenu"),
212
218
  anchorEl: e,
213
219
  anchorOrigin: {
@@ -221,16 +227,16 @@ var be = B(ae)(({ theme: e }) => ({
221
227
  horizontal: "right",
222
228
  vertical: "top"
223
229
  },
224
- children: /* @__PURE__ */ X(j, {
230
+ children: /* @__PURE__ */ X(M, {
225
231
  sx: {
226
232
  maxWidth: 300,
227
233
  minWidth: 200,
228
234
  width: "100%"
229
235
  },
230
236
  children: [
231
- /* @__PURE__ */ Y(M, {
237
+ /* @__PURE__ */ Y(N, {
232
238
  divider: !0,
233
- children: /* @__PURE__ */ Y(F, {
239
+ children: /* @__PURE__ */ Y(I, {
234
240
  primary: a("Frontend version"),
235
241
  secondary: s.getSoftwareVersion(),
236
242
  slotProps: { primary: { sx: {
@@ -239,9 +245,9 @@ var be = B(ae)(({ theme: e }) => ({
239
245
  } } }
240
246
  })
241
247
  }),
242
- /* @__PURE__ */ Y(M, {
248
+ /* @__PURE__ */ Y(N, {
243
249
  divider: !0,
244
- children: /* @__PURE__ */ Y(F, {
250
+ children: /* @__PURE__ */ Y(I, {
245
251
  primary: a("Backend version"),
246
252
  secondary: S.resolve(b).version,
247
253
  slotProps: { primary: { sx: {
@@ -250,11 +256,11 @@ var be = B(ae)(({ theme: e }) => ({
250
256
  } } }
251
257
  })
252
258
  }),
253
- /* @__PURE__ */ Y(M, {
259
+ /* @__PURE__ */ Y(N, {
254
260
  divider: !0,
255
- children: /* @__PURE__ */ X(N, {
261
+ children: /* @__PURE__ */ X(P, {
256
262
  onClick: d,
257
- children: [/* @__PURE__ */ Y(P, { children: c ? /* @__PURE__ */ Y(me, { color: "success" }) : /* @__PURE__ */ Y(ie, { color: "secondary" }) }), /* @__PURE__ */ Y(F, {
263
+ children: [/* @__PURE__ */ Y(F, { children: c ? /* @__PURE__ */ Y(me, { color: "success" }) : /* @__PURE__ */ Y(ie, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
258
264
  primary: a`Copy version information to clipboard`,
259
265
  slotProps: { primary: { sx: {
260
266
  color: "secondary.main",
@@ -263,9 +269,9 @@ var be = B(ae)(({ theme: e }) => ({
263
269
  })]
264
270
  })
265
271
  }),
266
- /* @__PURE__ */ X(M, { children: [/* @__PURE__ */ X(N, {
272
+ /* @__PURE__ */ X(N, { children: [/* @__PURE__ */ X(P, {
267
273
  onClick: u,
268
- children: [/* @__PURE__ */ Y(P, { children: /* @__PURE__ */ Y(pe, { color: "secondary" }) }), /* @__PURE__ */ Y(F, {
274
+ children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(pe, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
269
275
  primary: a`Show license information`,
270
276
  slotProps: { primary: { sx: {
271
277
  color: "secondary.main",
@@ -282,7 +288,7 @@ var be = B(ae)(({ theme: e }) => ({
282
288
  }, []), a = H(() => {
283
289
  t(null);
284
290
  }, []);
285
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
291
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
286
292
  color: "inherit",
287
293
  onClick: i,
288
294
  title: "Code information",
@@ -302,12 +308,12 @@ var be = B(ae)(({ theme: e }) => ({
302
308
  onClose: a
303
309
  })] });
304
310
  }, Ee = () => {
305
- let { t: e } = Z(), t = V(), n = oe(S.resolve(u)), r = G(() => n.some((e) => e.isLoading), [n]), [i, a] = q(!1), o = H(() => {
311
+ let { t: e } = Z(), t = V(), n = ae(S.resolve(u)), r = G(() => n.some((e) => e.isLoading), [n]), [i, a] = q(!1), o = H(() => {
306
312
  S.resolve(u).hideAllNotifications(), a(!0);
307
313
  }, []), s = H(() => {
308
314
  a(!1);
309
315
  }, []);
310
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
316
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
311
317
  "aria-label": e`Notifications`,
312
318
  color: "inherit",
313
319
  onClick: o,
@@ -324,7 +330,7 @@ var be = B(ae)(({ theme: e }) => ({
324
330
  } },
325
331
  children: /* @__PURE__ */ Y(ue, { color: "inherit" })
326
332
  }),
327
- r && /* @__PURE__ */ Y(te, {
333
+ r && /* @__PURE__ */ Y(A, {
328
334
  color: "inherit",
329
335
  size: t.spacing(3.5),
330
336
  sx: { position: "absolute" }
@@ -353,7 +359,7 @@ var be = B(ae)(({ theme: e }) => ({
353
359
  ]), l = H(() => {
354
360
  i.current.open();
355
361
  }, []);
356
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
362
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
357
363
  "aria-label": e`Outages`,
358
364
  color: "inherit",
359
365
  onClick: l,
@@ -379,7 +385,7 @@ var be = B(ae)(({ theme: e }) => ({
379
385
  },
380
386
  children: e`Outages`
381
387
  })]
382
- }), /* @__PURE__ */ Y(g, { ref: i })] });
388
+ }), /* @__PURE__ */ Y(ee, { ref: i })] });
383
389
  }, Oe = m(() => {
384
390
  let { t: e } = Z(), t = c({
385
391
  gcTime: 0,
@@ -387,18 +393,18 @@ var be = B(ae)(({ theme: e }) => ({
387
393
  queryKey: S.resolve(l).getGenericKey(d.ORGANIZATION_ADMIN_NAME_EMAILS),
388
394
  staleTime: 0
389
395
  });
390
- return /* @__PURE__ */ Y(M, {
396
+ return /* @__PURE__ */ Y(N, {
391
397
  alignItems: "center",
392
398
  sx: {
393
399
  justifyContent: "center",
394
400
  paddingTop: 0
395
401
  },
396
- children: /* @__PURE__ */ Y(F, {
402
+ children: /* @__PURE__ */ Y(I, {
397
403
  primary: e`My organizations admins`,
398
404
  secondary: /* @__PURE__ */ X(J, { children: [
399
405
  t.isLoading && e`Loading...`,
400
406
  t.error && e`Error loading organization admins`,
401
- t.data?.map((e) => /* @__PURE__ */ Y(re, {
407
+ t.data?.map((e) => /* @__PURE__ */ Y(ne, {
402
408
  href: `mailto:${e.email}`,
403
409
  sx: { display: "table" },
404
410
  children: e.name ?? e.email
@@ -412,9 +418,9 @@ var be = B(ae)(({ theme: e }) => ({
412
418
  permission_type: E.EXECUTE
413
419
  }] }), ke = m(() => {
414
420
  let { t: e } = Z(), t = f(), n = G(() => t.isLoading ? e`Loading...` : t.error ? e`Error` : t.map.get(S.resolve(i).user?.organization_id ?? "")?.name ?? e`Unknown`, [t, e]);
415
- return /* @__PURE__ */ Y(M, {
421
+ return /* @__PURE__ */ Y(N, {
416
422
  sx: { paddingBottom: 0 },
417
- children: /* @__PURE__ */ Y(F, {
423
+ children: /* @__PURE__ */ Y(I, {
418
424
  primary: e`My organization`,
419
425
  secondary: n ?? e`Unknown`,
420
426
  slotProps: { primary: { sx: { fontWeight: "bold" } } }
@@ -435,7 +441,7 @@ var be = B(ae)(({ theme: e }) => ({
435
441
  topic: "USER_LOGOUT"
436
442
  }]), S.resolve(s).flushLog(), r.signoutRedirect();
437
443
  }, [r]), m = G(() => e.getUserDisplayValue(S.resolve(i).user, l), [l]), h = G(() => S.resolve(i).user?.roles, []);
438
- return /* @__PURE__ */ Y(I, {
444
+ return /* @__PURE__ */ Y(L, {
439
445
  ...Q.createAttributes("UserMenu"),
440
446
  anchorEl: t,
441
447
  anchorOrigin: {
@@ -449,26 +455,26 @@ var be = B(ae)(({ theme: e }) => ({
449
455
  horizontal: "right",
450
456
  vertical: "top"
451
457
  },
452
- children: /* @__PURE__ */ X(j, {
458
+ children: /* @__PURE__ */ X(M, {
453
459
  sx: {
454
460
  maxWidth: 300,
455
461
  minWidth: 200,
456
462
  width: "100%"
457
463
  },
458
464
  children: [
459
- /* @__PURE__ */ Y(M, {
465
+ /* @__PURE__ */ Y(N, {
460
466
  divider: !0,
461
- children: /* @__PURE__ */ Y(F, {
467
+ children: /* @__PURE__ */ Y(I, {
462
468
  primary: m ?? l`Unknown`,
463
469
  slotProps: { primary: { sx: { fontWeight: "bold" } } }
464
470
  })
465
471
  }),
466
472
  /* @__PURE__ */ Y(ke, {}),
467
473
  /* @__PURE__ */ Y(Oe, {}),
468
- /* @__PURE__ */ Y(M, {
474
+ /* @__PURE__ */ Y(N, {
469
475
  divider: !0,
470
476
  sx: { paddingTop: 0 },
471
- children: /* @__PURE__ */ Y(F, {
477
+ children: /* @__PURE__ */ Y(I, {
472
478
  primary: l`My roles`,
473
479
  secondary: /* @__PURE__ */ Y(J, { children: h?.map((e) => /* @__PURE__ */ Y(k, {
474
480
  component: "span",
@@ -481,24 +487,24 @@ var be = B(ae)(({ theme: e }) => ({
481
487
  slotProps: { primary: { sx: { fontWeight: "bold" } } }
482
488
  })
483
489
  }),
484
- /* @__PURE__ */ X(M, {
490
+ /* @__PURE__ */ X(N, {
485
491
  alignItems: "center",
486
492
  divider: !0,
487
493
  sx: { justifyContent: "center" },
488
- children: [/* @__PURE__ */ X(N, {
494
+ children: [/* @__PURE__ */ X(P, {
489
495
  onClick: d,
490
- children: [/* @__PURE__ */ Y(P, { children: /* @__PURE__ */ Y(ve, { color: "primary" }) }), /* @__PURE__ */ Y(F, {
496
+ children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(ve, { color: "primary" }) }), /* @__PURE__ */ Y(I, {
491
497
  primary: l`My API permissions`,
492
498
  slotProps: { primary: { sx: { color: "primary.main" } } }
493
499
  })]
494
500
  }), /* @__PURE__ */ Y(v, { ref: u })]
495
501
  }),
496
- /* @__PURE__ */ X(M, {
502
+ /* @__PURE__ */ X(N, {
497
503
  alignItems: "center",
498
504
  sx: { justifyContent: "center" },
499
- children: [/* @__PURE__ */ X(N, {
505
+ children: [/* @__PURE__ */ X(P, {
500
506
  onClick: f,
501
- children: [/* @__PURE__ */ Y(P, { children: /* @__PURE__ */ Y(_e, { color: "secondary" }) }), /* @__PURE__ */ Y(F, {
507
+ children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(_e, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
502
508
  primary: l`Logout`,
503
509
  slotProps: { primary: { sx: {
504
510
  color: "secondary.main",
@@ -523,7 +529,7 @@ var be = B(ae)(({ theme: e }) => ({
523
529
  }, []), a = H(() => {
524
530
  r(null);
525
531
  }, []);
526
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
532
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
527
533
  color: "inherit",
528
534
  onClick: i,
529
535
  title: "Account",
@@ -546,7 +552,7 @@ var be = B(ae)(({ theme: e }) => ({
546
552
  let { t: e } = Z(), t = V(), n = K(null), r = H(() => {
547
553
  n.current.open();
548
554
  }, []);
549
- return S.resolve(x).featureFlags.update_own_organization ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
555
+ return S.resolve(x).featureFlags.update_own_organization ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
550
556
  "aria-label": e`Change organization`,
551
557
  color: "inherit",
552
558
  onClick: r,
@@ -564,42 +570,47 @@ var be = B(ae)(({ theme: e }) => ({
564
570
  })]
565
571
  }), /* @__PURE__ */ Y(_, { ref: n })] }) : null;
566
572
  }, Ne = ({ fullWidth: e }) => {
567
- let t = V(), { t: n } = Z(), r = o().getEnvironmentMessage(), i = W(), [a, s] = q(!1), c = H(() => {
568
- s((e) => !e);
573
+ let t = V(), n = G(() => ({
574
+ background: t.palette.primary.main,
575
+ environmentMessageColor: "#ffea00",
576
+ primaryColor: t.palette.primary.contrastText,
577
+ ...t.components?.GenEpixUiClientCommonApplicationBarActions ?? {}
578
+ }), [t]), { t: r } = Z(), i = o().getEnvironmentMessage(), a = W(), [s, c] = q(!1), l = H(() => {
579
+ c((e) => !e);
569
580
  }, []);
570
581
  return U(() => {
571
- if (a) {
582
+ if (s) {
572
583
  let e = (e) => {
573
- e.key === "Escape" && s(!1);
584
+ e.key === "Escape" && c(!1);
574
585
  };
575
586
  return document.addEventListener("keydown", e), () => {
576
587
  document.removeEventListener("keydown", e);
577
588
  };
578
589
  }
579
- }, [a]), /* @__PURE__ */ X(k, {
590
+ }, [s]), /* @__PURE__ */ X(k, {
580
591
  ...Q.createAttributes("ApplicationBarActions"),
581
592
  sx: {
582
593
  alignItems: "center",
583
594
  display: "flex",
584
595
  paddingRight: 1
585
596
  },
586
- children: [/* @__PURE__ */ Y(A, {
587
- "aria-controls": i,
588
- "aria-label": n`Toggle menu`,
589
- onClick: c,
597
+ children: [/* @__PURE__ */ Y(j, {
598
+ "aria-controls": a,
599
+ "aria-label": r`Toggle menu`,
600
+ onClick: l,
590
601
  sx: {
591
- color: t.components.GenEpixUiClientCommonNavbar.primaryColor,
602
+ color: n.primaryColor,
592
603
  [t.breakpoints.up("md")]: { display: "none" }
593
604
  },
594
- children: /* @__PURE__ */ Y($, {})
605
+ children: /* @__PURE__ */ Y(se, {})
595
606
  }), /* @__PURE__ */ X(k, {
596
- id: i,
607
+ id: a,
597
608
  sx: {
598
609
  display: "flex",
599
610
  [t.breakpoints.down("md")]: {
600
611
  alignItems: "start",
601
- background: t.components.GenEpixUiClientCommonNavbar.background,
602
- display: a ? "flex" : "none",
612
+ background: n.background,
613
+ display: s ? "flex" : "none",
603
614
  flexDirection: "column",
604
615
  left: 0,
605
616
  position: "absolute",
@@ -615,12 +626,12 @@ var be = B(ae)(({ theme: e }) => ({
615
626
  /* @__PURE__ */ Y(Te, {}),
616
627
  /* @__PURE__ */ Y(Me, {}),
617
628
  /* @__PURE__ */ Y(je, {}),
618
- r && /* @__PURE__ */ Y(k, {
629
+ i && /* @__PURE__ */ Y(k, {
619
630
  ...Q.createAttributes("ApplicationBarActions-EnvironmentMessage"),
620
631
  "aria-hidden": "true",
621
632
  sx: {
622
633
  alignItems: "center",
623
- color: t.components.GenEpixUiClientCommonNavbar.environmentMessageColor,
634
+ color: n.environmentMessageColor,
624
635
  display: "flex",
625
636
  fontWeight: 700,
626
637
  marginRight: +!e,
@@ -631,25 +642,29 @@ var be = B(ae)(({ theme: e }) => ({
631
642
  visibility: "hidden"
632
643
  }
633
644
  },
634
- children: n("{{environmentMessage}}", { environmentMessage: r })
645
+ children: r("{{environmentMessage}}", { environmentMessage: i })
635
646
  })
636
647
  ]
637
648
  })]
638
649
  });
639
650
  }, Pe = ({ fullWidth: e, singleAction: t }) => {
640
- let n = V(), r = o();
651
+ let n = V(), r = G(() => ({
652
+ background: n.palette.primary.main,
653
+ primaryColor: n.palette.primary.contrastText,
654
+ ...n.components?.GenEpixUiClientCommonApplicationBar ?? {}
655
+ }), [n]), i = o();
641
656
  return /* @__PURE__ */ Y(D, {
642
657
  ...Q.createAttributes("ApplicationBar"),
643
658
  position: "static",
644
659
  square: !0,
645
660
  sx: {
646
- background: n.components.GenEpixUiClientCommonNavbar.background,
661
+ background: r.background,
647
662
  boxShadow: "none"
648
663
  },
649
- children: /* @__PURE__ */ Y(ne, {
664
+ children: /* @__PURE__ */ Y(te, {
650
665
  disableGutters: !0,
651
666
  maxWidth: !e && "xl",
652
- children: /* @__PURE__ */ X(L, {
667
+ children: /* @__PURE__ */ X(R, {
653
668
  disableGutters: !0,
654
669
  sx: {
655
670
  height: 48,
@@ -658,14 +673,14 @@ var be = B(ae)(({ theme: e }) => ({
658
673
  },
659
674
  children: [t && /* @__PURE__ */ Y(k, {
660
675
  sx: { marginX: 2 },
661
- children: /* @__PURE__ */ Y(z, {
676
+ children: /* @__PURE__ */ Y(re, {
662
677
  component: "h1",
663
678
  sx: {
664
- color: n.components.GenEpixUiClientCommonNavbar.primaryColor,
679
+ color: r.primaryColor,
665
680
  fontSize: "1.3rem"
666
681
  },
667
682
  variant: "body2",
668
- children: r.applicationName
683
+ children: i.applicationName
669
684
  })
670
685
  }), !t && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(xe, { fullWidth: e }), /* @__PURE__ */ Y(Ne, { fullWidth: e })] })]
671
686
  })