@finsemble/finsemble-ui 6.6.1 → 7.0.0-beta.3

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 (262) hide show
  1. package/package.json +18 -32
  2. package/react/assets/css/button.css +1 -1
  3. package/react/assets/css/favorites.css +0 -47
  4. package/react/assets/css/finsemble.css +3 -0
  5. package/react/assets/css/linkerWindow.css +13 -1
  6. package/react/assets/css/menus.css +2 -2
  7. package/react/assets/css/notificationsCenter.css +32 -1
  8. package/react/assets/css/shared/common.css +40 -0
  9. package/react/assets/css/userPreferences.css +17 -12
  10. package/react/assets/css/windowTitleBar.css +7 -0
  11. package/react/assets/icons/server.svg +26 -0
  12. package/react/components/common/ButtonIcon.js +1 -1
  13. package/react/components/common/ButtonIcon.js.map +1 -1
  14. package/react/components/common/ButtonRow.js +2 -2
  15. package/react/components/common/ButtonRow.js.map +1 -1
  16. package/react/components/common/Checkbox.js +1 -1
  17. package/react/components/common/Checkbox.js.map +1 -1
  18. package/react/components/common/ColorPicker.js +16 -15
  19. package/react/components/common/ColorPicker.js.map +1 -1
  20. package/react/components/common/ErrorBoundary.d.ts +16 -0
  21. package/react/components/common/ErrorBoundary.js +22 -0
  22. package/react/components/common/ErrorBoundary.js.map +1 -0
  23. package/react/components/common/FinsembleIcon.d.ts +3 -2
  24. package/react/components/common/FinsembleIcon.js +10 -3
  25. package/react/components/common/FinsembleIcon.js.map +1 -1
  26. package/react/components/common/FinsembleLink.d.ts +6 -0
  27. package/react/components/common/FinsembleLink.js +12 -0
  28. package/react/components/common/FinsembleLink.js.map +1 -0
  29. package/react/components/common/FinsembleToggle.d.ts +1 -2
  30. package/react/components/common/FinsembleToggle.js +2 -6
  31. package/react/components/common/FinsembleToggle.js.map +1 -1
  32. package/react/components/common/FinsembleToggleButtonBar.d.ts +13 -0
  33. package/react/components/common/FinsembleToggleButtonBar.js +44 -0
  34. package/react/components/common/FinsembleToggleButtonBar.js.map +1 -0
  35. package/react/components/common/InputTable.d.ts +3 -3
  36. package/react/components/common/InputTable.js +13 -13
  37. package/react/components/common/InputTable.js.map +1 -1
  38. package/react/components/common/Tab.js +33 -5
  39. package/react/components/common/Tab.js.map +1 -1
  40. package/react/components/common/css/FinsembleToggle.css +22 -0
  41. package/react/components/common/css/application-edit-page.css +10 -2
  42. package/react/components/common/css/tab.css +8 -8
  43. package/react/components/common/css/time-select.css +1 -1
  44. package/react/components/common/css/toggle.css +2 -10
  45. package/react/components/common/helpers.js +6 -1
  46. package/react/components/common/helpers.js.map +1 -1
  47. package/react/components/common/stories/ColorPicker.stories.js +6 -11
  48. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  49. package/react/components/common/stories/FinsembleToggle.stories.d.ts +1 -2
  50. package/react/components/common/stories/FinsembleToggle.stories.js +0 -7
  51. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  52. package/react/components/common/stories/FinsembleToggleButtonBar.stories.d.ts +14 -0
  53. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js +97 -0
  54. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js.map +1 -0
  55. package/react/components/common/stories/InputTable.stories.d.ts +4 -3
  56. package/react/components/common/stories/InputTable.stories.js +18 -8
  57. package/react/components/common/stories/InputTable.stories.js.map +1 -1
  58. package/react/components/common/tests/ButtonRow.spec.js +5 -0
  59. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  60. package/react/components/common/tests/FinsembleToggle.spec.js +1 -6
  61. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  62. package/react/components/common/tests/FinsembleToggleButtonBar.spec.d.ts +1 -0
  63. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +40 -0
  64. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -0
  65. package/react/components/common/tests/InputTable.spec.js +3 -3
  66. package/react/components/common/tests/InputTable.spec.js.map +1 -1
  67. package/react/components/favorites/FavoriteMaker.js +1 -1
  68. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  69. package/react/components/fdc3Resolver/ResolverContainer.js +4 -7
  70. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  71. package/react/components/icon/Icon.d.ts +1 -1
  72. package/react/components/icon/Icon.js +8 -1
  73. package/react/components/icon/Icon.js.map +1 -1
  74. package/react/components/legacyControls/FinsembleDnDContext.js +7 -7
  75. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  76. package/react/components/linker/remoteRedux.js +1 -0
  77. package/react/components/linker/remoteRedux.js.map +1 -1
  78. package/react/components/menu/MenuItem.js +1 -1
  79. package/react/components/menu/MenuItem.js.map +1 -1
  80. package/react/components/menu/MenuPortal.js +12 -21
  81. package/react/components/menu/MenuPortal.js.map +1 -1
  82. package/react/components/menu/MenuToggle.js +1 -1
  83. package/react/components/menu/MenuToggle.js.map +1 -1
  84. package/react/components/menu/keyboardNavigation.d.ts +1 -22
  85. package/react/components/menu/keyboardNavigation.js +110 -160
  86. package/react/components/menu/keyboardNavigation.js.map +1 -1
  87. package/react/components/notifications/components/drawer/DrawerControls.js +39 -25
  88. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  89. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +19 -6
  90. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  91. package/react/components/notifications/components/shared/CheckButton.js +19 -8
  92. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  93. package/react/components/notifications/components/shared/NotificationCardShell.js +2 -1
  94. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  95. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -1
  96. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  97. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js +2 -1
  98. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  99. package/react/components/notifications/components/views/CardView.js +5 -3
  100. package/react/components/notifications/components/views/CardView.js.map +1 -1
  101. package/react/components/notifications/components/views/ListView.js +3 -1
  102. package/react/components/notifications/components/views/ListView.js.map +1 -1
  103. package/react/components/notifications/types.d.ts +3 -0
  104. package/react/components/notifications/types.js.map +1 -1
  105. package/react/components/processMonitor/ProcessMonitor.js +4 -1
  106. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  107. package/react/components/processMonitor/components/ProcessStatistics.js +1 -3
  108. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  109. package/react/components/processMonitor/helpers.js +4 -3
  110. package/react/components/processMonitor/helpers.js.map +1 -1
  111. package/react/components/processMonitor/helpers.spec.js +7 -3
  112. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  113. package/react/components/sdd/AddApp.d.ts +4 -3
  114. package/react/components/sdd/AddApp.js +132 -30
  115. package/react/components/sdd/AddApp.js.map +1 -1
  116. package/react/components/sdd/AppEditAccess.d.ts +4 -3
  117. package/react/components/sdd/AppEditAccess.js.map +1 -1
  118. package/react/components/sdd/AppEditPage.d.ts +4 -3
  119. package/react/components/sdd/AppEditPage.js +141 -116
  120. package/react/components/sdd/AppEditPage.js.map +1 -1
  121. package/react/components/sdd/Appearance.d.ts +2 -1
  122. package/react/components/sdd/Appearance.js +15 -7
  123. package/react/components/sdd/Appearance.js.map +1 -1
  124. package/react/components/sdd/Application.d.ts +5 -4
  125. package/react/components/sdd/Application.js +61 -42
  126. package/react/components/sdd/Application.js.map +1 -1
  127. package/react/components/sdd/Applications.d.ts +12 -11
  128. package/react/components/sdd/Applications.js +23 -4
  129. package/react/components/sdd/Applications.js.map +1 -1
  130. package/react/components/sdd/Authentication.js +1 -6
  131. package/react/components/sdd/Authentication.js.map +1 -1
  132. package/react/components/sdd/AuthenticationProviderConfig.js +5 -3
  133. package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -1
  134. package/react/components/sdd/EditPreload.d.ts +4 -3
  135. package/react/components/sdd/EditPreload.js +39 -22
  136. package/react/components/sdd/EditPreload.js.map +1 -1
  137. package/react/components/sdd/Export.d.ts +7 -6
  138. package/react/components/sdd/Export.js +3 -2
  139. package/react/components/sdd/Export.js.map +1 -1
  140. package/react/components/sdd/GettingStarted.js +3 -3
  141. package/react/components/sdd/GettingStarted.js.map +1 -1
  142. package/react/components/sdd/Navigation.js +28 -4
  143. package/react/components/sdd/Navigation.js.map +1 -1
  144. package/react/components/sdd/OptionalSettingsView.d.ts +6 -5
  145. package/react/components/sdd/OptionalSettingsView.js +2 -10
  146. package/react/components/sdd/OptionalSettingsView.js.map +1 -1
  147. package/react/components/sdd/ProjectErrors.js +1 -1
  148. package/react/components/sdd/ProjectErrors.js.map +1 -1
  149. package/react/components/sdd/Publish.js +2 -2
  150. package/react/components/sdd/Publish.js.map +1 -1
  151. package/react/components/sdd/SmartDesktopDesigner.d.ts +17 -16
  152. package/react/components/sdd/SmartDesktopDesigner.js +37 -34
  153. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
  154. package/react/components/sdd/ThemePage.js +8 -5
  155. package/react/components/sdd/ThemePage.js.map +1 -1
  156. package/react/components/sdd/Themes.d.ts +2 -1
  157. package/react/components/sdd/Themes.js +2 -2
  158. package/react/components/sdd/Themes.js.map +1 -1
  159. package/react/components/sdd/Toolbar.d.ts +5 -4
  160. package/react/components/sdd/Toolbar.js +11 -9
  161. package/react/components/sdd/Toolbar.js.map +1 -1
  162. package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -1
  163. package/react/components/sdd/common/setPreloadDefaults.js +5 -4
  164. package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
  165. package/react/components/sdd/common/views.js +7 -4
  166. package/react/components/sdd/common/views.js.map +1 -1
  167. package/react/components/sdd/css/addApp.css +52 -0
  168. package/react/components/sdd/css/applications.css +4 -24
  169. package/react/components/sdd/css/nav.css +3 -3
  170. package/react/components/sdd/fixtures/authenticationProps.js +15 -1
  171. package/react/components/sdd/fixtures/authenticationProps.js.map +1 -1
  172. package/react/components/sdd/fixtures/preloads.js +14 -12
  173. package/react/components/sdd/fixtures/preloads.js.map +1 -1
  174. package/react/components/sdd/smartDesktopClient.d.ts +163 -0
  175. package/react/components/sdd/smartDesktopClient.js +573 -0
  176. package/react/components/sdd/smartDesktopClient.js.map +1 -0
  177. package/react/components/sdd/smartDesktopClient.spec.d.ts +1 -0
  178. package/react/components/sdd/smartDesktopClient.spec.js +61 -0
  179. package/react/components/sdd/smartDesktopClient.spec.js.map +1 -0
  180. package/react/components/sdd/stories/AddApp.stories.d.ts +10 -0
  181. package/react/components/sdd/stories/AddApp.stories.js +18 -0
  182. package/react/components/sdd/stories/AddApp.stories.js.map +1 -0
  183. package/react/components/sdd/stories/AppEditPage.stories.d.ts +2 -0
  184. package/react/components/sdd/stories/AppEditPage.stories.js +2 -0
  185. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
  186. package/react/components/sdd/stories/Appearance.stories.d.ts +1 -1
  187. package/react/components/sdd/stories/Appearance.stories.js +1 -0
  188. package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
  189. package/react/components/sdd/stories/Authentication.stories.js +2 -16
  190. package/react/components/sdd/stories/Authentication.stories.js.map +1 -1
  191. package/react/components/sdd/stories/OptionalSettingsView.stories.js +1 -1
  192. package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -1
  193. package/react/components/sdd/stories/SmartDesktopDesigner.stories.d.ts +1 -1
  194. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js +3 -0
  195. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -1
  196. package/react/components/sdd/stories/Themes.stories.d.ts +1 -1
  197. package/react/components/sdd/stories/Themes.stories.js +1 -0
  198. package/react/components/sdd/stories/Themes.stories.js.map +1 -1
  199. package/react/components/sdd/tests/AddApp.spec.d.ts +1 -0
  200. package/react/components/sdd/tests/AddApp.spec.js +96 -0
  201. package/react/components/sdd/tests/AddApp.spec.js.map +1 -0
  202. package/react/components/sdd/tests/AppEditPage.spec.js +92 -23
  203. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
  204. package/react/components/sdd/tests/Application.spec.js +411 -24
  205. package/react/components/sdd/tests/Application.spec.js.map +1 -1
  206. package/react/components/sdd/tests/Applications.spec.js +1 -45
  207. package/react/components/sdd/tests/Applications.spec.js.map +1 -1
  208. package/react/components/sdd/tests/Authentication.spec.js +1 -1
  209. package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
  210. package/react/components/sdd/tests/EditPreload.spec.js +50 -7
  211. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
  212. package/react/components/sdd/tests/Navigation.spec.js +2 -2
  213. package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
  214. package/react/components/sdd/tests/OptionalSettingsView.spec.js +235 -0
  215. package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
  216. package/react/components/sdd/tests/ProjectErrors.spec.js +1 -1
  217. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
  218. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +2 -2
  219. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
  220. package/react/components/search/Search.js +1 -1
  221. package/react/components/search/Search.js.map +1 -1
  222. package/react/components/shared/DefaultDropdownButton.js +12 -1
  223. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  224. package/react/components/shared/tests/DefaultDropdownButton.spec.js +12 -0
  225. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  226. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -16
  227. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +0 -4
  228. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  229. package/react/components/toolbar/DragHandle.stories.js.map +1 -1
  230. package/react/components/toolbar/ToolbarIcon.js +2 -2
  231. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  232. package/react/components/toolbar/ToolbarSection.d.ts +1 -9
  233. package/react/components/toolbar/ToolbarSection.js +3 -7
  234. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  235. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +1 -1
  236. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  237. package/react/components/toolbar/dashbar/Dashbar.js +21 -12
  238. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  239. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +1 -1
  240. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  241. package/react/components/userPreferences/components/ContentSection.js +1 -1
  242. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  243. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +4 -3
  244. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  245. package/react/components/userPreferences/components/general/ScheduledClose.js +12 -3
  246. package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
  247. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +1 -1
  248. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  249. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +17 -2
  250. package/react/components/windowTitleBar/WindowTitleBarShell.js +160 -6
  251. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  252. package/react/components/windowTitleBar/components/left/LinkerButton.js +7 -1
  253. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  254. package/react/components/windowTitleBar/components/windowTitle.js +10 -2
  255. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  256. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +11 -1
  257. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  258. package/react/reducers/rootReducer.d.ts +2 -2
  259. package/react/store.d.ts +4 -4
  260. package/react/tsconfig.tsbuildinfo +1 -0
  261. package/react/types/smartDesktopDesignerTypes.d.ts +3 -0
  262. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
@@ -12,6 +12,7 @@ import { Content } from "./Content";
12
12
  import { AppEditPage } from "./AppEditPage";
13
13
  import { generateDefaultConfig } from "./sdd_helpers";
14
14
  import { launchTutorialLink } from "./common/fsbl_functions";
15
+ import { SmartDesktopClient } from "./smartDesktopClient";
15
16
  const abstractPositionLookup = [
16
17
  "",
17
18
  "0-0-undefined-undefined",
@@ -56,64 +57,82 @@ export const genWindowParamsFromAbstractPosition = (abstractPosition) => {
56
57
  return params;
57
58
  };
58
59
  export function appConfigToAppData(appConfig) {
59
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109;
60
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126;
60
61
  return {
61
62
  name: appConfig.name || ((_b = (_a = appConfig.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.displayName),
62
63
  description: appConfig.description || "",
63
- url: (_d = (_c = appConfig.manifest) === null || _c === void 0 ? void 0 : _c.window) === null || _d === void 0 ? void 0 : _d.url,
64
- path: (_f = (_e = appConfig.manifest) === null || _e === void 0 ? void 0 : _e.window) === null || _f === void 0 ? void 0 : _f.path,
65
- appArguments: (_h = (_g = appConfig.manifest) === null || _g === void 0 ? void 0 : _g.window) === null || _h === void 0 ? void 0 : _h.arguments,
66
- appType: (_k = (_j = appConfig.manifest) === null || _j === void 0 ? void 0 : _j.window) === null || _k === void 0 ? void 0 : _k.windowType,
67
- width: (_m = (_l = appConfig.manifest) === null || _l === void 0 ? void 0 : _l.window) === null || _m === void 0 ? void 0 : _m.width,
68
- height: (_p = (_o = appConfig.manifest) === null || _o === void 0 ? void 0 : _o.window) === null || _p === void 0 ? void 0 : _p.height,
69
- iconURL: ((_q = appConfig.icons) === null || _q === void 0 ? void 0 : _q[0]) ? appConfig.icons[0].src : "",
70
- rules: (_s = (_r = appConfig.manifest) === null || _r === void 0 ? void 0 : _r.interop) === null || _s === void 0 ? void 0 : _s.selectConnect,
71
- intents: (_t = appConfig.intents) !== null && _t !== void 0 ? _t : [],
72
- persistPath: (_y = (_x = (_w = (_v = (_u = appConfig.manifest) === null || _u === void 0 ? void 0 : _u.foreign) === null || _v === void 0 ? void 0 : _v.services) === null || _w === void 0 ? void 0 : _w.workspace) === null || _x === void 0 ? void 0 : _x.persistPath) !== null && _y !== void 0 ? _y : false,
73
- persistURL: (_3 = (_2 = (_1 = (_0 = (_z = appConfig.manifest) === null || _z === void 0 ? void 0 : _z.foreign) === null || _0 === void 0 ? void 0 : _0.services) === null || _1 === void 0 ? void 0 : _1.workspace) === null || _2 === void 0 ? void 0 : _2.persistURL) !== null && _3 !== void 0 ? _3 : false,
74
- addToWorkspace: (_6 = (_5 = (_4 = appConfig.manifest) === null || _4 === void 0 ? void 0 : _4.window) === null || _5 === void 0 ? void 0 : _5.addToWorkspace) !== null && _6 !== void 0 ? _6 : true,
75
- allowAutoArrange: (_11 = (_10 = (_9 = (_8 = (_7 = appConfig.manifest) === null || _7 === void 0 ? void 0 : _7.foreign) === null || _8 === void 0 ? void 0 : _8.services) === null || _9 === void 0 ? void 0 : _9.windowService) === null || _10 === void 0 ? void 0 : _10.allowAutoArrange) !== null && _11 !== void 0 ? _11 : true,
76
- allowGrouping: (_16 = (_15 = (_14 = (_13 = (_12 = appConfig.manifest) === null || _12 === void 0 ? void 0 : _12.foreign) === null || _13 === void 0 ? void 0 : _13.services) === null || _14 === void 0 ? void 0 : _14.windowService) === null || _15 === void 0 ? void 0 : _15.allowGrouping) !== null && _16 !== void 0 ? _16 : true,
77
- allowMaximize: (_21 = (_20 = (_19 = (_18 = (_17 = appConfig.manifest) === null || _17 === void 0 ? void 0 : _17.foreign) === null || _18 === void 0 ? void 0 : _18.services) === null || _19 === void 0 ? void 0 : _19.windowService) === null || _20 === void 0 ? void 0 : _20.allowMaximize) !== null && _21 !== void 0 ? _21 : true,
78
- allowMinimize: (_26 = (_25 = (_24 = (_23 = (_22 = appConfig.manifest) === null || _22 === void 0 ? void 0 : _22.foreign) === null || _23 === void 0 ? void 0 : _23.services) === null || _24 === void 0 ? void 0 : _24.windowService) === null || _25 === void 0 ? void 0 : _25.allowMinimize) !== null && _26 !== void 0 ? _26 : true,
79
- allowSnapping: (_31 = (_30 = (_29 = (_28 = (_27 = appConfig.manifest) === null || _27 === void 0 ? void 0 : _27.foreign) === null || _28 === void 0 ? void 0 : _28.services) === null || _29 === void 0 ? void 0 : _29.windowService) === null || _30 === void 0 ? void 0 : _30.allowSnapping) !== null && _31 !== void 0 ? _31 : true,
80
- allowTabbing: (_36 = (_35 = (_34 = (_33 = (_32 = appConfig.manifest) === null || _32 === void 0 ? void 0 : _32.foreign) === null || _33 === void 0 ? void 0 : _33.services) === null || _34 === void 0 ? void 0 : _34.windowService) === null || _35 === void 0 ? void 0 : _35.allowTabbing) !== null && _36 !== void 0 ? _36 : true,
81
- allowTiling: (_41 = (_40 = (_39 = (_38 = (_37 = appConfig.manifest) === null || _37 === void 0 ? void 0 : _37.foreign) === null || _38 === void 0 ? void 0 : _38.services) === null || _39 === void 0 ? void 0 : _39.windowService) === null || _40 === void 0 ? void 0 : _40.allowTiling) !== null && _41 !== void 0 ? _41 : true,
82
- enableAOT: (_46 = (_45 = (_44 = (_43 = (_42 = appConfig.manifest) === null || _42 === void 0 ? void 0 : _42.foreign) === null || _43 === void 0 ? void 0 : _43.components) === null || _44 === void 0 ? void 0 : _44["Window Manager"]) === null || _45 === void 0 ? void 0 : _45.alwaysOnTopIcon) !== null && _46 !== void 0 ? _46 : false,
83
- enableTitleBar: ((_50 = (_49 = (_48 = (_47 = appConfig.manifest) === null || _47 === void 0 ? void 0 : _47.foreign) === null || _48 === void 0 ? void 0 : _48.components) === null || _49 === void 0 ? void 0 : _49["Window Manager"]) === null || _50 === void 0 ? void 0 : _50.FSBLHeader) !== false,
84
- hideClose: (_56 = (_55 = (_54 = (_53 = (_52 = (_51 = appConfig.manifest) === null || _51 === void 0 ? void 0 : _51.foreign) === null || _52 === void 0 ? void 0 : _52.components) === null || _53 === void 0 ? void 0 : _53["Window Manager"]) === null || _54 === void 0 ? void 0 : _54.FSBLHeader) === null || _55 === void 0 ? void 0 : _55.hideClose) !== null && _56 !== void 0 ? _56 : false,
85
- hideMaximize: (_62 = (_61 = (_60 = (_59 = (_58 = (_57 = appConfig.manifest) === null || _57 === void 0 ? void 0 : _57.foreign) === null || _58 === void 0 ? void 0 : _58.components) === null || _59 === void 0 ? void 0 : _59["Window Manager"]) === null || _60 === void 0 ? void 0 : _60.FSBLHeader) === null || _61 === void 0 ? void 0 : _61.hideMaximize) !== null && _62 !== void 0 ? _62 : false,
86
- hideMinimize: (_68 = (_67 = (_66 = (_65 = (_64 = (_63 = appConfig.manifest) === null || _63 === void 0 ? void 0 : _63.foreign) === null || _64 === void 0 ? void 0 : _64.components) === null || _65 === void 0 ? void 0 : _65["Window Manager"]) === null || _66 === void 0 ? void 0 : _66.FSBLHeader) === null || _67 === void 0 ? void 0 : _67.hideMinimize) !== null && _68 !== void 0 ? _68 : false,
87
- autoConnect: (_71 = (_70 = (_69 = appConfig.manifest) === null || _69 === void 0 ? void 0 : _69.interop) === null || _70 === void 0 ? void 0 : _70.autoConnect) !== null && _71 !== void 0 ? _71 : true,
64
+ url: (_e = (_d = (_c = appConfig.manifest) === null || _c === void 0 ? void 0 : _c.window) === null || _d === void 0 ? void 0 : _d.url) !== null && _e !== void 0 ? _e : "",
65
+ path: (_h = (_g = (_f = appConfig.manifest) === null || _f === void 0 ? void 0 : _f.window) === null || _g === void 0 ? void 0 : _g.path) !== null && _h !== void 0 ? _h : "",
66
+ appArguments: (_l = (_k = (_j = appConfig.manifest) === null || _j === void 0 ? void 0 : _j.window) === null || _k === void 0 ? void 0 : _k.arguments) !== null && _l !== void 0 ? _l : "",
67
+ appType: (_p = (_o = (_m = appConfig.manifest) === null || _m === void 0 ? void 0 : _m.window) === null || _o === void 0 ? void 0 : _o.windowType) !== null && _p !== void 0 ? _p : "",
68
+ width: (_s = (_r = (_q = appConfig.manifest) === null || _q === void 0 ? void 0 : _q.window) === null || _r === void 0 ? void 0 : _r.width) !== null && _s !== void 0 ? _s : "",
69
+ height: (_v = (_u = (_t = appConfig.manifest) === null || _t === void 0 ? void 0 : _t.window) === null || _u === void 0 ? void 0 : _u.height) !== null && _v !== void 0 ? _v : "",
70
+ iconURL: ((_w = appConfig.icons) === null || _w === void 0 ? void 0 : _w[0]) ? appConfig.icons[0].src : "",
71
+ rules: (_z = (_y = (_x = appConfig.manifest) === null || _x === void 0 ? void 0 : _x.interop) === null || _y === void 0 ? void 0 : _y.selectConnect) !== null && _z !== void 0 ? _z : [],
72
+ intents: (_0 = appConfig.intents) !== null && _0 !== void 0 ? _0 : [],
73
+ persistPath: (_5 = (_4 = (_3 = (_2 = (_1 = appConfig.manifest) === null || _1 === void 0 ? void 0 : _1.foreign) === null || _2 === void 0 ? void 0 : _2.services) === null || _3 === void 0 ? void 0 : _3.workspace) === null || _4 === void 0 ? void 0 : _4.persistPath) !== null && _5 !== void 0 ? _5 : false,
74
+ persistURL: (_10 = (_9 = (_8 = (_7 = (_6 = appConfig.manifest) === null || _6 === void 0 ? void 0 : _6.foreign) === null || _7 === void 0 ? void 0 : _7.services) === null || _8 === void 0 ? void 0 : _8.workspace) === null || _9 === void 0 ? void 0 : _9.persistURL) !== null && _10 !== void 0 ? _10 : false,
75
+ addToWorkspace: (_13 = (_12 = (_11 = appConfig.manifest) === null || _11 === void 0 ? void 0 : _11.window) === null || _12 === void 0 ? void 0 : _12.addToWorkspace) !== null && _13 !== void 0 ? _13 : true,
76
+ alias: (_16 = (_15 = (_14 = appConfig.manifest) === null || _14 === void 0 ? void 0 : _14.window) === null || _15 === void 0 ? void 0 : _15.alias) !== null && _16 !== void 0 ? _16 : "",
77
+ allowAutoArrange: (_21 = (_20 = (_19 = (_18 = (_17 = appConfig.manifest) === null || _17 === void 0 ? void 0 : _17.foreign) === null || _18 === void 0 ? void 0 : _18.services) === null || _19 === void 0 ? void 0 : _19.windowService) === null || _20 === void 0 ? void 0 : _20.allowAutoArrange) !== null && _21 !== void 0 ? _21 : true,
78
+ allowGrouping: (_26 = (_25 = (_24 = (_23 = (_22 = appConfig.manifest) === null || _22 === void 0 ? void 0 : _22.foreign) === null || _23 === void 0 ? void 0 : _23.services) === null || _24 === void 0 ? void 0 : _24.windowService) === null || _25 === void 0 ? void 0 : _25.allowGrouping) !== null && _26 !== void 0 ? _26 : true,
79
+ allowMaximize: (_31 = (_30 = (_29 = (_28 = (_27 = appConfig.manifest) === null || _27 === void 0 ? void 0 : _27.foreign) === null || _28 === void 0 ? void 0 : _28.services) === null || _29 === void 0 ? void 0 : _29.windowService) === null || _30 === void 0 ? void 0 : _30.allowMaximize) !== null && _31 !== void 0 ? _31 : true,
80
+ allowMinimize: (_36 = (_35 = (_34 = (_33 = (_32 = appConfig.manifest) === null || _32 === void 0 ? void 0 : _32.foreign) === null || _33 === void 0 ? void 0 : _33.services) === null || _34 === void 0 ? void 0 : _34.windowService) === null || _35 === void 0 ? void 0 : _35.allowMinimize) !== null && _36 !== void 0 ? _36 : true,
81
+ allowSnapping: (_41 = (_40 = (_39 = (_38 = (_37 = appConfig.manifest) === null || _37 === void 0 ? void 0 : _37.foreign) === null || _38 === void 0 ? void 0 : _38.services) === null || _39 === void 0 ? void 0 : _39.windowService) === null || _40 === void 0 ? void 0 : _40.allowSnapping) !== null && _41 !== void 0 ? _41 : true,
82
+ allowTabbing: (_46 = (_45 = (_44 = (_43 = (_42 = appConfig.manifest) === null || _42 === void 0 ? void 0 : _42.foreign) === null || _43 === void 0 ? void 0 : _43.services) === null || _44 === void 0 ? void 0 : _44.windowService) === null || _45 === void 0 ? void 0 : _45.allowTabbing) !== null && _46 !== void 0 ? _46 : true,
83
+ allowTiling: (_51 = (_50 = (_49 = (_48 = (_47 = appConfig.manifest) === null || _47 === void 0 ? void 0 : _47.foreign) === null || _48 === void 0 ? void 0 : _48.services) === null || _49 === void 0 ? void 0 : _49.windowService) === null || _50 === void 0 ? void 0 : _50.allowTiling) !== null && _51 !== void 0 ? _51 : true,
84
+ enableAffinity: ((_53 = (_52 = appConfig.manifest) === null || _52 === void 0 ? void 0 : _52.window) === null || _53 === void 0 ? void 0 : _53.affinity) !== "false",
85
+ enableAOT: (_58 = (_57 = (_56 = (_55 = (_54 = appConfig.manifest) === null || _54 === void 0 ? void 0 : _54.foreign) === null || _55 === void 0 ? void 0 : _55.components) === null || _56 === void 0 ? void 0 : _56["Window Manager"]) === null || _57 === void 0 ? void 0 : _57.alwaysOnTopIcon) !== null && _58 !== void 0 ? _58 : false,
86
+ enableTitleBar: ((_62 = (_61 = (_60 = (_59 = appConfig.manifest) === null || _59 === void 0 ? void 0 : _59.foreign) === null || _60 === void 0 ? void 0 : _60.components) === null || _61 === void 0 ? void 0 : _61["Window Manager"]) === null || _62 === void 0 ? void 0 : _62.FSBLHeader) !== false,
87
+ hideClose: (_68 = (_67 = (_66 = (_65 = (_64 = (_63 = appConfig.manifest) === null || _63 === void 0 ? void 0 : _63.foreign) === null || _64 === void 0 ? void 0 : _64.components) === null || _65 === void 0 ? void 0 : _65["Window Manager"]) === null || _66 === void 0 ? void 0 : _66.FSBLHeader) === null || _67 === void 0 ? void 0 : _67.hideClose) !== null && _68 !== void 0 ? _68 : false,
88
+ hideMaximize: (_74 = (_73 = (_72 = (_71 = (_70 = (_69 = appConfig.manifest) === null || _69 === void 0 ? void 0 : _69.foreign) === null || _70 === void 0 ? void 0 : _70.components) === null || _71 === void 0 ? void 0 : _71["Window Manager"]) === null || _72 === void 0 ? void 0 : _72.FSBLHeader) === null || _73 === void 0 ? void 0 : _73.hideMaximize) !== null && _74 !== void 0 ? _74 : false,
89
+ hideMinimize: (_80 = (_79 = (_78 = (_77 = (_76 = (_75 = appConfig.manifest) === null || _75 === void 0 ? void 0 : _75.foreign) === null || _76 === void 0 ? void 0 : _76.components) === null || _77 === void 0 ? void 0 : _77["Window Manager"]) === null || _78 === void 0 ? void 0 : _78.FSBLHeader) === null || _79 === void 0 ? void 0 : _79.hideMinimize) !== null && _80 !== void 0 ? _80 : false,
90
+ autoConnect: (_83 = (_82 = (_81 = appConfig.manifest) === null || _81 === void 0 ? void 0 : _81.interop) === null || _82 === void 0 ? void 0 : _82.autoConnect) !== null && _83 !== void 0 ? _83 : true,
88
91
  abstractPosition: genAbstractPositionFromAppConfig(appConfig),
89
- alwaysOnTop: (_75 = (_74 = (_73 = (_72 = appConfig.manifest) === null || _72 === void 0 ? void 0 : _72.window) === null || _73 === void 0 ? void 0 : _73.options) === null || _74 === void 0 ? void 0 : _74.alwaysOnTop) !== null && _75 !== void 0 ? _75 : false,
90
- opacity: (_79 = (_78 = (_77 = (_76 = appConfig.manifest) === null || _76 === void 0 ? void 0 : _76.window) === null || _77 === void 0 ? void 0 : _77.options) === null || _78 === void 0 ? void 0 : _78.opacity) !== null && _79 !== void 0 ? _79 : 1,
91
- resizable: (_83 = (_82 = (_81 = (_80 = appConfig.manifest) === null || _80 === void 0 ? void 0 : _80.window) === null || _81 === void 0 ? void 0 : _81.options) === null || _82 === void 0 ? void 0 : _82.resizable) !== null && _83 !== void 0 ? _83 : true,
92
- singleton: (_86 = (_85 = (_84 = appConfig.manifest) === null || _84 === void 0 ? void 0 : _84.component) === null || _85 === void 0 ? void 0 : _85.singleton) !== null && _86 !== void 0 ? _86 : false,
93
- spawnOnStartup: (_89 = (_88 = (_87 = appConfig.manifest) === null || _87 === void 0 ? void 0 : _87.component) === null || _88 === void 0 ? void 0 : _88.spawnOnStartup) !== null && _89 !== void 0 ? _89 : false,
94
- launchableByUser: (_94 = (_93 = (_92 = (_91 = (_90 = appConfig.manifest) === null || _90 === void 0 ? void 0 : _90.foreign) === null || _91 === void 0 ? void 0 : _91.components) === null || _92 === void 0 ? void 0 : _92["App Launcher"]) === null || _93 === void 0 ? void 0 : _93.launchableByUser) !== null && _94 !== void 0 ? _94 : true,
95
- security: (_98 = (_97 = (_96 = (_95 = appConfig.manifest) === null || _95 === void 0 ? void 0 : _95.window) === null || _96 === void 0 ? void 0 : _96.options) === null || _97 === void 0 ? void 0 : _97.securityPolicy) !== null && _98 !== void 0 ? _98 : "trusted",
96
- isEvergreen: (_102 = (_101 = (_100 = (_99 = appConfig.manifest) === null || _99 === void 0 ? void 0 : _99.window) === null || _100 === void 0 ? void 0 : _100.options) === null || _101 === void 0 ? void 0 : _101.isEvergreen) !== null && _102 !== void 0 ? _102 : false,
97
- native_windowSpawnTimeout: (_106 = (_105 = (_104 = (_103 = appConfig.manifest) === null || _103 === void 0 ? void 0 : _103.window) === null || _104 === void 0 ? void 0 : _104.options) === null || _105 === void 0 ? void 0 : _105.windowSpawnTimeout) !== null && _106 !== void 0 ? _106 : 30,
98
- preloads: (_109 = (_108 = (_107 = appConfig.manifest) === null || _107 === void 0 ? void 0 : _107.component) === null || _108 === void 0 ? void 0 : _108.preload) !== null && _109 !== void 0 ? _109 : [],
92
+ alwaysOnTop: (_87 = (_86 = (_85 = (_84 = appConfig.manifest) === null || _84 === void 0 ? void 0 : _84.window) === null || _85 === void 0 ? void 0 : _85.options) === null || _86 === void 0 ? void 0 : _86.alwaysOnTop) !== null && _87 !== void 0 ? _87 : false,
93
+ opacity: (_91 = (_90 = (_89 = (_88 = appConfig.manifest) === null || _88 === void 0 ? void 0 : _88.window) === null || _89 === void 0 ? void 0 : _89.options) === null || _90 === void 0 ? void 0 : _90.opacity) !== null && _91 !== void 0 ? _91 : 1,
94
+ resizable: (_95 = (_94 = (_93 = (_92 = appConfig.manifest) === null || _92 === void 0 ? void 0 : _92.window) === null || _93 === void 0 ? void 0 : _93.options) === null || _94 === void 0 ? void 0 : _94.resizable) !== null && _95 !== void 0 ? _95 : true,
95
+ singleton: (_98 = (_97 = (_96 = appConfig.manifest) === null || _96 === void 0 ? void 0 : _96.component) === null || _97 === void 0 ? void 0 : _97.singleton) !== null && _98 !== void 0 ? _98 : false,
96
+ spawnOnStartup: (_101 = (_100 = (_99 = appConfig.manifest) === null || _99 === void 0 ? void 0 : _99.component) === null || _100 === void 0 ? void 0 : _100.spawnOnStartup) !== null && _101 !== void 0 ? _101 : false,
97
+ launchableByUser: (_106 = (_105 = (_104 = (_103 = (_102 = appConfig.manifest) === null || _102 === void 0 ? void 0 : _102.foreign) === null || _103 === void 0 ? void 0 : _103.components) === null || _104 === void 0 ? void 0 : _104["App Launcher"]) === null || _105 === void 0 ? void 0 : _105.launchableByUser) !== null && _106 !== void 0 ? _106 : true,
98
+ security: (_110 = (_109 = (_108 = (_107 = appConfig.manifest) === null || _107 === void 0 ? void 0 : _107.window) === null || _108 === void 0 ? void 0 : _108.options) === null || _109 === void 0 ? void 0 : _109.securityPolicy) !== null && _110 !== void 0 ? _110 : "trusted",
99
+ isEvergreen: (_114 = (_113 = (_112 = (_111 = appConfig.manifest) === null || _111 === void 0 ? void 0 : _111.window) === null || _112 === void 0 ? void 0 : _112.options) === null || _113 === void 0 ? void 0 : _113.isEvergreen) !== null && _114 !== void 0 ? _114 : false,
100
+ native_windowSpawnTimeout: (_118 = (_117 = (_116 = (_115 = appConfig.manifest) === null || _115 === void 0 ? void 0 : _115.window) === null || _116 === void 0 ? void 0 : _116.options) === null || _117 === void 0 ? void 0 : _117.windowSpawnTimeout) !== null && _118 !== void 0 ? _118 : 30,
101
+ preloads: (_121 = (_120 = (_119 = appConfig.manifest) === null || _119 === void 0 ? void 0 : _119.component) === null || _120 === void 0 ? void 0 : _120.preload) !== null && _121 !== void 0 ? _121 : [],
102
+ titlebarType: (_126 = (_125 = (_124 = (_123 = (_122 = appConfig.manifest) === null || _122 === void 0 ? void 0 : _122.foreign) === null || _123 === void 0 ? void 0 : _123.components) === null || _124 === void 0 ? void 0 : _124["Window Manager"]) === null || _125 === void 0 ? void 0 : _125.titlebarType) !== null && _126 !== void 0 ? _126 : "injected",
99
103
  };
100
104
  }
101
105
  export function appDataToAppConfig(currentAppConfig, data, appId) {
102
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
106
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
103
107
  let windowParams = currentAppConfig.manifest
104
108
  ? Object.assign(Object.assign({}, currentAppConfig.manifest.window), { options: Object.assign(Object.assign({}, (_a = currentAppConfig.manifest.window) === null || _a === void 0 ? void 0 : _a.options), { securityPolicy: data.security, isEvergreen: data.isEvergreen, windowSpawnTimeout: data.native_windowSpawnTimeout }) }) : {};
105
- if (data.appType != "web") {
109
+ if (data.appType === "native" || data.appType === "assimilation" || data.appType === "application") {
106
110
  windowParams.windowType = data.appType == "native" ? data.appType : "assimilation";
107
111
  windowParams.path = data.path;
108
112
  windowParams.arguments = (_b = data.appArguments) === null || _b === void 0 ? void 0 : _b.trim();
109
113
  delete windowParams.url;
110
114
  }
115
+ else if (data.appType === "Citrix") {
116
+ console.log("Citrix stuff...");
117
+ windowParams.windowType = data.appType;
118
+ windowParams.arguments = (_c = data.appArguments) === null || _c === void 0 ? void 0 : _c.trim();
119
+ delete windowParams.path;
120
+ delete windowParams.url;
121
+ }
111
122
  else {
112
123
  delete windowParams.windowType;
113
124
  delete windowParams.path;
114
125
  delete windowParams.arguments;
115
126
  windowParams.url = data.url;
116
127
  }
128
+ if (data.enableAffinity) {
129
+ if (windowParams.affinity === "false") {
130
+ delete windowParams.affinity;
131
+ }
132
+ }
133
+ else {
134
+ windowParams.affinity = "false";
135
+ }
117
136
  windowParams.width = data.width;
118
137
  windowParams.height = data.height;
119
138
  windowParams.addToWorkspace = data.addToWorkspace;
@@ -124,14 +143,14 @@ export function appDataToAppConfig(currentAppConfig, data, appId) {
124
143
  delete windowParams.bottom;
125
144
  const appDIconsFromURL = (src) => (src === "" ? [] : [{ src }]);
126
145
  const icons = data.iconURL || data.iconURL === "" ? appDIconsFromURL(data.iconURL) : currentAppConfig.icons;
127
- let appConfig = Object.assign(Object.assign({}, currentAppConfig), { appId, name: data.name, description: data.description, manifest: Object.assign(Object.assign({}, currentAppConfig.manifest), { window: Object.assign(Object.assign(Object.assign({}, windowParams), genWindowParamsFromAbstractPosition(data.abstractPosition)), { options: Object.assign(Object.assign({}, windowParams === null || windowParams === void 0 ? void 0 : windowParams.options), { alwaysOnTop: data.alwaysOnTop, opacity: data.opacity, resizable: data.resizable }) }), component: Object.assign(Object.assign({}, (_c = currentAppConfig.manifest) === null || _c === void 0 ? void 0 : _c.component), { singleton: data.singleton, spawnOnStartup: data.spawnOnStartup, preload: data.preloads }), interop: Object.assign(Object.assign({}, (_d = currentAppConfig.manifest) === null || _d === void 0 ? void 0 : _d.interop), { selectConnect: data.rules, autoConnect: data.autoConnect }), foreign: Object.assign(Object.assign({}, (_e = currentAppConfig.manifest) === null || _e === void 0 ? void 0 : _e.foreign), { components: Object.assign(Object.assign({}, (_g = (_f = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _f === void 0 ? void 0 : _f.foreign) === null || _g === void 0 ? void 0 : _g.components), { "App Launcher": Object.assign(Object.assign({}, (_k = (_j = (_h = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _h === void 0 ? void 0 : _h.foreign) === null || _j === void 0 ? void 0 : _j.components) === null || _k === void 0 ? void 0 : _k["App Launcher"]), { launchableByUser: data.launchableByUser }), "Window Manager": Object.assign(Object.assign({}, (_o = (_m = (_l = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _l === void 0 ? void 0 : _l.foreign) === null || _m === void 0 ? void 0 : _m.components) === null || _o === void 0 ? void 0 : _o["Window Manager"]), { alwaysOnTopIcon: data.enableAOT || !data.alwaysOnTop, FSBLHeader: data.enableTitleBar
146
+ let appConfig = Object.assign(Object.assign({}, currentAppConfig), { appId, name: data.name, description: data.description, manifest: Object.assign(Object.assign({}, currentAppConfig.manifest), { window: Object.assign(Object.assign(Object.assign({}, windowParams), genWindowParamsFromAbstractPosition(data.abstractPosition)), { options: Object.assign(Object.assign({}, windowParams === null || windowParams === void 0 ? void 0 : windowParams.options), { alwaysOnTop: data.alwaysOnTop, opacity: data.opacity, resizable: data.resizable }) }), component: Object.assign(Object.assign({}, (_d = currentAppConfig.manifest) === null || _d === void 0 ? void 0 : _d.component), { singleton: data.singleton, spawnOnStartup: data.spawnOnStartup, preload: data.preloads }), interop: Object.assign(Object.assign({}, (_e = currentAppConfig.manifest) === null || _e === void 0 ? void 0 : _e.interop), { selectConnect: data.rules, autoConnect: data.autoConnect }), foreign: Object.assign(Object.assign({}, (_f = currentAppConfig.manifest) === null || _f === void 0 ? void 0 : _f.foreign), { components: Object.assign(Object.assign({}, (_h = (_g = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _g === void 0 ? void 0 : _g.foreign) === null || _h === void 0 ? void 0 : _h.components), { "App Launcher": Object.assign(Object.assign({}, (_l = (_k = (_j = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _j === void 0 ? void 0 : _j.foreign) === null || _k === void 0 ? void 0 : _k.components) === null || _l === void 0 ? void 0 : _l["App Launcher"]), { launchableByUser: data.launchableByUser }), "Window Manager": Object.assign(Object.assign({}, (_p = (_o = (_m = currentAppConfig === null || currentAppConfig === void 0 ? void 0 : currentAppConfig.manifest) === null || _m === void 0 ? void 0 : _m.foreign) === null || _o === void 0 ? void 0 : _o.components) === null || _p === void 0 ? void 0 : _p["Window Manager"]), { alwaysOnTopIcon: data.enableAOT || !data.alwaysOnTop, titlebarType: data.titlebarType, FSBLHeader: data.enableTitleBar
128
147
  ? {
129
148
  hideClose: data.hideClose,
130
149
  hideMaximize: data.hideMaximize || !data.allowMaximize,
131
150
  hideMinimize: data.hideMinimize || !data.allowMinimize,
132
151
  }
133
- : false }) }), services: Object.assign(Object.assign({}, (_q = (_p = currentAppConfig.manifest) === null || _p === void 0 ? void 0 : _p.foreign) === null || _q === void 0 ? void 0 : _q.services), { workspace: Object.assign(Object.assign({}, (_t = (_s = (_r = currentAppConfig.manifest) === null || _r === void 0 ? void 0 : _r.foreign) === null || _s === void 0 ? void 0 : _s.services) === null || _t === void 0 ? void 0 : _t.workspace), { persistPath: data.persistPath, persistURL: data.persistURL }), windowService: Object.assign(Object.assign({}, (_w = (_v = (_u = currentAppConfig.manifest) === null || _u === void 0 ? void 0 : _u.foreign) === null || _v === void 0 ? void 0 : _v.services) === null || _w === void 0 ? void 0 : _w.windowService), { allowAutoArrange: data.allowAutoArrange, allowGrouping: data.allowGrouping, allowMinimize: data.allowMinimize, allowMaximize: data.allowMaximize, allowSnapping: data.allowSnapping, allowTabbing: data.allowTabbing, allowTiling: data.allowTiling }) }) }) }), intents: data.intents, icons });
134
- (_x = appConfig.manifest) === null || _x === void 0 ? true : delete _x.temporary;
152
+ : false }) }), services: Object.assign(Object.assign({}, (_r = (_q = currentAppConfig.manifest) === null || _q === void 0 ? void 0 : _q.foreign) === null || _r === void 0 ? void 0 : _r.services), { workspace: Object.assign(Object.assign({}, (_u = (_t = (_s = currentAppConfig.manifest) === null || _s === void 0 ? void 0 : _s.foreign) === null || _t === void 0 ? void 0 : _t.services) === null || _u === void 0 ? void 0 : _u.workspace), { persistPath: data.persistPath, persistURL: data.persistURL }), windowService: Object.assign(Object.assign({}, (_x = (_w = (_v = currentAppConfig.manifest) === null || _v === void 0 ? void 0 : _v.foreign) === null || _w === void 0 ? void 0 : _w.services) === null || _x === void 0 ? void 0 : _x.windowService), { allowAutoArrange: data.allowAutoArrange, allowGrouping: data.allowGrouping, allowMinimize: data.allowMinimize, allowMaximize: data.allowMaximize, allowSnapping: data.allowSnapping, allowTabbing: data.allowTabbing, allowTiling: data.allowTiling }) }) }) }), intents: data.intents, icons });
153
+ (_y = appConfig.manifest) === null || _y === void 0 ? true : delete _y.temporary;
135
154
  return appConfig;
136
155
  }
137
156
  export var ApplicationCloseReason;
@@ -140,7 +159,7 @@ export var ApplicationCloseReason;
140
159
  ApplicationCloseReason[ApplicationCloseReason["CANCEL"] = 1] = "CANCEL";
141
160
  ApplicationCloseReason[ApplicationCloseReason["NEW"] = 2] = "NEW";
142
161
  })(ApplicationCloseReason || (ApplicationCloseReason = {}));
143
- const validateURL = (url) => FSBL.Clients.SmartDesktopClient.checkValidURL(url);
162
+ const validateURL = (url) => SmartDesktopClient.checkValidURL(url);
144
163
  const helpFunction = () => {
145
164
  launchTutorialLink("SDD-02-ManageApps");
146
165
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../src/components/sdd/Application.tsx"],"names":[],"mappings":"AA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AC,CAAC,cAAc,EAAE;oBACxC,kCAAU,SAAS,EAAC,mBAAmB;wBACtC;4BACC,oBAAC,MAAM,IAAC,YAAY,EAAE,YAAY,eAAmB,CAC7C;wBAET,oBAAC,OAAO;4BACP,oBAAC,WAAW,oBAAK,gBAAgB,EAAI,CAC5B,CACA,CACL,CACF,CACA,CACF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { CircularLoadingSpinner } from \"../common/LoadingSpinner\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport * as Types from \"../../types/smartDesktopDesignerTypes\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Content } from \"./Content\";\nimport { AppEditPage } from \"./AppEditPage\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { AppEditPageProps } from \"./AppEditPage\";\nimport { PositionTypes } from \"@finsemble/finsemble-api/types/services/window/types\";\n\nexport type AppDefinition = services.Interop.types.AppDefinition;\n// Get the type of the window object within an AppD manifest. Use Required<> to resolve the ?:\nexport type ManifestWindow = Required<AppDefinition>[\"manifest\"][\"window\"];\n\nconst abstractPositionLookup = [\n\t// `${top}-${left}-${bottom}-${right}`\n\t\"\",\n\t\"0-0-undefined-undefined\",\n\t\"0-center-undefined-undefined\",\n\t\"0-undefined-undefined-0\",\n\t\"center-0-undefined-undefined\",\n\t\"center-center-undefined-undefined\",\n\t\"center-undefined-undefined-0\",\n\t\"undefined-0-0-undefined\",\n\t\"undefined-center-0-undefined\",\n\t\"undefined-undefined-0-0\",\n];\n\nexport const genAbstractPositionFromAppConfig = (appConfig: AppDefinition): number => {\n\tconst position = appConfig.manifest?.window?.position;\n\tconst left = appConfig.manifest?.window?.left;\n\tconst right = appConfig.manifest?.window?.right;\n\tconst top = appConfig.manifest?.window?.top;\n\tconst bottom = appConfig.manifest?.window?.bottom;\n\n\t// No position is defined\n\tif (position === undefined) {\n\t\treturn 0;\n\t}\n\n\treturn abstractPositionLookup.indexOf(`${top}-${left}-${bottom}-${right}`);\n};\nexport const genWindowParamsFromAbstractPosition = (abstractPosition: number): ManifestWindow => {\n\tif (abstractPosition <= 0) {\n\t\treturn {};\n\t}\n\tconst [top, left, bottom, right] = abstractPositionLookup[abstractPosition].split(\"-\");\n\tconst params = {\n\t\tposition: \"monitor\" as PositionTypes,\n\t\ttop,\n\t\tleft,\n\t\tbottom,\n\t\tright,\n\t};\n\n\tfor (let key in params) {\n\t\tif (params[key as keyof typeof params] === \"undefined\") {\n\t\t\tdelete params[key as keyof typeof params];\n\t\t}\n\t}\n\n\treturn params;\n};\n\n/* eslint-disable sonarjs/cognitive-complexity */\nexport function appConfigToAppData(appConfig: AppDefinition): Types.ApplicationSaveData {\n\treturn {\n\t\tname: appConfig.name || appConfig.manifest?.component?.displayName,\n\t\tdescription: appConfig.description || \"\",\n\t\turl: appConfig.manifest?.window?.url,\n\t\tpath: appConfig.manifest?.window?.path,\n\t\tappArguments: appConfig.manifest?.window?.arguments,\n\t\tappType: appConfig.manifest?.window?.windowType,\n\t\twidth: appConfig.manifest?.window?.width,\n\t\theight: appConfig.manifest?.window?.height,\n\t\t// SDD only works with the first icon in the AppD array\n\t\ticonURL: appConfig.icons?.[0] ? appConfig.icons[0].src : \"\",\n\t\trules: appConfig.manifest?.interop?.selectConnect,\n\t\tintents: appConfig.intents ?? [],\n\t\tpersistPath: appConfig.manifest?.foreign?.services?.workspace?.persistPath ?? false,\n\t\tpersistURL: appConfig.manifest?.foreign?.services?.workspace?.persistURL ?? false,\n\t\taddToWorkspace: appConfig.manifest?.window?.addToWorkspace ?? true,\n\t\tallowAutoArrange: appConfig.manifest?.foreign?.services?.windowService?.allowAutoArrange ?? true,\n\t\tallowGrouping: appConfig.manifest?.foreign?.services?.windowService?.allowGrouping ?? true,\n\t\tallowMaximize: appConfig.manifest?.foreign?.services?.windowService?.allowMaximize ?? true,\n\t\tallowMinimize: appConfig.manifest?.foreign?.services?.windowService?.allowMinimize ?? true,\n\t\tallowSnapping: appConfig.manifest?.foreign?.services?.windowService?.allowSnapping ?? true,\n\t\tallowTabbing: appConfig.manifest?.foreign?.services?.windowService?.allowTabbing ?? true,\n\t\tallowTiling: appConfig.manifest?.foreign?.services?.windowService?.allowTiling ?? true,\n\t\tenableAOT: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.alwaysOnTopIcon ?? false,\n\t\tenableTitleBar: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader !== false,\n\t\thideClose: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideClose ?? false,\n\t\thideMaximize: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideMaximize ?? false,\n\t\thideMinimize: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideMinimize ?? false,\n\t\tautoConnect: appConfig.manifest?.interop?.autoConnect ?? true,\n\t\tabstractPosition: genAbstractPositionFromAppConfig(appConfig),\n\t\talwaysOnTop: appConfig.manifest?.window?.options?.alwaysOnTop ?? false,\n\t\topacity: appConfig.manifest?.window?.options?.opacity ?? 1,\n\t\tresizable: appConfig.manifest?.window?.options?.resizable ?? true,\n\t\tsingleton: appConfig.manifest?.component?.singleton ?? false,\n\t\tspawnOnStartup: appConfig.manifest?.component?.spawnOnStartup ?? false,\n\t\tlaunchableByUser: appConfig.manifest?.foreign?.components?.[\"App Launcher\"]?.launchableByUser ?? true,\n\t\tsecurity: appConfig.manifest?.window?.options?.securityPolicy ?? \"trusted\",\n\t\tisEvergreen: appConfig.manifest?.window?.options?.isEvergreen ?? false,\n\t\tnative_windowSpawnTimeout: appConfig.manifest?.window?.options?.windowSpawnTimeout ?? 30,\n\t\tpreloads: appConfig.manifest?.component?.preload ?? [],\n\t};\n}\n\nexport function appDataToAppConfig(\n\tcurrentAppConfig: AppDefinition,\n\tdata: Types.ApplicationSaveData,\n\tappId: string\n): AppDefinition {\n\tlet windowParams: ManifestWindow = currentAppConfig.manifest\n\t\t? {\n\t\t\t\t...currentAppConfig.manifest.window,\n\t\t\t\toptions: {\n\t\t\t\t\t...currentAppConfig.manifest.window?.options,\n\t\t\t\t\tsecurityPolicy: data.security,\n\t\t\t\t\tisEvergreen: data.isEvergreen,\n\t\t\t\t\twindowSpawnTimeout: data.native_windowSpawnTimeout,\n\t\t\t\t},\n\t\t }\n\t\t: {};\n\n\tif (data.appType != \"web\") {\n\t\twindowParams.windowType = data.appType == \"native\" ? data.appType : \"assimilation\";\n\t\twindowParams.path = data.path;\n\t\twindowParams.arguments = data.appArguments?.trim();\n\t\tdelete windowParams.url;\n\t} else {\n\t\tdelete windowParams.windowType;\n\t\tdelete windowParams.path;\n\t\tdelete windowParams.arguments;\n\t\twindowParams.url = data.url;\n\t}\n\n\twindowParams.width = data.width;\n\twindowParams.height = data.height;\n\twindowParams.addToWorkspace = data.addToWorkspace;\n\n\tdelete windowParams.position;\n\tdelete windowParams.left;\n\tdelete windowParams.right;\n\tdelete windowParams.top;\n\tdelete windowParams.bottom;\n\n\t// Creates an AppDIcon array from a url. If url is the empty string then we delete the icons\n\tconst appDIconsFromURL = (src: string) => (src === \"\" ? [] : [{ src }]);\n\tconst icons = data.iconURL || data.iconURL === \"\" ? appDIconsFromURL(data.iconURL) : currentAppConfig.icons;\n\n\tlet appConfig: AppDefinition = {\n\t\t...currentAppConfig,\n\t\tappId,\n\t\tname: data.name,\n\t\tdescription: data.description,\n\t\tmanifest: {\n\t\t\t...currentAppConfig.manifest,\n\t\t\twindow: {\n\t\t\t\t...windowParams,\n\t\t\t\t...genWindowParamsFromAbstractPosition(data.abstractPosition),\n\t\t\t\toptions: {\n\t\t\t\t\t...windowParams?.options,\n\t\t\t\t\talwaysOnTop: data.alwaysOnTop,\n\t\t\t\t\topacity: data.opacity,\n\t\t\t\t\tresizable: data.resizable,\n\t\t\t\t},\n\t\t\t},\n\t\t\tcomponent: {\n\t\t\t\t...currentAppConfig.manifest?.component,\n\t\t\t\tsingleton: data.singleton,\n\t\t\t\tspawnOnStartup: data.spawnOnStartup,\n\t\t\t\tpreload: data.preloads,\n\t\t\t},\n\t\t\tinterop: {\n\t\t\t\t...currentAppConfig.manifest?.interop,\n\t\t\t\tselectConnect: data.rules,\n\t\t\t\tautoConnect: data.autoConnect,\n\t\t\t},\n\t\t\tforeign: {\n\t\t\t\t...currentAppConfig.manifest?.foreign,\n\t\t\t\tcomponents: {\n\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components,\n\t\t\t\t\t\"App Launcher\": {\n\t\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components?.[\"App Launcher\"],\n\t\t\t\t\t\tlaunchableByUser: data.launchableByUser,\n\t\t\t\t\t},\n\t\t\t\t\t\"Window Manager\": {\n\t\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components?.[\"Window Manager\"],\n\t\t\t\t\t\talwaysOnTopIcon: data.enableAOT || !data.alwaysOnTop,\n\t\t\t\t\t\tFSBLHeader: data.enableTitleBar\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\thideClose: data.hideClose,\n\t\t\t\t\t\t\t\t\thideMaximize: data.hideMaximize || !data.allowMaximize,\n\t\t\t\t\t\t\t\t\thideMinimize: data.hideMinimize || !data.allowMinimize,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: false,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tservices: {\n\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services,\n\t\t\t\t\tworkspace: {\n\t\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services?.workspace,\n\t\t\t\t\t\tpersistPath: data.persistPath,\n\t\t\t\t\t\tpersistURL: data.persistURL,\n\t\t\t\t\t},\n\t\t\t\t\twindowService: {\n\t\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services?.windowService,\n\t\t\t\t\t\tallowAutoArrange: data.allowAutoArrange,\n\t\t\t\t\t\tallowGrouping: data.allowGrouping,\n\t\t\t\t\t\tallowMinimize: data.allowMinimize,\n\t\t\t\t\t\tallowMaximize: data.allowMaximize,\n\t\t\t\t\t\tallowSnapping: data.allowSnapping,\n\t\t\t\t\t\tallowTabbing: data.allowTabbing,\n\t\t\t\t\t\tallowTiling: data.allowTiling,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tintents: data.intents,\n\t\ticons,\n\t};\n\n\tdelete appConfig.manifest?.temporary;\n\treturn appConfig;\n}\n\nexport enum ApplicationCloseReason {\n\tSUCCESS,\n\tCANCEL,\n\tNEW,\n}\n\nexport type ApplicationProps = {\n\tid: string;\n\tapps: AppDefinition[];\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tupdateApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\n\tonClose: (reason: ApplicationCloseReason) => void;\n\tsetCurrentAppID: (id: string | null) => void;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n\tpreloads: Types.PreloadMap;\n};\n\nconst validateURL = (url: string) => FSBL.Clients.SmartDesktopClient.checkValidURL(url);\n\nconst helpFunction = () => {\n\tlaunchTutorialLink(\"SDD-02-ManageApps\");\n};\n\nexport const Application = (props: ApplicationProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst currentAppID = props.id;\n\n\tconst currentAppConfig = useSelector((state: RootState) =>\n\t\tstate.smartDesktopDesigner.apps.find((app: AppDefinition) => app.appId === currentAppID)\n\t);\n\n\tif (!currentAppConfig) {\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tprops.deleteApp(currentAppID).then(() => {\n\t\t\t\tconst config: AppDefinition = {\n\t\t\t\t\t...response.config,\n\t\t\t\t\tappId: currentAppID,\n\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t...response.config.manifest,\n\t\t\t\t\t\t// Apps that are flagged temporary will be removed if the user cancels out of adding an app\n\t\t\t\t\t\ttemporary: true,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tprops.addApp(currentAppID, config).then(() => {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div style={{ overflow: \"hidden\" }}>\n\t\t\t\t\t<div style={{ marginTop: \"43vh\" }}>\n\t\t\t\t\t\t<CircularLoadingSpinner />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst onSaveData = (data: Types.ApplicationSaveData) =>\n\t\tnew Promise<any>((resolve, reject) => {\n\t\t\tif (!currentAppID) {\n\t\t\t\treturn reject(new Error(\"no app ID specified\"));\n\t\t\t}\n\n\t\t\tconst appConfig = appDataToAppConfig(currentAppConfig, data, currentAppID);\n\t\t\tprops.updateApp(currentAppID, appConfig).then(({ err }) => {\n\t\t\t\tif (err === null) {\n\t\t\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\tconst setCurrentComponentID = (id: string | null) => {\n\t\tif (id === \"new\") {\n\t\t\tprops.onClose(ApplicationCloseReason.NEW);\n\t\t} else {\n\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\n\t\t}\n\t};\n\n\tconst removeApplicationFn = () => {\n\t\tprops.deleteApp(currentAppID);\n\t\tsetCurrentComponentID(\"\");\n\t};\n\n\tconst appData = appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData;\n\tconst { displayName, windowURL, nativePath, currentAppType } = generateDefaultConfig(appData);\n\n\tconst appEditPageProps: AppEditPageProps = {\n\t\tstartingDisplayName: displayName,\n\t\tstartingAppType: currentAppType,\n\t\tstartingWindowURL: windowURL,\n\t\tstartingNativePath: nativePath,\n\t\tappData,\n\t\tvalidateURL,\n\t\tremoveApplicationFn,\n\t\tcancelFn: () => {\n\t\t\tsetCurrentComponentID(null);\n\t\t},\n\t\tsubmitFn: (data: Types.ApplicationSaveData) => {\n\t\t\tonSaveData?.({\n\t\t\t\t...data,\n\t\t\t\ttags: appData.tags,\n\t\t\t});\n\t\t},\n\t\taddApp: props.addApp,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t\tpreloadAliasList: Object.keys(props.preloads),\n\t};\n\n\treturn (\n\t\t<div className=\"app-edit\">\n\t\t\t<View>\n\t\t\t\t<div>\n\t\t\t\t\t<form onSubmit={(e) => e.preventDefault()}>\n\t\t\t\t\t\t<fieldset className=\"app-edit-fieldset\">\n\t\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t\t<Header helpFunction={helpFunction}>Edit app</Header>\n\t\t\t\t\t\t\t</legend>\n\n\t\t\t\t\t\t\t<Content>\n\t\t\t\t\t\t\t\t<AppEditPage {...appEditPageProps} />\n\t\t\t\t\t\t\t</Content>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</View>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../src/components/sdd/Application.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,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* All rights reserved.\n */\n\nimport React from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { CircularLoadingSpinner } from \"../common/LoadingSpinner\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport * as Types from \"../../types/smartDesktopDesignerTypes\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Content } from \"./Content\";\nimport { AppEditPage } from \"./AppEditPage\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { AppEditPageProps } from \"./AppEditPage\";\nimport { PositionTypes } from \"@finsemble/finsemble-api/types/services/window/types\";\nimport { SmartDesktopClient } from \"./smartDesktopClient\";\n\nexport type AppDefinition = services.Interop.types.AppDefinition;\n// Get the type of the window object within an AppD manifest. Use Required<> to resolve the ?:\nexport type ManifestWindow = Required<AppDefinition>[\"manifest\"][\"window\"];\n\nconst abstractPositionLookup = [\n\t// `${top}-${left}-${bottom}-${right}`\n\t\"\",\n\t\"0-0-undefined-undefined\",\n\t\"0-center-undefined-undefined\",\n\t\"0-undefined-undefined-0\",\n\t\"center-0-undefined-undefined\",\n\t\"center-center-undefined-undefined\",\n\t\"center-undefined-undefined-0\",\n\t\"undefined-0-0-undefined\",\n\t\"undefined-center-0-undefined\",\n\t\"undefined-undefined-0-0\",\n];\n\nexport const genAbstractPositionFromAppConfig = (appConfig: AppDefinition): number => {\n\tconst position = appConfig.manifest?.window?.position;\n\tconst left = appConfig.manifest?.window?.left;\n\tconst right = appConfig.manifest?.window?.right;\n\tconst top = appConfig.manifest?.window?.top;\n\tconst bottom = appConfig.manifest?.window?.bottom;\n\n\t// No position is defined\n\tif (position === undefined) {\n\t\treturn 0;\n\t}\n\n\treturn abstractPositionLookup.indexOf(`${top}-${left}-${bottom}-${right}`);\n};\nexport const genWindowParamsFromAbstractPosition = (abstractPosition: number): ManifestWindow => {\n\tif (abstractPosition <= 0) {\n\t\treturn {};\n\t}\n\tconst [top, left, bottom, right] = abstractPositionLookup[abstractPosition].split(\"-\");\n\tconst params = {\n\t\tposition: \"monitor\" as PositionTypes,\n\t\ttop,\n\t\tleft,\n\t\tbottom,\n\t\tright,\n\t};\n\n\tfor (let key in params) {\n\t\tif (params[key as keyof typeof params] === \"undefined\") {\n\t\t\tdelete params[key as keyof typeof params];\n\t\t}\n\t}\n\n\treturn params;\n};\n\n/* eslint-disable sonarjs/cognitive-complexity */\nexport function appConfigToAppData(appConfig: AppDefinition): Types.ApplicationSaveData {\n\treturn {\n\t\tname: appConfig.name || appConfig.manifest?.component?.displayName,\n\t\tdescription: appConfig.description || \"\",\n\t\turl: appConfig.manifest?.window?.url ?? \"\",\n\t\tpath: appConfig.manifest?.window?.path ?? \"\",\n\t\tappArguments: appConfig.manifest?.window?.arguments ?? \"\",\n\t\tappType: appConfig.manifest?.window?.windowType ?? \"\",\n\t\twidth: appConfig.manifest?.window?.width ?? \"\",\n\t\theight: appConfig.manifest?.window?.height ?? \"\",\n\t\t// SDD only works with the first icon in the AppD array\n\t\ticonURL: appConfig.icons?.[0] ? appConfig.icons[0].src : \"\",\n\t\trules: appConfig.manifest?.interop?.selectConnect ?? [],\n\t\tintents: appConfig.intents ?? [],\n\t\tpersistPath: appConfig.manifest?.foreign?.services?.workspace?.persistPath ?? false,\n\t\tpersistURL: appConfig.manifest?.foreign?.services?.workspace?.persistURL ?? false,\n\t\taddToWorkspace: appConfig.manifest?.window?.addToWorkspace ?? true,\n\t\talias: appConfig.manifest?.window?.alias ?? \"\",\n\t\tallowAutoArrange: appConfig.manifest?.foreign?.services?.windowService?.allowAutoArrange ?? true,\n\t\tallowGrouping: appConfig.manifest?.foreign?.services?.windowService?.allowGrouping ?? true,\n\t\tallowMaximize: appConfig.manifest?.foreign?.services?.windowService?.allowMaximize ?? true,\n\t\tallowMinimize: appConfig.manifest?.foreign?.services?.windowService?.allowMinimize ?? true,\n\t\tallowSnapping: appConfig.manifest?.foreign?.services?.windowService?.allowSnapping ?? true,\n\t\tallowTabbing: appConfig.manifest?.foreign?.services?.windowService?.allowTabbing ?? true,\n\t\tallowTiling: appConfig.manifest?.foreign?.services?.windowService?.allowTiling ?? true,\n\t\tenableAffinity: appConfig.manifest?.window?.affinity !== \"false\",\n\t\tenableAOT: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.alwaysOnTopIcon ?? false,\n\t\tenableTitleBar: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader !== false,\n\t\thideClose: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideClose ?? false,\n\t\thideMaximize: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideMaximize ?? false,\n\t\thideMinimize: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.FSBLHeader?.hideMinimize ?? false,\n\t\tautoConnect: appConfig.manifest?.interop?.autoConnect ?? true,\n\t\tabstractPosition: genAbstractPositionFromAppConfig(appConfig),\n\t\talwaysOnTop: appConfig.manifest?.window?.options?.alwaysOnTop ?? false,\n\t\topacity: appConfig.manifest?.window?.options?.opacity ?? 1,\n\t\tresizable: appConfig.manifest?.window?.options?.resizable ?? true,\n\t\tsingleton: appConfig.manifest?.component?.singleton ?? false,\n\t\tspawnOnStartup: appConfig.manifest?.component?.spawnOnStartup ?? false,\n\t\tlaunchableByUser: appConfig.manifest?.foreign?.components?.[\"App Launcher\"]?.launchableByUser ?? true,\n\t\tsecurity: appConfig.manifest?.window?.options?.securityPolicy ?? \"trusted\",\n\t\tisEvergreen: appConfig.manifest?.window?.options?.isEvergreen ?? false,\n\t\tnative_windowSpawnTimeout: appConfig.manifest?.window?.options?.windowSpawnTimeout ?? 30,\n\t\tpreloads: appConfig.manifest?.component?.preload ?? [],\n\t\ttitlebarType: appConfig.manifest?.foreign?.components?.[\"Window Manager\"]?.titlebarType ?? \"injected\",\n\t};\n}\n\nexport function appDataToAppConfig(\n\tcurrentAppConfig: AppDefinition,\n\tdata: Types.ApplicationSaveData,\n\tappId: string\n): AppDefinition {\n\tlet windowParams: ManifestWindow = currentAppConfig.manifest\n\t\t? {\n\t\t\t\t...currentAppConfig.manifest.window,\n\t\t\t\toptions: {\n\t\t\t\t\t...currentAppConfig.manifest.window?.options,\n\t\t\t\t\tsecurityPolicy: data.security,\n\t\t\t\t\tisEvergreen: data.isEvergreen,\n\t\t\t\t\twindowSpawnTimeout: data.native_windowSpawnTimeout,\n\t\t\t\t},\n\t\t }\n\t\t: {};\n\n\tif (data.appType === \"native\" || data.appType === \"assimilation\" || data.appType === \"application\") {\n\t\twindowParams.windowType = data.appType == \"native\" ? data.appType : \"assimilation\";\n\t\twindowParams.path = data.path;\n\t\twindowParams.arguments = data.appArguments?.trim();\n\t\tdelete windowParams.url;\n\t} else if (data.appType === \"Citrix\") {\n\t\tconsole.log(\"Citrix stuff...\");\n\t\t// @ts-ignore\n\t\twindowParams.windowType = data.appType;\n\t\twindowParams.arguments = data.appArguments?.trim();\n\t\tdelete windowParams.path;\n\t\tdelete windowParams.url;\n\t} else {\n\t\tdelete windowParams.windowType;\n\t\tdelete windowParams.path;\n\t\tdelete windowParams.arguments;\n\t\twindowParams.url = data.url;\n\t}\n\n\tif (data.enableAffinity) {\n\t\tif (windowParams.affinity === \"false\") {\n\t\t\tdelete windowParams.affinity;\n\t\t}\n\t} else {\n\t\twindowParams.affinity = \"false\";\n\t}\n\n\twindowParams.width = data.width;\n\twindowParams.height = data.height;\n\twindowParams.addToWorkspace = data.addToWorkspace;\n\n\tdelete windowParams.position;\n\tdelete windowParams.left;\n\tdelete windowParams.right;\n\tdelete windowParams.top;\n\tdelete windowParams.bottom;\n\n\t// Creates an AppDIcon array from a url. If url is the empty string then we delete the icons\n\tconst appDIconsFromURL = (src: string) => (src === \"\" ? [] : [{ src }]);\n\tconst icons = data.iconURL || data.iconURL === \"\" ? appDIconsFromURL(data.iconURL) : currentAppConfig.icons;\n\n\tlet appConfig: AppDefinition = {\n\t\t...currentAppConfig,\n\t\tappId,\n\t\tname: data.name,\n\t\tdescription: data.description,\n\t\tmanifest: {\n\t\t\t...currentAppConfig.manifest,\n\t\t\twindow: {\n\t\t\t\t...windowParams,\n\t\t\t\t...genWindowParamsFromAbstractPosition(data.abstractPosition),\n\t\t\t\toptions: {\n\t\t\t\t\t...windowParams?.options,\n\t\t\t\t\talwaysOnTop: data.alwaysOnTop,\n\t\t\t\t\topacity: data.opacity,\n\t\t\t\t\tresizable: data.resizable,\n\t\t\t\t},\n\t\t\t},\n\t\t\tcomponent: {\n\t\t\t\t...currentAppConfig.manifest?.component,\n\t\t\t\tsingleton: data.singleton,\n\t\t\t\tspawnOnStartup: data.spawnOnStartup,\n\t\t\t\tpreload: data.preloads,\n\t\t\t},\n\t\t\tinterop: {\n\t\t\t\t...currentAppConfig.manifest?.interop,\n\t\t\t\tselectConnect: data.rules,\n\t\t\t\tautoConnect: data.autoConnect,\n\t\t\t},\n\t\t\tforeign: {\n\t\t\t\t...currentAppConfig.manifest?.foreign,\n\t\t\t\tcomponents: {\n\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components,\n\t\t\t\t\t\"App Launcher\": {\n\t\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components?.[\"App Launcher\"],\n\t\t\t\t\t\tlaunchableByUser: data.launchableByUser,\n\t\t\t\t\t},\n\t\t\t\t\t\"Window Manager\": {\n\t\t\t\t\t\t...currentAppConfig?.manifest?.foreign?.components?.[\"Window Manager\"],\n\t\t\t\t\t\talwaysOnTopIcon: data.enableAOT || !data.alwaysOnTop,\n\t\t\t\t\t\ttitlebarType: data.titlebarType,\n\t\t\t\t\t\tFSBLHeader: data.enableTitleBar\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\thideClose: data.hideClose,\n\t\t\t\t\t\t\t\t\thideMaximize: data.hideMaximize || !data.allowMaximize,\n\t\t\t\t\t\t\t\t\thideMinimize: data.hideMinimize || !data.allowMinimize,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: false,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tservices: {\n\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services,\n\t\t\t\t\tworkspace: {\n\t\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services?.workspace,\n\t\t\t\t\t\tpersistPath: data.persistPath,\n\t\t\t\t\t\tpersistURL: data.persistURL,\n\t\t\t\t\t},\n\t\t\t\t\twindowService: {\n\t\t\t\t\t\t...currentAppConfig.manifest?.foreign?.services?.windowService,\n\t\t\t\t\t\tallowAutoArrange: data.allowAutoArrange,\n\t\t\t\t\t\tallowGrouping: data.allowGrouping,\n\t\t\t\t\t\tallowMinimize: data.allowMinimize,\n\t\t\t\t\t\tallowMaximize: data.allowMaximize,\n\t\t\t\t\t\tallowSnapping: data.allowSnapping,\n\t\t\t\t\t\tallowTabbing: data.allowTabbing,\n\t\t\t\t\t\tallowTiling: data.allowTiling,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tintents: data.intents,\n\t\ticons,\n\t};\n\n\tdelete appConfig.manifest?.temporary;\n\treturn appConfig;\n}\n\nexport enum ApplicationCloseReason {\n\tSUCCESS,\n\tCANCEL,\n\tNEW,\n}\n\nexport type ApplicationProps = {\n\tid: string;\n\tapps: AppDefinition[];\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tupdateApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tdeleteApp: typeof SmartDesktopClient.deleteApp;\n\tgetAppConfigTemplate: typeof SmartDesktopClient.getAppConfigTemplate;\n\tonClose: (reason: ApplicationCloseReason) => void;\n\tsetCurrentAppID: (id: string | null) => void;\n\tisInboundInteropAuthorized: typeof SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof SmartDesktopClient.isOutboundInteropAuthorized;\n\tpreloads: Types.PreloadMap;\n};\n\nconst validateURL = (url: string) => SmartDesktopClient.checkValidURL(url);\n\nconst helpFunction = () => {\n\tlaunchTutorialLink(\"SDD-02-ManageApps\");\n};\n\nexport const Application = (props: ApplicationProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst currentAppID = props.id;\n\n\tconst currentAppConfig = useSelector((state: RootState) =>\n\t\tstate.smartDesktopDesigner.apps.find((app: AppDefinition) => app.appId === currentAppID)\n\t);\n\n\tif (!currentAppConfig) {\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tprops.deleteApp(currentAppID).then(() => {\n\t\t\t\tconst config: AppDefinition = {\n\t\t\t\t\t...response.config,\n\t\t\t\t\tappId: currentAppID,\n\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t...response.config.manifest,\n\t\t\t\t\t\t// Apps that are flagged temporary will be removed if the user cancels out of adding an app\n\t\t\t\t\t\ttemporary: true,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tprops.addApp(currentAppID, config).then(() => {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div style={{ overflow: \"hidden\" }}>\n\t\t\t\t\t<div style={{ marginTop: \"43vh\" }}>\n\t\t\t\t\t\t<CircularLoadingSpinner />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst onSaveData = (data: Types.ApplicationSaveData) =>\n\t\tnew Promise<any>((resolve, reject) => {\n\t\t\tif (!currentAppID) {\n\t\t\t\treturn reject(new Error(\"no app ID specified\"));\n\t\t\t}\n\n\t\t\tconst appConfig = appDataToAppConfig(currentAppConfig, data, currentAppID);\n\t\t\tprops.updateApp(currentAppID, appConfig).then(({ err }) => {\n\t\t\t\tif (err === null) {\n\t\t\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\tconst setCurrentComponentID = (id: string | null) => {\n\t\tif (id === \"new\") {\n\t\t\tprops.onClose(ApplicationCloseReason.NEW);\n\t\t} else {\n\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\n\t\t}\n\t};\n\n\tconst removeApplicationFn = () => {\n\t\tprops.deleteApp(currentAppID);\n\t\tsetCurrentComponentID(\"\");\n\t};\n\n\tconst appData = appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData;\n\tconst { displayName, windowURL, nativePath, currentAppType } = generateDefaultConfig(appData);\n\n\tconst appEditPageProps: AppEditPageProps = {\n\t\tstartingDisplayName: displayName,\n\t\tstartingAppType: currentAppType,\n\t\tstartingWindowURL: windowURL,\n\t\tstartingNativePath: nativePath,\n\t\tappData,\n\t\tvalidateURL,\n\t\tremoveApplicationFn,\n\t\tcancelFn: () => {\n\t\t\tsetCurrentComponentID(null);\n\t\t},\n\t\tsubmitFn: (data: Types.ApplicationSaveData) => {\n\t\t\tonSaveData?.({\n\t\t\t\t...data,\n\t\t\t\ttags: appData.tags,\n\t\t\t});\n\t\t},\n\t\taddApp: props.addApp,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t\tpreloadAliasList: Object.keys(props.preloads),\n\t};\n\n\treturn (\n\t\t<div className=\"app-edit\">\n\t\t\t<View>\n\t\t\t\t<div>\n\t\t\t\t\t<form onSubmit={(e) => e.preventDefault()}>\n\t\t\t\t\t\t<fieldset className=\"app-edit-fieldset\">\n\t\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t\t<Header helpFunction={helpFunction}>Edit app</Header>\n\t\t\t\t\t\t\t</legend>\n\n\t\t\t\t\t\t\t<Content>\n\t\t\t\t\t\t\t\t<AppEditPage {...appEditPageProps} />\n\t\t\t\t\t\t\t</Content>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</View>\n\t\t</div>\n\t);\n};\n"]}
@@ -3,17 +3,18 @@
3
3
  * All rights reserved.
4
4
  */
5
5
  /// <reference types="react" />
6
+ import { SmartDesktopClient } from "./smartDesktopClient";
6
7
  export declare type ApplicationsProps = {
7
- getApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;
8
- addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
9
- deleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;
10
- updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
11
- getAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;
12
- getMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;
13
- addMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;
14
- updateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;
15
- getPreloads: typeof FSBL.Clients.SmartDesktopClient.prototype.getPreloads;
16
- isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
17
- isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
8
+ getApps: typeof SmartDesktopClient.getApps;
9
+ addApp: typeof SmartDesktopClient.addApp;
10
+ deleteApp: typeof SmartDesktopClient.deleteApp;
11
+ updateApp: typeof SmartDesktopClient.updateApp;
12
+ getAppConfigTemplate: typeof SmartDesktopClient.getAppConfigTemplate;
13
+ getMenus: typeof SmartDesktopClient.getMenus;
14
+ addMenu: typeof SmartDesktopClient.addMenu;
15
+ updateMenu: typeof SmartDesktopClient.updateMenu;
16
+ getPreloads: typeof SmartDesktopClient.getPreloads;
17
+ isInboundInteropAuthorized: typeof SmartDesktopClient.isInboundInteropAuthorized;
18
+ isOutboundInteropAuthorized: typeof SmartDesktopClient.isOutboundInteropAuthorized;
18
19
  };
19
20
  export declare const Applications: (props: ApplicationsProps) => JSX.Element;
@@ -16,6 +16,7 @@ import { generateDefaultConfig } from "./sdd_helpers";
16
16
  import { launchTutorialLink } from "./common/fsbl_functions";
17
17
  import { validateFilename, VALID_APP_EXTENSIONS } from "../common/file_helpers";
18
18
  import { AddApp } from "./AddApp";
19
+ import { SmartDesktopClient } from "./smartDesktopClient";
19
20
  const EMPTY_MENU_ERROR = {
20
21
  viewId: "applications",
21
22
  message: "One or more of your app menus is empty",
@@ -113,7 +114,7 @@ export const Applications = (props) => {
113
114
  });
114
115
  });
115
116
  };
116
- const addAppByPath = (path, displayName) => {
117
+ const addAppByPath = (path, displayName, apiAccess) => {
117
118
  const appId = String(new Date().getTime());
118
119
  setEditMode(false);
119
120
  props.getAppConfigTemplate().then((response) => {
@@ -123,7 +124,7 @@ export const Applications = (props) => {
123
124
  config.appId = appId;
124
125
  config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
125
126
  config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
126
- config.manifest.window.windowType = "assimilation";
127
+ config.manifest.window.windowType = apiAccess ? "native" : "assimilation";
127
128
  config.manifest.window.path = path;
128
129
  delete config.manifest.window.url;
129
130
  props.addApp(appId, config).then(() => {
@@ -131,6 +132,24 @@ export const Applications = (props) => {
131
132
  });
132
133
  });
133
134
  };
135
+ const addAppCitrix = (aliasName, displayName) => {
136
+ const appId = String(new Date().getTime());
137
+ setEditMode(false);
138
+ props.getAppConfigTemplate().then((response) => {
139
+ var _a, _b;
140
+ const { config } = response;
141
+ config.name = displayName;
142
+ config.appId = appId;
143
+ config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
144
+ config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
145
+ config.manifest.window.alias = aliasName;
146
+ config.manifest.window.windowType = "Citrix";
147
+ delete config.manifest.window.url;
148
+ props.addApp(appId, config).then(() => {
149
+ updateAppList();
150
+ });
151
+ });
152
+ };
134
153
  const onClose = (reason) => {
135
154
  if (reason === ApplicationCloseReason.NEW) {
136
155
  dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
@@ -160,7 +179,7 @@ export const Applications = (props) => {
160
179
  const dropZoneProps = {
161
180
  items: apps.filter((app) => { var _a; return !((_a = app === null || app === void 0 ? void 0 : app.manifest) === null || _a === void 0 ? void 0 : _a.temporary); }),
162
181
  clickItem: (appID) => {
163
- FSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, (err, data) => { });
182
+ FSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, () => { });
164
183
  },
165
184
  editItem: (appID) => {
166
185
  setCurrentAppID(appID);
@@ -179,7 +198,7 @@ export const Applications = (props) => {
179
198
  React.createElement("div", { "data-label": "Apps" },
180
199
  React.createElement("div", { className: "frontmatter" }, "Click Add or drag your apps into the list."),
181
200
  React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: addApp }),
182
- React.createElement(AddApp, { show: editMode, checkValidURL: FSBL.Clients.SmartDesktopClient.checkValidURL, addAppByUrl: addAppByUrl, addAppByPath: addAppByPath, close: addApp }),
201
+ React.createElement(AddApp, { show: editMode, checkValidURL: SmartDesktopClient.checkValidURL, addAppByUrl: addAppByUrl, addAppByPath: addAppByPath, addAppCitrix: addAppCitrix, close: addApp }),
183
202
  React.createElement(DropZone, { processFile: addDroppedApp },
184
203
  React.createElement(ItemList, Object.assign({}, dropZoneProps)))))))));
185
204
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/sdd/Applications.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAk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,MAAM,GACZ;gBAEF,oBAAC,QAAQ,IAAC,WAAW,EAAE,aAAa;oBACnC,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CACrB,CACN,CAEG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\n// import { Tab } from \"../common/Tab\";\nimport { Header } from \"../common/Header\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { Application, ApplicationCloseReason } from \"./Application\";\nimport { ItemList, ItemListProps } from \"./ItemList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { MenuType, PreloadType, ProjectError, PreloadMap } from \"../../types/smartDesktopDesignerTypes\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\nimport { ApplicationProps } from \"./Application\";\nimport { services } from \"@finsemble/finsemble-api/\";\nimport { AddApp } from \"./AddApp\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nexport type ApplicationsProps = {\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\n\tgetPreloads: typeof FSBL.Clients.SmartDesktopClient.prototype.getPreloads;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"applications\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Applications = (props: ApplicationsProps) => {\n\tconst dispatch = useDispatch();\n\tconst [editMode, setEditMode] = useState(false);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\tconst preloads = useSelector<PreloadMap>((state: RootState) => state.smartDesktopDesigner.preloads);\n\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\n\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 0)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateAppList() {\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t});\n\t}\n\n\tconst updatePreloadList = async () => {\n\t\tconst { data } = await props.getPreloads();\n\t\tdispatch(SmartDesktopDesignerActions.update_preloads(data));\n\t};\n\n\tfunction setCurrentAppID(id: string | null) {\n\t\tif (id === null) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\n\t\t}\n\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\n\t\tupdateAppList();\n\t}\n\n\tconst removeAppID = (id: string) => {\n\t\t// Delete app from list of apps\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateAppList();\n\n\t\t\t// Remove reference to app from all menus\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\n\t\t\t\t\t\tupdateAppList();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateAppList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(() => {\n\t\tupdateAppList();\n\t\tupdatePreloadList();\n\t}, []);\n\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\n\t\tconst appId = String(new Date().getTime() + index);\n\t\tconst { path } = file;\n\n\t\t// Confirm that the file is an executable\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate defaults and then add app with those defaults\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tconst { config }: { config: AppDefinition } = response;\n\t\t\t// Get generated displayName\n\t\t\tconst { displayName } = generateDefaultConfig({\n\t\t\t\t...config,\n\t\t\t\tpath,\n\t\t\t});\n\t\t\tconfig.name = displayName;\n\n\t\t\t// We generated appId above\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst addAppByUrl = (url: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tdelete config.manifest.window.windowType;\n\t\t\tdelete config.manifest.window.path;\n\t\t\tconfig.manifest.window.url = url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\tconst addAppByPath = (path: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst onClose = (reason: ApplicationCloseReason) => {\n\t\tif (reason === ApplicationCloseReason.NEW) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\n\t\t\tsetCurrentAppID(null);\n\t\t} else {\n\t\t\tsetCurrentAppID(null);\n\t\t}\n\t};\n\n\tconst applicationProps: ApplicationProps = {\n\t\tid: currentAppID ?? \"\",\n\t\tapps,\n\t\taddApp: props.addApp,\n\t\tdeleteApp: props.deleteApp,\n\t\tupdateApp: props.updateApp,\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\n\t\tsetCurrentAppID,\n\t\tonClose,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t\tpreloads,\n\t};\n\n\tconst dropZoneProps: ItemListProps = {\n\t\titems: apps.filter((app) => !app?.manifest?.temporary),\n\t\tclickItem: (appID: string) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, (err, data) => {});\n\t\t},\n\t\teditItem: (appID: string) => {\n\t\t\tsetCurrentAppID(appID);\n\t\t},\n\t\tdeleteItem: removeAppID,\n\t};\n\n\tconst helpFunction = () => {\n\t\tlaunchTutorialLink(\"SDD-02-ManageApps\");\n\t};\n\n\tconst addApp = () => {\n\t\tsetEditMode(!editMode);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentAppID ? (\n\t\t\t\t<Application {...applicationProps} />\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header helpFunction={helpFunction}>Manage apps</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{/* <Tab> */}\n\t\t\t\t\t\t<div data-label=\"Apps\">\n\t\t\t\t\t\t\t<div className=\"frontmatter\">Click Add or drag your apps into the list.</div>\n\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\n\n\t\t\t\t\t\t\t<AddApp\n\t\t\t\t\t\t\t\tshow={editMode}\n\t\t\t\t\t\t\t\tcheckValidURL={FSBL.Clients.SmartDesktopClient.checkValidURL}\n\t\t\t\t\t\t\t\taddAppByUrl={addAppByUrl}\n\t\t\t\t\t\t\t\taddAppByPath={addAppByPath}\n\t\t\t\t\t\t\t\tclose={addApp}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\n\t\t\t\t\t\t\t\t<ItemList {...dropZoneProps} />\n\t\t\t\t\t\t\t</DropZone>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* </Tab> */}\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/sdd/Applications.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,QAAQ,EAAgB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,w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AC;IACxB,CAAC,CAAC;IAEF,OAAO,CACN,0CACE,YAAY,CAAC,CAAC,CAAC,CACf,oBAAC,WAAW,oBAAK,gBAAgB,EAAI,CACrC,CAAC,CAAC,CAAC,CACH,oBAAC,IAAI;QACJ,oBAAC,MAAM,IAAC,YAAY,EAAE,YAAY,kBAAsB;QACxD,oBAAC,OAAO;YAEP,2CAAgB,MAAM;gBACrB,6BAAK,SAAS,EAAC,aAAa,iDAAiD;gBAC7E,oBAAC,MAAM,IAAC,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,MAAM,GAAI;gBAEtG,oBAAC,MAAM,IACN,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,kBAAkB,CAAC,aAAa,EAC/C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,GACZ;gBAEF,oBAAC,QAAQ,IAAC,WAAW,EAAE,aAAa;oBACnC,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CACrB,CACN,CAEG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { Application, ApplicationCloseReason } from \"./Application\";\nimport { ItemList, ItemListProps } from \"./ItemList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { MenuType, ProjectError, PreloadMap } from \"../../types/smartDesktopDesignerTypes\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\nimport { ApplicationProps } from \"./Application\";\nimport { services } from \"@finsemble/finsemble-api/\";\nimport { AddApp } from \"./AddApp\";\nimport { SmartDesktopClient } from \"./smartDesktopClient\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nexport type ApplicationsProps = {\n\tgetApps: typeof SmartDesktopClient.getApps;\n\taddApp: typeof SmartDesktopClient.addApp;\n\tdeleteApp: typeof SmartDesktopClient.deleteApp;\n\tupdateApp: typeof SmartDesktopClient.updateApp;\n\tgetAppConfigTemplate: typeof SmartDesktopClient.getAppConfigTemplate;\n\tgetMenus: typeof SmartDesktopClient.getMenus;\n\taddMenu: typeof SmartDesktopClient.addMenu;\n\tupdateMenu: typeof SmartDesktopClient.updateMenu;\n\tgetPreloads: typeof SmartDesktopClient.getPreloads;\n\tisInboundInteropAuthorized: typeof SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"applications\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Applications = (props: ApplicationsProps) => {\n\tconst dispatch = useDispatch();\n\tconst [editMode, setEditMode] = useState(false);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\tconst preloads = useSelector<PreloadMap>((state: RootState) => state.smartDesktopDesigner.preloads);\n\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\n\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 0)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateAppList() {\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t});\n\t}\n\n\tconst updatePreloadList = async () => {\n\t\tconst { data } = await props.getPreloads();\n\t\tdispatch(SmartDesktopDesignerActions.update_preloads(data));\n\t};\n\n\tfunction setCurrentAppID(id: string | null) {\n\t\tif (id === null) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\n\t\t}\n\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\n\t\tupdateAppList();\n\t}\n\n\tconst removeAppID = (id: string) => {\n\t\t// Delete app from list of apps\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateAppList();\n\n\t\t\t// Remove reference to app from all menus\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\n\t\t\t\t\t\tupdateAppList();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateAppList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(() => {\n\t\tupdateAppList();\n\t\tupdatePreloadList();\n\t}, []);\n\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\n\t\tconst appId = String(new Date().getTime() + index);\n\t\tconst { path } = file;\n\n\t\t// Confirm that the file is an executable\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate defaults and then add app with those defaults\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tconst { config }: { config: AppDefinition } = response;\n\t\t\t// Get generated displayName\n\t\t\tconst { displayName } = generateDefaultConfig({\n\t\t\t\t...config,\n\t\t\t\tpath,\n\t\t\t});\n\t\t\tconfig.name = displayName;\n\n\t\t\t// We generated appId above\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst addAppByUrl = (url: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tdelete config.manifest.window.windowType;\n\t\t\tdelete config.manifest.window.path;\n\t\t\tconfig.manifest.window.url = url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\tconst addAppByPath = (path: string, displayName: string, apiAccess: boolean) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = apiAccess ? \"native\" : \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst addAppCitrix = (aliasName: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.alias = aliasName;\n\t\t\t// @ts-ignore\n\t\t\tconfig.manifest.window.windowType = \"Citrix\";\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst onClose = (reason: ApplicationCloseReason) => {\n\t\tif (reason === ApplicationCloseReason.NEW) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\n\t\t\tsetCurrentAppID(null);\n\t\t} else {\n\t\t\tsetCurrentAppID(null);\n\t\t}\n\t};\n\n\tconst applicationProps: ApplicationProps = {\n\t\tid: currentAppID ?? \"\",\n\t\tapps,\n\t\taddApp: props.addApp,\n\t\tdeleteApp: props.deleteApp,\n\t\tupdateApp: props.updateApp,\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\n\t\tsetCurrentAppID,\n\t\tonClose,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t\tpreloads,\n\t};\n\n\tconst dropZoneProps: ItemListProps = {\n\t\titems: apps.filter((app) => !app?.manifest?.temporary),\n\t\tclickItem: (appID: string) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, () => {});\n\t\t},\n\t\teditItem: (appID: string) => {\n\t\t\tsetCurrentAppID(appID);\n\t\t},\n\t\tdeleteItem: removeAppID,\n\t};\n\n\tconst helpFunction = () => {\n\t\tlaunchTutorialLink(\"SDD-02-ManageApps\");\n\t};\n\n\tconst addApp = () => {\n\t\tsetEditMode(!editMode);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentAppID ? (\n\t\t\t\t<Application {...applicationProps} />\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header helpFunction={helpFunction}>Manage apps</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{/* <Tab> */}\n\t\t\t\t\t\t<div data-label=\"Apps\">\n\t\t\t\t\t\t\t<div className=\"frontmatter\">Click Add or drag your apps into the list.</div>\n\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\n\n\t\t\t\t\t\t\t<AddApp\n\t\t\t\t\t\t\t\tshow={editMode}\n\t\t\t\t\t\t\t\tcheckValidURL={SmartDesktopClient.checkValidURL}\n\t\t\t\t\t\t\t\taddAppByUrl={addAppByUrl}\n\t\t\t\t\t\t\t\taddAppByPath={addAppByPath}\n\t\t\t\t\t\t\t\taddAppCitrix={addAppCitrix}\n\t\t\t\t\t\t\t\tclose={addApp}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\n\t\t\t\t\t\t\t\t<ItemList {...dropZoneProps} />\n\t\t\t\t\t\t\t</DropZone>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* </Tab> */}\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
@@ -8,7 +8,6 @@ import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerA
8
8
  import { AuthenticationProviderConfig } from "./AuthenticationProviderConfig";
9
9
  import { Content } from "./Content";
10
10
  import { Tooltip } from "../common/Tooltip";
11
- import { Button } from "../common/Button";
12
11
  export const Authentication = (props) => {
13
12
  const dispatch = useDispatch();
14
13
  const authProviders = useSelector((state) => state.smartDesktopDesigner.authentication.providers);
@@ -57,10 +56,6 @@ export const Authentication = (props) => {
57
56
  React.createElement(Tooltip, null, "Choose from the list of OAuth providers to configure Single Sign On (SSO) for your project.")),
58
57
  shownProvider && (React.createElement(AuthenticationProviderConfig, { key: shownProvider.name, value: shownProvider, isAdvancedMode: isAdvancedMode, testAuthenticationProvider: props.testAuthenticationProvider, onChange: (value) => {
59
58
  updateAuthProviders(value);
60
- } })))),
61
- shownProvider && (React.createElement("div", { className: "auth-setup-toggle-mode" },
62
- React.createElement(Button, { className: "auth-setup-toggle-mode-button", fashion: "danger", text: !isAdvancedMode ? "Show advanced" : "Hide advanced", onClick: () => {
63
- setIsAdvancedMode(!isAdvancedMode);
64
- } }))))))));
59
+ } })))))))));
65
60
  };
66
61
  //# sourceMappingURL=Authentication.js.map