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