@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.
Files changed (683) hide show
  1. package/FEA.d.ts +102 -28
  2. package/FEA.d.ts.map +1 -1
  3. package/FEA.js.map +1 -1
  4. package/clients/Interop/FinsembleDesktopAgent.d.ts +1 -0
  5. package/clients/Interop/FinsembleDesktopAgent.d.ts.map +1 -1
  6. package/clients/Interop/FinsembleDesktopAgent.js +17 -16
  7. package/clients/Interop/FinsembleDesktopAgent.js.map +1 -1
  8. package/clients/Interop/types.d.ts +1 -0
  9. package/clients/Interop/types.d.ts.map +1 -1
  10. package/clients/Startup/FSBLDesktop.d.ts +2 -8
  11. package/clients/Startup/FSBLDesktop.d.ts.map +1 -1
  12. package/clients/Startup/FSBLDesktop.js +2 -4
  13. package/clients/Startup/FSBLDesktop.js.map +1 -1
  14. package/clients/Startup/unhandledErrors.d.ts.map +1 -1
  15. package/clients/Startup/unhandledErrors.js +6 -4
  16. package/clients/Startup/unhandledErrors.js.map +1 -1
  17. package/clients/Startup/windowStartup.d.ts.map +1 -1
  18. package/clients/Startup/windowStartup.js +125 -112
  19. package/clients/Startup/windowStartup.js.map +1 -1
  20. package/clients/StoreModel.d.ts +8 -8
  21. package/clients/StoreModel.js +9 -9
  22. package/clients/StoreModel.js.map +1 -1
  23. package/clients/appsClient.d.ts +463 -0
  24. package/clients/appsClient.d.ts.map +1 -0
  25. package/clients/appsClient.js +696 -0
  26. package/clients/appsClient.js.map +1 -0
  27. package/clients/authenticationClient.d.ts +36 -27
  28. package/clients/authenticationClient.d.ts.map +1 -1
  29. package/clients/authenticationClient.js +18 -15
  30. package/clients/authenticationClient.js.map +1 -1
  31. package/clients/configClient.d.ts +189 -71
  32. package/clients/configClient.d.ts.map +1 -1
  33. package/clients/configClient.js +185 -114
  34. package/clients/configClient.js.map +1 -1
  35. package/clients/controller/DialogManagerClientController.d.ts +78 -0
  36. package/clients/controller/DialogManagerClientController.d.ts.map +1 -0
  37. package/clients/controller/DialogManagerClientController.js +213 -0
  38. package/clients/controller/DialogManagerClientController.js.map +1 -0
  39. package/clients/dialogManagerClient.d.ts +11 -75
  40. package/clients/dialogManagerClient.d.ts.map +1 -1
  41. package/clients/dialogManagerClient.js +11 -208
  42. package/clients/dialogManagerClient.js.map +1 -1
  43. package/clients/distributedStoreClient.d.ts +4 -0
  44. package/clients/distributedStoreClient.d.ts.map +1 -1
  45. package/clients/distributedStoreClient.js +4 -0
  46. package/clients/distributedStoreClient.js.map +1 -1
  47. package/clients/hotkeyClient.d.ts +23 -9
  48. package/clients/hotkeyClient.d.ts.map +1 -1
  49. package/clients/hotkeyClient.js +35 -14
  50. package/clients/hotkeyClient.js.map +1 -1
  51. package/clients/index.d.ts +2 -0
  52. package/clients/index.d.ts.map +1 -1
  53. package/clients/index.js +2 -0
  54. package/clients/index.js.map +1 -1
  55. package/clients/launcherClient.d.ts +55 -209
  56. package/clients/launcherClient.d.ts.map +1 -1
  57. package/clients/launcherClient.js +37 -422
  58. package/clients/launcherClient.js.map +1 -1
  59. package/clients/logger.d.ts +6 -0
  60. package/clients/logger.d.ts.map +1 -1
  61. package/clients/logger.js +49 -41
  62. package/clients/logger.js.map +1 -1
  63. package/clients/notificationClient.d.ts +32 -8
  64. package/clients/notificationClient.d.ts.map +1 -1
  65. package/clients/notificationClient.js +32 -8
  66. package/clients/notificationClient.js.map +1 -1
  67. package/clients/routerClient.d.ts +39 -21
  68. package/clients/routerClient.d.ts.map +1 -1
  69. package/clients/routerClient.js +38 -20
  70. package/clients/routerClient.js.map +1 -1
  71. package/clients/searchClient.d.ts +7 -2
  72. package/clients/searchClient.d.ts.map +1 -1
  73. package/clients/searchClient.js +7 -2
  74. package/clients/searchClient.js.map +1 -1
  75. package/clients/storageClient.d.ts +19 -6
  76. package/clients/storageClient.d.ts.map +1 -1
  77. package/clients/storageClient.js +18 -6
  78. package/clients/storageClient.js.map +1 -1
  79. package/clients/windowClient.d.ts +207 -80
  80. package/clients/windowClient.d.ts.map +1 -1
  81. package/clients/windowClient.js +291 -139
  82. package/clients/windowClient.js.map +1 -1
  83. package/clients/workspaceClient.d.ts +45 -18
  84. package/clients/workspaceClient.d.ts.map +1 -1
  85. package/clients/workspaceClient.js +41 -13
  86. package/clients/workspaceClient.js.map +1 -1
  87. package/common/Desktop.d.ts +12 -50
  88. package/common/Desktop.d.ts.map +1 -1
  89. package/common/Desktop.js +14 -64
  90. package/common/Desktop.js.map +1 -1
  91. package/common/FinsembleWindow.d.ts +5 -108
  92. package/common/FinsembleWindow.d.ts.map +1 -1
  93. package/common/FinsembleWindow.js +28 -349
  94. package/common/FinsembleWindow.js.map +1 -1
  95. package/common/Monitors.d.ts +30 -18
  96. package/common/Monitors.d.ts.map +1 -1
  97. package/common/Monitors.js +45 -80
  98. package/common/Monitors.js.map +1 -1
  99. package/common/Singleton.d.ts +7 -1
  100. package/common/Singleton.d.ts.map +1 -1
  101. package/common/Singleton.js +24 -11
  102. package/common/Singleton.js.map +1 -1
  103. package/common/constants.d.ts +3 -9
  104. package/common/constants.d.ts.map +1 -1
  105. package/common/constants.js +3 -14
  106. package/common/constants.js.map +1 -1
  107. package/common/events/FinsembleEvent.d.ts +1 -1
  108. package/common/events/FinsembleEvent.d.ts.map +1 -1
  109. package/common/redux/getRemoteStore.d.ts +53 -0
  110. package/common/redux/getRemoteStore.d.ts.map +1 -0
  111. package/common/redux/getRemoteStore.js +50 -0
  112. package/common/redux/getRemoteStore.js.map +1 -0
  113. package/common/redux/remoteReduxEnhancer.d.ts +7 -7
  114. package/common/redux/remoteReduxEnhancer.d.ts.map +1 -1
  115. package/common/redux/remoteReduxEnhancer.js +35 -20
  116. package/common/redux/remoteReduxEnhancer.js.map +1 -1
  117. package/common/redux/types.d.ts +14 -1
  118. package/common/redux/types.d.ts.map +1 -1
  119. package/common/systemManagerClient.d.ts +11 -5
  120. package/common/systemManagerClient.d.ts.map +1 -1
  121. package/common/systemManagerClient.js +25 -8
  122. package/common/systemManagerClient.js.map +1 -1
  123. package/common/util.d.ts +1 -7
  124. package/common/util.d.ts.map +1 -1
  125. package/common/util.js +1 -14
  126. package/common/util.js.map +1 -1
  127. package/deprecated/deprecatedFunctions.d.ts +1 -1
  128. package/deprecated/deprecatedFunctions.d.ts.map +1 -1
  129. package/deprecated/deprecatedFunctions.js +3 -4
  130. package/deprecated/deprecatedFunctions.js.map +1 -1
  131. package/deprecated/deprecatedlauncherClient.d.ts +1 -1
  132. package/deprecated/deprecatedlauncherClient.d.ts.map +1 -1
  133. package/deprecated/deprecatedlauncherClient.js.map +1 -1
  134. package/deprecated/dragAndDropClient.d.ts +4 -3
  135. package/deprecated/dragAndDropClient.d.ts.map +1 -1
  136. package/deprecated/dragAndDropClient.js +15 -4
  137. package/deprecated/dragAndDropClient.js.map +1 -1
  138. package/deprecated/linkerClient.d.ts +1 -1
  139. package/deprecated/linkerClient.d.ts.map +1 -1
  140. package/main.d.ts +289 -171
  141. package/main.d.ts.map +1 -1
  142. package/main.js +3 -1
  143. package/main.js.map +1 -1
  144. package/package.json +4 -4
  145. package/platform/services/Interop/modules/types.d.ts +2 -0
  146. package/platform/services/Interop/modules/types.d.ts.map +1 -1
  147. package/platform/services/Interop/types.d.ts +24 -2
  148. package/platform/services/Interop/types.d.ts.map +1 -1
  149. package/platform/services/Interop/types.js.map +1 -1
  150. package/platform/services/router/types.d.ts +5 -6
  151. package/platform/services/router/types.d.ts.map +1 -1
  152. package/platform/services/systemManager/_constants.d.ts +1 -0
  153. package/platform/services/systemManager/_constants.d.ts.map +1 -1
  154. package/platform/services/systemManager/_constants.js +2 -0
  155. package/platform/services/systemManager/_constants.js.map +1 -1
  156. package/platform/services/systemManager/types.d.ts +1 -1
  157. package/platform/services/systemManager/types.d.ts.map +1 -1
  158. package/platform/services/systemManager/types.js.map +1 -1
  159. package/platform/services/window/modules/actions.d.ts +68 -0
  160. package/platform/services/window/modules/actions.d.ts.map +1 -0
  161. package/platform/services/window/modules/actions.js +60 -0
  162. package/platform/services/window/modules/actions.js.map +1 -0
  163. package/platform/services/window/types.d.ts +275 -51
  164. package/platform/services/window/types.d.ts.map +1 -1
  165. package/platform/services/workspace/types.d.ts +4 -3
  166. package/platform/services/workspace/types.d.ts.map +1 -1
  167. package/react/actions/smartDesktopDesignerActions.d.ts +7 -1
  168. package/react/actions/smartDesktopDesignerActions.d.ts.map +1 -1
  169. package/react/actions/smartDesktopDesignerActions.js +3 -0
  170. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  171. package/react/assets/css/core/icons.css +0 -5
  172. package/react/assets/css/dialogs.css +2 -1
  173. package/react/assets/css/fonts/icons-reference.html +1 -1
  174. package/react/assets/css/processMonitor.css +9 -4
  175. package/react/assets/css/userPreferences.css +1 -1
  176. package/react/assets/css/windowTitleBar.css +101 -285
  177. package/react/assets/icons/chevron-down.svg +1 -0
  178. package/react/assets/icons/chevron-up.svg +1 -0
  179. package/react/components/appCatalog/AppCatalog.d.ts +3 -0
  180. package/react/components/appCatalog/AppCatalog.d.ts.map +1 -1
  181. package/react/components/appCatalog/AppCatalog.js +3 -0
  182. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  183. package/react/components/appCatalog/AppCatalogComponent.d.ts +4 -0
  184. package/react/components/appCatalog/AppCatalogComponent.d.ts.map +1 -1
  185. package/react/components/appCatalog/AppCatalogComponent.js +6 -2
  186. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  187. package/react/components/common/ButtonRow.d.ts.map +1 -1
  188. package/react/components/common/ButtonRow.js +4 -9
  189. package/react/components/common/ButtonRow.js.map +1 -1
  190. package/react/components/common/Checkbox.d.ts +1 -0
  191. package/react/components/common/Checkbox.d.ts.map +1 -1
  192. package/react/components/common/Checkbox.js +14 -2
  193. package/react/components/common/Checkbox.js.map +1 -1
  194. package/react/components/common/ContextMenu.d.ts.map +1 -1
  195. package/react/components/common/ContextMenu.js +5 -11
  196. package/react/components/common/ContextMenu.js.map +1 -1
  197. package/react/components/common/DropdownButton.d.ts.map +1 -1
  198. package/react/components/common/DropdownButton.js +11 -24
  199. package/react/components/common/DropdownButton.js.map +1 -1
  200. package/react/components/common/FinsembleIcon.d.ts +1 -1
  201. package/react/components/common/FinsembleIcon.d.ts.map +1 -1
  202. package/react/components/common/FinsembleIcon.js +6 -4
  203. package/react/components/common/FinsembleIcon.js.map +1 -1
  204. package/react/components/common/FinsembleLink.d.ts +7 -0
  205. package/react/components/common/FinsembleLink.d.ts.map +1 -0
  206. package/react/components/common/FinsembleLink.js +13 -0
  207. package/react/components/common/FinsembleLink.js.map +1 -0
  208. package/react/components/common/Header.d.ts +1 -0
  209. package/react/components/common/Header.d.ts.map +1 -1
  210. package/react/components/common/Header.js +4 -2
  211. package/react/components/common/Header.js.map +1 -1
  212. package/react/components/common/css/accordion.css +9 -21
  213. package/react/components/common/css/application-edit-page.css +0 -15
  214. package/react/components/common/css/application-list.css +54 -23
  215. package/react/components/common/css/button.css +20 -0
  216. package/react/components/common/css/selector.css +3 -1
  217. package/react/components/downloadManager/DownloadManager.d.ts +1 -1
  218. package/react/components/downloadManager/DownloadManager.d.ts.map +1 -1
  219. package/react/components/downloadManager/DownloadManager.js +2 -4
  220. package/react/components/downloadManager/DownloadManager.js.map +1 -1
  221. package/react/components/fdc3Resolver/ResolverContainer.d.ts +6 -0
  222. package/react/components/fdc3Resolver/ResolverContainer.d.ts.map +1 -1
  223. package/react/components/fdc3Resolver/ResolverContainer.js +37 -89
  224. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  225. package/react/components/fdc3Resolver/ResolverDialog.d.ts +10 -1
  226. package/react/components/fdc3Resolver/ResolverDialog.d.ts.map +1 -1
  227. package/react/components/fdc3Resolver/ResolverDialog.js +78 -66
  228. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  229. package/react/components/icon/Icon.js +1 -1
  230. package/react/components/icon/Icon.js.map +1 -1
  231. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  232. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts.map +1 -1
  233. package/react/components/linker/remoteRedux.d.ts +2 -9
  234. package/react/components/linker/remoteRedux.d.ts.map +1 -1
  235. package/react/components/linker/remoteRedux.js +2 -22
  236. package/react/components/linker/remoteRedux.js.map +1 -1
  237. package/react/components/notifications/components/shared/IconButton.d.ts +1 -1
  238. package/react/components/notifications/components/shared/IconButton.d.ts.map +1 -1
  239. package/react/components/notifications/components/shared/IconButton.js +2 -2
  240. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  241. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  242. package/react/components/notifications/components/shared/NotificationCardShell.d.ts.map +1 -1
  243. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  244. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts.map +1 -1
  245. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  246. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts.map +1 -1
  247. package/react/components/notifications/css/notification-center.css +2 -0
  248. package/react/components/processMonitor/ProcessMonitor.d.ts.map +1 -1
  249. package/react/components/processMonitor/ProcessMonitor.js +14 -36
  250. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  251. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +0 -4
  252. package/react/components/processMonitor/ProcessMonitorTypes.d.ts.map +1 -1
  253. package/react/components/processMonitor/ProcessMonitorTypes.js +1 -5
  254. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  255. package/react/components/processMonitor/components/ChildWindow.d.ts +2 -3
  256. package/react/components/processMonitor/components/ChildWindow.d.ts.map +1 -1
  257. package/react/components/processMonitor/components/ChildWindow.js +5 -9
  258. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  259. package/react/components/processMonitor/components/ListHeader.d.ts +1 -5
  260. package/react/components/processMonitor/components/ListHeader.d.ts.map +1 -1
  261. package/react/components/processMonitor/components/ListHeader.js +3 -2
  262. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  263. package/react/components/processMonitor/components/Process.d.ts +10 -0
  264. package/react/components/processMonitor/components/Process.d.ts.map +1 -0
  265. package/react/components/processMonitor/components/Process.js +11 -0
  266. package/react/components/processMonitor/components/Process.js.map +1 -0
  267. package/react/components/processMonitor/components/ProcessStatistics.d.ts +5 -4
  268. package/react/components/processMonitor/components/ProcessStatistics.d.ts.map +1 -1
  269. package/react/components/processMonitor/components/ProcessStatistics.js +10 -7
  270. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  271. package/react/components/processMonitor/constants.d.ts +1 -2
  272. package/react/components/processMonitor/constants.d.ts.map +1 -1
  273. package/react/components/processMonitor/constants.js +2 -8
  274. package/react/components/processMonitor/constants.js.map +1 -1
  275. package/react/components/processMonitor/helpers.d.ts +0 -1
  276. package/react/components/processMonitor/helpers.d.ts.map +1 -1
  277. package/react/components/processMonitor/helpers.js +2 -9
  278. package/react/components/processMonitor/helpers.js.map +1 -1
  279. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +0 -4
  280. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts.map +1 -1
  281. package/react/components/processMonitor/stores/ProcessMonitorStore.js +0 -29
  282. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  283. package/react/components/sdd/Content.d.ts +9 -0
  284. package/react/components/sdd/Content.d.ts.map +1 -0
  285. package/react/components/sdd/Content.js +7 -0
  286. package/react/components/sdd/Content.js.map +1 -0
  287. package/react/components/sdd/Dashboard.d.ts +20 -0
  288. package/react/components/sdd/Dashboard.d.ts.map +1 -0
  289. package/react/components/sdd/Dashboard.js +103 -0
  290. package/react/components/sdd/Dashboard.js.map +1 -0
  291. package/react/components/sdd/Export.d.ts +24 -0
  292. package/react/components/sdd/Export.d.ts.map +1 -0
  293. package/react/components/sdd/Export.js +133 -0
  294. package/react/components/sdd/Export.js.map +1 -0
  295. package/react/components/sdd/ExportCloud.d.ts +7 -0
  296. package/react/components/sdd/ExportCloud.d.ts.map +1 -0
  297. package/react/components/sdd/ExportCloud.js +38 -0
  298. package/react/components/sdd/ExportCloud.js.map +1 -0
  299. package/react/components/sdd/ExportDeployInfo.d.ts +3 -0
  300. package/react/components/sdd/ExportDeployInfo.d.ts.map +1 -0
  301. package/react/components/sdd/ExportDeployInfo.js +18 -0
  302. package/react/components/sdd/ExportDeployInfo.js.map +1 -0
  303. package/react/components/sdd/ExportZip.d.ts +7 -0
  304. package/react/components/sdd/ExportZip.d.ts.map +1 -0
  305. package/react/components/sdd/ExportZip.js +43 -0
  306. package/react/components/sdd/ExportZip.js.map +1 -0
  307. package/react/components/sdd/ProjectErrors.d.ts +12 -0
  308. package/react/components/sdd/ProjectErrors.d.ts.map +1 -0
  309. package/react/components/sdd/ProjectErrors.js +26 -0
  310. package/react/components/sdd/ProjectErrors.js.map +1 -0
  311. package/react/components/sdd/ProjectMasonry.d.ts +13 -0
  312. package/react/components/sdd/ProjectMasonry.d.ts.map +1 -0
  313. package/react/components/sdd/ProjectMasonry.js +22 -0
  314. package/react/components/sdd/ProjectMasonry.js.map +1 -0
  315. package/react/components/sdd/Publish.d.ts +9 -0
  316. package/react/components/sdd/Publish.d.ts.map +1 -0
  317. package/react/components/sdd/Publish.js +113 -0
  318. package/react/components/sdd/Publish.js.map +1 -0
  319. package/react/components/sdd/PublishProgress.d.ts +10 -0
  320. package/react/components/sdd/PublishProgress.d.ts.map +1 -0
  321. package/react/components/sdd/PublishProgress.js +24 -0
  322. package/react/components/sdd/PublishProgress.js.map +1 -0
  323. package/react/components/sdd/View.d.ts +9 -0
  324. package/react/components/sdd/View.d.ts.map +1 -0
  325. package/react/components/sdd/View.js +7 -0
  326. package/react/components/sdd/View.js.map +1 -0
  327. package/react/components/sdd/css/addApp.css +62 -8
  328. package/react/components/sdd/css/appD.css +81 -0
  329. package/react/components/sdd/css/appDViewer.css +93 -0
  330. package/react/components/sdd/css/applications.css +53 -15
  331. package/react/components/sdd/css/exportAppD.css +31 -0
  332. package/react/components/sdd/css/horizontalScroll.css +9 -0
  333. package/react/components/sdd/css/project-header.css +2 -1
  334. package/react/components/sdd/css/views.css +3 -0
  335. package/react/components/sdd/smartDesktopClient.d.ts +627 -0
  336. package/react/components/sdd/smartDesktopClient.d.ts.map +1 -0
  337. package/react/components/sdd/smartDesktopClient.js +1222 -0
  338. package/react/components/sdd/smartDesktopClient.js.map +1 -0
  339. package/react/components/sdd/types.d.ts +9 -0
  340. package/react/components/sdd/types.d.ts.map +1 -0
  341. package/react/components/sdd/types.js +2 -0
  342. package/react/components/sdd/types.js.map +1 -0
  343. package/react/components/search/SearchInput.d.ts +1 -2
  344. package/react/components/search/SearchInput.d.ts.map +1 -1
  345. package/react/components/search/SearchInput.js +11 -13
  346. package/react/components/search/SearchInput.js.map +1 -1
  347. package/react/components/search/SearchResults.d.ts.map +1 -1
  348. package/react/components/search/SearchResults.js +6 -6
  349. package/react/components/search/SearchResults.js.map +1 -1
  350. package/react/components/shared/openQuitConfirmationDialog.d.ts.map +1 -1
  351. package/react/components/shared/openQuitConfirmationDialog.js +31 -4
  352. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  353. package/react/components/singleInputDialog/SingleInputDialog.d.ts.map +1 -1
  354. package/react/components/singleInputDialog/SingleInputDialog.js +83 -100
  355. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  356. package/react/components/toolbar/DownloadButton.d.ts +1 -1
  357. package/react/components/toolbar/DownloadButton.d.ts.map +1 -1
  358. package/react/components/toolbar/DownloadButton.js +3 -6
  359. package/react/components/toolbar/DownloadButton.js.map +1 -1
  360. package/react/components/toolbar/DragHandle.d.ts.map +1 -1
  361. package/react/components/toolbar/DragHandle.js +8 -5
  362. package/react/components/toolbar/DragHandle.js.map +1 -1
  363. package/react/components/toolbar/ToolbarIcon.d.ts.map +1 -1
  364. package/react/components/toolbar/ToolbarIcon.js +10 -1
  365. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  366. package/react/components/toolbar/ToolbarShell.d.ts +1 -0
  367. package/react/components/toolbar/ToolbarShell.d.ts.map +1 -1
  368. package/react/components/toolbar/ToolbarShell.js +3 -2
  369. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  370. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts.map +1 -1
  371. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +3 -0
  372. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  373. package/react/components/userPreferences/components/content/Workspaces.d.ts +5 -0
  374. package/react/components/userPreferences/components/content/Workspaces.d.ts.map +1 -1
  375. package/react/components/userPreferences/components/content/Workspaces.js +14 -1
  376. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  377. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts.map +1 -1
  378. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +1 -1
  379. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  380. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts.map +1 -1
  381. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +1 -1
  382. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  383. package/react/components/utils.d.ts +50 -0
  384. package/react/components/utils.d.ts.map +1 -0
  385. package/react/components/utils.js +60 -0
  386. package/react/components/utils.js.map +1 -0
  387. package/react/components/windowTitleBar/AlwaysOnTopButton.d.ts +9 -0
  388. package/react/components/windowTitleBar/AlwaysOnTopButton.d.ts.map +1 -0
  389. package/react/components/windowTitleBar/AlwaysOnTopButton.js +29 -0
  390. package/react/components/windowTitleBar/AlwaysOnTopButton.js.map +1 -0
  391. package/react/components/windowTitleBar/CloseButton.d.ts.map +1 -0
  392. package/react/components/windowTitleBar/CloseButton.js +22 -0
  393. package/react/components/windowTitleBar/CloseButton.js.map +1 -0
  394. package/react/components/windowTitleBar/GroupingButton.d.ts +3 -0
  395. package/react/components/windowTitleBar/GroupingButton.d.ts.map +1 -0
  396. package/react/components/windowTitleBar/GroupingButton.js +25 -0
  397. package/react/components/windowTitleBar/GroupingButton.js.map +1 -0
  398. package/react/components/windowTitleBar/LinkerButton.d.ts.map +1 -0
  399. package/react/components/windowTitleBar/{components/left/LinkerButton.js → LinkerButton.js} +4 -4
  400. package/react/components/windowTitleBar/LinkerButton.js.map +1 -0
  401. package/react/components/windowTitleBar/LinkerButtonDeprecated.d.ts +11 -0
  402. package/react/components/windowTitleBar/LinkerButtonDeprecated.d.ts.map +1 -0
  403. package/react/components/windowTitleBar/LinkerButtonDeprecated.js +63 -0
  404. package/react/components/windowTitleBar/LinkerButtonDeprecated.js.map +1 -0
  405. package/react/components/windowTitleBar/LinkerGroups.d.ts.map +1 -0
  406. package/react/components/windowTitleBar/{components/left/LinkerGroups.js → LinkerGroups.js} +2 -3
  407. package/react/components/windowTitleBar/LinkerGroups.js.map +1 -0
  408. package/react/components/windowTitleBar/LinkerGroupsDeprecated.d.ts +7 -0
  409. package/react/components/windowTitleBar/LinkerGroupsDeprecated.d.ts.map +1 -0
  410. package/react/components/windowTitleBar/LinkerGroupsDeprecated.js +35 -0
  411. package/react/components/windowTitleBar/LinkerGroupsDeprecated.js.map +1 -0
  412. package/react/components/windowTitleBar/MaximizeButton.d.ts +3 -0
  413. package/react/components/windowTitleBar/MaximizeButton.d.ts.map +1 -0
  414. package/react/components/windowTitleBar/MaximizeButton.js +18 -0
  415. package/react/components/windowTitleBar/MaximizeButton.js.map +1 -0
  416. package/react/components/windowTitleBar/MinimizeButton.d.ts +3 -0
  417. package/react/components/windowTitleBar/MinimizeButton.d.ts.map +1 -0
  418. package/react/components/windowTitleBar/MinimizeButton.js +21 -0
  419. package/react/components/windowTitleBar/MinimizeButton.js.map +1 -0
  420. package/react/components/windowTitleBar/ShareButton.d.ts +3 -0
  421. package/react/components/windowTitleBar/ShareButton.d.ts.map +1 -0
  422. package/react/components/windowTitleBar/ShareButton.js +24 -0
  423. package/react/components/windowTitleBar/ShareButton.js.map +1 -0
  424. package/react/components/windowTitleBar/TabRegion.d.ts +7 -0
  425. package/react/components/windowTitleBar/TabRegion.d.ts.map +1 -0
  426. package/react/components/windowTitleBar/TabRegion.js +479 -0
  427. package/react/components/windowTitleBar/TabRegion.js.map +1 -0
  428. package/react/components/windowTitleBar/TabTitle.d.ts +8 -0
  429. package/react/components/windowTitleBar/TabTitle.d.ts.map +1 -0
  430. package/react/components/windowTitleBar/TabTitle.js +17 -0
  431. package/react/components/windowTitleBar/TabTitle.js.map +1 -0
  432. package/react/components/windowTitleBar/TitleEdit.d.ts +10 -0
  433. package/react/components/windowTitleBar/TitleEdit.d.ts.map +1 -0
  434. package/react/components/windowTitleBar/TitleEdit.js +30 -0
  435. package/react/components/windowTitleBar/TitleEdit.js.map +1 -0
  436. package/react/components/windowTitleBar/WindowTitleBarContext.d.ts +12 -0
  437. package/react/components/windowTitleBar/WindowTitleBarContext.d.ts.map +1 -0
  438. package/react/components/windowTitleBar/WindowTitleBarContext.js +3 -0
  439. package/react/components/windowTitleBar/WindowTitleBarContext.js.map +1 -0
  440. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +14 -272
  441. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts.map +1 -1
  442. package/react/components/windowTitleBar/WindowTitleBarShell.js +41 -929
  443. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  444. package/react/components/windowTitleBar/index.d.ts +9 -8
  445. package/react/components/windowTitleBar/index.d.ts.map +1 -1
  446. package/react/components/windowTitleBar/index.js +9 -8
  447. package/react/components/windowTitleBar/index.js.map +1 -1
  448. package/react/components/windowTitleBar/useKeyboardNavigation.d.ts +7 -0
  449. package/react/components/windowTitleBar/useKeyboardNavigation.d.ts.map +1 -0
  450. package/react/components/windowTitleBar/useKeyboardNavigation.js +57 -0
  451. package/react/components/windowTitleBar/useKeyboardNavigation.js.map +1 -0
  452. package/react/components/windowTitleBar/useMaximize.d.ts +5 -0
  453. package/react/components/windowTitleBar/useMaximize.d.ts.map +1 -0
  454. package/react/components/windowTitleBar/useMaximize.js +23 -0
  455. package/react/components/windowTitleBar/useMaximize.js.map +1 -0
  456. package/react/components/yesNoDialog/timer.js +2 -1
  457. package/react/components/yesNoDialog/timer.js.map +1 -1
  458. package/react/hooks/useDashbar.d.ts.map +1 -1
  459. package/react/hooks/useDashbar.js.map +1 -1
  460. package/react/hooks/useDragRegion.d.ts +27 -0
  461. package/react/hooks/useDragRegion.d.ts.map +1 -0
  462. package/react/hooks/useDragRegion.js +74 -0
  463. package/react/hooks/useDragRegion.js.map +1 -0
  464. package/react/hooks/useInjectedTitleBar.d.ts +3 -0
  465. package/react/hooks/useInjectedTitleBar.d.ts.map +1 -0
  466. package/react/hooks/useInjectedTitleBar.js +437 -0
  467. package/react/hooks/useInjectedTitleBar.js.map +1 -0
  468. package/react/hooks/useNotifications.d.ts +1 -1
  469. package/react/hooks/useToolbar.d.ts +1 -0
  470. package/react/hooks/useToolbar.d.ts.map +1 -1
  471. package/react/hooks/useToolbar.js +13 -3
  472. package/react/hooks/useToolbar.js.map +1 -1
  473. package/react/reducers/rootReducer.d.ts +12 -0
  474. package/react/reducers/rootReducer.d.ts.map +1 -1
  475. package/react/reducers/smartDesktopDesignerReducer.d.ts.map +1 -1
  476. package/react/reducers/smartDesktopDesignerReducer.js +12 -0
  477. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  478. package/react/store.d.ts +24 -0
  479. package/react/store.d.ts.map +1 -1
  480. package/react/types/smartDesktopDesignerTypes.d.ts +42 -1
  481. package/react/types/smartDesktopDesignerTypes.d.ts.map +1 -1
  482. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  483. package/typedefs/FDC3/api/AppMetadata.d.ts +1 -0
  484. package/typedefs/FDC3/api/AppMetadata.d.ts.map +1 -1
  485. package/typedoc-types.d.ts +9 -0
  486. package/typedoc-types.d.ts.map +1 -0
  487. package/typedoc-types.js +6 -0
  488. package/typedoc-types.js.map +1 -0
  489. package/types.d.ts +5 -11
  490. package/types.d.ts.map +1 -1
  491. package/types.js +2 -0
  492. package/types.js.map +1 -1
  493. package/common/events/PrivateEventManager.d.ts +0 -95
  494. package/common/events/PrivateEventManager.d.ts.map +0 -1
  495. package/common/events/PrivateEventManager.js +0 -295
  496. package/common/events/PrivateEventManager.js.map +0 -1
  497. package/common/events/PrivateFinsembleEvent.d.ts +0 -30
  498. package/common/events/PrivateFinsembleEvent.d.ts.map +0 -1
  499. package/common/events/PrivateFinsembleEvent.js +0 -65
  500. package/common/events/PrivateFinsembleEvent.js.map +0 -1
  501. package/common/redux/createReducer.d.ts +0 -128
  502. package/common/redux/createReducer.d.ts.map +0 -1
  503. package/common/redux/createReducer.js +0 -298
  504. package/common/redux/createReducer.js.map +0 -1
  505. package/common/redux/index.d.ts +0 -3
  506. package/common/redux/index.d.ts.map +0 -1
  507. package/common/redux/index.js +0 -3
  508. package/common/redux/index.js.map +0 -1
  509. package/platform/services/window/Common/Pools/ObjectPool.d.ts +0 -11
  510. package/platform/services/window/Common/Pools/ObjectPool.d.ts.map +0 -1
  511. package/platform/services/window/Common/Pools/ObjectPool.js +0 -43
  512. package/platform/services/window/Common/Pools/ObjectPool.js.map +0 -1
  513. package/platform/services/window/Common/Pools/PoolSingletons.d.ts +0 -10
  514. package/platform/services/window/Common/Pools/PoolSingletons.d.ts.map +0 -1
  515. package/platform/services/window/Common/Pools/PoolSingletons.js +0 -10
  516. package/platform/services/window/Common/Pools/PoolSingletons.js.map +0 -1
  517. package/platform/services/window/Common/Pools/WindowPool.d.ts +0 -7
  518. package/platform/services/window/Common/Pools/WindowPool.d.ts.map +0 -1
  519. package/platform/services/window/Common/Pools/WindowPool.js +0 -16
  520. package/platform/services/window/Common/Pools/WindowPool.js.map +0 -1
  521. package/platform/services/window/Docking/boxMath.d.ts +0 -144
  522. package/platform/services/window/Docking/boxMath.d.ts.map +0 -1
  523. package/platform/services/window/Docking/boxMath.js +0 -511
  524. package/platform/services/window/Docking/boxMath.js.map +0 -1
  525. package/platform/services/window/Docking/constants.d.ts +0 -29
  526. package/platform/services/window/Docking/constants.d.ts.map +0 -1
  527. package/platform/services/window/Docking/constants.js +0 -29
  528. package/platform/services/window/Docking/constants.js.map +0 -1
  529. package/platform/services/window/Docking/dockableBox.d.ts +0 -117
  530. package/platform/services/window/Docking/dockableBox.d.ts.map +0 -1
  531. package/platform/services/window/Docking/dockableBox.js +0 -525
  532. package/platform/services/window/Docking/dockableBox.js.map +0 -1
  533. package/platform/services/window/Docking/dockableGroup.d.ts +0 -252
  534. package/platform/services/window/Docking/dockableGroup.d.ts.map +0 -1
  535. package/platform/services/window/Docking/dockableGroup.js +0 -1054
  536. package/platform/services/window/Docking/dockableGroup.js.map +0 -1
  537. package/platform/services/window/Docking/dockableMonitor.d.ts +0 -99
  538. package/platform/services/window/Docking/dockableMonitor.d.ts.map +0 -1
  539. package/platform/services/window/Docking/dockableMonitor.js +0 -427
  540. package/platform/services/window/Docking/dockableMonitor.js.map +0 -1
  541. package/platform/services/window/Docking/dockableWindow.d.ts +0 -272
  542. package/platform/services/window/Docking/dockableWindow.d.ts.map +0 -1
  543. package/platform/services/window/Docking/dockableWindow.js +0 -1239
  544. package/platform/services/window/Docking/dockableWindow.js.map +0 -1
  545. package/platform/services/window/Docking/dockingCalculator.d.ts +0 -741
  546. package/platform/services/window/Docking/dockingCalculator.d.ts.map +0 -1
  547. package/platform/services/window/Docking/dockingCalculator.js +0 -3438
  548. package/platform/services/window/Docking/dockingCalculator.js.map +0 -1
  549. package/platform/services/window/Docking/dockingMain.d.ts +0 -349
  550. package/platform/services/window/Docking/dockingMain.d.ts.map +0 -1
  551. package/platform/services/window/Docking/dockingMain.js +0 -2541
  552. package/platform/services/window/Docking/dockingMain.js.map +0 -1
  553. package/platform/services/window/Docking/maskBoundsCalculator.d.ts +0 -28
  554. package/platform/services/window/Docking/maskBoundsCalculator.d.ts.map +0 -1
  555. package/platform/services/window/Docking/maskBoundsCalculator.js +0 -67
  556. package/platform/services/window/Docking/maskBoundsCalculator.js.map +0 -1
  557. package/platform/services/window/Docking/monitorUpdateHandler.d.ts +0 -32
  558. package/platform/services/window/Docking/monitorUpdateHandler.d.ts.map +0 -1
  559. package/platform/services/window/Docking/monitorUpdateHandler.js +0 -117
  560. package/platform/services/window/Docking/monitorUpdateHandler.js.map +0 -1
  561. package/platform/services/window/Docking/types.d.ts +0 -334
  562. package/platform/services/window/Docking/types.d.ts.map +0 -1
  563. package/platform/services/window/Docking/types.js +0 -12
  564. package/platform/services/window/Docking/types.js.map +0 -1
  565. package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts +0 -90
  566. package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts.map +0 -1
  567. package/platform/services/window/MultiWindowFeatures/autoArrange.js +0 -510
  568. package/platform/services/window/MultiWindowFeatures/autoArrange.js.map +0 -1
  569. package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts +0 -411
  570. package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts.map +0 -1
  571. package/platform/services/window/StackedWindowManager/stackedWindowManager.js +0 -1641
  572. package/platform/services/window/StackedWindowManager/stackedWindowManager.js.map +0 -1
  573. package/platform/services/window/WindowAbstractions/BaseWindow.d.ts +0 -469
  574. package/platform/services/window/WindowAbstractions/BaseWindow.d.ts.map +0 -1
  575. package/platform/services/window/WindowAbstractions/BaseWindow.js +0 -1347
  576. package/platform/services/window/WindowAbstractions/BaseWindow.js.map +0 -1
  577. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts +0 -9
  578. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts.map +0 -1
  579. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js +0 -23
  580. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js.map +0 -1
  581. package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts +0 -227
  582. package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts.map +0 -1
  583. package/platform/services/window/WindowAbstractions/WebWindowWrapper.js +0 -1168
  584. package/platform/services/window/WindowAbstractions/WebWindowWrapper.js.map +0 -1
  585. package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts +0 -121
  586. package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts.map +0 -1
  587. package/platform/services/window/WindowAbstractions/externalWindowWrapper.js +0 -591
  588. package/platform/services/window/WindowAbstractions/externalWindowWrapper.js.map +0 -1
  589. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts +0 -194
  590. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts.map +0 -1
  591. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js +0 -680
  592. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js.map +0 -1
  593. package/platform/services/window/windowGroup.d.ts +0 -86
  594. package/platform/services/window/windowGroup.d.ts.map +0 -1
  595. package/platform/services/window/windowGroup.js +0 -323
  596. package/platform/services/window/windowGroup.js.map +0 -1
  597. package/platform/services/workspace/windowStorageManager.d.ts +0 -180
  598. package/platform/services/workspace/windowStorageManager.d.ts.map +0 -1
  599. package/platform/services/workspace/windowStorageManager.js +0 -195
  600. package/platform/services/workspace/windowStorageManager.js.map +0 -1
  601. package/react/assets/icons/question-circle.svg +0 -6
  602. package/react/components/legacyControls/FinsembleHoverDetector.d.ts +0 -23
  603. package/react/components/legacyControls/FinsembleHoverDetector.d.ts.map +0 -1
  604. package/react/components/legacyControls/FinsembleHoverDetector.js +0 -57
  605. package/react/components/legacyControls/FinsembleHoverDetector.js.map +0 -1
  606. package/react/components/sdd/Appearance.helpers.d.ts +0 -2
  607. package/react/components/sdd/Appearance.helpers.d.ts.map +0 -1
  608. package/react/components/sdd/Appearance.helpers.js +0 -2
  609. package/react/components/sdd/Appearance.helpers.js.map +0 -1
  610. package/react/components/shared/linkerUtil.d.ts +0 -4
  611. package/react/components/shared/linkerUtil.d.ts.map +0 -1
  612. package/react/components/shared/linkerUtil.js +0 -10
  613. package/react/components/shared/linkerUtil.js.map +0 -1
  614. package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -31
  615. package/react/components/windowTitleBar/components/center/Tab.d.ts.map +0 -1
  616. package/react/components/windowTitleBar/components/center/Tab.js +0 -58
  617. package/react/components/windowTitleBar/components/center/Tab.js.map +0 -1
  618. package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -138
  619. package/react/components/windowTitleBar/components/center/TabList.d.ts.map +0 -1
  620. package/react/components/windowTitleBar/components/center/TabList.js +0 -614
  621. package/react/components/windowTitleBar/components/center/TabList.js.map +0 -1
  622. package/react/components/windowTitleBar/components/center/TabRegion.d.ts +0 -3
  623. package/react/components/windowTitleBar/components/center/TabRegion.d.ts.map +0 -1
  624. package/react/components/windowTitleBar/components/center/TabRegion.js +0 -13
  625. package/react/components/windowTitleBar/components/center/TabRegion.js.map +0 -1
  626. package/react/components/windowTitleBar/components/left/LinkerButton.d.ts.map +0 -1
  627. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +0 -1
  628. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +0 -85
  629. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts.map +0 -1
  630. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +0 -172
  631. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +0 -1
  632. package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts.map +0 -1
  633. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +0 -1
  634. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +0 -50
  635. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts.map +0 -1
  636. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +0 -120
  637. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +0 -1
  638. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +0 -42
  639. package/react/components/windowTitleBar/components/left/ShareButton.d.ts.map +0 -1
  640. package/react/components/windowTitleBar/components/left/ShareButton.js +0 -82
  641. package/react/components/windowTitleBar/components/left/ShareButton.js.map +0 -1
  642. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.d.ts +0 -3
  643. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.d.ts.map +0 -1
  644. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +0 -15
  645. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +0 -1
  646. package/react/components/windowTitleBar/components/right/CloseButton.d.ts.map +0 -1
  647. package/react/components/windowTitleBar/components/right/CloseButton.js +0 -16
  648. package/react/components/windowTitleBar/components/right/CloseButton.js.map +0 -1
  649. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +0 -50
  650. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts.map +0 -1
  651. package/react/components/windowTitleBar/components/right/GroupingButton.js +0 -82
  652. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +0 -1
  653. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +0 -59
  654. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts.map +0 -1
  655. package/react/components/windowTitleBar/components/right/MaximizeButton.js +0 -96
  656. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +0 -1
  657. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +0 -26
  658. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts.map +0 -1
  659. package/react/components/windowTitleBar/components/right/MinimizeButton.js +0 -32
  660. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +0 -1
  661. package/react/components/windowTitleBar/components/windowTitle.d.ts +0 -67
  662. package/react/components/windowTitleBar/components/windowTitle.d.ts.map +0 -1
  663. package/react/components/windowTitleBar/components/windowTitle.js +0 -382
  664. package/react/components/windowTitleBar/components/windowTitle.js.map +0 -1
  665. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +0 -69
  666. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts.map +0 -1
  667. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +0 -610
  668. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +0 -1
  669. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +0 -44
  670. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts.map +0 -1
  671. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js +0 -43
  672. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +0 -1
  673. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +0 -23
  674. package/react/components/windowTitleBar/windowTitleBarContext.d.ts.map +0 -1
  675. package/react/components/windowTitleBar/windowTitleBarContext.js +0 -22
  676. package/react/components/windowTitleBar/windowTitleBarContext.js.map +0 -1
  677. package/react/types/windowTitleBar.d.ts +0 -49
  678. package/react/types/windowTitleBar.d.ts.map +0 -1
  679. package/react/types/windowTitleBar.js +0 -2
  680. package/react/types/windowTitleBar.js.map +0 -1
  681. /package/react/components/windowTitleBar/{components/right/CloseButton.d.ts → CloseButton.d.ts} +0 -0
  682. /package/react/components/windowTitleBar/{components/left/LinkerButton.d.ts → LinkerButton.d.ts} +0 -0
  683. /package/react/components/windowTitleBar/{components/left/LinkerGroups.d.ts → LinkerGroups.d.ts} +0 -0
@@ -1,2541 +0,0 @@
1
- import { isEqualIgnoringArrayOrder } from "../../../../common/util";
2
- import * as util from "../../../../common/util";
3
- import DockingCalculator from "./dockingCalculator";
4
- import { FinsembleWindowInternal } from "../WindowAbstractions/FinsembleWindowInternal";
5
- import { BaseWindow } from "../WindowAbstractions/BaseWindow";
6
- import AutoArrange from "../MultiWindowFeatures/autoArrange";
7
- import { System } from "../../../../common/system";
8
- import DockableWindow from "./dockableWindow";
9
- import BoxMath from "./boxMath";
10
- import { RouterClient } from "../../../../clients/routerClient";
11
- import LauncherClient from "../../../../clients/launcherClient";
12
- import ConfigClient from "../../../../clients/configClient";
13
- import { Logger } from "../../../../clients/logger";
14
- import * as constants from "../../../../common/constants";
15
- import { deriveWindowPosition, splitWindowMoves } from "./monitorUpdateHandler";
16
- import SystemManagerClient from "../../../../common/systemManagerClient";
17
- import { WINDOWSTATE } from "../../../../common/constants";
18
- import { getAllMonitors, adjustBoundsToBeOnMonitor, onMonitorsChanged } from "../../../../common/Monitors";
19
- import { DockingPoolSingleton, MonitorPoolSingleton } from "../Common/Pools/PoolSingletons";
20
- import { DockableMonitor } from "./dockableMonitor";
21
- import uuidv4 from "uuid-random";
22
- Logger.start();
23
- const DockingMain_AUTO_ARRANGE_CHANNEL = "DockingService.AutoArrangeStatus";
24
- let serviceConfig = {};
25
- let groupData = {};
26
- const { APPLICATION_STATE_CHANNEL } = constants;
27
- // Paste this into a toolbar's console.
28
- // [1,2,3,4,5].forEach(num => FSBL.Clients.LauncherClient.spawn("Welcome Component", {name: "window" + num, addToWorkspace: true}))
29
- const clone = function (obj) {
30
- // This has been tested a good amount. Previous to this commit we were using a mix of deepmerge and JSON.parse(JSON.stringify()).
31
- // Trying lodash/deepclone made my tests take 2-3s.
32
- // JSON.parse everywhere made them take ~ 1s.
33
- // Using JSON.parse on arrays and deep merge on objects makes them take 7-900ms.
34
- if (Array.isArray(obj)) {
35
- return obj.slice();
36
- }
37
- try {
38
- return JSON.parse(JSON.stringify(obj));
39
- }
40
- catch (e) {
41
- Logger.system.error("clone error", e);
42
- return e;
43
- }
44
- };
45
- const CALCULATOR = {
46
- addWindow: Function.prototype,
47
- removeWindow: Function.prototype,
48
- getBoundsOfGroupWindows: Function.prototype,
49
- cleanupSharedEdges: Function.prototype,
50
- };
51
- /**
52
- * Takes any Bounds type that may or may not have all fields filled in (e.g. right or width)
53
- * and returns a CompleteBounds with all fields computed.
54
- *
55
- * At least left & right, or left & width, or right & width must be provided or the calculation will be zero
56
- * At least top & bottom, or top & height, or bottom & height must be provided or the calculation will be zero
57
- */
58
- const completeBounds = (source) => {
59
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
60
- const left = (_a = source.left) !== null && _a !== void 0 ? _a : ((_b = source.right) !== null && _b !== void 0 ? _b : 0) - ((_c = source.width) !== null && _c !== void 0 ? _c : 0);
61
- const right = (_d = source.right) !== null && _d !== void 0 ? _d : left + ((_e = source.width) !== null && _e !== void 0 ? _e : 0);
62
- const width = (_f = source.width) !== null && _f !== void 0 ? _f : right - left;
63
- const top = (_g = source.top) !== null && _g !== void 0 ? _g : ((_h = source.bottom) !== null && _h !== void 0 ? _h : 0) - ((_j = source.height) !== null && _j !== void 0 ? _j : 0);
64
- const bottom = (_k = source.bottom) !== null && _k !== void 0 ? _k : top + ((_l = source.height) !== null && _l !== void 0 ? _l : 0);
65
- const height = (_m = source.height) !== null && _m !== void 0 ? _m : bottom - top;
66
- return {
67
- left,
68
- right,
69
- top,
70
- bottom,
71
- width,
72
- height,
73
- };
74
- };
75
- /**
76
- * Shows the scrim occupying half the of the group or window bounds specified in bounds on the side specified by edge.
77
- *
78
- * @param {any} edge
79
- * @param {any} bounds
80
- * @returns
81
- */
82
- const scrimShower = (edge, bounds) => {
83
- const maskBounds = Object.assign({}, bounds);
84
- const newWindowBounds = Object.assign({}, bounds);
85
- switch (edge) {
86
- case "full": // This is for swapping
87
- break;
88
- case "top":
89
- maskBounds.height = Math.round(bounds.height / 2);
90
- maskBounds.bottom = maskBounds.top + maskBounds.height;
91
- newWindowBounds.top = maskBounds.bottom;
92
- newWindowBounds.height = bounds.height - maskBounds.height;
93
- // Recalculate so it isn't affected by rounding errors.
94
- newWindowBounds.bottom = newWindowBounds.top + newWindowBounds.height;
95
- break;
96
- case "left":
97
- maskBounds.width = Math.round(bounds.width / 2);
98
- maskBounds.right = maskBounds.left + maskBounds.width;
99
- newWindowBounds.left = maskBounds.right;
100
- newWindowBounds.width = bounds.width - maskBounds.width;
101
- // Recalculate so it isn't affected by rounding errors.
102
- newWindowBounds.right = newWindowBounds.left + newWindowBounds.width;
103
- break;
104
- case "bottom":
105
- maskBounds.height = Math.round(bounds.height / 2);
106
- maskBounds.top = maskBounds.bottom - maskBounds.height;
107
- newWindowBounds.bottom = maskBounds.top;
108
- newWindowBounds.height = bounds.height - maskBounds.height;
109
- // Recalculate so it isn't affected by rounding errors.
110
- newWindowBounds.top = newWindowBounds.bottom - newWindowBounds.height;
111
- break;
112
- case "right":
113
- maskBounds.width = Math.round(bounds.width / 2);
114
- maskBounds.left = maskBounds.left + maskBounds.width;
115
- newWindowBounds.right = maskBounds.left;
116
- newWindowBounds.width = bounds.width - maskBounds.width;
117
- // Recalculate so it isn't affected by rounding errors.
118
- newWindowBounds.left = newWindowBounds.right - newWindowBounds.width;
119
- break;
120
- default:
121
- break;
122
- }
123
- return {
124
- maskBounds,
125
- newWindowBounds,
126
- };
127
- };
128
- class DockingMain extends DockingCalculator {
129
- constructor(params, monitorsInstance) {
130
- super(monitorsInstance);
131
- // for reverting autoArrange
132
- this.cachedPositions = {};
133
- this.registrationPending = {};
134
- this.deregistrationPending = {};
135
- this.activeWorkspace = { name: "", guid: "" };
136
- this.isWindows = true;
137
- this.applicationState = "";
138
- // We're doing this for hole-filling. need to remove the window so that while we're resizing windows, they're unphased by the windows that are resizing.
139
- CALCULATOR.addWindow = super.addWindowInternal.bind(this);
140
- CALCULATOR.removeWindow = super.removeWindowInternal.bind(this);
141
- CALCULATOR.getBoundsOfGroupWindows = super.getBoundsOfGroupWindows.bind(this);
142
- CALCULATOR.cleanupSharedEdges = super.cleanupSharedEdges.bind(this);
143
- this.AutoArrange = new AutoArrange({
144
- DockingCalculator: this,
145
- });
146
- // For disabling tabbing or tiling
147
- this.tabbingEnabled = typeof params.tabbingEnabled !== undefined ? params.tabbingEnabled : false;
148
- this.tilingEnabled = typeof params.tilingEnabled !== undefined ? params.tilingEnabled : false;
149
- // Determined by services config. Set when docking is constructed.
150
- this.enableWindowsAeroSnap = false;
151
- // Default height and width for a dockableComponent. This comes from the main config with
152
- // docking options. These defaults are different from launchers defaults for a given window
153
- this.defaultHeight = params.defaultHeight;
154
- this.defaultWidth = params.defaultWidth;
155
- onMonitorsChanged(this.monitorsChanged.bind(this));
156
- this.bindAllFunctions();
157
- }
158
- bindAllFunctions() {
159
- const self = this;
160
- for (const name of Object.getOwnPropertyNames(Object.getPrototypeOf(self))) {
161
- if (self[name] instanceof Function) {
162
- self[name] = self[name].bind(self); // only bind function properties
163
- }
164
- }
165
- }
166
- defaultDockingOptions(options, MIN_HEIGHT, MIN_WIDTH) {
167
- var _a;
168
- let defaultOptions = {};
169
- // If no options, start with an empty object so that all the lines below don't cause catastrophic failures.
170
- if (!options)
171
- options = {};
172
- const checkForTaskbarOptions = options.hasOwnProperty("options");
173
- defaultOptions.dockable = options.dockable || false;
174
- defaultOptions.ephemeral = options.ephemeral;
175
- defaultOptions.undockedParams = {
176
- width: options.width,
177
- height: options.height,
178
- };
179
- defaultOptions.dockedParams = {
180
- width: options.dockedWidth ? options.dockedWidth : options.width,
181
- height: options.dockedHeight ? options.dockedHeight : options.height,
182
- };
183
- if (!defaultOptions.dockable) {
184
- defaultOptions.startsDocked = false;
185
- }
186
- else {
187
- defaultOptions.startsDocked = options.docked || "top";
188
- }
189
- defaultOptions.overwriteDockedOptions = options.overwriteStartDocked || false;
190
- // If snapping is true, we don't want to ignoreSnappingRequests and vice versa
191
- defaultOptions.ignoreSnappingRequests = typeof options.snapping === "undefined" ? false : !options.snapping;
192
- defaultOptions.showTaskbarIcon = checkForTaskbarOptions ? (_a = options.options) === null || _a === void 0 ? void 0 : _a.showTaskbarIcon : true;
193
- defaultOptions.minHeight = options.minHeight || MIN_HEIGHT;
194
- defaultOptions.maxHeight = options.maxHeight || Infinity;
195
- defaultOptions.minWidth = options.minWidth || MIN_WIDTH;
196
- defaultOptions.maxWidth = options.maxWidth || Infinity;
197
- defaultOptions.claimSpace = {
198
- enabled: false,
199
- };
200
- return defaultOptions;
201
- }
202
- windowServiceChannelName(channelTopic) {
203
- return `WindowService-Request-${channelTopic}`;
204
- }
205
- /**
206
- * Function that sets wether tabbing or tiling is disabled for this instance of DockingMain
207
- *
208
- * @param {object} serviceConfig The service config
209
- */
210
- setTilingOrTabbingEnabled(setTilingOrTabbingEnabledArg) {
211
- let tabbing = true;
212
- let tiling = true;
213
- if (setTilingOrTabbingEnabledArg.hasOwnProperty("tabbing") &&
214
- setTilingOrTabbingEnabledArg.tabbing.hasOwnProperty("enabled")) {
215
- Logger.system.debug(`Setting tabbing prop based on config state: ${setTilingOrTabbingEnabledArg.tabbing.enabled}`);
216
- tabbing = setTilingOrTabbingEnabledArg.tabbing.enabled;
217
- }
218
- if (setTilingOrTabbingEnabledArg.hasOwnProperty("tiling") &&
219
- setTilingOrTabbingEnabledArg.tiling.hasOwnProperty("enabled")) {
220
- Logger.system.debug(`Setting tiling prop based on config state: ${setTilingOrTabbingEnabledArg.tiling.enabled}`);
221
- tiling = setTilingOrTabbingEnabledArg.tiling.enabled;
222
- }
223
- this.tabbingEnabled = tabbing;
224
- this.tilingEnabled = tiling;
225
- }
226
- /**
227
- * Function that runs after a window has completed a move action
228
- *
229
- * @param {object} win The window object
230
- * @param {boolean} triggeredByAutoArrange True if the move was triggered by auto arrange. If the move was triggered by auto arrange, we don't want to delete cached window positions.
231
- */
232
- onMoveComplete(win, triggeredByAutoArrange) {
233
- // If an autoarrangeable window is moved, and the move isn't triggered by auto arrange, we want to wipe the status
234
- if (!triggeredByAutoArrange) {
235
- this.resetAutoArrangeForAWindowsMonitor(win);
236
- }
237
- const movedWin = this.getWindow(win.name);
238
- let groupChanged = this.tellWindowOrGroupToSaveLocation(movedWin);
239
- if (groupChanged) {
240
- this.updateGroupData();
241
- }
242
- }
243
- updateGroupData() {
244
- const changed = this._updateGroupData();
245
- Logger.system.debug("Publishing Group Update: DockingCalc.updateGroupData", changed ? "changed" : "not changed");
246
- if (changed) {
247
- this.publishGroupUpdate();
248
- }
249
- }
250
- /**
251
- * Handler for incoming docking deregistration request for specified window.
252
- * Invoked both by addListener("DockingService.registerWindow") and addListener("DockingService.deregisterWindow").
253
- * @private
254
- */
255
- deregisterWindow(self, err, response) {
256
- const windowName = response.data.name;
257
- // if a registration pending for window, then can't deregister yet, so save deregister request here and process it when registration is complete
258
- if (self.registrationPending[windowName]) {
259
- const deregisterArgs = { err, response }; // save original args to use when later unregistering
260
- self.deregistrationPending[windowName] = deregisterArgs;
261
- Logger.system.info("deregisterWindow: creating pending deregistration", windowName);
262
- }
263
- else {
264
- // no registration pending so continue with deregistration
265
- const registeredWindows = self.getWindowNames();
266
- Logger.system.info("Trying to deregisterWindow", windowName);
267
- if (!registeredWindows.includes(windowName)) {
268
- Logger.system.debug("Window tried to deregister, but never registered", windowName);
269
- return;
270
- }
271
- let win = self.getWindow(windowName);
272
- self.AutoArrange.reconcileStackDeletionWithAutoArrangedWindows(win);
273
- if (response.data.removeFromWorkspace) {
274
- const bounds = win.getBounds();
275
- const movableGroup = self.getMovableGroup(windowName);
276
- const immobileGroup = self.getImmobileGroup(windowName);
277
- const fillHoleInGroup = self.shouldFillHolesInGroups(movableGroup);
278
- self.removeWindowFromAllGroups(win);
279
- self.wipeSnapRelationships(windowName);
280
- self.removeWindow(windowName);
281
- if (movableGroup && fillHoleInGroup) {
282
- Logger.system.debug("docking.deregisterWindow", windowName, movableGroup, fillHoleInGroup);
283
- console.debug("docking.deregisterWindow", windowName, movableGroup, fillHoleInGroup);
284
- this.fillHoles(movableGroup, bounds);
285
- }
286
- else {
287
- Logger.system.debug("docking.deregisterWindow fix option", windowName, movableGroup, fillHoleInGroup);
288
- console.debug("docking.deregisterWindow fix option", windowName, movableGroup, fillHoleInGroup);
289
- [movableGroup, immobileGroup].forEach((grp) => grp && self.fixGroupMembership(grp));
290
- }
291
- if (immobileGroup) {
292
- immobileGroup.updateBounds();
293
- }
294
- }
295
- else {
296
- // We're not removing the window from the workspace (i.e. deregisterWindow gets triggered by workspace reload or switching workspaces)
297
- // in which case we can skip rebuilding group relationships and just remove the window.
298
- self.removeWindow(windowName);
299
- }
300
- // will handle any group updates that need to be sent.
301
- if (self.onMoveComplete && response.data.userInitiated === true) {
302
- self.onMoveComplete(win);
303
- }
304
- delete self.deregistrationPending[windowName];
305
- Logger.system.info("deregisterWindow: complete", windowName);
306
- Logger.system.debug("Docking: Registered Windows", Object.keys(self.getWindows()));
307
- }
308
- }
309
- /**
310
- * Given a window name, reset the auto arrange status for the monitor that window is on
311
- * @param {object | string} window A window name or docking window object
312
- */
313
- resetAutoArrangeForAWindowsMonitor(window) {
314
- let win;
315
- if (typeof window === "string" || window.hasOwnProperty("name")) {
316
- // If window is a string or has a name property we can use it to get the window
317
- const name = window.hasOwnProperty("name") ? window.name : window;
318
- win = this.getWindow(name);
319
- // Window might have already deregistered. Check to see if a window was returned
320
- if (!win) {
321
- // If the window wasn't found return
322
- return;
323
- }
324
- }
325
- const { monitor } = win;
326
- if (!monitor) {
327
- // If the monitor for the given window can't be found the auto arrange status reset will not succeed; return
328
- return;
329
- }
330
- /*
331
- 12/11/19 JC - Previously, this was unthought of, but when a window is closed the auto arrange status should be wiped.
332
- Otherwise you end up with a case where you can auto arrange some windows, close a window in that arrangement, and
333
- now your auto arrange status is still true but clicking auto arrange will re-arrange, not restore, the remaining windows.
334
- */
335
- if (this.AutoArrange.isArranged[monitor.name] && win.win.allowAutoArrange !== false) {
336
- this.AutoArrange.isArranged[monitor.name] = false;
337
- delete this.cachedPositions[monitor.name][win.name];
338
- this.cachedPositions[monitor.name] = {};
339
- this.sendAutoArrangeStatusUpdate();
340
- }
341
- }
342
- /**
343
- * Helper function that determines whether a group should fill holes left by windows that leave it.
344
- * @params {dockableGroup} grp The group for which to fill holes (or not).
345
- */
346
- shouldFillHolesInGroups(grp) {
347
- let fillHoleInGroup = this.groupMode.fillHolesOnUndock;
348
- if (fillHoleInGroup) {
349
- fillHoleInGroup = grp && grp.isARectangle();
350
- }
351
- return fillHoleInGroup;
352
- }
353
- /**
354
- * When a window no longer delegates its movement to us (it closes or unregisters for some reason), we need to make sure we don't leave strange, disconnected groups out there.
355
- * If you imagine [A][B][C], and B is closed, this code will make sure that A & C don't remain grouped.
356
- * @param {*} grp
357
- */
358
- fixGroupMembership(grp) {
359
- this.buildSnapRelationshipsForGroup(grp);
360
- const windowsThatWereInGroup = grp.getWindowNames();
361
- const wasMovable = grp.isMovable;
362
- // 2nd param says 'Don't worry, we will reform this group. Don't go changing
363
- // taskbar icons willy nilly.
364
- this.removeGroup(grp.name, true);
365
- for (const name of windowsThatWereInGroup) {
366
- let group;
367
- if (wasMovable) {
368
- group = this.getMovableGroup(name);
369
- }
370
- else {
371
- group = this.getImmobileGroup(name);
372
- }
373
- // Prevent exponential group formation by not calling formGroup is the window is already in a group.
374
- if (!group) {
375
- this.formGroup(name, {
376
- isMovable: wasMovable,
377
- whitelist: windowsThatWereInGroup,
378
- });
379
- }
380
- }
381
- }
382
- // If a window closes uncleanly, we will clean up docking.
383
- onWindowClosed(err, response) {
384
- if (response.data.name.indexOf("StackedWindow") === -1) {
385
- this.resetAutoArrangeForAWindowsMonitor(response.data.name);
386
- }
387
- this.deregisterWindow(this, null, response);
388
- this.updateGroupData();
389
- }
390
- /**
391
- * Creates router endpoints for all of our client APIs. Add servers or listeners for requests coming from your clients.
392
- * @private
393
- */
394
- createRouterEndpoints() {
395
- RouterClient.subscribe(constants.WORKSPACE.UPDATE_PUBSUB, (err, response) => {
396
- if (response.data.reason === "workspace:load:dataRetrieved" ||
397
- response.data.reason === "workspace:load:finished" ||
398
- response.data.reason === "rename") {
399
- this.handleWorkspaceUpdate(err, response);
400
- }
401
- });
402
- RouterClient.addListener("DockingService.showAtMousePosition", (err, response) => {
403
- this.dockingReady || Logger.system.error("Docking API invoked before ready", response);
404
- const windowIdentifier = response.data;
405
- const win = this.getWindow(windowIdentifier.windowName);
406
- System.getMousePosition((getMousePositionErr, position) => {
407
- var _a, _b, _c, _d, _e, _f;
408
- // Here we generate a fake event to move the window where we want it to go. This will cause docking to go through its typical event loop, undock the window, and everything else the user expects.
409
- const bounds = win.getBounds();
410
- if (!win.win.isDocked) {
411
- bounds.top = ((_a = position === null || position === void 0 ? void 0 : position.top) !== null && _a !== void 0 ? _a : 0) - ((_b = bounds.height) !== null && _b !== void 0 ? _b : 0) + 10;
412
- // center the window over the mouse position. Feels better.
413
- bounds.left = ((_c = position === null || position === void 0 ? void 0 : position.left) !== null && _c !== void 0 ? _c : 0) - ((_d = bounds.width) !== null && _d !== void 0 ? _d : 0) / 2;
414
- bounds.right = bounds.left + ((_e = bounds.width) !== null && _e !== void 0 ? _e : 0);
415
- bounds.bottom = bounds.top + ((_f = bounds.height) !== null && _f !== void 0 ? _f : 0);
416
- }
417
- win.setBounds(bounds, () => {
418
- win.show();
419
- this.tellWindowOrGroupToSaveLocation(win);
420
- });
421
- });
422
- });
423
- const addWindow = async (windowWrap, message, data) => {
424
- try {
425
- await this.addWindow(windowWrap);
426
- const { data: isShowing } = await windowWrap._isShowing({});
427
- // failure point, add window failed.
428
- message.sendQueryResponse(null, {
429
- status: "finished",
430
- });
431
- let dockableWin = this.getWindow(windowWrap.name);
432
- // Not sure how this is possible but defensive programming against a bug seen in the field - https://support.chartiq.com/a/tickets/11962
433
- if (!dockableWin) {
434
- await this.addWindow(windowWrap);
435
- dockableWin = this.getWindow(windowWrap.name);
436
- if (!dockableWin) {
437
- Logger.system.error("addWindow failed to add Window to docking or window was removed immediately after adding.", windowWrap.name);
438
- return;
439
- }
440
- }
441
- const isDockable = dockableWin.isDockableComponent || windowWrap.windowState === WINDOWSTATE.NORMAL;
442
- // windows are temporarily hidden when minimized, maximize, autoShow === false
443
- if (isShowing === false && isDockable) {
444
- dockableWin.isHidden = true;
445
- }
446
- else {
447
- dockableWin.isHidden = false;
448
- }
449
- // group windows whether they are showing or not
450
- this.checkIfWindowIsInGroup(data.name);
451
- Logger.system.info("registerWindow: registration complete", data.name);
452
- Logger.system.debug("Docking: Registered Windows", Object.keys(this.getWindows()));
453
- // registration complete so can clear marker for pending registration; deregistrationWindow looks for this same marker
454
- delete this.registrationPending[data.name];
455
- // if there is a deregister pending for the window (see deregisterWindow) can now process it since registration is complete
456
- if (this.deregistrationPending[data.name]) {
457
- const deregisterArgs = this.deregistrationPending[data.name]; // get the original deregister arguments
458
- this.deregisterWindow(this, deregisterArgs.err, deregisterArgs.response); // process the pending deregister
459
- delete this.deregistrationPending[data.name]; // pending deregistration has been processed so delete
460
- Logger.system.info("deregisterWindow: pending deregistration processed", data.name);
461
- }
462
- this.AutoArrange.reconcileStackCreationWithAutoArrangedWindows(data);
463
- }
464
- catch (_a) {
465
- /* failed to add */
466
- }
467
- };
468
- // Handler for incoming docking registration request for specified window.
469
- RouterClient.addResponder("DockingService.registerWindow", async (err, message) => {
470
- var _a, _b;
471
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
472
- if (err || !message) {
473
- Logger.system.error("DockingService.registerWindow error", err);
474
- return;
475
- }
476
- const { data } = message;
477
- // For the sake of assimilation
478
- data.options = Object.assign(data.options || {}, (_b = (_a = data.windowMsg) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {});
479
- /*
480
- If the window has already registered with docking, deregister and then reregister.
481
- Sometimes this happens while reloading a workspace where a timing gap causes the same window to reregister before the previous instance is deregistered.
482
-
483
- Second parameter is set to false to prevent a logger warning (we expect *not* to find the window)
484
- */
485
- if (this.getWindow(data.name, false)) {
486
- this.deregisterWindow(this, null, message);
487
- }
488
- Logger.system.info("registerWindow: starting registration", data.name);
489
- this.registrationPending[data.name] = true; // mark pending registration (needed to handle deregisterWindow because register is async, leaving a timing gap)
490
- if (!data.windowType)
491
- data.windowType = "WebWindow";
492
- const { err: getInstanceErr, data: wrap } = await BaseWindow.getInstanceStandardized(data);
493
- if (getInstanceErr || !wrap) {
494
- Logger.system.error("Docking: registerWindow. addWindow err", message.data.name, getInstanceErr);
495
- return;
496
- }
497
- if (message.data.options && message.data.options.canGroup === false) {
498
- this.addToGroupBlacklist(data.name);
499
- }
500
- const windowWrap = wrap;
501
- Logger.system.info("Docking: registerWindow. addWindow", message.data.name, message.data);
502
- const dockingOptions = this.defaultDockingOptions(data.options, this.MINIMUM_HEIGHT, this.MINIMUM_WIDTH);
503
- windowWrap.dockingOptions = dockingOptions;
504
- if (data.options) {
505
- windowWrap.snapping = data.options.snapping;
506
- windowWrap.tiling = data.options.tiling;
507
- windowWrap.tabbing = data.options.tabbing;
508
- windowWrap.allowAutoArrange = data.options.allowAutoArrange;
509
- if (windowWrap.setMinimizeAbility) {
510
- const canWindowMinimize = data.options.canMinimize !== false;
511
- windowWrap.setMinimizeAbility(canWindowMinimize);
512
- }
513
- if (windowWrap.setMaximizeAbility) {
514
- const canWindowMaximize = data.options.canMaximize !== false;
515
- windowWrap.setMaximizeAbility(canWindowMaximize);
516
- }
517
- }
518
- windowWrap.enableWindowsAeroSnap = this.enableWindowsAeroSnap;
519
- await addWindow(windowWrap, message, data);
520
- });
521
- /**
522
- * Not sure we'll need this any more since we have the wrappers. Leaving in until we can clarify.
523
- */
524
- RouterClient.addPubSubResponder(/WindowMove.*/, {});
525
- // Here we set the initial state of the two group topics (WORKSPACE_GROUP_UPDATE is the old/legacy one)
526
- RouterClient.publish(constants.DOCKING.GROUP_UPDATE, this.buildGroupUpdate());
527
- RouterClient.publish(constants.DOCKING.WORKSPACE_GROUP_UPDATE, this.buildWorkspaceGroupUpdate());
528
- /**
529
- * When groupMode changes in a toolbar (or any component), it uses PubSub to publish a state change.
530
- */
531
- RouterClient.addPubSubResponder("DockingService.groupMode", {});
532
- RouterClient.subscribe("WindowMoved", () => {
533
- // this.onMouseUp();
534
- });
535
- RouterClient.subscribe("monitorInfo", (monitorInfoErr, response) => {
536
- this.updateMonitorInfo(response.data);
537
- });
538
- RouterClient.addResponder("DockingService.getGroupMode", (err, message) => {
539
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
540
- if (!err && message)
541
- message.sendQueryResponse(null, this.getGroupMode());
542
- });
543
- RouterClient.addResponder("DockingService.getBounds", (err, message) => {
544
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
545
- if (!err && message)
546
- this.getBounds(message.data, (getBoundsErr, bounds) => {
547
- message.sendQueryResponse(getBoundsErr, bounds);
548
- });
549
- });
550
- RouterClient.addListener("DockingService.toggleGroupMode", (toggleGroupModeErr, message) => {
551
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
552
- const groupMode = this.getGroupMode();
553
- groupMode.enabled = !groupMode.enabled;
554
- this.setGroupMode(groupMode);
555
- });
556
- RouterClient.addListener("DockingService.updateWindowLocation", (err, message) => {
557
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
558
- const updateWindow = this.getWindow(message.data.windowName, false);
559
- // we get updates for _every_ window when their location changes via launcherClient.showWindow. Even if they aren't registered with docking. This if statement prevents errors from showing up in the logger.
560
- if (updateWindow) {
561
- updateWindow.setBounds(message.data.location);
562
- }
563
- });
564
- RouterClient.addListener("DockingService.hyperfocusGroup", (err, message) => {
565
- Logger.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release");
566
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
567
- this.hyperFocus(message.data);
568
- });
569
- /**
570
- * Auto-arrange doesn't throw disable-frame-bounds-changed events, since it uses `setBounds` under the hood. So this will just go through the windows and update their positions.
571
- */
572
- RouterClient.addListener("DockingService.updateWindowPositions", (err, response) => {
573
- this.dockingReady || Logger.system.error("Docking API invoked before ready", response);
574
- this.updateWindowPositions();
575
- });
576
- RouterClient.addListener("DockingService.formGroup", (err, response) => {
577
- this.dockingReady || Logger.system.error("Docking API invoked before ready", response);
578
- const groupWindowNames = this.formGroup(response.data.windowName, { isMovable: true });
579
- this.updateGroupData();
580
- this._maybeAddLaunchGroupComponentData(response.data.windowName, groupWindowNames);
581
- // Logger.system.debug("Publishing Group Update: FormGroup");
582
- });
583
- /**
584
- * Called from the launcherClient after `spawn` is invoked. Will group two or more windows.
585
- */
586
- RouterClient.addResponder("DockingService.groupWindows", (err, message) => {
587
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
588
- if (!err && message)
589
- this.groupWindows(message.data, (groupWindowsErr) => {
590
- this.updateGroupData();
591
- // Logger.system.debug("Publishing Group Update: GroupWindows");
592
- message.sendQueryResponse(groupWindowsErr, {
593
- groupWindowsErr,
594
- status: groupWindowsErr ? "failed" : "success",
595
- });
596
- });
597
- });
598
- RouterClient.addResponder("DockingService.leaveGroup", (err, response) => {
599
- this.dockingReady || Logger.system.error("Docking API invoked before ready", response);
600
- if (err || !response) {
601
- Logger.system.error("DockingService.leaveGroup error", err);
602
- return;
603
- }
604
- const windowName = response.data.name;
605
- const leavingWindow = this.getWindow(windowName, false);
606
- if (!leavingWindow) {
607
- response.sendQueryResponse("Window is not registered with docking", null);
608
- return;
609
- }
610
- const movableGroup = this.getMovableGroup(windowName);
611
- const immovableGroup = this.getImmobileGroup(windowName);
612
- if (!movableGroup) {
613
- response.sendQueryResponse("Window is not in a moveable group", null);
614
- return;
615
- }
616
- let fillHoleInGroup = false;
617
- const hole = leavingWindow.getBounds();
618
- if (this.groupMode.undockDisbandsEntireGroup) {
619
- this.removeGroup(movableGroup.name);
620
- }
621
- else {
622
- fillHoleInGroup = movableGroup.isARectangle();
623
- const newBounds = leavingWindow.getBounds();
624
- newBounds.left = newBounds.left + 15;
625
- newBounds.right = newBounds.right + 15;
626
- newBounds.bottom = newBounds.bottom + 15;
627
- newBounds.top = newBounds.top + 15;
628
- leavingWindow.setBounds(newBounds);
629
- // removeWindowFromGroup(response.data, movableGroup.name);
630
- this.removeWindowFromAllGroups(leavingWindow);
631
- // Because ejecting the window was causing complications when filling holes.
632
- CALCULATOR.removeWindow(leavingWindow.name, false);
633
- }
634
- this.wipeSnapRelationships(leavingWindow.name);
635
- if (fillHoleInGroup) {
636
- // group gets reconstituted in the removeWIndowFromGroup function. So get the reference to the new group.
637
- this.fillHoles(movableGroup, hole);
638
- }
639
- else {
640
- [movableGroup, immovableGroup].forEach((grp) => {
641
- if (grp) {
642
- this.fixGroupMembership(grp);
643
- }
644
- });
645
- }
646
- if (!this.groupMode.undockDisbandsEntireGroup) {
647
- Logger.system.debug("LeaveGroup, adding window back to docking.", leavingWindow.name);
648
- CALCULATOR.addWindow(leavingWindow.name, leavingWindow);
649
- }
650
- this.recalculateSnaps();
651
- const groups = this.getGroups();
652
- const groupList = {};
653
- for (const group in groups) {
654
- groupList[group] = groups[group].getWindowNames();
655
- }
656
- this.updateGroupData();
657
- this._removeLaunchGroupComponentDataFromLeavingWindow(leavingWindow);
658
- leavingWindow.bringToFront();
659
- response.sendQueryResponse(null, groupList);
660
- });
661
- RouterClient.addResponder("DockingService.getWindowsInGroup", (err, response) => {
662
- if (err || !response) {
663
- Logger.system.error("DockingService.getWindowsInGroup error", err);
664
- return;
665
- }
666
- const grp = this.getGroup(response.data.groupName);
667
- if (err)
668
- return response.sendQueryResponse(err, null);
669
- const error = null;
670
- let windowList = [];
671
- if (!grp) {
672
- err = "Group not found.";
673
- }
674
- else {
675
- windowList = grp.getWindowNames();
676
- }
677
- response.sendQueryResponse(error, windowList);
678
- });
679
- RouterClient.addResponder("DockingService.getGroupObjectsForWindow", (err, response) => {
680
- if (err || !response) {
681
- Logger.system.error("DockingService.getGroupObjectsForWindow error", err);
682
- return;
683
- }
684
- const win = this.getWindow(response.data.name || response.data.windowName);
685
- if (win) {
686
- const responseObject = win.groupNames.map((groupName) => {
687
- const grp = this.getGroup(groupName);
688
- return {
689
- name: groupName,
690
- isMovable: grp.isMovable,
691
- };
692
- });
693
- return response.sendQueryResponse(null, responseObject);
694
- }
695
- response.sendQueryResponse("window not found");
696
- });
697
- RouterClient.addResponder("DockingService.getGroupsForWindow", (err, response) => {
698
- if (err || !response) {
699
- Logger.system.error("DockingService.getGroupsForWindow error", err);
700
- return;
701
- }
702
- const win = this.getWindow(response.data.name || response.data.windowName);
703
- if (win) {
704
- return response.sendQueryResponse(null, win.getGroupNames());
705
- }
706
- response.sendQueryResponse("window not found");
707
- });
708
- // LauncherGroups calling reveal all does not handle special docking-only cases such as
709
- // grouped windows/stacked windows/etc
710
- RouterClient.addResponder("DockingService.restoreDockableWindows", (err, response) => {
711
- if (err || !response) {
712
- Logger.system.error("DockingService.restoreDockableWindows error", err);
713
- return;
714
- }
715
- let windows = response.data.windowNames;
716
- // Loop through the window names and retrieve their docking counterpart if applicable
717
- windows.map((win) => {
718
- var _a;
719
- const w = this.getWindow(win);
720
- if (w) {
721
- // Take care of any stacked windows
722
- if (w.name.includes("StackedWindow")) {
723
- w.win.oldState.childWindowIdentifiers.map((childWin) => {
724
- const nameToFind = childWin.name || childWin.windowName;
725
- const index = windows.findIndex((name) => name === nameToFind);
726
- windows.splice(index, 1);
727
- });
728
- w.win._restore({});
729
- }
730
- // Take care of any groups this window is a part of
731
- (_a = w.groupNames) === null || _a === void 0 ? void 0 : _a.forEach((groupName) => {
732
- const g = this.getGroup(groupName);
733
- if (g.isMovable) {
734
- const windowNamesInGroup = Object.keys(g.windows);
735
- g.restoreAll(() => {
736
- // After the group is restored, remove the windows in the group from the list
737
- // of windows that still need to be restored
738
- windowNamesInGroup.forEach((windowName) => {
739
- const index = windows.findIndex((name) => name === windowName);
740
- windows.splice(index, 1);
741
- });
742
- });
743
- }
744
- });
745
- }
746
- });
747
- return response.sendQueryResponse(null, windows);
748
- });
749
- RouterClient.addListener("DockingService.joinGroup", (err, response) => {
750
- this.addWindowToGroup({
751
- groupName: response.data.groupName,
752
- win: this.getWindow(response.data.name),
753
- });
754
- this.updateGroupData();
755
- });
756
- RouterClient.addListener("DockingService.checkAndFixGroups", (err, response) => {
757
- this.checkAndFixGroupPosition(response.data.name);
758
- });
759
- RouterClient.addListener(constants.DOCKING.REQUEST_PUBLISH, () => {
760
- this.publishGroupUpdate();
761
- });
762
- /**
763
- * PassThrough
764
- */
765
- RouterClient.addListener("DockingService.deregisterWindow", (err, response) => {
766
- this.dockingReady || Logger.system.error("Docking API invoked before ready");
767
- this.deregisterWindow(this, err, response);
768
- });
769
- RouterClient.addResponder("DockingService.maximizeWindow", (err, message) => {
770
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
771
- if (err || !message) {
772
- Logger.system.error("DockingService.maximizeWindow error", err);
773
- return;
774
- }
775
- this.maximizeWindow(message.data, (bounds) => {
776
- this.sendQueryResponse(message, bounds);
777
- });
778
- });
779
- RouterClient.addResponder("DockingService.restoreFromMaximize", (err, message) => {
780
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
781
- if (err || !message) {
782
- Logger.system.error("DockingService.restoreFromMaximize error", err);
783
- return;
784
- }
785
- if (this.getWindow(message.data.name)) {
786
- this.restoreFromMaximize(message.data, () => {
787
- this.sendQueryResponse(message, null);
788
- });
789
- }
790
- else {
791
- message.sendQueryResponse("Window not registered with the DockingMain.", null);
792
- }
793
- });
794
- RouterClient.addListener("DockingService.constituteGroups", () => {
795
- this.dockingReady || Logger.system.error("Docking API invoked before ready");
796
- this.constituteGroups();
797
- });
798
- RouterClient.addResponder("DockingService.autoArrange", async (err, message) => {
799
- var _a;
800
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
801
- if (err || !message) {
802
- Logger.system.error("DockingService.autoArrange error", err);
803
- return;
804
- }
805
- let dimensions = null;
806
- if (message.data.windowIdentifier) {
807
- const monitorInfo = await LauncherClient.getMonitorInfo({
808
- windowIdentifier: message.data.windowIdentifier,
809
- });
810
- dimensions = this.prepMonitorDimensions((_a = monitorInfo.data) === null || _a === void 0 ? void 0 : _a.name);
811
- }
812
- else if (message.data.monitorDimensions.name) {
813
- dimensions = this.prepMonitorDimensions(message.data.monitorDimensions.name);
814
- }
815
- if (!dimensions) {
816
- message.sendQueryResponse(new Error("No window or monitor supplied to autoArrange"), null);
817
- return;
818
- }
819
- await this.AutoArrange.arrange(dimensions);
820
- this.updateGroupData();
821
- message.sendQueryResponse(null, "success");
822
- });
823
- RouterClient.addPubSubResponder(DockingMain_AUTO_ARRANGE_CHANNEL, {});
824
- /* Tabbing and Tiling */
825
- RouterClient.addListener("DockingService.startTilingOrTabbing", (err, message) => {
826
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
827
- this.startTilingOrTabbing(err, message);
828
- });
829
- RouterClient.addResponder("DockingService.stopTilingOrTabbing", (err, message) => {
830
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
831
- if (err || !message) {
832
- Logger.system.error("DockingService.stopTilingOrTabbing error", err);
833
- return;
834
- }
835
- this.stopTilingOrTabbing(err, message, () => {
836
- message.sendQueryResponse(null, true);
837
- });
838
- });
839
- RouterClient.addListener("DockingService.identifierForTilingOrTabbing", (err, message) => {
840
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
841
- this.identifierForTilingOrTabbing(err, message);
842
- });
843
- RouterClient.addListener("DockingService.cancelTilingOrTabbing", (_, message) => {
844
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
845
- this.cancelTilingOrTabbing();
846
- });
847
- /* End Tabbing and Tiling */
848
- RouterClient.subscribe(APPLICATION_STATE_CHANNEL, (err, response) => {
849
- this.applicationState = response.data.state;
850
- });
851
- RouterClient.addListener("DockingService.wipeAutoArrange", (err, message) => {
852
- this.resetAutoArrangeForAWindowsMonitor(message.data.win);
853
- });
854
- // Monitor information is now managed by docking (for simplicity of claiming/unclaiming space). This is just to get the information when it changes. getMonitorInfoAll in the launcher comes here now.
855
- RouterClient.addResponder("DockingService.getMonitorsFromDocking", (err, message) => {
856
- this.dockingReady || Logger.system.error("Docking API invoked before ready", message);
857
- if (err || !message) {
858
- Logger.system.error("DockingService.getMonitorsFromDocking error", err);
859
- return;
860
- }
861
- const monitors = this.getRawMonitors();
862
- message.sendQueryResponse(null, { monitors });
863
- });
864
- }
865
- /**
866
- * Check if new group is a launchGroup component, i.e. there's a window with launchGroupComponentData in its windowDescriptor.
867
- * If the groups is a launchGroup component then add the launchGroupCompoenentData to the new member of the group.
868
- *
869
- * Note: We break early as we only want to find the first component to have a launchGroupComponentData.
870
- *
871
- * @param {string} windowNameToAddToGroup The window name to add to the group
872
- * @param {Array<string>} groupWindowNames All window names in the group
873
- */
874
- _maybeAddLaunchGroupComponentData(windowNameToAddToGroup, groupWindowNames) {
875
- for (const windowName of groupWindowNames) {
876
- if (windowName !== windowNameToAddToGroup) {
877
- const groupWindow = this.getWindow(windowName);
878
- if (groupWindow.win.windowDescriptor.launchGroupComponentData) {
879
- const newGroupWindow = this.getWindow(windowNameToAddToGroup);
880
- newGroupWindow.win.windowDescriptor.launchGroupComponentData =
881
- groupWindow.win.windowDescriptor.launchGroupComponentData;
882
- break;
883
- }
884
- }
885
- }
886
- }
887
- /**
888
- * Invoked when a window leaves a group. Checks if we have launchGroupComponentData to remove and
889
- * removes it. Does nothing otherwise.
890
- *
891
- * @param {wrap} leavingWindow The window leaving the group.
892
- */
893
- _removeLaunchGroupComponentDataFromLeavingWindow(leavingWindow) {
894
- var _a, _b;
895
- if ((_b = (_a = leavingWindow.win) === null || _a === void 0 ? void 0 : _a.windowDescriptor) === null || _b === void 0 ? void 0 : _b.launchGroupComponentData) {
896
- delete leavingWindow.win.windowDescriptor.launchGroupComponentData;
897
- }
898
- }
899
- // this is the old/legacy group update that is currently preserved for legacy reasons. It does not have guid.
900
- buildWorkspaceGroupUpdate() {
901
- return {
902
- groupName: "Docking",
903
- groupData,
904
- workspaceName: this.activeWorkspace.name,
905
- };
906
- }
907
- // this is the current group update that has everything in the old one plus guid.
908
- buildGroupUpdate() {
909
- return Object.assign({ guid: this.activeWorkspace.guid }, this.buildWorkspaceGroupUpdate());
910
- }
911
- sendQueryResponse(message, data) {
912
- message.sendQueryResponse(null, data);
913
- }
914
- prepMonitorDimensions(monitorName) {
915
- const serviceMonitors = this.getMonitors();
916
- const monitors = Object.keys(serviceMonitors).map((mon) => serviceMonitors[mon]);
917
- let monitor;
918
- for (let i = 0; i < monitors.length; i++) {
919
- const mon = monitors[i];
920
- if (mon.name === monitorName) {
921
- monitor = mon;
922
- break;
923
- }
924
- }
925
- if (monitor) {
926
- return {
927
- left: monitor.availableRect.left,
928
- right: monitor.availableRect.right,
929
- top: monitor.availableRect.top,
930
- bottom: monitor.availableRect.bottom,
931
- name: monitor.name,
932
- height: monitor.availableRect.height,
933
- width: monitor.availableRect.width,
934
- };
935
- }
936
- return null;
937
- }
938
- /**
939
- * Called when monitors' state changes. Either a monitor has been added/removed or rearranged.
940
- * When a change occurs query the system for the new window position and update the bounds.
941
- * Groups need special treatment to ensure that they stay together.
942
- * The toolbar is also a special case because it needs to stay the same size and keep it's docking state
943
- * @param {object} monitors An object containing each monitor with monitor name as keys
944
- */
945
- async monitorsChanged(eventData) {
946
- const rawMonitors = eventData.monitors;
947
- Logger.system.debug("Monitors-changed: monitors-changed event received. Monitors from the event:", rawMonitors);
948
- const adjustedBoundsPromiseList = [];
949
- const dockedWindowBoundsPromiseList = [];
950
- const windowNames = this.getWindowNames();
951
- // hide a groupMask if monitor has been changed, because position of the mask related to monitor dimensions
952
- this.hideGroupMask();
953
- // After building the current list of monitors, update the monitor status.
954
- // This must be called before requesting the updated window bounds from assimilation
955
- this.updateMonitorInfo(rawMonitors);
956
- // Request the updated information in the format required for assimilation
957
- const formattedMonitorInfo = await new Promise((resolve) => {
958
- System.getMonitorInfo(resolve);
959
- });
960
- if (this.isWindows) {
961
- const { err } = await RouterClient.query("Assimilation.setMonitorInfo", formattedMonitorInfo);
962
- if (err) {
963
- Logger.system.error("Error sending MonitorInfo to Assimilation", err);
964
- }
965
- }
966
- windowNames.forEach((windowName) => {
967
- const win = this.getWindow(windowName);
968
- if (win.win.isDocked) {
969
- // If this is a docked window that has been moved by the OS it will not be claiming space correctly
970
- // on the new monitor and needs to be redocked
971
- dockedWindowBoundsPromiseList.push(deriveWindowPosition({ win, movableGroup: null, monitorsInstance: this.monitorsInstance }));
972
- }
973
- else if (win.isDockableComponent) {
974
- this.handleUndockedWindow(win);
975
- }
976
- });
977
- const dockedWindows = await Promise.all(dockedWindowBoundsPromiseList);
978
- dockedWindows.forEach((boundsObject) => {
979
- if (boundsObject)
980
- this.handleDockedWindow(boundsObject);
981
- });
982
- // Iterate through all the windows and get their bounds. If their bounds have changed they will be used to update the window position.
983
- windowNames.forEach((windowName) => {
984
- const win = this.getWindow(windowName);
985
- // The OS doesn't move minimized windows. They need to be handled on restore
986
- if (win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED ||
987
- win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL)
988
- return;
989
- // Batch the resulting bounds for windows in a group. Groups bounds need to be sent all at once and windows can take different amounts of time to get their updated bounds
990
- const movableGroup = this.getMovableGroup(win.name);
991
- adjustedBoundsPromiseList.push(deriveWindowPosition({ win, movableGroup, monitorsInstance: this.monitorsInstance }));
992
- });
993
- // Wait for updated bounds for all windows before performing any move actions
994
- let adjustedBoundsList = [];
995
- try {
996
- adjustedBoundsList = await Promise.all(adjustedBoundsPromiseList);
997
- }
998
- catch (adjustedBoundsListErr) {
999
- Logger.system.error("Error rearranging windows on monitor change", adjustedBoundsListErr);
1000
- }
1001
- // Split the returned list by type into moved windows in a group and all other non-docked windows that should move
1002
- const { groupMoves, nonGroupMoves } = splitWindowMoves(adjustedBoundsList);
1003
- const groupNames = Object.keys(groupMoves);
1004
- // Use the updated bounds for each window in the group to choose where to move the group
1005
- groupNames.forEach((groupName) => {
1006
- const group = this.getGroup(groupName);
1007
- group.performDeferredSystemMove(this, groupMoves[groupName]);
1008
- });
1009
- // For windows not in a group, update their bounds
1010
- nonGroupMoves.forEach((move) => {
1011
- const win = this.getWindow(move.name);
1012
- let { bounds } = move;
1013
- if (win.win.windowState === constants.WINDOWSTATE.MAXIMIZED) {
1014
- const monitor = this.getUpdatedOrNewMonitor(win);
1015
- if (monitor)
1016
- win.monitor = monitor;
1017
- }
1018
- win.setBounds(bounds);
1019
- win.win.stopMove();
1020
- });
1021
- // Handles a bug where the OS doesn't repaint all windows after logging back into a machine after a remote
1022
- // desktop session. Show all windows that Finsemble isn't hiding.
1023
- windowNames.forEach((name) => {
1024
- const win = this.getWindow(name);
1025
- // Furthermore, we do not want to call show on minimized windows or they will restore whenever a monitor change occurs
1026
- const functionExists = typeof win.win.isShowing === "function";
1027
- if (functionExists &&
1028
- win.win.windowState !== constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED &&
1029
- win.win.windowState !== constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL &&
1030
- win.win.windowState !== constants.WINDOWSTATE.MAXIMIZED) {
1031
- win.win._isShowing({}, (isShowingErr, isShowing) => {
1032
- // undocked toolbar jumps and moves to mouse on startup without both these checks
1033
- if (isShowing && !win.isHidden) {
1034
- win.show();
1035
- }
1036
- });
1037
- }
1038
- });
1039
- }
1040
- /**
1041
- * Handles the docked toolbar after a monitor change occurs.
1042
- * Make sure it remains docked at the correct location and size
1043
- * @param {} win - window that is docked, usually the toolbar
1044
- */
1045
- async handleDockedWindow(boundsObject) {
1046
- /* Algorithm
1047
- if(!justundocked & !justdocked) { // monitor has changed and we have done nothing yet, so undock
1048
- undock
1049
- justundocked = true
1050
- }
1051
- else if (justundocked & !justdocked) { // this is the monitor change caused by undocking, dock now
1052
- justundocked = false
1053
- dock
1054
- justdocked = true
1055
- } else if (justdocked) { // this is the monitor change caused by docking
1056
- justdocked = false
1057
- setBounds // we need to call this second setbounds because the window automatically gets pushed out of claimed space
1058
- }
1059
- return
1060
- */
1061
- var _a, _b, _c;
1062
- const win = this.getWindow(boundsObject.name);
1063
- let newMonitor = this.getUpdatedOrNewMonitor(win);
1064
- if (!newMonitor) {
1065
- return;
1066
- }
1067
- win.monitor = newMonitor;
1068
- if (!win.justUndocked && !win.justDocked && !win.isHidden) {
1069
- win.justUndocked = true;
1070
- if (newMonitor && newMonitor.undockWindowFromMonitor) {
1071
- newMonitor.undockWindowFromMonitor(win, true);
1072
- // sometimes undocking will not trigger a monitor change, in this case, we will dock after 2 seconds
1073
- this.recallToDock = setTimeout(() => {
1074
- this.handleDockedWindow(boundsObject);
1075
- }, 2000);
1076
- }
1077
- else {
1078
- this.handleDockedWindow(boundsObject);
1079
- }
1080
- }
1081
- else if (win.justUndocked && !win.justDocked) {
1082
- clearTimeout(this.recallToDock);
1083
- win.justUndocked = false;
1084
- if (!Object.keys(newMonitor).length) {
1085
- newMonitor = this.getMonitorForWindow(win);
1086
- win.monitor = newMonitor;
1087
- }
1088
- newMonitor.dockWindowToMonitor(win, win, ((_a = win.undockedPosition) === null || _a === void 0 ? void 0 : _a.width) || this.defaultWidth, ((_b = win.undockedPosition) === null || _b === void 0 ? void 0 : _b.height) || this.defaultHeight);
1089
- }
1090
- else if (win.justDocked) {
1091
- win.justDocked = false;
1092
- // Get the window's snapped edge based on its docked position
1093
- const keys = Object.keys(win.monitorDockablePositions);
1094
- const snappedEdge = (_c = keys.find((key) => win.monitorDockablePositions[key] === win.dockedPosition)) === null || _c === void 0 ? void 0 : _c.toLowerCase();
1095
- // Values the window needs to dock properly.
1096
- win.dockedHeight = win.height;
1097
- win.snappedEdge = snappedEdge !== null && snappedEdge !== void 0 ? snappedEdge : "undefined";
1098
- const newBounds = win.getBounds();
1099
- win.setBounds(newBounds, () => {
1100
- if (this.isWindows && this.claimSpace) {
1101
- win.win._setOpacity({ opacity: 1 });
1102
- }
1103
- });
1104
- }
1105
- }
1106
- /**
1107
- * Handles the undocked window after a monitor change occurs.
1108
- *
1109
- * @param {} win - window that is undocked, usually the toolbar
1110
- */
1111
- handleUndockedWindow(window) {
1112
- // updates the window state to notify that undocking has finished
1113
- window.justUndocked = false;
1114
- }
1115
- /**
1116
- * Checks if a monitor still exists
1117
- * Used for adjusting window location after a monitor change were we want to prioritize the current monitor
1118
- */
1119
- getUpdatedWindowMonitorIfItExists(dockableMonitor) {
1120
- const currentDockableMonitors = this.getMonitors();
1121
- for (const key of Object.keys(currentDockableMonitors)) {
1122
- const currentDockableMonitor = currentDockableMonitors[key];
1123
- if (dockableMonitor.rawMonitor &&
1124
- currentDockableMonitor.rawMonitor.deviceId === dockableMonitor.rawMonitor.deviceId) {
1125
- return currentDockableMonitor;
1126
- }
1127
- }
1128
- }
1129
- /**
1130
- * Returns the updated monitor for a window or a new monitor
1131
- * if the current one for the window no longer exists.
1132
- * @param {FinsembleWindow} win Finsemble window
1133
- */
1134
- getUpdatedOrNewMonitor(win) {
1135
- const monitor = this.getUpdatedWindowMonitorIfItExists(win.monitor);
1136
- if (monitor) {
1137
- Logger.system.verbose(`Monitors-changed: The current monitor for the ${win.name} still exists.`);
1138
- return monitor;
1139
- }
1140
- // Chooses the monitor that the window shares the most bounds with. If there is a tie or the window is not on any monitor the last monitor in the array will be chosen
1141
- const newMonitor = this.getMonitorForWindow(win);
1142
- Logger.system.verbose(`Monitors-changed: window ${win.name}'s current monitor no longer present, new monitor is ${newMonitor}`);
1143
- return Object.values(this.getMonitors()).find((dockingMon) => dockingMon.rawMonitor.deviceId === newMonitor.rawMonitor.deviceId);
1144
- }
1145
- /**
1146
- * Loops through DockableMonitor(s) and compares against a system monitor passed in.
1147
- *
1148
- * @param {*} mon A monitor representation
1149
- * @returns A dockable monitor which contains the same deviceId as the monitor passed in
1150
- */
1151
- getDockingMonitorFromSystemMonitor(mon) {
1152
- let resultingMonitor;
1153
- const idToCheck = mon.rawMonitor ? mon.rawMonitor.deviceId : mon.deviceId;
1154
- const dockingMonitors = this.getMonitors();
1155
- // Update the window's reference to the monitor that it is on. The new reference has updated rects that reflect the change that came from the system.
1156
- for (let i = 0; i < Object.keys(dockingMonitors).length; i++) {
1157
- const dockingMon = dockingMonitors[Object.keys(dockingMonitors)[i]];
1158
- if (dockingMon.rawMonitor.deviceId === idToCheck) {
1159
- resultingMonitor = dockingMon;
1160
- break;
1161
- }
1162
- }
1163
- return resultingMonitor;
1164
- }
1165
- /**
1166
- * Updates monitor info with claim space changes (usually triggered by docking/undocking toolbar or adding/removing monitors)
1167
- * @param {*} monitorUpdate The new monitor information
1168
- * @param {boolean} isDockableWindowAction If this action is triggered by a dockable window, we don't want to wipe out auto arrange status
1169
- */
1170
- updateMonitorInfo(monitorUpdate, isDockableWindowAction) {
1171
- const self = this;
1172
- const monitors = self.getMonitors();
1173
- if (!isDockableWindowAction) {
1174
- Object.values(monitors).forEach((monitor) => {
1175
- this.AutoArrange.isArranged[monitor.name] = false;
1176
- });
1177
- self.sendAutoArrangeStatusUpdate();
1178
- }
1179
- self.removeAllMonitors();
1180
- monitorUpdate.forEach((monitor) => {
1181
- self.addMonitor({
1182
- name: monitor.name,
1183
- left: monitor.availableRect.left,
1184
- top: monitor.availableRect.top,
1185
- right: monitor.availableRect.right,
1186
- bottom: monitor.availableRect.bottom,
1187
- _monitor: monitor,
1188
- }, isDockableWindowAction);
1189
- });
1190
- Logger.system.debug("MONITOR: Docking.monitorUpdate", monitorUpdate);
1191
- self.setBufferSize(serviceConfig.BUFFER_SIZE);
1192
- }
1193
- /**
1194
- * This function will maximize a window.
1195
- * @param {object} params
1196
- * @param {object} params.windowIdentifier
1197
- * @param {string} params.name
1198
- */
1199
- maximizeWindow(params, cb) {
1200
- const win = this.getWindow(params.name);
1201
- if (win.win.windowState === constants.WINDOWSTATE.MAXIMIZED) {
1202
- cb();
1203
- return;
1204
- }
1205
- // When a maximized window is minimized then restored, we want to ensure any windows that were minimized
1206
- // along side this window (grouped) will be restored.
1207
- if (win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED) {
1208
- win.groupNames.forEach((groupName) => {
1209
- const grp = this.getGroup(groupName);
1210
- if (grp.isMovable) {
1211
- grp.restoreAll();
1212
- }
1213
- });
1214
- }
1215
- win.win.windowOptions.windowState = win.win.windowState;
1216
- win.win.saveCompleteWindowState(win.win.windowOptions);
1217
- win.bringToFront();
1218
- this.resetAutoArrangeForAWindowsMonitor(win);
1219
- if (cb)
1220
- cb();
1221
- }
1222
- /**
1223
- * This function will restore a maximized window.
1224
- * @param {object} params
1225
- * @param {string} params.name
1226
- */
1227
- async restoreFromMaximize(params, cb = Function.prototype) {
1228
- var _a, _b, _c, _d;
1229
- const win = this.getWindow(params.name);
1230
- win.win.windowState = constants.WINDOWSTATE.NORMAL;
1231
- let b = win.win.cachedBounds && Object.keys(win.win.cachedBounds).length ? win.win.cachedBounds : win.getBounds();
1232
- let bounds = {
1233
- left: b.left,
1234
- right: (_a = b.right) !== null && _a !== void 0 ? _a : 0,
1235
- top: b.top,
1236
- bottom: (_b = b.bottom) !== null && _b !== void 0 ? _b : 0,
1237
- width: (_c = b.width) !== null && _c !== void 0 ? _c : 0,
1238
- height: (_d = b.height) !== null && _d !== void 0 ? _d : 0,
1239
- };
1240
- // Only changes the window position if there has been a monitor change. We don't want the window to restore off monitor
1241
- let adjustedBounds = adjustBoundsToBeOnMonitor(this.monitorsInstance, bounds);
1242
- win.win.startMove();
1243
- win.setBounds(adjustedBounds, () => {
1244
- // The folllow seems to be a NOP. WHould be win.win.cachedBounds? Plus why clear it?
1245
- // win.cachedBounds = {};
1246
- win.win.stopMove();
1247
- /**
1248
- * The second setBounds below this giant comment block is because of a strange sequencing problem in electron.
1249
- * When you double click on the titlebar of a component, the OS maximizes the window. We capture the event,
1250
- * and then tell it to setBounds right below the toolbar.
1251
- * When we call set bounds, it appears that windows is moving the window afterwards. My hypothesis is that by
1252
- * calling setBounds, we're triggering the OS's restore behavior (when you move a window that's maximized, it
1253
- * restores itself).
1254
- *
1255
- * The data below shows the sequencing problem. The logs come from FEA. 'Windows moved' logs come from the
1256
- * Win32 API throwing 'move' events, which effectively means 'Hey, the OS completed drawing the window at
1257
- * these bounds. 'Setting bounds for' are logs from the MainWindow calling setBounds on the Electron
1258
- * BrowserWindow
1259
- *
1260
- * **The next line is the first event we get from the OS upon double clicking the window.**
1261
- * Windows moved window Welcome Component-2-1861-Finsemble { x: -8, y: -8, width: 2576, height: 1416 }
1262
- * **This is us setting bounds in reaction to the OS's maximize event.**
1263
- * Setting bounds for Welcome Component-2-1861-Finsemble { height: 1361, width: 2560, x: 0, y: 39 }
1264
- * **This is windows' recognition that we've moved the window to the proper place.**
1265
- * Windows moved window Welcome Component-2-1861-Finsemble { x: 0, y: 39, width: 2560, height: 1361 }
1266
- * **This is the unexplained window move from windows**
1267
- * Windows moved window Welcome Component-2-1861-Finsemble { x: 0, y: 56, width: 2560, height: 1361 }
1268
- * **This is the 2nd set bounds below**
1269
- * Setting bounds for Welcome Component-2-1861-Finsemble { height: 1361, width: 2560, x: 0, y: 39 }
1270
- * **This is windows' confirmation that we moved the window**
1271
- * Windows moved window Welcome Component-2-1861-Finsemble { x: 0, y: 39, width: 2560, height: 1361 }
1272
- *
1273
- */
1274
- win.setBounds(adjustedBounds);
1275
- if (cb) {
1276
- cb();
1277
- }
1278
- });
1279
- }
1280
- onWindowShown(event) {
1281
- const dockableWindow = this.getWindow(event.source);
1282
- // need to set show state in dockable window, but cannot call show() or it will cause an infinite loop
1283
- if (dockableWindow) {
1284
- dockableWindow.setShown();
1285
- }
1286
- }
1287
- // if a window is docked, and gets hidden, undock it.
1288
- // NOTE: ******** This never fires since underlying bug for "hidden" *******
1289
- onWindowHidden(event) {
1290
- const dockableWindow = this.getWindow(event.source);
1291
- // need to set hide state in dockable window, but cannot call hide() or it will cause an infinite loop
1292
- if (dockableWindow) {
1293
- dockableWindow.setHidden();
1294
- }
1295
- }
1296
- onWindowClosedHandler(event) {
1297
- const responseData = {
1298
- name: event.source,
1299
- removeFromWorkspace: event.data.removeFromWorkspace,
1300
- };
1301
- // When closing a window, call to undock.
1302
- // dockableWindow will take care of determining
1303
- // if the toolbars internal state should change
1304
- const dockableWindow = this.getWindow(event.source);
1305
- if (dockableWindow)
1306
- dockableWindow.undock(true);
1307
- if (this.applicationState !== "closing") {
1308
- this.onWindowClosed(null, { data: responseData });
1309
- }
1310
- }
1311
- /**
1312
- * Function that's called after a window is moved.
1313
- */
1314
- /**
1315
- * Registers a window with the DockingCalculator.
1316
- * @param {dockableWindow} win
1317
- * @return {Promise}
1318
- */
1319
- addWindow(win) {
1320
- // cannot add closing/closed windows to docking.
1321
- if (["closing", "closed"].includes(win.wrapState))
1322
- return Promise.reject();
1323
- const self = this;
1324
- const calcAddWindow = super.addWindowInternal.bind(this);
1325
- // If a window reloads, it may try to add itself to the dockingCalc twice.
1326
- // 2nd param doesn't throw error if we can't find the window.
1327
- if (this.getWindow(win.name, false)) {
1328
- Logger.system.debug("Docking:addWindow reload immediate resolve");
1329
- return Promise.resolve(self.getWindow(win.name));
1330
- }
1331
- return new Promise((resolve) => {
1332
- win._getBounds({}, (err, bounds) => {
1333
- // If addWindow is called multiple times in quick succession, check to see if it's been added before going through this entire process again. This was happening when tiling from a tabbed group.
1334
- if (self.getWindow(win.name, false)) {
1335
- return Promise.resolve(self.getWindow(win.name));
1336
- }
1337
- if (!bounds) {
1338
- Promise.reject(err);
1339
- return Logger.system.error("No bounds returned from wrap.getBounds", win.name, err);
1340
- }
1341
- const dockableWindow = DockableWindow.factory(win, bounds, self);
1342
- Logger.system.debug("Docking:calling addWindow on the calculator", win.name, bounds);
1343
- dockableWindow.win.addEventListener("minimized", self.setWindowMinimized);
1344
- dockableWindow.win.addEventListener("maximized", self.setWindowMaximized);
1345
- dockableWindow.win.addEventListener("focused", self.setWindowFocused);
1346
- dockableWindow.win.addEventListener("shown", self.bringGroupToFront);
1347
- dockableWindow.win.addEventListener("hidden", self.onWindowHidden);
1348
- dockableWindow.win.addEventListener("shown", self.onWindowShown);
1349
- /**
1350
- * We have to wrap `self.onWindowClosedHandler` in an
1351
- * error function or it doesn't work. We haven't investigated this extensively.
1352
- * We do know however that the method is in fact bound in `self.bindAllFunctions()`,
1353
- * and that `this` in fact an instance of `DockingMain`.
1354
- *
1355
- */
1356
- dockableWindow.closeEventListener = (e) => {
1357
- self.onWindowClosedHandler(e);
1358
- };
1359
- dockableWindow.win.addEventListener("closed", dockableWindow.closeEventListener);
1360
- calcAddWindow(win.name, dockableWindow);
1361
- resolve(dockableWindow);
1362
- });
1363
- });
1364
- }
1365
- /**
1366
- * @private
1367
- * @param {string} windowname
1368
- */
1369
- fixAllGroups(windowName) {
1370
- const movableGroup = this.getMovableGroup(windowName);
1371
- const immobileGroup = this.getImmobileGroup(windowName);
1372
- [movableGroup, immobileGroup].forEach((grp) => grp && this.fixGroupMembership(grp));
1373
- }
1374
- setWindowMinimized(event) {
1375
- const dockableWindow = this.getWindow(event.source);
1376
- if (!dockableWindow) {
1377
- return Logger.system.warn("SetWindowMinimized called on window not registered for movement.", event.source);
1378
- }
1379
- let groupFound = false;
1380
- // If Window is in group, minimize the group
1381
- dockableWindow.groupNames.forEach((groupName) => {
1382
- const grp = this.getGroup(groupName);
1383
- if (grp.isMovable) {
1384
- groupFound = true;
1385
- grp.minimizeAll();
1386
- }
1387
- });
1388
- // make sure window is not already joined to a group
1389
- if (!groupFound) {
1390
- this.fixAllGroups(event.source);
1391
- this.removeWindowFromAllGroups(dockableWindow);
1392
- this.updateGroupData();
1393
- this.resetAutoArrangeForAWindowsMonitor(dockableWindow);
1394
- }
1395
- }
1396
- setWindowMaximized(event) {
1397
- const dockableWindow = this.getWindow(event.source);
1398
- if (!dockableWindow) {
1399
- return Logger.system.warn("setWindowMaximized called on window not registered for movement.", event.source);
1400
- }
1401
- const groupFound = dockableWindow.groupNames.find((groupName) => {
1402
- const grp = this.getGroup(groupName);
1403
- return grp.isMovable;
1404
- });
1405
- // make sure window is not already joined to a group
1406
- if (!groupFound) {
1407
- this.fixAllGroups(event.source);
1408
- this.removeWindowFromAllGroups(dockableWindow);
1409
- this.updateGroupData();
1410
- this.resetAutoArrangeForAWindowsMonitor(dockableWindow);
1411
- }
1412
- }
1413
- setWindowFocused(event) {
1414
- const self = this;
1415
- // Don't log an error because the window may not exist in our object pool if it's part of a stack
1416
- const dockableWindow = self.getWindow(event.source, false);
1417
- if (!dockableWindow)
1418
- return;
1419
- setTimeout(() => {
1420
- if (dockableWindow.win.windowState !== constants.WINDOWSTATE.NORMAL)
1421
- return;
1422
- // win.removeEventListener is async. When reloading a workspace, the window is closed, and un-registers with docking.
1423
- // We remove the event listeners from windows for focus, shown, etc.
1424
- // Then we re-spawn the same windows with the same uuid/name. Underneath the hood, Electron has yet to remove those event listeners.
1425
- // The new windows get focused, and get into this event handler.
1426
- // If we don't make the check below, the DockingCalculator throws errors saying "Hey this window hasn't registered with me yet."
1427
- if (self.getWindowNames().includes(event.source)) {
1428
- self.bringGroupToFront(event);
1429
- }
1430
- }, 100);
1431
- }
1432
- bringGroupToFront(event) {
1433
- const dockableWindow = this.getWindow(event.source);
1434
- if (!dockableWindow)
1435
- return;
1436
- dockableWindow.groupNames.forEach((groupName) => {
1437
- const grp = this.getGroup(groupName);
1438
- if (grp.isMovable) {
1439
- grp.bringToFront({ restoreWindows: false }); // No need to restore windows since they are by default already un-minimized. Doing so can cause infinite loops with stackedWindows [Terry].
1440
- }
1441
- });
1442
- }
1443
- hyperFocus(params) {
1444
- const dockableWindow = this.getWindow(params.windowName);
1445
- dockableWindow.groupNames.forEach((groupName) => {
1446
- const grp = this.getGroup(groupName);
1447
- if (grp.isMovable) {
1448
- LauncherClient.hyperFocus({ windowList: grp.getWindowNames() });
1449
- }
1450
- });
1451
- }
1452
- async initiateGroupMaskCreation() {
1453
- const setDockingMoveMask = async () => {
1454
- const { wrap: groupMask } = await FinsembleWindowInternal.getInstance({
1455
- name: "DockingGroupMask",
1456
- waitForReady: true,
1457
- });
1458
- groupMask._getBounds({}, (err, bounds) => {
1459
- const mask = DockableWindow.factory(groupMask, bounds, this);
1460
- mask.canGroup = false;
1461
- this.groupMask = mask;
1462
- });
1463
- };
1464
- // when component is started, it's workspace client will try to access the workspace service, so wait until workspace is up before creating this mask
1465
- await SystemManagerClient.waitForStartup("workspaceService");
1466
- // Show Docking Move Mask
1467
- LauncherClient.showWindow({ componentType: "DockingGroupMask" }, {
1468
- name: "DockingGroupMask",
1469
- spawnIfNotFound: true,
1470
- options: {
1471
- autoShow: false,
1472
- },
1473
- }, setDockingMoveMask);
1474
- }
1475
- removeWindow(windowName) {
1476
- const dockableWindow = this.getWindow(windowName);
1477
- dockableWindow.win.removeEventListener("minimized", this.setWindowMinimized);
1478
- dockableWindow.win.removeEventListener("maximized", this.setWindowMaximized);
1479
- dockableWindow.win.removeEventListener("focused", this.setWindowFocused);
1480
- dockableWindow.win.removeEventListener("shown", this.bringGroupToFront);
1481
- // these two deal with undocking/setting the isHidden boolean (which causes docking to skip windows when figuring out whether to snap.
1482
- dockableWindow.win.removeEventListener("hidden", this.onWindowHidden);
1483
- dockableWindow.win.removeEventListener("shown", this.onWindowShown);
1484
- if (dockableWindow.closeEventListener)
1485
- dockableWindow.win.removeEventListener("closed", dockableWindow.closeEventListener);
1486
- super.removeWindowInternal(windowName);
1487
- }
1488
- /**
1489
- * Sets the initial buffer size.
1490
- */
1491
- setupDockingCalculator() {
1492
- var _a, _b;
1493
- Logger.system.log("Docking initialization", serviceConfig);
1494
- this.setTilingOrTabbingEnabled(serviceConfig);
1495
- this.setWindowsAeroSnap(serviceConfig);
1496
- this.setAllowGroupsToSnap(serviceConfig.ALLOW_GROUPS_TO_SNAP);
1497
- this.setGroupMode(serviceConfig.GROUP_MODE);
1498
- this.setBufferSize(serviceConfig.BUFFER_SIZE);
1499
- this.setSnappingOpacity((_a = serviceConfig.SNAPPING_OPACITY) !== null && _a !== void 0 ? _a : 1);
1500
- this.setResizeThrottlePeriod((_b = serviceConfig.RESIZE_EVENT_THROTTLE_PERIOD) !== null && _b !== void 0 ? _b : 0);
1501
- this.setGlobalMinimums(serviceConfig);
1502
- }
1503
- addMonitor(monitor, isDockableWindowAction) {
1504
- const dockableMonitor = new DockableMonitor({ bounds: monitor, monitor: monitor._monitor, dockingMain: this });
1505
- dockableMonitor.setBufferSize(this.bufferSize);
1506
- MonitorPoolSingleton.add(dockableMonitor.name, dockableMonitor);
1507
- if (!isDockableWindowAction) {
1508
- this.AutoArrange.isArranged[monitor.name] = false;
1509
- this.cachedPositions[monitor.name] = {};
1510
- }
1511
- }
1512
- setGroupMode(groupMode) {
1513
- super.setGroupMode(groupMode);
1514
- RouterClient.publish("DockingService.groupMode", groupMode);
1515
- }
1516
- setWindowsAeroSnap(setWindowsAeroSnapArg) {
1517
- this.enableWindowsAeroSnap = setWindowsAeroSnapArg.enableWindowsAeroSnap || false;
1518
- }
1519
- /** **********************************************
1520
- * *
1521
- * Debugging Helpers *
1522
- * *
1523
- *********************************************** */
1524
- /**
1525
- * For debugging.
1526
- * @function {function name}
1527
- * @return {type} {description}
1528
- */
1529
- getGridWindows() {
1530
- const self = this;
1531
- ["A", "B", "C", "D", "E", "F", "G", "H", "I"].forEach((windowName) => {
1532
- window[windowName + windowName] = self.getWindow(windowName);
1533
- });
1534
- }
1535
- /**
1536
- * @function {function name}
1537
- * @return {type} {description}
1538
- */
1539
- logger() {
1540
- const boundingBoxes = {};
1541
- for (const windowName in this.getWindows()) {
1542
- const win = this.getWindow(windowName);
1543
- boundingBoxes[windowName] = JSON.stringify(win.windowBoundingBox);
1544
- }
1545
- let box = "";
1546
- box = `${box}+----------------------------------------+\n`;
1547
- box = `${box}| | | |\n`;
1548
- box = `${box}| ${boundingBoxes.A} | ${boundingBoxes.B} | ${boundingBoxes.C} |\n`;
1549
- box = `${box}| | | |\n`;
1550
- box = `${box}| | | |\n`;
1551
- box = `${box}+----------------------------------------+\n`;
1552
- box = `${box}| | | |\n`;
1553
- box = `${box}| ${boundingBoxes.D} | ${boundingBoxes.E} | ${boundingBoxes.F} |\n`;
1554
- box = `${box}| | | |\n`;
1555
- box = `${box}| | | |\n`;
1556
- box = `${box}+----------------------------------------+\n`;
1557
- box = `${box}| | | |\n`;
1558
- box = `${box}| ${boundingBoxes.G} | ${boundingBoxes.H} | ${boundingBoxes.I} |\n`;
1559
- box = `${box}| | | |\n`;
1560
- box = `${box}| | | |\n`;
1561
- box = `${box}+----------------------------------------+\n`;
1562
- Logger.system.log(box);
1563
- }
1564
- /**
1565
- * returns true if intersection in groups
1566
- */
1567
- isACommonGroup(firstSet, secondSet) {
1568
- return firstSet.some((i) => secondSet.includes(i));
1569
- }
1570
- /**
1571
- * Sends a message asking windows to save their position. If window is in a group, then all windows in same group are told; otherwise, only the independent window is told
1572
- * @returns true if window that changed was in a group (which also changed)
1573
- */
1574
- tellWindowOrGroupToSaveLocation(changedWindow) {
1575
- let windowInGroupChanged = false;
1576
- const windowIter = DockingPoolSingleton.iterator();
1577
- for (const win of windowIter) {
1578
- // to ensure all the grouping functions works correctly, update any windows in the same group as changedWindow.
1579
- let isOneCommonGroup = this.isACommonGroup(win.groupNames, changedWindow.groupNames);
1580
- Logger.system.debug("tellWindowOrGroupToSaveLocation isACommonGroup?", changedWindow.name, win.win.name, isOneCommonGroup ? "CommonGroup" : "differentGroups");
1581
- if (isOneCommonGroup || changedWindow.name === win.win.name) {
1582
- if (isOneCommonGroup) {
1583
- windowInGroupChanged = true;
1584
- }
1585
- // This is a hack until we have proper events in finsemble. We need to notify windows that aren't part of the workspace so that they can save their bounds.
1586
- if (win.isDockableComponent) {
1587
- // Awful hack to get the toolbar _not_ to save it's state. This allows the toolbar to start docked when you restart the app.
1588
- win.win.dockedPosition = win.dockedPosition;
1589
- // Will trigger the bounds-change-end event.
1590
- win.win.stopMove();
1591
- }
1592
- // win.win is the underlying wrapper. win is the dockableWindow. win.win is the WebWindowWrapper
1593
- win.win._saveWindowOptions({});
1594
- Logger.system.debug("tellWindowOrGroupToSaveLocation saved window", changedWindow.name, win.win.name);
1595
- }
1596
- }
1597
- return windowInGroupChanged;
1598
- }
1599
- /**
1600
- * Sends a message asking windows to update their position in memory but not save.
1601
- */
1602
- tellWindowsToUpdateLocation() {
1603
- const windowIter = DockingPoolSingleton.iterator();
1604
- for (const win of windowIter) {
1605
- RouterClient.transmit(`DockingService.${win.name}`, {
1606
- command: "updateWindowLocation",
1607
- bounds: win.getBounds(),
1608
- });
1609
- }
1610
- }
1611
- /**
1612
- * Updates the groupData object, which is pushed out to components.
1613
- * Returns true if the groupData has changed, else false.
1614
- */
1615
- _updateGroupData() {
1616
- const groups = this.getGroups();
1617
- const groupUpdate = {};
1618
- for (const groupName in groups) {
1619
- const group = groups[groupName];
1620
- groupUpdate[groupName] = group.getJSON();
1621
- }
1622
- const changed = !isEqualIgnoringArrayOrder(groupUpdate, groupData);
1623
- if (changed) {
1624
- groupData = groupUpdate;
1625
- }
1626
- return changed;
1627
- }
1628
- /**
1629
- * Sends the groupData object out to the rest of the application.
1630
- */
1631
- publishGroupUpdate() {
1632
- const self = this;
1633
- Logger.system.debug("Publishing Group Update:", groupData, Logger.callStack());
1634
- /**
1635
- * DH 3/18/2019 - It's very strange that this workspace concern
1636
- * is published from within docking; however, we have to keep it
1637
- * for backwards compatability with previous seed branches (the UI
1638
- * depends on this update). When we can afford a break, this should
1639
- * go.
1640
- */
1641
- RouterClient.publish(constants.DOCKING.WORKSPACE_GROUP_UPDATE, self.buildWorkspaceGroupUpdate());
1642
- RouterClient.publish(constants.DOCKING.GROUP_UPDATE, self.buildGroupUpdate());
1643
- }
1644
- handleWorkspaceUpdate(err, response) {
1645
- const self = this;
1646
- Logger.system.debug("HANDLING WORKSPACE UPDATE");
1647
- const { data } = response;
1648
- // The first publish is empty.
1649
- if (!data || !data.activeWorkspace) {
1650
- return;
1651
- }
1652
- this.activeWorkspace = data.activeWorkspace;
1653
- groupData = data.activeWorkspace.groups || {};
1654
- Logger.system.debug("HandleWorkspaceUpdate Publish");
1655
- self.publishGroupUpdate();
1656
- self.moveCount = 0;
1657
- }
1658
- /**
1659
- * Checks to see if a window belongs to any groups.
1660
- */
1661
- checkIfWindowIsInGroup(name) {
1662
- if (groupData) {
1663
- for (const groupName in groupData) {
1664
- const groupWindows = groupData[groupName].windowNames;
1665
- if (groupWindows.includes(name)) {
1666
- const params = {
1667
- groupName,
1668
- win: this.getWindow(name),
1669
- };
1670
- Object.assign(params, groupData[groupName]);
1671
- this.addWindowToGroup(params);
1672
- }
1673
- }
1674
- }
1675
- }
1676
- /**
1677
- * Sends the update to all toolbars.
1678
- */
1679
- sendAutoArrangeStatusUpdate() {
1680
- RouterClient.publish(DockingMain_AUTO_ARRANGE_CHANNEL, {
1681
- isAutoArranged: this.AutoArrange.isArranged,
1682
- });
1683
- }
1684
- /**
1685
- * @private
1686
- * @param {LauncherClient~windowDescriptor} windowDescriptor
1687
- * @param {monitorDimensions} monitorDimensions
1688
- * @returns {boolean} Whether window is on the current monitor.
1689
- */
1690
- windowOnMonitor(windowDescriptor, monitorDimensions) {
1691
- if (!windowDescriptor.monitor) {
1692
- return false;
1693
- }
1694
- // if right or left edge is within the window's bounds.
1695
- return windowDescriptor.monitor.name === monitorDimensions.name;
1696
- }
1697
- /**
1698
- * Get bounds for a window.
1699
- */
1700
- getBounds(params, cb = Function.prototype) {
1701
- Logger.system.debug(".getBounds", params);
1702
- const win = this.getWindow(params.name);
1703
- let bounds = { left: 0, right: 0, top: 0, bottom: 0 };
1704
- if (win) {
1705
- bounds = win.getBounds();
1706
- cb(null, bounds);
1707
- }
1708
- else {
1709
- cb("Window is not registered with Docking. No bounds retrieved.", null);
1710
- }
1711
- Logger.system.debug(".getBounds return", bounds);
1712
- return bounds;
1713
- }
1714
- deregisterAllWindows() {
1715
- const self = this;
1716
- return new Promise((resolve) => {
1717
- const windows = self.getWindows();
1718
- for (const windowName in windows) {
1719
- self.removeWindow(windowName);
1720
- }
1721
- resolve();
1722
- });
1723
- }
1724
- /* Stuff for Tabbing and Tiling */
1725
- async getMouseInGroups(mousePosition) {
1726
- if (!mousePosition)
1727
- mousePosition = await System.getMousePosition();
1728
- const groups = this.getGroups();
1729
- const movableGroups = [];
1730
- const immobileGroups = [];
1731
- for (const g in groups) {
1732
- const group = groups[g];
1733
- const win = group.getWindow(group.getWindowNames()[0]);
1734
- if (!win)
1735
- continue;
1736
- if ([constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED, constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL].includes(win.win.windowState) ||
1737
- win.isHidden) {
1738
- continue;
1739
- }
1740
- if (BoxMath.isPointInBox(mousePosition, group.getBounds())) {
1741
- if (group.isMovable)
1742
- movableGroups.push(group);
1743
- else
1744
- immobileGroups.push(group);
1745
- }
1746
- }
1747
- return { movableGroups, immobileGroups };
1748
- }
1749
- async getMouseInWindows(mousePosition) {
1750
- if (!mousePosition)
1751
- mousePosition = await System.getMousePosition();
1752
- const windows = this.getWindows();
1753
- const mouseWindows = [];
1754
- for (const w in windows) {
1755
- const win = windows[w];
1756
- if ([constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED, constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL].includes(win.win.windowState) ||
1757
- win.isHidden) {
1758
- continue;
1759
- }
1760
- const bounds = win.getBounds();
1761
- if (mousePosition &&
1762
- win &&
1763
- BoxMath.isPointInBox(mousePosition, Object.assign(Object.assign({}, bounds), { width: bounds.right - bounds.left, height: bounds.bottom - bounds.top }))) {
1764
- mouseWindows.push(win);
1765
- }
1766
- }
1767
- return mouseWindows;
1768
- }
1769
- startTrackingMouse(interval, cb = Function.prototype) {
1770
- var _a;
1771
- if ((_a = this.mouseTracker) === null || _a === void 0 ? void 0 : _a.interval) {
1772
- clearInterval(this.mouseTracker.interval);
1773
- this.mouseTracker.callback && this.mouseTracker.callback("New tracker overrode this one");
1774
- }
1775
- else {
1776
- this.mouseTracker = {};
1777
- }
1778
- this.mouseTracking = true;
1779
- this.mouseTracker.callback = cb;
1780
- this.mouseTracker.interval = setInterval(() => {
1781
- System.getMousePosition((err, mousePosition) => {
1782
- if (!this.mouseTracker)
1783
- this.mouseTracker = {};
1784
- if (!err)
1785
- this.mouseTracker.mousePosition = mousePosition;
1786
- cb(err, mousePosition);
1787
- });
1788
- }, interval);
1789
- }
1790
- stopTrackingMouse(cb) {
1791
- var _a, _b;
1792
- this.mouseTracking = false;
1793
- cb(null, ((_a = this.mouseTracker) === null || _a === void 0 ? void 0 : _a.interval) ? this.mouseTracker.mousePosition : null);
1794
- if ((_b = this.mouseTracker) === null || _b === void 0 ? void 0 : _b.interval)
1795
- clearInterval(this.mouseTracker.interval);
1796
- this.mouseTracker = {};
1797
- }
1798
- /**
1799
- * Check if we are near the edge of a rectangle within x% or xpx
1800
- * Returns the edge that we're nearest or false if we're not within range of any edge
1801
- */
1802
- isPositionNearEdge(position, bounds, tolerance, toleranceType = "percent") {
1803
- // inside box
1804
- const edge = {};
1805
- if (position.x < bounds.left || position.x > bounds.right || position.y < bounds.top || position.y > bounds.bottom)
1806
- return false;
1807
- let edgeToReturn = false;
1808
- let left = position.x - bounds.left;
1809
- let right = bounds.right - position.x;
1810
- let top = position.y - bounds.top;
1811
- let bottom = bounds.bottom - position.y;
1812
- if (toleranceType === "percent") {
1813
- left = left / bounds.width;
1814
- right = right / bounds.width;
1815
- top = top / bounds.height;
1816
- bottom = bottom / bounds.height;
1817
- }
1818
- // The next four are single edge
1819
- if (left < tolerance) {
1820
- edge.left = left;
1821
- edgeToReturn = "left";
1822
- }
1823
- if (right < tolerance) {
1824
- edge.right = right;
1825
- edgeToReturn = "right";
1826
- }
1827
- if (top < tolerance) {
1828
- edge.top = top;
1829
- edgeToReturn = "top";
1830
- }
1831
- if (bottom < tolerance) {
1832
- edge.bottom = bottom;
1833
- edgeToReturn = "bottom";
1834
- }
1835
- // These are within tolerance for two edges - near the corner, so pick the absolute closest
1836
- if (edge.left && edge.top) {
1837
- if (left < top)
1838
- return "left";
1839
- return "top";
1840
- }
1841
- if (edge.left && edge.bottom) {
1842
- if (left < bottom)
1843
- return "left";
1844
- return "bottom";
1845
- }
1846
- if (edge.right && edge.top) {
1847
- if (left < top)
1848
- return "right";
1849
- return "top";
1850
- }
1851
- if (edge.right && edge.bottom) {
1852
- if (right < bottom)
1853
- return "right";
1854
- return "bottom";
1855
- }
1856
- return edgeToReturn;
1857
- }
1858
- identifierForTilingOrTabbing(err, response) {
1859
- Logger.system.debug("identifierForTilingOrTabbing got identifier", response.data.windowIdentifier);
1860
- FinsembleWindowInternal.getInstance({ name: response.data.windowIdentifier.windowName }, (getInstanceErr, windowWrap) => {
1861
- this.tilingAndTabbingWindow = windowWrap;
1862
- Logger.system.debug("identifierForTilingOrTabbing got wrap", windowWrap.name);
1863
- });
1864
- }
1865
- setSwap(win, group, bounds) {
1866
- // swapping - swap within same group
1867
- this.operation = {
1868
- type: "swapping",
1869
- window: win,
1870
- group,
1871
- };
1872
- this.runScrimShower("full", bounds);
1873
- }
1874
- /**
1875
- * Returns true if the tiling operation is set (false if the window dimensions make it invalid)
1876
- */
1877
- setTiling(edge, win, bounds) {
1878
- const vertical = edge === "top" || edge === "bottom";
1879
- const horizontal = edge === "left" || edge === "right";
1880
- const tooShort = vertical && bounds.height < this.MINIMUM_HEIGHT * 2;
1881
- const tooThin = horizontal && bounds.width < 2 * this.MINIMUM_WIDTH;
1882
- if (tooShort || tooThin)
1883
- return false;
1884
- this.operation = {
1885
- type: "tiling",
1886
- tileWith: "window",
1887
- window: win,
1888
- edge,
1889
- };
1890
- this.operation.newBounds = this.runScrimShower(edge, bounds);
1891
- return true;
1892
- }
1893
- setTilingGroup(edge, group, bounds) {
1894
- var _a, _b, _c, _d, _e;
1895
- // show mask occupying proper half
1896
- const alreadyTiling = ((_a = this.operation) === null || _a === void 0 ? void 0 : _a.type) === "tiling" &&
1897
- ((_b = this.operation) === null || _b === void 0 ? void 0 : _b.tileWith) === "group" &&
1898
- ((_d = (_c = this.operation) === null || _c === void 0 ? void 0 : _c.group) === null || _d === void 0 ? void 0 : _d.name) === group.name;
1899
- this.operation = {
1900
- type: "tiling",
1901
- tileWith: "group",
1902
- group,
1903
- edge,
1904
- };
1905
- // flashing from bringing to front fix
1906
- if (!alreadyTiling) {
1907
- // Bring window to front, then bring mask to front
1908
- group.bringToFront({});
1909
- (_e = this.groupMask) === null || _e === void 0 ? void 0 : _e.win._bringToFront({});
1910
- }
1911
- this.operation.newBounds = this.runScrimShower(edge, bounds);
1912
- }
1913
- relations(win, sourceWin, sourceParentWindow) {
1914
- var _a;
1915
- const sourceWindowName = sourceWin ? sourceWin.name : null;
1916
- const { parentWindow } = win.win;
1917
- const isSelf = sourceWindowName === win.name ||
1918
- win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED ||
1919
- win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL ||
1920
- win.isHidden;
1921
- // Don't allow tiling on the scrim when it's visible
1922
- const isMask = win.name === ((_a = this.groupMask) === null || _a === void 0 ? void 0 : _a.name);
1923
- const isParent = win.name === (sourceParentWindow === null || sourceParentWindow === void 0 ? void 0 : sourceParentWindow.name);
1924
- const sharedParent = sourceParentWindow && parentWindow && sourceParentWindow.name === parentWindow.name;
1925
- return {
1926
- isSelf,
1927
- isMask,
1928
- isParent,
1929
- sharedParent,
1930
- };
1931
- }
1932
- maybeSetOperation({ win, sourceGroup, sourceParentWindow, sourceParentGroup, mousePosition, }) {
1933
- const { headerHeight } = this;
1934
- const windowBounds = completeBounds(win.getBounds());
1935
- const swapWithinSameGroup = sourceGroup && sourceGroup === this.getMovableGroup(win.name);
1936
- const parentIsPartOfGroup = sourceParentWindow && sourceParentGroup && sourceParentGroup === this.getMovableGroup(win.name);
1937
- // specific cases when tiling should be enabled
1938
- const destinationWindowAllowTiling =
1939
- // window service tiling is enabled in config
1940
- this.tilingEnabled &&
1941
- // destination window is resizable
1942
- win.win.windowOptions.resizable !== false &&
1943
- // destination window is not maximized
1944
- win.win.windowState !== WINDOWSTATE.MAXIMIZED;
1945
- // break the function if the destination window doesn't allow tiling
1946
- if (!destinationWindowAllowTiling) {
1947
- return true;
1948
- }
1949
- if (swapWithinSameGroup) {
1950
- this.setSwap(win, sourceGroup, windowBounds);
1951
- }
1952
- else if (parentIsPartOfGroup) {
1953
- // also swap tabbed windows
1954
- this.setSwap(win, sourceParentGroup, windowBounds);
1955
- }
1956
- else if (win.allowTiling) {
1957
- const edge = this.isPositionNearEdge(mousePosition, Object.assign(Object.assign({}, windowBounds), { top: windowBounds.top + headerHeight, height: windowBounds.height - headerHeight }), 0.5);
1958
- if (edge && !this.setTiling(edge, win, windowBounds))
1959
- return false;
1960
- }
1961
- return true;
1962
- }
1963
- didNotFindAGroupTile({ sourceWin, wins, sourceParentWindow, sourceParentGroup, sourceGroup, mousePosition, }) {
1964
- let showScrim = false;
1965
- let allowDetaching = true;
1966
- for (const win of wins) {
1967
- const { isSelf, isMask, isParent, sharedParent } = this.relations(win, sourceWin, sourceParentWindow);
1968
- if (!win.allowTiling || isSelf || isMask || isParent || sharedParent) {
1969
- allowDetaching = false;
1970
- continue;
1971
- }
1972
- if (this.maybeSetOperation({ win, sourceGroup, sourceParentGroup, sourceParentWindow, mousePosition })) {
1973
- showScrim = true;
1974
- break;
1975
- }
1976
- }
1977
- return { showScrim, allowDetaching };
1978
- }
1979
- async handleNotTabbing({ sourceWin, mousePosition, wins, }) {
1980
- let showScrim = false;
1981
- let allowDetaching = true;
1982
- const sourceWindowName = sourceWin ? sourceWin.name : null;
1983
- const { headerHeight } = this;
1984
- const { movableGroups: groups } = await this.getMouseInGroups(mousePosition);
1985
- const sourceParentWindow = sourceWin ? sourceWin.parentWindow : null;
1986
- const sourceGroup = sourceWindowName ? this.getMovableGroup(sourceWindowName) : null;
1987
- const sourceParentGroup = sourceParentWindow ? this.getMovableGroup(sourceParentWindow.name) : null;
1988
- // tabbing gets priority
1989
- for (const group of groups) {
1990
- // group tile
1991
- if (!group.isARectangle())
1992
- continue;
1993
- const groupBounds = group.getBounds();
1994
- const edge = this.isPositionNearEdge(mousePosition, Object.assign(Object.assign({}, groupBounds), { top: groupBounds.top + headerHeight, height: groupBounds.height - headerHeight }), this.groupTileBuffer, "pixel");
1995
- const isSameGroupAsParent = sourceGroup === group || sourceParentGroup === group;
1996
- if (edge && this.tilingEnabled) {
1997
- if (isSameGroupAsParent)
1998
- continue;
1999
- this.setTilingGroup(edge, group, groupBounds);
2000
- showScrim = true;
2001
- break;
2002
- }
2003
- }
2004
- // did not find a group tile
2005
- if (!showScrim) {
2006
- ({ showScrim, allowDetaching } = this.didNotFindAGroupTile({
2007
- wins,
2008
- sourceWin,
2009
- sourceParentWindow,
2010
- sourceParentGroup,
2011
- sourceGroup,
2012
- mousePosition,
2013
- }));
2014
- }
2015
- return { showScrim, allowDetaching };
2016
- }
2017
- runScrimShower(edge, bounds) {
2018
- if (!this.mouseTracking)
2019
- return;
2020
- const newBounds = scrimShower(edge, bounds);
2021
- this.showGroupMask({ bounds: newBounds.maskBounds, opacity: 0.5 });
2022
- return newBounds;
2023
- }
2024
- areWeTabbing(sourceWin, wins, mousePosition) {
2025
- const areWePositionedOnTab = (win) => {
2026
- const { headerHeight } = this;
2027
- const actualWindowBounds = win.getBounds();
2028
- const edge = this.isPositionNearEdge(mousePosition, actualWindowBounds, headerHeight, "pixel");
2029
- return edge === "top";
2030
- };
2031
- const sourceWindowName = sourceWin ? sourceWin.name : null;
2032
- for (const win of wins) {
2033
- const isSelf = win.name === sourceWindowName ||
2034
- win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED ||
2035
- win.win.windowState === constants.WINDOWSTATE.MINIMIZED_WAS_NORMAL ||
2036
- win.isHidden;
2037
- if (!isSelf && areWePositionedOnTab(win)) {
2038
- if (!(this.operation && this.operation.window && this.operation.window.name == win.name)) {
2039
- win.bringToFront();
2040
- }
2041
- this.operation = {
2042
- window: win,
2043
- };
2044
- return true;
2045
- }
2046
- }
2047
- return false;
2048
- }
2049
- /**
2050
- * Checks if mousePosition is in group or window
2051
- */
2052
- async boundsChecker({ sourceWin, mpErr, mousePosition, componentType, }) {
2053
- var _a;
2054
- if (mpErr) {
2055
- delete this.operation;
2056
- return;
2057
- }
2058
- if (!sourceWin && this.tilingAndTabbingWindow) {
2059
- sourceWin = this.tilingAndTabbingWindow;
2060
- delete this.tilingAndTabbingWindow;
2061
- }
2062
- // the following conditional previously also invoked clearInterval(mouseTracker.interval), but the interval wasn't defined.
2063
- // Checking if it was defined broke tiling, so the main functionality here must be just the return.
2064
- if (!this.mouseTracking)
2065
- return;
2066
- const wins = await this.getMouseInWindows(mousePosition);
2067
- let amITabbing = this.areWeTabbing(sourceWin, wins, mousePosition);
2068
- let allowDetaching = true;
2069
- let showScrim = false;
2070
- if (!amITabbing &&
2071
- // allow tiling if it is enabled for the source window
2072
- sourceWin.tiling &&
2073
- // allow tiling if window is resizable
2074
- sourceWin.windowOptions.resizable !== false &&
2075
- // allow tiling if window is not maximized
2076
- sourceWin.windowState !== WINDOWSTATE.MAXIMIZED) {
2077
- ({ showScrim, allowDetaching } = await this.handleNotTabbing({ sourceWin, mousePosition, wins }));
2078
- }
2079
- // if we are not tabbing or tiling, we are detaching
2080
- if (!showScrim && !amITabbing && componentType) {
2081
- // This means that we are trying to tab/tile with an as yet un-spawned window. Show a window sized scrim
2082
- showScrim = true;
2083
- this.operation = {
2084
- type: "detaching",
2085
- };
2086
- this.runScrimShower("full", Object.assign(mousePosition, this.configCache[componentType]));
2087
- }
2088
- if (!showScrim) {
2089
- this.hideGroupMask();
2090
- // if we are not tabbing, we are detaching
2091
- if (!amITabbing && allowDetaching) {
2092
- this.operation = {
2093
- type: "detaching",
2094
- };
2095
- }
2096
- }
2097
- this.operation = (_a = this.operation) !== null && _a !== void 0 ? _a : {};
2098
- this.operation.sourceWindowName = sourceWin === null || sourceWin === void 0 ? void 0 : sourceWin.name;
2099
- }
2100
- startTilingOrTabbing(err, response, sourceWin) {
2101
- var _a;
2102
- const { windowIdentifier } = response.data;
2103
- // Gotta make sure we always pass the right thing around.
2104
- windowIdentifier.windowName = (_a = windowIdentifier.windowName) !== null && _a !== void 0 ? _a : windowIdentifier.name;
2105
- const sourceDockableWindow = this.getWindow(windowIdentifier.windowName);
2106
- if (!sourceWin && !response.data.waitForIdentifier && !sourceDockableWindow) {
2107
- FinsembleWindowInternal.getInstance({ name: windowIdentifier.windowName }, (getInstanceErr, windowWrap) => this.startTilingOrTabbing(getInstanceErr, response, windowWrap));
2108
- return;
2109
- }
2110
- Logger.system.debug("StartTilingOrTabbing");
2111
- const { componentType } = response.data;
2112
- this.startTrackingMouse(5, (mpErr, mousePosition) => {
2113
- this.boundsChecker({ mpErr, mousePosition, componentType, sourceWin: sourceWin !== null && sourceWin !== void 0 ? sourceWin : sourceDockableWindow.win });
2114
- });
2115
- }
2116
- cancelTilingOrTabbing() {
2117
- Logger.system.debug("CancelTilingOrTabbing");
2118
- delete this.operation;
2119
- this.stopTrackingMouse(() => { });
2120
- }
2121
- buildSnapRelationshipsForGroup(group) {
2122
- const windows = group.getWindows();
2123
- for (const w in windows) {
2124
- this.buildSnapRelationships(windows[w]);
2125
- }
2126
- }
2127
- getFillHolesFor(sourceWindow) {
2128
- let fillHolesFor = [];
2129
- if (sourceWindow.groupNames && sourceWindow.groupNames.length) {
2130
- // check if we need to fill holes
2131
- for (let i = sourceWindow.groupNames.length - 1; i >= 0; i--) {
2132
- const g = sourceWindow.groupNames[i];
2133
- const group = this.getGroup(g);
2134
- if (group.isARectangle() && group.isMovable) {
2135
- fillHolesFor.push(group);
2136
- }
2137
- }
2138
- }
2139
- return fillHolesFor;
2140
- }
2141
- async fillHoles(group, bounds) {
2142
- await group.fillHole(bounds);
2143
- this.cleanupGroupGaps(group);
2144
- this.buildSnapRelationshipsForGroup(group);
2145
- }
2146
- actualStopTilingRequestMove({ sourceWindow, placement, groupNames, fillHolesFor, operation, oldBounds, }) {
2147
- const sourceMoveRequest = {
2148
- name: sourceWindow.name,
2149
- changeType: 0,
2150
- };
2151
- // this.buildSnapRelationships(sourceWindow);
2152
- Object.assign(sourceMoveRequest, placement);
2153
- Logger.system.debug("Docking:stopTilingOrTabbing requestMove 0", sourceMoveRequest);
2154
- this.requestMove(sourceMoveRequest, (bounds) => {
2155
- if (bounds && !bounds.finished)
2156
- return;
2157
- Logger.system.debug("Docking:stopTilingOrTabbing requestMove", bounds);
2158
- // If target is already part of a group or merging with a group
2159
- if (groupNames && groupNames.length) {
2160
- for (const g of groupNames) {
2161
- const group = this.addWindowToGroup({
2162
- groupName: g,
2163
- win: sourceWindow,
2164
- });
2165
- if (group) {
2166
- this.cleanupGroupGaps(group);
2167
- this.buildSnapRelationshipsForGroup(group);
2168
- group.updateBounds();
2169
- }
2170
- }
2171
- }
2172
- else {
2173
- const group = this.addWindowToGroup({
2174
- win: operation.window,
2175
- isMovable: true,
2176
- groupName: uuidv4(),
2177
- });
2178
- if (group) {
2179
- this.addWindowToGroup({
2180
- win: sourceWindow,
2181
- groupName: group.name,
2182
- });
2183
- }
2184
- }
2185
- this.updateGroupData();
2186
- this.onMouseUp();
2187
- for (const g of fillHolesFor) {
2188
- this.fillHoles(g, oldBounds);
2189
- }
2190
- if (groupNames && groupNames.length == 1) {
2191
- // this was a snapping group. Need to dock.
2192
- this.formGroup(sourceWindow.name, { isMovable: true });
2193
- this.updateGroupData();
2194
- }
2195
- });
2196
- }
2197
- actualStopTiling(params, fillHolesFor, sourceWindow) {
2198
- var _a;
2199
- const { err, operation } = params;
2200
- let groupNames;
2201
- const oldBounds = sourceWindow.getBounds();
2202
- Logger.system.debug("Docking:stopTilingOrTabbing case Tiling", err, operation);
2203
- const placement = this.checkShortCircuits(operation.newBounds.maskBounds, operation.newBounds.maskBounds);
2204
- operation.newBounds.newWindowBounds = this.checkShortCircuits(operation.newBounds.newWindowBounds, operation.newBounds.newWindowBounds);
2205
- // 2nd param is 'deleteGroupsWith1Window'
2206
- this.removeWindowFromAllGroups(sourceWindow, false);
2207
- (_a = sourceWindow.win.parentWindow) === null || _a === void 0 ? void 0 : _a._removeWindow({
2208
- windowIdentifier: sourceWindow.win.identifier,
2209
- });
2210
- if (operation.tileWith === "group") {
2211
- Logger.system.debug("Docking:stopTilingOrTabbing case GROUP", "removeWindow", sourceWindow.name, err);
2212
- CALCULATOR.removeWindow(sourceWindow.name, false);
2213
- if (fillHolesFor.some((grp) => operation.group.name === grp.name)) {
2214
- this.fillHoles(operation.group, oldBounds);
2215
- fillHolesFor = [];
2216
- }
2217
- operation.group.scale(operation.newBounds.newWindowBounds, operation.edge, this);
2218
- operation.group.resizeHandle = operation.edge;
2219
- operation.group.updateBounds();
2220
- const groupBounds = operation.group.getBounds();
2221
- // If the scale short circuits, we'll want to shift the window's placement to reflect the actual group bounds instead of what we planned for.
2222
- switch (operation.edge) {
2223
- case "right":
2224
- placement.left = groupBounds.right;
2225
- placement.right = placement.width + placement.left;
2226
- break;
2227
- case "left":
2228
- placement.right = groupBounds.left;
2229
- placement.left = placement.right - placement.width;
2230
- break;
2231
- case "top":
2232
- placement.bottom = groupBounds.top;
2233
- placement.top = placement.bottom - placement.height;
2234
- break;
2235
- case "bottom":
2236
- placement.top = groupBounds.bottom;
2237
- placement.bottom = placement.top + placement.height;
2238
- break;
2239
- default:
2240
- break;
2241
- }
2242
- groupNames = [operation.group.name];
2243
- Logger.system.debug("Docking:stopTilingOrTabbing case GROUP", "addWindow", sourceWindow.name);
2244
- CALCULATOR.addWindow(sourceWindow.name, sourceWindow);
2245
- }
2246
- else if (operation.tileWith === "window") {
2247
- Logger.system.debug("Docking:stopTilingOrTabbing case window", "removeWindow", operation);
2248
- // If the scale short circuits, we'll want to shift the window's placement to reflect the actual group bounds instead of what we planned for.
2249
- switch (operation.edge) {
2250
- case "right":
2251
- placement.left = operation.newBounds.newWindowBounds.right;
2252
- placement.right = placement.width + placement.left;
2253
- break;
2254
- case "left":
2255
- placement.right = operation.newBounds.newWindowBounds.left;
2256
- placement.left = placement.right - placement.width;
2257
- break;
2258
- case "top":
2259
- placement.bottom = operation.newBounds.newWindowBounds.top;
2260
- placement.top = placement.bottom - placement.height;
2261
- break;
2262
- case "bottom":
2263
- placement.top = operation.newBounds.newWindowBounds.bottom;
2264
- placement.bottom = placement.top + placement.height;
2265
- break;
2266
- default:
2267
- break;
2268
- }
2269
- operation.window.setBounds(operation.newBounds.newWindowBounds);
2270
- operation.window.win.stopMove();
2271
- ({ groupNames } = operation.window);
2272
- }
2273
- this.actualStopTilingRequestMove({
2274
- fillHolesFor,
2275
- operation,
2276
- sourceWindow,
2277
- placement,
2278
- groupNames,
2279
- oldBounds,
2280
- });
2281
- }
2282
- actualStopSwapping(sourceWindow, operation) {
2283
- Logger.system.debug("Docking:stopTilingOrTabbing case swapping", operation);
2284
- const sourceWindowNewBounds = operation.window.getBounds();
2285
- const targetWindowNewBounds = sourceWindow.getBounds();
2286
- sourceWindow.setBounds(sourceWindowNewBounds);
2287
- operation.window.setBounds(targetWindowNewBounds);
2288
- sourceWindow.win.stopMove();
2289
- operation.window.win.stopMove();
2290
- this.buildSnapRelationships(sourceWindow);
2291
- this.buildSnapRelationships(operation.window);
2292
- this.buildSnapRelationshipsForGroup(operation.group);
2293
- this.updateGroupData();
2294
- }
2295
- actualStopDetaching(fillHolesFor, sourceWindow, operation, mousePosition) {
2296
- const newBounds = {
2297
- top: mousePosition.y,
2298
- left: mousePosition.x,
2299
- right: sourceWindow.width + mousePosition.x,
2300
- bottom: sourceWindow.height + mousePosition.y,
2301
- width: sourceWindow.width,
2302
- height: sourceWindow.height,
2303
- };
2304
- const parent = sourceWindow.win.parentWindow;
2305
- if (parent) {
2306
- // detaching from tabs
2307
- Logger.system.debug("Docking:stopTilingOrTabbing case detaching with parent", operation, newBounds, parent.name);
2308
- parent._removeWindow({
2309
- showWindow: true,
2310
- windowIdentifier: sourceWindow.win.identifier,
2311
- });
2312
- sourceWindow.setBounds(newBounds);
2313
- }
2314
- Logger.system.debug("Docking:stopTilingOrTabbing case detaching no parent", operation, newBounds);
2315
- this.removeWindowFromAllGroups(sourceWindow, false);
2316
- this.updateGroupData();
2317
- const sourceMoveRequest = {
2318
- name: sourceWindow.name,
2319
- changeType: 0,
2320
- };
2321
- Object.assign(sourceMoveRequest, newBounds);
2322
- const oldBounds = sourceWindow.getBounds();
2323
- this.requestMove(sourceMoveRequest, (bounds) => {
2324
- if (bounds && !bounds.finished)
2325
- return;
2326
- if (fillHolesFor.length) {
2327
- for (const g of fillHolesFor) {
2328
- this.fillHoles(g, oldBounds);
2329
- }
2330
- }
2331
- this.onMouseUp();
2332
- });
2333
- }
2334
- actualStopTabbing(fillHolesFor, sourceWindow) {
2335
- const sourceMoveRequest = {
2336
- name: sourceWindow.name,
2337
- changeType: 0,
2338
- };
2339
- // If old window was in a group, fill holes for that group
2340
- Object.assign(sourceMoveRequest, sourceWindow.getBounds());
2341
- /** We want to remove the source window from all its groups.
2342
- * We also want to disband any groups that, as a result of
2343
- * that removal, only have 1 window in the group. That said,
2344
- * if we remove the group before the call to fillHoles(),
2345
- * the math won't be right, and we'll have a bug in some
2346
- * edge cases. Ideally, calling this.updateGroupData() should
2347
- * automatically disband any group with only 1 window, but, as
2348
- * things are, there are timing issues that cause things to
2349
- * break down with this approach.
2350
- *
2351
- * The current solution is to cache the groups sourceWindow
2352
- * belongs to, remove the sourceWindow from all its groups
2353
- * but DON'T disband any of them, call fillHole(),
2354
- * then go back and remove any single-member groups if there
2355
- * are any.
2356
- */
2357
- const oldGroupNames = clone(sourceWindow.groupNames);
2358
- this.removeWindowFromAllGroups(sourceWindow, false);
2359
- this.removeWindow(sourceWindow.name);
2360
- if (fillHolesFor.length) {
2361
- for (const g of fillHolesFor) {
2362
- this.fillHoles(g, sourceWindow.getBounds());
2363
- }
2364
- }
2365
- // This loop checks for any newly created single-member groups and disbands them.
2366
- for (const groupName of oldGroupNames) {
2367
- const group = this.getGroup(groupName);
2368
- if (!group)
2369
- continue;
2370
- const groupWindowsNames = group.getWindowNames();
2371
- if (groupWindowsNames.length !== 1)
2372
- continue;
2373
- this.removeWindowFromGroup(groupWindowsNames[0], groupName, true);
2374
- }
2375
- this.onMouseUp();
2376
- this.updateGroupData();
2377
- }
2378
- actualStopTilingOrTabbing(params, callback) {
2379
- const { mousePosition, operation } = params;
2380
- // This will only happen if you're dragging a pin or something from a menu --- the window hasn't been spawned yet.
2381
- if (!operation.sourceWindowName) {
2382
- // dragged a non-existent window. wait.
2383
- if (this.tilingAndTabbingWindow) {
2384
- operation.sourceWindowName = this.tilingAndTabbingWindow.name;
2385
- this.tilingAndTabbingWindow = undefined;
2386
- }
2387
- else {
2388
- setTimeout(() => {
2389
- Logger.system.debug("StopTilingOrTabbing.actualStopTilingOrTabbing waiting for window");
2390
- this.actualStopTilingOrTabbing(params, callback);
2391
- }, 100);
2392
- return;
2393
- }
2394
- }
2395
- const sourceWindow = this.getWindow(operation.sourceWindowName);
2396
- // take what the user sent on dragend
2397
- Logger.system.debug("StopTilingOrTabbing.actualStopTilingOrTabbing", operation.sourceWindowName, mousePosition);
2398
- if (!sourceWindow) {
2399
- // detaching from tabbing so window is not registered with docking
2400
- FinsembleWindowInternal.getInstance({ name: operation.sourceWindowName }, (getInstanceErr, windowWrap) => {
2401
- Logger.system.debug("StopTilingOrTabbing.no source window. Adding to docking.", operation.sourceWindowName);
2402
- this.addWindow(windowWrap)
2403
- .then(() => {
2404
- this.checkIfWindowIsInGroup(windowWrap.name);
2405
- Logger.system.debug("StopTilingOrTabbing.recursive call");
2406
- this.actualStopTilingOrTabbing(params, callback);
2407
- })
2408
- .catch((err) => {
2409
- Logger.system.debug("StopTilingOrTabbing.recursive call caught reject", err);
2410
- this.actualStopTilingOrTabbing(params, callback);
2411
- });
2412
- });
2413
- return;
2414
- }
2415
- const fillHolesFor = this.getFillHolesFor(sourceWindow);
2416
- this.hideGroupMask();
2417
- // When we call request-move, docking will stp if the window is between two snapping regions. By temporarily reducing the buffer size, we prevent inadvertent snaps and move our window to where we calculated it should go.
2418
- const BUFFER = this.bufferSize;
2419
- this.setBufferSize(0);
2420
- if (!operation.type) {
2421
- operation.type = "detaching";
2422
- }
2423
- switch (operation.type) {
2424
- case "tiling":
2425
- this.actualStopTiling(params, fillHolesFor, sourceWindow);
2426
- break;
2427
- case "swapping":
2428
- this.actualStopSwapping(sourceWindow, operation);
2429
- break;
2430
- case "detaching":
2431
- this.actualStopDetaching(fillHolesFor, sourceWindow, operation, mousePosition);
2432
- break;
2433
- case "tabbing":
2434
- Logger.system.debug("Docking:stopTilingOrTabbing case tabbing break", operation ? operation.type : null);
2435
- this.actualStopTabbing(fillHolesFor, sourceWindow);
2436
- break;
2437
- default:
2438
- break;
2439
- }
2440
- this.setBufferSize(BUFFER);
2441
- if (operation.group) {
2442
- operation.group.resizeHandle = null;
2443
- }
2444
- callback();
2445
- }
2446
- stopTilingOrTabbing(err, response, callback) {
2447
- Logger.system.debug("Docking:stopTilingOrTabbing start", err, response, this.operation ? this.operation.type : null);
2448
- if (!this.operation) {
2449
- Logger.system.debug("Docking:stopTilingOrTabbing invariant: this.operation is unset");
2450
- callback();
2451
- return;
2452
- }
2453
- const op = this.operation;
2454
- delete this.operation;
2455
- if (response.data.action) {
2456
- op.type = response.data.action;
2457
- }
2458
- /* Show Window at Last Scrim Position */
2459
- Logger.system.debug("Stop tiling or tabbing");
2460
- this.stopTrackingMouse((stopTrackingMouseErr, mousePosition) => {
2461
- mousePosition = response.data.mousePosition || mousePosition;
2462
- if (op.type === "swapping" && op.sourceWindowName) {
2463
- FinsembleWindowInternal.getInstance({ name: op.sourceWindowName }, (getInstanceErr, windowWrap) => {
2464
- // replace the sourceWindowName with the parent's name. This way the whole stacked group gets swapped instead of the individual tab.
2465
- if (windowWrap.parentWindow) {
2466
- op.sourceWindowName = windowWrap.parentWindow.name;
2467
- }
2468
- this.actualStopTilingOrTabbing({ err: getInstanceErr, mousePosition, operation: op }, callback);
2469
- });
2470
- }
2471
- else {
2472
- this.actualStopTilingOrTabbing({ err: stopTrackingMouseErr, mousePosition, operation: op }, callback);
2473
- }
2474
- });
2475
- }
2476
- //KB40615 Listen for a change in the config (see AssimilationService) indicating that assimilation
2477
- // startup failed, then disable claimed space (otherwise it may cause issues with toolbar
2478
- // visibility, which is only reset when monitor resize events are triggered by claimSpace)
2479
- maybeAssimilationFailed() {
2480
- ConfigClient.addListener({ field: "finsemble.servicesConfig.servicesConfig.assimilation.enabled" }, (err, change) => {
2481
- var _a;
2482
- if (!change.value) {
2483
- //disable claimed space
2484
- serviceConfig.assimilationEnabled = change.value;
2485
- if ((_a = serviceConfig.claimSpace) === null || _a === void 0 ? void 0 : _a.enabled) {
2486
- serviceConfig.claimSpace.enabled = change.value;
2487
- Logger.system.error("Claimed space disabled at runtime, probably due to a failure to start assimilation");
2488
- }
2489
- this.claimSpace = this.claimSpace && change.value;
2490
- }
2491
- });
2492
- }
2493
- async initialize() {
2494
- this.createRouterEndpoints();
2495
- this.initiateGroupMaskCreation();
2496
- const setupDockingCalculator = async () => {
2497
- var _a, _b, _c, _d, _e, _f;
2498
- const { data: response } = await ConfigClient.getValue({ field: "finsemble" });
2499
- const isWindows = await util.isWindows();
2500
- this.isWindows = isWindows;
2501
- // Finsemble config
2502
- serviceConfig = response.services.windowService.config || response.services.dockingService.config;
2503
- /* Assimilation config can come from the defaults (/finsemble/configs/core/services.json),
2504
- client-configured servicesConfig, or in betaFeatures config (deprecated). */
2505
- const servicesConfigAssim = response.servicesConfig.assimilation;
2506
- const betaAssim = response.betaFeatures.assimilation;
2507
- const defaultAssim = response.services.assimilationService.config;
2508
- const assimilationConfig = Object.assign(defaultAssim, servicesConfigAssim || betaAssim);
2509
- serviceConfig.assimilationEnabled = isWindows && assimilationConfig.enabled;
2510
- // right place is servicesConfig, old place was top-level config. Otherwise we use an empty object that gets merged with finsemble defaults.
2511
- const docking = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.servicesConfig) === null || _a === void 0 ? void 0 : _a.docking) !== null && _b !== void 0 ? _b : response === null || response === void 0 ? void 0 : response.docking) !== null && _c !== void 0 ? _c : {};
2512
- serviceConfig = Object.assign(Object.assign(Object.assign({}, serviceConfig), docking), { GROUP_MODE: {
2513
- enabled: docking.enabled,
2514
- behavior: "explicit",
2515
- groupTileBuffer: docking.groupTileBuffer || 30,
2516
- headerHeight: docking.headerHeight || 32,
2517
- requireRectangularityForGroupResize: docking.requireRectangularityForGroupResize,
2518
- fillHolesOnUndock: docking.fillHolesOnUndock,
2519
- undockDisbandsEntireGroup: docking.undockDisbandsEntireGroup,
2520
- } });
2521
- if (!isWindows || !serviceConfig.assimilationEnabled) {
2522
- serviceConfig.claimSpace = {
2523
- enabled: false,
2524
- };
2525
- }
2526
- this.claimSpace = (_e = (_d = serviceConfig.claimSpace) === null || _d === void 0 ? void 0 : _d.enabled) !== null && _e !== void 0 ? _e : false;
2527
- this.preventOverlapClaimSpace = (_f = serviceConfig.preventOverlapClaimSpace) !== null && _f !== void 0 ? _f : false;
2528
- this.maybeAssimilationFailed();
2529
- this.serviceConfig = serviceConfig;
2530
- this.setupDockingCalculator();
2531
- };
2532
- const initializeMonitors = async () => {
2533
- const res = await getAllMonitors();
2534
- this.updateMonitorInfo(res);
2535
- };
2536
- await Promise.all([setupDockingCalculator(), initializeMonitors()]);
2537
- this.dockingReady = true;
2538
- }
2539
- }
2540
- export default DockingMain;
2541
- //# sourceMappingURL=dockingMain.js.map