@finsemble/finsemble-ui 6.6.1 → 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 +17 -10
- 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 +21 -10
- 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
package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,gDAAgD,CAAC;AAcxD,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,eAAe,GAAG,MAAM,EAAiB,CAAC;IAChD,MAAM,EAAE,YAAY,EAAE,gCAAgC,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,GACnH,KAAK,CAAC;IACP,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IACvE,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpE,SAAS,CAAC,GAAG,EAAE;QACd,eA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K,CAAC;4BACjC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK;4BAC5C,MAAM,EAAE,MAAM,GAAG,EAAE;4BACnB,KAAK,EAAE,KAAK;yBACZ;qBACD,CAAC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,kBACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,IAClC,KAAK,EACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport useNotifications, {\n\tuseNotificationUI,\n\tmoveToToolbarMonitor,\n\tgetNotificationConfig,\n\tgetOS,\n} from \"../../../../hooks/useNotifications\";\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { INotificationToastsProps } from \"../../types\";\nimport \"../../../../assets/css/notificationsCenter.css\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype INotification = services.notification.types.INotification;\n\ntype ToastCardProps = {\n\tnotification: INotification;\n\tremoveFunction: Function;\n\tisActiveFunction: Function;\n\tinformationalNotificationTimeout: number | false;\n\tactionableTimeoutEnabled: boolean;\n\tnotificationCard?: React.ComponentType<any>;\n};\n\nconst ToastCard = (props: ToastCardProps) => {\n\tconst notificationRef = useRef<INotification>();\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\n\t\tprops;\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\n\tconst [showNotification] = useState(isActiveFunction(notification));\n\n\tuseEffect(() => {\n\t\tnotificationRef.current = notification;\n\t\tlet timeoutId: any;\n\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\n\t\t\tlet timeoutLength;\n\n\t\t\tif (informationalNotificationTimeout !== false) {\n\t\t\t\t// Convert to milliseconds\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\n\t\t\t\t\ttimeoutLength = notification.timeout;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (timeoutLength) {\n\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t}, timeoutLength);\n\t\t\t}\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearInterval(timeoutId);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!isActiveFunction(notificationRef.current)) {\n\t\t\tremoveFunction(notification);\n\t\t}\n\t\tsetSlideIn(isActiveFunction(notification));\n\t}, [notification]);\n\n\tconst onExited = () => {\n\t\tremoveFunction(notification);\n\t};\n\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\n\n\treturn (\n\t\tshowNotification && (\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\n\t\t\t\t\t<Card\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tuiContext=\"toasts\"\n\t\t\t\t\t\tremoveNotification={() => {\n\t\t\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"divider\"> </div>\n\t\t\t\t</div>\n\t\t\t</CSSTransition>\n\t\t)\n\t);\n};\n\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\n\tconst notificationsRef = useRef<INotification[]>(notifications);\n\tconst [uiState] = useNotificationUI();\n\n\tconst isNotificationActive = (notification: INotification): boolean => {\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\n\t};\n\n\tconst config = getNotificationConfig();\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\n\n\tuseEffect(() => {\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (data.notificationPreferences) {\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\n\t\t\t\t\t\tdata.notificationPreferences;\n\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst transparencySupported = config.isTransparent;\n\n\t\tsetOpaqueClassName(!transparencySupported);\n\n\t\tif (transparencySupported) {\n\t\t\tfinsembleWindow.show();\n\t\t}\n\n\t\tasync function getNotificationsPreferences() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\n\t\t}\n\n\t\tgetNotificationsPreferences().then((preferences: any) => {\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\n\t\t});\n\t}, []);\n\n\tuseEffect(() => {\n\t\tmoveToToolbarMonitor().then(async () => {\n\t\t\tlet forceHide = false;\n\t\t\tif (\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\n\t\t\t) {\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\n\t\t\t\tforceHide = true;\n\t\t\t}\n\n\t\t\tnotificationsRef.current = notifications;\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\n\t\t\tif (notifications.length === 0 || forceHide) {\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\theight: 1,\n\t\t\t\t\t};\n\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t}\n\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\n\t\t\t\t\t};\n\n\t\t\t\t\tawait finsembleWindow.show();\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t} else {\n\t\t\t\t\tawait finsembleWindow.show();\n\t\t\t\t\tconst { err, data } = await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" });\n\t\t\t\t\tif (err || !data) {\n\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { data: bounds } = await finsembleWindow.getBounds();\n\t\t\t\t\tconst width = (bounds?.right ?? 0) - (bounds?.left ?? 0);\n\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\n\n\t\t\t\t\tawait finsembleWindow.setBounds({\n\t\t\t\t\t\tbounds: {\n\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\n\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\n\t\t\t\t\t\t\theight: height + 10,\n\t\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}, [notifications]);\n\n\treturn (\n\t\t<div>\n\t\t\t{notifications.map((notification: INotification) => (\n\t\t\t\t<ToastCard\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\n\t\t\t\t\tnotification={notification}\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\n\t\t\t\t\tremoveFunction={removeNotification}\n\t\t\t\t\tisActiveFunction={isNotificationActive}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE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,IAClC,KAAK,EACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport useNotifications, {\n\tuseNotificationUI,\n\tmoveToToolbarMonitor,\n\tgetNotificationConfig,\n\tgetOS,\n} from \"../../../../hooks/useNotifications\";\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { INotificationToastsProps } from \"../../types\";\nimport \"../../../../assets/css/notificationsCenter.css\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype INotification = services.notification.types.INotification;\n\ntype ToastCardProps = {\n\tnotification: INotification;\n\tremoveFunction: Function;\n\tisActiveFunction: Function;\n\tinformationalNotificationTimeout: number | false;\n\tactionableTimeoutEnabled: boolean;\n\tnotificationCard?: React.ComponentType<any>;\n};\n\nconst ToastCard = (props: ToastCardProps) => {\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\n\t\tprops;\n\tconst notificationRef = useRef<INotification>(notification);\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\n\tconst [showNotification] = useState(isActiveFunction(notification));\n\tconst [timeoutId, setTimeoutId] = useState<number>();\n\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (timeoutId) {\n\t\t\t\tclearInterval(timeoutId);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (timeoutId) {\n\t\t\tclearInterval(timeoutId);\n\t\t}\n\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\n\t\t\tlet timeoutLength;\n\n\t\t\tif (informationalNotificationTimeout !== false) {\n\t\t\t\t// Convert to milliseconds\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\n\t\t\t\t\ttimeoutLength = notification.timeout;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (timeoutLength) {\n\t\t\t\tsetTimeoutId(\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t\t}, timeoutLength) as any\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!isActiveFunction(notificationRef.current)) {\n\t\t\tremoveFunction(notification);\n\t\t}\n\t\tsetSlideIn(isActiveFunction(notification));\n\t}, [notification]);\n\n\tconst onExited = () => {\n\t\tremoveFunction(notification);\n\t};\n\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\n\n\treturn (\n\t\tshowNotification && (\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\n\t\t\t\t\t<Card\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tuiContext=\"toasts\"\n\t\t\t\t\t\tremoveNotification={() => {\n\t\t\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"divider\"> </div>\n\t\t\t\t</div>\n\t\t\t</CSSTransition>\n\t\t)\n\t);\n};\n\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\n\tconst notificationsRef = useRef<INotification[]>(notifications);\n\tconst [uiState] = useNotificationUI();\n\n\tconst isNotificationActive = (notification: INotification): boolean => {\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\n\t};\n\n\tconst config = getNotificationConfig();\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\n\n\tuseEffect(() => {\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (data.notificationPreferences) {\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\n\t\t\t\t\t\tdata.notificationPreferences;\n\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst transparencySupported = config.isTransparent;\n\n\t\tsetOpaqueClassName(!transparencySupported);\n\n\t\tif (transparencySupported) {\n\t\t\tfinsembleWindow.show();\n\t\t}\n\n\t\tasync function getNotificationsPreferences() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\n\t\t}\n\n\t\tgetNotificationsPreferences().then((preferences: any) => {\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\n\t\t});\n\t}, []);\n\n\tuseEffect(() => {\n\t\tmoveToToolbarMonitor().then(async () => {\n\t\t\tlet forceHide = false;\n\t\t\tif (\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\n\t\t\t) {\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\n\t\t\t\tforceHide = true;\n\t\t\t}\n\n\t\t\tnotificationsRef.current = notifications;\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\n\t\t\tif (notifications.length === 0 || forceHide) {\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\theight: 1,\n\t\t\t\t\t};\n\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t}\n\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\n\t\t\t\t\t};\n\n\t\t\t\t\tawait finsembleWindow.show();\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t} else {\n\t\t\t\t\tawait finsembleWindow.show();\n\t\t\t\t\tconst { err, data } = await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" });\n\t\t\t\t\tif (err || !data) {\n\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { data: bounds } = await finsembleWindow.getBounds();\n\t\t\t\t\tconst width = (bounds?.right ?? 0) - (bounds?.left ?? 0);\n\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\n\n\t\t\t\t\tawait finsembleWindow.setBounds({\n\t\t\t\t\t\tbounds: {\n\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\n\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\n\t\t\t\t\t\t\theight: height + 10,\n\t\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}, [notifications]);\n\n\treturn (\n\t\t<div>\n\t\t\t{notifications.map((notification: INotification) => (\n\t\t\t\t<ToastCard\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\n\t\t\t\t\tnotification={notification}\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\n\t\t\t\t\tremoveFunction={removeNotification}\n\t\t\t\t\tisActiveFunction={isNotificationActive}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
import React, { useState, useContext, useEffect } from "react";
|
|
2
2
|
import { NotificationsContext } from "../../notificationsContext";
|
|
3
|
+
const isNotificationInCheckedNotifications = (checkedNotifications, notification) => checkedNotifications.some((checkedNotification) => checkedNotification.id === notification.id);
|
|
3
4
|
export const CheckButton = ({ notification }) => {
|
|
4
5
|
const notificationsContext = useContext(NotificationsContext);
|
|
5
|
-
const { checkedNotifications } = notificationsContext;
|
|
6
|
-
const [isChecked, setIsChecked] = useState(
|
|
6
|
+
const { checkedNotifications, setCheckedNotifications, isSelectAll, setSelectAll } = notificationsContext;
|
|
7
|
+
const [isChecked, setIsChecked] = useState(isNotificationInCheckedNotifications(checkedNotifications, notification));
|
|
7
8
|
useEffect(() => {
|
|
8
|
-
if (checkedNotifications) {
|
|
9
|
-
setIsChecked(
|
|
9
|
+
if (isSelectAll && checkedNotifications.indexOf(notification) === -1) {
|
|
10
|
+
setIsChecked(true);
|
|
11
|
+
}
|
|
12
|
+
}, [isSelectAll]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (checkedNotifications.length === 0 && isChecked) {
|
|
15
|
+
setIsChecked(false);
|
|
10
16
|
}
|
|
11
17
|
}, [checkedNotifications]);
|
|
12
|
-
|
|
13
|
-
if (
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (isChecked) {
|
|
14
20
|
checkedNotifications.push(notification);
|
|
21
|
+
setCheckedNotifications([...checkedNotifications]);
|
|
15
22
|
}
|
|
16
23
|
else {
|
|
17
|
-
|
|
24
|
+
const index = checkedNotifications.findIndex((checkedNotification) => (checkedNotification.id = notification.id));
|
|
18
25
|
if (index !== -1) {
|
|
19
26
|
checkedNotifications.splice(index, 1);
|
|
27
|
+
setSelectAll(false); // if we are unchecking one then select all is not active
|
|
28
|
+
setCheckedNotifications([...checkedNotifications]);
|
|
20
29
|
}
|
|
21
30
|
}
|
|
31
|
+
}, [isChecked]);
|
|
32
|
+
const toggleCheck = () => {
|
|
22
33
|
setIsChecked(!isChecked);
|
|
23
34
|
};
|
|
24
|
-
return (React.createElement("div", { className: "check_icon_container", onClick:
|
|
35
|
+
return (React.createElement("div", { key: notification.id, className: "check_icon_container", onClick: toggleCheck },
|
|
25
36
|
React.createElement("i", { className: `ff-check-mark default-img large ${isChecked ? "checked" : ""}` })));
|
|
26
37
|
};
|
|
27
38
|
export default CheckButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckButton.js","sourceRoot":"","s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,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC;SACnD;aAAM;YACN,MAAM,KAAK,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;YAClH,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACtC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,yDAAyD;gBAC9E,uBAAuB,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC;aACnD;SACD;IACF,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG,GAAG,EAAE;QACxB,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,GAAG,EAAE,YAAY,CAAC,EAAE,EAAE,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,WAAW;QAC/E,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\nimport { NotificationsContext } from \"../../notificationsContext\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype INotification = services.notification.types.INotification;\n\nconst isNotificationInCheckedNotifications = (checkedNotifications: INotification[], notification: INotification) =>\n\tcheckedNotifications.some((checkedNotification) => checkedNotification.id === notification.id);\n\nexport const CheckButton: React.FunctionComponent<{\n\tnotification: INotification;\n}> = ({ notification }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { checkedNotifications, setCheckedNotifications, isSelectAll, setSelectAll } = notificationsContext;\n\tconst [isChecked, setIsChecked] = useState(isNotificationInCheckedNotifications(checkedNotifications, notification));\n\n\tuseEffect(() => {\n\t\tif (isSelectAll && checkedNotifications.indexOf(notification) === -1) {\n\t\t\tsetIsChecked(true);\n\t\t}\n\t}, [isSelectAll]);\n\n\tuseEffect(() => {\n\t\tif (checkedNotifications.length === 0 && isChecked) {\n\t\t\tsetIsChecked(false);\n\t\t}\n\t}, [checkedNotifications]);\n\n\tuseEffect(() => {\n\t\tif (isChecked) {\n\t\t\tcheckedNotifications.push(notification);\n\t\t\tsetCheckedNotifications([...checkedNotifications]);\n\t\t} else {\n\t\t\tconst index = checkedNotifications.findIndex((checkedNotification) => (checkedNotification.id = notification.id));\n\t\t\tif (index !== -1) {\n\t\t\t\tcheckedNotifications.splice(index, 1);\n\t\t\t\tsetSelectAll(false); // if we are unchecking one then select all is not active\n\t\t\t\tsetCheckedNotifications([...checkedNotifications]);\n\t\t\t}\n\t\t}\n\t}, [isChecked]);\n\n\tconst toggleCheck = () => {\n\t\tsetIsChecked(!isChecked);\n\t};\n\n\treturn (\n\t\t<div key={notification.id} className=\"check_icon_container\" onClick={toggleCheck}>\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\n\t\t</div>\n\t);\n};\n\nexport default CheckButton;\n"]}
|
|
@@ -2,8 +2,17 @@ import React from "react";
|
|
|
2
2
|
import { services } from "@finsemble/finsemble-api";
|
|
3
3
|
declare type INotification = services.notification.types.INotification;
|
|
4
4
|
export declare type NotificationCardPropType = {
|
|
5
|
+
/**
|
|
6
|
+
* The Notification to be displayed
|
|
7
|
+
*/
|
|
5
8
|
notification: INotification;
|
|
9
|
+
/**
|
|
10
|
+
* Which UI context the Card is being used in
|
|
11
|
+
*/
|
|
6
12
|
uiContext: "toasts" | "center";
|
|
13
|
+
/**
|
|
14
|
+
* The internal function that will be called on toasts when dismissed or marked as read
|
|
15
|
+
*/
|
|
7
16
|
removeNotification: Function;
|
|
8
17
|
};
|
|
9
18
|
export declare const NotificationCardShell: React.FunctionComponent<NotificationCardPropType>;
|
|
@@ -3,20 +3,28 @@ import { parseISO, differenceInMilliseconds, addSeconds } from "date-fns";
|
|
|
3
3
|
import { isNewNotification, isReNotification, getMostRecentAction } from "../../utils";
|
|
4
4
|
import { NotificationCardHeaderShell } from "./notificationCard/NotificationCardHeaderShell";
|
|
5
5
|
import { NotificationCardBodyShell } from "./notificationCard/NotificationCardBodyShell";
|
|
6
|
+
import { ErrorBoundary } from "../../../common/ErrorBoundary";
|
|
6
7
|
export const NotificationCardShell = ({ notification, uiContext, removeNotification, children, }) => {
|
|
7
8
|
const { isRead } = notification;
|
|
8
9
|
const [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);
|
|
9
10
|
const [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));
|
|
11
|
+
const [componentUnmounted, setComponentUnmounted] = useState(false);
|
|
10
12
|
const [wokeFromSnooze, setWokeFromSnooze] = useState(isReNotification(notification, newNotificationHaloPeriodSeconds));
|
|
13
|
+
// Sets the current default preference
|
|
11
14
|
useEffect(() => {
|
|
12
|
-
async
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
getNotificationsPreferences().then((preferences) => {
|
|
15
|
+
const getNotificationsPreferences = async () => {
|
|
16
|
+
const preferences = await FSBL.Clients.NotificationClient.getPreferences();
|
|
16
17
|
setNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
if (!componentUnmounted) {
|
|
19
|
+
setIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
getNotificationsPreferences();
|
|
23
|
+
return () => {
|
|
24
|
+
setComponentUnmounted(true);
|
|
25
|
+
};
|
|
19
26
|
}, []);
|
|
27
|
+
// Listens for preferences change
|
|
20
28
|
useEffect(() => {
|
|
21
29
|
async function listenForPreferenceChange(error, response) {
|
|
22
30
|
if (error) {
|
|
@@ -72,7 +80,7 @@ export const NotificationCardShell = ({ notification, uiContext, removeNotificat
|
|
|
72
80
|
};
|
|
73
81
|
}, [newNotificationHaloPeriodSeconds, notification]);
|
|
74
82
|
return (React.createElement("div", { className: `notification-card ${isRead ? "read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
|
|
75
|
-
${notification.cssClassName ? notification.cssClassName : ""}` }, children ? (children) : (React.createElement(React.Fragment, null,
|
|
83
|
+
${notification.cssClassName ? notification.cssClassName : ""}` }, children ? (React.createElement(ErrorBoundary, null, children)) : (React.createElement(React.Fragment, null,
|
|
76
84
|
React.createElement(NotificationCardHeaderShell, { notification: notification, removeNotification: removeNotification, uiContext: uiContext }),
|
|
77
85
|
React.createElement(NotificationCardBodyShell, { notification: notification })))));
|
|
78
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,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Y,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { ErrorBoundary } from \"../../../common/ErrorBoundary\";\n\ntype INotification = services.notification.types.INotification;\ntype IPerformedAction = services.notification.types.IPerformedAction;\n\nexport type NotificationCardPropType = {\n\t/**\n\t * The Notification to be displayed\n\t */\n\tnotification: INotification;\n\n\t/**\n\t * Which UI context the Card is being used in\n\t */\n\tuiContext: \"toasts\" | \"center\";\n\n\t/**\n\t * The internal function that will be called on toasts when dismissed or marked as read\n\t */\n\tremoveNotification: Function;\n};\n\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\n\tnotification,\n\tuiContext,\n\tremoveNotification,\n\tchildren,\n}) => {\n\tconst { isRead } = notification;\n\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\n\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\n\tconst [componentUnmounted, setComponentUnmounted] = useState<boolean>(false);\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\n\t);\n\n\t// Sets the current default preference\n\tuseEffect(() => {\n\t\tconst getNotificationsPreferences = async () => {\n\t\t\tconst preferences: any = await FSBL.Clients.NotificationClient.getPreferences();\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\n\t\t\tif (!componentUnmounted) {\n\t\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\n\t\t\t}\n\t\t};\n\n\t\tgetNotificationsPreferences();\n\t\treturn () => {\n\t\t\tsetComponentUnmounted(true);\n\t\t};\n\t}, []);\n\n\t// Listens for preferences change\n\tuseEffect(() => {\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (\n\t\t\t\t\tdata.notificationPreferences &&\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\n\t\t\t\t) {\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tlet isNewTimerId: any;\n\t\tif (isNew) {\n\t\t\tif (notification.isRead) {\n\t\t\t\tsetIsNew(false);\n\t\t\t\tclearTimeout(isNewTimerId);\n\t\t\t} else {\n\t\t\t\tisNewTimerId = setTimeout(() => {\n\t\t\t\t\tsetIsNew(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isNewTimerId);\n\t\t};\n\t}, [isNew, notification]);\n\n\tuseEffect(() => {\n\t\tlet isRenotificationTimerId: any;\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\n\t\t\tif (mostRecentAction) {\n\t\t\t\tsetWokeFromSnooze(true);\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\n\t\t\t\t\tsetWokeFromSnooze(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t} else {\n\t\t\tsetWokeFromSnooze(false);\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t};\n\t}, [newNotificationHaloPeriodSeconds, notification]);\n\treturn (\n\t\t<div\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\n\t\t>\n\t\t\t{children ? (\n\t\t\t\t<ErrorBoundary>{children}</ErrorBoundary>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<NotificationCardHeaderShell\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tremoveNotification={removeNotification}\n\t\t\t\t\t\tuiContext={uiContext}\n\t\t\t\t\t/>\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -6,6 +6,10 @@ export declare const OverflowMenuActions: {
|
|
|
6
6
|
[key: string]: OverFlowMenuAction;
|
|
7
7
|
};
|
|
8
8
|
export declare const renderOverflowMenuAction: (notification: INotification, menuAction: OverFlowMenuAction, isMuted: boolean) => JSX.Element | null;
|
|
9
|
+
/**
|
|
10
|
+
* Overflow menu component for notifications that will provide a set of actions
|
|
11
|
+
* a user can perform on a notification (e.g. dismiss, snooze)
|
|
12
|
+
*/
|
|
9
13
|
declare const OverflowMenu: React.FunctionComponent<{
|
|
10
14
|
closeSelf: Dispatch<SetStateAction<boolean>>;
|
|
11
15
|
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
// Hooks
|
|
2
3
|
import { useOutsideClickDetector } from "../../../../hooks/useOutsideClickDetector";
|
|
3
4
|
import { markNotificationsRead, markNotificationsUnread, snoozeNotifications, } from "../../../../hooks/useNotifications";
|
|
5
|
+
// Icons
|
|
4
6
|
import EnvelopeCloseIcon from "../../icons/EnvelopeClose";
|
|
5
7
|
import EnvelopeOpenIcon from "../../icons/EnvelopeOpen";
|
|
6
8
|
import SnoozeIcon from "../../icons/SnoozeIcon";
|
|
@@ -29,6 +31,7 @@ export const OverflowMenuActions = {
|
|
|
29
31
|
React.createElement("i", { className: "ff-close" }))),
|
|
30
32
|
label: "Dismiss",
|
|
31
33
|
action: () => {
|
|
34
|
+
// Empty - filled in later
|
|
32
35
|
},
|
|
33
36
|
},
|
|
34
37
|
SETTINGS: {
|
|
@@ -48,6 +51,7 @@ export const OverflowMenuActions = {
|
|
|
48
51
|
preferencesTab: "Notifications",
|
|
49
52
|
notification,
|
|
50
53
|
});
|
|
54
|
+
// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited
|
|
51
55
|
setTimeout(() => {
|
|
52
56
|
FSBL.Clients.RouterClient.transmit("FinsembleNotificationsNavigationChannel", { notification });
|
|
53
57
|
}, 50);
|
|
@@ -60,11 +64,17 @@ export const OverflowMenuActions = {
|
|
|
60
64
|
React.createElement("i", { className: "ff-dots-horz" }))),
|
|
61
65
|
label: "Details",
|
|
62
66
|
action: () => {
|
|
67
|
+
// Empty - filled in later
|
|
63
68
|
},
|
|
64
69
|
},
|
|
65
70
|
};
|
|
66
|
-
export const renderOverflowMenuAction = (notification, menuAction,
|
|
67
|
-
|
|
71
|
+
export const renderOverflowMenuAction = (notification, menuAction,
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
|
+
isMuted) => {
|
|
74
|
+
if (
|
|
75
|
+
// Don't display read if notification is read
|
|
76
|
+
(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||
|
|
77
|
+
// Don't display unread if notification is unread
|
|
68
78
|
(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)) {
|
|
69
79
|
return null;
|
|
70
80
|
}
|
|
@@ -78,6 +88,10 @@ export const renderOverflowMenuAction = (notification, menuAction, isMuted) => {
|
|
|
78
88
|
menuAction.icon,
|
|
79
89
|
React.createElement("span", { className: "btn-label" }, menuAction === null || menuAction === void 0 ? void 0 : menuAction.label)));
|
|
80
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Overflow menu component for notifications that will provide a set of actions
|
|
93
|
+
* a user can perform on a notification (e.g. dismiss, snooze)
|
|
94
|
+
*/
|
|
81
95
|
const OverflowMenu = ({ closeSelf, children }) => {
|
|
82
96
|
const wrapperRef = useRef(null);
|
|
83
97
|
const [className, setClassName] = useState("overflow-menu__container");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/OverflowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/OverflowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErF,QAAQ;AACR,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAK5C,QAAQ;AACR,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,UAAU,MAA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C,CAAC;IAEH,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IACxC,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from \"react\";\n\n// Hooks\nimport { useOutsideClickDetector } from \"../../../../hooks/useOutsideClickDetector\";\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Types\nimport { OverFlowMenuAction } from \"../../types\";\n\n// Icons\nimport EnvelopeCloseIcon from \"../../icons/EnvelopeClose\";\nimport EnvelopeOpenIcon from \"../../icons/EnvelopeOpen\";\nimport SnoozeIcon from \"../../icons/SnoozeIcon\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const OverflowMenuActions: { [key: string]: OverFlowMenuAction } = {\n\tMARK_AS_UNREAD: {\n\t\tname: \"MARK_AS_UNREAD\",\n\t\ticon: <EnvelopeCloseIcon />,\n\t\tlabel: \"Mark Unread\",\n\t\taction: (notification: INotification) => markNotificationsUnread([notification]),\n\t},\n\tMARK_AS_READ: {\n\t\tname: \"MARK_AS_READ\",\n\t\ticon: <EnvelopeOpenIcon />,\n\t\tlabel: \"Mark Read\",\n\t\taction: (notification: INotification) => markNotificationsRead([notification]),\n\t},\n\tSNOOZE: {\n\t\tname: \"SNOOZE\",\n\t\ticon: <SnoozeIcon />,\n\t\tlabel: \"Snooze\",\n\t\taction: (notification: INotification) => snoozeNotifications([notification]),\n\t},\n\tDISMISS: {\n\t\tname: \"DISMISS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-close\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Dismiss\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n\tSETTINGS: {\n\t\tname: \"SETTINGS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Settings\",\n\t\taction: (notification: INotification) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t\t{\n\t\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmonitor: \"mine\",\n\t\t\t\t\tleft: \"center\",\n\t\t\t\t\ttop: \"center\",\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\t\t\t\tpreferencesTab: \"Notifications\",\n\t\t\t\t\t\tnotification,\n\t\t\t\t\t});\n\t\t\t\t\t// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleNotificationsNavigationChannel\", { notification });\n\t\t\t\t\t}, 50);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t},\n\tDETAILS: {\n\t\tname: \"DETAILS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-dots-horz\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Details\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n};\n\nexport const renderOverflowMenuAction = (\n\tnotification: INotification,\n\tmenuAction: OverFlowMenuAction,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tisMuted: boolean\n) => {\n\tif (\n\t\t// Don't display read if notification is read\n\t\t(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||\n\t\t// Don't display unread if notification is unread\n\t\t(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tkey={`${notification.id}_${menuAction.name}`}\n\t\t\tclassName=\"overflow-menu__action\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tmenuAction?.action(notification);\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\tmenuAction?.action(notification);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{menuAction?.icon}\n\t\t\t<span className=\"btn-label\">{menuAction?.label}</span>\n\t\t</div>\n\t);\n};\n\n/**\n * Overflow menu component for notifications that will provide a set of actions\n * a user can perform on a notification (e.g. dismiss, snooze)\n */\nconst OverflowMenu: React.FunctionComponent<{\n\tcloseSelf: Dispatch<SetStateAction<boolean>>;\n}> = ({ closeSelf, children }) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [className, setClassName] = useState(\"overflow-menu__container\");\n\n\tuseOutsideClickDetector(wrapperRef, () => closeSelf(false));\n\n\tconst moveElementIntoView = () => {\n\t\tconst bottomViewPort = window.innerHeight + window.scrollY;\n\t\tconst domRect = wrapperRef?.current?.getBoundingClientRect();\n\t\tconst elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;\n\n\t\tif (elementBottom && elementBottom > bottomViewPort) {\n\t\t\tsetClassName(\"overflow-menu__container flow-up\");\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tmoveElementIntoView();\n\t});\n\n\treturn (\n\t\t<div ref={wrapperRef} className={className}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default OverflowMenu;\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NotificationCardBodyActions } from "./NotificationCardBodyActions";
|
|
3
3
|
import { NotificationCardBodyContentLogo } from "./NotificationCardBodyContentLogo";
|
|
4
|
+
import { ErrorBoundary } from "../../../../common/ErrorBoundary";
|
|
4
5
|
export const NotificationCardBodyShell = ({ notification, children, }) => {
|
|
5
6
|
const { actions, details, contentLogo } = notification;
|
|
6
7
|
const hasActions = actions && actions.length > 0;
|
|
7
8
|
return (React.createElement("div", { className: `notification-card__body ${hasActions ? "actions" : ""}` },
|
|
8
|
-
children ? (children) : (React.createElement(React.Fragment, null,
|
|
9
|
+
children ? (React.createElement(ErrorBoundary, null, children)) : (React.createElement(React.Fragment, null,
|
|
9
10
|
React.createElement(NotificationCardBodyContentLogo, { contentLogo: contentLogo }),
|
|
10
11
|
React.createElement("div", { className: "notification-card__body_text" }, details))),
|
|
11
12
|
React.createElement(NotificationCardBodyActions, { notification: notification })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCardBodyShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationCardBodyShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAIjE,MAAM,CAAC,MAAM,yBAAyB,GAA6D,CAAC,EACnG,YAAY,EACZ,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;IACvD,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEjD,OAAO,CACN,6BAAK,SAAS,EAAE,2BAA2B,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;QACtE,QAAQ,CAAC,CAAC,CAAC,CACX,oBAAC,aAAa,QAAE,QAAQ,CAAiB,CACzC,CAAC,CAAC,CAAC,CACH;YACC,oBAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI;YAC7D,6BAAK,SAAS,EAAC,8BAA8B,IAAE,OAAO,CAAO,CAC3D,CACH;QACD,oBAAC,2BAA2B,IAAC,YAAY,EAAE,YAAY,GAAI,CACtD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { NotificationCardBodyActions } from \"./NotificationCardBodyActions\";\nimport { NotificationCardBodyContentLogo } from \"./NotificationCardBodyContentLogo\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { ErrorBoundary } from \"../../../../common/ErrorBoundary\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const NotificationCardBodyShell: React.FunctionComponent<{ notification: INotification }> = ({\n\tnotification,\n\tchildren,\n}) => {\n\tconst { actions, details, contentLogo } = notification;\n\tconst hasActions = actions && actions.length > 0;\n\n\treturn (\n\t\t<div className={`notification-card__body ${hasActions ? \"actions\" : \"\"}`}>\n\t\t\t{children ? (\n\t\t\t\t<ErrorBoundary>{children}</ErrorBoundary>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<NotificationCardBodyContentLogo contentLogo={contentLogo} />\n\t\t\t\t\t<div className=\"notification-card__body_text\">{details}</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<NotificationCardBodyActions notification={notification} />\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -4,11 +4,12 @@ import { NotificationCardHeaderLogo } from "./NotificationCardHeaderLogo";
|
|
|
4
4
|
import { NotificationsContext } from "../../../notificationsContext";
|
|
5
5
|
import { SelectionMode } from "../../../constants";
|
|
6
6
|
import { CheckButton } from "../CheckButton";
|
|
7
|
+
import { ErrorBoundary } from "../../../../common/ErrorBoundary";
|
|
7
8
|
export const NotificationCardHeaderShell = ({ notification, removeNotification, uiContext = "center", children }) => {
|
|
8
9
|
const notificationsContext = useContext(NotificationsContext);
|
|
9
10
|
const { selectionMode } = notificationsContext;
|
|
10
11
|
return (React.createElement("div", { className: "notification-card__header" },
|
|
11
|
-
children ? (React.createElement(
|
|
12
|
+
children ? (React.createElement(ErrorBoundary, null,
|
|
12
13
|
selectionMode === SelectionMode.SELECTION ? React.createElement(CheckButton, { notification: notification }) : React.createElement(React.Fragment, null),
|
|
13
14
|
children)) : (React.createElement(React.Fragment, null,
|
|
14
15
|
selectionMode === SelectionMode.SELECTION ? (React.createElement(CheckButton, { notification: notification })) : (React.createElement(NotificationCardHeaderLogo, { headerLogo: notification.headerLogo })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCardHeaderShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationCardHeaderShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAIjE,MAAM,CAAC,MAAM,2BAA2B,GAInC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7E,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,aAAa,EAAE,GAAG,oBAAoB,CAAC;IAE/C,OAAO,CACN,6BAAK,SAAS,EAAC,2BAA2B;QACxC,QAAQ,CAAC,CAAC,CAAC,CACX,oBAAC,aAAa;YACZ,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,yCAAK;YAC/F,QAAQ,CACM,CAChB,CAAC,CAAC,CAAC,CACH;YACE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAC5C,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAC3C,CAAC,CAAC,CAAC,CACH,oBAAC,0BAA0B,IAAC,UAAU,EAAE,YAAY,CAAC,UAAU,GAAI,CACnE;YACD,6BAAK,SAAS,EAAC,0BAA0B,IAAE,YAAY,CAAC,KAAK,CAAO,CAClE,CACH;QACD,oBAAC,8BAA8B,IAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useContext } from \"react\";\nimport { NotificationCardHeaderControls } from \"./NotificationCardHeaderControls\";\nimport { NotificationCardHeaderLogo } from \"./NotificationCardHeaderLogo\";\nimport { NotificationsContext } from \"../../../notificationsContext\";\nimport { SelectionMode } from \"../../../constants\";\nimport { CheckButton } from \"../CheckButton\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { ErrorBoundary } from \"../../../../common/ErrorBoundary\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const NotificationCardHeaderShell: React.FunctionComponent<{\n\tnotification: INotification;\n\tuiContext: string;\n\tremoveNotification: Function;\n}> = ({ notification, removeNotification, uiContext = \"center\", children }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { selectionMode } = notificationsContext;\n\n\treturn (\n\t\t<div className=\"notification-card__header\">\n\t\t\t{children ? (\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? <CheckButton notification={notification} /> : <></>}\n\t\t\t\t\t{children}\n\t\t\t\t</ErrorBoundary>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\n\t\t\t\t\t\t<CheckButton notification={notification} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<NotificationCardHeaderLogo headerLogo={notification.headerLogo} />\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"notification-card__title\">{notification.title}</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<NotificationCardHeaderControls\n\t\t\t\tnotification={notification}\n\t\t\t\tremoveNotification={removeNotification}\n\t\t\t\tuiContext={uiContext}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react";
|
|
2
2
|
import { isToday, isYesterday, isThisWeek } from "date-fns";
|
|
3
|
+
// Context
|
|
3
4
|
import { NotificationsContext } from "../../notificationsContext";
|
|
5
|
+
// Components
|
|
4
6
|
import { NotificationCardShell } from "../shared/NotificationCardShell";
|
|
5
7
|
import NoNotifications from "../NoNotifications";
|
|
8
|
+
// Utils
|
|
6
9
|
import { getActiveFilter, searchNotifications } from "../../utils";
|
|
10
|
+
import { ErrorBoundary } from "../../../common/ErrorBoundary";
|
|
7
11
|
var Periods;
|
|
8
12
|
(function (Periods) {
|
|
9
13
|
Periods["TODAY"] = "today";
|
|
@@ -75,10 +79,11 @@ export const CardView = (props) => {
|
|
|
75
79
|
.sort((a, b) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt))
|
|
76
80
|
.filter((notification) => (activeFilter.action === "snoozed" ? notification.isSnoozed : !notification.isSnoozed))
|
|
77
81
|
.map((notification, index) => {
|
|
78
|
-
const
|
|
79
|
-
return (React.createElement("div", { key:
|
|
82
|
+
const key = `${index}_${notification.id ? notification.id : notification.issuedAt}`;
|
|
83
|
+
return (React.createElement("div", { key: key },
|
|
80
84
|
index === 0 ? renderSeparatorLabel(period) : null,
|
|
81
|
-
React.createElement(
|
|
85
|
+
React.createElement(ErrorBoundary, { key: key },
|
|
86
|
+
React.createElement(NotificationCardComponent, { key: notification.id, notification: notification, removeNotification: () => { }, uiContext: "center" })),
|
|
82
87
|
React.createElement("div", { className: "divider" }, "\u00A0")));
|
|
83
88
|
});
|
|
84
89
|
return isEmpty(byPeriodNotifications, activeFilter.action === "snoozed") ? (React.createElement(NoNotifications, null)) : (React.createElement(React.Fragment, null, Object.keys(byPeriodNotifications).map((period) => renderNotificationsBlock(period))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/CardView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CardView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/CardView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO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CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QACpF,OAAO,CACN,6BAAK,GAAG,EAAE,GAAG;YACX,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;YAClD,oBAAC,aAAa,IAAC,GAAG,EAAE,GAAG;gBACtB,oBAAC,yBAAyB,IACzB,GAAG,EAAE,YAAY,CAAC,EAAE,EACpB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC,EAC5B,SAAS,EAAE,QAAQ,GAClB,CACa;YAChB,6BAAK,SAAS,EAAC,SAAS,aAAa,CAChC,CACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC,qBAAqB,EAAE,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAC1E,oBAAC,eAAe,OAAG,CACnB,CAAC,CAAC,CAAC,CACH,0CAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAiB,CAAC,CAAC,CAAI,CACtG,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { isToday, isYesterday, isThisWeek } from \"date-fns\";\n\n// Types\nimport { NotificationCardViewProps } from \"../../types\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Components\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport NoNotifications from \"../NoNotifications\";\n\n// Utils\nimport { getActiveFilter, searchNotifications } from \"../../utils\";\n\nimport { services } from \"@finsemble/finsemble-api\";\nimport { ErrorBoundary } from \"../../../common/ErrorBoundary\";\n\ntype INotification = services.notification.types.INotification;\n\nenum Periods {\n\tTODAY = \"today\",\n\tTHIS_WEEK = \"thisWeek\",\n\tYESTERDAY = \"yesterday\",\n\tOLDER = \"older\",\n}\n\nconst isEmpty = (byPeriodNotifications: Record<Periods, INotification[]>, accountForSnooze: boolean) => {\n\tif (accountForSnooze) {\n\t\treturn Object.values(byPeriodNotifications).every((value: INotification[]) => value.length === 0);\n\t} else {\n\t\treturn Object.values(byPeriodNotifications).every(\n\t\t\t(value: INotification[]) =>\n\t\t\t\tvalue.length === 0 || value.filter((notification: INotification) => !notification.isSnoozed).length === 0\n\t\t);\n\t}\n};\n\nexport const CardView: React.FunctionComponent<NotificationCardViewProps> = (props: NotificationCardViewProps) => {\n\tconst { notifications } = props;\n\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;\n\tconst activeFilter = getActiveFilter(drawerControlProps);\n\n\tconst byPeriodNotifications: Record<Periods, INotification[]> = {\n\t\ttoday: [],\n\t\tyesterday: [],\n\t\tthisWeek: [],\n\t\tolder: [],\n\t};\n\n\tuseEffect(() => {\n\t\tif (searchString === \"\") {\n\t\t\tsetFilteredNotifications(notifications);\n\t\t} else {\n\t\t\tsetFilteredNotifications(searchNotifications(notifications, searchString));\n\t\t}\n\t}, [searchString, notifications]);\n\n\tconst controlFilteredNotifications = activeFilter ? activeFilter.run?.(filteredNotifications) : [];\n\n\tcontrolFilteredNotifications.reduce((accumulator: any, notification: INotification) => {\n\t\tconst notificationDate: number = Date.parse(notification.issuedAt);\n\t\tif (isToday(notificationDate)) {\n\t\t\taccumulator.today.push(notification);\n\t\t} else if (isYesterday(notificationDate)) {\n\t\t\taccumulator.yesterday.push(notification);\n\t\t} else if (isThisWeek(notificationDate)) {\n\t\t\taccumulator.thisWeek.push(notification);\n\t\t} else {\n\t\t\taccumulator.older.push(notification);\n\t\t}\n\t\treturn accumulator;\n\t}, byPeriodNotifications);\n\n\tconst NotificationCardComponent = props.notificationCard ? props.notificationCard : NotificationCardShell;\n\n\tconst renderSeparatorLabel = (period: string) => {\n\t\tif (period === Periods.TODAY) {\n\t\t\treturn <p className=\"notification-day\">Today</p>;\n\t\t} else if (period === Periods.YESTERDAY) {\n\t\t\treturn <p className=\"notification-day\">Yesterday</p>;\n\t\t} else if (period === Periods.THIS_WEEK) {\n\t\t\treturn <p className=\"notification-day\">This Week</p>;\n\t\t} else {\n\t\t\treturn <p className=\"notification-day\">Older</p>;\n\t\t}\n\t};\n\n\tconst renderNotificationsBlock = (period: Periods) =>\n\t\tbyPeriodNotifications[period]\n\t\t\t.sort((a: INotification, b: INotification) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt))\n\t\t\t.filter((notification) => (activeFilter.action === \"snoozed\" ? notification.isSnoozed : !notification.isSnoozed))\n\t\t\t.map((notification, index) => {\n\t\t\t\tconst key = `${index}_${notification.id ? notification.id : notification.issuedAt}`;\n\t\t\t\treturn (\n\t\t\t\t\t<div key={key}>\n\t\t\t\t\t\t{index === 0 ? renderSeparatorLabel(period) : null}\n\t\t\t\t\t\t<ErrorBoundary key={key}>\n\t\t\t\t\t\t\t<NotificationCardComponent\n\t\t\t\t\t\t\t\tkey={notification.id}\n\t\t\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\t\t\tremoveNotification={() => {}}\n\t\t\t\t\t\t\t\tuiContext={\"center\"}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t\t<div className=\"divider\"> </div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t});\n\n\treturn isEmpty(byPeriodNotifications, activeFilter.action === \"snoozed\") ? (\n\t\t<NoNotifications />\n\t) : (\n\t\t<>{Object.keys(byPeriodNotifications).map((period) => renderNotificationsBlock(period as Periods))}</>\n\t);\n};\n\nexport default CardView;\n"]}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import React, { useContext, useState, useEffect } from "react";
|
|
2
2
|
import { format, differenceInMilliseconds, parseISO, addSeconds } from "date-fns";
|
|
3
|
+
// Context
|
|
3
4
|
import { NotificationsContext } from "../../notificationsContext";
|
|
5
|
+
// Components
|
|
4
6
|
import IconButton from "../shared/IconButton";
|
|
5
7
|
import NoNotifications from "../NoNotifications";
|
|
6
8
|
import OverflowMenu, { OverflowMenuActions, renderOverflowMenuAction } from "../shared/OverflowMenu";
|
|
7
9
|
import { CheckButton } from "../shared/CheckButton";
|
|
10
|
+
// Utils
|
|
8
11
|
import { getActiveFilter, getMostRecentAction, isNewNotification, isReNotification, searchNotifications, } from "../../utils";
|
|
9
12
|
import { NotificationCardHeaderLogo } from "../shared/notificationCard/NotificationCardHeaderLogo";
|
|
13
|
+
// Constants
|
|
10
14
|
import { SelectionMode } from "../../constants";
|
|
15
|
+
import { ErrorBoundary } from "../../../common/ErrorBoundary";
|
|
11
16
|
const ListHeaderComponent = () => (React.createElement("div", { className: "list-header__container" },
|
|
12
17
|
React.createElement("div", { className: "list-header_cell" }, "Received"),
|
|
13
18
|
React.createElement("div", { className: "list-header_cell" }, "App"),
|
|
@@ -25,6 +30,8 @@ export const NotificationListRowShell = ({ notification, newNotificationHaloPeri
|
|
|
25
30
|
const [isMuteFilterApplied, setIsMuteFilterApplied] = useState(muteFilters
|
|
26
31
|
? muteFilters.some((filter) => filter.source === notification.source && filter.type === notification.type)
|
|
27
32
|
: false);
|
|
33
|
+
// effect needed as the newNotificationHaloPeriodSeconds is fecthed asynchronously in the parent component
|
|
34
|
+
// and sometimes at the first render, this value is still 0
|
|
28
35
|
useEffect(() => {
|
|
29
36
|
setIsNew(isNewNotification(notification, newNotificationHaloPeriodSeconds));
|
|
30
37
|
}, [newNotificationHaloPeriodSeconds]);
|
|
@@ -105,11 +112,13 @@ export const NotificationListRowShell = ({ notification, newNotificationHaloPeri
|
|
|
105
112
|
const ListView = ({ notificationHeaderRow, notificationListRow, notifications, }) => {
|
|
106
113
|
var _a;
|
|
107
114
|
const notificationsContext = useContext(NotificationsContext);
|
|
115
|
+
// The context will be used to filter the notifications
|
|
108
116
|
const { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;
|
|
109
117
|
const activeFilter = getActiveFilter(drawerControlProps);
|
|
110
118
|
const [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);
|
|
111
119
|
const NotificationHeaderRow = notificationHeaderRow || ListHeaderComponent;
|
|
112
120
|
const NotificationListRow = notificationListRow || NotificationListRowShell;
|
|
121
|
+
// Sets the current default preference
|
|
113
122
|
useEffect(() => {
|
|
114
123
|
async function getNotificationsPreferences() {
|
|
115
124
|
return await FSBL.Clients.NotificationClient.getPreferences();
|
|
@@ -133,7 +142,8 @@ const ListView = ({ notificationHeaderRow, notificationListRow, notifications, }
|
|
|
133
142
|
React.createElement(NotificationHeaderRow, null),
|
|
134
143
|
controlFilteredNotifications.map((notification, index) => {
|
|
135
144
|
const key = `${index}_${notification.id ? notification.id : notification.issuedAt}`;
|
|
136
|
-
return (React.createElement(
|
|
145
|
+
return (React.createElement(ErrorBoundary, { key: key },
|
|
146
|
+
React.createElement(NotificationListRow, { key: key, notification: notification, newNotificationHaloPeriodSeconds: newNotificationHaloPeriodSeconds })));
|
|
137
147
|
})));
|
|
138
148
|
};
|
|
139
149
|
export default ListView;
|