@finsemble/finsemble-ui 6.3.1 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/package.json +21 -33
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.d.ts +1 -3
- package/react/actions/smartDesktopDesignerActions.js +0 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +220 -220
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +597 -597
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +538 -568
- package/react/assets/css/windowTitleBar.css +653 -652
- package/react/assets/icons/always-on-top.svg +20 -0
- package/react/assets/icons/caret.svg +7 -0
- package/react/assets/icons/check-square.svg +5 -5
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/close.svg +11 -0
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/documentation.svg +20 -0
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/linker.svg +18 -0
- package/react/assets/icons/lock.svg +5 -5
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/maximize.svg +16 -0
- package/react/assets/icons/minimize.svg +15 -0
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/toolbar.svg +12 -0
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/assets/img/finsemble-display.png +0 -0
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Accordion.d.ts +11 -0
- package/react/components/common/Accordion.js +20 -0
- package/react/components/common/Accordion.js.map +1 -0
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.js +3 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +2 -1
- package/react/components/common/FileInput.js +9 -4
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.js +16 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/Header.js +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/InputTable.d.ts +11 -0
- package/react/components/common/InputTable.js +50 -0
- package/react/components/common/InputTable.js.map +1 -0
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/accordion.css +99 -0
- package/react/components/common/css/application-edit-page.css +324 -117
- package/react/components/common/css/application-list.css +49 -47
- package/react/components/common/css/button.css +166 -164
- package/react/components/common/css/checkbox.css +30 -0
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +65 -49
- package/react/components/common/css/header.css +30 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +127 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +78 -78
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Accordion.stories.d.ts +14 -0
- package/react/components/common/stories/Accordion.stories.js +42 -0
- package/react/components/common/stories/Accordion.stories.js.map +1 -0
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
- package/react/components/common/stories/DropdownButton.stories.js +12 -0
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.d.ts +2 -1
- package/react/components/common/stories/FileInput.stories.js +6 -0
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/InputTable.stories.d.ts +12 -0
- package/react/components/common/stories/InputTable.stories.js +35 -0
- package/react/components/common/stories/InputTable.stories.js.map +1 -0
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
- package/react/components/common/tests/Accordion.spec.js +53 -0
- package/react/components/common/tests/Accordion.spec.js.map +1 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +5 -3
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +20 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +6 -2
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/{smartDesktopDesigner/tests/ApplicationSetup.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
- package/react/components/common/tests/InputTable.spec.js +166 -0
- package/react/components/common/tests/InputTable.spec.js.map +1 -0
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
- package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -0
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.d.ts +2 -1
- package/react/components/menu/MenuAutoResizer.js +4 -3
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +99 -92
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.d.ts +1 -0
- package/react/components/menu/MenuShell.js +3 -2
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.d.ts +1 -0
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.d.ts +1 -1
- package/react/components/menu/menuHelpers.js +2 -2
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +5 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +49 -49
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.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/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
- package/react/components/smartDesktopDesigner/AddApp.js +60 -0
- package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +5 -19
- package/react/components/smartDesktopDesigner/AppEditPage.js +548 -59
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +27 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Application.js +151 -93
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +2 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js +7 -3
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +0 -3
- package/react/components/smartDesktopDesigner/Applications.js +52 -102
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -9
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
- package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
- package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
- package/react/components/smartDesktopDesigner/Export.js +40 -9
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
- package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
- package/react/components/smartDesktopDesigner/Navigation.js +17 -15
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +109 -110
- package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +0 -2
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
- package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
- package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
- package/react/components/smartDesktopDesigner/View.js +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
- package/react/components/smartDesktopDesigner/common/views.js +150 -111
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +18 -10
- package/react/components/smartDesktopDesigner/css/applications.css +167 -127
- package/react/components/smartDesktopDesigner/css/authentication.css +119 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +176 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +28 -6
- package/react/components/smartDesktopDesigner/css/nav.css +120 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +124 -121
- package/react/components/smartDesktopDesigner/css/styles.css +178 -179
- package/react/components/smartDesktopDesigner/css/views.css +23 -16
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +2 -0
- package/react/components/smartDesktopDesigner/fixtures/apps.js +41 -6
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
- package/react/components/smartDesktopDesigner/fixtures/views.js +58 -26
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +12 -33
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +2 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +8 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
- package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
- package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +73 -122
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +61 -560
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
- package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +2 -31
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
- package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
- package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +1 -0
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +3 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
- 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.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 +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +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.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js +8 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -1
- package/react/components/windowTitleBar/components/center/TabList.js +16 -79
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +6 -5
- package/react/components/windowTitleBar/components/windowTitle.js +143 -35
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +5 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDashbar.d.ts +8 -0
- package/react/hooks/useDashbar.js +104 -0
- package/react/hooks/useDashbar.js.map +1 -0
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.d.ts +0 -6
- package/react/hooks/useToolbar.js +0 -101
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +0 -4
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +0 -3
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.d.ts +0 -8
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +7 -35
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +45 -5
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +4 -2
- package/react/types/windowTitleBar.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/common/FontSizeSelector.d.ts +0 -7
- package/react/components/common/FontSizeSelector.js +0 -42
- package/react/components/common/FontSizeSelector.js.map +0 -1
- package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
- package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
- package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
- package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.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.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC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ACzB,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"]}
|
|
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,6CAA6C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sB,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":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\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\n */\nimport async from \"async\";\nimport { Util } from \"@finsemble/finsemble-core\";\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-core/types/common/workspace\";\nimport { types } from \"@finsemble/finsemble-core\";\n\ntype StandardErrorCallback = types.StandardErrorCallback;\n\ntype UserInputResponseType = {\n\tchoice: string;\n\tvalue?: string;\n};\ntype SaveWorkspaceWaterfallParams = {\n\tworkspaceExists: boolean;\n\tworkspaceName: string;\n\ttemplate: any;\n};\n\n// When a user cancels the save workspace dialog, we throw an error, which short-circuits the async call.\nconst SAVE_DIALOG_CANCEL_ERROR = \"Cancel\";\nconst NEGATIVE = \"Negative\";\nlet PROMPT_ON_SAVE = false;\nlet WorkspaceManagementStore: StoreModel;\nlet StoreClient: any;\nlet Logger: any;\nlet WorkspaceManagementGlobalStore: StoreModel;\n\n// Initial data for the store.\nconst defaultData = {\n\tactiveWorkspace: {},\n\tmenuWidth: 285,\n\tWorkspaceList: [],\n\tnewWorkspaceDialogIsActive: false,\n\t/**\n\t * State around whether the workspace is currently in the process of switching.\n\t *\n\t * For simplicity, we're storing this in the local store for now, but this precludes\n\t * other components from signaling that the workspace is changing. A consequence,\n\t * for example, is that if you switch workspaces uses a pin on the toolbar instead\n\t * of the workspace management menu, the spinner doesn't show up.\n\t */\n\tisSwitchingWorkspaces: false,\n\tisPromptingUser: false,\n};\n\nconst Actions = {\n\tautoSave: (callback: StandardCallback) => {\n\t\tconst activeName = FSBL.Clients.WorkspaceClient.activeWorkspace?.name;\n\t\tif (!PROMPT_ON_SAVE) {\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\n\t\t\t\t{\n\t\t\t\t\tname: activeName,\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t(err: StandardError) => {\n\t\t\t\t\tcallback(err);\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tcallback(null);\n\t\t}\n\t},\n\tinitialize: () => {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getWorkspaces\", workspaces);\n\t\t\tWorkspaceManagementStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t});\n\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.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace(\n\t\t\t(err: StandardError, activeWorkspace: { data: WorkspaceType } | undefined) => {\n\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore init getActiveWorkspace\", activeWorkspace);\n\t\t\t\tWorkspaceManagementStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: activeWorkspace,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case,\n\t\t * we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for\n\t\t * a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.update\", (err, response) => {\n\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore init update\", response.data);\n\t\t\t\tWorkspaceManagementStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t});\n\t\t\t\tWorkspaceManagementStore.setValue({\n\t\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\t\tvalue: response.data.workspacesConfig,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tWorkspaceManagementGlobalStore.getValue({ field: \"owner\" }, (err: StandardError, data?: string) => {\n\t\t\tif (data !== finsembleWindow.name) return;\n\t\t\tWorkspaceManagementGlobalStore.Dispatcher.register((action) => {\n\t\t\t\tswitch (action.actionType) {\n\t\t\t\t\tcase \"switchToWorkspace\":\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore switchToWorkspace\", action.data);\n\t\t\t\t\t\tActions.switchToWorkspace(action.data);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reorderWorkspace\":\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore reorderWorkspace\", action.data);\n\t\t\t\t\t\tActions.reorderWorkspaceList(action.data);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"removeWorkspace\":\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore removeWorkspace\", action.data);\n\t\t\t\t\t\tActions.removeWorkspace(\n\t\t\t\t\t\t\taction.data as {\n\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\thideModalOnClose: boolean;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"renameWorkspace\":\n\t\t\t\t\t\tLogger.system.debug(\"WorkspaceManagementStore renameWorkspace\", action.data);\n\t\t\t\t\t\tActions.renameWorkspace(action.data);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// Nothing to do here\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t},\n\n\t/*********************************************************************************************\n\t *\n\t *\t\t\t\t\t\t\t\tGETTERS/SETTERS\n\t *\n\t *********************************************************************************************/\n\tgetActiveWorkspace: () => WorkspaceManagementStore.getValue(\"activeWorkspace\") as WorkspaceType,\n\n\t// Get the name of the workspace that is currently being edited\n\tgetWorkspaceBeingEdited: () => WorkspaceManagementStore.getValue(\"workspaceBeingEdited\") as string,\n\n\tgetWorkspaceList: () => WorkspaceManagementStore.getValue(\"WorkspaceList\") as WorkspaceType[],\n\n\tgetIsSwitchingWorkspaces: () => WorkspaceManagementStore.getValue(\"isSwitchingWorkspaces\") as boolean,\n\n\tsetIsSwitchingWorkspaces: (val: boolean) =>\n\t\tWorkspaceManagementStore.setValue({\n\t\t\tfield: \"isSwitchingWorkspaces\",\n\t\t\tvalue: val,\n\t\t}),\n\n\tgetIsPromptingUser: () => WorkspaceManagementStore.getValue(\"isPromptingUser\") as boolean,\n\n\tsetIsPromptingUser: (val: boolean) =>\n\t\tWorkspaceManagementStore.setValue({\n\t\t\tfield: \"isPromptingUser\",\n\t\t\tvalue: val,\n\t\t}),\n\n\t/*********************************************************************************************\n\t *\n\t *\t\t\t\t\t\t\t\tMain Workspace Actions\n\t *\n\t *********************************************************************************************/\n\n\t/**\n\t * Handles the complete workflow for creating a new workspace.\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.\n\t */\n\tnewWorkspace: function () {\n\t\tlet newWorkspaceName: string;\n\t\tLogger.system.log(\"New workspace - start.\");\n\t\tconst newWorkspaceDialogIsActive = WorkspaceManagementStore.getValue(\"newWorkspaceDialogIsActive\");\n\n\t\ttype createItParams = {\n\t\t\tworkspaceName: string;\n\t\t};\n\t\t// Creates the new workspace.\n\t\tconst createIt = (params: createItParams, cb?: StandardCallback) => {\n\t\t\tLogger.system.log(\"createIt\", params);\n\t\t\tconst { workspaceName } = params;\n\t\t\tFSBL.Clients.WorkspaceClient.createNewWorkspace(workspaceName, {}, (err, response) => {\n\t\t\t\tLogger.system.log(\"createIt createNewWorkspace response\", workspaceName, response);\n\t\t\t\tnewWorkspaceName = response.workspaceName;\n\t\t\t\tif (cb) {\n\t\t\t\t\tcb(null, newWorkspaceName);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tif (!newWorkspaceDialogIsActive) {\n\t\t\tWorkspaceManagementStore.setValue({\n\t\t\t\tfield: \"newWorkspaceDialogIsActive\",\n\t\t\t\tvalue: true,\n\t\t\t});\n\t\t}\n\n\t\tActions.blurWindow();\n\t\tlet tasks: Function[] = [\n\t\t\tActions.autoSave,\n\t\t\tActions.spawnWorkspaceInputField,\n\t\t\tActions.validateWorkspaceInput,\n\t\t\tActions.checkIfWorkspaceAlreadyExists,\n\t\t\tActions.askIfUserWantsNewWorkspace,\n\t\t\tcreateIt,\n\t\t];\n\t\tif (PROMPT_ON_SAVE) {\n\t\t\ttasks = ([Actions.askIfUserWantsToSave, Actions.handleSaveDialogResponse] as Function[]).concat(tasks);\n\t\t}\n\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\n\t},\n\n\t/**\n\t * Handles the workflow for removing a workspace.\n\t * As long as you are not deleting the workspace that is active, it will pop up a confirm dialog,\n\t * and if the user says \"yes\", it will delete the workspace.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tremoveWorkspace: (data: { name: string; hideModalOnClose?: boolean }, cb = (val: any) => {}) => {\n\t\tconst workspaceName = data.name;\n\n\t\tconst dialogParams = {\n\t\t\ttitle: \"Delete this workspace?\",\n\t\t\tquestion: `Are you sure you want to delete the workspace \"${workspaceName}\"?`,\n\t\t\tshowNegativeButton: false,\n\t\t\taffirmativeResponseLabel: \"Delete\",\n\t\t\thideModalOnClose: data.hideModalOnClose,\n\t\t};\n\n\t\t/**\n\t\t * Invoked when the user interacts with the dialog.\n\t\t */\n\t\tfunction onUserInput(err: StandardError, response: UserInputResponseType) {\n\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\tcb(true);\n\t\t\t\tFSBL.Clients.WorkspaceClient.remove({\n\t\t\t\t\tname: workspaceName,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcb(false);\n\t\t\t}\n\t\t}\n\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\n\t},\n\t/**\n\t * The `activeWorkspace` is simply a copy of something we brought out of storage. This function copies the `activeWorkspace` to back to storage.\n\t */\n\tsaveWorkspace: (cb?: StandardErrorCallback) => {\n\t\tconst activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\n\t\tFSBL.Clients.WorkspaceClient.saveAs(\n\t\t\t{\n\t\t\t\tforce: true,\n\t\t\t\tname: activeWorkspace.name,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tcb?.(null);\n\t\t\t}\n\t\t);\n\t},\n\treorderWorkspaceList: ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tlet workspaces: WorkspaceType[] = WorkspaceManagementStore.getValue<WorkspaceType[]>({\n\t\t\tfield: \"WorkspaceList\",\n\t\t});\n\t\tconst workspaceToMove = workspaces[oldIndex];\n\t\tworkspaces.splice(oldIndex, 1);\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\n\t\tconst workspacesWithExpectedStructure = workspaces.map((WSName) => {\n\t\t\treturn {\n\t\t\t\tname: WSName,\n\t\t\t};\n\t\t});\n\t\tFSBL.Clients.WorkspaceClient.setWorkspaces(\n\t\t\t{\n\t\t\t\tworkspaces: workspacesWithExpectedStructure,\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\t\tWorkspaceManagementStore.setValue({\n\t\t\tfield: \"WorkspaceList\",\n\t\t\tvalue: workspaces,\n\t\t});\n\t},\n\trenameWorkspace: ({ oldName, newName }: { oldName: string; newName: string }) => {\n\t\t// Note: This does no checking of the workspace before renaming. If you call this function, and `newName` is an existing\n\t\t// workspace name, the existing workspace will get stomped. Currently, the UI prevents renaming to existing names.\n\t\tFSBL.Clients.WorkspaceClient.rename({\n\t\t\toldName: oldName,\n\t\t\tnewName: newName,\n\t\t\tremoveOldWorkspace: true,\n\t\t\toverwriteExisting: true,\n\t\t});\n\t},\n\n\tshowPreferences: () => {\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t},\n\n\t/**\n\t * Ask the user for a name, make sure it doesn't already exist, then save.\n\t */\n\tsaveWorkspaceAs: () => {\n\t\tfunction saveIt(workspaceName: string, callback: StandardErrorCallback) {\n\t\t\tFSBL.Clients.WorkspaceClient.saveAs(\n\t\t\t\t{\n\t\t\t\t\tname: workspaceName,\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t(err: StandardError, response: any) => {\n\t\t\t\t\tcallback(err, response);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tLogger.system.log(\"SaveWorkspaceAs clicked.\");\n\n\t\tasync.waterfall(\n\t\t\t[\n\t\t\t\tActions.autoSave,\n\t\t\t\tActions.spawnSaveAsDialog,\n\t\t\t\tActions.validateWorkspaceInput,\n\t\t\t\tActions.checkIfWorkspaceAlreadyExists,\n\t\t\t\tActions.askAboutOverwrite,\n\t\t\t\tsaveIt,\n\t\t\t],\n\t\t\tActions.onAsyncComplete\n\t\t);\n\t},\n\n\t/**\n\t * Asks the user if they'd like to save their data, then loads the requested workspace.\n\t */\n\tswitchToWorkspace: async function ({ name }: { name: string }) {\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);\n\t\t// note this prompting flag is cleared in Actions.onAsyncComplete when the previous switch completes (after user responds to the prompt)\n\t\tconst prompting = Actions.getIsPromptingUser();\n\t\tLogger.system.log(\"workspaceManagementMenuStore: switchToWorkspace\", prompting ? \"prompting\" : \"not-prompting\");\n\t\tif (prompting) return;\n\n\t\tActions.setIsSwitchingWorkspaces(true);\n\t\tActions.blurWindow();\n\t\tconst activeWorkspace = WorkspaceManagementStore.getValue(\"activeWorkspace\");\n\n\t\t/**\n\t\t * Actually perform the switch. Happens after we ask the user what they want.\n\t\t *\n\t\t */\n\t\tconst switchWorkspace = (callback = () => {}) => {\n\t\t\tFSBL.Clients.WorkspaceClient.switchTo(\n\t\t\t\t{\n\t\t\t\t\tname: name,\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tActions.setIsSwitchingWorkspaces(false);\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\t/**\n\t\t * Make sure the user is sure\n\t\t */\n\t\tconst askAboutReload = (callback: () => void) => {\n\t\t\tActions.spawnDialog(\n\t\t\t\t\"yesNo\",\n\t\t\t\t{\n\t\t\t\t\tmonitor: \"primary\",\n\t\t\t\t\ttitle: \"Save your workspace?\",\n\t\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\n\t\t\t\t\taffirmativeResponseLabel: \"Save\",\n\t\t\t\t\tnegativeResponseLabel: \"Don't Save\",\n\t\t\t\t},\n\t\t\t\tcallback\n\t\t\t);\n\t\t};\n\n\t\t/**\n\t\t * If the workspace is dirty, we need to do more than if it's clean.\n\t\t * We don't want users to lose unsaved work.\n\t\t */\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\n\t\t\tlet tasks: Function[] = [];\n\n\t\t\tActions.setIsPromptingUser(true);\n\t\t\tlet firstMethod: Function = Actions.autoSave,\n\t\t\t\tsecondMethod = null;\n\n\t\t\tif (PROMPT_ON_SAVE === true) {\n\t\t\t\t// We want to ask the user to save. But if they're trying to reload the workspace,\n\t\t\t\t// the message needs to be different. The first if block just switches that method.\n\t\t\t\tfirstMethod = Actions.askIfUserWantsToSave;\n\t\t\t\tif (name === FSBL.Clients.WorkspaceClient.activeWorkspace?.name) {\n\t\t\t\t\tfirstMethod = askAboutReload;\n\t\t\t\t}\n\n\t\t\t\t// If we are not autosaving, we need to process the dialog input.\n\t\t\t\tsecondMethod = Actions.handleSaveDialogResponse;\n\t\t\t}\n\n\t\t\t// Build the task list.\n\t\t\ttasks = [firstMethod];\n\n\t\t\tif (secondMethod) {\n\t\t\t\ttasks.push(secondMethod);\n\t\t\t}\n\n\t\t\t// Switch is the last thing we do.\n\t\t\ttasks.push(switchWorkspace);\n\n\t\t\tasync.waterfall(tasks, Actions.onAsyncComplete);\n\t\t} else {\n\t\t\tswitchWorkspace();\n\t\t}\n\t},\n\n\t/*********************************************************************************************\n\t *\n\t *\t\t\t\t\t\t\t\tWorkspace Management Helpers\n\t *\n\t *********************************************************************************************/\n\n\t/**\n\t * General handler for `async.series` and `async.waterfall`\n\t */\n\tonAsyncComplete(err?: Error | null) {\n\t\tLogger.system.debug(\"workspaceManagementMenuStore: onAsyncComplete\");\n\t\tWorkspaceManagementStore.setValue({\n\t\t\tfield: \"newWorkspaceDialogIsActive\",\n\t\t\tvalue: false,\n\t\t});\n\t\tconst errMessage = err?.message;\n\t\tif (errMessage && errMessage !== NEGATIVE && errMessage !== SAVE_DIALOG_CANCEL_ERROR) {\n\t\t\t// handle error.\n\t\t\tLogger.system.error(err);\n\t\t}\n\n\t\t// Unlock the UI.\n\t\tActions.setIsSwitchingWorkspaces(false);\n\t\tActions.setIsPromptingUser(false);\n\t},\n\n\t/**\n\t * Helper for spawning dialogs. Keeps the internals of other functions squeaky clean.\n\t *\n\t * @param {string} type \"yesNo\" or \"singleInput\"\n\t * @param {object} data Optional params for the dialog call.\n\t * @param {function} responseCallback invoked when the user interacts with the dialog.\n\t */\n\tspawnDialog(type: \"yesNo\" | \"singleInput\", data: any, responseCallback: StandardErrorCallback) {\n\t\tLogger.system.debug(\"spawnDialog\", type, data);\n\t\tif (type === \"singleInput\") {\n\t\t\tdata.showCancelButton = true;\n\t\t}\n\t\tFSBL.Clients.DialogManager.open(type, data, responseCallback);\n\t},\n\n\tspawnSaveAsDialog: (cb: StandardCallback) => {\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\n\t\t\tLogger.system.log(\"SpawnSaveAsDialog onUserInput\", response);\n\t\t\tlet callbackError: Error | null = null;\n\t\t\tif (typeof err === \"string\") {\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\n\t\t\t\tcallbackError = new Error(err);\n\t\t\t}\n\t\t\tif (cb) {\n\t\t\t\tcb(callbackError || err, response);\n\t\t\t}\n\t\t};\n\n\t\tconst dialogParams = {\n\t\t\ttitle: \"Enter a name for your new workspace.\",\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\n\t\t\taffirmativeResponseLabel: \"Confirm\",\n\t\t\tshowCancelButton: false,\n\t\t\tshowNegativeButton: false,\n\t\t};\n\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\n\t},\n\n\t/**\n\t * Spawns an input field asking what the user would like to name their new workspace.\n\t */\n\tspawnWorkspaceInputField: (cb: StandardCallback) => {\n\t\t// Spawns the dialog with the input field and accepts a callback to be invoked after the user acts.\n\t\tLogger.system.log(\"SpawnWorkspaceInput - start\");\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\n\t\t\tLogger.system.log(\"SpawnWorkspaceInput onUserInput\", response);\n\t\t\tlet callbackError: Error | null = null;\n\t\t\tif (typeof err === \"string\") {\n\t\t\t\t// Error objects cause async to invoke the final callback in async.waterfall.\n\t\t\t\tcallbackError = new Error(err);\n\t\t\t}\n\t\t\tif (cb) {\n\t\t\t\tcb(callbackError || err, response);\n\t\t\t}\n\t\t};\n\n\t\tconst dialogParams = {\n\t\t\ttitle: \"Enter a name for your new workspace.\",\n\t\t\tinputLabel: \"Enter a name for your new workspace.\",\n\t\t\taffirmativeResponseLabel: \"Confirm\",\n\t\t\tshowCancelButton: false,\n\t\t\tshowNegativeButton: false,\n\t\t};\n\n\t\tActions.spawnDialog(\"singleInput\", dialogParams, onUserInput);\n\t},\n\n\t/**\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.\n\t */\n\taskIfUserWantsToSave: async function (callback: StandardCallback) {\n\t\tconst activeWorkspace: WorkspaceType = WorkspaceManagementStore.getValue(\"activeWorkspace\");\n\n\t\tif (await FSBL.Clients.WorkspaceClient.isWorkspaceDirty()) {\n\t\t\tLogger.system.log(\"NewWorkspace.spawnDialog start.\");\n\t\t\tconst dialogParams = {\n\t\t\t\tmonitor: \"primary\",\n\t\t\t\ttitle: \"Save your workspace?\",\n\t\t\t\tquestion: `\\\"${activeWorkspace.name}\\\" has unsaved changes. Would you like to save?`,\n\t\t\t\taffirmativeResponseLabel: \"Save\",\n\t\t\t\tnegativeResponseLabel: \"Don't Save\",\n\t\t\t};\n\t\t\tconst waitForUserInput = () =>\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\n\t\t\t\t\t\tLogger.system.log(\"Spawn Dialog callback.\");\n\t\t\t\t\t\tif (callback) callback(null, response);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t};\n\t\t\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\n\t\t\t\t});\n\t\t\treturn await waitForUserInput();\n\t\t} else {\n\t\t\t// In this case the workspace is not dirty, so we don't need to save.\n\t\t\tif (callback) callback(null, { choice: \"negative\" });\n\t\t\treturn { choice: \"negative\" };\n\t\t}\n\t},\n\n\t/**\n\t * Handles the response from the dialog asking if the user wants to save their workspace.\n\t *\n\t * @param {any} response\n\t * @param {any} callback\n\t */\n\thandleSaveDialogResponse(response: UserInputResponseType, callback: StandardErrorCallback) {\n\t\tif (response.choice === \"affirmative\") {\n\t\t\t// User wants to save, so call the client API.\n\t\t\tActions.saveWorkspace(callback);\n\t\t} else if (response.choice === \"negative\") {\n\t\t\t// Doesn't want to save.\n\t\t\tcallback(null);\n\t\t} else {\n\t\t\t// choice === cancel\n\t\t\tcallback(new Error(SAVE_DIALOG_CANCEL_ERROR));\n\t\t}\n\t},\n\t/**\n\t * Makes sure the user has input a valid workspace name.\n\t */\n\tvalidateWorkspaceInput(response: UserInputResponseType, callback: StandardErrorCallback) {\n\t\tLogger.system.log(\"spawnWorkspaceInput\", response);\n\t\t// If user wants to proceed but gave an invalid name, tell them that they messed up, then die.\n\t\tif (response.choice !== \"cancel\" && (!response.value || response.value === \"\")) {\n\t\t\tlet dialogParams = {\n\t\t\t\ttitle: \"Invalid Workspace Name\",\n\t\t\t\tquestion: \"Workspace names must contain letters or numbers. Please try again.\",\n\t\t\t\taffirmativeResponseLabel: \"OK\",\n\t\t\t\tshowNegativeButton: false,\n\t\t\t\tshowCancelButton: false,\n\t\t\t};\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, () => {});\n\t\t\treturn callback(new Error(\"Invalid workspace name.\"));\n\t\t} else if (response.choice === \"cancel\") {\n\t\t\treturn callback(new Error(SAVE_DIALOG_CANCEL_ERROR));\n\t\t}\n\t\tcallback(null, response);\n\t},\n\n\taskAboutOverwrite(params: SaveWorkspaceWaterfallParams, callback: StandardErrorCallback) {\n\t\tconst { workspaceExists, workspaceName } = params;\n\t\tconst dialogParams = {\n\t\t\ttitle: \"Overwrite Workspace?\",\n\t\t\tquestion: `This will overwrite the saved data for \"${workspaceName}\". Would you like to proceed?`,\n\t\t\taffirmativeResponseLabel: \"Overwrite\",\n\t\t\tshowNegativeButton: false,\n\t\t};\n\t\tconst onUserInput = (err: StandardError, response: UserInputResponseType) => {\n\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\tcallback(null, workspaceName);\n\t\t\t} else {\n\t\t\t\tcallback(new Error(NEGATIVE));\n\t\t\t}\n\t\t};\n\t\tif (workspaceExists) {\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\n\t\t} else {\n\t\t\tcallback(null, workspaceName);\n\t\t}\n\t},\n\taskIfUserWantsNewWorkspace(params: SaveWorkspaceWaterfallParams, callback: StandardErrorCallback) {\n\t\tlet { workspaceExists, workspaceName, template } = params;\n\n\t\tlet dialogParams = {\n\t\t\ttitle: \"New workspace\",\n\t\t\tquestion: `The workspace \"${workspaceName}\" already exists. A new workspace with a modified name will be created.`,\n\t\t\taffirmativeResponseLabel: \"OK\",\n\t\t\tshowNegativeButton: false,\n\t\t};\n\n\t\tfunction onUserInput(err: StandardError, response: UserInputResponseType) {\n\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\tcallback(null, { workspaceName, template });\n\t\t\t} else {\n\t\t\t\tcallback(new Error(NEGATIVE));\n\t\t\t}\n\t\t}\n\t\tif (workspaceExists) {\n\t\t\tActions.spawnDialog(\"yesNo\", dialogParams, onUserInput);\n\t\t} else {\n\t\t\tcallback(null, { workspaceName, template });\n\t\t}\n\t},\n\n\t/**\n\t * Checks if the workspace exists. If it does, it asks the user if they're comfortable overwriting that data.\n\t */\n\tcheckIfWorkspaceAlreadyExists(response: any, callback: StandardErrorCallback) {\n\t\tconst workspaceName = response.value;\n\t\tconst camelCaseWorkspaceName = Util.camelCase(workspaceName);\n\t\t// Do any of the workspaces have the same name that the user is trying to input.\n\t\tconst workspaceExists = FSBL.Clients.WorkspaceClient.workspaces.some(\n\t\t\t(workspace) => Util.camelCase(workspace) === camelCaseWorkspaceName\n\t\t);\n\t\tcallback(null, {\n\t\t\tworkspaceExists,\n\t\t\tworkspaceName,\n\t\t\ttemplate: response.template,\n\t\t});\n\t},\n\t/*********************************************************************************************\n\t *\n\t *\t\t\t\t\t\t\t\tMisc functionality\n\t *\n\t *********************************************************************************************/\n\t/**\n\t * Un-focuses from the menu.\n\t */\n\tblurWindow: function () {\n\t\tfinsembleWindow.blur();\n\t},\n};\n\nfunction createLocalStore(done: () => void) {\n\tStoreClient.createStore(\n\t\t{ store: \"Finsemble-WorkspaceMenu-Local-Store\", values: defaultData },\n\t\t(err: StandardError, store: StoreModel) => {\n\t\t\tWorkspaceManagementStore = store;\n\t\t\tdone();\n\t\t}\n\t);\n}\n\nfunction createGlobalStore(done: () => void) {\n\tStoreClient.createStore(\n\t\t{\n\t\t\tstore: \"Finsemble-WorkspaceMenu-Global-Store\",\n\t\t\tglobal: true,\n\t\t\tvalues: { owner: finsembleWindow.name },\n\t\t},\n\t\t(err: StandardError, store: StoreModel) => {\n\t\t\tWorkspaceManagementGlobalStore = store;\n\t\t\tdone();\n\t\t}\n\t);\n}\n\nfunction getPreferences(done: () => void) {\n\tFSBL.Clients.ConfigClient.getValue(\n\t\t{\n\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\n\t\t},\n\t\t(err: StandardError, data?: boolean | null) => {\n\t\t\tlet prompt = data;\n\t\t\t// default to false.\n\t\t\tPROMPT_ON_SAVE = prompt === null || prompt === undefined ? PROMPT_ON_SAVE : prompt;\n\t\t\tdone();\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the Workspace Management Menu.\n */\nfunction initialize(cb: any) {\n\tStoreClient = FSBL.Clients.DistributedStoreClient;\n\t// eslint-disable-next-line prefer-destructuring\n\tLogger = FSBL.Clients.Logger;\n\tasync.parallel([createGlobalStore, createLocalStore, getPreferences], () => {\n\t\tActions.initialize();\n\t\tcb(WorkspaceManagementStore);\n\t});\n}\n\nlet getStore = () => WorkspaceManagementStore;\n\n/**\n * This is a quick little initialization manager that Terry hacked up.\n * Ultimately everything in this file should be rewritten in hooks/redux pattern.\n */\nclass StoreManager {\n\tinitialized: boolean;\n\n\tinitializing: boolean;\n\n\tcallbacks: Function[];\n\n\tstore: StoreModel | null;\n\n\tconstructor() {\n\t\tthis.initialized = false;\n\t\tthis.initializing = false;\n\t\tthis.callbacks = [];\n\t\tthis.store = null;\n\t}\n\n\tinitialize() {\n\t\tif (this.initializing) return;\n\t\tthis.initializing = true;\n\t\tinitialize((store: StoreModel) => {\n\t\t\tthis.initialized = true;\n\t\t\tthis.store = store;\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\n\t\t});\n\t}\n\n\taddInitializedListener(cb: (store: StoreModel) => void) {\n\t\tif (this.initialized && this.store !== null) return cb(this.store);\n\t\tthis.callbacks.push(cb);\n\t}\n\n\tremoveInitializedListener(cb: Function) {\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\n\t}\n}\nconst storeManager = new StoreManager();\n\nexport {\n\tstoreManager,\n\tWorkspaceManagementGlobalStore as GlobalStore,\n\tinitialize,\n\tWorkspaceManagementStore as Store,\n\tActions,\n\tgetStore,\n};\n"]}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* workspaceManagementMenu.css
|
|
3
|
-
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.active-workspace > div {
|
|
8
|
-
font-weight: var(--menu-active-workspace-font-weight);
|
|
9
|
-
color: var(--menu-active-workspace-font-color);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.workspace-name {
|
|
13
|
-
text-overflow: ellipsis;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
position: relative;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.workspace-menu-list {
|
|
20
|
-
padding-top: 4px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.fsbl-loader {
|
|
24
|
-
font-size: 10px;
|
|
25
|
-
margin: 10px 10px 10px 1px;
|
|
26
|
-
text-indent: -9999em;
|
|
27
|
-
width: 10px;
|
|
28
|
-
height: 10px;
|
|
29
|
-
top: -7px;
|
|
30
|
-
border-radius: 50%;
|
|
31
|
-
background: #ffffff;
|
|
32
|
-
background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
33
|
-
background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
34
|
-
background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
35
|
-
background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
36
|
-
background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
37
|
-
position: relative;
|
|
38
|
-
-webkit-animation: load3 1.4s infinite linear;
|
|
39
|
-
animation: load3 1.4s infinite linear;
|
|
40
|
-
-webkit-transform: translateZ(0);
|
|
41
|
-
-ms-transform: translateZ(0);
|
|
42
|
-
transform: translateZ(0);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.fsbl-loader:before {
|
|
46
|
-
width: 50%;
|
|
47
|
-
height: 50%;
|
|
48
|
-
background: #ffffff;
|
|
49
|
-
border-radius: 100% 0 0 0;
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 0;
|
|
52
|
-
left: 0;
|
|
53
|
-
content: "";
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.fsbl-loader:after {
|
|
57
|
-
background: #303d47;
|
|
58
|
-
width: 75%;
|
|
59
|
-
height: 75%;
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
content: "";
|
|
62
|
-
margin: auto;
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
bottom: 0;
|
|
67
|
-
right: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@-webkit-keyframes load3 {
|
|
71
|
-
0% {
|
|
72
|
-
-webkit-transform: rotate(0deg);
|
|
73
|
-
transform: rotate(0deg);
|
|
74
|
-
}
|
|
75
|
-
100% {
|
|
76
|
-
-webkit-transform: rotate(360deg);
|
|
77
|
-
transform: rotate(360deg);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@keyframes load3 {
|
|
82
|
-
0% {
|
|
83
|
-
-webkit-transform: rotate(0deg);
|
|
84
|
-
transform: rotate(0deg);
|
|
85
|
-
}
|
|
86
|
-
100% {
|
|
87
|
-
-webkit-transform: rotate(360deg);
|
|
88
|
-
transform: rotate(360deg);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* workspaceManagementMenu.css
|
|
3
|
+
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.active-workspace > div {
|
|
8
|
+
font-weight: var(--menu-active-workspace-font-weight);
|
|
9
|
+
color: var(--menu-active-workspace-font-color);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.workspace-name {
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.workspace-menu-list {
|
|
20
|
+
padding-top: 4px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fsbl-loader {
|
|
24
|
+
font-size: 10px;
|
|
25
|
+
margin: 10px 10px 10px 1px;
|
|
26
|
+
text-indent: -9999em;
|
|
27
|
+
width: 10px;
|
|
28
|
+
height: 10px;
|
|
29
|
+
top: -7px;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
background: #ffffff;
|
|
32
|
+
background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
33
|
+
background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
34
|
+
background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
35
|
+
background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
36
|
+
background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
|
|
37
|
+
position: relative;
|
|
38
|
+
-webkit-animation: load3 1.4s infinite linear;
|
|
39
|
+
animation: load3 1.4s infinite linear;
|
|
40
|
+
-webkit-transform: translateZ(0);
|
|
41
|
+
-ms-transform: translateZ(0);
|
|
42
|
+
transform: translateZ(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.fsbl-loader:before {
|
|
46
|
+
width: 50%;
|
|
47
|
+
height: 50%;
|
|
48
|
+
background: #ffffff;
|
|
49
|
+
border-radius: 100% 0 0 0;
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
content: "";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.fsbl-loader:after {
|
|
57
|
+
background: #303d47;
|
|
58
|
+
width: 75%;
|
|
59
|
+
height: 75%;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
content: "";
|
|
62
|
+
margin: auto;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@-webkit-keyframes load3 {
|
|
71
|
+
0% {
|
|
72
|
+
-webkit-transform: rotate(0deg);
|
|
73
|
+
transform: rotate(0deg);
|
|
74
|
+
}
|
|
75
|
+
100% {
|
|
76
|
+
-webkit-transform: rotate(360deg);
|
|
77
|
+
transform: rotate(360deg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes load3 {
|
|
82
|
+
0% {
|
|
83
|
+
-webkit-transform: rotate(0deg);
|
|
84
|
+
transform: rotate(0deg);
|
|
85
|
+
}
|
|
86
|
+
100% {
|
|
87
|
+
-webkit-transform: rotate(360deg);
|
|
88
|
+
transform: rotate(360deg);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsPreferencesContext.js","sourceRoot":"","sources":["../../../src/components/userPreferences/NotificationsPreferencesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAgBtC,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAC3D,EAAyC,CACzC,CAAC","sourcesContent":["import { createContext } from \"react\";\
|
|
1
|
+
{"version":3,"file":"NotificationsPreferencesContext.js","sourceRoot":"","sources":["../../../src/components/userPreferences/NotificationsPreferencesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAgBtC,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAC3D,EAAyC,CACzC,CAAC","sourcesContent":["import { createContext } from \"react\";\nimport { INotificationSources } from \"./components/content/Notifications\";\n\nexport type NotificationsPreferencesContextType = {\n\tcurrentNotificationsPreferencesView: \"Home\" | \"Sources\" | \"Details\";\n\tsetCurrentNotificationsPreferencesView: React.Dispatch<React.SetStateAction<\"Home\" | \"Sources\" | \"Details\">>;\n\tselectedNotificationSource: INotificationSources | null;\n\tsetSelectedNotificationSource: React.Dispatch<React.SetStateAction<INotificationSources | null>>;\n\tnotificationSources: INotificationSources[];\n\tsetNotificationSources: React.Dispatch<React.SetStateAction<INotificationSources[]>>;\n};\n\n/**\n * We initialize our context with an empty object.\n * We will set the context properly when we use it at runtime (during the first render).\n */\nexport const NotificationsPreferencesContext = createContext<NotificationsPreferencesContextType>(\n\t{} as NotificationsPreferencesContextType\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferenceTypes.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferenceTypes.ts"],"names":[],"mappings":"","sourcesContent":["export type ScheduledRestartObjectType = {\
|
|
1
|
+
{"version":3,"file":"UserPreferenceTypes.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferenceTypes.ts"],"names":[],"mappings":"","sourcesContent":["export type ScheduledRestartObjectType = {\n\thour: number;\n\tminute: string | number;\n\tmeridiem: string;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferences.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferences.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAMvD,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrB,MAAM,EAAE,oBAAoB,EAAE,GAAQ,KAAK,CAAC;IAC5C,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC1E,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5F,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAClG,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACxG,OAAO,CACN,oBAAC,mBAAmB,IACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,gBAAgB,EAC7B,cAAc,EAAE,mBAAmB,GAClC,CACF,CAAC;AACH,CAAC,CAAC;AACF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC","sourcesContent":["/*!\
|
|
1
|
+
{"version":3,"file":"UserPreferences.js","sourceRoot":"","sources":["../../../src/components/userPreferences/UserPreferences.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,aAAa,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAMvD,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrB,MAAM,EAAE,oBAAoB,EAAE,GAAQ,KAAK,CAAC;IAC5C,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC1E,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5F,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAClG,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,EAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACxG,OAAO,CACN,oBAAC,mBAAmB,IACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,gBAAgB,EAC7B,cAAc,EAAE,mBAAmB,GAClC,CACF,CAAC;AACH,CAAC,CAAC;AACF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\nimport General from \"./components/content/General\";\nimport Workspaces from \"./components/content/Workspaces\";\nimport DashbarEditor from \"./components/content/DashbarEditor\";\nimport Notifications from \"./components/content/Notifications\";\nimport { UserPreferencesBase } from \"./UserPreferencesBase\";\nimport * as Store from \"./stores/UserPreferencesStore\";\n\n/**\n * The UserPreferences component initializes the user preference store that's used by its child components and renders\n * its child components: LeftNav and ContentSection with the proper styles.\n */\nexport const UserPreferences: React.FunctionComponent<{\n\tsections?: {};\n}> = ({ sections }) => {\n\tconst { UserPreferencesStore }: any = Store;\n\tconst storeSetValue = (obj: object) => UserPreferencesStore.setValue(obj);\n\tconst storeGetValue = (obj: object, cb: Function) => UserPreferencesStore.getValue(obj, cb);\n\tconst storeAddListener = (obj: object, cb: Function) => UserPreferencesStore.addListener(obj, cb);\n\tconst storeRemoveListener = (obj: object, cb: Function) => UserPreferencesStore.removeListener(obj, cb);\n\treturn (\n\t\t<UserPreferencesBase\n\t\t\tsections={sections}\n\t\t\tsetValue={storeSetValue}\n\t\t\tgetValue={storeGetValue}\n\t\t\taddListener={storeAddListener}\n\t\t\tremoveListener={storeRemoveListener}\n\t\t/>\n\t);\n};\nexport { General, Workspaces, DashbarEditor, Notifications };\n"]}
|
|
@@ -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;AAEnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,sCAAsC,CAAC;AAE9C,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAGrD,IAAI,aAAa,EAAE,CAAC;AAGpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,EAAE;IAEjD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAE5C,SAAS,CAAC,GAAG,EAAE;QACd,SAAS,mBAAmB,CAAC,KAAU,EAAE,QAAa;YACrD,IAAI,KAAK,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;aAC1D;iBAAM;gBACN,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;gBAC1B,IAAI,IAAI,CAAC,cAAc,EAAE;oBACxB,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;wBAC1C,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBACtC;yBAAM;wBACN,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,cAAc,sCAAsC,CAAC,CAAC;qBACpF;iBACD;aACD;QACF,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,iCAAiC,EAAE,mBAAmB,CAAC,CAAC;QAC9F,OAAO,GAAG,EAAE;YACX,IAAI,CAAC,OAAO,CAAC,YAAY,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\";\
|
|
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;AAEnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,sCAAsC,CAAC;AAE9C,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAGrD,IAAI,aAAa,EAAE,CAAC;AAGpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAA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AAC;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\";\n\nimport LeftNav from \"./components/LeftNav\";\nimport ContentSection from \"./components/ContentSection\";\nimport \"../../assets/css/userPreferences.css\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\nexport const UserPreferencesBase = (props: any) => {\n\t// The active section is the section that is currently selected and displayed in the preference menu.\n\tconst [activeSection, setActiveSection] = useState(\"General\");\n\tconst entries = Object.keys(props.sections);\n\n\tuseEffect(() => {\n\t\tfunction listenForPreference(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (data.preferencesTab) {\n\t\t\t\t\tif (entries.includes(data.preferencesTab)) {\n\t\t\t\t\t\tsetActiveSection(data.preferencesTab);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn(`Unknown ${data?.preferencesTab} value for User Preferences sections`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreference);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreference);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tprops.addListener({ field: \"activeSection\" }, setActiveSection);\n\n\t\treturn function cleanup() {\n\t\t\tprops.removeListener({ field: \"activeSection\" }, setActiveSection);\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<div className=\"complex-menu-wrapper\">\n\t\t\t<LeftNav\n\t\t\t\tactiveSection={activeSection}\n\t\t\t\tsetValue={props.setValue}\n\t\t\t\tgetValue={props.getValue}\n\t\t\t\tentries={entries}\n\t\t\t\tsetActiveEntry={setActiveSection}\n\t\t\t/>\n\t\t\t<ContentSection activeSection={activeSection} {...props} />\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -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,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\";\
|
|
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\";\nimport * as storeExports from \"../toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore\";\nimport {\n\tinitialize as userPreferencesStoreInitialize,\n\tActions as UserPreferencesActions,\n} from \"./stores/UserPreferencesStore\";\nimport { UserPreferences as UserPreferencesComponent } from \"./UserPreferences\";\n\nvar WorkspaceManagementMenuGlobalStore: any;\n\nexport const UserPreferences: React.FunctionComponent<{\n\tsections?: {};\n}> = ({ sections }) => {\n\tconst [ready, setReady] = React.useState(false);\n\n\tuseEffect(() => {\n\t\tconst makeReady = () => {\n\t\t\tstoreExports.initialize(() => {\n\t\t\t\tWorkspaceManagementMenuGlobalStore = storeExports.GlobalStore;\n\t\t\t\tuserPreferencesStoreInitialize(WorkspaceManagementMenuGlobalStore, () => {\n\t\t\t\t\tUserPreferencesActions.getWorkspaces();\n\t\t\t\t});\n\t\t\t\tsetReady(true);\n\t\t\t});\n\t\t};\n\t\tif (window.FSBL && FSBL?.addEventListener) {\n\t\t\tFSBL.addEventListener(\"onReady\", makeReady);\n\t\t} else {\n\t\t\twindow.addEventListener(\"FSBLReady\", makeReady);\n\t\t}\n\t}, []);\n\n\treturn <>{ready && <UserPreferencesComponent sections={sections} />}</>;\n};\n"]}
|
|
@@ -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,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\";\
|
|
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\";\nimport { Header } from \"../../common/Header\";\n\n/**\n * Displays the user preference section page for the currently selected section.\n * @param {string} props.activeSection The current selected section.\n * @param {object} props.customSections The client customized user preference sections.\n */\n\ntype ContentSectionProps = {\n\taddListener: Function;\n\tremoveListener: Function;\n\tgetValue: Function;\n\tsetValue: Function;\n\tactiveSection?: String;\n\tsections?: { Dashbar: any; General: any; Notifications: any; Workspaces: any };\n};\nexport default class ContentSection extends React.Component<ContentSectionProps> {\n\tconstructor(props: ContentSectionProps) {\n\t\tsuper(props);\n\t}\n\n\thideWindow() {\n\t\tFSBL.Clients.DialogManager.hideModal();\n\t\tfinsembleWindow?.hide();\n\t}\n\n\trender() {\n\t\tconst { activeSection, sections }: any = this.props;\n\t\tconst Component = sections[activeSection];\n\t\treturn (\n\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t<div className=\"complex-menu-header\">\n\t\t\t\t\t<div style={{ marginTop: \"-25px\", marginLeft: \"-25px\" }} className=\"active-section-header\">\n\t\t\t\t\t\t<Header>{activeSection}</Header>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\tclassName=\"ff-close complex-menu-close\"\n\t\t\t\t\t\tonClick={this.hideWindow}\n\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\tthis.hideWindow();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t></div>\n\t\t\t\t</div>\n\t\t\t\t<Component\n\t\t\t\t\taddListener={this.props.addListener}\n\t\t\t\t\tremoveListener={this.props.removeListener}\n\t\t\t\t\tsetValue={this.props.setValue}\n\t\t\t\t\tgetValue={this.props.getValue}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
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,KAAmB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,SAAS;YACxB,YAAY,EAAE,EAAE;SAChB,CAAC;IACH,CAAC;IAED,gBAAgB,CAAC,IAAY;QAC5B,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YACvC,KAAK,EAAE,eAAe;SACtB,CAAC,CAAC;QACH,IAAI,aAAa,KAAK,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC;gBACb,aAAa,EAAE,IAAI;aACnB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CA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AAG,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\";\
|
|
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,KAAmB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,SAAS;YACxB,YAAY,EAAE,EAAE;SAChB,CAAC;IACH,CAAC;IAED,gBAAgB,CAAC,IAAY;QAC5B,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YACvC,KAAK,EAAE,eAAe;SACtB,CAAC,CAAC;QACH,IAAI,aAAa,KAAK,IAAI,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC;gBACb,aAAa,EAAE,IAAI;aACnB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,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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\";\nimport ButtonRow from \"../../common/ButtonRow\";\n\n/**\n * The left section of the UserPreference menu. It contains all the preference section buttons for the user\n * to select and go to different user preference sections.\n */\n\ntype LeftNavProps = {\n\tgetValue: Function;\n\tsetValue: Function;\n\tsetActiveEntry: Function;\n\tactiveSection: string;\n\tentries: Array<string>;\n};\n\ntype LeftNavState = {\n\tactiveSection: string;\n\theaderImgUrl: string;\n};\nexport default class LeftNav extends React.Component<LeftNavProps, LeftNavState> {\n\tconstructor(props: LeftNavProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tactiveSection: \"General\",\n\t\t\theaderImgUrl: \"\",\n\t\t};\n\t}\n\n\tsetActiveSection(name: string) {\n\t\tlet activeSection = this.props.getValue({\n\t\t\tfield: \"activeSection\",\n\t\t});\n\t\tif (activeSection !== name) {\n\t\t\tthis.setState({\n\t\t\t\tactiveSection: name,\n\t\t\t});\n\t\t\tthis.props.setValue({ field: \"activeSection\", value: name });\n\t\t\tthis.props.setActiveEntry(name);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tFSBL.Clients.ConfigClient.getValues(null, (err: any, config: any) => {\n\t\t\tif (config.startup_app && config.startup_app.applicationIcon) {\n\t\t\t\tthis.setState({\n\t\t\t\t\theaderImgUrl: config.startup_app.applicationIcon,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic getDerivedStateFromProps(nextProps: any, prevState: any) {\n\t\tif (nextProps.activeSection !== prevState.activeSection) {\n\t\t\treturn {\n\t\t\t\tactiveSection: nextProps.activeSection,\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tcomponentDidUpdate(prevProps: any) {\n\t\tif (this.props.activeSection !== prevProps.activeSection) {\n\t\t\tthis.setActiveSection(this.props.activeSection);\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div className=\"complex-menu-left-nav-preference\" role=\"tabgroup\">\n\t\t\t\t<div className=\"complex-menu-left-nav-header\" role=\"header\" aria-level={1}>\n\t\t\t\t\tPreferences\n\t\t\t\t</div>\n\t\t\t\t{this.props.entries.map((entry: any) => {\n\t\t\t\t\tlet sectionToggleClasses = \"complex-menu-section-toggle\";\n\t\t\t\t\tif (entry === this.state.activeSection) {\n\t\t\t\t\t\tsectionToggleClasses = `${sectionToggleClasses} active-section-toggle`;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div key={entry} style={{ height: 35 }}>\n\t\t\t\t\t\t\t<ButtonRow\n\t\t\t\t\t\t\t\tclassName={sectionToggleClasses}\n\t\t\t\t\t\t\t\tlabel={entry}\n\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tthis.setActiveSection(entry);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonKeyDown={(e: KeyboardEvent) => {\n\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\t\t\tthis.setActiveSection(entry);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></ButtonRow>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
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,sBAAsB,CAAC,QAAQ,CAC3C;gBACC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB;gBAClC,MAAM,EAAE,IAA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qBAAqB;oBACrC;wBACC,6BAAK,SAAS,EAAC,UAAU,GAAG;wBAC5B,6BAAK,SAAS,EAAC,UAAU,GAAG;wBAC5B,6BAAK,SAAS,EAAC,UAAU,GAAG;wBAC5B,6BAAK,SAAS,EAAC,UAAU,GAAG,CAClB;oBACX;wBACC,4BAAI,SAAS,EAAC,cAAc;4BAC3B,+BAAS;4BACT,yCAAe;4BACf,uCAAa;4BACb,yCAAe,CACX,CACE;oBACR,mCACE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE;wBACvC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO;4BAChC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;4BACrC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;wBACpC,OAAO,CACN,oBAAC,iBAAiB,IACjB,GAAG,EAAE,KAAK,EACV,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,GAChB,CACF,CAAC;oBACH,CAAC,CAAC,CACK,CACD,CACH,CACN,CAAC;SACF;aAAM;YACN,OAAO,CACN,6BAAK,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,IACnD,+EAA+E,UAAU,EAAE,CACvF,CACN,CAAC;SACF;IACF,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport \"../../../../assets/css/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"]}
|
|
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,sBAAsB,CAAC,QAAQ,CAC3C;gBACC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB;gBAClC,MAAM,EAAE,IAAI;aACZ,EACD,CAAC,KAAU,EAAE,KAAU,EAAE,EAAE;gBAC1B,MAAM,YAAY,GAAG,KAAK,CAAC;gBAE3B,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC;gBAE7C,YAAY,CAAC,WAAW,CACvB;oBACC,KAAK,EAAE,cAAc;iBACrB,EACD,IAAI,CAAC,kBAAkB,CACv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;4BACf,uCAAa;4BACb,yCAAe,CACX,CACE;oBACR,mCACE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE;wBACvC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO;4BAChC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;4BACrC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;wBACpC,OAAO,CACN,oBAAC,iBAAiB,IACjB,GAAG,EAAE,KAAK,EACV,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,GAChB,CACF,CAAC;oBACH,CAAC,CAAC,CACK,CACD,CACH,CACN,CAAC;SACF;aAAM;YACN,OAAO,CACN,6BAAK,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,IACnD,+EAA+E,UAAU,EAAE,CACvF,CACN,CAAC;SACF;IACF,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport \"../../../../assets/css/userPreferences.css\";\nimport DashbarEditorItem from \"./DashbarEditorItem\";\n\ntype DashbarEditorProps = {\n\tavailableItems?: Array<any>;\n\tclassName?: string;\n};\n\ntype DashbarEditorState = {\n\tdashbarStore: any;\n\tdashbarConfigPath: string;\n\tdashbarStorePath: string;\n\tavailableItems: Array<any>;\n};\n\nexport default class DashbarEditor extends React.Component<DashbarEditorProps, DashbarEditorState> {\n\tconstructor(props: DashbarEditorProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdashbarStore: null,\n\t\t\tdashbarConfigPath: \"finsemble.availableDashbarItems\",\n\t\t\tdashbarStorePath: \"Finsemble-Dashbar-Store\",\n\t\t\t// props.availableItems is for the DashbarEditor story\n\t\t\tavailableItems: props.availableItems ? props.availableItems : [],\n\t\t};\n\t\tthis.updateDashbarItems = this.updateDashbarItems.bind(this);\n\t}\n\n\tasync componentDidMount() {\n\t\ttry {\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t\t});\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t\t\t{\n\t\t\t\t\tstore: this.state.dashbarStorePath,\n\t\t\t\t\tglobal: true,\n\t\t\t\t},\n\t\t\t\t(error: any, store: any) => {\n\t\t\t\t\tconst DashbarStore = store;\n\n\t\t\t\t\tconst { dashbaritems } = DashbarStore.values;\n\n\t\t\t\t\tDashbarStore.addListener(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfield: \"dashbaritems\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tthis.updateDashbarItems\n\t\t\t\t\t);\n\n\t\t\t\t\tconst newDashbarItems: Array<any> = [];\n\n\t\t\t\t\tconst hasEnabledItems = dashbaritems && Array.isArray(dashbaritems) && dashbaritems.length > 0;\n\n\t\t\t\t\tavailableDashbarItems &&\n\t\t\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\n\t\t\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\n\t\t\t\t\t\t\tif (hasEnabledItems && dashbaritems.includes(dashbarItemName)) {\n\t\t\t\t\t\t\t\tnewItem.enabled = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewItem.enabled = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnewItem.id = dashbarItemName;\n\t\t\t\t\t\t\tnewDashbarItems.push(newItem);\n\t\t\t\t\t\t});\n\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tdashbarStore: DashbarStore,\n\t\t\t\t\t\tavailableItems: newDashbarItems,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t} catch (errorInitializingDashbarItems) {\n\t\t\tFSBL.Clients.Logger.system.error(\"Error initializing dashbar preferences\", errorInitializingDashbarItems);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\ttry {\n\t\t\tthis.state.dashbarStore.removeListener({ field: \"dashbaritems\" }, this.updateDashbarItems);\n\t\t} catch {\n\t\t\tFSBL.Clients.Logger.system.error(\"Error unmounting component\");\n\t\t}\n\t}\n\n\tasync updateDashbarItems(err: any, data: any) {\n\t\ttry {\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t\t});\n\n\t\t\tconst hasEnabledItems = data.value && Array.isArray(data.value) && data.value.length > 0;\n\n\t\t\tconst newDashbarItems: Array<any> = [];\n\t\t\tavailableDashbarItems &&\n\t\t\t\tObject.keys(availableDashbarItems).map((dashbarItemName) => {\n\t\t\t\t\tconst newItem = availableDashbarItems[dashbarItemName];\n\t\t\t\t\tif (hasEnabledItems && data.value.includes(dashbarItemName)) {\n\t\t\t\t\t\tnewItem.enabled = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewItem.enabled = false;\n\t\t\t\t\t}\n\t\t\t\t\tnewItem.id = dashbarItemName;\n\t\t\t\t\tnewDashbarItems.push(newItem);\n\t\t\t\t});\n\n\t\t\tthis.setState({\n\t\t\t\tavailableItems: newDashbarItems,\n\t\t\t});\n\t\t} catch (errorUpdatingDashbarItems) {\n\t\t\tFSBL.Clients.Logger.system.error(\"Error updating dashbar items\", errorUpdatingDashbarItems);\n\t\t}\n\t}\n\n\tremoveItem(itemId: number) {\n\t\t// Removes a key from the store, dashbar will update the UI\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\n\t\t\tconst indexToRemove = dashbaritems.findIndex((name) => name === itemId);\n\t\t\tdashbaritems.splice(indexToRemove, 1);\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\n\t\t});\n\t}\n\n\taddItem(itemId: number) {\n\t\t// Update the store with new item, dashbar will parse these values and apply them\n\t\tthis.state.dashbarStore.getValue({ field: \"dashbaritems\" }, (error: any, dashbaritems: Array<any>) => {\n\t\t\tdashbaritems.push(itemId);\n\t\t\tthis.state.dashbarStore.setValue({ field: \"dashbaritems\", value: dashbaritems });\n\t\t});\n\t}\n\n\trender() {\n\t\tconst { availableItems: items, dashbarConfigPath: configPath } = this.state;\n\n\t\tif (items.length > 0) {\n\t\t\treturn (\n\t\t\t\t<div className={`dashbar-preferences ${this.props.className || \"\"}`} style={{ paddingLeft: 20, paddingTop: 3 }}>\n\t\t\t\t\t<table className=\"dashbar-items-table\">\n\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t<col className=\"db-col-1\" />\n\t\t\t\t\t\t\t<col className=\"db-col-2\" />\n\t\t\t\t\t\t\t<col className=\"db-col-3\" />\n\t\t\t\t\t\t\t<col className=\"db-col-4\" />\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr className=\"items-header\">\n\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t<th>Title:</th>\n\t\t\t\t\t\t\t\t<th>Url:</th>\n\t\t\t\t\t\t\t\t<th>Width:</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{items.map((item: any, index: number) => {\n\t\t\t\t\t\t\t\tconst buttonAction = item.enabled\n\t\t\t\t\t\t\t\t\t? this.removeItem.bind(this, item.id)\n\t\t\t\t\t\t\t\t\t: this.addItem.bind(this, item.id);\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<DashbarEditorItem\n\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\tbuttonAction={buttonAction}\n\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\tid={item.id}\n\t\t\t\t\t\t\t\t\t\ttitle={item.title}\n\t\t\t\t\t\t\t\t\t\tenabled={item.enabled}\n\t\t\t\t\t\t\t\t\t\turl={item.url}\n\t\t\t\t\t\t\t\t\t\twidth={item.width}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<div id=\"no-dashbar-items\" style={{ paddingLeft: 20 }}>\n\t\t\t\t\t{`You don't seem to have any dashbar items enabled or defined. Define some in ${configPath}`}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashbarEditorItem.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/DashbarEditorItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACzC,KAAK,EACL,KAAK,EACL,OAAO,EACP,GAAG,EACH,KAAK,EACL,YAAY,EACZ,EAAE,GASF;IACA,OAAO,CACN,4BAAI,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,0BAA0B;QAC3D,4BAAI,EAAE,EAAE,GAAG,KAAK,SAAS;YACxB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,GAAI,CACzD;QACL,gCAAK,KAAK,CAAM;QAChB,4BAAI,KAAK,EAAE,GAAG,IAAG,GAAG,CAAM;QAC1B,gCAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAM,CACzB,CACL,CAAC;AACH,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"DashbarEditorItem.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/DashbarEditorItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACzC,KAAK,EACL,KAAK,EACL,OAAO,EACP,GAAG,EACH,KAAK,EACL,YAAY,EACZ,EAAE,GASF;IACA,OAAO,CACN,4BAAI,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,0BAA0B;QAC3D,4BAAI,EAAE,EAAE,GAAG,KAAK,SAAS;YACxB,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,GAAI,CACzD;QACL,gCAAK,KAAK,CAAM;QAChB,4BAAI,KAAK,EAAE,GAAG,IAAG,GAAG,CAAM;QAC1B,gCAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAM,CACzB,CACL,CAAC;AACH,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleToggle } from \"../../../common/FinsembleToggle\";\n\nexport default function DashbarEditorItem({\n\tindex,\n\ttitle,\n\tenabled,\n\turl,\n\twidth,\n\tbuttonAction,\n\tid,\n}: {\n\tindex: number;\n\ttitle: string;\n\tenabled: boolean;\n\turl: string;\n\twidth: number;\n\tbuttonAction: (selected: boolean) => void;\n\tid: string;\n}) {\n\treturn (\n\t\t<tr id={id} key={index} className=\"dashbar-preferences-item\">\n\t\t\t<td id={`${title}-toggle`}>\n\t\t\t\t<FinsembleToggle checked={enabled} onChange={buttonAction} />\n\t\t\t</td>\n\t\t\t<td>{title}</td>\n\t\t\t<td title={url}>{url}</td>\n\t\t\t<td>{width ? width : \"\"}</td>\n\t\t</tr>\n\t);\n}\n"]}
|