@finsemble/finsemble-ui 8.3.0 → 8.3.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 +102 -28
- package/FEA.d.ts.map +1 -1
- package/FEA.js.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.d.ts +1 -0
- package/clients/Interop/FinsembleDesktopAgent.d.ts.map +1 -1
- package/clients/Interop/FinsembleDesktopAgent.js +17 -16
- package/clients/Interop/FinsembleDesktopAgent.js.map +1 -1
- package/clients/Interop/types.d.ts +1 -0
- package/clients/Interop/types.d.ts.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 +125 -112
- package/clients/Startup/windowStartup.js.map +1 -1
- package/clients/StoreModel.d.ts +8 -8
- package/clients/StoreModel.js +9 -9
- package/clients/StoreModel.js.map +1 -1
- package/clients/appsClient.d.ts +463 -0
- package/clients/appsClient.d.ts.map +1 -0
- package/clients/appsClient.js +696 -0
- package/clients/appsClient.js.map +1 -0
- package/clients/authenticationClient.d.ts +36 -27
- package/clients/authenticationClient.d.ts.map +1 -1
- package/clients/authenticationClient.js +18 -15
- package/clients/authenticationClient.js.map +1 -1
- package/clients/configClient.d.ts +189 -71
- package/clients/configClient.d.ts.map +1 -1
- package/clients/configClient.js +185 -114
- 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 +11 -75
- package/clients/dialogManagerClient.d.ts.map +1 -1
- package/clients/dialogManagerClient.js +11 -208
- package/clients/dialogManagerClient.js.map +1 -1
- package/clients/distributedStoreClient.d.ts +4 -0
- package/clients/distributedStoreClient.d.ts.map +1 -1
- package/clients/distributedStoreClient.js +4 -0
- package/clients/distributedStoreClient.js.map +1 -1
- package/clients/hotkeyClient.d.ts +23 -9
- package/clients/hotkeyClient.d.ts.map +1 -1
- package/clients/hotkeyClient.js +35 -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 +55 -209
- package/clients/launcherClient.d.ts.map +1 -1
- package/clients/launcherClient.js +37 -422
- package/clients/launcherClient.js.map +1 -1
- package/clients/logger.d.ts +6 -0
- package/clients/logger.d.ts.map +1 -1
- package/clients/logger.js +49 -41
- package/clients/logger.js.map +1 -1
- package/clients/notificationClient.d.ts +32 -8
- package/clients/notificationClient.d.ts.map +1 -1
- package/clients/notificationClient.js +32 -8
- package/clients/notificationClient.js.map +1 -1
- package/clients/routerClient.d.ts +39 -21
- package/clients/routerClient.d.ts.map +1 -1
- package/clients/routerClient.js +38 -20
- package/clients/routerClient.js.map +1 -1
- package/clients/searchClient.d.ts +7 -2
- package/clients/searchClient.d.ts.map +1 -1
- package/clients/searchClient.js +7 -2
- package/clients/searchClient.js.map +1 -1
- package/clients/storageClient.d.ts +19 -6
- package/clients/storageClient.d.ts.map +1 -1
- package/clients/storageClient.js +18 -6
- package/clients/storageClient.js.map +1 -1
- package/clients/windowClient.d.ts +207 -80
- package/clients/windowClient.d.ts.map +1 -1
- package/clients/windowClient.js +291 -139
- package/clients/windowClient.js.map +1 -1
- package/clients/workspaceClient.d.ts +45 -18
- package/clients/workspaceClient.d.ts.map +1 -1
- package/clients/workspaceClient.js +41 -13
- package/clients/workspaceClient.js.map +1 -1
- package/common/Desktop.d.ts +12 -50
- package/common/Desktop.d.ts.map +1 -1
- package/common/Desktop.js +14 -64
- package/common/Desktop.js.map +1 -1
- package/common/FinsembleWindow.d.ts +5 -108
- package/common/FinsembleWindow.d.ts.map +1 -1
- package/common/FinsembleWindow.js +28 -349
- 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 +3 -4
- package/deprecated/deprecatedFunctions.js.map +1 -1
- package/deprecated/deprecatedlauncherClient.d.ts +1 -1
- package/deprecated/deprecatedlauncherClient.d.ts.map +1 -1
- package/deprecated/deprecatedlauncherClient.js.map +1 -1
- package/deprecated/dragAndDropClient.d.ts +4 -3
- package/deprecated/dragAndDropClient.d.ts.map +1 -1
- package/deprecated/dragAndDropClient.js +15 -4
- 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 -171
- package/main.d.ts.map +1 -1
- package/main.js +3 -1
- package/main.js.map +1 -1
- package/package.json +4 -4
- package/platform/services/Interop/modules/types.d.ts +2 -0
- package/platform/services/Interop/modules/types.d.ts.map +1 -1
- package/platform/services/Interop/types.d.ts +24 -2
- package/platform/services/Interop/types.d.ts.map +1 -1
- package/platform/services/Interop/types.js.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 +2 -0
- package/platform/services/systemManager/_constants.js.map +1 -1
- package/platform/services/systemManager/types.d.ts +1 -1
- package/platform/services/systemManager/types.d.ts.map +1 -1
- package/platform/services/systemManager/types.js.map +1 -1
- package/platform/services/window/modules/actions.d.ts +68 -0
- package/platform/services/window/modules/actions.d.ts.map +1 -0
- package/platform/services/window/modules/actions.js +60 -0
- package/platform/services/window/modules/actions.js.map +1 -0
- package/platform/services/window/types.d.ts +275 -51
- 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/actions/smartDesktopDesignerActions.d.ts +7 -1
- package/react/actions/smartDesktopDesignerActions.d.ts.map +1 -1
- package/react/actions/smartDesktopDesignerActions.js +3 -0
- package/react/actions/smartDesktopDesignerActions.js.map +1 -1
- package/react/assets/css/core/icons.css +0 -5
- package/react/assets/css/dialogs.css +2 -1
- package/react/assets/css/fonts/icons-reference.html +1 -1
- package/react/assets/css/processMonitor.css +9 -4
- package/react/assets/css/userPreferences.css +1 -1
- package/react/assets/css/windowTitleBar.css +101 -285
- package/react/assets/icons/chevron-down.svg +1 -0
- package/react/assets/icons/chevron-up.svg +1 -0
- package/react/components/appCatalog/AppCatalog.d.ts +3 -0
- package/react/components/appCatalog/AppCatalog.d.ts.map +1 -1
- package/react/components/appCatalog/AppCatalog.js +3 -0
- package/react/components/appCatalog/AppCatalog.js.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.d.ts +4 -0
- package/react/components/appCatalog/AppCatalogComponent.d.ts.map +1 -1
- package/react/components/appCatalog/AppCatalogComponent.js +6 -2
- package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
- 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/Checkbox.d.ts +1 -0
- package/react/components/common/Checkbox.d.ts.map +1 -1
- package/react/components/common/Checkbox.js +14 -2
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ContextMenu.d.ts.map +1 -1
- package/react/components/common/ContextMenu.js +5 -11
- 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/FinsembleLink.d.ts +7 -0
- package/react/components/common/FinsembleLink.d.ts.map +1 -0
- package/react/components/common/FinsembleLink.js +13 -0
- package/react/components/common/FinsembleLink.js.map +1 -0
- package/react/components/common/Header.d.ts +1 -0
- package/react/components/common/Header.d.ts.map +1 -1
- package/react/components/common/Header.js +4 -2
- package/react/components/common/Header.js.map +1 -1
- package/react/components/common/css/accordion.css +9 -21
- package/react/components/common/css/application-edit-page.css +0 -15
- package/react/components/common/css/application-list.css +54 -23
- package/react/components/common/css/button.css +20 -0
- 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/icon/Icon.js +1 -1
- package/react/components/icon/Icon.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/components/shared/IconButton.d.ts +1 -1
- package/react/components/notifications/components/shared/IconButton.d.ts.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +2 -2
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts.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/sdd/Content.d.ts +9 -0
- package/react/components/sdd/Content.d.ts.map +1 -0
- package/react/components/sdd/Content.js +7 -0
- package/react/components/sdd/Content.js.map +1 -0
- package/react/components/sdd/Dashboard.d.ts +20 -0
- package/react/components/sdd/Dashboard.d.ts.map +1 -0
- package/react/components/sdd/Dashboard.js +103 -0
- package/react/components/sdd/Dashboard.js.map +1 -0
- package/react/components/sdd/Export.d.ts +24 -0
- package/react/components/sdd/Export.d.ts.map +1 -0
- package/react/components/sdd/Export.js +133 -0
- package/react/components/sdd/Export.js.map +1 -0
- package/react/components/sdd/ExportCloud.d.ts +7 -0
- package/react/components/sdd/ExportCloud.d.ts.map +1 -0
- package/react/components/sdd/ExportCloud.js +38 -0
- package/react/components/sdd/ExportCloud.js.map +1 -0
- package/react/components/sdd/ExportDeployInfo.d.ts +3 -0
- package/react/components/sdd/ExportDeployInfo.d.ts.map +1 -0
- package/react/components/sdd/ExportDeployInfo.js +18 -0
- package/react/components/sdd/ExportDeployInfo.js.map +1 -0
- package/react/components/sdd/ExportZip.d.ts +7 -0
- package/react/components/sdd/ExportZip.d.ts.map +1 -0
- package/react/components/sdd/ExportZip.js +43 -0
- package/react/components/sdd/ExportZip.js.map +1 -0
- package/react/components/sdd/ProjectErrors.d.ts +12 -0
- package/react/components/sdd/ProjectErrors.d.ts.map +1 -0
- package/react/components/sdd/ProjectErrors.js +26 -0
- package/react/components/sdd/ProjectErrors.js.map +1 -0
- package/react/components/sdd/ProjectMasonry.d.ts +13 -0
- package/react/components/sdd/ProjectMasonry.d.ts.map +1 -0
- package/react/components/sdd/ProjectMasonry.js +22 -0
- package/react/components/sdd/ProjectMasonry.js.map +1 -0
- package/react/components/sdd/Publish.d.ts +9 -0
- package/react/components/sdd/Publish.d.ts.map +1 -0
- package/react/components/sdd/Publish.js +113 -0
- package/react/components/sdd/Publish.js.map +1 -0
- package/react/components/sdd/PublishProgress.d.ts +10 -0
- package/react/components/sdd/PublishProgress.d.ts.map +1 -0
- package/react/components/sdd/PublishProgress.js +24 -0
- package/react/components/sdd/PublishProgress.js.map +1 -0
- package/react/components/sdd/View.d.ts +9 -0
- package/react/components/sdd/View.d.ts.map +1 -0
- package/react/components/sdd/View.js +7 -0
- package/react/components/sdd/View.js.map +1 -0
- package/react/components/sdd/css/addApp.css +62 -8
- package/react/components/sdd/css/appD.css +81 -0
- package/react/components/sdd/css/appDViewer.css +93 -0
- package/react/components/sdd/css/applications.css +53 -15
- package/react/components/sdd/css/exportAppD.css +31 -0
- package/react/components/sdd/css/horizontalScroll.css +9 -0
- package/react/components/sdd/css/project-header.css +2 -1
- package/react/components/sdd/css/views.css +3 -0
- package/react/components/sdd/smartDesktopClient.d.ts +627 -0
- package/react/components/sdd/smartDesktopClient.d.ts.map +1 -0
- package/react/components/sdd/smartDesktopClient.js +1222 -0
- package/react/components/sdd/smartDesktopClient.js.map +1 -0
- package/react/components/sdd/types.d.ts +9 -0
- package/react/components/sdd/types.d.ts.map +1 -0
- package/react/components/sdd/types.js +2 -0
- package/react/components/sdd/types.js.map +1 -0
- 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/search/SearchResults.d.ts.map +1 -1
- package/react/components/search/SearchResults.js +6 -6
- package/react/components/search/SearchResults.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 +83 -100
- package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
- package/react/components/toolbar/DownloadButton.d.ts +1 -1
- package/react/components/toolbar/DownloadButton.d.ts.map +1 -1
- package/react/components/toolbar/DownloadButton.js +3 -6
- package/react/components/toolbar/DownloadButton.js.map +1 -1
- package/react/components/toolbar/DragHandle.d.ts.map +1 -1
- package/react/components/toolbar/DragHandle.js +8 -5
- package/react/components/toolbar/DragHandle.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.d.ts.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +10 -1
- package/react/components/toolbar/ToolbarIcon.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/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +3 -0
- package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +5 -0
- package/react/components/userPreferences/components/content/Workspaces.d.ts.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.js +14 -1
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.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/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/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/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 +479 -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 +437 -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/react/reducers/rootReducer.d.ts +12 -0
- package/react/reducers/rootReducer.d.ts.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.d.ts.map +1 -1
- package/react/reducers/smartDesktopDesignerReducer.js +12 -0
- package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
- package/react/store.d.ts +24 -0
- package/react/store.d.ts.map +1 -1
- package/react/types/smartDesktopDesignerTypes.d.ts +42 -1
- package/react/types/smartDesktopDesignerTypes.d.ts.map +1 -1
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
- package/typedefs/FDC3/api/AppMetadata.d.ts +1 -0
- package/typedefs/FDC3/api/AppMetadata.d.ts.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
- /package/react/components/windowTitleBar/{components/right/CloseButton.d.ts → CloseButton.d.ts} +0 -0
- /package/react/components/windowTitleBar/{components/left/LinkerButton.d.ts → LinkerButton.d.ts} +0 -0
- /package/react/components/windowTitleBar/{components/left/LinkerGroups.d.ts → LinkerGroups.d.ts} +0 -0
|
@@ -1,1239 +0,0 @@
|
|
|
1
|
-
import BoxMath from "./boxMath";
|
|
2
|
-
import DockableBox from "./dockableBox";
|
|
3
|
-
import { System } from "../../../../common/system";
|
|
4
|
-
import { checkIfBoundsAreEqual, wrapWithTimeout } from "../../../../common/util";
|
|
5
|
-
import StorageClient from "../../../../clients/storageClient";
|
|
6
|
-
import { clone } from "../../../../common/util";
|
|
7
|
-
import { MOVE_REASON, WINDOWSTATE } from "../../../../common/constants";
|
|
8
|
-
import { adjustBoundsToBeOnMonitorAsync } from "../../../../common/Monitors";
|
|
9
|
-
import { RouterClient } from "../../../../clients/routerClient";
|
|
10
|
-
import { Logger } from "../../../../clients/logger";
|
|
11
|
-
import { defaultDockingOptions, } from "./types";
|
|
12
|
-
import pLimit from "p-limit";
|
|
13
|
-
import uuidv4 from "uuid-random";
|
|
14
|
-
import _throttle from "lodash/throttle";
|
|
15
|
-
const BOUNDS_CHANGING = "bounds-change-request";
|
|
16
|
-
const BOUNDS_CHANGED = "bounds-changed";
|
|
17
|
-
const SYSTEM_BOUNDS_CHANGED = "system-bounds-changed";
|
|
18
|
-
const warningsSent = {
|
|
19
|
-
disableFrame: false,
|
|
20
|
-
setOpacity: false,
|
|
21
|
-
addEventListener: false,
|
|
22
|
-
removeEventListener: false,
|
|
23
|
-
};
|
|
24
|
-
function NullStandardCallback(err) {
|
|
25
|
-
err;
|
|
26
|
-
}
|
|
27
|
-
export class DockableWindow extends DockableBox {
|
|
28
|
-
/**
|
|
29
|
-
* Do not construct DockableWindow directly. Use the factory
|
|
30
|
-
*
|
|
31
|
-
* @param {*} win Window object; WebWindow, ExternalWindow, etc.
|
|
32
|
-
* @param {bounds} bounds initial bounds for the window.
|
|
33
|
-
* @param {object} dependencies Dependency object that provides the calculator, System, and Logger.
|
|
34
|
-
* @param {DockingCalculator} dependencies.calculator
|
|
35
|
-
* @param {System} dependencies.System
|
|
36
|
-
* @param {Logger} dependencies.Logger
|
|
37
|
-
*/
|
|
38
|
-
constructor(win, bounds, calculator) {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
40
|
-
super(bounds);
|
|
41
|
-
this.snappedWindows = [];
|
|
42
|
-
this.resizeThrottlePeriod = 5;
|
|
43
|
-
this.lastBoundsAdjustment = Date.now();
|
|
44
|
-
// Needed for dockable components that don't have a static grabber on the side of the component (mostly for when there are dockable windows). When a user undocks the component, they can undock it from anywhere in the components header bar, this will center the window on the undock, so that when the window shrinks back to its old size, the mouse will be in the center
|
|
45
|
-
this.shouldOffsetByMouse = false;
|
|
46
|
-
this.isDockableComponent = false;
|
|
47
|
-
this.monitorDockablePositions = {};
|
|
48
|
-
this.ignoreSnappingRequests = false;
|
|
49
|
-
this.dockedDimensions = null;
|
|
50
|
-
this.isHidden = false;
|
|
51
|
-
this.onboundschanged = 0;
|
|
52
|
-
this.name = (_a = win.name) !== null && _a !== void 0 ? _a : "undefined";
|
|
53
|
-
Logger.system.debug("dockableWindow constructing", this.name);
|
|
54
|
-
this.calculator = calculator;
|
|
55
|
-
this.win = win;
|
|
56
|
-
this.bufferSize = 15;
|
|
57
|
-
this.guid = uuidv4();
|
|
58
|
-
this.top = bounds.top;
|
|
59
|
-
this.left = bounds.left;
|
|
60
|
-
this.right = bounds.right;
|
|
61
|
-
this.bottom = bounds.bottom;
|
|
62
|
-
this.width = bounds.width || 0;
|
|
63
|
-
this.height = bounds.height || 0;
|
|
64
|
-
this.hasDashbarData = false;
|
|
65
|
-
this.opacity = 1;
|
|
66
|
-
this.groupNames = [];
|
|
67
|
-
this.buildDefaultDockingOptions = this.buildDefaultDockingOptions.bind(this);
|
|
68
|
-
this.onBoundsChanged = this.onBoundsChanged.bind(this);
|
|
69
|
-
this.onBoundsChanging = this.onBoundsChanging.bind(this);
|
|
70
|
-
this.requestBoundsChange = this.requestBoundsChange.bind(this);
|
|
71
|
-
this.getDockedStringFromLocation = this.getDockedStringFromLocation.bind(this);
|
|
72
|
-
this.hiddenUnclaimSpace = this.hiddenUnclaimSpace.bind(this);
|
|
73
|
-
this.unhiddenClaimSpace = this.unhiddenClaimSpace.bind(this);
|
|
74
|
-
this.onSystemMovedWindow = this.onSystemMovedWindow.bind(this);
|
|
75
|
-
this.restored = this.restored.bind(this);
|
|
76
|
-
this.maximized = this.maximized.bind(this);
|
|
77
|
-
this.dock = this.dock.bind(this);
|
|
78
|
-
this.undock = this.undock.bind(this);
|
|
79
|
-
this.animate = this.animatePositionAndHeight;
|
|
80
|
-
// The default is to allow grouping. But if it is disabled using any of the various methods, disable it.
|
|
81
|
-
this.canGroup =
|
|
82
|
-
(_t = (_m = (_f = (_b = win.canGroup) !== null && _b !== void 0 ? _b : (_e = (_d = (_c = win === null || win === void 0 ? void 0 : win.windowDescriptor) === null || _c === void 0 ? void 0 : _c.customData) === null || _d === void 0 ? void 0 : _d.window) === null || _e === void 0 ? void 0 : _e.canGroup) !== null && _f !== void 0 ? _f : (_l = (_k = (_j = (_h = (_g = win === null || win === void 0 ? void 0 : win.windowDescriptor) === null || _g === void 0 ? void 0 : _g.customData) === null || _h === void 0 ? void 0 : _h.foreign) === null || _j === void 0 ? void 0 : _j.services) === null || _k === void 0 ? void 0 : _k.dockingService) === null || _l === void 0 ? void 0 : _l.canGroup) !== null && _m !== void 0 ? _m : (_s = (_r = (_q = (_p = (_o = win === null || win === void 0 ? void 0 : win.windowDescriptor) === null || _o === void 0 ? void 0 : _o.customData) === null || _p === void 0 ? void 0 : _p.foreign) === null || _q === void 0 ? void 0 : _q.services) === null || _r === void 0 ? void 0 : _r.windowService) === null || _s === void 0 ? void 0 : _s.allowGrouping) !== null && _t !== void 0 ? _t : true;
|
|
83
|
-
// Disable the frame so that users cannot move the window. Only we move the window after we verify that their intended movement shouldn't result in a snap.
|
|
84
|
-
this.setOpacity = _throttle(this.setOpacity, 100, { trailing: true });
|
|
85
|
-
this.monitor = this.calculator.getMonitorForWindow(this);
|
|
86
|
-
this.disableFrame();
|
|
87
|
-
// Changing the visibility of the taskbar icon is a long process. It involves
|
|
88
|
-
// many asynchronous calls. In order to make sure a call sequence of
|
|
89
|
-
// hide, show, show, hide results in a hidden taskbar icon, we put show and hide on a queue.
|
|
90
|
-
this.changeTaskbarVisibilityQueue = pLimit(1);
|
|
91
|
-
// A DockableWindow can refuse tabbing or tiling requests with the right config props
|
|
92
|
-
this.allowTiling = (_u = win.tiling) !== null && _u !== void 0 ? _u : true;
|
|
93
|
-
this.allowTabbing = (_v = win.tabbing) !== null && _v !== void 0 ? _v : false;
|
|
94
|
-
this.canMinimize = win.minimize !== undefined;
|
|
95
|
-
// If the windowOptions say to show the taskbar icon, respect that. Default to true.
|
|
96
|
-
// This value is checked inside of showTaskbarIcon()
|
|
97
|
-
this.shouldShowTaskbarIcon = (_x = (_w = win.windowOptions) === null || _w === void 0 ? void 0 : _w.showTaskbarIcon) !== null && _x !== void 0 ? _x : true;
|
|
98
|
-
this.dockingOptions = win.dockingOptions;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Creates DockableWindow instances.
|
|
102
|
-
*/
|
|
103
|
-
static factory(win, bounds, calculator) {
|
|
104
|
-
const dockableWindow = new DockableWindow(win, bounds, calculator);
|
|
105
|
-
dockableWindow.initialize();
|
|
106
|
-
return dockableWindow;
|
|
107
|
-
}
|
|
108
|
-
setMonitorDockablePosition(options) {
|
|
109
|
-
const { dockable } = options;
|
|
110
|
-
if (Array.isArray(dockable)) {
|
|
111
|
-
dockable.forEach((option) => {
|
|
112
|
-
option = option.toUpperCase();
|
|
113
|
-
if (option === "TOP")
|
|
114
|
-
this.monitorDockablePositions.TOP = 0;
|
|
115
|
-
if (option === "LEFT")
|
|
116
|
-
this.monitorDockablePositions.LEFT = 1;
|
|
117
|
-
if (option === "RIGHT")
|
|
118
|
-
this.monitorDockablePositions.RIGHT = 2;
|
|
119
|
-
if (option === "BOTTOM")
|
|
120
|
-
this.monitorDockablePositions.BOTTOM = 3;
|
|
121
|
-
});
|
|
122
|
-
this.monitorDockablePositions.NONE = 4;
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
// If options.dockable is not supplied, or it is just 'true' that means this window can dock everywhere
|
|
126
|
-
this.monitorDockablePositions = {
|
|
127
|
-
TOP: 0,
|
|
128
|
-
LEFT: 1,
|
|
129
|
-
RIGHT: 2,
|
|
130
|
-
BOTTOM: 3,
|
|
131
|
-
NONE: 4,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
computeDockingDefaults(options) {
|
|
136
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
137
|
-
const spawnData = (_d = (_c = (_b = (_a = this.win) === null || _a === void 0 ? void 0 : _a.windowDescriptor) === null || _b === void 0 ? void 0 : _b.customData) === null || _c === void 0 ? void 0 : _c.spawnData) !== null && _d !== void 0 ? _d : null;
|
|
138
|
-
const dockingDefaults = options !== null ? this.buildDefaultDockingOptions(options) : defaultDockingOptions;
|
|
139
|
-
this.isDockableComponent = dockingDefaults.isDockable;
|
|
140
|
-
this.hasDashbarData = (_f = (((_e = spawnData === null || spawnData === void 0 ? void 0 : spawnData.dashbar) === null || _e === void 0 ? void 0 : _e.height) && !Number.isNaN(spawnData.dashbar.height))) !== null && _f !== void 0 ? _f : false;
|
|
141
|
-
const isUndocked = ((_g = this.win.dockingOptions) === null || _g === void 0 ? void 0 : _g.dockable) && this.win.dockingOptions.undockedParams !== undefined;
|
|
142
|
-
const isDocked = ((_h = this.win.dockingOptions) === null || _h === void 0 ? void 0 : _h.dockable) && ((_j = this.win.dockingOptions) === null || _j === void 0 ? void 0 : _j.dockedParams) !== undefined;
|
|
143
|
-
if (isUndocked) {
|
|
144
|
-
options.undockedParams = {
|
|
145
|
-
width: dockingDefaults.undockedWidth,
|
|
146
|
-
height: dockingDefaults.undockedHeight,
|
|
147
|
-
};
|
|
148
|
-
if (this.hasDashbarData)
|
|
149
|
-
options.undockedParams.height = options.undockedParams.height + spawnData.dashbar.height;
|
|
150
|
-
options.maxHeight = options.undockedParams.height;
|
|
151
|
-
}
|
|
152
|
-
if (isDocked) {
|
|
153
|
-
dockingDefaults.dockedHeight = this.win.dockingOptions.dockedParams.height;
|
|
154
|
-
if (this.hasDashbarData)
|
|
155
|
-
dockingDefaults.dockedHeight = dockingDefaults.dockedHeight + spawnData.dashbar.height;
|
|
156
|
-
options.dockedParams = {
|
|
157
|
-
width: dockingDefaults.dockedWidth,
|
|
158
|
-
height: dockingDefaults.dockedHeight,
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
if (this.isDockableComponent)
|
|
162
|
-
this.setMonitorDockablePosition(options);
|
|
163
|
-
// pass through from the windowWrap. This property is added during the registration. Options include, min/max height/width, whether the window is dockable, whether it starts docked, etc.
|
|
164
|
-
this.dockedPosition = this.monitorDockablePositions.NONE;
|
|
165
|
-
this.dockedDimensions = {
|
|
166
|
-
width: dockingDefaults.dockedWidth,
|
|
167
|
-
height: dockingDefaults.dockedHeight,
|
|
168
|
-
};
|
|
169
|
-
return dockingDefaults;
|
|
170
|
-
}
|
|
171
|
-
// options is pass-by-reference
|
|
172
|
-
setminMaxWidths(options) {
|
|
173
|
-
const { minWidth = 0, minHeight = 0, maxWidth = 0, maxHeight = 0 } = this.win.windowDescriptor;
|
|
174
|
-
// Checking for greater than 0 since -1 and 0 both disable the bound containment.
|
|
175
|
-
if (minWidth > 0)
|
|
176
|
-
options.minWidth = minWidth;
|
|
177
|
-
if (minHeight > 0)
|
|
178
|
-
options.minHeight = minHeight;
|
|
179
|
-
if (maxWidth > 0)
|
|
180
|
-
options.maxWidth = maxWidth;
|
|
181
|
-
if (maxHeight > 0)
|
|
182
|
-
options.maxHeight = maxHeight;
|
|
183
|
-
}
|
|
184
|
-
async initialize() {
|
|
185
|
-
var _a, _b, _c;
|
|
186
|
-
// This is triggered on a window move which is done by the user dragging a held down mouse over a window. In other words, this is only !finishedMove when a user is moving the window
|
|
187
|
-
// DH 3/6/2019 Setting the "markDirty" param to false ensures instantiating
|
|
188
|
-
// the DockableWindow doesn't mistakenly mark the workspace dirty.
|
|
189
|
-
this.win._stopMove();
|
|
190
|
-
this.setBoundingBoxes();
|
|
191
|
-
this.addListeners();
|
|
192
|
-
let options = (_a = this.win.dockingOptions) !== null && _a !== void 0 ? _a : null;
|
|
193
|
-
this.ignoreSnappingRequests = (options === null || options === void 0 ? void 0 : options.ignoreSnappingRequests) || (options === null || options === void 0 ? void 0 : options.ephemeral);
|
|
194
|
-
this.shouldShowTaskbarIcon = (_b = options === null || options === void 0 ? void 0 : options.showTaskbarIcon) !== null && _b !== void 0 ? _b : true;
|
|
195
|
-
// this should work only for native and WPF apps
|
|
196
|
-
if (options && this.win.windowType === "NativeWindow" && this.win.windowDescriptor)
|
|
197
|
-
this.setminMaxWidths(options);
|
|
198
|
-
const dockingDefaults = this.computeDockingDefaults(options);
|
|
199
|
-
// If overwriteDockedOptions is true we should expect there to be some information regarding this component in memory. That saved information will provide bounds for where the window should spawn
|
|
200
|
-
const startsDocked = typeof (options === null || options === void 0 ? void 0 : options.startsDocked) === "string" ? options.startsDocked.toUpperCase() : "NONE";
|
|
201
|
-
if (this.isDockableComponent && (options === null || options === void 0 ? void 0 : options.overwriteDockedOptions)) {
|
|
202
|
-
const locValue = await this.recallDockedPosition({ startsDocked, dockingDefaults });
|
|
203
|
-
options.locValue = locValue;
|
|
204
|
-
this.undockedPosition = options.undockedParams;
|
|
205
|
-
this.dockedParams = options.dockedParams;
|
|
206
|
-
}
|
|
207
|
-
else if (dockingDefaults.isDocked && this.monitorDockablePositions.hasOwnProperty(startsDocked)) {
|
|
208
|
-
this.dockedPosition = this.monitorDockablePositions[startsDocked];
|
|
209
|
-
this.undockedPosition = {
|
|
210
|
-
width: dockingDefaults.undockedWidth,
|
|
211
|
-
height: dockingDefaults.undockedHeight,
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
else if (this.win.componentType === "Toolbar") {
|
|
215
|
-
// The dockable options could be disabled in Toolbar config. At that case needs to show Toolbar window.
|
|
216
|
-
this.show();
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
this.win.isDocked = this.dockedPosition !== this.monitorDockablePositions.NONE;
|
|
220
|
-
// If the registering window is dockable, and wants to 'start docked' we need to determine which of the dockable positions it requests to start docked in. If the position is found, we call to dock it which will set the appropriate variables and move any launched windows out of its space.
|
|
221
|
-
if (this.win.isDocked) {
|
|
222
|
-
// We only dock the window if it's visible. If it's hidden, we don't want to claim space.
|
|
223
|
-
const locValue = (_c = options.locValue) !== null && _c !== void 0 ? _c : this.getDockedStringFromLocation();
|
|
224
|
-
if (locValue)
|
|
225
|
-
await this.dockToMonitor(locValue);
|
|
226
|
-
}
|
|
227
|
-
if (this.isDockableComponent && (options === null || options === void 0 ? void 0 : options.overwriteDockedOptions)) {
|
|
228
|
-
// now that window is up, make sure the monitor data is saved (also saved when bounds change or monitors change)
|
|
229
|
-
this.saveDockableData();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
async dockToMonitor(locValue) {
|
|
233
|
-
var _a;
|
|
234
|
-
const monitor = this.calculator.getMonitorForWindow(this);
|
|
235
|
-
const windowBounds = {
|
|
236
|
-
top: this.top,
|
|
237
|
-
bottom: this.bottom,
|
|
238
|
-
left: this.left,
|
|
239
|
-
right: this.right,
|
|
240
|
-
width: this.width,
|
|
241
|
-
height: this.height,
|
|
242
|
-
};
|
|
243
|
-
const { err } = await this.setBounds(windowBounds);
|
|
244
|
-
if (err) {
|
|
245
|
-
Logger.system.error("Error moving dockable component to default docked position");
|
|
246
|
-
}
|
|
247
|
-
this.dockedHeight = (_a = this.dockedParams.height) !== null && _a !== void 0 ? _a : 0;
|
|
248
|
-
this.snappedEdge = locValue;
|
|
249
|
-
if (this.win.windowOptions.nativeWindowHandle) {
|
|
250
|
-
/*
|
|
251
|
-
JC 6/24/20: Initial docking needs to be delayed to ensure assimilation has
|
|
252
|
-
started up and is ready to receive requests. I've seen this fail many times
|
|
253
|
-
because assimilation wasn't ready
|
|
254
|
-
*/
|
|
255
|
-
const delayDock = setTimeout(() => {
|
|
256
|
-
clearTimeout(delayDock);
|
|
257
|
-
monitor.dockWindowToMonitor(this, this, this.undockedPosition.width, this.undockedPosition.height, true);
|
|
258
|
-
}, 1500);
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
Logger.system.error("Failed to initialize a docked window. Cannot find native window handle");
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
async recallBounds() {
|
|
265
|
-
// first look in component state for cached toolbar location -- this is only for backwards compatability with vertions before 3.9
|
|
266
|
-
let { err, data: result } = await this.win.getComponentState({});
|
|
267
|
-
Logger.system.debug("MONITOR: getComponentState", err, result);
|
|
268
|
-
const noBoundsInComponentState = err || !result || !result.hasOwnProperty("window-bounds") || result["window-bounds"] == null;
|
|
269
|
-
// for backwards compatability check if bounds data in component state, if not then check in storage
|
|
270
|
-
if (noBoundsInComponentState) {
|
|
271
|
-
Logger.system.debug("MONITOR: read monitor-docked data from storage", err, result);
|
|
272
|
-
// get data from storage -- this is the normal path
|
|
273
|
-
const { err: err2, data } = await StorageClient.getStandardized({
|
|
274
|
-
topic: this.name,
|
|
275
|
-
key: this.name,
|
|
276
|
-
});
|
|
277
|
-
if (err2)
|
|
278
|
-
Logger.system.warn("WARNING: Attempt to retrieve toolbar storage failed.", err2);
|
|
279
|
-
else
|
|
280
|
-
result = data;
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
Logger.system.debug("MONITOR: using monitor-docked data from component state", err, result);
|
|
284
|
-
// since the bounds data is in component state only for backwords compatability, use it this time then remove it so that going forward the lastest values will be picked up from storage.
|
|
285
|
-
this.win.setComponentState({
|
|
286
|
-
field: "window-bounds",
|
|
287
|
-
value: null,
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
Logger.system.debug("MONITOR: DockableWindow get results", err, result);
|
|
291
|
-
return result !== null && result !== void 0 ? result : null;
|
|
292
|
-
}
|
|
293
|
-
// windowBounds is pass by reference
|
|
294
|
-
getLocValue(windowBounds) {
|
|
295
|
-
var _a;
|
|
296
|
-
Logger.system.debug("MONITOR: changed");
|
|
297
|
-
const serviceMonitors = this.calculator.getMonitors();
|
|
298
|
-
let monitorToDockTo;
|
|
299
|
-
Object.keys(serviceMonitors).forEach((monKey) => {
|
|
300
|
-
const mon = serviceMonitors[monKey];
|
|
301
|
-
if (mon.rawMonitor.deviceId && mon.rawMonitor.deviceId === (windowBounds === null || windowBounds === void 0 ? void 0 : windowBounds.monitor)) {
|
|
302
|
-
monitorToDockTo = mon.rawMonitor.availableRect;
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
if (!monitorToDockTo) {
|
|
306
|
-
monitorToDockTo = (_a = this.primaryMonitor) === null || _a === void 0 ? void 0 : _a.availableRect;
|
|
307
|
-
}
|
|
308
|
-
if (windowBounds.width >= monitorToDockTo.width) {
|
|
309
|
-
this.width = monitorToDockTo.width;
|
|
310
|
-
}
|
|
311
|
-
if (windowBounds.height >= monitorToDockTo.height) {
|
|
312
|
-
this.height = monitorToDockTo.height;
|
|
313
|
-
}
|
|
314
|
-
const locValue = this.getDockedStringFromLocation();
|
|
315
|
-
Logger.system.debug("MONITOR: changed switch", windowBounds);
|
|
316
|
-
// Depending on the docked location of the window, we need to reset its
|
|
317
|
-
// bounds according to the monitor's new bounds
|
|
318
|
-
switch (locValue) {
|
|
319
|
-
case "top":
|
|
320
|
-
windowBounds.top = monitorToDockTo.top;
|
|
321
|
-
windowBounds.bottom = windowBounds.top + windowBounds.height;
|
|
322
|
-
break;
|
|
323
|
-
case "bottom":
|
|
324
|
-
windowBounds.bottom = monitorToDockTo.bottom;
|
|
325
|
-
windowBounds.top = windowBounds.bottom - windowBounds.height;
|
|
326
|
-
break;
|
|
327
|
-
case "left":
|
|
328
|
-
windowBounds.left = monitorToDockTo.left;
|
|
329
|
-
windowBounds.right = windowBounds.left + windowBounds.width;
|
|
330
|
-
break;
|
|
331
|
-
case "right":
|
|
332
|
-
windowBounds.right = monitorToDockTo.right;
|
|
333
|
-
windowBounds.left = windowBounds.right - windowBounds.width;
|
|
334
|
-
break;
|
|
335
|
-
default:
|
|
336
|
-
Logger.system.error("Initializing docked window docked to an unknown position");
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
Logger.system.debug("MONITOR: changed after switch", windowBounds);
|
|
340
|
-
windowBounds.left = windowBounds.left <= monitorToDockTo.left ? monitorToDockTo.left : windowBounds.left;
|
|
341
|
-
windowBounds.right = windowBounds.right >= monitorToDockTo.right ? monitorToDockTo.right : windowBounds.right;
|
|
342
|
-
delete this.primaryMonitor;
|
|
343
|
-
return locValue;
|
|
344
|
-
}
|
|
345
|
-
async recallDockedPosition({ startsDocked, dockingDefaults, }) {
|
|
346
|
-
var _a;
|
|
347
|
-
const dockedLocation = await this.recallBounds();
|
|
348
|
-
const visible = typeof (dockedLocation === null || dockedLocation === void 0 ? void 0 : dockedLocation.visible) === "boolean" ? dockedLocation.visible : true;
|
|
349
|
-
const windowBounds = (dockedLocation === null || dockedLocation === void 0 ? void 0 : dockedLocation["window-bounds"]) !== null ? dockedLocation === null || dockedLocation === void 0 ? void 0 : dockedLocation["window-bounds"] : null;
|
|
350
|
-
const savedMonitorData = (_a = dockedLocation === null || dockedLocation === void 0 ? void 0 : dockedLocation.monitorData) !== null && _a !== void 0 ? _a : null;
|
|
351
|
-
// If all the saved data is available, then check if monitor changed since last restart;
|
|
352
|
-
// else since all the data isn't available, assume the monitors did not change since last restart;
|
|
353
|
-
const savedDataAvailable = windowBounds && savedMonitorData;
|
|
354
|
-
const monitorChanged = savedDataAvailable ? await this.monitorChanged(savedMonitorData) : false;
|
|
355
|
-
// if could not find bounds data either in window state or in storage, then use default settings.
|
|
356
|
-
if (!windowBounds) {
|
|
357
|
-
Logger.system.debug("MONITOR: DockableWindow using defaults.");
|
|
358
|
-
if (this.monitorDockablePositions[startsDocked])
|
|
359
|
-
this.dockedPosition = this.monitorDockablePositions[startsDocked];
|
|
360
|
-
else
|
|
361
|
-
this.dockedPosition = this.monitorDockablePositions.TOP;
|
|
362
|
-
this.undockedPosition = {
|
|
363
|
-
width: dockingDefaults.undockedWidth,
|
|
364
|
-
height: dockingDefaults.undockedHeight,
|
|
365
|
-
};
|
|
366
|
-
this.show();
|
|
367
|
-
return null;
|
|
368
|
-
}
|
|
369
|
-
// since have window Bounds, check if in visible space. If not in visible space then will adjust bounds to be visible
|
|
370
|
-
const boundsToCheck = clone(windowBounds);
|
|
371
|
-
boundsToCheck.isDocked = windowBounds.dockedPosition !== this.monitorDockablePositions.NONE;
|
|
372
|
-
Logger.system.debug("MONITOR: DockableWindow status", dockedLocation, monitorChanged, boundsToCheck, windowBounds);
|
|
373
|
-
this.dockedPosition = windowBounds.dockedPosition;
|
|
374
|
-
// If the monitors have changed since this window was last loaded (and docked on the last Finsemble run)
|
|
375
|
-
// determine if that monitor still exists (maybe the taskbar has moved or the resolution was changed).
|
|
376
|
-
// If so, try to put the window back in the same place but remaining on the monitor
|
|
377
|
-
const locValue = monitorChanged ? this.getLocValue(windowBounds) : null;
|
|
378
|
-
this.top = windowBounds.top;
|
|
379
|
-
this.bottom = windowBounds.bottom;
|
|
380
|
-
this.left = windowBounds.left;
|
|
381
|
-
this.right = windowBounds.right;
|
|
382
|
-
this.width = windowBounds.width;
|
|
383
|
-
this.height = windowBounds.height;
|
|
384
|
-
// move undocked toolbar to its previously saved location
|
|
385
|
-
this.setBounds(windowBounds, () => {
|
|
386
|
-
// NOTE: there is a bug related to the "hidden" event that prevents visible state from being saved, so initial visiblity will alway be true until bug fixed
|
|
387
|
-
if (visible) {
|
|
388
|
-
this.isHidden = false;
|
|
389
|
-
this.show();
|
|
390
|
-
// observed problem with toolbar not being on top, so bring to front to
|
|
391
|
-
this.win._bringToFront({});
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
return locValue;
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Returns turn if the current monitor dimensions are different from the previous monitor dimensions
|
|
398
|
-
* @param {array} previousMonitorData the previous monitor info (an array of monitors)
|
|
399
|
-
*/
|
|
400
|
-
async monitorChanged(previousMonitorData) {
|
|
401
|
-
const monitorInfo = await System.getMonitorInfo();
|
|
402
|
-
const monitorData = [monitorInfo.primaryMonitor, ...monitorInfo.nonPrimaryMonitors];
|
|
403
|
-
let changed = false;
|
|
404
|
-
// Cache primary monitor for temporary retrieval in docking initialization
|
|
405
|
-
this.primaryMonitor = monitorInfo.primaryMonitor;
|
|
406
|
-
if (monitorData && previousMonitorData && monitorData.length == previousMonitorData.length) {
|
|
407
|
-
changed = monitorData.some((monitor, i) => {
|
|
408
|
-
if (monitor.availableRect.top != previousMonitorData[i].availableRect.top)
|
|
409
|
-
return true;
|
|
410
|
-
if (monitor.availableRect.bottom != previousMonitorData[i].availableRect.bottom)
|
|
411
|
-
return true;
|
|
412
|
-
if (monitor.availableRect.left != previousMonitorData[i].availableRect.left)
|
|
413
|
-
return true;
|
|
414
|
-
return monitor.availableRect.right != previousMonitorData[i].availableRect.right;
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
changed = true;
|
|
419
|
-
}
|
|
420
|
-
Logger.system.debug("MONITOR: DockableWindow.monitorChanged", "monitorData", monitorData, "previousMonitorData", previousMonitorData, changed ? "changed" : "not changed");
|
|
421
|
-
return changed;
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Returns turn if the toolber handle (i.e. what the user can grab to move toolbar) is visible on one of the current monitors (based on the toolbars current bounds
|
|
425
|
-
* @param {array} currentBounds the toolbars current bounds
|
|
426
|
-
*/
|
|
427
|
-
isToolbarVisible(currentBounds) {
|
|
428
|
-
const isToolbarVisiblePromiseResolver = (resolve) => {
|
|
429
|
-
System.getMonitorInfo((monitorInfo) => {
|
|
430
|
-
var _a, _b;
|
|
431
|
-
const monitorData = [monitorInfo.primaryMonitor, ...monitorInfo.nonPrimaryMonitors];
|
|
432
|
-
let isVisible = false;
|
|
433
|
-
// calculate the approximate bounds of the toolbar "handle", based on the current toolbar bounds;
|
|
434
|
-
// if these four points are within a single monitor then visible;
|
|
435
|
-
// this function is not exact since toolbar might span monitors but close enough until we rearchitect -- at worst will just move toolbar to default position;
|
|
436
|
-
// note the rightReference is calculated in relation to the left bounds
|
|
437
|
-
const topReference = ((_a = currentBounds.top) !== null && _a !== void 0 ? _a : 0) + 5;
|
|
438
|
-
const bottomReference = ((_b = currentBounds.bottom) !== null && _b !== void 0 ? _b : 0) - 5;
|
|
439
|
-
const leftReference = currentBounds.left + 5;
|
|
440
|
-
const rightReference = currentBounds.left + 20;
|
|
441
|
-
for (let i = 0; i < monitorData.length; i++) {
|
|
442
|
-
let topOK = false;
|
|
443
|
-
let bottomOK = false;
|
|
444
|
-
let leftOK = false;
|
|
445
|
-
let rightOK = false;
|
|
446
|
-
// since claimed space may change monitor dimensions, must compare against availableRect (which is independent of claimed space)
|
|
447
|
-
if (topReference >= monitorData[i].monitor.scaledRect.top)
|
|
448
|
-
topOK = true;
|
|
449
|
-
if (bottomReference <= monitorData[i].monitor.scaledRect.bottom)
|
|
450
|
-
bottomOK = true;
|
|
451
|
-
if (leftReference >= monitorData[i].monitor.scaledRect.left)
|
|
452
|
-
leftOK = true;
|
|
453
|
-
if (rightReference <= monitorData[i].monitor.scaledRect.right)
|
|
454
|
-
rightOK = true;
|
|
455
|
-
isVisible = topOK && bottomOK && leftOK && rightOK;
|
|
456
|
-
if (isVisible)
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
459
|
-
Logger.system.debug("MONITOR: DockableWindow.isToolbarVisible", "monitorData", monitorData, "currentBounds", currentBounds, isVisible ? "isVisible" : "not visible");
|
|
460
|
-
Logger.system.debug("MONITOR: DockableWindow.isToolbarVisible T-B-L-R=", topReference.toString(), bottomReference.toString(), leftReference.toString(), rightReference.toString());
|
|
461
|
-
resolve(isVisible);
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
|
-
return new Promise(isToolbarVisiblePromiseResolver);
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Returns a string representation of the docked location
|
|
468
|
-
*/
|
|
469
|
-
getDockedStringFromLocation() {
|
|
470
|
-
var _a;
|
|
471
|
-
let locValue = null;
|
|
472
|
-
for (let i = 0; i < Object.keys(this.monitorDockablePositions).length; i++) {
|
|
473
|
-
const key = Object.keys(this.monitorDockablePositions)[i];
|
|
474
|
-
if (this.monitorDockablePositions[key] === this.dockedPosition) {
|
|
475
|
-
locValue = key.toUpperCase();
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
return (_a = locValue === null || locValue === void 0 ? void 0 : locValue.toLowerCase()) !== null && _a !== void 0 ? _a : null;
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Function to respond to finWindow bounds-changed events. Currently we only respond to this event in some cases.
|
|
483
|
-
* Aero_key: Sets bounds after an aero snap action is initiated (windows key + arrow key). Only triggers if Aero is enabled.
|
|
484
|
-
* System_restored: Triggered when a window is restored from minimized outside of Finsemble. This code block should only be hit if the
|
|
485
|
-
monitor configuration has changed after a window is minimized and the window's old restore position would be partially off-monitor.
|
|
486
|
-
The OS does not change the bounds of minimized windows, so they only action we can take is to force it on monitor.
|
|
487
|
-
* @param {object} e The event
|
|
488
|
-
*/
|
|
489
|
-
onSystemMovedWindow(e) {
|
|
490
|
-
const incomingBounds = clone(e.data);
|
|
491
|
-
let bounds;
|
|
492
|
-
switch (e.data.action) {
|
|
493
|
-
case MOVE_REASON.AERO_KEY:
|
|
494
|
-
// If the user is moving the window (and not the OS) these movements will be handled elsewhere
|
|
495
|
-
if (!this.win.finishedMove)
|
|
496
|
-
return;
|
|
497
|
-
Logger.system.log("aero_key: aero key action occurred", e.data.action);
|
|
498
|
-
if (this.calculator.enableWindowsAeroSnap) {
|
|
499
|
-
bounds = incomingBounds;
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
bounds = this.getBounds();
|
|
503
|
-
}
|
|
504
|
-
Logger.system.verbose(`aero_key: aero key action occurred. Action: ${e.data.action}, bounds: ${bounds}`);
|
|
505
|
-
// Docking listens for a restoreFromMaximize message on the router.
|
|
506
|
-
// That doesn't happen when aero-snap triggers a restore after the window is maximized.
|
|
507
|
-
// Here we manually change the underlying window's windowState
|
|
508
|
-
Logger.system.debug("setting window state back to NORMAL with win: ", this.win);
|
|
509
|
-
this.win.windowState = WINDOWSTATE.NORMAL;
|
|
510
|
-
// Update the Finsemble bounds after aero snap
|
|
511
|
-
// For groups, break the group and and only aero snap the selected window.
|
|
512
|
-
this.setBounds(bounds, () => {
|
|
513
|
-
this.calculator.removeWindowFromAllGroups(this, true);
|
|
514
|
-
this.calculator.buildSnapRelationships(this);
|
|
515
|
-
this.calculator.updateGroupData();
|
|
516
|
-
});
|
|
517
|
-
break;
|
|
518
|
-
// Triggered when a window is restored outside of finsemble (such as from the taskbar), and the previous window position would now be off-monitor
|
|
519
|
-
// From Electron 9 the window restore position gets updated when a monitor change event occurs that would put it off monitor.
|
|
520
|
-
// Finsemble's bounds need to be updated to match that position.
|
|
521
|
-
// Groups also must be moved relative to one window in the group as the OS may break a group if it is partially off monitor or on a scaling change.
|
|
522
|
-
case MOVE_REASON.SYSTEM_RESTORED: {
|
|
523
|
-
const group = this.calculator.getMovableGroup(this.name);
|
|
524
|
-
if (group) {
|
|
525
|
-
Logger.system.verbose(`dockableWindow.onSystemMovedWindow system_restored: Window ${this.name} is in a group, updated bounds for restore ${JSON.stringify(incomingBounds)}`);
|
|
526
|
-
if (group.groupState === group.GROUPSTATES.MINIMIZED) {
|
|
527
|
-
group.restoreAll();
|
|
528
|
-
}
|
|
529
|
-
group.deferSystemMove({ name: this.name, bounds: incomingBounds }, this.calculator);
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
Logger.system.verbose(`dockableWindow.onSystemMovedWindow system_restored: Window ${this.name} is restoring to new position: ${JSON.stringify(incomingBounds)}`);
|
|
533
|
-
this.setBounds(incomingBounds);
|
|
534
|
-
}
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
|
-
default:
|
|
538
|
-
break;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Builds default docking options for dockable windows
|
|
543
|
-
* @param {object} options Taken from the incoming config
|
|
544
|
-
* @return {object} The docking defaults
|
|
545
|
-
*/
|
|
546
|
-
buildDefaultDockingOptions(options) {
|
|
547
|
-
// Building a default options object based on the incoming config props. Since windows can have different dockable areas and different starting docked positions, we must build starting props based on those options.
|
|
548
|
-
const hasUndockedParams = this.win.hasOwnProperty("dockingOptions") && this.win.dockingOptions.hasOwnProperty("undockedParams");
|
|
549
|
-
const hasDockedParams = this.win.hasOwnProperty("dockingOptions") && this.win.dockingOptions.hasOwnProperty("dockedParams");
|
|
550
|
-
return {
|
|
551
|
-
isDockable: !!(options !== null &&
|
|
552
|
-
(options.dockable === true || (Array.isArray(options.dockable) && Array.from(options.dockable).length > 0))),
|
|
553
|
-
undockedWidth: hasUndockedParams ? this.win.dockingOptions.undockedParams.width : 300,
|
|
554
|
-
undockedHeight: hasUndockedParams ? this.win.dockingOptions.undockedParams.height : 30,
|
|
555
|
-
isDocked: !!(options !== null && options.hasOwnProperty("startsDocked")),
|
|
556
|
-
dockedWidth: hasDockedParams ? this.win.dockingOptions.dockedParams.width : 300,
|
|
557
|
-
dockedHeight: hasDockedParams ? this.win.dockingOptions.dockedParams.height : 39,
|
|
558
|
-
height: 0,
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Function to handle chain of events when a dockable component type is docked
|
|
563
|
-
*
|
|
564
|
-
* @param {object} monitor Information about the monitor the component was docked to
|
|
565
|
-
* @param {string} location A string containing the location to dock to: "TOP", "LEFT", "BOTTOM", and "RIGHT" are the acceptable values
|
|
566
|
-
*/
|
|
567
|
-
dock(monitor, oldBounds, location) {
|
|
568
|
-
var _a, _b;
|
|
569
|
-
if (this.isDockableComponent) {
|
|
570
|
-
let dockPos = -1;
|
|
571
|
-
this.undockedPosition = {
|
|
572
|
-
width: (_a = oldBounds.width) !== null && _a !== void 0 ? _a : 0,
|
|
573
|
-
height: (_b = oldBounds.height) !== null && _b !== void 0 ? _b : 0,
|
|
574
|
-
};
|
|
575
|
-
Logger.system.debug("MONITOR: DockableWindow.dock", "undockedPosition", this.undockedPosition);
|
|
576
|
-
// Assuming the re-assignment of positions/size doesn't need to take place
|
|
577
|
-
// we don't need a switch here
|
|
578
|
-
switch (location) {
|
|
579
|
-
case this.monitorDockablePositions.TOP:
|
|
580
|
-
dockPos = this.monitorDockablePositions.TOP;
|
|
581
|
-
break;
|
|
582
|
-
case this.monitorDockablePositions.LEFT:
|
|
583
|
-
dockPos = this.monitorDockablePositions.LEFT;
|
|
584
|
-
break;
|
|
585
|
-
case this.monitorDockablePositions.RIGHT:
|
|
586
|
-
dockPos = this.monitorDockablePositions.RIGHT;
|
|
587
|
-
break;
|
|
588
|
-
case this.monitorDockablePositions.BOTTOM:
|
|
589
|
-
dockPos = this.monitorDockablePositions.BOTTOM;
|
|
590
|
-
break;
|
|
591
|
-
default:
|
|
592
|
-
break;
|
|
593
|
-
}
|
|
594
|
-
this.dockedPosition = dockPos;
|
|
595
|
-
this.win.isDocked = true;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Function to handle chain of events when a dockable component type is undocked
|
|
600
|
-
*/
|
|
601
|
-
undock(isClosing = false) {
|
|
602
|
-
if (this.isDockableComponent) {
|
|
603
|
-
// Only change state if we are not closing
|
|
604
|
-
if (!isClosing) {
|
|
605
|
-
this.win.isDocked = false;
|
|
606
|
-
this.dockedPosition = this.monitorDockablePositions.NONE;
|
|
607
|
-
}
|
|
608
|
-
this.monitor.undockWindowFromMonitor(this, isClosing);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
saveDockableData() {
|
|
612
|
-
const bounds = {
|
|
613
|
-
top: this.top,
|
|
614
|
-
bottom: this.bottom,
|
|
615
|
-
left: this.left,
|
|
616
|
-
right: this.right,
|
|
617
|
-
width: this.width,
|
|
618
|
-
height: this.height,
|
|
619
|
-
isDockable: this.win.isDocked,
|
|
620
|
-
dockedPosition: this.dockedPosition,
|
|
621
|
-
monitor: this.monitor.rawMonitor.deviceId || null,
|
|
622
|
-
};
|
|
623
|
-
// this needs to be saved in here because something causes this to reverse in the callback below
|
|
624
|
-
const visible = !this.isHidden;
|
|
625
|
-
// must save the monitor date since if monitors changed since last restart then toolbar will use default settings (otherwise might have problems with visibility)
|
|
626
|
-
System.getMonitorInfo((monitorInfo) => {
|
|
627
|
-
const monitorData = [monitorInfo.primaryMonitor, ...monitorInfo.nonPrimaryMonitors];
|
|
628
|
-
Logger.system.debug("MONITOR: DockableWindow saveDockableData. Visible will always be saved as true.", monitorData, visible.toString(), (!this.isHidden).toString(), bounds);
|
|
629
|
-
// Always save true for visible because we don't want the toolbar to come back hidden
|
|
630
|
-
// Save if the dashbar is enabled as the bounds are based on that state. If the config changes this state on a later boot
|
|
631
|
-
// we need to know if those bounds should be updated to match the toolbar's state in config.
|
|
632
|
-
StorageClient.save({
|
|
633
|
-
topic: this.name,
|
|
634
|
-
key: this.name,
|
|
635
|
-
value: {
|
|
636
|
-
visible: true,
|
|
637
|
-
"window-bounds": bounds,
|
|
638
|
-
monitorData,
|
|
639
|
-
dashbarEnabled: this.hasDashbarData,
|
|
640
|
-
},
|
|
641
|
-
});
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* @function {function name}
|
|
646
|
-
* @return {type} {description}
|
|
647
|
-
*/
|
|
648
|
-
onBoundsChanged() {
|
|
649
|
-
Logger.system.debug("MONITOR: onBoundsChanged", this.isDockableComponent);
|
|
650
|
-
this.resizeHandle = null;
|
|
651
|
-
const timestamp = Date.now();
|
|
652
|
-
// This would be true if the window was maximized when the move request that triggered mouseDown was requested.
|
|
653
|
-
// It should only be changed if, on mouse down the window is maximized.
|
|
654
|
-
this.shouldOffsetByMouse = false;
|
|
655
|
-
this.onboundschanged = timestamp;
|
|
656
|
-
this.lastBoundsAdjustment = timestamp;
|
|
657
|
-
this.monitor = this.calculator.getMonitorForWindow(this);
|
|
658
|
-
this.calculator.onMouseUp();
|
|
659
|
-
this.win._stopMove();
|
|
660
|
-
if (this.isDockableComponent || this.win.componentType == "Toolbar") {
|
|
661
|
-
Logger.system.debug("MONITOR: onBoundsChanged saveDockableData");
|
|
662
|
-
this.saveDockableData();
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
hiddenUnclaimSpace() {
|
|
666
|
-
if (this.win.isDocked && !this.isHidden) {
|
|
667
|
-
this.isHidden = true;
|
|
668
|
-
this.monitor.undockWindowFromMonitor(this);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
unhiddenClaimSpace() {
|
|
672
|
-
var _a, _b, _c, _d;
|
|
673
|
-
if (this.win.isDocked && this.isHidden) {
|
|
674
|
-
if (typeof this.monitor.dockWindowToMonitor === "function") {
|
|
675
|
-
this.monitor.dockWindowToMonitor(this, this, (_a = this.undockedPosition) === null || _a === void 0 ? void 0 : _a.width, (_b = this.undockedPosition) === null || _b === void 0 ? void 0 : _b.height);
|
|
676
|
-
}
|
|
677
|
-
else {
|
|
678
|
-
Logger.system.error("Toolbar was unhidden but cannot call to re-claim space.", { monitor: this.monitor });
|
|
679
|
-
return;
|
|
680
|
-
}
|
|
681
|
-
// Docking claims the space, but windows places the docked window outside of its own space.
|
|
682
|
-
// Push it back
|
|
683
|
-
const { left, right, top, bottom, width } = this.monitor.rawMonitor.monitorRect;
|
|
684
|
-
const dockedBounds = {
|
|
685
|
-
width: (_c = this.dockedDimensions) === null || _c === void 0 ? void 0 : _c.width,
|
|
686
|
-
height: (_d = this.dockedDimensions) === null || _d === void 0 ? void 0 : _d.height,
|
|
687
|
-
left: 0,
|
|
688
|
-
right: 0,
|
|
689
|
-
bottom: 0,
|
|
690
|
-
top: 0,
|
|
691
|
-
};
|
|
692
|
-
const edge = this.getDockedStringFromLocation();
|
|
693
|
-
switch (edge) {
|
|
694
|
-
case "top":
|
|
695
|
-
dockedBounds.left = left;
|
|
696
|
-
dockedBounds.right = right;
|
|
697
|
-
dockedBounds.top = top;
|
|
698
|
-
dockedBounds.bottom = top + this.height;
|
|
699
|
-
dockedBounds.width = width !== null && width !== void 0 ? width : 0;
|
|
700
|
-
break;
|
|
701
|
-
case "bottom":
|
|
702
|
-
dockedBounds.left = left;
|
|
703
|
-
dockedBounds.right = right;
|
|
704
|
-
dockedBounds.bottom = bottom;
|
|
705
|
-
dockedBounds.top = bottom - this.height;
|
|
706
|
-
dockedBounds.width = width !== null && width !== void 0 ? width : 0;
|
|
707
|
-
break;
|
|
708
|
-
case "left":
|
|
709
|
-
case "right":
|
|
710
|
-
break;
|
|
711
|
-
default:
|
|
712
|
-
Logger.system.warn("Unable to determine docking edge");
|
|
713
|
-
break;
|
|
714
|
-
}
|
|
715
|
-
const moveWindowIntoClaimedSpace = setTimeout(() => {
|
|
716
|
-
clearTimeout(moveWindowIntoClaimedSpace);
|
|
717
|
-
this.setBounds(dockedBounds);
|
|
718
|
-
}, 1500);
|
|
719
|
-
}
|
|
720
|
-
this.isHidden = false;
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* @function {function name}
|
|
724
|
-
* @param {type} request {description}
|
|
725
|
-
* @param {type} callback {description}
|
|
726
|
-
* @return {type} {description}
|
|
727
|
-
*/
|
|
728
|
-
async onBoundsChanging(event, cb) {
|
|
729
|
-
this.win.removeEventListener(BOUNDS_CHANGING, this.onBoundsChanging);
|
|
730
|
-
const request = event.data || event;
|
|
731
|
-
request.name = event.source;
|
|
732
|
-
this.win._startMove(request.changeType);
|
|
733
|
-
try {
|
|
734
|
-
request.timestamp = Date.now();
|
|
735
|
-
}
|
|
736
|
-
catch (e) {
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
const position = await System.getMousePosition();
|
|
740
|
-
const finishMove = () => {
|
|
741
|
-
this.lastBoundsAdjustment = Date.now();
|
|
742
|
-
this.win.addEventListener(BOUNDS_CHANGING, this.onBoundsChanging);
|
|
743
|
-
};
|
|
744
|
-
let invalidateRequest = false;
|
|
745
|
-
const shouldThrottle = request.timestamp < this.lastBoundsAdjustment + this.resizeThrottlePeriod;
|
|
746
|
-
// Note: this conditional here is for testing. Node is faster than JS or something.
|
|
747
|
-
// In node, we need to also exclude requests that came in at the same time as the request we last processed.
|
|
748
|
-
// I think they sometimes send multiple events and in my testing, that never happens.
|
|
749
|
-
// Truthfully though I don't know why this bit has to be different in the different environments.
|
|
750
|
-
// But I do remember losing a day when I ported this stuff from test-world. Don't delete it. --Brad
|
|
751
|
-
// @ts-ignore fin object referenced for testing env
|
|
752
|
-
if (typeof fin === "undefined") {
|
|
753
|
-
invalidateRequest = shouldThrottle || request.timestamp < this.lastBoundsAdjustment;
|
|
754
|
-
}
|
|
755
|
-
else {
|
|
756
|
-
invalidateRequest = shouldThrottle || request.timestamp <= this.lastBoundsAdjustment;
|
|
757
|
-
}
|
|
758
|
-
if (invalidateRequest) {
|
|
759
|
-
Logger.system.debug("DOCKING: Invalid request", "TIMESTAMPS:", JSON.stringify(request.timestamp), JSON.stringify(this.lastBoundsAdjustment));
|
|
760
|
-
this.win.addEventListener(BOUNDS_CHANGING, this.onBoundsChanging);
|
|
761
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
if (this.win.windowState === WINDOWSTATE.MAXIMIZED) {
|
|
765
|
-
/**
|
|
766
|
-
* This is a way to lock out any processing until we finish processing the first move request
|
|
767
|
-
* that comes in when a window is maximized.
|
|
768
|
-
*
|
|
769
|
-
* Events more or less get 'queued' by the underlying container. As quickly as they can, our container
|
|
770
|
-
* will consume OS-level events and bubble them up to this layer. We have code in this file
|
|
771
|
-
* here that says "Hey, this request came in prior to the last time I made a change. I'm going to drop
|
|
772
|
-
* this request . You're invalid. Goodbye." The thing we trigger off of is `lastBoundsAdjustment`.
|
|
773
|
-
* This value is set _after_ we process the current move request.
|
|
774
|
-
*
|
|
775
|
-
* Maximize is special though. As soon as our first request comes in, we want to ensure that no additional requests are even considered.
|
|
776
|
-
* To do that, we just say "The last time we changed this window was super far into the future." Now,
|
|
777
|
-
* every incoming request will be dropped until we have time to restore the window, do any group adjustments, and recalibrate.
|
|
778
|
-
*
|
|
779
|
-
* It sounds clunky, and it is somewhat. But I can't think of a better way to do this.
|
|
780
|
-
*/
|
|
781
|
-
this.lastBoundsAdjustment = Date.now() + 1000000000;
|
|
782
|
-
/**
|
|
783
|
-
* This tells the `setMoveRequest` function to offset the incoming request in such a way
|
|
784
|
-
* that the window is centered on the mouse pointer. If you call setBounds on a window that is maximized, subsequent move
|
|
785
|
-
* requests will come in as though the window's left edge never moved, until mouseUp happens. This boolean helps us get
|
|
786
|
-
* around this bug.
|
|
787
|
-
*/
|
|
788
|
-
this.shouldOffsetByMouse = true;
|
|
789
|
-
}
|
|
790
|
-
// This comparison used to check right and bottom...props that don't exist on the request.
|
|
791
|
-
// If all of the bounds haven't changed, don't waste time processing it.
|
|
792
|
-
// On monitor resolution change, bounds will not change, but we still need to move
|
|
793
|
-
// If the changeSource is "system", we might need to move even if the bounds haven't changed.
|
|
794
|
-
if (request.changeSource !== "system" &&
|
|
795
|
-
request.left === this.win.windowOptions.left &&
|
|
796
|
-
request.top === this.win.windowOptions.top &&
|
|
797
|
-
request.width === this.win.windowOptions.width &&
|
|
798
|
-
request.height === this.win.windowOptions.height) {
|
|
799
|
-
console.debug("No change being requested. Dropping.");
|
|
800
|
-
finishMove();
|
|
801
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
802
|
-
return;
|
|
803
|
-
}
|
|
804
|
-
// An electron bug causes window size to fluctuate on display scaled monitors. Keep the size if we are moving.
|
|
805
|
-
if (request.changeType === 0) {
|
|
806
|
-
request.width = this.win.windowOptions.width ? this.win.windowOptions.width : request.width; // For native windows these values do not exist initially
|
|
807
|
-
request.height = this.win.windowOptions.height ? this.win.windowOptions.height : request.height;
|
|
808
|
-
}
|
|
809
|
-
request.right = request.left + request.width;
|
|
810
|
-
request.bottom = request.top + request.height;
|
|
811
|
-
request.groupNames = this.groupNames;
|
|
812
|
-
request.mousePosition = request.mousePosition || position;
|
|
813
|
-
const bounds = await this.calculator.requestMove(request);
|
|
814
|
-
if (!bounds) {
|
|
815
|
-
finishMove();
|
|
816
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
await this.setBounds(bounds);
|
|
820
|
-
finishMove();
|
|
821
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
822
|
-
}
|
|
823
|
-
setResizeThrottlePeriod(throttlePeriod) {
|
|
824
|
-
this.resizeThrottlePeriod = throttlePeriod;
|
|
825
|
-
}
|
|
826
|
-
async restored(event) {
|
|
827
|
-
var _a, _b;
|
|
828
|
-
const group = this.calculator.getMovableGroup(this.name);
|
|
829
|
-
if (group && group.groupState === group.GROUPSTATES.MINIMIZED) {
|
|
830
|
-
group.restoreAll();
|
|
831
|
-
}
|
|
832
|
-
let previousState = (_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.previousState;
|
|
833
|
-
let updatedBounds = (_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.bounds;
|
|
834
|
-
if (!updatedBounds)
|
|
835
|
-
return;
|
|
836
|
-
/* If the window has been restored for maximize we need to update it's new position for Finsemble
|
|
837
|
-
We mostly rely on electron restore; however, in some cases we've forced the restore to a saved position.
|
|
838
|
-
If the monitors have changed this old position may be off monitor so we need to handle this case
|
|
839
|
-
|
|
840
|
-
Group restore needs more work. Historically we've always assumed the maximized window in the group will end up properly
|
|
841
|
-
positioned in the group. This doesn't work out after monitor change - the restore position that comes back from electron is not matched with the group
|
|
842
|
-
For now we make sure the restored window isn't lost, but can't guarantee the group will end up together (which will cause it to break after the next user move). */
|
|
843
|
-
let adjustedBounds = Object.assign({}, (await adjustBoundsToBeOnMonitorAsync(updatedBounds)));
|
|
844
|
-
if (previousState === WINDOWSTATE.MAXIMIZED && !checkIfBoundsAreEqual(this.getBounds(), adjustedBounds)) {
|
|
845
|
-
// If the bounds from the event are not off-monitor, it's safe to only update the bounds for finsemble and not do a full setbounds
|
|
846
|
-
if (checkIfBoundsAreEqual(adjustedBounds, updatedBounds)) {
|
|
847
|
-
adjustedBounds.internal = true;
|
|
848
|
-
}
|
|
849
|
-
this.setBounds(adjustedBounds);
|
|
850
|
-
}
|
|
851
|
-
if (!group && previousState && !this.name.includes("Toolbar")) {
|
|
852
|
-
this.calculator.buildSnapRelationships(this);
|
|
853
|
-
this.calculator.formGroup(this.name, { isMovable: false });
|
|
854
|
-
this.calculator.updateGroupData();
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
maximized() {
|
|
858
|
-
// update the bounds for finsemble except for stacked windows.
|
|
859
|
-
if (!this.win.parentWindow) {
|
|
860
|
-
// Monitor bounds are used to update finsemble bounds because of a chromium bug where maximized bounds are off by several pixels.
|
|
861
|
-
// This varies by scaling but on 100% monitor on a primary bounds were -8,-8 instead of 0,0 and 16 pixels too too and wide.
|
|
862
|
-
let bounds = Object.assign({}, this.monitor.availableRect);
|
|
863
|
-
// We need the window service's internal state to reflect the maximized bounds so that other windows don't try to
|
|
864
|
-
// snap to the old location. But, we must not ask Electron to actually set new bounds because that will then erase
|
|
865
|
-
// Electron's restoration cache (getNormalBounds). This call will update Finsemble's internal state without making any
|
|
866
|
-
// actual calls to the window itself.
|
|
867
|
-
//One side effect of this change is that FEA's bounds no longer get updated by us here.
|
|
868
|
-
// Electron has a strange issue where maximized bounds have an invisible border or some
|
|
869
|
-
// sorts that doesn't cause any issues but shows up in the bounds
|
|
870
|
-
// (On my 100% machine I get x: -8, y: -8 width and height have an extra 16 pixels).
|
|
871
|
-
// By not updating this value FEAs bounds now match electron bounds here.
|
|
872
|
-
// This may not matter but we do rely on FEA bounds in several places in mainWindow
|
|
873
|
-
// It's possible there will be some side effects.
|
|
874
|
-
this.setInternalBounds(bounds);
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* This removes event listeners.
|
|
879
|
-
* I can't be entirely certain, but from my testing, it _appears_ that Electron isn't actually deleting these objects.
|
|
880
|
-
* If you close the window, then load the window with the same name, old listeners are still registered with your new window.
|
|
881
|
-
* So if you reload a workspace, and then try to move a window, you get weird scenarios where onBoundsChanging is called twice with different values (presumably for old eventlisteners).
|
|
882
|
-
* Removing the eventListeners on close seems to handle this.
|
|
883
|
-
*/
|
|
884
|
-
removeEventListeners() {
|
|
885
|
-
// This reason this is necessary is hard to explain.
|
|
886
|
-
// When the dockableWindow is created we call win.addEventListener(BOUNDS_CHANGING, blah blah).
|
|
887
|
-
// This forces the window to bubble bounds events up to us. This function also goes out to the router and is pretty heavy for rapid addition/removal. Inside of onBoundsChanging, we add and remove handlers _on the event manager_. So when removeEventListeners is called, the two handlers above are removed. However, there's still that lingering listener that we added to the event manager inside of finishMove. If we don't remove that listener, we could get events thrown from other older incarnations of the same dockable window.
|
|
888
|
-
this.win.removeEventListener(BOUNDS_CHANGING, this.onBoundsChanging);
|
|
889
|
-
this.win.removeEventListener(BOUNDS_CHANGED, this.onBoundsChanged);
|
|
890
|
-
this.win.removeEventListener("hidden", this.hiddenUnclaimSpace);
|
|
891
|
-
this.win.removeEventListener("shown", this.unhiddenClaimSpace);
|
|
892
|
-
this.win.removeEventListener("restored", this.restored);
|
|
893
|
-
this.win.removeEventListener("maximized", this.maximized);
|
|
894
|
-
this.win.removeEventListener(SYSTEM_BOUNDS_CHANGED, this.onSystemMovedWindow);
|
|
895
|
-
}
|
|
896
|
-
/** ******************************************
|
|
897
|
-
* *
|
|
898
|
-
* Window Moving Methods *
|
|
899
|
-
* *
|
|
900
|
-
******************************************* */
|
|
901
|
-
/**
|
|
902
|
-
* Hides taskbar icon for windows. This prevents them from being clobbered by aeroshake.
|
|
903
|
-
*/
|
|
904
|
-
hideTaskbarIcon() {
|
|
905
|
-
const hideTaskbarPromise = new Promise((resolve) => {
|
|
906
|
-
// Check to see if the method exists. It wouldn't on an external window wrapper.
|
|
907
|
-
if (this.win._updateOptions) {
|
|
908
|
-
this.win._updateOptions({ showTaskbarIcon: false }, resolve);
|
|
909
|
-
}
|
|
910
|
-
else {
|
|
911
|
-
resolve();
|
|
912
|
-
}
|
|
913
|
-
});
|
|
914
|
-
// The timeout should never fire. Showing/hiding the taskbar should take
|
|
915
|
-
// a couple dozen milliseconds
|
|
916
|
-
// However, updateOptions also saves data. If we ever lost a connection to the DB,
|
|
917
|
-
// we could get into a situation where the queue hangs up. We don't want that.
|
|
918
|
-
this.changeTaskbarVisibilityQueue(() => wrapWithTimeout(hideTaskbarPromise, 2000, "HideTaskbarIcon timed out"));
|
|
919
|
-
}
|
|
920
|
-
/**
|
|
921
|
-
* This shows the taskbar icon for a given window.
|
|
922
|
-
*/
|
|
923
|
-
showTaskbarIcon(showIcon = this.shouldShowTaskbarIcon) {
|
|
924
|
-
const showTaskbarPromise = new Promise((resolve) => {
|
|
925
|
-
if (this.win._updateOptions && (this.shouldShowTaskbarIcon || showIcon)) {
|
|
926
|
-
this.win._updateOptions({ showTaskbarIcon: true }, resolve);
|
|
927
|
-
}
|
|
928
|
-
else {
|
|
929
|
-
resolve();
|
|
930
|
-
}
|
|
931
|
-
});
|
|
932
|
-
// The timeout should never fire. Showing/hiding the taskbar should take
|
|
933
|
-
// a couple dozen milliseconds
|
|
934
|
-
// However, updateOptions also saves data. If we ever lost a connection to the DB,
|
|
935
|
-
// we could get into a situation where the queue hangs up. We don't want that.
|
|
936
|
-
this.changeTaskbarVisibilityQueue(() => wrapWithTimeout(showTaskbarPromise, 2000, "ShowTaskbarIcon timed out"));
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
* @function {function name}
|
|
940
|
-
* @return {type} {description}
|
|
941
|
-
*/
|
|
942
|
-
disableFrame() {
|
|
943
|
-
if (this.win.disableFrame) {
|
|
944
|
-
// This should be renamed disableWindowMovement();
|
|
945
|
-
this.win.disableFrame();
|
|
946
|
-
}
|
|
947
|
-
else if (!warningsSent.disableFrame) {
|
|
948
|
-
warningsSent.disableFrame = true;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
setOpacity(params = { opacity: 1, persist: false }) {
|
|
952
|
-
// if (opacity === this.opacity) return;
|
|
953
|
-
this.opacity = params.opacity;
|
|
954
|
-
if (this.win._setOpacity) {
|
|
955
|
-
this.win._setOpacity(params);
|
|
956
|
-
}
|
|
957
|
-
else if (!warningsSent.setOpacity) {
|
|
958
|
-
warningsSent.setOpacity = true;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* Sets bounds for internal calculations.
|
|
963
|
-
*/
|
|
964
|
-
setInternalBounds(bounds) {
|
|
965
|
-
// Bunch of if statements was quicker than ternary operators when inside of loops.
|
|
966
|
-
this.left = typeof bounds.left === "undefined" ? this.left : bounds.left;
|
|
967
|
-
this.top = typeof bounds.top === "undefined" ? this.top : bounds.top;
|
|
968
|
-
this.width = typeof bounds.width === "undefined" ? this.width : bounds.width;
|
|
969
|
-
this.height = typeof bounds.height === "undefined" ? this.height : bounds.height;
|
|
970
|
-
this.right = typeof bounds.right === "undefined" ? this.left + this.width : bounds.right;
|
|
971
|
-
this.bottom = typeof bounds.bottom === "undefined" ? this.top + this.height : bounds.bottom;
|
|
972
|
-
this.setBoundingBoxes();
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* @function {function name}
|
|
976
|
-
* @param {type} bounds {description}
|
|
977
|
-
* @param {type} successCB {description}
|
|
978
|
-
* @param {type} errCB {description}
|
|
979
|
-
* @return {type} {description}
|
|
980
|
-
*/
|
|
981
|
-
async setBounds(bounds, successCB) {
|
|
982
|
-
return new Promise((resolve) => {
|
|
983
|
-
this.setInternalBounds(bounds);
|
|
984
|
-
bounds = {
|
|
985
|
-
left: bounds.left,
|
|
986
|
-
width: bounds.width,
|
|
987
|
-
height: bounds.height,
|
|
988
|
-
top: bounds.top,
|
|
989
|
-
right: bounds.right,
|
|
990
|
-
bottom: bounds.bottom,
|
|
991
|
-
internal: bounds.internal,
|
|
992
|
-
persistBounds: bounds.persistBounds,
|
|
993
|
-
};
|
|
994
|
-
// Old way was to update the monitor on the window when onMouseUp occurred, but now the OS (as well as user) can move a window and the monitor for that window should be updated every time
|
|
995
|
-
this.monitor = this.calculator.getMonitorForWindow(this);
|
|
996
|
-
this.win._setBounds({ bounds }, (err, data) => {
|
|
997
|
-
successCB === null || successCB === void 0 ? void 0 : successCB(err, data);
|
|
998
|
-
resolve({ err, data });
|
|
999
|
-
});
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* @function {function name}
|
|
1004
|
-
* @param {type} left {description}
|
|
1005
|
-
* @param {type} top {description}
|
|
1006
|
-
* @return {type} {description}
|
|
1007
|
-
*/
|
|
1008
|
-
moveTo(left, top) {
|
|
1009
|
-
this.setBounds({
|
|
1010
|
-
left,
|
|
1011
|
-
top,
|
|
1012
|
-
right: left + this.win.windowOptions.width,
|
|
1013
|
-
bottom: top + this.win.windowOptions.height,
|
|
1014
|
-
width: this.win.windowOptions.width,
|
|
1015
|
-
height: this.win.windowOptions.height,
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
* @function {function name}
|
|
1020
|
-
* @return {type} {description}
|
|
1021
|
-
*/
|
|
1022
|
-
getGroupNames() {
|
|
1023
|
-
return this.groupNames;
|
|
1024
|
-
}
|
|
1025
|
-
/**
|
|
1026
|
-
* @function {function name}
|
|
1027
|
-
* @param {type} request {description}
|
|
1028
|
-
* @param {type} callback {description}
|
|
1029
|
-
* @return {type} {description}
|
|
1030
|
-
*/
|
|
1031
|
-
requestBoundsChange(request, callback) {
|
|
1032
|
-
// window.methodCalls["requestBoundsChange"]++;
|
|
1033
|
-
// for testing purposes only
|
|
1034
|
-
if (!callback) {
|
|
1035
|
-
callback = this.onBoundsChanged;
|
|
1036
|
-
}
|
|
1037
|
-
System.getMousePosition((err, position) => {
|
|
1038
|
-
this.onBoundsChanging({
|
|
1039
|
-
data: {
|
|
1040
|
-
corners: this.getCornerObject(request),
|
|
1041
|
-
left: request.left,
|
|
1042
|
-
top: request.top,
|
|
1043
|
-
width: request.width,
|
|
1044
|
-
height: request.height,
|
|
1045
|
-
changeType: request.changeType,
|
|
1046
|
-
name: this.name,
|
|
1047
|
-
mousePosition: request.mousePosition || position,
|
|
1048
|
-
},
|
|
1049
|
-
}, () => {
|
|
1050
|
-
if (callback) {
|
|
1051
|
-
callback();
|
|
1052
|
-
}
|
|
1053
|
-
});
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
/** ******************************************
|
|
1057
|
-
* *
|
|
1058
|
-
* Helper Functions *
|
|
1059
|
-
* *
|
|
1060
|
-
******************************************* */
|
|
1061
|
-
/**
|
|
1062
|
-
* @function {function name}
|
|
1063
|
-
* @return {type} {description}
|
|
1064
|
-
*/
|
|
1065
|
-
calculateInnerBoundingBox() {
|
|
1066
|
-
var _a;
|
|
1067
|
-
const adjustment = ((_a = this.bufferSize) !== null && _a !== void 0 ? _a : 0) * 2;
|
|
1068
|
-
return {
|
|
1069
|
-
min: {
|
|
1070
|
-
x: this.left + adjustment,
|
|
1071
|
-
y: this.top + adjustment,
|
|
1072
|
-
},
|
|
1073
|
-
max: {
|
|
1074
|
-
x: this.right - adjustment,
|
|
1075
|
-
y: this.bottom - adjustment,
|
|
1076
|
-
},
|
|
1077
|
-
};
|
|
1078
|
-
}
|
|
1079
|
-
getInnerBoundingBox() {
|
|
1080
|
-
return this.innerBuffer;
|
|
1081
|
-
}
|
|
1082
|
-
/**
|
|
1083
|
-
* @function {function name}
|
|
1084
|
-
* @param {type} bufferSize {description}
|
|
1085
|
-
* @return {type} {description}
|
|
1086
|
-
*/
|
|
1087
|
-
setBufferSize(bufferSize) {
|
|
1088
|
-
this.bufferSize = bufferSize;
|
|
1089
|
-
this.setBoundingBoxes();
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* @function {function name}
|
|
1093
|
-
* @return {type} {description}
|
|
1094
|
-
*/
|
|
1095
|
-
setBoundingBoxes() {
|
|
1096
|
-
const myBounds = this.getBounds();
|
|
1097
|
-
this.setBuffer();
|
|
1098
|
-
this.innerBuffer = this.calculateInnerBoundingBox();
|
|
1099
|
-
this.windowBoundingBox = BoxMath.getWindowBoundingBox(myBounds);
|
|
1100
|
-
this.setSnappingRegions();
|
|
1101
|
-
this.vertices = this.getCornerObject(myBounds);
|
|
1102
|
-
}
|
|
1103
|
-
getSnappingRegions() {
|
|
1104
|
-
return this.snappingRegions;
|
|
1105
|
-
}
|
|
1106
|
-
updateState() {
|
|
1107
|
-
this.win._getBounds({}, (err, bounds) => {
|
|
1108
|
-
this.setBounds(bounds);
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* @function setHidden
|
|
1113
|
-
* @param {function=} callback when done
|
|
1114
|
-
*
|
|
1115
|
-
* Sets the internal state to hidden. Only needed if window is hidden outside of this class.
|
|
1116
|
-
*/
|
|
1117
|
-
setHidden() {
|
|
1118
|
-
Logger.system.debug("MONITOR: DockableWindow hide state");
|
|
1119
|
-
this.isHidden = true;
|
|
1120
|
-
}
|
|
1121
|
-
/**
|
|
1122
|
-
* @function setHidden
|
|
1123
|
-
* @param {function=} callback when done
|
|
1124
|
-
*
|
|
1125
|
-
* Sets the internal state to shown (i.e. not hidden). Only needed if window is hidden outside of this class.
|
|
1126
|
-
*/
|
|
1127
|
-
setShown() {
|
|
1128
|
-
Logger.system.debug("MONITOR: DockableWindow.show state");
|
|
1129
|
-
this.isHidden = false;
|
|
1130
|
-
}
|
|
1131
|
-
hide(cb = NullStandardCallback) {
|
|
1132
|
-
this.win._hide({}, cb);
|
|
1133
|
-
}
|
|
1134
|
-
show(cb = NullStandardCallback) {
|
|
1135
|
-
this.win._show({}, cb);
|
|
1136
|
-
}
|
|
1137
|
-
maximize(cb = NullStandardCallback) {
|
|
1138
|
-
this.win._maximize({}, cb);
|
|
1139
|
-
}
|
|
1140
|
-
minimize(cb = NullStandardCallback) {
|
|
1141
|
-
this.win._minimize({}, cb);
|
|
1142
|
-
}
|
|
1143
|
-
restore(cb = NullStandardCallback) {
|
|
1144
|
-
this.win._restore({}, cb);
|
|
1145
|
-
}
|
|
1146
|
-
alwaysOnTop(isAlwaysOnTop) {
|
|
1147
|
-
try {
|
|
1148
|
-
this.win._alwaysOnTop({ alwaysOnTop: isAlwaysOnTop });
|
|
1149
|
-
}
|
|
1150
|
-
catch (e) {
|
|
1151
|
-
Logger.system.debug("Implement alwaysOnTop");
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Returns the present alwaysOnTop status of the window.
|
|
1156
|
-
*
|
|
1157
|
-
* NOTE: This only reflects Finsemble's internal representation
|
|
1158
|
-
* of the alwaysOnTop status, not the container/OS. When changing the status,
|
|
1159
|
-
* Finsemble's status changes before the underlying container, causing them
|
|
1160
|
-
* to briefly become out of sync.
|
|
1161
|
-
*/
|
|
1162
|
-
isAlwaysOnTop() {
|
|
1163
|
-
return this.win._isAlwaysOnTop();
|
|
1164
|
-
}
|
|
1165
|
-
bringToFront() {
|
|
1166
|
-
try {
|
|
1167
|
-
this.win._bringToFront({});
|
|
1168
|
-
}
|
|
1169
|
-
catch (e) {
|
|
1170
|
-
Logger.system.error("Implement bringToFront");
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
notifyWindowTitleBarOfGroupMembership() {
|
|
1174
|
-
if (typeof RouterClient !== "undefined") {
|
|
1175
|
-
RouterClient.transmit(`${this.name}.groupMembershipChange`, {
|
|
1176
|
-
type: "joined",
|
|
1177
|
-
});
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
notifyWindowTitleBarOfGroupEjection() {
|
|
1181
|
-
if (typeof RouterClient !== "undefined") {
|
|
1182
|
-
RouterClient.transmit(`${this.name}.groupMembershipChange`, {
|
|
1183
|
-
type: "ejected",
|
|
1184
|
-
});
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
addSnappedWindow(snapObj) {
|
|
1188
|
-
if (!this.snappedWindows) {
|
|
1189
|
-
this.snappedWindows = [];
|
|
1190
|
-
}
|
|
1191
|
-
let shouldAdd = true;
|
|
1192
|
-
for (let i = 0; i < this.snappedWindows.length; i++) {
|
|
1193
|
-
const snappedWin = this.snappedWindows[i];
|
|
1194
|
-
if (snappedWin.name === snapObj.name) {
|
|
1195
|
-
shouldAdd = false;
|
|
1196
|
-
break;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
if (shouldAdd) {
|
|
1200
|
-
this.snappedWindows.push(snapObj);
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
removeSnappedWindow(name) {
|
|
1204
|
-
if (this.snappedWindows) {
|
|
1205
|
-
for (let i = 0; i < this.snappedWindows.length; i++) {
|
|
1206
|
-
const snappedWin = this.snappedWindows[i];
|
|
1207
|
-
if (name === snappedWin.name) {
|
|
1208
|
-
// Logger.system.log("Removing", name, "from", this.name);
|
|
1209
|
-
this.snappedWindows.splice(i, 1);
|
|
1210
|
-
return;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
animatePositionAndHeight(params, cb) {
|
|
1216
|
-
this.setInternalBounds(params);
|
|
1217
|
-
if (this.win._setBounds) {
|
|
1218
|
-
params.persistBounds = true;
|
|
1219
|
-
this.win._setBounds({ bounds: params }, cb);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
isGrouped() {
|
|
1223
|
-
return this.groups.length > 0;
|
|
1224
|
-
}
|
|
1225
|
-
/**
|
|
1226
|
-
* Adds eventListeners so that when the finWIndow moves, we can do things with that data.
|
|
1227
|
-
*/
|
|
1228
|
-
addListeners() {
|
|
1229
|
-
this.win.addEventListener(BOUNDS_CHANGING, this.onBoundsChanging);
|
|
1230
|
-
this.win.addEventListener(BOUNDS_CHANGED, this.onBoundsChanged);
|
|
1231
|
-
this.win.addEventListener("hidden", this.hiddenUnclaimSpace);
|
|
1232
|
-
this.win.addEventListener("shown", this.unhiddenClaimSpace);
|
|
1233
|
-
this.win.addEventListener("restored", this.restored);
|
|
1234
|
-
this.win.addEventListener("maximized", this.maximized);
|
|
1235
|
-
this.win.addEventListener(SYSTEM_BOUNDS_CHANGED, this.onSystemMovedWindow);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
export default DockableWindow;
|
|
1239
|
-
//# sourceMappingURL=dockableWindow.js.map
|