@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,1168 +0,0 @@
|
|
|
1
|
-
import { BaseWindow } from "./BaseWindow";
|
|
2
|
-
import { RouterClient } from "../../../../clients/routerClient";
|
|
3
|
-
import { ConfigClient } from "../../../../clients/configClient";
|
|
4
|
-
import { toast } from "../../../../common/toast";
|
|
5
|
-
import { Logger } from "../../../../clients/logger";
|
|
6
|
-
import { System } from "../../../../common/system";
|
|
7
|
-
import { MOVE_REASON, WINDOWSTATE } from "../../../../common/constants";
|
|
8
|
-
import { isWindows } from "../../../../common/util";
|
|
9
|
-
function isNumeric(n) {
|
|
10
|
-
return !isNaN(parseFloat(n)) && isFinite(n);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* WebWindow
|
|
14
|
-
*/
|
|
15
|
-
export class WebWindow extends BaseWindow {
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {*} params
|
|
19
|
-
* @param {finWindow} [params.finWindow] If not provided, must provide uuid
|
|
20
|
-
* @param {string} [params.uuid] If not provided, must provide finWindow
|
|
21
|
-
* @param {string} [params.name]
|
|
22
|
-
*/
|
|
23
|
-
constructor(params) {
|
|
24
|
-
super(params);
|
|
25
|
-
this._listeners = {};
|
|
26
|
-
// whether to notify the user that we failed to close the window if it times out.
|
|
27
|
-
this.throwNotificationOnFailedClose = false;
|
|
28
|
-
this.canMinimize = true;
|
|
29
|
-
this.canMaximize = true;
|
|
30
|
-
// On destruct, we'll go through all the listeners that we've added to the router and remove them
|
|
31
|
-
this.RouterHandlers = {};
|
|
32
|
-
// keeps track of Finsemble window event listeners and prevents duplicates
|
|
33
|
-
this.listeningFor = [];
|
|
34
|
-
// keeps track of the system event listeners that the Finsemble event listeners translate to and makes sure there are no duplicates
|
|
35
|
-
this.addedSystemListeners = {};
|
|
36
|
-
// This boolean is set to true when the window is closed by the operating system (outside of finsemble).
|
|
37
|
-
this.closing = false;
|
|
38
|
-
this.setBoundsFromFinsemble = false;
|
|
39
|
-
// Tracks wether the windows key is being held down. When the windows key is pressed inside a window a router message is dispatched to change this prop. Only when the opposite action fires from the router will this value change back.
|
|
40
|
-
this.windowsKeyDown = false;
|
|
41
|
-
this.lastWindowsKeyUp = 0;
|
|
42
|
-
this.windowState = WINDOWSTATE.NORMAL;
|
|
43
|
-
this.name = params.name || params.windowName;
|
|
44
|
-
Logger.system.debug("WebWindow constructor", this.name);
|
|
45
|
-
this.focused = false;
|
|
46
|
-
if (params.finWindow) {
|
|
47
|
-
this.finWindow = params.finWindow;
|
|
48
|
-
if (!this.name)
|
|
49
|
-
this.name = this.finWindow.name;
|
|
50
|
-
}
|
|
51
|
-
if (!this.finWindow) {
|
|
52
|
-
this.finWindow = System.Window.wrap(this.name);
|
|
53
|
-
}
|
|
54
|
-
this.windowIdentifier = { windowName: this.name, uuid: "dummyuuid" };
|
|
55
|
-
this.wrapFunctions();
|
|
56
|
-
this.windowOptions = {};
|
|
57
|
-
this.setMyOptions = this.setMyOptions.bind(this);
|
|
58
|
-
this.setCloseTimeout = this.setCloseTimeout.bind(this);
|
|
59
|
-
this.eventChannelName = this.eventChannelName.bind(this);
|
|
60
|
-
this.windowsKeyAction = this.windowsKeyAction.bind(this);
|
|
61
|
-
this._restore = this._restore.bind(this);
|
|
62
|
-
this.setParent = super.setParent.bind(this);
|
|
63
|
-
this.getParent = super.getParent.bind(this);
|
|
64
|
-
this.setMinimizeAbility = this.setMinimizeAbility.bind(this);
|
|
65
|
-
this.setMaximizeAbility = this.setMaximizeAbility.bind(this);
|
|
66
|
-
this.addListeners = this.addListeners.bind(this);
|
|
67
|
-
this.removeListeners = this.removeListeners.bind(this);
|
|
68
|
-
this._systemClosed = this._systemClosed.bind(this);
|
|
69
|
-
this._systemRestored = this._systemRestored.bind(this);
|
|
70
|
-
this._systemMaximized = this._systemMaximized.bind(this);
|
|
71
|
-
this._getBoundsFromSystem = this._getBoundsFromSystem.bind(this);
|
|
72
|
-
this.setupSystemBoundsChangedEvent = this.setupSystemBoundsChangedEvent.bind(this);
|
|
73
|
-
this.addListeners();
|
|
74
|
-
}
|
|
75
|
-
_addEventListener(params, handler = Function.prototype) {
|
|
76
|
-
const { eventName } = params;
|
|
77
|
-
this.addEventListener(eventName, handler);
|
|
78
|
-
}
|
|
79
|
-
_removeEventListener(params, handler = Function.prototype) {
|
|
80
|
-
const { eventName } = params;
|
|
81
|
-
this.removeEventListener(eventName, handler);
|
|
82
|
-
}
|
|
83
|
-
removeEventListener(params, handler = Function.prototype) {
|
|
84
|
-
super.removeEventListener(params.eventName || params, handler);
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Make sure that only one event is added for system listeners that someone requests. These events are cleaned up when "addedSystemListeners" are removed.
|
|
88
|
-
* @param {string} systemEvent
|
|
89
|
-
* @param {Function} handler
|
|
90
|
-
*/
|
|
91
|
-
setupSystemListener(systemEvent, handler) {
|
|
92
|
-
if (!this.addedSystemListeners[systemEvent]) {
|
|
93
|
-
this.addedSystemListeners[systemEvent] = handler;
|
|
94
|
-
this.finWindow.addEventListener(systemEvent, handler);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
addEventListener(event, handler) {
|
|
98
|
-
// This makes sure that the handlers are triggered for each event and get removed when someone removes the handler
|
|
99
|
-
super.addEventListener(event, handler);
|
|
100
|
-
// For some events, add listeners in the finWindow so that we can then propagate the event to the rest of the system. These are only added one time.
|
|
101
|
-
if (!this.listeningFor.includes(event)) {
|
|
102
|
-
this.listeningFor.push(event);
|
|
103
|
-
switch (event) {
|
|
104
|
-
case "bounds-change-request":
|
|
105
|
-
// translate disabled-frame-bounds-changing into a bounds-change-request event expected by the rest of the system.
|
|
106
|
-
this.setupSystemListener("disabled-frame-bounds-changing", this.onDisabledFrameBoundsChanging.bind(this));
|
|
107
|
-
break;
|
|
108
|
-
case "bounds-changed":
|
|
109
|
-
this.setupSystemListener("disabled-frame-bounds-changed", this.onDisabledFrameBoundsChanged.bind(this));
|
|
110
|
-
break;
|
|
111
|
-
case "system-bounds-changed":
|
|
112
|
-
this.setupSystemListener("bounds-changed", this.setupSystemBoundsChangedEvent.bind(this));
|
|
113
|
-
break;
|
|
114
|
-
case "system-maximized":
|
|
115
|
-
this.setupSystemListener("maximized", () => this.eventManager.trigger("system-maximized"));
|
|
116
|
-
break;
|
|
117
|
-
case "system-restored":
|
|
118
|
-
this.setupSystemListener("restored", () => this.eventManager.trigger("system-restored"));
|
|
119
|
-
break;
|
|
120
|
-
case "blurred":
|
|
121
|
-
case "focused":
|
|
122
|
-
case "hidden":
|
|
123
|
-
case "shown":
|
|
124
|
-
case "minimized":
|
|
125
|
-
// case "close-requested": <- using our custom close-requested event.
|
|
126
|
-
// case "closed": <- using custom close-event.
|
|
127
|
-
case "crashed":
|
|
128
|
-
// keep track of events we're listening for so we don't add multiple listeners on the window. don't want to trigger more than a single remote event per single local event. Said differently, if we add this generic handler N times, the event will be triggered N times.
|
|
129
|
-
// `super.addEventListener` will make sure that any events emitted by this wrapper are caught. However, we won't emit any events that we aren't listening to on the primitive window (in this case, the underlying finWindow).
|
|
130
|
-
// So, when someone adds a listener(e.g., focus), we listen for the primitive to emit the event. At that point, the derived class will emit, and the handler will be fired.
|
|
131
|
-
this.setupSystemListener(event, this.onNativeEvent.bind(this, event));
|
|
132
|
-
break;
|
|
133
|
-
// 'system-closed' is a made up event. It means 'a closed event was emitted on the underlying window primitive that we weren't expecting'.
|
|
134
|
-
// This will happen when the user closes via the taskbar or via alt + f4.
|
|
135
|
-
case "system-closed":
|
|
136
|
-
this.setupSystemListener("closed", () => this.eventManager.trigger("system-closed"));
|
|
137
|
-
break;
|
|
138
|
-
default:
|
|
139
|
-
Logger.system.debug("Listener added to Web wrap, Handler not passed to primitive. Using finsemble event instead.", event);
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Sets up listeners for system-bounds-changed events. Currently only responds to aero snap moves
|
|
146
|
-
*/
|
|
147
|
-
async setupSystemBoundsChangedEvent(evt) {
|
|
148
|
-
if (this.isDocked) {
|
|
149
|
-
this.eventManager.trigger("system-bounds-changed", Object.assign({}, evt));
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
Logger.system.verbose("bounds-changed event", evt);
|
|
153
|
-
// If a setBounds call was made by Finsemble, do not trigger this event. The intent of this is to catch things like moves made by windows keyboard shortcuts or direct calls from OF.
|
|
154
|
-
// dockableWindow deals with these. For stacks, this event is propagated to the stack.
|
|
155
|
-
if (this.setBoundsFromFinsemble && this.checkIfBoundsAreTheSame(evt, this.requestedBounds)) {
|
|
156
|
-
this.setBoundsFromFinsemble = false;
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (!this.finishedMove)
|
|
160
|
-
return;
|
|
161
|
-
if (this.windowsKeyDown) {
|
|
162
|
-
// If windows key is down, user is using shortcuts to position windows. Delay triggering the event until keyup.
|
|
163
|
-
this.windowsKeyUpHandler = () => {
|
|
164
|
-
if (this.windowState === WINDOWSTATE.MAXIMIZED) {
|
|
165
|
-
this.windowState = WINDOWSTATE.NORMAL;
|
|
166
|
-
this.eventManager.trigger("restored");
|
|
167
|
-
}
|
|
168
|
-
evt.action = MOVE_REASON.AERO_KEY;
|
|
169
|
-
this.eventManager.trigger("system-bounds-changed", Object.assign({}, evt));
|
|
170
|
-
// We set a global flag here that is available to all windowWrappers and docking. Aerosnapped windows fire a lot of spurious move events that need to be caught.
|
|
171
|
-
window.aeroMode = true;
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
else if (window.aeroMode) {
|
|
175
|
-
// this is for a window that is chosen from preview and is the only case except the initial aerosnap that needs to be dealt with.
|
|
176
|
-
if (this.windowState === WINDOWSTATE.MAXIMIZED) {
|
|
177
|
-
this.windowState = WINDOWSTATE.NORMAL;
|
|
178
|
-
this.eventManager.trigger("restored");
|
|
179
|
-
}
|
|
180
|
-
evt.action = MOVE_REASON.AERO_KEY;
|
|
181
|
-
this.eventManager.trigger("system-bounds-changed", Object.assign({}, evt));
|
|
182
|
-
window.aeroMode = false;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
checkIfBoundsAreTheSame(bounds1, bounds2) {
|
|
186
|
-
if (bounds1 && bounds2) {
|
|
187
|
-
return (bounds1.top === bounds2.top &&
|
|
188
|
-
bounds1.left === bounds2.left &&
|
|
189
|
-
bounds1.height === bounds2.height &&
|
|
190
|
-
bounds1.width === bounds2.width);
|
|
191
|
-
}
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
// When a native event fires:
|
|
195
|
-
async _systemMaximized() {
|
|
196
|
-
let win = this;
|
|
197
|
-
// prevent second maximize event
|
|
198
|
-
if (win.windowState == WINDOWSTATE.MAXIMIZED)
|
|
199
|
-
return;
|
|
200
|
-
win.windowState = WINDOWSTATE.MAXIMIZED;
|
|
201
|
-
win.eventManager.trigger("maximized");
|
|
202
|
-
}
|
|
203
|
-
// When a native event fires:
|
|
204
|
-
async _systemRestored() {
|
|
205
|
-
var _a;
|
|
206
|
-
// Skip if this window is contained within a stacked window
|
|
207
|
-
// We found that restoring a workspace with a maximized window stack resulted in the ability to
|
|
208
|
-
// unmaximize the stack by switching tabs. This is a workaround to that issue.
|
|
209
|
-
if (((_a = this.getParent()) === null || _a === void 0 ? void 0 : _a.setWindowType) === "StackedWindow") {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
let win = this;
|
|
213
|
-
// Maximize happens we resize the window under the titlebar, which causes restore to fire.
|
|
214
|
-
// We only want to actually deal with restore when the window is minimized previously
|
|
215
|
-
if (this.parentWindow)
|
|
216
|
-
win = this.parentWindow;
|
|
217
|
-
if (win.windowState === WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED) {
|
|
218
|
-
win._maximize();
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* If ignoreSystemRestore flag is present (was added from stackedWindowManager.setVisibleWindow) means that we are on a maximzed tabbed window
|
|
223
|
-
* and only switching tabs (which is triggering a system restored event) and therefore we simply want to:
|
|
224
|
-
* - remove the flag to prevent subquent inconsistent window states
|
|
225
|
-
* - maximize the window and bail out
|
|
226
|
-
*/
|
|
227
|
-
/* The ignoreSystemRestore flag is used to workaround a Chromium bug where changing the visibility on a maximized window triggers a restore event. This could cause maximize stacked windows to restore when switching tabs. We can't prevent the window from restoring, so our only option is to maximize the window after the fact. The flag is set to true only when we initiate the tab switch in this specific case, then toggled off afterwards to prevent effecting other window states. */
|
|
228
|
-
if (this.ignoreSystemRestore) {
|
|
229
|
-
this.ignoreSystemRestore = false;
|
|
230
|
-
win._maximize();
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
if (win.windowState === WINDOWSTATE.MINIMIZED_WAS_NORMAL) {
|
|
234
|
-
win._restore();
|
|
235
|
-
// If the previous restore position is now off-monitor the OS will have changed the restore position.
|
|
236
|
-
// Finsemble and FEA's values will be wrong in this case so we need to update our bounds if our bounds don't match Electron's bounds.
|
|
237
|
-
const { data: oldBounds } = await win._getBounds({});
|
|
238
|
-
const { data: updatedBounds } = await win._getBoundsFromSystem({});
|
|
239
|
-
const newBounds = Object.assign(Object.assign({}, updatedBounds), { action: MOVE_REASON.SYSTEM_RESTORED });
|
|
240
|
-
if (!this.checkIfBoundsAreTheSame(oldBounds, updatedBounds)) {
|
|
241
|
-
this.eventManager.trigger("system-bounds-changed", Object.assign({}, newBounds));
|
|
242
|
-
}
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (win.windowState === WINDOWSTATE.MAXIMIZED)
|
|
246
|
-
win._restore();
|
|
247
|
-
win.windowState = WINDOWSTATE.NORMAL;
|
|
248
|
-
win.eventManager.trigger("restored");
|
|
249
|
-
}
|
|
250
|
-
// When a native event fires:
|
|
251
|
-
onNativeEvent(eventName) {
|
|
252
|
-
this.eventManager.trigger(eventName);
|
|
253
|
-
}
|
|
254
|
-
addListeners() {
|
|
255
|
-
this.addEventListener("minimized", () => {
|
|
256
|
-
// we set the new windowState based on whether the current windowState is maximized or normal.
|
|
257
|
-
// if it is not either of those things, that means it is already in a minimized state, so we don't do anything.
|
|
258
|
-
if (this.windowState === WINDOWSTATE.MAXIMIZED) {
|
|
259
|
-
this.windowState = WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED;
|
|
260
|
-
this.windowOptions.windowState = WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED;
|
|
261
|
-
}
|
|
262
|
-
else if (this.windowState === WINDOWSTATE.NORMAL) {
|
|
263
|
-
this.windowState = WINDOWSTATE.MINIMIZED_WAS_NORMAL;
|
|
264
|
-
this.windowOptions.windowState = WINDOWSTATE.MINIMIZED_WAS_NORMAL;
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
this.addEventListener("restored", () => {
|
|
268
|
-
this.windowState = WINDOWSTATE.NORMAL;
|
|
269
|
-
this.windowOptions.windowState = WINDOWSTATE.NORMAL;
|
|
270
|
-
});
|
|
271
|
-
this.addEventListener("maximized", () => {
|
|
272
|
-
this.windowState = WINDOWSTATE.MAXIMIZED;
|
|
273
|
-
this.windowOptions.windowState = WINDOWSTATE.MAXIMIZED;
|
|
274
|
-
});
|
|
275
|
-
this.addEventListener("system-maximized", this._systemMaximized);
|
|
276
|
-
this.addEventListener("system-restored", this._systemRestored);
|
|
277
|
-
this.addEventListener("system-closed", this._systemClosed);
|
|
278
|
-
const UPDATE_OPTIONS_CHANNEL = `${this.name}.updateOptions`;
|
|
279
|
-
const onUpdateOptions = (err, response) => {
|
|
280
|
-
for (const o in response.data) {
|
|
281
|
-
if (this.windowOptions[o] == response.data[o])
|
|
282
|
-
return;
|
|
283
|
-
this.windowOptions[o] = response.data[o];
|
|
284
|
-
const dataToEmit = {
|
|
285
|
-
windowName: this.name,
|
|
286
|
-
};
|
|
287
|
-
dataToEmit[o] = response.data[o];
|
|
288
|
-
this.eventManager.trigger(o, response.data);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
this.RouterHandlers[UPDATE_OPTIONS_CHANNEL] = onUpdateOptions;
|
|
292
|
-
// Fire events when options are updated. e.g. alwaysOnTop
|
|
293
|
-
RouterClient.addListener(UPDATE_OPTIONS_CHANNEL, onUpdateOptions);
|
|
294
|
-
// When window key is pressed, we delay the system-set-bounds event trigger to after the key goes up.
|
|
295
|
-
RouterClient.addListener("Finsemble.WindowService.WindowsKey", this.windowsKeyAction);
|
|
296
|
-
/** DH 6/15/2019 - The OS and container maintain seperate records of
|
|
297
|
-
* which window is in focus, which can get out of sync;
|
|
298
|
-
* therefore, we have to maintain a seperate state here.
|
|
299
|
-
* Ideally this wouldn't be necessary and OS events would
|
|
300
|
-
* always bubble up to the container.
|
|
301
|
-
*/
|
|
302
|
-
this.addEventListener("focused", () => {
|
|
303
|
-
this.focused = true;
|
|
304
|
-
});
|
|
305
|
-
this.addEventListener("blurred", () => {
|
|
306
|
-
this.focused = false;
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
addBrowserView(params, cb) {
|
|
310
|
-
this.finWindow.addBrowserView(params, (data) => {
|
|
311
|
-
cb(null, data.id);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
removeBrowserView(params, cb) {
|
|
315
|
-
this.finWindow.removeBrowserView(params.viewId, () => {
|
|
316
|
-
cb(null);
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
bringViewToFront(params, cb) {
|
|
320
|
-
this.finWindow.bringViewToFront(params.viewId, () => {
|
|
321
|
-
cb(null);
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
setViewBounds(params, cb) {
|
|
325
|
-
this.finWindow.setViewBounds(params.viewId, params.bounds, () => {
|
|
326
|
-
cb(null);
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
onDisabledFrameBoundsChanged(evt) {
|
|
330
|
-
this.eventManager.trigger("bounds-changed", Object.assign({}, evt));
|
|
331
|
-
}
|
|
332
|
-
onDisabledFrameBoundsChanging(evt) {
|
|
333
|
-
this.eventManager.trigger("bounds-change-request", Object.assign({}, evt));
|
|
334
|
-
}
|
|
335
|
-
reload(params, cb = Function.prototype) {
|
|
336
|
-
if (typeof params === "function") {
|
|
337
|
-
cb = params;
|
|
338
|
-
params = null;
|
|
339
|
-
}
|
|
340
|
-
this.callWebWindowFunction("reload", null, cb);
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* @param params.property property to pull from 'finsemble' and from componentConfig.
|
|
344
|
-
* @param params.componentType which component to grab local config from.
|
|
345
|
-
*/
|
|
346
|
-
getGlobalAndLocalComponentConfig(params) {
|
|
347
|
-
const { property, componentType } = params;
|
|
348
|
-
const promiseResolver = (resolve, reject) => {
|
|
349
|
-
if (typeof componentType === "undefined") {
|
|
350
|
-
reject("params.componentType must be defined.");
|
|
351
|
-
}
|
|
352
|
-
if (typeof property === "undefined") {
|
|
353
|
-
reject("params.property is required");
|
|
354
|
-
}
|
|
355
|
-
// In case config isn't initialized when this method is called.
|
|
356
|
-
const getConfig = () => {
|
|
357
|
-
ConfigClient.getValue({ field: "finsemble" }, (err, allConfig) => {
|
|
358
|
-
if (err)
|
|
359
|
-
return reject(err);
|
|
360
|
-
const globalConfig = allConfig[property];
|
|
361
|
-
const componentConfig = allConfig.components[componentType];
|
|
362
|
-
// If we have the component config, return the property saved on that component. if not, return undefined.
|
|
363
|
-
const localConfig = componentConfig && componentConfig.foreign && componentConfig.foreign.components
|
|
364
|
-
? componentConfig.foreign.components[property]
|
|
365
|
-
: undefined;
|
|
366
|
-
resolve({ localConfig, globalConfig, allConfig });
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
getConfig();
|
|
370
|
-
};
|
|
371
|
-
return new Promise(promiseResolver);
|
|
372
|
-
}
|
|
373
|
-
setCloseTimeout() {
|
|
374
|
-
const promiseResolver = (resolve) => {
|
|
375
|
-
let componentType;
|
|
376
|
-
// Have to make sure options are set. Sometimes wraps are created and then just used to close windows. Need options to know which kind of component it is..
|
|
377
|
-
this.setMyOptions(async () => {
|
|
378
|
-
if (this.windowOptions && this.windowOptions.customData && this.windowOptions.customData.component) {
|
|
379
|
-
componentType = this.windowOptions.customData.component.type;
|
|
380
|
-
}
|
|
381
|
-
// Get the global timeout and the component-specific timeout. If the component-specific exists, use it. If it doesn't, try global. If global doesn't exist, use 5000ms.
|
|
382
|
-
const { localConfig, globalConfig, allConfig } = await this.getGlobalAndLocalComponentConfig({
|
|
383
|
-
property: "Window Manager",
|
|
384
|
-
componentType,
|
|
385
|
-
});
|
|
386
|
-
const globalTimeout = globalConfig ? globalConfig.componentCloseTimeout : undefined;
|
|
387
|
-
const componentTimeout = localConfig ? localConfig.componentCloseTimeout : undefined;
|
|
388
|
-
if (typeof componentTimeout !== "undefined") {
|
|
389
|
-
this.closeTimeout = componentTimeout;
|
|
390
|
-
}
|
|
391
|
-
else if (typeof globalTimeout !== "undefined") {
|
|
392
|
-
this.closeTimeout = globalTimeout;
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
this.closeTimeout = 5000;
|
|
396
|
-
}
|
|
397
|
-
this.throwNotificationOnFailedClose = allConfig.failedComponentCloseNotification;
|
|
398
|
-
Logger.system.info("Close timeout set for", this.name, JSON.stringify(this.closeTimeout));
|
|
399
|
-
resolve();
|
|
400
|
-
});
|
|
401
|
-
};
|
|
402
|
-
return new Promise(promiseResolver);
|
|
403
|
-
}
|
|
404
|
-
setMyOptions(cb) {
|
|
405
|
-
this.finWindow.getOptions((opts) => {
|
|
406
|
-
if (!opts) {
|
|
407
|
-
Logger.system.error("setMyOptions. options returned from FEA is empty", opts);
|
|
408
|
-
}
|
|
409
|
-
this.windowOptions = Object.assign(opts, this.windowOptions || {});
|
|
410
|
-
if (!this.windowOptions) {
|
|
411
|
-
Logger.system.error("window options is null");
|
|
412
|
-
}
|
|
413
|
-
if (cb)
|
|
414
|
-
cb();
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
setMinimizeAbility(canMinimize) {
|
|
418
|
-
if (typeof canMinimize !== "boolean") {
|
|
419
|
-
Logger.system.error("Ability to minimize cannot be a non-boolean value. Assuming true");
|
|
420
|
-
canMinimize = true;
|
|
421
|
-
}
|
|
422
|
-
this.canMinimize = canMinimize;
|
|
423
|
-
}
|
|
424
|
-
setMaximizeAbility(canMaximize) {
|
|
425
|
-
if (typeof canMaximize !== "boolean") {
|
|
426
|
-
throw new Error("Ability to maximize cannot be a non-boolean value");
|
|
427
|
-
}
|
|
428
|
-
this.canMaximize = canMaximize;
|
|
429
|
-
}
|
|
430
|
-
_updateOptions(params = {}, cb = Function.prototype) {
|
|
431
|
-
if (!params)
|
|
432
|
-
params = {};
|
|
433
|
-
params = params.options || params;
|
|
434
|
-
// Permissions and security policies are protected options. They cannot be modified. Overwrite them as long as they've been set on the window.
|
|
435
|
-
// Note: window options aren't set on instantiation. New functionality needs to be added to set the options on creation.
|
|
436
|
-
if (this.windowOptions && this.windowOptions.securityPolicy) {
|
|
437
|
-
params.permissions = this.windowOptions.permissions;
|
|
438
|
-
params.securityPolicy = this.windowOptions.securityPolicy;
|
|
439
|
-
}
|
|
440
|
-
this.callWebWindowFunction("updateOptions", params, () => {
|
|
441
|
-
this._saveWindowOptions();
|
|
442
|
-
cb();
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
// Had to move this because jScrambler was screwing up when we obfuscated.
|
|
446
|
-
wrapFunctions() {
|
|
447
|
-
// let self = this;
|
|
448
|
-
const WebWindowFunctionsWithoutParams = ["disableFrame", "isShowing", "getState"];
|
|
449
|
-
WebWindowFunctionsWithoutParams.forEach((f) => {
|
|
450
|
-
this[f] = (params, cb) => {
|
|
451
|
-
if (typeof params === "function") {
|
|
452
|
-
cb = params;
|
|
453
|
-
params = null;
|
|
454
|
-
}
|
|
455
|
-
this.callWebWindowFunction(f, false, cb);
|
|
456
|
-
};
|
|
457
|
-
});
|
|
458
|
-
const WebWindowFunctionsWithoutParamsToBeWrappedInIsShowing = ["focus"];
|
|
459
|
-
WebWindowFunctionsWithoutParamsToBeWrappedInIsShowing.forEach((f) => {
|
|
460
|
-
this[f] = (cb = Function.prototype) => {
|
|
461
|
-
// If the method is defined on the BaseWindow, call it.
|
|
462
|
-
if (super[f]) {
|
|
463
|
-
super[f]({}, (err, response) => {
|
|
464
|
-
// if BaseWindow says it's okay for us the method to trickle down to the wrapper, great. otherwise cb.
|
|
465
|
-
if (!err && response.shouldContinue) {
|
|
466
|
-
this.callWebWindowFunction(f, false, cb);
|
|
467
|
-
}
|
|
468
|
-
else {
|
|
469
|
-
cb();
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
this.callWebWindowFunction(f, false, cb);
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Called when a router message is received saying a windows key was pressed/released.
|
|
481
|
-
* @param {*} err Error from the router
|
|
482
|
-
* @param {*} response The response containing information about what keys were pressed
|
|
483
|
-
*/
|
|
484
|
-
windowsKeyAction(err, response) {
|
|
485
|
-
let timeout;
|
|
486
|
-
const setWindowKeyDownFalse = () => {
|
|
487
|
-
this.windowsKeyDown = false;
|
|
488
|
-
this.lastWindowsKeyUp = Date.now();
|
|
489
|
-
if (this.windowsKeyUpHandler)
|
|
490
|
-
this.windowsKeyUpHandler();
|
|
491
|
-
this.windowsKeyUpHandler = null;
|
|
492
|
-
clearTimeout(timeout);
|
|
493
|
-
};
|
|
494
|
-
if (response.data === "down") {
|
|
495
|
-
this.windowsKeyDown = true;
|
|
496
|
-
// In case we never get a key up.
|
|
497
|
-
timeout = setTimeout(setWindowKeyDownFalse, 30000);
|
|
498
|
-
}
|
|
499
|
-
else if (response.data === "up") {
|
|
500
|
-
setWindowKeyDownFalse();
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
updateOptions(params) {
|
|
504
|
-
Logger.system.debug("callWebWindowFunction.updateOptions", params);
|
|
505
|
-
if (!params[0].dontFireEvents) {
|
|
506
|
-
RouterClient.transmit(`${this.name}.updateOptions`, params[0]);
|
|
507
|
-
for (const o in params[0]) {
|
|
508
|
-
// in some cases (such as our bringToFront hack we dont want to fire spurious events). Also dont fire events if the option doesn't change
|
|
509
|
-
if (o == "dontFireEvents" || this.windowOptions[o] == params[0][o])
|
|
510
|
-
continue;
|
|
511
|
-
if (this.windowOptions[o] &&
|
|
512
|
-
typeof this.windowOptions[o] === "object" &&
|
|
513
|
-
params[0][o] &&
|
|
514
|
-
typeof params[0][o] === "object") {
|
|
515
|
-
Object.assign(this.windowOptions[o], params[0][o]);
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
this.windowOptions[o] = params[0][o];
|
|
519
|
-
}
|
|
520
|
-
if (!params[0].dontFireEvents) {
|
|
521
|
-
const event = {
|
|
522
|
-
windowName: this.name,
|
|
523
|
-
[o]: params[0][o],
|
|
524
|
-
};
|
|
525
|
-
this.eventManager.trigger(o, event);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
*
|
|
532
|
-
* @param {*} functionName Name of the Web window function to call
|
|
533
|
-
* @param {*} params The parameters to the function (except callbacks) as an array
|
|
534
|
-
* @param {*} cb The callback to be called. This is in the format function (err, response) {} and errors will be in err.
|
|
535
|
-
*/
|
|
536
|
-
callWebWindowFunction(functionName, params, cb = Function.prototype) {
|
|
537
|
-
// If this.closing is true, the window was closed by the operating system.
|
|
538
|
-
// When that happens, the window receives focus. If that window is part of a group, this can trigger calls to bring to front, update options, etc.
|
|
539
|
-
// These function calls will error out because the window has already been closed.
|
|
540
|
-
if (this.closing) {
|
|
541
|
-
cb({
|
|
542
|
-
code: "function_dropped_window_closing",
|
|
543
|
-
message: `Window ${this.name} was closed by the operating system. Skipping call to ${functionName}`,
|
|
544
|
-
});
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
if (!params) {
|
|
548
|
-
this.finWindow[functionName]((retval) => {
|
|
549
|
-
cb === null || cb === void 0 ? void 0 : cb(null, retval);
|
|
550
|
-
}, (err) => {
|
|
551
|
-
Logger.system.debug("Error in WebWindowWrapper method", functionName, err);
|
|
552
|
-
cb === null || cb === void 0 ? void 0 : cb(err);
|
|
553
|
-
});
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
|
-
params = Array.isArray(params) ? params : [params];
|
|
557
|
-
// add success callback to params
|
|
558
|
-
params.push((...args) => {
|
|
559
|
-
var _a, _b;
|
|
560
|
-
// fire event for updateOptions
|
|
561
|
-
if (functionName == "updateOptions")
|
|
562
|
-
this.updateOptions(params);
|
|
563
|
-
// call the actual callback
|
|
564
|
-
if (cb) {
|
|
565
|
-
if (((_a = args[0]) === null || _a === void 0 ? void 0 : _a.status) === "failure") {
|
|
566
|
-
cb(((_b = args[0]) === null || _b === void 0 ? void 0 : _b.message) || args[0].status, null);
|
|
567
|
-
return;
|
|
568
|
-
}
|
|
569
|
-
cb(null, args);
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
// add error callback to params
|
|
573
|
-
params.push((err) => {
|
|
574
|
-
if (cb) {
|
|
575
|
-
err = `Error for ${this.name} from method ${functionName}: ${err}`;
|
|
576
|
-
Logger.system.error("Error in WebWindowWrapper method", functionName, err);
|
|
577
|
-
console.error(err);
|
|
578
|
-
cb(err);
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
// call the function
|
|
582
|
-
Logger.system.debug("callWebWindowFunction", functionName, params);
|
|
583
|
-
this.finWindow[functionName](...params);
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Gets the bounds directly from Electron. The existing getbounds function tries it's best to pass in the bounds as Finsemble knows them instead of bounds
|
|
587
|
-
* sent up from the system.
|
|
588
|
-
* This is called in cases where the OS has moved a window. In these cases we need the updated bounds from the system to update the Finsemble bounds
|
|
589
|
-
* @param {*} params
|
|
590
|
-
* @param {*} cb
|
|
591
|
-
*/
|
|
592
|
-
_getBoundsFromSystem(params, cb = Function.prototype) {
|
|
593
|
-
Logger.system.debug("WebWindowWrapper._getBoundsFromSystem", this.name, params);
|
|
594
|
-
const promiseResolver = (resolve) => {
|
|
595
|
-
this.callWebWindowFunction("getBoundsFromSystem", null, (err, bounds) => {
|
|
596
|
-
cb(err, bounds);
|
|
597
|
-
return resolve({ err, data: bounds });
|
|
598
|
-
});
|
|
599
|
-
};
|
|
600
|
-
return new Promise(promiseResolver);
|
|
601
|
-
}
|
|
602
|
-
_getBounds(params, cb = Function.prototype) {
|
|
603
|
-
Logger.system.debug("WebWindowWrapper._getBounds", this.name, params);
|
|
604
|
-
if (typeof params === "function") {
|
|
605
|
-
cb = params;
|
|
606
|
-
params = null;
|
|
607
|
-
}
|
|
608
|
-
const promiseResolver = (resolve) => {
|
|
609
|
-
// BOUNDS ARE WRONG! SERIOUSLY THEY REALLY ARE WRONG! AND THIS BREAKS STACKED WINDOWS IN DOCKED GROUPS BADLY!
|
|
610
|
-
// SO PLEASE do not remove this code. it wasted a whole 4 hours figuring out why group rectangularity problems were back in cleanup.
|
|
611
|
-
// return cached bounds if we have them
|
|
612
|
-
// WE HAVE TO CACHE THEM BECAUSE WINDOWS IN STACKS ARE DEREGISTERED FROM DOCKING. AND DOCKING DOESN'T GET BOUNDS FOR THOSE WHICH IS A PROBLEM FOR STACKS. Do not eliminate this cache.
|
|
613
|
-
if (this.windowOptions && this.windowOptions.bounds) {
|
|
614
|
-
cb(null, this.windowOptions.bounds);
|
|
615
|
-
return resolve({ err: null, data: this.windowOptions.bounds });
|
|
616
|
-
}
|
|
617
|
-
if (isNumeric(this.windowOptions.defaultLeft) &&
|
|
618
|
-
isNumeric(this.windowOptions.defaultTop) &&
|
|
619
|
-
isNumeric(this.windowOptions.defaultHeight) &&
|
|
620
|
-
isNumeric(this.windowOptions.defaultWidth)) {
|
|
621
|
-
const bounds = {
|
|
622
|
-
top: this.windowOptions.defaultTop,
|
|
623
|
-
left: this.windowOptions.defaultLeft,
|
|
624
|
-
height: this.windowOptions.defaultHeight,
|
|
625
|
-
width: this.windowOptions.defaultWidth,
|
|
626
|
-
};
|
|
627
|
-
bounds.right = bounds.left + bounds.width;
|
|
628
|
-
bounds.bottom = bounds.top + bounds.height;
|
|
629
|
-
this.windowOptions.bounds = bounds;
|
|
630
|
-
cb(null, this.windowOptions.bounds);
|
|
631
|
-
return resolve({ err: null, data: this.windowOptions.bounds });
|
|
632
|
-
}
|
|
633
|
-
// bounds are often different from what is expected by a couple of pixels. use as last resort
|
|
634
|
-
this.callWebWindowFunction("getBounds", null, (err, bounds) => {
|
|
635
|
-
cb(err, bounds);
|
|
636
|
-
return resolve({ err, data: bounds });
|
|
637
|
-
});
|
|
638
|
-
};
|
|
639
|
-
// get bounds from docking if not
|
|
640
|
-
return new Promise(promiseResolver);
|
|
641
|
-
}
|
|
642
|
-
_getOptions(params, cb) {
|
|
643
|
-
Logger.system.debug("WebWindowWrapper._getOptions", this.name, params);
|
|
644
|
-
this.callWebWindowFunction("getOptions", null, (err, opts) => {
|
|
645
|
-
const hasCachedOptions = Object.keys(this.windowOptions).length > 0;
|
|
646
|
-
const FEAReturnedOptions = Boolean(opts);
|
|
647
|
-
if (err) {
|
|
648
|
-
Logger.system.error("getOptions Error retrieving options:", err, params, opts);
|
|
649
|
-
}
|
|
650
|
-
else if (FEAReturnedOptions) {
|
|
651
|
-
// in the else case, we just use whatever was returned from FEA.
|
|
652
|
-
if (hasCachedOptions) {
|
|
653
|
-
opts = Object.assign(opts, this.windowOptions);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
else {
|
|
657
|
-
// FEA returned nothing. Shouldn't happen, but if it does.... Do we have windowOptions? If so, return them.
|
|
658
|
-
Logger.system.error("getOptions error. FEA failed to return options but did not send an error. Params:", params);
|
|
659
|
-
if (hasCachedOptions) {
|
|
660
|
-
opts = this.windowOptions;
|
|
661
|
-
}
|
|
662
|
-
else {
|
|
663
|
-
Logger.system.warn("Setting options to empty. FEA failed to return options and the WebWindowWrapper has no cached windowOptions. Error:", err, "Params:", params, opts);
|
|
664
|
-
opts = {};
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
cb(err, opts);
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
_hide(params, cb = Function.prototype) {
|
|
671
|
-
Logger.system.debug("WebWindowWrapper._hide", this.name, params);
|
|
672
|
-
if (typeof params === "function") {
|
|
673
|
-
cb = params;
|
|
674
|
-
params = null;
|
|
675
|
-
}
|
|
676
|
-
if (params && params.invokedByParent) {
|
|
677
|
-
this.callWebWindowFunction("updateOptions", { autoShow: false }, () => {
|
|
678
|
-
this._saveWindowOptions();
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
this.callWebWindowFunction("hide", null, cb);
|
|
682
|
-
}
|
|
683
|
-
async _show(params, cb) {
|
|
684
|
-
return new Promise((resolve) => {
|
|
685
|
-
if (typeof params === "function") {
|
|
686
|
-
cb = params;
|
|
687
|
-
params = {};
|
|
688
|
-
}
|
|
689
|
-
const previousOpacity = this.windowOptions.opacity || 1;
|
|
690
|
-
// Calling restore/maximize on a window in a stack (where child windows are hidden) will potentially change tabs
|
|
691
|
-
// this will show the window, perform the action, then return it to its previous opactiy. This is necessary to keep windows
|
|
692
|
-
// from changing to an undesired state
|
|
693
|
-
// shouldMaximize and shouldRestore should not be true at the same time hence the shouldMaximize condition
|
|
694
|
-
// in the shouldRestore assigment - if shouldMaximize is true then shouldRestore must be false
|
|
695
|
-
let shouldMaximize = params.shouldMaximize || this.windowState === WINDOWSTATE.MAXIMIZED;
|
|
696
|
-
let shouldRestore = shouldMaximize ? false : params.shouldRestore || this.windowState === WINDOWSTATE.NORMAL;
|
|
697
|
-
//KW 20220825: Do not change opacity on should restore as it happens in all non-should maximize cases and causes performance degradation
|
|
698
|
-
if (shouldMaximize || params.switchedMonitors) {
|
|
699
|
-
this._setOpacity({ opacity: 0 });
|
|
700
|
-
}
|
|
701
|
-
if (shouldMaximize || shouldRestore || params.switchedMonitors) {
|
|
702
|
-
this.windowState = WINDOWSTATE.TRANSITIONING;
|
|
703
|
-
}
|
|
704
|
-
Logger.system.debug("WebWindowWrapper._show", this.name, params);
|
|
705
|
-
if (params && (params.invokedByParent || params.saveState)) {
|
|
706
|
-
this.callWebWindowFunction("updateOptions", { autoShow: true }, () => {
|
|
707
|
-
this._saveWindowOptions();
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
this.callWebWindowFunction("show", null, () => {
|
|
711
|
-
if (shouldMaximize)
|
|
712
|
-
this._maximize();
|
|
713
|
-
if (shouldRestore)
|
|
714
|
-
this._restore();
|
|
715
|
-
//KW 20220825: Do not change opacity on should restore as it happens in all non-should maximize cases and causes performance degradation
|
|
716
|
-
if (shouldMaximize || params.switchedMonitors) {
|
|
717
|
-
// TPina 2022/05/17
|
|
718
|
-
// We need this setTimout here so that the _setOpacity call is removed from the
|
|
719
|
-
// execution stack and placed in the callback queue of the event loop, which will wait for the
|
|
720
|
-
// below cb and resolve to be run thus displaying the window. Only then we want to set the opacity back.
|
|
721
|
-
// This prevents visible flickering of windows (repaints) when the screen scaling is different across monitors.
|
|
722
|
-
// For toolbar menus, these windows are invisible and the user can drag the toolbar
|
|
723
|
-
// from one monitor to the other and click a menu which will trigger a show and a repaint for the scalling.
|
|
724
|
-
setTimeout(async () => {
|
|
725
|
-
await this._setOpacity({ opacity: previousOpacity });
|
|
726
|
-
cb === null || cb === void 0 ? void 0 : cb(null);
|
|
727
|
-
resolve({});
|
|
728
|
-
}, 0);
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
cb === null || cb === void 0 ? void 0 : cb(null);
|
|
732
|
-
resolve({});
|
|
733
|
-
}
|
|
734
|
-
});
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
// TABBING NOTE: Example case below showing how the parent (through the base class) can optionally inject it's behavior. Exactly where and where this is done is still TBD.
|
|
738
|
-
_minimize(params = {
|
|
739
|
-
notifyDocking: true,
|
|
740
|
-
initialLoad: false,
|
|
741
|
-
invokedByParent: false,
|
|
742
|
-
}, cb = Function.prototype) {
|
|
743
|
-
Logger.system.debug("WebWindowWrapper._minimize", this.name, params);
|
|
744
|
-
const self = this;
|
|
745
|
-
// Some windows cannot minimize, e.g., (toolbars);
|
|
746
|
-
if (self.canMinimize === false)
|
|
747
|
-
return;
|
|
748
|
-
function doMinimize() {
|
|
749
|
-
if (self.windowState === WINDOWSTATE.MAXIMIZED) {
|
|
750
|
-
self.windowState = WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED;
|
|
751
|
-
self.windowOptions.windowState = WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED;
|
|
752
|
-
}
|
|
753
|
-
else if (self.windowState === WINDOWSTATE.NORMAL) {
|
|
754
|
-
self.windowState = WINDOWSTATE.MINIMIZED_WAS_NORMAL;
|
|
755
|
-
self.windowOptions.windowState = WINDOWSTATE.MINIMIZED_WAS_NORMAL;
|
|
756
|
-
}
|
|
757
|
-
self.finWindow.minimize();
|
|
758
|
-
// if minimize is being called during the workspace load to restore state, then don't dirty workspace
|
|
759
|
-
if (!params.initialLoad) {
|
|
760
|
-
self.windowOptions.windowState = self.windowState;
|
|
761
|
-
self.saveCompleteWindowState(self.windowOptions);
|
|
762
|
-
}
|
|
763
|
-
cb();
|
|
764
|
-
}
|
|
765
|
-
RouterClient.query("DockingService.windowMinimized", self.name, () => {
|
|
766
|
-
doMinimize();
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
_maximize(params = { notifyDocking: true, invokedByParent: false }, cb = Function.prototype) {
|
|
770
|
-
// If windows key is down, user is using hotkeys to maximize and could potentially cancel the maximize event. So delay doing anything until the key is up.
|
|
771
|
-
if (this.windowsKeyDown) {
|
|
772
|
-
this.windowsKeyUpHandler = () => {
|
|
773
|
-
this._maximize(params);
|
|
774
|
-
};
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
Logger.system.debug("WebWindowWrapper._maximize", this.name, params);
|
|
778
|
-
// Some windows cannot maximize, e.g., (toolbars);
|
|
779
|
-
if (this.canMaximize === false)
|
|
780
|
-
return;
|
|
781
|
-
if (this.windowState === WINDOWSTATE.MAXIMIZED)
|
|
782
|
-
return cb();
|
|
783
|
-
this.finWindow.getBounds((bounds) => {
|
|
784
|
-
this.cachedBounds = bounds;
|
|
785
|
-
});
|
|
786
|
-
this.maximizeHelper(params, cb);
|
|
787
|
-
}
|
|
788
|
-
maximizeHelper(params, cb) {
|
|
789
|
-
super._maximize(params, (err, response) => {
|
|
790
|
-
if (!err && response.shouldContinue) {
|
|
791
|
-
this.finWindow.maximize();
|
|
792
|
-
this.windowState = WINDOWSTATE.MAXIMIZED;
|
|
793
|
-
this.eventManager.trigger("maximized");
|
|
794
|
-
// if maximize is being called during the workspace load to restore state, then don't dirty workspace
|
|
795
|
-
if (!params.initialLoad) {
|
|
796
|
-
this.windowOptions.windowState = this.windowState;
|
|
797
|
-
this.saveCompleteWindowState(this.windowOptions);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
if (cb)
|
|
801
|
-
cb();
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
_resetBrowserView() {
|
|
805
|
-
this.finWindow.resetBrowserView();
|
|
806
|
-
}
|
|
807
|
-
// TABBING NOTE: Example case below showing how the parent (through the base class) can optionally inject it's behavior.
|
|
808
|
-
// ** Exactly where and where this for each derived window wrapper is still TBD, but easy to do/tweak. **
|
|
809
|
-
_restore(params = {}, cb = Function.prototype) {
|
|
810
|
-
Logger.system.debug("WebWindowWrapper._restore", this.name, params);
|
|
811
|
-
if (typeof params === "function") {
|
|
812
|
-
cb = params;
|
|
813
|
-
params = {};
|
|
814
|
-
}
|
|
815
|
-
if (this.windowState === WINDOWSTATE.NORMAL)
|
|
816
|
-
return cb();
|
|
817
|
-
this.restoreHelper(params, cb);
|
|
818
|
-
}
|
|
819
|
-
restoreHelper(params, cb) {
|
|
820
|
-
const success = () => {
|
|
821
|
-
this._getBoundsFromSystem({}, (err, bounds) => {
|
|
822
|
-
this.eventManager.trigger("restored", {
|
|
823
|
-
bounds,
|
|
824
|
-
previousState: this.previousState,
|
|
825
|
-
});
|
|
826
|
-
});
|
|
827
|
-
cb();
|
|
828
|
-
};
|
|
829
|
-
switch (this.windowState) {
|
|
830
|
-
case WINDOWSTATE.MINIMIZED_WAS_NORMAL:
|
|
831
|
-
case WINDOWSTATE.MAXIMIZED:
|
|
832
|
-
this.finWindow.restore(success, (err1) => console.error(err1));
|
|
833
|
-
this.windowState = WINDOWSTATE.NORMAL;
|
|
834
|
-
this.previousState = WINDOWSTATE.MAXIMIZED;
|
|
835
|
-
this.windowOptions.windowState = this.windowState;
|
|
836
|
-
this.saveCompleteWindowState(this.windowOptions);
|
|
837
|
-
break;
|
|
838
|
-
case WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED:
|
|
839
|
-
this.finWindow.restore(success, (err1) => console.error(err1));
|
|
840
|
-
break;
|
|
841
|
-
case WINDOWSTATE.NORMAL:
|
|
842
|
-
case WINDOWSTATE.TRANSITIONING:
|
|
843
|
-
// nothing to do, but we treat it as success, since sometimes docking calls restore() on a window that is already normal
|
|
844
|
-
success();
|
|
845
|
-
break;
|
|
846
|
-
default:
|
|
847
|
-
Logger.system.error("_restore default case unexpected hit", params);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* Brings a window to front
|
|
852
|
-
*
|
|
853
|
-
* @param {*} params
|
|
854
|
-
* @param {*} cb
|
|
855
|
-
*/
|
|
856
|
-
async _bringToFront(params, cb = Function.prototype) {
|
|
857
|
-
if (typeof params === "function") {
|
|
858
|
-
cb = params;
|
|
859
|
-
params = {};
|
|
860
|
-
}
|
|
861
|
-
Logger.system.debug("WebWindowWrapper._bringToFront", this.name);
|
|
862
|
-
this.callWebWindowFunction("bringToFront", null, cb);
|
|
863
|
-
}
|
|
864
|
-
_isShowing(params, cb) {
|
|
865
|
-
return new Promise((resolve) => {
|
|
866
|
-
Logger.system.debug("WebWindowWrapper._isShowing", this.name, params);
|
|
867
|
-
if (typeof params === "function") {
|
|
868
|
-
cb = params;
|
|
869
|
-
params = null;
|
|
870
|
-
}
|
|
871
|
-
if (params && (params.invokedByParent || params.saveState)) {
|
|
872
|
-
this.callWebWindowFunction("updateOptions", { autoShow: true }, () => { });
|
|
873
|
-
}
|
|
874
|
-
this.callWebWindowFunction("isShowing", null, (err, result) => {
|
|
875
|
-
cb === null || cb === void 0 ? void 0 : cb(err, result);
|
|
876
|
-
resolve({ err, data: result });
|
|
877
|
-
});
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
/**
|
|
881
|
-
* Sets the window opacity.
|
|
882
|
-
* NOTE: This function takes the opacity argument as an object
|
|
883
|
-
* instead of a value - e.g. _setOpacity({opacity: 0.8})
|
|
884
|
-
*
|
|
885
|
-
* @param params The opacity value as an object.
|
|
886
|
-
* @param cb
|
|
887
|
-
*/
|
|
888
|
-
_setOpacity(params, cb = Function.prototype) {
|
|
889
|
-
Logger.system.debug("WebWindowWrapper._setOpacity", this.name, params);
|
|
890
|
-
if (typeof params === "function") {
|
|
891
|
-
cb = params;
|
|
892
|
-
params = null;
|
|
893
|
-
}
|
|
894
|
-
this.callWebWindowFunction("updateOptions", { opacity: params.opacity, dontFireEvents: true }, () => {
|
|
895
|
-
if (cb)
|
|
896
|
-
cb();
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Sets the window to alwaysOnTop.
|
|
901
|
-
* Operates on a queue such that no alwaysOnTop or bringToFront operations
|
|
902
|
-
* happen concurrently.
|
|
903
|
-
*
|
|
904
|
-
* NOTE: This function takes the alwaysOnTop as an object
|
|
905
|
-
* instead of a value - e.g. _alwaysOnTop({alwaysOnTop: true})
|
|
906
|
-
*
|
|
907
|
-
* @param {*} param
|
|
908
|
-
* @param {*} cb Zero-argument callback.
|
|
909
|
-
*/
|
|
910
|
-
async _alwaysOnTop({ alwaysOnTop }, cb = Function.prototype) {
|
|
911
|
-
Logger.system.debug("WebWindowWrapper._alwaysOnTop", this.name, alwaysOnTop);
|
|
912
|
-
const { err, data: alwaysOnTopLevel } = await ConfigClient.getValue({
|
|
913
|
-
field: "finsemble.servicesConfig.docking.alwaysOnTopLevel",
|
|
914
|
-
});
|
|
915
|
-
if (err) {
|
|
916
|
-
Logger.system.error("Error getting config in setAlwaysOnTop:", err);
|
|
917
|
-
}
|
|
918
|
-
else if (this.windowOptions.alwaysOnTop !== alwaysOnTop) {
|
|
919
|
-
/**
|
|
920
|
-
* Electron AoT default level is "floating" (null). "floating" causes an issue where always on top hides the
|
|
921
|
-
* window behind all other windows when screen sharing. On Windows we use "normal" to avoid this problem
|
|
922
|
-
*/
|
|
923
|
-
const defaultLevel = (await isWindows()) ? "normal" : null;
|
|
924
|
-
this.callWebWindowFunction("updateOptions", { alwaysOnTop, alwaysOnTopLevel: alwaysOnTopLevel ? alwaysOnTopLevel : defaultLevel }, () => {
|
|
925
|
-
this._saveWindowOptions();
|
|
926
|
-
cb();
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
else {
|
|
930
|
-
cb();
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
setTaskbarIconGroup(taskbarIconGroup, params, cb = Function.prototype) {
|
|
934
|
-
Logger.system.debug("WebWindowWrapper.setTaskbarIconGroup", this.name, taskbarIconGroup, params);
|
|
935
|
-
if (typeof params === "function") {
|
|
936
|
-
cb = params;
|
|
937
|
-
params = null;
|
|
938
|
-
}
|
|
939
|
-
this.callWebWindowFunction("updateOptions", { taskbarIconGroup }, cb);
|
|
940
|
-
}
|
|
941
|
-
_saveWindowOptions() {
|
|
942
|
-
Logger.system.debug("WebWindowWrapper._saveWindowOptions", this.name, this.windowOptions.bounds);
|
|
943
|
-
if (this.windowOptions.name) {
|
|
944
|
-
this.saveCompleteWindowState(this.windowOptions);
|
|
945
|
-
}
|
|
946
|
-
else {
|
|
947
|
-
this.setMyOptions(() => {
|
|
948
|
-
this.saveCompleteWindowState(this.windowOptions);
|
|
949
|
-
});
|
|
950
|
-
} // only save if we have the full descriptor
|
|
951
|
-
}
|
|
952
|
-
/**
|
|
953
|
-
* Send the requested reconfiguration data down to the FEA renderer window
|
|
954
|
-
*
|
|
955
|
-
* @param {object} params
|
|
956
|
-
* @return {undefined}
|
|
957
|
-
*/
|
|
958
|
-
_setIgnoreMouseEvents(params, cb = Function.prototype) {
|
|
959
|
-
this.callWebWindowFunction("setIgnoreMouseEvents", params);
|
|
960
|
-
cb();
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
* Open a native file selection dialog on a window
|
|
964
|
-
*
|
|
965
|
-
* @param {Object} params - see https://www.electronjs.org/docs/api/dialog
|
|
966
|
-
* @return {undefined}
|
|
967
|
-
*/
|
|
968
|
-
_showNativeOpenDialog(params, cb = Function.prototype) {
|
|
969
|
-
this.callWebWindowFunction("showNativeOpenDialog", params, (err, response) => {
|
|
970
|
-
cb(err, response);
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
/**
|
|
974
|
-
* Enable/disable resizing
|
|
975
|
-
*
|
|
976
|
-
* @param {object} params
|
|
977
|
-
* @return {undefined}
|
|
978
|
-
*/
|
|
979
|
-
_setResizable(isResizeable, cb = Function.prototype) {
|
|
980
|
-
this.callWebWindowFunction("setResizable", isResizeable);
|
|
981
|
-
cb();
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* Calls setShape on part or all of window
|
|
985
|
-
*
|
|
986
|
-
* @param {object} params. Optional. Takes an array of rectangles.
|
|
987
|
-
* @return {undefined}
|
|
988
|
-
*/
|
|
989
|
-
_setShape(params, cb = Function.prototype) {
|
|
990
|
-
// Wrap the array of rectangles in an object so callWebWindowFunction does not strip out the array
|
|
991
|
-
let paramsObj = {};
|
|
992
|
-
if (Array.isArray(params)) {
|
|
993
|
-
paramsObj = { shapeArray: params };
|
|
994
|
-
}
|
|
995
|
-
this.callWebWindowFunction("setShape", paramsObj);
|
|
996
|
-
cb();
|
|
997
|
-
}
|
|
998
|
-
_setBounds(params, cb = Function.prototype) {
|
|
999
|
-
Logger.system.debug("WebWindowWrapper._setBounds", this.name, params);
|
|
1000
|
-
// if (this.name.includes("Welcome")) console.info(this.name, params.bounds);
|
|
1001
|
-
if (typeof params === "function") {
|
|
1002
|
-
cb = params;
|
|
1003
|
-
params = null;
|
|
1004
|
-
}
|
|
1005
|
-
params = params || {};
|
|
1006
|
-
const { bounds } = params;
|
|
1007
|
-
super._setBounds(params);
|
|
1008
|
-
const ofParams = [bounds.left, bounds.top, bounds.width, bounds.height];
|
|
1009
|
-
// if (!Object.keys(this.windowOptions).length || !this.windowOptions.name) bounds.persistBounds = false;
|
|
1010
|
-
this.mergeBounds(bounds);
|
|
1011
|
-
if (bounds.persistBounds !== false) {
|
|
1012
|
-
this._saveWindowOptions();
|
|
1013
|
-
}
|
|
1014
|
-
Logger.system.verbose("WebWindow.setBounds", ofParams, bounds);
|
|
1015
|
-
this.eventManager.trigger("bounds-changing", Object.assign({}, this.windowOptions.bounds));
|
|
1016
|
-
// this is to make sure we dont fire system change events when we are triggering them.
|
|
1017
|
-
this.requestedBounds = bounds;
|
|
1018
|
-
if ((bounds === null || bounds === void 0 ? void 0 : bounds.internal) !== true) {
|
|
1019
|
-
this.setBoundsFromFinsemble = true;
|
|
1020
|
-
// sometimes the OF setBounds results in no events being fired. So clear this flag just to be safe.
|
|
1021
|
-
if (this.timeout)
|
|
1022
|
-
clearTimeout(this.timeout);
|
|
1023
|
-
this.timeout = setTimeout(() => {
|
|
1024
|
-
this.setBoundsFromFinsemble = false;
|
|
1025
|
-
}, 100);
|
|
1026
|
-
this.callWebWindowFunction("setBounds", ofParams, cb);
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
_animate(animateParams, params, cb = Function.prototype) {
|
|
1030
|
-
Logger.system.debug("WebWindowWrapper.animate", this.name, animateParams, params);
|
|
1031
|
-
if (typeof params === "function") {
|
|
1032
|
-
cb = params;
|
|
1033
|
-
params = null;
|
|
1034
|
-
}
|
|
1035
|
-
this.finWindow.animate(animateParams.transitions, animateParams.options, () => {
|
|
1036
|
-
this._getBounds({}, (err, bounds) => {
|
|
1037
|
-
if (animateParams.transitions.size) {
|
|
1038
|
-
if (animateParams.transitions.size.width) {
|
|
1039
|
-
bounds.width = animateParams.transitions.size.width;
|
|
1040
|
-
bounds.right = bounds.left + bounds.width;
|
|
1041
|
-
}
|
|
1042
|
-
if (animateParams.transitions.size.height) {
|
|
1043
|
-
bounds.height = animateParams.transitions.size.height;
|
|
1044
|
-
bounds.bottom = bounds.top + bounds.height;
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
bounds.persistBounds = params.persistBounds;
|
|
1048
|
-
this._setBounds({ bounds }, cb);
|
|
1049
|
-
});
|
|
1050
|
-
}, (error) => {
|
|
1051
|
-
if (cb)
|
|
1052
|
-
cb(error);
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
getMousePosition(params, cb = Function.prototype) {
|
|
1056
|
-
if (typeof params === "function") {
|
|
1057
|
-
cb = params;
|
|
1058
|
-
params = null;
|
|
1059
|
-
}
|
|
1060
|
-
System.getMousePosition(cb);
|
|
1061
|
-
}
|
|
1062
|
-
cacheHandlerForRemoval(event, handler) {
|
|
1063
|
-
if (!this._listeners[event]) {
|
|
1064
|
-
this._listeners[event] = [];
|
|
1065
|
-
}
|
|
1066
|
-
this._listeners[event].push(handler);
|
|
1067
|
-
}
|
|
1068
|
-
_showAt(position, params, cb = Function.prototype) {
|
|
1069
|
-
Logger.system.debug("WebWindowWrapper._showAt", this.name, position, params);
|
|
1070
|
-
if (typeof params === "function") {
|
|
1071
|
-
cb = params;
|
|
1072
|
-
params = null;
|
|
1073
|
-
}
|
|
1074
|
-
this.callWebWindowFunction("showAt", [position.left, position.top, position.force], cb);
|
|
1075
|
-
}
|
|
1076
|
-
throwFailedCloseNotification(failureMessage) {
|
|
1077
|
-
toast("dev", "ONCE-SINCE-STARTUP", "Window close timed out", failureMessage);
|
|
1078
|
-
}
|
|
1079
|
-
_blur(params = {}, cb = Function.prototype) {
|
|
1080
|
-
Logger.system.debug("WebWindowWrapper._blur", this.name, params);
|
|
1081
|
-
this.focused = false;
|
|
1082
|
-
this.callWebWindowFunction("blur", null, cb);
|
|
1083
|
-
}
|
|
1084
|
-
_focus(params = {}, cb = Function.prototype) {
|
|
1085
|
-
Logger.system.debug("WebWindowWrapper._focus", this.name, params);
|
|
1086
|
-
this.focused = true;
|
|
1087
|
-
this.callWebWindowFunction("focus", null, cb);
|
|
1088
|
-
}
|
|
1089
|
-
// Invoked when out-of-bounds closes are detected. This might be an alt+f4, a close from the task bar, etc.
|
|
1090
|
-
// Only happens when electron emits a closed event for the window. When we close our windows, we suppress that event.
|
|
1091
|
-
_systemClosed(params = {}, cb = Function.prototype) {
|
|
1092
|
-
// ignore if already closing
|
|
1093
|
-
if (this.wrapState === "closing") {
|
|
1094
|
-
cb();
|
|
1095
|
-
return;
|
|
1096
|
-
}
|
|
1097
|
-
// If we're closing, we shouldn't call focus/btf/update_options, etc.
|
|
1098
|
-
this.closing = true;
|
|
1099
|
-
const closeParams = {
|
|
1100
|
-
fromSystem: true,
|
|
1101
|
-
removeFromWorkspace: true,
|
|
1102
|
-
};
|
|
1103
|
-
Logger.system.debug("WebWindowWrapper.system closed", this.name, params);
|
|
1104
|
-
super.close(closeParams, async () => {
|
|
1105
|
-
cb();
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
_close(params = {}, cb) {
|
|
1109
|
-
return new Promise(async (resolve) => {
|
|
1110
|
-
// merging all params because otherwise the params dont pass properly and remove from workspace fails
|
|
1111
|
-
this.removeEventListener("system-closed", this._systemClosed);
|
|
1112
|
-
Logger.system.debug("WebWindowWrapper._close", this.name, params);
|
|
1113
|
-
if (typeof params === "function") {
|
|
1114
|
-
cb = params;
|
|
1115
|
-
params = {};
|
|
1116
|
-
}
|
|
1117
|
-
// When we receive a close command, we first pass the command to the parent window. The parent window may decide to supersede. In its response, it will then set the flag "shouldContinue" to false if we shouldn't actually perform the close function.
|
|
1118
|
-
const { err, data } = await super._close(params);
|
|
1119
|
-
if (data === null || data === void 0 ? void 0 : data.shouldContinue) {
|
|
1120
|
-
if (params.fromSystem) {
|
|
1121
|
-
// Just call the callback - window is destroyed already because the system closed it
|
|
1122
|
-
cb === null || cb === void 0 ? void 0 : cb(null, data);
|
|
1123
|
-
resolve({ data });
|
|
1124
|
-
}
|
|
1125
|
-
else {
|
|
1126
|
-
this.finWindow.close(true, () => {
|
|
1127
|
-
cb === null || cb === void 0 ? void 0 : cb(null, data);
|
|
1128
|
-
resolve({ data });
|
|
1129
|
-
}, (err1) => {
|
|
1130
|
-
if (!params.suppressError) {
|
|
1131
|
-
Logger.system.error("ERROR CLOSING WINDOW", err1);
|
|
1132
|
-
}
|
|
1133
|
-
cb === null || cb === void 0 ? void 0 : cb(null, data);
|
|
1134
|
-
resolve({ data });
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
RouterClient.transmit(`${this.windowIdentifier.windowName}.close`, params, { suppressWarnings: true });
|
|
1138
|
-
}
|
|
1139
|
-
else {
|
|
1140
|
-
cb === null || cb === void 0 ? void 0 : cb(err);
|
|
1141
|
-
resolve({ err });
|
|
1142
|
-
}
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
// Called on destruct so that we don't leave trash in the router or on the window.
|
|
1146
|
-
removeListeners() {
|
|
1147
|
-
const channels = Object.keys(this.RouterHandlers);
|
|
1148
|
-
Logger.system.debug("WRAP Removing Listeners", channels);
|
|
1149
|
-
for (const key in channels) {
|
|
1150
|
-
RouterClient.removeListener(key, this.RouterHandlers[key]);
|
|
1151
|
-
}
|
|
1152
|
-
// These are listeners added directly to the wrapped window.
|
|
1153
|
-
const events = Object.keys(this._listeners);
|
|
1154
|
-
if (events.length) {
|
|
1155
|
-
events.forEach((eventName) => {
|
|
1156
|
-
this._listeners[eventName].forEach((handler) => {
|
|
1157
|
-
this.removeEventListener(eventName, handler);
|
|
1158
|
-
});
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
// Remove all specialty listeners added to the window
|
|
1162
|
-
for (const event in this.addedSystemListeners) {
|
|
1163
|
-
this.finWindow.removeEventListener(event, this.addedSystemListeners[event]);
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
export default WebWindow;
|
|
1168
|
-
//# sourceMappingURL=WebWindowWrapper.js.map
|