@gen-epix/ui-client-common 4.5.0 → 4.6.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 +5 -4
- package/dist/@types/mui.d.ts +13 -5
- package/dist/@types/ui-client-common.d.ts +1 -0
- package/dist/_chunks/ApplicationFooter.js +45 -46
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +14 -15
- package/dist/_chunks/CrudPage.js +301 -302
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js +1 -2
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js +52 -53
- package/dist/_chunks/OutageList.js +30 -31
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/OutageUtil.js +4 -8
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -2
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +101 -395
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Reflect.js +1 -2
- package/dist/_chunks/Table.js +523 -522
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +10 -20
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +18 -20
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +78 -79
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +212 -213
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseAssignValue.js +1 -2
- package/dist/_chunks/_baseFlatten.js +9 -10
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseGet.js +279 -0
- package/dist/_chunks/_baseGet.js.map +1 -0
- package/dist/_chunks/_baseIteratee.js +273 -0
- package/dist/_chunks/_baseIteratee.js.map +1 -0
- package/dist/_chunks/_baseUnset.js +22 -300
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/_cacheHas.js +1 -2
- package/dist/_chunks/_setToString.js +1 -2
- package/dist/_chunks/decorate.js +1 -2
- package/dist/_chunks/decorateParam.js +1 -2
- package/dist/_chunks/format.js +27 -54
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/isArrayLike.js +1 -2
- package/dist/_chunks/isObject.js +1 -2
- package/dist/_chunks/isSymbol.js +1 -2
- package/dist/_chunks/last.js +12 -0
- package/dist/_chunks/last.js.map +1 -0
- package/dist/_chunks/middleware.js +2 -3
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +42 -42
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +8 -15
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +2 -3
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/rolldown-runtime.js +2 -3
- package/dist/_chunks/tableStore.js +231 -224
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js +8 -14
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/uniq.js +43 -0
- package/dist/_chunks/uniq.js.map +1 -0
- package/dist/_chunks/useColumnsMenu.js +3 -6
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +24 -26
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +33 -22
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -2
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -4
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/TableEventBus/index.js +1 -2
- package/dist/classes/abstracts/FilterAbstract/index.js +4 -3
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +15 -16
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/index.js +5 -6
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BackendVersionService/index.js +4 -4
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js +16 -39
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/index.js +10 -10
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/FeatureFlagsService/index.js +1 -2
- package/dist/classes/services/I18nService/index.js +12 -12
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +13 -14
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/index.js +40 -35
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NavigationHistoryService/index.js +1 -2
- package/dist/classes/services/NotificationService/index.js +9 -10
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/index.js +14 -11
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +4 -8
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/classes/services/UserSettingsService/index.js +1 -2
- package/dist/components/app/App/App.d.ts +1 -1
- package/dist/components/app/App/index.js +35 -40
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +29 -30
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +48 -47
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +36 -37
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +20 -21
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +53 -52
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +22 -23
- package/dist/components/filters/BooleanFilterField/index.js +6 -7
- package/dist/components/filters/DateFilterField/index.js +4 -5
- package/dist/components/filters/GeoFilterField/index.js +5 -6
- package/dist/components/filters/MultiSelectFilterField/index.js +5 -6
- package/dist/components/filters/NumberRangeFilterField/index.js +4 -5
- package/dist/components/filters/TextFilterField/index.js +4 -5
- package/dist/components/ui/ApplicationBar/index.js +189 -190
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ConsentDialog/index.js +1 -2
- package/dist/components/ui/GenericErrorMessage/index.js +30 -31
- package/dist/components/ui/LicensesDialog/index.js +39 -40
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +17 -18
- package/dist/components/ui/NavLink/index.js +7 -8
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +22 -23
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/OutagesDialog/index.js +1 -2
- package/dist/components/ui/PageContainer/index.js +25 -26
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +1 -2
- package/dist/components/ui/Sidebar/index.js +31 -32
- package/dist/components/ui/UserFeedbackDialog/index.js +13 -14
- package/dist/components/ui/UserInactivityConfirmation/index.js +1 -2
- package/dist/constants/api.constants.js +1 -2
- package/dist/constants/config.constants.d.ts +0 -2
- package/dist/constants/config.constants.js +3 -4
- package/dist/constants/config.constants.js.map +1 -1
- package/dist/constants/query.constants.js +1 -2
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +13 -14
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +15 -16
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +13 -14
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +14 -15
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +5 -6
- package/dist/dataHooks/useOrganizationsQuery/index.js +14 -15
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +11 -12
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/hoc/withPermissions/index.js +1 -2
- package/dist/hooks/useConfig/index.js +3 -4
- package/dist/hooks/useConfig/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/index.js +13 -14
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/index.js +17 -11
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/index.js +49 -35
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useInitializeTableStore/index.js +1 -2
- package/dist/hooks/useItemQuery/index.js +5 -6
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/hooks/useUpdateBreadcrumb/index.js +1 -2
- package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
- package/dist/locale/en.json +1 -0
- package/dist/locale/nl.json +1 -0
- package/dist/models/admin.models.js +1 -2
- package/dist/models/admin.models.js.map +1 -1
- package/dist/models/config.models.d.ts +1 -5
- package/dist/models/table.models.js +1 -2
- package/dist/models/table.models.js.map +1 -1
- package/dist/models/theme.models.d.ts +19 -16
- package/dist/pages/AcceptInvitationPage/index.js +26 -27
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +17 -18
- package/dist/pages/ChooseIdentityProviderPage/index.js +22 -23
- package/dist/pages/ErrorPage/index.js +1 -2
- package/dist/pages/IdentifierIssuersAdminPage/index.js +6 -7
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +6 -7
- package/dist/pages/OrganizationContactsAdminPage/index.js +7 -8
- package/dist/pages/OrganizationSitesAdminPage/index.js +10 -11
- package/dist/pages/OrganizationsAdminPage/index.js +14 -15
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +21 -22
- package/dist/pages/PostLoginPage/index.js +8 -9
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js +9 -10
- package/dist/pages/RouterErrorPage/index.js +1 -2
- package/dist/pages/UsersAdminPage/index.js +40 -41
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/routes/index.js +1 -2
- package/dist/setup/setup.js +12 -6
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/index.js +1 -2
- package/dist/stores/outagesStore/index.js +1 -2
- package/dist/theme/demoTheme/index.js +18 -17
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/AxiosUtil/index.js +1 -2
- package/dist/utils/DataHookUtil/index.js +2 -3
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +2 -3
- package/dist/utils/DependencyContainerUtil/index.js +10 -16
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/LoadableUtil/index.js +1 -2
- package/dist/utils/MenuDataUtil/index.js +2 -3
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/NotificationUtil/index.js +1 -2
- package/dist/utils/StandardConfigUtil/index.js +1 -6
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TimeUtil/index.js +2 -3
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/dist/utils/UserUtil/index.js +1 -2
- package/package.json +26 -29
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContext.d.ts +0 -9
- package/dist/context/ClientCommonConfigContext/ClientCommonConfigContextProvider.d.ts +0 -6
- package/dist/context/ClientCommonConfigContext/index.d.ts +0 -3
- package/dist/context/ClientCommonConfigContext/index.js +0 -34
- package/dist/context/ClientCommonConfigContext/index.js.map +0 -1
- package/dist/context/ClientCommonConfigContext/useClientCommonConfigContext.d.ts +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["NavLink","BaseNavLink","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","useQueryMemo","useStore","NotificationsDrawer","Fragment$1","ContentCopyIcon","MenuIcon","MoreVertIcon","NotificationsIcon","ChatIcon","CodeIcon","CopyrightIcon","DoneIcon","ConstructionIcon","AccountCircleIcon","LogoutIcon","KeyIcon","ChangeCircleIcon","NavLink$1","styled","NavLink","theme","ApplicationBarNavigationMenu","useTranslation","useTheme","authorizationService","useMemo","container","AuthorizationService","navId","useId","menuItems","rootItem","RouterService","r","isMenuOpen","setIsMenuOpen","useState","handleKeyDown","event","onMenuButtonClick","useCallback","x","onNavLinkClick","Box","IconButton","fullWidth","menuItem","isDisabled","NOW","ApplicationBarActionsFeedbackItem","config","useConfig","userFeedbackDialogRef","useRef","isFeedbackTooltipOpen","setIsFeedbackTooltipOpen","UserSettingsService","timeoutMs","handle","onUserFeedbackMenuIconClick","onTooltipMouseEnter","Tooltip","UserFeedbackDialog","InfoMenu","popoverId","StringUtil","licensesDialogRef","isInfoMenuOpen","anchorElement","isCopied","setIsCopied","onShowLicenseInformationButtonClick","onCopyVersionInformationButtonClick","versionInformation","BackendVersionService","Popover","TestIdUtil","List","ListItem","ListItemText","t","ListItemButton","ListItemIcon","LicensesDialog","ApplicationBarActionsInfoItem","infoMenuAnchorElement","setInfoMenuAnchorElement","onInfoMenuIconClick","onInfoMenuClose","ApplicationBarActionsNotificationsItem","notifications","useSubscribable","NotificationService","isLoading","open","setOpen","onMenuIconClick","onDrawerClose","Badge","CircularProgress","ApplicationBarActionsOutagesItem","outagesDialogRef","visibleOutages","outagesStore","state","activeOutages","soonActiveOutages","badgeContent","OutagesDialog","UserOrganizationAdminMenuItem","withPermissions","organizationAdminNameEmails","organizationAdminNameEmailsError","isOrganizationAdminNameEmailsLoading","API_ABAC_TOKEN","QueryClientService","COMMON_QUERY_KEY","Link","admin","CommonDbCommandName","CommonDbPermissionType","UserOwnOrganizationMenuItem","organizationMapQuery","useOrganizationMapQuery","userOrganization","UserMenu","auth","useAuth","logoutConfirmationRef","isUserMenuOpen","myPermissionsDialogRef","onViewMyPermissionsButtonClick","onLogoutButtonClick","onLogoutConfirmationConfirm","LogService","CommonDbLogLevel","userName","UserUtil","userRoles","role","MyPermissionsDialog","Confirmation","ApplicationBarActionsUserItem","accountMenuAnchorElement","setAccountMenuAnchorElement","onAccountMenuIconClick","onAccountMenuClose","ApplicationBarActionsOrganizationSwitcherItem","organizationSwitcherDialogRef","FeatureFlagsService","OrganizationSwitcherDialog","ApplicationBarActions","environmentMessage","useEffect","ApplicationBar","AppBar","Container","Toolbar","singleAction","Typography"],"sources":["../../../../src/components/ui/ApplicationBar/ApplicationBarNavigationMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsFeedbackItem.tsx","../../../../src/components/ui/ApplicationBar/InfoMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsInfotem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsNotificationsItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsOutagesItem.tsx","../../../../src/components/ui/ApplicationBar/UserOrganizationAdminMenuItem.tsx","../../../../src/components/ui/ApplicationBar/UserOwnOrganizationMenuItem.tsx","../../../../src/components/ui/ApplicationBar/UserMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsUserItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsOrganizationSwitcherItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActions.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBar.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n styled,\n useTheme,\n} from '@mui/material';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { useTranslation } from 'react-i18next';\nimport { NavLink as BaseNavLink } from 'react-router-dom';\nimport {\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\n\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\nimport { RouterService } from '../../../classes/services/RouterService';\n\nconst NavLink = styled(BaseNavLink)(({ theme }) => ({\n '&:hover': {\n textDecoration: 'underline',\n },\n color: theme.palette.secondary.contrastText,\n display: 'inline-block',\n fontSize: '1.3rem',\n textDecoration: 'none',\n}));\n\nexport type ApplicationBarNavigationMenuProps = {\n readonly fullWidth?: boolean;\n};\n\nexport const ApplicationBarNavigationMenu = ({ fullWidth }: ApplicationBarNavigationMenuProps) => {\n const { t } = useTranslation();\n const theme = useTheme();\n const authorizationService = useMemo(() => container.resolve(AuthorizationService), []);\n const navId = useId();\n\n const menuItems = useMemo(() => {\n const rootItem = container.resolve(RouterService).routes.find(r => r.handle.root);\n return [rootItem, ...rootItem.children.filter(r => !r.handle.hidden)] as MyNonIndexRouteObject[];\n }, []);\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n useEffect(() => {\n if (isMenuOpen) {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsMenuOpen(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [isMenuOpen]);\n\n const onMenuButtonClick = useCallback(() => {\n setIsMenuOpen(x => !x);\n }, []);\n\n const onNavLinkClick = useCallback((event: MouseEvent<HTMLAnchorElement>) => {\n if (event.currentTarget.ariaDisabled === 'true') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <Box\n sx={{\n flexGrow: 1,\n }}\n >\n <IconButton\n aria-controls={navId}\n aria-label={t`Toggle navigation menu`}\n onClick={onMenuButtonClick}\n sx={{\n color: theme['gen-epix-ui'].navbar.primaryColor,\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n }}\n >\n <MenuIcon />\n </IconButton>\n <Box\n component={'nav'}\n id={navId}\n sx={{\n flexGrow: 1,\n [theme.breakpoints.down('md')]: {\n background: theme['gen-epix-ui'].navbar.background,\n display: isMenuOpen ? 'block' : 'none',\n left: 0,\n paddingBottom: 4,\n position: 'absolute',\n top: 48,\n width: '100%',\n },\n }}\n >\n <Box\n component={'ul'}\n sx={{\n display: 'flex',\n margin: 0,\n marginLeft: fullWidth ? 0 : 2,\n padding: 0,\n [theme.breakpoints.down('md')]: {\n display: 'block',\n margin: 0,\n },\n }}\n >\n {menuItems.filter(menuItem => authorizationService.doesUserHavePermissionForRoute(menuItem)).map(menuItem => {\n const isDisabled = !!menuItem.handle.disabled;\n return (\n <Box\n component={'li'}\n key={menuItem.path}\n sx={{\n '&:has(.active:not([aria-disabled=\"true\"]))': {\n '& svg': {\n color: theme['gen-epix-ui'].navbar.activeColor,\n },\n a: {\n color: theme['gen-epix-ui'].navbar.activeColor,\n },\n background: theme['gen-epix-ui'].navbar.activeBackground,\n },\n '& svg': {\n color: isDisabled ? theme.palette.grey[400] : undefined,\n marginTop: '6px',\n },\n alignItems: 'center',\n color: isDisabled ? theme.palette.grey[400] : theme['gen-epix-ui'].navbar.primaryColor,\n display: 'flex',\n fontWeight: 800,\n height: 48,\n listStyle: 'none',\n padding: `0 ${theme.spacing(1)}`,\n }}\n >\n <NavLink\n aria-disabled={isDisabled || undefined}\n aria-label={menuItem.handle.title}\n onClick={onNavLinkClick}\n sx={{\n '&:hover': {\n textDecoration: isDisabled ? 'none' : undefined,\n },\n color: isDisabled ? theme.palette.grey[400] : undefined,\n cursor: isDisabled ? 'not-allowed' : undefined,\n padding: `0 ${theme.spacing(1)}`,\n }}\n tabIndex={isDisabled ? -1 : undefined}\n to={menuItem.path}\n >\n {!!menuItem.handle.icon && menuItem.handle.icon}\n {!menuItem.handle.icon && menuItem.handle.title}\n </NavLink>\n </Box>\n );\n })}\n </Box>\n </Box>\n </Box>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n Tooltip,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ChatIcon from '@mui/icons-material/Chat';\n\nimport { UserSettingsService } from '../../../classes/services/UserSettingsService';\nimport { UserFeedbackDialog } from '../UserFeedbackDialog';\nimport type { UserFeedbackDialogRefMethods } from '../UserFeedbackDialog';\nimport { useConfig } from '../../../hooks/useConfig';\n\nconst NOW = new Date().getTime();\n\nexport const ApplicationBarActionsFeedbackItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const config = useConfig();\n const userFeedbackDialogRef = useRef<UserFeedbackDialogRefMethods>(null);\n const [isFeedbackTooltipOpen, setIsFeedbackTooltipOpen] = useState(false);\n useEffect(() => {\n if (!container.resolve(UserSettingsService).showShowUserFeedbackTooltip) {\n return;\n }\n const timeoutMs = Math.max(0, config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS - (new Date().getTime() - NOW));\n const handle = setTimeout(() => {\n setIsFeedbackTooltipOpen(true);\n }, timeoutMs);\n return () => {\n clearTimeout(handle);\n };\n }, [config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS]);\n\n const onUserFeedbackMenuIconClick = useCallback(() => {\n userFeedbackDialogRef.current.open();\n }, []);\n\n const onTooltipMouseEnter = useCallback(() => {\n setIsFeedbackTooltipOpen(false);\n container.resolve(UserSettingsService).showShowUserFeedbackTooltip = false;\n }, []);\n\n return (\n <>\n <Tooltip\n arrow\n color={'secondary'}\n onMouseEnter={onTooltipMouseEnter}\n open={isFeedbackTooltipOpen}\n placement={'left'}\n slotProps={{\n arrow: {\n sx: {\n color: theme.palette.secondary.main,\n },\n },\n popper: {\n disablePortal: true,\n },\n tooltip: {\n sx: {\n backgroundColor: theme.palette.secondary.main,\n marginRight: `${theme.spacing(0.5)} !important`,\n },\n },\n }}\n title={t`Would you like to share your feedback?`}\n >\n <IconButton\n aria-label={t`Feedback`}\n color={'inherit'}\n onClick={onUserFeedbackMenuIconClick}\n >\n <ChatIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Feedback`}\n </Box>\n </IconButton>\n </Tooltip>\n <UserFeedbackDialog ref={userFeedbackDialogRef} />\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Popover,\n} from '@mui/material';\nimport CopyrightIcon from '@mui/icons-material/Copyright';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport DoneIcon from '@mui/icons-material/Done';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport type { LicensesDialogRefMethods } from '../LicensesDialog';\nimport { LicensesDialog } from '../LicensesDialog';\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { useConfig } from '../../../hooks/useConfig';\n\ntype InfoMenuProps = {\n readonly anchorElement: HTMLElement;\n readonly onClose: () => void;\n};\n\nexport const InfoMenu = ({ anchorElement, onClose }: InfoMenuProps): ReactElement => {\n const popoverId = useMemo(() => StringUtil.createUuid(), []);\n const licensesDialogRef = useRef<LicensesDialogRefMethods>(null);\n const isInfoMenuOpen = !!anchorElement;\n const { t } = useTranslation();\n const config = useConfig();\n const [isCopied, setIsCopied] = useState(false);\n const onShowLicenseInformationButtonClick = useCallback(() => {\n licensesDialogRef.current.open();\n }, []);\n\n const onCopyVersionInformationButtonClick = useCallback(async () => {\n const versionInformation = `Frontend version: ${config.getSoftwareVersion()}\\nBackend version: ${container.resolve(BackendVersionService).version}\\nURL: ${window.location.href}\\nDate/time: ${new Date().toISOString()}`;\n await navigator.clipboard.writeText(versionInformation);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }, [config]);\n\n return (\n <Popover\n {...TestIdUtil.createAttributes('InfoMenu')}\n anchorEl={anchorElement}\n anchorOrigin={{\n horizontal: 'right',\n vertical: 'bottom',\n }}\n id={isInfoMenuOpen ? popoverId : undefined}\n onClose={onClose}\n open={isInfoMenuOpen}\n transformOrigin={{\n horizontal: 'right',\n vertical: 'top',\n }}\n >\n <List\n sx={{\n maxWidth: 300,\n minWidth: 200,\n width: '100%',\n }}\n >\n <ListItem\n divider\n >\n <ListItemText\n primary={t('Frontend version')}\n secondary={config.getSoftwareVersion()}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n divider\n >\n <ListItemText\n primary={t('Backend version')}\n secondary={container.resolve(BackendVersionService).version}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n divider\n >\n <ListItemButton\n onClick={onCopyVersionInformationButtonClick}\n >\n <ListItemIcon>\n {isCopied ? <DoneIcon color={'success'} /> : <ContentCopyIcon color={'secondary'} />}\n </ListItemIcon>\n <ListItemText\n primary={t`Copy version information to clipboard`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n </ListItem>\n <ListItem>\n <ListItemButton\n onClick={onShowLicenseInformationButtonClick}\n >\n <ListItemIcon>\n <CopyrightIcon color={'secondary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`Show license information`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n <LicensesDialog\n ref={licensesDialogRef}\n />\n </ListItem>\n\n </List>\n </Popover>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport CodeIcon from '@mui/icons-material/Code';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { InfoMenu } from './InfoMenu';\n\nexport const ApplicationBarActionsInfoItem = () => {\n const [infoMenuAnchorElement, setInfoMenuAnchorElement] = useState<HTMLElement | null>(null);\n const { t } = useTranslation();\n const theme = useTheme();\n\n const onInfoMenuIconClick = useCallback((event: MouseEvent<HTMLElement>): void => {\n setInfoMenuAnchorElement(event.currentTarget);\n }, []);\n\n const onInfoMenuClose = useCallback(() => {\n setInfoMenuAnchorElement(null);\n }, []);\n\n return (\n <>\n <IconButton\n color={'inherit'}\n onClick={onInfoMenuIconClick}\n title={'Code information'}\n >\n <CodeIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Code information`}\n </Box>\n </IconButton>\n {infoMenuAnchorElement && (\n <InfoMenu\n anchorElement={infoMenuAnchorElement}\n onClose={onInfoMenuClose}\n />\n )}\n\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Badge,\n Box,\n CircularProgress,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport NotificationsIcon from '@mui/icons-material/Notifications';\nimport { useTranslation } from 'react-i18next';\nimport { useSubscribable } from '@gen-epix/ui-core/hooks/useSubscribable';\n\nimport { NotificationsDrawer } from '../Notifications';\nimport { NotificationService } from '../../../classes/services/NotificationService';\n\n\nexport const ApplicationBarActionsNotificationsItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const notifications = useSubscribable(container.resolve(NotificationService));\n const isLoading = useMemo(() => notifications.some(x => x.isLoading), [notifications]);\n const [open, setOpen] = useState(false);\n\n\n const onMenuIconClick = useCallback(() => {\n container.resolve(NotificationService).hideAllNotifications();\n setOpen(true);\n }, []);\n\n const onDrawerClose = useCallback(() => {\n setOpen(false);\n }, []);\n\n return (\n <>\n <IconButton\n aria-label={t`Notifications`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Notifications`}\n >\n <Badge\n badgeContent={notifications.length}\n color={'secondary'}\n sx={{ '& .MuiBadge-badge': { border: '1px solid white', fontSize: 9, height: 15, minWidth: 15 } }}\n >\n <NotificationsIcon color={'inherit'} />\n </Badge>\n {isLoading && (\n <CircularProgress\n color={'inherit'}\n size={theme.spacing(3.5)}\n sx={{\n position: 'absolute',\n }}\n />\n )}\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Notifications`}\n </Box>\n </IconButton>\n <NotificationsDrawer\n onDrawerClose={onDrawerClose}\n open={open}\n />\n </>\n );\n};\n","import {\n Badge,\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport ConstructionIcon from '@mui/icons-material/Construction';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\n\nimport { OutagesDialog } from '../OutagesDialog';\nimport type { OutagesDialogRefMethods } from '../OutagesDialog';\nimport { outagesStore } from '../../../stores/outagesStore';\n\nexport const ApplicationBarActionsOutagesItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const outagesDialogRef = useRef<OutagesDialogRefMethods>(null);\n const visibleOutages = useStore(outagesStore, (state) => state.visibleOutages);\n const activeOutages = useStore(outagesStore, (state) => state.activeOutages);\n const soonActiveOutages = useStore(outagesStore, (state) => state.soonActiveOutages);\n\n\n const badgeContent = useMemo<string>(() => {\n if (activeOutages.length > 0 || visibleOutages.length > 0 || soonActiveOutages.length > 0) {\n return '!';\n }\n return null;\n }, [activeOutages.length, soonActiveOutages.length, visibleOutages.length]);\n\n const onMenuIconClick = useCallback(() => {\n outagesDialogRef.current.open();\n }, []);\n\n\n return (\n <>\n <IconButton\n aria-label={t`Outages`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Outages`}\n >\n <Badge\n badgeContent={badgeContent}\n color={'secondary'}\n sx={{ '& .MuiBadge-badge': { border: '1px solid white', fontSize: 9, height: 15, minWidth: 15 } }}\n >\n <ConstructionIcon color={'inherit'} />\n </Badge>\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Outages`}\n </Box>\n </IconButton>\n <OutagesDialog ref={outagesDialogRef} />\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Link,\n ListItem,\n ListItemText,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport {\n CommonDbCommandName,\n CommonDbPermissionType,\n} from '@gen-epix/api-commondb';\n\nimport { API_ABAC_TOKEN } from '../../../constants/api.constants';\nimport { withPermissions } from '../../../hoc/withPermissions';\nimport { useQueryMemo } from '../../../hooks/useQueryMemo';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { COMMON_QUERY_KEY } from '../../../constants/query.constants';\n\nexport const UserOrganizationAdminMenuItem = withPermissions(() => {\n const { t } = useTranslation();\n\n const { data: organizationAdminNameEmails, error: organizationAdminNameEmailsError, isLoading: isOrganizationAdminNameEmailsLoading } = useQueryMemo({\n gcTime: 0,\n queryFn: async ({ signal }) => (await container.resolve(API_ABAC_TOKEN).retrieveOrganizationAdminNameEmails({ signal })).data,\n queryKey: container.resolve(QueryClientService).getGenericKey(COMMON_QUERY_KEY.ORGANIZATION_ADMIN_NAME_EMAILS),\n staleTime: 0,\n });\n\n return (\n <ListItem\n alignItems={'center'}\n sx={{\n justifyContent: 'center',\n paddingTop: 0,\n }}\n >\n <ListItemText\n primary={t`My organizations admins`}\n secondary={(\n <>\n {isOrganizationAdminNameEmailsLoading && t`Loading...`}\n {organizationAdminNameEmailsError && t`Error`}\n {organizationAdminNameEmails?.map(admin => (\n <Link\n href={`mailto:${admin.email}`}\n key={admin.id}\n sx={{\n display: 'table',\n }}\n >\n {admin.name ?? admin.email}\n </Link>\n ))}\n </>\n )}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n );\n}, {\n requiredPermissions: [\n { command_name: CommonDbCommandName.RetrieveOrganizationAdminNameEmailsCommand, permission_type: CommonDbPermissionType.EXECUTE },\n ],\n});\n","import { container } from 'tsyringe';\nimport {\n ListItem,\n ListItemText,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport { useMemo } from 'react';\nimport {\n CommonDbCommandName,\n CommonDbPermissionType,\n} from '@gen-epix/api-commondb';\n\nimport { withPermissions } from '../../../hoc/withPermissions';\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport { useOrganizationMapQuery } from '../../../dataHooks/useOrganizationsQuery';\n\nexport const UserOwnOrganizationMenuItem = withPermissions(() => {\n const { t } = useTranslation();\n\n const organizationMapQuery = useOrganizationMapQuery();\n\n const userOrganization = useMemo(() => {\n if (organizationMapQuery.isLoading) {\n return t`Loading...`;\n }\n if (organizationMapQuery.error) {\n return t`Error`;\n }\n return organizationMapQuery.map.get(container.resolve(AuthorizationService).user?.organization_id ?? '')?.name ?? t`Unknown`;\n }, [organizationMapQuery, t]);\n\n return (\n <ListItem\n sx={{\n paddingBottom: 0,\n }}\n >\n <ListItemText\n primary={t`My organization`}\n secondary={userOrganization ?? t`Unknown`}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n );\n}, {\n requiredPermissions: [\n { command_name: CommonDbCommandName.RetrieveOrganizationAdminNameEmailsCommand, permission_type: CommonDbPermissionType.EXECUTE },\n ],\n});\n","import { container } from 'tsyringe';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport {\n Box,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Popover,\n} from '@mui/material';\nimport LogoutIcon from '@mui/icons-material/Logout';\nimport KeyIcon from '@mui/icons-material/Key';\nimport { useTranslation } from 'react-i18next';\nimport { useAuth } from 'react-oidc-context';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { Confirmation } from '@gen-epix/ui-core-components/components/Confirmation';\nimport type { ConfirmationRefMethods } from '@gen-epix/ui-core-components/components/Confirmation';\n\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport type { MyPermissionsDialogRefMethods } from '../MyPermissionsDialog';\nimport { MyPermissionsDialog } from '../MyPermissionsDialog';\nimport { UserUtil } from '../../../utils/UserUtil';\n\nimport { UserOrganizationAdminMenuItem } from './UserOrganizationAdminMenuItem';\nimport { UserOwnOrganizationMenuItem } from './UserOwnOrganizationMenuItem';\n\ntype UserMenuProps = {\n readonly anchorElement: HTMLElement;\n readonly onClose: () => void;\n};\n\nexport const UserMenu = ({ anchorElement, onClose }: UserMenuProps): ReactElement => {\n const auth = useAuth();\n const logoutConfirmationRef = useRef<ConfirmationRefMethods>(null);\n const popoverId = useMemo(() => StringUtil.createUuid(), []);\n const isUserMenuOpen = !!anchorElement;\n const { t } = useTranslation();\n\n const myPermissionsDialogRef = useRef<MyPermissionsDialogRefMethods>(null);\n\n const onViewMyPermissionsButtonClick = useCallback(() => {\n myPermissionsDialogRef.current.open();\n }, []);\n\n const onLogoutButtonClick = useCallback(() => {\n logoutConfirmationRef.current.open();\n }, []);\n\n const onLogoutConfirmationConfirm = useCallback(() => {\n container.resolve(LogService).log([{\n detail: auth.user,\n level: CommonDbLogLevel.TRACE,\n topic: 'USER_LOGOUT',\n }]);\n container.resolve(LogService).flushLog();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n auth.signoutRedirect();\n }, [auth]);\n\n const userName = useMemo(() => {\n return UserUtil.getUserDisplayValue(container.resolve(AuthorizationService).user, t);\n }, [t]);\n\n const userRoles = useMemo(() => {\n return container.resolve(AuthorizationService).user?.roles;\n }, []);\n\n return (\n <Popover\n {...TestIdUtil.createAttributes('UserMenu')}\n anchorEl={anchorElement}\n anchorOrigin={{\n horizontal: 'right',\n vertical: 'bottom',\n }}\n id={isUserMenuOpen ? popoverId : undefined}\n onClose={onClose}\n open={isUserMenuOpen}\n transformOrigin={{\n horizontal: 'right',\n vertical: 'top',\n }}\n >\n <List\n sx={{\n maxWidth: 300,\n minWidth: 200,\n width: '100%',\n }}\n >\n <ListItem\n divider\n >\n <ListItemText\n primary={userName ?? t`Unknown`}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <UserOwnOrganizationMenuItem />\n <UserOrganizationAdminMenuItem />\n <ListItem\n divider\n sx={{\n paddingTop: 0,\n }}\n >\n <ListItemText\n primary={t`My roles`}\n secondary={(\n <>\n {userRoles?.map((role) => (\n <Box\n component={'span'}\n key={role}\n sx={{\n display: 'inline-block',\n marginRight: 1,\n }}\n >\n {role}\n </Box>\n ))}\n </>\n )}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n alignItems={'center'}\n divider\n sx={{ justifyContent: 'center' }}\n >\n <ListItemButton\n onClick={onViewMyPermissionsButtonClick}\n >\n <ListItemIcon>\n <KeyIcon color={'primary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`My API permissions`}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n },\n },\n }}\n />\n </ListItemButton>\n <MyPermissionsDialog\n ref={myPermissionsDialogRef}\n />\n </ListItem>\n <ListItem\n alignItems={'center'}\n sx={{ justifyContent: 'center' }}\n >\n <ListItemButton\n onClick={onLogoutButtonClick}\n >\n <ListItemIcon>\n <LogoutIcon color={'secondary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`Logout`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n <Confirmation\n body={t`Click the logout button to logout`}\n cancelLabel={t`Cancel`}\n confirmLabel={t`Logout`}\n onConfirm={onLogoutConfirmationConfirm}\n ref={logoutConfirmationRef}\n title={t`Are you sure you want to logout?`}\n />\n </ListItem>\n </List>\n </Popover>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { UserMenu } from './UserMenu';\n\nexport const ApplicationBarActionsUserItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const [accountMenuAnchorElement, setAccountMenuAnchorElement] = useState<HTMLElement | null>(null);\n\n const onAccountMenuIconClick = useCallback((event: MouseEvent<HTMLElement>): void => {\n setAccountMenuAnchorElement(event.currentTarget);\n }, []);\n\n const onAccountMenuClose = useCallback(() => {\n setAccountMenuAnchorElement(null);\n }, []);\n\n return (\n <>\n <IconButton\n color={'inherit'}\n onClick={onAccountMenuIconClick}\n title={'Account'}\n >\n <AccountCircleIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Account`}\n </Box>\n </IconButton>\n {accountMenuAnchorElement && (\n <UserMenu\n anchorElement={accountMenuAnchorElement}\n onClose={onAccountMenuClose}\n />\n )}\n\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useRef,\n} from 'react';\nimport ChangeCircleIcon from '@mui/icons-material/ChangeCircle';\nimport { useTranslation } from 'react-i18next';\n\nimport { OrganizationSwitcherDialog } from '../OrganizationSwitcherDialog';\nimport type { OrganizationSwitcherDialogRefMethods } from '../OrganizationSwitcherDialog';\nimport { FeatureFlagsService } from '../../../classes/services/FeatureFlagsService';\n\n\nexport const ApplicationBarActionsOrganizationSwitcherItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const organizationSwitcherDialogRef = useRef<OrganizationSwitcherDialogRefMethods>(null);\n\n\n const onMenuIconClick = useCallback(() => {\n organizationSwitcherDialogRef.current.open();\n }, []);\n\n if (!container.resolve(FeatureFlagsService).featureFlags.update_own_organization) {\n return null;\n }\n\n return (\n <>\n <IconButton\n aria-label={t`Change organization`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Change organization`}\n >\n <ChangeCircleIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Change organization`}\n </Box>\n </IconButton>\n <OrganizationSwitcherDialog ref={organizationSwitcherDialogRef} />\n </>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport { useTranslation } from 'react-i18next';\nimport {\n useCallback,\n useEffect,\n useId,\n useState,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { useConfig } from '../../../hooks/useConfig';\n\nimport { ApplicationBarActionsFeedbackItem } from './ApplicationBarActionsFeedbackItem';\nimport { ApplicationBarActionsInfoItem } from './ApplicationBarActionsInfotem';\nimport { ApplicationBarActionsNotificationsItem } from './ApplicationBarActionsNotificationsItem';\nimport { ApplicationBarActionsOutagesItem } from './ApplicationBarActionsOutagesItem';\nimport { ApplicationBarActionsUserItem } from './ApplicationBarActionsUserItem';\nimport { ApplicationBarActionsOrganizationSwitcherItem } from './ApplicationBarActionsOrganizationSwitcherItem';\n\nexport type ApplicationBarActionsProps = {\n readonly fullWidth?: boolean;\n};\n\nexport const ApplicationBarActions = ({ fullWidth }: ApplicationBarActionsProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n const config = useConfig();\n const environmentMessage = config.getEnvironmentMessage();\n const navId = useId();\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const onMenuButtonClick = useCallback(() => {\n setIsMenuOpen(x => !x);\n }, []);\n\n useEffect(() => {\n if (isMenuOpen) {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsMenuOpen(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [isMenuOpen]);\n\n return (\n <Box\n {...TestIdUtil.createAttributes('ApplicationBarActions')}\n sx={{\n alignItems: 'center',\n display: 'flex',\n paddingRight: 1,\n }}\n >\n <IconButton\n aria-controls={navId}\n aria-label={t`Toggle menu`}\n onClick={onMenuButtonClick}\n sx={{\n color: theme['gen-epix-ui'].navbar.primaryColor,\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n }}\n >\n <MoreVertIcon />\n </IconButton>\n <Box\n id={navId}\n sx={{\n display: 'flex',\n [theme.breakpoints.down('md')]: {\n alignItems: 'start',\n background: theme['gen-epix-ui'].navbar.background,\n display: isMenuOpen ? 'flex' : 'none',\n flexDirection: 'column',\n left: 0,\n position: 'absolute',\n right: 0,\n top: theme.spacing(6),\n zIndex: theme.zIndex.appBar - 1,\n },\n }}\n >\n <ApplicationBarActionsFeedbackItem />\n <ApplicationBarActionsOutagesItem />\n <ApplicationBarActionsNotificationsItem />\n <ApplicationBarActionsInfoItem />\n <ApplicationBarActionsOrganizationSwitcherItem />\n <ApplicationBarActionsUserItem />\n {environmentMessage && (\n <Box\n {...TestIdUtil.createAttributes('ApplicationBarActions-EnvironmentMessage')}\n aria-hidden={'true'}\n sx={{\n alignItems: 'center',\n color: theme['gen-epix-ui'].navbar.environmentMessageColor,\n display: 'flex',\n fontWeight: 700,\n marginRight: fullWidth ? 0 : 1,\n padding: `0 ${theme.spacing(1)} !important`,\n textTransform: 'uppercase',\n [theme.breakpoints.down('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t('{{environmentMessage}}', { environmentMessage })}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n","import {\n AppBar,\n Box,\n Container,\n Toolbar,\n Typography,\n useTheme,\n} from '@mui/material';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { useConfig } from '../../../hooks/useConfig';\n\nimport { ApplicationBarNavigationMenu } from './ApplicationBarNavigationMenu';\nimport { ApplicationBarActions } from './ApplicationBarActions';\n\nexport type ApplicationBarProps = {\n readonly fullHeight?: boolean;\n readonly fullWidth?: boolean;\n readonly singleAction?: boolean;\n};\n\nexport const ApplicationBar = ({\n fullWidth,\n singleAction,\n}: ApplicationBarProps) => {\n const theme = useTheme();\n const config = useConfig();\n\n return (\n <AppBar\n {...TestIdUtil.createAttributes('ApplicationBar')}\n position={'static'}\n square\n sx={{\n background: theme['gen-epix-ui'].navbar.background,\n boxShadow: 'none',\n }}\n >\n <Container\n disableGutters\n maxWidth={fullWidth ? false : 'xl'}\n >\n <Toolbar\n disableGutters\n sx={{\n height: 48,\n justifyContent: singleAction ? 'center' : 'space-between',\n minHeight: '48px !important',\n }}\n >\n {singleAction && (\n <Box\n sx={{\n marginX: 2,\n }}\n >\n <Typography\n component={'h1'}\n sx={{\n color: theme['gen-epix-ui'].navbar.primaryColor,\n fontSize: '1.3rem',\n }}\n variant={'body2'}\n >\n {config.applicationName}\n </Typography>\n </Box>\n )}\n {!singleAction && (\n <>\n <ApplicationBarNavigationMenu fullWidth={fullWidth} />\n <ApplicationBarActions fullWidth={fullWidth} />\n </>\n )}\n </Toolbar>\n </Container>\n </AppBar>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,KAAU6B,EAAO5B,EAAW,CAAC,EAAE,EAAE,gBAAa;CAClD,WAAW,EACT,gBAAgB,YAClB;CACA,OAAO8B,EAAM,QAAQ,UAAU;CAC/B,SAAS;CACT,UAAU;CACV,gBAAgB;AAClB,EAAE,GAMWC,MAAgC,EAAE,mBAAmD;CAChG,IAAM,EAAE,MAAMC,EAAe,GACvBF,IAAQG,EAAS,GACjBC,IAAuBC,QAAcC,EAAU,QAAQC,CAAoB,GAAG,CAAC,CAAC,GAChFC,IAAQC,EAAM,GAEdC,IAAYL,QAAc;EAC9B,IAAMM,IAAWL,EAAU,QAAQM,CAAa,CAAC,CAAC,OAAO,MAAK,MAAKC,EAAE,OAAO,IAAI;EAChF,OAAO,CAACF,GAAU,GAAGA,EAAS,SAAS,QAAO,MAAK,CAACE,EAAE,OAAO,MAAM,CAAC;CACtE,GAAG,CAAC,CAAC,GAEC,CAACC,GAAYC,KAAiBC,EAAS,EAAK;CAElD,QAAgB;EACd,IAAIF,GAAY;GACd,IAAMG,KAAiB,MAAyB;IAC9C,AAAIC,EAAM,QAAQ,YAChBH,EAAc,EAAK;GAEvB;GAEA,OADA,SAAS,iBAAiB,WAAWE,CAAa,SACrC;IACX,SAAS,oBAAoB,WAAWA,CAAa;GACvD;EACF;CACF,GAAG,CAACH,CAAU,CAAC;CAEf,IAAMK,IAAoBC,QAAkB;EAC1C,GAAc,MAAK,CAACC,CAAC;CACvB,GAAG,CAAC,CAAC,GAECC,IAAiBF,GAAa,MAAyC;EAC3E,AAAIF,EAAM,cAAc,iBAAiB,UACvCA,EAAM,eAAe;CAEzB,GAAG,CAAC,C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EN,CAAC4G,KACA,kBAAA/J,GAAA,EAAA,UAAA,CACE,kBAACsB,IAAD,EAAyC,aAAY,CAAA,GACrD,kBAACkI,IAAD,EAAkC,aAAY,CAAA,CAC9C,EAAA,CAAA,CAEG;;EACA,CAAA;CACL,CAAA;AAEZ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["NavLink","BaseNavLink","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","useQueryMemo","QueryClientService","NotificationsDrawer","Fragment$1","ContentCopyIcon","MenuIcon","MoreVertIcon","NotificationsIcon","ChatIcon","CodeIcon","CopyrightIcon","DoneIcon","ConstructionIcon","AccountCircleIcon","LogoutIcon","KeyIcon","ChangeCircleIcon","NavLink$1","styled","NavLink","theme","ApplicationBarNavigationMenu","useTranslation","useTheme","authorizationService","useMemo","container","AuthorizationService","navId","useId","menuItems","rootItem","RouterService","r","isMenuOpen","setIsMenuOpen","useState","handleKeyDown","event","onMenuButtonClick","useCallback","x","onNavLinkClick","Box","IconButton","fullWidth","menuItem","isDisabled","NOW","ApplicationBarActionsFeedbackItem","config","useConfig","userFeedbackDialogRef","useRef","isFeedbackTooltipOpen","setIsFeedbackTooltipOpen","UserSettingsService","timeoutMs","handle","onUserFeedbackMenuIconClick","onTooltipMouseEnter","Tooltip","UserFeedbackDialog","InfoMenu","popoverId","StringUtil","licensesDialogRef","isInfoMenuOpen","anchorElement","isCopied","setIsCopied","onShowLicenseInformationButtonClick","onCopyVersionInformationButtonClick","versionInformation","BackendVersionService","Popover","TestIdUtil","List","ListItem","ListItemText","t","ListItemButton","ListItemIcon","LicensesDialog","ApplicationBarActionsInfoItem","infoMenuAnchorElement","setInfoMenuAnchorElement","onInfoMenuIconClick","onInfoMenuClose","ApplicationBarActionsNotificationsItem","notifications","useSubscribable","NotificationService","isLoading","open","setOpen","onMenuIconClick","onDrawerClose","Badge","CircularProgress","ApplicationBarActionsOutagesItem","outagesDialogRef","visibleOutages","useStore","outagesStore","state","activeOutages","soonActiveOutages","badgeContent","OutagesDialog","UserOrganizationAdminMenuItem","withPermissions","retrieveOrganizationAdminNameEmailsQuery","API_ABAC_TOKEN","COMMON_QUERY_KEY","Link","admin","CommonDbCommandName","CommonDbPermissionType","UserOwnOrganizationMenuItem","organizationMapQuery","useOrganizationMapQuery","userOrganization","UserMenu","auth","useAuth","logoutConfirmationRef","isUserMenuOpen","myPermissionsDialogRef","onViewMyPermissionsButtonClick","onLogoutButtonClick","onLogoutConfirmationConfirm","LogService","CommonDbLogLevel","userName","UserUtil","userRoles","role","MyPermissionsDialog","Confirmation","ApplicationBarActionsUserItem","accountMenuAnchorElement","setAccountMenuAnchorElement","onAccountMenuIconClick","onAccountMenuClose","ApplicationBarActionsOrganizationSwitcherItem","organizationSwitcherDialogRef","FeatureFlagsService","OrganizationSwitcherDialog","ApplicationBarActions","environmentMessage","useEffect","ApplicationBar","AppBar","Container","Toolbar","singleAction","Typography"],"sources":["../../../../src/components/ui/ApplicationBar/ApplicationBarNavigationMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsFeedbackItem.tsx","../../../../src/components/ui/ApplicationBar/InfoMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsInfotem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsNotificationsItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsOutagesItem.tsx","../../../../src/components/ui/ApplicationBar/UserOrganizationAdminMenuItem.tsx","../../../../src/components/ui/ApplicationBar/UserOwnOrganizationMenuItem.tsx","../../../../src/components/ui/ApplicationBar/UserMenu.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsUserItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActionsOrganizationSwitcherItem.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBarActions.tsx","../../../../src/components/ui/ApplicationBar/ApplicationBar.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n styled,\n useTheme,\n} from '@mui/material';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { useTranslation } from 'react-i18next';\nimport { NavLink as BaseNavLink } from 'react-router-dom';\nimport {\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\n\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\nimport { RouterService } from '../../../classes/services/RouterService';\n\nconst NavLink = styled(BaseNavLink)(({ theme }) => ({\n '&:hover': {\n textDecoration: 'underline',\n },\n color: theme.palette.secondary.contrastText,\n display: 'inline-block',\n fontSize: '1.3rem',\n textDecoration: 'none',\n}));\n\nexport type ApplicationBarNavigationMenuProps = {\n readonly fullWidth?: boolean;\n};\n\nexport const ApplicationBarNavigationMenu = ({ fullWidth }: ApplicationBarNavigationMenuProps) => {\n const { t } = useTranslation();\n const theme = useTheme();\n const authorizationService = useMemo(() => container.resolve(AuthorizationService), []);\n const navId = useId();\n\n const menuItems = useMemo(() => {\n const rootItem = container.resolve(RouterService).routes.find(r => r.handle.root);\n return [rootItem, ...rootItem.children.filter(r => !r.handle.hidden)] as MyNonIndexRouteObject[];\n }, []);\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n useEffect(() => {\n if (isMenuOpen) {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsMenuOpen(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [isMenuOpen]);\n\n const onMenuButtonClick = useCallback(() => {\n setIsMenuOpen(x => !x);\n }, []);\n\n const onNavLinkClick = useCallback((event: MouseEvent<HTMLAnchorElement>) => {\n if (event.currentTarget.ariaDisabled === 'true') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <Box\n sx={{\n flexGrow: 1,\n }}\n >\n <IconButton\n aria-controls={navId}\n aria-label={t`Toggle navigation menu`}\n onClick={onMenuButtonClick}\n sx={{\n color: theme.components.GenEpixUiClientCommonNavbar.primaryColor,\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n }}\n >\n <MenuIcon />\n </IconButton>\n <Box\n component={'nav'}\n id={navId}\n sx={{\n flexGrow: 1,\n [theme.breakpoints.down('md')]: {\n background: theme.components.GenEpixUiClientCommonNavbar.background,\n display: isMenuOpen ? 'block' : 'none',\n left: 0,\n paddingBottom: 4,\n position: 'absolute',\n top: 48,\n width: '100%',\n },\n }}\n >\n <Box\n component={'ul'}\n sx={{\n display: 'flex',\n margin: 0,\n marginLeft: fullWidth ? 0 : 2,\n padding: 0,\n [theme.breakpoints.down('md')]: {\n display: 'block',\n margin: 0,\n },\n }}\n >\n {menuItems.filter(menuItem => authorizationService.doesUserHavePermissionForRoute(menuItem)).map(menuItem => {\n const isDisabled = !!menuItem.handle.disabled;\n return (\n <Box\n component={'li'}\n key={menuItem.path}\n sx={{\n '&:has(.active:not([aria-disabled=\"true\"]))': {\n '& svg': {\n color: theme.components.GenEpixUiClientCommonNavbar.activeColor,\n },\n a: {\n color: theme.components.GenEpixUiClientCommonNavbar.activeColor,\n },\n background: theme.components.GenEpixUiClientCommonNavbar.activeBackground,\n },\n '& svg': {\n color: isDisabled ? theme.palette.grey[400] : undefined,\n marginTop: '6px',\n },\n alignItems: 'center',\n color: isDisabled\n ? theme.palette.grey[400]\n : theme.components.GenEpixUiClientCommonNavbar.primaryColor,\n display: 'flex',\n fontWeight: 800,\n height: 48,\n listStyle: 'none',\n padding: `0 ${theme.spacing(1)}`,\n }}\n >\n <NavLink\n aria-disabled={isDisabled || undefined}\n aria-label={menuItem.handle.title}\n onClick={onNavLinkClick}\n sx={{\n '&:hover': {\n textDecoration: isDisabled ? 'none' : undefined,\n },\n color: isDisabled ? theme.palette.grey[400] : undefined,\n cursor: isDisabled ? 'not-allowed' : undefined,\n padding: `0 ${theme.spacing(1)}`,\n }}\n tabIndex={isDisabled ? -1 : undefined}\n to={menuItem.path}\n >\n {!!menuItem.handle.icon && menuItem.handle.icon}\n {!menuItem.handle.icon && menuItem.handle.title}\n </NavLink>\n </Box>\n );\n })}\n </Box>\n </Box>\n </Box>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n Tooltip,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ChatIcon from '@mui/icons-material/Chat';\n\nimport { UserSettingsService } from '../../../classes/services/UserSettingsService';\nimport { UserFeedbackDialog } from '../UserFeedbackDialog';\nimport type { UserFeedbackDialogRefMethods } from '../UserFeedbackDialog';\nimport { useConfig } from '../../../hooks/useConfig';\n\nconst NOW = new Date().getTime();\n\nexport const ApplicationBarActionsFeedbackItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const config = useConfig();\n const userFeedbackDialogRef = useRef<UserFeedbackDialogRefMethods>(null);\n const [isFeedbackTooltipOpen, setIsFeedbackTooltipOpen] = useState(false);\n useEffect(() => {\n if (!container.resolve(UserSettingsService).showShowUserFeedbackTooltip) {\n return;\n }\n const timeoutMs = Math.max(0, config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS - (new Date().getTime() - NOW));\n const handle = setTimeout(() => {\n setIsFeedbackTooltipOpen(true);\n }, timeoutMs);\n return () => {\n clearTimeout(handle);\n };\n }, [config.userFeedback.SHOW_USER_FEEDBACK_TOOLTIP_AFTER_MS]);\n\n const onUserFeedbackMenuIconClick = useCallback(() => {\n userFeedbackDialogRef.current.open();\n }, []);\n\n const onTooltipMouseEnter = useCallback(() => {\n setIsFeedbackTooltipOpen(false);\n container.resolve(UserSettingsService).showShowUserFeedbackTooltip = false;\n }, []);\n\n return (\n <>\n <Tooltip\n arrow\n color={'secondary'}\n onMouseEnter={onTooltipMouseEnter}\n open={isFeedbackTooltipOpen}\n placement={'left'}\n slotProps={{\n arrow: {\n sx: {\n color: theme.palette.secondary.main,\n },\n },\n popper: {\n disablePortal: true,\n },\n tooltip: {\n sx: {\n backgroundColor: theme.palette.secondary.main,\n marginRight: `${theme.spacing(0.5)} !important`,\n },\n },\n }}\n title={t`Would you like to share your feedback?`}\n >\n <IconButton\n aria-label={t`Feedback`}\n color={'inherit'}\n onClick={onUserFeedbackMenuIconClick}\n >\n <ChatIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Feedback`}\n </Box>\n </IconButton>\n </Tooltip>\n <UserFeedbackDialog ref={userFeedbackDialogRef} />\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Popover,\n} from '@mui/material';\nimport CopyrightIcon from '@mui/icons-material/Copyright';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport DoneIcon from '@mui/icons-material/Done';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport type { LicensesDialogRefMethods } from '../LicensesDialog';\nimport { LicensesDialog } from '../LicensesDialog';\nimport { BackendVersionService } from '../../../classes/services/BackendVersionService';\nimport { useConfig } from '../../../hooks/useConfig';\n\ntype InfoMenuProps = {\n readonly anchorElement: HTMLElement;\n readonly onClose: () => void;\n};\n\nexport const InfoMenu = ({ anchorElement, onClose }: InfoMenuProps): ReactElement => {\n const popoverId = useMemo(() => StringUtil.createUuid(), []);\n const licensesDialogRef = useRef<LicensesDialogRefMethods>(null);\n const isInfoMenuOpen = !!anchorElement;\n const { t } = useTranslation();\n const config = useConfig();\n const [isCopied, setIsCopied] = useState(false);\n const onShowLicenseInformationButtonClick = useCallback(() => {\n licensesDialogRef.current.open();\n }, []);\n\n const onCopyVersionInformationButtonClick = useCallback(async () => {\n const versionInformation = `Frontend version: ${config.getSoftwareVersion()}\\nBackend version: ${container.resolve(BackendVersionService).version}\\nURL: ${window.location.href}\\nDate/time: ${new Date().toISOString()}`;\n await navigator.clipboard.writeText(versionInformation);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }, [config]);\n\n return (\n <Popover\n {...TestIdUtil.createAttributes('InfoMenu')}\n anchorEl={anchorElement}\n anchorOrigin={{\n horizontal: 'right',\n vertical: 'bottom',\n }}\n id={isInfoMenuOpen ? popoverId : undefined}\n onClose={onClose}\n open={isInfoMenuOpen}\n transformOrigin={{\n horizontal: 'right',\n vertical: 'top',\n }}\n >\n <List\n sx={{\n maxWidth: 300,\n minWidth: 200,\n width: '100%',\n }}\n >\n <ListItem\n divider\n >\n <ListItemText\n primary={t('Frontend version')}\n secondary={config.getSoftwareVersion()}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n divider\n >\n <ListItemText\n primary={t('Backend version')}\n secondary={container.resolve(BackendVersionService).version}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n divider\n >\n <ListItemButton\n onClick={onCopyVersionInformationButtonClick}\n >\n <ListItemIcon>\n {isCopied ? <DoneIcon color={'success'} /> : <ContentCopyIcon color={'secondary'} />}\n </ListItemIcon>\n <ListItemText\n primary={t`Copy version information to clipboard`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n </ListItem>\n <ListItem>\n <ListItemButton\n onClick={onShowLicenseInformationButtonClick}\n >\n <ListItemIcon>\n <CopyrightIcon color={'secondary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`Show license information`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n <LicensesDialog\n ref={licensesDialogRef}\n />\n </ListItem>\n\n </List>\n </Popover>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport CodeIcon from '@mui/icons-material/Code';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { InfoMenu } from './InfoMenu';\n\nexport const ApplicationBarActionsInfoItem = () => {\n const [infoMenuAnchorElement, setInfoMenuAnchorElement] = useState<HTMLElement | null>(null);\n const { t } = useTranslation();\n const theme = useTheme();\n\n const onInfoMenuIconClick = useCallback((event: MouseEvent<HTMLElement>): void => {\n setInfoMenuAnchorElement(event.currentTarget);\n }, []);\n\n const onInfoMenuClose = useCallback(() => {\n setInfoMenuAnchorElement(null);\n }, []);\n\n return (\n <>\n <IconButton\n color={'inherit'}\n onClick={onInfoMenuIconClick}\n title={'Code information'}\n >\n <CodeIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Code information`}\n </Box>\n </IconButton>\n {infoMenuAnchorElement && (\n <InfoMenu\n anchorElement={infoMenuAnchorElement}\n onClose={onInfoMenuClose}\n />\n )}\n\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Badge,\n Box,\n CircularProgress,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport NotificationsIcon from '@mui/icons-material/Notifications';\nimport { useTranslation } from 'react-i18next';\nimport { useSubscribable } from '@gen-epix/ui-core/hooks/useSubscribable';\n\nimport { NotificationsDrawer } from '../Notifications';\nimport { NotificationService } from '../../../classes/services/NotificationService';\n\n\nexport const ApplicationBarActionsNotificationsItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const notifications = useSubscribable(container.resolve(NotificationService));\n const isLoading = useMemo(() => notifications.some(x => x.isLoading), [notifications]);\n const [open, setOpen] = useState(false);\n\n\n const onMenuIconClick = useCallback(() => {\n container.resolve(NotificationService).hideAllNotifications();\n setOpen(true);\n }, []);\n\n const onDrawerClose = useCallback(() => {\n setOpen(false);\n }, []);\n\n return (\n <>\n <IconButton\n aria-label={t`Notifications`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Notifications`}\n >\n <Badge\n badgeContent={notifications.length}\n color={'secondary'}\n sx={{ '& .MuiBadge-badge': { border: '1px solid white', fontSize: 9, height: 15, minWidth: 15 } }}\n >\n <NotificationsIcon color={'inherit'} />\n </Badge>\n {isLoading && (\n <CircularProgress\n color={'inherit'}\n size={theme.spacing(3.5)}\n sx={{\n position: 'absolute',\n }}\n />\n )}\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Notifications`}\n </Box>\n </IconButton>\n <NotificationsDrawer\n onDrawerClose={onDrawerClose}\n open={open}\n />\n </>\n );\n};\n","import {\n Badge,\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport ConstructionIcon from '@mui/icons-material/Construction';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\n\nimport { OutagesDialog } from '../OutagesDialog';\nimport type { OutagesDialogRefMethods } from '../OutagesDialog';\nimport { outagesStore } from '../../../stores/outagesStore';\n\nexport const ApplicationBarActionsOutagesItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const outagesDialogRef = useRef<OutagesDialogRefMethods>(null);\n const visibleOutages = useStore(outagesStore, (state) => state.visibleOutages);\n const activeOutages = useStore(outagesStore, (state) => state.activeOutages);\n const soonActiveOutages = useStore(outagesStore, (state) => state.soonActiveOutages);\n\n\n const badgeContent = useMemo<string>(() => {\n if (activeOutages.length > 0 || visibleOutages.length > 0 || soonActiveOutages.length > 0) {\n return '!';\n }\n return null;\n }, [activeOutages.length, soonActiveOutages.length, visibleOutages.length]);\n\n const onMenuIconClick = useCallback(() => {\n outagesDialogRef.current.open();\n }, []);\n\n\n return (\n <>\n <IconButton\n aria-label={t`Outages`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Outages`}\n >\n <Badge\n badgeContent={badgeContent}\n color={'secondary'}\n sx={{ '& .MuiBadge-badge': { border: '1px solid white', fontSize: 9, height: 15, minWidth: 15 } }}\n >\n <ConstructionIcon color={'inherit'} />\n </Badge>\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Outages`}\n </Box>\n </IconButton>\n <OutagesDialog ref={outagesDialogRef} />\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Link,\n ListItem,\n ListItemText,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport {\n CommonDbCommandName,\n CommonDbPermissionType,\n} from '@gen-epix/api-commondb';\n\nimport { API_ABAC_TOKEN } from '../../../constants/api.constants';\nimport { withPermissions } from '../../../hoc/withPermissions';\nimport { useQueryMemo } from '../../../hooks/useQueryMemo';\nimport { QueryClientService } from '../../../classes/services/QueryClientService';\nimport { COMMON_QUERY_KEY } from '../../../constants/query.constants';\n\nexport const UserOrganizationAdminMenuItem = withPermissions(() => {\n const { t } = useTranslation();\n\n const retrieveOrganizationAdminNameEmailsQuery = useQueryMemo({\n gcTime: 0,\n queryFn: async ({ signal }) => (await container.resolve(API_ABAC_TOKEN).retrieveOrganizationAdminNameEmails({ signal })).data,\n queryKey: container.resolve(QueryClientService).getGenericKey(COMMON_QUERY_KEY.ORGANIZATION_ADMIN_NAME_EMAILS),\n staleTime: 0,\n });\n\n return (\n <ListItem\n alignItems={'center'}\n sx={{\n justifyContent: 'center',\n paddingTop: 0,\n }}\n >\n <ListItemText\n primary={t`My organizations admins`}\n secondary={(\n <>\n {retrieveOrganizationAdminNameEmailsQuery.isLoading && t`Loading...`}\n {retrieveOrganizationAdminNameEmailsQuery.error && t`Error loading organization admins`}\n {retrieveOrganizationAdminNameEmailsQuery.data?.map(admin => (\n <Link\n href={`mailto:${admin.email}`}\n key={admin.id}\n sx={{\n display: 'table',\n }}\n >\n {admin.name ?? admin.email}\n </Link>\n ))}\n </>\n )}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n );\n}, {\n requiredPermissions: [\n { command_name: CommonDbCommandName.RetrieveOrganizationAdminNameEmailsCommand, permission_type: CommonDbPermissionType.EXECUTE },\n ],\n});\n","import { container } from 'tsyringe';\nimport {\n ListItem,\n ListItemText,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport { useMemo } from 'react';\nimport {\n CommonDbCommandName,\n CommonDbPermissionType,\n} from '@gen-epix/api-commondb';\n\nimport { withPermissions } from '../../../hoc/withPermissions';\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport { useOrganizationMapQuery } from '../../../dataHooks/useOrganizationsQuery';\n\nexport const UserOwnOrganizationMenuItem = withPermissions(() => {\n const { t } = useTranslation();\n\n const organizationMapQuery = useOrganizationMapQuery();\n\n const userOrganization = useMemo(() => {\n if (organizationMapQuery.isLoading) {\n return t`Loading...`;\n }\n if (organizationMapQuery.error) {\n return t`Error`;\n }\n return organizationMapQuery.map.get(container.resolve(AuthorizationService).user?.organization_id ?? '')?.name ?? t`Unknown`;\n }, [organizationMapQuery, t]);\n\n return (\n <ListItem\n sx={{\n paddingBottom: 0,\n }}\n >\n <ListItemText\n primary={t`My organization`}\n secondary={userOrganization ?? t`Unknown`}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n );\n}, {\n requiredPermissions: [\n { command_name: CommonDbCommandName.RetrieveOrganizationAdminNameEmailsCommand, permission_type: CommonDbPermissionType.EXECUTE },\n ],\n});\n","import { container } from 'tsyringe';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport {\n Box,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Popover,\n} from '@mui/material';\nimport LogoutIcon from '@mui/icons-material/Logout';\nimport KeyIcon from '@mui/icons-material/Key';\nimport { useTranslation } from 'react-i18next';\nimport { useAuth } from 'react-oidc-context';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { Confirmation } from '@gen-epix/ui-core-components/components/Confirmation';\nimport type { ConfirmationRefMethods } from '@gen-epix/ui-core-components/components/Confirmation';\n\nimport { AuthorizationService } from '../../../classes/services/AuthorizationService';\nimport { LogService } from '../../../classes/services/LogService';\nimport type { MyPermissionsDialogRefMethods } from '../MyPermissionsDialog';\nimport { MyPermissionsDialog } from '../MyPermissionsDialog';\nimport { UserUtil } from '../../../utils/UserUtil';\n\nimport { UserOrganizationAdminMenuItem } from './UserOrganizationAdminMenuItem';\nimport { UserOwnOrganizationMenuItem } from './UserOwnOrganizationMenuItem';\n\ntype UserMenuProps = {\n readonly anchorElement: HTMLElement;\n readonly onClose: () => void;\n};\n\nexport const UserMenu = ({ anchorElement, onClose }: UserMenuProps): ReactElement => {\n const auth = useAuth();\n const logoutConfirmationRef = useRef<ConfirmationRefMethods>(null);\n const popoverId = useMemo(() => StringUtil.createUuid(), []);\n const isUserMenuOpen = !!anchorElement;\n const { t } = useTranslation();\n\n const myPermissionsDialogRef = useRef<MyPermissionsDialogRefMethods>(null);\n\n const onViewMyPermissionsButtonClick = useCallback(() => {\n myPermissionsDialogRef.current.open();\n }, []);\n\n const onLogoutButtonClick = useCallback(() => {\n logoutConfirmationRef.current.open();\n }, []);\n\n const onLogoutConfirmationConfirm = useCallback(() => {\n container.resolve(LogService).log([{\n detail: auth.user,\n level: CommonDbLogLevel.TRACE,\n topic: 'USER_LOGOUT',\n }]);\n container.resolve(LogService).flushLog();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n auth.signoutRedirect();\n }, [auth]);\n\n const userName = useMemo(() => {\n return UserUtil.getUserDisplayValue(container.resolve(AuthorizationService).user, t);\n }, [t]);\n\n const userRoles = useMemo(() => {\n return container.resolve(AuthorizationService).user?.roles;\n }, []);\n\n return (\n <Popover\n {...TestIdUtil.createAttributes('UserMenu')}\n anchorEl={anchorElement}\n anchorOrigin={{\n horizontal: 'right',\n vertical: 'bottom',\n }}\n id={isUserMenuOpen ? popoverId : undefined}\n onClose={onClose}\n open={isUserMenuOpen}\n transformOrigin={{\n horizontal: 'right',\n vertical: 'top',\n }}\n >\n <List\n sx={{\n maxWidth: 300,\n minWidth: 200,\n width: '100%',\n }}\n >\n <ListItem\n divider\n >\n <ListItemText\n primary={userName ?? t`Unknown`}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <UserOwnOrganizationMenuItem />\n <UserOrganizationAdminMenuItem />\n <ListItem\n divider\n sx={{\n paddingTop: 0,\n }}\n >\n <ListItemText\n primary={t`My roles`}\n secondary={(\n <>\n {userRoles?.map((role) => (\n <Box\n component={'span'}\n key={role}\n sx={{\n display: 'inline-block',\n marginRight: 1,\n }}\n >\n {role}\n </Box>\n ))}\n </>\n )}\n slotProps={{\n primary: {\n sx: {\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItem>\n <ListItem\n alignItems={'center'}\n divider\n sx={{ justifyContent: 'center' }}\n >\n <ListItemButton\n onClick={onViewMyPermissionsButtonClick}\n >\n <ListItemIcon>\n <KeyIcon color={'primary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`My API permissions`}\n slotProps={{\n primary: {\n sx: {\n color: 'primary.main',\n },\n },\n }}\n />\n </ListItemButton>\n <MyPermissionsDialog\n ref={myPermissionsDialogRef}\n />\n </ListItem>\n <ListItem\n alignItems={'center'}\n sx={{ justifyContent: 'center' }}\n >\n <ListItemButton\n onClick={onLogoutButtonClick}\n >\n <ListItemIcon>\n <LogoutIcon color={'secondary'} />\n </ListItemIcon>\n <ListItemText\n primary={t`Logout`}\n slotProps={{\n primary: {\n sx: {\n color: 'secondary.main',\n fontWeight: 'bold',\n },\n },\n }}\n />\n </ListItemButton>\n <Confirmation\n body={t`Click the logout button to logout`}\n cancelLabel={t`Cancel`}\n confirmLabel={t`Logout`}\n onConfirm={onLogoutConfirmationConfirm}\n ref={logoutConfirmationRef}\n title={t`Are you sure you want to logout?`}\n />\n </ListItem>\n </List>\n </Popover>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport type { MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { UserMenu } from './UserMenu';\n\nexport const ApplicationBarActionsUserItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const [accountMenuAnchorElement, setAccountMenuAnchorElement] = useState<HTMLElement | null>(null);\n\n const onAccountMenuIconClick = useCallback((event: MouseEvent<HTMLElement>): void => {\n setAccountMenuAnchorElement(event.currentTarget);\n }, []);\n\n const onAccountMenuClose = useCallback(() => {\n setAccountMenuAnchorElement(null);\n }, []);\n\n return (\n <>\n <IconButton\n color={'inherit'}\n onClick={onAccountMenuIconClick}\n title={'Account'}\n >\n <AccountCircleIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Account`}\n </Box>\n </IconButton>\n {accountMenuAnchorElement && (\n <UserMenu\n anchorElement={accountMenuAnchorElement}\n onClose={onAccountMenuClose}\n />\n )}\n\n </>\n );\n};\n","import { container } from 'tsyringe';\nimport {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useRef,\n} from 'react';\nimport ChangeCircleIcon from '@mui/icons-material/ChangeCircle';\nimport { useTranslation } from 'react-i18next';\n\nimport { OrganizationSwitcherDialog } from '../OrganizationSwitcherDialog';\nimport type { OrganizationSwitcherDialogRefMethods } from '../OrganizationSwitcherDialog';\nimport { FeatureFlagsService } from '../../../classes/services/FeatureFlagsService';\n\n\nexport const ApplicationBarActionsOrganizationSwitcherItem = () => {\n const { t } = useTranslation();\n const theme = useTheme();\n const organizationSwitcherDialogRef = useRef<OrganizationSwitcherDialogRefMethods>(null);\n\n\n const onMenuIconClick = useCallback(() => {\n organizationSwitcherDialogRef.current.open();\n }, []);\n\n if (!container.resolve(FeatureFlagsService).featureFlags.update_own_organization) {\n return null;\n }\n\n return (\n <>\n <IconButton\n aria-label={t`Change organization`}\n color={'inherit'}\n onClick={onMenuIconClick}\n title={t`Change organization`}\n >\n <ChangeCircleIcon color={'inherit'} />\n <Box\n sx={{\n fontSize: '1.3rem',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t`Change organization`}\n </Box>\n </IconButton>\n <OrganizationSwitcherDialog ref={organizationSwitcherDialogRef} />\n </>\n );\n};\n","import {\n Box,\n IconButton,\n useTheme,\n} from '@mui/material';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport { useTranslation } from 'react-i18next';\nimport {\n useCallback,\n useEffect,\n useId,\n useState,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { useConfig } from '../../../hooks/useConfig';\n\nimport { ApplicationBarActionsFeedbackItem } from './ApplicationBarActionsFeedbackItem';\nimport { ApplicationBarActionsInfoItem } from './ApplicationBarActionsInfotem';\nimport { ApplicationBarActionsNotificationsItem } from './ApplicationBarActionsNotificationsItem';\nimport { ApplicationBarActionsOutagesItem } from './ApplicationBarActionsOutagesItem';\nimport { ApplicationBarActionsUserItem } from './ApplicationBarActionsUserItem';\nimport { ApplicationBarActionsOrganizationSwitcherItem } from './ApplicationBarActionsOrganizationSwitcherItem';\n\nexport type ApplicationBarActionsProps = {\n readonly fullWidth?: boolean;\n};\n\nexport const ApplicationBarActions = ({ fullWidth }: ApplicationBarActionsProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n const config = useConfig();\n const environmentMessage = config.getEnvironmentMessage();\n const navId = useId();\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const onMenuButtonClick = useCallback(() => {\n setIsMenuOpen(x => !x);\n }, []);\n\n useEffect(() => {\n if (isMenuOpen) {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsMenuOpen(false);\n }\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }\n }, [isMenuOpen]);\n\n return (\n <Box\n {...TestIdUtil.createAttributes('ApplicationBarActions')}\n sx={{\n alignItems: 'center',\n display: 'flex',\n paddingRight: 1,\n }}\n >\n <IconButton\n aria-controls={navId}\n aria-label={t`Toggle menu`}\n onClick={onMenuButtonClick}\n sx={{\n color: theme.components.GenEpixUiClientCommonNavbar.primaryColor,\n [theme.breakpoints.up('md')]: {\n display: 'none',\n },\n }}\n >\n <MoreVertIcon />\n </IconButton>\n <Box\n id={navId}\n sx={{\n display: 'flex',\n [theme.breakpoints.down('md')]: {\n alignItems: 'start',\n background: theme.components.GenEpixUiClientCommonNavbar.background,\n display: isMenuOpen ? 'flex' : 'none',\n flexDirection: 'column',\n left: 0,\n position: 'absolute',\n right: 0,\n top: theme.spacing(6),\n zIndex: theme.zIndex.appBar - 1,\n },\n }}\n >\n <ApplicationBarActionsFeedbackItem />\n <ApplicationBarActionsOutagesItem />\n <ApplicationBarActionsNotificationsItem />\n <ApplicationBarActionsInfoItem />\n <ApplicationBarActionsOrganizationSwitcherItem />\n <ApplicationBarActionsUserItem />\n {environmentMessage && (\n <Box\n {...TestIdUtil.createAttributes('ApplicationBarActions-EnvironmentMessage')}\n aria-hidden={'true'}\n sx={{\n alignItems: 'center',\n color: theme.components.GenEpixUiClientCommonNavbar.environmentMessageColor,\n display: 'flex',\n fontWeight: 700,\n marginRight: fullWidth ? 0 : 1,\n padding: `0 ${theme.spacing(1)} !important`,\n textTransform: 'uppercase',\n [theme.breakpoints.down('md')]: {\n position: 'absolute',\n visibility: 'hidden',\n },\n }}\n >\n {t('{{environmentMessage}}', { environmentMessage })}\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n","import {\n AppBar,\n Box,\n Container,\n Toolbar,\n Typography,\n useTheme,\n} from '@mui/material';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { useConfig } from '../../../hooks/useConfig';\n\nimport { ApplicationBarNavigationMenu } from './ApplicationBarNavigationMenu';\nimport { ApplicationBarActions } from './ApplicationBarActions';\n\nexport type ApplicationBarProps = {\n readonly fullHeight?: boolean;\n readonly fullWidth?: boolean;\n readonly singleAction?: boolean;\n};\n\nexport const ApplicationBar = ({\n fullWidth,\n singleAction,\n}: ApplicationBarProps) => {\n const theme = useTheme();\n const config = useConfig();\n\n return (\n <AppBar\n {...TestIdUtil.createAttributes('ApplicationBar')}\n position={'static'}\n square\n sx={{\n background: theme.components.GenEpixUiClientCommonNavbar.background,\n boxShadow: 'none',\n }}\n >\n <Container\n disableGutters\n maxWidth={fullWidth ? false : 'xl'}\n >\n <Toolbar\n disableGutters\n sx={{\n height: 48,\n justifyContent: singleAction ? 'center' : 'space-between',\n minHeight: '48px !important',\n }}\n >\n {singleAction && (\n <Box\n sx={{\n marginX: 2,\n }}\n >\n <Typography\n component={'h1'}\n sx={{\n color: theme.components.GenEpixUiClientCommonNavbar.primaryColor,\n fontSize: '1.3rem',\n }}\n variant={'body2'}\n >\n {config.applicationName}\n </Typography>\n </Box>\n )}\n {!singleAction && (\n <>\n <ApplicationBarNavigationMenu fullWidth={fullWidth} />\n <ApplicationBarActions full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A;AAEZ"}
|
|
@@ -3,7 +3,7 @@ import { useEffect as t } from "react";
|
|
|
3
3
|
import { useTranslation as n } from "react-i18next";
|
|
4
4
|
import { TestIdUtil as r } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
5
5
|
import { withDialog as i } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
6
|
-
|
|
6
|
+
// src/components/ui/ConsentDialog/ConsentDialog.tsx
|
|
7
7
|
var a = i(({ onActionsChange: i, onConsent: a, onTitleChange: o }) => {
|
|
8
8
|
let { t: s } = n(), c = e();
|
|
9
9
|
return t(() => {
|
|
@@ -35,7 +35,6 @@ var a = i(({ onActionsChange: i, onConsent: a, onTitleChange: o }) => {
|
|
|
35
35
|
noCloseButton: !0,
|
|
36
36
|
testId: "ConsentDialog"
|
|
37
37
|
});
|
|
38
|
-
//#endregion
|
|
39
38
|
export { a as ConsentDialog };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,80 +4,80 @@ import { RouterService as n } from "../../../classes/services/RouterService/inde
|
|
|
4
4
|
import { useConfig as r } from "../../../hooks/useConfig/index.js";
|
|
5
5
|
import { AuthenticationService as i } from "../../../classes/services/AuthenticationService/index.js";
|
|
6
6
|
import { LogService as a } from "../../../classes/services/LogService/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { container as o } from "tsyringe";
|
|
8
|
+
import { CommonDbLogLevel as s } from "@gen-epix/api-commondb";
|
|
9
|
+
import { isAxiosError as c } from "axios";
|
|
10
|
+
import { Box as l, Button as u, Typography as d } from "@mui/material";
|
|
11
|
+
import { useCallback as f, useEffect as p, useMemo as m } from "react";
|
|
12
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
import { useTranslation as _ } from "react-i18next";
|
|
14
14
|
import { isRouteErrorResponse as v } from "react-router-dom";
|
|
15
|
-
|
|
15
|
+
// src/components/ui/GenericErrorMessage/GenericErrorMessage.tsx
|
|
16
16
|
var y = ({ error: y, shouldHideActionButtons: b }) => {
|
|
17
17
|
let { t: x } = _(), S = r();
|
|
18
|
-
|
|
19
|
-
y && !
|
|
18
|
+
p(() => {
|
|
19
|
+
y && !c(y) && (o.resolve(a).log([{
|
|
20
20
|
detail: {
|
|
21
21
|
error: y,
|
|
22
22
|
stack: y?.stack
|
|
23
23
|
},
|
|
24
|
-
level:
|
|
24
|
+
level: c(y) ? s.DEBUG : s.ERROR,
|
|
25
25
|
topic: y?.message ? `Error: ${y?.message}` : "Error"
|
|
26
|
-
}]),
|
|
26
|
+
}]), o.resolve(a).flushLog(), y instanceof Error && S.enablePageEvents && o.resolve(t).emit("error", y));
|
|
27
27
|
}, [S.enablePageEvents, y]);
|
|
28
|
-
let C =
|
|
29
|
-
await
|
|
30
|
-
}, []), w =
|
|
31
|
-
await
|
|
32
|
-
}, []), T =
|
|
33
|
-
i.clearStaleState(),
|
|
34
|
-
}, []), E =
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
28
|
+
let C = f(async () => {
|
|
29
|
+
await o.resolve(n).router.navigate({ pathname: "/" });
|
|
30
|
+
}, []), w = f(async () => {
|
|
31
|
+
await o.resolve(n).router.navigate(-1);
|
|
32
|
+
}, []), T = f(async () => {
|
|
33
|
+
i.clearStaleState(), o.resolve(i).authContextProps ? o.resolve(i).authContextProps.signoutRedirect() : await o.resolve(n).router.navigate({ pathname: "/" });
|
|
34
|
+
}, []), E = m(() => v(y) || e.isAxiosNotFoundError(y) ? x`Not found.` : e.isAxiosForbiddenError(y) ? x`Access denied.` : e.isAxiosUnprocessableEntityError(y) ? x`Unprocessable Entity.` : x`Sorry, an unexpected error has occurred.`, [y, x]), D = m(() => v(y) || e.isAxiosNotFoundError(y) ? x`The item you requested can not be found. It may have been moved or deleted.` : e.isAxiosForbiddenError(y) ? x`You are not authorized to access this page or item.` : e.isAxiosUnauthorizedError(y) ? x`You are not authorized to access this page or item. Please logout and login again.` : e.isAxiosUnprocessableEntityError(y) ? x`We were unable to process this page or item.` : x("We have encountered a problem. The error has been automatically logged. One of our staff will look into it shortly. Error message: {{message}}", { message: y?.message ?? x`Unknown` }), [y, x]), O = m(() => !c(y) && y?.stack, [y]);
|
|
35
|
+
return /* @__PURE__ */ g(l, { children: [
|
|
36
|
+
/* @__PURE__ */ h(l, {
|
|
37
37
|
sx: { padding: 1 },
|
|
38
|
-
children: /* @__PURE__ */ d
|
|
38
|
+
children: /* @__PURE__ */ h(d, {
|
|
39
39
|
variant: "h1",
|
|
40
40
|
children: E
|
|
41
41
|
})
|
|
42
42
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ h(l, {
|
|
44
44
|
sx: { padding: 1 },
|
|
45
|
-
children: /* @__PURE__ */ d
|
|
45
|
+
children: /* @__PURE__ */ h(d, {
|
|
46
46
|
variant: "body2",
|
|
47
47
|
children: D
|
|
48
48
|
})
|
|
49
49
|
}),
|
|
50
|
-
O && /* @__PURE__ */
|
|
50
|
+
O && /* @__PURE__ */ g(l, {
|
|
51
51
|
sx: { padding: 1 },
|
|
52
|
-
children: [/* @__PURE__ */ d
|
|
52
|
+
children: [/* @__PURE__ */ h(d, {
|
|
53
53
|
variant: "h6",
|
|
54
54
|
children: x`Details for our technicians`
|
|
55
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ h(l, {
|
|
56
56
|
component: "pre",
|
|
57
57
|
sx: { fontSize: "0.8rem" },
|
|
58
58
|
children: y?.stack
|
|
59
59
|
})]
|
|
60
60
|
}),
|
|
61
|
-
!b && /* @__PURE__ */
|
|
61
|
+
!b && /* @__PURE__ */ g(l, {
|
|
62
62
|
sx: {
|
|
63
63
|
display: "flex",
|
|
64
64
|
gap: 1,
|
|
65
65
|
padding: 1
|
|
66
66
|
},
|
|
67
67
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ h(u, {
|
|
69
69
|
color: "primary",
|
|
70
70
|
onClick: T,
|
|
71
71
|
variant: "outlined",
|
|
72
72
|
children: x`Logout`
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ h(u, {
|
|
75
75
|
color: "primary",
|
|
76
76
|
onClick: C,
|
|
77
77
|
variant: "outlined",
|
|
78
78
|
children: x`Go back to homepage`
|
|
79
79
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ h(u, {
|
|
81
81
|
color: "secondary",
|
|
82
82
|
onClick: w,
|
|
83
83
|
children: x`Go back`
|
|
@@ -86,7 +86,6 @@ var y = ({ error: y, shouldHideActionButtons: b }) => {
|
|
|
86
86
|
})
|
|
87
87
|
] });
|
|
88
88
|
};
|
|
89
|
-
//#endregion
|
|
90
89
|
export { y as GenericErrorMessage };
|
|
91
90
|
|
|
92
91
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { API_SYSTEM_TOKEN as e } from "../../../constants/api.constants.js";
|
|
2
|
+
import { useConfig as t } from "../../../hooks/useConfig/index.js";
|
|
3
|
+
import { ResponseHandler as n } from "../ResponseHandler/index.js";
|
|
4
|
+
import { t as r } from "../../../_chunks/useQueryMemo.js";
|
|
5
|
+
import { t as i } from "../../../_chunks/QueryClientService.js";
|
|
6
6
|
import { COMMON_QUERY_KEY as a } from "../../../constants/query.constants.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
7
|
+
import { container as o } from "tsyringe";
|
|
8
|
+
import { WindowService as s } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
9
|
+
import c from "axios";
|
|
10
|
+
import { Avatar as l, Box as u, Button as d, Divider as f, IconButton as p, List as m, ListItem as h, ListItemAvatar as g, ListItemText as _, Typography as v } from "@mui/material";
|
|
11
|
+
import { Fragment as y, useCallback as b, useEffect as x, useMemo as S, useState as C } from "react";
|
|
12
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
13
13
|
import { useTranslation as D } from "react-i18next";
|
|
14
14
|
import { TestIdUtil as O } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
15
15
|
import { withDialog as k } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
16
16
|
import A from "@mui/icons-material/Folder";
|
|
17
17
|
import j from "@mui/icons-material/OpenInNew";
|
|
18
|
-
|
|
18
|
+
// src/components/ui/LicensesDialog/LicensesDialog.tsx
|
|
19
19
|
var M = k(({ dialogContentRef: k, onActionsChange: M, onClose: N, onTitleChange: P }) => {
|
|
20
|
-
let { t: F } = D(), I =
|
|
21
|
-
queryFn: async ({ signal: e }) => (await
|
|
20
|
+
let { t: F } = D(), I = t(), [L, R] = C(null), { LicenseInformation: z } = I, { data: B, error: V, isLoading: H } = r({
|
|
21
|
+
queryFn: async ({ signal: e }) => (await c.get("/licenses.json", { signal: e })).data,
|
|
22
22
|
queryKey: ["LICENSES.JSON"]
|
|
23
|
-
}), { data: U, error: W, isLoading: G } =
|
|
24
|
-
queryFn: async ({ signal:
|
|
25
|
-
queryKey:
|
|
26
|
-
}), K = H || G, q =
|
|
27
|
-
|
|
23
|
+
}), { data: U, error: W, isLoading: G } = r({
|
|
24
|
+
queryFn: async ({ signal: t }) => (await o.resolve(e).retrieveLicenses({ signal: t })).data,
|
|
25
|
+
queryKey: o.resolve(i).getGenericKey(a.LICENSES)
|
|
26
|
+
}), K = H || G, q = S(() => !B || !U ? [] : [...B, ...U].sort((e, t) => e.name.localeCompare(t.name)), [B, U]);
|
|
27
|
+
x(() => {
|
|
28
28
|
P(K ? F`Licenses - Loading` : L ? F("Full license for {{name}}", { name: L.name }) : F`Licenses`);
|
|
29
29
|
}, [
|
|
30
30
|
K,
|
|
31
31
|
L,
|
|
32
32
|
P,
|
|
33
33
|
F
|
|
34
|
-
]),
|
|
34
|
+
]), x(() => {
|
|
35
35
|
M(L ? [{
|
|
36
36
|
...O.createAttributes("LicensesDialog-close"),
|
|
37
37
|
autoFocus: !0,
|
|
@@ -46,52 +46,52 @@ var M = k(({ dialogContentRef: k, onActionsChange: M, onClose: N, onTitleChange:
|
|
|
46
46
|
N,
|
|
47
47
|
F
|
|
48
48
|
]);
|
|
49
|
-
let J =
|
|
50
|
-
o.
|
|
51
|
-
}, []), Y =
|
|
49
|
+
let J = b((e) => {
|
|
50
|
+
o.resolve(s).window.open(e, "_blank");
|
|
51
|
+
}, []), Y = b((e) => {
|
|
52
52
|
k?.current?.scrollTo(0, 0), R(e);
|
|
53
53
|
}, [k]);
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ E(n, {
|
|
55
55
|
error: V || W,
|
|
56
56
|
inlineSpinner: !0,
|
|
57
57
|
isLoading: K,
|
|
58
|
-
children: [L && /* @__PURE__ */
|
|
58
|
+
children: [L && /* @__PURE__ */ T(u, {
|
|
59
59
|
sx: { marginY: 2 },
|
|
60
60
|
children: L.license
|
|
61
|
-
}), !L && /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
}), !L && /* @__PURE__ */ E(w, { children: [
|
|
62
|
+
/* @__PURE__ */ T(u, {
|
|
63
63
|
sx: { marginY: 2 },
|
|
64
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ T(z, {})
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ T(f, {}),
|
|
67
|
+
/* @__PURE__ */ E(u, {
|
|
68
68
|
sx: { marginY: 2 },
|
|
69
|
-
children: [/* @__PURE__ */
|
|
69
|
+
children: [/* @__PURE__ */ T(v, { children: F`This application uses the following open source libraries:` }), /* @__PURE__ */ T(m, {
|
|
70
70
|
dense: !0,
|
|
71
71
|
children: q?.map((e) => {
|
|
72
72
|
let t;
|
|
73
|
-
return t = e.license ? e.license.length > 100 ? /* @__PURE__ */
|
|
73
|
+
return t = e.license ? e.license.length > 100 ? /* @__PURE__ */ T(d, {
|
|
74
74
|
color: "secondary",
|
|
75
75
|
onClick: () => Y(e),
|
|
76
76
|
size: "small",
|
|
77
77
|
variant: "text",
|
|
78
78
|
children: F("Show license")
|
|
79
|
-
}) : F("license: {{license}}", { license: e.license }) : F`license: Unknown license`, /* @__PURE__ */
|
|
80
|
-
secondaryAction: e.homepage && /* @__PURE__ */
|
|
79
|
+
}) : F("license: {{license}}", { license: e.license }) : F`license: Unknown license`, /* @__PURE__ */ E(y, { children: [/* @__PURE__ */ E(h, {
|
|
80
|
+
secondaryAction: e.homepage && /* @__PURE__ */ T(p, {
|
|
81
81
|
"aria-label": F`Open project homepage in new tab`,
|
|
82
82
|
edge: "end",
|
|
83
83
|
onClick: () => J(e.homepage),
|
|
84
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ T(j, {})
|
|
85
85
|
}),
|
|
86
|
-
children: [/* @__PURE__ */
|
|
87
|
-
primary: /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ T(g, { children: /* @__PURE__ */ T(l, { children: /* @__PURE__ */ T(A, {}) }) }), /* @__PURE__ */ T(_, {
|
|
87
|
+
primary: /* @__PURE__ */ E(w, { children: [
|
|
88
|
+
/* @__PURE__ */ T("strong", { children: e.name }),
|
|
89
89
|
" ",
|
|
90
90
|
e.version
|
|
91
91
|
] }),
|
|
92
92
|
secondary: t
|
|
93
93
|
})]
|
|
94
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ T(f, {
|
|
95
95
|
component: "li",
|
|
96
96
|
variant: "inset"
|
|
97
97
|
})] }, e.name);
|
|
@@ -108,7 +108,6 @@ var M = k(({ dialogContentRef: k, onActionsChange: M, onClose: N, onTitleChange:
|
|
|
108
108
|
noCloseButton: !1,
|
|
109
109
|
testId: "LicensesDialog"
|
|
110
110
|
});
|
|
111
|
-
//#endregion
|
|
112
111
|
export { M as LicensesDialog };
|
|
113
112
|
|
|
114
113
|
//# sourceMappingURL=index.js.map
|