@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDropdownButton.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/DefaultDropdownButton.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"DefaultDropdownButton.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/DefaultDropdownButton.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC5E,MAAM,aAAa,GAAG;YACrB,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE;YAC9C,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE;SAC9C,CAAC;QACF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,qBAAqB,IAAC,aAAa,EAAE,aAAa,GAAI,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,CAAC,OAAO,CAAC,IAAI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,IAAI,CAAC,kCAAkC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACxF,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACpC,MAAM,aAAa,GAAG;YACrB,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE;YAC9C;gBACC,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,GAAG,EAAE;oBAClB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;gBAC5B,CAAC;aACD;SACD,CAAC;QACF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,qBAAqB,IAAC,aAAa,EAAE,aAAa,GAAI,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjD,GAAG,CAAC,OAAO,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport DefaultDropdownButton from \"./../DefaultDropdownButton\";\r\nimport * as sinon from \"sinon\";\r\n\r\ndescribe(\"<DefaultDropdownButton/>\", () => {\r\n\tit(\"should display options when not displaying options and clicked on\", () => {\r\n\t\tconst buttonOptions = [\r\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\r\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\r\n\t\t];\r\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\r\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\r\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(1);\r\n\t});\r\n\r\n\tit(\"should not display options when currently displaying options and clicked on\", () => {\r\n\t\tconst buttonOptions = [\r\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\r\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\r\n\t\t];\r\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\r\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\r\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\r\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(0);\r\n\t});\r\n\r\n\tit(\"should not display options when clicked on and not enabled\", () => {\r\n\t\tconst buttonOptions = [\r\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\r\n\t\t\t{ optionLabel: \"two\", clickHandler: () => {} },\r\n\t\t];\r\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} enabled={false} />);\r\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\r\n\t\texpect(wrapper.find(\".finsemble-dropdown__btn-options\")).to.have.lengthOf(0);\r\n\t});\r\n\r\n\tit(\"should perform the specific clickHandler function corresponding to its option\", () => {\r\n\t\tlet spy = sinon.spy(console, \"log\");\r\n\t\tconst buttonOptions = [\r\n\t\t\t{ optionLabel: \"one\", clickHandler: () => {} },\r\n\t\t\t{\r\n\t\t\t\toptionLabel: \"two\",\r\n\t\t\t\tclickHandler: () => {\r\n\t\t\t\t\tconsole.log(\"Hello World\");\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t];\r\n\t\tconst wrapper = mount(<DefaultDropdownButton buttonOptions={buttonOptions} />);\r\n\t\twrapper.find(\".finsemble-dropdown__btn\").simulate(\"click\");\r\n\t\twrapper.find(\".finsemble-dropdown__btn-option\").at(2).simulate(\"click\");\r\n\t\texpect(spy.calledWith(\"Hello World\")).to.be.true;\r\n\t\tspy.restore();\r\n\t});\r\n});\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProtocolToValidURL.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/addProtocolToValidURL.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"addProtocolToValidURL.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/tests/addProtocolToValidURL.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,CAAC,QAAQ,GAAQ;IACtB,QAAQ,EAAE,OAAO;CACjB,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC7F,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QACjE,MAAM,IAAI,GAAG,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;QACjF,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACpB,MAAM,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport { addProtocolToValidURL } from \"../addProtocolToValidURL\";\r\n\r\n// Mock global variable location\r\nglobal.location = <any>{\r\n\tprotocol: \"http:\",\r\n};\r\n\r\ndescribe(\"addProtocolToValidURL\", () => {\r\n\tit(\"should add protocol when necessary\", () => {\r\n\t\texpect(addProtocolToValidURL(\"www.google.com\"), \"website\").to.equal(\"http://www.google.com\");\r\n\t\texpect(addProtocolToValidURL(\"blah\"), \"words\").to.equal(\"http://blah\");\r\n\t});\r\n\tit(\"should not add protocol to URLs that already have them\", () => {\r\n\t\tconst urls = [\"http://www.google.com\", \"https://cosaic.io\", \"file:///C:/Users/\"];\r\n\t\turls.forEach((url) => {\r\n\t\t\texpect(addProtocolToValidURL(url), url).to.equal(url);\r\n\t\t});\r\n\t});\r\n});\r\n"]}
|
|
@@ -10,7 +10,6 @@ class _SingleInputDialog extends React.Component {
|
|
|
10
10
|
super(props);
|
|
11
11
|
this.bindCorrectContext();
|
|
12
12
|
this.state = {
|
|
13
|
-
inputLabel: "No question.",
|
|
14
13
|
affirmativeResponseLabel: "Yes",
|
|
15
14
|
renderInput: false,
|
|
16
15
|
inputPlaceholder: "New workspace",
|
|
@@ -37,7 +36,6 @@ class _SingleInputDialog extends React.Component {
|
|
|
37
36
|
title: data.title || "Title",
|
|
38
37
|
inputValue: null,
|
|
39
38
|
hideModalOnClose: typeof data.hideModalOnClose === "undefined" ? true : data.hideModalOnClose,
|
|
40
|
-
inputLabel: data.inputLabel,
|
|
41
39
|
affirmativeResponseLabel: data.affirmativeResponseLabel || "OK",
|
|
42
40
|
cancelResponseLabel: data.cancelResponseLabel || "Cancel",
|
|
43
41
|
showCancelButton: typeof data.showCancelButton === "undefined" ? false : data.showCancelButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleInputDialog.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AA0BtC,MAAM,kBAAmB,SAAQ,KAAK,CAAC,SAAyB;IAC/D,YAAY,KAAK,GAAG,EAAE;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,cAAc;YAC1B,wBAAwB,EAAE,KAAK;YAE/B,WAAW,EAAE,KAAK;YAClB,gBAAgB,EAAE,eAAe;SACjC,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrE,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,aAAa,GAAG,I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AAE,IAAI,EACf,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACnC,CACF;YACD,6BAAK,SAAS,EAAC,gBAAgB;gBAC7B,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAC/B,oBAAC,qBAAqB,IACrB,SAAS,EAAC,qBAAqB,EAC/B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR,CACxB;gBACD,oBAAC,qBAAqB,IACrB,SAAS,EAAC,yBAAyB,EACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;oBAClC,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,oBAAC,kBAAkB,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\r\nimport { FinsembleDialogTextInput } from \"../legacyControls/FinsembleDialogTextInput\";\r\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\r\nimport \"./SingleInputDialog.css\";\r\nimport \"../../assets/css/finsemble.css\";\r\nimport \"../../assets/css/dialogs.css\";\r\n\r\n// TODO: julianna 04-22-2021: Should SingleInputDialog and YesNoDialog be combined? There's a lot of code being repeated between the 2.\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\t// TODO: julianna 04-22-2021: inputLabel is set, but never used. Should it be removed?\r\n\tinputLabel: string;\r\n\taffirmativeResponseLabel: string;\r\n\trenderInput: boolean;\r\n\ttitle?: string;\r\n\tcancelResponseLabel?: string;\r\n\tshowCancelButton?: boolean;\r\n\thideModalOnClose?: boolean;\r\n\tinputValue?: string | null;\r\n\tinputPattern?: string;\r\n\tinputMaxLength?: number;\r\n\tinputPlaceholder: string;\r\n}\r\n\r\n/**\r\n * This is our standard input dialog. It gives the user a single button and a text field, and ferries that data back to the window that opened it.\r\n *\r\n * @class SingleInputDialog\r\n * @extends {React.Component}\r\n */\r\nclass _SingleInputDialog extends React.Component<IProps, IState> {\r\n\tconstructor(props = {}) {\r\n\t\tsuper(props);\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.state = {\r\n\t\t\tinputLabel: \"No question.\",\r\n\t\t\taffirmativeResponseLabel: \"Yes\",\r\n\t\t\t/** Our input uses the HTML autoFocus attribute. This only fires when the element is rendered for the 1st time. Since we re-use the dialogs, the 2nd time the dialog is shown, autoFocus will not trigger. To force it to trigger, we change this boolean when a response is sent back to the opener, which unmounts the element from the dom. The next time the dialog is used, we will render the element again, and autoFocus will trigger. */\r\n\t\t\trenderInput: false,\r\n\t\t\tinputPlaceholder: \"New workspace\",\r\n\t\t};\r\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\r\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\r\n\t\tthis.setInputValue = this.setInputValue.bind(this);\r\n\t\tthis.sendResponse = this.sendResponse.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles escape and enter.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\thandleKeydownOnBody(e: KeyboardEvent) {\r\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\r\n\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t}\r\n\r\n\t\tif (e.code === \"Escape\") {\r\n\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tonShowRequested(err: any, response: any) {\r\n\t\tlet { data } = response;\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\ttitle: data.title || \"Title\",\r\n\t\t\t\tinputValue: null,\r\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\r\n\t\t\t\tinputLabel: data.inputLabel,\r\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"OK\",\r\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\r\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? false : data.showCancelButton,\r\n\t\t\t\trenderInput: true,\r\n\t\t\t\tinputPattern: data.inputPattern,\r\n\t\t\t\tinputMaxLength: data.inputMaxLength,\r\n\t\t\t\tinputPlaceholder: data.inputPlaceholder || this.state.inputPlaceholder,\r\n\t\t\t},\r\n\t\t\tthis.fitAndShow\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\r\n\t *\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tfitAndShow() {\r\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\r\n\t\t\tFSBL.Clients.DialogManager.showDialog();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends user input to the opener.\r\n\t *\r\n\t * @param {any} response\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tsendResponse(response: any) {\r\n\t\tFSBL.Clients.DialogManager.respondToOpener({\r\n\t\t\tvalue: this.state.inputValue,\r\n\t\t\tchoice: response,\r\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\r\n\t\t});\r\n\r\n\t\tthis.setState({\r\n\t\t\tinputValue: null,\r\n\t\t\trenderInput: false,\r\n\t\t});\r\n\t\tArray.from(document.querySelectorAll(\"input\")).forEach((el) => (el.value = \"\"));\r\n\t}\r\n\r\n\t/**\r\n\t * onChange handler. When the user types, we keep the value up to date in the dialog's state.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tsetInputValue(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\tthis.setState({\r\n\t\t\tinputValue: e.target.value,\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<FinsembleDialog\r\n\t\t\t\tuserInputTimeout={10000}\r\n\t\t\t\tbehaviorOnResponse=\"hide\"\r\n\t\t\t\tonShowRequested={this.onShowRequested}\r\n\t\t\t\tisModal={true}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\r\n\t\t\t\t{this.state.renderInput && (\r\n\t\t\t\t\t<FinsembleDialogTextInput\r\n\t\t\t\t\t\tonInputChange={this.setInputValue}\r\n\t\t\t\t\t\tplaceholder={this.state.inputPlaceholder}\r\n\t\t\t\t\t\tautoFocus={true}\r\n\t\t\t\t\t\tinputPattern={this.state.inputPattern}\r\n\t\t\t\t\t\tmaxLength={this.state.inputMaxLength}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t\t<div className=\"button-wrapper\">\r\n\t\t\t\t\t{this.state.showCancelButton && (\r\n\t\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\t\tshow={true}\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{this.state.cancelResponseLabel}\r\n\t\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\r\n\t\t\t\t\t\tshow={true}\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t</div>\r\n\t\t\t</FinsembleDialog>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * A window for collecting input from a user (e.g., a new workspace's name).\r\n */\r\nexport const SingleInputDialog = () => <_SingleInputDialog />;\r\n"]}
|
|
1
|
+
{"version":3,"file":"SingleInputDialog.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,yBAAyB,CAAC;AACjC,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AAwBtC,MAAM,kBAAmB,SAAQ,KAAK,CAAC,SAAyB;IAC/D,YAAY,KAAK,GAAG,EAAE;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG;YACZ,wBAAwB,EAAE,KAAK;YAE/B,WAAW,EAAE,KAAK;YAClB,gBAAgB,EAAE,eAAe;SACjC,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CA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AAC,cAAc,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAO;YACrD,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAC1B,oBAAC,wBAAwB,IACxB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACxC,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACnC,CACF;YACD,6BAAK,SAAS,EAAC,gBAAgB;gBAC7B,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAC/B,oBAAC,qBAAqB,IACrB,SAAS,EAAC,qBAAqB,EAC/B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR,CACxB;gBACD,oBAAC,qBAAqB,IACrB,SAAS,EAAC,yBAAyB,EACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE;wBACb,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;oBAClC,CAAC,IAEA,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,oBAAC,kBAAkB,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\r\nimport { FinsembleDialogTextInput } from \"../legacyControls/FinsembleDialogTextInput\";\r\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\r\nimport \"./SingleInputDialog.css\";\r\nimport \"../../assets/css/finsemble.css\";\r\nimport \"../../assets/css/dialogs.css\";\r\n\r\n// SingleInputDialog and YesNoDialog can be combined. There's a lot of code being repeated between the 2.\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\taffirmativeResponseLabel: string;\r\n\trenderInput: boolean;\r\n\ttitle?: string;\r\n\tcancelResponseLabel?: string;\r\n\tshowCancelButton?: boolean;\r\n\thideModalOnClose?: boolean;\r\n\tinputValue?: string | null;\r\n\tinputPattern?: string;\r\n\tinputMaxLength?: number;\r\n\tinputPlaceholder: string;\r\n}\r\n\r\n/**\r\n * This is our standard input dialog. It gives the user a single button and a text field, and ferries that data back to the window that opened it.\r\n *\r\n * @class SingleInputDialog\r\n * @extends {React.Component}\r\n */\r\nclass _SingleInputDialog extends React.Component<IProps, IState> {\r\n\tconstructor(props = {}) {\r\n\t\tsuper(props);\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.state = {\r\n\t\t\taffirmativeResponseLabel: \"Yes\",\r\n\t\t\t/** Our input uses the HTML autoFocus attribute. This only fires when the element is rendered for the 1st time. Since we re-use the dialogs, the 2nd time the dialog is shown, autoFocus will not trigger. To force it to trigger, we change this boolean when a response is sent back to the opener, which unmounts the element from the dom. The next time the dialog is used, we will render the element again, and autoFocus will trigger. */\r\n\t\t\trenderInput: false,\r\n\t\t\tinputPlaceholder: \"New workspace\",\r\n\t\t};\r\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\r\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\r\n\t\tthis.setInputValue = this.setInputValue.bind(this);\r\n\t\tthis.sendResponse = this.sendResponse.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles escape and enter.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\thandleKeydownOnBody(e: KeyboardEvent) {\r\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\r\n\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t}\r\n\r\n\t\tif (e.code === \"Escape\") {\r\n\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tonShowRequested(err: any, response: any) {\r\n\t\tlet { data } = response;\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\ttitle: data.title || \"Title\",\r\n\t\t\t\tinputValue: null,\r\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\r\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"OK\",\r\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\r\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? false : data.showCancelButton,\r\n\t\t\t\trenderInput: true,\r\n\t\t\t\tinputPattern: data.inputPattern,\r\n\t\t\t\tinputMaxLength: data.inputMaxLength,\r\n\t\t\t\tinputPlaceholder: data.inputPlaceholder || this.state.inputPlaceholder,\r\n\t\t\t},\r\n\t\t\tthis.fitAndShow\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\r\n\t *\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tfitAndShow() {\r\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\r\n\t\t\tFSBL.Clients.DialogManager.showDialog();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends user input to the opener.\r\n\t *\r\n\t * @param {any} response\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tsendResponse(response: any) {\r\n\t\tFSBL.Clients.DialogManager.respondToOpener({\r\n\t\t\tvalue: this.state.inputValue,\r\n\t\t\tchoice: response,\r\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\r\n\t\t});\r\n\r\n\t\tthis.setState({\r\n\t\t\tinputValue: null,\r\n\t\t\trenderInput: false,\r\n\t\t});\r\n\t\tArray.from(document.querySelectorAll(\"input\")).forEach((el) => (el.value = \"\"));\r\n\t}\r\n\r\n\t/**\r\n\t * onChange handler. When the user types, we keep the value up to date in the dialog's state.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof SingleInputDialog\r\n\t */\r\n\tsetInputValue(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\tthis.setState({\r\n\t\t\tinputValue: e.target.value,\r\n\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<FinsembleDialog\r\n\t\t\t\tuserInputTimeout={10000}\r\n\t\t\t\tbehaviorOnResponse=\"hide\"\r\n\t\t\t\tonShowRequested={this.onShowRequested}\r\n\t\t\t\tisModal={true}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\r\n\t\t\t\t{this.state.renderInput && (\r\n\t\t\t\t\t<FinsembleDialogTextInput\r\n\t\t\t\t\t\tonInputChange={this.setInputValue}\r\n\t\t\t\t\t\tplaceholder={this.state.inputPlaceholder}\r\n\t\t\t\t\t\tautoFocus={true}\r\n\t\t\t\t\t\tinputPattern={this.state.inputPattern}\r\n\t\t\t\t\t\tmaxLength={this.state.inputMaxLength}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t\t<div className=\"button-wrapper\">\r\n\t\t\t\t\t{this.state.showCancelButton && (\r\n\t\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\t\tshow={true}\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{this.state.cancelResponseLabel}\r\n\t\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\r\n\t\t\t\t\t\tshow={true}\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t</div>\r\n\t\t\t</FinsembleDialog>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * A window for collecting input from a user (e.g., a new workspace's name).\r\n */\r\nexport const SingleInputDialog = () => <_SingleInputDialog />;\r\n"]}
|
|
@@ -6,15 +6,15 @@ import { Basic, CustomButtonLabels, NoCancelButton, WithInputPlaceholder } from
|
|
|
6
6
|
import { accessibilityAssessor } from "../smartDesktopDesigner/tests/a11y_helper";
|
|
7
7
|
describe("<SingleInputDialog/>", () => {
|
|
8
8
|
it("should pass accessibility scans", async () => {
|
|
9
|
-
const wrapper = mount(React.createElement(Basic, {
|
|
9
|
+
const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
|
|
10
10
|
expect(await accessibilityAssessor(wrapper)).to.be.true;
|
|
11
11
|
});
|
|
12
12
|
it("should contain a text input", () => {
|
|
13
|
-
const wrapper = mount(React.createElement(Basic, {
|
|
13
|
+
const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
|
|
14
14
|
expect(wrapper.find("input").exists()).to.be.true;
|
|
15
15
|
});
|
|
16
16
|
it("should display custom labels", () => {
|
|
17
|
-
const wrapper = mount(React.createElement(CustomButtonLabels, {
|
|
17
|
+
const wrapper = mount(React.createElement(CustomButtonLabels, Object.assign({}, CustomButtonLabels.args)));
|
|
18
18
|
const dialogText = wrapper.text();
|
|
19
19
|
expect(dialogText).to.contain("Да");
|
|
20
20
|
expect(dialogText).to.contain("Отмена");
|
|
@@ -22,16 +22,16 @@ describe("<SingleInputDialog/>", () => {
|
|
|
22
22
|
expect(dialogText).to.not.contain("Cancel");
|
|
23
23
|
});
|
|
24
24
|
it("should supress cancel button on request", () => {
|
|
25
|
-
const wrapper = mount(React.createElement(NoCancelButton, {
|
|
25
|
+
const wrapper = mount(React.createElement(NoCancelButton, Object.assign({}, NoCancelButton.args)));
|
|
26
26
|
const dialogText = wrapper.text();
|
|
27
27
|
expect(dialogText).to.not.contain("Cancel");
|
|
28
28
|
});
|
|
29
29
|
it("can display custom placeholder", () => {
|
|
30
|
-
const wrapper = mount(React.createElement(WithInputPlaceholder, {
|
|
30
|
+
const wrapper = mount(React.createElement(WithInputPlaceholder, Object.assign({}, WithInputPlaceholder.args)));
|
|
31
31
|
expect(wrapper.find("input").prop("placeholder")).to.equal("My placeholder");
|
|
32
32
|
});
|
|
33
33
|
it("should display default placeholder", () => {
|
|
34
|
-
const wrapper = mount(React.createElement(Basic, {
|
|
34
|
+
const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
|
|
35
35
|
expect(wrapper.find("input").prop("placeholder")).to.equal("New workspace");
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleInputDialog.spec.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,cAAc,E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AAC;IACH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAY,EAAI,CAAC,CAAC;QAE1D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport { Basic, CustomButtonLabels, NoCancelButton, WithInputPlaceholder } from \"./SingleInputDialog.stories\";\r\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\ndescribe(\"<SingleInputDialog/>\", () => {\r\n\tit(\"should pass accessibility scans\", async () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\tit(\"should contain a text input\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\r\n\r\n\t\texpect(wrapper.find(\"input\").exists()).to.be.true;\r\n\t});\r\n\tit(\"should display custom labels\", () => {\r\n\t\tconst wrapper = mount(<CustomButtonLabels {...(CustomButtonLabels.args as any)} />);\r\n\r\n\t\tconst dialogText = wrapper.text();\r\n\t\texpect(dialogText).to.contain(\"Да\");\r\n\t\texpect(dialogText).to.contain(\"Отмена\");\r\n\t\texpect(dialogText).to.not.contain(\"Yes\");\r\n\t\texpect(dialogText).to.not.contain(\"Cancel\");\r\n\t});\r\n\tit(\"should supress cancel button on request\", () => {\r\n\t\tconst wrapper = mount(<NoCancelButton {...(NoCancelButton.args as any)} />);\r\n\r\n\t\tconst dialogText = wrapper.text();\r\n\t\texpect(dialogText).to.not.contain(\"Cancel\");\r\n\t});\r\n\tit(\"can display custom placeholder\", () => {\r\n\t\tconst wrapper = mount(<WithInputPlaceholder {...(WithInputPlaceholder.args as any)} />);\r\n\r\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\")).to.equal(\"My placeholder\");\r\n\t});\r\n\tit(\"should display default placeholder\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\r\n\r\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\")).to.equal(\"New workspace\");\r\n\t});\r\n});\r\n"]}
|
|
@@ -13,7 +13,7 @@ const Template = (args) => {
|
|
|
13
13
|
cb("", { data: args._data });
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
return React.createElement(SingleInputDialog, {
|
|
16
|
+
return React.createElement(SingleInputDialog, Object.assign({}, args));
|
|
17
17
|
};
|
|
18
18
|
export const Empty = Template.bind({});
|
|
19
19
|
export const Basic = Template.bind({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleInputDialog.stories.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,qCAAqC;IAC5C,SAAS,EAAE,iBAAiB;CAC5B,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,GAAG,CAAC,EAAY,EAAE,EAAE;YACpE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC9B,CAAC,CAAC;KACF;IAED,OAAO,oBAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SingleInputDialog.stories.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,qCAAqC;IAC5C,SAAS,EAAE,iBAAiB;CAC5B,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,GAAG,CAAC,EAAY,EAAE,EAAE;YACpE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC9B,CAAC,CAAC;KACF;IAED,OAAO,oBAAC,iBAAiB,oBAAK,IAAI,EAAI,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,KAAK,EAAE;QACN,KAAK,EAAE,eAAe;QACtB,gBAAgB,EAAE,IAAI;KACtB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE;QACN,gBAAgB,EAAE,IAAI;QACtB,wBAAwB,EAAE,IAAI;QAC9B,mBAAmB,EAAE,QAAQ;KAC7B;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,cAAc,CAAC,IAAI,GAAG;IACrB,KAAK,EAAE;QACN,KAAK,EAAE,eAAe;QACtB,gBAAgB,EAAE,KAAK;KACvB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/C,aAAa,CAAC,IAAI,GAAG;IACpB,KAAK,EAAE;QACN,KAAK,EAAE,4BAA4B;QACnC,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,CAAC;KACjB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACvB,KAAK,EAAE;QACN,KAAK,EAAE,oBAAoB;QAC3B,gBAAgB,EAAE,IAAI;QACtB,YAAY,EAAE,UAAU;KACxB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,GAAG;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,oBAAoB;QAC3B,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,gBAAgB;KAClC;CACD,CAAC","sourcesContent":["import React from \"react\";\r\nimport { SingleInputDialog } from \"./SingleInputDialog\";\r\nimport { initFSBL } from \"../common/helpers\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport \"../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"SingleInputDialog/SingleInputDialog\",\r\n\tcomponent: SingleInputDialog,\r\n};\r\n\r\nconst Template: Story<{}> = (args: any) => {\r\n\tinitFSBL(window);\r\n\r\n\tif (args._data) {\r\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\r\n\t\t\tcb(\"\", { data: args._data });\r\n\t\t};\r\n\t}\r\n\r\n\treturn <SingleInputDialog {...args} />;\r\n};\r\n\r\nexport const Empty = Template.bind({});\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example title\",\r\n\t\tshowCancelButton: true,\r\n\t},\r\n};\r\n\r\nexport const CustomButtonLabels = Template.bind({});\r\nCustomButtonLabels.args = {\r\n\t_data: {\r\n\t\tshowCancelButton: true,\r\n\t\taffirmativeResponseLabel: \"Да\",\r\n\t\tcancelResponseLabel: \"Отмена\",\r\n\t},\r\n};\r\n\r\nexport const NoCancelButton = Template.bind({});\r\nNoCancelButton.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example title\",\r\n\t\tshowCancelButton: false,\r\n\t},\r\n};\r\n\r\nexport const WithMaxLength = Template.bind({});\r\nWithMaxLength.args = {\r\n\t_data: {\r\n\t\ttitle: \"Max length of 5 characters\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputMaxLength: 5,\r\n\t},\r\n};\r\n\r\nexport const WithInputPattern = Template.bind({});\r\nWithInputPattern.args = {\r\n\t_data: {\r\n\t\ttitle: \"Only input numbers\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputPattern: \"^[0-9]+$\",\r\n\t},\r\n};\r\n\r\nexport const WithInputPlaceholder = Template.bind({});\r\nWithInputPlaceholder.args = {\r\n\t_data: {\r\n\t\ttitle: \"Custom Placeholder\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputPlaceholder: \"My placeholder\",\r\n\t},\r\n};\r\n"]}
|
|
@@ -8,7 +8,7 @@ export declare type AppEditAccessProps = {
|
|
|
8
8
|
appName: string;
|
|
9
9
|
rules: ApplicationRule[];
|
|
10
10
|
onChange: (data: ApplicationRule[]) => any;
|
|
11
|
-
|
|
11
|
+
addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
|
|
12
12
|
isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
|
|
13
13
|
isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
|
|
14
14
|
};
|
|
@@ -27,7 +27,7 @@ export const AppEditAccess = (props) => {
|
|
|
27
27
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
28
28
|
}, []);
|
|
29
29
|
const filteredApps = apps
|
|
30
|
-
.filter((app) => !app.manifest
|
|
30
|
+
.filter((app) => { var _a; return !((_a = app.manifest) === null || _a === void 0 ? void 0 : _a.temporary) && app.name !== props.appName; })
|
|
31
31
|
.sort((a, b) => {
|
|
32
32
|
if (a.name > b.name) {
|
|
33
33
|
return 1;
|
|
@@ -37,7 +37,7 @@ export const AppEditAccess = (props) => {
|
|
|
37
37
|
}
|
|
38
38
|
return 0;
|
|
39
39
|
});
|
|
40
|
-
const currentApp = apps.find((app) => app.manifest
|
|
40
|
+
const currentApp = apps.find((app) => { var _a; return ((_a = app.manifest) === null || _a === void 0 ? void 0 : _a.temporary) || app.name === props.appName; });
|
|
41
41
|
const [inboundAuthorizedApps, setInboundAuthorizedApps] = useState([]);
|
|
42
42
|
const [outboundAuthorizedApps, setOutboundAuthorizedApps] = useState([]);
|
|
43
43
|
const [advancedExpanded, setAdvancedExpanded] = useState(false);
|
|
@@ -46,7 +46,7 @@ export const AppEditAccess = (props) => {
|
|
|
46
46
|
props.onChange(newRules);
|
|
47
47
|
}
|
|
48
48
|
function updateBlockingApp(config) {
|
|
49
|
-
props.
|
|
49
|
+
props.addApp(config.appId, config).then(() => {
|
|
50
50
|
dispatch(SmartDesktopDesignerActions.update_app(config));
|
|
51
51
|
});
|
|
52
52
|
}
|
|
@@ -57,21 +57,13 @@ export const AppEditAccess = (props) => {
|
|
|
57
57
|
React.createElement("span", { className: "app-edit-access-item-name" }, app.name),
|
|
58
58
|
!isInboundAuthorized && (React.createElement(RelativePortal, { className: ["tooltip-portal", scrolling || !advancedExpanded ? "is-scrolling" : ""].join(" "), component: "div", left: -13, top: 0 },
|
|
59
59
|
React.createElement(Tooltip, { type: "lock", onClick: () => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
...app.manifest,
|
|
64
|
-
interop: {
|
|
65
|
-
...app.manifest?.interop,
|
|
66
|
-
selectConnect: [
|
|
67
|
-
...(app.manifest?.interop?.selectConnect || []),
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
updateBlockingApp(Object.assign(Object.assign({}, app), { manifest: Object.assign(Object.assign({}, app.manifest), { interop: Object.assign(Object.assign({}, (_a = app.manifest) === null || _a === void 0 ? void 0 : _a.interop), { selectConnect: [
|
|
62
|
+
...(((_c = (_b = app.manifest) === null || _b === void 0 ? void 0 : _b.interop) === null || _c === void 0 ? void 0 : _c.selectConnect) || []),
|
|
68
63
|
{
|
|
69
64
|
authorize: [{ name: props.appName || "" }],
|
|
70
65
|
},
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
});
|
|
66
|
+
] }) }) }));
|
|
75
67
|
} }, "This app is blocking access. Click to allow access")))));
|
|
76
68
|
});
|
|
77
69
|
}
|
|
@@ -82,30 +74,22 @@ export const AppEditAccess = (props) => {
|
|
|
82
74
|
return;
|
|
83
75
|
}
|
|
84
76
|
props
|
|
85
|
-
.isInboundInteropAuthorized({
|
|
86
|
-
...currentApp,
|
|
87
|
-
name: props.appName,
|
|
88
|
-
manifest: {
|
|
77
|
+
.isInboundInteropAuthorized(Object.assign(Object.assign({}, currentApp), { name: props.appName, manifest: {
|
|
89
78
|
interop: {
|
|
90
79
|
selectConnect: rules,
|
|
91
80
|
},
|
|
92
|
-
},
|
|
93
|
-
}, targetApp)
|
|
81
|
+
} }), targetApp)
|
|
94
82
|
.then((inboundAuthorized) => {
|
|
95
83
|
if (inboundAuthorized && !inboundAuthorizedApps.includes(targetApp.name)) {
|
|
96
84
|
setInboundAuthorizedApps([...inboundAuthorizedApps, targetApp.name]);
|
|
97
85
|
}
|
|
98
86
|
});
|
|
99
87
|
props
|
|
100
|
-
.isOutboundInteropAuthorized({
|
|
101
|
-
...currentApp,
|
|
102
|
-
name: props.appName,
|
|
103
|
-
manifest: {
|
|
88
|
+
.isOutboundInteropAuthorized(Object.assign(Object.assign({}, currentApp), { name: props.appName, manifest: {
|
|
104
89
|
interop: {
|
|
105
90
|
selectConnect: rules,
|
|
106
91
|
},
|
|
107
|
-
},
|
|
108
|
-
}, targetApp)
|
|
92
|
+
} }), targetApp)
|
|
109
93
|
.then((outboundAuthorized) => {
|
|
110
94
|
if (outboundAuthorized && !outboundAuthorizedApps.includes(targetApp.name)) {
|
|
111
95
|
setOutboundAuthorizedApps([...outboundAuthorizedApps, targetApp.name]);
|
|
@@ -136,20 +120,19 @@ export const AppEditAccess = (props) => {
|
|
|
136
120
|
React.createElement(FinsembleSelect, { options: filteredApps.map((app) => app.name), optionComponents: getOptions(), selected: filteredApps
|
|
137
121
|
.filter((app) => outboundAuthorizedApps.includes(app.name))
|
|
138
122
|
.map((app) => app.name), updateCallback: (selected) => {
|
|
123
|
+
let newRules = [...rules];
|
|
139
124
|
filteredApps.forEach((app) => {
|
|
140
125
|
const isSelected = selected.find((name) => name === app.name);
|
|
141
126
|
if (!isSelected) {
|
|
142
|
-
|
|
127
|
+
newRules = newRules.filter((rule) => { var _a; return (_a = rule.authorize) === null || _a === void 0 ? void 0 : _a.some((auth) => auth.name !== app.name); });
|
|
143
128
|
}
|
|
144
129
|
else {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
authorize: [{ name: app.name }],
|
|
149
|
-
},
|
|
150
|
-
]);
|
|
130
|
+
newRules.push({
|
|
131
|
+
authorize: [{ name: app.name }],
|
|
132
|
+
});
|
|
151
133
|
}
|
|
152
134
|
});
|
|
135
|
+
doSetRules(newRules);
|
|
153
136
|
}, showSearch: true }))))))));
|
|
154
137
|
};
|
|
155
138
|
//#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UAAU,EAAE,EAC9B,QAAQ,EAAE,YAAY;6BACpB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;6BAC1D,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EACxB,cAAc,EAAE,CAAC,QAAQ,EAAE,EAAE;4BAC5B,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gCAC5B,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;gCAE9D,IAAI,CAAC,UAAU,EAAE;oCAChB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iCAC3F;qCAAM;oCACN,UAAU,CAAC;wCACV,GAAG,KAAK;wCACR;4CACC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;yCAC/B;qCACD,CAAC,CAAC;iCACH;4BACF,CAAC,CAAC,CAAC;wBACJ,CAAC,EACD,UAAU,EAAE,IAAI,GACE,CACd,CACD,CACD,CACD,CACN,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 { AppDefinition } from \"services/Interop/types\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport RelativePortal from \"react-relative-portal\";\r\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\r\n\r\nexport type AppEditAccessProps = {\r\n\tappName: string;\r\n\trules: ApplicationRule[];\r\n\tonChange: (data: ApplicationRule[]) => any;\r\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const AppEditAccess = (props: AppEditAccessProps) => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\r\n\tconst [rules, setRules] = useState(props.rules);\r\n\r\n\tconst [scrolling, setScrolling] = useState(false);\r\n\tlet timeout: any = null;\r\n\r\n\tuseEffect(() => {\r\n\t\tconst handleScroll = () => {\r\n\t\t\tsetScrolling(true);\r\n\t\t\tclearTimeout(timeout);\r\n\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\tsetScrolling(false);\r\n\t\t\t}, 50);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"scroll\", handleScroll, { passive: true, capture: true });\r\n\r\n\t\treturn () => window.removeEventListener(\"scroll\", handleScroll);\r\n\t}, []);\r\n\r\n\tconst filteredApps = apps\r\n\t\t.filter((app) => !app.manifest?.component?.temporary && app.name !== props.appName)\r\n\t\t.sort((a, b) => {\r\n\t\t\tif (a.name > b.name) {\r\n\t\t\t\treturn 1;\r\n\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\t\t});\r\n\r\n\tconst currentApp = apps.find((app) => app.manifest?.component?.temporary || app.name === props.appName);\r\n\r\n\tconst [inboundAuthorizedApps, setInboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [outboundAuthorizedApps, setOutboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [advancedExpanded, setAdvancedExpanded] = useState(false);\r\n\r\n\tfunction doSetRules(newRules: ApplicationRule[]) {\r\n\t\tsetRules(newRules);\r\n\r\n\t\tprops.onChange(newRules);\r\n\t}\r\n\r\n\tfunction updateBlockingApp(config: AppDefinition) {\r\n\t\tprops.updateApp(config.appId, config).then(() => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\r\n\t\t});\r\n\t}\r\n\r\n\tfunction getOptions() {\r\n\t\treturn filteredApps.map((app) => {\r\n\t\t\tconst isInboundAuthorized = inboundAuthorizedApps.includes(app.name);\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tclassName={[\"app-edit-access-item\", !isInboundAuthorized ? \"app-edit-access-blocked\" : \"\"].join(\" \")}\r\n\t\t\t\t\tkey={app.name}\r\n\t\t\t\t>\r\n\t\t\t\t\t<span className=\"app-edit-access-item-name\">{app.name}</span>\r\n\t\t\t\t\t{!isInboundAuthorized && (\r\n\t\t\t\t\t\t<RelativePortal\r\n\t\t\t\t\t\t\tclassName={[\"tooltip-portal\", scrolling || !advancedExpanded ? \"is-scrolling\" : \"\"].join(\" \")}\r\n\t\t\t\t\t\t\tcomponent=\"div\"\r\n\t\t\t\t\t\t\tleft={-13}\r\n\t\t\t\t\t\t\ttop={0}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tooltip\r\n\t\t\t\t\t\t\t\ttype=\"lock\"\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tupdateBlockingApp({\r\n\t\t\t\t\t\t\t\t\t\t...app,\r\n\t\t\t\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\t\t\t\t...app.manifest,\r\n\t\t\t\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\t\t\t\t...app.manifest?.interop,\r\n\t\t\t\t\t\t\t\t\t\t\t\tselectConnect: [\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t...(app.manifest?.interop?.selectConnect || []),\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\t\tauthorize: [{ name: props.appName || \"\" }],\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},\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>\r\n\t\t\t\t\t\t\t\tThis app is blocking access. Click to allow access\r\n\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t</RelativePortal>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t});\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tif (currentApp) {\r\n\t\t\tfilteredApps.forEach((targetApp) => {\r\n\t\t\t\tif (targetApp.name === props.appName) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isInboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\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\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((inboundAuthorized) => {\r\n\t\t\t\t\t\tif (inboundAuthorized && !inboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetInboundAuthorizedApps([...inboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isOutboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\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\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((outboundAuthorized) => {\r\n\t\t\t\t\t\tif (outboundAuthorized && !outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps([...outboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t} else if (!outboundAuthorized && outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tconst outboundAuthorizedAppsCopy = outboundAuthorizedApps.slice(0);\r\n\t\t\t\t\t\t\toutboundAuthorizedAppsCopy.splice(outboundAuthorizedAppsCopy.indexOf(targetApp.name), 1);\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps(outboundAuthorizedAppsCopy);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\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{filteredApps.length > 0 && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<div className={[\"app-edit-advanced\", advancedExpanded ? \"is-expanded\" : \"\"].join(\" \")}>\r\n\t\t\t\t\t\t<h2\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tsetAdvancedExpanded(!advancedExpanded);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FinsembleIcon className=\"expand-icon\" icon=\"chevron-right\"></FinsembleIcon> Advanced settings\r\n\t\t\t\t\t\t</h2>\r\n\r\n\t\t\t\t\t\t<div className=\"app-edit-advanced-content\">\r\n\t\t\t\t\t\t\t<div className=\"app-edit-access\">\r\n\t\t\t\t\t\t\t\t<h3>Configure access</h3>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\tUse the controls below to decide which apps this app will be able to share information with. By\r\n\t\t\t\t\t\t\t\t\tdefault, your app is able to share with all other apps.\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\t<FinsembleIcon icon=\"check-square\"></FinsembleIcon>\r\n\t\t\t\t\t\t\t\t\tChoose which apps to authorize\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\t\toptions={filteredApps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\toptionComponents={getOptions()}\r\n\t\t\t\t\t\t\t\t\tselected={filteredApps\r\n\t\t\t\t\t\t\t\t\t\t.filter((app) => outboundAuthorizedApps.includes(app.name))\r\n\t\t\t\t\t\t\t\t\t\t.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\tupdateCallback={(selected) => {\r\n\t\t\t\t\t\t\t\t\t\tfilteredApps.forEach((app) => {\r\n\t\t\t\t\t\t\t\t\t\t\tconst isSelected = selected.find((name) => name === app.name);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (!isSelected) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tdoSetRules(rules.filter((rule) => rule.authorize?.some((auth) => auth.name !== app.name)));\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tdoSetRules([\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t...rules,\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\t\tauthorize: [{ name: app.name }],\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}\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\tshowSearch={true}\r\n\t\t\t\t\t\t\t\t></FinsembleSelect>\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</div>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"AppEditAccess.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AppEditAccess.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAcxD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAEhF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,K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AG,CAAC,IAAI,EAAE,CAAC;qCAC/B,CAAC,CAAC;iCACH;4BACF,CAAC,CAAC,CAAC;4BAEH,UAAU,CAAC,QAAQ,CAAC,CAAC;wBACtB,CAAC,EACD,UAAU,EAAE,IAAI,GACE,CACd,CACD,CACD,CACD,CACN,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 { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport RelativePortal from \"react-relative-portal\";\r\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type AppEditAccessProps = {\r\n\tappName: string;\r\n\trules: ApplicationRule[];\r\n\tonChange: (data: ApplicationRule[]) => any;\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 AppEditAccess = (props: AppEditAccessProps) => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\r\n\tconst [rules, setRules] = useState(props.rules);\r\n\r\n\tconst [scrolling, setScrolling] = useState(false);\r\n\tlet timeout: any = null;\r\n\r\n\tuseEffect(() => {\r\n\t\tconst handleScroll = () => {\r\n\t\t\tsetScrolling(true);\r\n\t\t\tclearTimeout(timeout);\r\n\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\tsetScrolling(false);\r\n\t\t\t}, 50);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"scroll\", handleScroll, { passive: true, capture: true });\r\n\r\n\t\treturn () => window.removeEventListener(\"scroll\", handleScroll);\r\n\t}, []);\r\n\r\n\t/**\r\n\t * Get a list of all apps other than this one (in order to pick which ones to authorize)\r\n\t */\r\n\tconst filteredApps = apps\r\n\t\t.filter((app) => !app.manifest?.temporary && app.name !== props.appName)\r\n\t\t.sort((a, b) => {\r\n\t\t\tif (a.name > b.name) {\r\n\t\t\t\treturn 1;\r\n\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\t\t});\r\n\r\n\t/**\r\n\t * When adding an app, there will not yet be a name. The app that is flagged as temporary is us.\r\n\t * During editing of an app, the app will not be temporary but it will have a name.\r\n\t * We must check for both circumstances in order to know which app in the list is the current app.\r\n\t */\r\n\tconst currentApp = apps.find((app) => app.manifest?.temporary || app.name === props.appName);\r\n\r\n\tconst [inboundAuthorizedApps, setInboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [outboundAuthorizedApps, setOutboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [advancedExpanded, setAdvancedExpanded] = useState(false);\r\n\r\n\tfunction doSetRules(newRules: ApplicationRule[]) {\r\n\t\tsetRules(newRules);\r\n\r\n\t\tprops.onChange(newRules);\r\n\t}\r\n\r\n\tfunction updateBlockingApp(config: AppDefinition) {\r\n\t\tprops.addApp(config.appId, config).then(() => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\r\n\t\t});\r\n\t}\r\n\r\n\tfunction getOptions() {\r\n\t\treturn filteredApps.map((app) => {\r\n\t\t\tconst isInboundAuthorized = inboundAuthorizedApps.includes(app.name);\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tclassName={[\"app-edit-access-item\", !isInboundAuthorized ? \"app-edit-access-blocked\" : \"\"].join(\" \")}\r\n\t\t\t\t\tkey={app.name}\r\n\t\t\t\t>\r\n\t\t\t\t\t<span className=\"app-edit-access-item-name\">{app.name}</span>\r\n\t\t\t\t\t{!isInboundAuthorized && (\r\n\t\t\t\t\t\t<RelativePortal\r\n\t\t\t\t\t\t\tclassName={[\"tooltip-portal\", scrolling || !advancedExpanded ? \"is-scrolling\" : \"\"].join(\" \")}\r\n\t\t\t\t\t\t\tcomponent=\"div\"\r\n\t\t\t\t\t\t\tleft={-13}\r\n\t\t\t\t\t\t\ttop={0}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tooltip\r\n\t\t\t\t\t\t\t\ttype=\"lock\"\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tupdateBlockingApp({\r\n\t\t\t\t\t\t\t\t\t\t...app,\r\n\t\t\t\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\t\t\t\t...app.manifest,\r\n\t\t\t\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\t\t\t\t...app.manifest?.interop,\r\n\t\t\t\t\t\t\t\t\t\t\t\tselectConnect: [\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t...(app.manifest?.interop?.selectConnect || []),\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\t\tauthorize: [{ name: props.appName || \"\" }],\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},\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>\r\n\t\t\t\t\t\t\t\tThis app is blocking access. Click to allow access\r\n\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t</RelativePortal>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t});\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tif (currentApp) {\r\n\t\t\tfilteredApps.forEach((targetApp) => {\r\n\t\t\t\tif (targetApp.name === props.appName) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isInboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\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\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((inboundAuthorized: boolean) => {\r\n\t\t\t\t\t\tif (inboundAuthorized && !inboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetInboundAuthorizedApps([...inboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isOutboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\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\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((outboundAuthorized: boolean) => {\r\n\t\t\t\t\t\tif (outboundAuthorized && !outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps([...outboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t} else if (!outboundAuthorized && outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tconst outboundAuthorizedAppsCopy = outboundAuthorizedApps.slice(0);\r\n\t\t\t\t\t\t\toutboundAuthorizedAppsCopy.splice(outboundAuthorizedAppsCopy.indexOf(targetApp.name), 1);\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps(outboundAuthorizedAppsCopy);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\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{filteredApps.length > 0 && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<div className={[\"app-edit-advanced\", advancedExpanded ? \"is-expanded\" : \"\"].join(\" \")}>\r\n\t\t\t\t\t\t<h2\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tsetAdvancedExpanded(!advancedExpanded);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FinsembleIcon className=\"expand-icon\" icon=\"chevron-right\"></FinsembleIcon> Advanced settings\r\n\t\t\t\t\t\t</h2>\r\n\r\n\t\t\t\t\t\t<div className=\"app-edit-advanced-content\">\r\n\t\t\t\t\t\t\t<div className=\"app-edit-access\">\r\n\t\t\t\t\t\t\t\t<h3>Configure access</h3>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\tUse the controls below to decide which apps this app will be able to share information with. By\r\n\t\t\t\t\t\t\t\t\tdefault, your app is able to share with all other apps.\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\t<FinsembleIcon icon=\"check-square\"></FinsembleIcon>\r\n\t\t\t\t\t\t\t\t\tChoose which apps to authorize\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\t\toptions={filteredApps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\toptionComponents={getOptions()}\r\n\t\t\t\t\t\t\t\t\tselected={filteredApps\r\n\t\t\t\t\t\t\t\t\t\t.filter((app) => outboundAuthorizedApps.includes(app.name))\r\n\t\t\t\t\t\t\t\t\t\t.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\tupdateCallback={(selected) => {\r\n\t\t\t\t\t\t\t\t\t\tlet newRules = [...rules];\r\n\r\n\t\t\t\t\t\t\t\t\t\tfilteredApps.forEach((app) => {\r\n\t\t\t\t\t\t\t\t\t\t\tconst isSelected = selected.find((name) => name === app.name);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (!isSelected) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules = newRules.filter((rule) =>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\trule.authorize?.some((auth: { name: string }) => auth.name !== app.name)\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} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules.push({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tauthorize: [{ name: app.name }],\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});\r\n\r\n\t\t\t\t\t\t\t\t\t\tdoSetRules(newRules);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t\t></FinsembleSelect>\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</div>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
|
|
@@ -13,16 +13,16 @@ export declare type AppEditPageProps = {
|
|
|
13
13
|
startingWindowURL: string;
|
|
14
14
|
startingNativePath: string;
|
|
15
15
|
startingDescription: string;
|
|
16
|
-
startingWidth: number;
|
|
17
|
-
startingHeight: number;
|
|
16
|
+
startingWidth: number | string;
|
|
17
|
+
startingHeight: number | string;
|
|
18
18
|
startingRules: ApplicationRule[];
|
|
19
19
|
validateURL: (s: string) => boolean;
|
|
20
20
|
removeApplicationFn: () => void;
|
|
21
21
|
cancelFn: () => void;
|
|
22
22
|
submitFn: (data: SubmittedDataProps) => void;
|
|
23
|
+
addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
|
|
23
24
|
isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
|
|
24
25
|
isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
|
|
25
|
-
updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
|
|
26
26
|
};
|
|
27
27
|
export declare type SubmittedDataProps = {
|
|
28
28
|
name: string;
|
|
@@ -34,4 +34,4 @@ export declare type SubmittedDataProps = {
|
|
|
34
34
|
height: number;
|
|
35
35
|
rules: ApplicationRule[];
|
|
36
36
|
};
|
|
37
|
-
export declare const AppEditPage: ({ startingDisplayName, isSetupWizard, isEditMode, startingAppType, startingWindowURL, startingNativePath, startingDescription, startingWidth, startingHeight, startingRules, validateURL, removeApplicationFn, cancelFn, submitFn, isInboundInteropAuthorized, isOutboundInteropAuthorized,
|
|
37
|
+
export declare const AppEditPage: ({ startingDisplayName, isSetupWizard, isEditMode, startingAppType, startingWindowURL, startingNativePath, startingDescription, startingWidth, startingHeight, startingRules, validateURL, removeApplicationFn, cancelFn, submitFn, addApp, isInboundInteropAuthorized, isOutboundInteropAuthorized, }: AppEditPageProps) => JSX.Element;
|
|
@@ -12,7 +12,7 @@ const DEFAULT_WINDOW_WIDTH = 1280;
|
|
|
12
12
|
const DEFAULT_WINDOW_HEIGHT = 600;
|
|
13
13
|
const MINIMUM_WINDOW_WIDTH = 0;
|
|
14
14
|
const MINIMUM_WINDOW_HEIGHT = 0;
|
|
15
|
-
export const AppEditPage = ({ startingDisplayName = "", isSetupWizard = false, isEditMode = true, startingAppType = "web", startingWindowURL = "", startingNativePath = "", startingDescription = "", startingWidth = DEFAULT_WINDOW_WIDTH, startingHeight = DEFAULT_WINDOW_HEIGHT, startingRules = [], validateURL, removeApplicationFn = () => { }, cancelFn = () => { }, submitFn, isInboundInteropAuthorized, isOutboundInteropAuthorized,
|
|
15
|
+
export const AppEditPage = ({ startingDisplayName = "", isSetupWizard = false, isEditMode = true, startingAppType = "web", startingWindowURL = "", startingNativePath = "", startingDescription = "", startingWidth = DEFAULT_WINDOW_WIDTH, startingHeight = DEFAULT_WINDOW_HEIGHT, startingRules = [], validateURL, removeApplicationFn = () => { }, cancelFn = () => { }, submitFn, addApp, isInboundInteropAuthorized, isOutboundInteropAuthorized, }) => {
|
|
16
16
|
const [displayName, setDisplayName] = useState(startingDisplayName);
|
|
17
17
|
const [currentAppType, setCurrentAppType] = useState(startingAppType);
|
|
18
18
|
const [windowURL, setWindowURL] = useState(startingWindowURL);
|
|
@@ -104,7 +104,7 @@ export const AppEditPage = ({ startingDisplayName = "", isSetupWizard = false, i
|
|
|
104
104
|
setWindowHeight(parseInt(e.target.value, 10) || "");
|
|
105
105
|
} }),
|
|
106
106
|
React.createElement("span", { className: "unit" }, "px")))),
|
|
107
|
-
React.createElement(AppEditAccess, { appName: displayName, rules: startingRules, onChange: (newRules) => setRules(newRules), isInboundInteropAuthorized: isInboundInteropAuthorized, isOutboundInteropAuthorized: isOutboundInteropAuthorized,
|
|
107
|
+
React.createElement(AppEditAccess, { appName: displayName, rules: startingRules, onChange: (newRules) => setRules(newRules), isInboundInteropAuthorized: isInboundInteropAuthorized, isOutboundInteropAuthorized: isOutboundInteropAuthorized, addApp: addApp }),
|
|
108
108
|
React.createElement("div", { className: "app-edit-actions" },
|
|
109
109
|
React.createElement("div", null, isEditMode && (React.createElement(Button, { fashion: "danger", text: "Remove app", onClick: (e) => {
|
|
110
110
|
removeApplicationFn();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppEditPage.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AppEditPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAe,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAiChC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,KAAK,EACrB,UAAU,GAAG,IAAI,EACjB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,EAAE,EACtB,kBAAkB,GAAG,EAAE,EACvB,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,oBAAoB,EACpC,cAAc,GAAG,qBAAqB,EACtC,aAAa,GAAG,EAAE,EAClB,WAAW,EACX,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC,EAC9B,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB,QAAQ,EACR,0BAA0B,EAC1B,2BAA2B,EAC3B,SAAS,GACS,EAAE,EAAE;IACtB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,mBAAmB,CAAC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,CAAC,GACA;oBACF,8BAAM,SAAS,EAAC,MAAM,SAAU,CAC3B,CACI,CACN;QAEN,oBAAC,aAAa,IACb,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,2BAA2B,EAAE,2BAA2B,EACxD,SAAS,EAAE,SAAS,GACJ;QAEjB,6BAAK,SAAS,EAAC,kBAAkB;YAChC,iCACE,UAAU,IAAI,CACd,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,mBAAmB,EAAE,CAAC;oBACtB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACpB,CAAC,GACA,CACF,CACI;YAEN,6BAAK,SAAS,EAAC,2BAA2B;gBACzC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,GAAI;gBAC3D,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CACpF,CACD,CACJ,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, { ChangeEvent, useState } from \"react\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport \"../common/css/application-edit-page.css\";\r\nimport { AppEditAccess } from \"./AppEditAccess\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nconst DEFAULT_WINDOW_WIDTH = 1280;\r\nconst DEFAULT_WINDOW_HEIGHT = 600;\r\nconst MINIMUM_WINDOW_WIDTH = 0;\r\nconst MINIMUM_WINDOW_HEIGHT = 0;\r\n\r\nexport type AppEditPageProps = {\r\n\tstartingDisplayName: string;\r\n\tisSetupWizard: boolean;\r\n\tisEditMode: boolean;\r\n\tstartingAppType: string;\r\n\tstartingWindowURL: string;\r\n\tstartingNativePath: string;\r\n\tstartingDescription: string;\r\n\tstartingWidth: number;\r\n\tstartingHeight: number;\r\n\tstartingRules: ApplicationRule[];\r\n\tvalidateURL: (s: string) => boolean;\r\n\tremoveApplicationFn: () => void;\r\n\tcancelFn: () => void;\r\n\tsubmitFn: (data: SubmittedDataProps) => void;\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 type SubmittedDataProps = {\r\n\tname: string;\r\n\turl: string;\r\n\tpath: string;\r\n\tappType: string;\r\n\tdescription: string;\r\n\twidth: number;\r\n\theight: number;\r\n\trules: ApplicationRule[];\r\n};\r\n\r\nexport const AppEditPage = ({\r\n\tstartingDisplayName = \"\",\r\n\tisSetupWizard = false,\r\n\tisEditMode = true,\r\n\tstartingAppType = \"web\",\r\n\tstartingWindowURL = \"\",\r\n\tstartingNativePath = \"\",\r\n\tstartingDescription = \"\",\r\n\tstartingWidth = DEFAULT_WINDOW_WIDTH,\r\n\tstartingHeight = DEFAULT_WINDOW_HEIGHT,\r\n\tstartingRules = [],\r\n\tvalidateURL,\r\n\tremoveApplicationFn = () => {},\r\n\tcancelFn = () => {},\r\n\tsubmitFn,\r\n\tisInboundInteropAuthorized,\r\n\tisOutboundInteropAuthorized,\r\n\tupdateApp,\r\n}: AppEditPageProps) => {\r\n\tconst [displayName, setDisplayName] = useState(startingDisplayName);\r\n\tconst [currentAppType, setCurrentAppType] = useState(startingAppType);\r\n\tconst [windowURL, setWindowURL] = useState(startingWindowURL);\r\n\tconst [nativePath, setNativePath] = useState(startingNativePath);\r\n\tconst [componentDescription, setComponentDescription] = useState(startingDescription);\r\n\tconst [windowWidth, setWindowWidth] = useState<number | string>(startingWidth || DEFAULT_WINDOW_WIDTH);\r\n\tconst [windowHeight, setWindowHeight] = useState<number | string>(startingHeight || DEFAULT_WINDOW_HEIGHT);\r\n\tconst [rules, setRules] = useState(startingRules || []);\r\n\r\n\tconst isWindowURLValid = validateURL(windowURL);\r\n\tconst isHeightValid = !(typeof windowHeight !== \"number\" || windowHeight < MINIMUM_WINDOW_HEIGHT);\r\n\tconst isWidthValid = !(typeof windowWidth !== \"number\" || windowWidth < MINIMUM_WINDOW_WIDTH);\r\n\r\n\tconst disableSubmit =\r\n\t\t(currentAppType === \"web\" && (!isWindowURLValid || windowURL.length === 0)) ||\r\n\t\t(currentAppType === \"native\" &&\r\n\t\t\t(!nativePath || nativePath.length === 0 || validateFilename(VALID_APP_EXTENSIONS, nativePath))) ||\r\n\t\tdisplayName === undefined ||\r\n\t\tdisplayName === \"\" ||\r\n\t\t!isWidthValid ||\r\n\t\t!isHeightValid;\r\n\r\n\tconst clickSubmit = () => {\r\n\t\t// Shouldn't be possible to get in a state where windowWith/windowHeight aren't numbers,\r\n\t\t// but let's check anyway\r\n\t\tif (!(typeof windowWidth === \"number\" && typeof windowHeight === \"number\")) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsubmitFn({\r\n\t\t\tname: displayName,\r\n\t\t\turl: windowURL,\r\n\t\t\tpath: nativePath,\r\n\t\t\tappType: currentAppType,\r\n\t\t\twidth: windowWidth,\r\n\t\t\theight: windowHeight,\r\n\t\t\tdescription: componentDescription,\r\n\t\t\trules,\r\n\t\t});\r\n\t};\r\n\r\n\t// TODO: This isn't ideal, but when we try to use the form/type=submit interaction, it acts like we pressed the back button, rather than the submit button\r\n\tconst submitOnEnter = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\tif (e.key !== \"Enter\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\t\tif (!disableSubmit) {\r\n\t\t\tclickSubmit();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-name\">Name</label>\r\n\t\t\t\t<input\r\n\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\tid=\"app-name\"\r\n\t\t\t\t\tvalue={displayName}\r\n\t\t\t\t\tplaceholder=\"Untitled Application\"\r\n\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetDisplayName(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\r\n\t\t\t{isSetupWizard !== true && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<label>App type</label>\r\n\r\n\t\t\t\t\t<div className=\"app-edit-type-field\">\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-web\"\r\n\t\t\t\t\t\t\t\tvalue=\"web\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"web\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-web\">Web</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-native\"\r\n\t\t\t\t\t\t\t\tvalue=\"native\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"native\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-native\">Native</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label htmlFor=\"app-url\">Web URL</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\tvalue={windowURL}\r\n\t\t\t\t\t\t\taria-invalid={!isWindowURLValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowURL(e.target.value);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</>\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label>File Path</label>\r\n\t\t\t\t\t\t<div className=\"app-file-input\">\r\n\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\tvalue={nativePath}\r\n\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\tsetNativePath(value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field description\">\r\n\t\t\t\t<label htmlFor=\"app-description\">Description</label>\r\n\t\t\t\t<textarea\r\n\t\t\t\t\tid=\"app-description\"\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetComponentDescription(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tvalue={componentDescription}\r\n\t\t\t\t></textarea>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-size\">Default window size</label>\r\n\t\t\t\t<fieldset className=\"app-size-fieldset\">\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-width\">Width</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-width\"\r\n\t\t\t\t\t\t\tvalue={windowWidth}\r\n\t\t\t\t\t\t\taria-invalid={!isWidthValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowWidth(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-height\">Height</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-height\"\r\n\t\t\t\t\t\t\tvalue={windowHeight}\r\n\t\t\t\t\t\t\taria-invalid={!isHeightValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowHeight(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</fieldset>\r\n\t\t\t</div>\r\n\r\n\t\t\t<AppEditAccess\r\n\t\t\t\tappName={displayName}\r\n\t\t\t\trules={startingRules}\r\n\t\t\t\tonChange={(newRules) => setRules(newRules)}\r\n\t\t\t\tisInboundInteropAuthorized={isInboundInteropAuthorized}\r\n\t\t\t\tisOutboundInteropAuthorized={isOutboundInteropAuthorized}\r\n\t\t\t\tupdateApp={updateApp}\r\n\t\t\t></AppEditAccess>\r\n\r\n\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t<div>\r\n\t\t\t\t\t{isEditMode && (\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\tfashion=\"danger\"\r\n\t\t\t\t\t\t\ttext=\"Remove app\"\r\n\t\t\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\t\t\tremoveApplicationFn();\r\n\t\t\t\t\t\t\t\te.preventDefault();\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</div>\r\n\r\n\t\t\t\t<div className=\"app-actions-right-wrapper\">\r\n\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={cancelFn} />\r\n\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={disableSubmit} onClick={clickSubmit} />\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r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AC,aAAa,IACb,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,2BAA2B,EAAE,2BAA2B,EACxD,MAAM,EAAE,MAAM,GACE;QAEjB,6BAAK,SAAS,EAAC,kBAAkB;YAChC,iCACE,UAAU,IAAI,CACd,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,mBAAmB,EAAE,CAAC;oBACtB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACpB,CAAC,GACA,CACF,CACI;YAEN,6BAAK,SAAS,EAAC,2BAA2B;gBACzC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,GAAI;gBAC3D,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CACpF,CACD,CACJ,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, { ChangeEvent, useState } from \"react\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport \"../common/css/application-edit-page.css\";\r\nimport { AppEditAccess } from \"./AppEditAccess\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nconst DEFAULT_WINDOW_WIDTH = 1280;\r\nconst DEFAULT_WINDOW_HEIGHT = 600;\r\nconst MINIMUM_WINDOW_WIDTH = 0;\r\nconst MINIMUM_WINDOW_HEIGHT = 0;\r\n\r\nexport type AppEditPageProps = {\r\n\tstartingDisplayName: string;\r\n\tisSetupWizard: boolean;\r\n\tisEditMode: boolean;\r\n\tstartingAppType: string;\r\n\tstartingWindowURL: string;\r\n\tstartingNativePath: string;\r\n\tstartingDescription: string;\r\n\tstartingWidth: number | string;\r\n\tstartingHeight: number | string;\r\n\tstartingRules: ApplicationRule[];\r\n\tvalidateURL: (s: string) => boolean;\r\n\tremoveApplicationFn: () => void;\r\n\tcancelFn: () => void;\r\n\tsubmitFn: (data: SubmittedDataProps) => void;\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 type SubmittedDataProps = {\r\n\tname: string;\r\n\turl: string;\r\n\tpath: string;\r\n\tappType: string;\r\n\tdescription: string;\r\n\twidth: number;\r\n\theight: number;\r\n\trules: ApplicationRule[];\r\n};\r\n\r\nexport const AppEditPage = ({\r\n\tstartingDisplayName = \"\",\r\n\tisSetupWizard = false,\r\n\tisEditMode = true,\r\n\tstartingAppType = \"web\",\r\n\tstartingWindowURL = \"\",\r\n\tstartingNativePath = \"\",\r\n\tstartingDescription = \"\",\r\n\tstartingWidth = DEFAULT_WINDOW_WIDTH,\r\n\tstartingHeight = DEFAULT_WINDOW_HEIGHT,\r\n\tstartingRules = [],\r\n\tvalidateURL,\r\n\tremoveApplicationFn = () => {},\r\n\tcancelFn = () => {},\r\n\tsubmitFn,\r\n\taddApp,\r\n\tisInboundInteropAuthorized,\r\n\tisOutboundInteropAuthorized,\r\n}: AppEditPageProps) => {\r\n\tconst [displayName, setDisplayName] = useState(startingDisplayName);\r\n\tconst [currentAppType, setCurrentAppType] = useState(startingAppType);\r\n\tconst [windowURL, setWindowURL] = useState(startingWindowURL);\r\n\tconst [nativePath, setNativePath] = useState(startingNativePath);\r\n\tconst [componentDescription, setComponentDescription] = useState(startingDescription);\r\n\tconst [windowWidth, setWindowWidth] = useState<number | string>(startingWidth || DEFAULT_WINDOW_WIDTH);\r\n\tconst [windowHeight, setWindowHeight] = useState<number | string>(startingHeight || DEFAULT_WINDOW_HEIGHT);\r\n\tconst [rules, setRules] = useState(startingRules || []);\r\n\r\n\tconst isWindowURLValid = validateURL(windowURL);\r\n\tconst isHeightValid = !(typeof windowHeight !== \"number\" || windowHeight < MINIMUM_WINDOW_HEIGHT);\r\n\tconst isWidthValid = !(typeof windowWidth !== \"number\" || windowWidth < MINIMUM_WINDOW_WIDTH);\r\n\r\n\tconst disableSubmit =\r\n\t\t(currentAppType === \"web\" && (!isWindowURLValid || windowURL.length === 0)) ||\r\n\t\t(currentAppType === \"native\" &&\r\n\t\t\t(!nativePath || nativePath.length === 0 || validateFilename(VALID_APP_EXTENSIONS, nativePath))) ||\r\n\t\tdisplayName === undefined ||\r\n\t\tdisplayName === \"\" ||\r\n\t\t!isWidthValid ||\r\n\t\t!isHeightValid;\r\n\r\n\tconst clickSubmit = () => {\r\n\t\t// Shouldn't be possible to get in a state where windowWith/windowHeight aren't numbers,\r\n\t\t// but let's check anyway\r\n\t\tif (!(typeof windowWidth === \"number\" && typeof windowHeight === \"number\")) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsubmitFn({\r\n\t\t\tname: displayName,\r\n\t\t\turl: windowURL,\r\n\t\t\tpath: nativePath,\r\n\t\t\tappType: currentAppType,\r\n\t\t\twidth: windowWidth,\r\n\t\t\theight: windowHeight,\r\n\t\t\tdescription: componentDescription,\r\n\t\t\trules,\r\n\t\t});\r\n\t};\r\n\r\n\t// When we try to use the form/type=submit interaction, it acts like we pressed the back button, rather than the submit button\r\n\tconst submitOnEnter = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\tif (e.key !== \"Enter\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\t\tif (!disableSubmit) {\r\n\t\t\tclickSubmit();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-name\">Name</label>\r\n\t\t\t\t<input\r\n\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\tid=\"app-name\"\r\n\t\t\t\t\tvalue={displayName}\r\n\t\t\t\t\tplaceholder=\"Untitled Application\"\r\n\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetDisplayName(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\r\n\t\t\t{isSetupWizard !== true && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<label>App type</label>\r\n\r\n\t\t\t\t\t<div className=\"app-edit-type-field\">\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-web\"\r\n\t\t\t\t\t\t\t\tvalue=\"web\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"web\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-web\">Web</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-native\"\r\n\t\t\t\t\t\t\t\tvalue=\"native\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"native\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-native\">Native</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label htmlFor=\"app-url\">Web URL</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\tvalue={windowURL}\r\n\t\t\t\t\t\t\taria-invalid={!isWindowURLValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowURL(e.target.value);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</>\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label>File Path</label>\r\n\t\t\t\t\t\t<div className=\"app-file-input\">\r\n\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\tvalue={nativePath}\r\n\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\tsetNativePath(value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field description\">\r\n\t\t\t\t<label htmlFor=\"app-description\">Description</label>\r\n\t\t\t\t<textarea\r\n\t\t\t\t\tid=\"app-description\"\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetComponentDescription(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tvalue={componentDescription}\r\n\t\t\t\t></textarea>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-size\">Default window size</label>\r\n\t\t\t\t<fieldset className=\"app-size-fieldset\">\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-width\">Width</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-width\"\r\n\t\t\t\t\t\t\tvalue={windowWidth}\r\n\t\t\t\t\t\t\taria-invalid={!isWidthValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowWidth(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-height\">Height</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-height\"\r\n\t\t\t\t\t\t\tvalue={windowHeight}\r\n\t\t\t\t\t\t\taria-invalid={!isHeightValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowHeight(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</fieldset>\r\n\t\t\t</div>\r\n\r\n\t\t\t<AppEditAccess\r\n\t\t\t\tappName={displayName}\r\n\t\t\t\trules={startingRules}\r\n\t\t\t\tonChange={(newRules) => setRules(newRules)}\r\n\t\t\t\tisInboundInteropAuthorized={isInboundInteropAuthorized}\r\n\t\t\t\tisOutboundInteropAuthorized={isOutboundInteropAuthorized}\r\n\t\t\t\taddApp={addApp}\r\n\t\t\t></AppEditAccess>\r\n\r\n\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t<div>\r\n\t\t\t\t\t{isEditMode && (\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\tfashion=\"danger\"\r\n\t\t\t\t\t\t\ttext=\"Remove app\"\r\n\t\t\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\t\t\tremoveApplicationFn();\r\n\t\t\t\t\t\t\t\te.preventDefault();\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</div>\r\n\r\n\t\t\t\t<div className=\"app-actions-right-wrapper\">\r\n\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={cancelFn} />\r\n\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={disableSubmit} onClick={clickSubmit} />\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
|
|
@@ -19,8 +19,9 @@ export const Appearance = ({ startTheme, darkTheme, lightTheme, updateThemes, ar
|
|
|
19
19
|
areYouSure(() => setTheme(clone(lightTheme)));
|
|
20
20
|
};
|
|
21
21
|
useLayoutEffect(() => {
|
|
22
|
+
var _a;
|
|
22
23
|
if (ref.current !== null) {
|
|
23
|
-
ref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()
|
|
24
|
+
ref.current.style.height = `${window.innerHeight - (((_a = ref.current.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.top) || 0) - 10}px`;
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
return (React.createElement(View, null,
|
|
@@ -39,10 +40,7 @@ export const Appearance = ({ startTheme, darkTheme, lightTheme, updateThemes, ar
|
|
|
39
40
|
React.createElement(Button, { fashion: "primary", iconBefore: "moon", text: "Dark theme", onClick: applyDarkTheme }),
|
|
40
41
|
React.createElement(Button, { fashion: "primary", iconBefore: "sun", text: "Light theme", onClick: applyLightTheme })),
|
|
41
42
|
React.createElement(ThemePage, { theme: theme, updateThemes: (id, newValue) => {
|
|
42
|
-
setTheme({
|
|
43
|
-
...theme,
|
|
44
|
-
[id]: newValue,
|
|
45
|
-
});
|
|
43
|
+
setTheme(Object.assign(Object.assign({}, theme), { [id]: newValue }));
|
|
46
44
|
updateThemes(id, newValue);
|
|
47
45
|
} })),
|
|
48
46
|
React.createElement("div", { "data-label": "Images" },
|