@finsemble/finsemble-ui 6.2.0 → 6.3.0-beta.20211008
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/package.json +17 -16
- package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +2 -3
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/assets/css/notificationsCenter.css +4 -2
- package/react/assets/css/userPreferences.css +1 -0
- package/react/assets/css/windowTitleBar.css +33 -1
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppList.d.ts +7 -1
- package/react/components/appCatalog/components/AppList.js +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -8
- package/react/components/appCatalog/components/AppResults.js +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
- package/react/components/appCatalog/components/EmptyResults.js +2 -4
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +24 -4
- package/react/components/appCatalog/components/Hero.js +2 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +18 -4
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
- package/react/components/appCatalog/components/SearchBar.js +4 -7
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
- package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
- package/react/components/appCatalog/components/Showcase/Header.js +2 -2
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
- package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -4
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -3
- package/react/components/appCatalog/components/Toast.js +5 -4
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
- package/react/components/appCatalog/modules/FDC3.js +20 -18
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +9 -2
- package/react/components/appCatalog/stores/appStore.js +10 -4
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.d.ts +4 -4
- package/react/components/common/Button.js +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ColorPicker.js +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +0 -5
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +0 -5
- package/react/components/common/FileInput.js +7 -9
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +2 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +2 -5
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js +2 -2
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js +2 -2
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/ImagePreview.js +2 -2
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tab.js +2 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/file_helpers.js +3 -2
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +8 -10
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js +2 -2
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +4 -4
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -6
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +4 -4
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +5 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +3 -3
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js +8 -8
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js +3 -3
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +5 -5
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +0 -5
- package/react/components/favorites/FavoriteMaker.js +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +7 -7
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js +5 -4
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js +5 -4
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +18 -17
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js +3 -3
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js +6 -3
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js +4 -3
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +10 -42
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -1
- package/react/components/menu/Menu.js +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuPortal.js +7 -6
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js +14 -15
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js +2 -4
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js +2 -4
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +2 -4
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +28 -43
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +10 -9
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +3 -5
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +15 -24
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +2 -2
- package/react/components/notifications/components/views/ListView.js +9 -9
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
- package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/types.d.ts +7 -6
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +6 -4
- package/react/components/notifications/utils.js +26 -32
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
- package/react/components/processMonitor/ProcessMonitor.js +17 -10
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
- package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
- package/react/components/processMonitor/components/ChildWindow.js +19 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
- package/react/components/processMonitor/components/ProcessStatistics.js +25 -18
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +11 -16
- package/react/components/processMonitor/constants.js +3 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +25 -5
- package/react/components/processMonitor/helpers.js +28 -20
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.d.ts +1 -0
- package/react/components/processMonitor/helpers.spec.js +44 -0
- package/react/components/processMonitor/helpers.spec.js.map +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +30 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
- package/react/components/quickComponentForm/QuickComponentForm.js +13 -14
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/search/Highlight.js +2 -2
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js +3 -3
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js +17 -8
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js +2 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +4 -5
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +3 -2
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/shared/Button.js +2 -4
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js +9 -11
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +11 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +26 -6
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/linkerUtil.d.ts +3 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
- package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +3 -5
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +4 -4
- package/react/components/smartDesktopDesigner/Application.js +84 -92
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
- package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +0 -1
- package/react/components/smartDesktopDesigner/Applications.js +73 -62
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -8
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js +3 -3
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -24
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +2 -8
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +4 -14
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +2 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +2 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
- package/react/components/smartDesktopDesigner/fixtures/apps.js +9 -20
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +8 -8
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +2 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/system/System.spec.js +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +5 -5
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js +3 -2
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +5 -5
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +14 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +24 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +5 -4
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +23 -29
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +13 -8
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +7 -3
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +5 -4
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +3 -10
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
- package/react/components/toolbar/appLauncher/components/componentList.js +24 -21
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +37 -55
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +2 -3
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +65 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
- package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
- package/react/components/userPreferences/UserPreferencesBase.js +2 -2
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js +2 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
- package/react/components/userPreferences/components/LeftNav.js +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +2 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js +21 -10
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +15 -8
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
- package/react/components/userPreferences/stores/UserPreferencesStore.js +9 -16
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
- package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +27 -7
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
- package/react/components/windowTitleBar/components/center/TabList.js +111 -37
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
- package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +1 -21
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.js +11 -6
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
- package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +2 -2
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useLinker.js +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +6 -6
- package/react/hooks/useNotifications.js +16 -17
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useSearch.js +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +3 -4
- package/react/reducers/toolbarReducer.js +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/store.d.ts +6 -7
- package/react/types/advancedAppLauncherTypes.d.ts +28 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +22 -0
- package/react/types/fdc3.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +46 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
- package/react/components/processMonitor/components/ChildWindows.js +0 -11
- package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js
CHANGED
|
@@ -16,41 +16,35 @@ const defaultControls = {
|
|
|
16
16
|
{
|
|
17
17
|
action: "all",
|
|
18
18
|
label: "All",
|
|
19
|
-
run: (notifications) =>
|
|
20
|
-
return notifications;
|
|
21
|
-
},
|
|
19
|
+
run: (notifications) => notifications,
|
|
22
20
|
},
|
|
23
21
|
{
|
|
24
22
|
action: "unread",
|
|
25
23
|
label: "Unread",
|
|
26
|
-
run: (notifications) =>
|
|
27
|
-
return notifications.filter((notification) => !notification.isRead);
|
|
28
|
-
},
|
|
24
|
+
run: (notifications) => notifications.filter((notification) => !notification.isRead),
|
|
29
25
|
},
|
|
30
26
|
{
|
|
31
27
|
action: "read",
|
|
32
28
|
label: "Read",
|
|
33
|
-
run: (notifications) =>
|
|
34
|
-
return notifications.filter((notification) => notification.isRead);
|
|
35
|
-
},
|
|
29
|
+
run: (notifications) => notifications.filter((notification) => notification.isRead),
|
|
36
30
|
},
|
|
37
31
|
{
|
|
38
32
|
action: "snoozed",
|
|
39
33
|
label: "Snoozed",
|
|
40
|
-
run: (notifications) =>
|
|
41
|
-
return notifications.filter((notification) => notification.isSnoozed);
|
|
42
|
-
},
|
|
34
|
+
run: (notifications) => notifications.filter((notification) => notification.isSnoozed),
|
|
43
35
|
},
|
|
44
36
|
],
|
|
45
37
|
active: "all",
|
|
46
38
|
};
|
|
47
39
|
const addPoppedInClasses = () => {
|
|
48
|
-
|
|
49
|
-
document.getElementById("
|
|
40
|
+
var _a, _b;
|
|
41
|
+
(_a = document.getElementById("notifications-center-container")) === null || _a === void 0 ? void 0 : _a.classList.add("notifications-popped-in");
|
|
42
|
+
(_b = document.getElementById("FSBLHeader")) === null || _b === void 0 ? void 0 : _b.classList.add("notifications-popped-in");
|
|
50
43
|
};
|
|
51
44
|
const removePoppedInClasses = () => {
|
|
52
|
-
|
|
53
|
-
document.getElementById("
|
|
45
|
+
var _a, _b;
|
|
46
|
+
(_a = document.getElementById("notifications-center-container")) === null || _a === void 0 ? void 0 : _a.classList.remove("notifications-popped-in");
|
|
47
|
+
(_b = document.getElementById("FSBLHeader")) === null || _b === void 0 ? void 0 : _b.classList.remove("notifications-popped-in");
|
|
54
48
|
};
|
|
55
49
|
const storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }) => {
|
|
56
50
|
FSBL.Clients.StorageClient.save({
|
|
@@ -75,13 +69,11 @@ const setShowWindowForState = (centerState) => {
|
|
|
75
69
|
FSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);
|
|
76
70
|
storeNotificationsCenterWindowPosition(centerState);
|
|
77
71
|
};
|
|
78
|
-
const isValidPosition = (bounds) =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
typeof bounds.width !== "undefined");
|
|
84
|
-
};
|
|
72
|
+
const isValidPosition = (bounds) => bounds &&
|
|
73
|
+
typeof bounds.left !== "undefined" &&
|
|
74
|
+
typeof bounds.top !== "undefined" &&
|
|
75
|
+
typeof bounds.height !== "undefined" &&
|
|
76
|
+
typeof bounds.width !== "undefined";
|
|
85
77
|
const LAZY_LOAD_NO_MORE_PAGES = -1;
|
|
86
78
|
export const NotificationsCenter = (props) => {
|
|
87
79
|
const params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };
|
|
@@ -125,10 +117,7 @@ export const NotificationsCenter = (props) => {
|
|
|
125
117
|
const togglePoppedStatus = () => {
|
|
126
118
|
const poppedOut = !uiState.poppedOut;
|
|
127
119
|
poppedOutRef.current = poppedOut;
|
|
128
|
-
setUIState({
|
|
129
|
-
...uiState,
|
|
130
|
-
poppedOut,
|
|
131
|
-
});
|
|
120
|
+
setUIState(Object.assign(Object.assign({}, uiState), { poppedOut }));
|
|
132
121
|
};
|
|
133
122
|
const setFullHeight = async (monitorInfo) => {
|
|
134
123
|
if (!monitorInfo) {
|
|
@@ -154,7 +143,7 @@ export const NotificationsCenter = (props) => {
|
|
|
154
143
|
FSBL.Clients.WindowClient.setShape([]);
|
|
155
144
|
};
|
|
156
145
|
const boundsChangeListener = (event) => {
|
|
157
|
-
if (showCenterRef
|
|
146
|
+
if ((showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) && !poppedOutRef.current) {
|
|
158
147
|
setFullHeight();
|
|
159
148
|
}
|
|
160
149
|
const position = {
|
|
@@ -164,7 +153,7 @@ export const NotificationsCenter = (props) => {
|
|
|
164
153
|
width: event.data.width,
|
|
165
154
|
};
|
|
166
155
|
storeNotificationsCenterWindowPosition({
|
|
167
|
-
showCenter: showCenterRef
|
|
156
|
+
showCenter: (showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) ? showCenterRef.current : false,
|
|
168
157
|
poppedOut: poppedOutRef.current,
|
|
169
158
|
position,
|
|
170
159
|
});
|
|
@@ -253,10 +242,10 @@ export const NotificationsCenter = (props) => {
|
|
|
253
242
|
applicationState.current = response.data.state;
|
|
254
243
|
});
|
|
255
244
|
const hide = (event) => {
|
|
256
|
-
const publishValue = {
|
|
245
|
+
const publishValue = Object.assign({}, subscriptionMessageRef.current);
|
|
257
246
|
publishValue["showCenter"] = false;
|
|
258
247
|
setUIState(publishValue);
|
|
259
|
-
if (applicationState
|
|
248
|
+
if ((applicationState === null || applicationState === void 0 ? void 0 : applicationState.current) !== "closing") {
|
|
260
249
|
try {
|
|
261
250
|
event.cancel();
|
|
262
251
|
}
|
|
@@ -346,7 +335,7 @@ export const NotificationsCenter = (props) => {
|
|
|
346
335
|
setFilteredNotifications([...notifications]);
|
|
347
336
|
}, [notifications]);
|
|
348
337
|
useEffect(() => {
|
|
349
|
-
function listenMuteStateChanged(error
|
|
338
|
+
function listenMuteStateChanged(error) {
|
|
350
339
|
if (error) {
|
|
351
340
|
console.error("FinsembleNotificationsMuteStateChannel: ", error);
|
|
352
341
|
}
|
|
@@ -363,20 +352,16 @@ export const NotificationsCenter = (props) => {
|
|
|
363
352
|
async function loadMuteFilter() {
|
|
364
353
|
return await FSBL.Clients.NotificationClient.getMuteFilters();
|
|
365
354
|
}
|
|
366
|
-
loadMuteFilter().then((
|
|
367
|
-
setMuteFilters(
|
|
355
|
+
loadMuteFilter().then((loadedMuteFilters) => {
|
|
356
|
+
setMuteFilters(loadedMuteFilters);
|
|
368
357
|
setReloadMuteFilters(false);
|
|
369
358
|
});
|
|
370
359
|
}, [reloadMuteFilters]);
|
|
371
|
-
const notificationsMainView = () =>
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
};
|
|
377
|
-
const notificationDetailsViewComponent = () => {
|
|
378
|
-
return React.createElement(NotificationDetailsView, { notification: selectedNotification });
|
|
379
|
-
};
|
|
360
|
+
const notificationsMainView = () => (React.createElement(React.Fragment, null,
|
|
361
|
+
React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
|
|
362
|
+
React.createElement(DrawerControls, null),
|
|
363
|
+
React.createElement("div", { className: "cards-container" }, viewMode === ViewMode.CARD ? (React.createElement(CardView, { notifications: notifications, notificationCard: props.notificationCard })) : (React.createElement(ListView, { notifications: notifications, notificationHeaderRow: props.notificationHeaderRow, notificationListRow: props.notificationListRow })))));
|
|
364
|
+
const notificationDetailsViewComponent = () => React.createElement(NotificationDetailsView, { notification: selectedNotification });
|
|
380
365
|
return (React.createElement(ConditionalWrapper, { condition: config.isTransparent && !uiState.poppedOut && !isMac, wrapper: (children) => (React.createElement(CSSTransition, { in: uiState.showCenter, timeout: 500, classNames: "drawer", unmountOnExit: true }, children)) },
|
|
381
366
|
React.createElement(NotificationsContext.Provider, { value: notificationsContextValues },
|
|
382
367
|
React.createElement(Drawer, { classNames: uiState.poppedOut ? "popped-out" : "" }, selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()))));
|
package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,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","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\r\n\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC, ViewMode, SelectionMode } from \"../../constants\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\n// Hooks\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tgetNotificationConfig,\r\n\tmoveToToolbarMonitor,\r\n\tgetOS,\r\n\tgetFetchHistoryParams,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Types\r\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport IMuteFilter from \"common/notifications/definitions/IMuteFilter\";\r\n\r\n// Components\r\nimport CardView from \"../views/CardView\";\r\nimport Drawer from \"../drawer/Drawer\";\r\nimport DrawerControls from \"../drawer/DrawerControls\";\r\nimport DrawerHeader from \"../drawer/DrawerHeader\";\r\nimport ListView from \"../views/ListView\";\r\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\r\n\r\nconst defaultControls: NotificationCenterControlsProps = {\r\n\tcontrols: [\r\n\t\t{\r\n\t\t\taction: \"all\",\r\n\t\t\tlabel: \"All\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications;\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"unread\",\r\n\t\t\tlabel: \"Unread\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => !notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"read\",\r\n\t\t\tlabel: \"Read\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"snoozed\",\r\n\t\t\tlabel: \"Snoozed\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isSnoozed);\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tactive: \"all\",\r\n};\r\n\r\nconst addPoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\r\n};\r\n\r\nconst removePoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\r\n};\r\n\r\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\r\n\tFSBL.Clients.StorageClient.save({\r\n\t\ttopic: \"finsemble.notifications\",\r\n\t\tkey: \"last.position\",\r\n\t\tvalue: {\r\n\t\t\tshowCenter,\r\n\t\t\tpoppedOut,\r\n\t\t\tposition,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nconst setShowWindowForState = (centerState: any) => {\r\n\tif (centerState.showCenter) {\r\n\t\tfinsembleWindow.show({}, () => {\r\n\t\t\tfinsembleWindow.bringToFront();\r\n\t\t});\r\n\t}\r\n\r\n\tif (centerState.position) {\r\n\t\tfinsembleWindow.setBounds(centerState.position);\r\n\t}\r\n\r\n\t// Always on top when popped in\r\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\r\n\tstoreNotificationsCenterWindowPosition(centerState);\r\n};\r\n\r\nconst isValidPosition = (bounds: any): boolean => {\r\n\treturn (\r\n\t\tbounds &&\r\n\t\ttypeof bounds.left !== \"undefined\" &&\r\n\t\ttypeof bounds.top !== \"undefined\" &&\r\n\t\ttypeof bounds.height !== \"undefined\" &&\r\n\t\ttypeof bounds.width !== \"undefined\"\r\n\t);\r\n};\r\n\r\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\r\n\r\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\r\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\r\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\r\n\tconst [uiState, setUIState] = useNotificationUI();\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isInitialized, setInitialized] = useState(false);\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\tconst nextPageToFetch = useRef(1);\r\n\r\n\t// Set up references for use in callbacks to FSBL functions\r\n\tconst showCenterRef = useRef(false);\r\n\tconst poppedOutRef = useRef(false);\r\n\tconst subscriptionMessageRef = useRef<any>({});\r\n\tconst applicationState = useRef(null);\r\n\r\n\tconst checkedNotifications: INotification[] = [];\r\n\r\n\tconst [searchString, setSearchString] = useState(\"\");\r\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\r\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\r\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\r\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\r\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\r\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\r\n\r\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\r\n\r\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\r\n\tconst notificationsContextValues: NotificationsContextType = {\r\n\t\tviewMode,\r\n\t\tsetViewMode,\r\n\t\tselectionMode,\r\n\t\tsetSelectionMode,\r\n\t\tdrawerControlProps,\r\n\t\tsetDrawerControlProps,\r\n\t\tselectedNotification,\r\n\t\tsetSelectedNotification,\r\n\t\tsearchString,\r\n\t\tsetSearchString,\r\n\t\tfilteredNotifications,\r\n\t\tcheckedNotifications,\r\n\t\tsetFilteredNotifications,\r\n\t\tmuteFilters,\r\n\t\tsetMuteFilters,\r\n\t};\r\n\r\n\tconst togglePoppedStatus = () => {\r\n\t\tconst poppedOut = !uiState.poppedOut;\r\n\t\tpoppedOutRef.current = poppedOut;\r\n\t\tsetUIState({\r\n\t\t\t...uiState,\r\n\t\t\tpoppedOut,\r\n\t\t});\r\n\t};\r\n\r\n\tconst setFullHeight = async (monitorInfo?: any) => {\r\n\t\tif (!monitorInfo) {\r\n\t\t\tawait new Promise<void>((resolve) => {\r\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\r\n\t\t\t\t\tmonitorInfo = monitor;\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst { data } = await finsembleWindow.getBounds();\r\n\t\tconst centerWindowPosition = {\r\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\r\n\t\t\ttop: monitorInfo.availableRect.top,\r\n\t\t\theight: monitorInfo.availableRect.height,\r\n\t\t\twidth: data.width,\r\n\t\t};\r\n\r\n\t\tsetShowWindowForState({\r\n\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition: centerWindowPosition,\r\n\t\t});\r\n\r\n\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t};\r\n\r\n\tconst boundsChangeListener = (event: any) => {\r\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\r\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\r\n\t\t\tsetFullHeight();\r\n\t\t}\r\n\t\tconst position = {\r\n\t\t\ttop: event.data.top,\r\n\t\t\tleft: event.data.left,\r\n\t\t\theight: event.data.height,\r\n\t\t\twidth: event.data.width,\r\n\t\t};\r\n\r\n\t\tstoreNotificationsCenterWindowPosition({\r\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition,\r\n\t\t});\r\n\t};\r\n\r\n\tconst getScrollPercentage = () => {\r\n\t\tconst maxScroll = document.body.scrollHeight;\r\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\r\n\t\treturn currentScroll / maxScroll;\r\n\t};\r\n\r\n\tconst lazyLoadNextPage = async () =>\r\n\t\tnew Promise<void>(async (resolve) => {\r\n\t\t\tif (nextPageToFetch.current > 0) {\r\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\r\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\r\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\r\n\t\t\t\tif (notificationList.length) {\r\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\r\n\t\t\t\t\tfor (const notification of notificationList) {\r\n\t\t\t\t\t\taddNotification(notification);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Stop fetching after this one\r\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\r\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\r\n\t\tif (isTransparent && !isMac) {\r\n\t\t\tif (poppedOut) {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx: 0,\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (show) {\r\n\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t}\r\n\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\r\n\tuseEffect(() => {\r\n\t\tsetOpaqueClassName(!config.isTransparent);\r\n\r\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\r\n\t\t\tapplicationState.current = response.data.state;\r\n\t\t});\r\n\r\n\t\tconst hide = (event: any) => {\r\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\r\n\t\t\tpublishValue[\"showCenter\"] = false;\r\n\t\t\tsetUIState(publishValue);\r\n\t\t\tif (applicationState?.current !== \"closing\") {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tevent.cancel();\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst scrollHandler = () => {\r\n\t\t\tif (getScrollPercentage() > 0.9) {\r\n\t\t\t\tlazyLoadNextPage();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\r\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\r\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\r\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst recursiveLoad = async () => {\r\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\r\n\t\t\tawait lazyLoadNextPage();\r\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\r\n\t\t\t\trecursiveLoad();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\trecursiveLoad();\r\n\t}, [viewMode, drawerControlProps.active]);\r\n\r\n\t// Hook to set up the center state from service data on component start\r\n\tuseEffect(() => {\r\n\t\tsubscriptionMessageRef.current = uiState;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\r\n\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\tremovePoppedInClasses();\r\n\t\t\t} else {\r\n\t\t\t\taddPoppedInClasses();\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPosition(uiState.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\tposition: uiState.position,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Setup references\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [uiState]);\r\n\r\n\t// Effect to run when we pop-in or pop-out the notification center\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\r\n\t\t\t\t\tremovePoppedInClasses();\r\n\r\n\t\t\t\t\tconst centerWindowPosition = {\r\n\t\t\t\t\t\tleft: data.left - 25,\r\n\t\t\t\t\t\ttop: data.top + 25,\r\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\r\n\t\t\t\t\t\twidth: data.width,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\t\tposition: centerWindowPosition,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\taddPoppedInClasses();\r\n\t\t\t\t\tsetFullHeight(monitorInfo);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [uiState.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [uiState.showCenter]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetFilteredNotifications([...notifications]);\r\n\t}, [notifications]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tsetReloadMuteFilters(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t// Sets the current active mute filters\r\n\tuseEffect(() => {\r\n\t\tasync function loadMuteFilter() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\r\n\t\t}\r\n\r\n\t\tloadMuteFilter().then((muteFilters: IMuteFilter[]) => {\r\n\t\t\tsetMuteFilters(muteFilters);\r\n\t\t\tsetReloadMuteFilters(false);\r\n\t\t});\r\n\t}, [reloadMuteFilters]);\r\n\r\n\tconst notificationsMainView = () => {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\r\n\t\t\t\t<DrawerControls />\r\n\t\t\t\t<div className=\"cards-container\">\r\n\t\t\t\t\t{viewMode === ViewMode.CARD ? (\r\n\t\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<ListView\r\n\t\t\t\t\t\t\tnotifications={notifications}\r\n\t\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\r\n\t\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</>\r\n\t\t);\r\n\t};\r\n\r\n\tconst notificationDetailsViewComponent = () => {\r\n\t\treturn <NotificationDetailsView notification={selectedNotification} />;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<ConditionalWrapper\r\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</CSSTransition>\r\n\t\t\t)}\r\n\t\t>\r\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\r\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\r\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\r\n\t\t\t\t</Drawer>\r\n\t\t\t</NotificationsContext.Provider>\r\n\t\t</ConditionalWrapper>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,gDAAgD,CAAC;AAGxD,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMlE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,0BAA0B,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EAAE,KAAK,CAAC,mBAAmB,GAC7C,CACF,CACI,CACJ,CACH,CAAC;IAEF,MAAM,gCAAgC,GAAG,GAAG,EAAE,CAAC,oBAAC,uBAAuB,IAAC,YAAY,EAAE,oBAAoB,GAAI,CAAC;IAE/G,OAAO,CACN,oBAAC,kBAAkB,IAClB,SAAS,EAAG,MAAM,CAAC,aAAyB,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,KAAK,EAC5E,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CACtB,oBAAC,aAAa,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAC,QAAQ,EAAC,aAAa,UACpF,QAAQ,CACM,CAChB;QAED,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,0BAA0B;YAC/D,oBAAC,MAAM,IAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IACvD,oBAAoB,CAAC,CAAC,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAC5E,CACsB,CACZ,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\r\n\r\nimport { ViewMode, SelectionMode } from \"../../constants\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\n// Hooks\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tgetNotificationConfig,\r\n\tmoveToToolbarMonitor,\r\n\tgetOS,\r\n\tgetFetchHistoryParams,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Types\r\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\r\n\r\n// Components\r\nimport CardView from \"../views/CardView\";\r\nimport Drawer from \"../drawer/Drawer\";\r\nimport DrawerControls from \"../drawer/DrawerControls\";\r\nimport DrawerHeader from \"../drawer/DrawerHeader\";\r\nimport ListView from \"../views/ListView\";\r\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IMuteFilter = services.notification.types.IMuteFilter;\r\n\r\nconst defaultControls: NotificationCenterControlsProps = {\r\n\tcontrols: [\r\n\t\t{\r\n\t\t\taction: \"all\",\r\n\t\t\tlabel: \"All\",\r\n\t\t\trun: (notifications: INotification[]) => notifications,\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"unread\",\r\n\t\t\tlabel: \"Unread\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"read\",\r\n\t\t\tlabel: \"Read\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"snoozed\",\r\n\t\t\tlabel: \"Snoozed\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\r\n\t\t},\r\n\t],\r\n\tactive: \"all\",\r\n};\r\n\r\nconst addPoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\r\n};\r\n\r\nconst removePoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\r\n};\r\n\r\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\r\n\tFSBL.Clients.StorageClient.save({\r\n\t\ttopic: \"finsemble.notifications\",\r\n\t\tkey: \"last.position\",\r\n\t\tvalue: {\r\n\t\t\tshowCenter,\r\n\t\t\tpoppedOut,\r\n\t\t\tposition,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nconst setShowWindowForState = (centerState: any) => {\r\n\tif (centerState.showCenter) {\r\n\t\tfinsembleWindow.show({}, () => {\r\n\t\t\tfinsembleWindow.bringToFront();\r\n\t\t});\r\n\t}\r\n\r\n\tif (centerState.position) {\r\n\t\tfinsembleWindow.setBounds(centerState.position);\r\n\t}\r\n\r\n\t// Always on top when popped in\r\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\r\n\tstoreNotificationsCenterWindowPosition(centerState);\r\n};\r\n\r\nconst isValidPosition = (bounds: any): boolean =>\r\n\tbounds &&\r\n\ttypeof bounds.left !== \"undefined\" &&\r\n\ttypeof bounds.top !== \"undefined\" &&\r\n\ttypeof bounds.height !== \"undefined\" &&\r\n\ttypeof bounds.width !== \"undefined\";\r\n\r\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\r\n\r\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\r\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\r\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\r\n\tconst [uiState, setUIState] = useNotificationUI();\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isInitialized, setInitialized] = useState(false);\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\tconst nextPageToFetch = useRef(1);\r\n\r\n\t// Set up references for use in callbacks to FSBL functions\r\n\tconst showCenterRef = useRef(false);\r\n\tconst poppedOutRef = useRef(false);\r\n\tconst subscriptionMessageRef = useRef<any>({});\r\n\tconst applicationState = useRef(null);\r\n\r\n\tconst checkedNotifications: INotification[] = [];\r\n\r\n\tconst [searchString, setSearchString] = useState(\"\");\r\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\r\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\r\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\r\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\r\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\r\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\r\n\r\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\r\n\r\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\r\n\tconst notificationsContextValues: NotificationsContextType = {\r\n\t\tviewMode,\r\n\t\tsetViewMode,\r\n\t\tselectionMode,\r\n\t\tsetSelectionMode,\r\n\t\tdrawerControlProps,\r\n\t\tsetDrawerControlProps,\r\n\t\tselectedNotification,\r\n\t\tsetSelectedNotification,\r\n\t\tsearchString,\r\n\t\tsetSearchString,\r\n\t\tfilteredNotifications,\r\n\t\tcheckedNotifications,\r\n\t\tsetFilteredNotifications,\r\n\t\tmuteFilters,\r\n\t\tsetMuteFilters,\r\n\t};\r\n\r\n\tconst togglePoppedStatus = () => {\r\n\t\tconst poppedOut = !uiState.poppedOut;\r\n\t\tpoppedOutRef.current = poppedOut;\r\n\t\tsetUIState({\r\n\t\t\t...uiState,\r\n\t\t\tpoppedOut,\r\n\t\t});\r\n\t};\r\n\r\n\tconst setFullHeight = async (monitorInfo?: any) => {\r\n\t\tif (!monitorInfo) {\r\n\t\t\tawait new Promise<void>((resolve) => {\r\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\r\n\t\t\t\t\tmonitorInfo = monitor;\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst { data } = await finsembleWindow.getBounds();\r\n\t\tconst centerWindowPosition = {\r\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\r\n\t\t\ttop: monitorInfo.availableRect.top,\r\n\t\t\theight: monitorInfo.availableRect.height,\r\n\t\t\twidth: data.width,\r\n\t\t};\r\n\r\n\t\tsetShowWindowForState({\r\n\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition: centerWindowPosition,\r\n\t\t});\r\n\r\n\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t};\r\n\r\n\tconst boundsChangeListener = (event: any) => {\r\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\r\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\r\n\t\t\tsetFullHeight();\r\n\t\t}\r\n\t\tconst position = {\r\n\t\t\ttop: event.data.top,\r\n\t\t\tleft: event.data.left,\r\n\t\t\theight: event.data.height,\r\n\t\t\twidth: event.data.width,\r\n\t\t};\r\n\r\n\t\tstoreNotificationsCenterWindowPosition({\r\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition,\r\n\t\t});\r\n\t};\r\n\r\n\tconst getScrollPercentage = () => {\r\n\t\tconst maxScroll = document.body.scrollHeight;\r\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\r\n\t\treturn currentScroll / maxScroll;\r\n\t};\r\n\r\n\tconst lazyLoadNextPage = async () =>\r\n\t\tnew Promise<void>(async (resolve) => {\r\n\t\t\tif (nextPageToFetch.current > 0) {\r\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\r\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\r\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\r\n\t\t\t\tif (notificationList.length) {\r\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\r\n\t\t\t\t\tfor (const notification of notificationList) {\r\n\t\t\t\t\t\taddNotification(notification);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Stop fetching after this one\r\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\r\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\r\n\t\tif (isTransparent && !isMac) {\r\n\t\t\tif (poppedOut) {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx: 0,\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (show) {\r\n\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t}\r\n\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\r\n\tuseEffect(() => {\r\n\t\tsetOpaqueClassName(!config.isTransparent);\r\n\r\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\r\n\t\t\tapplicationState.current = response.data.state;\r\n\t\t});\r\n\r\n\t\tconst hide = (event: any) => {\r\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\r\n\t\t\tpublishValue[\"showCenter\"] = false;\r\n\t\t\tsetUIState(publishValue);\r\n\t\t\tif (applicationState?.current !== \"closing\") {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tevent.cancel();\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst scrollHandler = () => {\r\n\t\t\tif (getScrollPercentage() > 0.9) {\r\n\t\t\t\tlazyLoadNextPage();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\r\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\r\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\r\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst recursiveLoad = async () => {\r\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\r\n\t\t\tawait lazyLoadNextPage();\r\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\r\n\t\t\t\trecursiveLoad();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\trecursiveLoad();\r\n\t}, [viewMode, drawerControlProps.active]);\r\n\r\n\t// Hook to set up the center state from service data on component start\r\n\tuseEffect(() => {\r\n\t\tsubscriptionMessageRef.current = uiState;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\r\n\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\tremovePoppedInClasses();\r\n\t\t\t} else {\r\n\t\t\t\taddPoppedInClasses();\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPosition(uiState.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\tposition: uiState.position,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Setup references\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [uiState]);\r\n\r\n\t// Effect to run when we pop-in or pop-out the notification center\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\r\n\t\t\t\t\tremovePoppedInClasses();\r\n\r\n\t\t\t\t\tconst centerWindowPosition = {\r\n\t\t\t\t\t\tleft: data.left - 25,\r\n\t\t\t\t\t\ttop: data.top + 25,\r\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\r\n\t\t\t\t\t\twidth: data.width,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\t\tposition: centerWindowPosition,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\taddPoppedInClasses();\r\n\t\t\t\t\tsetFullHeight(monitorInfo);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [uiState.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [uiState.showCenter]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetFilteredNotifications([...notifications]);\r\n\t}, [notifications]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenMuteStateChanged(error: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tsetReloadMuteFilters(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t// Sets the current active mute filters\r\n\tuseEffect(() => {\r\n\t\tasync function loadMuteFilter() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\r\n\t\t}\r\n\r\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\r\n\t\t\tsetMuteFilters(loadedMuteFilters);\r\n\t\t\tsetReloadMuteFilters(false);\r\n\t\t});\r\n\t}, [reloadMuteFilters]);\r\n\r\n\tconst notificationsMainView = () => (\r\n\t\t<>\r\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\r\n\t\t\t<DrawerControls />\r\n\t\t\t<div className=\"cards-container\">\r\n\t\t\t\t{viewMode === ViewMode.CARD ? (\r\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<ListView\r\n\t\t\t\t\t\tnotifications={notifications}\r\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\r\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n\r\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\r\n\r\n\treturn (\r\n\t\t<ConditionalWrapper\r\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</CSSTransition>\r\n\t\t\t)}\r\n\t\t>\r\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\r\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\r\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\r\n\t\t\t\t</Drawer>\r\n\t\t\t</NotificationsContext.Provider>\r\n\t\t</ConditionalWrapper>\r\n\t);\r\n};\r\n"]}
|
package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js
CHANGED
|
@@ -96,18 +96,19 @@ export const NotificationsToasts = (props) => {
|
|
|
96
96
|
}, []);
|
|
97
97
|
useEffect(() => {
|
|
98
98
|
moveToToolbarMonitor().then(() => {
|
|
99
|
+
var _a;
|
|
99
100
|
let forceHide = false;
|
|
100
101
|
if (activeNotifications(notifications).length === 0 &&
|
|
101
102
|
activeNotifications(notificationsRef.current).length === 0) {
|
|
102
103
|
forceHide = true;
|
|
103
104
|
}
|
|
104
105
|
notificationsRef.current = notifications;
|
|
105
|
-
const rect = document.getElementById("notifications-toasts")
|
|
106
|
+
const rect = (_a = document.getElementById("notifications-toasts")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
106
107
|
if (notifications.length === 0 || forceHide) {
|
|
107
108
|
if (config.isTransparent && !isMac) {
|
|
108
109
|
const roundedRect = {
|
|
109
|
-
x: Math.round(rect
|
|
110
|
-
y: Math.round(rect
|
|
110
|
+
x: Math.round(rect === null || rect === void 0 ? void 0 : rect.x),
|
|
111
|
+
y: Math.round(rect === null || rect === void 0 ? void 0 : rect.y),
|
|
111
112
|
width: 1,
|
|
112
113
|
height: 1,
|
|
113
114
|
};
|
|
@@ -119,10 +120,10 @@ export const NotificationsToasts = (props) => {
|
|
|
119
120
|
finsembleWindow.bringToFront();
|
|
120
121
|
if (config.isTransparent && !isMac) {
|
|
121
122
|
const roundedRect = {
|
|
122
|
-
x: Math.round(rect
|
|
123
|
-
y: Math.round(rect
|
|
124
|
-
width: Math.round(rect
|
|
125
|
-
height: Math.round(rect
|
|
123
|
+
x: Math.round(rect === null || rect === void 0 ? void 0 : rect.x),
|
|
124
|
+
y: Math.round(rect === null || rect === void 0 ? void 0 : rect.y),
|
|
125
|
+
width: Math.round(rect === null || rect === void 0 ? void 0 : rect.width),
|
|
126
|
+
height: Math.round(rect === null || rect === void 0 ? void 0 : rect.height),
|
|
126
127
|
};
|
|
127
128
|
finsembleWindow.show({}, () => {
|
|
128
129
|
FSBL.Clients.WindowClient.setShape([roundedRect]);
|
|
@@ -137,7 +138,7 @@ export const NotificationsToasts = (props) => {
|
|
|
137
138
|
}
|
|
138
139
|
const bounds = (await finsembleWindow.getBounds({}));
|
|
139
140
|
const width = bounds.data.right - bounds.data.left;
|
|
140
|
-
const height = Math.round(rect
|
|
141
|
+
const height = Math.round(rect === null || rect === void 0 ? void 0 : rect.height) + 6;
|
|
141
142
|
finsembleWindow.setBounds({
|
|
142
143
|
bounds: {
|
|
143
144
|
top: data["availableRect"]["top"],
|
|
@@ -155,6 +156,6 @@ export const NotificationsToasts = (props) => {
|
|
|
155
156
|
}
|
|
156
157
|
});
|
|
157
158
|
}, [notifications]);
|
|
158
|
-
return (React.createElement("div", null, notifications.map((notification) => (React.createElement(ToastCard, { key: `toast-card-${notification.id}`, notification: notification, informationalNotificationTimeout: informationalTimeout, actionableTimeoutEnabled: actionableTimeoutEnabled, removeFunction: removeNotification, isActiveFunction: isNotificationActive,
|
|
159
|
+
return (React.createElement("div", null, notifications.map((notification) => (React.createElement(ToastCard, Object.assign({ key: `toast-card-${notification.id}`, notification: notification, informationalNotificationTimeout: informationalTimeout, actionableTimeoutEnabled: actionableTimeoutEnabled, removeFunction: removeNotification, isActiveFunction: isNotificationActive }, props))))));
|
|
159
160
|
};
|
|
160
161
|
//# sourceMappingURL=NotificationsToasts.js.map
|
package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,OA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G,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;wBACnD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAgB,CAAC,GAAG,CAAC,CAAC;wBAEtD,eAAe,CAAC,SAAS,CACxB;4BACC,MAAM,EAAE;gCACP,GAAG,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC;gCACjC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK;gCAC5C,MAAM,EAAE,MAAM,GAAG,EAAE;gCACnB,KAAK,EAAE,KAAK;6BACZ;yBACD,EACD,CAAC,KAAU,EAAE,EAAE;4BACd,IAAI,KAAK,EAAE;gCACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;6BACrB;wBACF,CAAC,CACD,CAAC;oBACH,CAAC,CAAC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,IACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,KAClC,KAAK,GACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\"> </div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [uiState] = useNotificationUI();\r\n\r\n\tconst isNotificationActive = (notification: INotification): boolean => {\r\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\r\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\r\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CA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B,IAClC,KAAK,EACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\"> </div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [uiState] = useNotificationUI();\r\n\r\n\tconst isNotificationActive = (notification: INotification): boolean => {\r\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\r\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\r\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="finsemble-core" />
|
|
2
1
|
import React from "react";
|
|
3
|
-
import {
|
|
2
|
+
import { services } from "@finsemble/finsemble-core";
|
|
3
|
+
declare type INotification = services.notification.types.INotification;
|
|
4
4
|
export declare const CheckButton: React.FunctionComponent<{
|
|
5
5
|
notification: INotification;
|
|
6
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const CheckButton: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n}> = ({ notification }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { checkedNotifications } = notificationsContext;\r\n\tconst [isChecked, setIsChecked] = useState(false);\r\n\r\n\t// update isChecked value on action\r\n\tuseEffect(() => {\r\n\t\tif (checkedNotifications) {\r\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\r\n\t\t}\r\n\t}, [checkedNotifications]);\r\n\r\n\tconst checkNotification = () => {\r\n\t\tif (!isChecked) {\r\n\t\t\tcheckedNotifications.push(notification);\r\n\t\t} else {\r\n\t\t\tvar index = checkedNotifications.indexOf(notification);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tcheckedNotifications.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetIsChecked(!isChecked);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\r\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default CheckButton;\r\n"]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
const IconButton = ({ clickHandler = () => { }, tooltip, iconName = "ff-finsemble", classNames, children, }) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
children));
|
|
6
|
-
};
|
|
2
|
+
const IconButton = ({ clickHandler = () => { }, tooltip, iconName = "ff-finsemble", classNames, children, }) => (React.createElement("div", { className: `finsemble-icon__btn ${classNames ? classNames : ""}`, title: tooltip ? tooltip : "", onClick: () => clickHandler() },
|
|
3
|
+
React.createElement("i", { className: iconName }),
|
|
4
|
+
children));
|
|
7
5
|
export default IconButton;
|
|
8
6
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE,CAAC,CAChC,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;IAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;IACzB,QAAQ,CACJ,CACN,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\r\n\r\nexport interface IFinsembleIconButtonProps {\r\n\ttooltip?: string;\r\n\tclickHandler?: Function;\r\n\ticonName?: string;\r\n\tclassNames?: string;\r\n\tchildren?: React.ReactNode;\r\n}\r\n\r\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\r\n\tclickHandler = () => {},\r\n\ttooltip,\r\n\ticonName = \"ff-finsemble\",\r\n\tclassNames,\r\n\tchildren,\r\n}: IFinsembleIconButtonProps) => (\r\n\t<div\r\n\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\r\n\t\ttitle={tooltip ? tooltip : \"\"}\r\n\t\tonClick={() => clickHandler()}\r\n\t>\r\n\t\t<i className={iconName} />\r\n\t\t{children}\r\n\t</div>\r\n);\r\n\r\nexport default IconButton;\r\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/// <reference types="finsemble-core" />
|
|
2
1
|
import React from "react";
|
|
3
|
-
import {
|
|
2
|
+
import { services } from "@finsemble/finsemble-core";
|
|
3
|
+
declare type INotification = services.notification.types.INotification;
|
|
4
4
|
export declare type NotificationCardPropType = {
|
|
5
5
|
notification: INotification;
|
|
6
6
|
uiContext: "toasts" | "center";
|
|
7
7
|
removeNotification: Function;
|
|
8
8
|
};
|
|
9
9
|
export declare const NotificationCardShell: React.FunctionComponent<NotificationCardPropType>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAuBzF,MAAM,CAAC,MAAM,qBAAqB,GAAsD,CAAC,EACxF,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,MAAM,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEzF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC,CAAC;IACtG,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CACnD,gBAAgB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAChE,CAAC;IAGF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,UAAU,2BAA2B;YACzC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;QAC/D,CAAC;QAED,2BAA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AAC,CAAC,CAAC,EAAE,EAAE,IAE7D,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\r\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\r\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\r\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\r\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IPerformedAction = services.notification.types.IPerformedAction;\r\n\r\nexport type NotificationCardPropType = {\r\n\t/**\r\n\t * The Notification to be displayed\r\n\t */\r\n\tnotification: INotification;\r\n\r\n\t/**\r\n\t * Which UI context the Card is being used in\r\n\t */\r\n\tuiContext: \"toasts\" | \"center\";\r\n\r\n\t/**\r\n\t * The internal function that will be called on toasts when dismissed or marked as read\r\n\t */\r\n\tremoveNotification: Function;\r\n};\r\n\r\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\r\n\tnotification,\r\n\tuiContext,\r\n\tremoveNotification,\r\n\tchildren,\r\n}) => {\r\n\tconst { isRead } = notification;\r\n\r\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\r\n\r\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\r\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\r\n\t);\r\n\r\n\t// Sets the current default preference\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\r\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\r\n\t\t});\r\n\t}, []);\r\n\r\n\t// Listens for preferences change\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (\r\n\t\t\t\t\tdata.notificationPreferences &&\r\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\r\n\t\t\t\t) {\r\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isNewTimerId: any;\r\n\t\tif (isNew) {\r\n\t\t\tif (notification.isRead) {\r\n\t\t\t\tsetIsNew(false);\r\n\t\t\t\tclearTimeout(isNewTimerId);\r\n\t\t\t} else {\r\n\t\t\t\tisNewTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetIsNew(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isNewTimerId);\r\n\t\t};\r\n\t}, [isNew, notification]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isRenotificationTimerId: any;\r\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\r\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\r\n\t\t\tif (mostRecentAction) {\r\n\t\t\t\tsetWokeFromSnooze(true);\r\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetWokeFromSnooze(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetWokeFromSnooze(false);\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t};\r\n\t}, [newNotificationHaloPeriodSeconds, notification]);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \r\n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\r\n\t\t>\r\n\t\t\t{children ? (\r\n\t\t\t\tchildren\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<NotificationCardHeaderShell\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tremoveNotification={removeNotification}\r\n\t\t\t\t\t\tuiContext={uiContext}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import { INotification } from "common/notifications/definitions/INotification";
|
|
3
2
|
import { OverFlowMenuAction } from "../../types";
|
|
3
|
+
import { services } from "@finsemble/finsemble-core";
|
|
4
|
+
declare type INotification = services.notification.types.INotification;
|
|
4
5
|
export declare const OverflowMenuActions: {
|
|
5
6
|
[key: string]: OverFlowMenuAction;
|
|
6
7
|
};
|
|
@@ -69,18 +69,19 @@ export const renderOverflowMenuAction = (notification, menuAction, isMuted) => {
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
return (React.createElement("div", { key: `${notification.id}_${menuAction.name}`, className: "overflow-menu__action", onClick: () => {
|
|
72
|
-
menuAction
|
|
73
|
-
} },
|
|
74
|
-
menuAction
|
|
75
|
-
React.createElement("span", { className: "btn-label" }, menuAction
|
|
72
|
+
menuAction === null || menuAction === void 0 ? void 0 : menuAction.action(notification);
|
|
73
|
+
} }, menuAction === null || menuAction === void 0 ? void 0 :
|
|
74
|
+
menuAction.icon,
|
|
75
|
+
React.createElement("span", { className: "btn-label" }, menuAction === null || menuAction === void 0 ? void 0 : menuAction.label)));
|
|
76
76
|
};
|
|
77
77
|
const OverflowMenu = ({ closeSelf, children }) => {
|
|
78
78
|
const wrapperRef = useRef(null);
|
|
79
79
|
const [className, setClassName] = useState("overflow-menu__container");
|
|
80
80
|
useOutsideClickDetector(wrapperRef, () => closeSelf(false));
|
|
81
81
|
const moveElementIntoView = () => {
|
|
82
|
+
var _a;
|
|
82
83
|
const bottomViewPort = window.innerHeight + window.scrollY;
|
|
83
|
-
const domRect = wrapperRef
|
|
84
|
+
const domRect = (_a = wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
84
85
|
const elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;
|
|
85
86
|
if (elementBottom && elementBottom > bottomViewPort) {
|
|
86
87
|
setClassName("overflow-menu__container flow-up");
|