@finsemble/finsemble-ui 6.1.1 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/package.json +1 -1
- package/react/actions/favoriteActions.js.map +1 -1
- package/react/actions/linkerActions.js.map +1 -1
- package/react/actions/menuActions.js.map +1 -1
- package/react/actions/rootActions.js.map +1 -1
- package/react/actions/searchActions.js.map +1 -1
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/actions/toolbarActions.js.map +1 -1
- package/react/actions/workspaceActions.js.map +1 -1
- package/react/assets/css/advancedAppLauncher.css +636 -636
- package/react/assets/css/appCatalog.css +1069 -1069
- package/react/assets/css/authentication.css +78 -78
- package/react/assets/css/button.css +219 -219
- package/react/assets/css/core/formElements.css +23 -23
- package/react/assets/css/core/icons.css +69 -69
- package/react/assets/css/core/notifications.css +75 -75
- package/react/assets/css/core/windowFrame.css +36 -36
- package/react/assets/css/dashbar.css +78 -78
- package/react/assets/css/defaultTheme.css +356 -356
- package/react/assets/css/dialogs.css +158 -158
- package/react/assets/css/favorites.css +101 -101
- package/react/assets/css/finsemble.css +38 -38
- package/react/assets/css/focus.css +4 -4
- package/react/assets/css/font-finance.css +385 -385
- package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
- package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
- package/react/assets/css/fonts/font-finance.svg +124 -124
- package/react/assets/css/fonts/icons-reference.html +1174 -1174
- package/react/assets/css/linkerWindow.css +124 -124
- package/react/assets/css/menus.css +195 -195
- package/react/assets/css/notificationsCenter.css +594 -594
- package/react/assets/css/processMonitor.css +213 -213
- package/react/assets/css/search.css +128 -128
- package/react/assets/css/shared/animations.css +99 -99
- package/react/assets/css/tags.css +136 -136
- package/react/assets/css/toolbar.css +413 -413
- package/react/assets/css/userPreferences.css +565 -565
- package/react/assets/css/windowTitleBar.css +619 -619
- package/react/assets/icons/check.svg +3 -3
- package/react/assets/icons/chevron-left.svg +3 -3
- package/react/assets/icons/chevron-right.svg +3 -3
- package/react/assets/icons/copy.svg +10 -10
- package/react/assets/icons/exclamation-circle.svg +4 -4
- package/react/assets/icons/external-link.svg +12 -12
- package/react/assets/icons/flag.svg +10 -10
- package/react/assets/icons/folder.svg +3 -3
- package/react/assets/icons/font.svg +3 -3
- package/react/assets/icons/globe.svg +3 -3
- package/react/assets/icons/hdd.svg +9 -9
- package/react/assets/icons/key.svg +10 -10
- package/react/assets/icons/life-ring.svg +3 -3
- package/react/assets/icons/magic.svg +15 -15
- package/react/assets/icons/moon.svg +10 -10
- package/react/assets/icons/paint-roller.svg +3 -3
- package/react/assets/icons/pencil.svg +10 -10
- package/react/assets/icons/plus.svg +3 -3
- package/react/assets/icons/question-circle.svg +5 -5
- package/react/assets/icons/search.svg +3 -3
- package/react/assets/icons/sun.svg +9 -9
- package/react/assets/icons/times.svg +3 -3
- package/react/assets/icons/toggle-off.svg +6 -6
- package/react/assets/icons/toggle-on.svg +6 -6
- package/react/assets/icons/tools.svg +3 -3
- package/react/assets/icons/trash.svg +12 -12
- package/react/assets/icons/upload.svg +10 -10
- package/react/assets/icons/window.svg +3 -3
- package/react/componentTemplateGenerator.js +85 -85
- package/react/componentTemplateGenerator.js.map +1 -1
- package/react/components/FinsembleProvider.js.map +1 -1
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- package/react/components/appCatalog/components/AppCard.js.map +1 -1
- package/react/components/appCatalog/components/AppList.js.map +1 -1
- package/react/components/appCatalog/components/AppResults.js.map +1 -1
- package/react/components/appCatalog/components/Carousel.js.map +1 -1
- package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
- package/react/components/appCatalog/components/Hero.js.map +1 -1
- package/react/components/appCatalog/components/Home.js.map +1 -1
- package/react/components/appCatalog/components/SearchBar.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
- package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
- package/react/components/appCatalog/components/Tag.js.map +1 -1
- package/react/components/appCatalog/components/Toast.js.map +1 -1
- package/react/components/appCatalog/components/helpers.js.map +1 -1
- package/react/components/appCatalog/index.js.map +1 -1
- package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
- package/react/components/appCatalog/modules/FDC3.js.map +1 -1
- package/react/components/appCatalog/stores/appStore.js.map +1 -1
- package/react/components/appCatalog/stores/storeActions.js.map +1 -1
- package/react/components/common/Button.js.map +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonTile.js.map +1 -1
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/DropZone.js.map +1 -1
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FileInput.js.map +1 -1
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleSelect.js.map +1 -1
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FontSizeSelector.js.map +1 -1
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/ImagePreview.js.map +1 -1
- package/react/components/common/LoadingSpinner.js.map +1 -1
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/Tooltip.js.map +1 -1
- package/react/components/common/css/application-edit-page.css +117 -117
- package/react/components/common/css/application-list.css +47 -47
- package/react/components/common/css/button.css +164 -164
- package/react/components/common/css/color-picker.css +52 -52
- package/react/components/common/css/drop-zone.css +17 -17
- package/react/components/common/css/file-input.css +49 -49
- package/react/components/common/css/header.css +43 -43
- package/react/components/common/css/icon.css +13 -13
- package/react/components/common/css/image-preview.css +57 -57
- package/react/components/common/css/loading-spinner.css +39 -39
- package/react/components/common/css/selector.css +51 -51
- package/react/components/common/css/styles.css +128 -128
- package/react/components/common/css/tab.css +56 -56
- package/react/components/common/css/toggle.css +32 -32
- package/react/components/common/css/tooltip.css +68 -68
- package/react/components/common/file_helpers.js.map +1 -1
- package/react/components/common/fixtures/FinsembleIcon.css +4 -4
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/Button.stories.js.map +1 -1
- package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
- package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/DropZone.stories.js.map +1 -1
- package/react/components/common/stories/FileInput.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
- package/react/components/common/stories/Header.stories.js.map +1 -1
- package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
- package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
- package/react/components/common/stories/Tab.stories.js.map +1 -1
- package/react/components/common/stories/Tooltip.stories.js.map +1 -1
- package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
- package/react/components/common/tests/DropZone.spec.js.map +1 -1
- package/react/components/common/tests/FileInput.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/Header.spec.js.map +1 -1
- package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
- package/react/components/common/tests/Tab.spec.js.map +1 -1
- package/react/components/common/tests/Tooltip.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/favorites/FavoritesShell.js.map +1 -1
- package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
- package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
- package/react/components/favorites/index.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.css +125 -125
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/icon/index.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
- package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
- package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
- package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
- package/react/components/linker/LinkerMenu.js.map +1 -1
- package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
- package/react/components/linker/index.js.map +1 -1
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/Menu.js.map +1 -1
- package/react/components/menu/MenuAutoResizer.js.map +1 -1
- package/react/components/menu/MenuContent.js.map +1 -1
- package/react/components/menu/MenuHotKey.js.map +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuShell.js.map +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/index.js.map +1 -1
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/menu/menuContext.js.map +1 -1
- package/react/components/menu/menuHelpers.js.map +1 -1
- package/react/components/notifications/components/NoNotifications.js.map +1 -1
- package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +1 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
- package/react/components/notifications/constants.js.map +1 -1
- package/react/components/notifications/icons/Card.js.map +1 -1
- package/react/components/notifications/icons/Chevron.js.map +1 -1
- package/react/components/notifications/icons/CloseIcon.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
- package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
- package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
- package/react/components/notifications/index.js.map +1 -1
- package/react/components/notifications/notificationsContext.js.map +1 -1
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/notifications/utils.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindows.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/index.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
- package/react/components/quickComponentForm/index.js.map +1 -1
- package/react/components/quickComponentForm/quickComponent.css +3 -3
- package/react/components/search/Highlight.js.map +1 -1
- package/react/components/search/Highlight.spec.js.map +1 -1
- package/react/components/search/Highlight.stories.js.map +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/search/SearchBestMatch.js.map +1 -1
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/search/SearchProviderResults.js.map +1 -1
- package/react/components/search/SearchResult.js.map +1 -1
- package/react/components/search/SearchResults.js.map +1 -1
- package/react/components/search/index.js.map +1 -1
- package/react/components/shared/Animate.js.map +1 -1
- package/react/components/shared/BellIcon.js.map +1 -1
- package/react/components/shared/BellIconCrossed.js.map +1 -1
- package/react/components/shared/Button.js.map +1 -1
- package/react/components/shared/ConditionalWrapper.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/NavigationButton.js.map +1 -1
- package/react/components/shared/Tag.js.map +1 -1
- package/react/components/shared/TagsMenu.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.js.map +1 -1
- package/react/components/shared/addProtocolToValidURL.spec.js.map +1 -1
- package/react/components/shared/linkerUtil.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/shared/validateURL.js.map +1 -1
- package/react/components/shared/validateURL.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
- package/react/components/singleInputDialog/index.js.map +1 -1
- package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.css +94 -94
- package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
- package/react/components/smartDesktopDesigner/Application.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
- package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
- package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
- package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
- package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
- package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/smartDesktopDesigner/Content.js.map +1 -1
- package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
- package/react/components/smartDesktopDesigner/Export.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
- package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
- package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
- package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
- package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
- package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
- package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
- package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
- package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
- package/react/components/smartDesktopDesigner/View.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
- package/react/components/smartDesktopDesigner/common/views.js +2 -2
- package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
- package/react/components/smartDesktopDesigner/css/applications.css +89 -89
- package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
- package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
- package/react/components/smartDesktopDesigner/css/export.css +163 -163
- package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
- package/react/components/smartDesktopDesigner/css/nav.css +93 -93
- package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
- package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
- package/react/components/smartDesktopDesigner/css/styles.css +179 -179
- package/react/components/smartDesktopDesigner/css/views.css +16 -16
- package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
- package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
- package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js +3 -3
- package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
- package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
- package/react/components/system/System.js.map +1 -1
- package/react/components/system/System.spec.js.map +1 -1
- package/react/components/system/System.stories.js.map +1 -1
- package/react/components/system/SystemTrayComponentShell.js.map +1 -1
- package/react/components/system/index.js.map +1 -1
- package/react/components/toolbar/AutoArrange.js.map +1 -1
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
- package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
- package/react/components/toolbar/NotificationControl.js.map +1 -1
- package/react/components/toolbar/RevealAll.js.map +1 -1
- package/react/components/toolbar/RevealAll.spec.js.map +1 -1
- package/react/components/toolbar/RevealAll.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
- package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
- package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
- package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
- package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
- package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
- package/react/components/toolbar/index.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +94 -94
- package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
- package/react/components/userPreferences/UserPreferences.js.map +1 -1
- package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
- package/react/components/userPreferences/components/Checkbox.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/LeftNav.js.map +1 -1
- package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
- package/react/components/userPreferences/components/content/General.js.map +1 -1
- package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
- package/react/components/userPreferences/index.js.map +1 -1
- package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
- package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
- package/react/components/utils.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
- package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
- package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.css +3 -3
- package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
- package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
- package/react/components/yesNoDialog/index.js.map +1 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/enzymeSetup.js.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useAuth.js.map +1 -1
- package/react/hooks/useDeepEffect.js.map +1 -1
- package/react/hooks/useFavorites.js.map +1 -1
- package/react/hooks/useFavoritesShell.js.map +1 -1
- package/react/hooks/useHotkey.js.map +1 -1
- package/react/hooks/useLinker.js.map +1 -1
- package/react/hooks/useMenu.js.map +1 -1
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/hooks/useOutsideClickDetector.js.map +1 -1
- package/react/hooks/usePubSub.js.map +1 -1
- package/react/hooks/useSearch.js.map +1 -1
- package/react/hooks/useToolbar.js.map +1 -1
- package/react/hooks/useWorkspace.js.map +1 -1
- package/react/reducers/favoriteReducer.js.map +1 -1
- package/react/reducers/linkerReducer.js.map +1 -1
- package/react/reducers/menuReducer.js.map +1 -1
- package/react/reducers/rootReducer.js.map +1 -1
- package/react/reducers/searchReducer.js.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/reducers/toolbarReducer.js.map +1 -1
- package/react/reducers/workspaceReducer.js.map +1 -1
- package/react/store.js.map +1 -1
- package/react/types/advancedAppLauncherTypes.js.map +1 -1
- package/react/types/dashbarTypes.js.map +1 -1
- package/react/types/favoriteTypes.js.map +1 -1
- package/react/types/fdc3.js.map +1 -1
- package/react/types/hotkeyTypes.js.map +1 -1
- package/react/types/iconTypes.js.map +1 -1
- package/react/types/linkerTypes.js.map +1 -1
- package/react/types/searchTypes.js.map +1 -1
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/react/types/workspaceTypes.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.jsx"],"names":[],"mappings":"AAAA,IAAI,oBAAoB,EAAE,4BAA4B,EAAE,YAAY,CAAC;AAErE,IAAI,eAAe,CAAC;AAEpB,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;YACnE,eAAe,GAAG,SAAS,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACtD,oBAAoB,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;YAC9D,oBAAoB,CAAC,QAAQ,CAAC;gBAC7B,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,UAAU;aACjB,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE;YACxE,oBAAoB,CAAC,QAAQ,CAAC;gBAC7B,KAAK,EAAE,iBAAiB;gBACxB,KAAK,EAAE,eAAe;aACtB,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,mCAAmC,EAAE,CAAC,GAAG,EAAE,QAAQ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,yBAAyB,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EACjE,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE;YAC5B,IAAI,UAAU,EAAE;gBACf,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;aACvE;YAED,YAAY,GAAG,YAAY,CAAC;YAC5B,IAAI,EAAE,CAAC;QACR,CAAC,CACD,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC;AAOD,SAAS,UAAU,CAAC,qBAAqB,EAAE,EAAE;IAC5C,4BAA4B,GAAG,qBAAqB,CAAC;IACrD,gBAAgB,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,UAAU,EAAE,CAAC;QACrB,EAAE,CAAC,oBAAoB,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["let UserPreferencesStore, WorkspaceManagementMenuStore, DashbarStore;\
|
|
1
|
+
{"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.jsx"],"names":[],"mappings":"AAAA,IAAI,oBAAoB,EAAE,4BAA4B,EAAE,YAAY,CAAC;AAErE,IAAI,eAAe,CAAC;AAEpB,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;YACnE,eAAe,GAAG,SAAS,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACtD,oBAAoB,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAA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cesContent":["let UserPreferencesStore, WorkspaceManagementMenuStore, DashbarStore;\n\nlet updateConstants;\n\nconst Actions = {\n\tinitialize: function () {\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceActions((err, constants) => {\n\t\t\tupdateConstants = constants;\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.getPreferences((err, data) => {\n\t\t\tUserPreferencesStore.setValue({ field: \"preferences\", value: data });\n\t\t});\n\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t});\n\n\t\t// Get the activeWorkspace and set the value. I could have iterated through the workspaces above and found the active one, but this seems simpler.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err, activeWorkspace) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\tvalue: activeWorkspace,\n\t\t\t});\n\t\t});\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.update\", (err, response) => {\n\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t});\n\n\t\t\t\tif (updateConstants) {\n\t\t\t\t\tswitch (response.data.reason) {\n\t\t\t\t\t\tcase updateConstants.GET_ACTIVE_WORKSPACE:\n\t\t\t\t\t\tcase updateConstants.NEW_WORKSPACE:\n\t\t\t\t\t\tcase updateConstants.IMPORT:\n\t\t\t\t\t\tcase updateConstants.SAVE:\n\t\t\t\t\t\tcase updateConstants.SAVE_AS:\n\t\t\t\t\t\tcase updateConstants.REMOVE:\n\t\t\t\t\t\tcase updateConstants.SWITCH_TO:\n\t\t\t\t\t\tcase updateConstants.SET_WORKSPACE_ORDER:\n\t\t\t\t\t\tcase updateConstants.ADD_WINDOW:\n\t\t\t\t\t\tcase updateConstants.REMOVE_WINDOW:\n\t\t\t\t\t\tcase updateConstants.RENAME:\n\t\t\t\t\t\t\tActions.getWorkspaces();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\tgetWorkspaces(cb = Function.prototype) {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t\tcb();\n\t\t});\n\t},\n\texportWorkspace: function () {\n\t\tvar workspaceName; // ************* needs to be set to selected workspace **********************\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(workspaceName, (err, workspaceDefinition) => {\n\t\t\tvar newTemplateDefinition = FSBL.Clients.WorkspaceClient.convertWorkspaceDefinitionToTemplate(\n\t\t\t\t\"templateX\",\n\t\t\t\tworkspaceDefinition\n\t\t\t);\n\t\t\tFSBL.Clients.WorkspaceClient.saveWorkspaceTemplateToConfigFile(newTemplateDefinition);\n\t\t});\n\t},\n\timportTemplate: function () {\n\t\tvar newTemplateJSONDefinition; // ************* needs to be initialized from file input **********************\n\t\tFSBL.Clients.WorkspaceClient.addWorkspaceTemplateDefinition(newTemplateJSONDefinition, { force: true }, () => {});\n\t},\n\t/**\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t */\n\tdisableScheduledRestart: () => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: false,\n\t\t});\n\t},\n\t/** Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time. */\n\tsetScheduledRestart: (val) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: val,\n\t\t});\n\t},\n};\n\nasync function createLocalStore(done) {\n\t// While the order of these two functions is unimportant, they cannot be done in series as we don't want\n\t// to call the callback until both stores have been initiated. This keeps the initialization function\n\t// executing until both stores either have values, or fail to initialize.\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-UserPreferences-Local-Store\" },\n\t\t(preferencesErr, preferencesStore) => {\n\t\t\tif (preferencesErr) {\n\t\t\t\tFSBL.Clients.Logger.error(\"Error fetching user preferences data: \", preferencesErr);\n\t\t\t}\n\n\t\t\tUserPreferencesStore = preferencesStore;\n\n\t\t\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t\t\t{ store: \"Finsemble-Dashbar-Store\", global: true, persist: true },\n\t\t\t\t(dashbarErr, dashbarStore) => {\n\t\t\t\t\tif (dashbarErr) {\n\t\t\t\t\t\tFSBL.Clients.Logger.error(\"Error fetching dashbar data: \", dashbarErr);\n\t\t\t\t\t}\n\n\t\t\t\t\tDashbarStore = dashbarStore;\n\t\t\t\t\tdone();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the User Preferences Menu.\n *\n * @param {any} cb\n */\nfunction initialize(WorkspaceMngMenuStore, cb) {\n\tWorkspaceManagementMenuStore = WorkspaceMngMenuStore;\n\tcreateLocalStore(() => {\n\t\tActions.initialize();\n\t\tcb(UserPreferencesStore);\n\t});\n}\n\nexport { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions, DashbarStore };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashbarEditor.stories.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stories/DashbarEditor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,qCAAqC,CAAC;AAChE,OAAO,mCAAmC,CAAC;AAG3C,eAAe;IACd,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,aAAa;CACxB,CAAC;AAEF,MAAM,QAAQ,GAAe,CAAC,IAAS,EAAE,EAAE,CAAC,oBAAC,aAAa,OAAK,IAAI,GAAI,CAAC;AAExE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC","sourcesContent":["import React from \"react\";\
|
|
1
|
+
{"version":3,"file":"DashbarEditor.stories.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stories/DashbarEditor.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,MAAM,qCAAqC,CAAC;AAChE,OAAO,mCAAmC,CAAC;AAG3C,eAAe;IACd,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,aAAa;CACxB,CAAC;AAEF,MAAM,QAAQ,GAAe,CAAC,IAAS,EAAE,EAAE,CAAC,oBAAC,aAAa,OAAK,IAAI,GAAI,CAAC;AAExE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC","sourcesContent":["import React from \"react\";\nimport DashbarEditor from \"../components/content/DashbarEditor\";\nimport \"../../../assets/css/finsemble.css\";\nimport { Story } from \"@storybook/react/types-6-0\";\n\nexport default {\n\ttitle: \"User Preferences/Dashbar Editor\",\n\tcomponent: DashbarEditor,\n};\n\nconst Template: Story<any> = (args: any) => <DashbarEditor {...args} />;\n\nexport const Default = Template.bind({});\nDefault.args = {};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/components/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACzC,OAAqB,EACrB,gBAAwB,EACxB,UAAmC,SAAS,EAC3C,EAAE;IACH,MAAM,EAAE,GAAG,OAAO,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,EAAE,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC9B,OAAO,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAC3C,CAAC,CAAC","sourcesContent":["import { ReactWrapper } from \"enzyme\";\
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/components/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACzC,OAAqB,EACrB,gBAAwB,EACxB,UAAmC,SAAS,EAC3C,EAAE;IACH,MAAM,EAAE,GAAG,OAAO,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,EAAE,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC9B,OAAO,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAC3C,CAAC,CAAC","sourcesContent":["import { ReactWrapper } from \"enzyme\";\n\nexport const enzymeQuerySelectorWrapper = (\n\twrapper: ReactWrapper,\n\tquerySelectorStr: string,\n\telement: HTMLElement | undefined = undefined\n) => {\n\tconst el = element ?? document.createElement(\"div\");\n\tel.innerHTML = wrapper.html();\n\treturn el.querySelector(querySelectorStr);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowTitleBarShell.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/WindowTitleBarShell.jsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,O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KAAK,CAAC,eAAe;YAC3C,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;YAClC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,gBAAgB;YAC5D,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;YACxC,YAAY,EAAE,IAAI,CAAC,uBAAuB;YAC1C,iBAAiB,EAAE,eAAe;YAClC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;YACvC,SAAS,EAAE,gBAAgB;YAC3B,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;YACvC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;YACzC,iBAAiB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,uBAAuB;YACtD,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;YACrB,cAAc,EAAE,IAAI,CAAC,gBAAgB;YACrC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAI,gBAAgB;YACvE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;YAC7B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;SACnC,CAAC;QAEF,OAAO,CACN,6BAAK,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAClE,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAC1B,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAkC,CACtG,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport * as React from \"react\";\r\nimport { WindowTitleBarContext } from \"./windowTitleBarContext\";\r\nimport { storeManager, Actions } from \"./stores/windowTitleBarStore\";\r\nimport \"../../assets/css/finsemble.css\";\r\nimport \"../../assets/css/windowTitleBar.css\";\r\nexport class WindowTitleBarShell extends React.Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.store = null;\r\n\r\n\t\tthis.tabBar = null;\r\n\t\tthis.toolbarRight = null;\r\n\r\n\t\tthis.setTabBarRef = (element) => {\r\n\t\t\tthis.tabBar = element;\r\n\t\t};\r\n\r\n\t\tthis.setToolbarRight = (element) => {\r\n\t\t\tthis.toolbarRight = element;\r\n\t\t};\r\n\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.dragEndTimeout = null;\r\n\t\tthis.state = {\r\n\t\t\tactiveTab: FSBL.Clients.WindowClient.getWindowIdentifier(),\r\n\t\t\tallowDragOnCenterRegion: true,\r\n\t\t\talwaysOnTop: false,\r\n\t\t\talwaysOnTopButton: null,\r\n\t\t\tcloseButton: null,\r\n\t\t\tdockingEnabled: null,\r\n\t\t\tdockingIcon: null,\r\n\t\t\thackScrollbar: null,\r\n\t\t\tinitialized: false,\r\n\t\t\tisTopRight: null,\r\n\t\t\tmaxButton: null,\r\n\t\t\tminButton: null,\r\n\t\t\tshowDockingTooltip: null,\r\n\t\t\tshowLinkerButton: null,\r\n\t\t\tshowShareButton: null,\r\n\t\t\tshowTabs: null,\r\n\t\t\tshowTabRegion: null,\r\n\t\t\ttabs: [],\r\n\t\t\ttabBarBoundingBox: null,\r\n\t\t\ttabBarBoundingBox: {},\r\n\t\t\twindowTitle: \"\",\r\n\t\t\tuseDOMBasedMovement: true,\r\n\t\t\tdragHandleName: \"fsbl-drag-handle\",\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.isAlwaysOnTop(null, (err, alwaysOnTop) => {\r\n\t\t\tthis.setState({ ...this.state, alwaysOnTop });\r\n\t\t});\r\n\r\n\t\tfinsembleWindow.addEventListener(\"alwaysOnTop\", this.alwaysOnTopListener);\r\n\t}\r\n\r\n\talwaysOnTopListener({ data: { alwaysOnTop } }) {\r\n\t\tthis.setState({ ...this.state, alwaysOnTop });\r\n\t}\r\n\r\n\t/**\r\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\r\n\t *\r\n\t * @memberof WindowTitleBar\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.onTitleChange = this.onTitleChange.bind(this);\r\n\t\tthis.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);\r\n\t\tthis.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);\r\n\t\tthis.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);\r\n\t\tthis.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);\r\n\t\tthis.showLinkerButton = this.showLinkerButton.bind(this);\r\n\t\tthis.isTopRight = this.isTopRight.bind(this);\r\n\t\tthis.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);\r\n\t\tthis.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);\r\n\t\tthis.setDOMBasedMovement = this.setDOMBasedMovement.bind(this);\r\n\t\tthis.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);\r\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\r\n\t\tthis.onShowTabsChanged = this.onShowTabsChanged.bind(this);\r\n\t\tthis.onTilingStop = this.onTilingStop.bind(this);\r\n\t\tthis.onTilingStart = this.onTilingStart.bind(this);\r\n\t\tthis.resizeDragHandle = this.resizeDragHandle.bind(this);\r\n\t\tthis.onDoubleClick = this.onDoubleClick.bind(this);\r\n\t\tthis.alwaysOnTopListener = this.alwaysOnTopListener.bind(this);\r\n\t\tthis.onInitialized = this.onInitialized.bind(this);\r\n\t}\r\n\r\n\tonInitialized(store) {\r\n\t\tthis.store = store;\r\n\t\tthis.store.addListeners([\r\n\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\r\n\t\t\t{ field: \"Main.showDockingTooltip\", listener: this.onShowDockingToolTip },\r\n\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\r\n\t\t\t{ field: \"Main.dockingEnabled\", listener: this.onDockingEnabledChanged },\r\n\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\r\n\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\r\n\t\t\t{ field: \"Sharer.emitterEnabled\", listener: this.onShareEmitterChanged },\r\n\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\r\n\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\r\n\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\r\n\t\t\t{ field: \"hackScrollbar\", listener: this.onShowTabsChanged },\r\n\t\t\t{ field: \"Main.useDOMBasedMovement\", listener: this.setDOMBasedMovement },\r\n\t\t]);\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\r\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\r\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\r\n\r\n\t\tthis.onStoreChange();\r\n\t\tthis.setState({\r\n\t\t\tinitialized: true,\r\n\t\t});\r\n\t}\r\n\r\n\tonStoreChange() {\r\n\t\tlet activeIdentifier = finsembleWindow.identifier;\r\n\t\tactiveIdentifier.title = this.store.getValue({\r\n\t\t\tfield: \"Main.windowTitle\",\r\n\t\t});\r\n\r\n\t\tthis.setState({\r\n\t\t\twindowTitle: this.store.getValue({ field: \"Main.windowTitle\" }),\r\n\t\t\tminButton: !this.store.getValue({ field: \"Minimize.hide\" }),\r\n\t\t\tmaxButton: !this.store.getValue({ field: \"Maximize.hide\" }),\r\n\t\t\tcloseButton: !this.store.getValue({ field: \"Close.hide\" }),\r\n\t\t\tshowLinkerButton: this.store.getValue({\r\n\t\t\t\tfield: \"Linker.showLinkerButton\",\r\n\t\t\t}),\r\n\t\t\tshowShareButton: this.store.getValue({\r\n\t\t\t\tfield: \"Sharer.emitterEnabled\",\r\n\t\t\t}),\r\n\t\t\tisTopRight: this.store.getValue({ field: \"isTopRight\" }),\r\n\t\t\talwaysOnTopButton: this.store.getValue({\r\n\t\t\t\tfield: \"AlwaysOnTop.show\",\r\n\t\t\t}),\r\n\t\t\tshowTabs: this.store.getValue({ field: \"showTabs\" }),\r\n\t\t\thackScrollbar: this.store.getValue({ field: \"hackScrollbar\" }),\r\n\t\t\ttabs: [activeIdentifier], // array of tabs for this window\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\t// Goal: If a user gets focus into the title bar (if they Alt+Tab or Cmd+Tab into the window),\r\n\t\t// we want to let get into the rest of the component using the keyboard alone. The UX for\r\n\t\t// this task will be to seemingly TAB from the title bar into the window, if possible.\r\n\t\t// Code: If the user presses the \"Tab\" key, move their focus to the browser view\r\n\t\twindow.addEventListener(\"keydown\", (e) => {\r\n\t\t\tif (e.key === \"Tab\") {\r\n\t\t\t\t// This magic moves focus to a browserView, if one exists\r\n\t\t\t\tfinsembleWindow.focus();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlet header = document.getElementsByClassName(\"fsbl-header\")[0];\r\n\t\tlet headerHeight = window.getComputedStyle(header, null).getPropertyValue(\"height\");\r\n\t\tdocument.body.style.marginTop = headerHeight;\r\n\t\tthis.resizeDragHandle();\r\n\t\tthis.hackScrollbar();\r\n\t\tstoreManager.addInitializedListener(this.onInitialized);\r\n\t\tstoreManager.initialize();\r\n\t}\r\n\r\n\tcomponentDidUpdate() {\r\n\t\tthis.resizeDragHandle();\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tstoreManager.removeInitializedListener(this.onInitialized);\r\n\t\tif (this.state.initialized) {\r\n\t\t\tthis.store.removeListeners([\r\n\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"Main.showDockingTooltip\",\r\n\t\t\t\t\tlistener: this.onShowDockingToolTip,\r\n\t\t\t\t},\r\n\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"Main.dockingEnabled\",\r\n\t\t\t\t\tlistener: this.onDockingEnabledChanged,\r\n\t\t\t\t},\r\n\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\r\n\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"Sharer.emitterEnabled\",\r\n\t\t\t\t\tlistener: this.onShareEmitterChanged,\r\n\t\t\t\t},\r\n\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\r\n\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\r\n\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\r\n\t\t\t]);\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\r\n\t\t}\r\n\t}\r\n\r\n\tsetDOMBasedMovement(err, response) {\r\n\t\tif (response && response.hasOwnProperty(\"value\")) {\r\n\t\t\tthis.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tuseDOMBasedMovement: response.value,\r\n\t\t\t\t\tdragHandleName: response.value ? \"fsbl-drag-handle\" : \"fsbl-drag-handle-native-movement\",\r\n\t\t\t\t},\r\n\t\t\t\tthis.resizeDragHandle\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When we are not tiling/tabbing, we want to allow the user to drag the window around via any available space in the tab-region. This function allows that.\r\n\t */\r\n\tallowDragOnCenterRegion() {\r\n\t\tthis.setState({\r\n\t\t\tallowDragOnCenterRegion: true,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.\r\n\t */\r\n\tdisallowDragOnCenterRegion() {\r\n\t\tthis.setState({\r\n\t\t\tallowDragOnCenterRegion: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * When tiling start, we want to find the dragHandler and hide it\r\n\t */\r\n\tonTilingStart() {\r\n\t\tlet dragHandle = document.querySelector(`.${this.state.dragHandleName}`);\r\n\t\tif (dragHandle) {\r\n\t\t\tdragHandle.classList.add(\"hidden\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When tiling stops, we want to find the dragHandler and re-show it\r\n\t */\r\n\tonTilingStop() {\r\n\t\tlet dragHandle = document.querySelector(`.${this.state.dragHandleName}.hidden`);\r\n\t\tif (dragHandle) {\r\n\t\t\tdragHandle.classList.remove(\"hidden\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Called whenever a tab is dropped on a non tab area.\r\n\t * It won't be called when dropped on a tab that handles handle the event.\r\n\t */\r\n\tonDropHandler() {\r\n\t\tFSBL.Clients.WindowClient.cancelTilingOrTabbing({});\r\n\t}\r\n\r\n\t/**\r\n\t * Called when user double clicks on drag handle\r\n\t */\r\n\tonDoubleClick() {\r\n\t\t// Actions.clickMaximize checks the window state\r\n\t\t// and toggles between maximize and minimize.\r\n\t\tActions.clickMaximize();\r\n\t}\r\n\r\n\t/**\r\n\t * The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.\r\n\t * This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width\r\n\t * to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when\r\n\t * changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural\r\n\t * css).\r\n\t *\r\n\t * TODO, remove all of the cq-drag and cq-no-drag\r\n\t * Remove fsbl-drag-region, it is no longer needed\r\n\t * Hide the dragHandle during drop operations, so that it doesn't interfere\r\n\t */\r\n\tresizeDragHandle() {\r\n\t\ttry {\r\n\t\t\tconst fsblHeader = document.querySelector(\".fsbl-header\");\r\n\t\t\tif (!fsblHeader) {\r\n\t\t\t\t// If there isn't an FSBLHeader then there doesn't need to be a drag handle.\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst dragHandleCssClass = this.state.useDOMBasedMovement\r\n\t\t\t\t? \"fsbl-drag-handle\"\r\n\t\t\t\t: \"fsbl-drag-handle-native-movement\";\r\n\r\n\t\t\tconst dragHandleToRemoveClass = this.state.useDOMBasedMovement\r\n\t\t\t\t? \"fsbl-drag-handle-native-movement\"\r\n\t\t\t\t: \"fsbl-drag-handle\";\r\n\r\n\t\t\t// Create the dragger if it doesn't already exist\r\n\t\t\tlet dragHandle = document.querySelector(`.${dragHandleCssClass}`);\r\n\t\t\tif (!dragHandle) {\r\n\t\t\t\tdragHandle = document.createElement(\"div\");\r\n\t\t\t\tdragHandle.className = dragHandleCssClass;\r\n\t\t\t\tconst handleMouseDown = (event) => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.startMovingWindow(event);\r\n\t\t\t\t};\r\n\t\t\t\tconst handleMouseUp = () => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\r\n\t\t\t\t};\r\n\r\n\t\t\t\tdragHandle.onmousedown = handleMouseDown;\r\n\t\t\t\tdragHandle.onmouseup = handleMouseUp;\r\n\t\t\t\tdragHandle.ondblclick = () => {\r\n\t\t\t\t\tthis.onDoubleClick();\r\n\t\t\t\t};\r\n\t\t\t\tfsblHeader.insertBefore(dragHandle, fsblHeader.firstChild);\r\n\t\t\t\tvar self = this;\r\n\t\t\t\twindow.addEventListener(\"resize\", () => {\r\n\t\t\t\t\tself.resizeDragHandle();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// When the titlebar starts up, useDOMBasedMovement will have a default value that is not the same as the config value\r\n\t\t\t// When the value from the config propagates down to the UI, we need to make sure the old drag handle is removed in place of the new\r\n\t\t\tlet dragHandleToRemove = document.querySelector(`.${dragHandleToRemoveClass}`);\r\n\t\t\tif (dragHandleToRemove) {\r\n\t\t\t\tdragHandleToRemove.parentNode.removeChild(dragHandleToRemove);\r\n\t\t\t}\r\n\r\n\t\t\t// Set the height of the dragHandle to match the height of the window title bar\r\n\t\t\t// Do this every time through the render loop just in case a customer builds a\r\n\t\t\t// header bar with dynamic height!\r\n\t\t\tlet bounds = fsblHeader.getBoundingClientRect();\r\n\t\t\tdragHandle.style.height = `${bounds.height - 5}px`; // Subtract 5 pixels from height in order to make room for resize window cursor at top edge of window\r\n\t\t\tdragHandle.style.marginTop = `${-bounds.height + 5}px`; // Negative margin pulls the drag handle up over the fixed header\r\n\r\n\t\t\t// Start logic for determining where to place our dragHandle\r\n\t\t\tif (this.state.showTabs) {\r\n\t\t\t\t// If there is more than one tab, then the drag area is the padding-left of fsbl-header-right\r\n\t\t\t\t// See .fsbl-tabs-multiple in the css\r\n\t\t\t\tif (this.state.tabs.length > 1) {\r\n\t\t\t\t\tlet headerRight = document.querySelector(\".fsbl-header-right\");\r\n\t\t\t\t\tif (headerRight) {\r\n\t\t\t\t\t\tlet computedStyle = getComputedStyle(headerRight);\r\n\t\t\t\t\t\tbounds = headerRight.getBoundingClientRect();\r\n\t\t\t\t\t\t// override the bounds.width with the paddingLeft amount\r\n\t\t\t\t\t\tbounds = {\r\n\t\t\t\t\t\t\tleft: bounds.left,\r\n\t\t\t\t\t\t\twidth: parseInt(computedStyle.paddingLeft, 10),\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// If tabs are not enabled, then the remained of fsbl-header-center beyond the tabs\r\n\t\t\t\t\t// is the draggable area. This assumes left aligned tabs.\r\n\t\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\r\n\t\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\r\n\t\t\t\t\tconst tabRegionWrapperDiv = fsblHeaderCenter.querySelector(\".tab-region-wrapper div\");\r\n\t\t\t\t\tif (tabRegionWrapperDiv) {\r\n\t\t\t\t\t\tconst theTabBounds = tabRegionWrapperDiv.getBoundingClientRect();\r\n\t\t\t\t\t\t// Calculate the right portion\r\n\t\t\t\t\t\tbounds = {\r\n\t\t\t\t\t\t\tleft: bounds.left + theTabBounds.width,\r\n\t\t\t\t\t\t\twidth: bounds.width - theTabBounds.width,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If tabs are not enabled, then the entire center is the drag area\r\n\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\r\n\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\r\n\t\t\t}\r\n\r\n\t\t\tif (bounds) {\r\n\t\t\t\tdragHandle.style.left = `${bounds.left}px`;\r\n\t\t\t\tdragHandle.style.width = `${bounds.width}px`;\r\n\t\t\t}\r\n\r\n\t\t\t// Add an event listener to hide the drag-handler when tiling is started\r\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\r\n\r\n\t\t\t// Add an event listener to show the drag-handler when tiling is stopped or cancelled\r\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\r\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\r\n\t\t} catch (error) {\r\n\t\t\tconsole.error(error);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Whether the component's config allows for the linker.\r\n\t * @param {} err\r\n\t * @param {*} response\r\n\t */\r\n\tshowLinkerButton(err, response) {\r\n\t\tthis.setState({ showLinkerButton: response.value });\r\n\t}\r\n\r\n\t/**\r\n\t * Whether the window is the top-right-most window in a group of windows. If so, it renders a minimize icon for the whole group.\r\n\t * @param {} err\r\n\t * @param {*} response\r\n\t */\r\n\tisTopRight(err, response) {\r\n\t\tthis.setState({ isTopRight: response.value });\r\n\t}\r\n\r\n\t/**\r\n\t * @todo generalize. We'll need to capture title changes from every window in our stack.\r\n\t * @param {*} err\r\n\t * @param {*} response\r\n\t */\r\n\tonTitleChange(err, response) {\r\n\t\tlet { tabs } = this.state;\r\n\t\tlet myIdentifier = FSBL.Clients.WindowClient.getWindowIdentifier();\r\n\r\n\t\ttabs = tabs.map((el) => {\r\n\t\t\tif (!el.windowName && el.name) el.windowName = el.name;\r\n\t\t\tif (!el.name && el.windowName) el.name = el.windowName;\r\n\t\t\treturn el;\r\n\t\t});\r\n\r\n\t\tconst myIndex = tabs.findIndex((el) => el.name === myIdentifier.windowName);\r\n\t\tif (myIndex === -1) return;\r\n\r\n\t\tlet myTab = tabs[myIndex] || {};\r\n\t\tmyTab.title = response.value;\r\n\t\ttabs.splice(myIndex, 1, myTab);\r\n\r\n\t\tthis.setState({\r\n\t\t\twindowTitle: response.value,\r\n\t\t\ttabs: tabs,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * The next few methods are store change handlers that sync local state with the store's state.\r\n\t */\r\n\tonShowDockingToolTip(err, response) {\r\n\t\tthis.setState({ showDockingTooltip: response.value });\r\n\t}\r\n\r\n\tonToggleDockingIcon(err, response) {\r\n\t\tthis.setState({ dockingIcon: response.value });\r\n\t}\r\n\r\n\tonDockingEnabledChanged(err, response) {\r\n\t\tthis.setState({ dockingEnabled: response.value });\r\n\t}\r\n\r\n\tonAlwaysOnTopChanged(err, response) {\r\n\t\tthis.setState({ alwaysOnTopButton: response.value });\r\n\t}\r\n\r\n\tonStoreChanged(newState) {\r\n\t\tthis.setState(newState);\r\n\t}\r\n\r\n\tonShareEmitterChanged(err, response) {\r\n\t\tthis.setState({ showShareButton: response.value });\r\n\t}\r\n\r\n\tonTabsChanged(err, response) {\r\n\t\tthis.setState({\r\n\t\t\ttabs: response.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonShowTabsChanged(err, response) {\r\n\t\tthis.setState({\r\n\t\t\tshowTabs: response.value,\r\n\t\t});\r\n\t}\r\n\r\n\t// Hack the window's scrollbar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\r\n\t// This is turned on by default. Set \"Window Manager.hackScrollbar: false\" to turn it off\r\n\thackScrollbar() {\r\n\t\tif (this.state.hackScrollbar) {\r\n\t\t\tdocument.querySelector(\"html\").style.overflowY = \"hidden\";\r\n\t\t\tdocument.querySelector(\"body\").style.overflowY = \"auto\";\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet showDockingIcon = !this.state.dockingEnabled ? false : this.state.dockingIcon;\r\n\t\tlet isGrouped = this.state.dockingIcon == \"ejector\";\r\n\t\tlet showMinimizeIcon = (isGrouped && this.state.isTopRight) || !isGrouped; // If not in a group or if topright in a group\r\n\t\tlet tabRegionClasses = \"fsbl-tab-area\";\r\n\t\tlet headerClasses = \"fsbl-header\";\r\n\r\n\t\t// If we're showing tabs, we throw these classes on to modify styles.\r\n\t\tif (this.state.showTabs) {\r\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-enabled`;\r\n\t\t}\r\n\t\tif (this.state.tabs.length > 1) {\r\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-multiple`;\r\n\t\t}\r\n\t\tconst context = {\r\n\t\t\tshowLinkerButton: this.state.showLinkerButton,\r\n\t\t\tshowShareButton: this.state.showShareButton,\r\n\t\t\tshowTabRegion: this.state.showTabs,\r\n\t\t\tshowMinimizeButton: this.state.minButton && showMinimizeIcon,\r\n\t\t\tshowMaximizeButton: this.state.maxButton,\r\n\t\t\tonTabDropped: this.allowDragOnCenterRegion,\r\n\t\t\tshowDockingButton: showDockingIcon,\r\n\t\t\tshowCloseButton: this.state.closeButton,\r\n\t\t\tclassName: tabRegionClasses,\r\n\t\t\tthisWindowTitle: this.state.windowTitle,\r\n\t\t\tboundingBox: this.state.tabBarBoundingBox,\r\n\t\t\tlistenForDragOver: !this.state.allowDragOnCenterRegion,\r\n\t\t\ttabs: this.state.tabs,\r\n\t\t\tonTitleUpdated: this.resizeDragHandle,\r\n\t\t\tshowAlwaysOnTopButton: this.state.alwaysOnTopButton && showMinimizeIcon,\r\n\t\t\tshowTabs: this.state.showTabs,\r\n\t\t\talwaysOnTop: this.state.alwaysOnTop,\r\n\t\t};\r\n\r\n\t\treturn (\r\n\t\t\t<div className={headerClasses} onDrop={this.onDropHandler.bind(this)}>\r\n\t\t\t\t{this.state.initialized && (\r\n\t\t\t\t\t<WindowTitleBarContext.Provider value={context}>{this.props.children}</WindowTitleBarContext.Provider>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"WindowTitleBarShell.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/WindowTitleBarShell.jsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,gCAAgC,CAAC;AACxC,OAAO,qCAAqC,CAAC;AAC7C,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,SAAS;IACvD;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAEzB,IAAI,CAAC,YAAY,GAAG,CAAC,OAAO,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACvB,CAAC,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,CAAC,OAAO,EAAE,EAAE;YAClC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC7B,CAAC,CAAC;QAEF,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG;YACZ,SAAS,EAAE,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,WAAW;SACnC,CAAC;QAEF,OAAO,CACN,6BAAK,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAClE,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAC1B,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAkC,CACtG,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport * as React from \"react\";\nimport { WindowTitleBarContext } from \"./windowTitleBarContext\";\nimport { storeManager, Actions } from \"./stores/windowTitleBarStore\";\nimport \"../../assets/css/finsemble.css\";\nimport \"../../assets/css/windowTitleBar.css\";\nexport class WindowTitleBarShell extends React.Component {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.store = null;\n\n\t\tthis.tabBar = null;\n\t\tthis.toolbarRight = null;\n\n\t\tthis.setTabBarRef = (element) => {\n\t\t\tthis.tabBar = element;\n\t\t};\n\n\t\tthis.setToolbarRight = (element) => {\n\t\t\tthis.toolbarRight = element;\n\t\t};\n\n\t\tthis.bindCorrectContext();\n\t\tthis.dragEndTimeout = null;\n\t\tthis.state = {\n\t\t\tactiveTab: FSBL.Clients.WindowClient.getWindowIdentifier(),\n\t\t\tallowDragOnCenterRegion: true,\n\t\t\talwaysOnTop: false,\n\t\t\talwaysOnTopButton: null,\n\t\t\tcloseButton: null,\n\t\t\tdockingEnabled: null,\n\t\t\tdockingIcon: null,\n\t\t\thackScrollbar: null,\n\t\t\tinitialized: false,\n\t\t\tisTopRight: null,\n\t\t\tmaxButton: null,\n\t\t\tminButton: null,\n\t\t\tshowDockingTooltip: null,\n\t\t\tshowLinkerButton: null,\n\t\t\tshowShareButton: null,\n\t\t\tshowTabs: null,\n\t\t\tshowTabRegion: null,\n\t\t\ttabs: [],\n\t\t\ttabBarBoundingBox: null,\n\t\t\ttabBarBoundingBox: {},\n\t\t\twindowTitle: \"\",\n\t\t\tuseDOMBasedMovement: true,\n\t\t\tdragHandleName: \"fsbl-drag-handle\",\n\t\t};\n\n\t\tfinsembleWindow.isAlwaysOnTop(null, (err, alwaysOnTop) => {\n\t\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t\t});\n\n\t\tfinsembleWindow.addEventListener(\"alwaysOnTop\", this.alwaysOnTopListener);\n\t}\n\n\talwaysOnTopListener({ data: { alwaysOnTop } }) {\n\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t}\n\n\t/**\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\n\t *\n\t * @memberof WindowTitleBar\n\t */\n\tbindCorrectContext() {\n\t\tthis.onTitleChange = this.onTitleChange.bind(this);\n\t\tthis.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);\n\t\tthis.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);\n\t\tthis.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);\n\t\tthis.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);\n\t\tthis.showLinkerButton = this.showLinkerButton.bind(this);\n\t\tthis.isTopRight = this.isTopRight.bind(this);\n\t\tthis.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);\n\t\tthis.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);\n\t\tthis.setDOMBasedMovement = this.setDOMBasedMovement.bind(this);\n\t\tthis.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\n\t\tthis.onShowTabsChanged = this.onShowTabsChanged.bind(this);\n\t\tthis.onTilingStop = this.onTilingStop.bind(this);\n\t\tthis.onTilingStart = this.onTilingStart.bind(this);\n\t\tthis.resizeDragHandle = this.resizeDragHandle.bind(this);\n\t\tthis.onDoubleClick = this.onDoubleClick.bind(this);\n\t\tthis.alwaysOnTopListener = this.alwaysOnTopListener.bind(this);\n\t\tthis.onInitialized = this.onInitialized.bind(this);\n\t}\n\n\tonInitialized(store) {\n\t\tthis.store = store;\n\t\tthis.store.addListeners([\n\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t{ field: \"Main.showDockingTooltip\", listener: this.onShowDockingToolTip },\n\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t{ field: \"Main.dockingEnabled\", listener: this.onDockingEnabledChanged },\n\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t{ field: \"Sharer.emitterEnabled\", listener: this.onShareEmitterChanged },\n\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t{ field: \"hackScrollbar\", listener: this.onShowTabsChanged },\n\t\t\t{ field: \"Main.useDOMBasedMovement\", listener: this.setDOMBasedMovement },\n\t\t]);\n\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\n\n\t\tthis.onStoreChange();\n\t\tthis.setState({\n\t\t\tinitialized: true,\n\t\t});\n\t}\n\n\tonStoreChange() {\n\t\tlet activeIdentifier = finsembleWindow.identifier;\n\t\tactiveIdentifier.title = this.store.getValue({\n\t\t\tfield: \"Main.windowTitle\",\n\t\t});\n\n\t\tthis.setState({\n\t\t\twindowTitle: this.store.getValue({ field: \"Main.windowTitle\" }),\n\t\t\tminButton: !this.store.getValue({ field: \"Minimize.hide\" }),\n\t\t\tmaxButton: !this.store.getValue({ field: \"Maximize.hide\" }),\n\t\t\tcloseButton: !this.store.getValue({ field: \"Close.hide\" }),\n\t\t\tshowLinkerButton: this.store.getValue({\n\t\t\t\tfield: \"Linker.showLinkerButton\",\n\t\t\t}),\n\t\t\tshowShareButton: this.store.getValue({\n\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t}),\n\t\t\tisTopRight: this.store.getValue({ field: \"isTopRight\" }),\n\t\t\talwaysOnTopButton: this.store.getValue({\n\t\t\t\tfield: \"AlwaysOnTop.show\",\n\t\t\t}),\n\t\t\tshowTabs: this.store.getValue({ field: \"showTabs\" }),\n\t\t\thackScrollbar: this.store.getValue({ field: \"hackScrollbar\" }),\n\t\t\ttabs: [activeIdentifier], // array of tabs for this window\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\t// Goal: If a user gets focus into the title bar (if they Alt+Tab or Cmd+Tab into the window),\n\t\t// we want to let get into the rest of the component using the keyboard alone. The UX for\n\t\t// this task will be to seemingly TAB from the title bar into the window, if possible.\n\t\t// Code: If the user presses the \"Tab\" key, move their focus to the browser view\n\t\twindow.addEventListener(\"keydown\", (e) => {\n\t\t\tif (e.key === \"Tab\") {\n\t\t\t\t// This magic moves focus to a browserView, if one exists\n\t\t\t\tfinsembleWindow.focus();\n\t\t\t}\n\t\t});\n\t\tlet header = document.getElementsByClassName(\"fsbl-header\")[0];\n\t\tlet headerHeight = window.getComputedStyle(header, null).getPropertyValue(\"height\");\n\t\tdocument.body.style.marginTop = headerHeight;\n\t\tthis.resizeDragHandle();\n\t\tthis.hackScrollbar();\n\t\tstoreManager.addInitializedListener(this.onInitialized);\n\t\tstoreManager.initialize();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.resizeDragHandle();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstoreManager.removeInitializedListener(this.onInitialized);\n\t\tif (this.state.initialized) {\n\t\t\tthis.store.removeListeners([\n\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t\t{\n\t\t\t\t\tfield: \"Main.showDockingTooltip\",\n\t\t\t\t\tlistener: this.onShowDockingToolTip,\n\t\t\t\t},\n\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t\t{\n\t\t\t\t\tfield: \"Main.dockingEnabled\",\n\t\t\t\t\tlistener: this.onDockingEnabledChanged,\n\t\t\t\t},\n\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t\t{\n\t\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t\t\tlistener: this.onShareEmitterChanged,\n\t\t\t\t},\n\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t]);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\t}\n\t}\n\n\tsetDOMBasedMovement(err, response) {\n\t\tif (response && response.hasOwnProperty(\"value\")) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tuseDOMBasedMovement: response.value,\n\t\t\t\t\tdragHandleName: response.value ? \"fsbl-drag-handle\" : \"fsbl-drag-handle-native-movement\",\n\t\t\t\t},\n\t\t\t\tthis.resizeDragHandle\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * When we are not tiling/tabbing, we want to allow the user to drag the window around via any available space in the tab-region. This function allows that.\n\t */\n\tallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: true,\n\t\t});\n\t}\n\n\t/**\n\t * When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.\n\t */\n\tdisallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: false,\n\t\t});\n\t}\n\n\t/**\n\t * When tiling start, we want to find the dragHandler and hide it\n\t */\n\tonTilingStart() {\n\t\tlet dragHandle = document.querySelector(`.${this.state.dragHandleName}`);\n\t\tif (dragHandle) {\n\t\t\tdragHandle.classList.add(\"hidden\");\n\t\t}\n\t}\n\n\t/**\n\t * When tiling stops, we want to find the dragHandler and re-show it\n\t */\n\tonTilingStop() {\n\t\tlet dragHandle = document.querySelector(`.${this.state.dragHandleName}.hidden`);\n\t\tif (dragHandle) {\n\t\t\tdragHandle.classList.remove(\"hidden\");\n\t\t}\n\t}\n\n\t/**\n\t * Called whenever a tab is dropped on a non tab area.\n\t * It won't be called when dropped on a tab that handles handle the event.\n\t */\n\tonDropHandler() {\n\t\tFSBL.Clients.WindowClient.cancelTilingOrTabbing({});\n\t}\n\n\t/**\n\t * Called when user double clicks on drag handle\n\t */\n\tonDoubleClick() {\n\t\t// Actions.clickMaximize checks the window state\n\t\t// and toggles between maximize and minimize.\n\t\tActions.clickMaximize();\n\t}\n\n\t/**\n\t * The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.\n\t * This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width\n\t * to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when\n\t * changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural\n\t * css).\n\t *\n\t * TODO, remove all of the cq-drag and cq-no-drag\n\t * Remove fsbl-drag-region, it is no longer needed\n\t * Hide the dragHandle during drop operations, so that it doesn't interfere\n\t */\n\tresizeDragHandle() {\n\t\ttry {\n\t\t\tconst fsblHeader = document.querySelector(\".fsbl-header\");\n\t\t\tif (!fsblHeader) {\n\t\t\t\t// If there isn't an FSBLHeader then there doesn't need to be a drag handle.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dragHandleCssClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle\"\n\t\t\t\t: \"fsbl-drag-handle-native-movement\";\n\n\t\t\tconst dragHandleToRemoveClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle-native-movement\"\n\t\t\t\t: \"fsbl-drag-handle\";\n\n\t\t\t// Create the dragger if it doesn't already exist\n\t\t\tlet dragHandle = document.querySelector(`.${dragHandleCssClass}`);\n\t\t\tif (!dragHandle) {\n\t\t\t\tdragHandle = document.createElement(\"div\");\n\t\t\t\tdragHandle.className = dragHandleCssClass;\n\t\t\t\tconst handleMouseDown = (event) => {\n\t\t\t\t\tFSBL.Clients.WindowClient.startMovingWindow(event);\n\t\t\t\t};\n\t\t\t\tconst handleMouseUp = () => {\n\t\t\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\n\t\t\t\t};\n\n\t\t\t\tdragHandle.onmousedown = handleMouseDown;\n\t\t\t\tdragHandle.onmouseup = handleMouseUp;\n\t\t\t\tdragHandle.ondblclick = () => {\n\t\t\t\t\tthis.onDoubleClick();\n\t\t\t\t};\n\t\t\t\tfsblHeader.insertBefore(dragHandle, fsblHeader.firstChild);\n\t\t\t\tvar self = this;\n\t\t\t\twindow.addEventListener(\"resize\", () => {\n\t\t\t\t\tself.resizeDragHandle();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// When the titlebar starts up, useDOMBasedMovement will have a default value that is not the same as the config value\n\t\t\t// When the value from the config propagates down to the UI, we need to make sure the old drag handle is removed in place of the new\n\t\t\tlet dragHandleToRemove = document.querySelector(`.${dragHandleToRemoveClass}`);\n\t\t\tif (dragHandleToRemove) {\n\t\t\t\tdragHandleToRemove.parentNode.removeChild(dragHandleToRemove);\n\t\t\t}\n\n\t\t\t// Set the height of the dragHandle to match the height of the window title bar\n\t\t\t// Do this every time through the render loop just in case a customer builds a\n\t\t\t// header bar with dynamic height!\n\t\t\tlet bounds = fsblHeader.getBoundingClientRect();\n\t\t\tdragHandle.style.height = `${bounds.height - 5}px`; // Subtract 5 pixels from height in order to make room for resize window cursor at top edge of window\n\t\t\tdragHandle.style.marginTop = `${-bounds.height + 5}px`; // Negative margin pulls the drag handle up over the fixed header\n\n\t\t\t// Start logic for determining where to place our dragHandle\n\t\t\tif (this.state.showTabs) {\n\t\t\t\t// If there is more than one tab, then the drag area is the padding-left of fsbl-header-right\n\t\t\t\t// See .fsbl-tabs-multiple in the css\n\t\t\t\tif (this.state.tabs.length > 1) {\n\t\t\t\t\tlet headerRight = document.querySelector(\".fsbl-header-right\");\n\t\t\t\t\tif (headerRight) {\n\t\t\t\t\t\tlet computedStyle = getComputedStyle(headerRight);\n\t\t\t\t\t\tbounds = headerRight.getBoundingClientRect();\n\t\t\t\t\t\t// override the bounds.width with the paddingLeft amount\n\t\t\t\t\t\tbounds = {\n\t\t\t\t\t\t\tleft: bounds.left,\n\t\t\t\t\t\t\twidth: parseInt(computedStyle.paddingLeft, 10),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If tabs are not enabled, then the remained of fsbl-header-center beyond the tabs\n\t\t\t\t\t// is the draggable area. This assumes left aligned tabs.\n\t\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\n\t\t\t\t\tconst tabRegionWrapperDiv = fsblHeaderCenter.querySelector(\".tab-region-wrapper div\");\n\t\t\t\t\tif (tabRegionWrapperDiv) {\n\t\t\t\t\t\tconst theTabBounds = tabRegionWrapperDiv.getBoundingClientRect();\n\t\t\t\t\t\t// Calculate the right portion\n\t\t\t\t\t\tbounds = {\n\t\t\t\t\t\t\tleft: bounds.left + theTabBounds.width,\n\t\t\t\t\t\t\twidth: bounds.width - theTabBounds.width,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If tabs are not enabled, then the entire center is the drag area\n\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\n\t\t\t}\n\n\t\t\tif (bounds) {\n\t\t\t\tdragHandle.style.left = `${bounds.left}px`;\n\t\t\t\tdragHandle.style.width = `${bounds.width}px`;\n\t\t\t}\n\n\t\t\t// Add an event listener to hide the drag-handler when tiling is started\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\n\n\t\t\t// Add an event listener to show the drag-handler when tiling is stopped or cancelled\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\n\t\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\n\t/**\n\t * Whether the component's config allows for the linker.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tshowLinkerButton(err, response) {\n\t\tthis.setState({ showLinkerButton: response.value });\n\t}\n\n\t/**\n\t * Whether the window is the top-right-most window in a group of windows. If so, it renders a minimize icon for the whole group.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tisTopRight(err, response) {\n\t\tthis.setState({ isTopRight: response.value });\n\t}\n\n\t/**\n\t * @todo generalize. We'll need to capture title changes from every window in our stack.\n\t * @param {*} err\n\t * @param {*} response\n\t */\n\tonTitleChange(err, response) {\n\t\tlet { tabs } = this.state;\n\t\tlet myIdentifier = FSBL.Clients.WindowClient.getWindowIdentifier();\n\n\t\ttabs = tabs.map((el) => {\n\t\t\tif (!el.windowName && el.name) el.windowName = el.name;\n\t\t\tif (!el.name && el.windowName) el.name = el.windowName;\n\t\t\treturn el;\n\t\t});\n\n\t\tconst myIndex = tabs.findIndex((el) => el.name === myIdentifier.windowName);\n\t\tif (myIndex === -1) return;\n\n\t\tlet myTab = tabs[myIndex] || {};\n\t\tmyTab.title = response.value;\n\t\ttabs.splice(myIndex, 1, myTab);\n\n\t\tthis.setState({\n\t\t\twindowTitle: response.value,\n\t\t\ttabs: tabs,\n\t\t});\n\t}\n\n\t/**\n\t * The next few methods are store change handlers that sync local state with the store's state.\n\t */\n\tonShowDockingToolTip(err, response) {\n\t\tthis.setState({ showDockingTooltip: response.value });\n\t}\n\n\tonToggleDockingIcon(err, response) {\n\t\tthis.setState({ dockingIcon: response.value });\n\t}\n\n\tonDockingEnabledChanged(err, response) {\n\t\tthis.setState({ dockingEnabled: response.value });\n\t}\n\n\tonAlwaysOnTopChanged(err, response) {\n\t\tthis.setState({ alwaysOnTopButton: response.value });\n\t}\n\n\tonStoreChanged(newState) {\n\t\tthis.setState(newState);\n\t}\n\n\tonShareEmitterChanged(err, response) {\n\t\tthis.setState({ showShareButton: response.value });\n\t}\n\n\tonTabsChanged(err, response) {\n\t\tthis.setState({\n\t\t\ttabs: response.value,\n\t\t});\n\t}\n\n\tonShowTabsChanged(err, response) {\n\t\tthis.setState({\n\t\t\tshowTabs: response.value,\n\t\t});\n\t}\n\n\t// Hack the window's scrollbar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\n\t// This is turned on by default. Set \"Window Manager.hackScrollbar: false\" to turn it off\n\thackScrollbar() {\n\t\tif (this.state.hackScrollbar) {\n\t\t\tdocument.querySelector(\"html\").style.overflowY = \"hidden\";\n\t\t\tdocument.querySelector(\"body\").style.overflowY = \"auto\";\n\t\t}\n\t}\n\n\trender() {\n\t\tlet showDockingIcon = !this.state.dockingEnabled ? false : this.state.dockingIcon;\n\t\tlet isGrouped = this.state.dockingIcon == \"ejector\";\n\t\tlet showMinimizeIcon = (isGrouped && this.state.isTopRight) || !isGrouped; // If not in a group or if topright in a group\n\t\tlet tabRegionClasses = \"fsbl-tab-area\";\n\t\tlet headerClasses = \"fsbl-header\";\n\n\t\t// If we're showing tabs, we throw these classes on to modify styles.\n\t\tif (this.state.showTabs) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-enabled`;\n\t\t}\n\t\tif (this.state.tabs.length > 1) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-multiple`;\n\t\t}\n\t\tconst context = {\n\t\t\tshowLinkerButton: this.state.showLinkerButton,\n\t\t\tshowShareButton: this.state.showShareButton,\n\t\t\tshowTabRegion: this.state.showTabs,\n\t\t\tshowMinimizeButton: this.state.minButton && showMinimizeIcon,\n\t\t\tshowMaximizeButton: this.state.maxButton,\n\t\t\tonTabDropped: this.allowDragOnCenterRegion,\n\t\t\tshowDockingButton: showDockingIcon,\n\t\t\tshowCloseButton: this.state.closeButton,\n\t\t\tclassName: tabRegionClasses,\n\t\t\tthisWindowTitle: this.state.windowTitle,\n\t\t\tboundingBox: this.state.tabBarBoundingBox,\n\t\t\tlistenForDragOver: !this.state.allowDragOnCenterRegion,\n\t\t\ttabs: this.state.tabs,\n\t\t\tonTitleUpdated: this.resizeDragHandle,\n\t\t\tshowAlwaysOnTopButton: this.state.alwaysOnTopButton && showMinimizeIcon,\n\t\t\tshowTabs: this.state.showTabs,\n\t\t\talwaysOnTop: this.state.alwaysOnTop,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className={headerClasses} onDrop={this.onDropHandler.bind(this)}>\n\t\t\t\t{this.state.initialized && (\n\t\t\t\t\t<WindowTitleBarContext.Provider value={context}>{this.props.children}</WindowTitleBarContext.Provider>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/Tab.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,KAAK,CAAC,SAAS;IAC/C,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,UAAU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SAAS,EAAC,UAAU,GAAK,CACvB,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import * as React from \"react\";\
|
|
1
|
+
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/Tab.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,KAAK,CAAC,SAAS;IAC/C,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/C,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,OAAO;YACnB,KAAK,EAAE,EAAE;SACT,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,WAAW;QACV,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,UAAU,CAAC,CAAC;QACX,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC;QACvD,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE;YACxC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACv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AsB,IAAC,IAAI,EAAC,KAAK,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI;YAC/E,oBAAC,KAAK,IAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAI;YAC3F,6BACC,SAAS,EAAC,gBAAgB,EAC1B,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1B,CAAC;gBAED,2BAAG,SAAS,EAAC,UAAU,GAAK,CACvB,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import * as React from \"react\";\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\nimport { Title } from \"../windowTitle\";\n/**\n * This component is pretty basic. It just takes a bunch of props and renders them.\n */\nexport default class Tab extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.onDragOver = this.onDragOver.bind(this);\n\t\tthis.onDragLeave = this.onDragLeave.bind(this);\n\n\t\tthis.state = {\n\t\t\thoverState: \"false\",\n\t\t\ttitle: \"\",\n\t\t};\n\t\tthis.tabbingState = false;\n\t}\n\n\tonDragLeave() {\n\t\tthis.tabbingState = false;\n\t\tFSBL.Clients.RouterClient.publish(\"Finsemble.AmTabbing\", false);\n\t}\n\n\tonDragOver(e) {\n\t\tlet boundingBox = this.refs.Me.getBoundingClientRect();\n\t\tif (this.crossedMidline(e, boundingBox)) {\n\t\t\tthis.props.onTabDraggedOver(e, this.props.windowIdentifier);\n\t\t}\n\t\tif (!this.tabbingState) {\n\t\t\tFSBL.Clients.RouterClient.publish(\"Finsemble.AmTabbing\", true);\n\t\t\tthis.tabbingState = true;\n\t\t}\n\t}\n\n\tcrossedMidline(e, box) {\n\t\treturn FSBL.Clients.WindowClient.isPointInBox({ x: e.nativeEvent.clientX, y: e.nativeEvent.clientY }, box);\n\t}\n\n\thoverAction(newHoverState) {\n\t\tthis.setState({ hoverState: newHoverState });\n\t}\n\n\trender() {\n\t\tlet style = {\n\t\t\twidth: this.props.tabWidth,\n\t\t};\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref=\"Me\"\n\t\t\t\tonDrop={this.props.onDrop}\n\t\t\t\tonClick={this.props.onClick}\n\t\t\t\tonDragStart={(e) => {\n\t\t\t\t\tthis.props.onDragStart(e, this.props.windowIdentifier);\n\t\t\t\t}}\n\t\t\t\tonDragEnd={this.props.onDragEnd}\n\t\t\t\tdraggable={true}\n\t\t\t\tclassName={this.props.className}\n\t\t\t\tdata-hover={this.state.hoverState}\n\t\t\t\tstyle={style}\n\t\t\t>\n\t\t\t\t{this.props.listenForDragOver && (\n\t\t\t\t\t<div className=\"tab-drop-region\" onDragOver={this.onDragOver} onDragLeave={this.onDragLeave}></div>\n\t\t\t\t)}\n\t\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\n\t\t\t\t<Title titleWidth={this.props.titleWidth} windowIdentifier={this.props.windowIdentifier} />\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"fsbl-tab-close\"\n\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tthis.props.onTabClose(e);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<i className=\"ff-close\"></i>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -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,O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CACJ,CACN,CAAC;AACH,CAAC;AAMD,SAAS,UAAU;IAClB,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,GAAG,mBAAmB,CAAC;IACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,GAAG,IACH,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD,SAAS,EAAC,MAAM,EAChB,GAAG,EAAE,GAAG,CAAC,UAAU,EACnB,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAClC,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;YAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;YAC1E,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QAC/B,CAAC,EACD,MAAM,EAAE,IAAI,CAAC,IAAI,EACjB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,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.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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,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QAC/B,CAAC,EACD,MAAM,EAAE,IAAI,CAAC,IAAI,EACjB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,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\";\nimport Tab from \"./Tab\";\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\nimport { Store, Actions } from \"../../stores/windowTitleBarStore\";\nimport { Title } from \"../windowTitle\";\nimport _throttle from \"lodash/throttle\";\n\nlet TAB_WIDTH = 300;\n// Next two items are for calculating how large the title should be within a tab.\nconst ICON_AREA = 16;\nconst CLOSE_BUTTON_MARGIN = 12;\nconst MINIMUM_TAB_SIZE = 100;\n\nexport class TabList extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tlet initialState = Store.getValues([\"activeTab\", \"tabs\"]);\n\t\tlet activeIdentifier = finsembleWindow.identifier;\n\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\n\t\tthis.state = {\n\t\t\ttranslateX: 0,\n\t\t\ttabs: initialState.tabs,\n\t\t\tactiveTab: activeIdentifier,\n\t\t\tboundingBox: {},\n\t\t\tiAmDragging: false,\n\t\t\thoverState: false,\n\t\t\ttabWidth: TAB_WIDTH,\n\t\t};\n\t\tthis.bindCorrectContext();\n\t}\n\n\t/**\n\t * Make sure that _this_ is correct inside of our event handlers.\n\t */\n\tbindCorrectContext() {\n\t\tthis.startDrag = this.startDrag.bind(this);\n\t\tthis.stopDrag = this.stopDrag.bind(this);\n\t\tthis.cancelTabbing = this.cancelTabbing.bind(this);\n\t\tthis.drop = this.drop.bind(this);\n\t\tthis.dragOver = this.dragOver.bind(this);\n\t\tthis.dragLeave = this.dragLeave.bind(this);\n\t\tthis.onMouseWheel = this.onMouseWheel.bind(this);\n\t\trenderTitle = renderTitle.bind(this);\n\t\trenderTabs = renderTabs.bind(this);\n\t\tthis.findTabIndex = this.findTabIndex.bind(this);\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\n\t\tthis.onTabAdded = this.onTabAdded.bind(this);\n\t\tthis.onTabClosed = this.onTabClosed.bind(this);\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\n\t\tthis.onStoreChanged = this.onStoreChanged.bind(this);\n\t\t// this.onActiveTabChanged = this.onActiveTabChanged.bind(this);\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\n\t\tthis.onTabDraggedOver = this.onTabDraggedOver.bind(this);\n\t\tthis.isTabRegionOverflowing = this.isTabRegionOverflowing.bind(this);\n\t\tthis.onWindowResize = this.onWindowResize.bind(this);\n\t\tthis.onWindowResizeThrottled = _throttle(this.onWindowResize, 100);\n\t\tthis.getTabWidth = this.getTabWidth.bind(this);\n\t\tthis.setTabListTranslateX = this.setTabListTranslateX.bind(this);\n\t\tthis.onTabListTranslateChanged = this.onTabListTranslateChanged.bind(this);\n\t}\n\n\tgetTabWidth(params = {}) {\n\t\tlet { boundingBox, tabList } = params;\n\t\tif (typeof tabList === \"undefined\") {\n\t\t\ttabList = this.state.tabs;\n\t\t}\n\t\tif (typeof boundingBox === \"undefined\") {\n\t\t\tboundingBox = this.refs.Me.getBoundingClientRect();\n\t\t}\n\t\tif (typeof boundingBox.right === \"undefined\") {\n\t\t\treturn TAB_WIDTH;\n\t\t}\n\t\tlet containerWidth = boundingBox.right - boundingBox.left;\n\t\tlet newTabWidth = containerWidth / tabList.length;\n\n\t\treturn newTabWidth < MINIMUM_TAB_SIZE ? MINIMUM_TAB_SIZE : newTabWidth;\n\t}\n\n\t/**\n\t * Resize handler. Calculates the space that the center-region is taking up. May be used to scale tabs proportionally.\n\t */\n\tonWindowResize() {\n\t\tlet bounds = this.refs.Me.getBoundingClientRect();\n\t\tthis.setState({\n\t\t\tboundingBox: bounds,\n\t\t\ttabWidth: this.getTabWidth(),\n\t\t});\n\t}\n\n\tfindTabIndex(tab) {\n\t\treturn this.state.tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\n\t}\n\n\t/**\n\t *\n\t * Function that's called when this component fires the onDragStart event, this will start the tiling or tabbing process\n\t *\n\t * @param e The SyntheticEvent created by React when the startdrag event is called\n\t * @memberof windowTitleBar\n\t */\n\tstartDrag(e, windowIdentifier) {\n\t\tthis.setState({\n\t\t\tiAmDragging: true,\n\t\t});\n\t\te.dataTransfer.setData(\"application/fsbl-tab-data\", JSON.stringify(windowIdentifier));\n\t\tFSBL.Clients.WindowClient.startTilingOrTabbing({\n\t\t\twindowIdentifier: windowIdentifier,\n\t\t});\n\t}\n\n\t/**\n\t * Called when the react component detects a drop (or stop drag, which is equivalent)\n\t *\n\t * @param e The SyntheticEvent created by React when the stopdrag event is called\n\t * @memberof windowTitleBar\n\t */\n\tstopDrag(e) {\n\t\t// We don't want onDropHandler() in windowTitleBarComponent.jsx\n\t\t// to handle this drop event, so we call event.stopPropagation().\n\t\te.stopPropagation();\n\t\tFSBL.Clients.Logger.system.debug(\"Tab stopDrag.\");\n\t\tthis.mousePositionOnDragEnd = {\n\t\t\tx: e.nativeEvent.screenX,\n\t\t\ty: e.nativeEvent.screenY,\n\t\t};\n\n\t\tconst { boundingBox } = this.state;\n\t\tFSBL.Clients.WindowClient.getBounds((err, bounds) => {\n\t\t\t// We ONLY want to know if we're in the tab region!\n\t\t\tconst tabRegion = {\n\t\t\t\ttop: boundingBox.top + bounds.top,\n\t\t\t\tbottom: boundingBox.bottom + bounds.top,\n\t\t\t\tleft: boundingBox.left + bounds.left,\n\t\t\t\tright: boundingBox.right + bounds.left,\n\t\t\t};\n\t\t\tif (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {\n\t\t\t\t// allow for a 50ms delay so this message goes after a drop message from a target window if tabbing\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({\n\t\t\t\t\t\tmousePosition: this.mousePositionOnDragEnd,\n\t\t\t\t\t});\n\t\t\t\t}, 50);\n\t\t\t\tthis.setState({\n\t\t\t\t\tiAmDragging: false,\n\t\t\t\t});\n\t\t\t\tthis.onWindowResize();\n\t\t\t} else {\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\n\t\t\t\t// to make sure nothing bad happens, call cancel after a similar 50ms delay\n\t\t\t\t// If some action was taken, this will be ignored by Finsemble\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tFSBL.Clients.WindowClient.cancelTilingOrTabbing();\n\t\t\t\t}, 50);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Helper function that will pull data from a drop event, parse it, and return it.\n\t * @param {event} e\n\t */\n\textractWindowIdentifier(e) {\n\t\ttry {\n\t\t\tlet identifier = JSON.parse(e.dataTransfer.getData(\"application/fsbl-tab-data\"));\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).\n\t\t\tif (typeof identifier.windowName !== \"undefined\") {\n\t\t\t\treturn identifier;\n\t\t\t} else if (identifier.waitForIdentifier) {\n\t\t\t\treturn identifier;\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\"Malformed drop object detected in windowTitleBar. Check tab dropping code. Expected windowIdentifier, got \",\n\t\t\t\t\tidentifier\n\t\t\t\t);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (e2) {\n\t\t\tFSBL.Clients.Logger.system.error(\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:\",\n\t\t\t\te2\n\t\t\t);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\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.\n\t * @param {event} e\n\t */\n\tdrop(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tFSBL.Clients.Logger.system.debug(\"Tab drag drop.\");\n\t\tlet identifier = this.extractWindowIdentifier(e);\n\t\tif (!identifier) return; // the dropped item is not a tab\n\t\tif (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)\n\t\t\treturn FSBL.Clients.WindowClient.cancelTilingOrTabbing();\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: \"tabbing\" }, () => {\n\t\t\tFSBL.Clients.RouterClient.transmit(\"tabbingDragEnd\", { success: true });\n\t\t\tif (identifier && identifier.windowName) {\n\t\t\t\t// Calls a method defined inside of windowTitleBar.jsx.\n\t\t\t\tthis.onTabAdded(identifier, this.state.hoveredTabIndex);\n\t\t\t} else if (identifier && identifier.waitForIdentifier) {\n\t\t\t\tlet subscribeId;\n\t\t\t\tlet tabIdentifierSubscriber = (err, response) => {\n\t\t\t\t\tif (!response.data.windowName) return;\n\t\t\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscribeId);\n\t\t\t\t\tthis.onTabAdded(response.data, this.state.hoveredTabIndex);\n\t\t\t\t};\n\t\t\t\tsubscribeId = FSBL.Clients.RouterClient.subscribe(`Finsemble.${identifier.guid}`, tabIdentifierSubscriber);\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\"Unexpected drop event on window title bar. Check the 'drop' method on TabRegion.jsx.\"\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\n\tisTabRegionOverflowing() {\n\t\tlet lastTab = {\n\t\t\tright: this.state.tabs.length * this.state.tabWidth,\n\t\t};\n\t\treturn lastTab.right + this.state.translateX > this.state.boundingBox.right - this.state.boundingBox.left;\n\t}\n\n\t/**\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.\n\t * @param {event} e\n\t */\n\tonMouseWheel(e) {\n\t\te.preventDefault();\n\t\tlet numTabs = this.state.tabs.length;\n\t\tlet translateX = 0;\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.\n\t\tif (numTabs > 1) {\n\t\t\tlet currentX = this.refs.Me.scrollLeft;\n\t\t\tlet { boundingBox } = this.state;\n\t\t\t// Figure out position of first tab and last tab.\n\t\t\tlet firstTab = {\n\t\t\t\tleft: 0 + boundingBox.left,\n\t\t\t};\n\t\t\tlet lastTab = {\n\t\t\t\tright: numTabs * this.state.tabWidth,\n\t\t\t};\n\t\t\tlet deltaX = this.state.tabWidth / 3;\n\t\t\tif (e.nativeEvent.deltaY < 0) {\n\t\t\t\tdeltaX = 0 - deltaX;\n\t\t\t}\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.\n\t\t\tif (Math.abs(deltaX) > this.state.tabWidth) {\n\t\t\t\tlet isNegative = false;\n\t\t\t\tif (deltaX < 0) {\n\t\t\t\t\tisNegative = true;\n\t\t\t\t}\n\t\t\t\tdeltaX = isNegative ? 0 - this.state.tabWidth : this.state.tabWidth;\n\t\t\t}\n\n\t\t\t// when we set scrollLeft on the element, this event fires. But there's no actual event. so stop.\n\t\t\tif (!e.nativeEvent.deltaY) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet originalDeltaY = e.nativeEvent.deltaY;\n\t\t\tlet deltaY = originalDeltaY;\n\t\t\tif (Math.abs(originalDeltaY) > this.state.tabWidth / 3) {\n\t\t\t\tdeltaY = this.state.tabWidth / 3;\n\t\t\t\tif (originalDeltaY < 0) {\n\t\t\t\t\tdeltaY = 0 - deltaY;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttranslateX = deltaY + currentX;\n\t\t\tlet maxRight = boundingBox.right - this.state.tabWidth;\n\t\t\tlet newRightForLastTab = lastTab.right + translateX;\n\t\t\tlet newLeftForFirstTab = firstTab.left + translateX;\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.\n\t\t\tif (newLeftForFirstTab < 0) {\n\t\t\t\treturn this.scrollToFirstTab();\n\t\t\t} else if (e.nativeEvent.deltaY < 0 && newRightForLastTab <= boundingBox.right) {\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.\n\t\t\t\treturn this.scrollToLastTab();\n\t\t\t}\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.\n\t\t\ttranslateX < 0 ? (translateX = 0) : translateX;\n\t\t\tthis.setState({ translateX });\n\t\t}\n\t}\n\n\t/**\n\t * Scrolls to our active tab.\n\t */\n\tscrollToActiveTab() {\n\t\tthis.scrollToTab(this.state.activeTab);\n\t}\n\n\t/**\n\t * Scrolls to the first tab in our list of tabs.\n\t */\n\tscrollToFirstTab() {\n\t\tlet firstTab = this.state.tabs[0];\n\t\tthis.scrollToTab(firstTab);\n\t}\n\n\t/**\n\t * Scrolls to the last tab in our list of tabs\n\t */\n\tscrollToLastTab() {\n\t\tlet lastTab = this.state.tabs[this.state.tabs.length - 1];\n\t\tthis.scrollToTab(lastTab);\n\t}\n\n\t/**\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.\n\t * @param {} tab\n\t */\n\tscrollToTab(tab) {\n\t\t// 'BoundingBox' is just the boundingClientRect of the tab region. It is, in essence, the center part of the windowTitleBar.\n\t\tlet { boundingBox } = this.state;\n\n\t\tlet tabIndex = this.state.tabs.findIndex((el) => el.windowName === tab.windowName && el.uuid === tab.uuid);\n\t\tif (tabIndex > -1) {\n\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\n\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\n\t\t\tlet translateX = rightEdgeOfTab;\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.\n\n\t\t\t// If there's no overflow, we don't scroll.\n\t\t\tif (rightEdgeOfTab < boundingBox.right) {\n\t\t\t\ttranslateX = 0;\n\t\t\t} else {\n\t\t\t\t// Other tabs are less simple.\n\t\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\n\t\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\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.\n\t\t\t\ttranslateX = boundingBox.right - boundingBox.left - rightEdgeOfTab;\n\t\t\t\t// If there's no overflow, we don't scroll.\n\t\t\t\tif (rightEdgeOfTab < boundingBox.right) {\n\t\t\t\t\ttranslateX = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.setTabListTranslateX(translateX);\n\t\t}\n\t}\n\n\tsetTabListTranslateX(translateX) {\n\t\tActions.setTabListScrollPosition(translateX);\n\t}\n\n\t/**\n\t * Someone is dragging _something_ over the tab region. We respond by rendering the ghost tab.\n\t * @param {event} e\n\t */\n\tdragOver(e) {\n\t\te.preventDefault();\n\t}\n\n\t/**\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.\n\t * @param {event} e\n\t */\n\tdragLeave(e) {\n\t\tlet boundingRect = this.state.boundingBox;\n\t\tif (!FSBL.Clients.WindowClient.isPointInBox({ x: e.screenX, y: e.screenY }, boundingRect)) {\n\t\t\tthis.setState({\n\t\t\t\thoveredTabIndex: undefined,\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Set to a timeout. An event is sent to the RouterClient which will be handled by the drop handler on the window.\n\t * In the event that a drop handler never fires to stop tiling or tabbing, this will take care of it.\n\t *\n\t * @memberof windowTitleBar\n\t */\n\tcancelTabbing() {\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true });\n\t\tthis.onWindowResize();\n\t}\n\n\t/**\n\t * Basically exists just to keep the render method clean. Gives conditional classes to the active tab.\n\t * @param {tab} tab\n\t */\n\tgetTabClasses(tab) {\n\t\tlet classes = \"fsbl-tab\";\n\t\tlet tabIndex = this.findTabIndex(tab);\n\t\tif (tabIndex === this.state.hoveredTabIndex) classes = `${classes} ghost-tab`;\n\t\tif (this.state.activeTab && tab.windowName === this.state.activeTab.windowName) {\n\t\t\tclasses = `${classes} fsbl-active-tab`;\n\t\t}\n\t\treturn classes;\n\t}\n\n\tonTabDraggedOver(e, tabDraggedOver) {\n\t\te.preventDefault();\n\t\t// Find index of tab.\n\t\tlet tabIndex = this.findTabIndex(tabDraggedOver);\n\t\tthis.setState({\n\t\t\thoveredTabIndex: tabIndex,\n\t\t});\n\t}\n\n\t/**\n\t * OnClick handler for the close button on individual tabs.\n\t * @PLACEHOLDER will interact with tabbing API\n\t * @param {*} tab\n\t */\n\tonTabClosed(identifier) {\n\t\tActions.closeTab(identifier);\n\t}\n\n\t/**\n\t * drop handler for the tab region.\n\t * @param {*} tab\n\t */\n\tonTabAdded(identifier, newIndex) {\n\t\tif (newIndex === -1) {\n\t\t\tnewIndex = undefined;\n\t\t}\n\n\t\tlet myIdentifier = finsembleWindow.identifier;\n\t\tmyIdentifier.title = finsembleWindow.windowOptions.title;\n\t\tif (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {\n\t\t\treturn;\n\t\t}\n\t\tActions.reorderTab(identifier, newIndex);\n\t\tthis.setState({\n\t\t\thoveredTabIndex: undefined,\n\t\t});\n\t}\n\n\t/**\n\t * OnClick handler for individual tabs.\n\t * @PLACEHOLDER will interact with tabbing API\n\t * @param {*} tab\n\t */\n\tsetActiveTab(tab) {\n\t\tActions.setActiveTab(tab);\n\t}\n\n\tonStoreChanged(prop, value) {\n\t\tthis.setState({\n\t\t\t[prop]: value,\n\t\t});\n\t}\n\n\tonTabsChanged(err, response) {\n\t\tlet { value } = response;\n\t\tthis.setState({\n\t\t\ttabs: value,\n\t\t\ttabWidth: this.getTabWidth({ tabList: value }),\n\t\t});\n\t}\n\n\tonTabListTranslateChanged(err, response) {\n\t\tlet { value } = response;\n\t\tthis.setState({\n\t\t\ttranslateX: value,\n\t\t});\n\t}\n\n\tUNSAFE_componentWillMount() {\n\t\t// Store.addListener({ field: \"activeTab\" }, this.onActiveTabChanged);\n\t\tStore.addListener({ field: \"tabs\" }, this.onTabsChanged);\n\t\tStore.addListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\n\t}\n\n\tcomponentDidMount() {\n\t\twindow.addEventListener(\"resize\", this.onWindowResizeThrottled);\n\t\tlet boundingBox = this.refs.Me.getBoundingClientRect();\n\t\tthis.setState({\n\t\t\tboundingBox: boundingBox,\n\t\t\ttabWidth: this.getTabWidth({ boundingBox }),\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// Store.removeListener({ field: \"activeTab\" }, this.onActiveTabChanged);\n\t\tStore.removeListener({ field: \"tabs\" }, this.onTabsChanged);\n\t\tStore.removeListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\n\t\twindow.removeEventListener(\"resize\", this.onWindowResizeThrottled);\n\t}\n\n\thoverAction(newHoverState) {\n\t\tthis.setState({ hoverState: newHoverState });\n\t}\n\n\trender() {\n\t\tlet { translateX } = this.state;\n\t\ttranslateX = Math.abs(translateX);\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.\n\n\t\tlet componentToRender = \"title\";\n\t\tif (this.state.tabs.length === 1) {\n\t\t\tif (this.props.listenForDragOver && !this.state.iAmDragging) {\n\t\t\t\tcomponentToRender = \"tabs\";\n\t\t\t}\n\t\t}\n\t\tif (this.state.tabs.length > 1) {\n\t\t\tcomponentToRender = \"tabs\";\n\t\t}\n\t\t// Cleanup in case we were translated before closing the second to last tab. This left-aligns the title.\n\t\tif (componentToRender === \"title\") {\n\t\t\ttranslateX = 0;\n\t\t}\n\n\t\tif (this.refs.Me) {\n\t\t\tthis.refs.Me.scrollLeft = translateX;\n\t\t}\n\n\t\tlet moveAreaClasses = \"fsbl-tab-region-drag-area\";\n\t\tif (this.isTabRegionOverflowing()) {\n\t\t\tmoveAreaClasses = `${moveAreaClasses} gradient`;\n\t\t}\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref=\"Me\"\n\t\t\t\tonDragLeave={this.dragLeave}\n\t\t\t\tclassName={this.props.className}\n\t\t\t\tonWheel={this.onMouseWheel}\n\t\t\t\tonScroll={this.onMouseWheel}\n\t\t\t\tonDrop={this.drop}\n\t\t\t\tonDragOver={this.dragOver}\n\t\t\t>\n\t\t\t\t<div className=\"tab-region-wrapper\">\n\t\t\t\t\t{componentToRender === \"title\" && renderTitle()}\n\t\t\t\t\t{componentToRender === \"tabs\" && renderTabs()}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n/**\n * Function to render the title. Helps keep the render code clean.\n */\nfunction renderTitle() {\n\treturn (\n\t\t<div\n\t\t\tdraggable=\"true\"\n\t\t\tonDragStart={(e) => {\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag start - TITLE\");\n\t\t\t\tlet activeIdentifier = finsembleWindow.identifier;\n\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\n\t\t\t\tthis.startDrag(e, activeIdentifier);\n\t\t\t}}\n\t\t\tonDragEnd={this.stopDrag}\n\t\t\tdata-hover={this.state.hoverState}\n\t\t\tclassName={\"fsbl-header-title\"}\n\t\t>\n\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\n\t\t\t<Title\n\t\t\t\tonUpdate={this.props.onTitleUpdated}\n\t\t\t\twindowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()}\n\t\t\t></Title>\n\t\t</div>\n\t);\n}\n\n/**\n * Renders the array of tabs.\n * @param {*} props\n */\nfunction renderTabs() {\n\tlet titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;\n\treturn this.state.tabs.map((tab) => (\n\t\t<Tab\n\t\t\tonClick={() => {\n\t\t\t\tthis.setActiveTab(tab);\n\t\t\t}}\n\t\t\tdraggable=\"true\"\n\t\t\tkey={tab.windowName} // this is a unique identifier for React so it knows when to update the DOM\n\t\t\tclassName={this.getTabClasses(tab)}\n\t\t\tonDragStart={(e, identifier) => {\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag - TAB\", identifier.windowName);\n\t\t\t\tthis.startDrag(e, identifier);\n\t\t\t}}\n\t\t\tonDrop={this.drop}\n\t\t\tonDragEnd={this.stopDrag}\n\t\t\tonTabClose={() => {\n\t\t\t\tthis.onTabClosed(tab);\n\t\t\t}}\n\t\t\tonTabDraggedOver={this.onTabDraggedOver}\n\t\t\tlistenForDragOver={this.props.listenForDragOver}\n\t\t\ttabWidth={this.state.tabWidth}\n\t\t\ttitleWidth={titleWidth}\n\t\t\twindowIdentifier={tab}\n\t\t/>\n\t));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabRegion.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabRegion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC7B,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,EAAE,GACtG,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACzC,OAAO,CACN;QACE,CAAC,QAAQ,IAAI,CACb,6BAAK,SAAS,EAAC,oBAAoB;YAClC,oBAAC,KAAK,IAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,GAAI,CACvE,CACN;QACA,QAAQ,IAAI,CACZ,oBAAC,OAAO,IACP,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,eAAe,EACzB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,GAC7B,CACF,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\
|
|
1
|
+
{"version":3,"file":"TabRegion.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabRegion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC7B,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,EAAE,GACtG,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACzC,OAAO,CACN;QACE,CAAC,QAAQ,IAAI,CACb,6BAAK,SAAS,EAAC,oBAAoB;YAClC,oBAAC,KAAK,IAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,GAAI,CACvE,CACN;QACA,QAAQ,IAAI,CACZ,oBAAC,OAAO,IACP,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,eAAe,EACzB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,GAC7B,CACF,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport { TabList } from \"./TabList\";\nimport { WindowTitleBarContext } from \"../../windowTitleBarContext\";\nimport { Title } from \"../windowTitle\";\n\nexport const TabRegion = () => {\n\tconst { showTabs, thisWindowTitle, boundingBox, onTabDropped, listenForDragOver, tabs, onTitleUpdated } =\n\t\tReact.useContext(WindowTitleBarContext);\n\treturn (\n\t\t<>\n\t\t\t{!showTabs && (\n\t\t\t\t<div className=\"fsbl-header-center\">\n\t\t\t\t\t<Title windowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{showTabs && (\n\t\t\t\t<TabList\n\t\t\t\t\tonTabDropped={onTabDropped}\n\t\t\t\t\tclassName=\"fsbl-tab-area\"\n\t\t\t\t\tthisWindowTitle={thisWindowTitle}\n\t\t\t\t\tboundingBox={boundingBox}\n\t\t\t\t\tlistenForDragOver={listenForDragOver}\n\t\t\t\t\ttabs={tabs}\n\t\t\t\t\tonTitleUpdated={onTitleUpdated}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -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;AAEjD,OAAO,EAAE,YAAY,EAAE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BAAgB;YAC/D,oBAAC,gBAAgB,OAAG,CACf;QACN,oBAAC,YAAY,OAAG,CACX,CACN,CACC,CACH,CAAC;AACH,CAAC,CAAC;AAQF,MAAM,WAAW,GAAG,GAAG,EAAE;IACxB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACd,CAAC,KAAK,IAAI,EAAE;YACX,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;gBAC9D,KAAK,EAAE,yCAAyC;aAChD,CAAC,CAAC;YACH,IAAI,IAAI,EAAE;gBACT,cAAc,CAAC,yBAAyB,CAAC,CAAC;aAC1C;iBAAM;gBACN,cAAc,CAAC,eAAe,CAAC,CAAC;aAChC;QACF,CAAC,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,iBAAiB,OAAG,CACX,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,sBAAsB,OAAG,CACtE,CACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,WAAW,OAAG,CAAC","sourcesContent":["/*!\
|
|
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;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,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AACH,CAAC,CAAC;AAQF,MAAM,WAAW,GAAG,GAAG,EAAE;IACxB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACd,CAAC,KAAK,IAAI,EAAE;YACX,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;gBAC9D,KAAK,EAAE,yCAAyC;aAChD,CAAC,CAAC;YACH,IAAI,IAAI,EAAE;gBACT,cAAc,CAAC,yBAAyB,CAAC,CAAC;aAC1C;iBAAM;gBACN,cAAc,CAAC,eAAe,CAAC,CAAC;aAChC;QACF,CAAC,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,iBAAiB,OAAG,CACX,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,sBAAsB,OAAG,CACtE,CACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,WAAW,OAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React, { useRef, useEffect } from \"react\";\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\nimport { LinkerGroups } from \"./LinkerGroups\";\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\nimport { actions, LinkerStore, store } from \"../../../linker/remoteRedux\";\nimport { LinkerButton as LinkerButtonDeprecated } from \"./LinkerButtonDeprecated\";\n\nconst LinkerButtonIcon = () => (\n\t<svg\n\t\twidth=\"15px\"\n\t\theight=\"15px\"\n\t\tviewBox=\"2 1 13 13\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\n\t>\n\t\t<title>Linker</title>\n\t\t<defs>\n\t\t\t<path\n\t\t\t\tid=\"prefix__b\"\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\"\n\t\t\t/>\n\t\t\t<filter id=\"prefix__a\" x=\"-28.6%\" y=\"-7.1%\" width=\"157.1%\" height=\"128.6%\">\n\t\t\t\t<feOffset dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n\t\t\t\t<feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\".5\" />\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\" />\n\t\t\t</filter>\n\t\t</defs>\n\t\t<g transform=\"rotate(45 22.289 4.682)\" fillRule=\"nonzero\" fill=\"none\">\n\t\t\t<use filter=\"url(#prefix__a)\" xlinkHref=\"#prefix__b\" />\n\t\t\t<use xlinkHref=\"#prefix__b\" />\n\t\t</g>\n\t</svg>\n);\n\nconst LinkerButtonRedux: React.FunctionComponent = () => {\n\tconst dispatch = useDispatch();\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\n\tconst buttonRef = useRef(null);\n\n\tconst showLinkerWindow = () => {\n\t\t//TODO, import this action creator from finsemble-core\n\t\tdispatch(\n\t\t\tactions.setActiveWindow({\n\t\t\t\ttype: \"linker/setActiveWindow\",\n\t\t\t\tpayload: {\n\t\t\t\t\twindowName: finsembleWindow.name,\n\t\t\t\t},\n\t\t\t})\n\t\t);\n\n\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\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.\n\t\t// Necessary to cast because refs are type \"Element\" (which could be an SVGElement...)\n\n\t\tconst linkerButton = buttonRef.current;\n\t\tif (linkerButton) {\n\t\t\tconst linkerButtonDiv = linkerButton as HTMLElement;\n\t\t\tconst linkerParent = (linkerButtonDiv.offsetParent ?? linkerButtonDiv.parentElement) as HTMLElement;\n\n\t\t\tconst params: SpawnParams = {\n\t\t\t\tposition: \"relative\",\n\t\t\t\tleft: linkerParent?.offsetLeft ?? 0,\n\t\t\t\ttop: linkerParent?.offsetHeight ?? 0,\n\t\t\t\tforceOntoMonitor: true,\n\t\t\t\tspawnIfNotFound: false,\n\t\t\t};\n\t\t\tconst wi = {\n\t\t\t\tcomponentType: \"linkerWindow\",\n\t\t\t};\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(linkerButtonDiv, wi, params);\n\t\t}\n\t};\n\n\t// If this window is in the list of linker clients then display this button\n\t// @ts-ignore: finsembleWindow.name is possibly undefined\n\tconst displayMe = state.clients[finsembleWindow.name] !== undefined;\n\n\t// Add keyboard shortcut to launch the Linker Menu\n\t// Using `addBrowserHotkey` so that the linker menu is only launched when the user is focused on the titlebar\n\t// If we had used `addGlobalHotkey`, it would cause a lot of intermittent errors (linker menu would think it\n\t// was launched from the Notifications Center component for some reason, and would display incorrect channel\n\t// information, or float the linker menu in the wrong location. Lots of flakiness.)\n\tFSBL.Clients.HotkeyClient.addBrowserHotkey([\"CommandOrControl\", \"l\"], showLinkerWindow);\n\n\treturn (\n\t\t<>\n\t\t\t{displayMe && (\n\t\t\t\t<div ref={buttonRef} title=\"Link Data\" className=\"linkerSection\">\n\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" onClick={showLinkerWindow}>\n\t\t\t\t\t\t<LinkerButtonIcon />\n\t\t\t\t\t</div>\n\t\t\t\t\t<LinkerGroups />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\n/**\n * Picks whether to display the current or deprecated LinkerElement.\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\n *\n * This code should be removed once the linkerClient is removed from Finsemble.\n */\nconst WhichLinker = () => {\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst { err, data } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\n\t\t\t});\n\t\t\tif (data) {\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\n\t\t\t} else {\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\n\t\t\t}\n\t\t})();\n\t}, []);\n\n\treturn (\n\t\t<>\n\t\t\t{whichLinker === \"LinkerElement\" && (\n\t\t\t\t<Provider store={store}>\n\t\t\t\t\t<LinkerButtonRedux />\n\t\t\t\t</Provider>\n\t\t\t)}\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerButtonDeprecated />}\n\t\t</>\n\t);\n};\n\nexport const LinkerButton: React.FunctionComponent = () => <WhichLinker />;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkerButtonDeprecated.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButtonDeprecated.jsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC9B,6BACC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,E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BAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC9F,mBAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACnG,CAAC;IAQD,MAAM;QACL,OAAO,CACN,0CACE,IAAI,CAAC,OAAO,CAAC,gBAAgB,IAAI,CACjC,6BAAK,GAAG,EAAC,cAAc,EAAC,KAAK,EAAC,WAAW,EAAC,SAAS,EAAC,eAAe;YAClE,6BAAK,SAAS,EAAC,uBAAuB,gBAAa,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB;gBACvG,oBAAC,gBAAgB,OAAG;gBACpB,oBAAC,sBAAsB,IAAC,IAAI,EAAC,UAAU,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAI,CACpE;YACN,oBAAC,YAAY,OAAG,CACX,CACN,CACC,CACH,CAAC;IACH,CAAC;;AAlKM,wBAAW,GAAG,qBAAqB,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n *\r\n * This is a deprecated version of the LinkerButton which uses linkerClient. It is not compatible with FDC3 interop.\r\n */\r\nimport * as React from \"react\";\r\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\r\nimport { WindowTitleBarContext } from \"../../windowTitleBarContext\";\r\nimport LinkerGroups from \"./LinkerGroupsDeprecated\";\r\nimport { getStore } from \"../../stores/windowTitleBarStore\";\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\nlet windowTitleBarStore;\r\n\r\n/**\r\n * Linker button; located on the left side of the windowTitleBar.\r\n */\r\nexport class LinkerButton extends React.Component {\r\n\tstatic contextType = WindowTitleBarContext;\r\n\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.bindCorrectContext();\r\n\t\t/**\r\n\t\t * We assign in the constructor instead of via a require at the top of the file because the store is initialized asynchronously.\r\n\t\t */\r\n\t\twindowTitleBarStore = getStore();\r\n\t\tthis.state = {\r\n\t\t\tchannels: {},\r\n\t\t\tallChannels: {},\r\n\t\t\tshowLinker: false,\r\n\t\t\thoverState: \"false\",\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\r\n\t *\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.onChannelsChange = this.onChannelsChange.bind(this);\r\n\t\tthis.onAllChannelsChange = this.onAllChannelsChange.bind(this);\r\n\t\tthis.onShowLinkerButton = this.onShowLinkerButton.bind(this);\r\n\t\tthis.hoverAction = this.hoverAction.bind(this);\r\n\t\tthis.showLinkerWindow = this.showLinkerWindow.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * When the user selects/deselects a channel in the linkerWindow, this event listener is invoked.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tonChannelsChange(err, response) {\r\n\t\tthis.setState({ channels: response.value });\r\n\t}\r\n\r\n\t/**\r\n\t * This listener is invoked when a new channel is registered with linkerService.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tonAllChannelsChange(err, response) {\r\n\t\tthis.setState({ allChannels: response.value });\r\n\t}\r\n\r\n\t/**\r\n\t * When we read the config from the window, we determine if the linker button should be shown. When that value changes, this listener is invoked.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tonShowLinkerButton(err, response) {\r\n\t\tthis.setState({ showLinker: response.value });\r\n\t}\r\n\r\n\t/**\r\n\t * When any data in the store changes, we invoke this listener.\r\n\t *\r\n\t * @param {any} newState\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tonStoreChanged(newState) {\r\n\t\tthis.setState(newState);\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when the linker button is clicked.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tshowLinkerWindow(e) {\r\n\t\te.persist(); // So that React allows us to access the target\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tlet payload = {\r\n\t\t\tchannels: FSBL.Clients.LinkerClient.getState().channels,\r\n\t\t\twindowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier(),\r\n\t\t};\r\n\t\tlet self = this;\r\n\t\tFSBL.Clients.RouterClient.query(\"Finsemble.LinkerWindow.SetActiveChannels\", payload, () => {\r\n\t\t\tlet wi = {\r\n\t\t\t\tcomponentType: \"linkerWindow\",\r\n\t\t\t};\r\n\t\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\r\n\t\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\tlet linkerParent = self.refs.LinkerButton.offsetParent\r\n\t\t\t\t? self.refs.LinkerButton.offsetParent\r\n\t\t\t\t: self.refs.LinkerButton.parentElement;\r\n\r\n\t\t\tlet params = {\r\n\t\t\t\tposition: \"relative\",\r\n\t\t\t\tleft: linkerParent.offsetLeft,\r\n\t\t\t\ttop: linkerParent.offsetHeight,\r\n\t\t\t\tforceOntoMonitor: true,\r\n\t\t\t\tspawnIfNotFound: false,\r\n\t\t\t};\r\n\t\t\t// pass linkerbutton. If it's clicked while the menu is open, we let the blur occur.\r\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(self.refs.LinkerButton, wi, params);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * When your mouse enters/leaves the hoverDetector, this function is invoked.\r\n\t *\r\n\t * @param {any} newHoverState\r\n\t * @memberof LinkerButton\r\n\t */\r\n\thoverAction(newHoverState) {\r\n\t\tthis.setState({ hoverState: newHoverState });\r\n\t}\r\n\r\n\t/**\r\n\t * Add listeners to the store.\r\n\t *\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tcomponentDidMount() {\r\n\t\twindowTitleBarStore.addListener({ field: \"Linker.channels\" }, this.onChannelsChange);\r\n\t\twindowTitleBarStore.addListener({ field: \"Linker.allChannels\" }, this.onAllChannelsChange);\r\n\t\twindowTitleBarStore.addListener({ field: \"Linker.showLinkerButton\" }, this.onShowLinkerButton);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove listeners from the store.\r\n\t *\r\n\t * @memberof LinkerButton\r\n\t */\r\n\tcomponentWillUnmount() {\r\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.channels\" }, this.onChannelsChange);\r\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.allChannels\" }, this.onAllChannelsChange);\r\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.showLinkerButton\" }, this.onShowLinkerButton);\r\n\t}\r\n\r\n\t/**\r\n\t * Render method.\r\n\t *\r\n\t * @returns\r\n\t * @memberof LinkerButton\r\n\t */\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t{this.context.showLinkerButton && (\r\n\t\t\t\t\t<div ref=\"LinkerButton\" title=\"Link Data\" className=\"linkerSection\">\r\n\t\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" data-hover={this.state.hoverState} onClick={this.showLinkerWindow}>\r\n\t\t\t\t\t\t\t<LinkerButtonIcon />\r\n\t\t\t\t\t\t\t<FinsembleHoverDetector edge=\"top left\" hoverAction={this.hoverAction} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<LinkerGroups />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LinkerButtonDeprecated.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButtonDeprecated.jsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAA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ChG,CAAC;IAOD,oBAAoB;QACnB,mBAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACxF,mBAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC9F,mBAAmB,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACnG,CAAC;IAQD,MAAM;QACL,OAAO,CACN,0CACE,IAAI,CAAC,OAAO,CAAC,gBAAgB,IAAI,CACjC,6BAAK,GAAG,EAAC,cAAc,EAAC,KAAK,EAAC,WAAW,EAAC,SAAS,EAAC,eAAe;YAClE,6BAAK,SAAS,EAAC,uBAAuB,gBAAa,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB;gBACvG,oBAAC,gBAAgB,OAAG;gBACpB,oBAAC,sBAAsB,IAAC,IAAI,EAAC,UAAU,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAI,CACpE;YACN,oBAAC,YAAY,OAAG,CACX,CACN,CACC,CACH,CAAC;IACH,CAAC;;AAlKM,wBAAW,GAAG,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n *\n * This is a deprecated version of the LinkerButton which uses linkerClient. It is not compatible with FDC3 interop.\n */\nimport * as React from \"react\";\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\nimport { WindowTitleBarContext } from \"../../windowTitleBarContext\";\nimport LinkerGroups from \"./LinkerGroupsDeprecated\";\nimport { getStore } from \"../../stores/windowTitleBarStore\";\nconst LinkerButtonIcon = () => (\n\t<svg\n\t\twidth=\"15px\"\n\t\theight=\"15px\"\n\t\tviewBox=\"2 1 13 13\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\n\t>\n\t\t<title>Linker</title>\n\t\t<defs>\n\t\t\t<path\n\t\t\t\tid=\"prefix__b\"\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\"\n\t\t\t/>\n\t\t\t<filter id=\"prefix__a\" x=\"-28.6%\" y=\"-7.1%\" width=\"157.1%\" height=\"128.6%\">\n\t\t\t\t<feOffset dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n\t\t\t\t<feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\".5\" />\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\" />\n\t\t\t</filter>\n\t\t</defs>\n\t\t<g transform=\"rotate(45 22.289 4.682)\" fillRule=\"nonzero\" fill=\"none\">\n\t\t\t<use filter=\"url(#prefix__a)\" xlinkHref=\"#prefix__b\" />\n\t\t\t<use xlinkHref=\"#prefix__b\" />\n\t\t</g>\n\t</svg>\n);\n\nlet windowTitleBarStore;\n\n/**\n * Linker button; located on the left side of the windowTitleBar.\n */\nexport class LinkerButton extends React.Component {\n\tstatic contextType = WindowTitleBarContext;\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.bindCorrectContext();\n\t\t/**\n\t\t * We assign in the constructor instead of via a require at the top of the file because the store is initialized asynchronously.\n\t\t */\n\t\twindowTitleBarStore = getStore();\n\t\tthis.state = {\n\t\t\tchannels: {},\n\t\t\tallChannels: {},\n\t\t\tshowLinker: false,\n\t\t\thoverState: \"false\",\n\t\t};\n\t}\n\n\t/**\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\n\t *\n\t * @memberof LinkerButton\n\t */\n\tbindCorrectContext() {\n\t\tthis.onChannelsChange = this.onChannelsChange.bind(this);\n\t\tthis.onAllChannelsChange = this.onAllChannelsChange.bind(this);\n\t\tthis.onShowLinkerButton = this.onShowLinkerButton.bind(this);\n\t\tthis.hoverAction = this.hoverAction.bind(this);\n\t\tthis.showLinkerWindow = this.showLinkerWindow.bind(this);\n\t}\n\n\t/**\n\t * When the user selects/deselects a channel in the linkerWindow, this event listener is invoked.\n\t *\n\t * @param {any} err\n\t * @param {any} response\n\t * @memberof LinkerButton\n\t */\n\tonChannelsChange(err, response) {\n\t\tthis.setState({ channels: response.value });\n\t}\n\n\t/**\n\t * This listener is invoked when a new channel is registered with linkerService.\n\t *\n\t * @param {any} err\n\t * @param {any} response\n\t * @memberof LinkerButton\n\t */\n\tonAllChannelsChange(err, response) {\n\t\tthis.setState({ allChannels: response.value });\n\t}\n\n\t/**\n\t * When we read the config from the window, we determine if the linker button should be shown. When that value changes, this listener is invoked.\n\t *\n\t * @param {any} err\n\t * @param {any} response\n\t * @memberof LinkerButton\n\t */\n\tonShowLinkerButton(err, response) {\n\t\tthis.setState({ showLinker: response.value });\n\t}\n\n\t/**\n\t * When any data in the store changes, we invoke this listener.\n\t *\n\t * @param {any} newState\n\t * @memberof LinkerButton\n\t */\n\tonStoreChanged(newState) {\n\t\tthis.setState(newState);\n\t}\n\n\t/**\n\t * Invoked when the linker button is clicked.\n\t *\n\t * @param {any} e\n\t * @memberof LinkerButton\n\t */\n\tshowLinkerWindow(e) {\n\t\te.persist(); // So that React allows us to access the target\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tlet payload = {\n\t\t\tchannels: FSBL.Clients.LinkerClient.getState().channels,\n\t\t\twindowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier(),\n\t\t};\n\t\tlet self = this;\n\t\tFSBL.Clients.RouterClient.query(\"Finsemble.LinkerWindow.SetActiveChannels\", payload, () => {\n\t\t\tlet wi = {\n\t\t\t\tcomponentType: \"linkerWindow\",\n\t\t\t};\n\t\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\n\t\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.\n\t\t\tlet linkerParent = self.refs.LinkerButton.offsetParent\n\t\t\t\t? self.refs.LinkerButton.offsetParent\n\t\t\t\t: self.refs.LinkerButton.parentElement;\n\n\t\t\tlet params = {\n\t\t\t\tposition: \"relative\",\n\t\t\t\tleft: linkerParent.offsetLeft,\n\t\t\t\ttop: linkerParent.offsetHeight,\n\t\t\t\tforceOntoMonitor: true,\n\t\t\t\tspawnIfNotFound: false,\n\t\t\t};\n\t\t\t// pass linkerbutton. If it's clicked while the menu is open, we let the blur occur.\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(self.refs.LinkerButton, wi, params);\n\t\t});\n\t}\n\n\t/**\n\t * When your mouse enters/leaves the hoverDetector, this function is invoked.\n\t *\n\t * @param {any} newHoverState\n\t * @memberof LinkerButton\n\t */\n\thoverAction(newHoverState) {\n\t\tthis.setState({ hoverState: newHoverState });\n\t}\n\n\t/**\n\t * Add listeners to the store.\n\t *\n\t * @memberof LinkerButton\n\t */\n\tcomponentDidMount() {\n\t\twindowTitleBarStore.addListener({ field: \"Linker.channels\" }, this.onChannelsChange);\n\t\twindowTitleBarStore.addListener({ field: \"Linker.allChannels\" }, this.onAllChannelsChange);\n\t\twindowTitleBarStore.addListener({ field: \"Linker.showLinkerButton\" }, this.onShowLinkerButton);\n\t}\n\n\t/**\n\t * Remove listeners from the store.\n\t *\n\t * @memberof LinkerButton\n\t */\n\tcomponentWillUnmount() {\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.channels\" }, this.onChannelsChange);\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.allChannels\" }, this.onAllChannelsChange);\n\t\twindowTitleBarStore.removeListener({ field: \"Linker.showLinkerButton\" }, this.onShowLinkerButton);\n\t}\n\n\t/**\n\t * Render method.\n\t *\n\t * @returns\n\t * @memberof LinkerButton\n\t */\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.context.showLinkerButton && (\n\t\t\t\t\t<div ref=\"LinkerButton\" title=\"Link Data\" className=\"linkerSection\">\n\t\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" data-hover={this.state.hoverState} onClick={this.showLinkerWindow}>\n\t\t\t\t\t\t\t<LinkerButtonIcon />\n\t\t\t\t\t\t\t<FinsembleHoverDetector edge=\"top left\" hoverAction={this.hoverAction} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<LinkerGroups />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t}\n}\n"]}
|