@finsemble/finsemble-ui 6.2.1 → 6.3.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +27 -22
- package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.d.ts +2 -3
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/assets/css/button.css +2 -1
- package/react/assets/css/notificationsCenter.css +4 -2
- package/react/assets/css/userPreferences.css +1 -0
- package/react/assets/css/windowTitleBar.css +33 -1
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js +7 -13
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppList.d.ts +7 -1
- package/react/components/appCatalog/components/AppList.js +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.d.ts +10 -8
- package/react/components/appCatalog/components/AppResults.js +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
- package/react/components/appCatalog/components/EmptyResults.js +2 -4
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.d.ts +24 -4
- package/react/components/appCatalog/components/Hero.js +2 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.d.ts +18 -4
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
- package/react/components/appCatalog/components/SearchBar.js +4 -7
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
- package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
- package/react/components/appCatalog/components/Showcase/Header.js +2 -2
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
- package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.d.ts +6 -4
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.d.ts +5 -3
- package/react/components/appCatalog/components/Toast.js +5 -5
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js +2 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
- package/react/components/appCatalog/modules/FDC3.js +39 -48
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.d.ts +9 -2
- package/react/components/appCatalog/stores/appStore.js +10 -4
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js +96 -98
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.d.ts +4 -4
- package/react/components/common/Button.js +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ColorPicker.js +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.d.ts +0 -5
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.d.ts +0 -5
- package/react/components/common/FileInput.js +7 -9
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +2 -2
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js +2 -5
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js +2 -2
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js +2 -2
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/ImagePreview.js +2 -2
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/Tab.js +2 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/file_helpers.js +3 -2
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/helpers.js +12 -10
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonRow.stories.js +2 -2
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/Checkbox.stories.js +1 -1
- package/react/components/common/stories/Checkbox.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +4 -4
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js +6 -6
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js +4 -4
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js +5 -5
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js +3 -3
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js +8 -8
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js +3 -3
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js +5 -5
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.d.ts +0 -5
- package/react/components/favorites/FavoriteMaker.js +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js +7 -7
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js +5 -4
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js +5 -4
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js +0 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +34 -22
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js +3 -3
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js +9 -5
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js +4 -3
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +10 -42
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.d.ts +1 -1
- package/react/components/menu/Menu.js +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js +1 -2
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuPortal.js +7 -6
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js +14 -15
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js +2 -4
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js +2 -4
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +3 -5
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +64 -79
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +15 -13
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +3 -5
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
- package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +2 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +15 -24
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.d.ts +2 -2
- package/react/components/notifications/components/views/ListView.js +9 -9
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
- package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.d.ts +0 -13
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/types.d.ts +7 -6
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.d.ts +6 -4
- package/react/components/notifications/utils.js +26 -32
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
- package/react/components/processMonitor/ProcessMonitor.js +24 -14
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
- package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
- package/react/components/processMonitor/components/ChildWindow.js +29 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +18 -4
- package/react/components/processMonitor/components/ListHeader.js +11 -3
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
- package/react/components/processMonitor/components/ProcessStatistics.js +35 -18
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +11 -16
- package/react/components/processMonitor/constants.js +6 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +14 -6
- package/react/components/processMonitor/helpers.js +31 -23
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.d.ts +1 -0
- package/react/components/processMonitor/helpers.spec.js +44 -0
- package/react/components/processMonitor/helpers.spec.js.map +1 -0
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +31 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +104 -95
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
- package/react/components/quickComponentForm/QuickComponentForm.js +14 -15
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/search/Highlight.js +2 -2
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js +3 -3
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js +17 -8
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js +3 -5
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchProviderResults.js +4 -5
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js +3 -2
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/shared/Button.js +2 -4
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +58 -13
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js +9 -11
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.d.ts +11 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.d.ts +26 -6
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/linkerUtil.d.ts +3 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.js +0 -2
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
- package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
- package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js +3 -5
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.d.ts +7 -5
- package/react/components/smartDesktopDesigner/Application.js +78 -92
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +4 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
- package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +3 -2
- package/react/components/smartDesktopDesigner/Applications.js +73 -62
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js +2 -8
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js +3 -3
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +18 -31
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js +2 -8
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -2
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +8 -18
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +16 -24
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +8 -9
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
- package/react/components/smartDesktopDesigner/fixtures/apps.js +20 -31
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js +6 -9
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js +5 -5
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.d.ts +5 -5
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js +6 -7
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +14 -20
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +18 -36
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +4 -5
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/system/System.spec.js +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js +5 -5
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js +3 -2
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js +5 -5
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +14 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +41 -10
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +7 -5
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -3
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +30 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +35 -37
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +8 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +19 -30
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +87 -59
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +51 -54
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +4 -11
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
- package/react/components/toolbar/appLauncher/components/componentList.js +25 -22
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +43 -65
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +143 -125
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +4 -5
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +66 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +103 -153
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +0 -4
- package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
- package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
- package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
- package/react/components/userPreferences/UserPreferencesBase.js +2 -2
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
- package/react/components/userPreferences/components/LeftNav.js +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js +4 -4
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js +2 -0
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +51 -14
- package/react/components/userPreferences/components/content/Workspaces.js +96 -90
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +24 -9
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
- package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -17
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/General.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
- package/react/components/userPreferences/stories/Workspaces.stories.js +2 -2
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/General.spec.js.map +1 -1
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
- package/react/components/utils.js +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
- package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +28 -7
- package/react/components/windowTitleBar/components/center/Tab.js +11 -4
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
- package/react/components/windowTitleBar/components/center/TabList.js +179 -66
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
- package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +2 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
- package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +16 -26
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +7 -9
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +2 -1
- package/react/components/windowTitleBar/components/windowTitle.js +22 -10
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +56 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +96 -64
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
- package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js +2 -2
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/hooks/useFavoritesShell.js +1 -3
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useLinker.js +4 -4
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +2 -2
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +8 -8
- package/react/hooks/useNotifications.js +30 -30
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/usePubSub.js +3 -5
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js +16 -35
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +3 -4
- package/react/reducers/toolbarReducer.js +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/store.d.ts +6 -7
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.d.ts +28 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/favoriteTypes.d.ts +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.d.ts +22 -0
- package/react/types/fdc3.js.map +1 -1
- package/react/types/searchTypes.d.ts +3 -0
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +47 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- package/react/types/workspaceTypes.d.ts +19 -0
- package/react/types/workspaceTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
- package/react/components/processMonitor/components/ChildWindows.js +0 -11
- package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.d.ts +0 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +0 -88
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +0 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
|
@@ -19,35 +19,38 @@ export const ApplicationList = ({ apps, clickApp, deleteApp }) => (React.createE
|
|
|
19
19
|
}
|
|
20
20
|
return 0;
|
|
21
21
|
})
|
|
22
|
-
.map((
|
|
23
|
-
|
|
22
|
+
.map((appDEntry) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const appID = appDEntry.appId;
|
|
24
25
|
const openAppEventHandler = (e) => {
|
|
25
26
|
clickApp(appID);
|
|
26
27
|
e.preventDefault();
|
|
27
28
|
};
|
|
28
29
|
const deleteAppEventHandler = (e) => {
|
|
29
30
|
e.stopPropagation();
|
|
30
|
-
deleteApp(
|
|
31
|
+
deleteApp(appID);
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
case " ": {
|
|
37
|
-
openAppEventHandler(e);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
case "Delete": {
|
|
41
|
-
deleteAppEventHandler(e);
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
default: {
|
|
45
|
-
}
|
|
33
|
+
const keyDownHandler = (e) => {
|
|
34
|
+
switch (e.key) {
|
|
35
|
+
case "Enter": {
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
case " ": {
|
|
38
|
+
openAppEventHandler(e);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case "Delete": {
|
|
42
|
+
deleteAppEventHandler(e);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
default: {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const displayName = ((_b = (_a = appDEntry.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.displayName) || appDEntry.name || appID;
|
|
50
|
+
return (React.createElement("div", { key: appID, id: `app-list-row-${appID}`, className: "app-list-row", role: "listitem", tabIndex: 0, onClick: openAppEventHandler, onKeyDown: keyDownHandler },
|
|
51
|
+
React.createElement("span", { className: "app-name" }, displayName),
|
|
49
52
|
React.createElement("div", { className: "icon-bar" },
|
|
50
|
-
|
|
53
|
+
appDEntry.icons ? (React.createElement(Tooltip, { altClassName: "icon-warning", position: "left" }, "This app group is empty.")) : (""),
|
|
51
54
|
React.createElement(ButtonIcon, { tabIndex: -1, className: "icon-delete", icon: "trash", text: "Delete", onClick: deleteAppEventHandler }))));
|
|
52
55
|
})))));
|
|
53
56
|
//# sourceMappingURL=ApplicationList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAW5C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAAC,CACvF,0CACE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,6BAAK,SAAS,EAAC,gBAAgB;;IAE9B,+BAA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,OAAO,CACN,6BACC,GAAG,EAAE,KAAK,EACV,EAAE,EAAE,gBAAgB,KAAK,EAAE,EAC3B,SAAS,EAAC,cAAc,EACxB,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,cAAc;QAEzB,8BAAM,SAAS,EAAC,UAAU,IAAE,WAAW,CAAQ;QAC/C,6BAAK,SAAS,EAAC,UAAU;YACvB,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAClB,oBAAC,OAAO,IAAC,YAAY,EAAC,cAAc,EAAC,QAAQ,EAAC,MAAM,+BAE1C,CACV,CAAC,CAAC,CAAC,CACH,EAAE,CACF;YACD,oBAAC,UAAU,IACV,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,qBAAqB,GAC7B,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC,CACE,CACN,CACC,CACH,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React from \"react\";\r\nimport { ButtonIcon } from \"../common/ButtonIcon\";\r\nimport \"../common/css/application-list.css\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type ApplicationListProps = {\r\n\tapps: AppDefinition[];\r\n\tclickApp: (s: string) => void;\r\n\tdeleteApp: (s: string) => void;\r\n};\r\n\r\nexport const ApplicationList = ({ apps, clickApp, deleteApp }: ApplicationListProps) => (\r\n\t<>\r\n\t\t{apps.length < 1 ? (\r\n\t\t\t<div className=\"app-list-empty\">\r\n\t\t\t\tThere’s nothing here!\r\n\t\t\t\t<br />\r\n\t\t\t\tClick the Add button to add apps.\r\n\t\t\t</div>\r\n\t\t) : (\r\n\t\t\t<div className=\"app-list-table\" role=\"list\">\r\n\t\t\t\t{apps\r\n\t\t\t\t\t.sort((a, b) => {\r\n\t\t\t\t\t\tif (a.name > b.name) {\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.map((appDEntry: AppDefinition) => {\r\n\t\t\t\t\t\tconst appID = appDEntry.appId;\r\n\r\n\t\t\t\t\t\tconst openAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\tclickApp(appID);\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst deleteAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tdeleteApp(appID);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\t\t\t\tswitch (e.key) {\r\n\t\t\t\t\t\t\t\tcase \"Enter\": {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \" \": {\r\n\t\t\t\t\t\t\t\t\topenAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \"Delete\": {\r\n\t\t\t\t\t\t\t\t\tdeleteAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tconst displayName = appDEntry.manifest?.component?.displayName || appDEntry.name || appID;\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={appID}\r\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\r\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\r\n\t\t\t\t\t\t\t\trole=\"listitem\"\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonClick={openAppEventHandler}\r\n\t\t\t\t\t\t\t\tonKeyDown={keyDownHandler}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{displayName}</span>\r\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\r\n\t\t\t\t\t\t\t\t\t{appDEntry.icons ? (\r\n\t\t\t\t\t\t\t\t\t\t<Tooltip altClassName=\"icon-warning\" position=\"left\">\r\n\t\t\t\t\t\t\t\t\t\t\tThis app group is empty.\r\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t<ButtonIcon\r\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\r\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\r\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\r\n\t\t\t\t\t\t\t\t\t\tonClick={deleteAppEventHandler}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t</div>\r\n\t\t)}\r\n\t</>\r\n);\r\n"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
/// <reference types="finsemble-core" />
|
|
6
5
|
/// <reference types="react" />
|
|
7
6
|
import { ApplicationSaveData } from "../../types/smartDesktopDesignerTypes";
|
|
8
|
-
import {
|
|
7
|
+
import { services } from "@finsemble/finsemble-core";
|
|
8
|
+
declare type AppDefinition = services.Interop.types.AppDefinition;
|
|
9
9
|
export declare type ApplicationSetupProps = {
|
|
10
10
|
id: string;
|
|
11
11
|
setCurrentComponentID: (id: string | null) => void;
|
|
@@ -15,8 +15,9 @@ export declare type ApplicationSetupProps = {
|
|
|
15
15
|
backFunction: () => void;
|
|
16
16
|
apps: AppDefinition[];
|
|
17
17
|
data: ApplicationSaveData;
|
|
18
|
+
addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
|
|
18
19
|
isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
|
|
19
20
|
isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
|
|
20
|
-
updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
|
|
21
21
|
};
|
|
22
22
|
export declare const ApplicationSetup: (props: ApplicationSetupProps) => JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -31,6 +31,7 @@ export const ApplicationSetup = (props) => {
|
|
|
31
31
|
return props.onClickBackButton();
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
const applicationEditProps = Object.assign(Object.assign({}, props), { isSetupWizard: true, isEditMode: false, onSaveData: props.onSaveData, apps: props.apps, data: Object.assign(Object.assign({}, props.data), { url: currentAppType === "web" ? currentAppPath : "", path: currentAppType === "native" ? currentAppPath : "" }), onClickBackButton });
|
|
34
35
|
return (React.createElement("div", { className: "app-edit" },
|
|
35
36
|
React.createElement(View, null,
|
|
36
37
|
React.createElement(Header, { helpFunction: () => {
|
|
@@ -40,14 +41,14 @@ export const ApplicationSetup = (props) => {
|
|
|
40
41
|
React.createElement("h2", { className: "setup-type-heading" }, "Is your app web or native?"),
|
|
41
42
|
React.createElement("div", { className: `tile-type-buttons active-${currentAppType}` },
|
|
42
43
|
React.createElement(ButtonTile, { className: "icon-web", icon: "globe", text: "Web app", onClick: () => {
|
|
43
|
-
setCurrentAppType
|
|
44
|
-
setCurrentAppPath
|
|
45
|
-
setSavedAppPath
|
|
44
|
+
setCurrentAppType === null || setCurrentAppType === void 0 ? void 0 : setCurrentAppType("web");
|
|
45
|
+
setCurrentAppPath === null || setCurrentAppPath === void 0 ? void 0 : setCurrentAppPath(props.data.url || "");
|
|
46
|
+
setSavedAppPath === null || setSavedAppPath === void 0 ? void 0 : setSavedAppPath(false);
|
|
46
47
|
} }),
|
|
47
48
|
React.createElement(ButtonTile, { className: "icon-native", icon: "hdd", text: "Native app", onClick: () => {
|
|
48
|
-
setCurrentAppType
|
|
49
|
-
setCurrentAppPath
|
|
50
|
-
setSavedAppPath
|
|
49
|
+
setCurrentAppType === null || setCurrentAppType === void 0 ? void 0 : setCurrentAppType("native");
|
|
50
|
+
setCurrentAppPath === null || setCurrentAppPath === void 0 ? void 0 : setCurrentAppPath(props.data.path || "");
|
|
51
|
+
setSavedAppPath === null || setSavedAppPath === void 0 ? void 0 : setSavedAppPath(false);
|
|
51
52
|
} })),
|
|
52
53
|
currentAppType && !savedAppPath && (React.createElement(React.Fragment, null,
|
|
53
54
|
React.createElement("div", { className: "app-setup-url-field" },
|
|
@@ -67,19 +68,6 @@ export const ApplicationSetup = (props) => {
|
|
|
67
68
|
React.createElement(Button, { fashion: "secondary", text: "Next", disabled: disableNext, onClick: () => {
|
|
68
69
|
setSavedAppPath(true);
|
|
69
70
|
} }))))))) : (React.createElement(React.Fragment, null,
|
|
70
|
-
React.createElement(ApplicationEdit, {
|
|
71
|
-
...props,
|
|
72
|
-
isNew: true,
|
|
73
|
-
isSetupWizard: true,
|
|
74
|
-
isEditMode: false,
|
|
75
|
-
onSaveData: props.onSaveData,
|
|
76
|
-
apps: props.apps,
|
|
77
|
-
data: {
|
|
78
|
-
...props.data,
|
|
79
|
-
url: currentAppType === "web" ? currentAppPath : "",
|
|
80
|
-
path: currentAppType === "native" ? currentAppPath : "",
|
|
81
|
-
},
|
|
82
|
-
onClickBackButton,
|
|
83
|
-
} })))))));
|
|
71
|
+
React.createElement(ApplicationEdit, Object.assign({}, applicationEditProps))))))));
|
|
84
72
|
};
|
|
85
73
|
//# sourceMappingURL=ApplicationSetup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationSetup.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationSetup.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAiBhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAChE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,G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r\n\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { ApplicationEdit } from \"./ApplicationEdit\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { ButtonTile } from \"../common/ButtonTile\";\r\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { AppDefinition } from \"services/Interop/types\";\r\n\r\nexport type ApplicationSetupProps = {\r\n\tid: string;\r\n\tsetCurrentComponentID: (id: string | null) => void;\r\n\tonClickBackButton?: () => void;\r\n\tremoveAppID: (id: string) => void;\r\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\r\n\tbackFunction: () => void;\r\n\tapps: AppDefinition[];\r\n\tdata: ApplicationSaveData;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\r\n};\r\n\r\nexport const ApplicationSetup = (props: ApplicationSetupProps) => {\r\n\tconst [currentAppType, setCurrentAppType] = useState(\"\");\r\n\tconst [currentAppPath, setCurrentAppPath] = useState(\"\");\r\n\tconst [savedAppPath, setSavedAppPath] = useState(false);\r\n\tconst [isAppPathValid, setIsAppPathValid] = useState(true);\r\n\r\n\tconst invalidWeb = currentAppType === \"web\" && (!isAppPathValid || currentAppPath.length === 0);\r\n\tconst invalidNative =\r\n\t\tcurrentAppType === \"native\" && (currentAppPath === \"\" || validateFilename(VALID_APP_EXTENSIONS, currentAppPath));\r\n\tconst disableNext = invalidWeb || invalidNative;\r\n\r\n\tuseEffect(() => {\r\n\t\tsetIsAppPathValid(FSBL.Clients.SmartDesktopClient.checkValidURL(currentAppPath));\r\n\t}, [currentAppPath]);\r\n\r\n\tconst onClickBackButton = () => {\r\n\t\t// setSavedAppCompatibility(false);\r\n\t\tif (savedAppPath) {\r\n\t\t\tsetSavedAppPath(false);\r\n\t\t} else if (typeof props.onClickBackButton === \"function\") {\r\n\t\t\t// we're a child of of Application\r\n\t\t\treturn props.onClickBackButton();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-edit\">\r\n\t\t\t<View>\r\n\t\t\t\t<Header\r\n\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\tlaunchTutorialLink(\"adding-applications\");\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tbackFunction={onClickBackButton}\r\n\t\t\t\t>\r\n\t\t\t\t\tAdd an app\r\n\t\t\t\t</Header>\r\n\r\n\t\t\t\t<Content>\r\n\t\t\t\t\t{!savedAppPath ? (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Is your app web or native?</h2>\r\n\r\n\t\t\t\t\t\t\t<div className={`tile-type-buttons active-${currentAppType}`}>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-web\"\r\n\t\t\t\t\t\t\t\t\ticon=\"globe\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Web app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"web\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.url || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\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\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-native\"\r\n\t\t\t\t\t\t\t\t\ticon=\"hdd\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Native app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"native\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.path || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\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</div>\r\n\r\n\t\t\t\t\t\t\t{currentAppType && !savedAppPath && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-setup-url-field\">\r\n\t\t\t\t\t\t\t\t\t\t<label htmlFor=\"app-url\">\r\n\t\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Enter the full URL of the application</>\r\n\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Choose your application</>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-url-container\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-invalid={!isAppPathValid}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-errormessage=\"app-url-error-message\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.target.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.currentTarget.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{!isAppPathValid ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"app-url-error-message\" className=\"invalid-message\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tURL must be valid (e.g., https://cosaic.io/). Only http and https prototcols are supported.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t\t\t\t<div></div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Next\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disableNext}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSavedAppPath(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<ApplicationEdit\r\n\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t...props,\r\n\t\t\t\t\t\t\t\t\tisNew: true,\r\n\t\t\t\t\t\t\t\t\tisSetupWizard: true,\r\n\t\t\t\t\t\t\t\t\tisEditMode: false,\r\n\t\t\t\t\t\t\t\t\tonSaveData: props.onSaveData,\r\n\t\t\t\t\t\t\t\t\tapps: props.apps,\r\n\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t...props.data,\r\n\t\t\t\t\t\t\t\t\t\turl: currentAppType === \"web\" ? currentAppPath : \"\",\r\n\t\t\t\t\t\t\t\t\t\tpath: currentAppType === \"native\" ? currentAppPath : \"\",\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tonClickBackButton,\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></ApplicationEdit>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</Content>\r\n\t\t\t</View>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"ApplicationSetup.js","sourceRoot":"","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iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gCACnC,CAAC,EACD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oCACd,iBAAiB,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gCAC1C,CAAC,GACA;4BACD,CAAC,cAAc,CAAC,CAAC,CAAC,CAClB,6BAAK,EAAE,EAAC,uBAAuB,EAAC,SAAS,EAAC,iBAAiB,kGAErD,CACN,CAAC,CAAC,CAAC,CACH,EAAE,CACF,CACI,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,SAAS,IACT,WAAW,EAAE,oBAAoB,EACjC,YAAY,EAAE,KAAK,EACnB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;gCAC7B,iBAAiB,CAAC,KAAK,CAAC,CAAC;4BAC1B,CAAC,GACW,CACb,CACI;oBAEN,6BAAK,SAAS,EAAC,kBAAkB;wBAChC,gCAAW;wBAEX;4BACC,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,GAAG,EAAE;oCACb,eAAe,CAAC,IAAI,CAAC,CAAC;gCACvB,CAAC,GACA,CACG,CACD,CACJ,CACH,CACC,CACH,CAAC,CAAC,CAAC,CACH;gBACC,oBAAC,eAAe,oBAAK,oBAAoB,EAAoB,CAC3D,CACH,CACQ,CACJ,CACF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { ApplicationEdit } from \"./ApplicationEdit\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { ButtonTile } from \"../common/ButtonTile\";\r\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { ApplicationEditProps } from \"./ApplicationEdit\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type ApplicationSetupProps = {\r\n\tid: string;\r\n\tsetCurrentComponentID: (id: string | null) => void;\r\n\tonClickBackButton?: () => void;\r\n\tremoveAppID: (id: string) => void;\r\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\r\n\tbackFunction: () => void;\r\n\tapps: AppDefinition[];\r\n\tdata: ApplicationSaveData;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const ApplicationSetup = (props: ApplicationSetupProps) => {\r\n\tconst [currentAppType, setCurrentAppType] = useState(\"\");\r\n\tconst [currentAppPath, setCurrentAppPath] = useState(\"\");\r\n\tconst [savedAppPath, setSavedAppPath] = useState(false);\r\n\tconst [isAppPathValid, setIsAppPathValid] = useState(true);\r\n\r\n\tconst invalidWeb = currentAppType === \"web\" && (!isAppPathValid || currentAppPath.length === 0);\r\n\tconst invalidNative =\r\n\t\tcurrentAppType === \"native\" && (currentAppPath === \"\" || validateFilename(VALID_APP_EXTENSIONS, currentAppPath));\r\n\tconst disableNext = invalidWeb || invalidNative;\r\n\r\n\tuseEffect(() => {\r\n\t\tsetIsAppPathValid(FSBL.Clients.SmartDesktopClient.checkValidURL(currentAppPath));\r\n\t}, [currentAppPath]);\r\n\r\n\tconst onClickBackButton = () => {\r\n\t\t// setSavedAppCompatibility(false);\r\n\t\tif (savedAppPath) {\r\n\t\t\tsetSavedAppPath(false);\r\n\t\t} else if (typeof props.onClickBackButton === \"function\") {\r\n\t\t\t// we're a child of of Application\r\n\t\t\treturn props.onClickBackButton();\r\n\t\t}\r\n\t};\r\n\r\n\tconst applicationEditProps: ApplicationEditProps = {\r\n\t\t...props,\r\n\t\tisSetupWizard: true,\r\n\t\tisEditMode: false,\r\n\t\tonSaveData: props.onSaveData,\r\n\t\tapps: props.apps,\r\n\t\tdata: {\r\n\t\t\t...props.data,\r\n\t\t\turl: currentAppType === \"web\" ? currentAppPath : \"\",\r\n\t\t\tpath: currentAppType === \"native\" ? currentAppPath : \"\",\r\n\t\t},\r\n\t\tonClickBackButton,\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-edit\">\r\n\t\t\t<View>\r\n\t\t\t\t<Header\r\n\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\tlaunchTutorialLink(\"adding-applications\");\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tbackFunction={onClickBackButton}\r\n\t\t\t\t>\r\n\t\t\t\t\tAdd an app\r\n\t\t\t\t</Header>\r\n\r\n\t\t\t\t<Content>\r\n\t\t\t\t\t{!savedAppPath ? (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Is your app web or native?</h2>\r\n\r\n\t\t\t\t\t\t\t<div className={`tile-type-buttons active-${currentAppType}`}>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-web\"\r\n\t\t\t\t\t\t\t\t\ticon=\"globe\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Web app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"web\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.url || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\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\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-native\"\r\n\t\t\t\t\t\t\t\t\ticon=\"hdd\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Native app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"native\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.path || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\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</div>\r\n\r\n\t\t\t\t\t\t\t{currentAppType && !savedAppPath && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-setup-url-field\">\r\n\t\t\t\t\t\t\t\t\t\t<label htmlFor=\"app-url\">\r\n\t\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Enter the full URL of the application</>\r\n\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Choose your application</>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-url-container\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-invalid={!isAppPathValid}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-errormessage=\"app-url-error-message\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.target.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.currentTarget.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{!isAppPathValid ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"app-url-error-message\" className=\"invalid-message\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tURL must be valid (e.g., https://cosaic.io/). Only http and https prototcols are supported.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t\t\t\t<div></div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Next\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disableNext}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSavedAppPath(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<ApplicationEdit {...applicationEditProps}></ApplicationEdit>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</Content>\r\n\t\t\t</View>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
export declare type ApplicationsProps = {
|
|
7
7
|
getApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;
|
|
8
8
|
addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
|
|
9
|
-
updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
|
|
10
9
|
deleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;
|
|
11
10
|
getAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;
|
|
12
11
|
getMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;
|
|
13
12
|
addMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;
|
|
14
13
|
updateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;
|
|
15
|
-
deleteMenu:
|
|
14
|
+
deleteMenu: (value: string) => Promise<{
|
|
15
|
+
err: any;
|
|
16
|
+
}>;
|
|
16
17
|
isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
|
|
17
18
|
isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
|
|
18
19
|
};
|
|
@@ -23,6 +23,7 @@ const EMPTY_MENU_ERROR = {
|
|
|
23
23
|
message: "One or more of your app menus is empty",
|
|
24
24
|
};
|
|
25
25
|
export const Applications = (props) => {
|
|
26
|
+
var _a;
|
|
26
27
|
const dispatch = useDispatch();
|
|
27
28
|
const [currentMenuID, setCurrentMenuID] = useState("");
|
|
28
29
|
const [menuName, setMenuName] = useState("");
|
|
@@ -41,8 +42,8 @@ export const Applications = (props) => {
|
|
|
41
42
|
function updateAppList() {
|
|
42
43
|
props.getApps().then((response) => {
|
|
43
44
|
dispatch(SmartDesktopDesignerActions.update_apps(response.apps));
|
|
44
|
-
props.getMenus().then((
|
|
45
|
-
dispatch(SmartDesktopDesignerActions.update_menus(
|
|
45
|
+
props.getMenus().then((getMenusResponse) => {
|
|
46
|
+
dispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -118,14 +119,13 @@ export const Applications = (props) => {
|
|
|
118
119
|
return;
|
|
119
120
|
}
|
|
120
121
|
props.getAppConfigTemplate().then((response) => {
|
|
122
|
+
var _a, _b;
|
|
121
123
|
const { config } = response;
|
|
122
|
-
const { displayName } = generateDefaultConfig({
|
|
123
|
-
...config,
|
|
124
|
-
path,
|
|
125
|
-
});
|
|
124
|
+
const { displayName } = generateDefaultConfig(Object.assign(Object.assign({}, config), { path }));
|
|
126
125
|
config.name = displayName;
|
|
127
|
-
config.appName = displayName;
|
|
128
126
|
config.appId = appId;
|
|
127
|
+
config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
|
|
128
|
+
config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
|
|
129
129
|
config.manifest.window.windowType = "assimilation";
|
|
130
130
|
config.manifest.window.path = path;
|
|
131
131
|
delete config.manifest.window.url;
|
|
@@ -134,30 +134,67 @@ export const Applications = (props) => {
|
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
136
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
137
|
+
const onClose = (reason) => {
|
|
138
|
+
if (reason === ApplicationCloseReason.NEW) {
|
|
139
|
+
dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
|
|
140
|
+
}
|
|
141
|
+
else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {
|
|
142
|
+
if (currentAppID)
|
|
143
|
+
props.deleteApp(currentAppID);
|
|
144
|
+
setCurrentAppID(null);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
setCurrentAppID(null);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const applicationProps = {
|
|
151
|
+
id: currentAppID !== null && currentAppID !== void 0 ? currentAppID : "",
|
|
152
|
+
apps,
|
|
153
|
+
addApp: props.addApp,
|
|
154
|
+
deleteApp: props.deleteApp,
|
|
155
|
+
getAppConfigTemplate: props.getAppConfigTemplate,
|
|
156
|
+
setCurrentAppID,
|
|
157
|
+
onClose,
|
|
158
|
+
isInboundInteropAuthorized: props.isInboundInteropAuthorized,
|
|
159
|
+
isOutboundInteropAuthorized: props.isOutboundInteropAuthorized,
|
|
160
|
+
};
|
|
161
|
+
const dropZoneProps = {
|
|
162
|
+
apps: apps.filter((app) => { var _a; return !((_a = app === null || app === void 0 ? void 0 : app.manifest) === null || _a === void 0 ? void 0 : _a.temporary); }),
|
|
163
|
+
clickApp: (appID) => {
|
|
164
|
+
setCurrentAppID(appID);
|
|
165
|
+
},
|
|
166
|
+
deleteApp: removeAppID,
|
|
167
|
+
};
|
|
168
|
+
const applicationListProps = {
|
|
169
|
+
apps: Object.entries(menus).map(([key, value]) => {
|
|
170
|
+
var _a;
|
|
171
|
+
const menuObj = JSON.parse(JSON.stringify(value));
|
|
172
|
+
menuObj.appId = key;
|
|
173
|
+
menuObj.name = (_a = menuObj.name) !== null && _a !== void 0 ? _a : menuObj.displayName;
|
|
174
|
+
if (menuObj.applications.length === 0) {
|
|
175
|
+
menuObj.icon = "warning";
|
|
176
|
+
}
|
|
177
|
+
return menuObj;
|
|
178
|
+
}),
|
|
179
|
+
clickApp: (menuId) => {
|
|
180
|
+
setCurrentMenuID(menuId);
|
|
181
|
+
setMenuName(menus[menuId].displayName);
|
|
182
|
+
setSelectedApps(menus[menuId].applications);
|
|
183
|
+
},
|
|
184
|
+
deleteApp: removeMenuID,
|
|
185
|
+
};
|
|
186
|
+
const backFunction = () => {
|
|
187
|
+
setFocusOnMenu(true);
|
|
188
|
+
setCurrentMenuID("");
|
|
189
|
+
};
|
|
190
|
+
const helpFunction = () => {
|
|
191
|
+
launchTutorialLink("managing-applications");
|
|
192
|
+
};
|
|
193
|
+
const addApp = () => {
|
|
194
|
+
dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
|
|
195
|
+
};
|
|
196
|
+
return (React.createElement(React.Fragment, null, currentAppID ? (React.createElement(Application, Object.assign({}, applicationProps))) : currentMenuID ? (React.createElement(View, null,
|
|
197
|
+
React.createElement(Header, { backFunction: backFunction }, "Menus"),
|
|
161
198
|
React.createElement(Content, null,
|
|
162
199
|
React.createElement("div", { className: "app-edit-field" },
|
|
163
200
|
React.createElement("label", { htmlFor: "menu-name" }, "Name"),
|
|
@@ -166,50 +203,24 @@ export const Applications = (props) => {
|
|
|
166
203
|
} })),
|
|
167
204
|
React.createElement("div", { className: "app-edit-field" },
|
|
168
205
|
React.createElement("label", { htmlFor: "menu-group" }, "Group Contents"),
|
|
169
|
-
React.createElement(FinsembleSelect, { options: apps.map((app) => app.name), values: apps.map((app) => app.appId), selected: menus[currentMenuID]
|
|
206
|
+
React.createElement(FinsembleSelect, { options: apps.map((app) => app.name), values: apps.map((app) => app.appId), selected: ((_a = menus[currentMenuID]) === null || _a === void 0 ? void 0 : _a.applications) || [], updateCallback: setSelectedApps, showSearch: true })),
|
|
170
207
|
React.createElement("div", { className: "app-edit-actions" },
|
|
171
208
|
React.createElement("span", null),
|
|
172
209
|
React.createElement(Button, { fashion: "secondary", text: "Save", disabled: menuName.length <= 0, onClick: updateMenuItem }))))) : (React.createElement(View, null,
|
|
173
|
-
React.createElement(Header, { helpFunction:
|
|
174
|
-
launchTutorialLink("managing-applications");
|
|
175
|
-
} }, "Apps"),
|
|
210
|
+
React.createElement(Header, { helpFunction: helpFunction }, "Apps"),
|
|
176
211
|
React.createElement(Content, null,
|
|
177
212
|
React.createElement(Tab, { autofocus: focusOnMenu ? 1 : 0 },
|
|
178
213
|
React.createElement("div", { "data-label": "Apps" },
|
|
179
214
|
React.createElement("div", { className: "frontmatter" }, "Drag an app into the list or click the Add button."),
|
|
180
|
-
React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick:
|
|
181
|
-
dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
|
|
182
|
-
} }),
|
|
215
|
+
React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: addApp }),
|
|
183
216
|
React.createElement(DropZone, { processFile: addDroppedApp },
|
|
184
|
-
React.createElement(ApplicationList, {
|
|
185
|
-
apps: apps.filter((app) => !app?.manifest?.component?.temporary),
|
|
186
|
-
clickApp: (appID) => {
|
|
187
|
-
setCurrentAppID(appID);
|
|
188
|
-
},
|
|
189
|
-
deleteApp: removeAppID,
|
|
190
|
-
} }))),
|
|
217
|
+
React.createElement(ApplicationList, Object.assign({}, dropZoneProps)))),
|
|
191
218
|
React.createElement("div", { "data-label": "Menus" },
|
|
192
219
|
React.createElement("div", { className: "frontmatter" },
|
|
193
220
|
"This screen allows you to make menus that will appear on your Toolbar.",
|
|
194
221
|
React.createElement("br", null),
|
|
195
222
|
"You are allowed a maximum of five Menus."),
|
|
196
223
|
React.createElement(Button, { className: "icon-before-add", fashion: "primary", text: "Add", iconBefore: "plus", disabled: Object.keys(menus).length >= 5, onClick: addNewMenu }),
|
|
197
|
-
React.createElement(ApplicationList, {
|
|
198
|
-
apps: Object.entries(menus).map(([key, value]) => {
|
|
199
|
-
const menuObj = JSON.parse(JSON.stringify(value));
|
|
200
|
-
menuObj.appId = key;
|
|
201
|
-
menuObj.appName = menuObj.displayName;
|
|
202
|
-
if (menuObj.applications.length === 0) {
|
|
203
|
-
menuObj.icon = "warning";
|
|
204
|
-
}
|
|
205
|
-
return menuObj;
|
|
206
|
-
}),
|
|
207
|
-
clickApp: (menuId) => {
|
|
208
|
-
setCurrentMenuID(menuId);
|
|
209
|
-
setMenuName(menus[menuId].displayName);
|
|
210
|
-
setSelectedApps(menus[menuId].applications);
|
|
211
|
-
},
|
|
212
|
-
deleteApp: removeMenuID,
|
|
213
|
-
} }))))))));
|
|
224
|
+
React.createElement(ApplicationList, Object.assign({}, applicationListProps)))))))));
|
|
214
225
|
};
|
|
215
226
|
//# sourceMappingURL=Applications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Applications.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK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AAS,EAAE,YAAY;yBACvB,GACA,CACG,CACD,CACG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"../../store\";\r\nimport { View } from \"./View\";\r\nimport { Tab } from \"../common/Tab\";\r\nimport { Header } from \"../common/Header\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Button } from \"../common/Button\";\r\nimport { Content } from \"./Content\";\r\nimport { Application, ApplicationCloseReason } from \"./Application\";\r\nimport { ApplicationList } from \"./ApplicationList\";\r\n\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\n\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\n\r\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\r\nimport { generateDefaultConfig } from \"./sdd_helpers\";\r\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\n\r\nconst MENU_NAME_MAX_LENGTH = 50;\r\n\r\nexport type ApplicationsProps = {\r\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\r\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\r\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\r\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\r\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\r\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\r\n\tdeleteMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteMenu;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nconst EMPTY_MENU_ERROR: ProjectError = {\r\n\tviewId: \"applications\",\r\n\tmessage: \"One or more of your app menus is empty\",\r\n};\r\n\r\nexport const Applications = (props: ApplicationsProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\r\n\tconst [menuName, setMenuName] = useState(\"\");\r\n\tconst [focusOnMenu, setFocusOnMenu] = useState(false);\r\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\r\n\r\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\r\n\r\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\r\n\r\n\tif (Object.values(menus).every((menu) => menu.applications.length > 1)) {\r\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\r\n\t} else {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\r\n\t}\r\n\r\n\tfunction updateAppList() {\r\n\t\tprops.getApps().then((response) => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\r\n\t\t\tprops.getMenus().then((response) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(response.menus));\r\n\t\t\t});\r\n\t\t\t// FSBL.Clients.Logger.log(\"apps\", response.apps);\r\n\t\t});\r\n\t}\r\n\r\n\tfunction setCurrentAppID(id: string | null) {\r\n\t\tif (id === null) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\r\n\t\t}\r\n\t\tsetFocusOnMenu(false);\r\n\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\r\n\t\tupdateAppList();\r\n\t}\r\n\r\n\tconst updateMenuItem = () => {\r\n\t\tconst whenDone = () => {\r\n\t\t\tupdateAppList();\r\n\t\t\tsetMenuName(\"\");\r\n\t\t\tsetFocusOnMenu(true);\r\n\t\t\tsetCurrentMenuID(\"\");\r\n\t\t};\r\n\t\tif (currentMenuID == \"new\") {\r\n\t\t\tprops\r\n\t\t\t\t.addMenu({\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: -1,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t} else {\r\n\t\t\tprops\r\n\t\t\t\t.updateMenu(currentMenuID, {\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: menus[currentMenuID].position,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t}\r\n\t};\r\n\r\n\tconst removeAppID = (id: string) => {\r\n\t\t// Delete app from list of apps\r\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\t// @todo : add error handling. Maybe react-toast-notify?\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\r\n\t\t\t// Remove reference to app from all menus\r\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\r\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\r\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\r\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\r\n\t\t\t\t\t\tupdateAppList();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst removeMenuID = (id: string) => {\r\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\t// @todo : add error handling. Maybe react-toast-notify?\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\t\t});\r\n\t};\r\n\r\n\tconst addNewMenu = () => {\r\n\t\tsetCurrentMenuID(\"new\");\r\n\t};\r\n\r\n\t/********* Lifecycle effects *********/\r\n\r\n\t// Call updateAppList once the componet has mounted\r\n\t// Can't call out of an effect, or it will cause an endless loop\r\n\tuseEffect(updateAppList, []);\r\n\r\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\r\n\t\tconst appId = String(new Date().getTime() + index);\r\n\t\tconst { path } = file;\r\n\r\n\t\t// Confirm that the file is an executable\r\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Generate defaults and then add app with those defaults\r\n\t\tprops.getAppConfigTemplate().then((response) => {\r\n\t\t\tconst { config } = response;\r\n\t\t\t// Get generated displayName\r\n\t\t\tconst { displayName } = generateDefaultConfig({\r\n\t\t\t\t...config,\r\n\t\t\t\tpath,\r\n\t\t\t});\r\n\t\t\tconfig.name = displayName;\r\n\t\t\tconfig.appName = displayName;\r\n\r\n\t\t\t// We generated appId above\r\n\t\t\tconfig.appId = appId;\r\n\r\n\t\t\t// A file was dropped, so we know this was a file, not a URL\r\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\r\n\t\t\tconfig.manifest.window.path = path;\r\n\t\t\tdelete config.manifest.window.url;\r\n\r\n\t\t\t// Add app with defaults\r\n\t\t\tprops.addApp(appId, config).then(() => {\r\n\t\t\t\tupdateAppList();\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{currentAppID ? (\r\n\t\t\t\t<Application\r\n\t\t\t\t\tid={currentAppID}\r\n\t\t\t\t\t{...{\r\n\t\t\t\t\t\tapps,\r\n\t\t\t\t\t\taddApp: props.addApp,\r\n\t\t\t\t\t\tupdateApp: props.updateApp,\r\n\t\t\t\t\t\tdeleteApp: props.deleteApp,\r\n\t\t\t\t\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\r\n\t\t\t\t\t\tsetCurrentAppID,\r\n\t\t\t\t\t\tonClose: (reason) => {\r\n\t\t\t\t\t\t\tif (reason === ApplicationCloseReason.NEW) {\r\n\t\t\t\t\t\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t\t\t\t\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\r\n\t\t\t\t\t\t\t\tprops.deleteApp(currentAppID);\r\n\t\t\t\t\t\t\t\tsetCurrentAppID(null);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tsetCurrentAppID(null);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tisInboundInteropAuthorized={props.isInboundInteropAuthorized}\r\n\t\t\t\t\tisOutboundInteropAuthorized={props.isOutboundInteropAuthorized}\r\n\t\t\t\t></Application>\r\n\t\t\t) : currentMenuID ? (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header\r\n\t\t\t\t\t\tbackFunction={() => {\r\n\t\t\t\t\t\t\tsetFocusOnMenu(true);\r\n\t\t\t\t\t\t\tsetCurrentMenuID(\"\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\tMenus\r\n\t\t\t\t\t</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tid=\"menu-name\"\r\n\t\t\t\t\t\t\t\tvalue={menuName}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\r\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\r\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\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</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group Contents</label>\r\n\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\r\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\r\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\r\n\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t<span></span>\r\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t) : (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header\r\n\t\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\t\tlaunchTutorialLink(\"managing-applications\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\tApps\r\n\t\t\t\t\t</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<Tab autofocus={focusOnMenu ? 1 : 0}>\r\n\t\t\t\t\t\t\t<div data-label=\"Apps\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">Drag an app into the list or click the Add button.</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\r\n\t\t\t\t\t\t\t\t\t<ApplicationList\r\n\t\t\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t\t\tapps: apps.filter((app) => !app?.manifest?.component?.temporary),\r\n\t\t\t\t\t\t\t\t\t\t\tclickApp: (appID: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppID(appID);\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\t\tdeleteApp: removeAppID,\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</DropZone>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div data-label=\"Menus\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\r\n\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\r\n\t\t\t\t\t\t\t\t\tonClick={addNewMenu}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ApplicationList\r\n\t\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t\tapps: Object.entries(menus).map(([key, value]) => {\r\n\t\t\t\t\t\t\t\t\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\r\n\t\t\t\t\t\t\t\t\t\t\tmenuObj.appId = key;\r\n\t\t\t\t\t\t\t\t\t\t\tmenuObj.appName = menuObj.displayName;\r\n\t\t\t\t\t\t\t\t\t\t\tif (menuObj.applications.length === 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmenuObj.icon = \"warning\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\treturn menuObj;\r\n\t\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\t\tclickApp: (menuId: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetCurrentMenuID(menuId);\r\n\t\t\t\t\t\t\t\t\t\t\tsetMenuName(menus[menuId].displayName);\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedApps(menus[menuId].applications);\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tdeleteApp: removeMenuID,\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</div>\r\n\t\t\t\t\t\t</Tab>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]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AAK,SAAS,EAAC,aAAa,yDAAyD;oBACrF,oBAAC,MAAM,IAAC,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,MAAM,GAAI;oBAEtG,oBAAC,QAAQ,IAAC,WAAW,EAAE,aAAa;wBACnC,oBAAC,eAAe,oBAAK,aAAa,EAAI,CAC5B,CACN;gBAEN,2CAAgB,OAAO;oBACtB,6BAAK,SAAS,EAAC,aAAa;;wBAE3B,+BAAM;mEAED;oBACN,oBAAC,MAAM,IACN,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,KAAK,EACV,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,EACxC,OAAO,EAAE,UAAU,GAClB;oBACF,oBAAC,eAAe,oBAAK,oBAAoB,EAAI,CACxC,CACD,CACG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"../../store\";\r\nimport { View } from \"./View\";\r\nimport { Tab } from \"../common/Tab\";\r\nimport { Header } from \"../common/Header\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Button } from \"../common/Button\";\r\nimport { Content } from \"./Content\";\r\nimport { Application, ApplicationCloseReason } from \"./Application\";\r\nimport { ApplicationList } from \"./ApplicationList\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\r\nimport { generateDefaultConfig } from \"./sdd_helpers\";\r\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { ApplicationProps } from \"./Application\";\r\nimport { ApplicationListProps } from \"./ApplicationList\";\r\nimport { services } from \"@finsemble/finsemble-core/\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nconst MENU_NAME_MAX_LENGTH = 50;\r\n\r\nexport type ApplicationsProps = {\r\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\r\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\r\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\r\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\r\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\r\n\tdeleteMenu: (value: string) => Promise<{ err: any }>;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nconst EMPTY_MENU_ERROR: ProjectError = {\r\n\tviewId: \"applications\",\r\n\tmessage: \"One or more of your app menus is empty\",\r\n};\r\n\r\nexport const Applications = (props: ApplicationsProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\r\n\tconst [menuName, setMenuName] = useState(\"\");\r\n\tconst [focusOnMenu, setFocusOnMenu] = useState(false);\r\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\r\n\r\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\r\n\r\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\r\n\r\n\tif (Object.values(menus).every((menu) => menu.applications.length > 1)) {\r\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\r\n\t} else {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\r\n\t}\r\n\r\n\tfunction updateAppList() {\r\n\t\tprops.getApps().then((response: any) => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\r\n\t\t\tprops.getMenus().then((getMenusResponse: any) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tfunction setCurrentAppID(id: string | null) {\r\n\t\tif (id === null) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\r\n\t\t}\r\n\t\tsetFocusOnMenu(false);\r\n\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\r\n\t\tupdateAppList();\r\n\t}\r\n\r\n\tconst updateMenuItem = () => {\r\n\t\tconst whenDone = () => {\r\n\t\t\tupdateAppList();\r\n\t\t\tsetMenuName(\"\");\r\n\t\t\tsetFocusOnMenu(true);\r\n\t\t\tsetCurrentMenuID(\"\");\r\n\t\t};\r\n\t\tif (currentMenuID == \"new\") {\r\n\t\t\tprops\r\n\t\t\t\t.addMenu({\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: -1,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t} else {\r\n\t\t\tprops\r\n\t\t\t\t.updateMenu(currentMenuID, {\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: menus[currentMenuID].position,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t}\r\n\t};\r\n\r\n\tconst removeAppID = (id: string) => {\r\n\t\t// Delete app from list of apps\r\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\r\n\t\t\t// Remove reference to app from all menus\r\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\r\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\r\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\r\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\r\n\t\t\t\t\t\tupdateAppList();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst removeMenuID = (id: string) => {\r\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\t\t});\r\n\t};\r\n\r\n\tconst addNewMenu = () => {\r\n\t\tsetCurrentMenuID(\"new\");\r\n\t};\r\n\r\n\t/********* Lifecycle effects *********/\r\n\r\n\t// Call updateAppList once the component has mounted\r\n\t// Can't call out of an effect, or it will cause an endless loop\r\n\tuseEffect(updateAppList, []);\r\n\r\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\r\n\t\tconst appId = String(new Date().getTime() + index);\r\n\t\tconst { path } = file;\r\n\r\n\t\t// Confirm that the file is an executable\r\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Generate defaults and then add app with those defaults\r\n\t\tprops.getAppConfigTemplate().then((response: any) => {\r\n\t\t\tconst { config }: { config: AppDefinition } = response;\r\n\t\t\t// Get generated displayName\r\n\t\t\tconst { displayName } = generateDefaultConfig({\r\n\t\t\t\t...config,\r\n\t\t\t\tpath,\r\n\t\t\t});\r\n\t\t\tconfig.name = displayName;\r\n\r\n\t\t\t// We generated appId above\r\n\t\t\tconfig.appId = appId;\r\n\r\n\t\t\t// A file was dropped, so we know this was a file, not a URL\r\n\t\t\tconfig.manifest = config.manifest ?? {};\r\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\r\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\r\n\t\t\tconfig.manifest.window.path = path;\r\n\t\t\tdelete config.manifest.window.url;\r\n\r\n\t\t\t// Add app with defaults\r\n\t\t\tprops.addApp(appId, config).then(() => {\r\n\t\t\t\tupdateAppList();\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst onClose = (reason: ApplicationCloseReason) => {\r\n\t\tif (reason === ApplicationCloseReason.NEW) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\r\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\r\n\t\t\tsetCurrentAppID(null);\r\n\t\t} else {\r\n\t\t\tsetCurrentAppID(null);\r\n\t\t}\r\n\t};\r\n\r\n\tconst applicationProps: ApplicationProps = {\r\n\t\tid: currentAppID ?? \"\",\r\n\t\tapps,\r\n\t\taddApp: props.addApp,\r\n\t\tdeleteApp: props.deleteApp,\r\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\r\n\t\tsetCurrentAppID,\r\n\t\tonClose,\r\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\r\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\r\n\t};\r\n\r\n\tconst dropZoneProps: ApplicationListProps = {\r\n\t\tapps: apps.filter((app) => !app?.manifest?.temporary),\r\n\t\tclickApp: (appID: string) => {\r\n\t\t\tsetCurrentAppID(appID);\r\n\t\t},\r\n\t\tdeleteApp: removeAppID,\r\n\t};\r\n\r\n\tconst applicationListProps = {\r\n\t\tapps: Object.entries(menus).map(([key, value]) => {\r\n\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\r\n\t\t\tmenuObj.appId = key;\r\n\t\t\tmenuObj.name = menuObj.name ?? menuObj.displayName;\r\n\t\t\tif (menuObj.applications.length === 0) {\r\n\t\t\t\tmenuObj.icon = \"warning\";\r\n\t\t\t}\r\n\t\t\treturn menuObj;\r\n\t\t}),\r\n\t\tclickApp: (menuId: string) => {\r\n\t\t\tsetCurrentMenuID(menuId);\r\n\t\t\tsetMenuName(menus[menuId].displayName);\r\n\t\t\tsetSelectedApps(menus[menuId].applications);\r\n\t\t},\r\n\t\tdeleteApp: removeMenuID,\r\n\t};\r\n\r\n\tconst backFunction = () => {\r\n\t\tsetFocusOnMenu(true);\r\n\t\tsetCurrentMenuID(\"\");\r\n\t};\r\n\r\n\tconst helpFunction = () => {\r\n\t\tlaunchTutorialLink(\"managing-applications\");\r\n\t};\r\n\r\n\tconst addApp = () => {\r\n\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{currentAppID ? (\r\n\t\t\t\t<Application {...applicationProps} />\r\n\t\t\t) : currentMenuID ? (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header backFunction={backFunction}>Menus</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tid=\"menu-name\"\r\n\t\t\t\t\t\t\t\tvalue={menuName}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\r\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\r\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\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</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group Contents</label>\r\n\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\r\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\r\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\r\n\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t<span></span>\r\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t) : (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header helpFunction={helpFunction}>Apps</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<Tab autofocus={focusOnMenu ? 1 : 0}>\r\n\t\t\t\t\t\t\t<div data-label=\"Apps\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">Drag an app into the list or click the Add button.</div>\r\n\t\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\r\n\r\n\t\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\r\n\t\t\t\t\t\t\t\t\t<ApplicationList {...dropZoneProps} />\r\n\t\t\t\t\t\t\t\t</DropZone>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div data-label=\"Menus\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\r\n\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\r\n\t\t\t\t\t\t\t\t\tonClick={addNewMenu}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ApplicationList {...applicationListProps} />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</Tab>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
|
|
@@ -27,15 +27,9 @@ export const Authentication = (props) => {
|
|
|
27
27
|
props
|
|
28
28
|
.setAuthenticationProviders(authProviders.map((provider) => {
|
|
29
29
|
if (name === provider.name) {
|
|
30
|
-
return {
|
|
31
|
-
...value,
|
|
32
|
-
enabled: true,
|
|
33
|
-
};
|
|
30
|
+
return Object.assign(Object.assign({}, value), { enabled: true });
|
|
34
31
|
}
|
|
35
|
-
return {
|
|
36
|
-
...provider,
|
|
37
|
-
enabled: false,
|
|
38
|
-
};
|
|
32
|
+
return Object.assign(Object.assign({}, provider), { enabled: false });
|
|
39
33
|
}))
|
|
40
34
|
.then(() => {
|
|
41
35
|
if (value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Authentication.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAC5D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC7G,MAAM,oBAAoB,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,aAAa,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAE9C,SAAS,C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AI,CACN,CACT,CAAC,CACM;gCACT,oBAAC,OAAO,sGAEE,CACL;4BACL,aAAa,IAAI,CACjB,oBAAC,4BAA4B,IAC5B,GAAG,EAAE,aAAa,CAAC,IAAI,EACvB,KAAK,EAAE,aAAa,EACpB,cAAc,EAAE,cAAc,EAC9B,0BAA0B,EAAE,KAAK,CAAC,0BAA0B,EAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oCACnB,mBAAmB,CAAC,KAAK,CAAC,CAAC;gCAC5B,CAAC,GACA,CACF,CACI,CACD;oBACL,aAAa,IAAI,CACjB,6BAAK,SAAS,EAAC,wBAAwB;wBACtC,oBAAC,MAAM,IACN,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAC,OAAO,EACf,IAAI,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,EACzD,OAAO,EAAE,GAAG,EAAE;gCACb,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAC;4BACpC,CAAC,GACA,CACG,CACN,CACK;gBACP,6BAAK,SAAS,EAAC,qBAAqB;oBACnC,yCAAe;oBAEf,qFAA0D;oBAE1D,yCAAe;oBAEf,6HAAkG;oBAElG,yCAAe;oBAEf,sKAGI,CACC,CACD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport { Header } from \"../common/Header\";\r\nimport \"./css/authentication.css\";\r\nimport { View } from \"./View\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { AuthenticationProviderConfig } from \"./AuthenticationProviderConfig\";\r\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { Content } from \"./Content\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { Button } from \"../common/Button\";\r\n\r\nexport type AuthenticationProps = {\r\n\tgetAuthenticationProviders: () => Promise<AuthenticationProvider[]>;\r\n\tsetAuthenticationProviders: (authenticationProviders: any) => Promise<Error | null>;\r\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\r\n};\r\n\r\nexport const Authentication = (props: AuthenticationProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst authProviders = useSelector((state: RootState) => state.smartDesktopDesigner.authentication.providers);\r\n\tconst enabledAuthProviders = authProviders.filter((provider) => provider.enabled);\r\n\r\n\tconst [isAdvancedMode, setIsAdvancedMode] = useState(false);\r\n\tconst shownProvider = enabledAuthProviders[0];\r\n\r\n\tuseEffect(() => {\r\n\t\tprops.getAuthenticationProviders().then((providers) => {\r\n\t\t\tproviders.forEach((provider) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(provider));\r\n\t\t\t});\r\n\t\t});\r\n\t}, []);\r\n\r\n\tfunction updateAuthProviders(value: AuthenticationProvider | null) {\r\n\t\tconst name = value ? value.name : \"none\";\r\n\r\n\t\tprops\r\n\t\t\t.setAuthenticationProviders(\r\n\t\t\t\tauthProviders.map((provider) => {\r\n\t\t\t\t\tif (name === provider.name) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t...value,\r\n\t\t\t\t\t\t\tenabled: true,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\t...provider,\r\n\t\t\t\t\t\tenabled: false,\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.then(() => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(value));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.enable_auth_provider(name));\r\n\t\t\t});\r\n\t}\r\n\r\n\treturn (\r\n\t\t<View>\r\n\t\t\t<Header\r\n\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\tlaunchTutorialLink(\"configuring-authentication\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tAuthentication\r\n\t\t\t</Header>\r\n\t\t\t<Content>\r\n\t\t\t\t<div className=\"auth-setup-content\">\r\n\t\t\t\t\t<form className=\"auth-setup-form\" onSubmit={(e) => e.preventDefault()}>\r\n\t\t\t\t\t\t<div className=\"auth-setup-fields\">\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-provider\">\r\n\t\t\t\t\t\t\t\t<div className=\"auth-setup-field\">\r\n\t\t\t\t\t\t\t\t\t<label>Provider</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<select\r\n\t\t\t\t\t\t\t\t\t\taria-label=\"Authentication Provider\"\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-select-provider\"\r\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(authProviders.find((p) => p.name === e.target.value) || null);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tvalue={enabledAuthProviders.map((provider) => provider.name)[0] || \"none\"}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t<option value=\"none\">None</option>\r\n\t\t\t\t\t\t\t\t\t\t{authProviders.map((provider, index) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<option key={index} value={provider.name}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\r\n\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t<Tooltip>\r\n\t\t\t\t\t\t\t\t\t\tChoose from the list of OAuth providers to configure Single Sign On (SSO) for your project.\r\n\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t\t\t<AuthenticationProviderConfig\r\n\t\t\t\t\t\t\t\t\t\tkey={shownProvider.name}\r\n\t\t\t\t\t\t\t\t\t\tvalue={shownProvider}\r\n\t\t\t\t\t\t\t\t\t\tisAdvancedMode={isAdvancedMode}\r\n\t\t\t\t\t\t\t\t\t\ttestAuthenticationProvider={props.testAuthenticationProvider}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(value);\r\n\t\t\t\t\t\t\t\t\t\t}}\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</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-toggle-mode\">\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-toggle-mode-button\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"ghost\"\r\n\t\t\t\t\t\t\t\t\ttext={!isAdvancedMode ? \"Show advanced\" : \"Hide advanced\"}\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetIsAdvancedMode(!isAdvancedMode);\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</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</form>\r\n\t\t\t\t\t<div className=\"auth-setup-tutorial\">\r\n\t\t\t\t\t\t<h3>Step 1</h3>\r\n\r\n\t\t\t\t\t\t<p>Select your OAuth2 provider from the dropdown list.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 2</h3>\r\n\r\n\t\t\t\t\t\t<p>Copy the provided Redirect URL into the OAuth2 app configuration for your service provider.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 3</h3>\r\n\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\tSave the app configuration on your OAuth2 service provider, and then input the given Client ID and any\r\n\t\t\t\t\t\t\tother configuration settings.\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</Content>\r\n\t\t</View>\r\n\t);\r\n};\r\n"]}
|