@finsemble/finsemble-ui 6.1.1 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/package.json +1 -1
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +219 -219
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +594 -594
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +565 -565
- package/react/assets/css/windowTitleBar.css +619 -619
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +117 -117
- package/react/components/common/css/application-list.css +47 -47
- package/react/components/common/css/button.css +164 -164
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +49 -49
- package/react/components/common/css/header.css +43 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +128 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +68 -68
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +125 -125
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindows.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +94 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +2 -2
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
- package/react/components/smartDesktopDesigner/css/applications.css +89 -89
- package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +163 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
- package/react/components/smartDesktopDesigner/css/nav.css +93 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
- package/react/components/smartDesktopDesigner/css/styles.css +179 -179
- package/react/components/smartDesktopDesigner/css/views.css +16 -16
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +3 -3
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +94 -94
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/components/Checkbox.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { Menu } from \"./Menu\";\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { Menu } from \"./Menu\";\nexport { MenuContent } from \"./MenuContent\";\nexport { MenuItem } from \"./MenuItem\";\nexport { MenuShell } from \"./MenuShell\";\nexport { MenuToggle } from \"./MenuToggle\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboardNavigation.js","sourceRoot":"","sources":["../../../src/components/menu/keyboardNavigation.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,YAAY,EAAE,GAAQ,IAAI,CAAC,OAAO,CAAC;AAmB3C,MAAM,OAAO,kBAAkB;IAc9B,YAAY,QAAgB,EAAE,SAAiB;QATvC,iBAAY,GAAuB,SAAS,CAAC;QAE7C,iBAAY,GAAW,CAAC,CAA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AC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9D,YAAY,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC7D,YAAY,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC;CACD","sourcesContent":["const { HotkeyClient }: any = FSBL.Clients;\r\n\r\n/**\r\n * Keyboard navigation allows the end user to navigate through menus using\r\n * cursor keys and to select items using the enter key.\r\n *\r\n * This is stateful. As implemented in MenuPortal, the currently selected\r\n * menu item will remain selected between menu opens and closes.\r\n *\r\n * When an element is selected then the keyboard navigation state is reset\r\n * so that the user will begin again with the first item.\r\n *\r\n * @param childWin Main window or child window reference.\r\n * @param className Selector of elements to apply navigation on.\r\n * @example\r\n * const keyboardNav = KeyboardNavigation(window, \".menu-item\");\r\n * keyboardNav.attach() // enable navigation\r\n * keyboardNav.detach() // disable navigation\r\n */\r\nexport class KeyboardNavigation {\r\n\tprivate childWin: Window;\r\n\r\n\tprivate className: string;\r\n\r\n\tprivate selectedItem: number | undefined = undefined;\r\n\r\n\tprivate selectedIcon: number = -1;\r\n\r\n\t/**\r\n\t *\r\n\t * @param childWin Main window or child window reference\r\n\t * @param className The selector string e.g .menu-item\r\n\t */\r\n\tconstructor(childWin: Window, className: string) {\r\n\t\tthis.childWin = childWin;\r\n\t\tthis.className = className;\r\n\t\tthis.onArrowDown = this.onArrowDown.bind(this);\r\n\t\tthis.onArrowUp = this.onArrowUp.bind(this);\r\n\t\tthis.onArrowRight = this.onArrowRight.bind(this);\r\n\t\tthis.onArrowLeft = this.onArrowLeft.bind(this);\r\n\t\tthis.clickOnItem = this.clickOnItem.bind(this);\r\n\t\tthis.focusOnFirst = this.focusOnFirst.bind(this);\r\n\t\tthis.focusOnLast = this.focusOnLast.bind(this);\r\n\t\tthis.resetFocusOnDOMChanges();\r\n\t}\r\n\r\n\t/**\r\n\t * A mutation observer to watch changes in the DOM\r\n\t * and set the selectedIndex to undefined when changes\r\n\t * observed. We want to start focusing from element with index 0\r\n\t * when the elements order changes.\r\n\t */\r\n\tprivate resetFocusOnDOMChanges() {\r\n\t\tnew MutationObserver(() => {\r\n\t\t\t// Reset selectedIndex when elements added or removed\r\n\t\t\t// from the DOM. The motivation behind this was an issue\r\n\t\t\t// with Brad's search menu where the order of focus is\r\n\t\t\t// messed up when his list of result changes.\r\n\t\t\tthis.selectedItem = undefined;\r\n\t\t}).observe(this.childWin.document.body, {\r\n\t\t\tchildList: true,\r\n\t\t\tcharacterData: false,\r\n\t\t\tsubtree: true,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Returns list of elements\r\n\t */\r\n\tprivate getElements() {\r\n\t\treturn this.childWin.document.querySelectorAll(this.className);\r\n\t}\r\n\r\n\tprivate getMenuItemIcons(index: number) {\r\n\t\tconst menuItems = this.getElements();\r\n\t\treturn menuItems[index].querySelectorAll(\".menu-item-icon\");\r\n\t}\r\n\r\n\t/**\r\n\t * Remove all focus classes.\r\n\t */\r\n\tprivate removeAllFocus() {\r\n\t\tconst menuItems = this.getElements();\r\n\t\tmenuItems.forEach((item: Element, key: number) => {\r\n\t\t\titem.removeAttribute(\"focused\");\r\n\t\t\tconst icons = this.getMenuItemIcons(key);\r\n\t\t\ticons.forEach((icon: Element) => {\r\n\t\t\t\ticon.removeAttribute(\"focused\");\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the focus on a menu item\r\n\t * @param index The index of the menu item in the list\r\n\t */\r\n\tprivate focusOn(index: number) {\r\n\t\tthis.removeAllFocus();\r\n\r\n\t\tconst menuItems = this.getElements();\r\n\t\t// Menu could have no items\r\n\t\tif (!menuItems.length) return;\r\n\t\t// Focus on element and scroll if needed\r\n\t\tmenuItems[index].setAttribute(\"focused\", \"true\");\r\n\t\t(menuItems[index] as any).scrollIntoViewIfNeeded({\r\n\t\t\tbehavior: \"smooth\",\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the focus on a menu item's icon\r\n\t * @param index The index of the menu item in the list\r\n\t * @param iconIndex The index of the menu item's icon (-1 = menu text, not icon)\r\n\t */\r\n\tprivate focusOnIcon(index: number, iconIndex: number) {\r\n\t\tthis.removeAllFocus();\r\n\r\n\t\tconst menuItems = this.getElements();\r\n\t\t// Menu could have no items\r\n\t\tif (!menuItems.length) return;\r\n\r\n\t\tconst icons = this.getMenuItemIcons(index);\r\n\t\t// Defend against possible js runtime error\r\n\t\tif (icons.length < iconIndex) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// scroll if needed\r\n\t\t(menuItems[index] as any).scrollIntoViewIfNeeded({\r\n\t\t\tbehavior: \"smooth\",\r\n\t\t});\r\n\t\t// Focus on menu item text, if relevant\r\n\t\tif (iconIndex === -1) {\r\n\t\t\tmenuItems[index].setAttribute(\"focused\", \"true\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ticons[iconIndex].setAttribute(\"focused\", \"true\");\r\n\t}\r\n\r\n\t/**\r\n\t * Simulates mouse events\r\n\t */\r\n\tprivate clickOnItem() {\r\n\t\tthis.removeAllFocus();\r\n\t\tif (this.selectedItem !== undefined) {\r\n\t\t\tconst elements = this.getElements();\r\n\t\t\tconst selectedItem = elements[this.selectedItem as any];\r\n\t\t\t[\"mousedown\", \"click\", \"mouseup\"].forEach((event) => {\r\n\t\t\t\tif (this.selectedIcon > -1) {\r\n\t\t\t\t\tconst icons = this.getMenuItemIcons(this.selectedItem as any);\r\n\t\t\t\t\tconst selectedIcon = icons[this.selectedIcon as any];\r\n\t\t\t\t\tif (selectedIcon) {\r\n\t\t\t\t\t\tselectedIcon.dispatchEvent(\r\n\t\t\t\t\t\t\tnew MouseEvent(event, {\r\n\t\t\t\t\t\t\t\tview: this.childWin,\r\n\t\t\t\t\t\t\t\tbubbles: true,\r\n\t\t\t\t\t\t\t\tcancelable: true,\r\n\t\t\t\t\t\t\t\tbuttons: 1,\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (selectedItem && selectedItem.dispatchEvent) {\r\n\t\t\t\t\tselectedItem.dispatchEvent(\r\n\t\t\t\t\t\tnew MouseEvent(event, {\r\n\t\t\t\t\t\t\tview: this.childWin,\r\n\t\t\t\t\t\t\tbubbles: true,\r\n\t\t\t\t\t\t\tcancelable: true,\r\n\t\t\t\t\t\t\tbuttons: 1,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t/**\r\n\t\t\t * When an element is selected we reset the menu to focus on the first item.\r\n\t\t\t * Per Dan Nicolai UX specialist.\r\n\t\t\t */\r\n\t\t\tthis.selectedItem = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when a user presses on the arrow up key\r\n\t */\r\n\tprivate onArrowUp() {\r\n\t\t// On first key up/down press, we want\r\n\t\t// the focus to be on first item\r\n\t\tif (this.selectedItem === undefined) {\r\n\t\t\tthis.selectedItem = 0;\r\n\t\t\treturn this.focusOn(0);\r\n\t\t}\r\n\t\t// Set the focus on the previous item\r\n\t\tthis.selectedItem--;\r\n\t\tif (this.selectedItem < 0) {\r\n\t\t\t// If we are back to the begining\r\n\t\t\t// set the focus on last item\r\n\t\t\tthis.selectedItem = this.getElements().length - 1;\r\n\t\t}\r\n\t\tthis.focusOn(this.selectedItem);\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when user press the arrow down key\r\n\t */\r\n\tprivate onArrowDown() {\r\n\t\tif (this.selectedItem === undefined) {\r\n\t\t\tthis.selectedItem = 0;\r\n\t\t\treturn this.focusOn(0);\r\n\t\t}\r\n\t\t// The the focus on the next item\r\n\t\tthis.selectedItem++;\r\n\t\t// If we reached the end, then go back to first item\r\n\t\tif (this.selectedItem === this.getElements().length) {\r\n\t\t\tthis.selectedItem = 0;\r\n\t\t}\r\n\t\tthis.focusOn(this.selectedItem);\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when user press the arrow right key\r\n\t */\r\n\tprivate onArrowRight() {\r\n\t\tif (this.selectedItem === undefined) {\r\n\t\t\tthis.selectedItem = 0;\r\n\t\t\treturn this.focusOn(0);\r\n\t\t}\r\n\r\n\t\tconst menuItems = this.getElements();\r\n\t\t// Menu could have no items\r\n\t\tif (!menuItems.length) return;\r\n\r\n\t\tconst icons = this.getMenuItemIcons(this.selectedItem);\r\n\t\tif (icons.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.selectedIcon++;\r\n\t\tif (this.selectedIcon === icons.length) {\r\n\t\t\tthis.selectedIcon = -1;\r\n\t\t}\r\n\t\tthis.focusOnIcon(this.selectedItem, this.selectedIcon);\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when user press the arrow left key\r\n\t */\r\n\tprivate onArrowLeft() {\r\n\t\tif (this.selectedItem === undefined) {\r\n\t\t\tthis.selectedItem = 0;\r\n\t\t\treturn this.focusOn(0);\r\n\t\t}\r\n\r\n\t\tconst menuItems = this.getElements();\r\n\t\t// Menu could have no items\r\n\t\tif (!menuItems.length) return;\r\n\r\n\t\tconst icons = this.getMenuItemIcons(this.selectedItem);\r\n\t\tif (icons.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.selectedIcon--;\r\n\t\tif (this.selectedIcon === icons.length) {\r\n\t\t\tthis.selectedIcon = -1;\r\n\t\t}\r\n\t\tthis.focusOnIcon(this.selectedItem, this.selectedIcon);\r\n\t}\r\n\r\n\tprivate focusOnFirst() {\r\n\t\tthis.selectedItem = 0;\r\n\t\tthis.selectedIcon = -1;\r\n\t\tthis.focusOn(0);\r\n\t}\r\n\r\n\tprivate focusOnLast() {\r\n\t\tthis.selectedIcon = -1;\r\n\t\tconst { length } = this.getElements();\r\n\t\tif (length) {\r\n\t\t\tthis.selectedItem = length - 1;\r\n\t\t\tthis.focusOn(length - 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adds global hot keys for up/down arrow\r\n\t */\r\n\tpublic attach() {\r\n\t\t// Register hotkeys\r\n\t\tHotkeyClient.addGlobalHotkey([\"up arrow\"], this.onArrowUp);\r\n\t\tHotkeyClient.addGlobalHotkey([\"right arrow\"], this.onArrowRight);\r\n\t\tHotkeyClient.addGlobalHotkey([\"left arrow\"], this.onArrowLeft);\r\n\t\tHotkeyClient.addGlobalHotkey([\"down arrow\"], this.onArrowDown);\r\n\t\tHotkeyClient.addGlobalHotkey([\"return\"], this.clickOnItem);\r\n\t\tHotkeyClient.addGlobalHotkey([\"home\"], this.focusOnFirst);\r\n\t\tHotkeyClient.addGlobalHotkey([\"end\"], this.focusOnLast);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove global got keys for up/down arrow\r\n\t */\r\n\tpublic detach() {\r\n\t\t// Remove registered hotkeys\r\n\t\tHotkeyClient.removeGlobalHotkey([\"up arrow\"], this.onArrowUp);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"right arrow\"], this.onArrowRight);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"left arrow\"], this.onArrowLeft);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"down arrow\"], this.onArrowDown);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"return\"], this.clickOnItem);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"home\"], this.focusOnFirst);\r\n\t\tHotkeyClient.removeGlobalHotkey([\"end\"], this.focusOnLast);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"keyboardNavigation.js","sourceRoot":"","sources":["../../../src/components/menu/keyboardNavigation.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,YAAY,EAAE,GAAQ,IAAI,CAAC,OAAO,CAAC;AAmB3C,MAAM,OAAO,kBAAkB;IAc9B,YAAY,QAAgB,EAAE,SAAiB;QATvC,iBAAY,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C,WAAW,CAAC,CAAC;QAClE,YAAY,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9D,YAAY,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC7D,YAAY,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC;CACD","sourcesContent":["const { HotkeyClient }: any = FSBL.Clients;\n\n/**\n * Keyboard navigation allows the end user to navigate through menus using\n * cursor keys and to select items using the enter key.\n *\n * This is stateful. As implemented in MenuPortal, the currently selected\n * menu item will remain selected between menu opens and closes.\n *\n * When an element is selected then the keyboard navigation state is reset\n * so that the user will begin again with the first item.\n *\n * @param childWin Main window or child window reference.\n * @param className Selector of elements to apply navigation on.\n * @example\n * const keyboardNav = KeyboardNavigation(window, \".menu-item\");\n * keyboardNav.attach() // enable navigation\n * keyboardNav.detach() // disable navigation\n */\nexport class KeyboardNavigation {\n\tprivate childWin: Window;\n\n\tprivate className: string;\n\n\tprivate selectedItem: number | undefined = undefined;\n\n\tprivate selectedIcon: number = -1;\n\n\t/**\n\t *\n\t * @param childWin Main window or child window reference\n\t * @param className The selector string e.g .menu-item\n\t */\n\tconstructor(childWin: Window, className: string) {\n\t\tthis.childWin = childWin;\n\t\tthis.className = className;\n\t\tthis.onArrowDown = this.onArrowDown.bind(this);\n\t\tthis.onArrowUp = this.onArrowUp.bind(this);\n\t\tthis.onArrowRight = this.onArrowRight.bind(this);\n\t\tthis.onArrowLeft = this.onArrowLeft.bind(this);\n\t\tthis.clickOnItem = this.clickOnItem.bind(this);\n\t\tthis.focusOnFirst = this.focusOnFirst.bind(this);\n\t\tthis.focusOnLast = this.focusOnLast.bind(this);\n\t\tthis.resetFocusOnDOMChanges();\n\t}\n\n\t/**\n\t * A mutation observer to watch changes in the DOM\n\t * and set the selectedIndex to undefined when changes\n\t * observed. We want to start focusing from element with index 0\n\t * when the elements order changes.\n\t */\n\tprivate resetFocusOnDOMChanges() {\n\t\tnew MutationObserver(() => {\n\t\t\t// Reset selectedIndex when elements added or removed\n\t\t\t// from the DOM. The motivation behind this was an issue\n\t\t\t// with Brad's search menu where the order of focus is\n\t\t\t// messed up when his list of result changes.\n\t\t\tthis.selectedItem = undefined;\n\t\t}).observe(this.childWin.document.body, {\n\t\t\tchildList: true,\n\t\t\tcharacterData: false,\n\t\t\tsubtree: true,\n\t\t});\n\t}\n\n\t/**\n\t * Returns list of elements\n\t */\n\tprivate getElements() {\n\t\treturn this.childWin.document.querySelectorAll(this.className);\n\t}\n\n\tprivate getMenuItemIcons(index: number) {\n\t\tconst menuItems = this.getElements();\n\t\treturn menuItems[index].querySelectorAll(\".menu-item-icon\");\n\t}\n\n\t/**\n\t * Remove all focus classes.\n\t */\n\tprivate removeAllFocus() {\n\t\tconst menuItems = this.getElements();\n\t\tmenuItems.forEach((item: Element, key: number) => {\n\t\t\titem.removeAttribute(\"focused\");\n\t\t\tconst icons = this.getMenuItemIcons(key);\n\t\t\ticons.forEach((icon: Element) => {\n\t\t\t\ticon.removeAttribute(\"focused\");\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Sets the focus on a menu item\n\t * @param index The index of the menu item in the list\n\t */\n\tprivate focusOn(index: number) {\n\t\tthis.removeAllFocus();\n\n\t\tconst menuItems = this.getElements();\n\t\t// Menu could have no items\n\t\tif (!menuItems.length) return;\n\t\t// Focus on element and scroll if needed\n\t\tmenuItems[index].setAttribute(\"focused\", \"true\");\n\t\t(menuItems[index] as any).scrollIntoViewIfNeeded({\n\t\t\tbehavior: \"smooth\",\n\t\t});\n\t}\n\n\t/**\n\t * Sets the focus on a menu item's icon\n\t * @param index The index of the menu item in the list\n\t * @param iconIndex The index of the menu item's icon (-1 = menu text, not icon)\n\t */\n\tprivate focusOnIcon(index: number, iconIndex: number) {\n\t\tthis.removeAllFocus();\n\n\t\tconst menuItems = this.getElements();\n\t\t// Menu could have no items\n\t\tif (!menuItems.length) return;\n\n\t\tconst icons = this.getMenuItemIcons(index);\n\t\t// Defend against possible js runtime error\n\t\tif (icons.length < iconIndex) {\n\t\t\treturn;\n\t\t}\n\n\t\t// scroll if needed\n\t\t(menuItems[index] as any).scrollIntoViewIfNeeded({\n\t\t\tbehavior: \"smooth\",\n\t\t});\n\t\t// Focus on menu item text, if relevant\n\t\tif (iconIndex === -1) {\n\t\t\tmenuItems[index].setAttribute(\"focused\", \"true\");\n\t\t\treturn;\n\t\t}\n\n\t\ticons[iconIndex].setAttribute(\"focused\", \"true\");\n\t}\n\n\t/**\n\t * Simulates mouse events\n\t */\n\tprivate clickOnItem() {\n\t\tthis.removeAllFocus();\n\t\tif (this.selectedItem !== undefined) {\n\t\t\tconst elements = this.getElements();\n\t\t\tconst selectedItem = elements[this.selectedItem as any];\n\t\t\t[\"mousedown\", \"click\", \"mouseup\"].forEach((event) => {\n\t\t\t\tif (this.selectedIcon > -1) {\n\t\t\t\t\tconst icons = this.getMenuItemIcons(this.selectedItem as any);\n\t\t\t\t\tconst selectedIcon = icons[this.selectedIcon as any];\n\t\t\t\t\tif (selectedIcon) {\n\t\t\t\t\t\tselectedIcon.dispatchEvent(\n\t\t\t\t\t\t\tnew MouseEvent(event, {\n\t\t\t\t\t\t\t\tview: this.childWin,\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t\t\t\tbuttons: 1,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (selectedItem && selectedItem.dispatchEvent) {\n\t\t\t\t\tselectedItem.dispatchEvent(\n\t\t\t\t\t\tnew MouseEvent(event, {\n\t\t\t\t\t\t\tview: this.childWin,\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t\t\tbuttons: 1,\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\t/**\n\t\t\t * When an element is selected we reset the menu to focus on the first item.\n\t\t\t * Per Dan Nicolai UX specialist.\n\t\t\t */\n\t\t\tthis.selectedItem = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Invoked when a user presses on the arrow up key\n\t */\n\tprivate onArrowUp() {\n\t\t// On first key up/down press, we want\n\t\t// the focus to be on first item\n\t\tif (this.selectedItem === undefined) {\n\t\t\tthis.selectedItem = 0;\n\t\t\treturn this.focusOn(0);\n\t\t}\n\t\t// Set the focus on the previous item\n\t\tthis.selectedItem--;\n\t\tif (this.selectedItem < 0) {\n\t\t\t// If we are back to the begining\n\t\t\t// set the focus on last item\n\t\t\tthis.selectedItem = this.getElements().length - 1;\n\t\t}\n\t\tthis.focusOn(this.selectedItem);\n\t}\n\n\t/**\n\t * Invoked when user press the arrow down key\n\t */\n\tprivate onArrowDown() {\n\t\tif (this.selectedItem === undefined) {\n\t\t\tthis.selectedItem = 0;\n\t\t\treturn this.focusOn(0);\n\t\t}\n\t\t// The the focus on the next item\n\t\tthis.selectedItem++;\n\t\t// If we reached the end, then go back to first item\n\t\tif (this.selectedItem === this.getElements().length) {\n\t\t\tthis.selectedItem = 0;\n\t\t}\n\t\tthis.focusOn(this.selectedItem);\n\t}\n\n\t/**\n\t * Invoked when user press the arrow right key\n\t */\n\tprivate onArrowRight() {\n\t\tif (this.selectedItem === undefined) {\n\t\t\tthis.selectedItem = 0;\n\t\t\treturn this.focusOn(0);\n\t\t}\n\n\t\tconst menuItems = this.getElements();\n\t\t// Menu could have no items\n\t\tif (!menuItems.length) return;\n\n\t\tconst icons = this.getMenuItemIcons(this.selectedItem);\n\t\tif (icons.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectedIcon++;\n\t\tif (this.selectedIcon === icons.length) {\n\t\t\tthis.selectedIcon = -1;\n\t\t}\n\t\tthis.focusOnIcon(this.selectedItem, this.selectedIcon);\n\t}\n\n\t/**\n\t * Invoked when user press the arrow left key\n\t */\n\tprivate onArrowLeft() {\n\t\tif (this.selectedItem === undefined) {\n\t\t\tthis.selectedItem = 0;\n\t\t\treturn this.focusOn(0);\n\t\t}\n\n\t\tconst menuItems = this.getElements();\n\t\t// Menu could have no items\n\t\tif (!menuItems.length) return;\n\n\t\tconst icons = this.getMenuItemIcons(this.selectedItem);\n\t\tif (icons.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectedIcon--;\n\t\tif (this.selectedIcon === icons.length) {\n\t\t\tthis.selectedIcon = -1;\n\t\t}\n\t\tthis.focusOnIcon(this.selectedItem, this.selectedIcon);\n\t}\n\n\tprivate focusOnFirst() {\n\t\tthis.selectedItem = 0;\n\t\tthis.selectedIcon = -1;\n\t\tthis.focusOn(0);\n\t}\n\n\tprivate focusOnLast() {\n\t\tthis.selectedIcon = -1;\n\t\tconst { length } = this.getElements();\n\t\tif (length) {\n\t\t\tthis.selectedItem = length - 1;\n\t\t\tthis.focusOn(length - 1);\n\t\t}\n\t}\n\n\t/**\n\t * Adds global hot keys for up/down arrow\n\t */\n\tpublic attach() {\n\t\t// Register hotkeys\n\t\tHotkeyClient.addGlobalHotkey([\"up arrow\"], this.onArrowUp);\n\t\tHotkeyClient.addGlobalHotkey([\"right arrow\"], this.onArrowRight);\n\t\tHotkeyClient.addGlobalHotkey([\"left arrow\"], this.onArrowLeft);\n\t\tHotkeyClient.addGlobalHotkey([\"down arrow\"], this.onArrowDown);\n\t\tHotkeyClient.addGlobalHotkey([\"return\"], this.clickOnItem);\n\t\tHotkeyClient.addGlobalHotkey([\"home\"], this.focusOnFirst);\n\t\tHotkeyClient.addGlobalHotkey([\"end\"], this.focusOnLast);\n\t}\n\n\t/**\n\t * Remove global got keys for up/down arrow\n\t */\n\tpublic detach() {\n\t\t// Remove registered hotkeys\n\t\tHotkeyClient.removeGlobalHotkey([\"up arrow\"], this.onArrowUp);\n\t\tHotkeyClient.removeGlobalHotkey([\"right arrow\"], this.onArrowRight);\n\t\tHotkeyClient.removeGlobalHotkey([\"left arrow\"], this.onArrowLeft);\n\t\tHotkeyClient.removeGlobalHotkey([\"down arrow\"], this.onArrowDown);\n\t\tHotkeyClient.removeGlobalHotkey([\"return\"], this.clickOnItem);\n\t\tHotkeyClient.removeGlobalHotkey([\"home\"], this.focusOnFirst);\n\t\tHotkeyClient.removeGlobalHotkey([\"end\"], this.focusOnLast);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuContext.js","sourceRoot":"","sources":["../../../src/components/menu/menuContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAgBtC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAkB,EAAqB,CAAC,CAAC","sourcesContent":["import { createContext } from \"react\";\
|
|
1
|
+
{"version":3,"file":"menuContext.js","sourceRoot":"","sources":["../../../src/components/menu/menuContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAgBtC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAkB,EAAqB,CAAC,CAAC","sourcesContent":["import { createContext } from \"react\";\n\ntype MenuContextType = {\n\tthisMenuId: string;\n\tclassName: string | undefined;\n\tmaxHeight: number;\n\tmenuWidth: number;\n\tmenuHeight: number | undefined;\n};\n\n/**\n * We initialize our context with an empty object because we know that MenuShell will\n * properly initialize our context at runtime (during the first render). We cast () to MenuContextType\n * to avoid typescript errors for any consumers of the context object. Beware that if you get a runtime error\n * then someone has probably missed an initialization in MenuShell.\n */\nexport const MenuContext = createContext<MenuContextType>({} as MenuContextType);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuHelpers.js","sourceRoot":"","sources":["../../../src/components/menu/menuHelpers.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,GAAG,GAAG,CAAC;AASvB,MAAM,CAA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,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Minimum portal height (chromium limitation)\
|
|
1
|
+
{"version":3,"file":"menuHelpers.js","sourceRoot":"","sources":["../../../src/components/menu/menuHelpers.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,GAAG,GAAG,CAAC;AASvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EACrC,MAAc,EACd,iBAA0B,EAIxB,EAAE;IAIJ,MAAM,aAAa,GAAiB,QAAQ,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAE,CAAC,YAAY,CAAC;IAI1G,MAAM,EAAE,WAAW,EAAE,GAAW,MAAM,CAAC,MAAM,CAAC;IAE9C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAClC,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC;IAMjE,MAAM,QAAQ,GAAG,IAAI,MAAM,cAAc,CAAC;IAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpD,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,CAAC,KAAK,CAAC,4CAA4C,QAAQ,GAAG,CAAC,CAAC;KACvE;IAID,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAEtF,IAAI,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAC;IAClC,IAAI,GAAG,GAAG,QAAQ,GAAG,aAAa,CAAC;IAMnC,IAAI,iBAAiB,EAAE;QACtB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAC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,CAAC,CAAC,OAAO,KAAK,MAAM,EAAE;YAC5E,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAClD,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/B;KACD;IACD,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9B,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Minimum portal height (chromium limitation)\nconst MIN_HEIGHT = 100;\n\n/**\n * Returns a drop down menu's position relative to the toolbar's current location and the\n * MenuToggle that was pressed. The dimensions returned are relative to the toolbar's\n * current monitor.\n * @param menuId The shell ID (e.g. filemenu)\n * @param menuContentHeight The height of menu contents.\n */\nexport const calculatePosition = async (\n\tmenuId: string,\n\tmenuContentHeight?: number\n): Promise<{\n\ttop: number;\n\tleft: number;\n}> => {\n\t// Rather than use window.innerHeight, we use the height of the document because Electron at times fails\n\t// to resize windows across monitors with different DPI scaling. We've worked around this by calling setShape()\n\t// to avoid a white bar at the bottom of the window, but the window DOM height is still the old height.\n\tconst toolbarHeight = (<HTMLElement>document.getElementsByClassName(\"finsemble-toolbar\")[0]).offsetHeight;\n\n\t// The monitor's available height and width is found in the window.screen object (just like Electron, less the space\n\t// taken up by the operating system toolbar)\n\tconst { availHeight }: Screen = window.screen;\n\n\tconst toolbarX = window.screenLeft;\n\tconst toolbarY = window.screenTop;\n\tconst spaceBelowToolbar = availHeight - toolbarY - toolbarHeight;\n\n\t/*\n\tGet a reference to the MenuToggle's element using querySelector to avoid having to pass\n\tReact ref all the way down here.\n\t*/\n\tconst selector = `#${menuId}-menu-toggle`;\n\tconst menuToggle = document.querySelector(selector);\n\tif (!menuToggle) {\n\t\tconsole.error(`calculatePosition() can't find selector \"${selector}\"`);\n\t}\n\n\t// Get the \"x\" coordinate of our toggle button *within* the toolbar\n\t// If for whatever reason the menuToggle can't be found, then default to an x coordinate of zero\n\tconst { x: menuToggleX } = menuToggle ? menuToggle.getBoundingClientRect() : { x: 0 };\n\n\tlet left = toolbarX + menuToggleX;\n\tlet top = toolbarY + toolbarHeight;\n\t/*\n\tCheck if we have enough space for the menu between\n\tthe toolbar and bottom edge of the screen. If not,\n\tthen reposition the menu to appear above toolbar.\n\t*/\n\tif (menuContentHeight) {\n\t\tconst menuHeight = Math.max(menuContentHeight, MIN_HEIGHT);\n\t\tif (menuHeight > spaceBelowToolbar) {\n\t\t\ttop = toolbarY - menuHeight;\n\t\t}\n\t}\n\n\treturn {\n\t\ttop,\n\t\tleft,\n\t};\n};\n\n/**\n * Calculates the height and position that a window should take based on the height necessary to display\n * the window's DOM contents without scrollbars, but not beyond the scope of the monitor itself.\n *\n * @param childWindow Window The window to calculate\n * @param menuId string The id of the menu, used for a CSS selector\n * @param [maxHeight] Maximum height for the window\n * @param [fixedHeight] Optional fixed height\n */\nexport const calculateDimensions = async (\n\tchildWindow: Window,\n\tmenuId: string,\n\tfixedHeight: number = 0,\n\tmaxHeight: number = Infinity\n): Promise<{\n\ttop: number;\n\tleft: number;\n\theight: number;\n}> => {\n\t/* Content height is essentially the offsetHeight of the window's <html> element.\n\tThis seems more reliable than summing the heights of all body children.\n\t*/\n\tconst contentHeight = childWindow.document.documentElement.offsetHeight;\n\n\t/**\n\t * Calculate the actual menu height, constrained by maximum and minimum sizes.\n\t * Zero, null or undefined are invalid maximum heights.\n\t *\n\t * Chromium imposes a 100 pixel minimum on window height.\n\t */\n\tconst CHROMIUM_MIN_HEIGHT = 100;\n\tconst minimumContentHeight = Math.max(contentHeight, CHROMIUM_MIN_HEIGHT);\n\tconst height = fixedHeight ? fixedHeight : Math.min(minimumContentHeight, maxHeight);\n\n\tconst { left, top } = await calculatePosition(menuId, height);\n\n\t// Final step, make sure the menu isn't larger than the screen itself\n\tconst { availHeight }: Screen = window.screen;\n\tconst finalHeight = Math.min(height, availHeight);\n\n\treturn {\n\t\ttop,\n\t\tleft,\n\t\theight: finalHeight,\n\t};\n};\n\n/**\n * Copy CSS elements from parent to child window. Portals operate in a new window which doesn't automatically\n * have access to the CSS from the main window, so we need to clone those elements into the menu's window\n * when it is created.\n * @param childWindow Child window reference\n */\nexport const injectCSS = (childWindow: Window): void => {\n\tconst { children }: any = document.head;\n\tconst styleElements: HTMLElement[] = [];\n\tfor (const item in children) {\n\t\t/** \n\t\t\twebpack's style-loader creates <style> tags but some versions will create <link> tags if CSS source maps are \n\t\t\tenabled (sourceMap), or if `injectType: linkTag` is configured.\n \t*/\n\t\tif (children[item].tagName === \"STYLE\" || children[item].tagName === \"LINK\") {\n\t\t\tconst newElement = children[item].cloneNode(true);\n\t\t\tstyleElements.push(newElement);\n\t\t}\n\t}\n\tstyleElements.forEach((item) => {\n\t\tchildWindow.document.head.append(item);\n\t});\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoNotifications.js","sourceRoot":"","sources":["../../../../src/components/notifications/components/NoNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,eAAe,GAA4B,GAAG,EAAE;IACrD,OAAO,CACN,6BAAK,SAAS,EAAC,kBAAkB;QAChC,6DAAkC,CAC7B,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"NoNotifications.js","sourceRoot":"","sources":["../../../../src/components/notifications/components/NoNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,eAAe,GAA4B,GAAG,EAAE;IACrD,OAAO,CACN,6BAAK,SAAS,EAAC,kBAAkB;QAChC,6DAAkC,CAC7B,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import React from \"react\";\n\nconst NoNotifications: React.FunctionComponent = () => {\n\treturn (\n\t\t<div className=\"no-notifications\">\n\t\t\t<p>No notifications to display</p>\n\t\t</div>\n\t);\n};\n\nexport default NoNotifications;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,GAAmC,CAAC,KAAY,EAAE,EAAE;IAC/D,OAAO,CACN,6BAAK,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3C,6BAAK,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAC,QAAQ,CAAO,CACnD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,GAAmC,CAAC,KAAY,EAAE,EAAE;IAC/D,OAAO,CACN,6BAAK,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3C,6BAAK,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAC,QAAQ,CAAO,CACnD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import React from \"react\";\n\ninterface Props {\n\tclassNames?: string;\n\tchildren?: React.ReactNode;\n}\n\nconst Drawer: React.FunctionComponent<Props> = (props: Props) => {\n\treturn (\n\t\t<div id=\"drawer\" className={props.classNames}>\n\t\t\t<div className=\"drawer-container\">{props.children}</div>\n\t\t</div>\n\t);\n};\n\nexport default Drawer;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications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AE,QAAQ,EAAE,WAGlG;YAEN,6BACC,SAAS,EAAC,kDAAkD,EAC5D,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,EAC9B,KAAK,EAAE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,aAGlG;YAEN,6BAAK,SAAS,EAAC,0CAA0C;gBACxD,oBAAC,UAAU,IACV,QAAQ,EAAC,gBAAgB,EACzB,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA;gBACF,oBAAC,UAAU,IACV,QAAQ,EAAC,kBAAkB,EAC3B,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA,CACG,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext } from \"react\";\
|
|
1
|
+
{"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,EAAE,QAAQ,EA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UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,aAGlG;YAEN,6BAAK,SAAS,EAAC,0CAA0C;gBACxD,oBAAC,UAAU,IACV,QAAQ,EAAC,gBAAgB,EACzB,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA;gBACF,oBAAC,UAAU,IACV,QAAQ,EAAC,kBAAkB,EAC3B,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA,CACG,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext } from \"react\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types & Constants\nimport { Control } from \"../../types\";\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\n// Hooks\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tdismissNotification,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\n\nconst DrawerControls: React.FunctionComponent = () => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tcheckedNotifications,\n\t} = notificationsContext;\n\n\tconst toggleControl = (clickedControl: Control) => {\n\t\t// If we click on the control aready active, then there's nothing to toggle and we bail out.\n\t\tif (clickedControl.action === drawerControlProps.active) return;\n\t\tdrawerControlProps.controls.map((control: Control) => {\n\t\t\tif (control.action === clickedControl.action) {\n\t\t\t\tif (drawerControlProps.active === control.action) {\n\t\t\t\t\tdelete drawerControlProps.active;\n\t\t\t\t} else {\n\t\t\t\t\tdrawerControlProps.active = control.action;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDrawerControlProps({ ...drawerControlProps });\n\t};\n\n\tconst renderControls = () => {\n\t\tlet className = \"notifications-center-controls__filter-btn\";\n\t\treturn drawerControlProps.controls.map((control: Control) => {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tkey={control.action}\n\t\t\t\t\tclassName={`${className} ${drawerControlProps.active === control.action ? \"active\" : \"\"}`}\n\t\t\t\t\tonClick={() => toggleControl(control)}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { pointerEvents: \"none\", opacity: \"0.4\" } : {}}\n\t\t\t\t>\n\t\t\t\t\t{control.label}\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\t};\n\n\tconst toggleSelect = () => {\n\t\tsetSelectionMode(\n\t\t\tselectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION\n\t\t);\n\t};\n\n\tconst readChecked = () => {\n\t\tmarkNotificationsRead(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst unreadChecked = () => {\n\t\tmarkNotificationsUnread(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst hideChecked = () => {\n\t\tdismissNotification(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst snoozeChecked = () => {\n\t\tsnoozeNotifications(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center-controls\">\n\t\t\t<div className=\"notifications-center-controls__row\">{renderControls()}</div>\n\t\t\t<div className=\"notifications-center-controls__row\">\n\t\t\t\t<div className=\"notifications-center-controls__filter-btn\" onClick={() => toggleSelect()}>\n\t\t\t\t\t<i\n\t\t\t\t\t\tclassName={selectionMode === SelectionMode.NO_SELECTION ? \"ff-check-mark\" : \"ff-close\"}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tpaddingRight: \"5px\",\n\t\t\t\t\t\t\tcolor: selectionMode === SelectionMode.NO_SELECTION ? \"var(--accent-positive)\" : \"\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\tSelect\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => readChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tMark Read\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => unreadChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tMark Unread\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => hideChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tHide\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => snoozeChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tSnooze\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"notifications-center-controls__view_mode\">\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-chart-alt-2\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.CARD ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.CARD);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-adp-hamburger\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.LIST ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.LIST);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DrawerControls;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,uBAAuB,GAAG,CAAC,EA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AAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAG/B,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\
|
|
1
|
+
{"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,UAAU,MAAM,sBAA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,CAAC,OAAO,CAAC;IAEV,MAAM,YAAY,GAAG,CAAC,EAAO,EAAE,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAG/B,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\nimport debounce from \"lodash/debounce\";\n\n// Types\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\n\n// Hooks\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\nimport { NotificationsContext } from \"../../notificationsContext\";\n\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\n\tconst goToSettings = () => {\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\tpreferencesTab: \"Notifications\",\n\t\t});\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"overflow-menu__container\">\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\n\t\t\t</div>\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">Settings</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst DrawerHeader: React.FunctionComponent<{\n\tpoppedOutStatus: boolean;\n\tpopOutToggle: Function;\n}> = ({ poppedOutStatus, popOutToggle }) => {\n\tconst [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { searchString, setSearchString } = notificationsContext;\n\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\n\n\tconst [showMenu, setShowMenu] = useState(false);\n\n\tconst closeDrawerClick = () => {\n\t\tconst publishValue = { ...notificationSubscribeMessage };\n\t\tpublishValue[\"showCenter\"] = false;\n\t\tnotificationsPublish(publishValue);\n\t};\n\n\tconst toggleMenu = () => {\n\t\tsetShowMenu(!showMenu);\n\t};\n\n\t// This is unchanged across renders\n\tconst handleSearchTerm = useRef(\n\t\tdebounce((nextValue: string) => {\n\t\t\tconst regex = /^(title|details|source):/gi;\n\t\t\tnextValue = nextValue.trim();\n\n\t\t\tconst isFilter = regex.test(nextValue);\n\t\t\tlet parsedSearchTerm = \"\";\n\n\t\t\tif (isFilter) {\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\n\t\t\t} else {\n\t\t\t\tparsedSearchTerm = nextValue;\n\t\t\t}\n\n\t\t\tif (parsedSearchTerm.length > 2) {\n\t\t\t\tsetSearchString(nextValue);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"search string is too short\");\n\t\t\t\tsetSearchString(\"\");\n\t\t\t}\n\t\t}, 400)\n\t).current;\n\n\tconst handleChange = (ev: any) => {\n\t\tconst { value: nextValue } = ev.target;\n\t\tsetSearchInputValue(nextValue);\n\t\t// Even though handleChange is created on each render and executed\n\t\t// it references the same handleSearchTerm that was created initially\n\t\thandleSearchTerm(nextValue);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center__header\">\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\n\t\t\t<input\n\t\t\t\tclassName=\"search-notifications__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder={\"Search Notifications\"}\n\t\t\t\tvalue={searchInputValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\n\t\t\t</IconButton>\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\n\t\t</div>\n\t);\n};\n\nexport default DrawerHeader;\n"]}
|
package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,gDAAgD,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,gBAAgB,EAAE,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAQlE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,uBAAuB,MAAM,kCAAkC,CAAC;AAEvE,MAAM,eAAe,GAAoC;IACxD,QAAQ,EAAE;QACT;YACC,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,CAAC,aAA8B,EAAE,EAAE;gBACvC,OAAO,aAAa,CAAC;YACtB,CAAC;SACD;QACD;YACC,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,QAAQ;YACf,GAAG,EAAE,CAAC,aAA8B,EAAE,EAAE;gBACvC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACpF,CAAC;SACD;QACD;YACC,MAAM,EAAE,MAAM;YACd,KA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AAC,EAAE,EAAE,4BAA4B,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAC,QAAQ,EAAC,aAAa,UACzG,QAAQ,CACM,CAChB;QAED,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,0BAA0B;YAC/D,oBAAC,MAAM,IAAC,UAAU,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAC5E,oBAAoB,CAAC,CAAC,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAC5E,CACsB,CACZ,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\r\n\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC, ViewMode, SelectionMode } from \"../../constants\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\n// Hooks\r\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\r\nimport useNotifications, {\r\n\tgetNotificationConfig,\r\n\tmoveToToolbarMonitor,\r\n\tgetOS,\r\n\tgetFetchHistoryParams,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Types\r\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport IMuteFilter from \"common/notifications/definitions/IMuteFilter\";\r\n\r\n// Components\r\nimport CardView from \"../views/CardView\";\r\nimport Drawer from \"../drawer/Drawer\";\r\nimport DrawerControls from \"../drawer/DrawerControls\";\r\nimport DrawerHeader from \"../drawer/DrawerHeader\";\r\nimport ListView from \"../views/ListView\";\r\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\r\n\r\nconst defaultControls: NotificationCenterControlsProps = {\r\n\tcontrols: [\r\n\t\t{\r\n\t\t\taction: \"all\",\r\n\t\t\tlabel: \"All\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications;\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"unread\",\r\n\t\t\tlabel: \"Unread\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => !notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"read\",\r\n\t\t\tlabel: \"Read\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"snoozed\",\r\n\t\t\tlabel: \"Snoozed\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isSnoozed);\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tactive: \"all\",\r\n};\r\n\r\nconst addPoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\r\n};\r\n\r\nconst removePoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\r\n};\r\n\r\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\r\n\tFSBL.Clients.StorageClient.save({\r\n\t\ttopic: \"finsemble.notifications\",\r\n\t\tkey: \"last.position\",\r\n\t\tvalue: {\r\n\t\t\tshowCenter,\r\n\t\t\tpoppedOut,\r\n\t\t\tposition,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nconst setShowWindowForState = (centerState: any) => {\r\n\tif (centerState.showCenter) {\r\n\t\tfinsembleWindow.show({}, () => {\r\n\t\t\tfinsembleWindow.bringToFront();\r\n\t\t});\r\n\t}\r\n\r\n\tif (centerState.position) {\r\n\t\tfinsembleWindow.setBounds(centerState.position);\r\n\t}\r\n\r\n\t// Always on top when popped in\r\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\r\n\tstoreNotificationsCenterWindowPosition(centerState);\r\n};\r\n\r\nconst isValidPosition = (bounds: any): boolean => {\r\n\treturn (\r\n\t\tbounds &&\r\n\t\ttypeof bounds.left !== \"undefined\" &&\r\n\t\ttypeof bounds.top !== \"undefined\" &&\r\n\t\ttypeof bounds.height !== \"undefined\" &&\r\n\t\ttypeof bounds.width !== \"undefined\"\r\n\t);\r\n};\r\n\r\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\r\n\r\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\r\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\r\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\r\n\tconst [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isInitialized, setInitialized] = useState(false);\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\tconst nextPageToFetch = useRef(1);\r\n\r\n\t// Set up references for use in callbacks to FSBL functions\r\n\tconst showCenterRef = useRef(false);\r\n\tconst poppedOutRef = useRef(false);\r\n\tconst subscriptionMessageRef = useRef<any>({});\r\n\tconst applicationState = useRef(null);\r\n\r\n\tconst checkedNotifications: INotification[] = [];\r\n\r\n\tconst [searchString, setSearchString] = useState(\"\");\r\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\r\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\r\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\r\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\r\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\r\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\r\n\r\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\r\n\r\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\r\n\tconst notificationsContextValues: NotificationsContextType = {\r\n\t\tviewMode,\r\n\t\tsetViewMode,\r\n\t\tselectionMode,\r\n\t\tsetSelectionMode,\r\n\t\tdrawerControlProps,\r\n\t\tsetDrawerControlProps,\r\n\t\tselectedNotification,\r\n\t\tsetSelectedNotification,\r\n\t\tsearchString,\r\n\t\tsetSearchString,\r\n\t\tfilteredNotifications,\r\n\t\tcheckedNotifications,\r\n\t\tsetFilteredNotifications,\r\n\t\tmuteFilters,\r\n\t\tsetMuteFilters,\r\n\t};\r\n\r\n\tconst togglePoppedStatus = () => {\r\n\t\tconst publishValue = { ...notificationSubscribeMessage };\r\n\t\tpublishValue[\"poppedOut\"] = !notificationSubscribeMessage.poppedOut;\r\n\t\tpoppedOutRef.current = publishValue[\"poppedOut\"];\r\n\t\tnotificationsPublish(publishValue);\r\n\t};\r\n\r\n\tconst setFullHeight = async (monitorInfo?: any) => {\r\n\t\tif (!monitorInfo) {\r\n\t\t\tawait new Promise<void>((resolve) => {\r\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\r\n\t\t\t\t\tmonitorInfo = monitor;\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst { data } = await finsembleWindow.getBounds();\r\n\t\tconst centerWindowPosition = {\r\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\r\n\t\t\ttop: monitorInfo.availableRect.top,\r\n\t\t\theight: monitorInfo.availableRect.height,\r\n\t\t\twidth: data.width,\r\n\t\t};\r\n\r\n\t\tsetShowWindowForState({\r\n\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition: centerWindowPosition,\r\n\t\t});\r\n\r\n\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t};\r\n\r\n\tconst boundsChangeListener = (event: any) => {\r\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\r\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\r\n\t\t\tsetFullHeight();\r\n\t\t}\r\n\t\tconst position = {\r\n\t\t\ttop: event.data.top,\r\n\t\t\tleft: event.data.left,\r\n\t\t\theight: event.data.height,\r\n\t\t\twidth: event.data.width,\r\n\t\t};\r\n\r\n\t\tstoreNotificationsCenterWindowPosition({\r\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition,\r\n\t\t});\r\n\t};\r\n\r\n\tconst getScrollPercentage = () => {\r\n\t\tconst maxScroll = document.body.scrollHeight;\r\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\r\n\t\treturn currentScroll / maxScroll;\r\n\t};\r\n\r\n\tconst lazyLoadNextPage = async () =>\r\n\t\tnew Promise<void>(async (resolve) => {\r\n\t\t\tif (nextPageToFetch.current > 0) {\r\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\r\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\r\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\r\n\t\t\t\tif (notificationList.length) {\r\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\r\n\t\t\t\t\tfor (const notification of notificationList) {\r\n\t\t\t\t\t\taddNotification(notification);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Stop fetching after this one\r\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\r\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\r\n\t\tif (isTransparent && !isMac) {\r\n\t\t\tif (poppedOut) {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx: 0,\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (show) {\r\n\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t}\r\n\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\r\n\tuseEffect(() => {\r\n\t\tsetOpaqueClassName(!config.isTransparent);\r\n\r\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\r\n\t\t\tapplicationState.current = response.data.state;\r\n\t\t});\r\n\r\n\t\tconst hide = (event: any) => {\r\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\r\n\t\t\tpublishValue[\"showCenter\"] = false;\r\n\t\t\tnotificationsPublish(publishValue);\r\n\t\t\tif (applicationState?.current !== \"closing\") {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tevent.cancel();\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst scrollHandler = () => {\r\n\t\t\tif (getScrollPercentage() > 0.9) {\r\n\t\t\t\tlazyLoadNextPage();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\r\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\r\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\r\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst recursiveLoad = async () => {\r\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\r\n\t\t\tawait lazyLoadNextPage();\r\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\r\n\t\t\t\trecursiveLoad();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\trecursiveLoad();\r\n\t}, [viewMode, drawerControlProps.active]);\r\n\r\n\t// Hook to set up the center state from service data on component start\r\n\tuseEffect(() => {\r\n\t\tsubscriptionMessageRef.current = notificationSubscribeMessage;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof notificationSubscribeMessage.showCenter !== \"undefined\") {\r\n\t\t\tif (notificationSubscribeMessage.poppedOut) {\r\n\t\t\t\tremovePoppedInClasses();\r\n\t\t\t} else {\r\n\t\t\t\taddPoppedInClasses();\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPosition(notificationSubscribeMessage.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\r\n\t\t\t\t\tpoppedOut: notificationSubscribeMessage.poppedOut,\r\n\t\t\t\t\tposition: notificationSubscribeMessage.position,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Setup references\r\n\t\t\tshowCenterRef.current = notificationSubscribeMessage.showCenter;\r\n\t\t\tpoppedOutRef.current = notificationSubscribeMessage.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [notificationSubscribeMessage]);\r\n\r\n\t// Effect to run when we pop-in or pop-out the notification center\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tpoppedOutRef.current = notificationSubscribeMessage.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (notificationSubscribeMessage.poppedOut) {\r\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\r\n\t\t\t\t\tremovePoppedInClasses();\r\n\r\n\t\t\t\t\tconst centerWindowPosition = {\r\n\t\t\t\t\t\tleft: data.left - 25,\r\n\t\t\t\t\t\ttop: data.top + 25,\r\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\r\n\t\t\t\t\t\twidth: data.width,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\r\n\t\t\t\t\t\tpoppedOut: notificationSubscribeMessage.poppedOut,\r\n\t\t\t\t\t\tposition: centerWindowPosition,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\taddPoppedInClasses();\r\n\t\t\t\t\tsetFullHeight(monitorInfo);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [notificationSubscribeMessage.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = notificationSubscribeMessage.showCenter;\r\n\t\t\ttoggleCenter(notificationSubscribeMessage.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [notificationSubscribeMessage.showCenter]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetFilteredNotifications([...notifications]);\r\n\t}, [notifications]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tsetReloadMuteFilters(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t// Sets the current active mute filters\r\n\tuseEffect(() => {\r\n\t\tasync function loadMuteFilter() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\r\n\t\t}\r\n\r\n\t\tloadMuteFilter().then((muteFilters: IMuteFilter[]) => {\r\n\t\t\tsetMuteFilters(muteFilters);\r\n\t\t\tsetReloadMuteFilters(false);\r\n\t\t});\r\n\t}, [reloadMuteFilters]);\r\n\r\n\tconst notificationsMainView = () => {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t<DrawerHeader poppedOutStatus={notificationSubscribeMessage.poppedOut} popOutToggle={togglePoppedStatus} />\r\n\t\t\t\t<DrawerControls />\r\n\t\t\t\t<div className=\"cards-container\">\r\n\t\t\t\t\t{viewMode === ViewMode.CARD ? (\r\n\t\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<ListView\r\n\t\t\t\t\t\t\tnotifications={notifications}\r\n\t\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\r\n\t\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</>\r\n\t\t);\r\n\t};\r\n\r\n\tconst notificationDetailsViewComponent = () => {\r\n\t\treturn <NotificationDetailsView notification={selectedNotification} />;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<ConditionalWrapper\r\n\t\t\tcondition={(config.isTransparent as boolean) && !notificationSubscribeMessage.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={notificationSubscribeMessage.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</CSSTransition>\r\n\t\t\t)}\r\n\t\t>\r\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\r\n\t\t\t\t<Drawer classNames={notificationSubscribeMessage.poppedOut ? \"popped-out\" : \"\"}>\r\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\r\n\t\t\t\t</Drawer>\r\n\t\t\t</NotificationsContext.Provider>\r\n\t\t</ConditionalWrapper>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,gDAAgD,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,gBAAgB,EAAE,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAQlE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,uBAAuB,MAAM,kCAAkC,CAAC;AAEvE,MAAM,eAAe,GAAoC;IACxD,QAAQ,EAAE;QACT;YACC,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,CAAC,aAA8B,EAAE,EAAE;gBACvC,OAAO,aAAa,CAAC;YACtB,CAAC;SACD;QACD;YACC,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,QAAQ;YACf,GAAG,EAAE,CAAC,aAA8B,EAAE,EAAE;gBACvC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,YAA2B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BAA4B,CAAC,SAAS,IAAI,CAAC,KAAK,EACjG,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CACtB,oBAAC,aAAa,IAAC,EAAE,EAAE,4BAA4B,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAC,QAAQ,EAAC,aAAa,UACzG,QAAQ,CACM,CAChB;QAED,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,0BAA0B;YAC/D,oBAAC,MAAM,IAAC,UAAU,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAC5E,oBAAoB,CAAC,CAAC,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAC5E,CACsB,CACZ,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { CSSTransition } from \"react-transition-group\";\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\n\nimport { NOTIFICATIONS_PUBSUB_TOPIC, ViewMode, SelectionMode } from \"../../constants\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\n\n// Hooks\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\nimport useNotifications, {\n\tgetNotificationConfig,\n\tmoveToToolbarMonitor,\n\tgetOS,\n\tgetFetchHistoryParams,\n} from \"../../../../hooks/useNotifications\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\nimport { INotification } from \"common/notifications/definitions/INotification\";\nimport IMuteFilter from \"common/notifications/definitions/IMuteFilter\";\n\n// Components\nimport CardView from \"../views/CardView\";\nimport Drawer from \"../drawer/Drawer\";\nimport DrawerControls from \"../drawer/DrawerControls\";\nimport DrawerHeader from \"../drawer/DrawerHeader\";\nimport ListView from \"../views/ListView\";\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\n\nconst defaultControls: NotificationCenterControlsProps = {\n\tcontrols: [\n\t\t{\n\t\t\taction: \"all\",\n\t\t\tlabel: \"All\",\n\t\t\trun: (notifications: INotification[]) => {\n\t\t\t\treturn notifications;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taction: \"unread\",\n\t\t\tlabel: \"Unread\",\n\t\t\trun: (notifications: INotification[]) => {\n\t\t\t\treturn notifications.filter((notification: INotification) => !notification.isRead);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taction: \"read\",\n\t\t\tlabel: \"Read\",\n\t\t\trun: (notifications: INotification[]) => {\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isRead);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taction: \"snoozed\",\n\t\t\tlabel: \"Snoozed\",\n\t\t\trun: (notifications: INotification[]) => {\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isSnoozed);\n\t\t\t},\n\t\t},\n\t],\n\tactive: \"all\",\n};\n\nconst addPoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\n};\n\nconst removePoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\n};\n\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\n\tFSBL.Clients.StorageClient.save({\n\t\ttopic: \"finsemble.notifications\",\n\t\tkey: \"last.position\",\n\t\tvalue: {\n\t\t\tshowCenter,\n\t\t\tpoppedOut,\n\t\t\tposition,\n\t\t},\n\t});\n};\n\nconst setShowWindowForState = (centerState: any) => {\n\tif (centerState.showCenter) {\n\t\tfinsembleWindow.show({}, () => {\n\t\t\tfinsembleWindow.bringToFront();\n\t\t});\n\t}\n\n\tif (centerState.position) {\n\t\tfinsembleWindow.setBounds(centerState.position);\n\t}\n\n\t// Always on top when popped in\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\n\tstoreNotificationsCenterWindowPosition(centerState);\n};\n\nconst isValidPosition = (bounds: any): boolean => {\n\treturn (\n\t\tbounds &&\n\t\ttypeof bounds.left !== \"undefined\" &&\n\t\ttypeof bounds.top !== \"undefined\" &&\n\t\ttypeof bounds.height !== \"undefined\" &&\n\t\ttypeof bounds.width !== \"undefined\"\n\t);\n};\n\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\n\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\n\tconst [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\n\n\tconst config = getNotificationConfig();\n\tconst [isInitialized, setInitialized] = useState(false);\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\tconst nextPageToFetch = useRef(1);\n\n\t// Set up references for use in callbacks to FSBL functions\n\tconst showCenterRef = useRef(false);\n\tconst poppedOutRef = useRef(false);\n\tconst subscriptionMessageRef = useRef<any>({});\n\tconst applicationState = useRef(null);\n\n\tconst checkedNotifications: INotification[] = [];\n\n\tconst [searchString, setSearchString] = useState(\"\");\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\n\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\n\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\n\tconst notificationsContextValues: NotificationsContextType = {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectedNotification,\n\t\tsetSelectedNotification,\n\t\tsearchString,\n\t\tsetSearchString,\n\t\tfilteredNotifications,\n\t\tcheckedNotifications,\n\t\tsetFilteredNotifications,\n\t\tmuteFilters,\n\t\tsetMuteFilters,\n\t};\n\n\tconst togglePoppedStatus = () => {\n\t\tconst publishValue = { ...notificationSubscribeMessage };\n\t\tpublishValue[\"poppedOut\"] = !notificationSubscribeMessage.poppedOut;\n\t\tpoppedOutRef.current = publishValue[\"poppedOut\"];\n\t\tnotificationsPublish(publishValue);\n\t};\n\n\tconst setFullHeight = async (monitorInfo?: any) => {\n\t\tif (!monitorInfo) {\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\n\t\t\t\t\tmonitorInfo = monitor;\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tconst { data } = await finsembleWindow.getBounds();\n\t\tconst centerWindowPosition = {\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\n\t\t\ttop: monitorInfo.availableRect.top,\n\t\t\theight: monitorInfo.availableRect.height,\n\t\t\twidth: data.width,\n\t\t};\n\n\t\tsetShowWindowForState({\n\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition: centerWindowPosition,\n\t\t});\n\n\t\tFSBL.Clients.WindowClient.setShape([]);\n\t};\n\n\tconst boundsChangeListener = (event: any) => {\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\n\t\t\tsetFullHeight();\n\t\t}\n\t\tconst position = {\n\t\t\ttop: event.data.top,\n\t\t\tleft: event.data.left,\n\t\t\theight: event.data.height,\n\t\t\twidth: event.data.width,\n\t\t};\n\n\t\tstoreNotificationsCenterWindowPosition({\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition,\n\t\t});\n\t};\n\n\tconst getScrollPercentage = () => {\n\t\tconst maxScroll = document.body.scrollHeight;\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\n\t\treturn currentScroll / maxScroll;\n\t};\n\n\tconst lazyLoadNextPage = async () =>\n\t\tnew Promise<void>(async (resolve) => {\n\t\t\tif (nextPageToFetch.current > 0) {\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\n\t\t\t\tif (notificationList.length) {\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\n\t\t\t\t\tfor (const notification of notificationList) {\n\t\t\t\t\t\taddNotification(notification);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Stop fetching after this one\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\n\t\tif (isTransparent && !isMac) {\n\t\t\tif (poppedOut) {\n\t\t\t\tif (show) {\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (show) {\n\t\t\t\t\tif (!poppedOut) {\n\t\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\t\tawait setFullHeight();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tif (!poppedOut) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t}\n\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t}\n\t\t}\n\t};\n\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\n\tuseEffect(() => {\n\t\tsetOpaqueClassName(!config.isTransparent);\n\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\n\t\t\tapplicationState.current = response.data.state;\n\t\t});\n\n\t\tconst hide = (event: any) => {\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\n\t\t\tpublishValue[\"showCenter\"] = false;\n\t\t\tnotificationsPublish(publishValue);\n\t\t\tif (applicationState?.current !== \"closing\") {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst scrollHandler = () => {\n\t\t\tif (getScrollPercentage() > 0.9) {\n\t\t\t\tlazyLoadNextPage();\n\t\t\t}\n\t\t};\n\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst recursiveLoad = async () => {\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\n\t\t\tawait lazyLoadNextPage();\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\n\t\t\t\trecursiveLoad();\n\t\t\t}\n\t\t};\n\n\t\trecursiveLoad();\n\t}, [viewMode, drawerControlProps.active]);\n\n\t// Hook to set up the center state from service data on component start\n\tuseEffect(() => {\n\t\tsubscriptionMessageRef.current = notificationSubscribeMessage;\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\n\t\tif (!isInitialized && typeof notificationSubscribeMessage.showCenter !== \"undefined\") {\n\t\t\tif (notificationSubscribeMessage.poppedOut) {\n\t\t\t\tremovePoppedInClasses();\n\t\t\t} else {\n\t\t\t\taddPoppedInClasses();\n\t\t\t}\n\n\t\t\tif (isValidPosition(notificationSubscribeMessage.position)) {\n\t\t\t\tsetShowWindowForState({\n\t\t\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\n\t\t\t\t\tpoppedOut: notificationSubscribeMessage.poppedOut,\n\t\t\t\t\tposition: notificationSubscribeMessage.position,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Setup references\n\t\t\tshowCenterRef.current = notificationSubscribeMessage.showCenter;\n\t\t\tpoppedOutRef.current = notificationSubscribeMessage.poppedOut;\n\n\t\t\tsetInitialized(true);\n\t\t}\n\t}, [notificationSubscribeMessage]);\n\n\t// Effect to run when we pop-in or pop-out the notification center\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tpoppedOutRef.current = notificationSubscribeMessage.poppedOut;\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\n\t\t\t\tif (notificationSubscribeMessage.poppedOut) {\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\n\t\t\t\t\tremovePoppedInClasses();\n\n\t\t\t\t\tconst centerWindowPosition = {\n\t\t\t\t\t\tleft: data.left - 25,\n\t\t\t\t\t\ttop: data.top + 25,\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\n\t\t\t\t\t\twidth: data.width,\n\t\t\t\t\t};\n\n\t\t\t\t\tsetShowWindowForState({\n\t\t\t\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\n\t\t\t\t\t\tpoppedOut: notificationSubscribeMessage.poppedOut,\n\t\t\t\t\t\tposition: centerWindowPosition,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\taddPoppedInClasses();\n\t\t\t\t\tsetFullHeight(monitorInfo);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [notificationSubscribeMessage.poppedOut]);\n\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tshowCenterRef.current = notificationSubscribeMessage.showCenter;\n\t\t\ttoggleCenter(notificationSubscribeMessage.showCenter, config.isTransparent as boolean, poppedOutRef.current);\n\t\t}\n\t}, [notificationSubscribeMessage.showCenter]);\n\n\tuseEffect(() => {\n\t\tsetFilteredNotifications([...notifications]);\n\t}, [notifications]);\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tsetReloadMuteFilters(true);\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\t// Sets the current active mute filters\n\tuseEffect(() => {\n\t\tasync function loadMuteFilter() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\n\t\t}\n\n\t\tloadMuteFilter().then((muteFilters: IMuteFilter[]) => {\n\t\t\tsetMuteFilters(muteFilters);\n\t\t\tsetReloadMuteFilters(false);\n\t\t});\n\t}, [reloadMuteFilters]);\n\n\tconst notificationsMainView = () => {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<DrawerHeader poppedOutStatus={notificationSubscribeMessage.poppedOut} popOutToggle={togglePoppedStatus} />\n\t\t\t\t<DrawerControls />\n\t\t\t\t<div className=\"cards-container\">\n\t\t\t\t\t{viewMode === ViewMode.CARD ? (\n\t\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\tnotifications={notifications}\n\t\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\n\t\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t};\n\n\tconst notificationDetailsViewComponent = () => {\n\t\treturn <NotificationDetailsView notification={selectedNotification} />;\n\t};\n\n\treturn (\n\t\t<ConditionalWrapper\n\t\t\tcondition={(config.isTransparent as boolean) && !notificationSubscribeMessage.poppedOut && !isMac}\n\t\t\twrapper={(children) => (\n\t\t\t\t<CSSTransition in={notificationSubscribeMessage.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\n\t\t\t\t\t{children}\n\t\t\t\t</CSSTransition>\n\t\t\t)}\n\t\t>\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\n\t\t\t\t<Drawer classNames={notificationSubscribeMessage.poppedOut ? \"popped-out\" : \"\"}>\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\n\t\t\t\t</Drawer>\n\t\t\t</NotificationsContext.Provider>\n\t\t</ConditionalWrapper>\n\t);\n};\n"]}
|
package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.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,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,gDAAgD,CAAC;AAWxD,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;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U,EAAE,EAAE;4BACd,IAAI,KAAK,EAAE;gCACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;6BACrB;wBACF,CAAC,CACD,CAAC;oBACH,CAAC,CAAC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,IACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,KAClC,KAAK,GACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\"> </div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [notificationSubscribeMessage] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\r\n\r\n\tconst isNotificationActive = (notification: INotification) => {\r\n\t\treturn (\r\n\t\t\tnotificationIsActive(notification) &&\r\n\t\t\t// Only treat notification as active (show it) if the center not shown or popped out\r\n\t\t\t(!notificationSubscribeMessage.showCenter || notificationSubscribeMessage.poppedOut)\r\n\t\t);\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\r\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,gDAAgD,CAAC;AAWxD,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,eAAe,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AAI,EAAE,MAAgB,CAAC,GAAG,CAAC,CAAC;wBAEtD,eAAe,CAAC,SAAS,CACxB;4BACC,MAAM,EAAE;gCACP,GAAG,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC;gCACjC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK;gCAC5C,MAAM,EAAE,MAAM,GAAG,EAAE;gCACnB,KAAK,EAAE,KAAK;6BACZ;yBACD,EACD,CAAC,KAAU,EAAE,EAAE;4BACd,IAAI,KAAK,EAAE;gCACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;6BACrB;wBACF,CAAC,CACD,CAAC;oBACH,CAAC,CAAC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,IACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,KAClC,KAAK,GACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport useNotifications, {\n\tmoveToToolbarMonitor,\n\tgetNotificationConfig,\n\tgetOS,\n} from \"../../../../hooks/useNotifications\";\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\nimport { INotification } from \"common/notifications/definitions/INotification\";\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\nimport { INotificationToastsProps } from \"../../types\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\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 [notificationSubscribeMessage] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\n\n\tconst isNotificationActive = (notification: INotification) => {\n\t\treturn (\n\t\t\tnotificationIsActive(notification) &&\n\t\t\t// Only treat notification as active (show it) if the center not shown or popped out\n\t\t\t(!notificationSubscribeMessage.showCenter || notificationSubscribeMessage.poppedOut)\n\t\t);\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(() => {\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\tFSBL.Clients.WindowClient.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\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\n\n\t\t\t\t\t\tfinsembleWindow.setBounds(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbounds: {\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\n\t\t\t\t\t\t\t\t\theight: height + 10,\n\t\t\t\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(error: any) => {\n\t\t\t\t\t\t\t\tif (error) {\n\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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 +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;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\
|
|
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;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\n\nimport { INotification } from \"common/notifications/definitions/INotification\";\nimport { NotificationsContext } from \"../../notificationsContext\";\n\nexport const CheckButton: React.FunctionComponent<{\n\tnotification: INotification;\n}> = ({ notification }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { checkedNotifications } = notificationsContext;\n\tconst [isChecked, setIsChecked] = useState(false);\n\n\t// update isChecked value on action\n\tuseEffect(() => {\n\t\tif (checkedNotifications) {\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\n\t\t}\n\t}, [checkedNotifications]);\n\n\tconst checkNotification = () => {\n\t\tif (!isChecked) {\n\t\t\tcheckedNotifications.push(notification);\n\t\t} else {\n\t\t\tvar index = checkedNotifications.indexOf(notification);\n\t\t\tif (index !== -1) {\n\t\t\t\tcheckedNotifications.splice(index, 1);\n\t\t\t}\n\t\t}\n\t\tsetIsChecked(!isChecked);\n\t};\n\n\treturn (\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE;IAC/B,OAAO,CACN,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;QAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;QACzB,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE;IAC/B,OAAO,CACN,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;QAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;QACzB,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\n\nexport interface IFinsembleIconButtonProps {\n\ttooltip?: string;\n\tclickHandler?: Function;\n\ticonName?: string;\n\tclassNames?: string;\n\tchildren?: React.ReactNode;\n}\n\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\n\tclickHandler = () => {},\n\ttooltip,\n\ticonName = \"ff-finsemble\",\n\tclassNames,\n\tchildren,\n}: IFinsembleIconButtonProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\n\t\t\ttitle={tooltip ? tooltip : \"\"}\n\t\t\tonClick={() => clickHandler()}\n\t\t>\n\t\t\t<i className={iconName} />\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default IconButton;\n"]}
|
|
@@ -71,7 +71,7 @@ export const NotificationCardShell = ({ notification, uiContext, removeNotificat
|
|
|
71
71
|
clearTimeout(isRenotificationTimerId);
|
|
72
72
|
};
|
|
73
73
|
}, [newNotificationHaloPeriodSeconds, notification]);
|
|
74
|
-
return (React.createElement("div", { className: `notification-card ${isRead ? "read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
|
|
74
|
+
return (React.createElement("div", { className: `notification-card ${isRead ? "read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
|
|
75
75
|
${notification.cssClassName ? notification.cssClassName : ""}` }, children ? (children) : (React.createElement(React.Fragment, null,
|
|
76
76
|
React.createElement(NotificationCardHeaderShell, { notification: notification, removeNotification: removeNotification, uiContext: uiContext }),
|
|
77
77
|
React.createElement(NotificationCardBodyShell, { notification: notification })))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell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,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\
|
|
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;AAQ1E,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;AAmBzF,MAAM,CAAC,MAAM,qBAAqB,GAAsD,CAAC,EACxF,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,MAAM,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEzF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC,CAAC;IACtG,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CACnD,gBAAgB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAChE,CAAC;IAGF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,UAAU,2BAA2B;YACzC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;QAC/D,CAAC;QAED,2BAA2B,EAAE,CAAC,IAAI,CAAC,CAAC,WAAgB,EAAE,EAAE;YACvD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AC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\n\n// Types\nimport IPerformedAction from \"common/notifications/definitions/IPerformedAction\";\nimport { INotification } from \"common/notifications/definitions/INotification\";\n// Components\n\n// Utils\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\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 [wokeFromSnooze, setWokeFromSnooze] = useState(\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\n\t);\n\n\t// Sets the current default preference\n\tuseEffect(() => {\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\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\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\tchildren\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"]}
|