@finsemble/finsemble-ui 8.0.2 → 8.1.0-beta.2

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 (254) hide show
  1. package/FEA.d.ts +48 -3
  2. package/FEA.d.ts.map +1 -1
  3. package/FEA.js.map +1 -1
  4. package/clients/Interop/FinsembleDesktopAgent.js +1 -1
  5. package/clients/Startup/FSBLDesktop.d.ts +2 -14
  6. package/clients/Startup/FSBLDesktop.d.ts.map +1 -1
  7. package/clients/Startup/FSBLDesktop.js +4 -21
  8. package/clients/Startup/FSBLDesktop.js.map +1 -1
  9. package/clients/Startup/types.d.ts +17 -0
  10. package/clients/Startup/types.d.ts.map +1 -1
  11. package/clients/Startup/windowStartup.d.ts.map +1 -1
  12. package/clients/Startup/windowStartup.js +16 -14
  13. package/clients/Startup/windowStartup.js.map +1 -1
  14. package/clients/routerClient.d.ts +2 -169
  15. package/clients/routerClient.d.ts.map +1 -1
  16. package/clients/routerClient.js +4 -7
  17. package/clients/routerClient.js.map +1 -1
  18. package/common/Desktop.d.ts +8 -0
  19. package/common/Desktop.d.ts.map +1 -1
  20. package/common/Desktop.js +23 -0
  21. package/common/Desktop.js.map +1 -1
  22. package/common/FinsembleWindow.d.ts +1 -2
  23. package/common/FinsembleWindow.d.ts.map +1 -1
  24. package/common/FinsembleWindow.js +1 -1
  25. package/common/FinsembleWindow.js.map +1 -1
  26. package/common/Monitors.d.ts +6 -0
  27. package/common/Monitors.d.ts.map +1 -1
  28. package/common/Monitors.js +22 -0
  29. package/common/Monitors.js.map +1 -1
  30. package/common/system.d.ts +1 -1
  31. package/common/system.d.ts.map +1 -1
  32. package/main.d.ts +29 -29
  33. package/package.json +44 -44
  34. package/platform/services/Interop/types.d.ts +1 -0
  35. package/platform/services/Interop/types.d.ts.map +1 -1
  36. package/platform/services/Interop/types.js.map +1 -1
  37. package/platform/services/router/routerTransport.d.ts.map +1 -1
  38. package/platform/services/router/routerTransport.js +5 -7
  39. package/platform/services/router/routerTransport.js.map +1 -1
  40. package/platform/services/router/types.d.ts +214 -0
  41. package/platform/services/router/types.d.ts.map +1 -0
  42. package/platform/services/router/types.js +2 -0
  43. package/platform/services/router/types.js.map +1 -0
  44. package/platform/services/types.d.ts +1 -0
  45. package/platform/services/types.d.ts.map +1 -1
  46. package/platform/services/types.js +1 -0
  47. package/platform/services/types.js.map +1 -1
  48. package/platform/services/window/Common/Pools/ObjectPool.d.ts +11 -0
  49. package/platform/services/window/Common/Pools/ObjectPool.d.ts.map +1 -0
  50. package/platform/services/window/Common/Pools/ObjectPool.js +43 -0
  51. package/platform/services/window/Common/Pools/ObjectPool.js.map +1 -0
  52. package/platform/services/window/Common/Pools/PoolSingletons.d.ts +10 -0
  53. package/platform/services/window/Common/Pools/PoolSingletons.d.ts.map +1 -0
  54. package/platform/services/window/Common/Pools/PoolSingletons.js +10 -0
  55. package/platform/services/window/Common/Pools/PoolSingletons.js.map +1 -0
  56. package/platform/services/window/Common/Pools/WindowPool.d.ts +7 -0
  57. package/platform/services/window/Common/Pools/WindowPool.d.ts.map +1 -0
  58. package/platform/services/window/Common/Pools/WindowPool.js +16 -0
  59. package/platform/services/window/Common/Pools/WindowPool.js.map +1 -0
  60. package/platform/services/window/Docking/boxMath.d.ts +144 -0
  61. package/platform/services/window/Docking/boxMath.d.ts.map +1 -0
  62. package/platform/services/window/Docking/boxMath.js +511 -0
  63. package/platform/services/window/Docking/boxMath.js.map +1 -0
  64. package/platform/services/window/Docking/constants.d.ts +29 -0
  65. package/platform/services/window/Docking/constants.d.ts.map +1 -0
  66. package/platform/services/window/Docking/constants.js +29 -0
  67. package/platform/services/window/Docking/constants.js.map +1 -0
  68. package/platform/services/window/Docking/dockableBox.d.ts +117 -0
  69. package/platform/services/window/Docking/dockableBox.d.ts.map +1 -0
  70. package/platform/services/window/Docking/dockableBox.js +525 -0
  71. package/platform/services/window/Docking/dockableBox.js.map +1 -0
  72. package/platform/services/window/Docking/dockableGroup.d.ts +252 -0
  73. package/platform/services/window/Docking/dockableGroup.d.ts.map +1 -0
  74. package/platform/services/window/Docking/dockableGroup.js +1054 -0
  75. package/platform/services/window/Docking/dockableGroup.js.map +1 -0
  76. package/platform/services/window/Docking/dockableMonitor.d.ts +99 -0
  77. package/platform/services/window/Docking/dockableMonitor.d.ts.map +1 -0
  78. package/platform/services/window/Docking/dockableMonitor.js +427 -0
  79. package/platform/services/window/Docking/dockableMonitor.js.map +1 -0
  80. package/platform/services/window/Docking/dockableWindow.d.ts +272 -0
  81. package/platform/services/window/Docking/dockableWindow.d.ts.map +1 -0
  82. package/platform/services/window/Docking/dockableWindow.js +1239 -0
  83. package/platform/services/window/Docking/dockableWindow.js.map +1 -0
  84. package/platform/services/window/Docking/dockingCalculator.d.ts +749 -0
  85. package/platform/services/window/Docking/dockingCalculator.d.ts.map +1 -0
  86. package/platform/services/window/Docking/dockingCalculator.js +3473 -0
  87. package/platform/services/window/Docking/dockingCalculator.js.map +1 -0
  88. package/platform/services/window/Docking/dockingMain.d.ts +349 -0
  89. package/platform/services/window/Docking/dockingMain.d.ts.map +1 -0
  90. package/platform/services/window/Docking/dockingMain.js +2584 -0
  91. package/platform/services/window/Docking/dockingMain.js.map +1 -0
  92. package/platform/services/window/Docking/maskBoundsCalculator.d.ts +28 -0
  93. package/platform/services/window/Docking/maskBoundsCalculator.d.ts.map +1 -0
  94. package/platform/services/window/Docking/maskBoundsCalculator.js +67 -0
  95. package/platform/services/window/Docking/maskBoundsCalculator.js.map +1 -0
  96. package/platform/services/window/Docking/monitorUpdateHandler.d.ts +32 -0
  97. package/platform/services/window/Docking/monitorUpdateHandler.d.ts.map +1 -0
  98. package/platform/services/window/Docking/monitorUpdateHandler.js +117 -0
  99. package/platform/services/window/Docking/monitorUpdateHandler.js.map +1 -0
  100. package/platform/services/window/Docking/types.d.ts +334 -0
  101. package/platform/services/window/Docking/types.d.ts.map +1 -0
  102. package/platform/services/window/Docking/types.js +12 -0
  103. package/platform/services/window/Docking/types.js.map +1 -0
  104. package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts +90 -0
  105. package/platform/services/window/MultiWindowFeatures/autoArrange.d.ts.map +1 -0
  106. package/platform/services/window/MultiWindowFeatures/autoArrange.js +510 -0
  107. package/platform/services/window/MultiWindowFeatures/autoArrange.js.map +1 -0
  108. package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts +411 -0
  109. package/platform/services/window/StackedWindowManager/stackedWindowManager.d.ts.map +1 -0
  110. package/platform/services/window/StackedWindowManager/stackedWindowManager.js +1641 -0
  111. package/platform/services/window/StackedWindowManager/stackedWindowManager.js.map +1 -0
  112. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts +9 -0
  113. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.d.ts.map +1 -0
  114. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js +23 -0
  115. package/platform/services/window/WindowAbstractions/FinsembleWindowInternal.js.map +1 -0
  116. package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts +227 -0
  117. package/platform/services/window/WindowAbstractions/WebWindowWrapper.d.ts.map +1 -0
  118. package/platform/services/window/WindowAbstractions/WebWindowWrapper.js +1168 -0
  119. package/platform/services/window/WindowAbstractions/WebWindowWrapper.js.map +1 -0
  120. package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts +121 -0
  121. package/platform/services/window/WindowAbstractions/externalWindowWrapper.d.ts.map +1 -0
  122. package/platform/services/window/WindowAbstractions/externalWindowWrapper.js +591 -0
  123. package/platform/services/window/WindowAbstractions/externalWindowWrapper.js.map +1 -0
  124. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts +194 -0
  125. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.d.ts.map +1 -0
  126. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js +680 -0
  127. package/platform/services/window/WindowAbstractions/stackedWindowWrapper.js.map +1 -0
  128. package/platform/services/window/types.d.ts +13 -13
  129. package/platform/services/window/windowGroup.d.ts +86 -0
  130. package/platform/services/window/windowGroup.d.ts.map +1 -0
  131. package/platform/services/window/windowGroup.js +323 -0
  132. package/platform/services/window/windowGroup.js.map +1 -0
  133. package/platform/services/workspace/windowStorageManager.d.ts +178 -0
  134. package/platform/services/workspace/windowStorageManager.d.ts.map +1 -0
  135. package/platform/services/workspace/windowStorageManager.js +195 -0
  136. package/platform/services/workspace/windowStorageManager.js.map +1 -0
  137. package/platform/services/workspace/workspaceAdminAPI.d.ts +1 -1
  138. package/platform/services/workspace/workspaceAdminAPI.d.ts.map +1 -1
  139. package/react/actions/smartDesktopDesignerActions.d.ts +2 -0
  140. package/react/actions/smartDesktopDesignerActions.d.ts.map +1 -1
  141. package/react/actions/smartDesktopDesignerActions.js +1 -0
  142. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  143. package/react/assets/css/download.css +119 -0
  144. package/react/assets/css/userPreferences.css +50 -0
  145. package/react/assets/css/windowTitleBar.css +2 -1
  146. package/react/assets/icons/cancel.svg +15 -0
  147. package/react/assets/icons/gear.svg +9 -0
  148. package/react/assets/icons/pause.svg +15 -0
  149. package/react/assets/icons/resume.svg +17 -0
  150. package/react/assets/img/Finsemble-installation.gif +0 -0
  151. package/react/components/common/Button.d.ts +1 -0
  152. package/react/components/common/Button.d.ts.map +1 -1
  153. package/react/components/common/Button.js.map +1 -1
  154. package/react/components/common/ButtonIcon.d.ts.map +1 -1
  155. package/react/components/common/ButtonIcon.js +3 -2
  156. package/react/components/common/ButtonIcon.js.map +1 -1
  157. package/react/components/common/FinsembleIcon.d.ts +1 -1
  158. package/react/components/common/FinsembleIcon.d.ts.map +1 -1
  159. package/react/components/common/FinsembleIcon.js +8 -0
  160. package/react/components/common/FinsembleIcon.js.map +1 -1
  161. package/react/components/common/css/button.css +8 -2
  162. package/react/components/downloadManager/DownloadItem.d.ts +16 -0
  163. package/react/components/downloadManager/DownloadItem.d.ts.map +1 -0
  164. package/react/components/downloadManager/DownloadItem.js +74 -0
  165. package/react/components/downloadManager/DownloadItem.js.map +1 -0
  166. package/react/components/downloadManager/DownloadManager.d.ts +10 -0
  167. package/react/components/downloadManager/DownloadManager.d.ts.map +1 -0
  168. package/react/components/downloadManager/DownloadManager.js +42 -0
  169. package/react/components/downloadManager/DownloadManager.js.map +1 -0
  170. package/react/components/downloadManager/index.d.ts +2 -0
  171. package/react/components/downloadManager/index.d.ts.map +1 -0
  172. package/react/components/downloadManager/index.js +2 -0
  173. package/react/components/downloadManager/index.js.map +1 -0
  174. package/react/components/fdc3Resolver/ResolverDialog.css +1 -1
  175. package/react/components/index.d.ts +1 -0
  176. package/react/components/index.d.ts.map +1 -1
  177. package/react/components/index.js +1 -0
  178. package/react/components/index.js.map +1 -1
  179. package/react/components/processMonitor/ProcessMonitor.d.ts.map +1 -1
  180. package/react/components/processMonitor/ProcessMonitor.js +56 -75
  181. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  182. package/react/components/processMonitor/components/ChildWindow.d.ts +5 -7
  183. package/react/components/processMonitor/components/ChildWindow.d.ts.map +1 -1
  184. package/react/components/processMonitor/components/ChildWindow.js +30 -33
  185. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  186. package/react/components/processMonitor/components/ListHeader.d.ts +4 -16
  187. package/react/components/processMonitor/components/ListHeader.d.ts.map +1 -1
  188. package/react/components/processMonitor/components/ListHeader.js +30 -39
  189. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  190. package/react/components/processMonitor/components/ProcessStatistics.d.ts +3 -6
  191. package/react/components/processMonitor/components/ProcessStatistics.d.ts.map +1 -1
  192. package/react/components/processMonitor/components/ProcessStatistics.js +18 -23
  193. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  194. package/react/components/sdd/Dashboard.css +21 -0
  195. package/react/components/sdd/css/export.css +33 -3
  196. package/react/components/sdd/css/nav.css +1 -1
  197. package/react/components/shared/DefaultDropdownButton.js +1 -1
  198. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  199. package/react/components/toolbar/DownloadButton.d.ts +8 -0
  200. package/react/components/toolbar/DownloadButton.d.ts.map +1 -0
  201. package/react/components/toolbar/DownloadButton.js +30 -0
  202. package/react/components/toolbar/DownloadButton.js.map +1 -0
  203. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts.map +1 -1
  204. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +6 -0
  205. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  206. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  207. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  208. package/react/components/toolbar/dashbar/Dashbar.d.ts.map +1 -1
  209. package/react/components/toolbar/dashbar/Dashbar.js +72 -47
  210. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  211. package/react/components/toolbar/dashbar/DashbarItem.d.ts +1 -1
  212. package/react/components/toolbar/dashbar/DashbarItem.d.ts.map +1 -1
  213. package/react/components/toolbar/dashbar/DashbarItem.js +25 -4
  214. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  215. package/react/components/toolbar/index.d.ts +1 -0
  216. package/react/components/toolbar/index.d.ts.map +1 -1
  217. package/react/components/toolbar/index.js +1 -0
  218. package/react/components/toolbar/index.js.map +1 -1
  219. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +3 -4
  220. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts.map +1 -1
  221. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +3 -10
  222. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  223. package/react/components/userPreferences/components/content/General.d.ts.map +1 -1
  224. package/react/components/userPreferences/components/content/General.js +3 -0
  225. package/react/components/userPreferences/components/content/General.js.map +1 -1
  226. package/react/components/userPreferences/components/general/DownloadPreferences.d.ts +10 -0
  227. package/react/components/userPreferences/components/general/DownloadPreferences.d.ts.map +1 -0
  228. package/react/components/userPreferences/components/general/DownloadPreferences.js +111 -0
  229. package/react/components/userPreferences/components/general/DownloadPreferences.js.map +1 -0
  230. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +6 -0
  231. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts.map +1 -1
  232. package/react/components/userPreferences/stores/UserPreferencesStore.js +11 -0
  233. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  234. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +2 -26
  235. package/react/components/windowTitleBar/components/right/CloseButton.d.ts.map +1 -1
  236. package/react/components/windowTitleBar/components/right/CloseButton.js +8 -25
  237. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  238. package/react/hooks/useDownloadItems.d.ts +24 -0
  239. package/react/hooks/useDownloadItems.d.ts.map +1 -0
  240. package/react/hooks/useDownloadItems.js +68 -0
  241. package/react/hooks/useDownloadItems.js.map +1 -0
  242. package/react/hooks/useNotifications.d.ts +1 -1
  243. package/react/reducers/rootReducer.d.ts +4 -0
  244. package/react/reducers/rootReducer.d.ts.map +1 -1
  245. package/react/reducers/smartDesktopDesignerReducer.d.ts.map +1 -1
  246. package/react/reducers/smartDesktopDesignerReducer.js +4 -0
  247. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  248. package/react/store.d.ts +8 -0
  249. package/react/store.d.ts.map +1 -1
  250. package/react/types/dashbarTypes.d.ts +3 -1
  251. package/react/types/dashbarTypes.d.ts.map +1 -1
  252. package/react/types/smartDesktopDesignerTypes.d.ts +2 -0
  253. package/react/types/smartDesktopDesignerTypes.d.ts.map +1 -1
  254. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
@@ -0,0 +1,591 @@
1
+ import { Logger } from "../../../../clients/logger";
2
+ import { RouterClient } from "../../../../clients/routerClient";
3
+ import { BaseWindow } from "./BaseWindow";
4
+ import { MOVE_REASON, WINDOWSTATE } from "../../../../common/constants";
5
+ import { adjustBoundsToBeOnMonitorAsync } from "../../../../common/Monitors";
6
+ import { removeWindowReferenceFromActiveWorkspace } from "../../workspace/workspaceAdminAPI";
7
+ const BOUNDS_CHANGED = "bounds-changed";
8
+ const mouseLocation = {
9
+ x: 0,
10
+ y: 0,
11
+ };
12
+ /**
13
+ * NativeWindow
14
+ */
15
+ class NativeWindow extends BaseWindow {
16
+ /**
17
+ * @param {*} params
18
+ * @param {string} [params.uuid]
19
+ * @param {object} [params.location]
20
+ * @param {string} [params.launchedByApp]
21
+ *
22
+ */
23
+ constructor(params) {
24
+ var _a;
25
+ if (!params.windowType) {
26
+ if (params.params) {
27
+ params = Object.assign(params, params.params);
28
+ }
29
+ params.windowType = null;
30
+ }
31
+ super(params);
32
+ this.loggerChannel = `ExternalWindowWrapper.${this.windowName}`;
33
+ this.type = "external";
34
+ this.windowType = (_a = params.windowType) !== null && _a !== void 0 ? _a : "NativeWindow";
35
+ this.location = params.windowMsg ? params.windowMsg.location : null;
36
+ this.windowState = WINDOWSTATE.NORMAL;
37
+ this.key = params.windowMsg ? params.windowMsg.uuid : params.uuid;
38
+ this.windowOptions = {
39
+ nativeWindowHandle: this.key,
40
+ };
41
+ this.saveOnBoundsChanged = this.launchedByApp;
42
+ this.movements = [];
43
+ this.lastLocation = this.location;
44
+ this.events = {};
45
+ this.lastMinimized = 0;
46
+ this.lastRestored = 0;
47
+ this.executablePath = null;
48
+ this.descriptor = null;
49
+ this.spawnedByContainer = false;
50
+ this.maximizing = false;
51
+ this.restoreBounds = null;
52
+ this.bindFunctions();
53
+ RouterClient.addListener(`AssimilationService.bounds-change-request.${this.windowName}`, this._triggerBoundsChangedFromAssimilation);
54
+ }
55
+ removeListeners() {
56
+ Logger.system.debug("removeListeners not implemented");
57
+ }
58
+ _setResizable() {
59
+ Logger.system.error("_setResizable not implemented");
60
+ }
61
+ _triggerBoundsChangedFromAssimilation(err, response) {
62
+ this.eventManager.trigger("bounds-change-request", response.data);
63
+ }
64
+ bindFunctions() {
65
+ this._triggerBoundsChangedFromAssimilation = this._triggerBoundsChangedFromAssimilation.bind(this);
66
+ this._setBounds = this._setBounds.bind(this);
67
+ this.endMovementHandler = this.endMovementHandler.bind(this);
68
+ this._getBoundsFromSystem = this._getBoundsFromSystem.bind(this);
69
+ this._close = this._close.bind(this);
70
+ }
71
+ endMovementHandler(err, message) {
72
+ if (err) {
73
+ return Logger.system.error(err);
74
+ }
75
+ // Logger.system.log("end sent");
76
+ if (!message || !message.data || !message.data.location) {
77
+ return;
78
+ }
79
+ this.location = message.data.location;
80
+ this.eventManager.trigger(BOUNDS_CHANGED, this.location);
81
+ }
82
+ _addEventListener(params, cb = Function.prototype) {
83
+ const { eventName } = params;
84
+ this.addEventListener(eventName);
85
+ cb();
86
+ }
87
+ addEventListener(event, handler = Function.prototype) {
88
+ super.addEventListener(event, handler);
89
+ // this event will come in from assimilation. when it does, we trigger the bounds-changed event, which throws bounds-change-end to the rest of the system.
90
+ if (event == "bounds-changed") {
91
+ RouterClient.addListener(`${this.name}.endMovement`, this.endMovementHandler);
92
+ }
93
+ }
94
+ _removeEventListener(params, cb = Function.prototype) {
95
+ const { eventName } = params;
96
+ this.removeEventListener(eventName);
97
+ cb();
98
+ }
99
+ removeEventListener(event, handler = Function.prototype) {
100
+ super.removeEventListener(event, handler);
101
+ // this event will come in from assimilation. when it does, we trigger the bounds-changed event, which throws bounds-change-end to the rest of the system.
102
+ if (event == "bounds-changed") {
103
+ RouterClient.removeListener(`${this.name}.endMovement`, this.endMovementHandler);
104
+ }
105
+ }
106
+ /**
107
+ * Every other kind of window has listeners for bounds change end that then save
108
+ * the window's new state. Because assimilated windows don't, we must override
109
+ * this function and call the custom save function.
110
+ *
111
+ */
112
+ stopMove() {
113
+ super.stopMove({});
114
+ this._saveWindowOptions();
115
+ }
116
+ _setBounds(params, cb = Function.prototype) {
117
+ if (typeof params === "function") {
118
+ cb = params;
119
+ params = null;
120
+ }
121
+ const { bounds } = params;
122
+ const newLocationUnrounded = {
123
+ left: Number(bounds.left),
124
+ top: Number(bounds.top),
125
+ width: bounds.width ? Number(bounds.width) : Number(bounds.right) - Number(bounds.left),
126
+ height: bounds.height ? Number(bounds.height) : Number(bounds.bottom) - Number(bounds.top),
127
+ right: bounds.right ? Number(bounds.right) : Number(bounds.left) + Number(bounds.width),
128
+ bottom: bounds.bottom ? Number(bounds.bottom) : Number(bounds.top) + Number(bounds.height),
129
+ };
130
+ const newLocation = newLocationUnrounded;
131
+ const addRoundedEntryToLocation = ([key, value]) => {
132
+ newLocation[key] = Math.round(value);
133
+ };
134
+ Object.entries(newLocationUnrounded).forEach(addRoundedEntryToLocation);
135
+ Logger.system.verbose("send move ", this);
136
+ this.lastLocation = newLocation;
137
+ this.location = newLocation;
138
+ this.mergeBounds(bounds);
139
+ super._setBounds(params);
140
+ // if the _setBounds function was async, can't use super...
141
+ const asyncHack = async () => {
142
+ await RouterClient.query("Assimilation.moveWindow", {
143
+ name: this.windowName,
144
+ key: this.key,
145
+ location: newLocation,
146
+ });
147
+ this.eventManager.trigger("bounds-changing", Object.assign({}, newLocation));
148
+ cb();
149
+ };
150
+ asyncHack();
151
+ }
152
+ _hide(params, cb = Function.prototype) {
153
+ if (typeof params === "function") {
154
+ cb = params;
155
+ params = {};
156
+ }
157
+ super._hide(params, async (err, response) => {
158
+ // Note:, there's no params.fromAssimilation here because hidden isn't an event caught from the OS.
159
+ if (response.shouldContinue) {
160
+ this.windowDescriptor.autoShow = false;
161
+ await RouterClient.query("Assimilation.hideWindow", {
162
+ name: this.windowName,
163
+ key: this.key,
164
+ location: this.location,
165
+ });
166
+ this.eventManager.trigger("hidden");
167
+ RouterClient.transmit("Assimilation.saveWindow", {
168
+ key: this.key,
169
+ autoShow: false,
170
+ });
171
+ }
172
+ cb();
173
+ });
174
+ }
175
+ _focus(params, cb = Function.prototype) {
176
+ if (typeof params === "function") {
177
+ cb = params;
178
+ params = {};
179
+ }
180
+ super._focus(params, async (err, response) => {
181
+ if (response.shouldContinue && params.fromAssimilation) {
182
+ this.eventManager.trigger("focused");
183
+ }
184
+ cb();
185
+ });
186
+ }
187
+ _minimize(params, cb = Function.prototype) {
188
+ if (Date.now() - this.lastRestored < 50)
189
+ return cb();
190
+ if (typeof params === "function") {
191
+ cb = params;
192
+ params = {};
193
+ }
194
+ if (!params)
195
+ params = {};
196
+ const self = this;
197
+ super._minimize(params, async () => {
198
+ if (params.fromAssimilation) {
199
+ if (self.windowState === WINDOWSTATE.MAXIMIZED) {
200
+ self.windowState = WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED;
201
+ }
202
+ else if (self.windowState === WINDOWSTATE.NORMAL) {
203
+ self.windowState = WINDOWSTATE.MINIMIZED_WAS_NORMAL;
204
+ }
205
+ self.eventManager.trigger("minimized");
206
+ }
207
+ else {
208
+ await RouterClient.query("Assimilation.minimizeWindow", {
209
+ name: self.windowName,
210
+ key: self.key,
211
+ location: self.location,
212
+ });
213
+ RouterClient.transmit("DockingService.wipeAutoArrange", {
214
+ win: self.windowName,
215
+ });
216
+ }
217
+ // if maximize is being called during the workspace load to restore state, then don't dirty workspace
218
+ if (!params.initialLoad) {
219
+ this._saveWindowOptions();
220
+ }
221
+ cb();
222
+ });
223
+ }
224
+ _maximize(params, cb = Function.prototype) {
225
+ if (typeof params === "function") {
226
+ cb = params;
227
+ params = {};
228
+ }
229
+ const self = this;
230
+ if (this.windowState === WINDOWSTATE.MAXIMIZED)
231
+ return cb();
232
+ super._maximize(params, async () => {
233
+ if (params.fromAssimilation) {
234
+ self.windowState = WINDOWSTATE.MAXIMIZED;
235
+ }
236
+ if (self.windowState != WINDOWSTATE.MAXIMIZED) {
237
+ // self.emit("maximized", { name: self.windowName });
238
+ if (self.windowState !== WINDOWSTATE.MINIMIZED_WAS_NORMAL &&
239
+ self.windowState !== WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED) {
240
+ self.maximizing = true;
241
+ self.restoreBounds = self.location;
242
+ }
243
+ await RouterClient.query("Assimilation.maximizeWindow", {
244
+ name: self.windowName,
245
+ windowIdentifier: self.windowIdentifier,
246
+ });
247
+ RouterClient.transmit("DockingService.wipeAutoArrange", {
248
+ win: self.windowName,
249
+ });
250
+ self.eventManager.trigger("maximized");
251
+ self.windowState = WINDOWSTATE.MAXIMIZED;
252
+ }
253
+ // if maximize is being called during the workspace load to restore state, then don't dirty workspace
254
+ if (!params.initialLoad) {
255
+ this._saveWindowOptions();
256
+ }
257
+ cb();
258
+ });
259
+ }
260
+ async setNormal(params) {
261
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
262
+ if (params.fromAssimilation) {
263
+ // Window restored from outside of Finsemble. If the monitor configuration has changed since the window was minimized, assimilation
264
+ // will have moved the window's restore position. Use these bounds to tell Finsemble the new location.
265
+ const onBoundsReceivedAfterRestore = (updatedBounds) => {
266
+ var _a, _b;
267
+ // Assimilation corrects the windows position on restore, but html windows do not.
268
+ // Due to this difference we need to tell finsemble to force the bounds update
269
+ // or Finsemble will have the wrong bounds for this window. Only checking top and left
270
+ // because the updated bound are coming in with 7 pixels of extra height even when no monitor change has occurred.
271
+ if (((_a = this.location) === null || _a === void 0 ? void 0 : _a.top) !== updatedBounds.top || ((_b = this.location) === null || _b === void 0 ? void 0 : _b.left) !== updatedBounds.left) {
272
+ updatedBounds.force = true;
273
+ }
274
+ // Triggers an event that specified that the window was restored from the system
275
+ updatedBounds.action = MOVE_REASON.SYSTEM_RESTORED;
276
+ this.eventManager.trigger("system-bounds-changed", Object.assign({}, updatedBounds));
277
+ };
278
+ const retryLimit = 3;
279
+ let retryCount = 0;
280
+ // The bounds request will return an error if the window is minimized or hidden. This can happen if the window
281
+ // is not done restoring when we request the updated bounds. By retrying on error, we can give the OS more time to restore the window
282
+ // Finally default to the previous location (adjusted to be on a monitor if necessary) if we can't updated bounds.
283
+ const getBoundsAndRetry = () => {
284
+ if (retryCount >= retryLimit) {
285
+ Logger.system.error(`externalWindowWrapper._restore: Failed to get valid bounds for ${this.windowName} after trying ${retryLimit} times. Defaulting to previous location`);
286
+ onBoundsReceivedAfterRestore(this.location);
287
+ return;
288
+ }
289
+ this._getBoundsFromSystem({}).then((getBoundsResponse) => {
290
+ if (getBoundsResponse.err) {
291
+ retryCount++;
292
+ setTimeout(() => {
293
+ getBoundsAndRetry();
294
+ }, retryCount * 100);
295
+ }
296
+ else {
297
+ onBoundsReceivedAfterRestore(getBoundsResponse.data);
298
+ }
299
+ });
300
+ };
301
+ getBoundsAndRetry();
302
+ this.eventManager.trigger("restored");
303
+ }
304
+ else {
305
+ const left = (_b = (_a = this.location) === null || _a === void 0 ? void 0 : _a.left) !== null && _b !== void 0 ? _b : 0;
306
+ const top = (_d = (_c = this.location) === null || _c === void 0 ? void 0 : _c.top) !== null && _d !== void 0 ? _d : 0;
307
+ const width = (_f = (_e = this.location) === null || _e === void 0 ? void 0 : _e.width) !== null && _f !== void 0 ? _f : 0;
308
+ const height = (_h = (_g = this.location) === null || _g === void 0 ? void 0 : _g.height) !== null && _h !== void 0 ? _h : 0;
309
+ const right = (_k = (_j = this.location) === null || _j === void 0 ? void 0 : _j.right) !== null && _k !== void 0 ? _k : left + width;
310
+ const bottom = (_m = (_l = this.location) === null || _l === void 0 ? void 0 : _l.bottom) !== null && _m !== void 0 ? _m : top + height;
311
+ const bounds = {
312
+ right,
313
+ left,
314
+ top,
315
+ bottom,
316
+ width,
317
+ height,
318
+ };
319
+ // Restore action was triggered from Finsemble. Make sure the window is restored on monitor.
320
+ const adjustedBounds = await adjustBoundsToBeOnMonitorAsync(bounds);
321
+ await RouterClient.query("Assimilation.restoreWindow", { name: this.windowName, key: this.key, location: adjustedBounds }, params, () => { });
322
+ this.eventManager.trigger("restored");
323
+ }
324
+ this.windowState = WINDOWSTATE.NORMAL;
325
+ }
326
+ async _restore(params, cb) {
327
+ if (typeof params === "function") {
328
+ cb = params;
329
+ params = {};
330
+ }
331
+ params = params || {};
332
+ const { data: response } = await super._restore(params);
333
+ if (response === null || response === void 0 ? void 0 : response.shouldContinue) {
334
+ if (this.windowState === WINDOWSTATE.MINIMIZED_WAS_MAXIMIZED) {
335
+ // Note:, early return
336
+ await this._maximize(params);
337
+ this.eventManager.trigger("restored");
338
+ cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
339
+ return { data: { shouldContinue: true } };
340
+ }
341
+ // if we restore from a minimized state set the state to normal
342
+ if (this.windowState === WINDOWSTATE.MINIMIZED_WAS_NORMAL) {
343
+ await this.setNormal(params);
344
+ }
345
+ // if we restore from a max state tell docking so we can reset the position
346
+ if (this.windowState === WINDOWSTATE.MAXIMIZED) {
347
+ this.windowState = WINDOWSTATE.NORMAL;
348
+ this.maximizing = false;
349
+ this._getBoundsFromSystem({}, (err, bounds) => {
350
+ this.eventManager.trigger("restored", {
351
+ bounds,
352
+ previousState: WINDOWSTATE.MAXIMIZED,
353
+ });
354
+ });
355
+ }
356
+ }
357
+ this._saveWindowOptions();
358
+ cb === null || cb === void 0 ? void 0 : cb(null, { shouldContinue: true });
359
+ return { data: { shouldContinue: true } };
360
+ }
361
+ _close(params = {}, cb) {
362
+ return new Promise(async (resolve) => {
363
+ if (typeof params === "function") {
364
+ cb = params;
365
+ params = {};
366
+ }
367
+ if (!params)
368
+ params = {};
369
+ RouterClient.removeListener(`AssimilationService.bounds-change-request.${this.windowName}`, this._triggerBoundsChangedFromAssimilation);
370
+ const { err, data } = await super._close(params);
371
+ if (data === null || data === void 0 ? void 0 : data.shouldContinue) {
372
+ if (params.removeFromWorkspace)
373
+ removeWindowReferenceFromActiveWorkspace({ name: this.windowName || "undefined-window-name" });
374
+ // Tell assimilation to close the window.
375
+ const { err: errAssimilation, response } = await RouterClient.query("Assimilation.closeWindow", Object.assign({ name: this.windowName, key: this.key, location: this.location }, params));
376
+ cb === null || cb === void 0 ? void 0 : cb(errAssimilation, response === null || response === void 0 ? void 0 : response.data);
377
+ resolve({ err: errAssimilation, data: response === null || response === void 0 ? void 0 : response.data });
378
+ }
379
+ else {
380
+ cb === null || cb === void 0 ? void 0 : cb(err, data);
381
+ resolve({ err, data });
382
+ }
383
+ });
384
+ }
385
+ async _show(params, cb) {
386
+ if (typeof params === "function") {
387
+ cb = params;
388
+ params = {};
389
+ }
390
+ const { err, data } = await super._show(params);
391
+ if (data === null || data === void 0 ? void 0 : data.shouldContinue) {
392
+ this.windowDescriptor.autoShow = true;
393
+ await RouterClient.query("Assimilation.showWindow", {
394
+ name: this.windowName,
395
+ key: this.key,
396
+ location: self.location,
397
+ });
398
+ this.eventManager.trigger("shown");
399
+ RouterClient.transmit("Assimilation.saveWindow", {
400
+ key: this.key,
401
+ autoShow: true,
402
+ });
403
+ }
404
+ cb === null || cb === void 0 ? void 0 : cb(err, data);
405
+ return { err, data };
406
+ }
407
+ _showAt(position, params, cb = Function.prototype) {
408
+ Logger.system.debug("externalWindowWrapper._showAt", this.name, position, params);
409
+ if (typeof params === "function") {
410
+ cb = params;
411
+ params = {};
412
+ }
413
+ super._showAt(params, async (err, response) => {
414
+ cb(err, response);
415
+ });
416
+ }
417
+ _bringToFront(params, cb = Function.prototype) {
418
+ if (typeof params === "function") {
419
+ cb = params;
420
+ params = {};
421
+ }
422
+ super._bringToFront(params, async (err, response) => {
423
+ if (response.shouldContinue) {
424
+ await RouterClient.query("Assimilation.bringToFront", {
425
+ name: this.windowName,
426
+ });
427
+ this.eventManager.trigger("broughtToFront");
428
+ }
429
+ cb();
430
+ });
431
+ }
432
+ _setOpacity(params, cb = Function.prototype) {
433
+ this.opacity = params.opacity;
434
+ cb();
435
+ }
436
+ async _alwaysOnTop(params, cb = Function.prototype) {
437
+ if (this.alwaysOnTop == params.alwaysOnTop)
438
+ return cb();
439
+ this.alwaysOnTop = params.alwaysOnTop;
440
+ await RouterClient.query("Assimilation.alwaysOnTop", {
441
+ name: this.windowName,
442
+ alwaysonTop: params.alwaysOnTop,
443
+ }); // the spelling here is intentional
444
+ this.eventManager.trigger("alwaysOnTop", { alwaysOnTop: this.alwaysOnTop });
445
+ cb();
446
+ }
447
+ /**
448
+ *
449
+ * Returns true if the window is always on top. False otherwise.
450
+ *
451
+ * Disable eslint below because params is undefined, but we don't want to refactor the other calls to expect the 1st param to equal the callback.
452
+ */
453
+ _isAlwaysOnTop(params = {}, callback = Function.prototype) {
454
+ if (typeof params === "function") {
455
+ callback = params;
456
+ }
457
+ if (typeof this.alwaysOnTop !== "boolean" && this.windowDescriptor) {
458
+ this.alwaysOnTop = this.windowDescriptor.alwaysOnTop;
459
+ }
460
+ callback(null, Boolean(this.alwaysOnTop));
461
+ return Boolean(this.alwaysOnTop);
462
+ }
463
+ /**
464
+ * Returns true if the window is visible. False otherwise.
465
+ * @param {*} params Currently unused
466
+ * @param {*} callback calls back with true if visible, false if not.
467
+ */
468
+ _isShowing(params = {}, callback = Function.prototype) {
469
+ if (typeof params === "function") {
470
+ callback = params;
471
+ }
472
+ // autoShow is false if the window is spawned hidden. It it updated every time the window is shown or hidden.
473
+ const isVisible = !(this.windowDescriptor && this.windowDescriptor.autoShow === false);
474
+ callback(null, isVisible);
475
+ return isVisible;
476
+ }
477
+ disableFrame(cb = Function.prototype) {
478
+ this.frame = false; // paint
479
+ cb();
480
+ }
481
+ getMousePosition(cb = Function.prototype) {
482
+ cb(null, mouseLocation);
483
+ }
484
+ _saveWindowOptions() {
485
+ Logger.system.debug(`_saveWindowOptions Window id ${this.key}`, "location", this.location, "windowState", this.windowState.toString(), "restoreBounds", this.restoreBounds);
486
+ RouterClient.transmit("Assimilation.saveWindow", {
487
+ key: this.key,
488
+ location: this.location,
489
+ windowState: this.windowState,
490
+ cachedBounds: this.restoreBounds,
491
+ });
492
+ }
493
+ // * Sends a request to assimilation for the system bounds. Waits and returns the response
494
+ // * @param {*} params
495
+ // * @param {*} cb
496
+ // */
497
+ _getBoundsFromSystem(params, cb = Function.prototype) {
498
+ if (typeof params === "function") {
499
+ cb = params;
500
+ params = {};
501
+ }
502
+ const self = this;
503
+ const promiseResolver = (resolve) => {
504
+ RouterClient.query("Assimilation.getWindowLocation", { windowName: this.windowName, force: true }, (err, message) => {
505
+ if (err) {
506
+ cb(err);
507
+ return resolve({ err, data: null });
508
+ }
509
+ if (!message.data.location) {
510
+ cb(null);
511
+ return resolve({ err: null, data: null });
512
+ }
513
+ self.location = {
514
+ top: message.data.location.top,
515
+ left: message.data.location.left,
516
+ right: message.data.location.right,
517
+ bottom: message.data.location.bottom,
518
+ height: message.data.location.height,
519
+ width: message.data.location.width,
520
+ };
521
+ cb(null, self.location);
522
+ return resolve({ err: null, data: self.location });
523
+ });
524
+ };
525
+ return new Promise(promiseResolver);
526
+ }
527
+ _getBounds(params, cb) {
528
+ if (typeof params === "function") {
529
+ cb = params;
530
+ params = {};
531
+ }
532
+ if (this.maximizing) {
533
+ cb === null || cb === void 0 ? void 0 : cb(null, this.restoreBounds);
534
+ return Promise.resolve({ err: null, data: this.restoreBounds });
535
+ }
536
+ const promiseResolver = (resolve) => {
537
+ RouterClient.query("Assimilation.getWindowLocation", { windowName: this.windowName }, (err, message) => {
538
+ var _a, _b;
539
+ if (err) {
540
+ cb === null || cb === void 0 ? void 0 : cb(err);
541
+ resolve({ err, data: null });
542
+ return;
543
+ }
544
+ if (!message.data.location) {
545
+ cb === null || cb === void 0 ? void 0 : cb(null);
546
+ resolve({ err: null, data: null });
547
+ return;
548
+ }
549
+ this.location = {
550
+ top: message.data.location.top,
551
+ left: message.data.location.left,
552
+ right: message.data.location.right,
553
+ bottom: message.data.location.bottom,
554
+ height: message.data.location.bottom - message.data.location.top,
555
+ width: message.data.location.right - message.data.location.left,
556
+ };
557
+ if (!this.location.height) {
558
+ this.location.height = ((_a = this.location.bottom) !== null && _a !== void 0 ? _a : 0) - this.location.top;
559
+ }
560
+ if (!this.location.width) {
561
+ this.location.width = ((_b = this.location.right) !== null && _b !== void 0 ? _b : 0) - this.location.left;
562
+ }
563
+ cb === null || cb === void 0 ? void 0 : cb(null, this.location);
564
+ return resolve({ err: null, data: this.location });
565
+ });
566
+ };
567
+ return new Promise(promiseResolver);
568
+ }
569
+ _updateOptions(params, cb = Function.prototype) {
570
+ const windowOptions = {
571
+ key: this.key,
572
+ };
573
+ if (params && typeof params === "object") {
574
+ Object.keys(params).forEach((key) => {
575
+ if (!windowOptions[key]) {
576
+ windowOptions[key] = params[key];
577
+ }
578
+ if (key === "alwaysOnTop" && this.alwaysOnTop !== params[key]) {
579
+ this.alwaysOnTop = params[key];
580
+ this.eventManager.trigger("alwaysOnTop", {
581
+ alwaysOnTop: this.alwaysOnTop,
582
+ });
583
+ }
584
+ });
585
+ }
586
+ RouterClient.transmit("Assimilation.saveWindow", windowOptions);
587
+ cb();
588
+ }
589
+ }
590
+ export default NativeWindow;
591
+ //# sourceMappingURL=externalWindowWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"externalWindowWrapper.js","sourceRoot":"","sources":["../../../../../../src/platform/services/window/WindowAbstractions/externalWindowWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAU,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,wCAAwC,EAAE,MAAM,mCAAmC,CAAC;AAG7F,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC,MAAM,aAAa,GAAG;IACrB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,YAAa,SAAQ,UAAU;IA2CpC;;;;;;OAMG;IACH,YAAY,MAAM;;QACjB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACvB,IAAI,MAAM,CAAC,MAAM,EAAE;gBAClB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;aAC9C;YACD,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;SACzB;QACD,K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