@finsemble/finsemble-ui 6.1.4 → 6.3.0-beta.20211008
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 +26 -22
- package/react/actions/smartDesktopDesignerActions.d.ts +7 -7
- 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/defaultTheme.css +1 -1
- package/react/assets/css/notificationsCenter.css +5 -2
- package/react/assets/css/userPreferences.css +5 -2
- package/react/assets/css/windowTitleBar.css +34 -1
- package/react/assets/icons/check-square.svg +6 -0
- package/react/assets/icons/lock.svg +6 -0
- package/react/components/FinsembleProvider.js +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- 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 -4
- package/react/components/appCatalog/components/Toast.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 +20 -18
- 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.map +1 -1
- package/react/components/common/Button.d.ts +5 -4
- package/react/components/common/Button.js +2 -2
- 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/ButtonRow.d.ts +15 -0
- package/react/components/common/ButtonRow.js +32 -0
- package/react/components/common/ButtonRow.js.map +1 -0
- package/react/components/common/Checkbox.d.ts +8 -0
- package/react/components/common/Checkbox.js +22 -0
- package/react/components/common/Checkbox.js.map +1 -0
- 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 +4 -0
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.d.ts +3 -2
- package/react/components/common/FinsembleSelect.js +3 -6
- 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/Tooltip.d.ts +4 -3
- package/react/components/common/Tooltip.js +3 -3
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/tooltip.css +10 -0
- 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 +20 -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.d.ts +14 -0
- package/react/components/common/stories/ButtonRow.stories.js +39 -0
- package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
- 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.d.ts +13 -0
- package/react/components/common/stories/Checkbox.stories.js +29 -0
- package/react/components/common/stories/Checkbox.stories.js.map +1 -0
- 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/DropdownButton.stories.d.ts +22 -0
- package/react/components/common/stories/DropdownButton.stories.js +29 -0
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
- package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.d.ts +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/stories/Tooltip.stories.d.ts +1 -1
- package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
- package/react/components/common/tests/ButtonRow.spec.js +25 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
- package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
- package/react/components/common/tests/Checkbox.spec.js +33 -0
- package/react/components/common/tests/Checkbox.spec.js.map +1 -0
- 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.css +1 -0
- package/react/components/fdc3Resolver/ResolverDialog.js +15 -16
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js +6 -13
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js +46 -46
- 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/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 +18 -17
- 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 +6 -3
- 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/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 +2 -4
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +3 -6
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +55 -69
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +14 -15
- 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 +1 -1
- 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 +10 -10
- 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 +5 -8
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.d.ts +13 -0
- 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 +17 -10
- 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 +19 -10
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
- 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 +25 -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 +3 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +25 -5
- package/react/components/processMonitor/helpers.js +28 -20
- 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 +30 -15
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
- 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 +13 -14
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/search/Highlight.js +13 -3
- 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 +2 -1
- 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.d.ts +1 -0
- package/react/components/shared/DefaultDropdownButton.js +14 -4
- 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.d.ts +1 -0
- package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
- package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
- package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
- package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
- 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 +15 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js +138 -0
- package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
- package/react/components/smartDesktopDesigner/AppEditPage.d.ts +9 -3
- package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
- 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 -4
- package/react/components/smartDesktopDesigner/Application.js +85 -83
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
- 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 +33 -20
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +7 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.d.ts +2 -1
- 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 +11 -24
- 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 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
- 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 +6 -14
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/applications.css +38 -0
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +20 -2
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +10 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -3
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +5 -2
- package/react/components/smartDesktopDesigner/fixtures/apps.js +15 -15
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- 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/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 +22 -2
- 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 +3 -2
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
- 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 +33 -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.d.ts +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js +118 -41
- 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 +2 -1
- 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 +24 -3
- 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 +5 -4
- 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 -2
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
- package/react/components/toolbar/advancedAppLauncher/components/Content.js +22 -29
- 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 +7 -3
- 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.d.ts +5 -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.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.js +5 -4
- 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 +3 -10
- 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 +24 -21
- 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 +37 -55
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +24 -13
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
- 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 +65 -11
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- 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/UserPreferences.js +8 -23
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
- package/react/components/userPreferences/UserPreferencesBase.js +5 -6
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
- package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
- package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
- package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
- package/react/components/userPreferences/components/ContentSection.js +6 -3
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
- package/react/components/userPreferences/components/LeftNav.js +12 -11
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
- package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
- package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
- package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
- package/react/components/userPreferences/components/content/General.d.ts +10 -3
- package/react/components/userPreferences/components/content/General.js +2 -2
- package/react/components/userPreferences/components/content/General.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.js +51 -113
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +56 -61
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +17 -15
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +15 -16
- 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.d.ts +24 -7
- package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -23
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +8 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +9 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +11 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +89 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +21 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
- package/react/components/userPreferences/index.d.ts +1 -1
- package/react/components/userPreferences/index.js +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -13
- package/react/components/userPreferences/stores/UserPreferencesStore.js +13 -25
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
- package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
- package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
- package/react/components/userPreferences/stories/General.stories.js +16 -0
- package/react/components/userPreferences/stories/General.stories.js.map +1 -0
- package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
- package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
- package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
- package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
- package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
- package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
- package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
- package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
- package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
- package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
- package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +11 -0
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js +20 -0
- package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
- package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
- package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
- package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
- package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
- package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
- package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
- package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
- package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
- package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
- package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
- package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
- package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
- package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/General.spec.js +28 -0
- package/react/components/userPreferences/tests/General.spec.js.map +1 -0
- package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
- package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
- package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
- package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
- package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
- package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
- package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
- package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
- package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js +38 -0
- package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
- package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
- package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
- package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
- package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
- 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 +27 -7
- package/react/components/windowTitleBar/components/center/Tab.js +2 -2
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
- package/react/components/windowTitleBar/components/center/TabList.js +111 -37
- 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/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 +1 -21
- 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.js +11 -6
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
- 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.map +1 -1
- package/react/hooks/useLinker.js +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.d.ts +10 -6
- package/react/hooks/useNotifications.js +53 -47
- package/react/hooks/useNotifications.js.map +1 -1
- 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 +71 -48
- 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/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/types/advancedAppLauncherTypes.d.ts +28 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.d.ts +1 -1
- package/react/types/dashbarTypes.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 +28 -20
- package/react/types/fdc3.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +13 -8
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/windowTitleBar.d.ts +46 -0
- package/react/types/windowTitleBar.js +2 -0
- package/react/types/windowTitleBar.js.map +1 -0
- 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/shared/addProtocolToValidURL.spec.js.map +0 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
- package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
- package/react/components/userPreferences/components/Checkbox.js +0 -27
- package/react/components/userPreferences/components/Checkbox.js.map +0 -1
|
@@ -8,22 +8,88 @@ let TAB_WIDTH = 300;
|
|
|
8
8
|
const ICON_AREA = 16;
|
|
9
9
|
const CLOSE_BUTTON_MARGIN = 12;
|
|
10
10
|
const MINIMUM_TAB_SIZE = 100;
|
|
11
|
+
function EditTab(props) {
|
|
12
|
+
const [editingTitle, setEditingTitle] = React.useState(false);
|
|
13
|
+
const [clickTimeout, setClickTimeout] = React.useState(undefined);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
FSBL.Clients.WindowClient.getComponentState({ field: "persistedTitle" }, (err, title) => {
|
|
16
|
+
if (title)
|
|
17
|
+
document.title = title;
|
|
18
|
+
});
|
|
19
|
+
}, []);
|
|
20
|
+
const inputEl = React.useRef(null);
|
|
21
|
+
const updateTabTitle = (e) => {
|
|
22
|
+
const title = e.target.value;
|
|
23
|
+
FSBL.Clients.WindowClient.setComponentState({
|
|
24
|
+
field: "persistedTitle",
|
|
25
|
+
value: title,
|
|
26
|
+
});
|
|
27
|
+
document.title = title;
|
|
28
|
+
setEditingTitle(false);
|
|
29
|
+
};
|
|
30
|
+
const beginEditing = async () => {
|
|
31
|
+
var _a;
|
|
32
|
+
await setEditingTitle(true);
|
|
33
|
+
await ((_a = inputEl === null || inputEl === void 0 ? void 0 : inputEl.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
34
|
+
if (inputEl === null || inputEl === void 0 ? void 0 : inputEl.current) {
|
|
35
|
+
inputEl.current.value = document.title;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const clickHandler = () => {
|
|
39
|
+
if (clickTimeout !== null) {
|
|
40
|
+
beginEditing();
|
|
41
|
+
}
|
|
42
|
+
else if (!editingTitle) {
|
|
43
|
+
let timeout = setTimeout(() => {
|
|
44
|
+
clearTimeout(clickTimeout);
|
|
45
|
+
setClickTimeout(undefined);
|
|
46
|
+
}, 500);
|
|
47
|
+
setClickTimeout(timeout);
|
|
48
|
+
if (props.tab && props.setActiveTab)
|
|
49
|
+
props.setActiveTab(props.tab);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const blurHandler = (e) => {
|
|
53
|
+
updateTabTitle(e);
|
|
54
|
+
setEditingTitle(false);
|
|
55
|
+
};
|
|
56
|
+
const keyDownHandler = (e) => {
|
|
57
|
+
e.key === "Enter" && updateTabTitle(e);
|
|
58
|
+
};
|
|
59
|
+
return (React.createElement("div", { id: "tab-editor", onClick: clickHandler }, editingTitle ? (React.createElement("div", { className: "fsbl-tab fsbl-active-tab", style: { width: props.tabWidth || "auto" } },
|
|
60
|
+
React.createElement("input", { ref: inputEl, onBlur: blurHandler, onKeyDown: keyDownHandler, type: "text", className: "tab__input", maxLength: 32 }))) : (props.children)));
|
|
61
|
+
}
|
|
11
62
|
export class TabList extends React.Component {
|
|
12
63
|
constructor(props) {
|
|
13
64
|
super(props);
|
|
14
65
|
let initialState = Store.getValues(["activeTab", "tabs"]);
|
|
15
66
|
let activeIdentifier = finsembleWindow.identifier;
|
|
16
|
-
activeIdentifier
|
|
67
|
+
if (activeIdentifier) {
|
|
68
|
+
activeIdentifier.title = finsembleWindow.windowOptions.title;
|
|
69
|
+
}
|
|
17
70
|
this.state = {
|
|
18
71
|
translateX: 0,
|
|
19
72
|
tabs: initialState.tabs,
|
|
20
73
|
activeTab: activeIdentifier,
|
|
21
|
-
boundingBox: {
|
|
74
|
+
boundingBox: {
|
|
75
|
+
right: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
top: 0,
|
|
78
|
+
bottom: 0,
|
|
79
|
+
height: 0,
|
|
80
|
+
width: 0,
|
|
81
|
+
},
|
|
22
82
|
iAmDragging: false,
|
|
23
|
-
hoverState: false,
|
|
83
|
+
hoverState: "false",
|
|
24
84
|
tabWidth: TAB_WIDTH,
|
|
85
|
+
hoveredTabIndex: 0,
|
|
25
86
|
};
|
|
87
|
+
this.onWindowResizeThrottled = () => { };
|
|
26
88
|
this.bindCorrectContext();
|
|
89
|
+
this.mousePositionOnDragEnd = {
|
|
90
|
+
x: 0,
|
|
91
|
+
y: 0,
|
|
92
|
+
};
|
|
27
93
|
}
|
|
28
94
|
bindCorrectContext() {
|
|
29
95
|
this.startDrag = this.startDrag.bind(this);
|
|
@@ -33,8 +99,8 @@ export class TabList extends React.Component {
|
|
|
33
99
|
this.dragOver = this.dragOver.bind(this);
|
|
34
100
|
this.dragLeave = this.dragLeave.bind(this);
|
|
35
101
|
this.onMouseWheel = this.onMouseWheel.bind(this);
|
|
36
|
-
renderTitle = renderTitle.bind(this);
|
|
37
|
-
renderTabs = renderTabs.bind(this);
|
|
102
|
+
this.renderTitle = this.renderTitle.bind(this);
|
|
103
|
+
this.renderTabs = this.renderTabs.bind(this);
|
|
38
104
|
this.findTabIndex = this.findTabIndex.bind(this);
|
|
39
105
|
this.setActiveTab = this.setActiveTab.bind(this);
|
|
40
106
|
this.onTabAdded = this.onTabAdded.bind(this);
|
|
@@ -98,6 +164,8 @@ export class TabList extends React.Component {
|
|
|
98
164
|
bottom: boundingBox.bottom + bounds.top,
|
|
99
165
|
left: boundingBox.left + bounds.left,
|
|
100
166
|
right: boundingBox.right + bounds.left,
|
|
167
|
+
width: 0,
|
|
168
|
+
height: 0,
|
|
101
169
|
};
|
|
102
170
|
if (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {
|
|
103
171
|
setTimeout(() => {
|
|
@@ -111,9 +179,8 @@ export class TabList extends React.Component {
|
|
|
111
179
|
this.onWindowResize();
|
|
112
180
|
}
|
|
113
181
|
else {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, 50);
|
|
182
|
+
const setTimeoutCb = FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => { });
|
|
183
|
+
setTimeout(() => setTimeoutCb, 50);
|
|
117
184
|
}
|
|
118
185
|
});
|
|
119
186
|
}
|
|
@@ -137,14 +204,17 @@ export class TabList extends React.Component {
|
|
|
137
204
|
}
|
|
138
205
|
}
|
|
139
206
|
drop(e) {
|
|
140
|
-
|
|
141
|
-
e
|
|
207
|
+
let identifier;
|
|
208
|
+
if (e) {
|
|
209
|
+
e.preventDefault();
|
|
210
|
+
e.stopPropagation();
|
|
211
|
+
identifier = this.extractWindowIdentifier(e);
|
|
212
|
+
}
|
|
142
213
|
FSBL.Clients.Logger.system.debug("Tab drag drop.");
|
|
143
|
-
let identifier = this.extractWindowIdentifier(e);
|
|
144
214
|
if (!identifier)
|
|
145
215
|
return;
|
|
146
216
|
if (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)
|
|
147
|
-
return FSBL.Clients.WindowClient.cancelTilingOrTabbing();
|
|
217
|
+
return FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => { });
|
|
148
218
|
FSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: "tabbing" }, () => {
|
|
149
219
|
FSBL.Clients.RouterClient.transmit("tabbingDragEnd", { success: true });
|
|
150
220
|
if (identifier && identifier.windowName) {
|
|
@@ -295,11 +365,15 @@ export class TabList extends React.Component {
|
|
|
295
365
|
newIndex = undefined;
|
|
296
366
|
}
|
|
297
367
|
let myIdentifier = finsembleWindow.identifier;
|
|
298
|
-
myIdentifier
|
|
368
|
+
if (myIdentifier) {
|
|
369
|
+
myIdentifier.title = finsembleWindow.windowOptions.title;
|
|
370
|
+
}
|
|
299
371
|
if (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {
|
|
300
372
|
return;
|
|
301
373
|
}
|
|
302
|
-
|
|
374
|
+
if (typeof newIndex === "number") {
|
|
375
|
+
Actions.reorderTab(identifier, newIndex);
|
|
376
|
+
}
|
|
303
377
|
this.setState({
|
|
304
378
|
hoveredTabIndex: undefined,
|
|
305
379
|
});
|
|
@@ -369,29 +443,29 @@ export class TabList extends React.Component {
|
|
|
369
443
|
}
|
|
370
444
|
return (React.createElement("div", { ref: "Me", onDragLeave: this.dragLeave, className: this.props.className, onWheel: this.onMouseWheel, onScroll: this.onMouseWheel, onDrop: this.drop, onDragOver: this.dragOver },
|
|
371
445
|
React.createElement("div", { className: "tab-region-wrapper" },
|
|
372
|
-
componentToRender === "title" && renderTitle(),
|
|
373
|
-
componentToRender === "tabs" && renderTabs())));
|
|
446
|
+
componentToRender === "title" && this.renderTitle(),
|
|
447
|
+
componentToRender === "tabs" && this.renderTabs())));
|
|
448
|
+
}
|
|
449
|
+
renderTitle() {
|
|
450
|
+
return (React.createElement(EditTab, null,
|
|
451
|
+
React.createElement("div", { draggable: "true", onDragStart: (e) => {
|
|
452
|
+
FSBL.Clients.Logger.system.debug("Tab drag start - TITLE");
|
|
453
|
+
let activeIdentifier = finsembleWindow.identifier;
|
|
454
|
+
activeIdentifier.title = finsembleWindow.windowOptions.title;
|
|
455
|
+
this.startDrag(e, activeIdentifier);
|
|
456
|
+
}, onDragEnd: this.stopDrag, "data-hover": this.state.hoverState, className: "fsbl-header-title" },
|
|
457
|
+
React.createElement(FinsembleHoverDetector, { edge: "top", hoverAction: this.hoverAction.bind(this) }),
|
|
458
|
+
React.createElement(Title, { onUpdate: this.props.onTitleUpdated, windowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier() }))));
|
|
459
|
+
}
|
|
460
|
+
renderTabs() {
|
|
461
|
+
let titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;
|
|
462
|
+
return this.state.tabs.map((tab) => (React.createElement(EditTab, { tabWidth: this.state.tabWidth, key: tab.windowName, tab: tab, setActiveTab: this.setActiveTab },
|
|
463
|
+
React.createElement(Tab, { draggable: "true", key: tab.windowName, className: this.getTabClasses(tab), onDragStart: (e, identifier) => {
|
|
464
|
+
FSBL.Clients.Logger.system.debug("Tab drag - TAB", identifier.windowName);
|
|
465
|
+
this.startDrag(e, identifier);
|
|
466
|
+
}, onDrop: this.drop, onDragEnd: this.stopDrag, onTabClose: () => {
|
|
467
|
+
this.onTabClosed(tab);
|
|
468
|
+
}, onTabDraggedOver: this.onTabDraggedOver, listenForDragOver: this.props.listenForDragOver, tabWidth: this.state.tabWidth, titleWidth: titleWidth, windowIdentifier: tab }))));
|
|
374
469
|
}
|
|
375
470
|
}
|
|
376
|
-
function renderTitle() {
|
|
377
|
-
return (React.createElement("div", { draggable: "true", onDragStart: (e) => {
|
|
378
|
-
FSBL.Clients.Logger.system.debug("Tab drag start - TITLE");
|
|
379
|
-
let activeIdentifier = finsembleWindow.identifier;
|
|
380
|
-
activeIdentifier.title = finsembleWindow.windowOptions.title;
|
|
381
|
-
this.startDrag(e, activeIdentifier);
|
|
382
|
-
}, onDragEnd: this.stopDrag, "data-hover": this.state.hoverState, className: "fsbl-header-title" },
|
|
383
|
-
React.createElement(FinsembleHoverDetector, { edge: "top", hoverAction: this.hoverAction.bind(this) }),
|
|
384
|
-
React.createElement(Title, { onUpdate: this.props.onTitleUpdated, windowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier() })));
|
|
385
|
-
}
|
|
386
|
-
function renderTabs() {
|
|
387
|
-
let titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;
|
|
388
|
-
return this.state.tabs.map((tab) => (React.createElement(Tab, { onClick: () => {
|
|
389
|
-
this.setActiveTab(tab);
|
|
390
|
-
}, draggable: "true", key: tab.windowName, className: this.getTabClasses(tab), onDragStart: (e, identifier) => {
|
|
391
|
-
FSBL.Clients.Logger.system.debug("Tab drag - TAB", identifier.windowName);
|
|
392
|
-
this.startDrag(e, identifier);
|
|
393
|
-
}, onDrop: this.drop, onDragEnd: this.stopDrag, onTabClose: () => {
|
|
394
|
-
this.onTabClosed(tab);
|
|
395
|
-
}, onTabDraggedOver: this.onTabDraggedOver, listenForDragOver: this.props.listenForDragOver, tabWidth: this.state.tabWidth, titleWidth: titleWidth, windowIdentifier: tab })));
|
|
396
|
-
}
|
|
397
471
|
//# sourceMappingURL=TabList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabList.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAExC,IAAI,SAAS,GAAG,GAAG,CAAC;AAEpB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAS;IAC3C,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QAC1D,IAAI,gBAAgB,GAAG,eAAe,CAAC,UAAU,CAAC;QAClD,gBAAgB,CAAC,KAAK,GAAG,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,CAAC;YACb,IAAI,EAAE,YAAY,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,UAAU,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,EACD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC/C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,GAAG,GACpB,CACF,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport Tab from \"./Tab\";\r\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\r\nimport { Store, Actions } from \"../../stores/windowTitleBarStore\";\r\nimport { Title } from \"../windowTitle\";\r\nimport _throttle from \"lodash/throttle\";\r\n\r\nlet TAB_WIDTH = 300;\r\n// Next two items are for calculating how large the title should be within a tab.\r\nconst ICON_AREA = 16;\r\nconst CLOSE_BUTTON_MARGIN = 12;\r\nconst MINIMUM_TAB_SIZE = 100;\r\n\r\nexport class TabList extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tlet initialState = Store.getValues([\"activeTab\", \"tabs\"]);\r\n\t\tlet activeIdentifier = finsembleWindow.identifier;\r\n\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\tthis.state = {\r\n\t\t\ttranslateX: 0,\r\n\t\t\ttabs: initialState.tabs,\r\n\t\t\tactiveTab: activeIdentifier,\r\n\t\t\tboundingBox: {},\r\n\t\t\tiAmDragging: false,\r\n\t\t\thoverState: false,\r\n\t\t\ttabWidth: TAB_WIDTH,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t}\r\n\r\n\t/**\r\n\t * Make sure that _this_ is correct inside of our event handlers.\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.startDrag = this.startDrag.bind(this);\r\n\t\tthis.stopDrag = this.stopDrag.bind(this);\r\n\t\tthis.cancelTabbing = this.cancelTabbing.bind(this);\r\n\t\tthis.drop = this.drop.bind(this);\r\n\t\tthis.dragOver = this.dragOver.bind(this);\r\n\t\tthis.dragLeave = this.dragLeave.bind(this);\r\n\t\tthis.onMouseWheel = this.onMouseWheel.bind(this);\r\n\t\trenderTitle = renderTitle.bind(this);\r\n\t\trenderTabs = renderTabs.bind(this);\r\n\t\tthis.findTabIndex = this.findTabIndex.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onTabAdded = this.onTabAdded.bind(this);\r\n\t\tthis.onTabClosed = this.onTabClosed.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onStoreChanged = this.onStoreChanged.bind(this);\r\n\t\t// this.onActiveTabChanged = this.onActiveTabChanged.bind(this);\r\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\r\n\t\tthis.onTabDraggedOver = this.onTabDraggedOver.bind(this);\r\n\t\tthis.isTabRegionOverflowing = this.isTabRegionOverflowing.bind(this);\r\n\t\tthis.onWindowResize = this.onWindowResize.bind(this);\r\n\t\tthis.onWindowResizeThrottled = _throttle(this.onWindowResize, 100);\r\n\t\tthis.getTabWidth = this.getTabWidth.bind(this);\r\n\t\tthis.setTabListTranslateX = this.setTabListTranslateX.bind(this);\r\n\t\tthis.onTabListTranslateChanged = this.onTabListTranslateChanged.bind(this);\r\n\t}\r\n\r\n\tgetTabWidth(params = {}) {\r\n\t\tlet { boundingBox, tabList } = params;\r\n\t\tif (typeof tabList === \"undefined\") {\r\n\t\t\ttabList = this.state.tabs;\r\n\t\t}\r\n\t\tif (typeof boundingBox === \"undefined\") {\r\n\t\t\tboundingBox = this.refs.Me.getBoundingClientRect();\r\n\t\t}\r\n\t\tif (typeof boundingBox.right === \"undefined\") {\r\n\t\t\treturn TAB_WIDTH;\r\n\t\t}\r\n\t\tlet containerWidth = boundingBox.right - boundingBox.left;\r\n\t\tlet newTabWidth = containerWidth / tabList.length;\r\n\r\n\t\treturn newTabWidth < MINIMUM_TAB_SIZE ? MINIMUM_TAB_SIZE : newTabWidth;\r\n\t}\r\n\r\n\t/**\r\n\t * Resize handler. Calculates the space that the center-region is taking up. May be used to scale tabs proportionally.\r\n\t */\r\n\tonWindowResize() {\r\n\t\tlet bounds = this.refs.Me.getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: bounds,\r\n\t\t\ttabWidth: this.getTabWidth(),\r\n\t\t});\r\n\t}\r\n\r\n\tfindTabIndex(tab) {\r\n\t\treturn this.state.tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * Function that's called when this component fires the onDragStart event, this will start the tiling or tabbing process\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the startdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstartDrag(e, windowIdentifier) {\r\n\t\tthis.setState({\r\n\t\t\tiAmDragging: true,\r\n\t\t});\r\n\t\te.dataTransfer.setData(\"application/fsbl-tab-data\", JSON.stringify(windowIdentifier));\r\n\t\tFSBL.Clients.WindowClient.startTilingOrTabbing({\r\n\t\t\twindowIdentifier: windowIdentifier,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the react component detects a drop (or stop drag, which is equivalent)\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the stopdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstopDrag(e) {\r\n\t\t// We don't want onDropHandler() in windowTitleBarComponent.jsx\r\n\t\t// to handle this drop event, so we call event.stopPropagation().\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab stopDrag.\");\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: e.nativeEvent.screenX,\r\n\t\t\ty: e.nativeEvent.screenY,\r\n\t\t};\r\n\r\n\t\tconst { boundingBox } = this.state;\r\n\t\tFSBL.Clients.WindowClient.getBounds((err, bounds) => {\r\n\t\t\t// We ONLY want to know if we're in the tab region!\r\n\t\t\tconst tabRegion = {\r\n\t\t\t\ttop: boundingBox.top + bounds.top,\r\n\t\t\t\tbottom: boundingBox.bottom + bounds.top,\r\n\t\t\t\tleft: boundingBox.left + bounds.left,\r\n\t\t\t\tright: boundingBox.right + bounds.left,\r\n\t\t\t};\r\n\t\t\tif (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {\r\n\t\t\t\t// allow for a 50ms delay so this message goes after a drop message from a target window if tabbing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({\r\n\t\t\t\t\t\tmousePosition: this.mousePositionOnDragEnd,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 50);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tiAmDragging: false,\r\n\t\t\t\t});\r\n\t\t\t\tthis.onWindowResize();\r\n\t\t\t} else {\r\n\t\t\t\t// sometimes a tab gets dropped in a bad spot where no action gets taken and we get stuck in tiling mode\r\n\t\t\t\t// to make sure nothing bad happens, call cancel after a similar 50ms delay\r\n\t\t\t\t// If some action was taken, this will be ignored by Finsemble\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.cancelTilingOrTabbing();\r\n\t\t\t\t}, 50);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Helper function that will pull data from a drop event, parse it, and return it.\r\n\t * @param {event} e\r\n\t */\r\n\textractWindowIdentifier(e) {\r\n\t\ttry {\r\n\t\t\tlet identifier = JSON.parse(e.dataTransfer.getData(\"application/fsbl-tab-data\"));\r\n\t\t\t// If the \"identifier\" is formed properly, it'll have this properly. Otherwise, it's something else (e.g., share data, image, etc).\r\n\t\t\tif (typeof identifier.windowName !== \"undefined\") {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else if (identifier.waitForIdentifier) {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Malformed drop object detected in windowTitleBar. Check tab dropping code. Expected windowIdentifier, got \",\r\n\t\t\t\t\tidentifier\r\n\t\t\t\t);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (e2) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\"Error in 'extractWindowIdentifier'. Check TabRegion.jsx. Either there was no data in the event, or it was a circular object that caused JSON.parse to fail. Javascript Error:\",\r\n\t\t\t\te2\r\n\t\t\t);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Called when a drop event occurs on the tab region. We (hope) that this came from a tab. Could be a share icon, an image, something else - that's why we check to see if the identifier exists before doing anything.\r\n\t * @param {event} e\r\n\t */\r\n\tdrop(e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab drag drop.\");\r\n\t\tlet identifier = this.extractWindowIdentifier(e);\r\n\t\tif (!identifier) return; // the dropped item is not a tab\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)\r\n\t\t\treturn FSBL.Clients.WindowClient.cancelTilingOrTabbing();\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: \"tabbing\" }, () => {\r\n\t\t\tFSBL.Clients.RouterClient.transmit(\"tabbingDragEnd\", { success: true });\r\n\t\t\tif (identifier && identifier.windowName) {\r\n\t\t\t\t// Calls a method defined inside of windowTitleBar.jsx.\r\n\t\t\t\tthis.onTabAdded(identifier, this.state.hoveredTabIndex);\r\n\t\t\t} else if (identifier && identifier.waitForIdentifier) {\r\n\t\t\t\tlet subscribeId;\r\n\t\t\t\tlet tabIdentifierSubscriber = (err, response) => {\r\n\t\t\t\t\tif (!response.data.windowName) return;\r\n\t\t\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscribeId);\r\n\t\t\t\t\tthis.onTabAdded(response.data, this.state.hoveredTabIndex);\r\n\t\t\t\t};\r\n\t\t\t\tsubscribeId = FSBL.Clients.RouterClient.subscribe(`Finsemble.${identifier.guid}`, tabIdentifierSubscriber);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Unexpected drop event on window title bar. Check the 'drop' method on TabRegion.jsx.\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tisTabRegionOverflowing() {\r\n\t\tlet lastTab = {\r\n\t\t\tright: this.state.tabs.length * this.state.tabWidth,\r\n\t\t};\r\n\t\treturn lastTab.right + this.state.translateX > this.state.boundingBox.right - this.state.boundingBox.left;\r\n\t}\r\n\r\n\t/**\r\n\t * Event handler for when a user wheels inside of the tab region. We translate the deltaY that the event provides into horizontal movement. The translateX value that we return will be used in the render method below.\r\n\t * @param {event} e\r\n\t */\r\n\tonMouseWheel(e) {\r\n\t\te.preventDefault();\r\n\t\tlet numTabs = this.state.tabs.length;\r\n\t\tlet translateX = 0;\r\n\t\t// If there's more than one tab, do some calculations, otherwise we aren't going to scroll this region, no matter how much the user wants us to.\r\n\t\tif (numTabs > 1) {\r\n\t\t\tlet currentX = this.refs.Me.scrollLeft;\r\n\t\t\tlet { boundingBox } = this.state;\r\n\t\t\t// Figure out position of first tab and last tab.\r\n\t\t\tlet firstTab = {\r\n\t\t\t\tleft: 0 + boundingBox.left,\r\n\t\t\t};\r\n\t\t\tlet lastTab = {\r\n\t\t\t\tright: numTabs * this.state.tabWidth,\r\n\t\t\t};\r\n\t\t\tlet deltaX = this.state.tabWidth / 3;\r\n\t\t\tif (e.nativeEvent.deltaY < 0) {\r\n\t\t\t\tdeltaX = 0 - deltaX;\r\n\t\t\t}\r\n\t\t\t// Mouses with high sensitivity will cause massive scroll amounts. We don't want to scroll more than one tab's width in a single mouse wheel, otherwise you risk missing a tab.\r\n\t\t\tif (Math.abs(deltaX) > this.state.tabWidth) {\r\n\t\t\t\tlet isNegative = false;\r\n\t\t\t\tif (deltaX < 0) {\r\n\t\t\t\t\tisNegative = true;\r\n\t\t\t\t}\r\n\t\t\t\tdeltaX = isNegative ? 0 - this.state.tabWidth : this.state.tabWidth;\r\n\t\t\t}\r\n\r\n\t\t\t// when we set scrollLeft on the element, this event fires. But there's no actual event. so stop.\r\n\t\t\tif (!e.nativeEvent.deltaY) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet originalDeltaY = e.nativeEvent.deltaY;\r\n\t\t\tlet deltaY = originalDeltaY;\r\n\t\t\tif (Math.abs(originalDeltaY) > this.state.tabWidth / 3) {\r\n\t\t\t\tdeltaY = this.state.tabWidth / 3;\r\n\t\t\t\tif (originalDeltaY < 0) {\r\n\t\t\t\t\tdeltaY = 0 - deltaY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttranslateX = deltaY + currentX;\r\n\t\t\tlet maxRight = boundingBox.right - this.state.tabWidth;\r\n\t\t\tlet newRightForLastTab = lastTab.right + translateX;\r\n\t\t\tlet newLeftForFirstTab = firstTab.left + translateX;\r\n\t\t\t// Do not let the left of the first tab move to the right of the left edge of the bounding box.\r\n\t\t\tif (newLeftForFirstTab < 0) {\r\n\t\t\t\treturn this.scrollToFirstTab();\r\n\t\t\t} else if (e.nativeEvent.deltaY < 0 && newRightForLastTab <= boundingBox.right) {\r\n\t\t\t\t// ONLY IF the user is scrolling from right-to-left (deltaY will be negative). IF they try to do that, do not allow the right edge of the last tab to detach.\r\n\t\t\t\treturn this.scrollToLastTab();\r\n\t\t\t}\r\n\t\t\t// Else, the translation is okay. We're in the middle of our list and the first and last tabs aren't being rendered improperly.\r\n\t\t\ttranslateX < 0 ? (translateX = 0) : translateX;\r\n\t\t\tthis.setState({ translateX });\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to our active tab.\r\n\t */\r\n\tscrollToActiveTab() {\r\n\t\tthis.scrollToTab(this.state.activeTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the first tab in our list of tabs.\r\n\t */\r\n\tscrollToFirstTab() {\r\n\t\tlet firstTab = this.state.tabs[0];\r\n\t\tthis.scrollToTab(firstTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the last tab in our list of tabs\r\n\t */\r\n\tscrollToLastTab() {\r\n\t\tlet lastTab = this.state.tabs[this.state.tabs.length - 1];\r\n\t\tthis.scrollToTab(lastTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Function that will horizontally scroll the tab region so that the right edge of the tab lines up with the right edge of the tab region.\r\n\t * @param {} tab\r\n\t */\r\n\tscrollToTab(tab) {\r\n\t\t// 'BoundingBox' is just the boundingClientRect of the tab region. It is, in essence, the center part of the windowTitleBar.\r\n\t\tlet { boundingBox } = this.state;\r\n\r\n\t\tlet tabIndex = this.state.tabs.findIndex((el) => el.windowName === tab.windowName && el.uuid === tab.uuid);\r\n\t\tif (tabIndex > -1) {\r\n\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\tlet translateX = rightEdgeOfTab;\r\n\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box. We also account for the 30 px region on the right.\r\n\r\n\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\ttranslateX = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// Other tabs are less simple.\r\n\t\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box.\r\n\t\t\t\ttranslateX = boundingBox.right - boundingBox.left - rightEdgeOfTab;\r\n\t\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\t\ttranslateX = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.setTabListTranslateX(translateX);\r\n\t\t}\r\n\t}\r\n\r\n\tsetTabListTranslateX(translateX) {\r\n\t\tActions.setTabListScrollPosition(translateX);\r\n\t}\r\n\r\n\t/**\r\n\t * Someone is dragging _something_ over the tab region. We respond by rendering the ghost tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragOver(e) {\r\n\t\te.preventDefault();\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when the user moves their mouse out of the tabRegion after a dragOver event happens. When they leave, we hide our placeholder tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragLeave(e) {\r\n\t\tlet boundingRect = this.state.boundingBox;\r\n\t\tif (!FSBL.Clients.WindowClient.isPointInBox({ x: e.screenX, y: e.screenY }, boundingRect)) {\r\n\t\t\tthis.setState({\r\n\t\t\t\thoveredTabIndex: undefined,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set to a timeout. An event is sent to the RouterClient which will be handled by the drop handler on the window.\r\n\t * In the event that a drop handler never fires to stop tiling or tabbing, this will take care of it.\r\n\t *\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tcancelTabbing() {\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true });\r\n\t\tthis.onWindowResize();\r\n\t}\r\n\r\n\t/**\r\n\t * Basically exists just to keep the render method clean. Gives conditional classes to the active tab.\r\n\t * @param {tab} tab\r\n\t */\r\n\tgetTabClasses(tab) {\r\n\t\tlet classes = \"fsbl-tab\";\r\n\t\tlet tabIndex = this.findTabIndex(tab);\r\n\t\tif (tabIndex === this.state.hoveredTabIndex) classes = `${classes} ghost-tab`;\r\n\t\tif (this.state.activeTab && tab.windowName === this.state.activeTab.windowName) {\r\n\t\t\tclasses = `${classes} fsbl-active-tab`;\r\n\t\t}\r\n\t\treturn classes;\r\n\t}\r\n\r\n\tonTabDraggedOver(e, tabDraggedOver) {\r\n\t\te.preventDefault();\r\n\t\t// Find index of tab.\r\n\t\tlet tabIndex = this.findTabIndex(tabDraggedOver);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: tabIndex,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for the close button on individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabClosed(identifier) {\r\n\t\tActions.closeTab(identifier);\r\n\t}\r\n\r\n\t/**\r\n\t * drop handler for the tab region.\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabAdded(identifier, newIndex) {\r\n\t\tif (newIndex === -1) {\r\n\t\t\tnewIndex = undefined;\r\n\t\t}\r\n\r\n\t\tlet myIdentifier = finsembleWindow.identifier;\r\n\t\tmyIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tActions.reorderTab(identifier, newIndex);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: undefined,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tsetActiveTab(tab) {\r\n\t\tActions.setActiveTab(tab);\r\n\t}\r\n\r\n\tonStoreChanged(prop, value) {\r\n\t\tthis.setState({\r\n\t\t\t[prop]: value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTabsChanged(err, response) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttabs: value,\r\n\t\t\ttabWidth: this.getTabWidth({ tabList: value }),\r\n\t\t});\r\n\t}\r\n\r\n\tonTabListTranslateChanged(err, response) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttranslateX: value,\r\n\t\t});\r\n\t}\r\n\r\n\tUNSAFE_componentWillMount() {\r\n\t\t// Store.addListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.addListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.addListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\twindow.addEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t\tlet boundingBox = this.refs.Me.getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: boundingBox,\r\n\t\t\ttabWidth: this.getTabWidth({ boundingBox }),\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\t// Store.removeListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.removeListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.removeListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t\twindow.removeEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t}\r\n\r\n\thoverAction(newHoverState) {\r\n\t\tthis.setState({ hoverState: newHoverState });\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { translateX } = this.state;\r\n\t\ttranslateX = Math.abs(translateX);\r\n\t\t// If we have just 1 tab, we render the title. Unless someone is dragging a tab around - in that case, we will render the tab view, even though we only have 1.\r\n\r\n\t\tlet componentToRender = \"title\";\r\n\t\tif (this.state.tabs.length === 1) {\r\n\t\t\tif (this.props.listenForDragOver && !this.state.iAmDragging) {\r\n\t\t\t\tcomponentToRender = \"tabs\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.state.tabs.length > 1) {\r\n\t\t\tcomponentToRender = \"tabs\";\r\n\t\t}\r\n\t\t// Cleanup in case we were translated before closing the second to last tab. This left-aligns the title.\r\n\t\tif (componentToRender === \"title\") {\r\n\t\t\ttranslateX = 0;\r\n\t\t}\r\n\r\n\t\tif (this.refs.Me) {\r\n\t\t\tthis.refs.Me.scrollLeft = translateX;\r\n\t\t}\r\n\r\n\t\tlet moveAreaClasses = \"fsbl-tab-region-drag-area\";\r\n\t\tif (this.isTabRegionOverflowing()) {\r\n\t\t\tmoveAreaClasses = `${moveAreaClasses} gradient`;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tref=\"Me\"\r\n\t\t\t\tonDragLeave={this.dragLeave}\r\n\t\t\t\tclassName={this.props.className}\r\n\t\t\t\tonWheel={this.onMouseWheel}\r\n\t\t\t\tonScroll={this.onMouseWheel}\r\n\t\t\t\tonDrop={this.drop}\r\n\t\t\t\tonDragOver={this.dragOver}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"tab-region-wrapper\">\r\n\t\t\t\t\t{componentToRender === \"title\" && renderTitle()}\r\n\t\t\t\t\t{componentToRender === \"tabs\" && renderTabs()}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * Function to render the title. Helps keep the render code clean.\r\n */\r\nfunction renderTitle() {\r\n\treturn (\r\n\t\t<div\r\n\t\t\tdraggable=\"true\"\r\n\t\t\tonDragStart={(e) => {\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag start - TITLE\");\r\n\t\t\t\tlet activeIdentifier = finsembleWindow.identifier;\r\n\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t\t\tthis.startDrag(e, activeIdentifier);\r\n\t\t\t}}\r\n\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\tdata-hover={this.state.hoverState}\r\n\t\t\tclassName={\"fsbl-header-title\"}\r\n\t\t>\r\n\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\r\n\t\t\t<Title\r\n\t\t\t\tonUpdate={this.props.onTitleUpdated}\r\n\t\t\t\twindowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()}\r\n\t\t\t></Title>\r\n\t\t</div>\r\n\t);\r\n}\r\n\r\n/**\r\n * Renders the array of tabs.\r\n * @param {*} props\r\n */\r\nfunction renderTabs() {\r\n\tlet titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;\r\n\treturn this.state.tabs.map((tab) => (\r\n\t\t<Tab\r\n\t\t\tonClick={() => {\r\n\t\t\t\tthis.setActiveTab(tab);\r\n\t\t\t}}\r\n\t\t\tdraggable=\"true\"\r\n\t\t\tkey={tab.windowName} // this is a unique identifier for React so it knows when to update the DOM\r\n\t\t\tclassName={this.getTabClasses(tab)}\r\n\t\t\tonDragStart={(e, identifier) => {\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag - TAB\", identifier.windowName);\r\n\t\t\t\tthis.startDrag(e, identifier);\r\n\t\t\t}}\r\n\t\t\tonDrop={this.drop}\r\n\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\tonTabClose={() => {\r\n\t\t\t\tthis.onTabClosed(tab);\r\n\t\t\t}}\r\n\t\t\tonTabDraggedOver={this.onTabDraggedOver}\r\n\t\t\tlistenForDragOver={this.props.listenForDragOver}\r\n\t\t\ttabWidth={this.state.tabWidth}\r\n\t\t\ttitleWidth={titleWidth}\r\n\t\t\twindowIdentifier={tab}\r\n\t\t/>\r\n\t));\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TabList.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,M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EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;oBAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;oBAC1E,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC/B,CAAC,EACD,MAAM,EAAE,IAAI,CAAC,IAAI,EACjB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,UAAU,EAAE,GAAG,EAAE;oBAChB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACvB,CAAC,EACD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC/C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,GAAG,GACpB,CACO,CACV,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import * as React from \"react\";\r\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\r\nimport Tab from \"./Tab\";\r\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\r\nimport { Store, Actions } from \"../../stores/windowTitleBarStore\";\r\nimport { Title } from \"../windowTitle\";\r\nimport _throttle from \"lodash/throttle\";\r\n\r\nimport {\r\n\tEditTabProps,\r\n\tTabListProps,\r\n\tTabListState,\r\n\tGetTabWidthParams,\r\n\tTabProperties,\r\n\tValueOf,\r\n} from \"../../../../types/windowTitleBar\";\r\nimport { WindowIdentifier } from \"@finsemble/finsemble-core\";\r\n\r\nlet TAB_WIDTH = 300;\r\n// Next two items are for calculating how large the title should be within a tab.\r\nconst ICON_AREA = 16;\r\nconst CLOSE_BUTTON_MARGIN = 12;\r\nconst MINIMUM_TAB_SIZE = 100;\r\n\r\n/**\r\n * The wrapper component for tab renaming\r\n * @param {*} props\r\n */\r\nfunction EditTab(props: EditTabProps) {\r\n\tconst [editingTitle, setEditingTitle] = React.useState(false);\r\n\tconst [clickTimeout, setClickTimeout] = React.useState<NodeJS.Timeout | undefined>(undefined);\r\n\r\n\tReact.useEffect(() => {\r\n\t\t//Update document title cause after restart it has a default value which doesn't equal to persisted title.\r\n\t\tFSBL.Clients.WindowClient.getComponentState({ field: \"persistedTitle\" }, (err: StandardError, title: string) => {\r\n\t\t\tif (title) document.title = title;\r\n\t\t});\r\n\t}, []);\r\n\r\n\tconst inputEl = React.useRef<HTMLInputElement>(null);\r\n\tconst updateTabTitle = (e: React.KeyboardEvent<HTMLInputElement> | React.FocusEvent<HTMLInputElement>) => {\r\n\t\tconst title = (e.target as HTMLInputElement).value;\r\n\t\tFSBL.Clients.WindowClient.setComponentState({\r\n\t\t\tfield: \"persistedTitle\",\r\n\t\t\tvalue: title,\r\n\t\t});\r\n\t\tdocument.title = title;\r\n\t\tsetEditingTitle(false);\r\n\t};\r\n\r\n\tconst beginEditing = async () => {\r\n\t\tawait setEditingTitle(true);\r\n\t\tawait inputEl?.current?.focus();\r\n\t\tif (inputEl?.current) {\r\n\t\t\tinputEl.current.value = document.title;\r\n\t\t}\r\n\t};\r\n\r\n\tconst clickHandler = () => {\r\n\t\tif (clickTimeout !== null) {\r\n\t\t\t// double click\r\n\t\t\tbeginEditing();\r\n\t\t} else if (!editingTitle) {\r\n\t\t\t// single click\r\n\t\t\tlet timeout = setTimeout(() => {\r\n\t\t\t\tclearTimeout(clickTimeout);\r\n\t\t\t\tsetClickTimeout(undefined);\r\n\t\t\t}, 500);\r\n\t\t\tsetClickTimeout(timeout);\r\n\t\t\tif (props.tab && props.setActiveTab) props.setActiveTab(props.tab);\r\n\t\t}\r\n\t};\r\n\r\n\tconst blurHandler = (e: React.FocusEvent<HTMLInputElement>) => {\r\n\t\tupdateTabTitle(e);\r\n\t\tsetEditingTitle(false);\r\n\t};\r\n\r\n\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\te.key === \"Enter\" && updateTabTitle(e);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tid=\"tab-editor\"\r\n\t\t\t//We can't use Click and Dblclick events together cause for one dblclick fires two click events which close title editor.\r\n\t\t\t//Workaround with setTimeout should resolve this behaviour.\r\n\t\t\tonClick={clickHandler}\r\n\t\t>\r\n\t\t\t{editingTitle ? (\r\n\t\t\t\t<div className=\"fsbl-tab fsbl-active-tab\" style={{ width: props.tabWidth || \"auto\" }}>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={inputEl}\r\n\t\t\t\t\t\tonBlur={blurHandler}\r\n\t\t\t\t\t\tonKeyDown={keyDownHandler}\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tclassName=\"tab__input\"\r\n\t\t\t\t\t\tmaxLength={32}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t) : (\r\n\t\t\t\tprops.children\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n}\r\n\r\nexport class TabList extends React.Component<TabListProps, TabListState> {\r\n\tmousePositionOnDragEnd: { x: number; y: number };\r\n\r\n\tonWindowResizeThrottled: (this: Window, ev: UIEvent) => any;\r\n\r\n\tconstructor(props: TabListProps) {\r\n\t\tsuper(props);\r\n\t\tlet initialState = Store.getValues([\"activeTab\", \"tabs\"]);\r\n\t\tlet activeIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\r\n\t\tif (activeIdentifier) {\r\n\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t}\r\n\t\tthis.state = {\r\n\t\t\ttranslateX: 0,\r\n\t\t\ttabs: initialState.tabs,\r\n\t\t\tactiveTab: activeIdentifier as TabProperties,\r\n\t\t\tboundingBox: {\r\n\t\t\t\tright: 0,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tbottom: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t\twidth: 0,\r\n\t\t\t},\r\n\t\t\tiAmDragging: false,\r\n\t\t\thoverState: \"false\",\r\n\t\t\ttabWidth: TAB_WIDTH,\r\n\t\t\thoveredTabIndex: 0,\r\n\t\t};\r\n\t\tthis.onWindowResizeThrottled = () => {};\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: 0,\r\n\t\t\ty: 0,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Make sure that _this_ is correct inside of our event handlers.\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.startDrag = this.startDrag.bind(this);\r\n\t\tthis.stopDrag = this.stopDrag.bind(this);\r\n\t\tthis.cancelTabbing = this.cancelTabbing.bind(this);\r\n\t\tthis.drop = this.drop.bind(this);\r\n\t\tthis.dragOver = this.dragOver.bind(this);\r\n\t\tthis.dragLeave = this.dragLeave.bind(this);\r\n\t\tthis.onMouseWheel = this.onMouseWheel.bind(this);\r\n\t\tthis.renderTitle = this.renderTitle.bind(this);\r\n\t\tthis.renderTabs = this.renderTabs.bind(this);\r\n\t\tthis.findTabIndex = this.findTabIndex.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onTabAdded = this.onTabAdded.bind(this);\r\n\t\tthis.onTabClosed = this.onTabClosed.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onStoreChanged = this.onStoreChanged.bind(this);\r\n\t\t// this.onActiveTabChanged = this.onActiveTabChanged.bind(this);\r\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\r\n\t\tthis.onTabDraggedOver = this.onTabDraggedOver.bind(this);\r\n\t\tthis.isTabRegionOverflowing = this.isTabRegionOverflowing.bind(this);\r\n\t\tthis.onWindowResize = this.onWindowResize.bind(this);\r\n\t\tthis.onWindowResizeThrottled = _throttle(this.onWindowResize, 100);\r\n\t\tthis.getTabWidth = this.getTabWidth.bind(this);\r\n\t\tthis.setTabListTranslateX = this.setTabListTranslateX.bind(this);\r\n\t\tthis.onTabListTranslateChanged = this.onTabListTranslateChanged.bind(this);\r\n\t}\r\n\r\n\tgetTabWidth(params: GetTabWidthParams = {}) {\r\n\t\tlet { boundingBox, tabList } = params;\r\n\t\tif (typeof tabList === \"undefined\") {\r\n\t\t\ttabList = this.state.tabs;\r\n\t\t}\r\n\t\tif (typeof boundingBox === \"undefined\") {\r\n\t\t\tboundingBox = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\t}\r\n\t\tif (typeof boundingBox.right === \"undefined\") {\r\n\t\t\treturn TAB_WIDTH;\r\n\t\t}\r\n\t\tlet containerWidth = boundingBox.right - boundingBox.left;\r\n\t\tlet newTabWidth = containerWidth / tabList.length;\r\n\r\n\t\treturn newTabWidth < MINIMUM_TAB_SIZE ? MINIMUM_TAB_SIZE : newTabWidth;\r\n\t}\r\n\r\n\t/**\r\n\t * Resize handler. Calculates the space that the center-region is taking up. May be used to scale tabs proportionally.\r\n\t */\r\n\tonWindowResize() {\r\n\t\tlet bounds = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: bounds,\r\n\t\t\ttabWidth: this.getTabWidth(),\r\n\t\t});\r\n\t}\r\n\r\n\tfindTabIndex(tab: TabProperties) {\r\n\t\treturn this.state.tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * Function that's called when this component fires the onDragStart event, this will start the tiling or tabbing process\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the startdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstartDrag(e: React.DragEvent<HTMLDivElement>, windowIdentifier: WindowIdentifier) {\r\n\t\tthis.setState({\r\n\t\t\tiAmDragging: true,\r\n\t\t});\r\n\t\te.dataTransfer.setData(\"application/fsbl-tab-data\", JSON.stringify(windowIdentifier));\r\n\t\tFSBL.Clients.WindowClient.startTilingOrTabbing({\r\n\t\t\twindowIdentifier: windowIdentifier,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the react component detects a drop (or stop drag, which is equivalent)\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the stopdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstopDrag(e: React.DragEvent<HTMLDivElement>) {\r\n\t\t// We don't want onDropHandler() in windowTitleBarComponent.jsx\r\n\t\t// to handle this drop event, so we call event.stopPropagation().\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab stopDrag.\");\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: e.nativeEvent.screenX,\r\n\t\t\ty: e.nativeEvent.screenY,\r\n\t\t};\r\n\r\n\t\tconst { boundingBox } = this.state;\r\n\t\tFSBL.Clients.WindowClient.getBounds((err: StandardError, bounds: { top: number; left: number }) => {\r\n\t\t\t// We ONLY want to know if we're in the tab region!\r\n\t\t\tconst tabRegion = {\r\n\t\t\t\ttop: boundingBox.top + bounds.top,\r\n\t\t\t\tbottom: boundingBox.bottom + bounds.top,\r\n\t\t\t\tleft: boundingBox.left + bounds.left,\r\n\t\t\t\tright: boundingBox.right + bounds.left,\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t};\r\n\t\t\tif (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {\r\n\t\t\t\t// allow for a 50ms delay so this message goes after a drop message from a target window if tabbing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({\r\n\t\t\t\t\t\tmousePosition: this.mousePositionOnDragEnd,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 50);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tiAmDragging: false,\r\n\t\t\t\t});\r\n\t\t\t\tthis.onWindowResize();\r\n\t\t\t} else {\r\n\t\t\t\t// sometimes a tab gets dropped in a bad spot where no action gets taken and we get stuck in tiling mode\r\n\t\t\t\t// to make sure nothing bad happens, call cancel after a similar 50ms delay\r\n\t\t\t\t// If some action was taken, this will be ignored by Finsemble\r\n\r\n\t\t\t\tconst setTimeoutCb = FSBL.Clients.WindowClient.cancelTilingOrTabbing(\r\n\t\t\t\t\t{ windowIdentifier: this.state.activeTab },\r\n\t\t\t\t\t() => {}\r\n\t\t\t\t);\r\n\t\t\t\tsetTimeout(() => setTimeoutCb, 50);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Helper function that will pull data from a drop event, parse it, and return it.\r\n\t * @param {event} e\r\n\t */\r\n\textractWindowIdentifier(e: React.DragEvent<HTMLElement>) {\r\n\t\ttry {\r\n\t\t\tlet identifier = JSON.parse(e.dataTransfer.getData(\"application/fsbl-tab-data\"));\r\n\t\t\t// If the \"identifier\" is formed properly, it'll have this properly. Otherwise, it's something else (e.g., share data, image, etc).\r\n\t\t\tif (typeof identifier.windowName !== \"undefined\") {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else if (identifier.waitForIdentifier) {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Malformed drop object detected in windowTitleBar. Check tab dropping code. Expected windowIdentifier, got \",\r\n\t\t\t\t\tidentifier\r\n\t\t\t\t);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (e2) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\"Error in 'extractWindowIdentifier'. Check TabRegion.jsx. Either there was no data in the event, or it was a circular object that caused JSON.parse to fail. Javascript Error:\",\r\n\t\t\t\te2\r\n\t\t\t);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Called when a drop event occurs on the tab region. We (hope) that this came from a tab. Could be a share icon, an image, something else - that's why we check to see if the identifier exists before doing anything.\r\n\t * @param {event} e\r\n\t */\r\n\tdrop(e?: React.DragEvent<HTMLElement>) {\r\n\t\tlet identifier: any;\r\n\t\tif (e) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t\tidentifier = this.extractWindowIdentifier(e);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab drag drop.\");\r\n\t\tif (!identifier) return; // the dropped item is not a tab\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)\r\n\t\t\treturn FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => {});\r\n\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: \"tabbing\" }, () => {\r\n\t\t\tFSBL.Clients.RouterClient.transmit(\"tabbingDragEnd\", { success: true });\r\n\t\t\tif (identifier && identifier.windowName) {\r\n\t\t\t\t// Calls a method defined inside of windowTitleBar.jsx.\r\n\t\t\t\tthis.onTabAdded(identifier, this.state.hoveredTabIndex);\r\n\t\t\t} else if (identifier && identifier.waitForIdentifier) {\r\n\t\t\t\tlet subscribeId: { subscribeID: string; topic: string };\r\n\t\t\t\tlet tabIdentifierSubscriber = (err: StandardError, response: { data: TabProperties }) => {\r\n\t\t\t\t\tif (!response.data.windowName) return;\r\n\t\t\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscribeId);\r\n\t\t\t\t\tthis.onTabAdded(response.data, this.state.hoveredTabIndex);\r\n\t\t\t\t};\r\n\t\t\t\tsubscribeId = FSBL.Clients.RouterClient.subscribe(`Finsemble.${identifier.guid}`, tabIdentifierSubscriber);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Unexpected drop event on window title bar. Check the 'drop' method on TabRegion.jsx.\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tisTabRegionOverflowing() {\r\n\t\tlet lastTab = {\r\n\t\t\tright: this.state.tabs.length * this.state.tabWidth,\r\n\t\t};\r\n\t\treturn lastTab.right + this.state.translateX > this.state.boundingBox.right - this.state.boundingBox.left;\r\n\t}\r\n\r\n\t/**\r\n\t * Event handler for when a user wheels inside of the tab region. We translate the deltaY that the event provides into horizontal movement. The translateX value that we return will be used in the render method below.\r\n\t * @param {event} e\r\n\t * @todo This should probably be refactored into separate handlers for scroll and mousewheel to account for the differences in event properties. For now, we will intersection the types and ts ignore errors from callers\r\n\t */\r\n\tonMouseWheel(e: React.WheelEvent & React.UIEvent) {\r\n\t\te.preventDefault();\r\n\t\tlet numTabs = this.state.tabs.length;\r\n\t\tlet translateX = 0;\r\n\t\t// If there's more than one tab, do some calculations, otherwise we aren't going to scroll this region, no matter how much the user wants us to.\r\n\t\tif (numTabs > 1) {\r\n\t\t\tlet currentX = (this.refs.Me as HTMLElement).scrollLeft;\r\n\t\t\tlet { boundingBox } = this.state;\r\n\t\t\t// Figure out position of first tab and last tab.\r\n\t\t\tlet firstTab = {\r\n\t\t\t\tleft: 0 + boundingBox.left,\r\n\t\t\t};\r\n\t\t\tlet lastTab = {\r\n\t\t\t\tright: numTabs * this.state.tabWidth,\r\n\t\t\t};\r\n\t\t\tlet deltaX = this.state.tabWidth / 3;\r\n\t\t\t// @ts-ignore\r\n\t\t\tif (e.nativeEvent.deltaY < 0) {\r\n\t\t\t\tdeltaX = 0 - deltaX;\r\n\t\t\t}\r\n\t\t\t// Mouses with high sensitivity will cause massive scroll amounts. We don't want to scroll more than one tab's width in a single mouse wheel, otherwise you risk missing a tab.\r\n\t\t\tif (Math.abs(deltaX) > this.state.tabWidth) {\r\n\t\t\t\tlet isNegative = false;\r\n\t\t\t\tif (deltaX < 0) {\r\n\t\t\t\t\tisNegative = true;\r\n\t\t\t\t}\r\n\t\t\t\tdeltaX = isNegative ? 0 - this.state.tabWidth : this.state.tabWidth;\r\n\t\t\t}\r\n\r\n\t\t\t// when we set scrollLeft on the element, this event fires. But there's no actual event. so stop.\r\n\t\t\tif (!e.nativeEvent.deltaY) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet originalDeltaY = e.nativeEvent.deltaY;\r\n\t\t\tlet deltaY = originalDeltaY;\r\n\t\t\tif (Math.abs(originalDeltaY) > this.state.tabWidth / 3) {\r\n\t\t\t\tdeltaY = this.state.tabWidth / 3;\r\n\t\t\t\tif (originalDeltaY < 0) {\r\n\t\t\t\t\tdeltaY = 0 - deltaY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttranslateX = deltaY + currentX;\r\n\t\t\tlet maxRight = boundingBox.right - this.state.tabWidth;\r\n\t\t\tlet newRightForLastTab = lastTab.right + translateX;\r\n\t\t\tlet newLeftForFirstTab = firstTab.left + translateX;\r\n\t\t\t// Do not let the left of the first tab move to the right of the left edge of the bounding box.\r\n\t\t\tif (newLeftForFirstTab < 0) {\r\n\t\t\t\treturn this.scrollToFirstTab();\r\n\t\t\t} else if (e.nativeEvent.deltaY < 0 && newRightForLastTab <= boundingBox.right) {\r\n\t\t\t\t// ONLY IF the user is scrolling from right-to-left (deltaY will be negative). IF they try to do that, do not allow the right edge of the last tab to detach.\r\n\t\t\t\treturn this.scrollToLastTab();\r\n\t\t\t}\r\n\t\t\t// Else, the translation is okay. We're in the middle of our list and the first and last tabs aren't being rendered improperly.\r\n\t\t\ttranslateX < 0 ? (translateX = 0) : translateX;\r\n\t\t\tthis.setState({ translateX });\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to our active tab.\r\n\t */\r\n\tscrollToActiveTab() {\r\n\t\tthis.scrollToTab(this.state.activeTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the first tab in our list of tabs.\r\n\t */\r\n\tscrollToFirstTab() {\r\n\t\tlet firstTab = this.state.tabs[0];\r\n\t\tthis.scrollToTab(firstTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the last tab in our list of tabs\r\n\t */\r\n\tscrollToLastTab() {\r\n\t\tlet lastTab = this.state.tabs[this.state.tabs.length - 1];\r\n\t\tthis.scrollToTab(lastTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Function that will horizontally scroll the tab region so that the right edge of the tab lines up with the right edge of the tab region.\r\n\t * @param {} tab\r\n\t */\r\n\tscrollToTab(tab: TabProperties) {\r\n\t\t// 'BoundingBox' is just the boundingClientRect of the tab region. It is, in essence, the center part of the windowTitleBar.\r\n\t\tlet { boundingBox } = this.state;\r\n\r\n\t\tlet tabIndex = this.state.tabs.findIndex((el) => el.windowName === tab.windowName && el.uuid === tab.uuid);\r\n\t\tif (tabIndex > -1) {\r\n\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\tlet translateX = rightEdgeOfTab;\r\n\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box. We also account for the 30 px region on the right.\r\n\r\n\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\ttranslateX = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// Other tabs are less simple.\r\n\t\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box.\r\n\t\t\t\ttranslateX = boundingBox.right - boundingBox.left - rightEdgeOfTab;\r\n\t\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\t\ttranslateX = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.setTabListTranslateX(translateX);\r\n\t\t}\r\n\t}\r\n\r\n\tsetTabListTranslateX(translateX: number) {\r\n\t\tActions.setTabListScrollPosition(translateX);\r\n\t}\r\n\r\n\t/**\r\n\t * Someone is dragging _something_ over the tab region. We respond by rendering the ghost tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragOver(e: React.DragEvent) {\r\n\t\te.preventDefault();\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when the user moves their mouse out of the tabRegion after a dragOver event happens. When they leave, we hide our placeholder tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragLeave(e: React.DragEvent<HTMLDivElement>) {\r\n\t\tlet boundingRect = this.state.boundingBox;\r\n\t\tif (!FSBL.Clients.WindowClient.isPointInBox({ x: e.screenX, y: e.screenY }, boundingRect)) {\r\n\t\t\tthis.setState({\r\n\t\t\t\thoveredTabIndex: undefined,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set to a timeout. An event is sent to the RouterClient which will be handled by the drop handler on the window.\r\n\t * In the event that a drop handler never fires to stop tiling or tabbing, this will take care of it.\r\n\t *\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tcancelTabbing() {\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true });\r\n\t\tthis.onWindowResize();\r\n\t}\r\n\r\n\t/**\r\n\t * Basically exists just to keep the render method clean. Gives conditional classes to the active tab.\r\n\t * @param {tab} tab\r\n\t */\r\n\tgetTabClasses(tab: TabProperties) {\r\n\t\tlet classes = \"fsbl-tab\";\r\n\t\tlet tabIndex = this.findTabIndex(tab);\r\n\t\tif (tabIndex === this.state.hoveredTabIndex) classes = `${classes} ghost-tab`;\r\n\t\tif (this.state.activeTab && tab.windowName === this.state.activeTab.windowName) {\r\n\t\t\tclasses = `${classes} fsbl-active-tab`;\r\n\t\t}\r\n\t\treturn classes;\r\n\t}\r\n\r\n\tonTabDraggedOver(e: React.DragEvent<HTMLElement>, tabDraggedOver: TabProperties) {\r\n\t\te.preventDefault();\r\n\t\t// Find index of tab.\r\n\t\tlet tabIndex = this.findTabIndex(tabDraggedOver);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: tabIndex,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for the close button on individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabClosed(identifier: TabProperties) {\r\n\t\tActions.closeTab(identifier);\r\n\t}\r\n\r\n\t/**\r\n\t * drop handler for the tab region.\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabAdded(identifier: TabProperties, newIndex: number | undefined) {\r\n\t\tif (newIndex === -1) {\r\n\t\t\tnewIndex = undefined;\r\n\t\t}\r\n\r\n\t\tlet myIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\t\tif (myIdentifier) {\r\n\t\t\tmyIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t}\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (typeof newIndex === \"number\") {\r\n\t\t\tActions.reorderTab(identifier, newIndex);\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: undefined,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tsetActiveTab(tab: TabProperties) {\r\n\t\tActions.setActiveTab(tab);\r\n\t}\r\n\r\n\tonStoreChanged(prop: keyof TabListState, value: ValueOf<TabListState>) {\r\n\t\t// @ts-ignore + TODO: rewrite this area to more explicitly set state by name, as TS expects primitive types for the current key+values being set\r\n\t\tthis.setState({\r\n\t\t\t[prop]: value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTabsChanged(err: StandardError, response: { value: TabProperties[] }) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttabs: value,\r\n\t\t\ttabWidth: this.getTabWidth({ tabList: value }),\r\n\t\t});\r\n\t}\r\n\r\n\tonTabListTranslateChanged(err: StandardError, response: { value: number }) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttranslateX: value,\r\n\t\t});\r\n\t}\r\n\r\n\tUNSAFE_componentWillMount() {\r\n\t\t// Store.addListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.addListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.addListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\twindow.addEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t\tlet boundingBox = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: boundingBox,\r\n\t\t\ttabWidth: this.getTabWidth({ boundingBox }),\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\t// Store.removeListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.removeListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.removeListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t\twindow.removeEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t}\r\n\r\n\thoverAction(newHoverState: string) {\r\n\t\tthis.setState({ hoverState: newHoverState });\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { translateX } = this.state;\r\n\t\ttranslateX = Math.abs(translateX);\r\n\t\t// If we have just 1 tab, we render the title. Unless someone is dragging a tab around - in that case, we will render the tab view, even though we only have 1.\r\n\r\n\t\tlet componentToRender = \"title\";\r\n\t\tif (this.state.tabs.length === 1) {\r\n\t\t\tif (this.props.listenForDragOver && !this.state.iAmDragging) {\r\n\t\t\t\tcomponentToRender = \"tabs\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.state.tabs.length > 1) {\r\n\t\t\tcomponentToRender = \"tabs\";\r\n\t\t}\r\n\t\t// Cleanup in case we were translated before closing the second to last tab. This left-aligns the title.\r\n\t\tif (componentToRender === \"title\") {\r\n\t\t\ttranslateX = 0;\r\n\t\t}\r\n\r\n\t\tif (this.refs.Me) {\r\n\t\t\t(this.refs.Me as HTMLElement).scrollLeft = translateX;\r\n\t\t}\r\n\r\n\t\tlet moveAreaClasses = \"fsbl-tab-region-drag-area\";\r\n\t\tif (this.isTabRegionOverflowing()) {\r\n\t\t\tmoveAreaClasses = `${moveAreaClasses} gradient`;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tref=\"Me\"\r\n\t\t\t\tonDragLeave={this.dragLeave}\r\n\t\t\t\tclassName={this.props.className}\r\n\t\t\t\tonWheel={this.onMouseWheel}\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\tonScroll={this.onMouseWheel}\r\n\t\t\t\tonDrop={this.drop}\r\n\t\t\t\tonDragOver={this.dragOver}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"tab-region-wrapper\">\r\n\t\t\t\t\t{componentToRender === \"title\" && this.renderTitle()}\r\n\t\t\t\t\t{componentToRender === \"tabs\" && this.renderTabs()}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Function to render the title. Helps keep the render code clean.\r\n\t */\r\n\trenderTitle() {\r\n\t\treturn (\r\n\t\t\t<EditTab>\r\n\t\t\t\t<div\r\n\t\t\t\t\tdraggable=\"true\"\r\n\t\t\t\t\tonDragStart={(e) => {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag start - TITLE\");\r\n\t\t\t\t\t\tlet activeIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\t\t\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t\t\t\t\tthis.startDrag(e, activeIdentifier);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\t\t\tdata-hover={this.state.hoverState}\r\n\t\t\t\t\tclassName={\"fsbl-header-title\"}\r\n\t\t\t\t>\r\n\t\t\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\r\n\t\t\t\t\t<Title\r\n\t\t\t\t\t\tonUpdate={this.props.onTitleUpdated}\r\n\t\t\t\t\t\twindowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()}\r\n\t\t\t\t\t></Title>\r\n\t\t\t\t</div>\r\n\t\t\t</EditTab>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Renders the array of tabs.\r\n\t * @param {*} props\r\n\t */\r\n\trenderTabs() {\r\n\t\tlet titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;\r\n\r\n\t\treturn this.state.tabs.map((tab) => (\r\n\t\t\t<EditTab tabWidth={this.state.tabWidth} key={tab.windowName} tab={tab} setActiveTab={this.setActiveTab}>\r\n\t\t\t\t<Tab\r\n\t\t\t\t\tdraggable=\"true\"\r\n\t\t\t\t\tkey={tab.windowName} // this is a unique identifier for React so it knows when to update the DOM\r\n\t\t\t\t\tclassName={this.getTabClasses(tab)}\r\n\t\t\t\t\tonDragStart={(e, identifier) => {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag - TAB\", identifier.windowName);\r\n\t\t\t\t\t\tthis.startDrag(e, identifier);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonDrop={this.drop}\r\n\t\t\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\t\t\tonTabClose={() => {\r\n\t\t\t\t\t\tthis.onTabClosed(tab);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonTabDraggedOver={this.onTabDraggedOver}\r\n\t\t\t\t\tlistenForDragOver={this.props.listenForDragOver}\r\n\t\t\t\t\ttabWidth={this.state.tabWidth}\r\n\t\t\t\t\ttitleWidth={titleWidth}\r\n\t\t\t\t\twindowIdentifier={tab}\r\n\t\t\t\t/>\r\n\t\t\t</EditTab>\r\n\t\t));\r\n\t}\r\n}\r\n"]}
|
|
@@ -19,6 +19,7 @@ const LinkerButtonRedux = () => {
|
|
|
19
19
|
const state = useSelector((currentState) => currentState);
|
|
20
20
|
const buttonRef = useRef(null);
|
|
21
21
|
const showLinkerWindow = () => {
|
|
22
|
+
var _a, _b, _c;
|
|
22
23
|
dispatch(actions.setActiveWindow({
|
|
23
24
|
type: "linker/setActiveWindow",
|
|
24
25
|
payload: {
|
|
@@ -28,11 +29,11 @@ const LinkerButtonRedux = () => {
|
|
|
28
29
|
const linkerButton = buttonRef.current;
|
|
29
30
|
if (linkerButton) {
|
|
30
31
|
const linkerButtonDiv = linkerButton;
|
|
31
|
-
const linkerParent = (linkerButtonDiv.offsetParent
|
|
32
|
+
const linkerParent = ((_a = linkerButtonDiv.offsetParent) !== null && _a !== void 0 ? _a : linkerButtonDiv.parentElement);
|
|
32
33
|
const params = {
|
|
33
34
|
position: "relative",
|
|
34
|
-
left: linkerParent
|
|
35
|
-
top: linkerParent
|
|
35
|
+
left: (_b = linkerParent === null || linkerParent === void 0 ? void 0 : linkerParent.offsetLeft) !== null && _b !== void 0 ? _b : 0,
|
|
36
|
+
top: (_c = linkerParent === null || linkerParent === void 0 ? void 0 : linkerParent.offsetHeight) !== null && _c !== void 0 ? _c : 0,
|
|
36
37
|
forceOntoMonitor: true,
|
|
37
38
|
spawnIfNotFound: false,
|
|
38
39
|
};
|
|
@@ -53,7 +54,7 @@ const WhichLinker = () => {
|
|
|
53
54
|
const [whichLinker, setWhichLinker] = React.useState("");
|
|
54
55
|
useEffect(() => {
|
|
55
56
|
(async () => {
|
|
56
|
-
const {
|
|
57
|
+
const { data } = await FSBL.Clients.ConfigClient.getValue({
|
|
57
58
|
field: "finsemble.servicesConfig.linker.enabled",
|
|
58
59
|
});
|
|
59
60
|
if (data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkerButton.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkerButton.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,EAAe,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAKlF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC9B,6BACC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B;IAEzC,4CAAqB;IACrB;QACC,8BACC,EAAE,EAAC,WAAW,EACd,CAAC,EAAC,yMAAyM,GAC1M;QACF,gCAAQ,EAAE,EAAC,WAAW,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ;YACzE,kCAAU,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,aAAa,EAAC,MAAM,EAAC,oBAAoB,GAAG;YAChE,wCAAgB,EAAE,EAAC,oBAAoB,EAAC,MAAM,EAAC,kBAAkB,EAAC,YAAY,EAAC,IAAI,GAAG;YACtF,uCAAe,EAAE,EAAC,kBAAkB,EAAC,MAAM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AyB,IAAI,oBAAC,sBAAsB,OAAG,CACtE,CACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,WAAW,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { useRef, useEffect } from \"react\";\r\nimport { LinkerGroups } from \"./LinkerGroups\";\r\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\r\nimport { actions, LinkerStore, store } from \"../../../linker/remoteRedux\";\r\nimport { LinkerButton as LinkerButtonDeprecated } from \"./LinkerButtonDeprecated\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype SpawnParams = services.window.types.SpawnParams;\r\n\r\nconst LinkerButtonIcon = () => (\r\n\t<svg\r\n\t\twidth=\"15px\"\r\n\t\theight=\"15px\"\r\n\t\tviewBox=\"2 1 13 13\"\r\n\t\txmlns=\"http://www.w3.org/2000/svg\"\r\n\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\r\n\t>\r\n\t\t<title>Linker</title>\r\n\t\t<defs>\r\n\t\t\t<path\r\n\t\t\t\tid=\"prefix__b\"\r\n\t\t\t\td=\"M17.925 15.425h-1v-2.5a2.5 2.5 0 0 0-5 0v2.5h-1v-2.5a3.5 3.5 0 1 1 7 0v2.5zm0 2v2.5a3.5 3.5 0 1 1-7 0v-2.5h1v2.5a2.5 2.5 0 0 0 5 0v-2.5h1zm-3.5-4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v-5a.5.5 0 0 1 .5-.5z\"\r\n\t\t\t/>\r\n\t\t\t<filter id=\"prefix__a\" x=\"-28.6%\" y=\"-7.1%\" width=\"157.1%\" height=\"128.6%\">\r\n\t\t\t\t<feOffset dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\r\n\t\t\t\t<feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\".5\" />\r\n\t\t\t\t<feColorMatrix in=\"shadowBlurOuter1\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\" />\r\n\t\t\t</filter>\r\n\t\t</defs>\r\n\t\t<g transform=\"rotate(45 22.289 4.682)\" fillRule=\"nonzero\" fill=\"none\">\r\n\t\t\t<use filter=\"url(#prefix__a)\" xlinkHref=\"#prefix__b\" />\r\n\t\t\t<use xlinkHref=\"#prefix__b\" />\r\n\t\t</g>\r\n\t</svg>\r\n);\r\n\r\nconst LinkerButtonRedux: React.FunctionComponent = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\tconst buttonRef = useRef(null);\r\n\r\n\tconst showLinkerWindow = () => {\r\n\t\t//TODO, import this action creator from finsemble-core\r\n\t\tdispatch(\r\n\t\t\tactions.setActiveWindow({\r\n\t\t\t\ttype: \"linker/setActiveWindow\",\r\n\t\t\t\tpayload: {\r\n\t\t\t\t\twindowName: finsembleWindow.name,\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\r\n\t\t// The HTMLElement.offsetParent read-only property returns a reference to the object which is the closest (nearest in the containment hierarchy) positioned containing element.\r\n\t\t// Necessary to cast because refs are type \"Element\" (which could be an SVGElement...)\r\n\r\n\t\tconst linkerButton = buttonRef.current;\r\n\t\tif (linkerButton) {\r\n\t\t\tconst linkerButtonDiv = linkerButton as HTMLElement;\r\n\t\t\tconst linkerParent = (linkerButtonDiv.offsetParent ?? linkerButtonDiv.parentElement) as HTMLElement;\r\n\r\n\t\t\tconst params: SpawnParams = {\r\n\t\t\t\tposition: \"relative\",\r\n\t\t\t\tleft: linkerParent?.offsetLeft ?? 0,\r\n\t\t\t\ttop: linkerParent?.offsetHeight ?? 0,\r\n\t\t\t\tforceOntoMonitor: true,\r\n\t\t\t\tspawnIfNotFound: false,\r\n\t\t\t};\r\n\t\t\tconst wi = {\r\n\t\t\t\tcomponentType: \"linkerWindow\",\r\n\t\t\t};\r\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(linkerButtonDiv, wi, params);\r\n\t\t}\r\n\t};\r\n\r\n\t// If this window is in the list of linker clients then display this button\r\n\t// @ts-ignore: finsembleWindow.name is possibly undefined\r\n\tconst displayMe = state.clients[finsembleWindow.name] !== undefined;\r\n\r\n\t// Add keyboard shortcut to launch the Linker Menu\r\n\t// Using `addBrowserHotkey` so that the linker menu is only launched when the user is focused on the titlebar\r\n\t// If we had used `addGlobalHotkey`, it would cause a lot of intermittent errors (linker menu would think it\r\n\t// was launched from the Notifications Center component for some reason, and would display incorrect channel\r\n\t// information, or float the linker menu in the wrong location. Lots of flakiness.)\r\n\tFSBL.Clients.HotkeyClient.addBrowserHotkey([\"CommandOrControl\", \"l\"], showLinkerWindow);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{displayMe && (\r\n\t\t\t\t<div ref={buttonRef} title=\"Link Data\" className=\"linkerSection\">\r\n\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" onClick={showLinkerWindow}>\r\n\t\t\t\t\t\t<LinkerButtonIcon />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<LinkerGroups />\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\n/**\r\n * Picks whether to display the current or deprecated LinkerElement.\r\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\r\n *\r\n * This code should be removed once the linkerClient is removed from Finsemble.\r\n */\r\nconst WhichLinker = () => {\r\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\r\n\r\n\tuseEffect(() => {\r\n\t\t(async () => {\r\n\t\t\tconst { data } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\r\n\t\t\t});\r\n\t\t\tif (data) {\r\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\r\n\t\t\t} else {\r\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\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{whichLinker === \"LinkerElement\" && (\r\n\t\t\t\t<Provider store={store}>\r\n\t\t\t\t\t<LinkerButtonRedux />\r\n\t\t\t\t</Provider>\r\n\t\t\t)}\r\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerButtonDeprecated />}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport const LinkerButton: React.FunctionComponent = () => <WhichLinker />;\r\n"]}
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
export class LinkerButton extends React.Component<any, any, any> {
|
|
2
|
-
static contextType: React.Context<
|
|
3
|
-
useDOMBasedMovement: boolean;
|
|
4
|
-
showLinkerButton: boolean;
|
|
5
|
-
showShareButton: boolean;
|
|
6
|
-
showTabRegion: boolean;
|
|
7
|
-
showDockingButton: boolean;
|
|
8
|
-
showAlwaysOnTopButton: boolean;
|
|
9
|
-
showMinimizeButton: boolean;
|
|
10
|
-
showMaximizeButton: boolean;
|
|
11
|
-
showCloseButton: boolean;
|
|
12
|
-
setTabRef: any;
|
|
13
|
-
onTabDropped: any;
|
|
14
|
-
thisWindowTitle: string;
|
|
15
|
-
boundingBox: any;
|
|
16
|
-
listenForDragOver: any;
|
|
17
|
-
tabs: any;
|
|
18
|
-
onTitleUpdated: any;
|
|
19
|
-
setToolbarRight: any;
|
|
20
|
-
showTabs: boolean;
|
|
21
|
-
alwaysOnTop: boolean;
|
|
22
|
-
}>;
|
|
2
|
+
static contextType: React.Context<import("../../windowTitleBarContext").WindowTitleBarContextType>;
|
|
23
3
|
constructor(props: any);
|
|
24
4
|
bindCorrectContext(): void;
|
|
25
5
|
onChannelsChange(err: any, response: any): void;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useSelector } from "react-redux";
|
|
3
3
|
const LinkerGroupsRedux = () => {
|
|
4
|
+
var _a, _b, _c, _d;
|
|
4
5
|
const state = useSelector((currentState) => currentState);
|
|
5
|
-
const joinedChannels = state
|
|
6
|
-
const allChannels = state
|
|
7
|
-
const onMouseUp = (e, channelName) => {
|
|
8
|
-
};
|
|
6
|
+
const joinedChannels = (_c = (_b = (_a = state === null || state === void 0 ? void 0 : state.clients) === null || _a === void 0 ? void 0 : _a[finsembleWindow.name]) === null || _b === void 0 ? void 0 : _b.joinedChannels) !== null && _c !== void 0 ? _c : [];
|
|
7
|
+
const allChannels = (_d = state === null || state === void 0 ? void 0 : state.allChannels) !== null && _d !== void 0 ? _d : [];
|
|
9
8
|
return (React.createElement("div", { className: "linker-groups" }, allChannels.map((channel) => {
|
|
9
|
+
var _a;
|
|
10
10
|
const active = joinedChannels.includes(channel.name);
|
|
11
|
-
const label = channel.label
|
|
12
|
-
return (active && (React.createElement("div", { key: channel.name, className: `linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`, title: `Channel ${label}
|
|
13
|
-
onMouseUp(e, channel.name);
|
|
14
|
-
} }, label)));
|
|
11
|
+
const label = (_a = channel.label) !== null && _a !== void 0 ? _a : "X";
|
|
12
|
+
return (active && (React.createElement("div", { key: channel.name, className: `linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`, title: `Channel ${label}` }, label)));
|
|
15
13
|
})));
|
|
16
14
|
};
|
|
17
15
|
export const LinkerGroups = () => React.createElement(LinkerGroupsRedux, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkerGroups.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerGroups.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"LinkerGroups.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerGroups.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,MAAM,iBAAiB,GAA4B,GAAG,EAAE;;IACvD,MAAM,KAAK,GAAgB,WAAW,CAAC,CAAC,YAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IAE5E,MAAM,cAAc,GAAmB,MAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAG,eAAe,CAAC,IAAI,CAAC,0CAAE,cAAc,mCAAI,EAAE,CAAC;IACpG,MAAM,WAAW,GAAc,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,mCAAI,EAAE,CAAC;IAExD,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe,IAC5B,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;;QAC5B,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErD,MAAM,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,GAAG,CAAC;QACnC,OAAO,CACN,MAAM,IAAI,CACT,6BACC,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,SAAS,EAAE,+CAA+C,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,EAAE,EACjG,KAAK,EAAE,WAAW,KAAK,EAAE,IAExB,KAAK,CACD,CACN,CACD,CAAC;IACH,CAAC,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,iBAAiB,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport * as React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { LinkerStore } from \"../../../linker/remoteRedux\";\r\n\r\ntype Channel = LinkerStore[\"allChannels\"][0];\r\ntype JoinedChannels = string[];\r\n\r\nconst LinkerGroupsRedux: React.FunctionComponent = () => {\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\t// @ts-ignore: possible error: finsembleWindow.name is possibly undefined\r\n\tconst joinedChannels: JoinedChannels = state?.clients?.[finsembleWindow.name]?.joinedChannels ?? [];\r\n\tconst allChannels: Channel[] = state?.allChannels ?? [];\r\n\r\n\treturn (\r\n\t\t<div className=\"linker-groups\">\r\n\t\t\t{allChannels.map((channel) => {\r\n\t\t\t\tconst active = joinedChannels.includes(channel.name);\r\n\t\t\t\t// linker-${channel.label} is deprecated in favor of cssClassName\r\n\t\t\t\tconst label = channel.label ?? \"X\";\r\n\t\t\t\treturn (\r\n\t\t\t\t\tactive && (\r\n\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\tkey={channel.name}\r\n\t\t\t\t\t\t\tclassName={`linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`}\r\n\t\t\t\t\t\t\ttitle={`Channel ${label}`}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{label}\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})}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport const LinkerGroups: React.FunctionComponent = () => <LinkerGroupsRedux />;\r\n"]}
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
export class ShareButton extends React.Component<any, any, any> {
|
|
2
|
-
static contextType: React.Context<
|
|
3
|
-
useDOMBasedMovement: boolean;
|
|
4
|
-
showLinkerButton: boolean;
|
|
5
|
-
showShareButton: boolean;
|
|
6
|
-
showTabRegion: boolean;
|
|
7
|
-
showDockingButton: boolean;
|
|
8
|
-
showAlwaysOnTopButton: boolean;
|
|
9
|
-
showMinimizeButton: boolean;
|
|
10
|
-
showMaximizeButton: boolean;
|
|
11
|
-
showCloseButton: boolean;
|
|
12
|
-
setTabRef: any;
|
|
13
|
-
onTabDropped: any;
|
|
14
|
-
thisWindowTitle: string;
|
|
15
|
-
boundingBox: any;
|
|
16
|
-
listenForDragOver: any;
|
|
17
|
-
tabs: any;
|
|
18
|
-
onTitleUpdated: any;
|
|
19
|
-
setToolbarRight: any;
|
|
20
|
-
showTabs: boolean;
|
|
21
|
-
alwaysOnTop: boolean;
|
|
22
|
-
}>;
|
|
2
|
+
static contextType: React.Context<import("../../windowTitleBarContext").WindowTitleBarContextType>;
|
|
23
3
|
constructor(props: any);
|
|
24
4
|
bindCorrectContext(): void;
|
|
25
5
|
hoverAction(newHoverState: any): void;
|