@gen-epix/ui-client-common 4.3.0 → 4.3.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.
- package/dist/_chunks/Breadcrumbs.js +22 -22
- package/dist/_chunks/Table.js +559 -3173
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
- package/dist/_chunks/UserManagerUtil.js.map +1 -0
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +1 -1
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +1 -1
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/services/LogService/index.js +1 -1
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +4 -4
- package/dist/components/app/App/index.js +35 -100
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +38 -38
- package/dist/components/app/AuthorizationWrapper/index.js +20 -20
- package/dist/components/app/RouterRoot/index.js +58 -59
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +146 -146
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +34 -34
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +8 -8
- package/dist/components/ui/PageContainer/index.js +1 -1
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +28 -28
- package/dist/pages/AdminPage/index.js +23 -23
- package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
- package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
- package/dist/pages/PostLoginPage/index.js +11 -11
- package/dist/pages/RouterErrorPage/index.js +10 -10
- package/dist/utils/UserManagerUtil/index.js +2 -31
- package/package.json +13 -8
- package/dist/_chunks/chunk-OB3PAWPO.js +0 -3742
- package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
- package/dist/_chunks/oidc-client-ts.js.map +0 -1
- package/dist/_chunks/react-oidc-context.js +0 -201
- package/dist/_chunks/react-oidc-context.js.map +0 -1
- package/dist/utils/UserManagerUtil/index.js.map +0 -1
|
@@ -3,58 +3,58 @@ import { ConfigService as t } from "../../../classes/services/ConfigService/inde
|
|
|
3
3
|
import { t as n } from "../../../_chunks/react.js";
|
|
4
4
|
import { outagesStore as r } from "../../../stores/outagesStore/index.js";
|
|
5
5
|
import { AuthorizationService as i } from "../../../classes/services/AuthorizationService/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as l } from "../../../_chunks/
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { CommonDbCommandName as T, CommonDbLogLevel as te, CommonDbPermissionType as E } from "@gen-epix/api-commondb";
|
|
28
|
-
import { AppBar as ne, Badge as D, Box as O, CircularProgress as k, Container as A, IconButton as j, Link as M, List as N, ListItem as P, ListItemButton as F, ListItemIcon as I, ListItemText as L, Popover as R, Toolbar as re, Tooltip as ie, Typography as z, styled as B, useTheme as V } from "@mui/material";
|
|
6
|
+
import { RouterService as a } from "../../../classes/services/RouterService/index.js";
|
|
7
|
+
import { ApiService as o } from "../../../classes/services/ApiService/index.js";
|
|
8
|
+
import { LogService as s } from "../../../classes/services/LogService/index.js";
|
|
9
|
+
import { t as c } from "../../../_chunks/useQueryMemo.js";
|
|
10
|
+
import { t as l } from "../../../_chunks/QueryClientService.js";
|
|
11
|
+
import { NotificationService as u } from "../../../classes/services/NotificationService/index.js";
|
|
12
|
+
import { COMMON_QUERY_KEY as d } from "../../../constants/query.js";
|
|
13
|
+
import { useOrganizationMapQuery as f } from "../../../dataHooks/useOrganizationsQuery/index.js";
|
|
14
|
+
import { n as p } from "../../../_chunks/Notifications.js";
|
|
15
|
+
import { withPermissions as m } from "../../../hoc/withPermissions/index.js";
|
|
16
|
+
import { UserSettingsService as h } from "../../../classes/services/UserSettingsService/index.js";
|
|
17
|
+
import { UserFeedbackDialog as g } from "../UserFeedbackDialog/index.js";
|
|
18
|
+
import { OutagesDialog as _ } from "../OutagesDialog/index.js";
|
|
19
|
+
import { OrganizationSwitcherDialog as ee } from "../OrganizationSwitcherDialog/index.js";
|
|
20
|
+
import { MyPermissionsDialog as te } from "../MyPermissionsDialog/index.js";
|
|
21
|
+
import { LicensesDialog as v } from "../LicensesDialog/index.js";
|
|
22
|
+
import { BackendVersionService as y } from "../../../classes/services/BackendVersionService/index.js";
|
|
23
|
+
import { FeatureFlagsService as b } from "../../../classes/services/FeatureFlagsService/index.js";
|
|
24
|
+
import { StringUtil as x } from "@gen-epix/ui-core/utils/StringUtil";
|
|
25
|
+
import { CommonDbCommandName as S, CommonDbLogLevel as C, CommonDbPermissionType as w } from "@gen-epix/api-commondb";
|
|
26
|
+
import { AppBar as T, Badge as E, Box as D, CircularProgress as O, Container as k, IconButton as A, Link as j, 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 ne, styled as B, useTheme as V } from "@mui/material";
|
|
29
27
|
import { useCallback as H, useEffect as U, useId as W, useMemo as G, useRef as K, useState as q } from "react";
|
|
30
28
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
31
29
|
import { useTranslation as Z } from "react-i18next";
|
|
32
30
|
import { TestIdUtil as Q } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
31
|
+
import re from "@mui/icons-material/ContentCopy";
|
|
32
|
+
import { NavLink as $ } from "react-router-dom";
|
|
33
|
+
import { useSubscribable as ie } from "@gen-epix/ui-core/hooks/useSubscribable";
|
|
34
|
+
import ae from "@mui/icons-material/Menu";
|
|
35
|
+
import oe from "@mui/icons-material/MoreVert";
|
|
36
|
+
import { Confirmation as se } from "@gen-epix/ui-core-components/components/Confirmation";
|
|
37
|
+
import { useAuth as ce } from "react-oidc-context";
|
|
38
|
+
import le from "@mui/icons-material/Notifications";
|
|
39
|
+
import ue from "@mui/icons-material/Chat";
|
|
40
|
+
import de from "@mui/icons-material/Code";
|
|
41
|
+
import fe from "@mui/icons-material/Copyright";
|
|
42
|
+
import pe from "@mui/icons-material/Done";
|
|
43
|
+
import me from "@mui/icons-material/Construction";
|
|
44
|
+
import he from "@mui/icons-material/AccountCircle";
|
|
45
|
+
import ge from "@mui/icons-material/Logout";
|
|
46
|
+
import _e from "@mui/icons-material/Key";
|
|
47
|
+
import ve from "@mui/icons-material/ChangeCircle";
|
|
48
48
|
//#region src/components/ui/ApplicationBar/ApplicationBarNavigationMenu.tsx
|
|
49
|
-
var
|
|
49
|
+
var ye = B($)(({ theme: e }) => ({
|
|
50
50
|
"&:hover": { textDecoration: "underline" },
|
|
51
51
|
color: e.palette.secondary.contrastText,
|
|
52
52
|
display: "inline-block",
|
|
53
53
|
fontSize: "1.3rem",
|
|
54
54
|
textDecoration: "none"
|
|
55
|
-
})),
|
|
56
|
-
let { t } = Z(), n = V(), r = G(() => i.getInstance(), []),
|
|
57
|
-
let e =
|
|
55
|
+
})), be = ({ fullWidth: e }) => {
|
|
56
|
+
let { t } = Z(), n = V(), r = G(() => i.getInstance(), []), o = W(), s = G(() => {
|
|
57
|
+
let e = a.getInstance().routes.find((e) => e.handle.root);
|
|
58
58
|
return [e, ...e.children.filter((e) => !e.handle.hidden)];
|
|
59
59
|
}, []), [c, l] = q(!1);
|
|
60
60
|
U(() => {
|
|
@@ -72,20 +72,20 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
72
72
|
}, []), d = H((e) => {
|
|
73
73
|
e.currentTarget.ariaDisabled === "true" && e.preventDefault();
|
|
74
74
|
}, []);
|
|
75
|
-
return /* @__PURE__ */ X(
|
|
75
|
+
return /* @__PURE__ */ X(D, {
|
|
76
76
|
sx: { flexGrow: 1 },
|
|
77
|
-
children: [/* @__PURE__ */ Y(
|
|
78
|
-
"aria-controls":
|
|
77
|
+
children: [/* @__PURE__ */ Y(A, {
|
|
78
|
+
"aria-controls": o,
|
|
79
79
|
"aria-label": t`Toggle navigation menu`,
|
|
80
80
|
onClick: u,
|
|
81
81
|
sx: {
|
|
82
82
|
color: n["gen-epix-ui"].navbar.primaryColor,
|
|
83
83
|
[n.breakpoints.up("md")]: { display: "none" }
|
|
84
84
|
},
|
|
85
|
-
children: /* @__PURE__ */ Y(
|
|
86
|
-
}), /* @__PURE__ */ Y(
|
|
85
|
+
children: /* @__PURE__ */ Y(ae, {})
|
|
86
|
+
}), /* @__PURE__ */ Y(D, {
|
|
87
87
|
component: "nav",
|
|
88
|
-
id:
|
|
88
|
+
id: o,
|
|
89
89
|
sx: {
|
|
90
90
|
flexGrow: 1,
|
|
91
91
|
[n.breakpoints.down("md")]: {
|
|
@@ -98,7 +98,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
98
98
|
width: "100%"
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
children: /* @__PURE__ */ Y(
|
|
101
|
+
children: /* @__PURE__ */ Y(D, {
|
|
102
102
|
component: "ul",
|
|
103
103
|
sx: {
|
|
104
104
|
display: "flex",
|
|
@@ -112,7 +112,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
112
112
|
},
|
|
113
113
|
children: s.filter((e) => r.doesUserHavePermissionForRoute(e)).map((e) => {
|
|
114
114
|
let t = !!e.handle.disabled;
|
|
115
|
-
return /* @__PURE__ */ Y(
|
|
115
|
+
return /* @__PURE__ */ Y(D, {
|
|
116
116
|
component: "li",
|
|
117
117
|
sx: {
|
|
118
118
|
"&:has(.active:not([aria-disabled=\"true\"]))": {
|
|
@@ -132,7 +132,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
132
132
|
listStyle: "none",
|
|
133
133
|
padding: `0 ${n.spacing(1)}`
|
|
134
134
|
},
|
|
135
|
-
children: /* @__PURE__ */ X(
|
|
135
|
+
children: /* @__PURE__ */ X(ye, {
|
|
136
136
|
"aria-disabled": t || void 0,
|
|
137
137
|
"aria-label": e.handle.title,
|
|
138
138
|
onClick: d,
|
|
@@ -151,11 +151,11 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
151
151
|
})
|
|
152
152
|
})]
|
|
153
153
|
});
|
|
154
|
-
},
|
|
154
|
+
}, xe = (/* @__PURE__ */ new Date()).getTime(), Se = () => {
|
|
155
155
|
let { t: e } = Z(), n = V(), r = K(null), [i, a] = q(!1);
|
|
156
156
|
U(() => {
|
|
157
|
-
if (!
|
|
158
|
-
let e = Math.max(0, t.getInstance().config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS - ((/* @__PURE__ */ new Date()).getTime() -
|
|
157
|
+
if (!h.getInstance().showShowUserFeedbackTooltip) return;
|
|
158
|
+
let e = Math.max(0, t.getInstance().config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS - ((/* @__PURE__ */ new Date()).getTime() - xe)), n = setTimeout(() => {
|
|
159
159
|
a(!0);
|
|
160
160
|
}, e);
|
|
161
161
|
return () => {
|
|
@@ -165,9 +165,9 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
165
165
|
let o = H(() => {
|
|
166
166
|
r.current.open();
|
|
167
167
|
}, []), s = H(() => {
|
|
168
|
-
a(!1),
|
|
168
|
+
a(!1), h.getInstance().showShowUserFeedbackTooltip = !1;
|
|
169
169
|
}, []);
|
|
170
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
170
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(z, {
|
|
171
171
|
arrow: !0,
|
|
172
172
|
color: "secondary",
|
|
173
173
|
onMouseEnter: s,
|
|
@@ -182,11 +182,11 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
182
182
|
} }
|
|
183
183
|
},
|
|
184
184
|
title: e`Would you like to share your feedback?`,
|
|
185
|
-
children: /* @__PURE__ */ X(
|
|
185
|
+
children: /* @__PURE__ */ X(A, {
|
|
186
186
|
"aria-label": e`Feedback`,
|
|
187
187
|
color: "inherit",
|
|
188
188
|
onClick: o,
|
|
189
|
-
children: [/* @__PURE__ */ Y(
|
|
189
|
+
children: [/* @__PURE__ */ Y(ue, { color: "inherit" }), /* @__PURE__ */ Y(D, {
|
|
190
190
|
sx: {
|
|
191
191
|
fontSize: "1.3rem",
|
|
192
192
|
marginLeft: n.spacing(1),
|
|
@@ -198,15 +198,15 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
198
198
|
children: e`Feedback`
|
|
199
199
|
})]
|
|
200
200
|
})
|
|
201
|
-
}), /* @__PURE__ */ Y(
|
|
202
|
-
},
|
|
203
|
-
let r = G(() =>
|
|
201
|
+
}), /* @__PURE__ */ Y(g, { ref: r })] });
|
|
202
|
+
}, Ce = ({ anchorElement: e, onClose: n }) => {
|
|
203
|
+
let r = G(() => x.createUuid(), []), i = K(null), a = !!e, { t: o } = Z(), [s, c] = q(!1), l = H(() => {
|
|
204
204
|
i.current.open();
|
|
205
205
|
}, []), u = H(async () => {
|
|
206
|
-
let e = `Frontend version: ${t.getInstance().config.getSoftwareVersion()}\nBackend version: ${
|
|
206
|
+
let e = `Frontend version: ${t.getInstance().config.getSoftwareVersion()}\nBackend version: ${y.getInstance().version}\nURL: ${window.location.href}\nDate/time: ${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
207
207
|
await navigator.clipboard.writeText(e), c(!0), setTimeout(() => c(!1), 2e3);
|
|
208
208
|
}, []);
|
|
209
|
-
return /* @__PURE__ */ Y(
|
|
209
|
+
return /* @__PURE__ */ Y(L, {
|
|
210
210
|
...Q.createAttributes("InfoMenu"),
|
|
211
211
|
anchorEl: e,
|
|
212
212
|
anchorOrigin: {
|
|
@@ -220,16 +220,16 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
220
220
|
horizontal: "right",
|
|
221
221
|
vertical: "top"
|
|
222
222
|
},
|
|
223
|
-
children: /* @__PURE__ */ X(
|
|
223
|
+
children: /* @__PURE__ */ X(M, {
|
|
224
224
|
sx: {
|
|
225
225
|
maxWidth: 300,
|
|
226
226
|
minWidth: 200,
|
|
227
227
|
width: "100%"
|
|
228
228
|
},
|
|
229
229
|
children: [
|
|
230
|
-
/* @__PURE__ */ Y(
|
|
230
|
+
/* @__PURE__ */ Y(N, {
|
|
231
231
|
divider: !0,
|
|
232
|
-
children: /* @__PURE__ */ Y(
|
|
232
|
+
children: /* @__PURE__ */ Y(I, {
|
|
233
233
|
primary: o("Frontend version"),
|
|
234
234
|
secondary: t.getInstance().config.getSoftwareVersion(),
|
|
235
235
|
slotProps: { primary: { sx: {
|
|
@@ -238,22 +238,22 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
238
238
|
} } }
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */ Y(
|
|
241
|
+
/* @__PURE__ */ Y(N, {
|
|
242
242
|
divider: !0,
|
|
243
|
-
children: /* @__PURE__ */ Y(
|
|
243
|
+
children: /* @__PURE__ */ Y(I, {
|
|
244
244
|
primary: o("Backend version"),
|
|
245
|
-
secondary:
|
|
245
|
+
secondary: y.getInstance().version,
|
|
246
246
|
slotProps: { primary: { sx: {
|
|
247
247
|
color: "primary.main",
|
|
248
248
|
fontWeight: "bold"
|
|
249
249
|
} } }
|
|
250
250
|
})
|
|
251
251
|
}),
|
|
252
|
-
/* @__PURE__ */ Y(
|
|
252
|
+
/* @__PURE__ */ Y(N, {
|
|
253
253
|
divider: !0,
|
|
254
|
-
children: /* @__PURE__ */ X(
|
|
254
|
+
children: /* @__PURE__ */ X(P, {
|
|
255
255
|
onClick: u,
|
|
256
|
-
children: [/* @__PURE__ */ Y(
|
|
256
|
+
children: [/* @__PURE__ */ Y(F, { children: s ? /* @__PURE__ */ Y(pe, { color: "success" }) : /* @__PURE__ */ Y(re, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
257
257
|
primary: o`Copy version information to clipboard`,
|
|
258
258
|
slotProps: { primary: { sx: {
|
|
259
259
|
color: "secondary.main",
|
|
@@ -262,30 +262,30 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
262
262
|
})]
|
|
263
263
|
})
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */ X(
|
|
265
|
+
/* @__PURE__ */ X(N, { children: [/* @__PURE__ */ X(P, {
|
|
266
266
|
onClick: l,
|
|
267
|
-
children: [/* @__PURE__ */ Y(
|
|
267
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(fe, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
268
268
|
primary: o`Show license information`,
|
|
269
269
|
slotProps: { primary: { sx: {
|
|
270
270
|
color: "secondary.main",
|
|
271
271
|
fontWeight: "bold"
|
|
272
272
|
} } }
|
|
273
273
|
})]
|
|
274
|
-
}), /* @__PURE__ */ Y(
|
|
274
|
+
}), /* @__PURE__ */ Y(v, { ref: i })] })
|
|
275
275
|
]
|
|
276
276
|
})
|
|
277
277
|
});
|
|
278
|
-
},
|
|
278
|
+
}, we = () => {
|
|
279
279
|
let [e, t] = q(null), { t: n } = Z(), r = V(), i = H((e) => {
|
|
280
280
|
t(e.currentTarget);
|
|
281
281
|
}, []), a = H(() => {
|
|
282
282
|
t(null);
|
|
283
283
|
}, []);
|
|
284
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
284
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
|
|
285
285
|
color: "inherit",
|
|
286
286
|
onClick: i,
|
|
287
287
|
title: "Code information",
|
|
288
|
-
children: [/* @__PURE__ */ Y(
|
|
288
|
+
children: [/* @__PURE__ */ Y(de, { color: "inherit" }), /* @__PURE__ */ Y(D, {
|
|
289
289
|
sx: {
|
|
290
290
|
fontSize: "1.3rem",
|
|
291
291
|
marginLeft: r.spacing(1),
|
|
@@ -296,23 +296,23 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
296
296
|
},
|
|
297
297
|
children: n`Code information`
|
|
298
298
|
})]
|
|
299
|
-
}), e && /* @__PURE__ */ Y(
|
|
299
|
+
}), e && /* @__PURE__ */ Y(Ce, {
|
|
300
300
|
anchorElement: e,
|
|
301
301
|
onClose: a
|
|
302
302
|
})] });
|
|
303
303
|
}, Te = () => {
|
|
304
|
-
let { t: e } = Z(), t = V(), n =
|
|
305
|
-
|
|
304
|
+
let { t: e } = Z(), t = V(), n = ie(u.getInstance()), r = G(() => n.some((e) => e.isLoading), [n]), [i, a] = q(!1), o = H(() => {
|
|
305
|
+
u.getInstance().hideAllNotifications(), a(!0);
|
|
306
306
|
}, []), s = H(() => {
|
|
307
307
|
a(!1);
|
|
308
308
|
}, []);
|
|
309
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
309
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
|
|
310
310
|
"aria-label": e`Notifications`,
|
|
311
311
|
color: "inherit",
|
|
312
312
|
onClick: o,
|
|
313
313
|
title: e`Notifications`,
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */ Y(
|
|
315
|
+
/* @__PURE__ */ Y(E, {
|
|
316
316
|
badgeContent: n.length,
|
|
317
317
|
color: "secondary",
|
|
318
318
|
sx: { "& .MuiBadge-badge": {
|
|
@@ -321,14 +321,14 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
321
321
|
height: 15,
|
|
322
322
|
minWidth: 15
|
|
323
323
|
} },
|
|
324
|
-
children: /* @__PURE__ */ Y(
|
|
324
|
+
children: /* @__PURE__ */ Y(le, { color: "inherit" })
|
|
325
325
|
}),
|
|
326
|
-
r && /* @__PURE__ */ Y(
|
|
326
|
+
r && /* @__PURE__ */ Y(O, {
|
|
327
327
|
color: "inherit",
|
|
328
328
|
size: t.spacing(3.5),
|
|
329
329
|
sx: { position: "absolute" }
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */ Y(
|
|
331
|
+
/* @__PURE__ */ Y(D, {
|
|
332
332
|
sx: {
|
|
333
333
|
fontSize: "1.3rem",
|
|
334
334
|
marginLeft: t.spacing(1),
|
|
@@ -340,7 +340,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
340
340
|
children: e`Notifications`
|
|
341
341
|
})
|
|
342
342
|
]
|
|
343
|
-
}), /* @__PURE__ */ Y(
|
|
343
|
+
}), /* @__PURE__ */ Y(p, {
|
|
344
344
|
onDrawerClose: s,
|
|
345
345
|
open: i
|
|
346
346
|
})] });
|
|
@@ -352,12 +352,12 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
352
352
|
]), l = H(() => {
|
|
353
353
|
i.current.open();
|
|
354
354
|
}, []);
|
|
355
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
355
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
|
|
356
356
|
"aria-label": e`Outages`,
|
|
357
357
|
color: "inherit",
|
|
358
358
|
onClick: l,
|
|
359
359
|
title: e`Outages`,
|
|
360
|
-
children: [/* @__PURE__ */ Y(
|
|
360
|
+
children: [/* @__PURE__ */ Y(E, {
|
|
361
361
|
badgeContent: c,
|
|
362
362
|
color: "secondary",
|
|
363
363
|
sx: { "& .MuiBadge-badge": {
|
|
@@ -366,8 +366,8 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
366
366
|
height: 15,
|
|
367
367
|
minWidth: 15
|
|
368
368
|
} },
|
|
369
|
-
children: /* @__PURE__ */ Y(
|
|
370
|
-
}), /* @__PURE__ */ Y(
|
|
369
|
+
children: /* @__PURE__ */ Y(me, { color: "inherit" })
|
|
370
|
+
}), /* @__PURE__ */ Y(D, {
|
|
371
371
|
sx: {
|
|
372
372
|
fontSize: "1.3rem",
|
|
373
373
|
marginLeft: t.spacing(1),
|
|
@@ -378,26 +378,26 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
378
378
|
},
|
|
379
379
|
children: e`Outages`
|
|
380
380
|
})]
|
|
381
|
-
}), /* @__PURE__ */ Y(
|
|
382
|
-
}, De =
|
|
383
|
-
let { t: e } = Z(), { data: t, error: n, isLoading: r } =
|
|
381
|
+
}), /* @__PURE__ */ Y(_, { ref: i })] });
|
|
382
|
+
}, De = m(() => {
|
|
383
|
+
let { t: e } = Z(), { data: t, error: n, isLoading: r } = c({
|
|
384
384
|
gcTime: 0,
|
|
385
|
-
queryFn: async ({ signal: e }) => (await
|
|
386
|
-
queryKey:
|
|
385
|
+
queryFn: async ({ signal: e }) => (await o.getInstance().abacApi.retrieveOrganizationAdminNameEmails({ signal: e })).data,
|
|
386
|
+
queryKey: l.getInstance().getGenericKey(d.ORGANIZATION_ADMIN_NAME_EMAILS),
|
|
387
387
|
staleTime: 0
|
|
388
388
|
});
|
|
389
|
-
return /* @__PURE__ */ Y(
|
|
389
|
+
return /* @__PURE__ */ Y(N, {
|
|
390
390
|
alignItems: "center",
|
|
391
391
|
sx: {
|
|
392
392
|
justifyContent: "center",
|
|
393
393
|
paddingTop: 0
|
|
394
394
|
},
|
|
395
|
-
children: /* @__PURE__ */ Y(
|
|
395
|
+
children: /* @__PURE__ */ Y(I, {
|
|
396
396
|
primary: e`My organizations admins`,
|
|
397
397
|
secondary: /* @__PURE__ */ X(J, { children: [
|
|
398
398
|
r && e`Loading...`,
|
|
399
399
|
n && e`Error`,
|
|
400
|
-
t?.map((e) => /* @__PURE__ */ Y(
|
|
400
|
+
t?.map((e) => /* @__PURE__ */ Y(j, {
|
|
401
401
|
href: `mailto:${e.email}`,
|
|
402
402
|
sx: { display: "table" },
|
|
403
403
|
children: e.name ?? e.email
|
|
@@ -407,69 +407,69 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
407
407
|
})
|
|
408
408
|
});
|
|
409
409
|
}, { requiredPermissions: [{
|
|
410
|
-
command_name:
|
|
411
|
-
permission_type:
|
|
412
|
-
}] }), Oe =
|
|
413
|
-
let { t: e } = Z(), t =
|
|
414
|
-
return /* @__PURE__ */ Y(
|
|
410
|
+
command_name: S.RetrieveOrganizationAdminNameEmailsCommand,
|
|
411
|
+
permission_type: w.EXECUTE
|
|
412
|
+
}] }), Oe = m(() => {
|
|
413
|
+
let { t: e } = Z(), t = f(), n = G(() => t.isLoading ? e`Loading...` : t.error ? e`Error` : t.map.get(i.getInstance().user?.organization_id ?? "")?.name ?? e`Unknown`, [t, e]);
|
|
414
|
+
return /* @__PURE__ */ Y(N, {
|
|
415
415
|
sx: { paddingBottom: 0 },
|
|
416
|
-
children: /* @__PURE__ */ Y(
|
|
416
|
+
children: /* @__PURE__ */ Y(I, {
|
|
417
417
|
primary: e`My organization`,
|
|
418
418
|
secondary: n ?? e`Unknown`,
|
|
419
419
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
420
420
|
})
|
|
421
421
|
});
|
|
422
422
|
}, { requiredPermissions: [{
|
|
423
|
-
command_name:
|
|
424
|
-
permission_type:
|
|
423
|
+
command_name: S.RetrieveOrganizationAdminNameEmailsCommand,
|
|
424
|
+
permission_type: w.EXECUTE
|
|
425
425
|
}] }), ke = ({ anchorElement: t, onClose: n }) => {
|
|
426
|
-
let r =
|
|
426
|
+
let r = ce(), a = K(null), o = G(() => x.createUuid(), []), c = !!t, { t: l } = Z(), u = K(null), d = H(() => {
|
|
427
427
|
u.current.open();
|
|
428
428
|
}, []), f = H(() => {
|
|
429
429
|
a.current.open();
|
|
430
430
|
}, []), p = H(() => {
|
|
431
|
-
|
|
431
|
+
s.getInstance().log([{
|
|
432
432
|
detail: r.user,
|
|
433
|
-
level:
|
|
433
|
+
level: C.TRACE,
|
|
434
434
|
topic: "USER_LOGOUT"
|
|
435
|
-
}]),
|
|
435
|
+
}]), s.getInstance().flushLog(), r.signoutRedirect();
|
|
436
436
|
}, [r]), m = G(() => e.getUserDisplayValue(i.getInstance().user, l), [l]), h = G(() => i.getInstance().user?.roles, []);
|
|
437
|
-
return /* @__PURE__ */ Y(
|
|
437
|
+
return /* @__PURE__ */ Y(L, {
|
|
438
438
|
...Q.createAttributes("UserMenu"),
|
|
439
439
|
anchorEl: t,
|
|
440
440
|
anchorOrigin: {
|
|
441
441
|
horizontal: "right",
|
|
442
442
|
vertical: "bottom"
|
|
443
443
|
},
|
|
444
|
-
id:
|
|
444
|
+
id: c ? o : void 0,
|
|
445
445
|
onClose: n,
|
|
446
|
-
open:
|
|
446
|
+
open: c,
|
|
447
447
|
transformOrigin: {
|
|
448
448
|
horizontal: "right",
|
|
449
449
|
vertical: "top"
|
|
450
450
|
},
|
|
451
|
-
children: /* @__PURE__ */ X(
|
|
451
|
+
children: /* @__PURE__ */ X(M, {
|
|
452
452
|
sx: {
|
|
453
453
|
maxWidth: 300,
|
|
454
454
|
minWidth: 200,
|
|
455
455
|
width: "100%"
|
|
456
456
|
},
|
|
457
457
|
children: [
|
|
458
|
-
/* @__PURE__ */ Y(
|
|
458
|
+
/* @__PURE__ */ Y(N, {
|
|
459
459
|
divider: !0,
|
|
460
|
-
children: /* @__PURE__ */ Y(
|
|
460
|
+
children: /* @__PURE__ */ Y(I, {
|
|
461
461
|
primary: m ?? l`Unknown`,
|
|
462
462
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
463
463
|
})
|
|
464
464
|
}),
|
|
465
465
|
/* @__PURE__ */ Y(Oe, {}),
|
|
466
466
|
/* @__PURE__ */ Y(De, {}),
|
|
467
|
-
/* @__PURE__ */ Y(
|
|
467
|
+
/* @__PURE__ */ Y(N, {
|
|
468
468
|
divider: !0,
|
|
469
469
|
sx: { paddingTop: 0 },
|
|
470
|
-
children: /* @__PURE__ */ Y(
|
|
470
|
+
children: /* @__PURE__ */ Y(I, {
|
|
471
471
|
primary: l`My roles`,
|
|
472
|
-
secondary: /* @__PURE__ */ Y(J, { children: h?.map((e) => /* @__PURE__ */ Y(
|
|
472
|
+
secondary: /* @__PURE__ */ Y(J, { children: h?.map((e) => /* @__PURE__ */ Y(D, {
|
|
473
473
|
component: "span",
|
|
474
474
|
sx: {
|
|
475
475
|
display: "inline-block",
|
|
@@ -480,31 +480,31 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
480
480
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
481
481
|
})
|
|
482
482
|
}),
|
|
483
|
-
/* @__PURE__ */ X(
|
|
483
|
+
/* @__PURE__ */ X(N, {
|
|
484
484
|
alignItems: "center",
|
|
485
485
|
divider: !0,
|
|
486
486
|
sx: { justifyContent: "center" },
|
|
487
|
-
children: [/* @__PURE__ */ X(
|
|
487
|
+
children: [/* @__PURE__ */ X(P, {
|
|
488
488
|
onClick: d,
|
|
489
|
-
children: [/* @__PURE__ */ Y(
|
|
489
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(_e, { color: "primary" }) }), /* @__PURE__ */ Y(I, {
|
|
490
490
|
primary: l`My API permissions`,
|
|
491
491
|
slotProps: { primary: { sx: { color: "primary.main" } } }
|
|
492
492
|
})]
|
|
493
|
-
}), /* @__PURE__ */ Y(
|
|
493
|
+
}), /* @__PURE__ */ Y(te, { ref: u })]
|
|
494
494
|
}),
|
|
495
|
-
/* @__PURE__ */ X(
|
|
495
|
+
/* @__PURE__ */ X(N, {
|
|
496
496
|
alignItems: "center",
|
|
497
497
|
sx: { justifyContent: "center" },
|
|
498
|
-
children: [/* @__PURE__ */ X(
|
|
498
|
+
children: [/* @__PURE__ */ X(P, {
|
|
499
499
|
onClick: f,
|
|
500
|
-
children: [/* @__PURE__ */ Y(
|
|
500
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(ge, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
501
501
|
primary: l`Logout`,
|
|
502
502
|
slotProps: { primary: { sx: {
|
|
503
503
|
color: "secondary.main",
|
|
504
504
|
fontWeight: "bold"
|
|
505
505
|
} } }
|
|
506
506
|
})]
|
|
507
|
-
}), /* @__PURE__ */ Y(
|
|
507
|
+
}), /* @__PURE__ */ Y(se, {
|
|
508
508
|
body: l`Click the logout button to logout`,
|
|
509
509
|
cancelLabel: l`Cancel`,
|
|
510
510
|
confirmLabel: l`Logout`,
|
|
@@ -522,11 +522,11 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
522
522
|
}, []), a = H(() => {
|
|
523
523
|
r(null);
|
|
524
524
|
}, []);
|
|
525
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
525
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
|
|
526
526
|
color: "inherit",
|
|
527
527
|
onClick: i,
|
|
528
528
|
title: "Account",
|
|
529
|
-
children: [/* @__PURE__ */ Y(
|
|
529
|
+
children: [/* @__PURE__ */ Y(he, { color: "inherit" }), /* @__PURE__ */ Y(D, {
|
|
530
530
|
sx: {
|
|
531
531
|
fontSize: "1.3rem",
|
|
532
532
|
marginLeft: t.spacing(1),
|
|
@@ -545,12 +545,12 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
545
545
|
let { t: e } = Z(), t = V(), n = K(null), r = H(() => {
|
|
546
546
|
n.current.open();
|
|
547
547
|
}, []);
|
|
548
|
-
return
|
|
548
|
+
return b.getInstance().featureFlags.update_own_organization ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(A, {
|
|
549
549
|
"aria-label": e`Change organization`,
|
|
550
550
|
color: "inherit",
|
|
551
551
|
onClick: r,
|
|
552
552
|
title: e`Change organization`,
|
|
553
|
-
children: [/* @__PURE__ */ Y(
|
|
553
|
+
children: [/* @__PURE__ */ Y(ve, { color: "inherit" }), /* @__PURE__ */ Y(D, {
|
|
554
554
|
sx: {
|
|
555
555
|
fontSize: "1.3rem",
|
|
556
556
|
marginLeft: t.spacing(1),
|
|
@@ -561,7 +561,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
561
561
|
},
|
|
562
562
|
children: e`Change organization`
|
|
563
563
|
})]
|
|
564
|
-
}), /* @__PURE__ */ Y(
|
|
564
|
+
}), /* @__PURE__ */ Y(ee, { ref: n })] }) : null;
|
|
565
565
|
}, Me = ({ fullWidth: e }) => {
|
|
566
566
|
let n = V(), { t: r } = Z(), i = t.getInstance().config.getEnvironmentMessage(), a = W(), [o, s] = q(!1), c = H(() => {
|
|
567
567
|
s((e) => !e);
|
|
@@ -575,14 +575,14 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
575
575
|
document.removeEventListener("keydown", e);
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
|
-
}, [o]), /* @__PURE__ */ X(
|
|
578
|
+
}, [o]), /* @__PURE__ */ X(D, {
|
|
579
579
|
...Q.createAttributes("ApplicationBarActions"),
|
|
580
580
|
sx: {
|
|
581
581
|
alignItems: "center",
|
|
582
582
|
display: "flex",
|
|
583
583
|
paddingRight: 1
|
|
584
584
|
},
|
|
585
|
-
children: [/* @__PURE__ */ Y(
|
|
585
|
+
children: [/* @__PURE__ */ Y(A, {
|
|
586
586
|
"aria-controls": a,
|
|
587
587
|
"aria-label": r`Toggle menu`,
|
|
588
588
|
onClick: c,
|
|
@@ -590,8 +590,8 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
590
590
|
color: n["gen-epix-ui"].navbar.primaryColor,
|
|
591
591
|
[n.breakpoints.up("md")]: { display: "none" }
|
|
592
592
|
},
|
|
593
|
-
children: /* @__PURE__ */ Y(
|
|
594
|
-
}), /* @__PURE__ */ X(
|
|
593
|
+
children: /* @__PURE__ */ Y(oe, {})
|
|
594
|
+
}), /* @__PURE__ */ X(D, {
|
|
595
595
|
id: a,
|
|
596
596
|
sx: {
|
|
597
597
|
display: "flex",
|
|
@@ -608,13 +608,13 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
608
608
|
}
|
|
609
609
|
},
|
|
610
610
|
children: [
|
|
611
|
-
/* @__PURE__ */ Y(
|
|
611
|
+
/* @__PURE__ */ Y(Se, {}),
|
|
612
612
|
/* @__PURE__ */ Y(Ee, {}),
|
|
613
613
|
/* @__PURE__ */ Y(Te, {}),
|
|
614
|
-
/* @__PURE__ */ Y(
|
|
614
|
+
/* @__PURE__ */ Y(we, {}),
|
|
615
615
|
/* @__PURE__ */ Y(je, {}),
|
|
616
616
|
/* @__PURE__ */ Y(Ae, {}),
|
|
617
|
-
i && /* @__PURE__ */ Y(
|
|
617
|
+
i && /* @__PURE__ */ Y(D, {
|
|
618
618
|
...Q.createAttributes("ApplicationBarActions-EnvironmentMessage"),
|
|
619
619
|
"aria-hidden": "true",
|
|
620
620
|
sx: {
|
|
@@ -637,7 +637,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
637
637
|
});
|
|
638
638
|
}, Ne = ({ fullWidth: e, singleAction: n }) => {
|
|
639
639
|
let r = V();
|
|
640
|
-
return /* @__PURE__ */ Y(
|
|
640
|
+
return /* @__PURE__ */ Y(T, {
|
|
641
641
|
...Q.createAttributes("ApplicationBar"),
|
|
642
642
|
position: "static",
|
|
643
643
|
square: !0,
|
|
@@ -645,19 +645,19 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
645
645
|
background: r["gen-epix-ui"].navbar.background,
|
|
646
646
|
boxShadow: "none"
|
|
647
647
|
},
|
|
648
|
-
children: /* @__PURE__ */ Y(
|
|
648
|
+
children: /* @__PURE__ */ Y(k, {
|
|
649
649
|
disableGutters: !0,
|
|
650
650
|
maxWidth: !e && "xl",
|
|
651
|
-
children: /* @__PURE__ */ X(
|
|
651
|
+
children: /* @__PURE__ */ X(R, {
|
|
652
652
|
disableGutters: !0,
|
|
653
653
|
sx: {
|
|
654
654
|
height: 48,
|
|
655
655
|
justifyContent: n ? "center" : "space-between",
|
|
656
656
|
minHeight: "48px !important"
|
|
657
657
|
},
|
|
658
|
-
children: [n && /* @__PURE__ */ Y(
|
|
658
|
+
children: [n && /* @__PURE__ */ Y(D, {
|
|
659
659
|
sx: { marginX: 2 },
|
|
660
|
-
children: /* @__PURE__ */ Y(
|
|
660
|
+
children: /* @__PURE__ */ Y(ne, {
|
|
661
661
|
component: "h1",
|
|
662
662
|
sx: {
|
|
663
663
|
color: r["gen-epix-ui"].navbar.primaryColor,
|
|
@@ -666,7 +666,7 @@ var be = B(a)(({ theme: e }) => ({
|
|
|
666
666
|
variant: "body2",
|
|
667
667
|
children: t.getInstance().config.applicationName
|
|
668
668
|
})
|
|
669
|
-
}), !n && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
669
|
+
}), !n && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(be, { fullWidth: e }), /* @__PURE__ */ Y(Me, { fullWidth: e })] })]
|
|
670
670
|
})
|
|
671
671
|
})
|
|
672
672
|
});
|