@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,1347 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { RouterClient } from "../../../../clients/routerClient";
|
|
3
|
-
import { ConfigClient } from "../../../../clients/configClient";
|
|
4
|
-
import { Logger } from "../../../../clients/logger";
|
|
5
|
-
import { isEqualIgnoringArrayOrder } from "../../../../common/util";
|
|
6
|
-
import * as util from "../../../../common/util";
|
|
7
|
-
import PrivateEventManager from "../../../../common/events/PrivateEventManager";
|
|
8
|
-
import * as constants from "../../../../common/constants";
|
|
9
|
-
import { System } from "../../../../common/system";
|
|
10
|
-
import { WORKSPACE } from "../../../../common/constants";
|
|
11
|
-
import { DistributedStoreClient } from "../../../../clients/distributedStoreClient";
|
|
12
|
-
import { StorageClient } from "../../../../clients/storageClient";
|
|
13
|
-
import { setWindowState } from "../../../../clients/workspaceClient";
|
|
14
|
-
import uuidv4 from "uuid-random";
|
|
15
|
-
import merge from "deepmerge";
|
|
16
|
-
import clone from "lodash/cloneDeep";
|
|
17
|
-
import { toPath } from "lodash";
|
|
18
|
-
// The store name for the distributed store which tracks tab titles
|
|
19
|
-
const WINDOW_TAB_TITLE_STORE = "window-tab-title";
|
|
20
|
-
/**
|
|
21
|
-
* Gets the store which tracks the tab title for a windowName. This is a distributed store shared by all components.
|
|
22
|
-
*
|
|
23
|
-
* @returns a Promise which resolves the StoreModel associated with window and tab names
|
|
24
|
-
*/
|
|
25
|
-
const getWindowTabNameStore = async () => {
|
|
26
|
-
let { data: store } = await DistributedStoreClient.createGlobalStore({ store: WINDOW_TAB_TITLE_STORE });
|
|
27
|
-
return store;
|
|
28
|
-
};
|
|
29
|
-
export class BaseWindow {
|
|
30
|
-
constructor(params) {
|
|
31
|
-
this.name = "Unknown window";
|
|
32
|
-
this.windowName = "Unknown window";
|
|
33
|
-
this.eventlistenerHandlerMap = {};
|
|
34
|
-
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
35
|
-
// Handlers to generate wrapper events from incoming transmits
|
|
36
|
-
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
37
|
-
this.handleWrapStateChange = (error, response) => {
|
|
38
|
-
const { state } = response.data;
|
|
39
|
-
// closed gets emitted from the window. we don't want to emit a window closed event because the wrap state changed to closed.
|
|
40
|
-
if (state && state !== this.wrapState && state !== "closed") {
|
|
41
|
-
this.wrapState = state;
|
|
42
|
-
this.eventManager.trigger(state);
|
|
43
|
-
this.eventManager.trigger("wrap-state-changed", { state });
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
this.types = {};
|
|
47
|
-
this.guid = uuidv4();
|
|
48
|
-
this.wrapState = "initializing";
|
|
49
|
-
this.componentState = {};
|
|
50
|
-
this.windowState = BaseWindow.WINDOWSTATE.NORMAL;
|
|
51
|
-
this.type = null;
|
|
52
|
-
this.windowType = null;
|
|
53
|
-
this.windowOptions = {};
|
|
54
|
-
this.bounds = {};
|
|
55
|
-
this.name;
|
|
56
|
-
this.enableWindowsAeroSnap = false;
|
|
57
|
-
// because we were doing this[i]=params[i] in the constructor jscrambler was creating a reference to "this" above _super_, causing everything to break and it made me cry.
|
|
58
|
-
this.doConstruction(params);
|
|
59
|
-
this.TITLE_CHANGED_CHANNEL = `Finsemble.${this.name}.titleChanged`;
|
|
60
|
-
this.componentKey = util.camelCase("activeWorkspace", this.name, this.name);
|
|
61
|
-
this.windowKey = util.camelCase("activeWorkspace", this.name);
|
|
62
|
-
BaseWindow.bindFunctions(this);
|
|
63
|
-
this.wrapStateChangeSubscription = RouterClient.subscribe(`Finsemble.Component.State.${this.name}`, this.handleWrapStateChange);
|
|
64
|
-
this.eventManager = new PrivateEventManager({
|
|
65
|
-
name: this.name,
|
|
66
|
-
sourceType: "Window",
|
|
67
|
-
});
|
|
68
|
-
this.finishedMove = true;
|
|
69
|
-
this.oldState = {};
|
|
70
|
-
}
|
|
71
|
-
windowServiceChannelName(channelTopic) {
|
|
72
|
-
return `WindowService-Request-${channelTopic}`;
|
|
73
|
-
}
|
|
74
|
-
eventChannelName(channelTopic) {
|
|
75
|
-
const name = this.name || this.windowName;
|
|
76
|
-
return `WindowService-Event-${name}-${channelTopic}`;
|
|
77
|
-
}
|
|
78
|
-
_startMove(changeType = 0) {
|
|
79
|
-
window.aeroMode = false;
|
|
80
|
-
if (changeType === 0) {
|
|
81
|
-
this.finishedMove = false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
_stopMove() {
|
|
85
|
-
this.finishedMove = true;
|
|
86
|
-
}
|
|
87
|
-
doConstruction(params) {
|
|
88
|
-
if (!params.setWindowType && !params.windowType) {
|
|
89
|
-
// Default WindowType
|
|
90
|
-
params.windowType = "WebWindow";
|
|
91
|
-
}
|
|
92
|
-
if (params.windowType) {
|
|
93
|
-
// We need to make a specific kind of Window
|
|
94
|
-
params.setWindowType = params.windowType;
|
|
95
|
-
delete params.windowType; // Prevent infinite loop
|
|
96
|
-
const BW = BaseWindow; // have to do this because we're mutating the class using static functions and all kinds of bad stuff. This tells the typescript compiler that the BaseWindow here is of type any -- basically don't worry about its type.
|
|
97
|
-
return new BW.types[params.setWindowType](params);
|
|
98
|
-
} // We are a specific kind of window
|
|
99
|
-
if (params) {
|
|
100
|
-
for (const i in params) {
|
|
101
|
-
this[i] = params[i];
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (!this.name)
|
|
105
|
-
this.name = params.windowName;
|
|
106
|
-
this.windowType = this.setWindowType;
|
|
107
|
-
}
|
|
108
|
-
static registerType(name, type /*typeof import("../WindowAbstractions/WebWindowWrapper").default */) {
|
|
109
|
-
const BW = BaseWindow; // have to do this because we're mutating the class using static functions and all kinds of bad stuff. This tells the typescript compiler that the BaseWindow here is of type any -- basically don't worry about its type.
|
|
110
|
-
if (!BW.types) {
|
|
111
|
-
BW.types = {};
|
|
112
|
-
}
|
|
113
|
-
BW.types[name] = type;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* This is used to bind all functions only in BaseWindow and not in the child wrappers to the wrappers. Without this binding, the value of "this" in the functions is wrong.
|
|
117
|
-
* @param {} obj
|
|
118
|
-
*/
|
|
119
|
-
static bindFunctions(obj) {
|
|
120
|
-
obj.setParent = obj.setParent.bind(obj);
|
|
121
|
-
obj.getParent = obj.getParent.bind(obj);
|
|
122
|
-
obj.eventChannelName = obj.eventChannelName.bind(obj);
|
|
123
|
-
obj.windowServiceChannelName = obj.windowServiceChannelName.bind(obj);
|
|
124
|
-
obj.setupListeners = obj.setupListeners.bind(obj);
|
|
125
|
-
obj.onTitleChanged = obj.onTitleChanged.bind(obj);
|
|
126
|
-
obj.handleWrapRemoveRequest = obj.handleWrapRemoveRequest.bind(obj);
|
|
127
|
-
}
|
|
128
|
-
// set up this window's listeners
|
|
129
|
-
setupListeners(name) {
|
|
130
|
-
Logger.system.debug("BaseWindow parent change notification setup", name);
|
|
131
|
-
this.parentSubscribeID = RouterClient.subscribe(`Finsemble.parentChange.${name}`, (err, message) => {
|
|
132
|
-
if (err) {
|
|
133
|
-
Logger.system.error("BaseWindow parent change notification error", err);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
const parentState = message.data || {};
|
|
137
|
-
if (parentState.type == "Added") {
|
|
138
|
-
Logger.system.debug("BaseWindow Parent Notification: window.addedToStack listener", parentState);
|
|
139
|
-
this.setParent(parentState.stackedWindowIdentifier);
|
|
140
|
-
}
|
|
141
|
-
else if (parentState.type == "Removed") {
|
|
142
|
-
Logger.system.debug("BaseWindow Parent Notification: window.removedFromStack listener", parentState);
|
|
143
|
-
this.clearParent();
|
|
144
|
-
}
|
|
145
|
-
else if (parentState.type === "Exists") {
|
|
146
|
-
// Do nothing
|
|
147
|
-
}
|
|
148
|
-
else if (parentState.type) {
|
|
149
|
-
// if defined but unknown type
|
|
150
|
-
Logger.system.error("BaseWindow Parent Notification: unknown type", parentState);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
this.TITLE_CHANGED_SUBSCRIPTION = RouterClient.subscribe(this.TITLE_CHANGED_CHANNEL, this.onTitleChanged);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Event handler which is invoked when the title for a window changes.
|
|
158
|
-
*
|
|
159
|
-
* Title change events look like:
|
|
160
|
-
* title: string - the new title
|
|
161
|
-
* windowName: string - the name of the window which changed
|
|
162
|
-
*
|
|
163
|
-
* @param error the error from the event
|
|
164
|
-
* @param response the event response
|
|
165
|
-
*/
|
|
166
|
-
async onTitleChanged(error, response) {
|
|
167
|
-
var _b, _c, _d;
|
|
168
|
-
if (typeof ((_b = response.data) === null || _b === void 0 ? void 0 : _b.title) !== "string" && typeof response.data.title !== "number") {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
if (this._updateOptions) {
|
|
172
|
-
this._updateOptions({ title: response.data.title });
|
|
173
|
-
}
|
|
174
|
-
// The window/tab store should be updated (in order to keep tab titles up to date)
|
|
175
|
-
if (((_c = response.data) === null || _c === void 0 ? void 0 : _c.windowName) && ((_d = response.data) === null || _d === void 0 ? void 0 : _d.title)) {
|
|
176
|
-
Logger.debug(`Component window "${response.data.windowName}" is changing title to "${response.data.title}"`);
|
|
177
|
-
// Setting the store value is asynchronous
|
|
178
|
-
try {
|
|
179
|
-
// Get the store for window/tab names
|
|
180
|
-
const store = await getWindowTabNameStore();
|
|
181
|
-
if (!store) {
|
|
182
|
-
// This is not critical, but tab titles may be stale
|
|
183
|
-
Logger.warn("Error setting tab title: the store was not found");
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
// Setting the store value will trigger listeners (tab title components)
|
|
187
|
-
await store.set(toPath(response.data.windowName), response.data.title);
|
|
188
|
-
}
|
|
189
|
-
catch (err) {
|
|
190
|
-
// This is unfortunate but not critical; when an error is reached here the WORST CASE is that a tab will render with the not-current title
|
|
191
|
-
Logger.system.warn(`Error saving window "${response.data.windowName}" tab name "${response.data.title}" to store "${WINDOW_TAB_TITLE_STORE}"`, err);
|
|
192
|
-
}
|
|
193
|
-
finally {
|
|
194
|
-
// Although this is not used within the core code to manage titles, this is a "public" event that must be triggered
|
|
195
|
-
this.eventManager.trigger("title-changed", {
|
|
196
|
-
name: this.name,
|
|
197
|
-
title: response.data.title,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
static async getInstanceStandardized(params) {
|
|
203
|
-
try {
|
|
204
|
-
const result = await BaseWindow.getInstance(params);
|
|
205
|
-
return { data: result.wrap };
|
|
206
|
-
}
|
|
207
|
-
catch (err) {
|
|
208
|
-
return { err };
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
static getInstance(params, cb) {
|
|
212
|
-
return new Promise(async (resolve, reject) => {
|
|
213
|
-
var _b, _c;
|
|
214
|
-
const myName = System.Window.getCurrent().name;
|
|
215
|
-
const name = (_b = params === null || params === void 0 ? void 0 : params.name) !== null && _b !== void 0 ? _b : params === null || params === void 0 ? void 0 : params.windowName;
|
|
216
|
-
const { waitForReady, uuid, windowType } = params;
|
|
217
|
-
if (!name) {
|
|
218
|
-
const error = `"name" is a required parameter`;
|
|
219
|
-
cb === null || cb === void 0 ? void 0 : cb(error);
|
|
220
|
-
reject(error);
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
params.windowName = name; // just in case
|
|
224
|
-
if (waitForReady !== false) {
|
|
225
|
-
Logger.system.debug("WRAP LIFECYCLE:WAIT FOR READY", name);
|
|
226
|
-
await BaseWindow._windowReady(name); // wait to insure the window is fully ready in the window service
|
|
227
|
-
Logger.system.debug("WRAP LIFECYCLE:WAIT DONE -- READY", name);
|
|
228
|
-
}
|
|
229
|
-
// Return early if we already have the wrap cached.
|
|
230
|
-
if (BaseWindow.cache[name]) {
|
|
231
|
-
Logger.system.debug("WRAP LIFECYCLE:", name, "Window found in the cache, returning without going to the Launcher");
|
|
232
|
-
const wrap = BaseWindow.cache[name];
|
|
233
|
-
resolve({ wrap });
|
|
234
|
-
cb === null || cb === void 0 ? void 0 : cb(null, wrap);
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
// If we already have all of the information, just call createWrap.
|
|
238
|
-
if (uuid && name) {
|
|
239
|
-
const windowIdentifier = {
|
|
240
|
-
uuid,
|
|
241
|
-
name,
|
|
242
|
-
windowName: name,
|
|
243
|
-
windowType,
|
|
244
|
-
};
|
|
245
|
-
Logger.system.debug("WRAP LIFECYCLE:", name, "All information for wrap passed in, creating wrap locally");
|
|
246
|
-
const { wrap } = await BaseWindow._createWrap(Object.assign(Object.assign({}, params), { windowIdentifier: (_c = params.windowIdentifier) !== null && _c !== void 0 ? _c : windowIdentifier }));
|
|
247
|
-
resolve({ wrap });
|
|
248
|
-
cb === null || cb === void 0 ? void 0 : cb(null, wrap);
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
const wrapFromServer = async (err, response) => {
|
|
252
|
-
var _b;
|
|
253
|
-
if (err || !response.data) {
|
|
254
|
-
Logger.system.error(err);
|
|
255
|
-
reject(err);
|
|
256
|
-
cb === null || cb === void 0 ? void 0 : cb(err);
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
if (BaseWindow.cache[name]) {
|
|
260
|
-
const wrap = BaseWindow.cache[name];
|
|
261
|
-
Logger.system.debug("WRAP LIFECYCLE:", name, "Information received from launcher, but wrap exists in cache. Returning cached wrap.");
|
|
262
|
-
resolve({ wrap });
|
|
263
|
-
cb === null || cb === void 0 ? void 0 : cb(null, wrap);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const { identifier } = response.data;
|
|
267
|
-
Logger.system.debug("WRAP LIFECYCLE:", name, "Information received from launcher. Creating wrap.");
|
|
268
|
-
const { wrap } = await BaseWindow._createWrap(Object.assign(Object.assign({}, params), { retrievedIdentifier: Object.assign(Object.assign({}, identifier), { name: (_b = identifier.windowName) !== null && _b !== void 0 ? _b : identifier.name }) }));
|
|
269
|
-
resolve({ wrap });
|
|
270
|
-
cb === null || cb === void 0 ? void 0 : cb(null, wrap);
|
|
271
|
-
};
|
|
272
|
-
// All we have is a windowName. we send a request to the launcher for more information so that we can construct the proper object. This also the place where
|
|
273
|
-
RouterClient.query("WindowService-Request-getWindowIdentifier", { windowName: params.name, requester: myName }, wrapFromServer);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
static _createWrap(params) {
|
|
277
|
-
return new Promise((resolve) => {
|
|
278
|
-
const identifier = params.retrievedIdentifier || params.windowIdentifier;
|
|
279
|
-
// Top level keeps important info (e.g., uuid, name, windowType).
|
|
280
|
-
let paramsForWindow = Object.assign({}, identifier);
|
|
281
|
-
if ((!params.setWindowType && !identifier.windowType) || identifier.windowType === "WebApplication") {
|
|
282
|
-
// Default WindowType
|
|
283
|
-
identifier.windowType = "WebWindow";
|
|
284
|
-
}
|
|
285
|
-
// Also pull in anything that was passed into the constructor (e.g., windowDescriptor, etc);
|
|
286
|
-
paramsForWindow = Object.assign(paramsForWindow, params);
|
|
287
|
-
paramsForWindow = Object.assign(paramsForWindow, identifier);
|
|
288
|
-
paramsForWindow.setWindowType = paramsForWindow.windowType;
|
|
289
|
-
delete paramsForWindow.windowType; // Prevent infinite loop
|
|
290
|
-
Logger.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.", identifier.windowName);
|
|
291
|
-
const BW = BaseWindow; // have to do this because we're mutating the class using static functions.
|
|
292
|
-
if (BaseWindow.cache.hasOwnProperty(identifier.windowName)) {
|
|
293
|
-
Logger.system.error("DUPLICATE WRAPPER for", identifier.windowName);
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
BaseWindow.cache[identifier.windowName] = new BW.types[paramsForWindow.setWindowType](paramsForWindow);
|
|
297
|
-
}
|
|
298
|
-
let wrap = BaseWindow.cache[identifier.windowName];
|
|
299
|
-
wrap.windowType = identifier.windowType;
|
|
300
|
-
wrap.identifier = identifier;
|
|
301
|
-
wrap.setupListeners(identifier.windowName);
|
|
302
|
-
resolve({ wrap });
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
static _getRemoveWrapChannel(name) {
|
|
306
|
-
return `${System.Window.getCurrent().name}.removeWrap.${name}`;
|
|
307
|
-
}
|
|
308
|
-
handleWrapRemoveRequest() {
|
|
309
|
-
// wrap is the Web or stacked window. if the removeListeners function exists, we remove all listeners we added during the lifecycle of that window wrapper.
|
|
310
|
-
if (this.removeListeners) {
|
|
311
|
-
this.removeListeners();
|
|
312
|
-
}
|
|
313
|
-
this.eventManager.cleanup();
|
|
314
|
-
for (const event in this.eventlistenerHandlerMap) {
|
|
315
|
-
for (let i = 0; i < this.eventlistenerHandlerMap[event].length; i++) {
|
|
316
|
-
this.eventlistenerHandlerMap[event][i].interceptor.removeAllListeners();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
this.eventManager.cleanup();
|
|
320
|
-
Logger.system.debug("WRAP CLOSE. Deleting cached wrap.");
|
|
321
|
-
delete BaseWindow.cache[this.name];
|
|
322
|
-
this.cleanupRouter();
|
|
323
|
-
}
|
|
324
|
-
cleanupRouter() {
|
|
325
|
-
const REMOVE_WRAP_CHANNEL = BaseWindow._getRemoveWrapChannel(this.name);
|
|
326
|
-
RouterClient.removeResponder(REMOVE_WRAP_CHANNEL);
|
|
327
|
-
if (this.TITLE_CHANGED_SUBSCRIPTION) {
|
|
328
|
-
RouterClient.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION);
|
|
329
|
-
}
|
|
330
|
-
RouterClient.unsubscribe(this.wrapStateChangeSubscription);
|
|
331
|
-
}
|
|
332
|
-
onReady(cb) {
|
|
333
|
-
return new Promise((resolve) => {
|
|
334
|
-
if (this.wrapState === "ready") {
|
|
335
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
336
|
-
resolve();
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
this.addEventListener("ready", () => {
|
|
340
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
341
|
-
resolve();
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
347
|
-
// Common template for window-function requests to window service -- see public functions
|
|
348
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
349
|
-
/**
|
|
350
|
-
* @param {string} methodName method name (e.g. "minimize", "maximize")
|
|
351
|
-
* @param {object} params
|
|
352
|
-
* @param {function=} callback
|
|
353
|
-
* @memberof FinsembleWindow
|
|
354
|
-
* @private
|
|
355
|
-
*/
|
|
356
|
-
queryWindowService(methodName, params, callback = Function.prototype) {
|
|
357
|
-
if (typeof params === "function") {
|
|
358
|
-
callback = params;
|
|
359
|
-
params = {};
|
|
360
|
-
}
|
|
361
|
-
params = params || {};
|
|
362
|
-
params.windowIdentifier = this.identifier; // add this window's identifier
|
|
363
|
-
Logger.system.debug("FinsembleWindow.queryWindowService", this.windowServiceChannelName(methodName), params);
|
|
364
|
-
console.debug("FinsembleWindow.queryWindowService", this, this.windowServiceChannelName(methodName), params);
|
|
365
|
-
let responseData = null;
|
|
366
|
-
RouterClient.query(this.windowServiceChannelName(methodName), params, (err, queryResponseMessage) => {
|
|
367
|
-
if (err) {
|
|
368
|
-
Logger.system.warn(`WindowService.${methodName}: failed`, err);
|
|
369
|
-
console.debug(`WindowService.${methodName}: failed`, err);
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
responseData = queryResponseMessage.data;
|
|
373
|
-
Logger.system.debug(`${this.windowServiceChannelName(methodName)} successful`, responseData);
|
|
374
|
-
console.debug(`${this.windowServiceChannelName(methodName)} successful`, responseData);
|
|
375
|
-
}
|
|
376
|
-
if (callback)
|
|
377
|
-
callback(err, responseData);
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
381
|
-
// Core Window Functions: can be invoked by any service or component. Most are sent to the WindowService to be executed.
|
|
382
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
383
|
-
addEventListener(eventName, handler) {
|
|
384
|
-
this.eventManager.addEventListener(eventName, handler);
|
|
385
|
-
}
|
|
386
|
-
removeEventListener(eventName, handler) {
|
|
387
|
-
return this.eventManager.removeEventListener(eventName, handler);
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
*Register a window with docking. Use this if you don't want to use the full initialization function
|
|
391
|
-
*
|
|
392
|
-
* @param {Object} params - can be anything that is passed to docking for window registration.
|
|
393
|
-
* @param {Function} cb
|
|
394
|
-
* @memberof FSBLWindow
|
|
395
|
-
*/
|
|
396
|
-
registerWithDocking(params, cb) {
|
|
397
|
-
RouterClient.query("DockingService.registerWindow", {
|
|
398
|
-
type: this.type,
|
|
399
|
-
windowType: this.windowType,
|
|
400
|
-
windowMsg: params,
|
|
401
|
-
name: this.windowName,
|
|
402
|
-
}, cb);
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
*Unregister a window with docking
|
|
406
|
-
*
|
|
407
|
-
* @memberof FSBLWindow
|
|
408
|
-
*/
|
|
409
|
-
unRegisterWithDocking() {
|
|
410
|
-
RouterClient.transmit("DockingService.deregisterWindow", {
|
|
411
|
-
name: this.windowName,
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
*This is if we want to handle the full register/ready state inside of the window
|
|
416
|
-
register with docking
|
|
417
|
-
send the message to launcher saying that component is ready
|
|
418
|
-
*
|
|
419
|
-
* @memberof FSBLWindow
|
|
420
|
-
*/
|
|
421
|
-
initializeWindow(params) {
|
|
422
|
-
this.registerWithDocking(params, () => {
|
|
423
|
-
RouterClient.publish(`Finsemble.${this.windowName}.componentReady`, {
|
|
424
|
-
// signal workspace and launcher service that component is ready
|
|
425
|
-
name: this.windowName,
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
wrapReady() {
|
|
430
|
-
RouterClient.publish(`Finsemble.${this.windowName}.wrapReady`, {
|
|
431
|
-
name: this.windowName,
|
|
432
|
-
state: "open",
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
436
|
-
// Core Private Window Functions: generally should only be directly invoked by the WindowService (an exception is _close)
|
|
437
|
-
// Note: These private window functions can also optionally be invoked from the derived class definition. See WebWindowWrapper _minimize for example.
|
|
438
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
439
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
440
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
441
|
-
_minimize(params, cb = Function.prototype) {
|
|
442
|
-
Logger.system.debug("BaseWindow._minimize", params);
|
|
443
|
-
params = params || {};
|
|
444
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
445
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
446
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
447
|
-
this.parentWindow._minimize(params, (err, result) => {
|
|
448
|
-
Logger.system.debug("BaseWindow._minimize parent", result);
|
|
449
|
-
cb(err, { shouldContinue: false });
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
cb(null, { shouldContinue: true });
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
457
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
458
|
-
_maximize(params, cb = Function.prototype) {
|
|
459
|
-
Logger.system.debug("BaseWindow._maximize", params);
|
|
460
|
-
cb(null, { shouldContinue: true });
|
|
461
|
-
}
|
|
462
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
463
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
464
|
-
_restore(params, cb) {
|
|
465
|
-
return new Promise((resolve) => {
|
|
466
|
-
Logger.system.debug("BaseWindow._restore", params);
|
|
467
|
-
params = params || {};
|
|
468
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
469
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
470
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
471
|
-
this.parentWindow._restore(params, (err, result) => {
|
|
472
|
-
Logger.system.debug("BaseWindow._restore parent", result);
|
|
473
|
-
cb === null || cb === void 0 ? void 0 : cb(err, { shouldContinue: false });
|
|
474
|
-
resolve({ err, data: { shouldContinue: false } });
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
|
|
479
|
-
resolve({ data: { shouldContinue: true } });
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
_blur(params, cb = Function.prototype) {
|
|
484
|
-
Logger.system.debug("BaseWindow._blur", params);
|
|
485
|
-
params = params || {};
|
|
486
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
487
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
488
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
489
|
-
this.parentWindow._blur(params, (err, result) => {
|
|
490
|
-
Logger.system.debug("BaseWindow._blur parent", result);
|
|
491
|
-
cb(err, { shouldContinue: false });
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
cb(null, { shouldContinue: true });
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
499
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
500
|
-
_focus(params, cb = Function.prototype) {
|
|
501
|
-
Logger.system.debug("BaseWindow._focus", params);
|
|
502
|
-
params = params || {};
|
|
503
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
504
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
505
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
506
|
-
this.parentWindow._focus(params, (err, result) => {
|
|
507
|
-
Logger.system.debug("BaseWindow._focus parent", result);
|
|
508
|
-
cb(err, { shouldContinue: false });
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
cb(null, { shouldContinue: true });
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
516
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
517
|
-
_bringToFront(params, cb = Function.prototype) {
|
|
518
|
-
Logger.system.debug("BaseWindow._bringToFront", params);
|
|
519
|
-
params = params || {};
|
|
520
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
521
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
522
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
523
|
-
this.parentWindow._bringToFront(params, (err, result) => {
|
|
524
|
-
Logger.system.debug("BaseWindow._bringToFront parent", result);
|
|
525
|
-
cb(err, { shouldContinue: false });
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
else {
|
|
529
|
-
cb(null, { shouldContinue: true });
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
533
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
534
|
-
_isShowing(params, cb = Function.prototype) {
|
|
535
|
-
Logger.system.debug("BaseWindow._isShowing", params);
|
|
536
|
-
params = params || {};
|
|
537
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
538
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
539
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
540
|
-
this.parentWindow._isShowing(params, (err, result) => {
|
|
541
|
-
Logger.system.debug("BaseWindow._isShowing parent", result);
|
|
542
|
-
cb(err, { shouldContinue: false });
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
else {
|
|
546
|
-
cb(null, { shouldContinue: true });
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
disableFrame(cb) {
|
|
550
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
551
|
-
}
|
|
552
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
553
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
554
|
-
_setBounds(params, cb = Function.prototype) {
|
|
555
|
-
Logger.system.verbose("BaseWindow._setBounds", params);
|
|
556
|
-
params = params || {};
|
|
557
|
-
const { bounds } = params;
|
|
558
|
-
this.mergeBounds(bounds); // This happens twice...remove this
|
|
559
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
560
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
561
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
562
|
-
this.parentWindow._setBounds(params, (err, result) => {
|
|
563
|
-
Logger.system.verbose("BaseWindow._setBounds parent", result);
|
|
564
|
-
cb(err, { shouldContinue: false });
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
else {
|
|
568
|
-
cb(null, { shouldContinue: true });
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
572
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
573
|
-
// First parameter, "params" is pass-by-references (its values can change)
|
|
574
|
-
_getBounds(params, cb) {
|
|
575
|
-
return new Promise((resolve) => {
|
|
576
|
-
Logger.system.verbose("BaseWindow._getBounds", params);
|
|
577
|
-
params = params || {};
|
|
578
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
579
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
580
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
581
|
-
this.parentWindow._getBounds(params, (err, bounds) => {
|
|
582
|
-
Logger.system.verbose("BaseWindow._getBounds parent", bounds);
|
|
583
|
-
cb(err, bounds); // shouldContinue not defined in return value, but implicitly false
|
|
584
|
-
resolve({ err, data: bounds });
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
else {
|
|
588
|
-
cb(null, { shouldContinue: true }); // if should continue, bounds will be calculated by derived class
|
|
589
|
-
resolve({ data: { shouldContinue: true } });
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
// Private base window function optionally invoked by derived class (e.g. FinsembleNativeWindow). All base function follow same template.
|
|
594
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
595
|
-
_getBoundsFromSystem(params, cb) {
|
|
596
|
-
Logger.system.debug("BaseWindow._getBoundsFromSystem", params);
|
|
597
|
-
params = params || {};
|
|
598
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
599
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
600
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
601
|
-
this.parentWindow._getBoundsFromSystem(params, (err, bounds) => {
|
|
602
|
-
Logger.system.verbose("BaseWindow._getBoundsFromSystem parent", bounds);
|
|
603
|
-
cb(err, bounds); // shouldContinue not defined in return value, but implicitly false
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
else {
|
|
607
|
-
cb(null, { shouldContinue: true }); // if should continue, bounds will be calculated by derived class
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
611
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
612
|
-
_updateOptions(params, cb = Function.prototype) {
|
|
613
|
-
// @todo: Couldn't get title to update when calling `finsembleWindow.updateOptions({title: "Hello World"})` on a random window. Is title really supported here?
|
|
614
|
-
Logger.system.debug("BaseWindow._updateOptions", params);
|
|
615
|
-
params = params || {};
|
|
616
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
617
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
618
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
619
|
-
this.parentWindow._updateOptions(params, (err, result) => {
|
|
620
|
-
Logger.system.debug("BaseWindow._updateOptions parent", result);
|
|
621
|
-
cb(err, { shouldContinue: false });
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
cb(null, { shouldContinue: true });
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
629
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
630
|
-
_hide(params, cb = Function.prototype) {
|
|
631
|
-
// Note: passed-through params.windowIdentifier is either not used or overwritten. Passing through the value will cause it to be dropped if not side-effect'd.
|
|
632
|
-
Logger.system.debug("BaseWindow._hide", params);
|
|
633
|
-
params = params || {};
|
|
634
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
635
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
636
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
637
|
-
this.parentWindow._hide(params, (err, result) => {
|
|
638
|
-
Logger.system.debug("BaseWindow._hide parent", result);
|
|
639
|
-
cb(err, { shouldContinue: false });
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
cb(null, { shouldContinue: true });
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
647
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
648
|
-
async _show(params, cb) {
|
|
649
|
-
Logger.system.debug("BaseWindow._show", params);
|
|
650
|
-
params = params || {};
|
|
651
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
652
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
653
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
654
|
-
const { err, data } = await this.parentWindow._show(params);
|
|
655
|
-
Logger.system.debug("BaseWindow._show parent", data);
|
|
656
|
-
cb === null || cb === void 0 ? void 0 : cb(err, { shouldContinue: false });
|
|
657
|
-
return { err, data: { shouldContinue: false } };
|
|
658
|
-
}
|
|
659
|
-
else {
|
|
660
|
-
cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
|
|
661
|
-
return { data: { shouldContinue: true } };
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
_showAt(params, cb = Function.prototype) {
|
|
665
|
-
Logger.system.debug("BaseWindow._showAt", params);
|
|
666
|
-
params = params || {};
|
|
667
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
668
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
669
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
670
|
-
this.parentWindow._showAt(params, (err, result) => {
|
|
671
|
-
Logger.system.debug("BaseWindow._showAt parent", result);
|
|
672
|
-
cb(err, { shouldContinue: false });
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
else {
|
|
676
|
-
cb(null, { shouldContinue: true });
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
680
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
681
|
-
/**
|
|
682
|
-
* Close
|
|
683
|
-
* @param params
|
|
684
|
-
* @param params.fromSystem Bool. If true, event bubbled up because of an alt+f4, task manager, etc. Something closed the window that wasn't Finsemble.
|
|
685
|
-
* @param cb
|
|
686
|
-
*/
|
|
687
|
-
_close(params = {}, cb) {
|
|
688
|
-
return new Promise((resolve) => {
|
|
689
|
-
Logger.system.debug("WRAP CLOSE. BaseWindow._close", this.name, params);
|
|
690
|
-
const { parentWindow } = this;
|
|
691
|
-
if (params.fromSystem) {
|
|
692
|
-
// If the close is initiated from a system close (i.e. close from the taskbar or using the hotkey) and we're closing a stacked window, close the entire stacked window.
|
|
693
|
-
// Except for when a native window is part of that stack and the system close is initiated on the native window, in which case we only close the native window instead of the whole stack.
|
|
694
|
-
// fromSystem is only set by the WebWindowWrapper in _systemClosed. It is not set by other kinds of windows.
|
|
695
|
-
if (parentWindow && parentWindow.componentType.toLowerCase() === "stackedwindow") {
|
|
696
|
-
params = {};
|
|
697
|
-
params.removeFromWorkspace = true;
|
|
698
|
-
params.fromSystem = true;
|
|
699
|
-
params.stackedWindowIdentifier = parentWindow.identifier;
|
|
700
|
-
parentWindow.close(params, (err, result) => {
|
|
701
|
-
Logger.system.debug("BaseWindow.close stacked window", result);
|
|
702
|
-
cb === null || cb === void 0 ? void 0 : cb(err, { shouldContinue: false });
|
|
703
|
-
resolve({ err, data: { shouldContinue: false } });
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
|
|
708
|
-
resolve({ data: { shouldContinue: true } });
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
else if (!params.invokedByParent && !params.ignoreParent && parentWindow) {
|
|
712
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
713
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
714
|
-
params.noDocking = true; // when removing from stacked window don't register child with docking
|
|
715
|
-
parentWindow._removeWindow(params, (err, result) => {
|
|
716
|
-
Logger.system.debug("BaseWindow._close parent", result);
|
|
717
|
-
cb === null || cb === void 0 ? void 0 : cb(err, { shouldContinue: true });
|
|
718
|
-
resolve({ err, data: { shouldContinue: true } });
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
else {
|
|
722
|
-
cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
|
|
723
|
-
resolve({ data: { shouldContinue: true } });
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
728
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
729
|
-
_alwaysOnTop(params, cb = Function.prototype) {
|
|
730
|
-
Logger.system.debug("BaseWindow._alwaysOnTop", params);
|
|
731
|
-
params = params || {};
|
|
732
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
733
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
734
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
735
|
-
this.parentWindow._alwaysOnTop(params, (err, result) => {
|
|
736
|
-
Logger.system.debug("BaseWindow._alwaysOnTop parent", result);
|
|
737
|
-
cb(err, { shouldContinue: false });
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
else {
|
|
741
|
-
cb(null, { shouldContinue: true });
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Returns the alwaysOnTop state for the window.
|
|
746
|
-
* @param params This parameter is ignored.
|
|
747
|
-
* @param cb A callback accepting two arguments: an error object (which is always `null` for this method), and a boolean value representing the alwaysOnTop state.
|
|
748
|
-
* Disable eslint below because params is undefined, but we don't want to refactor the other calls to expect the 1st param to equal the callback.
|
|
749
|
-
*/
|
|
750
|
-
_isAlwaysOnTop(params = {}, cb = Function.prototype) {
|
|
751
|
-
cb(null, Boolean(this.windowOptions.alwaysOnTop));
|
|
752
|
-
return Boolean(this.windowOptions.alwaysOnTop);
|
|
753
|
-
}
|
|
754
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
755
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
756
|
-
_setOpacity(params, cb = Function.prototype) {
|
|
757
|
-
Logger.system.debug("BaseWindow._setOpacity", params);
|
|
758
|
-
params = params || {};
|
|
759
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
760
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
761
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
762
|
-
this.parentWindow._setOpacity(params, (err, result) => {
|
|
763
|
-
Logger.system.debug("BaseWindow._setOpacity parent", result);
|
|
764
|
-
cb(err, { shouldContinue: false });
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
768
|
-
cb(null, { shouldContinue: true });
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
// Private base window function optionally invoked by derived class (e.g. WebWindowWrapper, FinsembleNativeWindow). All base function follow same template.
|
|
772
|
-
// If parent defined then let parent decide appropriate functionality, including passing result back to caller specifying what to do next.
|
|
773
|
-
_saveWindowOptions(params, cb = Function.prototype) {
|
|
774
|
-
Logger.system.debug("BaseWindow._saveWindowOptions", params);
|
|
775
|
-
params = params || {};
|
|
776
|
-
if (!params.invokedByParent && this.parentWindow) {
|
|
777
|
-
// if parent defined and not circular loop, invoke parent functionality. Parent result passed back to caller
|
|
778
|
-
params.windowIdentifier = this.identifier; // add this window's identifier for parent invocation
|
|
779
|
-
this.parentWindow._saveWindowOptions(params, (err, result) => {
|
|
780
|
-
Logger.system.debug("BaseWindow._saveWindowOptions parent", result);
|
|
781
|
-
cb(err, { shouldContinue: true });
|
|
782
|
-
});
|
|
783
|
-
}
|
|
784
|
-
else {
|
|
785
|
-
cb(null, { shouldContinue: true });
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
_getOptions(_params, cb = Function.prototype) {
|
|
789
|
-
return cb(null, {});
|
|
790
|
-
}
|
|
791
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
792
|
-
// Other Baseclass Function: These are common functions shared across derived classes
|
|
793
|
-
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
794
|
-
/**
|
|
795
|
-
* Invoked to indicate an operation (e.g. dragging out of tab region) has started. This signals the Docking service to start tracking the mouse location and invoking tiling behavior as needed. Typically inherited (base function only).
|
|
796
|
-
* @param {object} params for future use
|
|
797
|
-
*
|
|
798
|
-
* @example
|
|
799
|
-
* // dragging tab example using tracking and group
|
|
800
|
-
* BaseWindow.startTabTileMonitoring();
|
|
801
|
-
* // if dragging tab is in a group, then remove it given tracking results will decide what to do with the window
|
|
802
|
-
* BaseWindow.Group.getGroupID(this.identifier, function (err, tileGroupId) {
|
|
803
|
-
* if (!err) { // if no error then must be in a tile group
|
|
804
|
-
* self.Group.removeWindow(this.identifier);
|
|
805
|
-
* }
|
|
806
|
-
* });
|
|
807
|
-
*/
|
|
808
|
-
startTabTileMonitoring(params) {
|
|
809
|
-
Logger.system.debug("BaseWindow.startTabTileMonitoring", params);
|
|
810
|
-
RouterClient.transmit("TabTile.startTabTile", { params });
|
|
811
|
-
}
|
|
812
|
-
/**
|
|
813
|
-
* Invoked by client originating a dragStart that it has has ended. Typically inherited (base function only).
|
|
814
|
-
* @param {object} params for future use
|
|
815
|
-
* @param {function=} callback option callback that support overriding default behavior
|
|
816
|
-
*
|
|
817
|
-
* BaseWindow.stopTabTileMonitoring(params, function(err, results, defaultTabTileAction) {
|
|
818
|
-
* // . . . custom code goes here . . .
|
|
819
|
-
* defaultTabTileAction(results); // now take default action or call your own function instead
|
|
820
|
-
* });
|
|
821
|
-
*
|
|
822
|
-
*/
|
|
823
|
-
stopTabTileMonitoring(params, callback) {
|
|
824
|
-
Logger.system.debug("BaseWindow.stopTabTileMonitoring", params);
|
|
825
|
-
RouterClient.query("TabTile.stopTabTile", { params }, function (err, queryResponseMessage) {
|
|
826
|
-
if (err) {
|
|
827
|
-
Logger.system.warn("TabTile.stopTabTile: query failed", err);
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
830
|
-
Logger.system.debug("TabTile.stopTabTile results", queryResponseMessage.data);
|
|
831
|
-
}
|
|
832
|
-
const stopTabTileResults = queryResponseMessage.data;
|
|
833
|
-
if (callback) {
|
|
834
|
-
callback(err, stopTabTileResults, this.defaultStopTrackingAction);
|
|
835
|
-
}
|
|
836
|
-
else {
|
|
837
|
-
this.defaultTabTileAction(stopTabTileResults);
|
|
838
|
-
}
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* Defines default TabTile action for stopTabTileMonitoring. May be overwritten by client -- see example in stopTabTileMonitoring. Typically inherited (base function only).
|
|
843
|
-
*
|
|
844
|
-
* @param {any} stopTabTileResults
|
|
845
|
-
* @memberof BaseWindow
|
|
846
|
-
*
|
|
847
|
-
* @private
|
|
848
|
-
*/
|
|
849
|
-
defaultTabTileAction(stopTabTileResults) {
|
|
850
|
-
const self = this;
|
|
851
|
-
Logger.system.debug("BaseWindow.defaultTabTileAction", stopTabTileResults);
|
|
852
|
-
switch (stopTabTileResults.stoppedLocation) {
|
|
853
|
-
case "OutsideWindow":
|
|
854
|
-
// move window to drop location (since for now assuming only single-tabbed windows)
|
|
855
|
-
break;
|
|
856
|
-
case "TabSection":
|
|
857
|
-
// WindowStack.addWindowToStack(callback) // for when we get to tabbing
|
|
858
|
-
break;
|
|
859
|
-
case "InsideWindow":
|
|
860
|
-
if (stopTabTileResults.tileGroupId) {
|
|
861
|
-
// if dropped in an existing tile group (which might be the same it was dragging from)
|
|
862
|
-
self.Group.addWindow(this.identifier, stopTabTileResults.tileGroupId, stopTabTileResults.dropCoordinates);
|
|
863
|
-
}
|
|
864
|
-
else {
|
|
865
|
-
// if dropped in a separate window outside a tile group
|
|
866
|
-
self.Group.createGroup(function (newGroupId) {
|
|
867
|
-
// add dragging window to new tile group, but specify the dropped on window as the starting window in the tile group
|
|
868
|
-
self.Group.addWindow(this.identifier, newGroupId, stopTabTileResults.dropCoordinates, {
|
|
869
|
-
startingWindowIdentifier: stopTabTileResults.droppedOnWindowIdentifier,
|
|
870
|
-
});
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
break;
|
|
874
|
-
default:
|
|
875
|
-
Logger.system.error("stopTracking returned an unknown stoppedLocation result", stopTabTileResults);
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
mergeBounds(bounds) {
|
|
879
|
-
if (!bounds || !Number.isInteger(bounds.top)) {
|
|
880
|
-
console.error("Invalid bounds", bounds);
|
|
881
|
-
Logger.system.warn("BaseWindow.mergeBounds Invalid bounds", "bounds=", bounds);
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
const newBounds = {
|
|
885
|
-
top: Math.round(bounds.top),
|
|
886
|
-
left: Math.round(bounds.left),
|
|
887
|
-
width: Math.round(bounds.width),
|
|
888
|
-
height: Math.round(bounds.height),
|
|
889
|
-
};
|
|
890
|
-
newBounds.bottom = newBounds.top + newBounds.height;
|
|
891
|
-
newBounds.right = newBounds.left + newBounds.width;
|
|
892
|
-
const defaultBounds = {
|
|
893
|
-
defaultLeft: newBounds.left,
|
|
894
|
-
defaultWidth: newBounds.width,
|
|
895
|
-
defaultTop: newBounds.top,
|
|
896
|
-
defaultHeight: newBounds.height,
|
|
897
|
-
};
|
|
898
|
-
Object.assign(this.windowOptions, newBounds);
|
|
899
|
-
Object.assign(this.windowOptions, defaultBounds);
|
|
900
|
-
this.windowOptions.bounds = newBounds;
|
|
901
|
-
}
|
|
902
|
-
startMove(params) {
|
|
903
|
-
// Note: the params are not being used, should we remove them? @todo
|
|
904
|
-
Logger.system.debug("BaseWindow.startMove", params);
|
|
905
|
-
params = params || {};
|
|
906
|
-
params.windowIdentifier = this.identifier; // add this window's identifier
|
|
907
|
-
this.eventManager.trigger("bounds-change-start", Object.assign({}, this.windowOptions.bounds));
|
|
908
|
-
}
|
|
909
|
-
stopMove(params) {
|
|
910
|
-
// Note: the params are not being used, should we remove them? @todo
|
|
911
|
-
Logger.system.debug("BaseWindow.stopMove", params);
|
|
912
|
-
params = params || {};
|
|
913
|
-
params.windowIdentifier = this.identifier; // add this window's identifier
|
|
914
|
-
this.eventManager.trigger("bounds-change-end", Object.assign({ name: this.name, eventName: "bounds-change-end", dockedPosition: this.dockedPosition }, this.windowOptions.bounds));
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* Given a field, this function retrieves component or window state. If no params are given you get the full state
|
|
918
|
-
* @param {object} params
|
|
919
|
-
* @param {string} params.stateVar A string containing "componentState" or "windowState"
|
|
920
|
-
* @param {string} params.field field
|
|
921
|
-
* @param {array} params.fields fields
|
|
922
|
-
* @param {string} params.key The storage key for the window.
|
|
923
|
-
* @param {function} cb Callback
|
|
924
|
-
* @private
|
|
925
|
-
* */
|
|
926
|
-
async getFSBLState(params, cb) {
|
|
927
|
-
Logger.system.debug("BaseWindow.getState", params);
|
|
928
|
-
const { err, data: response } = await StorageClient.getStandardized({
|
|
929
|
-
topic: WORKSPACE.CACHE_STORAGE_TOPIC,
|
|
930
|
-
key: params.key,
|
|
931
|
-
});
|
|
932
|
-
if (params.stateVar === "componentState") {
|
|
933
|
-
this.componentState = response;
|
|
934
|
-
}
|
|
935
|
-
const { field, fields } = params;
|
|
936
|
-
if (!err && response) {
|
|
937
|
-
if (field) {
|
|
938
|
-
cb === null || cb === void 0 ? void 0 : cb(err, response[field]);
|
|
939
|
-
return { data: response[field] };
|
|
940
|
-
}
|
|
941
|
-
else if (fields) {
|
|
942
|
-
const respObject = {};
|
|
943
|
-
for (let i = 0; i < fields.length; i++) {
|
|
944
|
-
if (response[fields[i]]) {
|
|
945
|
-
respObject[fields[i]] = response[fields[i]];
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
cb === null || cb === void 0 ? void 0 : cb(null, respObject);
|
|
949
|
-
return { data: respObject };
|
|
950
|
-
}
|
|
951
|
-
else {
|
|
952
|
-
cb === null || cb === void 0 ? void 0 : cb(null, response);
|
|
953
|
-
return { data: response };
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
else {
|
|
957
|
-
const error = `Not found`;
|
|
958
|
-
Logger.system.info("WindowClient:getComponentState:error, response, params", err, response, params);
|
|
959
|
-
cb === null || cb === void 0 ? void 0 : cb(error, response);
|
|
960
|
-
return { err: error };
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
/**
|
|
964
|
-
* Given params, will return the component state. Either the params to search for, or the entire state.
|
|
965
|
-
*
|
|
966
|
-
* @param {object} params
|
|
967
|
-
* @param {string} params.field field
|
|
968
|
-
* @param {array} params.fields fields
|
|
969
|
-
* @param {function} cb Callback
|
|
970
|
-
*/
|
|
971
|
-
getComponentState(params, cb) {
|
|
972
|
-
if (!params)
|
|
973
|
-
params = {};
|
|
974
|
-
if (params.fields && !Array.isArray(params.fields)) {
|
|
975
|
-
params.fields = [params.fields];
|
|
976
|
-
}
|
|
977
|
-
return this.getFSBLState(Object.assign(Object.assign({}, params), { key: this.componentKey, stateVar: "componentState" }), cb);
|
|
978
|
-
}
|
|
979
|
-
/**
|
|
980
|
-
* Given params, will return the window state. Either the params to search for, or the entire state.
|
|
981
|
-
*
|
|
982
|
-
* @param {object} params
|
|
983
|
-
* @param {string} params.field field
|
|
984
|
-
* @param {array} params.fields fields
|
|
985
|
-
* @param {function} cb Callback
|
|
986
|
-
*/
|
|
987
|
-
getWindowState(params, cb) {
|
|
988
|
-
if (!params)
|
|
989
|
-
params = {};
|
|
990
|
-
if (params.fields && !Array.isArray(params.fields)) {
|
|
991
|
-
params.fields = [params.fields];
|
|
992
|
-
}
|
|
993
|
-
params.key = this.windowKey;
|
|
994
|
-
params.stateVar = "windowData";
|
|
995
|
-
return this.getFSBLState(params, cb);
|
|
996
|
-
}
|
|
997
|
-
/**
|
|
998
|
-
* Given params, will set the component state. Any fields included will be added to the state
|
|
999
|
-
*
|
|
1000
|
-
* @param {object} params
|
|
1001
|
-
* @param {string} params.field field
|
|
1002
|
-
* @param {array} params.fields fields
|
|
1003
|
-
* @param {function} cb Callback
|
|
1004
|
-
*/
|
|
1005
|
-
setComponentState(params, cb = Function.prototype) {
|
|
1006
|
-
if (!params)
|
|
1007
|
-
params = {};
|
|
1008
|
-
if (params.fields && !Array.isArray(params.fields)) {
|
|
1009
|
-
params.fields = [params.fields];
|
|
1010
|
-
}
|
|
1011
|
-
return this.setFSBLState(Object.assign(Object.assign({}, params), { key: this.componentKey, stateVar: "componentState" }), cb);
|
|
1012
|
-
}
|
|
1013
|
-
/**
|
|
1014
|
-
* Removes one or more specified attributes from a component state in storage
|
|
1015
|
-
* for this window.
|
|
1016
|
-
*
|
|
1017
|
-
* In addition to the name of the window, params should include either a `field`
|
|
1018
|
-
* property as a string or a `fields` property as an array of strings.
|
|
1019
|
-
*
|
|
1020
|
-
* @param {object} params
|
|
1021
|
-
* @param {string} [params.field] field
|
|
1022
|
-
* @param {array} [params.fields] fields
|
|
1023
|
-
* @param {function} cb Callback
|
|
1024
|
-
*/
|
|
1025
|
-
removeComponentState(params, cb = () => { }) {
|
|
1026
|
-
if (params.fields && !Array.isArray(params.fields)) {
|
|
1027
|
-
params.fields = [params.fields];
|
|
1028
|
-
}
|
|
1029
|
-
return this.removeFSBLState(Object.assign(Object.assign({}, params), { key: this.componentKey, stateVar: "componentState" }), cb);
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* Given params, will set the window state. Any fields included will be added to the state
|
|
1033
|
-
*
|
|
1034
|
-
* @param {object} params
|
|
1035
|
-
* @param {string} params.field field
|
|
1036
|
-
* @param {array} params.fields fields
|
|
1037
|
-
* @param {function} cb Callback
|
|
1038
|
-
*/
|
|
1039
|
-
setWindowState(params, cb) {
|
|
1040
|
-
if (!params)
|
|
1041
|
-
params = {};
|
|
1042
|
-
if (params.fields && !Array.isArray(params.fields)) {
|
|
1043
|
-
params.fields = [params.fields];
|
|
1044
|
-
}
|
|
1045
|
-
return this.setFSBLState(Object.assign(Object.assign({}, params), { key: this.windowKey, stateVar: "windowData" }), cb);
|
|
1046
|
-
}
|
|
1047
|
-
saveWindowState(state) {
|
|
1048
|
-
this.windowState = state;
|
|
1049
|
-
}
|
|
1050
|
-
static async cleanupState(state) {
|
|
1051
|
-
const stateToSave = {
|
|
1052
|
-
componentType: state.componentType,
|
|
1053
|
-
name: state.name,
|
|
1054
|
-
};
|
|
1055
|
-
if (!BaseWindow.additionalWorkspaceFields) {
|
|
1056
|
-
try {
|
|
1057
|
-
const additionalFields = await ConfigClient.getValue("finsemble.servicesConfig.window.additionalWorkspaceFields");
|
|
1058
|
-
BaseWindow.additionalWorkspaceFields = additionalFields.data || [];
|
|
1059
|
-
}
|
|
1060
|
-
catch (_b) {
|
|
1061
|
-
BaseWindow.additionalWorkspaceFields = [];
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
let windowTypeProps;
|
|
1065
|
-
if (WORKSPACE.ADDITIONAL_WINDOW_PROPS[state.windowType]) {
|
|
1066
|
-
windowTypeProps = WORKSPACE.ADDITIONAL_WINDOW_PROPS[state.windowType];
|
|
1067
|
-
}
|
|
1068
|
-
else {
|
|
1069
|
-
windowTypeProps = WORKSPACE.ADDITIONAL_WINDOW_PROPS["WebWindow"];
|
|
1070
|
-
}
|
|
1071
|
-
if (state.windowType === "WebApplication") {
|
|
1072
|
-
state.windowType = "WebWindow";
|
|
1073
|
-
}
|
|
1074
|
-
const allowedKeys = [
|
|
1075
|
-
...WORKSPACE.DEFAULT_WINDOW_PROPS,
|
|
1076
|
-
...windowTypeProps,
|
|
1077
|
-
...BaseWindow.additionalWorkspaceFields,
|
|
1078
|
-
];
|
|
1079
|
-
for (const key of allowedKeys) {
|
|
1080
|
-
if (state[key] !== undefined) {
|
|
1081
|
-
stateToSave[key] = state[key];
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
return stateToSave;
|
|
1085
|
-
}
|
|
1086
|
-
async saveCompleteWindowState(state, cb = Function.prototype) {
|
|
1087
|
-
Logger.system.debug("COMPONENT LIFECYCLE:SAVING STATE:", state.name);
|
|
1088
|
-
if (!state) {
|
|
1089
|
-
cb("No State Provided");
|
|
1090
|
-
}
|
|
1091
|
-
else {
|
|
1092
|
-
if (state.windowType === "StackedWindow") {
|
|
1093
|
-
state.componentType = "StackedWindow";
|
|
1094
|
-
this.mergeBounds(state.bounds);
|
|
1095
|
-
}
|
|
1096
|
-
const stateToSave = await BaseWindow.cleanupState(state);
|
|
1097
|
-
// don't save if no change from previously saved state
|
|
1098
|
-
if (isEqualIgnoringArrayOrder(this.oldState, stateToSave)) {
|
|
1099
|
-
Logger.system.debug("saveCompleteWindowState -- deep equal");
|
|
1100
|
-
cb();
|
|
1101
|
-
}
|
|
1102
|
-
else {
|
|
1103
|
-
Logger.system.debug("saveCompleteWindowState -- not deep equal", this.oldState, stateToSave);
|
|
1104
|
-
this.oldState = clone(stateToSave);
|
|
1105
|
-
try {
|
|
1106
|
-
await setWindowState({
|
|
1107
|
-
windowName: this.windowName,
|
|
1108
|
-
state: { windowData: stateToSave },
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
catch (_b) { }
|
|
1112
|
-
cb();
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
/**
|
|
1117
|
-
* Given a field, this function sets and persists app state.
|
|
1118
|
-
* @param {object} params
|
|
1119
|
-
* @param {string} [params.field] field
|
|
1120
|
-
* @param {array} [params.fields] fields
|
|
1121
|
-
* @param {function=} cb Callback
|
|
1122
|
-
* */
|
|
1123
|
-
async setFSBLState(params, cb) {
|
|
1124
|
-
const getParams = {
|
|
1125
|
-
key: params.key,
|
|
1126
|
-
stateVar: params.stateVar,
|
|
1127
|
-
};
|
|
1128
|
-
if (!getParams.key) {
|
|
1129
|
-
if (getParams.stateVar === "componentState") {
|
|
1130
|
-
getParams.key = this.componentKey;
|
|
1131
|
-
}
|
|
1132
|
-
else if (getParams.stateVar === "windowData") {
|
|
1133
|
-
getParams.key = this.windowKey;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
const propertyToUse = params.stateVar === "componentState" ? "componentState" : "windowOptions";
|
|
1137
|
-
await this.getFSBLState(getParams);
|
|
1138
|
-
/* Sidd Notes: We are always comparing the entire saved state to see if things have changed instead of just the new fields - that is expensive. */
|
|
1139
|
-
Logger.system.debug("BaseWindow.getState", params);
|
|
1140
|
-
let localComponentState = merge(this[propertyToUse], {});
|
|
1141
|
-
let { fields } = params;
|
|
1142
|
-
if (params.field) {
|
|
1143
|
-
fields = [
|
|
1144
|
-
{
|
|
1145
|
-
field: params.field,
|
|
1146
|
-
value: params.value,
|
|
1147
|
-
},
|
|
1148
|
-
];
|
|
1149
|
-
}
|
|
1150
|
-
for (let i = 0; i < fields.length; i++) {
|
|
1151
|
-
const field = fields[i];
|
|
1152
|
-
if (!field.field || typeof field.value === "undefined") {
|
|
1153
|
-
continue;
|
|
1154
|
-
}
|
|
1155
|
-
localComponentState[field.field] = field.value;
|
|
1156
|
-
}
|
|
1157
|
-
params.value = localComponentState;
|
|
1158
|
-
Logger.system.debug(`COMPONENT LIFECYCLE: SAVING ${params.stateVar}:`, localComponentState);
|
|
1159
|
-
if (params.stateVar === "windowData") {
|
|
1160
|
-
localComponentState = await BaseWindow.cleanupState(localComponentState);
|
|
1161
|
-
}
|
|
1162
|
-
try {
|
|
1163
|
-
await setWindowState({
|
|
1164
|
-
windowName: this.windowName,
|
|
1165
|
-
state: { [params.stateVar]: localComponentState },
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
catch (_b) { }
|
|
1169
|
-
this[propertyToUse] = localComponentState;
|
|
1170
|
-
cb === null || cb === void 0 ? void 0 : cb();
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
* Removes one or more specified attributes from either component or window state in storage.
|
|
1174
|
-
*
|
|
1175
|
-
* In addition to the name of the window, params should include either a `field`
|
|
1176
|
-
* property as a string or a `fields` property as an array of strings.
|
|
1177
|
-
*
|
|
1178
|
-
* @param {object} params
|
|
1179
|
-
* @param {string} [params.field] field
|
|
1180
|
-
* @param {array} [params.fields] fields
|
|
1181
|
-
* @param {function=} cb Callback
|
|
1182
|
-
* */
|
|
1183
|
-
removeFSBLState(params, cb = () => { }) {
|
|
1184
|
-
var _b;
|
|
1185
|
-
const getParams = {
|
|
1186
|
-
key: params.key,
|
|
1187
|
-
stateVar: params.stateVar,
|
|
1188
|
-
};
|
|
1189
|
-
// Ensure that we have a key
|
|
1190
|
-
const defaultKey = getParams.stateVar === "componentState" ? this.componentKey : this.windowKey;
|
|
1191
|
-
const key = (_b = getParams.key) !== null && _b !== void 0 ? _b : defaultKey;
|
|
1192
|
-
const propertyToUse = params.stateVar === "componentState" ? "componentState" : "windowOptions";
|
|
1193
|
-
this.getFSBLState(Object.assign(Object.assign({}, getParams), { key }), async () => {
|
|
1194
|
-
var _b;
|
|
1195
|
-
/* Sidd Notes: We are always comparing the entire saved state to see if things have changed instead of just the new fields - that is expensive. */
|
|
1196
|
-
Logger.system.debug("BaseWindow.getState", params);
|
|
1197
|
-
// deepmerge treats undefined as empty object
|
|
1198
|
-
let localComponentState = merge(this[propertyToUse], {});
|
|
1199
|
-
let { fields = [] } = params;
|
|
1200
|
-
if (params.field) {
|
|
1201
|
-
fields = [
|
|
1202
|
-
{
|
|
1203
|
-
field: params.field,
|
|
1204
|
-
},
|
|
1205
|
-
];
|
|
1206
|
-
}
|
|
1207
|
-
for (let i = 0; i < fields.length; i++) {
|
|
1208
|
-
const field = fields[i];
|
|
1209
|
-
if (!field.field) {
|
|
1210
|
-
continue;
|
|
1211
|
-
}
|
|
1212
|
-
delete localComponentState[field.field];
|
|
1213
|
-
}
|
|
1214
|
-
params.value = localComponentState;
|
|
1215
|
-
Logger.system.debug(`COMPONENT LIFECYCLE: SAVING ${params.stateVar}:`, localComponentState);
|
|
1216
|
-
if (params.stateVar === "windowData") {
|
|
1217
|
-
localComponentState = await BaseWindow.cleanupState(localComponentState);
|
|
1218
|
-
}
|
|
1219
|
-
const stateVar = (_b = params.stateVar) !== null && _b !== void 0 ? _b : "windowData";
|
|
1220
|
-
try {
|
|
1221
|
-
await setWindowState({
|
|
1222
|
-
windowName: this.windowName,
|
|
1223
|
-
state: { [stateVar]: localComponentState },
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
catch (_c) { }
|
|
1227
|
-
this[propertyToUse] = localComponentState;
|
|
1228
|
-
cb(null);
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
/**
|
|
1232
|
-
*Cancels startTabTileMonitoring. Example use is a user "excapes" out of a drag operation.
|
|
1233
|
-
*
|
|
1234
|
-
* @param {object} params for future use
|
|
1235
|
-
* @memberof BaseWindow
|
|
1236
|
-
*/
|
|
1237
|
-
cancelTabTileMonitoring(params) {
|
|
1238
|
-
Logger.system.debug("BaseWindow.cancelTabTileMonitoring", params);
|
|
1239
|
-
RouterClient.transmit("TabTile.cancelTabTile", { params });
|
|
1240
|
-
}
|
|
1241
|
-
/**
|
|
1242
|
-
* Return the parent window's wrapper (e.g. StackedWindow).
|
|
1243
|
-
*
|
|
1244
|
-
*/
|
|
1245
|
-
getParent() {
|
|
1246
|
-
return this.parentWindow;
|
|
1247
|
-
}
|
|
1248
|
-
/**
|
|
1249
|
-
* Sets the parent window (e.g. stackedWindow) and emits "setParent" event to window listeners.
|
|
1250
|
-
*
|
|
1251
|
-
* @param {object} stackedWindowIdentifier identifer of window to set as parent (e.g. stackedWindowIdentifier).
|
|
1252
|
-
*
|
|
1253
|
-
*/
|
|
1254
|
-
setParent(windowIdentifier, cb = Function.prototype) {
|
|
1255
|
-
if (this.parentWindow && this.parentWindow.name === windowIdentifier.windowName) {
|
|
1256
|
-
Logger.system.debug("BaseWindow.setParent already set", windowIdentifier);
|
|
1257
|
-
cb(null, windowIdentifier);
|
|
1258
|
-
}
|
|
1259
|
-
else {
|
|
1260
|
-
Logger.system.debug("BaseWindow.setParent", windowIdentifier);
|
|
1261
|
-
// set up store listener to change if
|
|
1262
|
-
BaseWindow.getInstance(windowIdentifier, (err, wrappedStackedWindow) => {
|
|
1263
|
-
if (!err) {
|
|
1264
|
-
Logger.system.debug("BaseWindow.setParent wrap success", windowIdentifier);
|
|
1265
|
-
console.debug("BaseWindow.setParent wrap success", this, wrappedStackedWindow);
|
|
1266
|
-
this.parentWindow = wrappedStackedWindow;
|
|
1267
|
-
this.eventManager.trigger("parent-set", {
|
|
1268
|
-
parentName: this.parentWindow.name,
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
else {
|
|
1272
|
-
Logger.system.error("BaseWindow.setParent error", err);
|
|
1273
|
-
}
|
|
1274
|
-
cb(err, windowIdentifier);
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
/**
|
|
1279
|
-
* Clears the parent reference and emits "clearParent" event to window listeners. Used only internally.
|
|
1280
|
-
*
|
|
1281
|
-
* @private
|
|
1282
|
-
*
|
|
1283
|
-
*/
|
|
1284
|
-
clearParent() {
|
|
1285
|
-
Logger.system.debug("BaseWindow.clearParent");
|
|
1286
|
-
this.parentWindow = null;
|
|
1287
|
-
this.eventManager.trigger("parent-unset", this.parentWindow);
|
|
1288
|
-
}
|
|
1289
|
-
setTitle(title) {
|
|
1290
|
-
if (this.windowOptions) {
|
|
1291
|
-
this.windowOptions.title = title;
|
|
1292
|
-
}
|
|
1293
|
-
Logger.system.debug("Title change", title);
|
|
1294
|
-
// Publish a title changed event (include the target window (windowName) and the new title (title))
|
|
1295
|
-
RouterClient.publish(this.TITLE_CHANGED_CHANNEL, { title, windowName: this.windowName });
|
|
1296
|
-
}
|
|
1297
|
-
// public Window functions - needed to handle events properly e.g. for close.
|
|
1298
|
-
close(params = {}, cb) {
|
|
1299
|
-
return new Promise((resolve) => {
|
|
1300
|
-
this.queryWindowService("close", params, (err, data) => {
|
|
1301
|
-
cb === null || cb === void 0 ? void 0 : cb(err, data);
|
|
1302
|
-
resolve({ err });
|
|
1303
|
-
});
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
_animate(params, cb) {
|
|
1307
|
-
if (typeof params === "function") {
|
|
1308
|
-
cb = params;
|
|
1309
|
-
params = null;
|
|
1310
|
-
}
|
|
1311
|
-
cb("Method not implemented for window", { shouldContinue: true });
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
_a = BaseWindow;
|
|
1315
|
-
BaseWindow.cache = {};
|
|
1316
|
-
BaseWindow.WINDOWSTATE = constants.WINDOWSTATE;
|
|
1317
|
-
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1318
|
-
// The window wrappers
|
|
1319
|
-
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1320
|
-
/**
|
|
1321
|
-
* Async wrap. Given a name/windowName, it will query the launcher for information required to wrap the window. Then it will return an object that can be operated on. Also this creates a cache of all wrapped windows for performance. Our clients wrap the same window often and this was causing excessive messaging to the store and degrading performance.
|
|
1322
|
-
* @param {*} params Need only name in most cases. For service and other cases where the window is not part of what the launcher considers active windows, name and uuid are required
|
|
1323
|
-
* @param {*} cb
|
|
1324
|
-
*/
|
|
1325
|
-
BaseWindow.wrap = BaseWindow.getInstance;
|
|
1326
|
-
BaseWindow._windowReady = (windowName) => {
|
|
1327
|
-
const promiseResolver = async (resolve) => {
|
|
1328
|
-
Logger.system.debug(`windowServiceReady: ${windowName} waiting`);
|
|
1329
|
-
const subscribeId = RouterClient.subscribe(`Finsemble.Component.State.${windowName}`, (error, response) => {
|
|
1330
|
-
const { state } = response.data;
|
|
1331
|
-
Logger.system.debug(`windowServiceReady: ${windowName} state change: ${state}`);
|
|
1332
|
-
switch (state) {
|
|
1333
|
-
case "ready":
|
|
1334
|
-
case "reloading":
|
|
1335
|
-
case "closing": // if ready state or any state beyond
|
|
1336
|
-
Logger.system.debug(`windowServiceReady: ${windowName} ${state}`);
|
|
1337
|
-
RouterClient.unsubscribe(subscribeId);
|
|
1338
|
-
resolve();
|
|
1339
|
-
break;
|
|
1340
|
-
default:
|
|
1341
|
-
Logger.system.debug(`windowServiceReady default: ${windowName} ${state}`);
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
};
|
|
1345
|
-
return new Promise(promiseResolver);
|
|
1346
|
-
};
|
|
1347
|
-
//# sourceMappingURL=BaseWindow.js.map
|