diff --git a/packages/geoview-core/src/core/components/app-bar/buttons/version.tsx b/packages/geoview-core/src/core/components/app-bar/buttons/version.tsx index 9f8b2af5a4c..61ec7131a5d 100644 --- a/packages/geoview-core/src/core/components/app-bar/buttons/version.tsx +++ b/packages/geoview-core/src/core/components/app-bar/buttons/version.tsx @@ -3,11 +3,13 @@ import { useTranslation } from 'react-i18next'; import { Typography, Box, Link, Theme, SvgIcon, ClickAwayListener, Paper } from '@mui/material'; import { GITHUB_REPO, GEO_URL_TEXT } from '@/core/utils/constant'; -import { GeoCaIcon, IconButton, Popper } from '@/ui'; +import { GeoCaIcon, IconButton, Popper, CloseIcon } from '@/ui'; import { useGeoViewMapId } from '@/core/stores/geoview-store'; import { useMapInteraction } from '@/core/stores/store-interface-and-intial-values/map-state'; import { GitHubIcon } from '@/ui/icons'; import { handleEscapeKey } from '@/core/utils/utilities'; +import { FocusTrapContainer } from '../../common'; +import { useUIActiveTrapGeoView } from '@/core/stores/store-interface-and-intial-values/ui-state'; // eslint-disable-next-line no-underscore-dangle declare const __VERSION__: TypeAppVersion; @@ -31,6 +33,7 @@ export default function Version(): JSX.Element { const mapId = useGeoViewMapId(); const interaction = useMapInteraction(); + const activeTrapGeoView = useUIActiveTrapGeoView(); const mapElem = document.getElementById(`shell-${mapId}`); @@ -62,12 +65,16 @@ export default function Version(): JSX.Element { textDecoration: 'underLine', }, }, + versionHeading: { + display: 'flex', + alignItems: 'center', + borderBottom: (theme: Theme) => `1px solid ${theme.palette.geoViewColor.bgColor.dark[100]}}`, + }, versionsInfoTitle: { fontSize: (theme: Theme) => theme.palette.geoViewFontSize.default, fontWeight: '700', padding: '20px', color: (theme: Theme) => theme.palette.geoViewColor.textColor.main, - borderBottom: (theme: Theme) => `1px solid ${theme.palette.geoViewColor.bgColor.dark[100]}}`, marginBottom: '10px', }, versionInfoContent: { @@ -101,30 +108,38 @@ export default function Version(): JSX.Element { onClose={handleClickAway} container={mapElem} handleKeyDown={(key, callBackFn) => handleEscapeKey(key, '', false, callBackFn)} + disablePortal > - - - {t('appbar.version')} - - - - - - - - {GEO_URL_TEXT.text} - + + + + + {t('appbar.version')} + + + + - - - - {t('appbar.repoLink')} - + + + + + + + {GEO_URL_TEXT.text} + + + + + + {t('appbar.repoLink')} + + + {`v.${__VERSION__.major}.${__VERSION__.minor}.${__VERSION__.patch}`} + {new Date(__VERSION__.timestamp).toLocaleDateString()} - {`v.${__VERSION__.major}.${__VERSION__.minor}.${__VERSION__.patch}`} - {new Date(__VERSION__.timestamp).toLocaleDateString()} - - + + diff --git a/packages/geoview-core/src/core/components/notifications/notifications-style.ts b/packages/geoview-core/src/core/components/notifications/notifications-style.ts index 4c3e181e801..1a37ac435e3 100644 --- a/packages/geoview-core/src/core/components/notifications/notifications-style.ts +++ b/packages/geoview-core/src/core/components/notifications/notifications-style.ts @@ -20,7 +20,7 @@ export const getSxClasses = (theme: Theme): any => ({ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', - padding: '20px', + padding: '1.25rem 0.25rem 1.25rem 1.25rem', borderBottom: `1px solid ${theme.palette.geoViewColor.bgColor.dark[100]}}`, }, notificationsTitle: { diff --git a/packages/geoview-core/src/core/components/notifications/notifications.tsx b/packages/geoview-core/src/core/components/notifications/notifications.tsx index 28a80ff8a10..471b363f3ae 100644 --- a/packages/geoview-core/src/core/components/notifications/notifications.tsx +++ b/packages/geoview-core/src/core/components/notifications/notifications.tsx @@ -27,6 +27,8 @@ import { logger } from '@/core/utils/logger'; import { useMapInteraction } from '@/core/stores/store-interface-and-intial-values/map-state'; import { useShake } from '@/core/utils/useSpringAnimations'; import { handleEscapeKey } from '@/core/utils/utilities'; +import { FocusTrapContainer } from '../common'; +import { useUIActiveTrapGeoView } from '@/core/stores/store-interface-and-intial-values/ui-state'; export type NotificationDetailsType = { key: string; @@ -63,6 +65,8 @@ export default function Notifications(): JSX.Element { // get values from the store const notifications = useAppNotifications(); const interaction = useMapInteraction(); + const activeTrapGeoView = useUIActiveTrapGeoView(); + const { removeNotification, removeAllNotifications } = useAppStoreActions(); useEffect(() => { @@ -175,34 +179,42 @@ export default function Notifications(): JSX.Element { placement="right-end" onClose={handleClickAway} container={mapElem} + disablePortal handleKeyDown={(key, callBackFn) => handleEscapeKey(key, '', false, callBackFn)} > - - - - {t('appbar.notifications')} - - - - - {notifications.length > 0 ? ( - notifications.map((notification, index) => renderNotification(notification, index)) - ) : ( - - {t('appbar.no_notifications_available')} + + + + + {t('appbar.notifications')} - )} - - + + + + + + + + + {notifications.length > 0 ? ( + notifications.map((notification, index) => renderNotification(notification, index)) + ) : ( + + {t('appbar.no_notifications_available')} + + )} + + +