@finsemble/finsemble-ui 6.6.3 → 7.0.0-beta-X
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 +31 -43
- package/react/actions/favoriteActions.d.ts +1 -0
- package/react/actions/favoriteActions.js +1 -0
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/menuActions.d.ts +1 -0
- package/react/actions/menuActions.js +1 -0
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.d.ts +1 -0
- package/react/actions/rootActions.js +1 -0
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.d.ts +1 -0
- package/react/actions/searchActions.js +1 -0
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +34 -0
- package/react/actions/toolbarActions.js +17 -0
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.d.ts +1 -0
- package/react/actions/workspaceActions.js +1 -0
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +22 -19
- package/react/assets/css/appCatalog.css +67 -72
- package/react/assets/css/authentication.css +4 -3
- package/react/assets/css/button.css +4 -11
- package/react/assets/css/core/formElements.css +1 -1
- package/react/assets/css/core/icons.css +3 -2
- package/react/assets/css/core/notifications.css +2 -2
- package/react/assets/css/core/windowFrame.css +9 -9
- package/react/assets/css/dashbar.css +1 -1
- package/react/assets/css/defaultTheme.css +9 -53
- package/react/assets/css/dialogs.css +13 -11
- package/react/assets/css/favorites.css +3 -48
- package/react/assets/css/finsemble.css +6 -2
- package/react/assets/css/font-finance.css +233 -120
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +10 -10
- package/react/assets/css/linkerWindow.css +15 -3
- package/react/assets/css/menus.css +12 -12
- package/react/assets/css/notificationsCenter.css +49 -33
- package/react/assets/css/processMonitor.css +7 -4
- package/react/assets/css/search.css +1 -1
- package/react/assets/css/shared/animations.css +10 -4
- package/react/assets/css/shared/common.css +40 -0
- package/react/assets/css/tags.css +10 -10
- package/react/assets/css/toolbar.css +22 -19
- package/react/assets/css/userPreferences.css +29 -26
- package/react/assets/css/windowTitleBar.css +86 -40
- package/react/assets/icons/server.svg +26 -0
- package/react/componentTemplateGenerator.js +3 -2
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.d.ts +7 -0
- package/react/components/FinsembleProvider.js +2 -0
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.d.ts +4 -0
- package/react/components/appCatalog/AppCatalog.js +4 -0
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +58 -0
- package/react/components/appCatalog/AppCatalogComponent.js +70 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.d.ts +35 -0
- package/react/components/appCatalog/components/AppCard.js +42 -0
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -0
- package/react/components/appCatalog/components/AppResults.js +24 -0
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.d.ts +26 -0
- package/react/components/appCatalog/components/Carousel.js +34 -0
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +4 -0
- package/react/components/appCatalog/components/EmptyResults.js +8 -0
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +15 -0
- package/react/components/appCatalog/components/Hero.js +15 -0
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +6 -4
- package/react/components/appCatalog/components/Home.js +10 -0
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +31 -0
- package/react/components/appCatalog/components/SearchBar.js +33 -0
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js +9 -0
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js +15 -0
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.d.ts +17 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +25 -0
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/Header.js +12 -0
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +7 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js +11 -0
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js +10 -0
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +6 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js +11 -0
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.d.ts +5 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js +9 -0
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -0
- package/react/components/appCatalog/components/Tag.js +10 -0
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -0
- package/react/components/appCatalog/components/Toast.js +9 -0
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +1 -0
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js +5 -0
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +37 -0
- package/react/components/appCatalog/modules/FDC3.js +40 -0
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js +1 -0
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.d.ts +91 -0
- package/react/components/appCatalog/stores/storeActions.js +116 -1
- package/react/components/appCatalog/stores/storeActions.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/ButtonRow.js +2 -2
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +3 -3
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.d.ts +5 -0
- package/react/components/common/ColorPicker.js +56 -15
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +11 -0
- package/react/components/common/DropZone.js +21 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.d.ts +4 -0
- package/react/components/common/DropdownButton.js +4 -0
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/ErrorBoundary.d.ts +34 -0
- package/react/components/common/ErrorBoundary.js +43 -0
- package/react/components/common/ErrorBoundary.js.map +1 -0
- package/react/components/common/FileInput.d.ts +8 -1
- package/react/components/common/FileInput.js +19 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +13 -2
- package/react/components/common/FinsembleIcon.js +61 -5
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleLink.d.ts +6 -0
- package/react/components/common/FinsembleLink.js +12 -0
- package/react/components/common/FinsembleLink.js.map +1 -0
- package/react/components/common/FinsembleSelect.js +5 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.d.ts +1 -2
- package/react/components/common/FinsembleToggle.js +2 -6
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FinsembleToggleButtonBar.d.ts +13 -0
- package/react/components/common/FinsembleToggleButtonBar.js +44 -0
- package/react/components/common/FinsembleToggleButtonBar.js.map +1 -0
- package/react/components/common/InputTable.d.ts +10 -3
- package/react/components/common/InputTable.js +20 -13
- package/react/components/common/InputTable.js.map +1 -1
- package/react/components/common/Tab.js +36 -5
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/TimeSelect.js +34 -3
- package/react/components/common/TimeSelect.js.map +1 -1
- package/react/components/common/Tooltip.js +2 -0
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/FinsembleToggle.css +22 -0
- package/react/components/common/css/accordion.css +9 -6
- package/react/components/common/css/application-edit-page.css +48 -45
- package/react/components/common/css/button.css +10 -5
- package/react/components/common/css/color-picker.css +3 -3
- package/react/components/common/css/drop-zone.css +2 -6
- package/react/components/common/css/file-input.css +5 -5
- package/react/components/common/css/header.css +3 -2
- package/react/components/common/css/icon.css +1 -1
- package/react/components/common/css/loading-spinner.css +7 -12
- package/react/components/common/css/selector.css +4 -4
- package/react/components/common/css/styles.css +22 -16
- package/react/components/common/css/tab.css +14 -14
- package/react/components/common/css/time-select.css +2 -1
- package/react/components/common/css/toggle.css +4 -12
- package/react/components/common/css/tooltip.css +2 -3
- package/react/components/common/file_helpers.js +2 -0
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +12 -1
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +9 -11
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +3 -1
- package/react/components/common/stories/FileInput.stories.js +12 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.d.ts +1 -2
- package/react/components/common/stories/FinsembleToggle.stories.js +0 -7
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.d.ts +14 -0
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.js +97 -0
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.js.map +1 -0
- package/react/components/common/stories/InputTable.stories.d.ts +4 -3
- package/react/components/common/stories/InputTable.stories.js +18 -8
- package/react/components/common/stories/InputTable.stories.js.map +1 -1
- package/react/components/common/tests/Accordion.spec.js +6 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -1
- package/react/components/common/tests/ButtonRow.spec.js +5 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +1 -0
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -0
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +1 -0
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +22 -0
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +1 -0
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +2 -6
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.d.ts +1 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +41 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -0
- package/react/components/common/tests/InputTable.spec.js +3 -3
- package/react/components/common/tests/InputTable.spec.js.map +1 -1
- package/react/components/common/tests/TimeSelect.spec.js +4 -0
- package/react/components/common/tests/TimeSelect.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +16 -0
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +8 -0
- package/react/components/favorites/FavoriteMaker.js +10 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.d.ts +4 -0
- package/react/components/favorites/FavoritesShell.js +13 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +3 -0
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +12 -7
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +16 -3
- package/react/components/fdc3Resolver/ResolverDialog.js +7 -2
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +3 -2
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +2 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.d.ts +14 -1
- package/react/components/icon/Icon.js +42 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.d.ts +4 -0
- package/react/components/legacyControls/FinsembleDialog.js +16 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogButton.js +6 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.d.ts +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js +7 -0
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js +14 -0
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.d.ts +19 -0
- package/react/components/legacyControls/FinsembleDnDContext.js +133 -8
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.d.ts +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js +3 -0
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.d.ts +15 -0
- package/react/components/legacyControls/FinsembleHoverDetector.js +26 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.d.ts +4 -0
- package/react/components/legacyControls/FinsembleMenuSection.js +38 -0
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -0
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.d.ts +3 -0
- package/react/components/linker/LinkerMenu.js +21 -0
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.d.ts +3 -0
- package/react/components/linker/LinkerMenuDeprecated.js +9 -0
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/remoteRedux.js +1 -0
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +15 -0
- package/react/components/menu/Menu.js +15 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +7 -0
- package/react/components/menu/MenuAutoResizer.js +27 -0
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.d.ts +4 -0
- package/react/components/menu/MenuContent.js +4 -0
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.d.ts +14 -0
- package/react/components/menu/MenuHotKey.js +15 -0
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.d.ts +8 -0
- package/react/components/menu/MenuItem.js +13 -2
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +125 -24
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +16 -0
- package/react/components/menu/MenuShell.js +26 -0
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.d.ts +3 -0
- package/react/components/menu/MenuToggle.js +5 -2
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/keyboardNavigation.d.ts +13 -22
- package/react/components/menu/keyboardNavigation.js +165 -160
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +6 -0
- package/react/components/menu/menuContext.js +6 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +22 -0
- package/react/components/menu/menuHelpers.js +58 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +47 -25
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +5 -0
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +37 -6
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +3 -0
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js +19 -8
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +9 -0
- package/react/components/notifications/components/shared/NotificationCardShell.js +15 -7
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +4 -0
- package/react/components/notifications/components/shared/OverflowMenu.js +16 -2
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js +2 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +8 -3
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +11 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/notificationsContext.d.ts +4 -0
- package/react/components/notifications/notificationsContext.js +4 -0
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.d.ts +6 -0
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +4 -0
- package/react/components/notifications/utils.js +4 -0
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -0
- package/react/components/processMonitor/ProcessMonitor.js +21 -3
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.d.ts +3 -0
- package/react/components/processMonitor/components/ChildWindow.js +5 -0
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +5 -0
- package/react/components/processMonitor/components/ListHeader.js +7 -0
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +12 -3
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js +6 -0
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +13 -0
- package/react/components/processMonitor/helpers.js +27 -6
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js +7 -3
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +39 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +50 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +3 -0
- package/react/components/quickComponentForm/QuickComponentForm.js +20 -0
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +1 -1
- package/react/components/sdd/AddApp.d.ts +7 -4
- package/react/components/sdd/AddApp.js +144 -34
- package/react/components/sdd/AddApp.js.map +1 -1
- package/react/components/sdd/AppEditAccess.d.ts +4 -3
- package/react/components/sdd/AppEditAccess.js +8 -0
- package/react/components/sdd/AppEditAccess.js.map +1 -1
- package/react/components/sdd/AppEditPage.d.ts +6 -4
- package/react/components/sdd/AppEditPage.js +205 -393
- package/react/components/sdd/AppEditPage.js.map +1 -1
- package/react/components/sdd/Appearance.css +1 -1
- package/react/components/sdd/Appearance.d.ts +2 -1
- package/react/components/sdd/Appearance.js +18 -7
- package/react/components/sdd/Appearance.js.map +1 -1
- package/react/components/sdd/Application.d.ts +5 -4
- package/react/components/sdd/Application.js +94 -44
- package/react/components/sdd/Application.js.map +1 -1
- package/react/components/sdd/Applications.d.ts +12 -11
- package/react/components/sdd/Applications.js +110 -15
- package/react/components/sdd/Applications.js.map +1 -1
- package/react/components/sdd/AssetsPage.css +3 -3
- package/react/components/sdd/Authentication.js +1 -6
- package/react/components/sdd/Authentication.js.map +1 -1
- package/react/components/sdd/AuthenticationProviderConfig.js +5 -3
- package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/sdd/EditPreload.d.ts +4 -3
- package/react/components/sdd/EditPreload.js +49 -22
- package/react/components/sdd/EditPreload.js.map +1 -1
- package/react/components/sdd/Export.d.ts +7 -6
- package/react/components/sdd/Export.js +4 -3
- package/react/components/sdd/Export.js.map +1 -1
- package/react/components/sdd/ExportCloud.js +4 -0
- package/react/components/sdd/ExportCloud.js.map +1 -1
- package/react/components/sdd/GettingStarted.js +3 -3
- package/react/components/sdd/GettingStarted.js.map +1 -1
- package/react/components/sdd/Navigation.js +28 -4
- package/react/components/sdd/Navigation.js.map +1 -1
- package/react/components/sdd/OptionalSettingsView.d.ts +6 -5
- package/react/components/sdd/OptionalSettingsView.js +2 -10
- package/react/components/sdd/OptionalSettingsView.js.map +1 -1
- package/react/components/sdd/ProjectErrors.js +1 -1
- package/react/components/sdd/ProjectErrors.js.map +1 -1
- package/react/components/sdd/Publish.js +4 -2
- package/react/components/sdd/Publish.js.map +1 -1
- package/react/components/sdd/PublishProgress.js +11 -1
- package/react/components/sdd/PublishProgress.js.map +1 -1
- package/react/components/sdd/SmartDesktopDesigner.d.ts +17 -16
- package/react/components/sdd/SmartDesktopDesigner.js +54 -34
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
- package/react/components/sdd/ThemePage.css +6 -23
- package/react/components/sdd/ThemePage.js +8 -5
- package/react/components/sdd/ThemePage.js.map +1 -1
- package/react/components/sdd/Themes.d.ts +2 -1
- package/react/components/sdd/Themes.js +4 -2
- package/react/components/sdd/Themes.js.map +1 -1
- package/react/components/sdd/Toolbar.d.ts +5 -4
- package/react/components/sdd/Toolbar.js +18 -9
- package/react/components/sdd/Toolbar.js.map +1 -1
- package/react/components/sdd/appEditPage/Behavior.d.ts +34 -0
- package/react/components/sdd/appEditPage/Behavior.js +134 -0
- package/react/components/sdd/appEditPage/Behavior.js.map +1 -0
- package/react/components/sdd/appEditPage/Component.d.ts +22 -0
- package/react/components/sdd/appEditPage/Component.js +76 -0
- package/react/components/sdd/appEditPage/Component.js.map +1 -0
- package/react/components/sdd/appEditPage/DebugToolkit.d.ts +9 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js +20 -0
- package/react/components/sdd/appEditPage/DebugToolkit.js.map +1 -0
- package/react/components/sdd/appEditPage/Interop.d.ts +10 -0
- package/react/components/sdd/appEditPage/Interop.js +40 -0
- package/react/components/sdd/appEditPage/Interop.js.map +1 -0
- package/react/components/sdd/appEditPage/Position.d.ts +18 -0
- package/react/components/sdd/appEditPage/Position.js +72 -0
- package/react/components/sdd/appEditPage/Position.js.map +1 -0
- package/react/components/sdd/appEditPage/Preloads.d.ts +9 -0
- package/react/components/sdd/appEditPage/Preloads.js +16 -0
- package/react/components/sdd/appEditPage/Preloads.js.map +1 -0
- package/react/components/sdd/appEditPage/SelectConnect.d.ts +15 -0
- package/react/components/sdd/appEditPage/SelectConnect.js +28 -0
- package/react/components/sdd/appEditPage/SelectConnect.js.map +1 -0
- package/react/components/sdd/appEditPage/Workspace.d.ts +12 -0
- package/react/components/sdd/appEditPage/Workspace.js +30 -0
- package/react/components/sdd/appEditPage/Workspace.js.map +1 -0
- package/react/components/sdd/common/getCSSVars.js +7 -2
- package/react/components/sdd/common/getCSSVars.js.map +1 -1
- package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -1
- package/react/components/sdd/common/setPreloadDefaults.js +9 -4
- package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
- package/react/components/sdd/common/views.js +7 -4
- package/react/components/sdd/common/views.js.map +1 -1
- package/react/components/sdd/css/addApp.css +65 -0
- package/react/components/sdd/css/appearance.css +6 -0
- package/react/components/sdd/css/applications.css +27 -34
- package/react/components/sdd/css/authentication.css +7 -6
- package/react/components/sdd/css/buttons.css +1 -1
- package/react/components/sdd/css/export.css +5 -3
- package/react/components/sdd/css/getting-started.css +2 -2
- package/react/components/sdd/css/nav.css +11 -14
- package/react/components/sdd/css/project-header.css +5 -7
- package/react/components/sdd/css/styles.css +29 -23
- package/react/components/sdd/css/views.css +4 -3
- package/react/components/sdd/fixtures/apps.js +12 -0
- package/react/components/sdd/fixtures/apps.js.map +1 -1
- package/react/components/sdd/fixtures/authenticationProps.js +15 -1
- package/react/components/sdd/fixtures/authenticationProps.js.map +1 -1
- package/react/components/sdd/fixtures/configTemplate.js +1 -0
- package/react/components/sdd/fixtures/configTemplate.js.map +1 -1
- package/react/components/sdd/fixtures/preloads.js +14 -12
- package/react/components/sdd/fixtures/preloads.js.map +1 -1
- package/react/components/sdd/fixtures/publishProgress.js +40 -0
- package/react/components/sdd/fixtures/publishProgress.js.map +1 -1
- package/react/components/sdd/sdd_helpers.d.ts +6 -0
- package/react/components/sdd/sdd_helpers.js +6 -0
- package/react/components/sdd/sdd_helpers.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.d.ts +466 -0
- package/react/components/sdd/smartDesktopClient.js +906 -0
- package/react/components/sdd/smartDesktopClient.js.map +1 -0
- package/react/components/sdd/smartDesktopClient.spec.d.ts +1 -0
- package/react/components/sdd/smartDesktopClient.spec.js +64 -0
- package/react/components/sdd/smartDesktopClient.spec.js.map +1 -0
- package/react/components/sdd/stories/AddApp.stories.d.ts +11 -0
- package/react/components/sdd/stories/AddApp.stories.js +26 -0
- package/react/components/sdd/stories/AddApp.stories.js.map +1 -0
- package/react/components/sdd/stories/AppEditPage.stories.d.ts +5 -1
- package/react/components/sdd/stories/AppEditPage.stories.js +5 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/sdd/stories/Appearance.stories.d.ts +1 -1
- package/react/components/sdd/stories/Appearance.stories.js +2 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
- package/react/components/sdd/stories/Authentication.stories.js +2 -16
- package/react/components/sdd/stories/Authentication.stories.js.map +1 -1
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +1 -1
- package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -1
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.d.ts +1 -1
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js +3 -0
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/sdd/stories/Themes.stories.d.ts +1 -1
- package/react/components/sdd/stories/Themes.stories.js +1 -0
- package/react/components/sdd/stories/Themes.stories.js.map +1 -1
- package/react/components/sdd/tests/AddApp.spec.d.ts +1 -0
- package/react/components/sdd/tests/AddApp.spec.js +133 -0
- package/react/components/sdd/tests/AddApp.spec.js.map +1 -0
- package/react/components/sdd/tests/AppEditPage.spec.js +108 -23
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/sdd/tests/Application.spec.js +351 -369
- package/react/components/sdd/tests/Application.spec.js.map +1 -1
- package/react/components/sdd/tests/Applications.spec.d.ts +1 -1
- package/react/components/sdd/tests/Applications.spec.js +30 -50
- package/react/components/sdd/tests/Applications.spec.js.map +1 -1
- package/react/components/sdd/tests/Authentication.spec.js +8 -1
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
- package/react/components/sdd/tests/ContentHeader.spec.js +2 -0
- package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -1
- package/react/components/sdd/tests/EditPreload.spec.js +63 -7
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
- package/react/components/sdd/tests/Export.spec.js +8 -1
- package/react/components/sdd/tests/Export.spec.js.map +1 -1
- package/react/components/sdd/tests/ItemList.spec.js +4 -0
- package/react/components/sdd/tests/ItemList.spec.js.map +1 -1
- package/react/components/sdd/tests/Navigation.spec.js +2 -2
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
- package/react/components/sdd/tests/OptionalSettingsView.spec.js +264 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js +3 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +2 -2
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/sdd/tests/Themes.spec.js +1 -1
- package/react/components/sdd/tests/Themes.spec.js.map +1 -1
- package/react/components/sdd/tests/Toolbar.spec.js +53 -0
- package/react/components/sdd/tests/Toolbar.spec.js.map +1 -1
- package/react/components/sdd/tests/a11y_helper.js +8 -0
- package/react/components/sdd/tests/a11y_helper.js.map +1 -1
- package/react/components/search/Highlight.d.ts +6 -0
- package/react/components/search/Highlight.js +19 -0
- package/react/components/search/Highlight.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 +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.d.ts +4 -0
- package/react/components/search/SearchBestMatch.js +11 -0
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.d.ts +5 -0
- package/react/components/search/SearchInput.js +6 -0
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +2 -0
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.d.ts +5 -0
- package/react/components/search/SearchResult.js +6 -0
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResult.spec.d.ts +1 -0
- package/react/components/search/SearchResult.spec.js +46 -0
- package/react/components/search/SearchResult.spec.js.map +1 -0
- package/react/components/search/SearchResult.stories.d.ts +16 -0
- package/react/components/search/SearchResult.stories.js +113 -0
- package/react/components/search/SearchResult.stories.js.map +1 -0
- package/react/components/search/SearchResults.js +5 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/SearchResults.spec.d.ts +1 -0
- package/react/components/search/SearchResults.spec.js +35 -0
- package/react/components/search/SearchResults.spec.js.map +1 -0
- package/react/components/search/SearchResults.stories.d.ts +11 -0
- package/react/components/search/SearchResults.stories.js +458 -0
- package/react/components/search/SearchResults.stories.js.map +1 -0
- package/react/components/shared/Animate.d.ts +5 -0
- package/react/components/shared/Animate.js +12 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +26 -6
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +0 -4
- package/react/components/shared/Tag.js +4 -0
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +6 -0
- package/react/components/shared/TagsMenu.js +7 -0
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.d.ts +6 -0
- package/react/components/shared/addProtocolToValidURL.js +6 -0
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.d.ts +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js +4 -4
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js +12 -0
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js +1 -0
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/validateURL.d.ts +18 -0
- package/react/components/shared/validateURL.js +24 -5
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.d.ts +3 -0
- package/react/components/singleInputDialog/SingleInputDialog.js +46 -0
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js +2 -2
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -16
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +5 -3
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/system/System.d.ts +22 -0
- package/react/components/system/System.js +23 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.stories.js +1 -0
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.d.ts +6 -0
- package/react/components/system/SystemTrayComponentShell.js +9 -0
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/AutoArrange.d.ts +5 -0
- package/react/components/toolbar/AutoArrange.js +8 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/AutoArrange.spec.js +10 -4
- package/react/components/toolbar/AutoArrange.spec.js.map +1 -1
- package/react/components/toolbar/AutoArrange.stories.js +1 -0
- package/react/components/toolbar/AutoArrange.stories.js.map +1 -1
- package/react/components/toolbar/DragHandle.d.ts +4 -0
- package/react/components/toolbar/DragHandle.js +11 -0
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/DragHandle.spec.js +1 -0
- package/react/components/toolbar/DragHandle.spec.js.map +1 -1
- package/react/components/toolbar/DragHandle.stories.js +1 -0
- package/react/components/toolbar/DragHandle.stories.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.d.ts +4 -0
- package/react/components/toolbar/MinimizeAll.js +7 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +1 -0
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js +1 -0
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.d.ts +5 -0
- package/react/components/toolbar/NotificationControl.js +8 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.d.ts +4 -0
- package/react/components/toolbar/RevealAll.js +7 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +1 -0
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js +1 -0
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/SddButton.d.ts +4 -0
- package/react/components/toolbar/SddButton.js +4 -0
- package/react/components/toolbar/SddButton.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.d.ts +4 -0
- package/react/components/toolbar/ToolbarIcon.js +6 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.d.ts +8 -9
- package/react/components/toolbar/ToolbarSection.js +21 -7
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.d.ts +5 -0
- package/react/components/toolbar/ToolbarShell.js +7 -0
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +20 -0
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +52 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +58 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +27 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +49 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +13 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +14 -0
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +19 -0
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +16 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +39 -0
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +4 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +9 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +3 -0
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +6 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +7 -0
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js +5 -0
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +37 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +40 -0
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +3 -0
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +83 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +10 -0
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +12 -3
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +18 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +20 -0
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +9 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +12 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +3 -0
- package/react/components/toolbar/appLauncher/components/componentList.js +17 -3
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +6 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +26 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +91 -15
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +5 -0
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +8 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +7 -0
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +17 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +21 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +26 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +29 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +6 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +6 -0
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +78 -2
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +191 -40
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +8 -18
- package/react/components/userPreferences/NotificationsPreferencesContext.d.ts +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js +4 -0
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -0
- package/react/components/userPreferences/UserPreferences.d.ts +8 -0
- package/react/components/userPreferences/UserPreferences.js +8 -0
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js +4 -0
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.d.ts +5 -0
- package/react/components/userPreferences/components/ContentSection.js +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +4 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js +3 -0
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +3 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +14 -2
- package/react/components/userPreferences/components/content/Workspaces.js +78 -38
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +7 -3
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +3 -0
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledClose.js +26 -5
- package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +20 -10
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +18 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js +35 -6
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js +15 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +1 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/UserPreferencesBase.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/UserPreferencesBase.spec.js +42 -0
- package/react/components/userPreferences/tests/UserPreferencesBase.spec.js.map +1 -0
- package/react/components/userPreferences/tests/Workspace.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/Workspace.spec.js +139 -0
- package/react/components/userPreferences/tests/Workspace.spec.js.map +1 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +130 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +386 -27
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js +3 -0
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +90 -0
- package/react/components/windowTitleBar/components/center/TabList.js +170 -4
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.d.ts +9 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +27 -5
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +47 -0
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +76 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts +4 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +5 -0
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +18 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +49 -0
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +17 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js +39 -0
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +4 -0
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js +27 -0
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +37 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js +40 -0
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +46 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +54 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js +26 -0
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +40 -0
- package/react/components/windowTitleBar/components/windowTitle.js +245 -48
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +5 -0
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +81 -6
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +1 -1
- package/react/components/yesNoDialog/YesNoDialog.d.ts +3 -0
- package/react/components/yesNoDialog/YesNoDialog.js +64 -1
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +4 -0
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js +2 -2
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/timer.js +2 -0
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +10 -0
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/useDashbar.js +10 -0
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useDeepEffect.d.ts +4 -0
- package/react/hooks/useDeepEffect.js +21 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.d.ts +15 -0
- package/react/hooks/useFavorites.js +3 -0
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.d.ts +4 -0
- package/react/hooks/useFavoritesShell.js +23 -0
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.d.ts +6 -0
- package/react/hooks/useHotkey.js +9 -0
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js +14 -0
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.d.ts +29 -0
- package/react/hooks/useMenu.js +12 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +44 -0
- package/react/hooks/useNotifications.js +104 -12
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.d.ts +3 -0
- package/react/hooks/useOutsideClickDetector.js +3 -0
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.d.ts +17 -0
- package/react/hooks/usePubSub.js +18 -0
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.d.ts +5 -0
- package/react/hooks/useSearch.js +30 -0
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.d.ts +1 -1
- package/react/hooks/useToolbar.js +54 -2
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/reducers/favoriteReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.d.ts +3 -0
- package/react/reducers/linkerReducer.js +4 -0
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.d.ts +28 -0
- package/react/reducers/menuReducer.js +34 -0
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +2 -2
- package/react/reducers/rootReducer.js +3 -0
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.d.ts +7 -0
- package/react/reducers/searchReducer.js +6 -0
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js +1 -0
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +8 -4
- package/react/store.js +11 -0
- package/react/store.js.map +1 -1
- package/react/tsconfig.tsbuildinfo +1 -0
- package/react/types/fdc3.d.ts +2 -0
- package/react/types/linkerTypes.d.ts +13 -0
- package/react/types/linkerTypes.js +1 -0
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +8 -0
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/workspaceTypes.d.ts +8 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
1
|
+
import React, { useContext, useEffect } from "react";
|
|
2
|
+
// Context
|
|
2
3
|
import { NotificationsContext } from "../../notificationsContext";
|
|
3
4
|
import { ViewMode, SelectionMode } from "../../constants";
|
|
5
|
+
// Hooks
|
|
4
6
|
import { markNotificationsRead, markNotificationsUnread, dismissNotification, snoozeNotifications, } from "../../../../hooks/useNotifications";
|
|
7
|
+
// Components
|
|
5
8
|
import IconButton from "../shared/IconButton";
|
|
6
9
|
const DrawerControls = () => {
|
|
7
10
|
const notificationsContext = useContext(NotificationsContext);
|
|
8
|
-
const { viewMode, setViewMode, drawerControlProps, setDrawerControlProps, selectionMode, setSelectionMode, checkedNotifications, } = notificationsContext;
|
|
11
|
+
const { viewMode, setViewMode, drawerControlProps, setDrawerControlProps, selectionMode, isSelectAll, setSelectAll, setSelectionMode, checkedNotifications, setCheckedNotifications, } = notificationsContext;
|
|
9
12
|
const toggleControl = (clickedControl) => {
|
|
13
|
+
// If we click on the control aready active, then there's nothing to toggle and we bail out.
|
|
10
14
|
if (clickedControl.action === drawerControlProps.active)
|
|
11
15
|
return;
|
|
12
16
|
drawerControlProps.controls.forEach((control) => {
|
|
@@ -32,22 +36,37 @@ const DrawerControls = () => {
|
|
|
32
36
|
const toggleSelect = () => {
|
|
33
37
|
setSelectionMode(selectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION);
|
|
34
38
|
};
|
|
39
|
+
const toggleSelectAll = () => {
|
|
40
|
+
if (isSelectAll) {
|
|
41
|
+
// this variable is a toggle, therefore
|
|
42
|
+
// if we are currently in select all mode
|
|
43
|
+
// means we are about to unselect all (as in a batch action)
|
|
44
|
+
setCheckedNotifications([]);
|
|
45
|
+
}
|
|
46
|
+
setSelectAll(!isSelectAll);
|
|
47
|
+
};
|
|
35
48
|
const readChecked = () => {
|
|
36
49
|
markNotificationsRead(checkedNotifications);
|
|
37
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
38
50
|
};
|
|
39
51
|
const unreadChecked = () => {
|
|
40
52
|
markNotificationsUnread(checkedNotifications);
|
|
41
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
42
53
|
};
|
|
43
54
|
const hideChecked = () => {
|
|
44
55
|
dismissNotification(checkedNotifications);
|
|
45
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
46
56
|
};
|
|
47
57
|
const snoozeChecked = () => {
|
|
48
58
|
snoozeNotifications(checkedNotifications);
|
|
49
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
50
59
|
};
|
|
60
|
+
const isSelectionMode = selectionMode === SelectionMode.SELECTION;
|
|
61
|
+
const selectAllControlStyle = `notifications-center-controls__filter-btn ${isSelectAll ? "active" : ""} ${isSelectionMode ? "visible" : "invisible"}`;
|
|
62
|
+
const controlClassname = `notifications-center-controls__filter-btn ${isSelectionMode ? "visible" : "invisible"} ${checkedNotifications.length ? "enabled" : "disabled"}`;
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
// unchecks "Select All"
|
|
65
|
+
if (selectionMode === SelectionMode.NO_SELECTION) {
|
|
66
|
+
setSelectAll(false);
|
|
67
|
+
checkedNotifications.length = 0;
|
|
68
|
+
}
|
|
69
|
+
}, [selectionMode, checkedNotifications]);
|
|
51
70
|
return (React.createElement("div", { id: "notifications-center-controls" },
|
|
52
71
|
React.createElement("div", { className: "notifications-center-controls__row" }, renderControls()),
|
|
53
72
|
React.createElement("div", { className: "notifications-center-controls__row" },
|
|
@@ -56,40 +75,43 @@ const DrawerControls = () => {
|
|
|
56
75
|
toggleSelect();
|
|
57
76
|
}
|
|
58
77
|
} },
|
|
59
|
-
React.createElement("i", { className:
|
|
60
|
-
paddingRight: "5px",
|
|
61
|
-
color: selectionMode === SelectionMode.NO_SELECTION ? "var(--accent-positive)" : "",
|
|
62
|
-
} }),
|
|
78
|
+
React.createElement("i", { className: isSelectionMode ? "ff-close" : "ff-check-mark icon_active" }),
|
|
63
79
|
"Select"),
|
|
64
|
-
React.createElement("div", { className:
|
|
80
|
+
React.createElement("div", { className: selectAllControlStyle, tabIndex: 0, onClick: () => toggleSelectAll(), onKeyDown: (e) => {
|
|
81
|
+
if (e.key === "Enter") {
|
|
82
|
+
toggleSelectAll();
|
|
83
|
+
}
|
|
84
|
+
} }, "Select All"),
|
|
85
|
+
React.createElement("div", { className: "notifications-center-controls__view_mode" },
|
|
86
|
+
React.createElement(IconButton, { iconName: "ff-chart-alt-2", classNames: viewMode === ViewMode.CARD ? "active" : "", clickHandler: () => {
|
|
87
|
+
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
88
|
+
setViewMode(ViewMode.CARD);
|
|
89
|
+
} }),
|
|
90
|
+
React.createElement(IconButton, { iconName: "ff-adp-hamburger", classNames: viewMode === ViewMode.LIST ? "active" : "", clickHandler: () => {
|
|
91
|
+
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
92
|
+
setViewMode(ViewMode.LIST);
|
|
93
|
+
} }))),
|
|
94
|
+
React.createElement("div", { className: "notifications-center-controls__row center" },
|
|
95
|
+
React.createElement("div", { className: controlClassname, onClick: () => readChecked(), tabIndex: 0, onKeyDown: (e) => {
|
|
65
96
|
if (e.key === "Enter") {
|
|
66
97
|
readChecked();
|
|
67
98
|
}
|
|
68
99
|
} }, "Mark Read"),
|
|
69
|
-
React.createElement("div", { className:
|
|
100
|
+
React.createElement("div", { className: controlClassname, onClick: () => unreadChecked(), tabIndex: 0, onKeyDown: (e) => {
|
|
70
101
|
if (e.key === "Enter") {
|
|
71
102
|
unreadChecked();
|
|
72
103
|
}
|
|
73
104
|
} }, "Mark Unread"),
|
|
74
|
-
React.createElement("div", { className:
|
|
105
|
+
React.createElement("div", { className: controlClassname, onClick: () => hideChecked(), tabIndex: 0, onKeyDown: (e) => {
|
|
75
106
|
if (e.key === "Enter") {
|
|
76
107
|
hideChecked();
|
|
77
108
|
}
|
|
78
|
-
}
|
|
79
|
-
React.createElement("div", { className:
|
|
109
|
+
} }, "Hide"),
|
|
110
|
+
React.createElement("div", { className: controlClassname, onClick: () => snoozeChecked(), tabIndex: 0, onKeyDown: (e) => {
|
|
80
111
|
if (e.key === "Enter") {
|
|
81
112
|
snoozeChecked();
|
|
82
113
|
}
|
|
83
|
-
}
|
|
84
|
-
React.createElement("div", { className: "notifications-center-controls__view_mode" },
|
|
85
|
-
React.createElement(IconButton, { iconName: "ff-chart-alt-2", classNames: viewMode === ViewMode.CARD ? "active" : "", clickHandler: () => {
|
|
86
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
87
|
-
setViewMode(ViewMode.CARD);
|
|
88
|
-
} }),
|
|
89
|
-
React.createElement(IconButton, { iconName: "ff-adp-hamburger", classNames: viewMode === ViewMode.LIST ? "active" : "", clickHandler: () => {
|
|
90
|
-
setSelectionMode(SelectionMode.NO_SELECTION);
|
|
91
|
-
setViewMode(ViewMode.LIST);
|
|
92
|
-
} })))));
|
|
114
|
+
} }, "Snooze"))));
|
|
93
115
|
};
|
|
94
116
|
export default DrawerControls;
|
|
95
117
|
//# sourceMappingURL=DrawerControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4B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AC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA;gBACF,oBAAC,UAAU,IACV,QAAQ,EAAC,kBAAkB,EAC3B,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA,CACG,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext } from \"react\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types & Constants\nimport { Control } from \"../../types\";\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\n// Hooks\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tdismissNotification,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\n\nconst DrawerControls: React.FunctionComponent = () => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tcheckedNotifications,\n\t} = notificationsContext;\n\n\tconst toggleControl = (clickedControl: Control) => {\n\t\t// If we click on the control aready active, then there's nothing to toggle and we bail out.\n\t\tif (clickedControl.action === drawerControlProps.active) return;\n\t\tdrawerControlProps.controls.forEach((control: Control) => {\n\t\t\tif (control.action === clickedControl.action) {\n\t\t\t\tif (drawerControlProps.active === control.action) {\n\t\t\t\t\tdelete drawerControlProps.active;\n\t\t\t\t} else {\n\t\t\t\t\tdrawerControlProps.active = control.action;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDrawerControlProps({ ...drawerControlProps });\n\t};\n\n\tconst renderControls = () => {\n\t\tlet className = \"notifications-center-controls__filter-btn\";\n\t\treturn drawerControlProps.controls.map((control: Control) => (\n\t\t\t<div\n\t\t\t\tkey={control.action}\n\t\t\t\tclassName={`${className} ${drawerControlProps.active === control.action ? \"active\" : \"\"}`}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t\tonClick={() => toggleControl(control)}\n\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\ttoggleControl(control);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { pointerEvents: \"none\", opacity: \"0.4\" } : {}}\n\t\t\t>\n\t\t\t\t{control.label}\n\t\t\t</div>\n\t\t));\n\t};\n\n\tconst toggleSelect = () => {\n\t\tsetSelectionMode(\n\t\t\tselectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION\n\t\t);\n\t};\n\n\tconst readChecked = () => {\n\t\tmarkNotificationsRead(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst unreadChecked = () => {\n\t\tmarkNotificationsUnread(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst hideChecked = () => {\n\t\tdismissNotification(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst snoozeChecked = () => {\n\t\tsnoozeNotifications(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center-controls\">\n\t\t\t<div className=\"notifications-center-controls__row\">{renderControls()}</div>\n\t\t\t<div className=\"notifications-center-controls__row\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelect()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelect();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<i\n\t\t\t\t\t\tclassName={selectionMode === SelectionMode.NO_SELECTION ? \"ff-check-mark\" : \"ff-close\"}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tpaddingRight: \"5px\",\n\t\t\t\t\t\t\tcolor: selectionMode === SelectionMode.NO_SELECTION ? \"var(--accent-positive)\" : \"\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\tSelect\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => readChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\treadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Read\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => unreadChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tunreadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Unread\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => hideChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\thideChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tHide\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => snoozeChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tsnoozeChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tSnooze\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"notifications-center-controls__view_mode\">\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-chart-alt-2\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.CARD ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.CARD);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-adp-hamburger\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.LIST ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.LIST);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DrawerControls;\n"]}
|
|
1
|
+
{"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,UAAU;AACV,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,QAAQ;AACR,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAE5C,aAAa;AACb,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,MAAM,cAAc,GAA4B,GAAG,EAAE;IACpD,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAE9D,MAAM,EACL,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACvB,GAAG,oBAAoB,CAAC;IAEzB,MAAM,aAAa,GAAG,CAAC,cAAuB,EAAE,EAAE;QACjD,4FAA4F;QAC5F,IAAI,cAAc,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM;YAAE,OAAO;QAChE,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAgB,EAAE,EAAE;YACxD,IAAI,OAAO,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,EAAE;gBAC7C,IAAI,kBAAkB,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE;oB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port { NotificationsContext } from \"../../notificationsContext\";\n\n// Types & Constants\nimport { Control } from \"../../types\";\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\n// Hooks\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tdismissNotification,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\n\nconst DrawerControls: React.FunctionComponent = () => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\n\tconst {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectionMode,\n\t\tisSelectAll,\n\t\tsetSelectAll,\n\t\tsetSelectionMode,\n\t\tcheckedNotifications,\n\t\tsetCheckedNotifications,\n\t} = notificationsContext;\n\n\tconst toggleControl = (clickedControl: Control) => {\n\t\t// If we click on the control aready active, then there's nothing to toggle and we bail out.\n\t\tif (clickedControl.action === drawerControlProps.active) return;\n\t\tdrawerControlProps.controls.forEach((control: Control) => {\n\t\t\tif (control.action === clickedControl.action) {\n\t\t\t\tif (drawerControlProps.active === control.action) {\n\t\t\t\t\tdelete drawerControlProps.active;\n\t\t\t\t} else {\n\t\t\t\t\tdrawerControlProps.active = control.action;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDrawerControlProps({ ...drawerControlProps });\n\t};\n\n\tconst renderControls = () => {\n\t\tlet className = \"notifications-center-controls__filter-btn\";\n\t\treturn drawerControlProps.controls.map((control: Control) => (\n\t\t\t<div\n\t\t\t\tkey={control.action}\n\t\t\t\tclassName={`${className} ${drawerControlProps.active === control.action ? \"active\" : \"\"}`}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t\tonClick={() => toggleControl(control)}\n\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\ttoggleControl(control);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { pointerEvents: \"none\", opacity: \"0.4\" } : {}}\n\t\t\t>\n\t\t\t\t{control.label}\n\t\t\t</div>\n\t\t));\n\t};\n\n\tconst toggleSelect = () => {\n\t\tsetSelectionMode(\n\t\t\tselectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION\n\t\t);\n\t};\n\n\tconst toggleSelectAll = () => {\n\t\tif (isSelectAll) {\n\t\t\t// this variable is a toggle, therefore\n\t\t\t// if we are currently in select all mode\n\t\t\t// means we are about to unselect all (as in a batch action)\n\t\t\tsetCheckedNotifications([]);\n\t\t}\n\t\tsetSelectAll(!isSelectAll);\n\t};\n\n\tconst readChecked = () => {\n\t\tmarkNotificationsRead(checkedNotifications);\n\t};\n\n\tconst unreadChecked = () => {\n\t\tmarkNotificationsUnread(checkedNotifications);\n\t};\n\n\tconst hideChecked = () => {\n\t\tdismissNotification(checkedNotifications);\n\t};\n\n\tconst snoozeChecked = () => {\n\t\tsnoozeNotifications(checkedNotifications);\n\t};\n\n\tconst isSelectionMode = selectionMode === SelectionMode.SELECTION;\n\n\tconst selectAllControlStyle = `notifications-center-controls__filter-btn ${isSelectAll ? \"active\" : \"\"} ${\n\t\tisSelectionMode ? \"visible\" : \"invisible\"\n\t}`;\n\n\tconst controlClassname = `notifications-center-controls__filter-btn ${isSelectionMode ? \"visible\" : \"invisible\"} ${\n\t\tcheckedNotifications.length ? \"enabled\" : \"disabled\"\n\t}`;\n\n\tuseEffect(() => {\n\t\t// unchecks \"Select All\"\n\t\tif (selectionMode === SelectionMode.NO_SELECTION) {\n\t\t\tsetSelectAll(false);\n\t\t\tcheckedNotifications.length = 0;\n\t\t}\n\t}, [selectionMode, checkedNotifications]);\n\n\treturn (\n\t\t<div id=\"notifications-center-controls\">\n\t\t\t<div className=\"notifications-center-controls__row\">{renderControls()}</div>\n\t\t\t<div className=\"notifications-center-controls__row\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelect()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelect();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<i className={isSelectionMode ? \"ff-close\" : \"ff-check-mark icon_active\"} />\n\t\t\t\t\tSelect\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={selectAllControlStyle}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelectAll()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelectAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSelect All\n\t\t\t\t</div>\n\t\t\t\t<div className=\"notifications-center-controls__view_mode\">\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-chart-alt-2\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.CARD ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.CARD);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-adp-hamburger\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.LIST ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.LIST);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"notifications-center-controls__row center\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => readChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\treadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Read\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => unreadChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tunreadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Unread\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => hideChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\thideChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tHide\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => snoozeChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tsnoozeChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSnooze\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DrawerControls;\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState, useRef, useContext } from "react";
|
|
2
2
|
import debounce from "lodash/debounce";
|
|
3
|
+
// Hooks
|
|
3
4
|
import { useNotificationUI } from "../../../../hooks/useNotifications";
|
|
5
|
+
// Components
|
|
4
6
|
import IconButton from "../shared/IconButton";
|
|
5
7
|
import { NotificationsContext } from "../../notificationsContext";
|
|
6
8
|
const NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }) => {
|
|
@@ -38,6 +40,7 @@ const DrawerHeader = ({ poppedOutStatus, popOutToggle }) => {
|
|
|
38
40
|
const toggleMenu = () => {
|
|
39
41
|
setShowMenu(!showMenu);
|
|
40
42
|
};
|
|
43
|
+
// This is unchanged across renders
|
|
41
44
|
const handleSearchTerm = useRef(debounce((nextValue) => {
|
|
42
45
|
const regex = /^(title|details|source):/gi;
|
|
43
46
|
nextValue = nextValue.trim();
|
|
@@ -60,6 +63,8 @@ const DrawerHeader = ({ poppedOutStatus, popOutToggle }) => {
|
|
|
60
63
|
const handleChange = (ev) => {
|
|
61
64
|
const { value: nextValue } = ev.target;
|
|
62
65
|
setSearchInputValue(nextValue);
|
|
66
|
+
// Even though handleChange is created on each render and executed
|
|
67
|
+
// it references the same handleSearchTerm that was created initially
|
|
63
68
|
handleSearchTerm(nextValue);
|
|
64
69
|
};
|
|
65
70
|
return (React.createElement("div", { id: "notifications-center__header" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,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AAC,EAAE,GAAG,CAAC,CACP,CAAC,OAAO,CAAC;IAEV,MAAM,YAAY,GAAG,CAAC,EAAO,EAAE,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC/B,kEAAkE;QAClE,qEAAqE;QACrE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\nimport debounce from \"lodash/debounce\";\n\n// Hooks\nimport { useNotificationUI } from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\nimport { NotificationsContext } from \"../../notificationsContext\";\n\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\n\tconst goToSettings = () => {\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\tpreferencesTab: \"Notifications\",\n\t\t});\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"overflow-menu__container\">\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\n\t\t\t</div>\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">Settings</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst DrawerHeader: React.FunctionComponent<{\n\tpoppedOutStatus: boolean;\n\tpopOutToggle: Function;\n}> = ({ poppedOutStatus, popOutToggle }) => {\n\tconst [uiState, setUIState] = useNotificationUI();\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { searchString, setSearchString } = notificationsContext;\n\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\n\n\tconst [showMenu, setShowMenu] = useState(false);\n\n\tconst closeDrawerClick = () => {\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tshowCenter: false,\n\t\t});\n\t};\n\n\tconst toggleMenu = () => {\n\t\tsetShowMenu(!showMenu);\n\t};\n\n\t// This is unchanged across renders\n\tconst handleSearchTerm = useRef(\n\t\tdebounce((nextValue: string) => {\n\t\t\tconst regex = /^(title|details|source):/gi;\n\t\t\tnextValue = nextValue.trim();\n\n\t\t\tconst isFilter = regex.test(nextValue);\n\t\t\tlet parsedSearchTerm = \"\";\n\n\t\t\tif (isFilter) {\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\n\t\t\t} else {\n\t\t\t\tparsedSearchTerm = nextValue;\n\t\t\t}\n\n\t\t\tif (parsedSearchTerm.length > 2) {\n\t\t\t\tsetSearchString(nextValue);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"search string is too short\");\n\t\t\t\tsetSearchString(\"\");\n\t\t\t}\n\t\t}, 400)\n\t).current;\n\n\tconst handleChange = (ev: any) => {\n\t\tconst { value: nextValue } = ev.target;\n\t\tsetSearchInputValue(nextValue);\n\t\t// Even though handleChange is created on each render and executed\n\t\t// it references the same handleSearchTerm that was created initially\n\t\thandleSearchTerm(nextValue);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center__header\">\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\n\t\t\t<input\n\t\t\t\tclassName=\"search-notifications__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder={\"Search Notifications\"}\n\t\t\t\tvalue={searchInputValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\n\t\t\t</IconButton>\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\n\t\t</div>\n\t);\n};\n\nexport default DrawerHeader;\n"]}
|
package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js
CHANGED
|
@@ -3,8 +3,11 @@ import { CSSTransition } from "react-transition-group";
|
|
|
3
3
|
import ConditionalWrapper from "../../../shared/ConditionalWrapper";
|
|
4
4
|
import { ViewMode, SelectionMode } from "../../constants";
|
|
5
5
|
import "../../../../assets/css/notificationsCenter.css";
|
|
6
|
+
// Hooks
|
|
6
7
|
import useNotifications, { useNotificationUI, getNotificationConfig, moveToToolbarMonitor, getOS, getFetchHistoryParams, } from "../../../../hooks/useNotifications";
|
|
8
|
+
// Context
|
|
7
9
|
import { NotificationsContext } from "../../notificationsContext";
|
|
10
|
+
// Components
|
|
8
11
|
import CardView from "../views/CardView";
|
|
9
12
|
import Drawer from "../drawer/Drawer";
|
|
10
13
|
import DrawerControls from "../drawer/DrawerControls";
|
|
@@ -12,6 +15,8 @@ import DrawerHeader from "../drawer/DrawerHeader";
|
|
|
12
15
|
import ListView from "../views/ListView";
|
|
13
16
|
import NotificationDetailsView from "../views/NotificationDetailsView";
|
|
14
17
|
import FloatingFocus from "@q42/floating-focus-a11y";
|
|
18
|
+
// The package FloatingFocus injects a focus indicator that moves around the page, but only for
|
|
19
|
+
// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.
|
|
15
20
|
new FloatingFocus();
|
|
16
21
|
const defaultControls = {
|
|
17
22
|
controls: [
|
|
@@ -68,6 +73,7 @@ const setShowWindowForState = (centerState) => {
|
|
|
68
73
|
if (centerState.position) {
|
|
69
74
|
finsembleWindow.setBounds(centerState.position);
|
|
70
75
|
}
|
|
76
|
+
// Always on top when popped in
|
|
71
77
|
FSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);
|
|
72
78
|
storeNotificationsCenterWindowPosition(centerState);
|
|
73
79
|
};
|
|
@@ -85,11 +91,12 @@ export const NotificationsCenter = (props) => {
|
|
|
85
91
|
const [isInitialized, setInitialized] = useState(false);
|
|
86
92
|
const [isMac] = useState(getOS() === "Mac");
|
|
87
93
|
const nextPageToFetch = useRef(1);
|
|
94
|
+
// Set up references for use in callbacks to FSBL functions
|
|
88
95
|
const showCenterRef = useRef(false);
|
|
89
96
|
const poppedOutRef = useRef(false);
|
|
90
97
|
const subscriptionMessageRef = useRef({});
|
|
91
98
|
const applicationState = useRef(null);
|
|
92
|
-
const
|
|
99
|
+
const scrollContainer = useRef(null);
|
|
93
100
|
const [searchString, setSearchString] = useState("");
|
|
94
101
|
const [filteredNotifications, setFilteredNotifications] = useState([...notifications]);
|
|
95
102
|
const [viewMode, setViewMode] = useState(ViewMode.CARD);
|
|
@@ -97,6 +104,8 @@ export const NotificationsCenter = (props) => {
|
|
|
97
104
|
const [selectedNotification, setSelectedNotification] = useState(null);
|
|
98
105
|
const [muteFilters, setMuteFilters] = useState([]);
|
|
99
106
|
const [reloadMuteFilters, setReloadMuteFilters] = useState(true);
|
|
107
|
+
const [isSelectAll, setSelectAll] = useState(false);
|
|
108
|
+
const [checkedNotifications, setCheckedNotifications] = useState([]);
|
|
100
109
|
const dcp = props.controls ? props.controls : defaultControls;
|
|
101
110
|
const [drawerControlProps, setDrawerControlProps] = useState(dcp);
|
|
102
111
|
const notificationsContextValues = {
|
|
@@ -112,9 +121,12 @@ export const NotificationsCenter = (props) => {
|
|
|
112
121
|
setSearchString,
|
|
113
122
|
filteredNotifications,
|
|
114
123
|
checkedNotifications,
|
|
124
|
+
setCheckedNotifications,
|
|
115
125
|
setFilteredNotifications,
|
|
116
126
|
muteFilters,
|
|
117
127
|
setMuteFilters,
|
|
128
|
+
isSelectAll,
|
|
129
|
+
setSelectAll,
|
|
118
130
|
};
|
|
119
131
|
const togglePoppedStatus = () => {
|
|
120
132
|
const poppedOut = !uiState.poppedOut;
|
|
@@ -148,6 +160,7 @@ export const NotificationsCenter = (props) => {
|
|
|
148
160
|
};
|
|
149
161
|
const boundsChangeListener = (event) => {
|
|
150
162
|
if ((showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) && !poppedOutRef.current) {
|
|
163
|
+
// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes
|
|
151
164
|
setFullHeight();
|
|
152
165
|
}
|
|
153
166
|
const position = {
|
|
@@ -163,8 +176,10 @@ export const NotificationsCenter = (props) => {
|
|
|
163
176
|
});
|
|
164
177
|
};
|
|
165
178
|
const getScrollPercentage = () => {
|
|
166
|
-
|
|
167
|
-
|
|
179
|
+
var _a, _b, _c, _d, _e, _f;
|
|
180
|
+
// document.getElementsByClassName("cards-container")[0].scrollHeight - document.getElementsByClassName("cards-container")[0].clientHeight
|
|
181
|
+
const maxScroll = ((_b = (_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = scrollContainer.current) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0);
|
|
182
|
+
const currentScroll = (_f = (_e = scrollContainer.current) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0;
|
|
168
183
|
return currentScroll / maxScroll;
|
|
169
184
|
};
|
|
170
185
|
const lazyLoadNextPage = async () => new Promise(async (resolve) => {
|
|
@@ -179,6 +194,7 @@ export const NotificationsCenter = (props) => {
|
|
|
179
194
|
}
|
|
180
195
|
}
|
|
181
196
|
else {
|
|
197
|
+
// Stop fetching after this one
|
|
182
198
|
nextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;
|
|
183
199
|
}
|
|
184
200
|
}
|
|
@@ -236,7 +252,9 @@ export const NotificationsCenter = (props) => {
|
|
|
236
252
|
}
|
|
237
253
|
}
|
|
238
254
|
};
|
|
255
|
+
// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)
|
|
239
256
|
useEffect(() => {
|
|
257
|
+
var _a;
|
|
240
258
|
setOpaqueClassName(!config.isTransparent);
|
|
241
259
|
const subscriptionId = FSBL.Clients.RouterClient.subscribe("Finsemble.Application.State", (err, response) => {
|
|
242
260
|
applicationState.current = response.data.state;
|
|
@@ -261,16 +279,18 @@ export const NotificationsCenter = (props) => {
|
|
|
261
279
|
};
|
|
262
280
|
finsembleWindow.addEventListener("close-requested", hide);
|
|
263
281
|
finsembleWindow.addEventListener("bounds-change-end", boundsChangeListener);
|
|
264
|
-
|
|
282
|
+
(_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", scrollHandler);
|
|
265
283
|
return () => {
|
|
284
|
+
var _a;
|
|
266
285
|
FSBL.Clients.RouterClient.unsubscribe(subscriptionId);
|
|
267
286
|
finsembleWindow.removeEventListener("close-requested", hide);
|
|
268
287
|
finsembleWindow.removeEventListener("bounds-change-end", boundsChangeListener);
|
|
269
|
-
|
|
288
|
+
(_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", scrollHandler);
|
|
270
289
|
};
|
|
271
290
|
}, []);
|
|
272
291
|
useEffect(() => {
|
|
273
292
|
const recursiveLoad = async () => {
|
|
293
|
+
// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages
|
|
274
294
|
await lazyLoadNextPage();
|
|
275
295
|
if (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {
|
|
276
296
|
recursiveLoad();
|
|
@@ -278,8 +298,10 @@ export const NotificationsCenter = (props) => {
|
|
|
278
298
|
};
|
|
279
299
|
recursiveLoad();
|
|
280
300
|
}, [viewMode, drawerControlProps.active]);
|
|
301
|
+
// Hook to set up the center state from service data on component start
|
|
281
302
|
useEffect(() => {
|
|
282
303
|
subscriptionMessageRef.current = uiState;
|
|
304
|
+
// Hook can execute before initial pubsub response - waiting for actual values
|
|
283
305
|
if (!isInitialized && typeof uiState.showCenter !== "undefined") {
|
|
284
306
|
if (uiState.poppedOut) {
|
|
285
307
|
removePoppedInClasses();
|
|
@@ -294,11 +316,13 @@ export const NotificationsCenter = (props) => {
|
|
|
294
316
|
position: uiState.position,
|
|
295
317
|
});
|
|
296
318
|
}
|
|
319
|
+
// Setup references
|
|
297
320
|
showCenterRef.current = uiState.showCenter;
|
|
298
321
|
poppedOutRef.current = uiState.poppedOut;
|
|
299
322
|
setInitialized(true);
|
|
300
323
|
}
|
|
301
324
|
}, [uiState]);
|
|
325
|
+
// Effect to run when we pop-in or pop-out the notification center
|
|
302
326
|
useEffect(() => {
|
|
303
327
|
if (isInitialized) {
|
|
304
328
|
poppedOutRef.current = uiState.poppedOut;
|
|
@@ -350,6 +374,7 @@ export const NotificationsCenter = (props) => {
|
|
|
350
374
|
FSBL.Clients.RouterClient.removeListener("FinsembleNotificationsMuteStateChannel", listenMuteStateChanged);
|
|
351
375
|
};
|
|
352
376
|
}, []);
|
|
377
|
+
// Sets the current active mute filters
|
|
353
378
|
useEffect(() => {
|
|
354
379
|
async function loadMuteFilter() {
|
|
355
380
|
return await FSBL.Clients.NotificationClient.getMuteFilters();
|
|
@@ -359,10 +384,16 @@ export const NotificationsCenter = (props) => {
|
|
|
359
384
|
setReloadMuteFilters(false);
|
|
360
385
|
});
|
|
361
386
|
}, [reloadMuteFilters]);
|
|
387
|
+
// Sets the select all status from user selecting notifications individually
|
|
388
|
+
useEffect(() => {
|
|
389
|
+
if (notifications.length > 0 && checkedNotifications.length === notifications.length) {
|
|
390
|
+
setSelectAll(true);
|
|
391
|
+
}
|
|
392
|
+
}, [checkedNotifications, notifications]);
|
|
362
393
|
const notificationsMainView = () => (React.createElement(React.Fragment, null,
|
|
363
394
|
React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
|
|
364
395
|
React.createElement(DrawerControls, null),
|
|
365
|
-
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 })))));
|
|
396
|
+
React.createElement("div", { className: "cards-container", ref: scrollContainer }, viewMode === ViewMode.CARD ? (React.createElement(CardView, { notifications: notifications, notificationCard: props.notificationCard })) : (React.createElement(ListView, { notifications: notifications, notificationHeaderRow: props.notificationHeaderRow, notificationListRow: props.notificationListRow })))));
|
|
366
397
|
const notificationDetailsViewComponent = () => React.createElement(NotificationDetailsView, { notification: selectedNotification });
|
|
367
398
|
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)) },
|
|
368
399
|
React.createElement(NotificationsContext.Provider, { value: notificationsContextValues },
|
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,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,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,uBAAuB,MAAM,kCAAkC,CAAC;AAGvE,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAGrD,IAAI,aAAa,EAAE,CAAC;AAMpB,MAAM,eAAe,GAAoC;IACxD,QAAQ,EAAE;QACT;YACC,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,CAA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tB,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\";\nimport { CSSTransition } from \"react-transition-group\";\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\n\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\n\n// Hooks\nimport useNotifications, {\n\tuseNotificationUI,\n\tgetNotificationConfig,\n\tmoveToToolbarMonitor,\n\tgetOS,\n\tgetFetchHistoryParams,\n} from \"../../../../hooks/useNotifications\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\n\n// Components\nimport CardView from \"../views/CardView\";\nimport Drawer from \"../drawer/Drawer\";\nimport DrawerControls from \"../drawer/DrawerControls\";\nimport DrawerHeader from \"../drawer/DrawerHeader\";\nimport ListView from \"../views/ListView\";\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\nimport { services } from \"@finsemble/finsemble-api\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype INotification = services.notification.types.INotification;\ntype IMuteFilter = services.notification.types.IMuteFilter;\n\nconst defaultControls: NotificationCenterControlsProps = {\n\tcontrols: [\n\t\t{\n\t\t\taction: \"all\",\n\t\t\tlabel: \"All\",\n\t\t\trun: (notifications: INotification[]) => notifications,\n\t\t},\n\t\t{\n\t\t\taction: \"unread\",\n\t\t\tlabel: \"Unread\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"read\",\n\t\t\tlabel: \"Read\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"snoozed\",\n\t\t\tlabel: \"Snoozed\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\n\t\t},\n\t],\n\tactive: \"all\",\n};\n\nconst addPoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\n};\n\nconst removePoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\n};\n\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\n\tFSBL.Clients.StorageClient.save({\n\t\ttopic: \"finsemble.notifications\",\n\t\tkey: \"last.position\",\n\t\tvalue: {\n\t\t\tshowCenter,\n\t\t\tpoppedOut,\n\t\t\tposition,\n\t\t},\n\t});\n};\n\nconst setShowWindowForState = (centerState: any) => {\n\tif (centerState.showCenter) {\n\t\tfinsembleWindow.show({}, () => {\n\t\t\tfinsembleWindow.bringToFront();\n\t\t});\n\t}\n\n\tif (centerState.position) {\n\t\tfinsembleWindow.setBounds(centerState.position);\n\t}\n\n\t// Always on top when popped in\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\n\tstoreNotificationsCenterWindowPosition(centerState);\n};\n\nconst isValidPosition = (bounds: any): boolean =>\n\tbounds &&\n\ttypeof bounds.left !== \"undefined\" &&\n\ttypeof bounds.top !== \"undefined\" &&\n\ttypeof bounds.height !== \"undefined\" &&\n\ttypeof bounds.width !== \"undefined\";\n\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\n\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\n\tconst [uiState, setUIState] = useNotificationUI();\n\n\tconst config = getNotificationConfig();\n\tconst [isInitialized, setInitialized] = useState(false);\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\tconst nextPageToFetch = useRef(1);\n\n\t// Set up references for use in callbacks to FSBL functions\n\tconst showCenterRef = useRef(false);\n\tconst poppedOutRef = useRef(false);\n\tconst subscriptionMessageRef = useRef<any>({});\n\tconst applicationState = useRef(null);\n\n\tconst checkedNotifications: INotification[] = [];\n\n\tconst [searchString, setSearchString] = useState(\"\");\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\n\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\n\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\n\tconst notificationsContextValues: NotificationsContextType = {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectedNotification,\n\t\tsetSelectedNotification,\n\t\tsearchString,\n\t\tsetSearchString,\n\t\tfilteredNotifications,\n\t\tcheckedNotifications,\n\t\tsetFilteredNotifications,\n\t\tmuteFilters,\n\t\tsetMuteFilters,\n\t};\n\n\tconst togglePoppedStatus = () => {\n\t\tconst poppedOut = !uiState.poppedOut;\n\t\tpoppedOutRef.current = poppedOut;\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tpoppedOut,\n\t\t});\n\t};\n\n\tconst setFullHeight = async (monitorInfo?: any) => {\n\t\tif (!monitorInfo) {\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\n\t\t\t\t\tmonitorInfo = monitor;\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tconst { data } = await finsembleWindow.getBounds();\n\t\tif (data) {\n\t\t\tconst centerWindowPosition = {\n\t\t\t\tleft: monitorInfo.availableRect.right - data.width,\n\t\t\t\ttop: monitorInfo.availableRect.top,\n\t\t\t\theight: monitorInfo.availableRect.height,\n\t\t\t\twidth: data.width,\n\t\t\t};\n\n\t\t\tsetShowWindowForState({\n\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\t\tposition: centerWindowPosition,\n\t\t\t});\n\n\t\t\tfinsembleWindow.setShape([]);\n\t\t}\n\t};\n\n\tconst boundsChangeListener = (event: any) => {\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\n\t\t\tsetFullHeight();\n\t\t}\n\t\tconst position = {\n\t\t\ttop: event.data.top,\n\t\t\tleft: event.data.left,\n\t\t\theight: event.data.height,\n\t\t\twidth: event.data.width,\n\t\t};\n\n\t\tstoreNotificationsCenterWindowPosition({\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition,\n\t\t});\n\t};\n\n\tconst getScrollPercentage = () => {\n\t\tconst maxScroll = document.body.scrollHeight;\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\n\t\treturn currentScroll / maxScroll;\n\t};\n\n\tconst lazyLoadNextPage = async () =>\n\t\tnew Promise<void>(async (resolve) => {\n\t\t\tif (nextPageToFetch.current > 0) {\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\n\t\t\t\tif (notificationList.length) {\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\n\t\t\t\t\tfor (const notification of notificationList) {\n\t\t\t\t\t\taddNotification(notification);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Stop fetching after this one\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\n\t\tif (isTransparent && !isMac) {\n\t\t\tif (poppedOut) {\n\t\t\t\tif (show) {\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (show) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tfinsembleWindow.setShape([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tif (!poppedOut) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t}\n\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t}\n\t\t}\n\t};\n\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\n\tuseEffect(() => {\n\t\tsetOpaqueClassName(!config.isTransparent);\n\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\n\t\t\tapplicationState.current = response.data.state;\n\t\t});\n\n\t\tconst hide = (event: any) => {\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\n\t\t\tpublishValue[\"showCenter\"] = false;\n\t\t\tsetUIState(publishValue);\n\t\t\tif (applicationState?.current !== \"closing\") {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst scrollHandler = () => {\n\t\t\tif (getScrollPercentage() > 0.9) {\n\t\t\t\tlazyLoadNextPage();\n\t\t\t}\n\t\t};\n\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst recursiveLoad = async () => {\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\n\t\t\tawait lazyLoadNextPage();\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\n\t\t\t\trecursiveLoad();\n\t\t\t}\n\t\t};\n\n\t\trecursiveLoad();\n\t}, [viewMode, drawerControlProps.active]);\n\n\t// Hook to set up the center state from service data on component start\n\tuseEffect(() => {\n\t\tsubscriptionMessageRef.current = uiState;\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\n\t\t\tif (uiState.poppedOut) {\n\t\t\t\tremovePoppedInClasses();\n\t\t\t} else {\n\t\t\t\taddPoppedInClasses();\n\t\t\t}\n\n\t\t\tif (isValidPosition(uiState.position)) {\n\t\t\t\tsetShowWindowForState({\n\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\tposition: uiState.position,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Setup references\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\n\t\t\tsetInitialized(true);\n\t\t}\n\t}, [uiState]);\n\n\t// Effect to run when we pop-in or pop-out the notification center\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\n\t\t\t\tif (uiState.poppedOut) {\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds();\n\t\t\t\t\tremovePoppedInClasses();\n\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tconst centerWindowPosition = {\n\t\t\t\t\t\t\tleft: data.left - 25,\n\t\t\t\t\t\t\ttop: data.top + 25,\n\t\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\n\t\t\t\t\t\t\twidth: data.width,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tsetShowWindowForState({\n\t\t\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\t\t\tposition: centerWindowPosition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\taddPoppedInClasses();\n\t\t\t\t\tsetFullHeight(monitorInfo);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [uiState.poppedOut]);\n\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\n\t\t}\n\t}, [uiState.showCenter]);\n\n\tuseEffect(() => {\n\t\tsetFilteredNotifications([...notifications]);\n\t}, [notifications]);\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tsetReloadMuteFilters(true);\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\t// Sets the current active mute filters\n\tuseEffect(() => {\n\t\tasync function loadMuteFilter() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\n\t\t}\n\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\n\t\t\tsetMuteFilters(loadedMuteFilters);\n\t\t\tsetReloadMuteFilters(false);\n\t\t});\n\t}, [reloadMuteFilters]);\n\n\tconst notificationsMainView = () => (\n\t\t<>\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\n\t\t\t<DrawerControls />\n\t\t\t<div className=\"cards-container\">\n\t\t\t\t{viewMode === ViewMode.CARD ? (\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\n\t\t\t\t) : (\n\t\t\t\t\t<ListView\n\t\t\t\t\t\tnotifications={notifications}\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\n\n\treturn (\n\t\t<ConditionalWrapper\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\n\t\t\twrapper={(children) => (\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\n\t\t\t\t\t{children}\n\t\t\t\t</CSSTransition>\n\t\t\t)}\n\t\t>\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\n\t\t\t\t</Drawer>\n\t\t\t</NotificationsContext.Provider>\n\t\t</ConditionalWrapper>\n\t);\n};\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,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B,EAAE,KAAK,CAAC,gBAAgB,GAAI,CACpF,CAAC,CAAC,CAAC,CACH,oBAAC,QAAQ,IACR,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,EAClD,mBAAmB,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\";\nimport { CSSTransition } from \"react-transition-group\";\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\n\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\n\n// Hooks\nimport useNotifications, {\n\tuseNotificationUI,\n\tgetNotificationConfig,\n\tmoveToToolbarMonitor,\n\tgetOS,\n\tgetFetchHistoryParams,\n} from \"../../../../hooks/useNotifications\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\n\n// Components\nimport CardView from \"../views/CardView\";\nimport Drawer from \"../drawer/Drawer\";\nimport DrawerControls from \"../drawer/DrawerControls\";\nimport DrawerHeader from \"../drawer/DrawerHeader\";\nimport ListView from \"../views/ListView\";\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\nimport { services } from \"@finsemble/finsemble-api\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype INotification = services.notification.types.INotification;\ntype IMuteFilter = services.notification.types.IMuteFilter;\n\nconst defaultControls: NotificationCenterControlsProps = {\n\tcontrols: [\n\t\t{\n\t\t\taction: \"all\",\n\t\t\tlabel: \"All\",\n\t\t\trun: (notifications: INotification[]) => notifications,\n\t\t},\n\t\t{\n\t\t\taction: \"unread\",\n\t\t\tlabel: \"Unread\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"read\",\n\t\t\tlabel: \"Read\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"snoozed\",\n\t\t\tlabel: \"Snoozed\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\n\t\t},\n\t],\n\tactive: \"all\",\n};\n\nconst addPoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\n};\n\nconst removePoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\n};\n\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\n\tFSBL.Clients.StorageClient.save({\n\t\ttopic: \"finsemble.notifications\",\n\t\tkey: \"last.position\",\n\t\tvalue: {\n\t\t\tshowCenter,\n\t\t\tpoppedOut,\n\t\t\tposition,\n\t\t},\n\t});\n};\n\nconst setShowWindowForState = (centerState: any) => {\n\tif (centerState.showCenter) {\n\t\tfinsembleWindow.show({}, () => {\n\t\t\tfinsembleWindow.bringToFront();\n\t\t});\n\t}\n\n\tif (centerState.position) {\n\t\tfinsembleWindow.setBounds(centerState.position);\n\t}\n\n\t// Always on top when popped in\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\n\tstoreNotificationsCenterWindowPosition(centerState);\n};\n\nconst isValidPosition = (bounds: any): boolean =>\n\tbounds &&\n\ttypeof bounds.left !== \"undefined\" &&\n\ttypeof bounds.top !== \"undefined\" &&\n\ttypeof bounds.height !== \"undefined\" &&\n\ttypeof bounds.width !== \"undefined\";\n\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\n\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\n\tconst [uiState, setUIState] = useNotificationUI();\n\n\tconst config = getNotificationConfig();\n\tconst [isInitialized, setInitialized] = useState(false);\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\tconst nextPageToFetch = useRef(1);\n\n\t// Set up references for use in callbacks to FSBL functions\n\tconst showCenterRef = useRef(false);\n\tconst poppedOutRef = useRef(false);\n\tconst subscriptionMessageRef = useRef<any>({});\n\tconst applicationState = useRef(null);\n\tconst scrollContainer = useRef<HTMLDivElement>(null);\n\n\tconst [searchString, setSearchString] = useState(\"\");\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\n\tconst [isSelectAll, setSelectAll] = useState<boolean>(false);\n\tconst [checkedNotifications, setCheckedNotifications] = useState<INotification[]>([]);\n\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\n\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\n\tconst notificationsContextValues: NotificationsContextType = {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectedNotification,\n\t\tsetSelectedNotification,\n\t\tsearchString,\n\t\tsetSearchString,\n\t\tfilteredNotifications,\n\t\tcheckedNotifications,\n\t\tsetCheckedNotifications,\n\t\tsetFilteredNotifications,\n\t\tmuteFilters,\n\t\tsetMuteFilters,\n\t\tisSelectAll,\n\t\tsetSelectAll,\n\t};\n\n\tconst togglePoppedStatus = () => {\n\t\tconst poppedOut = !uiState.poppedOut;\n\t\tpoppedOutRef.current = poppedOut;\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tpoppedOut,\n\t\t});\n\t};\n\n\tconst setFullHeight = async (monitorInfo?: any) => {\n\t\tif (!monitorInfo) {\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\n\t\t\t\t\tmonitorInfo = monitor;\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tconst { data } = await finsembleWindow.getBounds();\n\t\tif (data) {\n\t\t\tconst centerWindowPosition = {\n\t\t\t\tleft: monitorInfo.availableRect.right - data.width,\n\t\t\t\ttop: monitorInfo.availableRect.top,\n\t\t\t\theight: monitorInfo.availableRect.height,\n\t\t\t\twidth: data.width,\n\t\t\t};\n\n\t\t\tsetShowWindowForState({\n\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\t\tposition: centerWindowPosition,\n\t\t\t});\n\n\t\t\tfinsembleWindow.setShape([]);\n\t\t}\n\t};\n\n\tconst boundsChangeListener = (event: any) => {\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\n\t\t\tsetFullHeight();\n\t\t}\n\t\tconst position = {\n\t\t\ttop: event.data.top,\n\t\t\tleft: event.data.left,\n\t\t\theight: event.data.height,\n\t\t\twidth: event.data.width,\n\t\t};\n\n\t\tstoreNotificationsCenterWindowPosition({\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition,\n\t\t});\n\t};\n\n\tconst getScrollPercentage = () => {\n\t\t// document.getElementsByClassName(\"cards-container\")[0].scrollHeight - document.getElementsByClassName(\"cards-container\")[0].clientHeight\n\t\tconst maxScroll = (scrollContainer.current?.scrollHeight ?? 0) - (scrollContainer.current?.clientHeight ?? 0);\n\t\tconst currentScroll = scrollContainer.current?.scrollTop ?? 0;\n\t\treturn currentScroll / maxScroll;\n\t};\n\n\tconst lazyLoadNextPage = async () =>\n\t\tnew Promise<void>(async (resolve) => {\n\t\t\tif (nextPageToFetch.current > 0) {\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\n\t\t\t\tif (notificationList.length) {\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\n\t\t\t\t\tfor (const notification of notificationList) {\n\t\t\t\t\t\taddNotification(notification);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Stop fetching after this one\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\n\t\tif (isTransparent && !isMac) {\n\t\t\tif (poppedOut) {\n\t\t\t\tif (show) {\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (show) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tfinsembleWindow.setShape([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tif (!poppedOut) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t}\n\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t}\n\t\t}\n\t};\n\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\n\tuseEffect(() => {\n\t\tsetOpaqueClassName(!config.isTransparent);\n\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\n\t\t\tapplicationState.current = response.data.state;\n\t\t});\n\n\t\tconst hide = (event: any) => {\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\n\t\t\tpublishValue[\"showCenter\"] = false;\n\t\t\tsetUIState(publishValue);\n\t\t\tif (applicationState?.current !== \"closing\") {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst scrollHandler = () => {\n\t\t\tif (getScrollPercentage() > 0.9) {\n\t\t\t\tlazyLoadNextPage();\n\t\t\t}\n\t\t};\n\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\tscrollContainer.current?.addEventListener(\"scroll\", scrollHandler);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\t\tscrollContainer.current?.removeEventListener(\"scroll\", scrollHandler);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst recursiveLoad = async () => {\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\n\t\t\tawait lazyLoadNextPage();\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\n\t\t\t\trecursiveLoad();\n\t\t\t}\n\t\t};\n\n\t\trecursiveLoad();\n\t}, [viewMode, drawerControlProps.active]);\n\n\t// Hook to set up the center state from service data on component start\n\tuseEffect(() => {\n\t\tsubscriptionMessageRef.current = uiState;\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\n\t\t\tif (uiState.poppedOut) {\n\t\t\t\tremovePoppedInClasses();\n\t\t\t} else {\n\t\t\t\taddPoppedInClasses();\n\t\t\t}\n\n\t\t\tif (isValidPosition(uiState.position)) {\n\t\t\t\tsetShowWindowForState({\n\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\tposition: uiState.position,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Setup references\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\n\t\t\tsetInitialized(true);\n\t\t}\n\t}, [uiState]);\n\n\t// Effect to run when we pop-in or pop-out the notification center\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\n\t\t\t\tif (uiState.poppedOut) {\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds();\n\t\t\t\t\tremovePoppedInClasses();\n\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tconst centerWindowPosition = {\n\t\t\t\t\t\t\tleft: data.left - 25,\n\t\t\t\t\t\t\ttop: data.top + 25,\n\t\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\n\t\t\t\t\t\t\twidth: data.width,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tsetShowWindowForState({\n\t\t\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\t\t\tposition: centerWindowPosition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\taddPoppedInClasses();\n\t\t\t\t\tsetFullHeight(monitorInfo);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [uiState.poppedOut]);\n\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\n\t\t}\n\t}, [uiState.showCenter]);\n\n\tuseEffect(() => {\n\t\tsetFilteredNotifications([...notifications]);\n\t}, [notifications]);\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tsetReloadMuteFilters(true);\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\t// Sets the current active mute filters\n\tuseEffect(() => {\n\t\tasync function loadMuteFilter() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\n\t\t}\n\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\n\t\t\tsetMuteFilters(loadedMuteFilters);\n\t\t\tsetReloadMuteFilters(false);\n\t\t});\n\t}, [reloadMuteFilters]);\n\n\t// Sets the select all status from user selecting notifications individually\n\tuseEffect(() => {\n\t\tif (notifications.length > 0 && checkedNotifications.length === notifications.length) {\n\t\t\tsetSelectAll(true);\n\t\t}\n\t}, [checkedNotifications, notifications]);\n\n\tconst notificationsMainView = () => (\n\t\t<>\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\n\t\t\t<DrawerControls />\n\t\t\t<div className=\"cards-container\" ref={scrollContainer}>\n\t\t\t\t{viewMode === ViewMode.CARD ? (\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\n\t\t\t\t) : (\n\t\t\t\t\t<ListView\n\t\t\t\t\t\tnotifications={notifications}\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\n\n\treturn (\n\t\t<ConditionalWrapper\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\n\t\t\twrapper={(children) => (\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\n\t\t\t\t\t{children}\n\t\t\t\t</CSSTransition>\n\t\t\t)}\n\t\t>\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\n\t\t\t\t</Drawer>\n\t\t\t</NotificationsContext.Provider>\n\t\t</ConditionalWrapper>\n\t);\n};\n"]}
|
package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js
CHANGED
|
@@ -21,8 +21,10 @@ const ToastCard = (props) => {
|
|
|
21
21
|
clearInterval(timeoutId);
|
|
22
22
|
}
|
|
23
23
|
if (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {
|
|
24
|
+
// Is an informational notification or timeout enabled actionable notifications
|
|
24
25
|
let timeoutLength;
|
|
25
26
|
if (informationalNotificationTimeout !== false) {
|
|
27
|
+
// Convert to milliseconds
|
|
26
28
|
timeoutLength = informationalNotificationTimeout * 1000;
|
|
27
29
|
if (notification.timeout && Number.isInteger(notification.timeout)) {
|
|
28
30
|
timeoutLength = notification.timeout;
|
|
@@ -104,6 +106,7 @@ export const NotificationsToasts = (props) => {
|
|
|
104
106
|
let forceHide = false;
|
|
105
107
|
if (activeNotifications(notifications).length === 0 &&
|
|
106
108
|
activeNotifications(notificationsRef.current).length === 0) {
|
|
109
|
+
// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)
|
|
107
110
|
forceHide = true;
|
|
108
111
|
}
|
|
109
112
|
notificationsRef.current = notifications;
|