@finsemble/finsemble-ui 6.2.1 → 6.3.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +27 -22
- package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +2 -3
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/assets/css/button.css +2 -1
- package/react/assets/css/notificationsCenter.css +4 -2
- package/react/assets/css/userPreferences.css +1 -0
- package/react/assets/css/windowTitleBar.css +33 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js +7 -13
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppList.d.ts +7 -1
- package/react/components/appCatalog/components/AppList.js +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -8
- package/react/components/appCatalog/components/AppResults.js +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
- package/react/components/appCatalog/components/EmptyResults.js +2 -4
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +24 -4
- package/react/components/appCatalog/components/Hero.js +2 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +18 -4
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
- package/react/components/appCatalog/components/SearchBar.js +4 -7
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
- package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
- package/react/components/appCatalog/components/Showcase/Header.js +2 -2
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
- package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -4
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -3
- package/react/components/appCatalog/components/Toast.js +5 -5
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +2 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
- package/react/components/appCatalog/modules/FDC3.js +39 -48
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +9 -2
- package/react/components/appCatalog/stores/appStore.js +10 -4
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js +96 -98
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.d.ts +4 -4
- package/react/components/common/Button.js +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ColorPicker.js +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +0 -5
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +0 -5
- package/react/components/common/FileInput.js +7 -9
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +2 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +2 -5
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js +2 -2
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js +2 -2
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/ImagePreview.js +2 -2
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tab.js +2 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/file_helpers.js +3 -2
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +12 -10
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js +2 -2
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +4 -4
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -6
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +4 -4
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +5 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +3 -3
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js +8 -8
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js +3 -3
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +5 -5
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +0 -5
- package/react/components/favorites/FavoriteMaker.js +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +7 -7
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js +5 -4
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js +5 -4
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js +0 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +34 -22
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js +3 -3
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js +9 -5
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js +4 -3
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +10 -42
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -1
- package/react/components/menu/Menu.js +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js +1 -2
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuPortal.js +7 -6
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js +14 -15
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js +2 -4
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js +2 -4
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +3 -5
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +64 -79
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +15 -13
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +3 -5
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +2 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +15 -24
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +2 -2
- package/react/components/notifications/components/views/ListView.js +9 -9
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
- package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.d.ts +0 -13
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/types.d.ts +7 -6
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +6 -4
- package/react/components/notifications/utils.js +26 -32
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
- package/react/components/processMonitor/ProcessMonitor.js +24 -14
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
- package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
- package/react/components/processMonitor/components/ChildWindow.js +29 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +18 -4
- package/react/components/processMonitor/components/ListHeader.js +11 -3
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
- package/react/components/processMonitor/components/ProcessStatistics.js +35 -18
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +11 -16
- package/react/components/processMonitor/constants.js +6 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +14 -6
- package/react/components/processMonitor/helpers.js +31 -23
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.d.ts +1 -0
- package/react/components/processMonitor/helpers.spec.js +44 -0
- package/react/components/processMonitor/helpers.spec.js.map +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +31 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +104 -95
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
- package/react/components/quickComponentForm/QuickComponentForm.js +14 -15
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/search/Highlight.js +2 -2
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js +3 -3
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js +17 -8
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js +3 -5
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +4 -5
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +3 -2
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/shared/Button.js +2 -4
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +58 -13
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js +9 -11
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +11 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +26 -6
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/linkerUtil.d.ts +3 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.js +0 -2
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
- package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +3 -5
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +7 -5
- package/react/components/smartDesktopDesigner/Application.js +78 -92
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +4 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
- package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +3 -2
- package/react/components/smartDesktopDesigner/Applications.js +73 -62
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -8
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js +3 -3
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +18 -31
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +2 -8
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +8 -18
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +16 -24
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +8 -9
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
- package/react/components/smartDesktopDesigner/fixtures/apps.js +20 -31
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js +6 -9
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +5 -5
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.d.ts +5 -5
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js +6 -7
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +14 -20
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +18 -36
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +4 -5
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/system/System.spec.js +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +5 -5
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js +3 -2
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +5 -5
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +14 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +41 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +7 -5
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -3
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +30 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +35 -37
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +8 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +19 -30
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +87 -59
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +51 -54
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +4 -11
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
- package/react/components/toolbar/appLauncher/components/componentList.js +25 -22
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +43 -65
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +143 -125
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +4 -5
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +66 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +103 -153
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +0 -4
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
- package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
- package/react/components/userPreferences/UserPreferencesBase.js +2 -2
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
- package/react/components/userPreferences/components/LeftNav.js +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js +4 -4
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +2 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +51 -14
- package/react/components/userPreferences/components/content/Workspaces.js +96 -90
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +24 -9
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -17
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js +2 -2
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
- package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +28 -7
- package/react/components/windowTitleBar/components/center/Tab.js +11 -4
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
- package/react/components/windowTitleBar/components/center/TabList.js +179 -66
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +2 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
- package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +16 -26
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +7 -9
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +2 -1
- package/react/components/windowTitleBar/components/windowTitle.js +22 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +56 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +96 -64
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
- package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +2 -2
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/hooks/useFavoritesShell.js +1 -3
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useLinker.js +4 -4
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +2 -2
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +8 -8
- package/react/hooks/useNotifications.js +30 -30
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/usePubSub.js +3 -5
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +16 -35
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +3 -4
- package/react/reducers/toolbarReducer.js +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/store.d.ts +6 -7
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.d.ts +28 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +22 -0
- package/react/types/fdc3.js.map +1 -1
- package/react/types/searchTypes.d.ts +3 -0
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +47 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- package/react/types/workspaceTypes.d.ts +19 -0
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
- package/react/components/processMonitor/components/ChildWindows.js +0 -11
- package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.d.ts +0 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +0 -88
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +0 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaceManagementMenuStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,IAAI,wBAAwB,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,8BAA8B,CAAC;AAEvH,IAAI,WAAW,GAAG;IACjB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,GAAG;IACd,aAAa,EAAE,EAAE;IACjB,0BAA0B,EAAE,KAAK;IASjC,qBAAqB,EAAE,KAAK;IAC5B,eAAe,EAAE,KAAK;CACtB,CAAC;AAEF,SAAS,MAAM;IACd,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACpE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAC/B,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QACrC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,GAAG;IACT,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC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AAI,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,yBAAyB,CAAC,EAAE;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,OAAO,EAAE,8BAA8B,IAAI,WAAW,EAAE,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n * The workspace management menu may be the most complicated component that we have (other than the toolbar). It isn't because workspace management is particularly difficult, it's because there is a lot of user question and answer going on. We don't want to overwrite data without explicit consent, and so the calls get involved. To simplify the code, we are using the `async` library. If you are unfamiliar with this library, see this link: https://caolan.github.io/async/docs.html\r\n */\r\nimport async from \"async\";\r\nimport _ from \"lodash\";\r\n\r\n// When a user cancels the save workspace dialog, we throw an error, which short-circuits the async call.\r\nconst SAVE_DIALOG_CANCEL_ERROR = \"Cancel\";\r\nconst NEGATIVE = \"Negative\";\r\nlet PROMPT_ON_SAVE = false;\r\nlet WorkspaceManagementStore, Actions, WindowClient, StoreClient, Logger, ToolbarStore, WorkspaceManagementGlobalStore;\r\n// Initial data for the store.\r\nlet defaultData = {\r\n\tactiveWorkspace: {},\r\n\tmenuWidth: 285,\r\n\tWorkspaceList: [],\r\n\tnewWorkspaceDialogIsActive: false,\r\n\t/**\r\n\t * State around whether the workspace is currently in the process of switching.\r\n\t *\r\n\t * For simplicity, we're storing this in the local store for now, but this precludes\r\n\t * other components from signaling that the workspace is changing. A consequence,\r\n\t * for example, is that if you switch workspaces uses a pin on the toolbar instead\r\n\t * of the workspace management menu, the spinner doesn't show up.\r\n\t */\r\n\tisSwitchingWorkspaces: false,\r\n\tisPromptingUser: false,\r\n};\r\n\r\nfunction uuidv4() {\r\n\treturn \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\r\n\t\tvar r = (Math.random() * 16) | 0,\r\n\t\t\tv = c === \"x\" ? r : (r & 0x3) | 0x8;\r\n\t\treturn v.toString(16);\r\n\t});\r\n}\r\n\r\nActions = {\r\n\tautoSave: (callback) => {\r\n\t\tlet activeName = FSBL.Clients.WorkspaceClient.activeWorkspace.name;\r\n\t\tif (!PROMPT_ON_SAVE) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: activeName,\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t},\r\n\t\t\t\t(err, response) => {\r\n\t\t\t\t\tcallback(err);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tcallback(null);\r\n\t\t}\r\n\t},\r\n\tinitialize: function () {\r\n\t\t// Gets the workspace list and sets the value in the store.\r\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {\r\n\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getWorkspaces\", workspaces);\r\n\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\tfield: \"WorkspaceList\",\r\n\t\t\t\tvalue: workspaces,\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t// Get the activeWorkspace and set the value. I could have iterated through the workspaces above and found the active one, but this seems simpler.\r\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err, activeWorkspace) => {\r\n\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getActiveWorkspace\", activeWorkspace);\r\n\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\tfield: \"activeWorkspace\",\r\n\t\t\t\tvalue: activeWorkspace,\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * We listen here for any workspace updates, and pass them to the store.\r\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\r\n\t\t */\r\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.update\", (err, response) => {\r\n\t\t\tif (response.data && response.data.activeWorkspace) {\r\n\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore init update\", response.data);\r\n\t\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\t\tfield: \"activeWorkspace\",\r\n\t\t\t\t\tvalue: response.data.activeWorkspace,\r\n\t\t\t\t});\r\n\t\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\t\tfield: \"WorkspaceList\",\r\n\t\t\t\t\tvalue: response.data.workspacesConfig,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\tWorkspaceManagementGlobalStore.getValue({ field: \"owner\" }, (err, data) => {\r\n\t\t\tif (data !== finsembleWindow.name) return;\r\n\t\t\tWorkspaceManagementGlobalStore.Dispatcher.register((action) => {\r\n\t\t\t\t// eslint-disable-next-line default-case\r\n\t\t\t\tswitch (action.actionType) {\r\n\t\t\t\t\tcase \"switchToWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore switchToWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.switchToWorkspace(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"reorderWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore reorderWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.reorderWorkspaceList(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"removeWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore removeWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.removeWorkspace(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"renameWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore renameWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.renameWorkspace(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t},\r\n\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tGETTERS/SETTERS\r\n\t *\r\n\t *********************************************************************************************/\r\n\tgetActiveWorkspace: function () {\r\n\t\treturn WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\t},\r\n\tgetWorkspaceBeingEdited: function () {\r\n\t\treturn WorkspaceManagementStore.getValue(\"workspaceBeingEdited\");\r\n\t},\r\n\tgetWorkspaceList: function () {\r\n\t\treturn WorkspaceManagementStore.getValue(\"WorkspaceList\");\r\n\t},\r\n\tgetIsSwitchingWorkspaces: function () {\r\n\t\treturn WorkspaceManagementStore.getValue(\"isSwitchingWorkspaces\");\r\n\t},\r\n\tsetIsSwitchingWorkspaces: function (val) {\r\n\t\treturn WorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"isSwitchingWorkspaces\",\r\n\t\t\tvalue: val,\r\n\t\t});\r\n\t},\r\n\tgetIsPromptingUser: function () {\r\n\t\treturn WorkspaceManagementStore.getValue(\"isPromptingUser\");\r\n\t},\r\n\tsetIsPromptingUser: function (val) {\r\n\t\treturn WorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"isPromptingUser\",\r\n\t\t\tvalue: val,\r\n\t\t});\r\n\t},\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tMain Workspace Actions\r\n\t *\r\n\t *********************************************************************************************/\r\n\t/**\r\n\t * Handles the complete workflow for creating a new workspace.\r\n\t * We make sure the user doesn't lose any unsaved work, ask them to name it, make sure that workspace doesn't already exist, then actually save the new workspace. After that, we fire off a notification to let them know that everything was a great success.\r\n\t */\r\n\tnewWorkspace: function () {\r\n\t\tlet newWorkspaceName;\r\n\t\tLogger.system.log(\"New workspace - start.\");\r\n\t\tlet newWorkspaceDialogIsActive = WorkspaceManagementStore.getValue(\"newWorkspaceDialogIsActive\");\r\n\t\tlet activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\r\n\t\t// Creates the new workspace.\r\n\t\tfunction createIt(params, cb) {\r\n\t\t\tLogger.system.log(\"createIt\", params);\r\n\t\t\tlet { workspaceName, template } = params;\r\n\t\t\tFSBL.Clients.WorkspaceClient.createNewWorkspace(workspaceName, { templateName: template }, (err, response) => {\r\n\t\t\t\tLogger.system.log(\"createIt createNewWorkspace response\", workspaceName, template, response);\r\n\t\t\t\tnewWorkspaceName = response.workspaceName;\r\n\t\t\t\tif (cb) {\r\n\t\t\t\t\tcb(null, newWorkspaceName);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (!newWorkspaceDialogIsActive) {\r\n\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\tfield: \"newWorkspaceDialogIsActive\",\r\n\t\t\t\tvalue: true,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tActions.blurWindow();\r\n\t\tlet tasks = [\r\n\t\t\tActions.autoSave,\r\n\t\t\tActions.spawnWorkspaceInputField,\r\n\t\t\tActions.validateWorkspaceInput,\r\n\t\t\tActions.checkIfWorkspaceAlreadyExists,\r\n\t\t\tActions.askIfUserWantsNewWorkspace,\r\n\t\t\tcreateIt,\r\n\t\t\tActions.notifyUserOfNewWorkspace,\r\n\t\t];\r\n\t\tif (PROMPT_ON_SAVE) {\r\n\t\t\ttasks = [Actions.askIfUserWantsToSave, Actions.handleSaveDialogResponse].concat(tasks);\r\n\t\t}\r\n\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\r\n\t},\r\n\t/**\r\n\t * Handles the workflow for removing a workspace.\r\n\t * As long as you are not deleting the workspace that is active, it will pop up a confirm dialog, and if the user says \"yes\", it will delete the workspace.\r\n\t * @todo allow the user to delete the active workspace?\r\n\t * @param {object} workspace workspace object.\r\n\t */\r\n\tremoveWorkspace: function (data, cb = Function.prototype) {\r\n\t\tlet workspaceName = data.name;\r\n\t\t// don't allow user to delete active workspace.\r\n\t\tif (FSBL.Clients.WorkspaceClient.activeworkspaceName === workspaceName) {\r\n\t\t\tlet dialogParams = {\r\n\t\t\t\tquestion: \"Workspace cannot be deleted while it is in use. Please switch workspaces and try again.\",\r\n\t\t\t\taffirmativeResponseLabel: \"OK\",\r\n\t\t\t\tshowNegativeButton: false,\r\n\t\t\t\tshowCancelButton: false,\r\n\t\t\t\thideModalOnClose: data.hideModalOnClose,\r\n\t\t\t};\r\n\t\t\treturn Actions.spawnDialog(\"yesNo\", dialogParams);\r\n\t\t}\r\n\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"Delete this workspace?\",\r\n\t\t\tquestion: `Are you sure you want to delete the workspace \"${workspaceName}\"?`,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t\taffirmativeResponseLabel: \"Delete\",\r\n\t\t\thideModalOnClose: data.hideModalOnClose,\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Invoked when the user interacts with the dialog.\r\n\t\t */\r\n\t\tfunction onUserInput(err, response) {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcb(true);\r\n\t\t\t\tFSBL.Clients.WorkspaceClient.remove({\r\n\t\t\t\t\tname: workspaceName,\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tcb(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t},\r\n\t/**\r\n\t * The `activeWorkspace` is simply a copy of something we brought out of storage. This function copies the `activeWorkspace` to back to storage.\r\n\t */\r\n\tsaveWorkspace: function (cb) {\r\n\t\tlet activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t{\r\n\t\t\t\tforce: true,\r\n\t\t\t\tname: activeWorkspace.name,\r\n\t\t\t},\r\n\t\t\t(err, response) => {\r\n\t\t\t\tif (cb) {\r\n\t\t\t\t\tcb();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\treorderWorkspaceList: function ({ oldIndex, newIndex }) {\r\n\t\tlet workspaces = WorkspaceManagementStore.getValue({\r\n\t\t\tfield: \"WorkspaceList\",\r\n\t\t});\r\n\t\tlet workspaceToMove = workspaces[oldIndex];\r\n\t\tworkspaces.splice(oldIndex, 1);\r\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\r\n\t\tconst workspacesWithExpectedStructure = workspaces.map((WSName) => {\r\n\t\t\treturn {\r\n\t\t\t\tname: WSName,\r\n\t\t\t};\r\n\t\t});\r\n\t\tFSBL.Clients.WorkspaceClient.setWorkspaces({\r\n\t\t\tworkspaces: workspacesWithExpectedStructure,\r\n\t\t});\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"WorkspaceList\",\r\n\t\t\tvalue: workspaces,\r\n\t\t});\r\n\t},\r\n\trenameWorkspace: function ({ oldName, newName }) {\r\n\t\tfunction saveIt(workspaceName, done) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.rename(\r\n\t\t\t\t{\r\n\t\t\t\t\toldName: oldName,\r\n\t\t\t\t\tnewName: workspaceName,\r\n\t\t\t\t\tremoveOldWorkspace: true,\r\n\t\t\t\t\toverWriteExistng: true,\r\n\t\t\t\t},\r\n\t\t\t\t(err, response) => {\r\n\t\t\t\t\tdone();\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\tasync.waterfall(\r\n\t\t\t[\r\n\t\t\t\tActions.checkIfWorkspaceAlreadyExists.bind(null, { value: newName }),\r\n\t\t\t\t(result, callback) => {\r\n\t\t\t\t\tif (result.workspaceExists) {\r\n\t\t\t\t\t\tcallback(null, FSBL.Clients.WorkspaceClient.getWorkspaceName(newName));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(null, newName);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tsaveIt,\r\n\t\t\t],\r\n\t\t\tActions.onAsyncComplete\r\n\t\t);\r\n\t},\r\n\tshowPreferences: function () {\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"UserPreferences\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\t/**\r\n\t * Ask the user for a name, make sure it doesn't already exist, then save.\r\n\t */\r\n\tsaveWorkspaceAs: function () {\r\n\t\tfunction saveIt(workspaceName, callback) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: workspaceName,\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t},\r\n\t\t\t\t(err, response) => {\r\n\t\t\t\t\tcallback(err, response);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tLogger.system.log(\"SaveWorkspaceAs clicked.\");\r\n\r\n\t\tasync.waterfall(\r\n\t\t\t[\r\n\t\t\t\tActions.autoSave,\r\n\t\t\t\tActions.spawnSaveAsDialog,\r\n\t\t\t\tActions.validateWorkspaceInput,\r\n\t\t\t\tActions.checkIfWorkspaceAlreadyExists,\r\n\t\t\t\tActions.askAboutOverwrite,\r\n\t\t\t\tsaveIt,\r\n\t\t\t],\r\n\t\t\tActions.onAsyncComplete\r\n\t\t);\r\n\t},\r\n\t/**\r\n\t * Asks the user if they'd like to save their data, then loads the requested workspace.\r\n\t */\r\n\tswitchToWorkspace: async function (data) {\r\n\t\t// if a workspace prompt is outstanding for a previous switch, immediately return to lock out user from doing another switch (until responding to prompt);\r\n\t\t// note this prompting flag is cleared in Actions.onAsyncComplete when the previous switch completes (after user responds to the prompt)\r\n\t\tconst prompting = Actions.getIsPromptingUser();\r\n\t\tLogger.system.log(\"workspaceManagementMenuStore: switchToWorkspace\", prompting ? \"prompting\" : \"not-prompting\");\r\n\t\tif (prompting) return;\r\n\r\n\t\tActions.setIsSwitchingWorkspaces(true);\r\n\t\tActions.blurWindow();\r\n\t\tlet { name } = data;\r\n\t\tlet activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\t\t/**\r\n\t\t * Actually perform the switch. Happens after we ask the user what they want.\r\n\t\t *\r\n\t\t */\r\n\t\tfunction switchWorkspace(callback = Function.prototype) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.switchTo(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: name,\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tActions.setIsSwitchingWorkspaces(false);\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\t/**\r\n\t\t * Make sure the user wants to do what they say that they want to do.\r\n\t\t * @param {any} callback\r\n\t\t */\r\n\t\tfunction askAboutReload(callback) {\r\n\t\t\tActions.spawnDialog(\r\n\t\t\t\t\"yesNo\",\r\n\t\t\t\t{\r\n\t\t\t\t\tmonitor: \"primary\",\r\n\t\t\t\t\ttitle: \"Save your workspace?\",\r\n\t\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\r\n\t\t\t\t\taffirmativeResponseLabel: \"Save\",\r\n\t\t\t\t\tnegativeResponseLabel: \"Don't Save\",\r\n\t\t\t\t},\r\n\t\t\t\tcallback\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * If the workspace is dirty, we need to do more than if it's clean. We don't want users to lose unsaved work.\r\n\t\t */\r\n\t\tlet tasks = [];\r\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\r\n\t\t\tActions.setIsPromptingUser(true);\r\n\t\t\tlet firstMethod = Actions.autoSave,\r\n\t\t\t\tsecondMethod = null;\r\n\t\t\tif (PROMPT_ON_SAVE === true) {\r\n\t\t\t\t// We want to ask the user to save. But if they're trying to reload the workspace, the message needs to be different. The first if block just switches that method.\r\n\t\t\t\tfirstMethod = Actions.askIfUserWantsToSave;\r\n\t\t\t\tif (name === FSBL.Clients.WorkspaceClient.activeWorkspace.name) {\r\n\t\t\t\t\tfirstMethod = askAboutReload;\r\n\t\t\t\t}\r\n\t\t\t\t// If we are not autosaving, we need to process the dialog input.\r\n\t\t\t\tsecondMethod = Actions.handleSaveDialogResponse;\r\n\t\t\t}\r\n\r\n\t\t\t// Build the task list.\r\n\t\t\ttasks = [firstMethod];\r\n\r\n\t\t\tif (secondMethod) {\r\n\t\t\t\ttasks.push(secondMethod);\r\n\t\t\t}\r\n\r\n\t\t\t// Switch is the last thing we do.\r\n\t\t\ttasks.push(switchWorkspace);\r\n\r\n\t\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\r\n\t\t} else {\r\n\t\t\tswitchWorkspace();\r\n\t\t}\r\n\t},\r\n\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tWorkspace Management Helpers\r\n\t *\r\n\t *********************************************************************************************/\r\n\t/**\r\n\t * General handler for `async.series` and `async.waterfall`.\r\n\t * @todo display errors to the user??\r\n\t *\r\n\t * @param {Error} err\r\n\t * @param {any} result\r\n\t */\r\n\tonAsyncComplete(err, result) {\r\n\t\tLogger.system.debug(\"workspaceManagementMenuStore: onAsyncComplete\");\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"newWorkspaceDialogIsActive\",\r\n\t\t\tvalue: false,\r\n\t\t});\r\n\t\tconst errMessage = err && err.message;\r\n\t\tif (errMessage && errMessage !== NEGATIVE && errMessage !== SAVE_DIALOG_CANCEL_ERROR) {\r\n\t\t\t// handle error.\r\n\t\t\tLogger.system.error(err);\r\n\t\t}\r\n\r\n\t\t// Unlock the UI.\r\n\t\tActions.setIsSwitchingWorkspaces(false);\r\n\t\tActions.setIsPromptingUser(false);\r\n\t},\r\n\t/**\r\n\t * NOTE: Leaving this function here until we figure out notifications.\r\n\t */\r\n\tnotifyUserOfNewWorkspace: function () {\r\n\t\t// @todo, notify. This is just a placeholder for now.\r\n\t},\r\n\t/**\r\n\t * Helper for spawning dialogs. Keeps the internals of other functions squeaky clean.\r\n\t *\r\n\t * @param {string} type \"yesNo\" or \"singleInput\"\r\n\t * @param {object} data Optional params for the dialog call.\r\n\t * @param {function} responseCallback invoked when the user interacts with the dialog.\r\n\t */\r\n\tspawnDialog(type, data, responseCallback) {\r\n\t\tLogger.system.debug(\"spawnDialog\", type, data);\r\n\t\tif (type === \"singleInput\" || type === \"inputAndSelection\") {\r\n\t\t\tdata.showCancelButton = true;\r\n\t\t}\r\n\t\tFSBL.Clients.DialogManager.open(type, data, responseCallback);\r\n\t},\r\n\tspawnSaveAsDialog: function (cb) {\r\n\t\tfunction onUserInput(err, response) {\r\n\t\t\tLogger.system.log(\"SpawnWorkspaceInput onUserInput\", response);\r\n\t\t\tif (err) {\r\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\r\n\t\t\t\terr = new Error(err);\r\n\t\t\t}\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb(err, response);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"Enter a name for your new workspace.\",\r\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\r\n\t\t\taffirmativeResponseLabel: \"Confirm\",\r\n\t\t\tshowCancelButton: false,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\r\n\t},\r\n\t/**\r\n\t * Spawns an input field asking what the user would like to name their new workspace.\r\n\t */\r\n\tspawnWorkspaceInputField: function (cb) {\r\n\t\t// Spawns the dialog with the input field and accepts a callback to be invoked after the user acts.\r\n\t\tLogger.system.log(\"SpawnWorkspaceInput - start\");\r\n\t\tfunction onUserInput(err, response) {\r\n\t\t\tLogger.system.log(\"SpawnWorkspaceInput onUserInput\", response);\r\n\t\t\tif (err) {\r\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\r\n\t\t\t\terr = new Error(err);\r\n\t\t\t}\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb(err, response);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"Enter a name for your new workspace.\",\r\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\r\n\t\t\taffirmativeResponseLabel: \"Confirm\",\r\n\t\t\tshowCancelButton: false,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\r\n\t},\r\n\t/**\r\n\t * Asks the user if they'd like to save their workspace if it's different from what's in storage. If the workspace is clean, we just invoke the callback.\r\n\t */\r\n\taskIfUserWantsToSave: async function (callback) {\r\n\t\tlet activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\r\n\t\t\tLogger.system.log(\"NewWorkspace.spawnDialog start.\");\r\n\t\t\tlet dialogParams = {\r\n\t\t\t\tmonitor: \"primary\",\r\n\t\t\t\ttitle: \"Save your workspace?\",\r\n\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\r\n\t\t\t\taffirmativeResponseLabel: \"Save\",\r\n\t\t\t\tnegativeResponseLabel: \"Don't Save\",\r\n\t\t\t};\r\n\t\t\tfunction waitForUserInput() {\r\n\t\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\t\tfunction onUserInput(err, response) {\r\n\t\t\t\t\t\tLogger.system.log(\"Spawn Dialog callback.\");\r\n\t\t\t\t\t\tif (callback) callback(null, response);\r\n\t\t\t\t\t\tresolve(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\treturn await waitForUserInput();\r\n\t\t} else {\r\n\t\t\t// In this case the workspace is not dirty, so we don't need to save.\r\n\t\t\tif (callback) callback(null, { choice: \"negative\" });\r\n\t\t\treturn { choice: \"negative\" };\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Handles the response from the dialog asking if the user wants to save their workspace.\r\n\t *\r\n\t * @param {any} response\r\n\t * @param {any} callback\r\n\t */\r\n\thandleSaveDialogResponse(response, callback) {\r\n\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t// User wants to save, so call the client API.\r\n\t\t\tActions.saveWorkspace(callback);\r\n\t\t} else if (response.choice === \"negative\") {\r\n\t\t\t// Doesn't want to save.\r\n\t\t\tcallback();\r\n\t\t} else {\r\n\t\t\t// choice === cancel\r\n\t\t\tcallback(new Error(SAVE_DIALOG_CANCEL_ERROR));\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Makes sure the user has input a valid workspace name.\r\n\t *\r\n\t * @param {any} response\r\n\t * @param {any} callback\r\n\t * @returns\r\n\t */\r\n\tvalidateWorkspaceInput(response, callback) {\r\n\t\tLogger.system.log(\"spawnWorkspaceInput\", response);\r\n\t\t// If user wants to proceed but gave an invalid name, tell them that they messed up, then die.\r\n\t\t// @todo, look in to using async.retry - we could throw an error and start the whole process over again.\r\n\t\tif (response.choice !== \"cancel\" && (!response.value || response.value === \"\")) {\r\n\t\t\tlet dialogParams = {\r\n\t\t\t\ttitle: \"Invalid Workspace Name\",\r\n\t\t\t\tquestion: \"Workspace names must contain letters or numbers. Please try again.\",\r\n\t\t\t\taffirmativeResponseLabel: \"OK\",\r\n\t\t\t\tshowNegativeButton: false,\r\n\t\t\t\tshowCancelButton: false,\r\n\t\t\t};\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, Function.prototype);\r\n\t\t\treturn callback(new Error(\"Invalid workspace name.\"));\r\n\t\t} else if (response.choice === \"cancel\") {\r\n\t\t\treturn callback(new Error(SAVE_DIALOG_CANCEL_ERROR));\r\n\t\t}\r\n\t\tcallback(null, response);\r\n\t},\r\n\taskAboutOverwrite(params, callback) {\r\n\t\tlet { workspaceExists, workspaceName } = params;\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"Overwrite Workspace?\",\r\n\t\t\tquestion: `This will overwrite the saved data for \"${workspaceName}\". Would you like to proceed?`,\r\n\t\t\taffirmativeResponseLabel: \"Overwrite\",\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\t\tfunction onUserInput(err, response) {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcallback(null, workspaceName);\r\n\t\t\t} else {\r\n\t\t\t\tcallback(new Error(NEGATIVE));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (workspaceExists) {\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t} else {\r\n\t\t\tcallback(null, workspaceName);\r\n\t\t}\r\n\t},\r\n\taskIfUserWantsNewWorkspace(params, callback) {\r\n\t\tlet { workspaceExists, workspaceName, template } = params;\r\n\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"New workspace\",\r\n\t\t\tquestion: `The workspace \"${workspaceName}\" already exists. A new workspace with a modified name will be created.`,\r\n\t\t\taffirmativeResponseLabel: \"OK\",\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tfunction onUserInput(err, response) {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcallback(null, { workspaceName, template });\r\n\t\t\t} else {\r\n\t\t\t\tcallback(new Error(NEGATIVE));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (workspaceExists) {\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t} else {\r\n\t\t\tcallback(null, { workspaceName, template });\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Checks if the workspace exists. If it does, it asks the user if they're comfortable overwriting that data.\r\n\t *\r\n\t * @param {any} response\r\n\t * @param {any} callback\r\n\t */\r\n\tcheckIfWorkspaceAlreadyExists(response, callback) {\r\n\t\tlet workspaceName = response.value;\r\n\t\t// Array.some will return true for the first element in the array that satisfies the condition. If none are true, it'll go through the entire array. It's essentially a way to short-circuit a for loop. This lets us know if any workspace has the same name that the user is trying to input.\r\n\t\tlet workspaceExists = FSBL.Clients.WorkspaceClient.workspaces.some((workspace) => workspace === workspaceName);\r\n\t\tcallback(null, {\r\n\t\t\tworkspaceExists,\r\n\t\t\tworkspaceName,\r\n\t\t\ttemplate: response.template,\r\n\t\t});\r\n\t},\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tMisc functionality\r\n\t *\r\n\t *********************************************************************************************/\r\n\t/**\r\n\t * Un-focuses from the menu.\r\n\t */\r\n\tblurWindow: function () {\r\n\t\tfinsembleWindow.blur();\r\n\t},\r\n};\r\n\r\nfunction createLocalStore(done) {\r\n\tStoreClient.createStore({ store: \"Finsemble-WorkspaceMenu-Local-Store\", values: defaultData }, (err, store) => {\r\n\t\tWorkspaceManagementStore = store;\r\n\t\tdone();\r\n\t});\r\n}\r\n\r\nfunction createGlobalStore(done) {\r\n\tStoreClient.createStore(\r\n\t\t{\r\n\t\t\tstore: \"Finsemble-WorkspaceMenu-Global-Store\",\r\n\t\t\tglobal: true,\r\n\t\t\tvalues: { owner: finsembleWindow.name },\r\n\t\t},\r\n\t\t(err, store) => {\r\n\t\t\tWorkspaceManagementGlobalStore = store;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction getPreferences(done) {\r\n\tFSBL.Clients.ConfigClient.getValue(\r\n\t\t{\r\n\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\r\n\t\t},\r\n\t\t(err, data) => {\r\n\t\t\tlet prompt = data;\r\n\t\t\t// default to false.\r\n\t\t\tPROMPT_ON_SAVE = prompt === null ? PROMPT_ON_SAVE : prompt;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Initializes the store for the Workspace Management Menu.\r\n *\r\n * @param {any} cb\r\n */\r\nfunction initialize(cb) {\r\n\tWindowClient = FSBL.Clients.WindowClient;\r\n\tStoreClient = FSBL.Clients.DistributedStoreClient;\r\n\tLogger = FSBL.Clients.Logger;\r\n\tasync.parallel([createGlobalStore, createLocalStore, getPreferences], () => {\r\n\t\tActions.initialize();\r\n\t\tcb(WorkspaceManagementStore);\r\n\t});\r\n}\r\n\r\nlet getStore = () => WorkspaceManagementStore;\r\n\r\n/**\r\n * This is a quick little initialization manager that Terry hacked up.\r\n * Ultimately everything in this file should be rewritten in hooks/redux pattern.\r\n */\r\nclass StoreManager {\r\n\tconstructor() {\r\n\t\tthis.initialized = false;\r\n\t\tthis.initializing = false;\r\n\t\tthis.callbacks = [];\r\n\t\tthis.store = null;\r\n\t}\r\n\r\n\tinitialize() {\r\n\t\tif (this.initializing) return;\r\n\t\tthis.initializing = true;\r\n\t\tinitialize((store) => {\r\n\t\t\tthis.initialized = true;\r\n\t\t\tthis.store = store;\r\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\r\n\t\t});\r\n\t}\r\n\r\n\taddInitializedListener(cb) {\r\n\t\tif (this.initialized) return cb(this.store);\r\n\t\tthis.callbacks.push(cb);\r\n\t}\r\n\r\n\tremoveInitializedListener(cb) {\r\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\r\n\t}\r\n}\r\nconst storeManager = new StoreManager();\r\n\r\nexport { storeManager };\r\n\r\nexport { WorkspaceManagementGlobalStore as GlobalStore };\r\nexport { initialize };\r\nexport { WorkspaceManagementStore as Store };\r\nexport { Actions };\r\nexport { getStore };\r\n"]}
|
|
1
|
+
{"version":3,"file":"workspaceManagementMenuStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAmBjD,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,IAAI,wBAAoC,CAAC;AACzC,IAAI,WAAgB,CAAC;AACrB,IAAI,MAAW,CAAC;AAChB,IAAI,8BAA0C,CAAC;AAG/C,MAAM,WAAW,GAAG;IACnB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,GAAG;IACd,aAAa,EAAE,EAAE;IACjB,0BAA0B,EAAE,KAAK;IASjC,qBAAqB,EAAE,KAAK;IAC5B,eAAe,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,OAAO,GAAG;IACf,QAAQ,EAAE,CAAC,QAA0B,EAAE,EAAE;;QACxC,MAAM,UAAU,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,eAAe,0CAAE,IAAI,CAAC;QACtE,IAAI,CAAC,cAAc,EAAE;YACpB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAClC;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI;aACX,EACD,CAAC,GAAkB,EAAE,EAAE;gBACtB,QAAQ,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,CACD,CAAC;SACF;aAAM;YACN,QAAQ,CAAC,IAAI,CAAC,CAAC;SACf;IACF,CAAC;IACD,UAAU,EAAE,GAAG,EAAE;QAEhB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,GAAkB,EAAE,UAA2B,EAAE,EAAE;YAC9F,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,6CA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BAAsB,CAAC,EAA+B;QACrD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,yBAAyB,CAAC,EAAY;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EACN,YAAY,EACZ,8BAA8B,IAAI,WAAW,EAC7C,UAAU,EACV,wBAAwB,IAAI,KAAK,EACjC,OAAO,EACP,QAAQ,GACR,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n * The workspace management menu may be the most complicated component that we have (other than the toolbar). It isn't because workspace management is particularly difficult, it's because there is a lot of user question and answer going on. We don't want to overwrite data without explicit consent, and so the calls get involved. To simplify the code, we are using the `async` library. If you are unfamiliar with this library, see this link: https://caolan.github.io/async/docs.html\r\n */\r\nimport async from \"async\";\r\nimport { Util } from \"@finsemble/finsemble-core\";\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-core/src/common/workspace\";\r\nimport { types } from \"@finsemble/finsemble-core\";\r\n\r\ntype StandardErrorCallback = types.StandardErrorCallback;\r\n\r\ntype UserInputResponseType = {\r\n\tchoice: string;\r\n\tvalue?: string;\r\n};\r\ntype SaveWorkspaceWaterfallParams = {\r\n\tworkspaceExists: boolean;\r\n\tworkspaceName: string;\r\n\ttemplate: any;\r\n};\r\n\r\n// When a user cancels the save workspace dialog, we throw an error, which short-circuits the async call.\r\nconst SAVE_DIALOG_CANCEL_ERROR = \"Cancel\";\r\nconst NEGATIVE = \"Negative\";\r\nlet PROMPT_ON_SAVE = false;\r\nlet WorkspaceManagementStore: StoreModel;\r\nlet StoreClient: any;\r\nlet Logger: any;\r\nlet WorkspaceManagementGlobalStore: StoreModel;\r\n\r\n// Initial data for the store.\r\nconst defaultData = {\r\n\tactiveWorkspace: {},\r\n\tmenuWidth: 285,\r\n\tWorkspaceList: [],\r\n\tnewWorkspaceDialogIsActive: false,\r\n\t/**\r\n\t * State around whether the workspace is currently in the process of switching.\r\n\t *\r\n\t * For simplicity, we're storing this in the local store for now, but this precludes\r\n\t * other components from signaling that the workspace is changing. A consequence,\r\n\t * for example, is that if you switch workspaces uses a pin on the toolbar instead\r\n\t * of the workspace management menu, the spinner doesn't show up.\r\n\t */\r\n\tisSwitchingWorkspaces: false,\r\n\tisPromptingUser: false,\r\n};\r\n\r\nconst Actions = {\r\n\tautoSave: (callback: StandardCallback) => {\r\n\t\tconst activeName = FSBL.Clients.WorkspaceClient.activeWorkspace?.name;\r\n\t\tif (!PROMPT_ON_SAVE) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: activeName,\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t},\r\n\t\t\t\t(err: StandardError) => {\r\n\t\t\t\t\tcallback(err);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tcallback(null);\r\n\t\t}\r\n\t},\r\n\tinitialize: () => {\r\n\t\t// Gets the workspace list and sets the value in the store.\r\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\r\n\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getWorkspaces\", workspaces);\r\n\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\tfield: \"WorkspaceList\",\r\n\t\t\t\tvalue: workspaces,\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t// Get the activeWorkspace and set the value. I could have iterated through the workspaces above and found the active one, but this seems simpler.\r\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace(\r\n\t\t\t(err: StandardError, activeWorkspace: { data: WorkspaceType } | undefined) => {\r\n\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getActiveWorkspace\", activeWorkspace);\r\n\t\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\t\tfield: \"activeWorkspace\",\r\n\t\t\t\t\tvalue: activeWorkspace,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t);\r\n\r\n\t\t/**\r\n\t\t * We listen here for any workspace updates, and pass them to the store.\r\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case,\r\n\t\t * we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for\r\n\t\t * a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\r\n\t\t */\r\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.update\", (err, response) => {\r\n\t\t\tif (response.data && response.data.activeWorkspace) {\r\n\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore init update\", response.data);\r\n\t\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\t\tfield: \"activeWorkspace\",\r\n\t\t\t\t\tvalue: response.data.activeWorkspace,\r\n\t\t\t\t});\r\n\t\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\t\tfield: \"WorkspaceList\",\r\n\t\t\t\t\tvalue: response.data.workspacesConfig,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tWorkspaceManagementGlobalStore.getValue({ field: \"owner\" }, (err: StandardError, data?: string) => {\r\n\t\t\tif (data !== finsembleWindow.name) return;\r\n\t\t\tWorkspaceManagementGlobalStore.Dispatcher.register((action) => {\r\n\t\t\t\tswitch (action.actionType) {\r\n\t\t\t\t\tcase \"switchToWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore switchToWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.switchToWorkspace(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"reorderWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore reorderWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.reorderWorkspaceList(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"removeWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore removeWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.removeWorkspace(\r\n\t\t\t\t\t\t\taction.data as {\r\n\t\t\t\t\t\t\t\tname: string;\r\n\t\t\t\t\t\t\t\thideModalOnClose: boolean;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"renameWorkspace\":\r\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore renameWorkspace\", action.data);\r\n\t\t\t\t\t\tActions.renameWorkspace(action.data);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t// Nothing to do here\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t},\r\n\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tGETTERS/SETTERS\r\n\t *\r\n\t *********************************************************************************************/\r\n\tgetActiveWorkspace: () => WorkspaceManagementStore.getValue(\"activeWorkspace\") as WorkspaceType,\r\n\r\n\t// Get the name of the workspace that is currently being edited\r\n\tgetWorkspaceBeingEdited: () => WorkspaceManagementStore.getValue(\"workspaceBeingEdited\") as string,\r\n\r\n\tgetWorkspaceList: () => WorkspaceManagementStore.getValue(\"WorkspaceList\") as WorkspaceType[],\r\n\r\n\tgetIsSwitchingWorkspaces: () => WorkspaceManagementStore.getValue(\"isSwitchingWorkspaces\") as boolean,\r\n\r\n\tsetIsSwitchingWorkspaces: (val: boolean) =>\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"isSwitchingWorkspaces\",\r\n\t\t\tvalue: val,\r\n\t\t}),\r\n\r\n\tgetIsPromptingUser: () => WorkspaceManagementStore.getValue(\"isPromptingUser\") as boolean,\r\n\r\n\tsetIsPromptingUser: (val: boolean) =>\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"isPromptingUser\",\r\n\t\t\tvalue: val,\r\n\t\t}),\r\n\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tMain Workspace Actions\r\n\t *\r\n\t *********************************************************************************************/\r\n\r\n\t/**\r\n\t * Handles the complete workflow for creating a new workspace.\r\n\t * We make sure the user doesn't lose any unsaved work, ask them to name it, make sure that workspace doesn't already exist, then actually save the new workspace. After that, we fire off a notification to let them know that everything was a great success.\r\n\t */\r\n\tnewWorkspace: function () {\r\n\t\tlet newWorkspaceName: string;\r\n\t\tLogger.system.log(\"New workspace - start.\");\r\n\t\tconst newWorkspaceDialogIsActive = WorkspaceManagementStore.getValue(\"newWorkspaceDialogIsActive\");\r\n\r\n\t\ttype createItParams = {\r\n\t\t\tworkspaceName: string;\r\n\t\t};\r\n\t\t// Creates the new workspace.\r\n\t\tconst createIt = (params: createItParams, cb?: StandardCallback) => {\r\n\t\t\tLogger.system.log(\"createIt\", params);\r\n\t\t\tconst { workspaceName } = params;\r\n\t\t\tFSBL.Clients.WorkspaceClient.createNewWorkspace(workspaceName, {}, (err, response) => {\r\n\t\t\t\tLogger.system.log(\"createIt createNewWorkspace response\", workspaceName, response);\r\n\t\t\t\tnewWorkspaceName = response.workspaceName;\r\n\t\t\t\tif (cb) {\r\n\t\t\t\t\tcb(null, newWorkspaceName);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (!newWorkspaceDialogIsActive) {\r\n\t\t\tWorkspaceManagementStore.setValue({\r\n\t\t\t\tfield: \"newWorkspaceDialogIsActive\",\r\n\t\t\t\tvalue: true,\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tActions.blurWindow();\r\n\t\tlet tasks: Function[] = [\r\n\t\t\tActions.autoSave,\r\n\t\t\tActions.spawnWorkspaceInputField,\r\n\t\t\tActions.validateWorkspaceInput,\r\n\t\t\tActions.checkIfWorkspaceAlreadyExists,\r\n\t\t\tActions.askIfUserWantsNewWorkspace,\r\n\t\t\tcreateIt,\r\n\t\t];\r\n\t\tif (PROMPT_ON_SAVE) {\r\n\t\t\ttasks = ([Actions.askIfUserWantsToSave, Actions.handleSaveDialogResponse] as Function[]).concat(tasks);\r\n\t\t}\r\n\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\r\n\t},\r\n\r\n\t/**\r\n\t * Handles the workflow for removing a workspace.\r\n\t * As long as you are not deleting the workspace that is active, it will pop up a confirm dialog,\r\n\t * and if the user says \"yes\", it will delete the workspace.\r\n\t */\r\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n\tremoveWorkspace: (data: { name: string; hideModalOnClose?: boolean }, cb = (val: any) => {}) => {\r\n\t\tconst workspaceName = data.name;\r\n\r\n\t\tconst dialogParams = {\r\n\t\t\ttitle: \"Delete this workspace?\",\r\n\t\t\tquestion: `Are you sure you want to delete the workspace \"${workspaceName}\"?`,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t\taffirmativeResponseLabel: \"Delete\",\r\n\t\t\thideModalOnClose: data.hideModalOnClose,\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Invoked when the user interacts with the dialog.\r\n\t\t */\r\n\t\tfunction onUserInput(err: StandardError, response: UserInputResponseType) {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcb(true);\r\n\t\t\t\tFSBL.Clients.WorkspaceClient.remove({\r\n\t\t\t\t\tname: workspaceName,\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tcb(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t},\r\n\t/**\r\n\t * The `activeWorkspace` is simply a copy of something we brought out of storage. This function copies the `activeWorkspace` to back to storage.\r\n\t */\r\n\tsaveWorkspace: (cb?: StandardErrorCallback) => {\r\n\t\tconst activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t{\r\n\t\t\t\tforce: true,\r\n\t\t\t\tname: activeWorkspace.name,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tcb?.(null);\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\treorderWorkspaceList: ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tlet workspaces: WorkspaceType[] = WorkspaceManagementStore.getValue<WorkspaceType[]>({\r\n\t\t\tfield: \"WorkspaceList\",\r\n\t\t});\r\n\t\tconst workspaceToMove = workspaces[oldIndex];\r\n\t\tworkspaces.splice(oldIndex, 1);\r\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\r\n\t\tconst workspacesWithExpectedStructure = workspaces.map((WSName) => {\r\n\t\t\treturn {\r\n\t\t\t\tname: WSName,\r\n\t\t\t};\r\n\t\t});\r\n\t\tFSBL.Clients.WorkspaceClient.setWorkspaces(\r\n\t\t\t{\r\n\t\t\t\tworkspaces: workspacesWithExpectedStructure,\r\n\t\t\t},\r\n\t\t\t() => {}\r\n\t\t);\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"WorkspaceList\",\r\n\t\t\tvalue: workspaces,\r\n\t\t});\r\n\t},\r\n\trenameWorkspace: ({ oldName, newName }: { oldName: string; newName: string }) => {\r\n\t\t// Note: This does no checking of the workspace before renaming. If you call this function, and `newName` is an existing\r\n\t\t// workspace name, the existing workspace will get stomped. Currently, the UI prevents renaming to existing names.\r\n\t\tFSBL.Clients.WorkspaceClient.rename({\r\n\t\t\toldName: oldName,\r\n\t\t\tnewName: newName,\r\n\t\t\tremoveOldWorkspace: true,\r\n\t\t\toverwriteExisting: true,\r\n\t\t});\r\n\t},\r\n\r\n\tshowPreferences: () => {\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"UserPreferences\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t}\r\n\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Ask the user for a name, make sure it doesn't already exist, then save.\r\n\t */\r\n\tsaveWorkspaceAs: () => {\r\n\t\tfunction saveIt(workspaceName: string, callback: StandardErrorCallback) {\r\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: workspaceName,\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t},\r\n\t\t\t\t(err: StandardError, response: any) => {\r\n\t\t\t\t\tcallback(err, response);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tLogger.system.log(\"SaveWorkspaceAs clicked.\");\r\n\r\n\t\tasync.waterfall(\r\n\t\t\t[\r\n\t\t\t\tActions.autoSave,\r\n\t\t\t\tActions.spawnSaveAsDialog,\r\n\t\t\t\tActions.validateWorkspaceInput,\r\n\t\t\t\tActions.checkIfWorkspaceAlreadyExists,\r\n\t\t\t\tActions.askAboutOverwrite,\r\n\t\t\t\tsaveIt,\r\n\t\t\t],\r\n\t\t\tActions.onAsyncComplete\r\n\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Asks the user if they'd like to save their data, then loads the requested workspace.\r\n\t */\r\n\tswitchToWorkspace: async function ({ name }: { name: string }) {\r\n\t\t// if a workspace prompt is outstanding for a previous switch, immediately return to lock out user from doing another switch (until responding to prompt);\r\n\t\t// note this prompting flag is cleared in Actions.onAsyncComplete when the previous switch completes (after user responds to the prompt)\r\n\t\tconst prompting = Actions.getIsPromptingUser();\r\n\t\tLogger.system.log(\"workspaceManagementMenuStore: switchToWorkspace\", prompting ? \"prompting\" : \"not-prompting\");\r\n\t\tif (prompting) return;\r\n\r\n\t\tActions.setIsSwitchingWorkspaces(true);\r\n\t\tActions.blurWindow();\r\n\t\tconst activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\r\n\t\t/**\r\n\t\t * Actually perform the switch. Happens after we ask the user what they want.\r\n\t\t *\r\n\t\t */\r\n\t\tconst switchWorkspace = (callback = () => {}) => {\r\n\t\t\tFSBL.Clients.WorkspaceClient.switchTo(\r\n\t\t\t\t{\r\n\t\t\t\t\tname: name,\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tActions.setIsSwitchingWorkspaces(false);\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Make sure the user is sure\r\n\t\t */\r\n\t\tconst askAboutReload = (callback: () => void) => {\r\n\t\t\tActions.spawnDialog(\r\n\t\t\t\t\"yesNo\",\r\n\t\t\t\t{\r\n\t\t\t\t\tmonitor: \"primary\",\r\n\t\t\t\t\ttitle: \"Save your workspace?\",\r\n\t\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\r\n\t\t\t\t\taffirmativeResponseLabel: \"Save\",\r\n\t\t\t\t\tnegativeResponseLabel: \"Don't Save\",\r\n\t\t\t\t},\r\n\t\t\t\tcallback\r\n\t\t\t);\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * If the workspace is dirty, we need to do more than if it's clean.\r\n\t\t * We don't want users to lose unsaved work.\r\n\t\t */\r\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\r\n\t\t\tlet tasks: Function[] = [];\r\n\r\n\t\t\tActions.setIsPromptingUser(true);\r\n\t\t\tlet firstMethod: Function = Actions.autoSave,\r\n\t\t\t\tsecondMethod = null;\r\n\r\n\t\t\tif (PROMPT_ON_SAVE === true) {\r\n\t\t\t\t// We want to ask the user to save. But if they're trying to reload the workspace,\r\n\t\t\t\t// the message needs to be different. The first if block just switches that method.\r\n\t\t\t\tfirstMethod = Actions.askIfUserWantsToSave;\r\n\t\t\t\tif (name === FSBL.Clients.WorkspaceClient.activeWorkspace?.name) {\r\n\t\t\t\t\tfirstMethod = askAboutReload;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If we are not autosaving, we need to process the dialog input.\r\n\t\t\t\tsecondMethod = Actions.handleSaveDialogResponse;\r\n\t\t\t}\r\n\r\n\t\t\t// Build the task list.\r\n\t\t\ttasks = [firstMethod];\r\n\r\n\t\t\tif (secondMethod) {\r\n\t\t\t\ttasks.push(secondMethod);\r\n\t\t\t}\r\n\r\n\t\t\t// Switch is the last thing we do.\r\n\t\t\ttasks.push(switchWorkspace);\r\n\r\n\t\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\r\n\t\t} else {\r\n\t\t\tswitchWorkspace();\r\n\t\t}\r\n\t},\r\n\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tWorkspace Management Helpers\r\n\t *\r\n\t *********************************************************************************************/\r\n\r\n\t/**\r\n\t * General handler for `async.series` and `async.waterfall`\r\n\t */\r\n\tonAsyncComplete(err?: Error | null) {\r\n\t\tLogger.system.debug(\"workspaceManagementMenuStore: onAsyncComplete\");\r\n\t\tWorkspaceManagementStore.setValue({\r\n\t\t\tfield: \"newWorkspaceDialogIsActive\",\r\n\t\t\tvalue: false,\r\n\t\t});\r\n\t\tconst errMessage = err?.message;\r\n\t\tif (errMessage && errMessage !== NEGATIVE && errMessage !== SAVE_DIALOG_CANCEL_ERROR) {\r\n\t\t\t// handle error.\r\n\t\t\tLogger.system.error(err);\r\n\t\t}\r\n\r\n\t\t// Unlock the UI.\r\n\t\tActions.setIsSwitchingWorkspaces(false);\r\n\t\tActions.setIsPromptingUser(false);\r\n\t},\r\n\r\n\t/**\r\n\t * Helper for spawning dialogs. Keeps the internals of other functions squeaky clean.\r\n\t *\r\n\t * @param {string} type \"yesNo\" or \"singleInput\"\r\n\t * @param {object} data Optional params for the dialog call.\r\n\t * @param {function} responseCallback invoked when the user interacts with the dialog.\r\n\t */\r\n\tspawnDialog(type: \"yesNo\" | \"singleInput\", data: any, responseCallback: StandardErrorCallback) {\r\n\t\tLogger.system.debug(\"spawnDialog\", type, data);\r\n\t\tif (type === \"singleInput\") {\r\n\t\t\tdata.showCancelButton = true;\r\n\t\t}\r\n\t\tFSBL.Clients.DialogManager.open(type, data, responseCallback);\r\n\t},\r\n\r\n\tspawnSaveAsDialog: (cb: StandardCallback) => {\r\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\r\n\t\t\tLogger.system.log(\"SpawnSaveAsDialog onUserInput\", response);\r\n\t\t\tlet callbackError: Error | null = null;\r\n\t\t\tif (typeof err === \"string\") {\r\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\r\n\t\t\t\tcallbackError = new Error(err);\r\n\t\t\t}\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb(callbackError || err, response);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst dialogParams = {\r\n\t\t\ttitle: \"Enter a name for your new workspace.\",\r\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\r\n\t\t\taffirmativeResponseLabel: \"Confirm\",\r\n\t\t\tshowCancelButton: false,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\r\n\t},\r\n\r\n\t/**\r\n\t * Spawns an input field asking what the user would like to name their new workspace.\r\n\t */\r\n\tspawnWorkspaceInputField: (cb: StandardCallback) => {\r\n\t\t// Spawns the dialog with the input field and accepts a callback to be invoked after the user acts.\r\n\t\tLogger.system.log(\"SpawnWorkspaceInput - start\");\r\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\r\n\t\t\tLogger.system.log(\"SpawnWorkspaceInput onUserInput\", response);\r\n\t\t\tlet callbackError: Error | null = null;\r\n\t\t\tif (typeof err === \"string\") {\r\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\r\n\t\t\t\tcallbackError = new Error(err);\r\n\t\t\t}\r\n\t\t\tif (cb) {\r\n\t\t\t\tcb(callbackError || err, response);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst dialogParams = {\r\n\t\t\ttitle: \"Enter a name for your new workspace.\",\r\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\r\n\t\t\taffirmativeResponseLabel: \"Confirm\",\r\n\t\t\tshowCancelButton: false,\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\r\n\t},\r\n\r\n\t/**\r\n\t * Asks the user if they'd like to save their workspace if it's different from what's in storage. If the workspace is clean, we just invoke the callback.\r\n\t */\r\n\taskIfUserWantsToSave: async function (callback: StandardCallback) {\r\n\t\tconst activeWorkspace: WorkspaceType = WorkspaceManagementStore.getValue(\"activeWorkspace\");\r\n\r\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\r\n\t\t\tLogger.system.log(\"NewWorkspace.spawnDialog start.\");\r\n\t\t\tconst dialogParams = {\r\n\t\t\t\tmonitor: \"primary\",\r\n\t\t\t\ttitle: \"Save your workspace?\",\r\n\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\r\n\t\t\t\taffirmativeResponseLabel: \"Save\",\r\n\t\t\t\tnegativeResponseLabel: \"Don't Save\",\r\n\t\t\t};\r\n\t\t\tconst waitForUserInput = () =>\r\n\t\t\t\tnew Promise((resolve) => {\r\n\t\t\t\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\r\n\t\t\t\t\t\tLogger.system.log(\"Spawn Dialog callback.\");\r\n\t\t\t\t\t\tif (callback) callback(null, response);\r\n\t\t\t\t\t\tresolve(response);\r\n\t\t\t\t\t};\r\n\t\t\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t\t\t});\r\n\t\t\treturn await waitForUserInput();\r\n\t\t} else {\r\n\t\t\t// In this case the workspace is not dirty, so we don't need to save.\r\n\t\t\tif (callback) callback(null, { choice: \"negative\" });\r\n\t\t\treturn { choice: \"negative\" };\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Handles the response from the dialog asking if the user wants to save their workspace.\r\n\t *\r\n\t * @param {any} response\r\n\t * @param {any} callback\r\n\t */\r\n\thandleSaveDialogResponse(response: UserInputResponseType, callback: StandardErrorCallback) {\r\n\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t// User wants to save, so call the client API.\r\n\t\t\tActions.saveWorkspace(callback);\r\n\t\t} else if (response.choice === \"negative\") {\r\n\t\t\t// Doesn't want to save.\r\n\t\t\tcallback(null);\r\n\t\t} else {\r\n\t\t\t// choice === cancel\r\n\t\t\tcallback(new Error(SAVE_DIALOG_CANCEL_ERROR));\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Makes sure the user has input a valid workspace name.\r\n\t */\r\n\tvalidateWorkspaceInput(response: UserInputResponseType, callback: StandardErrorCallback) {\r\n\t\tLogger.system.log(\"spawnWorkspaceInput\", response);\r\n\t\t// If user wants to proceed but gave an invalid name, tell them that they messed up, then die.\r\n\t\tif (response.choice !== \"cancel\" && (!response.value || response.value === \"\")) {\r\n\t\t\tlet dialogParams = {\r\n\t\t\t\ttitle: \"Invalid Workspace Name\",\r\n\t\t\t\tquestion: \"Workspace names must contain letters or numbers. Please try again.\",\r\n\t\t\t\taffirmativeResponseLabel: \"OK\",\r\n\t\t\t\tshowNegativeButton: false,\r\n\t\t\t\tshowCancelButton: false,\r\n\t\t\t};\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, () => {});\r\n\t\t\treturn callback(new Error(\"Invalid workspace name.\"));\r\n\t\t} else if (response.choice === \"cancel\") {\r\n\t\t\treturn callback(new Error(SAVE_DIALOG_CANCEL_ERROR));\r\n\t\t}\r\n\t\tcallback(null, response);\r\n\t},\r\n\r\n\taskAboutOverwrite(params: SaveWorkspaceWaterfallParams, callback: StandardErrorCallback) {\r\n\t\tconst { workspaceExists, workspaceName } = params;\r\n\t\tconst dialogParams = {\r\n\t\t\ttitle: \"Overwrite Workspace?\",\r\n\t\t\tquestion: `This will overwrite the saved data for \"${workspaceName}\". Would you like to proceed?`,\r\n\t\t\taffirmativeResponseLabel: \"Overwrite\",\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcallback(null, workspaceName);\r\n\t\t\t} else {\r\n\t\t\t\tcallback(new Error(NEGATIVE));\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (workspaceExists) {\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t} else {\r\n\t\t\tcallback(null, workspaceName);\r\n\t\t}\r\n\t},\r\n\taskIfUserWantsNewWorkspace(params: SaveWorkspaceWaterfallParams, callback: StandardErrorCallback) {\r\n\t\tlet { workspaceExists, workspaceName, template } = params;\r\n\r\n\t\tlet dialogParams = {\r\n\t\t\ttitle: \"New workspace\",\r\n\t\t\tquestion: `The workspace \"${workspaceName}\" already exists. A new workspace with a modified name will be created.`,\r\n\t\t\taffirmativeResponseLabel: \"OK\",\r\n\t\t\tshowNegativeButton: false,\r\n\t\t};\r\n\r\n\t\tfunction onUserInput(err: StandardError, response: UserInputResponseType) {\r\n\t\t\tif (response.choice === \"affirmative\") {\r\n\t\t\t\tcallback(null, { workspaceName, template });\r\n\t\t\t} else {\r\n\t\t\t\tcallback(new Error(NEGATIVE));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (workspaceExists) {\r\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\r\n\t\t} else {\r\n\t\t\tcallback(null, { workspaceName, template });\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Checks if the workspace exists. If it does, it asks the user if they're comfortable overwriting that data.\r\n\t */\r\n\tcheckIfWorkspaceAlreadyExists(response: any, callback: StandardErrorCallback) {\r\n\t\tconst workspaceName = response.value;\r\n\t\tconst camelCaseWorkspaceName = Util.camelCase(workspaceName);\r\n\t\t// Do any of the workspaces have the same name that the user is trying to input.\r\n\t\tconst workspaceExists = FSBL.Clients.WorkspaceClient.workspaces.some(\r\n\t\t\t(workspace) => Util.camelCase(workspace) === camelCaseWorkspaceName\r\n\t\t);\r\n\t\tcallback(null, {\r\n\t\t\tworkspaceExists,\r\n\t\t\tworkspaceName,\r\n\t\t\ttemplate: response.template,\r\n\t\t});\r\n\t},\r\n\t/*********************************************************************************************\r\n\t *\r\n\t *\t\t\t\t\t\t\t\tMisc functionality\r\n\t *\r\n\t *********************************************************************************************/\r\n\t/**\r\n\t * Un-focuses from the menu.\r\n\t */\r\n\tblurWindow: function () {\r\n\t\tfinsembleWindow.blur();\r\n\t},\r\n};\r\n\r\nfunction createLocalStore(done: () => void) {\r\n\tStoreClient.createStore(\r\n\t\t{ store: \"Finsemble-WorkspaceMenu-Local-Store\", values: defaultData },\r\n\t\t(err: StandardError, store: StoreModel) => {\r\n\t\t\tWorkspaceManagementStore = store;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction createGlobalStore(done: () => void) {\r\n\tStoreClient.createStore(\r\n\t\t{\r\n\t\t\tstore: \"Finsemble-WorkspaceMenu-Global-Store\",\r\n\t\t\tglobal: true,\r\n\t\t\tvalues: { owner: finsembleWindow.name },\r\n\t\t},\r\n\t\t(err: StandardError, store: StoreModel) => {\r\n\t\t\tWorkspaceManagementGlobalStore = store;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\nfunction getPreferences(done: () => void) {\r\n\tFSBL.Clients.ConfigClient.getValue(\r\n\t\t{\r\n\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\r\n\t\t},\r\n\t\t(err: StandardError, data?: boolean | null) => {\r\n\t\t\tlet prompt = data;\r\n\t\t\t// default to false.\r\n\t\t\tPROMPT_ON_SAVE = prompt === null || prompt === undefined ? PROMPT_ON_SAVE : prompt;\r\n\t\t\tdone();\r\n\t\t}\r\n\t);\r\n}\r\n\r\n/**\r\n * Initializes the store for the Workspace Management Menu.\r\n */\r\nfunction initialize(cb: any) {\r\n\tStoreClient = FSBL.Clients.DistributedStoreClient;\r\n\t// eslint-disable-next-line prefer-destructuring\r\n\tLogger = FSBL.Clients.Logger;\r\n\tasync.parallel([createGlobalStore, createLocalStore, getPreferences], () => {\r\n\t\tActions.initialize();\r\n\t\tcb(WorkspaceManagementStore);\r\n\t});\r\n}\r\n\r\nlet getStore = () => WorkspaceManagementStore;\r\n\r\n/**\r\n * This is a quick little initialization manager that Terry hacked up.\r\n * Ultimately everything in this file should be rewritten in hooks/redux pattern.\r\n */\r\nclass StoreManager {\r\n\tinitialized: boolean;\r\n\r\n\tinitializing: boolean;\r\n\r\n\tcallbacks: Function[];\r\n\r\n\tstore: StoreModel | null;\r\n\r\n\tconstructor() {\r\n\t\tthis.initialized = false;\r\n\t\tthis.initializing = false;\r\n\t\tthis.callbacks = [];\r\n\t\tthis.store = null;\r\n\t}\r\n\r\n\tinitialize() {\r\n\t\tif (this.initializing) return;\r\n\t\tthis.initializing = true;\r\n\t\tinitialize((store: StoreModel) => {\r\n\t\t\tthis.initialized = true;\r\n\t\t\tthis.store = store;\r\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\r\n\t\t});\r\n\t}\r\n\r\n\taddInitializedListener(cb: (store: StoreModel) => void) {\r\n\t\tif (this.initialized && this.store !== null) return cb(this.store);\r\n\t\tthis.callbacks.push(cb);\r\n\t}\r\n\r\n\tremoveInitializedListener(cb: Function) {\r\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\r\n\t}\r\n}\r\nconst storeManager = new StoreManager();\r\n\r\nexport {\r\n\tstoreManager,\r\n\tWorkspaceManagementGlobalStore as GlobalStore,\r\n\tinitialize,\r\n\tWorkspaceManagementStore as Store,\r\n\tActions,\r\n\tgetStore,\r\n};\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserPreferenceTypes.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferenceTypes.ts"],"names":[],"mappings":"","sourcesContent":["export type ScheduledRestartObjectType = {\r\n\thour: number;\r\n\tminute: string | number;\r\n\tmeridiem: string;\r\n};\r\n"]}
|
|
@@ -19,7 +19,7 @@ export const UserPreferencesBase = (props) => {
|
|
|
19
19
|
setActiveSection(data.preferencesTab);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
console.warn(`Unknown ${data
|
|
22
|
+
console.warn(`Unknown ${data === null || data === void 0 ? void 0 : data.preferencesTab} value for User Preferences sections`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -37,6 +37,6 @@ export const UserPreferencesBase = (props) => {
|
|
|
37
37
|
}, []);
|
|
38
38
|
return (React.createElement("div", { className: "complex-menu-wrapper" },
|
|
39
39
|
React.createElement(LeftNav, { activeSection: activeSection, setValue: props.setValue, getValue: props.getValue, entries: entries, setActiveEntry: setActiveSection }),
|
|
40
|
-
React.createElement(ContentSection, { activeSection: activeSection,
|
|
40
|
+
React.createElement(ContentSection, Object.assign({ activeSection: activeSection }, props))));
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=UserPreferencesBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesBase.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferencesBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file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AY,CAAC,cAAc,CAAC,iCAAiC,EAAE,mBAAmB,CAAC,CAAC;QAClG,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,gBAAgB,CAAC,CAAC;QAEhE,OAAO,SAAS,OAAO;YACtB,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,gBAAgB,CAAC,CAAC;QACpE,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB;QACpC,oBAAC,OAAO,IACP,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,gBAAgB,GAC/B;QACF,oBAAC,cAAc,kBAAC,aAAa,EAAE,aAAa,IAAM,KAAK,EAAI,CACtD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\n\r\nimport LeftNav from \"./components/LeftNav\";\r\nimport ContentSection from \"./components/ContentSection\";\r\nimport \"../../assets/css/userPreferences.css\";\r\n\r\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\r\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\r\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\r\nnew FloatingFocus();\r\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\r\n\r\nexport const UserPreferencesBase = (props: any) => {\r\n\t// The active section is the section that is currently selected and displayed in the preference menu.\r\n\tconst [activeSection, setActiveSection] = useState(\"General\");\r\n\tconst entries = Object.keys(props.sections);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenForPreference(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.preferencesTab) {\r\n\t\t\t\t\tif (entries.includes(data.preferencesTab)) {\r\n\t\t\t\t\t\tsetActiveSection(data.preferencesTab);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.warn(`Unknown ${data?.preferencesTab} value for User Preferences sections`);\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\", listenForPreference);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreference);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tprops.addListener({ field: \"activeSection\" }, setActiveSection);\r\n\r\n\t\treturn function cleanup() {\r\n\t\t\tprops.removeListener({ field: \"activeSection\" }, setActiveSection);\r\n\t\t};\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t<div className=\"complex-menu-wrapper\">\r\n\t\t\t<LeftNav\r\n\t\t\t\tactiveSection={activeSection}\r\n\t\t\t\tsetValue={props.setValue}\r\n\t\t\t\tgetValue={props.getValue}\r\n\t\t\t\tentries={entries}\r\n\t\t\t\tsetActiveEntry={setActiveSection}\r\n\t\t\t/>\r\n\t\t\t<ContentSection activeSection={activeSection} {...props} />\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -15,7 +15,7 @@ export const UserPreferences = ({ sections }) => {
|
|
|
15
15
|
setReady(true);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
if (window.FSBL && FSBL
|
|
18
|
+
if (window.FSBL && (FSBL === null || FSBL === void 0 ? void 0 : FSBL.addEventListener)) {
|
|
19
19
|
FSBL.addEventListener("onReady", makeReady);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesWrapper.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferencesWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,YAAY,MAAM,wEAAwE,CAAC;AACvG,OAAO,EACN,UAAU,IAAI,8BAA8B,EAC5C,OAAO,IAAI,sBAAsB,GACjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,IAAI,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,IAAI,kCAAuC,CAAC;AAE5C,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,SAAS,GAAG,GAAG,EAAE;YACtB,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC5B,kCAAkC,GAAG,YAAY,CAAC,WAAW,CAAC;gBAC9D,8BAA8B,CAAC,kCAAkC,EAAE,GAAG,EAAE;oBACvE,sBAAsB,CAAC,aAAa,EAAE,CAAC;gBACxC,CAAC,CAAC,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;QACF,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"UserPreferencesWrapper.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferencesWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,YAAY,MAAM,wEAAwE,CAAC;AACvG,OAAO,EACN,UAAU,IAAI,8BAA8B,EAC5C,OAAO,IAAI,sBAAsB,GACjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,IAAI,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,IAAI,kCAAuC,CAAC;AAE5C,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,SAAS,GAAG,GAAG,EAAE;YACtB,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC5B,kCAAkC,GAAG,YAAY,CAAC,WAAW,CAAC;gBAC9D,8BAA8B,CAAC,kCAAkC,EAAE,GAAG,EAAE;oBACvE,sBAAsB,CAAC,aAAa,EAAE,CAAC;gBACxC,CAAC,CAAC,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;QACF,IAAI,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA,EAAE;YAC1C,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SAC5C;aAAM;YACN,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;SAChD;IACF,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,0CAAG,KAAK,IAAI,oBAAC,wBAAwB,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAI,CAAC;AACzE,CAAC,CAAC","sourcesContent":["import React, { useEffect } from \"react\";\r\nimport * as storeExports from \"../toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore\";\r\nimport {\r\n\tinitialize as userPreferencesStoreInitialize,\r\n\tActions as UserPreferencesActions,\r\n} from \"./stores/UserPreferencesStore\";\r\nimport { UserPreferences as UserPreferencesComponent } from \"./UserPreferences\";\r\n\r\nvar WorkspaceManagementMenuGlobalStore: any;\r\n\r\nexport const UserPreferences: React.FunctionComponent<{\r\n\tsections?: {};\r\n}> = ({ sections }) => {\r\n\tconst [ready, setReady] = React.useState(false);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst makeReady = () => {\r\n\t\t\tstoreExports.initialize(() => {\r\n\t\t\t\tWorkspaceManagementMenuGlobalStore = storeExports.GlobalStore;\r\n\t\t\t\tuserPreferencesStoreInitialize(WorkspaceManagementMenuGlobalStore, () => {\r\n\t\t\t\t\tUserPreferencesActions.getWorkspaces();\r\n\t\t\t\t});\r\n\t\t\t\tsetReady(true);\r\n\t\t\t});\r\n\t\t};\r\n\t\tif (window.FSBL && FSBL?.addEventListener) {\r\n\t\t\tFSBL.addEventListener(\"onReady\", makeReady);\r\n\t\t} else {\r\n\t\t\twindow.addEventListener(\"FSBLReady\", makeReady);\r\n\t\t}\r\n\t}, []);\r\n\r\n\treturn <>{ready && <UserPreferencesComponent sections={sections} />}</>;\r\n};\r\n"]}
|
|
@@ -6,7 +6,7 @@ export default class ContentSection extends React.Component {
|
|
|
6
6
|
}
|
|
7
7
|
hideWindow() {
|
|
8
8
|
FSBL.Clients.DialogManager.hideModal();
|
|
9
|
-
|
|
9
|
+
finsembleWindow === null || finsembleWindow === void 0 ? void 0 : finsembleWindow.hide();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
12
|
const { activeSection, sections } = this.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSection.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/components/ContentSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAgB7C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAA8B;IAC/E,YAAY,KAA0B;QACrC,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAED,UAAU;QACT,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;QACvC,
|
|
1
|
+
{"version":3,"file":"ContentSection.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/components/ContentSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAgB7C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAA8B;IAC/E,YAAY,KAA0B;QACrC,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAED,UAAU;QACT,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;QACvC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACL,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAQ,IAAI,CAAC,KAAK,CAAC;QACpD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC1C,OAAO,CACN,6BAAK,SAAS,EAAC,0BAA0B;YACxC,6BAAK,SAAS,EAAC,qBAAqB;gBACnC,6BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,SAAS,EAAC,uBAAuB;oBACzF,oBAAC,MAAM,QAAE,aAAa,CAAU,CAC3B;gBACN,6BACC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,6BAA6B,EACvC,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;wBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;4BACvC,IAAI,CAAC,UAAU,EAAE,CAAC;yBAClB;oBACF,CAAC,GACK,CACF;YACN,oBAAC,SAAS,IACT,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EACzC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAC5B,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport { Header } from \"../../common/Header\";\r\n\r\n/**\r\n * Displays the user preference section page for the currently selected section.\r\n * @param {string} props.activeSection The current selected section.\r\n * @param {object} props.customSections The client customized user preference sections.\r\n */\r\n\r\ntype ContentSectionProps = {\r\n\taddListener: Function;\r\n\tremoveListener: Function;\r\n\tgetValue: Function;\r\n\tsetValue: Function;\r\n\tactiveSection?: String;\r\n\tsections?: { Dashbar: any; General: any; Notifications: any; Workspaces: any };\r\n};\r\nexport default class ContentSection extends React.Component<ContentSectionProps> {\r\n\tconstructor(props: ContentSectionProps) {\r\n\t\tsuper(props);\r\n\t}\r\n\r\n\thideWindow() {\r\n\t\tFSBL.Clients.DialogManager.hideModal();\r\n\t\tfinsembleWindow?.hide();\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { activeSection, sections }: any = this.props;\r\n\t\tconst Component = sections[activeSection];\r\n\t\treturn (\r\n\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t<div className=\"complex-menu-header\">\r\n\t\t\t\t\t<div style={{ marginTop: \"-25px\", marginLeft: \"-25px\" }} className=\"active-section-header\">\r\n\t\t\t\t\t\t<Header>{activeSection}</Header>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\trole=\"button\"\r\n\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\tclassName=\"ff-close complex-menu-close\"\r\n\t\t\t\t\t\tonClick={this.hideWindow}\r\n\t\t\t\t\t\tonKeyDown={(e) => {\r\n\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\r\n\t\t\t\t\t\t\t\tthis.hideWindow();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<Component\r\n\t\t\t\t\taddListener={this.props.addListener}\r\n\t\t\t\t\tremoveListener={this.props.removeListener}\r\n\t\t\t\t\tsetValue={this.props.setValue}\r\n\t\t\t\t\tgetValue={this.props.getValue}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -17,7 +17,7 @@ export default class LeftNav extends React.Component<LeftNavProps, LeftNavState>
|
|
|
17
17
|
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
18
18
|
activeSection: any;
|
|
19
19
|
} | null;
|
|
20
|
-
componentDidUpdate(prevProps: any
|
|
20
|
+
componentDidUpdate(prevProps: any): void;
|
|
21
21
|
render(): JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -37,7 +37,7 @@ export default class LeftNav extends React.Component {
|
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
componentDidUpdate(prevProps
|
|
40
|
+
componentDidUpdate(prevProps) {
|
|
41
41
|
if (this.props.activeSection !== prevProps.activeSection) {
|
|
42
42
|
this.setActiveSection(this.props.activeSection);
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNav.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/components/LeftNav.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LeftNav.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/components/LeftNav.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAmB/C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAqC;IAC/E,YAAY,KAAm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C,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SAChD;IACF,CAAC;IAED,MAAM;QACL,OAAO,CACN,6BAAK,SAAS,EAAC,kCAAkC,EAAC,IAAI,EAAC,UAAU;YAChE,6BAAK,SAAS,EAAC,8BAA8B,EAAC,IAAI,EAAC,QAAQ,gBAAa,CAAC,kBAEnE;YACL,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE;gBACtC,IAAI,oBAAoB,GAAG,6BAA6B,CAAC;gBACzD,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;oBACvC,oBAAoB,GAAG,GAAG,oBAAoB,wBAAwB,CAAC;iBACvE;gBACD,OAAO,CACN,6BAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;oBACrC,oBAAC,SAAS,IACT,SAAS,EAAE,oBAAoB,EAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;4BACb,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;wBAC9B,CAAC,EACD,SAAS,EAAE,CAAC,CAAgB,EAAE,EAAE;4BAC/B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gCACvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;6BAC7B;wBACF,CAAC,GACW,CACR,CACN,CAAC;YACH,CAAC,CAAC,CACG,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport ButtonRow from \"../../common/ButtonRow\";\r\n\r\n/**\r\n * The left section of the UserPreference menu. It contains all the preference section buttons for the user\r\n * to select and go to different user preference sections.\r\n */\r\n\r\ntype LeftNavProps = {\r\n\tgetValue: Function;\r\n\tsetValue: Function;\r\n\tsetActiveEntry: Function;\r\n\tactiveSection: string;\r\n\tentries: Array<string>;\r\n};\r\n\r\ntype LeftNavState = {\r\n\tactiveSection: string;\r\n\theaderImgUrl: string;\r\n};\r\nexport default class LeftNav extends React.Component<LeftNavProps, LeftNavState> {\r\n\tconstructor(props: LeftNavProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tactiveSection: \"General\",\r\n\t\t\theaderImgUrl: \"\",\r\n\t\t};\r\n\t}\r\n\r\n\tsetActiveSection(name: string) {\r\n\t\tlet activeSection = this.props.getValue({\r\n\t\t\tfield: \"activeSection\",\r\n\t\t});\r\n\t\tif (activeSection !== name) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tactiveSection: name,\r\n\t\t\t});\r\n\t\t\tthis.props.setValue({ field: \"activeSection\", value: name });\r\n\t\t\tthis.props.setActiveEntry(name);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tFSBL.Clients.ConfigClient.getValues(null, (err: any, config: any) => {\r\n\t\t\tif (config.startup_app && config.startup_app.applicationIcon) {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\theaderImgUrl: config.startup_app.applicationIcon,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tstatic getDerivedStateFromProps(nextProps: any, prevState: any) {\r\n\t\tif (nextProps.activeSection !== prevState.activeSection) {\r\n\t\t\treturn {\r\n\t\t\t\tactiveSection: nextProps.activeSection,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tcomponentDidUpdate(prevProps: any) {\r\n\t\tif (this.props.activeSection !== prevProps.activeSection) {\r\n\t\t\tthis.setActiveSection(this.props.activeSection);\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<div className=\"complex-menu-left-nav-preference\" role=\"tabgroup\">\r\n\t\t\t\t<div className=\"complex-menu-left-nav-header\" role=\"header\" aria-level={1}>\r\n\t\t\t\t\tPreferences\r\n\t\t\t\t</div>\r\n\t\t\t\t{this.props.entries.map((entry: any) => {\r\n\t\t\t\t\tlet sectionToggleClasses = \"complex-menu-section-toggle\";\r\n\t\t\t\t\tif (entry === this.state.activeSection) {\r\n\t\t\t\t\t\tsectionToggleClasses = `${sectionToggleClasses} active-section-toggle`;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<div key={entry} style={{ height: 35 }}>\r\n\t\t\t\t\t\t\t<ButtonRow\r\n\t\t\t\t\t\t\t\tclassName={sectionToggleClasses}\r\n\t\t\t\t\t\t\t\tlabel={entry}\r\n\t\t\t\t\t\t\t\trole=\"tab\"\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tthis.setActiveSection(entry);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tonKeyDown={(e: KeyboardEvent) => {\r\n\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\r\n\t\t\t\t\t\t\t\t\t\tthis.setActiveSection(entry);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></ButtonRow>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t);\r\n\t\t\t\t})}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
@@ -47,15 +47,15 @@ export default class DashbarEditor extends React.Component {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
catch (errorInitializingDashbarItems) {
|
|
50
|
-
FSBL.Clients.Logger.error("Error initializing dashbar preferences", errorInitializingDashbarItems);
|
|
50
|
+
FSBL.Clients.Logger.system.error("Error initializing dashbar preferences", errorInitializingDashbarItems);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
componentWillUnmount() {
|
|
54
54
|
try {
|
|
55
55
|
this.state.dashbarStore.removeListener({ field: "dashbaritems" }, this.updateDashbarItems);
|
|
56
56
|
}
|
|
57
|
-
catch {
|
|
58
|
-
FSBL.Clients.Logger.error("Error unmounting component");
|
|
57
|
+
catch (_a) {
|
|
58
|
+
FSBL.Clients.Logger.system.error("Error unmounting component");
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
async updateDashbarItems(err, data) {
|
|
@@ -82,7 +82,7 @@ export default class DashbarEditor extends React.Component {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
catch (errorUpdatingDashbarItems) {
|
|
85
|
-
FSBL.Clients.Logger.error("Error updating dashbar items", errorUpdatingDashbarItems);
|
|
85
|
+
FSBL.Clients.Logger.system.error("Error updating dashbar items", errorUpdatingDashbarItems);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
removeItem(itemId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashbarEditor.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/DashbarEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,4CAA4C,CAAC;AAEpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAcpD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACjG,YAAY,KAAyB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,YAAY,EAAE,IAAI;YAClB,iBAAiB,EAAE,iCAAiC;YACpD,gBAAgB,EAAE,yBAAyB;YAE3C,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;SAChE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,iBAAiB;QACtB,IAAI;YACH,MA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AE,EAAE,WAAW,EAAE,EAAE,EAAE,IACnD,+EAA+E,UAAU,EAAE,CACvF,CACN,CAAC;SACF;IACF,CAAC;CACD","sourcesContent":["import { any } from \"prop-types\";\r\nimport React from \"react\";\r\nimport { Store } from \"redux\";\r\n// import { isThisTypeNode } from \"typescript\";\r\n\r\nimport \"../../../../assets/css/userPreferences.css\";\r\nimport { DashbarItem } from \"../../../../types/dashbarTypes\";\r\nimport DashbarEditorItem from \"./DashbarEditorItem\";\r\n\r\ntype DashbarEditorProps = {\r\n\tavailableItems?: Array<any>;\r\n\tclassName?: string;\r\n};\r\n\r\ntype DashbarEditorState = {\r\n\tdashbarStore: any;\r\n\tdashbarConfigPath: string;\r\n\tdashbarStorePath: string;\r\n\tavailableItems: Array<any>;\r\n};\r\n\r\nexport default class DashbarEditor extends React.Component<DashbarEditorProps, DashbarEditorState> {\r\n\tconstructor(props: DashbarEditorProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tdashbarStore: null,\r\n\t\t\tdashbarConfigPath: \"finsemble.availableDashbarItems\",\r\n\t\t\tdashbarStorePath: \"Finsemble-Dashbar-Store\",\r\n\t\t\t// props.availableItems is for the DashbarEditor story\r\n\t\t\tavailableItems: props.availableItems ? props.availableItems : [],\r\n\t\t};\r\n\t\tthis.updateDashbarItems = this.updateDashbarItems.bind(this);\r\n\t}\r\n\r\n\tasync componentDidMount() {\r\n\t\ttry {\r\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t\t});\r\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\r\n\t\t\t\t{\r\n\t\t\t\t\tstore: this.state.dashbarStorePath,\r\n\t\t\t\t\tglobal: true,\r\n\t\t\t\t},\r\n\t\t\t\t(error: any, store: any) => {\r\n\t\t\t\t\tconst DashbarStore = store;\r\n\r\n\t\t\t\t\tconst { dashbaritems } = DashbarStore.values;\r\n\r\n\t\t\t\t\tDashbarStore.addListener(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfield: \"dashbaritems\",\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tthis.updateDashbarItems\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tconst newDashbarItems: Array<any> = [];\r\n\r\n\t\t\t\t\tconst hasEnabledItems = dashbaritems && Array.isArray(dashbaritems) && dashbaritems.length > 0;\r\n\r\n\t\t\t\t\tavailableDashbarItems &&\r\n\t\t\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\r\n\t\t\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\r\n\t\t\t\t\t\t\tif (hasEnabledItems && dashbaritems.includes(dashbarItemName)) {\r\n\t\t\t\t\t\t\t\tnewItem.enabled = true;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnewItem.enabled = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tnewItem.id = dashbarItemName;\r\n\t\t\t\t\t\t\tnewDashbarItems.push(newItem);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tdashbarStore: DashbarStore,\r\n\t\t\t\t\t\tavailableItems: newDashbarItems,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} catch (errorInitializingDashbarItems) {\r\n\t\t\tFSBL.Clients.Logger.error(\"Error initializing dashbar preferences\", errorInitializingDashbarItems);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\ttry {\r\n\t\t\tthis.state.dashbarStore.removeListener({ field: \"dashbaritems\" }, this.updateDashbarItems);\r\n\t\t} catch {\r\n\t\t\tFSBL.Clients.Logger.error(\"Error unmounting component\");\r\n\t\t}\r\n\t}\r\n\r\n\tasync updateDashbarItems(err: any, data: any) {\r\n\t\ttry {\r\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t\t});\r\n\r\n\t\t\tconst hasEnabledItems = data.value && Array.isArray(data.value) && data.value.length > 0;\r\n\r\n\t\t\tconst newDashbarItems: Array<any> = [];\r\n\t\t\tavailableDashbarItems &&\r\n\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\r\n\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\r\n\t\t\t\t\tif (hasEnabledItems && data.value.includes(dashbarItemName)) {\r\n\t\t\t\t\t\tnewItem.enabled = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnewItem.enabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewItem.id = dashbarItemName;\r\n\t\t\t\t\tnewDashbarItems.push(newItem);\r\n\t\t\t\t});\r\n\r\n\t\t\tthis.setState({\r\n\t\t\t\tavailableItems: newDashbarItems,\r\n\t\t\t});\r\n\t\t} catch (errorUpdatingDashbarItems) {\r\n\t\t\tFSBL.Clients.Logger.error(\"Error updating dashbar items\", errorUpdatingDashbarItems);\r\n\t\t}\r\n\t}\r\n\r\n\tremoveItem(itemId: number) {\r\n\t\t// Removes a key from the store, dashbar will update the UI\r\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\r\n\t\t\tconst indexToRemove = dashbaritems.findIndex((name) => name === itemId);\r\n\t\t\tdashbaritems.splice(indexToRemove, 1);\r\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\r\n\t\t});\r\n\t}\r\n\r\n\taddItem(itemId: number) {\r\n\t\t// Update the store with new item, dashbar will parse these values and apply them\r\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\r\n\t\t\tdashbaritems.push(itemId);\r\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { availableItems: items, dashbarConfigPath: configPath } = this.state;\r\n\r\n\t\tif (items.length > 0) {\r\n\t\t\treturn (\r\n\t\t\t\t<div className={`dashbar-preferences ${this.props.className || \"\"}`} style={{ paddingLeft: 20, paddingTop: 3 }}>\r\n\t\t\t\t\t<table className=\"dashbar-items-table\">\r\n\t\t\t\t\t\t<colgroup>\r\n\t\t\t\t\t\t\t<col className=\"db-col-1\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-2\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-3\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-4\" />\r\n\t\t\t\t\t\t</colgroup>\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr className=\"items-header\">\r\n\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t<th>Title:</th>\r\n\t\t\t\t\t\t\t\t<th>Url:</th>\r\n\t\t\t\t\t\t\t\t<th>Width:</th>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t{items.map((item: any, index: number) => {\r\n\t\t\t\t\t\t\t\tconst buttonAction = item.enabled\r\n\t\t\t\t\t\t\t\t\t? this.removeItem.bind(this, item.id)\r\n\t\t\t\t\t\t\t\t\t: this.addItem.bind(this, item.id);\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<DashbarEditorItem\r\n\t\t\t\t\t\t\t\t\t\tkey={index}\r\n\t\t\t\t\t\t\t\t\t\tbuttonAction={buttonAction}\r\n\t\t\t\t\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\t\t\t\t\tid={item.id}\r\n\t\t\t\t\t\t\t\t\t\ttitle={item.title}\r\n\t\t\t\t\t\t\t\t\t\tenabled={item.enabled}\r\n\t\t\t\t\t\t\t\t\t\turl={item.url}\r\n\t\t\t\t\t\t\t\t\t\twidth={item.width}\r\n\t\t\t\t\t\t\t\t\t/>\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</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\treturn (\r\n\t\t\t\t<div id=\"no-dashbar-items\" style={{ paddingLeft: 20 }}>\r\n\t\t\t\t\t{`You don't seem to have any dashbar items enabled or defined. Define some in ${configPath}`}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"DashbarEditor.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/DashbarEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,4CAA4C,CAAC;AACpD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAcpD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACjG,YAAY,KAAyB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,YAAY,EAAE,IAAI;YAClB,iBAAiB,EAAE,iCAAiC;YACpD,gBAAgB,EAAE,yBAAyB;YAE3C,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;SAChE,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,iBAAiB;QACtB,IAAI;YACH,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;gBAChF,KAAK,EAAE,iCAAiC;aACxC,CAAC,CAAC;YACH,IAAI,CAAC,OAAO,CAAC,sBA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/userPreferences.css\";\r\nimport DashbarEditorItem from \"./DashbarEditorItem\";\r\n\r\ntype DashbarEditorProps = {\r\n\tavailableItems?: Array<any>;\r\n\tclassName?: string;\r\n};\r\n\r\ntype DashbarEditorState = {\r\n\tdashbarStore: any;\r\n\tdashbarConfigPath: string;\r\n\tdashbarStorePath: string;\r\n\tavailableItems: Array<any>;\r\n};\r\n\r\nexport default class DashbarEditor extends React.Component<DashbarEditorProps, DashbarEditorState> {\r\n\tconstructor(props: DashbarEditorProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tdashbarStore: null,\r\n\t\t\tdashbarConfigPath: \"finsemble.availableDashbarItems\",\r\n\t\t\tdashbarStorePath: \"Finsemble-Dashbar-Store\",\r\n\t\t\t// props.availableItems is for the DashbarEditor story\r\n\t\t\tavailableItems: props.availableItems ? props.availableItems : [],\r\n\t\t};\r\n\t\tthis.updateDashbarItems = this.updateDashbarItems.bind(this);\r\n\t}\r\n\r\n\tasync componentDidMount() {\r\n\t\ttry {\r\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t\t});\r\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\r\n\t\t\t\t{\r\n\t\t\t\t\tstore: this.state.dashbarStorePath,\r\n\t\t\t\t\tglobal: true,\r\n\t\t\t\t},\r\n\t\t\t\t(error: any, store: any) => {\r\n\t\t\t\t\tconst DashbarStore = store;\r\n\r\n\t\t\t\t\tconst { dashbaritems } = DashbarStore.values;\r\n\r\n\t\t\t\t\tDashbarStore.addListener(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfield: \"dashbaritems\",\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tthis.updateDashbarItems\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tconst newDashbarItems: Array<any> = [];\r\n\r\n\t\t\t\t\tconst hasEnabledItems = dashbaritems && Array.isArray(dashbaritems) && dashbaritems.length > 0;\r\n\r\n\t\t\t\t\tavailableDashbarItems &&\r\n\t\t\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\r\n\t\t\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\r\n\t\t\t\t\t\t\tif (hasEnabledItems && dashbaritems.includes(dashbarItemName)) {\r\n\t\t\t\t\t\t\t\tnewItem.enabled = true;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnewItem.enabled = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tnewItem.id = dashbarItemName;\r\n\t\t\t\t\t\t\tnewDashbarItems.push(newItem);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tdashbarStore: DashbarStore,\r\n\t\t\t\t\t\tavailableItems: newDashbarItems,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} catch (errorInitializingDashbarItems) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\"Error initializing dashbar preferences\", errorInitializingDashbarItems);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\ttry {\r\n\t\t\tthis.state.dashbarStore.removeListener({ field: \"dashbaritems\" }, this.updateDashbarItems);\r\n\t\t} catch {\r\n\t\t\tFSBL.Clients.Logger.system.error(\"Error unmounting component\");\r\n\t\t}\r\n\t}\r\n\r\n\tasync updateDashbarItems(err: any, data: any) {\r\n\t\ttry {\r\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t\t});\r\n\r\n\t\t\tconst hasEnabledItems = data.value && Array.isArray(data.value) && data.value.length > 0;\r\n\r\n\t\t\tconst newDashbarItems: Array<any> = [];\r\n\t\t\tavailableDashbarItems &&\r\n\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\r\n\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\r\n\t\t\t\t\tif (hasEnabledItems && data.value.includes(dashbarItemName)) {\r\n\t\t\t\t\t\tnewItem.enabled = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnewItem.enabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewItem.id = dashbarItemName;\r\n\t\t\t\t\tnewDashbarItems.push(newItem);\r\n\t\t\t\t});\r\n\r\n\t\t\tthis.setState({\r\n\t\t\t\tavailableItems: newDashbarItems,\r\n\t\t\t});\r\n\t\t} catch (errorUpdatingDashbarItems) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\"Error updating dashbar items\", errorUpdatingDashbarItems);\r\n\t\t}\r\n\t}\r\n\r\n\tremoveItem(itemId: number) {\r\n\t\t// Removes a key from the store, dashbar will update the UI\r\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\r\n\t\t\tconst indexToRemove = dashbaritems.findIndex((name) => name === itemId);\r\n\t\t\tdashbaritems.splice(indexToRemove, 1);\r\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\r\n\t\t});\r\n\t}\r\n\r\n\taddItem(itemId: number) {\r\n\t\t// Update the store with new item, dashbar will parse these values and apply them\r\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\r\n\t\t\tdashbaritems.push(itemId);\r\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { availableItems: items, dashbarConfigPath: configPath } = this.state;\r\n\r\n\t\tif (items.length > 0) {\r\n\t\t\treturn (\r\n\t\t\t\t<div className={`dashbar-preferences ${this.props.className || \"\"}`} style={{ paddingLeft: 20, paddingTop: 3 }}>\r\n\t\t\t\t\t<table className=\"dashbar-items-table\">\r\n\t\t\t\t\t\t<colgroup>\r\n\t\t\t\t\t\t\t<col className=\"db-col-1\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-2\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-3\" />\r\n\t\t\t\t\t\t\t<col className=\"db-col-4\" />\r\n\t\t\t\t\t\t</colgroup>\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr className=\"items-header\">\r\n\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t<th>Title:</th>\r\n\t\t\t\t\t\t\t\t<th>Url:</th>\r\n\t\t\t\t\t\t\t\t<th>Width:</th>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t{items.map((item: any, index: number) => {\r\n\t\t\t\t\t\t\t\tconst buttonAction = item.enabled\r\n\t\t\t\t\t\t\t\t\t? this.removeItem.bind(this, item.id)\r\n\t\t\t\t\t\t\t\t\t: this.addItem.bind(this, item.id);\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<DashbarEditorItem\r\n\t\t\t\t\t\t\t\t\t\tkey={index}\r\n\t\t\t\t\t\t\t\t\t\tbuttonAction={buttonAction}\r\n\t\t\t\t\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\t\t\t\t\tid={item.id}\r\n\t\t\t\t\t\t\t\t\t\ttitle={item.title}\r\n\t\t\t\t\t\t\t\t\t\tenabled={item.enabled}\r\n\t\t\t\t\t\t\t\t\t\turl={item.url}\r\n\t\t\t\t\t\t\t\t\t\twidth={item.width}\r\n\t\t\t\t\t\t\t\t\t/>\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</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\treturn (\r\n\t\t\t\t<div id=\"no-dashbar-items\" style={{ paddingLeft: 20 }}>\r\n\t\t\t\t\t{`You don't seem to have any dashbar items enabled or defined. Define some in ${configPath}`}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n"]}
|
|
@@ -11,6 +11,8 @@ const renderView = (viewName) => {
|
|
|
11
11
|
return React.createElement(NotificationsSourcesPreferences, null);
|
|
12
12
|
case "Details":
|
|
13
13
|
return React.createElement(NotificationsSourceTypes, null);
|
|
14
|
+
default:
|
|
15
|
+
return;
|
|
14
16
|
}
|
|
15
17
|
};
|
|
16
18
|
export default function Notifications() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Notifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Notifications.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Notifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKxC,OAAO,EACN,+BAA+B,GAE/B,MAAM,uCAAuC,CAAC;AAG/C,OAAO,4BAA4B,MAAM,kDAAkD,CAAC;AAC5F,OAAO,+BAA+B,MAAM,qDAAqD,CAAC;AAClG,OAAO,wBAAwB,MAAM,8CAA8C,CAAC;AAYpF,MAAM,UAAU,GAAG,CAAC,QAAwC,EAAE,EAAE;IAC/D,QAAQ,QAAQ,EAAE;QACjB,KAAK,MAAM;YACV,OAAO,oBAAC,4BAA4B,OAAG,CAAC;QAEzC,KAAK,SAAS;YACb,OAAO,oBAAC,+BAA+B,OAAG,CAAC;QAE5C,KAAK,SAAS;YACb,OAAO,oBAAC,wBAAwB,OAAG,CAAC;QACrC;YACC,OAAO;KACR;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa;IACpC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAiC,MAAM,CAAC,CAAC;IACvF,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,GAAG,QAAQ,CAA8B,IAAI,CAAC,CAAC;IAChH,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAyB,EAAE,CAAC,CAAC;IAE3F,MAAM,qCAAqC,GAAwC;QAClF,mCAAmC,EAAE,WAAW;QAChD,sCAAsC,EAAE,cAAc;QACtD,0BAA0B,EAAE,0BAA0B;QACtD,6BAA6B,EAAE,6BAA6B;QAC5D,mBAAmB,EAAE,mBAAmB;QACxC,sBAAsB,EAAE,sBAAsB;KAC9C,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,2CAA2C;QACzD,oBAAC,+BAA+B,CAAC,QAAQ,IAAC,KAAK,EAAE,qCAAqC,IACpF,UAAU,CAAC,WAAW,CAAC,CACkB,CACtC,CACN,CAAC;AACH,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\n\r\n// Types\r\n\r\n// Context\r\nimport {\r\n\tNotificationsPreferencesContext,\r\n\tNotificationsPreferencesContextType,\r\n} from \"../../NotificationsPreferencesContext\";\r\n\r\n// Components\r\nimport NotificationsPreferencesHome from \"./notificationViews/NotificationsPreferencesHome\";\r\nimport NotificationsSourcesPreferences from \"./notificationViews/NotificationsSourcesPreferences\";\r\nimport NotificationsSourceTypes from \"./notificationViews/NotificationsSourceTypes\";\r\n\r\nexport interface IType {\r\n\tname: string;\r\n\tmuted: boolean;\r\n}\r\nexport interface INotificationSources {\r\n\tsource: string;\r\n\ticon: string;\r\n\ttypes: IType[];\r\n}\r\n\r\nconst renderView = (viewName: \"Home\" | \"Sources\" | \"Details\") => {\r\n\tswitch (viewName) {\r\n\t\tcase \"Home\":\r\n\t\t\treturn <NotificationsPreferencesHome />;\r\n\r\n\t\tcase \"Sources\":\r\n\t\t\treturn <NotificationsSourcesPreferences />;\r\n\r\n\t\tcase \"Details\":\r\n\t\t\treturn <NotificationsSourceTypes />;\r\n\t\tdefault:\r\n\t\t\treturn;\r\n\t}\r\n};\r\n\r\nexport default function Notifications() {\r\n\tconst [currentView, setCurrentView] = useState<\"Home\" | \"Sources\" | \"Details\">(\"Home\");\r\n\tconst [selectedNotificationSource, setSelectedNotificationSource] = useState<INotificationSources | null>(null);\r\n\tconst [notificationSources, setNotificationSources] = useState<INotificationSources[]>([]);\r\n\r\n\tconst notificationsPreferencesContextValues: NotificationsPreferencesContextType = {\r\n\t\tcurrentNotificationsPreferencesView: currentView,\r\n\t\tsetCurrentNotificationsPreferencesView: setCurrentView,\r\n\t\tselectedNotificationSource: selectedNotificationSource,\r\n\t\tsetSelectedNotificationSource: setSelectedNotificationSource,\r\n\t\tnotificationSources: notificationSources,\r\n\t\tsetNotificationSources: setNotificationSources,\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"notifications-main-preferences__container\">\r\n\t\t\t<NotificationsPreferencesContext.Provider value={notificationsPreferencesContextValues}>\r\n\t\t\t\t{renderView(currentView)}\r\n\t\t\t</NotificationsPreferencesContext.Provider>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
|
|
@@ -1,29 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StandardError } from "@finsemble/finsemble-core/types/types";
|
|
3
|
+
import { Workspace, WorkspaceTemplate } from "../../../../types/workspaceTypes";
|
|
4
|
+
interface IProps {
|
|
5
|
+
addListener: (fieldListener: {
|
|
6
|
+
field: string;
|
|
7
|
+
}, cb: (err: StandardError, data: any) => void) => void;
|
|
8
|
+
getValue: (fieldName: {
|
|
9
|
+
field: string;
|
|
10
|
+
}, cb: (err: StandardError, data: Workspace[]) => void) => void;
|
|
11
|
+
removeListener: (fieldName: {
|
|
12
|
+
field: string;
|
|
13
|
+
}, cb: (err: StandardError, data: any) => void) => void;
|
|
14
|
+
}
|
|
15
|
+
interface IState {
|
|
16
|
+
initialAlwaysOnTop: boolean;
|
|
17
|
+
alwaysOnTop: boolean;
|
|
18
|
+
workspaceList: Workspace[];
|
|
19
|
+
focusedWorkspace: string;
|
|
20
|
+
editing: boolean;
|
|
21
|
+
workspaceBeingEdited: string;
|
|
22
|
+
templateName: string;
|
|
23
|
+
adding: boolean;
|
|
24
|
+
workspaceToLoadOnStart: string | null;
|
|
25
|
+
focusedWorkspaceComponentList: string[];
|
|
26
|
+
}
|
|
27
|
+
export default class Workspaces extends React.Component<IProps, IState> {
|
|
28
|
+
addWorkspace?: () => void;
|
|
29
|
+
constructor(props: IProps);
|
|
3
30
|
resetState(): void;
|
|
4
31
|
bindCorrectContext(): void;
|
|
5
|
-
setWorkspaceList(err:
|
|
32
|
+
setWorkspaceList(err: StandardError, data: {
|
|
33
|
+
value: Workspace[];
|
|
34
|
+
}): void;
|
|
6
35
|
addListeners(): void;
|
|
7
36
|
changePreferencesAlwaysOnTop(alwaysOnTop: boolean): void;
|
|
8
37
|
onDragEnd({ oldIndex, newIndex }: {
|
|
9
|
-
oldIndex:
|
|
10
|
-
newIndex:
|
|
38
|
+
oldIndex: number;
|
|
39
|
+
newIndex: number;
|
|
11
40
|
}): void;
|
|
12
|
-
getComponentTypes(templateObject:
|
|
13
|
-
setFocusedWorkspace(workspace:
|
|
41
|
+
getComponentTypes(templateObject: WorkspaceTemplate): string[];
|
|
42
|
+
setFocusedWorkspace(workspace: string): void;
|
|
14
43
|
cancelEdit(): void;
|
|
15
|
-
renameWorkspace(newName:
|
|
16
|
-
startEditingWorkspace(e:
|
|
44
|
+
renameWorkspace(newName: string): void;
|
|
45
|
+
startEditingWorkspace(e: React.SyntheticEvent, workspaceName?: string): void;
|
|
17
46
|
startExportingTemplate(): void;
|
|
18
47
|
startImportingTemplate(): void;
|
|
19
48
|
deleteWorkspace(workspaceName?: string): void;
|
|
20
|
-
setPreferences(err:
|
|
21
|
-
|
|
49
|
+
setPreferences(err: StandardError, data: any): void;
|
|
50
|
+
componentDidMount(): void;
|
|
51
|
+
componentWillUnmount(): void;
|
|
52
|
+
setWorkspaceToLoadOnStart(eventOrCb: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement> | (() => void)): void;
|
|
22
53
|
openFileDialog(): void;
|
|
23
54
|
preferencesFocused(): void;
|
|
24
|
-
importWorkspace(evt:
|
|
55
|
+
importWorkspace(evt: Event & {
|
|
56
|
+
target: {
|
|
57
|
+
files: File[];
|
|
58
|
+
value?: string | string[];
|
|
59
|
+
};
|
|
60
|
+
}): void;
|
|
25
61
|
exportWorkspace(): void;
|
|
26
|
-
handleButtonClicks(e:
|
|
62
|
+
handleButtonClicks(e: React.MouseEvent<HTMLDivElement>): void;
|
|
27
63
|
getFocusedWorkspaceComponentList(): never[] | undefined;
|
|
64
|
+
render(): JSX.Element;
|
|
28
65
|
}
|
|
29
|
-
|
|
66
|
+
export {};
|