@finsemble/finsemble-ui 8.3.0 → 8.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FEA.d.ts +54 -24
- package/FEA.d.ts.map +1 -1
- package/FEA.js.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.js +2 -2
- package/clients/Interop/FinsembleDesktopAgent.js.map +1 -1
- package/clients/Startup/FSBLDesktop.d.ts +2 -8
- package/clients/Startup/FSBLDesktop.d.ts.map +1 -1
- package/clients/Startup/FSBLDesktop.js +2 -4
- package/clients/Startup/FSBLDesktop.js.map +1 -1
- package/clients/Startup/unhandledErrors.d.ts.map +1 -1
- package/clients/Startup/unhandledErrors.js +6 -4
- package/clients/Startup/unhandledErrors.js.map +1 -1
- package/clients/Startup/windowStartup.d.ts.map +1 -1
- package/clients/Startup/windowStartup.js +77 -116
- package/clients/Startup/windowStartup.js.map +1 -1
- package/clients/StoreModel.d.ts +8 -8
- package/clients/StoreModel.js +8 -8
- package/clients/appsClient.d.ts +90 -0
- package/clients/appsClient.d.ts.map +1 -0
- package/clients/appsClient.js +51 -0
- package/clients/appsClient.js.map +1 -0
- package/clients/authenticationClient.d.ts +29 -27
- package/clients/authenticationClient.d.ts.map +1 -1
- package/clients/authenticationClient.js +11 -15
- package/clients/authenticationClient.js.map +1 -1
- package/clients/configClient.d.ts +134 -70
- package/clients/configClient.d.ts.map +1 -1
- package/clients/configClient.js +129 -112
- package/clients/configClient.js.map +1 -1
- package/clients/controller/DialogManagerClientController.d.ts +78 -0
- package/clients/controller/DialogManagerClientController.d.ts.map +1 -0
- package/clients/controller/DialogManagerClientController.js +213 -0
- package/clients/controller/DialogManagerClientController.js.map +1 -0
- package/clients/dialogManagerClient.d.ts +1 -75
- package/clients/dialogManagerClient.d.ts.map +1 -1
- package/clients/dialogManagerClient.js +1 -208
- package/clients/dialogManagerClient.js.map +1 -1
- package/clients/distributedStoreClient.d.ts +1 -0
- package/clients/distributedStoreClient.d.ts.map +1 -1
- package/clients/distributedStoreClient.js +1 -0
- package/clients/distributedStoreClient.js.map +1 -1
- package/clients/hotkeyClient.d.ts +18 -9
- package/clients/hotkeyClient.d.ts.map +1 -1
- package/clients/hotkeyClient.js +30 -14
- package/clients/hotkeyClient.js.map +1 -1
- package/clients/index.d.ts +2 -0
- package/clients/index.d.ts.map +1 -1
- package/clients/index.js +2 -0
- package/clients/index.js.map +1 -1
- package/clients/launcherClient.d.ts +157 -47
- package/clients/launcherClient.d.ts.map +1 -1
- package/clients/launcherClient.js +201 -22
- package/clients/launcherClient.js.map +1 -1
- package/clients/logger.d.ts.map +1 -1
- package/clients/logger.js +43 -41
- package/clients/logger.js.map +1 -1
- package/clients/notificationClient.d.ts +2 -2
- package/clients/notificationClient.d.ts.map +1 -1
- package/clients/notificationClient.js +2 -2
- package/clients/notificationClient.js.map +1 -1
- package/clients/routerClient.d.ts +25 -21
- package/clients/routerClient.d.ts.map +1 -1
- package/clients/routerClient.js +24 -20
- package/clients/routerClient.js.map +1 -1
- package/clients/searchClient.d.ts +2 -2
- package/clients/searchClient.js +2 -2
- package/clients/storageClient.d.ts +8 -5
- package/clients/storageClient.d.ts.map +1 -1
- package/clients/storageClient.js +7 -5
- package/clients/storageClient.js.map +1 -1
- package/clients/windowClient.d.ts +160 -79
- package/clients/windowClient.d.ts.map +1 -1
- package/clients/windowClient.js +244 -138
- package/clients/windowClient.js.map +1 -1
- package/clients/workspaceClient.d.ts +19 -14
- package/clients/workspaceClient.d.ts.map +1 -1
- package/clients/workspaceClient.js +15 -9
- package/clients/workspaceClient.js.map +1 -1
- package/common/Desktop.d.ts +9 -50
- package/common/Desktop.d.ts.map +1 -1
- package/common/Desktop.js +11 -64
- package/common/Desktop.js.map +1 -1
- package/common/FinsembleWindow.d.ts +4 -107
- package/common/FinsembleWindow.d.ts.map +1 -1
- package/common/FinsembleWindow.js +21 -342
- package/common/FinsembleWindow.js.map +1 -1
- package/common/Monitors.d.ts +30 -18
- package/common/Monitors.d.ts.map +1 -1
- package/common/Monitors.js +45 -80
- package/common/Monitors.js.map +1 -1
- package/common/Singleton.d.ts +7 -1
- package/common/Singleton.d.ts.map +1 -1
- package/common/Singleton.js +24 -11
- package/common/Singleton.js.map +1 -1
- package/common/constants.d.ts +3 -9
- package/common/constants.d.ts.map +1 -1
- package/common/constants.js +3 -14
- package/common/constants.js.map +1 -1
- package/common/events/FinsembleEvent.d.ts +1 -1
- package/common/events/FinsembleEvent.d.ts.map +1 -1
- package/common/redux/getRemoteStore.d.ts +53 -0
- package/common/redux/getRemoteStore.d.ts.map +1 -0
- package/common/redux/getRemoteStore.js +50 -0
- package/common/redux/getRemoteStore.js.map +1 -0
- package/common/redux/remoteReduxEnhancer.d.ts +7 -7
- package/common/redux/remoteReduxEnhancer.d.ts.map +1 -1
- package/common/redux/remoteReduxEnhancer.js +35 -20
- package/common/redux/remoteReduxEnhancer.js.map +1 -1
- package/common/redux/types.d.ts +14 -1
- package/common/redux/types.d.ts.map +1 -1
- package/common/systemManagerClient.d.ts +11 -5
- package/common/systemManagerClient.d.ts.map +1 -1
- package/common/systemManagerClient.js +25 -8
- package/common/systemManagerClient.js.map +1 -1
- package/common/util.d.ts +1 -7
- package/common/util.d.ts.map +1 -1
- package/common/util.js +1 -14
- package/common/util.js.map +1 -1
- package/deprecated/deprecatedFunctions.d.ts +1 -1
- package/deprecated/deprecatedFunctions.d.ts.map +1 -1
- package/deprecated/deprecatedFunctions.js +1 -2
- package/deprecated/deprecatedFunctions.js.map +1 -1
- package/deprecated/dragAndDropClient.d.ts +3 -3
- package/deprecated/dragAndDropClient.d.ts.map +1 -1
- package/deprecated/dragAndDropClient.js.map +1 -1
- package/deprecated/linkerClient.d.ts +1 -1
- package/deprecated/linkerClient.d.ts.map +1 -1
- package/main.d.ts +289 -190
- package/main.d.ts.map +1 -1
- package/main.js +3 -1
- package/main.js.map +1 -1
- package/package.json +3 -3
- package/platform/services/Interop/types.d.ts +2 -1
- package/platform/services/Interop/types.d.ts.map +1 -1
- package/platform/services/router/types.d.ts +5 -6
- package/platform/services/router/types.d.ts.map +1 -1
- package/platform/services/systemManager/_constants.d.ts +1 -0
- package/platform/services/systemManager/_constants.d.ts.map +1 -1
- package/platform/services/systemManager/_constants.js +1 -0
- package/platform/services/systemManager/_constants.js.map +1 -1
- package/platform/services/window/modules/actions.d.ts +59 -0
- package/platform/services/window/modules/actions.d.ts.map +1 -0
- package/platform/services/window/modules/actions.js +57 -0
- package/platform/services/window/modules/actions.js.map +1 -0
- package/platform/services/window/types.d.ts +257 -50
- package/platform/services/window/types.d.ts.map +1 -1
- package/platform/services/workspace/types.d.ts +4 -3
- package/platform/services/workspace/types.d.ts.map +1 -1
- package/react/assets/css/core/icons.css +0 -5
- package/react/assets/css/processMonitor.css +9 -4
- package/react/assets/css/windowTitleBar.css +98 -285
- package/react/assets/icons/chevron-down.svg +1 -0
- package/react/assets/icons/chevron-up.svg +1 -0
- package/react/components/common/ButtonRow.d.ts.map +1 -1
- package/react/components/common/ButtonRow.js +4 -9
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/ContextMenu.d.ts.map +1 -1
- package/react/components/common/ContextMenu.js +2 -10
- package/react/components/common/ContextMenu.js.map +1 -1
- package/react/components/common/DropdownButton.d.ts.map +1 -1
- package/react/components/common/DropdownButton.js +11 -24
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/FinsembleIcon.d.ts +1 -1
- package/react/components/common/FinsembleIcon.d.ts.map +1 -1
- package/react/components/common/FinsembleIcon.js +6 -4
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/css/accordion.css +9 -21
- package/react/components/common/css/application-edit-page.css +0 -4
- package/react/components/common/css/selector.css +3 -1
- package/react/components/downloadManager/DownloadManager.d.ts +1 -1
- package/react/components/downloadManager/DownloadManager.d.ts.map +1 -1
- package/react/components/downloadManager/DownloadManager.js +2 -4
- package/react/components/downloadManager/DownloadManager.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.d.ts +6 -0
- package/react/components/fdc3Resolver/ResolverContainer.d.ts.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +37 -89
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.d.ts +10 -1
- package/react/components/fdc3Resolver/ResolverDialog.d.ts.map +1 -1
- package/react/components/fdc3Resolver/ResolverDialog.js +78 -66
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
- package/react/components/legacyControls/FinsembleDialogTextInput.d.ts.map +1 -1
- package/react/components/linker/remoteRedux.d.ts +2 -9
- package/react/components/linker/remoteRedux.d.ts.map +1 -1
- package/react/components/linker/remoteRedux.js +2 -22
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/notifications/css/notification-center.css +2 -0
- package/react/components/processMonitor/ProcessMonitor.d.ts.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js +14 -36
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts +0 -4
- package/react/components/processMonitor/ProcessMonitorTypes.d.ts.map +1 -1
- package/react/components/processMonitor/ProcessMonitorTypes.js +1 -5
- package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.d.ts +2 -3
- package/react/components/processMonitor/components/ChildWindow.d.ts.map +1 -1
- package/react/components/processMonitor/components/ChildWindow.js +5 -9
- package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
- package/react/components/processMonitor/components/ListHeader.d.ts +1 -5
- package/react/components/processMonitor/components/ListHeader.d.ts.map +1 -1
- package/react/components/processMonitor/components/ListHeader.js +3 -2
- package/react/components/processMonitor/components/ListHeader.js.map +1 -1
- package/react/components/processMonitor/components/Process.d.ts +10 -0
- package/react/components/processMonitor/components/Process.d.ts.map +1 -0
- package/react/components/processMonitor/components/Process.js +11 -0
- package/react/components/processMonitor/components/Process.js.map +1 -0
- package/react/components/processMonitor/components/ProcessStatistics.d.ts +5 -4
- package/react/components/processMonitor/components/ProcessStatistics.d.ts.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +10 -7
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/constants.d.ts +1 -2
- package/react/components/processMonitor/constants.d.ts.map +1 -1
- package/react/components/processMonitor/constants.js +2 -8
- package/react/components/processMonitor/constants.js.map +1 -1
- package/react/components/processMonitor/helpers.d.ts +0 -1
- package/react/components/processMonitor/helpers.d.ts.map +1 -1
- package/react/components/processMonitor/helpers.js +2 -9
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +0 -4
- package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts.map +1 -1
- package/react/components/processMonitor/stores/ProcessMonitorStore.js +0 -29
- package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
- package/react/components/search/SearchInput.d.ts +1 -2
- package/react/components/search/SearchInput.d.ts.map +1 -1
- package/react/components/search/SearchInput.js +11 -13
- package/react/components/search/SearchInput.js.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.d.ts.map +1 -1
- package/react/components/shared/openQuitConfirmationDialog.js +31 -4
- package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.d.ts.map +1 -1
- package/react/components/singleInputDialog/SingleInputDialog.js +81 -100
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/toolbar/ToolbarShell.d.ts +1 -0
- package/react/components/toolbar/ToolbarShell.d.ts.map +1 -1
- package/react/components/toolbar/ToolbarShell.js +3 -2
- package/react/components/toolbar/ToolbarShell.js.map +1 -1
- package/react/components/utils.d.ts +50 -0
- package/react/components/utils.d.ts.map +1 -0
- package/react/components/utils.js +60 -0
- package/react/components/utils.js.map +1 -0
- package/react/components/windowTitleBar/AlwaysOnTopButton.d.ts +9 -0
- package/react/components/windowTitleBar/AlwaysOnTopButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/AlwaysOnTopButton.js +29 -0
- package/react/components/windowTitleBar/AlwaysOnTopButton.js.map +1 -0
- package/react/components/windowTitleBar/{components/right/CloseButton.d.ts → CloseButton.d.ts} +0 -0
- package/react/components/windowTitleBar/CloseButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/CloseButton.js +22 -0
- package/react/components/windowTitleBar/CloseButton.js.map +1 -0
- package/react/components/windowTitleBar/GroupingButton.d.ts +3 -0
- package/react/components/windowTitleBar/GroupingButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/GroupingButton.js +25 -0
- package/react/components/windowTitleBar/GroupingButton.js.map +1 -0
- package/react/components/windowTitleBar/{components/left/LinkerButton.d.ts → LinkerButton.d.ts} +0 -0
- package/react/components/windowTitleBar/LinkerButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/{components/left/LinkerButton.js → LinkerButton.js} +4 -4
- package/react/components/windowTitleBar/LinkerButton.js.map +1 -0
- package/react/components/windowTitleBar/LinkerButtonDeprecated.d.ts +11 -0
- package/react/components/windowTitleBar/LinkerButtonDeprecated.d.ts.map +1 -0
- package/react/components/windowTitleBar/LinkerButtonDeprecated.js +63 -0
- package/react/components/windowTitleBar/LinkerButtonDeprecated.js.map +1 -0
- package/react/components/windowTitleBar/{components/left/LinkerGroups.d.ts → LinkerGroups.d.ts} +0 -0
- package/react/components/windowTitleBar/LinkerGroups.d.ts.map +1 -0
- package/react/components/windowTitleBar/{components/left/LinkerGroups.js → LinkerGroups.js} +2 -3
- package/react/components/windowTitleBar/LinkerGroups.js.map +1 -0
- package/react/components/windowTitleBar/LinkerGroupsDeprecated.d.ts +7 -0
- package/react/components/windowTitleBar/LinkerGroupsDeprecated.d.ts.map +1 -0
- package/react/components/windowTitleBar/LinkerGroupsDeprecated.js +35 -0
- package/react/components/windowTitleBar/LinkerGroupsDeprecated.js.map +1 -0
- package/react/components/windowTitleBar/MaximizeButton.d.ts +3 -0
- package/react/components/windowTitleBar/MaximizeButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/MaximizeButton.js +18 -0
- package/react/components/windowTitleBar/MaximizeButton.js.map +1 -0
- package/react/components/windowTitleBar/MinimizeButton.d.ts +3 -0
- package/react/components/windowTitleBar/MinimizeButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/MinimizeButton.js +21 -0
- package/react/components/windowTitleBar/MinimizeButton.js.map +1 -0
- package/react/components/windowTitleBar/ShareButton.d.ts +3 -0
- package/react/components/windowTitleBar/ShareButton.d.ts.map +1 -0
- package/react/components/windowTitleBar/ShareButton.js +24 -0
- package/react/components/windowTitleBar/ShareButton.js.map +1 -0
- package/react/components/windowTitleBar/TabRegion.d.ts +7 -0
- package/react/components/windowTitleBar/TabRegion.d.ts.map +1 -0
- package/react/components/windowTitleBar/TabRegion.js +453 -0
- package/react/components/windowTitleBar/TabRegion.js.map +1 -0
- package/react/components/windowTitleBar/TabTitle.d.ts +8 -0
- package/react/components/windowTitleBar/TabTitle.d.ts.map +1 -0
- package/react/components/windowTitleBar/TabTitle.js +17 -0
- package/react/components/windowTitleBar/TabTitle.js.map +1 -0
- package/react/components/windowTitleBar/TitleEdit.d.ts +10 -0
- package/react/components/windowTitleBar/TitleEdit.d.ts.map +1 -0
- package/react/components/windowTitleBar/TitleEdit.js +30 -0
- package/react/components/windowTitleBar/TitleEdit.js.map +1 -0
- package/react/components/windowTitleBar/WindowTitleBarContext.d.ts +12 -0
- package/react/components/windowTitleBar/WindowTitleBarContext.d.ts.map +1 -0
- package/react/components/windowTitleBar/WindowTitleBarContext.js +3 -0
- package/react/components/windowTitleBar/WindowTitleBarContext.js.map +1 -0
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +14 -272
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.js +41 -929
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/index.d.ts +9 -8
- package/react/components/windowTitleBar/index.d.ts.map +1 -1
- package/react/components/windowTitleBar/index.js +9 -8
- package/react/components/windowTitleBar/index.js.map +1 -1
- package/react/components/windowTitleBar/useKeyboardNavigation.d.ts +7 -0
- package/react/components/windowTitleBar/useKeyboardNavigation.d.ts.map +1 -0
- package/react/components/windowTitleBar/useKeyboardNavigation.js +57 -0
- package/react/components/windowTitleBar/useKeyboardNavigation.js.map +1 -0
- package/react/components/windowTitleBar/useMaximize.d.ts +5 -0
- package/react/components/windowTitleBar/useMaximize.d.ts.map +1 -0
- package/react/components/windowTitleBar/useMaximize.js +23 -0
- package/react/components/windowTitleBar/useMaximize.js.map +1 -0
- package/react/components/yesNoDialog/timer.js +2 -1
- package/react/components/yesNoDialog/timer.js.map +1 -1
- package/react/hooks/useDashbar.d.ts.map +1 -1
- package/react/hooks/useDashbar.js.map +1 -1
- package/react/hooks/useDragRegion.d.ts +27 -0
- package/react/hooks/useDragRegion.d.ts.map +1 -0
- package/react/hooks/useDragRegion.js +74 -0
- package/react/hooks/useDragRegion.js.map +1 -0
- package/react/hooks/useInjectedTitleBar.d.ts +3 -0
- package/react/hooks/useInjectedTitleBar.d.ts.map +1 -0
- package/react/hooks/useInjectedTitleBar.js +365 -0
- package/react/hooks/useInjectedTitleBar.js.map +1 -0
- package/react/hooks/useNotifications.d.ts +1 -1
- package/react/hooks/useToolbar.d.ts +1 -0
- package/react/hooks/useToolbar.d.ts.map +1 -1
- package/react/hooks/useToolbar.js +13 -3
- package/react/hooks/useToolbar.js.map +1 -1
- package/typedoc-types.d.ts +9 -0
- package/typedoc-types.d.ts.map +1 -0
- package/typedoc-types.js +6 -0
- package/typedoc-types.js.map +1 -0
- package/types.d.ts +5 -11
- package/types.d.ts.map +1 -1
- package/types.js +2 -0
- package/types.js.map +1 -1
- package/common/events/PrivateEventManager.d.ts +0 -95
- package/common/events/PrivateEventManager.d.ts.map +0 -1
- package/common/events/PrivateEventManager.js +0 -295
- package/common/events/PrivateEventManager.js.map +0 -1
- package/common/events/PrivateFinsembleEvent.d.ts +0 -30
- package/common/events/PrivateFinsembleEvent.d.ts.map +0 -1
- package/common/events/PrivateFinsembleEvent.js +0 -65
- package/common/events/PrivateFinsembleEvent.js.map +0 -1
- package/common/redux/createReducer.d.ts +0 -128
- package/common/redux/createReducer.d.ts.map +0 -1
- package/common/redux/createReducer.js +0 -298
- package/common/redux/createReducer.js.map +0 -1
- package/common/redux/index.d.ts +0 -3
- package/common/redux/index.d.ts.map +0 -1
- package/common/redux/index.js +0 -3
- package/common/redux/index.js.map +0 -1
- package/platform/services/window/Common/Pools/ObjectPool.d.ts +0 -11
- package/platform/services/window/Common/Pools/ObjectPool.d.ts.map +0 -1
- package/platform/services/window/Common/Pools/ObjectPool.js +0 -43
- package/platform/services/window/Common/Pools/ObjectPool.js.map +0 -1
- package/platform/services/window/Common/Pools/PoolSingletons.d.ts +0 -10
- package/platform/services/window/Common/Pools/PoolSingletons.d.ts.map +0 -1
- package/platform/services/window/Common/Pools/PoolSingletons.js +0 -10
- package/platform/services/window/Common/Pools/PoolSingletons.js.map +0 -1
- package/platform/services/window/Common/Pools/WindowPool.d.ts +0 -7
- package/platform/services/window/Common/Pools/WindowPool.d.ts.map +0 -1
- package/platform/services/window/Common/Pools/WindowPool.js +0 -16
- package/platform/services/window/Common/Pools/WindowPool.js.map +0 -1
- package/platform/services/window/Docking/boxMath.d.ts +0 -144
- package/platform/services/window/Docking/boxMath.d.ts.map +0 -1
- package/platform/services/window/Docking/boxMath.js +0 -511
- package/platform/services/window/Docking/boxMath.js.map +0 -1
- package/platform/services/window/Docking/constants.d.ts +0 -29
- package/platform/services/window/Docking/constants.d.ts.map +0 -1
- package/platform/services/window/Docking/constants.js +0 -29
- package/platform/services/window/Docking/constants.js.map +0 -1
- package/platform/services/window/Docking/dockableBox.d.ts +0 -117
- package/platform/services/window/Docking/dockableBox.d.ts.map +0 -1
- package/platform/services/window/Docking/dockableBox.js +0 -525
- package/platform/services/window/Docking/dockableBox.js.map +0 -1
- package/platform/services/window/Docking/dockableGroup.d.ts +0 -252
- package/platform/services/window/Docking/dockableGroup.d.ts.map +0 -1
- package/platform/services/window/Docking/dockableGroup.js +0 -1054
- package/platform/services/window/Docking/dockableGroup.js.map +0 -1
- package/platform/services/window/Docking/dockableMonitor.d.ts +0 -99
- package/platform/services/window/Docking/dockableMonitor.d.ts.map +0 -1
- package/platform/services/window/Docking/dockableMonitor.js +0 -427
- package/platform/services/window/Docking/dockableMonitor.js.map +0 -1
- package/platform/services/window/Docking/dockableWindow.d.ts +0 -272
- package/platform/services/window/Docking/dockableWindow.d.ts.map +0 -1
- package/platform/services/window/Docking/dockableWindow.js +0 -1239
- package/platform/services/window/Docking/dockableWindow.js.map +0 -1
- package/platform/services/window/Docking/dockingCalculator.d.ts +0 -741
- package/platform/services/window/Docking/dockingCalculator.d.ts.map +0 -1
- package/platform/services/window/Docking/dockingCalculator.js +0 -3438
- package/platform/services/window/Docking/dockingCalculator.js.map +0 -1
- package/platform/services/window/Docking/dockingMain.d.ts +0 -349
- package/platform/services/window/Docking/dockingMain.d.ts.map +0 -1
- package/platform/services/window/Docking/dockingMain.js +0 -2541
- package/platform/services/window/Docking/dockingMain.js.map +0 -1
- package/platform/services/window/Docking/maskBoundsCalculator.d.ts +0 -28
- package/platform/services/window/Docking/maskBoundsCalculator.d.ts.map +0 -1
- package/platform/services/window/Docking/maskBoundsCalculator.js +0 -67
- package/platform/services/window/Docking/maskBoundsCalculator.js.map +0 -1
- package/platform/services/window/Docking/monitorUpdateHandler.d.ts +0 -32
- package/platform/services/window/Docking/monitorUpdateHandler.d.ts.map +0 -1
- package/platform/services/window/Docking/monitorUpdateHandler.js +0 -117
- package/platform/services/window/Docking/monitorUpdateHandler.js.map +0 -1
- package/platform/services/window/Docking/types.d.ts +0 -334
- package/platform/services/window/Docking/types.d.ts.map +0 -1
- package/platform/services/window/Docking/types.js +0 -12
- package/platform/services/window/Docking/types.js.map +0 -1
- package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts +0 -90
- package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts.map +0 -1
- package/platform/services/window/MultiWindowFeatures/autoArrange.js +0 -510
- package/platform/services/window/MultiWindowFeatures/autoArrange.js.map +0 -1
- package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts +0 -411
- package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts.map +0 -1
- package/platform/services/window/StackedWindowManager/stackedWindowManager.js +0 -1641
- package/platform/services/window/StackedWindowManager/stackedWindowManager.js.map +0 -1
- package/platform/services/window/WindowAbstractions/BaseWindow.d.ts +0 -469
- package/platform/services/window/WindowAbstractions/BaseWindow.d.ts.map +0 -1
- package/platform/services/window/WindowAbstractions/BaseWindow.js +0 -1347
- package/platform/services/window/WindowAbstractions/BaseWindow.js.map +0 -1
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts +0 -9
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts.map +0 -1
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js +0 -23
- package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js.map +0 -1
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts +0 -227
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts.map +0 -1
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.js +0 -1168
- package/platform/services/window/WindowAbstractions/WebWindowWrapper.js.map +0 -1
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts +0 -121
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts.map +0 -1
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.js +0 -591
- package/platform/services/window/WindowAbstractions/externalWindowWrapper.js.map +0 -1
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts +0 -194
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts.map +0 -1
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js +0 -680
- package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js.map +0 -1
- package/platform/services/window/windowGroup.d.ts +0 -86
- package/platform/services/window/windowGroup.d.ts.map +0 -1
- package/platform/services/window/windowGroup.js +0 -323
- package/platform/services/window/windowGroup.js.map +0 -1
- package/platform/services/workspace/windowStorageManager.d.ts +0 -180
- package/platform/services/workspace/windowStorageManager.d.ts.map +0 -1
- package/platform/services/workspace/windowStorageManager.js +0 -195
- package/platform/services/workspace/windowStorageManager.js.map +0 -1
- package/react/assets/icons/question-circle.svg +0 -6
- package/react/components/legacyControls/FinsembleHoverDetector.d.ts +0 -23
- package/react/components/legacyControls/FinsembleHoverDetector.d.ts.map +0 -1
- package/react/components/legacyControls/FinsembleHoverDetector.js +0 -57
- package/react/components/legacyControls/FinsembleHoverDetector.js.map +0 -1
- package/react/components/sdd/Appearance.helpers.d.ts +0 -2
- package/react/components/sdd/Appearance.helpers.d.ts.map +0 -1
- package/react/components/sdd/Appearance.helpers.js +0 -2
- package/react/components/sdd/Appearance.helpers.js.map +0 -1
- package/react/components/shared/linkerUtil.d.ts +0 -4
- package/react/components/shared/linkerUtil.d.ts.map +0 -1
- package/react/components/shared/linkerUtil.js +0 -10
- package/react/components/shared/linkerUtil.js.map +0 -1
- package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -31
- package/react/components/windowTitleBar/components/center/Tab.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/center/Tab.js +0 -58
- package/react/components/windowTitleBar/components/center/Tab.js.map +0 -1
- package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -138
- package/react/components/windowTitleBar/components/center/TabList.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/center/TabList.js +0 -614
- package/react/components/windowTitleBar/components/center/TabList.js.map +0 -1
- package/react/components/windowTitleBar/components/center/TabRegion.d.ts +0 -3
- package/react/components/windowTitleBar/components/center/TabRegion.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/center/TabRegion.js +0 -13
- package/react/components/windowTitleBar/components/center/TabRegion.js.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +0 -85
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +0 -172
- package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +0 -50
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +0 -120
- package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +0 -1
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts +0 -42
- package/react/components/windowTitleBar/components/left/ShareButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/left/ShareButton.js +0 -82
- package/react/components/windowTitleBar/components/left/ShareButton.js.map +0 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.d.ts +0 -3
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +0 -15
- package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +0 -1
- package/react/components/windowTitleBar/components/right/CloseButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/right/CloseButton.js +0 -16
- package/react/components/windowTitleBar/components/right/CloseButton.js.map +0 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +0 -50
- package/react/components/windowTitleBar/components/right/GroupingButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/right/GroupingButton.js +0 -82
- package/react/components/windowTitleBar/components/right/GroupingButton.js.map +0 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +0 -59
- package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/right/MaximizeButton.js +0 -96
- package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +0 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +0 -26
- package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/right/MinimizeButton.js +0 -32
- package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +0 -1
- package/react/components/windowTitleBar/components/windowTitle.d.ts +0 -67
- package/react/components/windowTitleBar/components/windowTitle.d.ts.map +0 -1
- package/react/components/windowTitleBar/components/windowTitle.js +0 -382
- package/react/components/windowTitleBar/components/windowTitle.js.map +0 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +0 -69
- package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts.map +0 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +0 -610
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +0 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +0 -44
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts.map +0 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js +0 -43
- package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +0 -1
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts +0 -23
- package/react/components/windowTitleBar/windowTitleBarContext.d.ts.map +0 -1
- package/react/components/windowTitleBar/windowTitleBarContext.js +0 -22
- package/react/components/windowTitleBar/windowTitleBarContext.js.map +0 -1
- package/react/types/windowTitleBar.d.ts +0 -49
- package/react/types/windowTitleBar.d.ts.map +0 -1
- package/react/types/windowTitleBar.js +0 -2
- package/react/types/windowTitleBar.js.map +0 -1
|
@@ -1,934 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { WindowTitleBarContext } from "./windowTitleBarContext";
|
|
7
|
-
import { storeManager, Actions, getStore } from "./stores/windowTitleBarStore";
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Provider } from "react-redux";
|
|
3
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
8
4
|
import styles from "../../assets/css/windowTitleBar.lazy.css";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
5
|
+
import { Startup } from "../../../clients/Startup/Startup";
|
|
6
|
+
import { useInjectedTitleBar } from "../../hooks/useInjectedTitleBar";
|
|
7
|
+
import { useKeyboardNavigation } from "./useKeyboardNavigation";
|
|
8
|
+
import { actions, emptyStore } from "../../../platform/services/window/modules/actions";
|
|
9
|
+
import { getRemoteStore } from "../../../common/redux/getRemoteStore";
|
|
10
|
+
import { WindowNameContext } from "./WindowTitleBarContext";
|
|
11
|
+
export const getStore = () => getRemoteStore({ server: "@@finsemble/remoteRedux/WindowServiceStore", slice: "windowTitleBar", emptyStore });
|
|
12
|
+
export const WindowTitleBarContents = (props) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const dispatch = useDispatch();
|
|
15
|
+
const [windowName, setWindowName] = useState(null);
|
|
16
|
+
const state = useSelector((currentState) => currentState);
|
|
17
|
+
useInjectedTitleBar(windowName ? (_a = state.windows[windowName]) === null || _a === void 0 ? void 0 : _a.bumpConfig : null);
|
|
18
|
+
useKeyboardNavigation((_b = props.enableKeyboardNavigation) !== null && _b !== void 0 ? _b : true);
|
|
19
|
+
// Retrieves the windowName asynchronously
|
|
20
|
+
const getWindowName = async () => {
|
|
21
|
+
const { windowName: myWindowName } = await Startup.getInstance().getStartupData();
|
|
22
|
+
setWindowName(myWindowName);
|
|
23
|
+
// This tells the redux store to create a windowTitleBar entry for this window
|
|
24
|
+
if (myWindowName)
|
|
25
|
+
dispatch(actions.register(myWindowName));
|
|
26
|
+
};
|
|
27
|
+
// Add styles lazily, and only once
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
styles.use();
|
|
30
|
+
getWindowName();
|
|
31
|
+
}, []);
|
|
32
|
+
return (
|
|
33
|
+
// Context provider for windowName
|
|
34
|
+
React.createElement(WindowNameContext.Provider, { value: windowName },
|
|
35
|
+
React.createElement("div", { className: "fsbl-header" }, props.children)));
|
|
36
|
+
};
|
|
12
37
|
/**
|
|
13
|
-
* windowTitleBar is injected into pages via a preload. At the time that it is injected, there is no DOM on the page yet.
|
|
14
|
-
*
|
|
15
|
-
* Normally, webpack's style-loader will add all the imported styles as <STYLE> tags and add them to the document's <HEAD>.
|
|
16
|
-
* But this is done at _module load time_ which, when running in a preload, occurs before a <HEAD> tag exists, or even a <BODY>
|
|
17
|
-
* or <HTML> tag.
|
|
18
38
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* and we use a flag to make sure it only happens once (this should be converted to useEffect() if this is converted to a hook).
|
|
39
|
+
* @param props.enableKeyboardNavigation - Set to false to disable keyboard navigation
|
|
40
|
+
* @returns
|
|
22
41
|
*/
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export class WindowTitleBarShell extends React.Component {
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(props);
|
|
30
|
-
// Keep track of if the mouse button is pressed
|
|
31
|
-
this.isMousePressed = false;
|
|
32
|
-
this.store = undefined;
|
|
33
|
-
if (!stylesHaveBeenInjected) {
|
|
34
|
-
styles.use();
|
|
35
|
-
stylesHaveBeenInjected = true;
|
|
36
|
-
}
|
|
37
|
-
this.bindCorrectContext();
|
|
38
|
-
this.state = {
|
|
39
|
-
activeTab: FEAGlobals.FSBL.Clients.WindowClient.getWindowIdentifier(),
|
|
40
|
-
allowDragOnCenterRegion: true,
|
|
41
|
-
alwaysOnTop: false,
|
|
42
|
-
alwaysOnTopButton: false,
|
|
43
|
-
closeButton: false,
|
|
44
|
-
dockingEnabled: false,
|
|
45
|
-
dockingIcon: "",
|
|
46
|
-
hackScrollbar: false,
|
|
47
|
-
initialized: false,
|
|
48
|
-
isTopRight: false,
|
|
49
|
-
maxButton: false,
|
|
50
|
-
minButton: false,
|
|
51
|
-
showDockingTooltip: false,
|
|
52
|
-
showLinkerButton: false,
|
|
53
|
-
showShareButton: false,
|
|
54
|
-
showTabs: false,
|
|
55
|
-
showTabRegion: false,
|
|
56
|
-
tabs: [],
|
|
57
|
-
tabBarBoundingBox: {},
|
|
58
|
-
windowTitle: "",
|
|
59
|
-
useDOMBasedMovement: true,
|
|
60
|
-
dragHandleName: "fsbl-drag-handle",
|
|
61
|
-
bumpElements: {},
|
|
62
|
-
adjustContentHeights: true,
|
|
63
|
-
};
|
|
64
|
-
FEAGlobals.finsembleWindow.isAlwaysOnTop({}, (err, alwaysOnTop) => {
|
|
65
|
-
this.setState(Object.assign(Object.assign({}, this.state), { alwaysOnTop }));
|
|
66
|
-
});
|
|
67
|
-
FEAGlobals.finsembleWindow.addEventListener("alwaysOnTop", this.alwaysOnTopListener);
|
|
68
|
-
}
|
|
69
|
-
alwaysOnTopListener({ data: { alwaysOnTop } }) {
|
|
70
|
-
this.setState(Object.assign(Object.assign({}, this.state), { alwaysOnTop }));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* This is necessary to make sure that the `this` inside of the callback is correct.
|
|
74
|
-
*
|
|
75
|
-
* @memberof WindowTitleBar
|
|
76
|
-
*/
|
|
77
|
-
bindCorrectContext() {
|
|
78
|
-
this.onTitleChange = this.onTitleChange.bind(this);
|
|
79
|
-
this.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);
|
|
80
|
-
this.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);
|
|
81
|
-
this.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);
|
|
82
|
-
this.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);
|
|
83
|
-
this.showLinkerButton = this.showLinkerButton.bind(this);
|
|
84
|
-
this.isTopRight = this.isTopRight.bind(this);
|
|
85
|
-
this.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);
|
|
86
|
-
this.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);
|
|
87
|
-
this.setDOMBasedMovement = this.setDOMBasedMovement.bind(this);
|
|
88
|
-
this.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);
|
|
89
|
-
this.onTabsChanged = this.onTabsChanged.bind(this);
|
|
90
|
-
this.onShowTabsChanged = this.onShowTabsChanged.bind(this);
|
|
91
|
-
this.onTilingStop = this.onTilingStop.bind(this);
|
|
92
|
-
this.onTilingStart = this.onTilingStart.bind(this);
|
|
93
|
-
this.resizeDragHandle = this.resizeDragHandle.bind(this);
|
|
94
|
-
this.onDoubleClick = this.onDoubleClick.bind(this);
|
|
95
|
-
this.alwaysOnTopListener = this.alwaysOnTopListener.bind(this);
|
|
96
|
-
this.onInitialized = this.onInitialized.bind(this);
|
|
97
|
-
window.resizeDragHandle = this.resizeDragHandle.bind(this);
|
|
98
|
-
}
|
|
99
|
-
onInitialized() {
|
|
100
|
-
this.store = getStore();
|
|
101
|
-
this.store.addListeners([
|
|
102
|
-
{ field: "Main.windowTitle", listener: this.onTitleChange },
|
|
103
|
-
{ field: "Main.showDockingTooltip", listener: this.onShowDockingToolTip },
|
|
104
|
-
{ field: "Main.dockingIcon", listener: this.onToggleDockingIcon },
|
|
105
|
-
{ field: "Main.dockingEnabled", listener: this.onDockingEnabledChanged },
|
|
106
|
-
{ field: "AlwaysOnTop.show", listener: this.onAlwaysOnTopChanged },
|
|
107
|
-
{ field: "Linker.showLinkerButton", listener: this.showLinkerButton },
|
|
108
|
-
{ field: "Sharer.emitterEnabled", listener: this.onShareEmitterChanged },
|
|
109
|
-
{ field: "isTopRight", listener: this.isTopRight },
|
|
110
|
-
{ field: "tabs", listener: this.onTabsChanged },
|
|
111
|
-
{ field: "showTabs", listener: this.onShowTabsChanged },
|
|
112
|
-
{ field: "hackScrollbar", listener: this.onShowTabsChanged },
|
|
113
|
-
{ field: "Main.useDOMBasedMovement", listener: this.setDOMBasedMovement },
|
|
114
|
-
], () => { });
|
|
115
|
-
// Add listeners for tiling/tabbing
|
|
116
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.startTilingOrTabbing", this.onTilingStart);
|
|
117
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.stopTilingOrTabbing", this.onTilingStop);
|
|
118
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.cancelTilingOrTabbing", this.onTilingStop);
|
|
119
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.startTilingOrTabbing", this.disallowDragOnCenterRegion);
|
|
120
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.stopTilingOrTabbing", this.allowDragOnCenterRegion);
|
|
121
|
-
FEAGlobals.FSBL.Clients.RouterClient.addListener("DockingService.cancelTilingOrTabbing", this.allowDragOnCenterRegion);
|
|
122
|
-
this.onStoreChange();
|
|
123
|
-
this.setState({
|
|
124
|
-
initialized: true,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
async onStoreChange() {
|
|
128
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
129
|
-
let activeIdentifier = FEAGlobals.finsembleWindow.identifier;
|
|
130
|
-
const windowTitleResult = await ((_a = this.store) === null || _a === void 0 ? void 0 : _a.get(["Main", "windowTitle"]));
|
|
131
|
-
activeIdentifier.title = windowTitleResult === null || windowTitleResult === void 0 ? void 0 : windowTitleResult.data;
|
|
132
|
-
const minButtonResult = await ((_b = this.store) === null || _b === void 0 ? void 0 : _b.get(["Minimize", "hide"])); //negated
|
|
133
|
-
const maxButtonResult = await ((_c = this.store) === null || _c === void 0 ? void 0 : _c.get(["Maximize", "hide"])); //negates
|
|
134
|
-
const closeButtonResult = await ((_d = this.store) === null || _d === void 0 ? void 0 : _d.get(["Close", "hide"])); //negated
|
|
135
|
-
const showLinkerButtonResult = await ((_e = this.store) === null || _e === void 0 ? void 0 : _e.get(["Linker", "showLinkerButton"]));
|
|
136
|
-
const showShareButtonResult = await ((_f = this.store) === null || _f === void 0 ? void 0 : _f.get(["Sharer", "emitterEnabled"]));
|
|
137
|
-
const isTopRightResult = await ((_g = this.store) === null || _g === void 0 ? void 0 : _g.get(["isTopRight"]));
|
|
138
|
-
const alwaysOnTopButtonResult = await ((_h = this.store) === null || _h === void 0 ? void 0 : _h.get(["AlwaysOnTop", "show"]));
|
|
139
|
-
const showTabsResult = await ((_j = this.store) === null || _j === void 0 ? void 0 : _j.get(["showTabs"]));
|
|
140
|
-
const hackScrollbarResult = await ((_k = this.store) === null || _k === void 0 ? void 0 : _k.get(["hackScrollbar"]));
|
|
141
|
-
const bumpElementsResult = await ((_l = this.store) === null || _l === void 0 ? void 0 : _l.get(["bumpElements"]));
|
|
142
|
-
const adjustContentHeightsResult = await ((_m = this.store) === null || _m === void 0 ? void 0 : _m.get(["adjustContentHeights"]));
|
|
143
|
-
const stateToSet = {
|
|
144
|
-
windowTitle: windowTitleResult === null || windowTitleResult === void 0 ? void 0 : windowTitleResult.data,
|
|
145
|
-
minButton: !(minButtonResult === null || minButtonResult === void 0 ? void 0 : minButtonResult.data),
|
|
146
|
-
maxButton: !(maxButtonResult === null || maxButtonResult === void 0 ? void 0 : maxButtonResult.data),
|
|
147
|
-
closeButton: !(closeButtonResult === null || closeButtonResult === void 0 ? void 0 : closeButtonResult.data),
|
|
148
|
-
showLinkerButton: showLinkerButtonResult === null || showLinkerButtonResult === void 0 ? void 0 : showLinkerButtonResult.data,
|
|
149
|
-
showShareButton: showShareButtonResult === null || showShareButtonResult === void 0 ? void 0 : showShareButtonResult.data,
|
|
150
|
-
isTopRight: isTopRightResult === null || isTopRightResult === void 0 ? void 0 : isTopRightResult.data,
|
|
151
|
-
alwaysOnTopButton: alwaysOnTopButtonResult === null || alwaysOnTopButtonResult === void 0 ? void 0 : alwaysOnTopButtonResult.data,
|
|
152
|
-
showTabs: showTabsResult === null || showTabsResult === void 0 ? void 0 : showTabsResult.data,
|
|
153
|
-
hackScrollbar: hackScrollbarResult === null || hackScrollbarResult === void 0 ? void 0 : hackScrollbarResult.data,
|
|
154
|
-
bumpElements: bumpElementsResult === null || bumpElementsResult === void 0 ? void 0 : bumpElementsResult.data,
|
|
155
|
-
adjustContentHeights: adjustContentHeightsResult === null || adjustContentHeightsResult === void 0 ? void 0 : adjustContentHeightsResult.data,
|
|
156
|
-
tabs: [activeIdentifier], // array of tabs for this window
|
|
157
|
-
};
|
|
158
|
-
this.setState(stateToSet);
|
|
159
|
-
}
|
|
160
|
-
componentDidMount() {
|
|
161
|
-
// Goal: If a user gets focus into the title bar (if they Alt+Tab or Cmd+Tab into the window),
|
|
162
|
-
// we want to let get into the rest of the component using the keyboard alone. The UX for
|
|
163
|
-
// this task will be to seemingly TAB from the title bar into the window, if possible.
|
|
164
|
-
// Code: If the user presses the "Tab" key, move their focus to the browser view
|
|
165
|
-
window.addEventListener("keydown", (e) => {
|
|
166
|
-
if (e.key === "Tab") {
|
|
167
|
-
// This magic moves focus to a browserView, if one exists
|
|
168
|
-
FEAGlobals.finsembleWindow.focus();
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
let header = document.getElementsByClassName("fsbl-header")[0];
|
|
172
|
-
//Add a margin top to the body if there title bar is injected into the component.
|
|
173
|
-
if (header) {
|
|
174
|
-
document.body.style.margin = "0px";
|
|
175
|
-
document.body.style.marginTop = window.getComputedStyle(header, null).getPropertyValue("height");
|
|
176
|
-
}
|
|
177
|
-
this.hackScrollbar();
|
|
178
|
-
storeManager.addInitializedListener(this.onInitialized);
|
|
179
|
-
storeManager.initialize();
|
|
180
|
-
}
|
|
181
|
-
componentDidUpdate() {
|
|
182
|
-
FEAGlobals.FSBL.Clients.Logger.system.debug("WindowTitleBarShell:componentDidUpdate");
|
|
183
|
-
// Sometimes handleMouseUp is not invoked; specifically this can happen if the mouse is not over the drag handle when the button is
|
|
184
|
-
// unpressed. This happens when the drag starts near the bottom of the drag handle and the mouse is moved UP. If the window is
|
|
185
|
-
// docked to a window ABOVE then it may snap a few pixels up, making the mouse no longer on top of the drag handle. At this point, the
|
|
186
|
-
// componentDidUpdate is executed and the onmouseup handler is not invoked. Setting this.isMousePressed handles that narrow case.
|
|
187
|
-
this.isMousePressed = false;
|
|
188
|
-
this.hackScrollbar();
|
|
189
|
-
this.maybeAdjustWindow();
|
|
190
|
-
window.addEventListener("resize", () => this.maybeAdjustWindow());
|
|
191
|
-
if (!this.dragMutationObserver) {
|
|
192
|
-
const headerCenter = document.querySelector(".fsbl-header-center");
|
|
193
|
-
if (headerCenter) {
|
|
194
|
-
this.dragMutationObserver = new MutationObserver(_throttle(this.resizeDragHandle, 250));
|
|
195
|
-
this.dragMutationObserver.observe(headerCenter, {
|
|
196
|
-
childList: true,
|
|
197
|
-
characterData: false,
|
|
198
|
-
subtree: true,
|
|
199
|
-
});
|
|
200
|
-
this.dragResizeObserver = new ResizeObserver(_throttle(this.resizeDragHandle, 250));
|
|
201
|
-
this.dragResizeObserver.observe(headerCenter);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
componentWillUnmount() {
|
|
206
|
-
var _a, _b, _c;
|
|
207
|
-
(_a = this.dragMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
208
|
-
(_b = this.dragResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
209
|
-
storeManager.removeInitializedListener(this.onInitialized);
|
|
210
|
-
window.removeEventListener("resize", () => this.maybeAdjustWindow());
|
|
211
|
-
if (this.state.initialized) {
|
|
212
|
-
(_c = this.store) === null || _c === void 0 ? void 0 : _c.removeListeners([
|
|
213
|
-
{ field: "Main.windowTitle", listener: this.onTitleChange },
|
|
214
|
-
{
|
|
215
|
-
field: "Main.showDockingTooltip",
|
|
216
|
-
listener: this.onShowDockingToolTip,
|
|
217
|
-
},
|
|
218
|
-
{ field: "Main.dockingIcon", listener: this.onToggleDockingIcon },
|
|
219
|
-
{
|
|
220
|
-
field: "Main.dockingEnabled",
|
|
221
|
-
listener: this.onDockingEnabledChanged,
|
|
222
|
-
},
|
|
223
|
-
{ field: "AlwaysOnTop.show", listener: this.onAlwaysOnTopChanged },
|
|
224
|
-
{ field: "Linker.showLinkerButton", listener: this.showLinkerButton },
|
|
225
|
-
{
|
|
226
|
-
field: "Sharer.emitterEnabled",
|
|
227
|
-
listener: this.onShareEmitterChanged,
|
|
228
|
-
},
|
|
229
|
-
{ field: "isTopRight", listener: this.isTopRight },
|
|
230
|
-
{ field: "tabs", listener: this.onTabsChanged },
|
|
231
|
-
{ field: "showTabs", listener: this.onShowTabsChanged },
|
|
232
|
-
], () => { }, () => { });
|
|
233
|
-
// Cleanup all listeners
|
|
234
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.startTilingOrTabbing", this.disallowDragOnCenterRegion);
|
|
235
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.stopTilingOrTabbing", this.allowDragOnCenterRegion);
|
|
236
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.cancelTilingOrTabbing", this.allowDragOnCenterRegion);
|
|
237
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.startTilingOrTabbing", this.onTilingStart);
|
|
238
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.stopTilingOrTabbing", this.onTilingStop);
|
|
239
|
-
FEAGlobals.FSBL.Clients.RouterClient.removeListener("DockingService.cancelTilingOrTabbing", this.onTilingStop);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
setDOMBasedMovement(err, response) {
|
|
243
|
-
if (response && response.hasOwnProperty("value")) {
|
|
244
|
-
this.setState({
|
|
245
|
-
useDOMBasedMovement: response.value,
|
|
246
|
-
dragHandleName: response.value ? "fsbl-drag-handle" : "fsbl-drag-handle-native-movement",
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* 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.
|
|
252
|
-
*/
|
|
253
|
-
allowDragOnCenterRegion() {
|
|
254
|
-
this.setState({
|
|
255
|
-
allowDragOnCenterRegion: true,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.
|
|
260
|
-
*/
|
|
261
|
-
disallowDragOnCenterRegion() {
|
|
262
|
-
this.setState({
|
|
263
|
-
allowDragOnCenterRegion: false,
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* When tiling start, we want to find the dragHandler and hide it
|
|
268
|
-
*/
|
|
269
|
-
onTilingStart() {
|
|
270
|
-
var _a;
|
|
271
|
-
(_a = document.querySelector(`.${this.state.dragHandleName}`)) === null || _a === void 0 ? void 0 : _a.classList.add("hidden");
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* When tiling stops, we want to find the dragHandler and re-show it
|
|
275
|
-
*/
|
|
276
|
-
onTilingStop() {
|
|
277
|
-
var _a;
|
|
278
|
-
(_a = document.querySelector(`.${this.state.dragHandleName}.hidden`)) === null || _a === void 0 ? void 0 : _a.classList.remove("hidden");
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Called whenever a tab is dropped on a non tab area.
|
|
282
|
-
* It won't be called when dropped on a tab that handles handle the event.
|
|
283
|
-
*/
|
|
284
|
-
onDropHandler() {
|
|
285
|
-
FEAGlobals.FSBL.Clients.RouterClient.transmit("DockingService.cancelTilingOrTabbing", {});
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Called when user double clicks on drag handle
|
|
289
|
-
*/
|
|
290
|
-
onDoubleClick() {
|
|
291
|
-
// Actions.clickMaximize checks the window state
|
|
292
|
-
// and toggles between maximize and minimize.
|
|
293
|
-
Actions.clickMaximize();
|
|
294
|
-
}
|
|
295
|
-
_setOnMouseUpAndDownHandlers(element) {
|
|
296
|
-
// Sometimes the mouse cursor can leave the drag handle when the window is moved quickly
|
|
297
|
-
// In this case, the drag will succeed but handleMouseUp() is not invoked; as a consequence,
|
|
298
|
-
// this.isMousePressed is not reset and FSBL.Clients.WindowClient.stopMovingWindow() is not called.
|
|
299
|
-
//
|
|
300
|
-
// To work around this, a new variable is introduced in order to keep track of if the mouse cursor
|
|
301
|
-
// has left the drag handle. If handleMouseDown is invoked AND mouseHasLeft has been set to true, then
|
|
302
|
-
// any click (handleMouseDown) will reset mouseHasLeft and this.isMousePressed (the drag state)
|
|
303
|
-
let mouseHasLeft = false;
|
|
304
|
-
/**
|
|
305
|
-
* Keeps track of when the mouse cursor leaves the drag handle.
|
|
306
|
-
*/
|
|
307
|
-
const handleMouseLeave = () => {
|
|
308
|
-
mouseHasLeft = true;
|
|
309
|
-
};
|
|
310
|
-
// if do double click it will invoke MouseDown and MouseUp events which could break the window bounds. So wait a 100ms for moving or resizing the window.
|
|
311
|
-
const handleMouseDown = (event) => {
|
|
312
|
-
// If the mouse has left the drag handle then reset drag state on click
|
|
313
|
-
if (mouseHasLeft) {
|
|
314
|
-
mouseHasLeft = false;
|
|
315
|
-
this.isMousePressed = false;
|
|
316
|
-
FEAGlobals.FSBL.Clients.WindowClient.stopMovingWindow();
|
|
317
|
-
}
|
|
318
|
-
// prevent a second call if the button hasn't been unpressed
|
|
319
|
-
if (this.isMousePressed) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
// Indicate that the mouse has been pressed
|
|
323
|
-
this.isMousePressed = true;
|
|
324
|
-
setTimeout(() => {
|
|
325
|
-
if (this.isMousePressed) {
|
|
326
|
-
FEAGlobals.FSBL.Clients.WindowClient.startMovingWindow(event);
|
|
327
|
-
}
|
|
328
|
-
}, 100);
|
|
329
|
-
};
|
|
330
|
-
const handleMouseUp = () => {
|
|
331
|
-
// prevent a call if the button hasn't been pressed
|
|
332
|
-
if (!this.isMousePressed) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
this.isMousePressed = false;
|
|
336
|
-
FEAGlobals.FSBL.Clients.WindowClient.stopMovingWindow();
|
|
337
|
-
};
|
|
338
|
-
element.onmouseleave = handleMouseLeave;
|
|
339
|
-
element.onmousedown = handleMouseDown;
|
|
340
|
-
element.onmouseup = handleMouseUp;
|
|
341
|
-
}
|
|
342
|
-
makeDragHandle(fsblHeader, dragHandleCssClass) {
|
|
343
|
-
let dragHandle = document.createElement("div");
|
|
344
|
-
dragHandle.className = dragHandleCssClass;
|
|
345
|
-
this._setOnMouseUpAndDownHandlers(dragHandle);
|
|
346
|
-
dragHandle.ondblclick = () => {
|
|
347
|
-
this.onDoubleClick();
|
|
348
|
-
};
|
|
349
|
-
fsblHeader.insertBefore(dragHandle, fsblHeader.firstChild);
|
|
350
|
-
return dragHandle;
|
|
351
|
-
}
|
|
352
|
-
dragHandleBoundsForShowTabs(startingBounds) {
|
|
353
|
-
var _a;
|
|
354
|
-
if (this.state.tabs.length > 1) {
|
|
355
|
-
// The drag handle is the space between the right-most tab and the left-most window button (minimize, maximize, close, etc)
|
|
356
|
-
//
|
|
357
|
-
// The bounds will largely be the same as ".fsbl-header-right"
|
|
358
|
-
const headerRight = document.querySelector(".fsbl-header-right");
|
|
359
|
-
if (headerRight) {
|
|
360
|
-
// The padding (in pixels) for the left and right of the drag handle
|
|
361
|
-
const padding = 2;
|
|
362
|
-
// Get the RIGHT-MOST x-coordinate for the drag handle
|
|
363
|
-
//
|
|
364
|
-
// The "x" coordinate of the LEFT-MOST element in the "fsbl-header-right" container; but
|
|
365
|
-
// if there are no elements in the container then use the "innerWidth" of the window because that
|
|
366
|
-
// value is the furthest RIGHT x-coordinate available to use
|
|
367
|
-
const leftMostRightHeaderElement = document.querySelector(".fsbl-tabs-multiple .fsbl-header-right div:first-child");
|
|
368
|
-
const rightXCoord = leftMostRightHeaderElement
|
|
369
|
-
? leftMostRightHeaderElement.getBoundingClientRect().x
|
|
370
|
-
: window.innerWidth;
|
|
371
|
-
// Get the LEFT-MOST x-coordinate for the drag handle
|
|
372
|
-
//
|
|
373
|
-
// Get the "x" coordinate for the RIGHT-MOST tab; the "right" attribute will be the
|
|
374
|
-
// LEFT x-coordinate for the drag handle
|
|
375
|
-
const allTabs = document.querySelectorAll(".tab-region-wrapper .fsbl-tab");
|
|
376
|
-
const leftXCoord = allTabs.length
|
|
377
|
-
? Math.max(...[...allTabs].map((n) => n.getBoundingClientRect().right)) + padding
|
|
378
|
-
: padding;
|
|
379
|
-
// The "width" bounds attribute is the difference between leftXCoord and rightXCoord, minus padding
|
|
380
|
-
const width = rightXCoord - leftXCoord - padding;
|
|
381
|
-
FEAGlobals.FSBL.Clients.Logger.system.debug("dragHandleBoundsForShowTabs: calculating dimensions:", {
|
|
382
|
-
leftMostRightHeaderElement_getBoundingClientRect_x: leftMostRightHeaderElement === null || leftMostRightHeaderElement === void 0 ? void 0 : leftMostRightHeaderElement.getBoundingClientRect().x,
|
|
383
|
-
innerWidth,
|
|
384
|
-
rightXCoord,
|
|
385
|
-
leftXCoord,
|
|
386
|
-
width,
|
|
387
|
-
});
|
|
388
|
-
// Override bounds.width and bounds.left with the calculated values
|
|
389
|
-
return Object.assign(Object.assign({}, clone(headerRight.getBoundingClientRect())), { width: width, left: leftXCoord });
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
return startingBounds;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
// If tabs are not enabled, then the remained of fsbl-header-center beyond the tabs
|
|
397
|
-
// is the draggable area. This assumes left aligned tabs.
|
|
398
|
-
const fsblHeaderCenter = document.querySelector(".fsbl-header-center");
|
|
399
|
-
const bounds = (_a = fsblHeaderCenter === null || fsblHeaderCenter === void 0 ? void 0 : fsblHeaderCenter.getBoundingClientRect()) !== null && _a !== void 0 ? _a : startingBounds;
|
|
400
|
-
const tabRegionWrapperDiv = fsblHeaderCenter === null || fsblHeaderCenter === void 0 ? void 0 : fsblHeaderCenter.querySelector(".tab-region-wrapper div.fsbl-header-title");
|
|
401
|
-
if (tabRegionWrapperDiv) {
|
|
402
|
-
const theTabBounds = tabRegionWrapperDiv.getBoundingClientRect();
|
|
403
|
-
// Calculate the right portion
|
|
404
|
-
return Object.assign(Object.assign({}, clone(bounds)), { left: bounds.left + theTabBounds.width, width: bounds.width - theTabBounds.width });
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
return bounds;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.
|
|
413
|
-
* This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width
|
|
414
|
-
* to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when
|
|
415
|
-
* changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural
|
|
416
|
-
* css).
|
|
417
|
-
*
|
|
418
|
-
* Can remove all of the cq-drag and cq-no-drag because Chromium bug is fixed
|
|
419
|
-
* Remove fsbl-drag-region, it is no longer needed
|
|
420
|
-
* Hide the dragHandle during drop operations, so that it doesn't interfere
|
|
421
|
-
*/
|
|
422
|
-
resizeDragHandle() {
|
|
423
|
-
var _a, _b;
|
|
424
|
-
// Sometimes this function is called during a drag (determined by this.isMousePressed); in this case,
|
|
425
|
-
// the function should abort.
|
|
426
|
-
//
|
|
427
|
-
// This happens if the cursor starts dragging near the left end of the drag handle. When the mouse is moved left, the cursor
|
|
428
|
-
// moves left (over the right-most) tab for a few moments, triggering an invocation of this function. This is incorrect
|
|
429
|
-
// behavior and should be avoided
|
|
430
|
-
if (this.isMousePressed) {
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
// This function is invoked when a window is grouped or ungrouped (or docked); in all these cases, reset the mouse pressed state
|
|
434
|
-
//
|
|
435
|
-
// Reset the mouse pressed state
|
|
436
|
-
this.isMousePressed = false;
|
|
437
|
-
try {
|
|
438
|
-
const fsblHeader = document.querySelector(".fsbl-header");
|
|
439
|
-
// If there isn't an FSBLHeader then there doesn't need to be a drag handle.
|
|
440
|
-
if (!fsblHeader)
|
|
441
|
-
return;
|
|
442
|
-
const dragHandleCssClass = this.state.useDOMBasedMovement
|
|
443
|
-
? "fsbl-drag-handle"
|
|
444
|
-
: "fsbl-drag-handle-native-movement";
|
|
445
|
-
const dragHandleToRemoveClass = this.state.useDOMBasedMovement
|
|
446
|
-
? "fsbl-drag-handle-native-movement"
|
|
447
|
-
: "fsbl-drag-handle";
|
|
448
|
-
// Create the dragger if it doesn't already exist
|
|
449
|
-
let dragHandle = (_a = document.querySelector(`.${dragHandleCssClass}`)) !== null && _a !== void 0 ? _a : this.makeDragHandle(fsblHeader, dragHandleCssClass);
|
|
450
|
-
// When the titlebar starts up, useDOMBasedMovement will have a default value that is not the same as the config value
|
|
451
|
-
// 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
|
|
452
|
-
const dragHandleToRemove = document.querySelector(`.${dragHandleToRemoveClass}`);
|
|
453
|
-
if (dragHandleToRemove)
|
|
454
|
-
(_b = dragHandleToRemove.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(dragHandleToRemove);
|
|
455
|
-
// Set the height of the dragHandle to match the height of the window title bar
|
|
456
|
-
// Do this every time through the render loop just in case a customer builds a
|
|
457
|
-
// header bar with dynamic height!
|
|
458
|
-
let bounds = fsblHeader.getBoundingClientRect();
|
|
459
|
-
dragHandle.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
|
|
460
|
-
dragHandle.style.marginTop = `${-bounds.height + 5}px`; // Negative margin pulls the drag handle up over the fixed header
|
|
461
|
-
// Start logic for determining where to place our dragHandle
|
|
462
|
-
if (this.state.showTabs) {
|
|
463
|
-
bounds = this.dragHandleBoundsForShowTabs(bounds);
|
|
464
|
-
FEAGlobals.FSBL.Clients.Logger.system.debug("dragHandleBoundsForShowTabs: calculated bounds:", bounds);
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
// If tabs are not enabled, then the entire center is the drag area
|
|
468
|
-
let fsblHeaderCenter = document.querySelector(".fsbl-header-center");
|
|
469
|
-
if (fsblHeaderCenter)
|
|
470
|
-
bounds = fsblHeaderCenter.getBoundingClientRect();
|
|
471
|
-
}
|
|
472
|
-
if (bounds) {
|
|
473
|
-
dragHandle.style.left = `${bounds.left}px`;
|
|
474
|
-
dragHandle.style.width = `${bounds.width}px`;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
catch (error) {
|
|
478
|
-
console.error(error);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Whether the component's config allows for the linker.
|
|
483
|
-
* @param {} err
|
|
484
|
-
* @param {*} response
|
|
485
|
-
*/
|
|
486
|
-
showLinkerButton(err, response) {
|
|
487
|
-
this.setState({ showLinkerButton: response.value });
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* 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.
|
|
491
|
-
* @param {} err
|
|
492
|
-
* @param {*} response
|
|
493
|
-
*/
|
|
494
|
-
isTopRight(err, response) {
|
|
495
|
-
this.setState({ isTopRight: response.value });
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* @param {*} err
|
|
499
|
-
* @param {*} response
|
|
500
|
-
*/
|
|
501
|
-
onTitleChange(err, response) {
|
|
502
|
-
let { tabs } = this.state;
|
|
503
|
-
let myIdentifier = FEAGlobals.FSBL.Clients.WindowClient.getWindowIdentifier();
|
|
504
|
-
tabs = tabs.map((el) => {
|
|
505
|
-
if (!el.windowName && el.name)
|
|
506
|
-
el.windowName = el.name;
|
|
507
|
-
if (!el.name && el.windowName)
|
|
508
|
-
el.name = el.windowName;
|
|
509
|
-
return el;
|
|
510
|
-
});
|
|
511
|
-
const myIndex = tabs.findIndex((el) => el.name === myIdentifier.windowName);
|
|
512
|
-
if (myIndex === -1)
|
|
513
|
-
return;
|
|
514
|
-
let myTab = tabs[myIndex] || {};
|
|
515
|
-
myTab.title = response.value;
|
|
516
|
-
tabs.splice(myIndex, 1, myTab);
|
|
517
|
-
this.setState({
|
|
518
|
-
windowTitle: response.value,
|
|
519
|
-
tabs: tabs,
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* The next few methods are store change handlers that sync local state with the store's state.
|
|
524
|
-
*/
|
|
525
|
-
onShowDockingToolTip(err, response) {
|
|
526
|
-
this.setState({ showDockingTooltip: response.value });
|
|
527
|
-
}
|
|
528
|
-
onToggleDockingIcon(err, response) {
|
|
529
|
-
this.setState({ dockingIcon: response.value });
|
|
530
|
-
}
|
|
531
|
-
onDockingEnabledChanged(err, response) {
|
|
532
|
-
this.setState({ dockingEnabled: response.value });
|
|
533
|
-
}
|
|
534
|
-
onAlwaysOnTopChanged(err, response) {
|
|
535
|
-
this.setState({ alwaysOnTopButton: response.value });
|
|
536
|
-
}
|
|
537
|
-
onStoreChanged(newState) {
|
|
538
|
-
this.setState(newState);
|
|
539
|
-
}
|
|
540
|
-
onShareEmitterChanged(err, response) {
|
|
541
|
-
this.setState({ showShareButton: response.value });
|
|
542
|
-
}
|
|
543
|
-
onTabsChanged(err, response) {
|
|
544
|
-
this.setState({
|
|
545
|
-
tabs: response.value,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
onShowTabsChanged(err, response) {
|
|
549
|
-
// If we are not showing tabs, then it means that it is a non tabbed window
|
|
550
|
-
// therefore we need to check whether we have a window title contained in
|
|
551
|
-
// .div.fsbl-tab-editor so that we can edit it.
|
|
552
|
-
if (!response.value) {
|
|
553
|
-
let tabEditor = document.querySelector("div.fsbl-tab-editor");
|
|
554
|
-
if (tabEditor) {
|
|
555
|
-
// we set this z-index value to be slightly higher than the drag handle
|
|
556
|
-
// to make the editor dragable AND double-clickcable
|
|
557
|
-
tabEditor.style.zIndex = "2147483647";
|
|
558
|
-
// We add the mousedown and mouseup functions to the tab editor
|
|
559
|
-
// so that on a single mouse down it allows the user to drag the
|
|
560
|
-
// window on both the .fsbl-drag-handle and the .fsbl-tab-editor
|
|
561
|
-
this._setOnMouseUpAndDownHandlers(tabEditor);
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
this.setState({
|
|
565
|
-
showTabs: response.value,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
// Hack the window's scrollbar so that it displays underneath the header. html.overflow: hidden body.overflow:auto
|
|
569
|
-
// This is turned on by default. Set "Window Manager.hackScrollbar: false" to turn it off
|
|
570
|
-
hackScrollbar() {
|
|
571
|
-
if (this.state.hackScrollbar) {
|
|
572
|
-
const htmlElement = document.querySelector("html");
|
|
573
|
-
if (htmlElement)
|
|
574
|
-
htmlElement.style.overflowY = "hidden";
|
|
575
|
-
const bodyElement = document.querySelector("body");
|
|
576
|
-
if (bodyElement)
|
|
577
|
-
bodyElement.style.overflowY = "auto";
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* Once document is ready and header is injected into DOM, begin adjusting the height of elements and bump fixed/absolute elements
|
|
582
|
-
*/
|
|
583
|
-
async maybeAdjustWindow() {
|
|
584
|
-
// don't start pushing stuff down until page is ready. This is needed for preloaded titlebars because they can happen before the page is ready.
|
|
585
|
-
if (document.readyState === "complete") {
|
|
586
|
-
this.beginAdjustment();
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
document.addEventListener("readystatechange", () => {
|
|
590
|
-
if (document.readyState === "complete")
|
|
591
|
-
this.beginAdjustment();
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* Begin adjusting the body and top level elements and their direct descendants by the header height.
|
|
597
|
-
*/
|
|
598
|
-
beginAdjustment() {
|
|
599
|
-
const header = document.getElementsByClassName("fsbl-header")[0];
|
|
600
|
-
if (header) {
|
|
601
|
-
const bodyElement = document.querySelector("body");
|
|
602
|
-
const headerHeight = window.getComputedStyle(header, null).getPropertyValue("height");
|
|
603
|
-
if (bodyElement) {
|
|
604
|
-
bodyElement.style.height = `calc(100vh - ${headerHeight})`;
|
|
605
|
-
}
|
|
606
|
-
if (this.state.adjustContentHeights)
|
|
607
|
-
this.adjustTopLevelHeight(Number.parseInt(headerHeight, 10));
|
|
608
|
-
this.bumpElements(this.state.bumpElements);
|
|
609
|
-
if (this.state.bumpElements.monitorFixedAdditions)
|
|
610
|
-
this.monitorFixedPositionedElements(headerHeight);
|
|
611
|
-
}
|
|
612
|
-
else {
|
|
613
|
-
FEAGlobals.FSBL.Clients.Logger.system.error("WindowTitleBarShell.maybeAdjustWindow:could not find the header.");
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Togglable setting found in `foreign.components.["Window Manager"].FSBLHeader.adjustContentHeights`
|
|
618
|
-
* Called from beginAdjustment()
|
|
619
|
-
*
|
|
620
|
-
* Adjusts the top level content max-height to be 100% subtracted by the total height of the previous elements.
|
|
621
|
-
* The height of the previous elements are added to this calculation if they are not fixed or absolute.
|
|
622
|
-
* These top level elements will be passed into adjustContentHeight where their descendants
|
|
623
|
-
* will also have their heights adjusted.
|
|
624
|
-
*
|
|
625
|
-
* Absolute and Fixed positions elements, however, will just have their max-heights set to 100% subtracted by the header height
|
|
626
|
-
* since they are not part of the document flow.
|
|
627
|
-
* Example:
|
|
628
|
-
* In this below situation, the B element extends passed the view because the header is injected. B doesn't have a
|
|
629
|
-
* set height so it'll extend as far as it needs.
|
|
630
|
-
* --------------------
|
|
631
|
-
* |******************|
|
|
632
|
-
* |* Titlebar *|
|
|
633
|
-
* |******************|
|
|
634
|
-
* |******************|
|
|
635
|
-
* |* A *|
|
|
636
|
-
* |* *|
|
|
637
|
-
* |******************|
|
|
638
|
-
* |******************|
|
|
639
|
-
* |* *|
|
|
640
|
-
* |* *|
|
|
641
|
-
* |* B *|
|
|
642
|
-
* |* *|
|
|
643
|
-
* |* *|
|
|
644
|
-
* |* *|
|
|
645
|
-
* --------------------
|
|
646
|
-
* The chain of adjust functions will set the maxHeight of A and B to ensure they both occupy space that the above element doesn't
|
|
647
|
-
* and keep it within the bounds of the view.
|
|
648
|
-
* --------------------
|
|
649
|
-
* |******************|
|
|
650
|
-
* |* Titlebar *|
|
|
651
|
-
* |******************|
|
|
652
|
-
* |******************|
|
|
653
|
-
* |* A *|
|
|
654
|
-
* |* *|
|
|
655
|
-
* |******************|
|
|
656
|
-
* |******************|
|
|
657
|
-
* |* *|
|
|
658
|
-
* |* *|
|
|
659
|
-
* |* B *|
|
|
660
|
-
* |* *|
|
|
661
|
-
* |* *|
|
|
662
|
-
* |******************|
|
|
663
|
-
* --------------------
|
|
664
|
-
* @param {number} headerHeight the height of the header
|
|
665
|
-
*/
|
|
666
|
-
adjustTopLevelHeight(headerHeight) {
|
|
667
|
-
const elems = document.body.querySelectorAll(":scope > *:not(#FSBLHeader, .fsbl-header)");
|
|
668
|
-
let prevHeight = 0;
|
|
669
|
-
// tags that we should avoid adding max-heights too
|
|
670
|
-
const avoidTags = ["svg", "script"];
|
|
671
|
-
elems.forEach((elem) => {
|
|
672
|
-
if (!avoidTags.includes(String(elem.tagName).toLowerCase())) {
|
|
673
|
-
this.adjust(elem, prevHeight, maxHeight, headerHeight);
|
|
674
|
-
// Heights of fixed and absolute positioned elements are not added to the total heights of previous elements
|
|
675
|
-
// since they are removed from the document flow and can be positioned anywhere in the page.
|
|
676
|
-
if (elem.style.position !== "fixed" && elem.style.position !== "absolute")
|
|
677
|
-
prevHeight = prevHeight + elem.offsetHeight;
|
|
678
|
-
this.adjustContentHeight(elem, headerHeight);
|
|
679
|
-
}
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* Adjusts the content view height to be maximum of the parent container (passed in by adjustTopLevelHeight()) height
|
|
684
|
-
* subtracted by the total height of elements above it. The height of the previous elements are added to this calculation
|
|
685
|
-
* if they are not fixed or absolute.
|
|
686
|
-
* @param {object} parentElem parent element
|
|
687
|
-
* @param {number} headerHeight the height of the header
|
|
688
|
-
*/
|
|
689
|
-
adjustContentHeight(parentElem, headerHeight) {
|
|
690
|
-
const { children } = parentElem;
|
|
691
|
-
const len = children.length;
|
|
692
|
-
let prevHeight = 0;
|
|
693
|
-
for (let i = 0; i < len; i++) {
|
|
694
|
-
this.adjust(children[i], prevHeight, maxHeight, headerHeight);
|
|
695
|
-
// Fixed and absolute positioned elements are ignored since they are removed from the document flow.
|
|
696
|
-
const elemPosition = window.getComputedStyle(children[i], null).getPropertyValue("position");
|
|
697
|
-
if (elemPosition !== "fixed" && elemPosition !== "absolute")
|
|
698
|
-
prevHeight = prevHeight + children[i].offsetHeight;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* This is used in adjustTopLevelHeight() and adjustContentHeight()
|
|
703
|
-
*
|
|
704
|
-
* Set the max height of each element to be the height of the parent container
|
|
705
|
-
* subtracted by the height of the previous element. This forces the element to either obey its
|
|
706
|
-
* predefined height or stay within the bounds of the max height.
|
|
707
|
-
*
|
|
708
|
-
* @param {object} elem HTML element
|
|
709
|
-
* @param {number} prevHeight height of previous sibling
|
|
710
|
-
* @param {string} maxElemHeight maximum height of the element
|
|
711
|
-
* @param {number} headerHeight the height of the header
|
|
712
|
-
*/
|
|
713
|
-
adjust(elem, prevHeight, maxElemHeight, headerHeight = 25) {
|
|
714
|
-
var _a;
|
|
715
|
-
if (
|
|
716
|
-
// workaround to fix dnd scrim disappearing
|
|
717
|
-
!((_a = elem.classList) === null || _a === void 0 ? void 0 : _a.contains("fsbl-share-scrim"))) {
|
|
718
|
-
const clientHeight = elem.clientHeight ? elem.clientHeight : 0;
|
|
719
|
-
const offsetHeight = elem.offsetHeight ? elem.offsetHeight : 0;
|
|
720
|
-
const offset = offsetHeight - clientHeight;
|
|
721
|
-
let adjustPrev = prevHeight + offset;
|
|
722
|
-
const elemPosition = window.getComputedStyle(elem, null).getPropertyValue("position");
|
|
723
|
-
if (elemPosition == "fixed" || elemPosition == "absolute")
|
|
724
|
-
adjustPrev = headerHeight + offset;
|
|
725
|
-
elem.style.maxHeight = `calc(${maxElemHeight} - ${adjustPrev}px)`;
|
|
726
|
-
elem.classList.add("adjusted-element");
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* Togglable setting found in `foreign.components.["Window Manager"].FSBLHeader.bumpElements.[bumpBy|fixed|absolute]`
|
|
731
|
-
* Called from beginAdjustment()
|
|
732
|
-
*
|
|
733
|
-
* Calls bumpFixedElements and bumpAbsoluteElements to bump fixed and/or absolute elements by the value of bumpBy if configured to do so.
|
|
734
|
-
* Since absolute and fixed positioned elements are removed from the document flow their positions will not be adjusted when the titlebar
|
|
735
|
-
* is injected and they have a set top style. However, if the element is an absolute positioned element and it's
|
|
736
|
-
* parent container has a position that is not set to static, then it'll adjust relative to the parent. Fixed positioned elements, on the otherhand,
|
|
737
|
-
* won't adjust unless their top stlyes are changed.
|
|
738
|
-
* @param {object} config bumpElements object
|
|
739
|
-
*/
|
|
740
|
-
bumpElements(config) {
|
|
741
|
-
if ((config === null || config === void 0 ? void 0 : config.bumpBy) !== "0px") {
|
|
742
|
-
if (config.fixed)
|
|
743
|
-
this.bumpFixedElements(config);
|
|
744
|
-
if (config.absolute)
|
|
745
|
-
this.bumpAbsoluteElements(config);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Called from bumpElements
|
|
750
|
-
*
|
|
751
|
-
* Bumps all elements with fixed positioning, that are not in the header, down by the configured amount.
|
|
752
|
-
* @private
|
|
753
|
-
* @param {object} params bumpElements object
|
|
754
|
-
*/
|
|
755
|
-
bumpFixedElements(params) {
|
|
756
|
-
var _a, _b;
|
|
757
|
-
let { fixed, bumpBy } = params;
|
|
758
|
-
const getFixedElements = (selector) => {
|
|
759
|
-
const fixedElems = [];
|
|
760
|
-
const nodes = document.body.querySelectorAll(selector);
|
|
761
|
-
nodes.forEach((node) => {
|
|
762
|
-
const style = window.getComputedStyle(node, null);
|
|
763
|
-
if (style.getPropertyValue("position") == "fixed")
|
|
764
|
-
fixedElems.push(node);
|
|
765
|
-
});
|
|
766
|
-
return fixedElems;
|
|
767
|
-
};
|
|
768
|
-
const selector = "*:not(#FSBLHeader, .fsbl-header)";
|
|
769
|
-
// Get all fixed positioned elements
|
|
770
|
-
const elems = getFixedElements(selector);
|
|
771
|
-
const len = elems.length;
|
|
772
|
-
for (let i = 0; i < len; i++) {
|
|
773
|
-
const style = window.getComputedStyle(elems[i], null);
|
|
774
|
-
const topStyle = style.getPropertyValue("top");
|
|
775
|
-
if (!((_b = (_a = elems[i]) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains("bumped-element"))) {
|
|
776
|
-
elems[i].style.top = this.calculateBumpValue(fixed, topStyle, bumpBy);
|
|
777
|
-
elems[i].classList.add("bumped-element");
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Called from bumpElements
|
|
783
|
-
*
|
|
784
|
-
* Bumps all absolute positioned elements with static parents, that are not in the header, down by the configured amount.
|
|
785
|
-
* @private
|
|
786
|
-
* @param {object} params bumpElements object
|
|
787
|
-
*/
|
|
788
|
-
bumpAbsoluteElements(params) {
|
|
789
|
-
var _a, _b;
|
|
790
|
-
let { absolute, bumpBy } = params;
|
|
791
|
-
const selector = "*:not(#FSBLHeader, .fsbl-header)";
|
|
792
|
-
// Get top level absolute positioned elements and elements who have static parents
|
|
793
|
-
const elems = this.traverseHtml({ children: document.body.querySelectorAll(`:scope > ${selector}`) });
|
|
794
|
-
const len = elems.length;
|
|
795
|
-
for (let i = 0; i < len; i++) {
|
|
796
|
-
const style = window.getComputedStyle(elems[i], null);
|
|
797
|
-
const topStyle = style.getPropertyValue("top");
|
|
798
|
-
// Target absolute positioned elements
|
|
799
|
-
if (style.getPropertyValue("position") == "absolute" && !((_b = (_a = elems[i]) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains("bumped-element"))) {
|
|
800
|
-
elems[i].style.top = this.calculateBumpValue(absolute, topStyle, bumpBy);
|
|
801
|
-
elems[i].classList.add("bumped-element");
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* Used in bumpFixedElements and bumpAbsoluteElements
|
|
807
|
-
* Calculates value to bump element by. If 'all' return top style plus the header height, if '0Positioned' return just header height
|
|
808
|
-
* @param type Whether all elements are being bumped by the header height and their top style or just header height
|
|
809
|
-
* @param topStyle Element top value
|
|
810
|
-
* @param bumpBy Value to bump element by
|
|
811
|
-
* @returns Top style for element
|
|
812
|
-
*/
|
|
813
|
-
calculateBumpValue(type, topStyle, bumpBy) {
|
|
814
|
-
let topVal = topStyle;
|
|
815
|
-
if (type == "all") {
|
|
816
|
-
topVal = `calc(${topStyle} + ${bumpBy})`;
|
|
817
|
-
}
|
|
818
|
-
else if (type == "0Positioned" && possibleZeros.includes(topStyle)) {
|
|
819
|
-
topVal = bumpBy;
|
|
820
|
-
}
|
|
821
|
-
return topVal;
|
|
822
|
-
}
|
|
823
|
-
/**
|
|
824
|
-
* Used in bumpAbsoluteElements
|
|
825
|
-
*
|
|
826
|
-
* Recursively traverse through the HTML document and return an array of the top level elements
|
|
827
|
-
* and elements with static parents
|
|
828
|
-
* @param {object} element The HTML element
|
|
829
|
-
* @param {array} acc accumulator
|
|
830
|
-
* @returns {array} array top level elements and elements with static parents
|
|
831
|
-
*
|
|
832
|
-
*/
|
|
833
|
-
traverseHtml(element, acc = []) {
|
|
834
|
-
const elems = element.children;
|
|
835
|
-
const len = elems.length;
|
|
836
|
-
if (!len) {
|
|
837
|
-
acc.push(element);
|
|
838
|
-
}
|
|
839
|
-
else {
|
|
840
|
-
for (let i = 0; i < len; i++) {
|
|
841
|
-
const style = window.getComputedStyle(elems[i], null);
|
|
842
|
-
if (style.getPropertyValue("position") == "static") {
|
|
843
|
-
acc = this.traverseHtml(elems[i], acc);
|
|
844
|
-
}
|
|
845
|
-
else {
|
|
846
|
-
acc.push(elems[i]);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
return acc;
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* Togglable setting found in `foreign.components.["Window Manager"].FSBLHeader.bumpElements.[monitorFixedAdditions]`
|
|
854
|
-
* Called from beginAdjustment()
|
|
855
|
-
*
|
|
856
|
-
* Monitors the DOM for mutations, if the added node has a fixed position with a top style of 0px, it will be bumped by the title bar height.
|
|
857
|
-
* This ensures that if a fixed positioned element is dynamically added to the DOM, for example a pop-up modal, it'll have it's height adjusted
|
|
858
|
-
* by the header height since the initial bumping of elements can happen before this element exists.
|
|
859
|
-
*
|
|
860
|
-
* Element heights are not monitored and adjusted since this would require that all pre-existing elements have ther height recalculated each time
|
|
861
|
-
* a new element is dynamically added onto the page. Absolute postioned elements, however, could be monitored and adjusted since all we would
|
|
862
|
-
* need to check for is that it's parent has a static position or not, if it does then it can be adjusted.
|
|
863
|
-
* @param headerHeight the height of the header
|
|
864
|
-
*/
|
|
865
|
-
monitorFixedPositionedElements(headerHeight) {
|
|
866
|
-
const options = {
|
|
867
|
-
childList: true,
|
|
868
|
-
subtree: true,
|
|
869
|
-
};
|
|
870
|
-
/**
|
|
871
|
-
* MutationObserver interface provides the ability to watch for
|
|
872
|
-
* changes to the DOM tree using the observe method
|
|
873
|
-
*/
|
|
874
|
-
const mutationObserver = new MutationObserver((mutations) => {
|
|
875
|
-
mutations.forEach((mutation) => {
|
|
876
|
-
mutation.addedNodes.forEach((node) => {
|
|
877
|
-
var _a;
|
|
878
|
-
if (!((_a = node === null || node === void 0 ? void 0 : node.classList) === null || _a === void 0 ? void 0 : _a.contains("bumped-element"))) {
|
|
879
|
-
try {
|
|
880
|
-
const nodeStyle = window.getComputedStyle(node);
|
|
881
|
-
const topStyle = nodeStyle.top;
|
|
882
|
-
// make sure node is fixed, has top style set to 0, and has not been bumped
|
|
883
|
-
if (nodeStyle.position === "fixed" && possibleZeros.includes(topStyle)) {
|
|
884
|
-
node.style.top = this.calculateBumpValue("0Positioned", topStyle, headerHeight);
|
|
885
|
-
node.classList.add("bumped-element");
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
catch (err) {
|
|
889
|
-
// Expected to error if the node is not an Element e.g text is not of type Element
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
});
|
|
893
|
-
});
|
|
894
|
-
});
|
|
895
|
-
// We observe the body and do not disconnect because there may be other elements that are dynamically loaded, such as a dialogue menu.
|
|
896
|
-
mutationObserver.observe(document.body, options);
|
|
897
|
-
}
|
|
898
|
-
render() {
|
|
899
|
-
let showDockingIcon = !this.state.dockingEnabled ? false : this.state.dockingIcon;
|
|
900
|
-
let isGrouped = this.state.dockingIcon == "ejector";
|
|
901
|
-
let showMinimizeIcon = (isGrouped && this.state.isTopRight) || !isGrouped; // If not in a group or if topright in a group
|
|
902
|
-
let tabRegionClasses = "fsbl-tab-area";
|
|
903
|
-
let headerClasses = "fsbl-header";
|
|
904
|
-
// If we're showing tabs, we throw these classes on to modify styles.
|
|
905
|
-
if (this.state.showTabs) {
|
|
906
|
-
headerClasses = `${headerClasses} fsbl-tabs-enabled`;
|
|
907
|
-
}
|
|
908
|
-
if (this.state.tabs.length > 1) {
|
|
909
|
-
headerClasses = `${headerClasses} fsbl-tabs-multiple`;
|
|
910
|
-
}
|
|
911
|
-
const context = {
|
|
912
|
-
showLinkerButton: this.state.showLinkerButton,
|
|
913
|
-
showShareButton: this.state.showShareButton,
|
|
914
|
-
showTabRegion: this.state.showTabs,
|
|
915
|
-
showMinimizeButton: this.state.minButton && showMinimizeIcon,
|
|
916
|
-
showMaximizeButton: this.state.maxButton,
|
|
917
|
-
onTabDropped: this.allowDragOnCenterRegion,
|
|
918
|
-
showDockingButton: showDockingIcon,
|
|
919
|
-
showCloseButton: this.state.closeButton,
|
|
920
|
-
className: tabRegionClasses,
|
|
921
|
-
thisWindowTitle: this.state.windowTitle,
|
|
922
|
-
boundingBox: this.state.tabBarBoundingBox,
|
|
923
|
-
listenForDragOver: !this.state.allowDragOnCenterRegion,
|
|
924
|
-
tabs: this.state.tabs,
|
|
925
|
-
onTitleUpdated: Function.prototype,
|
|
926
|
-
showAlwaysOnTopButton: this.state.alwaysOnTopButton && showMinimizeIcon,
|
|
927
|
-
showTabs: this.state.showTabs,
|
|
928
|
-
alwaysOnTop: this.state.alwaysOnTop,
|
|
929
|
-
useDOMBasedMovement: this.state.useDOMBasedMovement,
|
|
930
|
-
};
|
|
931
|
-
return (React.createElement("div", { className: headerClasses, onDrop: this.onDropHandler.bind(this) }, this.state.initialized && (React.createElement(WindowTitleBarContext.Provider, { value: context }, this.props.children))));
|
|
932
|
-
}
|
|
933
|
-
}
|
|
42
|
+
export const WindowTitleBarShell = (props) => (
|
|
43
|
+
// Redux provider
|
|
44
|
+
React.createElement(Provider, { store: getStore() },
|
|
45
|
+
React.createElement(WindowTitleBarContents, Object.assign({}, props))));
|
|
934
46
|
//# sourceMappingURL=WindowTitleBarShell.js.map
|