@finsemble/finsemble-ui 8.3.0-beta.8 → 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
@@ -0,0 +1,1222 @@
1
+ import { Logger } from "../../../clients/logger";
2
+ import { RouterClient } from "../../../clients/routerClient";
3
+ import { ConfigClient } from "../../../clients/configClient";
4
+ import { System } from "../../../common/system";
5
+ import { FEAGlobals } from "../../../common/Globals";
6
+ import { httpPatch, httpGet, httpDelete, httpPut } from "../../../common/REST";
7
+ import { restartApplication } from "../../../common/Desktop";
8
+ const MAKER_TOPIC = "SmartDesktopClient";
9
+ const UI_CHANGE_TOPIC = "Finsemble-ui-change";
10
+ const assetTests = {
11
+ Image: { acceptedTypes: ["PNG", "JPEG", "JPG"], regex: /\.(jpe?g|png)$/i },
12
+ GIF: { acceptedTypes: ["GIF"], regex: /\.(gif)$/i },
13
+ Icon: { acceptedTypes: ["ICO"], regex: /\.(ico)$/i },
14
+ JS: { acceptedTypes: ["JS"], regex: /\.(js)$/i },
15
+ JSON: { acceptedTypes: ["JSON"], regex: /\.(json)$/i },
16
+ CSS: { acceptedTypes: ["CSS"], regex: /\.(css)$/i },
17
+ Text: { acceptedTypes: ["TXT"], regex: /\.(txt)$/i },
18
+ };
19
+ /**
20
+ * Determines if a SelectConnect `authorize` rule exists on a foreign app
21
+ * for this app.
22
+ *
23
+ * @param sourceApp FDC3 AppD definition for the app we're working on
24
+ * @param targetApp FDC3 AppD definition for the app we want to connect to
25
+ * @param contextType Optional context type to defined the rule
26
+ * @returns true if there is a matching rule
27
+ */
28
+ const isInteropAuthorized = (sourceApp, targetApp, contextType) => {
29
+ var _a, _b, _c;
30
+ const rules = ((_c = (_b = (_a = targetApp.hostManifests) === null || _a === void 0 ? void 0 : _a.Finsemble) === null || _b === void 0 ? void 0 : _b.interop) === null || _c === void 0 ? void 0 : _c.selectConnect) || [];
31
+ // Find all authorized apps for any rules that match this context type
32
+ const allowedApps = rules.flatMap((rule) => {
33
+ var _a;
34
+ if (!contextType || (rule.contextType && rule.contextType !== contextType))
35
+ return [];
36
+ return (_a = rule.authorize) !== null && _a !== void 0 ? _a : [];
37
+ });
38
+ return allowedApps.some((rule) => rule.appId === sourceApp.appId);
39
+ };
40
+ /**
41
+ * Arranges an array of words for display to end user
42
+ * "apples"
43
+ * "apples or oranges"
44
+ * "apples, oranges, or bananas"
45
+ */
46
+ const prettyList = (words) => {
47
+ const { length } = words;
48
+ if (length === 0)
49
+ return "";
50
+ if (length === 1)
51
+ return words[0];
52
+ if (length === 2)
53
+ return `${words[0]} or ${words[1]}`;
54
+ return `${words.slice(0, length - 2).join(", ")} or ${words[length - 1]}`;
55
+ };
56
+ /**
57
+ * checkValidProjectName
58
+ */
59
+ const checkValidProjectName = (name) => /^[a-zA-Z0-9 \-_.]{1,}$/.test(name) && /[a-zA-Z0-9]{1,}/.test(name);
60
+ /**
61
+ * Check an arbitrary string to see if it is a valid url
62
+ * The only checks for validity are:
63
+ * * if the string begins with "http://" or "https://"
64
+ *
65
+ * @param url - the potential URL
66
+ */
67
+ const checkValidURL = (url) => {
68
+ if (url.length === 0) {
69
+ return true;
70
+ }
71
+ return /^https?:\/\/[^\s]+$/.test(url);
72
+ };
73
+ /**
74
+ * Check an arbitrary string to see if it is a valid path
75
+ * that begins with a macro.
76
+ * Note that macros must:
77
+ * * Come at the beginning of the path
78
+ * * Begin with "$"
79
+ * * Otherwise only contain letters.
80
+ *
81
+ * Examples of macros: "$applicationRoot", "$moduleRoot"
82
+ * While all macros used by Finsemble end in "Root", clients can
83
+ * specify custom macros, which are not required to follow that practice.
84
+ *
85
+ * @param macroPath - path that potentially begins with a macro
86
+ */
87
+ const checkValidMacroPath = (macroPath) => {
88
+ if (macroPath.length === 0) {
89
+ return false;
90
+ }
91
+ return /^\$[a-zA-Z]+[\/\\]/.test(macroPath);
92
+ };
93
+ const checkValidLocation = (urlOrMacroPath) => checkValidURL(urlOrMacroPath) || checkValidMacroPath(urlOrMacroPath);
94
+ const manifestRoots = {};
95
+ /**
96
+ *
97
+ * Test Driver Example (can paste into component console)
98
+ *
99
+ window.smartDesktopClientDriver = async function makerClientDriver() {
100
+ {
101
+ let { err, apps } = await SmartDesktopClient.getApps();
102
+ Logger.log("getApps", err ? err : "ok" , apps);
103
+ }
104
+ {
105
+ let { err, config } = await SmartDesktopClient.getAppConfig("Rates");
106
+ Logger.log("getAppConfig", err ? err : "ok" , config);
107
+ }
108
+ {
109
+ let { config } = SmartDesktopClient.getAppConfigTemplate();
110
+ let { err } = await SmartDesktopClient.addApp("testApp1", config);
111
+ Logger.log("addApp", err ? err : "ok" );
112
+ }
113
+ {
114
+ let { err } = await SmartDesktopClient.deleteApp("testApp1");
115
+ Logger.log("deleteApp", err ? err : "ok" );
116
+ }
117
+ {
118
+ Logger.log("updateTheme", err ? err : "ok" );
119
+ let { err } = await SmartDesktopClient.updateInstallerDescription({ name: "sample installer name", version: "V0.0.0", authors: "M. Smith", description: "sample installer descriptions" });
120
+ Logger.log("updateInstallerDescription", err ? err : "ok" );
121
+ }
122
+ {
123
+ let blob = await fetch("http://localhost:3375/assets/img/test.png").then(r => r.blob());
124
+ var file = new File([blob], "foo.png");
125
+ let { err } = await SmartDesktopClient.updateToolbarIcon(file);
126
+ console.log("updateToolbarIcon", err ? err : "ok" );
127
+ }
128
+ {
129
+ let blob = await fetch("http://localhost:3375/assets/img/test.png").then(r => r.blob());
130
+ var file = new File([blob], "foo.png");
131
+ let { err } = await SmartDesktopClient.updateTaskbarIcon(file);
132
+ console.log("updateTaskbarIcon", err ? err : "ok" );
133
+ }
134
+ {
135
+ let blob = await fetch("http://localhost:3375/assets/img/test.png").then(r => r.blob());
136
+ var file = new File([blob], "foo.png");
137
+ let { err } = await SmartDesktopClient.updateSystemTrayIcon(file);
138
+ console.log("updateSystemTrayIcon", err ? err : "ok" );
139
+ }
140
+ {
141
+ let blob = await fetch("http://localhost:3375/assets/img/test.ico").then(r => r.blob());
142
+ var file = new File([blob], "foo.ico");
143
+ let { err } = await SmartDesktopClient.updateInstallerIcon(file);
144
+ console.log("updateInstallerIcon", err ? err : "ok" );
145
+ }
146
+ {
147
+ let blob = await fetch("http://localhost:3375/assets/img/install-spinner.gif").then(r => r.blob());
148
+ var file = new File([blob], "foo.gif");
149
+ let { err } = await SmartDesktopClient.updateInstallerGraphic(file);
150
+ console.log("updateInstallerGraphic", err ? err : "ok" );
151
+ }
152
+ {
153
+ let blob = await fetch("http://localhost:3375/assets/img/test.svg").then(r => r.blob());
154
+ var file = new File([blob], "foo.svg");
155
+ let { err } = await SmartDesktopClient.updateSplashScreen(file);
156
+ console.log("updateSplashScreen", err ? err : "ok" );
157
+ }
158
+ {
159
+ let { err } = await SmartDesktopClient.updateTheme({ cssSampleData: 1 });
160
+ console.log("updateTheme", err ? err : "ok" );
161
+ }
162
+ {
163
+ let { err } = await SmartDesktopClient.createProjectZip("testApp", "~/Downloads/");
164
+ Logger.log("createProjectZip", err ? err : "ok" );
165
+ }
166
+ {
167
+ <input type="file" onChange={(e) => {
168
+ const file = e.target.files?.[0];
169
+
170
+ let { err } = await SmartDesktopClient.uploadAssets([
171
+ {
172
+ file,
173
+ type: AssetType.Image,
174
+ targetPath: 'image.png',
175
+ }
176
+ ], (progress) => {
177
+ // ...
178
+ });
179
+
180
+ Logger.log("uploadAssets", err ? err : "ok" );
181
+ }} />
182
+ }
183
+ }
184
+ */
185
+ export const SmartDesktopClient = {
186
+ getSDServerInfo: async () => await System.getSDServerInfo(),
187
+ /**
188
+ * Confirm the Smart Desktop Server is enabled. This should be true before constructing and using a client.
189
+ *
190
+ * @static
191
+ * @returns {Promise<Boolean>}
192
+ */
193
+ async isEnabled() {
194
+ const { enabled } = await System.getSDServerInfo();
195
+ return enabled;
196
+ },
197
+ /**
198
+ * Get the smart desktop server base URL.
199
+ *
200
+ * @static
201
+ * @returns {Promise<Boolean>}
202
+ */
203
+ async applicationRoot() {
204
+ const { applicationRoot } = await System.getSDServerInfo();
205
+ return applicationRoot ? applicationRoot : null;
206
+ },
207
+ /**
208
+ *
209
+ */
210
+ async projectConfig() {
211
+ const { projectConfig } = await System.getSDServerInfo();
212
+ return projectConfig ? projectConfig : null;
213
+ },
214
+ /**
215
+ * Get list of all AppD applications
216
+ *
217
+ * @returns {Promise<{ err:any, apps:FDC3AppDefinition[]}>}
218
+ *
219
+ * @example
220
+ * let { err, apps } = await SmartDesktopClient.getApps();
221
+ */
222
+ async getApps() {
223
+ var _a;
224
+ Logger.system.log("SmartDesktopClient.getApps");
225
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getApps`, {});
226
+ Logger.system.log("SmartDesktopClient.getApps result", err ? err : "successful", response);
227
+ return { err, apps: (_a = response === null || response === void 0 ? void 0 : response.data.applications) !== null && _a !== void 0 ? _a : [] };
228
+ },
229
+ /**
230
+ * Get list of all AppD applications
231
+ *
232
+ * @returns {Promise<{ err:any, apps:FDC3AppDefinition[]}>}
233
+ *
234
+ * @example
235
+ * let { err, apps } = await SmartDesktopClient.getApps();
236
+ */
237
+ async removeAllEntriesFromAppDJson() {
238
+ Logger.system.log("SmartDesktopClient.removeAllEntriesFromAppDJson");
239
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.removeAllEntriesFromAppDJson`, {});
240
+ Logger.system.log("SmartDesktopClient.removeAllEntriesFromAppDJson result", err ? err : "successful", response);
241
+ return { err: err !== null && err !== void 0 ? err : null };
242
+ },
243
+ /**
244
+ * Get list of all AppD applications
245
+ *
246
+ * @returns {Promise<{ err:any, apps:FDC3AppDefinition[]}>}
247
+ *
248
+ * @example
249
+ * let { err, apps } = await SmartDesktopClient.getDeprecatedEntriesFromAppDJsonFile();
250
+ */
251
+ async getDeprecatedEntriesFromAppDJsonFile() {
252
+ var _a;
253
+ Logger.system.log("SmartDesktopClient.getDeprecatedEntriesFromAppDJsonFile");
254
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getDeprecatedEntriesFromAppDJsonFile`, {});
255
+ Logger.system.log("SmartDesktopClient.getDeprecatedEntriesFromAppDJsonFile result", err ? err : "successful", response);
256
+ return { err, apps: (_a = response === null || response === void 0 ? void 0 : response.data.applications) !== null && _a !== void 0 ? _a : [] };
257
+ },
258
+ /**
259
+ * Get list of all Menus
260
+ *
261
+ * @returns {Promise<{ err:any, data:any}>}
262
+ *
263
+ * @example
264
+ * let { err, menus } = await SmartDesktopClient.getMenus();
265
+ */
266
+ async getMenus() {
267
+ Logger.system.log("ConfigClient getValue 'finsemble.toolbarMenus'");
268
+ const { err, data } = await ConfigClient.getValue({ field: "finsemble.toolbarMenus" });
269
+ Logger.system.log("finsemble.toolbarMenus result", err ? err : "successful", data);
270
+ return { err, menus: data };
271
+ },
272
+ /**
273
+ * Get the config.extensions.preloads object (from appd.json), which includes all registered
274
+ * preloads and their details
275
+ */
276
+ async getPreloads() {
277
+ var _a;
278
+ Logger.system.log("SmartDesktopClient.getPreloads");
279
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});
280
+ Logger.system.log("SmartDesktopClient.getPreloads result", err ? err : "successful", response);
281
+ return { err, data: (_a = response === null || response === void 0 ? void 0 : response.data.preloads) !== null && _a !== void 0 ? _a : {} };
282
+ },
283
+ /**
284
+ * Get config for the specified AppD app.
285
+ *
286
+ * @example
287
+ * let { err, config } = await SmartDesktopClient.getAppConfig("testApp");
288
+ */
289
+ async getAppConfig(appId) {
290
+ var _a;
291
+ Logger.system.log("SmartDesktopClient.getAppConfig", appId);
292
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getAppConfig`, { appId });
293
+ Logger.system.log("SmartDesktopClient.getAppConfig result", err ? err : "successful", response);
294
+ return { err, config: (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : {} };
295
+ },
296
+ /**
297
+ * Helper function returning a AppD config template with Finsemble component in manifest property.
298
+ *
299
+ * @returns {Promise<{ config: any }>}
300
+ *
301
+ * @example
302
+ * let { config } = SmartDesktopClient.getAppConfigTemplate();
303
+ */
304
+ getAppConfigTemplate() {
305
+ Logger.system.log("SmartDesktopClient.getAppConfigTemplate");
306
+ const manifestJson = {
307
+ window: {
308
+ // url: "$applicationRoot/components/welcome/welcome.html",
309
+ url: "",
310
+ width: 1280,
311
+ height: 600,
312
+ },
313
+ foreign: {
314
+ components: {
315
+ "App Launcher": {
316
+ launchableByUser: true,
317
+ },
318
+ "Window Manager": {
319
+ persistWindowState: true,
320
+ FSBLHeader: true,
321
+ },
322
+ },
323
+ },
324
+ };
325
+ const appConfigTemplate = {
326
+ appId: "123",
327
+ name: "",
328
+ type: "web",
329
+ details: {
330
+ url: "",
331
+ },
332
+ hostManifests: {
333
+ Finsemble: manifestJson,
334
+ },
335
+ };
336
+ Logger.system.log("SmartDesktopClient.getAppConfigTemplate result", appConfigTemplate);
337
+ return { config: appConfigTemplate };
338
+ },
339
+ /**
340
+ * Add AppD application, which will modify Finsemble config and invoke REST API to persist the change
341
+ *
342
+ * @example
343
+ * let { err } = await SmartDesktopClient.addApp("testApp", config);
344
+ */
345
+ async addApp(appId, appConfig) {
346
+ Logger.system.log("SmartDesktopClient.addApp", appId, appConfig);
347
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.addApp`, { appId, appConfig });
348
+ Logger.system.log("SmartDesktopClient.addApp result", err ? err : "successful");
349
+ return { err };
350
+ },
351
+ async addMenu(menuConfig) {
352
+ Logger.system.log("SmartDesktopClient.addMenu");
353
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.addMenu`, { menuConfig });
354
+ await this.syncMenuConfig();
355
+ Logger.system.log("SmartDesktopClient.addMenu result", err ? err : "successful");
356
+ return { err };
357
+ },
358
+ async syncMenuConfig() {
359
+ var _a;
360
+ Logger.system.log("SmartDesktopClient.syncMenuConfig");
361
+ const { response } = await RouterClient.query(`${MAKER_TOPIC}.getMenus`, {});
362
+ await ConfigClient.setValue({
363
+ field: "finsemble.toolbarMenus",
364
+ value: ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.menus) || {},
365
+ });
366
+ Logger.system.log("SmartDesktopClient.syncMenuConfig completed");
367
+ },
368
+ async updateMenu(menuId, menuConfig) {
369
+ Logger.system.log("SmartDesktopClient.updateMenu", menuId, menuConfig);
370
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.updateMenu`, { menuId, menuConfig });
371
+ await this.syncMenuConfig();
372
+ Logger.system.log("SmartDesktopClient.updateMenu result", err ? err : "successful");
373
+ return { err };
374
+ },
375
+ /**
376
+ * Add AppD application, which will modify Finsemble config and invoke REST API to persist the change
377
+ *
378
+ * @example
379
+ * let { err } = await SmartDesktopClient.updateApp("testApp", config);
380
+ */
381
+ async updateApp(appId, appConfig) {
382
+ Logger.system.log("SmartDesktopClient.updateApp", appId, appConfig);
383
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.updateApp`, { appId, appConfig });
384
+ Logger.system.log("SmartDesktopClient.updateApp result", err ? err : "successful");
385
+ return { err };
386
+ },
387
+ /**
388
+ * Create/updates the preload with the specific preload alias
389
+ */
390
+ async savePreload(oldAlias, newAlias, detail) {
391
+ Logger.system.log("SmartDesktopClient.savePreload");
392
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.savePreload`, { oldAlias, newAlias, detail });
393
+ Logger.system.log("SmartDesktopClient.savePreload result", err ? err : "successful");
394
+ const { response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});
395
+ if (!err && response.data) {
396
+ await ConfigClient.setValue({
397
+ field: "finsemble.extensions.preloads",
398
+ value: response.data.preloads,
399
+ });
400
+ }
401
+ return { err };
402
+ },
403
+ /**
404
+ * Remove AppD application, which will modify Finsemble config and invoke REST API to persist the change
405
+ *
406
+ * @example
407
+ * let { err } = await SmartDesktopClient.deleteApp("testApp");
408
+ */
409
+ async deleteApp(appId) {
410
+ Logger.system.log("SmartDesktopClient.deleteApp", appId);
411
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.deleteApp`, { appId });
412
+ Logger.system.log("SmartDesktopClient.deleteApp result", err ? err : "successful");
413
+ return { err };
414
+ },
415
+ async deleteMenu(menuId) {
416
+ Logger.system.log("SmartDesktopClient.deleteMenu", menuId);
417
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.deleteMenu`, { menuId });
418
+ await this.syncMenuConfig();
419
+ Logger.system.log("SmartDesktopClient.deleteMenu result", err ? err : "successful");
420
+ return { err };
421
+ },
422
+ /**
423
+ * Remove a given preload from the registry in the config
424
+ */
425
+ async deletePreload(alias) {
426
+ Logger.system.log("SmartDesktopClient.deletePreload");
427
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.deletePreload`, { alias });
428
+ Logger.system.log("SmartDesktopClient.deletePreload result", err ? err : "successful");
429
+ const { response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});
430
+ if (!err && response.data) {
431
+ await ConfigClient.setValue({
432
+ field: "finsemble.extensions.preloads",
433
+ value: response.data.preloads,
434
+ });
435
+ }
436
+ return { err };
437
+ },
438
+ /**
439
+ * Update the theme of all components and invoke REST API to persist the change in Finsemble's theme.css file
440
+ *
441
+ * @example
442
+ * let { err } = await SmartDesktopClient.updateTheme(cssData);
443
+ */
444
+ async updateTheme(theme) {
445
+ Logger.system.log("SmartDesktopClient.updateTheme", theme);
446
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.updateTheme`, { theme });
447
+ Logger.system.log("SmartDesktopClient.updateTheme result", err ? err : "successful");
448
+ return { err };
449
+ },
450
+ /**
451
+ * Get the theme from the REST API
452
+ *
453
+ * @returns {Promise<{ err, theme }>}
454
+ * @memberOf SmartDesktopClient
455
+ *
456
+ * @example
457
+ * let { err, theme } = await SmartDesktopClient.getTheme(cssData);
458
+ */
459
+ async getTheme() {
460
+ Logger.system.log("SmartDesktopClient.getTheme");
461
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getTheme`, {});
462
+ Logger.system.log("SmartDesktopClient.getTheme result", err ? err : "successful");
463
+ return { err, theme: response === null || response === void 0 ? void 0 : response.data };
464
+ },
465
+ /**
466
+ * Add handler listening for theme updates
467
+ *
468
+ * @returns When called, unsubscribes the handler
469
+ */
470
+ onThemeUpdated(themeUpdatedHandler) {
471
+ RouterClient.addListener(`${UI_CHANGE_TOPIC}.themeUpdate`, themeUpdatedHandler);
472
+ Logger.system.log("SmartDesktopClient.onThemeUpdated", themeUpdatedHandler);
473
+ return () => RouterClient.removeListener(`${UI_CHANGE_TOPIC}.themeUpdate`, themeUpdatedHandler);
474
+ },
475
+ /**
476
+ * Post a file to the smart desktop server
477
+ *
478
+ * @example
479
+ * ...
480
+ */
481
+ async uploadAssets(assets, progress) {
482
+ Logger.system.log("SmartDesktopClient.uploadAssets", assets);
483
+ const applicationRoot = await this.applicationRoot();
484
+ // Returns a string of accepted file types if the asset does not match a known type
485
+ const getAcceptedTypes = (asset) => {
486
+ let acceptedTypes = [];
487
+ let valid = false;
488
+ Object.entries(assetTests).forEach(([key, value]) => {
489
+ if (asset.type.includes(key)) {
490
+ if (value.regex.test(asset.file.name))
491
+ valid = true;
492
+ acceptedTypes = acceptedTypes.concat(value.acceptedTypes);
493
+ }
494
+ });
495
+ return valid ? [] : acceptedTypes;
496
+ };
497
+ return new Promise((resolve) => {
498
+ const endpointURL = `${applicationRoot}/project/assets`;
499
+ const data = new FormData();
500
+ const assetMeta = [];
501
+ for (let index = 0; index < assets.length; index++) {
502
+ const asset = assets[index];
503
+ const meta = {
504
+ key: `file-${index}`,
505
+ name: asset.file.name,
506
+ type: asset.file.type,
507
+ size: asset.file.size,
508
+ targetPath: asset.targetPath,
509
+ };
510
+ const acceptedTypes = getAcceptedTypes(asset);
511
+ if (acceptedTypes.length) {
512
+ const error = `File must be of type ${prettyList(acceptedTypes)}`;
513
+ Logger.system.log("SmartDesktopClient.uploadAssets wrong image type", error);
514
+ return resolve({ err: error, paths: [] });
515
+ }
516
+ else {
517
+ Logger.system.log("SmartDesktopClient.uploadAssets append", meta.key, asset.file);
518
+ data.append(meta.key, asset.file);
519
+ assetMeta.push(meta);
520
+ }
521
+ }
522
+ data.append("assets", JSON.stringify(assetMeta));
523
+ var xhr = new XMLHttpRequest();
524
+ Logger.system.log("SmartDesktopClient.uploadAssets put", data, endpointURL);
525
+ xhr.open("PUT", endpointURL, true);
526
+ xhr.addEventListener("progress", (e) => {
527
+ progress(Math.round((e.loaded / e.total) * 100));
528
+ });
529
+ // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
530
+ xhr.onreadystatechange = () => {
531
+ // Call a function when the state changes.
532
+ if (xhr.readyState === XMLHttpRequest.DONE) {
533
+ progress(100);
534
+ if (xhr.status !== 200) {
535
+ Logger.system.log("SmartDesktopClient.uploadAssets Failed Response", xhr.response);
536
+ resolve({ err: `Got response code: ${xhr.status}`, paths: [] });
537
+ }
538
+ else {
539
+ try {
540
+ const response = JSON.parse(xhr.response);
541
+ Logger.system.log("SmartDesktopClient.uploadAssets Response", xhr.response);
542
+ resolve({ err: null, paths: response.paths });
543
+ }
544
+ catch (e) {
545
+ resolve({ err: "Couldn't parse response", paths: [] });
546
+ }
547
+ }
548
+ }
549
+ };
550
+ Logger.system.log("SmartDesktopClient.uploadAssets send", data);
551
+ xhr.send(data);
552
+ });
553
+ },
554
+ /**
555
+ * Post images to the smart desktop server
556
+ *
557
+ * @example
558
+ * ...
559
+ */
560
+ async uploadImages(files, progress) {
561
+ return this.uploadAssets(files.map((file) => ({
562
+ file,
563
+ type: ["Image", "GIF"],
564
+ })), progress);
565
+ },
566
+ /**
567
+ * Post an image to the smart desktop server
568
+ *
569
+ * @example
570
+ * ...
571
+ */
572
+ async uploadImage(file, progress) {
573
+ return new Promise((resolve, reject) => {
574
+ this.uploadImages([file], progress)
575
+ .then((response) => {
576
+ resolve({ err: response.err, path: response.paths[0] });
577
+ })
578
+ .catch(reject);
579
+ });
580
+ },
581
+ /**
582
+ * Update installer description by using REST API to persist the change
583
+ *
584
+ * @example
585
+ * let { err } = await SmartDesktopClient.updateInstallerDescription(installerDescription);
586
+ */
587
+ async updateInstallerDescription(installerDescription) {
588
+ Logger.system.log("SmartDesktopClient updateInstallerDescription", installerDescription);
589
+ const { err } = await httpPatch(`/project/installer`, installerDescription);
590
+ Logger.system.log("SmartDesktopClient.updateInstallerDescription Response", err ? err : "successful");
591
+ return { err };
592
+ },
593
+ /**
594
+ * Update installer description by using REST API to persist the change
595
+ *
596
+ * @example
597
+ * let { err } = await SmartDesktopClient.updateInstallerDescription(installerDescription);
598
+ */
599
+ async updateProjectSettings(settings) {
600
+ const { err } = await httpPatch(`/project/settings`, settings);
601
+ return { err };
602
+ },
603
+ /**
604
+ * Update installer description by using REST API to persist the change
605
+ *
606
+ * @example
607
+ * let { err } = await SmartDesktopClient.updateInstallerDescription(installerDescription);
608
+ */
609
+ async deleteProject(name) {
610
+ const { err } = await httpDelete(`/project/settings/${name}`);
611
+ return { err };
612
+ },
613
+ /**
614
+ * Get project settings
615
+ *
616
+ * @example
617
+ * let { settings, err } = await SmartDesktopClient.getProjectSettings();
618
+ */
619
+ async getProjectSettings() {
620
+ const response = await httpGet(`/project/settings`);
621
+ return response.getData;
622
+ },
623
+ /**
624
+ * Get all available projects and the current project name
625
+ *
626
+ * @example
627
+ * let { settings, err } = await SmartDesktopClient.getProjectSettings();
628
+ */
629
+ async getProjects() {
630
+ const response = await httpGet(`/projects`);
631
+ return response.getData;
632
+ },
633
+ /**
634
+ * Updates the @finsemble/finsemble-core dependency version in the package.json file for the given project
635
+ * @param projectName - The project to update
636
+ * @param finsembleCoreVersion - The version to set (obtained from getFSBLInfo() )
637
+ * @returns
638
+ */
639
+ async updateFinsembleCoreVersion(projectName, finsembleCoreVersion) {
640
+ const { err } = await httpPatch(`/projects/${projectName}/finsembleCoreVersion`, {
641
+ finsembleCoreVersion,
642
+ });
643
+ return { err };
644
+ },
645
+ /**
646
+ * Update project details
647
+ *
648
+ * @example
649
+ * let { err } = await SmartDesktopClient.updateProjectDetails({
650
+ * oldName: string;
651
+ * newName: string;
652
+ * cloneCurrent: boolean;
653
+ * });
654
+ */
655
+ async updateProjectDetails(obj) {
656
+ const { err } = await httpPatch(`/project/details`, obj);
657
+ return { err };
658
+ },
659
+ /**
660
+ * Set the active project
661
+ *
662
+ * @example
663
+ * let { err } = await SmartDesktopClient.setActiveProject("projectName");
664
+ */
665
+ async setActiveProject(projectName) {
666
+ const { err } = await httpPut(`/project/details/active`, { activeProject: projectName });
667
+ return { err };
668
+ },
669
+ /**
670
+ * Helper function -- progress descriptor for updating files
671
+ *
672
+ */
673
+ progressIndicator(progress) {
674
+ Logger.system.log("SmartDesktopClient.progressIndicator Console-Only", progress);
675
+ console.log("Console-Only Progress Indicator:", progress);
676
+ },
677
+ /**
678
+ * Update Finsemble toolbar icon file and transmit correspond ui-changed message so UI will pick up change
679
+ *
680
+ * @returns {Promise<{ err: any }>}
681
+ */
682
+ async updateToolbarIcon(imageFile) {
683
+ const TARGET_FILE = "assets/img/Finsemble_Toolbar_Icon.png";
684
+ Logger.system.log("SmartDesktopClient.updateToolbarIcon", TARGET_FILE, imageFile);
685
+ const { err, paths } = await this.uploadAssets([
686
+ {
687
+ file: imageFile,
688
+ type: ["Image", "GIF"],
689
+ targetPath: TARGET_FILE,
690
+ },
691
+ ], this.progressIndicator);
692
+ if (!err) {
693
+ // transmit change notification so Finsemble can dynamically update (see toolbar)
694
+ RouterClient.transmit("Finsemble-ui-change.toolbarIconUpdate", {});
695
+ }
696
+ Logger.system.log("SmartDesktopClient.updateToolbarIcon result", err ? err : "successful");
697
+ return { err, path: paths[0] };
698
+ },
699
+ /**
700
+ * Update Finsemble taskbar icon file and transmit correspond ui-changed message so UI will pick up change
701
+ *
702
+ */
703
+ async updateTaskbarIcon(imageFile) {
704
+ const TARGET_FILE = "assets/img/Finsemble_Taskbar_Icon.png";
705
+ Logger.system.log("SmartDesktopClient.updateTaskbarIcon", imageFile);
706
+ const { err, paths } = await this.uploadAssets([
707
+ {
708
+ file: imageFile,
709
+ type: ["Image"],
710
+ targetPath: TARGET_FILE,
711
+ },
712
+ ], this.progressIndicator);
713
+ if (!err) {
714
+ // transmit notification so Finsemble can dynamically update (e.g. toolbar, taskbar)
715
+ RouterClient.transmit("Finsemble-ui-change.taskbarIconUpdate", {});
716
+ }
717
+ Logger.system.log("SmartDesktopClient.updateTaskbarIcon result", err ? err : "successful");
718
+ return { err, path: paths[0] };
719
+ },
720
+ /**
721
+ * Update system tray icon file and refresh config entry to trigger notification
722
+ *
723
+ */
724
+ async updateSystemTrayIcon(imageFile) {
725
+ const TARGET_FILE = "assets/img/Finsemble_SystemTray_Icon.png";
726
+ Logger.system.log("SmartDesktopClient.updateSystemTrayIcon", imageFile);
727
+ const { err: error1, paths } = await this.uploadAssets([
728
+ {
729
+ file: imageFile,
730
+ type: ["Image"],
731
+ targetPath: TARGET_FILE,
732
+ },
733
+ ], this.progressIndicator);
734
+ // since the icon URL is kept in config, refresh the config entry using the current value to trigger a notification
735
+ const { err: error2 } = await RouterClient.query(`${MAKER_TOPIC}.refreshSystemTrayIconConfig`, {});
736
+ Logger.system.log("SmartDesktopClient.updateSystemTrayIcon result", error1 || error2 ? { error1, error2 } : "successful");
737
+ // Jumping through typescript hoops due to CallbackError type
738
+ const error = error1 || error2 || null;
739
+ return { err: error ? error.toString() : null, path: paths[0] };
740
+ },
741
+ /**
742
+ * Update the installer Icon file -- the change will not be picked up until the installer is built
743
+ *
744
+ */
745
+ async updateInstallerIcon(iconFile) {
746
+ const TARGET_FILE = "assets/img/installer_icon.ico";
747
+ Logger.system.log("SmartDesktopClient.updateInstallerIcon", iconFile);
748
+ const { err, paths } = await this.uploadAssets([
749
+ {
750
+ file: iconFile,
751
+ type: ["Icon"],
752
+ targetPath: TARGET_FILE,
753
+ },
754
+ ], this.progressIndicator);
755
+ Logger.system.log("SmartDesktopClient.updateSystemTrayIcon result", err ? err : "successful");
756
+ return { err, path: paths[0] };
757
+ },
758
+ /**
759
+ * Update the installer graphic file -- the change will not be picked up until the installer is built
760
+ */
761
+ async updateInstallerGraphic(gifFile) {
762
+ const TARGET_FILE = "assets/img/installer_spinner.gif";
763
+ Logger.system.log("SmartDesktopClient.updateInstallerGraphic", gifFile);
764
+ const { err, paths } = await this.uploadAssets([
765
+ {
766
+ file: gifFile,
767
+ type: ["Image", "GIF"],
768
+ targetPath: TARGET_FILE,
769
+ },
770
+ ], this.progressIndicator);
771
+ Logger.system.log("SmartDesktopClient.updateInstallerGraphic result", err ? err : "successful");
772
+ return { err, path: paths[0] };
773
+ },
774
+ /**
775
+ * Update the splash screen image file -- the change will not be picked up until Finsemble/FEA is restarted
776
+ */
777
+ async updateSplashScreen(svgFile) {
778
+ const TARGET_FILE = "assets/img/FinsembleSplash.png";
779
+ Logger.system.log("SmartDesktopClient.updateSplashScreen", svgFile);
780
+ const { err, paths } = await this.uploadAssets([
781
+ {
782
+ file: svgFile,
783
+ type: ["Image", "GIF"],
784
+ targetPath: TARGET_FILE,
785
+ },
786
+ ], this.progressIndicator);
787
+ Logger.system.log("SmartDesktopClient.updateSplashScreen result", err ? err : "successful");
788
+ return { err, path: paths[0] };
789
+ },
790
+ /**
791
+ * Helper function to update a single theme variable within Finsemble's theme
792
+ */
793
+ async updateThemeVariable(varName, varValue) {
794
+ const theme = {};
795
+ theme[varName] = varValue;
796
+ Logger.system.log("SmartDesktopClient.updateThemeVariable", theme);
797
+ return this.updateTheme(theme);
798
+ },
799
+ /**
800
+ * Save a .zip file of the project with `appName` to the local filesystem at `targetPath`
801
+ * @example
802
+ * let { err } = await SmartDesktopClient.createProjectZip("testApp", "~/Downloads/");
803
+ */
804
+ async createProjectZip(appName, targetPath = undefined) {
805
+ const applicationRoot = await this.applicationRoot();
806
+ Logger.system.log("SmartDesktopClient.createProjectZip", applicationRoot);
807
+ return new Promise((resolve, reject) => {
808
+ const onTargetPath = (targetPathInner) => {
809
+ const endpointURL = `${applicationRoot}/project/${appName}/zip?targetPath=${encodeURIComponent(targetPathInner)}`;
810
+ Logger.system.log(endpointURL);
811
+ fetch(endpointURL)
812
+ .then((response) => response.json())
813
+ .then((data) => {
814
+ resolve(data.file);
815
+ })
816
+ .catch(reject);
817
+ };
818
+ if (targetPath) {
819
+ onTargetPath(targetPath);
820
+ }
821
+ else {
822
+ FEAGlobals.finsembleWindow.showNativeOpenDialog({
823
+ title: "Select an output directory",
824
+ buttonLabel: "Save .zip file",
825
+ properties: ["openDirectory"],
826
+ }, (err, response) => {
827
+ var _a, _b, _c;
828
+ if (((_b = (_a = response === null || response === void 0 ? void 0 : response[0]) === null || _a === void 0 ? void 0 : _a.filePaths) === null || _b === void 0 ? void 0 : _b.length) > 0) {
829
+ onTargetPath((_c = response === null || response === void 0 ? void 0 : response[0]) === null || _c === void 0 ? void 0 : _c.filePaths[0]);
830
+ }
831
+ else {
832
+ reject("No file selected");
833
+ }
834
+ });
835
+ }
836
+ });
837
+ },
838
+ /**
839
+ * Copy project assets/config to target dir
840
+ *
841
+ * @example
842
+ * await SmartDesktopClient.copyProjectFiles("testApp");
843
+ * await SmartDesktopClient.copyProjectFiles("testApp", "/specific/path");
844
+ */
845
+ async copyProjectFiles(appName, targetPath = undefined // allow passing manually specified targetPath
846
+ ) {
847
+ const applicationRoot = await this.applicationRoot();
848
+ Logger.system.log("SmartDesktopClient.createProjectZip", applicationRoot);
849
+ return new Promise((resolve, reject) => {
850
+ // callback to forward targetPath to the server REST API endpoint
851
+ // regardless of whether targetPath is manually specified or retrieved via showNativeOpenDialog
852
+ const onTargetPath = (selectedTargetPath) => {
853
+ const endpointURL = `${applicationRoot}/project/${appName}/copy?targetPath=${encodeURIComponent(selectedTargetPath)}`;
854
+ Logger.system.debug(`copyProjectFiles: copying ${selectedTargetPath}, ${endpointURL}`);
855
+ fetch(endpointURL)
856
+ .then((response) => response.json())
857
+ .then((data) => {
858
+ if (data.error) {
859
+ reject(data.error);
860
+ }
861
+ else {
862
+ resolve();
863
+ }
864
+ })
865
+ .catch(reject);
866
+ };
867
+ if (targetPath) {
868
+ // we've manually specified a targetPath
869
+ onTargetPath(targetPath);
870
+ }
871
+ else {
872
+ // Open a native file selection dialog and relay the selected file to our callback
873
+ FEAGlobals.finsembleWindow.showNativeOpenDialog({
874
+ title: "Select Filesystem Destination",
875
+ buttonLabel: "Copy Project",
876
+ properties: ["openDirectory"],
877
+ }, (err, response) => {
878
+ var _a, _b, _c;
879
+ if (((_b = (_a = response === null || response === void 0 ? void 0 : response[0]) === null || _a === void 0 ? void 0 : _a.filePaths) === null || _b === void 0 ? void 0 : _b.length) > 0) {
880
+ onTargetPath((_c = response === null || response === void 0 ? void 0 : response[0]) === null || _c === void 0 ? void 0 : _c.filePaths[0]);
881
+ }
882
+ else {
883
+ reject("No file selected");
884
+ }
885
+ });
886
+ }
887
+ });
888
+ },
889
+ /**
890
+ * Copy project assets/config to target dir
891
+ *
892
+ * @example
893
+ * let {err, data: newFolderLocation} = await SmartDesktopClient.moveProjectFiles("testApp");
894
+ */
895
+ async moveProjectFiles(appName) {
896
+ const applicationRoot = await this.applicationRoot();
897
+ Logger.system.log("SmartDesktopClient.moveProjectFiles", applicationRoot);
898
+ return new Promise((resolve, reject) => {
899
+ // callback to forward targetPath to the server REST API endpoint
900
+ // regardless of whether targetPath is manually specified or retrieved via showNativeOpenDialog
901
+ const onTargetPath = (selectedTargetPath) => {
902
+ const endpointURL = `${applicationRoot}/project/${appName}/move?targetPath=${encodeURIComponent(selectedTargetPath)}`;
903
+ Logger.system.debug(`moving project files: moving ${selectedTargetPath}, ${endpointURL}`);
904
+ fetch(endpointURL)
905
+ .then((response) => response.json())
906
+ .then((data) => {
907
+ if (data.error) {
908
+ reject(data.error);
909
+ }
910
+ else {
911
+ resolve({ data: selectedTargetPath });
912
+ }
913
+ })
914
+ .catch(reject);
915
+ };
916
+ // Open a native file selection dialog and relay the selected file to our callback
917
+ FEAGlobals.finsembleWindow.showNativeOpenDialog({
918
+ title: "Select Filesystem Destination",
919
+ buttonLabel: "Select",
920
+ properties: ["openDirectory"],
921
+ }, (err, response) => {
922
+ var _a, _b, _c;
923
+ if (((_b = (_a = response === null || response === void 0 ? void 0 : response[0]) === null || _a === void 0 ? void 0 : _a.filePaths) === null || _b === void 0 ? void 0 : _b.length) > 0) {
924
+ onTargetPath((_c = response === null || response === void 0 ? void 0 : response[0]) === null || _c === void 0 ? void 0 : _c.filePaths[0]);
925
+ }
926
+ else {
927
+ reject("No file selected");
928
+ }
929
+ });
930
+ });
931
+ },
932
+ /**
933
+ * Import project from a directory
934
+ *
935
+ * @example
936
+ * let {err} = await SmartDesktopClient.importProjectFolder();
937
+ */
938
+ async importProjectFolder() {
939
+ const applicationRoot = await this.applicationRoot();
940
+ Logger.system.log("SmartDesktopClient.importProjectFolder", applicationRoot);
941
+ return new Promise((resolve, reject) => {
942
+ // callback to forward targetPath to the server REST API endpoint
943
+ // regardless of whether targetPath is manually specified or retrieved via showNativeOpenDialog
944
+ const onTargetPath = (selectedTargetPath) => {
945
+ const endpointURL = `${applicationRoot}/project/import?targetPath=${encodeURIComponent(selectedTargetPath)}`;
946
+ Logger.system.debug(`moving project files: moving ${selectedTargetPath}, ${endpointURL}`);
947
+ fetch(endpointURL)
948
+ .then((response) => response.json())
949
+ .then((data) => {
950
+ if (data.error) {
951
+ reject(data.error);
952
+ }
953
+ else {
954
+ resolve({ data: selectedTargetPath });
955
+ }
956
+ })
957
+ .catch(reject);
958
+ };
959
+ // Open a native file selection dialog and relay the selected file to our callback
960
+ FEAGlobals.finsembleWindow.showNativeOpenDialog({
961
+ title: "Select existing project folder",
962
+ buttonLabel: "Select",
963
+ properties: ["openDirectory"],
964
+ }, (err, response) => {
965
+ var _a, _b, _c;
966
+ if (((_b = (_a = response === null || response === void 0 ? void 0 : response[0]) === null || _a === void 0 ? void 0 : _a.filePaths) === null || _b === void 0 ? void 0 : _b.length) > 0) {
967
+ onTargetPath((_c = response === null || response === void 0 ? void 0 : response[0]) === null || _c === void 0 ? void 0 : _c.filePaths[0]);
968
+ }
969
+ else {
970
+ reject("No file selected");
971
+ }
972
+ });
973
+ });
974
+ },
975
+ /**
976
+ * Change the path of the current project in smartDesktops.json
977
+ *
978
+ * @param appName name of app to zip
979
+ * @param [targetPath] output path for zip file
980
+ *
981
+ * @example
982
+ * let { err } = await SmartDesktopClient.createProjectZip("testApp", "~/Downloads/");
983
+ */
984
+ async selectProjectPath() {
985
+ return new Promise((resolve, reject) => {
986
+ FEAGlobals.finsembleWindow.showNativeOpenDialog({
987
+ title: "Select Seed Project",
988
+ buttonLabel: "Select Seed Project",
989
+ properties: ["openDirectory"],
990
+ }, (err, response) => {
991
+ var _a, _b, _c;
992
+ if (((_b = (_a = response === null || response === void 0 ? void 0 : response[0]) === null || _a === void 0 ? void 0 : _a.filePaths) === null || _b === void 0 ? void 0 : _b.length) > 0) {
993
+ const path = (_c = response === null || response === void 0 ? void 0 : response[0]) === null || _c === void 0 ? void 0 : _c.filePaths[0];
994
+ Logger.system.log("SmartDesktopClient.selectProjectPath", path);
995
+ resolve(path);
996
+ }
997
+ else {
998
+ reject("No file selected");
999
+ }
1000
+ });
1001
+ });
1002
+ },
1003
+ /**
1004
+ * checkValidProjectName
1005
+ */
1006
+ checkValidProjectName(name) {
1007
+ return checkValidProjectName(name);
1008
+ },
1009
+ /**
1010
+ * Check an arbitrary string to see if it is a valid url
1011
+ * The only checks for validity are:
1012
+ * * if the string begins with "http://" or "https://"
1013
+ *
1014
+ * @param url - the potential URL
1015
+ */
1016
+ checkValidURL(url) {
1017
+ return checkValidURL(url);
1018
+ },
1019
+ /**
1020
+ * Check an arbitrary string to see if it is a valid path
1021
+ * that begins with a macro.
1022
+ * Note that macros must:
1023
+ * * Come at the beginning of the path
1024
+ * * Begin with "$"
1025
+ * * Otherwise only contain letters.
1026
+ *
1027
+ * Examples of macros: "$applicationRoot", "$moduleRoot"
1028
+ * While all macros used by Finsemble end in "Root", clients can
1029
+ * specify custom macros, which are not required to follow that practice.
1030
+ *
1031
+ * @param macroPath - path that potentially begins with a macro
1032
+ */
1033
+ checkValidMacroPath(macroPath) {
1034
+ return checkValidMacroPath(macroPath);
1035
+ },
1036
+ /**
1037
+ * Check an arbitrary string to see if it is a valid macro-beginning path
1038
+ * OR a valid URL
1039
+ *
1040
+ * @param urlOrMacroPath - potential macro-beginning path or URL
1041
+ */
1042
+ checkValidLocation(urlOrMacroPath) {
1043
+ return checkValidLocation(urlOrMacroPath);
1044
+ },
1045
+ async isInboundInteropAuthorized(sourceApp, targetApp, contextType) {
1046
+ return isInteropAuthorized(sourceApp, targetApp, contextType);
1047
+ },
1048
+ async isOutboundInteropAuthorized(sourceApp, targetApp, contextType) {
1049
+ return isInteropAuthorized(targetApp, sourceApp, contextType);
1050
+ },
1051
+ /**
1052
+ * Publish `.zip` file to the Cosaic Cloud
1053
+ *
1054
+ * @returns {Promise}
1055
+ *
1056
+ * @example
1057
+ * let { err } = await SmartDesktopClient.publishToCosaicCloud();
1058
+ */
1059
+ async publishToCosaicCloud(uuid) {
1060
+ const applicationRoot = await this.applicationRoot();
1061
+ Logger.system.log("SmartDesktopClient.publishToCosaicCloud", applicationRoot);
1062
+ return new Promise(async (resolve, reject) => {
1063
+ const endpointURL = `${applicationRoot}/project/publish/cosaicCloud?uuid=${encodeURIComponent(uuid || "")}`;
1064
+ const response = await fetch(endpointURL, {
1065
+ method: "PUT",
1066
+ });
1067
+ // We get json data back whether it's a 200 or 500 response
1068
+ const data = await response.json();
1069
+ if (response.ok) {
1070
+ resolve(data);
1071
+ }
1072
+ else {
1073
+ reject(data);
1074
+ }
1075
+ });
1076
+ },
1077
+ /**
1078
+ * Get the progress of a publish request
1079
+ *
1080
+ * @returns {Promise}
1081
+ *
1082
+ */
1083
+ async getPublishProgress() {
1084
+ const applicationRoot = await this.applicationRoot();
1085
+ Logger.system.log("SmartDesktopClient.getPublishProgress", applicationRoot);
1086
+ return new Promise((resolve, reject) => {
1087
+ const endpointURL = `${applicationRoot}/project/publish/progress`;
1088
+ fetch(endpointURL)
1089
+ .then((response) => response.json())
1090
+ .then((data) => {
1091
+ resolve(data);
1092
+ })
1093
+ .catch(reject);
1094
+ });
1095
+ },
1096
+ /**
1097
+ * Resets the a project to factory defaults. If no project name is provided then the current working
1098
+ * project is assumed. In the case of the current working project, Finsemble is restarted after the reset
1099
+ * so that the changes can take effect.
1100
+ */
1101
+ async resetProject(projectName) {
1102
+ const applicationRoot = await this.applicationRoot();
1103
+ Logger.system.log("SmartDesktopClient.resetProject", applicationRoot);
1104
+ const endpointURL = projectName
1105
+ ? `${applicationRoot}/projects/${projectName}/reset`
1106
+ : `${applicationRoot}/project/reset`;
1107
+ const response = await fetch(endpointURL, {
1108
+ method: "PUT",
1109
+ });
1110
+ const data = await response.json();
1111
+ const error = response.ok ? null : new Error(data.message);
1112
+ response.ok && !projectName && restartApplication();
1113
+ return [error, data];
1114
+ },
1115
+ /**
1116
+ * Saves the auth providers to config.json
1117
+ */
1118
+ async getAuthenticationProviders() {
1119
+ const applicationRoot = await this.applicationRoot();
1120
+ Logger.system.log("SmartDesktopClient.getAuthenticationProviders", applicationRoot);
1121
+ const endpointURL = `${applicationRoot}/authentication`;
1122
+ const response = await fetch(endpointURL, {
1123
+ method: "get",
1124
+ headers: {
1125
+ Accept: "application/json",
1126
+ },
1127
+ });
1128
+ const data = await response.json();
1129
+ if (!data || !Array.isArray(data.providers)) {
1130
+ return [];
1131
+ }
1132
+ return data.providers;
1133
+ },
1134
+ /**
1135
+ * Saves the auth providers to config.json
1136
+ */
1137
+ async setAuthenticationProviders(authenticationProviders) {
1138
+ const applicationRoot = await this.applicationRoot();
1139
+ Logger.system.log("SmartDesktopClient.setAuthenticationProviders", applicationRoot);
1140
+ const endpointURL = `${applicationRoot}/authentication`;
1141
+ const response = await fetch(endpointURL, {
1142
+ method: "PUT",
1143
+ headers: {
1144
+ Accept: "application/json",
1145
+ "Content-Type": "application/json",
1146
+ },
1147
+ body: JSON.stringify({ authenticationProviders }),
1148
+ });
1149
+ const data = await response.json();
1150
+ return response.ok ? null : new Error(data.message);
1151
+ },
1152
+ /**
1153
+ * Gett all AppD server listings
1154
+ *
1155
+ * @example
1156
+ * let { err, servers } = await SmartDesktopClient.getAppDServers();
1157
+ */
1158
+ async getAppDServers() {
1159
+ var _a;
1160
+ Logger.system.log("SmartDesktopClient.getAppDServers");
1161
+ const { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getAppDServers`, {});
1162
+ Logger.system.log("SmartDesktopClient.getAppDServers result", err ? err : "successful");
1163
+ return { err, servers: (_a = response.data.servers) !== null && _a !== void 0 ? _a : [] };
1164
+ },
1165
+ /**
1166
+ * Add a new AppD server (and its config items)
1167
+ *
1168
+ * @example
1169
+ * let { err } = await SmartDesktopClient.addAppDServer({
1170
+ * displayName: "MyServer",
1171
+ * url: "/path/to/server"
1172
+ * });
1173
+ */
1174
+ async addAppDServer(config) {
1175
+ Logger.system.log("SmartDesktopClient.addAppDServer", config);
1176
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.addAppDServer`, { config });
1177
+ Logger.system.log("SmartDesktopClient.addAppDServer result", err ? err : "successful");
1178
+ return { err };
1179
+ },
1180
+ /**
1181
+ * Update an AppD server's metadata
1182
+ *
1183
+ * @example
1184
+ * let { err } = await SmartDesktopClient.updateAppDServer(1, {
1185
+ * displayName: "MyServer Updated",
1186
+ * });
1187
+ */
1188
+ async updateAppDServer(index, config) {
1189
+ Logger.system.log("SmartDesktopClient.updateAppDServer", config);
1190
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.updateAppDServer`, { index, config });
1191
+ Logger.system.log("SmartDesktopClient.updateAppDServer result", err ? err : "successful");
1192
+ return { err };
1193
+ },
1194
+ /**
1195
+ * Remove an AppD server's listing/metadata
1196
+ *
1197
+ * @example
1198
+ * let { err } = await SmartDesktopClient.deleteAppDServer(1);
1199
+ */
1200
+ async deleteAppDServer(index) {
1201
+ Logger.system.log("SmartDesktopClient.deleteAppDServer", index);
1202
+ const { err } = await RouterClient.query(`${MAKER_TOPIC}.deleteAppDServer`, { index });
1203
+ Logger.system.log("SmartDesktopClient.deleteAppDServer result", err ? err : "successful");
1204
+ return { err };
1205
+ },
1206
+ async getManifestRoots() {
1207
+ var _a;
1208
+ if (Object.keys(manifestRoots).length > 0) {
1209
+ return manifestRoots;
1210
+ }
1211
+ const { err, data } = await FEAGlobals.FSBL.Clients.ConfigClient.getManifest();
1212
+ if (err || !data) {
1213
+ return {};
1214
+ }
1215
+ const keys = Object.keys((_a = data.finsemble) !== null && _a !== void 0 ? _a : {}).filter((key) => key.match(/\w+Root$/));
1216
+ keys.forEach((key) => {
1217
+ manifestRoots[key] = data.finsemble[key];
1218
+ });
1219
+ return manifestRoots;
1220
+ },
1221
+ };
1222
+ //# sourceMappingURL=smartDesktopClient.js.map