@gen-epix/ui-client-common 4.6.0 → 4.7.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/README.md +2 -2
- package/dist/@types/mui.d.ts +13 -11
- package/dist/_chunks/ApplicationFooter.js +31 -21
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +4 -4
- package/dist/_chunks/CrudPage.js +332 -336
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/Notifications.js +16 -16
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +73 -72
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +853 -744
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +38 -38
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +131 -131
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +12 -12
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseIteratee.js +78 -78
- package/dist/_chunks/_baseIteratee.js.map +1 -1
- package/dist/_chunks/decorate.js +1 -1
- package/dist/_chunks/decorateParam.js +1 -1
- package/dist/_chunks/middleware.js +66 -70
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +98 -98
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +108 -92
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/tableStore.js +61 -58
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +73 -71
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +2 -2
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +15 -16
- 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/AuthenticationService/index.js +8 -8
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +4 -4
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +4 -4
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +30 -30
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +15 -15
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/components/app/App/index.js +26 -24
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +18 -18
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +15 -15
- package/dist/components/app/AuthorizationWrapper/index.js +16 -16
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +33 -33
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +4 -4
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/ApplicationBar.d.ts +4 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarActions.d.ts +5 -0
- package/dist/components/ui/ApplicationBar/ApplicationBarNavigationMenu.d.ts +6 -0
- package/dist/components/ui/ApplicationBar/index.js +281 -266
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ApplicationFooter/ApplicationFooter.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLink.d.ts +3 -0
- package/dist/components/ui/ApplicationFooter/ApplicationFooterLinkSection.d.ts +4 -0
- package/dist/components/ui/GenericErrorMessage/index.js +13 -13
- package/dist/components/ui/LicensesDialog/index.js +6 -6
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +11 -11
- package/dist/components/ui/OutagesDialog/index.js +4 -4
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +5 -5
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +4 -4
- package/dist/components/ui/SortableList/SortableList.d.ts +5 -3
- package/dist/components/ui/Table/Table.d.ts +5 -2
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +13 -2
- package/dist/components/ui/Table/index.d.ts +1 -0
- package/dist/components/ui/Table/index.js +1 -1
- package/dist/components/ui/UserFeedbackDialog/index.js +15 -15
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +12 -12
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +11 -11
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +5 -5
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +15 -15
- package/dist/dataHooks/useOrganizationsQuery/index.js +7 -7
- package/dist/dataHooks/useUsersQuery/index.js +10 -10
- package/dist/hooks/useCreateMutation/index.js +14 -14
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +17 -17
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +47 -51
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -2
- package/dist/hooks/useInitializeTableStore/index.js +6 -6
- package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
- package/dist/locale/en.json +13 -5
- package/dist/locale/nl.json +13 -5
- package/dist/pages/AcceptInvitationPage/index.js +10 -10
- package/dist/pages/AdminPage/index.js +19 -19
- package/dist/pages/ChooseIdentityProviderPage/index.js +5 -5
- package/dist/pages/ErrorPage/index.js +4 -4
- package/dist/pages/IdentifierIssuersAdminPage/index.js +7 -7
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +16 -16
- package/dist/pages/OrganizationContactsAdminPage/index.js +10 -10
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +12 -12
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +20 -20
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +11 -11
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js +4 -4
- package/dist/pages/UsersAdminPage/index.js +34 -34
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +4 -4
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/oidcStore.d.ts +1 -1
- package/dist/theme/demoTheme/index.js +15 -7
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +2 -2
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/package.json +33 -37
- package/dist/models/theme.models.d.ts +0 -20
- package/dist/models/theme.models.js +0 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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 { FeatureFlagsService as
|
|
24
|
-
import { container as
|
|
25
|
-
import { StringUtil as
|
|
26
|
-
import { CommonDbCommandName as
|
|
27
|
-
import { AppBar as
|
|
1
|
+
import { useConfig as e } from "../../../hooks/useConfig/index.js";
|
|
2
|
+
import { AuthorizationService as t } from "../../../classes/services/AuthorizationService/index.js";
|
|
3
|
+
import { RouterService as n } from "../../../classes/services/RouterService/index.js";
|
|
4
|
+
import { UserSettingsService as r } from "../../../classes/services/UserSettingsService/index.js";
|
|
5
|
+
import { UserFeedbackDialog as i } from "../UserFeedbackDialog/index.js";
|
|
6
|
+
import { LicensesDialog as a } from "../LicensesDialog/index.js";
|
|
7
|
+
import { BackendVersionService as o } from "../../../classes/services/BackendVersionService/index.js";
|
|
8
|
+
import { n as s } from "../../../_chunks/Notifications.js";
|
|
9
|
+
import { NotificationService as c } from "../../../classes/services/NotificationService/index.js";
|
|
10
|
+
import { t as l } from "../../../_chunks/react.js";
|
|
11
|
+
import { OutagesDialog as u } from "../OutagesDialog/index.js";
|
|
12
|
+
import { outagesStore as d } from "../../../stores/outagesStore/index.js";
|
|
13
|
+
import { LogService as f } from "../../../classes/services/LogService/index.js";
|
|
14
|
+
import { MyPermissionsDialog as p } from "../MyPermissionsDialog/index.js";
|
|
15
|
+
import { UserUtil as m } from "../../../utils/UserUtil/index.js";
|
|
16
|
+
import { API_ABAC_TOKEN as h } from "../../../constants/api.constants.js";
|
|
17
|
+
import { withPermissions as g } from "../../../hoc/withPermissions/index.js";
|
|
18
|
+
import { t as _ } from "../../../_chunks/useQueryMemo.js";
|
|
19
|
+
import { t as v } from "../../../_chunks/QueryClientService.js";
|
|
20
|
+
import { COMMON_QUERY_KEY as y } from "../../../constants/query.constants.js";
|
|
21
|
+
import { useOrganizationMapQuery as b } from "../../../dataHooks/useOrganizationsQuery/index.js";
|
|
22
|
+
import { OrganizationSwitcherDialog as x } from "../OrganizationSwitcherDialog/index.js";
|
|
23
|
+
import { FeatureFlagsService as S } from "../../../classes/services/FeatureFlagsService/index.js";
|
|
24
|
+
import { container as C } from "tsyringe";
|
|
25
|
+
import { StringUtil as w } from "@gen-epix/ui-core/utils/StringUtil";
|
|
26
|
+
import { CommonDbCommandName as T, CommonDbLogLevel as E, CommonDbPermissionType as D } from "@gen-epix/api-commondb";
|
|
27
|
+
import { AppBar as O, Badge as k, Box as A, CircularProgress as ee, 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 re, Typography as z, 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";
|
|
@@ -33,65 +33,71 @@ import ie from "@mui/icons-material/ContentCopy";
|
|
|
33
33
|
import { NavLink as ae } from "react-router-dom";
|
|
34
34
|
import { useSubscribable as oe } from "@gen-epix/ui-core/hooks/useSubscribable";
|
|
35
35
|
import se from "@mui/icons-material/Menu";
|
|
36
|
-
import
|
|
37
|
-
import { Confirmation as
|
|
38
|
-
import { useAuth as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
36
|
+
import ce from "@mui/icons-material/MoreVert";
|
|
37
|
+
import { Confirmation as le } from "@gen-epix/ui-core-components/components/Confirmation";
|
|
38
|
+
import { useAuth as ue } from "react-oidc-context";
|
|
39
|
+
import de from "@mui/icons-material/Notifications";
|
|
40
|
+
import fe from "@mui/icons-material/Chat";
|
|
41
|
+
import pe from "@mui/icons-material/Code";
|
|
42
|
+
import me from "@mui/icons-material/Copyright";
|
|
43
|
+
import he from "@mui/icons-material/Done";
|
|
44
|
+
import ge from "@mui/icons-material/Construction";
|
|
45
|
+
import _e from "@mui/icons-material/AccountCircle";
|
|
46
|
+
import ve from "@mui/icons-material/Logout";
|
|
47
|
+
import ye from "@mui/icons-material/Key";
|
|
48
|
+
import be from "@mui/icons-material/ChangeCircle";
|
|
49
49
|
// src/components/ui/ApplicationBar/ApplicationBarNavigationMenu.tsx
|
|
50
|
-
var
|
|
50
|
+
var xe = B(ae)(({ 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
|
-
})),
|
|
57
|
-
let { t } = Z(),
|
|
58
|
-
|
|
56
|
+
})), Se = ({ fullWidth: e }) => {
|
|
57
|
+
let { t: r } = Z(), i = V(), a = G(() => ({
|
|
58
|
+
activeBackground: i.palette.primary.contrastText,
|
|
59
|
+
activeColor: i.palette.primary.main,
|
|
60
|
+
background: i.palette.primary.main,
|
|
61
|
+
primaryColor: i.palette.primary.contrastText,
|
|
62
|
+
...i.components?.GenEpixUiClientCommonApplicationBarNavigationMenu ?? {}
|
|
63
|
+
}), [i]), o = G(() => C.resolve(t), []), s = W(), c = G(() => {
|
|
64
|
+
let e = C.resolve(n).routes.find((e) => e.handle.root);
|
|
59
65
|
return [e, ...e.children.filter((e) => !e.handle.hidden)];
|
|
60
|
-
}, []), [
|
|
66
|
+
}, []), [l, u] = q(!1);
|
|
61
67
|
U(() => {
|
|
62
|
-
if (
|
|
68
|
+
if (l) {
|
|
63
69
|
let e = (e) => {
|
|
64
|
-
e.key === "Escape" &&
|
|
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
|
-
}, [
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
}, []),
|
|
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
|
-
return /* @__PURE__ */ X(
|
|
82
|
+
return /* @__PURE__ */ X(A, {
|
|
77
83
|
sx: { flexGrow: 1 },
|
|
78
|
-
children: [/* @__PURE__ */ Y(
|
|
79
|
-
"aria-controls":
|
|
80
|
-
"aria-label":
|
|
81
|
-
onClick:
|
|
84
|
+
children: [/* @__PURE__ */ Y(j, {
|
|
85
|
+
"aria-controls": s,
|
|
86
|
+
"aria-label": r`Toggle navigation menu`,
|
|
87
|
+
onClick: d,
|
|
82
88
|
sx: {
|
|
83
|
-
color:
|
|
84
|
-
[
|
|
89
|
+
color: a.primaryColor,
|
|
90
|
+
[i.breakpoints.up("md")]: { display: "none" }
|
|
85
91
|
},
|
|
86
92
|
children: /* @__PURE__ */ Y(se, {})
|
|
87
|
-
}), /* @__PURE__ */ Y(
|
|
93
|
+
}), /* @__PURE__ */ Y(A, {
|
|
88
94
|
component: "nav",
|
|
89
|
-
id:
|
|
95
|
+
id: s,
|
|
90
96
|
sx: {
|
|
91
97
|
flexGrow: 1,
|
|
92
|
-
[
|
|
93
|
-
background:
|
|
94
|
-
display:
|
|
98
|
+
[i.breakpoints.down("md")]: {
|
|
99
|
+
background: a.background,
|
|
100
|
+
display: l ? "block" : "none",
|
|
95
101
|
left: 0,
|
|
96
102
|
paddingBottom: 4,
|
|
97
103
|
position: "absolute",
|
|
@@ -99,49 +105,49 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
99
105
|
width: "100%"
|
|
100
106
|
}
|
|
101
107
|
},
|
|
102
|
-
children: /* @__PURE__ */ Y(
|
|
108
|
+
children: /* @__PURE__ */ Y(A, {
|
|
103
109
|
component: "ul",
|
|
104
110
|
sx: {
|
|
105
111
|
display: "flex",
|
|
106
112
|
margin: 0,
|
|
107
113
|
marginLeft: e ? 0 : 2,
|
|
108
114
|
padding: 0,
|
|
109
|
-
[
|
|
115
|
+
[i.breakpoints.down("md")]: {
|
|
110
116
|
display: "block",
|
|
111
117
|
margin: 0
|
|
112
118
|
}
|
|
113
119
|
},
|
|
114
|
-
children:
|
|
120
|
+
children: c.filter((e) => o.doesUserHavePermissionForRoute(e)).map((e) => {
|
|
115
121
|
let t = !!e.handle.disabled;
|
|
116
|
-
return /* @__PURE__ */ Y(
|
|
122
|
+
return /* @__PURE__ */ Y(A, {
|
|
117
123
|
component: "li",
|
|
118
124
|
sx: {
|
|
119
125
|
"&:has(.active:not([aria-disabled=\"true\"]))": {
|
|
120
|
-
"& svg": { color:
|
|
121
|
-
a: { color:
|
|
122
|
-
background:
|
|
126
|
+
"& svg": { color: a.activeColor },
|
|
127
|
+
a: { color: a.activeColor },
|
|
128
|
+
background: a.activeBackground
|
|
123
129
|
},
|
|
124
130
|
"& svg": {
|
|
125
|
-
color: t ?
|
|
131
|
+
color: t ? i.palette.grey[400] : void 0,
|
|
126
132
|
marginTop: "6px"
|
|
127
133
|
},
|
|
128
134
|
alignItems: "center",
|
|
129
|
-
color: t ?
|
|
135
|
+
color: t ? i.palette.grey[400] : a.primaryColor,
|
|
130
136
|
display: "flex",
|
|
131
137
|
fontWeight: 800,
|
|
132
138
|
height: 48,
|
|
133
139
|
listStyle: "none",
|
|
134
|
-
padding: `0 ${
|
|
140
|
+
padding: `0 ${i.spacing(1)}`
|
|
135
141
|
},
|
|
136
|
-
children: /* @__PURE__ */ X(
|
|
142
|
+
children: /* @__PURE__ */ X(xe, {
|
|
137
143
|
"aria-disabled": t || void 0,
|
|
138
144
|
"aria-label": e.handle.title,
|
|
139
|
-
onClick:
|
|
145
|
+
onClick: f,
|
|
140
146
|
sx: {
|
|
141
147
|
"&:hover": { textDecoration: t ? "none" : void 0 },
|
|
142
|
-
color: t ?
|
|
148
|
+
color: t ? i.palette.grey[400] : void 0,
|
|
143
149
|
cursor: t ? "not-allowed" : void 0,
|
|
144
|
-
padding: `0 ${
|
|
150
|
+
padding: `0 ${i.spacing(1)}`
|
|
145
151
|
},
|
|
146
152
|
tabIndex: t ? -1 : void 0,
|
|
147
153
|
to: e.path,
|
|
@@ -152,110 +158,110 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
152
158
|
})
|
|
153
159
|
})]
|
|
154
160
|
});
|
|
155
|
-
},
|
|
156
|
-
let { t
|
|
161
|
+
}, Ce = (/* @__PURE__ */ new Date()).getTime(), we = () => {
|
|
162
|
+
let { t } = Z(), n = V(), a = e(), o = K(null), [s, c] = q(!1);
|
|
157
163
|
U(() => {
|
|
158
|
-
if (!
|
|
159
|
-
let e = Math.max(0,
|
|
160
|
-
|
|
164
|
+
if (!C.resolve(r).showShowUserFeedbackTooltip) return;
|
|
165
|
+
let e = Math.max(0, a.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS - ((/* @__PURE__ */ new Date()).getTime() - Ce)), t = setTimeout(() => {
|
|
166
|
+
c(!0);
|
|
161
167
|
}, e);
|
|
162
168
|
return () => {
|
|
163
169
|
clearTimeout(t);
|
|
164
170
|
};
|
|
165
|
-
}, [
|
|
166
|
-
let
|
|
167
|
-
|
|
168
|
-
}, []),
|
|
169
|
-
|
|
171
|
+
}, [a.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS]);
|
|
172
|
+
let l = H(() => {
|
|
173
|
+
o.current.open();
|
|
174
|
+
}, []), u = H(() => {
|
|
175
|
+
c(!1), C.resolve(r).showShowUserFeedbackTooltip = !1;
|
|
170
176
|
}, []);
|
|
171
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
177
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(re, {
|
|
172
178
|
arrow: !0,
|
|
173
179
|
color: "secondary",
|
|
174
|
-
onMouseEnter:
|
|
175
|
-
open:
|
|
180
|
+
onMouseEnter: u,
|
|
181
|
+
open: s,
|
|
176
182
|
placement: "left",
|
|
177
183
|
slotProps: {
|
|
178
|
-
arrow: { sx: { color:
|
|
184
|
+
arrow: { sx: { color: n.palette.secondary.main } },
|
|
179
185
|
popper: { disablePortal: !0 },
|
|
180
186
|
tooltip: { sx: {
|
|
181
|
-
backgroundColor:
|
|
182
|
-
marginRight: `${
|
|
187
|
+
backgroundColor: n.palette.secondary.main,
|
|
188
|
+
marginRight: `${n.spacing(.5)} !important`
|
|
183
189
|
} }
|
|
184
190
|
},
|
|
185
|
-
title:
|
|
186
|
-
children: /* @__PURE__ */ X(
|
|
187
|
-
"aria-label":
|
|
191
|
+
title: t`Would you like to share your feedback?`,
|
|
192
|
+
children: /* @__PURE__ */ X(j, {
|
|
193
|
+
"aria-label": t`Feedback`,
|
|
188
194
|
color: "inherit",
|
|
189
|
-
onClick:
|
|
190
|
-
children: [/* @__PURE__ */ Y(
|
|
195
|
+
onClick: l,
|
|
196
|
+
children: [/* @__PURE__ */ Y(fe, { color: "inherit" }), /* @__PURE__ */ Y(A, {
|
|
191
197
|
sx: {
|
|
192
198
|
fontSize: "1.3rem",
|
|
193
|
-
marginLeft:
|
|
194
|
-
[
|
|
199
|
+
marginLeft: n.spacing(1),
|
|
200
|
+
[n.breakpoints.up("md")]: {
|
|
195
201
|
position: "absolute",
|
|
196
202
|
visibility: "hidden"
|
|
197
203
|
}
|
|
198
204
|
},
|
|
199
|
-
children:
|
|
205
|
+
children: t`Feedback`
|
|
200
206
|
})]
|
|
201
207
|
})
|
|
202
|
-
}), /* @__PURE__ */ Y(
|
|
203
|
-
},
|
|
204
|
-
let
|
|
205
|
-
|
|
206
|
-
}, []),
|
|
207
|
-
let e = `Frontend version: ${
|
|
208
|
-
await navigator.clipboard.writeText(e),
|
|
209
|
-
}, [
|
|
210
|
-
return /* @__PURE__ */ Y(
|
|
208
|
+
}), /* @__PURE__ */ Y(i, { ref: o })] });
|
|
209
|
+
}, Te = ({ anchorElement: t, onClose: n }) => {
|
|
210
|
+
let r = G(() => w.createUuid(), []), i = K(null), s = !!t, { t: c } = Z(), l = e(), [u, d] = q(!1), f = H(() => {
|
|
211
|
+
i.current.open();
|
|
212
|
+
}, []), p = H(async () => {
|
|
213
|
+
let e = `Frontend version: ${l.getSoftwareVersion()}\nBackend version: ${C.resolve(o).version}\nURL: ${window.location.href}\nDate/time: ${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
214
|
+
await navigator.clipboard.writeText(e), d(!0), setTimeout(() => d(!1), 2e3);
|
|
215
|
+
}, [l]);
|
|
216
|
+
return /* @__PURE__ */ Y(L, {
|
|
211
217
|
...Q.createAttributes("InfoMenu"),
|
|
212
|
-
anchorEl:
|
|
218
|
+
anchorEl: t,
|
|
213
219
|
anchorOrigin: {
|
|
214
220
|
horizontal: "right",
|
|
215
221
|
vertical: "bottom"
|
|
216
222
|
},
|
|
217
|
-
id:
|
|
218
|
-
onClose:
|
|
219
|
-
open:
|
|
223
|
+
id: s ? r : void 0,
|
|
224
|
+
onClose: n,
|
|
225
|
+
open: s,
|
|
220
226
|
transformOrigin: {
|
|
221
227
|
horizontal: "right",
|
|
222
228
|
vertical: "top"
|
|
223
229
|
},
|
|
224
|
-
children: /* @__PURE__ */ X(
|
|
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(
|
|
237
|
+
/* @__PURE__ */ Y(N, {
|
|
232
238
|
divider: !0,
|
|
233
|
-
children: /* @__PURE__ */ Y(
|
|
234
|
-
primary:
|
|
235
|
-
secondary:
|
|
239
|
+
children: /* @__PURE__ */ Y(I, {
|
|
240
|
+
primary: c("Frontend version"),
|
|
241
|
+
secondary: l.getSoftwareVersion(),
|
|
236
242
|
slotProps: { primary: { sx: {
|
|
237
243
|
color: "primary.main",
|
|
238
244
|
fontWeight: "bold"
|
|
239
245
|
} } }
|
|
240
246
|
})
|
|
241
247
|
}),
|
|
242
|
-
/* @__PURE__ */ Y(
|
|
248
|
+
/* @__PURE__ */ Y(N, {
|
|
243
249
|
divider: !0,
|
|
244
|
-
children: /* @__PURE__ */ Y(
|
|
245
|
-
primary:
|
|
246
|
-
secondary:
|
|
250
|
+
children: /* @__PURE__ */ Y(I, {
|
|
251
|
+
primary: c("Backend version"),
|
|
252
|
+
secondary: C.resolve(o).version,
|
|
247
253
|
slotProps: { primary: { sx: {
|
|
248
254
|
color: "primary.main",
|
|
249
255
|
fontWeight: "bold"
|
|
250
256
|
} } }
|
|
251
257
|
})
|
|
252
258
|
}),
|
|
253
|
-
/* @__PURE__ */ Y(
|
|
259
|
+
/* @__PURE__ */ Y(N, {
|
|
254
260
|
divider: !0,
|
|
255
|
-
children: /* @__PURE__ */ X(
|
|
256
|
-
onClick:
|
|
257
|
-
children: [/* @__PURE__ */ Y(
|
|
258
|
-
primary:
|
|
261
|
+
children: /* @__PURE__ */ X(P, {
|
|
262
|
+
onClick: p,
|
|
263
|
+
children: [/* @__PURE__ */ Y(F, { children: u ? /* @__PURE__ */ Y(he, { color: "success" }) : /* @__PURE__ */ Y(ie, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
264
|
+
primary: c`Copy version information to clipboard`,
|
|
259
265
|
slotProps: { primary: { sx: {
|
|
260
266
|
color: "secondary.main",
|
|
261
267
|
fontWeight: "bold"
|
|
@@ -263,30 +269,30 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
263
269
|
})]
|
|
264
270
|
})
|
|
265
271
|
}),
|
|
266
|
-
/* @__PURE__ */ X(
|
|
267
|
-
onClick:
|
|
268
|
-
children: [/* @__PURE__ */ Y(
|
|
269
|
-
primary:
|
|
272
|
+
/* @__PURE__ */ X(N, { children: [/* @__PURE__ */ X(P, {
|
|
273
|
+
onClick: f,
|
|
274
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(me, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
275
|
+
primary: c`Show license information`,
|
|
270
276
|
slotProps: { primary: { sx: {
|
|
271
277
|
color: "secondary.main",
|
|
272
278
|
fontWeight: "bold"
|
|
273
279
|
} } }
|
|
274
280
|
})]
|
|
275
|
-
}), /* @__PURE__ */ Y(
|
|
281
|
+
}), /* @__PURE__ */ Y(a, { ref: i })] })
|
|
276
282
|
]
|
|
277
283
|
})
|
|
278
284
|
});
|
|
279
|
-
},
|
|
285
|
+
}, Ee = () => {
|
|
280
286
|
let [e, t] = q(null), { t: n } = Z(), r = V(), i = H((e) => {
|
|
281
287
|
t(e.currentTarget);
|
|
282
288
|
}, []), a = H(() => {
|
|
283
289
|
t(null);
|
|
284
290
|
}, []);
|
|
285
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
291
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
|
|
286
292
|
color: "inherit",
|
|
287
293
|
onClick: i,
|
|
288
294
|
title: "Code information",
|
|
289
|
-
children: [/* @__PURE__ */ Y(
|
|
295
|
+
children: [/* @__PURE__ */ Y(pe, { color: "inherit" }), /* @__PURE__ */ Y(A, {
|
|
290
296
|
sx: {
|
|
291
297
|
fontSize: "1.3rem",
|
|
292
298
|
marginLeft: r.spacing(1),
|
|
@@ -297,23 +303,23 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
297
303
|
},
|
|
298
304
|
children: n`Code information`
|
|
299
305
|
})]
|
|
300
|
-
}), e && /* @__PURE__ */ Y(
|
|
306
|
+
}), e && /* @__PURE__ */ Y(Te, {
|
|
301
307
|
anchorElement: e,
|
|
302
308
|
onClose: a
|
|
303
309
|
})] });
|
|
304
|
-
},
|
|
305
|
-
let { t: e } = Z(), t = V(), n = oe(
|
|
306
|
-
|
|
307
|
-
}, []),
|
|
310
|
+
}, De = () => {
|
|
311
|
+
let { t: e } = Z(), t = V(), n = oe(C.resolve(c)), r = G(() => n.some((e) => e.isLoading), [n]), [i, a] = q(!1), o = H(() => {
|
|
312
|
+
C.resolve(c).hideAllNotifications(), a(!0);
|
|
313
|
+
}, []), l = H(() => {
|
|
308
314
|
a(!1);
|
|
309
315
|
}, []);
|
|
310
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
316
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
|
|
311
317
|
"aria-label": e`Notifications`,
|
|
312
318
|
color: "inherit",
|
|
313
319
|
onClick: o,
|
|
314
320
|
title: e`Notifications`,
|
|
315
321
|
children: [
|
|
316
|
-
/* @__PURE__ */ Y(
|
|
322
|
+
/* @__PURE__ */ Y(k, {
|
|
317
323
|
badgeContent: n.length,
|
|
318
324
|
color: "secondary",
|
|
319
325
|
sx: { "& .MuiBadge-badge": {
|
|
@@ -322,14 +328,14 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
322
328
|
height: 15,
|
|
323
329
|
minWidth: 15
|
|
324
330
|
} },
|
|
325
|
-
children: /* @__PURE__ */ Y(
|
|
331
|
+
children: /* @__PURE__ */ Y(de, { color: "inherit" })
|
|
326
332
|
}),
|
|
327
|
-
r && /* @__PURE__ */ Y(
|
|
333
|
+
r && /* @__PURE__ */ Y(ee, {
|
|
328
334
|
color: "inherit",
|
|
329
335
|
size: t.spacing(3.5),
|
|
330
336
|
sx: { position: "absolute" }
|
|
331
337
|
}),
|
|
332
|
-
/* @__PURE__ */ Y(
|
|
338
|
+
/* @__PURE__ */ Y(A, {
|
|
333
339
|
sx: {
|
|
334
340
|
fontSize: "1.3rem",
|
|
335
341
|
marginLeft: t.spacing(1),
|
|
@@ -341,25 +347,25 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
341
347
|
children: e`Notifications`
|
|
342
348
|
})
|
|
343
349
|
]
|
|
344
|
-
}), /* @__PURE__ */ Y(
|
|
345
|
-
onDrawerClose:
|
|
350
|
+
}), /* @__PURE__ */ Y(s, {
|
|
351
|
+
onDrawerClose: l,
|
|
346
352
|
open: i
|
|
347
353
|
})] });
|
|
348
|
-
},
|
|
349
|
-
let { t: e } = Z(),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
]),
|
|
354
|
-
|
|
354
|
+
}, Oe = () => {
|
|
355
|
+
let { t: e } = Z(), t = V(), n = K(null), r = l(d, (e) => e.visibleOutages), i = l(d, (e) => e.activeOutages), a = l(d, (e) => e.soonActiveOutages), o = G(() => i.length > 0 || r.length > 0 || a.length > 0 ? "!" : null, [
|
|
356
|
+
i.length,
|
|
357
|
+
a.length,
|
|
358
|
+
r.length
|
|
359
|
+
]), s = H(() => {
|
|
360
|
+
n.current.open();
|
|
355
361
|
}, []);
|
|
356
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
362
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
|
|
357
363
|
"aria-label": e`Outages`,
|
|
358
364
|
color: "inherit",
|
|
359
|
-
onClick:
|
|
365
|
+
onClick: s,
|
|
360
366
|
title: e`Outages`,
|
|
361
|
-
children: [/* @__PURE__ */ Y(
|
|
362
|
-
badgeContent:
|
|
367
|
+
children: [/* @__PURE__ */ Y(k, {
|
|
368
|
+
badgeContent: o,
|
|
363
369
|
color: "secondary",
|
|
364
370
|
sx: { "& .MuiBadge-badge": {
|
|
365
371
|
border: "1px solid white",
|
|
@@ -367,38 +373,38 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
367
373
|
height: 15,
|
|
368
374
|
minWidth: 15
|
|
369
375
|
} },
|
|
370
|
-
children: /* @__PURE__ */ Y(
|
|
371
|
-
}), /* @__PURE__ */ Y(
|
|
376
|
+
children: /* @__PURE__ */ Y(ge, { color: "inherit" })
|
|
377
|
+
}), /* @__PURE__ */ Y(A, {
|
|
372
378
|
sx: {
|
|
373
379
|
fontSize: "1.3rem",
|
|
374
|
-
marginLeft:
|
|
375
|
-
[
|
|
380
|
+
marginLeft: t.spacing(1),
|
|
381
|
+
[t.breakpoints.up("md")]: {
|
|
376
382
|
position: "absolute",
|
|
377
383
|
visibility: "hidden"
|
|
378
384
|
}
|
|
379
385
|
},
|
|
380
386
|
children: e`Outages`
|
|
381
387
|
})]
|
|
382
|
-
}), /* @__PURE__ */ Y(
|
|
383
|
-
},
|
|
384
|
-
let { t: e } = Z(), t =
|
|
388
|
+
}), /* @__PURE__ */ Y(u, { ref: n })] });
|
|
389
|
+
}, $ = g(() => {
|
|
390
|
+
let { t: e } = Z(), t = _({
|
|
385
391
|
gcTime: 0,
|
|
386
|
-
queryFn: async ({ signal: e }) => (await
|
|
387
|
-
queryKey:
|
|
392
|
+
queryFn: async ({ signal: e }) => (await C.resolve(h).retrieveOrganizationAdminNameEmails({ signal: e })).data,
|
|
393
|
+
queryKey: C.resolve(v).getGenericKey(y.ORGANIZATION_ADMIN_NAME_EMAILS),
|
|
388
394
|
staleTime: 0
|
|
389
395
|
});
|
|
390
|
-
return /* @__PURE__ */ Y(
|
|
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(
|
|
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(
|
|
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
|
|
@@ -408,69 +414,69 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
408
414
|
})
|
|
409
415
|
});
|
|
410
416
|
}, { requiredPermissions: [{
|
|
411
|
-
command_name:
|
|
412
|
-
permission_type:
|
|
413
|
-
}] }), ke =
|
|
414
|
-
let { t: e } = Z(),
|
|
415
|
-
return /* @__PURE__ */ Y(
|
|
417
|
+
command_name: T.RetrieveOrganizationAdminNameEmailsCommand,
|
|
418
|
+
permission_type: D.EXECUTE
|
|
419
|
+
}] }), ke = g(() => {
|
|
420
|
+
let { t: e } = Z(), n = b(), r = G(() => n.isLoading ? e`Loading...` : n.error ? e`Error` : n.map.get(C.resolve(t).user?.organization_id ?? "")?.name ?? e`Unknown`, [n, e]);
|
|
421
|
+
return /* @__PURE__ */ Y(N, {
|
|
416
422
|
sx: { paddingBottom: 0 },
|
|
417
|
-
children: /* @__PURE__ */ Y(
|
|
423
|
+
children: /* @__PURE__ */ Y(I, {
|
|
418
424
|
primary: e`My organization`,
|
|
419
|
-
secondary:
|
|
425
|
+
secondary: r ?? e`Unknown`,
|
|
420
426
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
421
427
|
})
|
|
422
428
|
});
|
|
423
429
|
}, { requiredPermissions: [{
|
|
424
|
-
command_name:
|
|
425
|
-
permission_type:
|
|
426
|
-
}] }), Ae = ({ anchorElement:
|
|
427
|
-
let r =
|
|
428
|
-
|
|
429
|
-
}, []),
|
|
430
|
-
|
|
431
|
-
}, []),
|
|
432
|
-
|
|
430
|
+
command_name: T.RetrieveOrganizationAdminNameEmailsCommand,
|
|
431
|
+
permission_type: D.EXECUTE
|
|
432
|
+
}] }), Ae = ({ anchorElement: e, onClose: n }) => {
|
|
433
|
+
let r = ue(), i = K(null), a = G(() => w.createUuid(), []), o = !!e, { t: s } = Z(), c = K(null), l = H(() => {
|
|
434
|
+
c.current.open();
|
|
435
|
+
}, []), u = H(() => {
|
|
436
|
+
i.current.open();
|
|
437
|
+
}, []), d = H(() => {
|
|
438
|
+
C.resolve(f).log([{
|
|
433
439
|
detail: r.user,
|
|
434
|
-
level:
|
|
440
|
+
level: E.TRACE,
|
|
435
441
|
topic: "USER_LOGOUT"
|
|
436
|
-
}]),
|
|
437
|
-
}, [r]),
|
|
438
|
-
return /* @__PURE__ */ Y(
|
|
442
|
+
}]), C.resolve(f).flushLog(), r.signoutRedirect();
|
|
443
|
+
}, [r]), h = G(() => m.getUserDisplayValue(C.resolve(t).user, s), [s]), g = G(() => C.resolve(t).user?.roles, []);
|
|
444
|
+
return /* @__PURE__ */ Y(L, {
|
|
439
445
|
...Q.createAttributes("UserMenu"),
|
|
440
|
-
anchorEl:
|
|
446
|
+
anchorEl: e,
|
|
441
447
|
anchorOrigin: {
|
|
442
448
|
horizontal: "right",
|
|
443
449
|
vertical: "bottom"
|
|
444
450
|
},
|
|
445
|
-
id:
|
|
451
|
+
id: o ? a : void 0,
|
|
446
452
|
onClose: n,
|
|
447
|
-
open:
|
|
453
|
+
open: o,
|
|
448
454
|
transformOrigin: {
|
|
449
455
|
horizontal: "right",
|
|
450
456
|
vertical: "top"
|
|
451
457
|
},
|
|
452
|
-
children: /* @__PURE__ */ X(
|
|
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(
|
|
465
|
+
/* @__PURE__ */ Y(N, {
|
|
460
466
|
divider: !0,
|
|
461
|
-
children: /* @__PURE__ */ Y(
|
|
462
|
-
primary:
|
|
467
|
+
children: /* @__PURE__ */ Y(I, {
|
|
468
|
+
primary: h ?? s`Unknown`,
|
|
463
469
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
464
470
|
})
|
|
465
471
|
}),
|
|
466
472
|
/* @__PURE__ */ Y(ke, {}),
|
|
467
|
-
/* @__PURE__ */ Y(
|
|
468
|
-
/* @__PURE__ */ Y(
|
|
473
|
+
/* @__PURE__ */ Y($, {}),
|
|
474
|
+
/* @__PURE__ */ Y(N, {
|
|
469
475
|
divider: !0,
|
|
470
476
|
sx: { paddingTop: 0 },
|
|
471
|
-
children: /* @__PURE__ */ Y(
|
|
472
|
-
primary:
|
|
473
|
-
secondary: /* @__PURE__ */ Y(J, { children:
|
|
477
|
+
children: /* @__PURE__ */ Y(I, {
|
|
478
|
+
primary: s`My roles`,
|
|
479
|
+
secondary: /* @__PURE__ */ Y(J, { children: g?.map((e) => /* @__PURE__ */ Y(A, {
|
|
474
480
|
component: "span",
|
|
475
481
|
sx: {
|
|
476
482
|
display: "inline-block",
|
|
@@ -481,37 +487,37 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
481
487
|
slotProps: { primary: { sx: { fontWeight: "bold" } } }
|
|
482
488
|
})
|
|
483
489
|
}),
|
|
484
|
-
/* @__PURE__ */ X(
|
|
490
|
+
/* @__PURE__ */ X(N, {
|
|
485
491
|
alignItems: "center",
|
|
486
492
|
divider: !0,
|
|
487
493
|
sx: { justifyContent: "center" },
|
|
488
|
-
children: [/* @__PURE__ */ X(
|
|
489
|
-
onClick:
|
|
490
|
-
children: [/* @__PURE__ */ Y(
|
|
491
|
-
primary:
|
|
494
|
+
children: [/* @__PURE__ */ X(P, {
|
|
495
|
+
onClick: l,
|
|
496
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(ye, { color: "primary" }) }), /* @__PURE__ */ Y(I, {
|
|
497
|
+
primary: s`My API permissions`,
|
|
492
498
|
slotProps: { primary: { sx: { color: "primary.main" } } }
|
|
493
499
|
})]
|
|
494
|
-
}), /* @__PURE__ */ Y(
|
|
500
|
+
}), /* @__PURE__ */ Y(p, { ref: c })]
|
|
495
501
|
}),
|
|
496
|
-
/* @__PURE__ */ X(
|
|
502
|
+
/* @__PURE__ */ X(N, {
|
|
497
503
|
alignItems: "center",
|
|
498
504
|
sx: { justifyContent: "center" },
|
|
499
|
-
children: [/* @__PURE__ */ X(
|
|
500
|
-
onClick:
|
|
501
|
-
children: [/* @__PURE__ */ Y(
|
|
502
|
-
primary:
|
|
505
|
+
children: [/* @__PURE__ */ X(P, {
|
|
506
|
+
onClick: u,
|
|
507
|
+
children: [/* @__PURE__ */ Y(F, { children: /* @__PURE__ */ Y(ve, { color: "secondary" }) }), /* @__PURE__ */ Y(I, {
|
|
508
|
+
primary: s`Logout`,
|
|
503
509
|
slotProps: { primary: { sx: {
|
|
504
510
|
color: "secondary.main",
|
|
505
511
|
fontWeight: "bold"
|
|
506
512
|
} } }
|
|
507
513
|
})]
|
|
508
|
-
}), /* @__PURE__ */ Y(
|
|
509
|
-
body:
|
|
510
|
-
cancelLabel:
|
|
511
|
-
confirmLabel:
|
|
512
|
-
onConfirm:
|
|
513
|
-
ref:
|
|
514
|
-
title:
|
|
514
|
+
}), /* @__PURE__ */ Y(le, {
|
|
515
|
+
body: s`Click the logout button to logout`,
|
|
516
|
+
cancelLabel: s`Cancel`,
|
|
517
|
+
confirmLabel: s`Logout`,
|
|
518
|
+
onConfirm: d,
|
|
519
|
+
ref: i,
|
|
520
|
+
title: s`Are you sure you want to logout?`
|
|
515
521
|
})]
|
|
516
522
|
})
|
|
517
523
|
]
|
|
@@ -523,11 +529,11 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
523
529
|
}, []), a = H(() => {
|
|
524
530
|
r(null);
|
|
525
531
|
}, []);
|
|
526
|
-
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(
|
|
532
|
+
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(j, {
|
|
527
533
|
color: "inherit",
|
|
528
534
|
onClick: i,
|
|
529
535
|
title: "Account",
|
|
530
|
-
children: [/* @__PURE__ */ Y(
|
|
536
|
+
children: [/* @__PURE__ */ Y(_e, { color: "inherit" }), /* @__PURE__ */ Y(A, {
|
|
531
537
|
sx: {
|
|
532
538
|
fontSize: "1.3rem",
|
|
533
539
|
marginLeft: t.spacing(1),
|
|
@@ -546,12 +552,12 @@ 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
|
|
555
|
+
return C.resolve(S).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,
|
|
553
559
|
title: e`Change organization`,
|
|
554
|
-
children: [/* @__PURE__ */ Y(
|
|
560
|
+
children: [/* @__PURE__ */ Y(be, { color: "inherit" }), /* @__PURE__ */ Y(A, {
|
|
555
561
|
sx: {
|
|
556
562
|
fontSize: "1.3rem",
|
|
557
563
|
marginLeft: t.spacing(1),
|
|
@@ -562,112 +568,121 @@ var be = B(ae)(({ theme: e }) => ({
|
|
|
562
568
|
},
|
|
563
569
|
children: e`Change organization`
|
|
564
570
|
})]
|
|
565
|
-
}), /* @__PURE__ */ Y(
|
|
566
|
-
}, Ne = ({ fullWidth:
|
|
567
|
-
let
|
|
568
|
-
|
|
571
|
+
}), /* @__PURE__ */ Y(x, { ref: n })] }) : null;
|
|
572
|
+
}, Ne = ({ fullWidth: t }) => {
|
|
573
|
+
let n = V(), r = G(() => ({
|
|
574
|
+
background: n.palette.primary.main,
|
|
575
|
+
environmentMessageColor: "#ffea00",
|
|
576
|
+
primaryColor: n.palette.primary.contrastText,
|
|
577
|
+
...n.components?.GenEpixUiClientCommonApplicationBarActions ?? {}
|
|
578
|
+
}), [n]), { t: i } = Z(), a = e().getEnvironmentMessage(), o = W(), [s, c] = q(!1), l = H(() => {
|
|
579
|
+
c((e) => !e);
|
|
569
580
|
}, []);
|
|
570
581
|
return U(() => {
|
|
571
|
-
if (
|
|
582
|
+
if (s) {
|
|
572
583
|
let e = (e) => {
|
|
573
|
-
e.key === "Escape" &&
|
|
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
|
-
}, [
|
|
590
|
+
}, [s]), /* @__PURE__ */ X(A, {
|
|
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(
|
|
587
|
-
"aria-controls":
|
|
588
|
-
"aria-label":
|
|
589
|
-
onClick:
|
|
597
|
+
children: [/* @__PURE__ */ Y(j, {
|
|
598
|
+
"aria-controls": o,
|
|
599
|
+
"aria-label": i`Toggle menu`,
|
|
600
|
+
onClick: l,
|
|
590
601
|
sx: {
|
|
591
|
-
color:
|
|
592
|
-
[
|
|
602
|
+
color: r.primaryColor,
|
|
603
|
+
[n.breakpoints.up("md")]: { display: "none" }
|
|
593
604
|
},
|
|
594
|
-
children: /* @__PURE__ */ Y(
|
|
595
|
-
}), /* @__PURE__ */ X(
|
|
596
|
-
id:
|
|
605
|
+
children: /* @__PURE__ */ Y(ce, {})
|
|
606
|
+
}), /* @__PURE__ */ X(A, {
|
|
607
|
+
id: o,
|
|
597
608
|
sx: {
|
|
598
609
|
display: "flex",
|
|
599
|
-
[
|
|
610
|
+
[n.breakpoints.down("md")]: {
|
|
600
611
|
alignItems: "start",
|
|
601
|
-
background:
|
|
602
|
-
display:
|
|
612
|
+
background: r.background,
|
|
613
|
+
display: s ? "flex" : "none",
|
|
603
614
|
flexDirection: "column",
|
|
604
615
|
left: 0,
|
|
605
616
|
position: "absolute",
|
|
606
617
|
right: 0,
|
|
607
|
-
top:
|
|
608
|
-
zIndex:
|
|
618
|
+
top: n.spacing(6),
|
|
619
|
+
zIndex: n.zIndex.appBar - 1
|
|
609
620
|
}
|
|
610
621
|
},
|
|
611
622
|
children: [
|
|
612
|
-
/* @__PURE__ */ Y(
|
|
623
|
+
/* @__PURE__ */ Y(we, {}),
|
|
624
|
+
/* @__PURE__ */ Y(Oe, {}),
|
|
613
625
|
/* @__PURE__ */ Y(De, {}),
|
|
614
626
|
/* @__PURE__ */ Y(Ee, {}),
|
|
615
|
-
/* @__PURE__ */ Y(Te, {}),
|
|
616
627
|
/* @__PURE__ */ Y(Me, {}),
|
|
617
628
|
/* @__PURE__ */ Y(je, {}),
|
|
618
|
-
|
|
629
|
+
a && /* @__PURE__ */ Y(A, {
|
|
619
630
|
...Q.createAttributes("ApplicationBarActions-EnvironmentMessage"),
|
|
620
631
|
"aria-hidden": "true",
|
|
621
632
|
sx: {
|
|
622
633
|
alignItems: "center",
|
|
623
|
-
color:
|
|
634
|
+
color: r.environmentMessageColor,
|
|
624
635
|
display: "flex",
|
|
625
636
|
fontWeight: 700,
|
|
626
|
-
marginRight: +!
|
|
627
|
-
padding: `0 ${
|
|
637
|
+
marginRight: +!t,
|
|
638
|
+
padding: `0 ${n.spacing(1)} !important`,
|
|
628
639
|
textTransform: "uppercase",
|
|
629
|
-
[
|
|
640
|
+
[n.breakpoints.down("md")]: {
|
|
630
641
|
position: "absolute",
|
|
631
642
|
visibility: "hidden"
|
|
632
643
|
}
|
|
633
644
|
},
|
|
634
|
-
children:
|
|
645
|
+
children: i("{{environmentMessage}}", { environmentMessage: a })
|
|
635
646
|
})
|
|
636
647
|
]
|
|
637
648
|
})]
|
|
638
649
|
});
|
|
639
|
-
}, Pe = ({ fullWidth:
|
|
640
|
-
let
|
|
641
|
-
|
|
650
|
+
}, Pe = ({ fullWidth: t, singleAction: n }) => {
|
|
651
|
+
let r = V(), i = G(() => ({
|
|
652
|
+
background: r.palette.primary.main,
|
|
653
|
+
primaryColor: r.palette.primary.contrastText,
|
|
654
|
+
...r.components?.GenEpixUiClientCommonApplicationBar ?? {}
|
|
655
|
+
}), [r]), a = e();
|
|
656
|
+
return /* @__PURE__ */ Y(O, {
|
|
642
657
|
...Q.createAttributes("ApplicationBar"),
|
|
643
658
|
position: "static",
|
|
644
659
|
square: !0,
|
|
645
660
|
sx: {
|
|
646
|
-
background:
|
|
661
|
+
background: i.background,
|
|
647
662
|
boxShadow: "none"
|
|
648
663
|
},
|
|
649
|
-
children: /* @__PURE__ */ Y(
|
|
664
|
+
children: /* @__PURE__ */ Y(te, {
|
|
650
665
|
disableGutters: !0,
|
|
651
|
-
maxWidth: !
|
|
652
|
-
children: /* @__PURE__ */ X(
|
|
666
|
+
maxWidth: !t && "xl",
|
|
667
|
+
children: /* @__PURE__ */ X(R, {
|
|
653
668
|
disableGutters: !0,
|
|
654
669
|
sx: {
|
|
655
670
|
height: 48,
|
|
656
|
-
justifyContent:
|
|
671
|
+
justifyContent: n ? "center" : "space-between",
|
|
657
672
|
minHeight: "48px !important"
|
|
658
673
|
},
|
|
659
|
-
children: [
|
|
674
|
+
children: [n && /* @__PURE__ */ Y(A, {
|
|
660
675
|
sx: { marginX: 2 },
|
|
661
676
|
children: /* @__PURE__ */ Y(z, {
|
|
662
677
|
component: "h1",
|
|
663
678
|
sx: {
|
|
664
|
-
color:
|
|
679
|
+
color: i.primaryColor,
|
|
665
680
|
fontSize: "1.3rem"
|
|
666
681
|
},
|
|
667
682
|
variant: "body2",
|
|
668
|
-
children:
|
|
683
|
+
children: a.applicationName
|
|
669
684
|
})
|
|
670
|
-
}), !
|
|
685
|
+
}), !n && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Se, { fullWidth: t }), /* @__PURE__ */ Y(Ne, { fullWidth: t })] })]
|
|
671
686
|
})
|
|
672
687
|
})
|
|
673
688
|
});
|