@finsemble/finsemble-ui 6.2.1 → 6.3.1-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (749) hide show
  1. package/package.json +27 -22
  2. package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/actions/toolbarActions.d.ts +2 -3
  5. package/react/actions/toolbarActions.js.map +1 -1
  6. package/react/assets/css/button.css +2 -1
  7. package/react/assets/css/notificationsCenter.css +4 -2
  8. package/react/assets/css/userPreferences.css +1 -0
  9. package/react/assets/css/windowTitleBar.css +33 -1
  10. package/react/componentTemplateGenerator.js.map +1 -1
  11. package/react/components/FinsembleProvider.js +1 -1
  12. package/react/components/FinsembleProvider.js.map +1 -1
  13. package/react/components/appCatalog/AppCatalogComponent.js +7 -13
  14. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  15. package/react/components/appCatalog/components/AppList.d.ts +7 -1
  16. package/react/components/appCatalog/components/AppList.js +1 -1
  17. package/react/components/appCatalog/components/AppList.js.map +1 -1
  18. package/react/components/appCatalog/components/AppResults.d.ts +10 -8
  19. package/react/components/appCatalog/components/AppResults.js +1 -1
  20. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  21. package/react/components/appCatalog/components/Carousel.js +1 -1
  22. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  23. package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
  24. package/react/components/appCatalog/components/EmptyResults.js +2 -4
  25. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  26. package/react/components/appCatalog/components/Hero.d.ts +24 -4
  27. package/react/components/appCatalog/components/Hero.js +2 -1
  28. package/react/components/appCatalog/components/Hero.js.map +1 -1
  29. package/react/components/appCatalog/components/Home.d.ts +18 -4
  30. package/react/components/appCatalog/components/Home.js.map +1 -1
  31. package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
  32. package/react/components/appCatalog/components/SearchBar.js +4 -7
  33. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  34. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
  35. package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
  36. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  37. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
  38. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  39. package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
  40. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  41. package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
  42. package/react/components/appCatalog/components/Showcase/Header.js +2 -2
  43. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  44. package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
  45. package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
  46. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  47. package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
  48. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  49. package/react/components/appCatalog/components/Tag.d.ts +6 -4
  50. package/react/components/appCatalog/components/Tag.js.map +1 -1
  51. package/react/components/appCatalog/components/Toast.d.ts +5 -3
  52. package/react/components/appCatalog/components/Toast.js +5 -5
  53. package/react/components/appCatalog/components/Toast.js.map +1 -1
  54. package/react/components/appCatalog/components/helpers.js +2 -1
  55. package/react/components/appCatalog/components/helpers.js.map +1 -1
  56. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
  57. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  58. package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
  59. package/react/components/appCatalog/modules/FDC3.js +39 -48
  60. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  61. package/react/components/appCatalog/stores/appStore.d.ts +9 -2
  62. package/react/components/appCatalog/stores/appStore.js +10 -4
  63. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  64. package/react/components/appCatalog/stores/storeActions.js +96 -98
  65. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  66. package/react/components/common/Button.d.ts +4 -4
  67. package/react/components/common/Button.js +1 -1
  68. package/react/components/common/Button.js.map +1 -1
  69. package/react/components/common/ButtonIcon.js +1 -1
  70. package/react/components/common/ButtonIcon.js.map +1 -1
  71. package/react/components/common/ColorPicker.js +1 -1
  72. package/react/components/common/ColorPicker.js.map +1 -1
  73. package/react/components/common/DropZone.d.ts +0 -5
  74. package/react/components/common/DropZone.js.map +1 -1
  75. package/react/components/common/DropdownButton.js +1 -1
  76. package/react/components/common/DropdownButton.js.map +1 -1
  77. package/react/components/common/FileInput.d.ts +0 -5
  78. package/react/components/common/FileInput.js +7 -9
  79. package/react/components/common/FileInput.js.map +1 -1
  80. package/react/components/common/FinsembleIcon.d.ts +2 -2
  81. package/react/components/common/FinsembleIcon.js.map +1 -1
  82. package/react/components/common/FinsembleSelect.js +2 -5
  83. package/react/components/common/FinsembleSelect.js.map +1 -1
  84. package/react/components/common/FinsembleToggle.js +2 -2
  85. package/react/components/common/FinsembleToggle.js.map +1 -1
  86. package/react/components/common/FontSizeSelector.js +2 -2
  87. package/react/components/common/FontSizeSelector.js.map +1 -1
  88. package/react/components/common/ImagePreview.js +2 -2
  89. package/react/components/common/ImagePreview.js.map +1 -1
  90. package/react/components/common/Tab.js +2 -1
  91. package/react/components/common/Tab.js.map +1 -1
  92. package/react/components/common/file_helpers.js +3 -2
  93. package/react/components/common/file_helpers.js.map +1 -1
  94. package/react/components/common/helpers.js +12 -10
  95. package/react/components/common/helpers.js.map +1 -1
  96. package/react/components/common/stories/Button.stories.js +1 -1
  97. package/react/components/common/stories/Button.stories.js.map +1 -1
  98. package/react/components/common/stories/ButtonIcon.stories.js +1 -1
  99. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  100. package/react/components/common/stories/ButtonRow.stories.js +2 -2
  101. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  102. package/react/components/common/stories/ButtonTile.stories.js +1 -1
  103. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  104. package/react/components/common/stories/Checkbox.stories.js +1 -1
  105. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  106. package/react/components/common/stories/ColorPicker.stories.js +1 -1
  107. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  108. package/react/components/common/stories/DropZone.stories.js +1 -1
  109. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  110. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  111. package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
  112. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  113. package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
  114. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  115. package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
  116. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  117. package/react/components/common/stories/Header.stories.js +1 -1
  118. package/react/components/common/stories/Header.stories.js.map +1 -1
  119. package/react/components/common/tests/Checkbox.spec.js +4 -4
  120. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  121. package/react/components/common/tests/ColorPicker.spec.js +6 -6
  122. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  123. package/react/components/common/tests/DropZone.spec.js +4 -4
  124. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  125. package/react/components/common/tests/FileInput.spec.js +5 -5
  126. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  127. package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
  128. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  129. package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
  130. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  131. package/react/components/common/tests/Header.spec.js +3 -3
  132. package/react/components/common/tests/Header.spec.js.map +1 -1
  133. package/react/components/common/tests/ImagePreview.spec.js +8 -8
  134. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  135. package/react/components/common/tests/Tab.spec.js +3 -3
  136. package/react/components/common/tests/Tab.spec.js.map +1 -1
  137. package/react/components/common/tests/Tooltip.spec.js +5 -5
  138. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  139. package/react/components/favorites/FavoriteMaker.d.ts +0 -5
  140. package/react/components/favorites/FavoriteMaker.js +1 -1
  141. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  142. package/react/components/favorites/FavoritesShell.js +1 -1
  143. package/react/components/favorites/FavoritesShell.js.map +1 -1
  144. package/react/components/favorites/FavoritesShell.spec.js +7 -7
  145. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  146. package/react/components/favorites/FavoritesShell.stories.js +5 -4
  147. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  148. package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
  149. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  150. package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
  151. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  152. package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
  153. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  154. package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
  155. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  156. package/react/components/icon/Icon.js +5 -4
  157. package/react/components/icon/Icon.js.map +1 -1
  158. package/react/components/legacyControls/FinsembleDialog.js +0 -1
  159. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  160. package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
  161. package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
  162. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  163. package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
  164. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  165. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  166. package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
  167. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  168. package/react/components/legacyControls/FinsembleDnDContext.js +34 -22
  169. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  170. package/react/components/legacyControls/FinsembleDraggable.js +3 -3
  171. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  172. package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
  173. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  174. package/react/components/legacyControls/FinsembleMenuSection.js +9 -5
  175. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  176. package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
  177. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  178. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
  179. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  180. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
  181. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  182. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
  183. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  184. package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
  185. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  186. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
  187. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  188. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
  189. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  190. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
  191. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  192. package/react/components/linker/LinkerMenu.js +4 -3
  193. package/react/components/linker/LinkerMenu.js.map +1 -1
  194. package/react/components/linker/LinkerMenuDeprecated.js +1 -1
  195. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  196. package/react/components/linker/remoteRedux.d.ts +10 -42
  197. package/react/components/linker/remoteRedux.js.map +1 -1
  198. package/react/components/menu/Menu.d.ts +1 -1
  199. package/react/components/menu/Menu.js +1 -1
  200. package/react/components/menu/Menu.js.map +1 -1
  201. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  202. package/react/components/menu/MenuContent.js +1 -2
  203. package/react/components/menu/MenuContent.js.map +1 -1
  204. package/react/components/menu/MenuHotKey.js +1 -1
  205. package/react/components/menu/MenuHotKey.js.map +1 -1
  206. package/react/components/menu/MenuPortal.js +7 -6
  207. package/react/components/menu/MenuPortal.js.map +1 -1
  208. package/react/components/menu/keyboardNavigation.js +14 -15
  209. package/react/components/menu/keyboardNavigation.js.map +1 -1
  210. package/react/components/notifications/components/NoNotifications.js +2 -4
  211. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  212. package/react/components/notifications/components/drawer/Drawer.js +2 -4
  213. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  214. package/react/components/notifications/components/drawer/DrawerControls.js +3 -5
  215. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  216. package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
  217. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  218. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +64 -79
  219. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  220. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +15 -13
  221. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  222. package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
  223. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  224. package/react/components/notifications/components/shared/IconButton.js +3 -5
  225. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  226. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
  227. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  228. package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
  229. package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
  230. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  231. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
  232. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +2 -2
  233. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  234. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
  235. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  236. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
  237. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
  238. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  239. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
  240. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  241. package/react/components/notifications/components/views/CardView.js +15 -24
  242. package/react/components/notifications/components/views/CardView.js.map +1 -1
  243. package/react/components/notifications/components/views/ListView.d.ts +2 -2
  244. package/react/components/notifications/components/views/ListView.js +9 -9
  245. package/react/components/notifications/components/views/ListView.js.map +1 -1
  246. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
  247. package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
  248. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  249. package/react/components/notifications/constants.d.ts +0 -13
  250. package/react/components/notifications/constants.js.map +1 -1
  251. package/react/components/notifications/types.d.ts +7 -6
  252. package/react/components/notifications/types.js.map +1 -1
  253. package/react/components/notifications/utils.d.ts +6 -4
  254. package/react/components/notifications/utils.js +26 -32
  255. package/react/components/notifications/utils.js.map +1 -1
  256. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
  257. package/react/components/processMonitor/ProcessMonitor.js +24 -14
  258. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  259. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
  260. package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
  261. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
  262. package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
  263. package/react/components/processMonitor/components/ChildWindow.js +29 -10
  264. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  265. package/react/components/processMonitor/components/ListHeader.d.ts +18 -4
  266. package/react/components/processMonitor/components/ListHeader.js +11 -3
  267. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  268. package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
  269. package/react/components/processMonitor/components/ProcessStatistics.js +35 -18
  270. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  271. package/react/components/processMonitor/constants.d.ts +11 -16
  272. package/react/components/processMonitor/constants.js +6 -1
  273. package/react/components/processMonitor/constants.js.map +1 -1
  274. package/react/components/processMonitor/helpers.d.ts +14 -6
  275. package/react/components/processMonitor/helpers.js +31 -23
  276. package/react/components/processMonitor/helpers.js.map +1 -1
  277. package/react/components/processMonitor/helpers.spec.d.ts +1 -0
  278. package/react/components/processMonitor/helpers.spec.js +44 -0
  279. package/react/components/processMonitor/helpers.spec.js.map +1 -0
  280. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +31 -15
  281. package/react/components/processMonitor/stores/ProcessMonitorStore.js +104 -95
  282. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  283. package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
  284. package/react/components/quickComponentForm/QuickComponentForm.js +14 -15
  285. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  286. package/react/components/search/Highlight.js +2 -2
  287. package/react/components/search/Highlight.js.map +1 -1
  288. package/react/components/search/Highlight.spec.js +3 -3
  289. package/react/components/search/Highlight.spec.js.map +1 -1
  290. package/react/components/search/Highlight.stories.js +1 -1
  291. package/react/components/search/Highlight.stories.js.map +1 -1
  292. package/react/components/search/Search.js +17 -8
  293. package/react/components/search/Search.js.map +1 -1
  294. package/react/components/search/SearchBestMatch.js +3 -5
  295. package/react/components/search/SearchBestMatch.js.map +1 -1
  296. package/react/components/search/SearchProviderResults.js +4 -5
  297. package/react/components/search/SearchProviderResults.js.map +1 -1
  298. package/react/components/search/SearchResult.js +3 -2
  299. package/react/components/search/SearchResult.js.map +1 -1
  300. package/react/components/search/SearchResults.js +1 -1
  301. package/react/components/search/SearchResults.js.map +1 -1
  302. package/react/components/shared/Button.js +2 -4
  303. package/react/components/shared/Button.js.map +1 -1
  304. package/react/components/shared/DefaultDropdownButton.js +58 -13
  305. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  306. package/react/components/shared/NavigationButton.js +9 -11
  307. package/react/components/shared/NavigationButton.js.map +1 -1
  308. package/react/components/shared/Tag.d.ts +11 -1
  309. package/react/components/shared/Tag.js.map +1 -1
  310. package/react/components/shared/TagsMenu.d.ts +26 -6
  311. package/react/components/shared/TagsMenu.js.map +1 -1
  312. package/react/components/shared/linkerUtil.d.ts +3 -1
  313. package/react/components/shared/linkerUtil.js.map +1 -1
  314. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  315. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  316. package/react/components/singleInputDialog/SingleInputDialog.js +0 -2
  317. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  318. package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
  319. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  320. package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
  321. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  322. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
  323. package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
  324. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  325. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
  326. package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
  327. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  328. package/react/components/smartDesktopDesigner/Appearance.js +3 -5
  329. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  330. package/react/components/smartDesktopDesigner/Application.d.ts +7 -5
  331. package/react/components/smartDesktopDesigner/Application.js +78 -92
  332. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  333. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +4 -1
  334. package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
  335. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  336. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
  337. package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
  338. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  339. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
  340. package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
  341. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  342. package/react/components/smartDesktopDesigner/Applications.d.ts +3 -2
  343. package/react/components/smartDesktopDesigner/Applications.js +73 -62
  344. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  345. package/react/components/smartDesktopDesigner/Authentication.js +2 -8
  346. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  347. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
  348. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  349. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
  351. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  352. package/react/components/smartDesktopDesigner/Export.js +3 -3
  353. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
  355. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
  357. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  358. package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
  359. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
  361. package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
  362. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
  364. package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
  365. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/Publish.js +1 -1
  367. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  369. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +18 -31
  370. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  371. package/react/components/smartDesktopDesigner/Themes.js +2 -8
  372. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  373. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -2
  375. package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -2
  376. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  377. package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
  378. package/react/components/smartDesktopDesigner/common/views.js +8 -18
  379. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  380. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +16 -24
  381. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  382. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +8 -9
  383. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  384. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
  385. package/react/components/smartDesktopDesigner/fixtures/apps.js +20 -31
  386. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  387. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js +6 -9
  388. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  389. package/react/components/smartDesktopDesigner/fixtures/exportProps.js +5 -5
  390. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
  392. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  393. package/react/components/smartDesktopDesigner/fixtures/themeProps.d.ts +5 -5
  394. package/react/components/smartDesktopDesigner/fixtures/themeProps.js +6 -7
  395. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  396. package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
  397. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  398. package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
  399. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  400. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
  401. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +14 -20
  402. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  403. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
  404. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  405. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
  406. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  407. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
  408. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
  410. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
  412. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  413. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +18 -36
  414. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  415. package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
  416. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  417. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
  418. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  419. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
  420. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  421. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
  422. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
  423. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  424. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
  425. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  426. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
  427. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  428. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
  429. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
  430. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  431. package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
  432. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  433. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
  434. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  435. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
  436. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  437. package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
  438. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
  440. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
  442. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
  444. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  445. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
  446. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  447. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
  448. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  449. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
  450. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  451. package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
  452. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  453. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
  454. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  455. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
  456. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  457. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
  458. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  459. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
  460. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  461. package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
  462. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  463. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
  464. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  465. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
  466. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  467. package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
  468. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  469. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +4 -5
  470. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  471. package/react/components/system/System.spec.js +1 -1
  472. package/react/components/system/System.spec.js.map +1 -1
  473. package/react/components/system/SystemTrayComponentShell.js +1 -1
  474. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  475. package/react/components/toolbar/MinimizeAll.spec.js +5 -5
  476. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  477. package/react/components/toolbar/NotificationControl.js +3 -2
  478. package/react/components/toolbar/NotificationControl.js.map +1 -1
  479. package/react/components/toolbar/RevealAll.spec.js +5 -5
  480. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  481. package/react/components/toolbar/ToolbarIcon.js +14 -2
  482. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  483. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
  484. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
  485. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  486. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
  487. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  488. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
  489. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +41 -10
  490. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  491. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
  492. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
  493. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  494. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
  495. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
  496. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  497. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
  498. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +7 -5
  499. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  500. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
  501. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -3
  502. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  503. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +30 -13
  504. package/react/components/toolbar/advancedAppLauncher/components/Content.js +35 -37
  505. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  506. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
  507. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
  508. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  509. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
  510. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
  511. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  512. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
  513. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +8 -4
  514. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  515. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
  516. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
  517. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  518. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
  519. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
  520. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  521. package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
  522. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
  523. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  524. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
  525. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
  526. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  527. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
  528. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
  529. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  530. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  531. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
  532. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +19 -30
  533. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  534. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
  535. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
  536. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  537. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +87 -59
  538. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +51 -54
  539. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  540. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
  541. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
  542. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  543. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
  544. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  545. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  546. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  547. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
  548. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +4 -11
  549. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  550. package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
  551. package/react/components/toolbar/appLauncher/components/componentList.js +25 -22
  552. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  553. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
  554. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +43 -65
  555. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  556. package/react/components/toolbar/dashbar/Dashbar.js +143 -125
  557. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  558. package/react/components/toolbar/dashbar/DashbarItem.js +4 -5
  559. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  560. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
  561. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
  562. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  563. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
  564. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  565. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
  566. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
  567. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  568. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
  569. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
  570. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  571. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +66 -11
  572. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +103 -153
  573. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  574. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +0 -4
  575. package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
  576. package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
  577. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
  578. package/react/components/userPreferences/UserPreferencesBase.js +2 -2
  579. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  580. package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
  581. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  582. package/react/components/userPreferences/components/ContentSection.js +1 -1
  583. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  584. package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
  585. package/react/components/userPreferences/components/LeftNav.js +1 -1
  586. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  587. package/react/components/userPreferences/components/content/DashbarEditor.js +4 -4
  588. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  589. package/react/components/userPreferences/components/content/Notifications.js +2 -0
  590. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  591. package/react/components/userPreferences/components/content/Workspaces.d.ts +51 -14
  592. package/react/components/userPreferences/components/content/Workspaces.js +96 -90
  593. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  594. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
  595. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  596. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
  597. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  598. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
  599. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  600. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
  601. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  602. package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
  603. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  604. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
  605. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
  606. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  607. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
  608. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  609. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
  610. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +24 -9
  611. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  612. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
  613. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  614. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
  615. package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -17
  616. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  617. package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
  618. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  619. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
  620. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  621. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  622. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
  623. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  624. package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
  625. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  626. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
  627. package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
  628. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  629. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
  630. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
  631. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  632. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
  633. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  634. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  635. package/react/components/userPreferences/stories/Workspaces.stories.js +2 -2
  636. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  637. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  638. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  639. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  640. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  641. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  642. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  643. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  644. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  645. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  646. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  647. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
  648. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  649. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
  650. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  651. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  652. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  653. package/react/components/utils.js +1 -1
  654. package/react/components/utils.js.map +1 -1
  655. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
  656. package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
  657. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  658. package/react/components/windowTitleBar/components/center/Tab.d.ts +28 -7
  659. package/react/components/windowTitleBar/components/center/Tab.js +11 -4
  660. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  661. package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
  662. package/react/components/windowTitleBar/components/center/TabList.js +179 -66
  663. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  664. package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
  665. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  666. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
  667. package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
  668. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  669. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +2 -1
  670. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  671. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
  672. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
  673. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  674. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
  675. package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
  676. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  677. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +16 -26
  678. package/react/components/windowTitleBar/components/right/MaximizeButton.js +7 -9
  679. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  680. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
  681. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  682. package/react/components/windowTitleBar/components/windowTitle.d.ts +2 -1
  683. package/react/components/windowTitleBar/components/windowTitle.js +22 -10
  684. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  685. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +56 -44
  686. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +96 -64
  687. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  688. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
  689. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  690. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
  691. package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
  692. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  693. package/react/components/yesNoDialog/Timer.spec.js +2 -2
  694. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  695. package/react/components/yesNoDialog/Timer.stories.js +1 -1
  696. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  697. package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
  698. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  699. package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
  700. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  701. package/react/hooks/useFavoritesShell.js +1 -3
  702. package/react/hooks/useFavoritesShell.js.map +1 -1
  703. package/react/hooks/useLinker.js +4 -4
  704. package/react/hooks/useLinker.js.map +1 -1
  705. package/react/hooks/useMenu.js +2 -2
  706. package/react/hooks/useMenu.js.map +1 -1
  707. package/react/hooks/useNotifications.d.ts +8 -8
  708. package/react/hooks/useNotifications.js +30 -30
  709. package/react/hooks/useNotifications.js.map +1 -1
  710. package/react/hooks/usePubSub.js +3 -5
  711. package/react/hooks/usePubSub.js.map +1 -1
  712. package/react/hooks/useSearch.js +1 -1
  713. package/react/hooks/useSearch.js.map +1 -1
  714. package/react/hooks/useToolbar.js +16 -35
  715. package/react/hooks/useToolbar.js.map +1 -1
  716. package/react/hooks/useWorkspace.js +1 -1
  717. package/react/hooks/useWorkspace.js.map +1 -1
  718. package/react/reducers/favoriteReducer.js +1 -1
  719. package/react/reducers/favoriteReducer.js.map +1 -1
  720. package/react/reducers/linkerReducer.js.map +1 -1
  721. package/react/reducers/rootReducer.d.ts +3 -4
  722. package/react/reducers/toolbarReducer.js +1 -1
  723. package/react/reducers/toolbarReducer.js.map +1 -1
  724. package/react/store.d.ts +6 -7
  725. package/react/store.js.map +1 -1
  726. package/react/types/advancedAppLauncherTypes.d.ts +28 -1
  727. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  728. package/react/types/favoriteTypes.d.ts +1 -1
  729. package/react/types/favoriteTypes.js.map +1 -1
  730. package/react/types/fdc3.d.ts +22 -0
  731. package/react/types/fdc3.js.map +1 -1
  732. package/react/types/searchTypes.d.ts +3 -0
  733. package/react/types/searchTypes.js.map +1 -1
  734. package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
  735. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  736. package/react/types/windowTitleBar.d.ts +47 -0
  737. package/react/types/windowTitleBar.js +2 -0
  738. package/react/types/windowTitleBar.js.map +1 -0
  739. package/react/types/workspaceTypes.d.ts +19 -0
  740. package/react/types/workspaceTypes.js.map +1 -1
  741. package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
  742. package/react/components/processMonitor/components/ChildWindows.js +0 -11
  743. package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
  744. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.d.ts +0 -2
  745. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +0 -88
  746. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +0 -1
  747. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
  748. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
  749. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
@@ -19,35 +19,38 @@ export const ApplicationList = ({ apps, clickApp, deleteApp }) => (React.createE
19
19
  }
20
20
  return 0;
21
21
  })
22
- .map((data) => {
23
- const appID = data.appId;
22
+ .map((appDEntry) => {
23
+ var _a, _b;
24
+ const appID = appDEntry.appId;
24
25
  const openAppEventHandler = (e) => {
25
26
  clickApp(appID);
26
27
  e.preventDefault();
27
28
  };
28
29
  const deleteAppEventHandler = (e) => {
29
30
  e.stopPropagation();
30
- deleteApp(data.component?.displayName || appID);
31
+ deleteApp(appID);
31
32
  };
32
- return (React.createElement("div", { key: appID, id: `app-list-row-${appID}`, className: "app-list-row", role: "listitem", tabIndex: 0, onClick: openAppEventHandler, onKeyDown: (e) => {
33
- switch (e.key) {
34
- case "Enter": {
35
- }
36
- case " ": {
37
- openAppEventHandler(e);
38
- break;
39
- }
40
- case "Delete": {
41
- deleteAppEventHandler(e);
42
- break;
43
- }
44
- default: {
45
- }
33
+ const keyDownHandler = (e) => {
34
+ switch (e.key) {
35
+ case "Enter": {
46
36
  }
47
- } },
48
- React.createElement("span", { className: "app-name" }, data.component?.displayName || data.appName || data.name || appID),
37
+ case " ": {
38
+ openAppEventHandler(e);
39
+ break;
40
+ }
41
+ case "Delete": {
42
+ deleteAppEventHandler(e);
43
+ break;
44
+ }
45
+ default: {
46
+ }
47
+ }
48
+ };
49
+ const displayName = ((_b = (_a = appDEntry.manifest) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.displayName) || appDEntry.name || appID;
50
+ return (React.createElement("div", { key: appID, id: `app-list-row-${appID}`, className: "app-list-row", role: "listitem", tabIndex: 0, onClick: openAppEventHandler, onKeyDown: keyDownHandler },
51
+ React.createElement("span", { className: "app-name" }, displayName),
49
52
  React.createElement("div", { className: "icon-bar" },
50
- data.icon ? (React.createElement(Tooltip, { altClassName: "icon-warning", position: "left" }, "This app group is empty.")) : (""),
53
+ appDEntry.icons ? (React.createElement(Tooltip, { altClassName: "icon-warning", position: "left" }, "This app group is empty.")) : (""),
51
54
  React.createElement(ButtonIcon, { tabIndex: -1, className: "icon-delete", icon: "trash", text: "Delete", onClick: deleteAppEventHandler }))));
52
55
  })))));
53
56
  //# sourceMappingURL=ApplicationList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAoB5C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,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C,CAAC;oBACT,mBAAmB,CAAC,CAAC,CAAC,CAAC;oBACvB,MAAM;iBACN;gBACD,KAAK,QAAQ,CAAC,CAAC;oBACd,qBAAqB,CAAC,CAAC,CAAC,CAAC;oBACzB,MAAM;iBACN;gBACD,OAAO,CAAC,CAAC;iBACR;aACD;QACF,CAAC;QAED,8BAAM,SAAS,EAAC,UAAU,IAAE,IAAI,CAAC,SAAS,EAAE,WAAW,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAQ;QACrG,6BAAK,SAAS,EAAC,UAAU;YACvB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACZ,oBAAC,OAAO,IAAC,YAAY,EAAC,cAAc,EAAC,QAAQ,EAAC,MAAM,+BAE1C,CACV,CAAC,CAAC,CAAC,CACH,EAAE,CACF;YACD,oBAAC,UAAU,IACV,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,qBAAqB,GAC7B,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC,CACE,CACN,CACC,CACH,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React from \"react\";\r\nimport { ButtonIcon } from \"../common/ButtonIcon\";\r\nimport \"../common/css/application-list.css\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\n\r\nexport type ApplicationListProps = {\r\n\tapps: AppDConfig[];\r\n\tclickApp: (s: string) => void;\r\n\tdeleteApp: (s: string) => void;\r\n};\r\n\r\n/*\r\napps = [\r\n\t{\r\n\t\tappId: string\r\n\t\tcomponent: {\r\n\t\t\tdisplayName: string\r\n\t\t},\r\n\t\ticon?: string\r\n\t}, ...\r\n]\r\n*/\r\n\r\nexport const ApplicationList = ({ apps, clickApp, deleteApp }: ApplicationListProps) => (\r\n\t<>\r\n\t\t{apps.length < 1 ? (\r\n\t\t\t<div className=\"app-list-empty\">\r\n\t\t\t\tThere’s nothing here!\r\n\t\t\t\t<br />\r\n\t\t\t\tClick the Add button to add apps.\r\n\t\t\t</div>\r\n\t\t) : (\r\n\t\t\t<div className=\"app-list-table\" role=\"list\">\r\n\t\t\t\t{apps\r\n\t\t\t\t\t.sort((a, b) => {\r\n\t\t\t\t\t\tif (a.name > b.name) {\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.map((data: AppDConfig) => {\r\n\t\t\t\t\t\tconst appID = data.appId;\r\n\r\n\t\t\t\t\t\tconst openAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\tclickApp(appID);\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst deleteAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tdeleteApp(data.component?.displayName || appID);\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={appID}\r\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\r\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\r\n\t\t\t\t\t\t\t\trole=\"listitem\"\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonClick={openAppEventHandler}\r\n\t\t\t\t\t\t\t\tonKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\t\t\t\t\t\tswitch (e.key) {\r\n\t\t\t\t\t\t\t\t\t\tcase \"Enter\": {\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcase \" \": {\r\n\t\t\t\t\t\t\t\t\t\t\topenAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcase \"Delete\": {\r\n\t\t\t\t\t\t\t\t\t\t\tdeleteAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{data.component?.displayName || data.appName || data.name || appID}</span>\r\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\r\n\t\t\t\t\t\t\t\t\t{data.icon ? (\r\n\t\t\t\t\t\t\t\t\t\t<Tooltip altClassName=\"icon-warning\" position=\"left\">\r\n\t\t\t\t\t\t\t\t\t\t\tThis app group is empty.\r\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t<ButtonIcon\r\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\r\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\r\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\r\n\t\t\t\t\t\t\t\t\t\tonClick={deleteAppEventHandler}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t</div>\r\n\t\t)}\r\n\t</>\r\n);\r\n"]}
1
+ {"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAW5C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAAC,CACvF,0CACE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,6BAAK,SAAS,EAAC,gBAAgB;;IAE9B,+BAAM;wCAED,CACN,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB,EAAC,IAAI,EAAC,MAAM,IACzC,IAAI;KACH,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACd,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QAC3B,OAAO,CAAC,CAAC,CAAC;KACV;IAED,OAAO,CAAC,CAAC;AACV,CAAC,CAAC;KACD,GAAG,CAAC,CAAC,SAAwB,EAAE,EAAE;;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;IAE9B,MAAM,mBAAmB,GAAG,CAAC,CAA2D,EAAE,EAAE;QAC3F,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,cAAc,EAAE,CAAC;IACpB,CAAC,CAAC;IACF,MAAM,qBAAqB,GAAG,CAAC,CAA2D,EAAE,EAAE;QAC7F,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,SAAS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rights reserved.\r\n */\r\n\r\nimport React from \"react\";\r\nimport { ButtonIcon } from \"../common/ButtonIcon\";\r\nimport \"../common/css/application-list.css\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type ApplicationListProps = {\r\n\tapps: AppDefinition[];\r\n\tclickApp: (s: string) => void;\r\n\tdeleteApp: (s: string) => void;\r\n};\r\n\r\nexport const ApplicationList = ({ apps, clickApp, deleteApp }: ApplicationListProps) => (\r\n\t<>\r\n\t\t{apps.length < 1 ? (\r\n\t\t\t<div className=\"app-list-empty\">\r\n\t\t\t\tThere’s nothing here!\r\n\t\t\t\t<br />\r\n\t\t\t\tClick the Add button to add apps.\r\n\t\t\t</div>\r\n\t\t) : (\r\n\t\t\t<div className=\"app-list-table\" role=\"list\">\r\n\t\t\t\t{apps\r\n\t\t\t\t\t.sort((a, b) => {\r\n\t\t\t\t\t\tif (a.name > b.name) {\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.map((appDEntry: AppDefinition) => {\r\n\t\t\t\t\t\tconst appID = appDEntry.appId;\r\n\r\n\t\t\t\t\t\tconst openAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\tclickApp(appID);\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst deleteAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tdeleteApp(appID);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\t\t\t\tswitch (e.key) {\r\n\t\t\t\t\t\t\t\tcase \"Enter\": {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \" \": {\r\n\t\t\t\t\t\t\t\t\topenAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \"Delete\": {\r\n\t\t\t\t\t\t\t\t\tdeleteAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tconst displayName = appDEntry.manifest?.component?.displayName || appDEntry.name || appID;\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={appID}\r\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\r\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\r\n\t\t\t\t\t\t\t\trole=\"listitem\"\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonClick={openAppEventHandler}\r\n\t\t\t\t\t\t\t\tonKeyDown={keyDownHandler}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{displayName}</span>\r\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\r\n\t\t\t\t\t\t\t\t\t{appDEntry.icons ? (\r\n\t\t\t\t\t\t\t\t\t\t<Tooltip altClassName=\"icon-warning\" position=\"left\">\r\n\t\t\t\t\t\t\t\t\t\t\tThis app group is empty.\r\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t<ButtonIcon\r\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\r\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\r\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\r\n\t\t\t\t\t\t\t\t\t\tonClick={deleteAppEventHandler}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t</div>\r\n\t\t)}\r\n\t</>\r\n);\r\n"]}
@@ -2,10 +2,10 @@
2
2
  * Copyright 2017 - 2020 by ChartIQ, Inc.
3
3
  * All rights reserved.
4
4
  */
5
- /// <reference types="finsemble-core" />
6
5
  /// <reference types="react" />
7
6
  import { ApplicationSaveData } from "../../types/smartDesktopDesignerTypes";
8
- import { AppDefinition } from "services/Interop/types";
7
+ import { services } from "@finsemble/finsemble-core";
8
+ declare type AppDefinition = services.Interop.types.AppDefinition;
9
9
  export declare type ApplicationSetupProps = {
10
10
  id: string;
11
11
  setCurrentComponentID: (id: string | null) => void;
@@ -15,8 +15,9 @@ export declare type ApplicationSetupProps = {
15
15
  backFunction: () => void;
16
16
  apps: AppDefinition[];
17
17
  data: ApplicationSaveData;
18
+ addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
18
19
  isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
19
20
  isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
20
- updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
21
21
  };
22
22
  export declare const ApplicationSetup: (props: ApplicationSetupProps) => JSX.Element;
23
+ export {};
@@ -31,6 +31,7 @@ export const ApplicationSetup = (props) => {
31
31
  return props.onClickBackButton();
32
32
  }
33
33
  };
34
+ const applicationEditProps = Object.assign(Object.assign({}, props), { isSetupWizard: true, isEditMode: false, onSaveData: props.onSaveData, apps: props.apps, data: Object.assign(Object.assign({}, props.data), { url: currentAppType === "web" ? currentAppPath : "", path: currentAppType === "native" ? currentAppPath : "" }), onClickBackButton });
34
35
  return (React.createElement("div", { className: "app-edit" },
35
36
  React.createElement(View, null,
36
37
  React.createElement(Header, { helpFunction: () => {
@@ -40,14 +41,14 @@ export const ApplicationSetup = (props) => {
40
41
  React.createElement("h2", { className: "setup-type-heading" }, "Is your app web or native?"),
41
42
  React.createElement("div", { className: `tile-type-buttons active-${currentAppType}` },
42
43
  React.createElement(ButtonTile, { className: "icon-web", icon: "globe", text: "Web app", onClick: () => {
43
- setCurrentAppType?.("web");
44
- setCurrentAppPath?.(props.data.url || "");
45
- setSavedAppPath?.(false);
44
+ setCurrentAppType === null || setCurrentAppType === void 0 ? void 0 : setCurrentAppType("web");
45
+ setCurrentAppPath === null || setCurrentAppPath === void 0 ? void 0 : setCurrentAppPath(props.data.url || "");
46
+ setSavedAppPath === null || setSavedAppPath === void 0 ? void 0 : setSavedAppPath(false);
46
47
  } }),
47
48
  React.createElement(ButtonTile, { className: "icon-native", icon: "hdd", text: "Native app", onClick: () => {
48
- setCurrentAppType?.("native");
49
- setCurrentAppPath?.(props.data.path || "");
50
- setSavedAppPath?.(false);
49
+ setCurrentAppType === null || setCurrentAppType === void 0 ? void 0 : setCurrentAppType("native");
50
+ setCurrentAppPath === null || setCurrentAppPath === void 0 ? void 0 : setCurrentAppPath(props.data.path || "");
51
+ setSavedAppPath === null || setSavedAppPath === void 0 ? void 0 : setSavedAppPath(false);
51
52
  } })),
52
53
  currentAppType && !savedAppPath && (React.createElement(React.Fragment, null,
53
54
  React.createElement("div", { className: "app-setup-url-field" },
@@ -67,19 +68,6 @@ export const ApplicationSetup = (props) => {
67
68
  React.createElement(Button, { fashion: "secondary", text: "Next", disabled: disableNext, onClick: () => {
68
69
  setSavedAppPath(true);
69
70
  } }))))))) : (React.createElement(React.Fragment, null,
70
- React.createElement(ApplicationEdit, { ...{
71
- ...props,
72
- isNew: true,
73
- isSetupWizard: true,
74
- isEditMode: false,
75
- onSaveData: props.onSaveData,
76
- apps: props.apps,
77
- data: {
78
- ...props.data,
79
- url: currentAppType === "web" ? currentAppPath : "",
80
- path: currentAppType === "native" ? currentAppPath : "",
81
- },
82
- onClickBackButton,
83
- } })))))));
71
+ React.createElement(ApplicationEdit, Object.assign({}, applicationEditProps))))))));
84
72
  };
85
73
  //# sourceMappingURL=ApplicationSetup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationSetup.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationSetup.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAiBhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAChE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EA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!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { ApplicationEdit } from \"./ApplicationEdit\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { ButtonTile } from \"../common/ButtonTile\";\r\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { AppDefinition } from \"services/Interop/types\";\r\n\r\nexport type ApplicationSetupProps = {\r\n\tid: string;\r\n\tsetCurrentComponentID: (id: string | null) => void;\r\n\tonClickBackButton?: () => void;\r\n\tremoveAppID: (id: string) => void;\r\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\r\n\tbackFunction: () => void;\r\n\tapps: AppDefinition[];\r\n\tdata: ApplicationSaveData;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\r\n};\r\n\r\nexport const ApplicationSetup = (props: ApplicationSetupProps) => {\r\n\tconst [currentAppType, setCurrentAppType] = useState(\"\");\r\n\tconst [currentAppPath, setCurrentAppPath] = useState(\"\");\r\n\tconst [savedAppPath, setSavedAppPath] = useState(false);\r\n\tconst [isAppPathValid, setIsAppPathValid] = useState(true);\r\n\r\n\tconst invalidWeb = currentAppType === \"web\" && (!isAppPathValid || currentAppPath.length === 0);\r\n\tconst invalidNative =\r\n\t\tcurrentAppType === \"native\" && (currentAppPath === \"\" || validateFilename(VALID_APP_EXTENSIONS, currentAppPath));\r\n\tconst disableNext = invalidWeb || invalidNative;\r\n\r\n\tuseEffect(() => {\r\n\t\tsetIsAppPathValid(FSBL.Clients.SmartDesktopClient.checkValidURL(currentAppPath));\r\n\t}, [currentAppPath]);\r\n\r\n\tconst onClickBackButton = () => {\r\n\t\t// setSavedAppCompatibility(false);\r\n\t\tif (savedAppPath) {\r\n\t\t\tsetSavedAppPath(false);\r\n\t\t} else if (typeof props.onClickBackButton === \"function\") {\r\n\t\t\t// we're a child of of Application\r\n\t\t\treturn props.onClickBackButton();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-edit\">\r\n\t\t\t<View>\r\n\t\t\t\t<Header\r\n\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\tlaunchTutorialLink(\"adding-applications\");\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tbackFunction={onClickBackButton}\r\n\t\t\t\t>\r\n\t\t\t\t\tAdd an app\r\n\t\t\t\t</Header>\r\n\r\n\t\t\t\t<Content>\r\n\t\t\t\t\t{!savedAppPath ? (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Is your app web or native?</h2>\r\n\r\n\t\t\t\t\t\t\t<div className={`tile-type-buttons active-${currentAppType}`}>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-web\"\r\n\t\t\t\t\t\t\t\t\ticon=\"globe\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Web app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"web\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.url || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-native\"\r\n\t\t\t\t\t\t\t\t\ticon=\"hdd\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Native app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"native\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.path || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t{currentAppType && !savedAppPath && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-setup-url-field\">\r\n\t\t\t\t\t\t\t\t\t\t<label htmlFor=\"app-url\">\r\n\t\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Enter the full URL of the application</>\r\n\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Choose your application</>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-url-container\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-invalid={!isAppPathValid}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-errormessage=\"app-url-error-message\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.target.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.currentTarget.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{!isAppPathValid ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"app-url-error-message\" className=\"invalid-message\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tURL must be valid (e.g., https://cosaic.io/). Only http and https prototcols are supported.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t\t\t\t<div></div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Next\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disableNext}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSavedAppPath(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<ApplicationEdit\r\n\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t...props,\r\n\t\t\t\t\t\t\t\t\tisNew: true,\r\n\t\t\t\t\t\t\t\t\tisSetupWizard: true,\r\n\t\t\t\t\t\t\t\t\tisEditMode: false,\r\n\t\t\t\t\t\t\t\t\tonSaveData: props.onSaveData,\r\n\t\t\t\t\t\t\t\t\tapps: props.apps,\r\n\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t...props.data,\r\n\t\t\t\t\t\t\t\t\t\turl: currentAppType === \"web\" ? currentAppPath : \"\",\r\n\t\t\t\t\t\t\t\t\t\tpath: currentAppType === \"native\" ? currentAppPath : \"\",\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tonClickBackButton,\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></ApplicationEdit>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</Content>\r\n\t\t\t</View>\r\n\t\t</div>\r\n\t);\r\n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B,EACzC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;oCACf,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gCACnC,CAAC,EACD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oCACd,iBAAiB,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gCAC1C,CAAC,GACA;4BACD,CAAC,cAAc,CAAC,CAAC,CAAC,CAClB,6BAAK,EAAE,EAAC,uBAAuB,EAAC,SAAS,EAAC,iBAAiB,kGAErD,CACN,CAAC,CAAC,CAAC,CACH,EAAE,CACF,CACI,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,SAAS,IACT,WAAW,EAAE,oBAAoB,EACjC,YAAY,EAAE,KAAK,EACnB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;gCAC7B,iBAAiB,CAAC,KAAK,CAAC,CAAC;4BAC1B,CAAC,GACW,CACb,CACI;oBAEN,6BAAK,SAAS,EAAC,kBAAkB;wBAChC,gCAAW;wBAEX;4BACC,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,GAAG,EAAE;oCACb,eAAe,CAAC,IAAI,CAAC,CAAC;gCACvB,CAAC,GACA,CACG,CACD,CACJ,CACH,CACC,CACH,CAAC,CAAC,CAAC,CACH;gBACC,oBAAC,eAAe,oBAAK,oBAAoB,EAAoB,CAC3D,CACH,CACQ,CACJ,CACF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { ApplicationEdit } from \"./ApplicationEdit\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { ButtonTile } from \"../common/ButtonTile\";\r\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { ApplicationEditProps } from \"./ApplicationEdit\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type ApplicationSetupProps = {\r\n\tid: string;\r\n\tsetCurrentComponentID: (id: string | null) => void;\r\n\tonClickBackButton?: () => void;\r\n\tremoveAppID: (id: string) => void;\r\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\r\n\tbackFunction: () => void;\r\n\tapps: AppDefinition[];\r\n\tdata: ApplicationSaveData;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const ApplicationSetup = (props: ApplicationSetupProps) => {\r\n\tconst [currentAppType, setCurrentAppType] = useState(\"\");\r\n\tconst [currentAppPath, setCurrentAppPath] = useState(\"\");\r\n\tconst [savedAppPath, setSavedAppPath] = useState(false);\r\n\tconst [isAppPathValid, setIsAppPathValid] = useState(true);\r\n\r\n\tconst invalidWeb = currentAppType === \"web\" && (!isAppPathValid || currentAppPath.length === 0);\r\n\tconst invalidNative =\r\n\t\tcurrentAppType === \"native\" && (currentAppPath === \"\" || validateFilename(VALID_APP_EXTENSIONS, currentAppPath));\r\n\tconst disableNext = invalidWeb || invalidNative;\r\n\r\n\tuseEffect(() => {\r\n\t\tsetIsAppPathValid(FSBL.Clients.SmartDesktopClient.checkValidURL(currentAppPath));\r\n\t}, [currentAppPath]);\r\n\r\n\tconst onClickBackButton = () => {\r\n\t\t// setSavedAppCompatibility(false);\r\n\t\tif (savedAppPath) {\r\n\t\t\tsetSavedAppPath(false);\r\n\t\t} else if (typeof props.onClickBackButton === \"function\") {\r\n\t\t\t// we're a child of of Application\r\n\t\t\treturn props.onClickBackButton();\r\n\t\t}\r\n\t};\r\n\r\n\tconst applicationEditProps: ApplicationEditProps = {\r\n\t\t...props,\r\n\t\tisSetupWizard: true,\r\n\t\tisEditMode: false,\r\n\t\tonSaveData: props.onSaveData,\r\n\t\tapps: props.apps,\r\n\t\tdata: {\r\n\t\t\t...props.data,\r\n\t\t\turl: currentAppType === \"web\" ? currentAppPath : \"\",\r\n\t\t\tpath: currentAppType === \"native\" ? currentAppPath : \"\",\r\n\t\t},\r\n\t\tonClickBackButton,\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-edit\">\r\n\t\t\t<View>\r\n\t\t\t\t<Header\r\n\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\tlaunchTutorialLink(\"adding-applications\");\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tbackFunction={onClickBackButton}\r\n\t\t\t\t>\r\n\t\t\t\t\tAdd an app\r\n\t\t\t\t</Header>\r\n\r\n\t\t\t\t<Content>\r\n\t\t\t\t\t{!savedAppPath ? (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Is your app web or native?</h2>\r\n\r\n\t\t\t\t\t\t\t<div className={`tile-type-buttons active-${currentAppType}`}>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-web\"\r\n\t\t\t\t\t\t\t\t\ticon=\"globe\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Web app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"web\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.url || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ButtonTile\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-native\"\r\n\t\t\t\t\t\t\t\t\ticon=\"hdd\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Native app\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppType?.(\"native\");\r\n\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath?.(props.data.path || \"\");\r\n\t\t\t\t\t\t\t\t\t\tsetSavedAppPath?.(false);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t{currentAppType && !savedAppPath && (\r\n\t\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-setup-url-field\">\r\n\t\t\t\t\t\t\t\t\t\t<label htmlFor=\"app-url\">\r\n\t\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Enter the full URL of the application</>\r\n\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<>Choose your application</>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-url-container\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-invalid={!isAppPathValid}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-errormessage=\"app-url-error-message\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.target.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonKeyUp={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(e.currentTarget.value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{!isAppPathValid ? (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"app-url-error-message\" className=\"invalid-message\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tURL must be valid (e.g., https://cosaic.io/). Only http and https prototcols are supported.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={currentAppPath}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppPath(value);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t\t\t\t<div></div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Next\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disableNext}\r\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSavedAppPath(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<ApplicationEdit {...applicationEditProps}></ApplicationEdit>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</Content>\r\n\t\t\t</View>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -6,13 +6,14 @@
6
6
  export declare type ApplicationsProps = {
7
7
  getApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;
8
8
  addApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;
9
- updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
10
9
  deleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;
11
10
  getAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;
12
11
  getMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;
13
12
  addMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;
14
13
  updateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;
15
- deleteMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteMenu;
14
+ deleteMenu: (value: string) => Promise<{
15
+ err: any;
16
+ }>;
16
17
  isInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;
17
18
  isOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;
18
19
  };
@@ -23,6 +23,7 @@ const EMPTY_MENU_ERROR = {
23
23
  message: "One or more of your app menus is empty",
24
24
  };
25
25
  export const Applications = (props) => {
26
+ var _a;
26
27
  const dispatch = useDispatch();
27
28
  const [currentMenuID, setCurrentMenuID] = useState("");
28
29
  const [menuName, setMenuName] = useState("");
@@ -41,8 +42,8 @@ export const Applications = (props) => {
41
42
  function updateAppList() {
42
43
  props.getApps().then((response) => {
43
44
  dispatch(SmartDesktopDesignerActions.update_apps(response.apps));
44
- props.getMenus().then((response) => {
45
- dispatch(SmartDesktopDesignerActions.update_menus(response.menus));
45
+ props.getMenus().then((getMenusResponse) => {
46
+ dispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));
46
47
  });
47
48
  });
48
49
  }
@@ -118,14 +119,13 @@ export const Applications = (props) => {
118
119
  return;
119
120
  }
120
121
  props.getAppConfigTemplate().then((response) => {
122
+ var _a, _b;
121
123
  const { config } = response;
122
- const { displayName } = generateDefaultConfig({
123
- ...config,
124
- path,
125
- });
124
+ const { displayName } = generateDefaultConfig(Object.assign(Object.assign({}, config), { path }));
126
125
  config.name = displayName;
127
- config.appName = displayName;
128
126
  config.appId = appId;
127
+ config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
128
+ config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
129
129
  config.manifest.window.windowType = "assimilation";
130
130
  config.manifest.window.path = path;
131
131
  delete config.manifest.window.url;
@@ -134,30 +134,67 @@ export const Applications = (props) => {
134
134
  });
135
135
  });
136
136
  };
137
- return (React.createElement(React.Fragment, null, currentAppID ? (React.createElement(Application, { id: currentAppID, ...{
138
- apps,
139
- addApp: props.addApp,
140
- updateApp: props.updateApp,
141
- deleteApp: props.deleteApp,
142
- getAppConfigTemplate: props.getAppConfigTemplate,
143
- setCurrentAppID,
144
- onClose: (reason) => {
145
- if (reason === ApplicationCloseReason.NEW) {
146
- dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
147
- }
148
- else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {
149
- props.deleteApp(currentAppID);
150
- setCurrentAppID(null);
151
- }
152
- else {
153
- setCurrentAppID(null);
154
- }
155
- },
156
- }, isInboundInteropAuthorized: props.isInboundInteropAuthorized, isOutboundInteropAuthorized: props.isOutboundInteropAuthorized })) : currentMenuID ? (React.createElement(View, null,
157
- React.createElement(Header, { backFunction: () => {
158
- setFocusOnMenu(true);
159
- setCurrentMenuID("");
160
- } }, "Menus"),
137
+ const onClose = (reason) => {
138
+ if (reason === ApplicationCloseReason.NEW) {
139
+ dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
140
+ }
141
+ else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {
142
+ if (currentAppID)
143
+ props.deleteApp(currentAppID);
144
+ setCurrentAppID(null);
145
+ }
146
+ else {
147
+ setCurrentAppID(null);
148
+ }
149
+ };
150
+ const applicationProps = {
151
+ id: currentAppID !== null && currentAppID !== void 0 ? currentAppID : "",
152
+ apps,
153
+ addApp: props.addApp,
154
+ deleteApp: props.deleteApp,
155
+ getAppConfigTemplate: props.getAppConfigTemplate,
156
+ setCurrentAppID,
157
+ onClose,
158
+ isInboundInteropAuthorized: props.isInboundInteropAuthorized,
159
+ isOutboundInteropAuthorized: props.isOutboundInteropAuthorized,
160
+ };
161
+ const dropZoneProps = {
162
+ apps: apps.filter((app) => { var _a; return !((_a = app === null || app === void 0 ? void 0 : app.manifest) === null || _a === void 0 ? void 0 : _a.temporary); }),
163
+ clickApp: (appID) => {
164
+ setCurrentAppID(appID);
165
+ },
166
+ deleteApp: removeAppID,
167
+ };
168
+ const applicationListProps = {
169
+ apps: Object.entries(menus).map(([key, value]) => {
170
+ var _a;
171
+ const menuObj = JSON.parse(JSON.stringify(value));
172
+ menuObj.appId = key;
173
+ menuObj.name = (_a = menuObj.name) !== null && _a !== void 0 ? _a : menuObj.displayName;
174
+ if (menuObj.applications.length === 0) {
175
+ menuObj.icon = "warning";
176
+ }
177
+ return menuObj;
178
+ }),
179
+ clickApp: (menuId) => {
180
+ setCurrentMenuID(menuId);
181
+ setMenuName(menus[menuId].displayName);
182
+ setSelectedApps(menus[menuId].applications);
183
+ },
184
+ deleteApp: removeMenuID,
185
+ };
186
+ const backFunction = () => {
187
+ setFocusOnMenu(true);
188
+ setCurrentMenuID("");
189
+ };
190
+ const helpFunction = () => {
191
+ launchTutorialLink("managing-applications");
192
+ };
193
+ const addApp = () => {
194
+ dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
195
+ };
196
+ return (React.createElement(React.Fragment, null, currentAppID ? (React.createElement(Application, Object.assign({}, applicationProps))) : currentMenuID ? (React.createElement(View, null,
197
+ React.createElement(Header, { backFunction: backFunction }, "Menus"),
161
198
  React.createElement(Content, null,
162
199
  React.createElement("div", { className: "app-edit-field" },
163
200
  React.createElement("label", { htmlFor: "menu-name" }, "Name"),
@@ -166,50 +203,24 @@ export const Applications = (props) => {
166
203
  } })),
167
204
  React.createElement("div", { className: "app-edit-field" },
168
205
  React.createElement("label", { htmlFor: "menu-group" }, "Group Contents"),
169
- React.createElement(FinsembleSelect, { options: apps.map((app) => app.name), values: apps.map((app) => app.appId), selected: menus[currentMenuID]?.applications || [], updateCallback: setSelectedApps, showSearch: true })),
206
+ React.createElement(FinsembleSelect, { options: apps.map((app) => app.name), values: apps.map((app) => app.appId), selected: ((_a = menus[currentMenuID]) === null || _a === void 0 ? void 0 : _a.applications) || [], updateCallback: setSelectedApps, showSearch: true })),
170
207
  React.createElement("div", { className: "app-edit-actions" },
171
208
  React.createElement("span", null),
172
209
  React.createElement(Button, { fashion: "secondary", text: "Save", disabled: menuName.length <= 0, onClick: updateMenuItem }))))) : (React.createElement(View, null,
173
- React.createElement(Header, { helpFunction: () => {
174
- launchTutorialLink("managing-applications");
175
- } }, "Apps"),
210
+ React.createElement(Header, { helpFunction: helpFunction }, "Apps"),
176
211
  React.createElement(Content, null,
177
212
  React.createElement(Tab, { autofocus: focusOnMenu ? 1 : 0 },
178
213
  React.createElement("div", { "data-label": "Apps" },
179
214
  React.createElement("div", { className: "frontmatter" }, "Drag an app into the list or click the Add button."),
180
- React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: () => {
181
- dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
182
- } }),
215
+ React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: addApp }),
183
216
  React.createElement(DropZone, { processFile: addDroppedApp },
184
- React.createElement(ApplicationList, { ...{
185
- apps: apps.filter((app) => !app?.manifest?.component?.temporary),
186
- clickApp: (appID) => {
187
- setCurrentAppID(appID);
188
- },
189
- deleteApp: removeAppID,
190
- } }))),
217
+ React.createElement(ApplicationList, Object.assign({}, dropZoneProps)))),
191
218
  React.createElement("div", { "data-label": "Menus" },
192
219
  React.createElement("div", { className: "frontmatter" },
193
220
  "This screen allows you to make menus that will appear on your Toolbar.",
194
221
  React.createElement("br", null),
195
222
  "You are allowed a maximum of five Menus."),
196
223
  React.createElement(Button, { className: "icon-before-add", fashion: "primary", text: "Add", iconBefore: "plus", disabled: Object.keys(menus).length >= 5, onClick: addNewMenu }),
197
- React.createElement(ApplicationList, { ...{
198
- apps: Object.entries(menus).map(([key, value]) => {
199
- const menuObj = JSON.parse(JSON.stringify(value));
200
- menuObj.appId = key;
201
- menuObj.appName = menuObj.displayName;
202
- if (menuObj.applications.length === 0) {
203
- menuObj.icon = "warning";
204
- }
205
- return menuObj;
206
- }),
207
- clickApp: (menuId) => {
208
- setCurrentMenuID(menuId);
209
- setMenuName(menus[menuId].displayName);
210
- setSelectedApps(menus[menuId].applications);
211
- },
212
- deleteApp: removeMenuID,
213
- } }))))))));
224
+ React.createElement(ApplicationList, Object.assign({}, applicationListProps)))))))));
214
225
  };
215
226
  //# sourceMappingURL=Applications.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/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,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,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,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAIxF,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,wBAAwB,CAAC;AAEhF,MAAM,oBAAoB,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gCACtC,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;oCACtC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;iCACzB;gCACD,OAAO,OAAO,CAAC;4BAChB,CAAC,CAAC;4BACF,QAAQ,EAAE,CAAC,MAAc,EAAE,EAAE;gCAC5B,gBAAgB,CAAC,MAAM,CAAC,CAAC;gCACzB,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;gCACvC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;4BAC7C,CAAC;4BACD,SAAS,EAAE,YAAY;yBACvB,GACA,CACG,CACD,CACG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"../../store\";\r\nimport { View } from \"./View\";\r\nimport { Tab } from \"../common/Tab\";\r\nimport { Header } from \"../common/Header\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Button } from \"../common/Button\";\r\nimport { Content } from \"./Content\";\r\nimport { Application, ApplicationCloseReason } from \"./Application\";\r\nimport { ApplicationList } from \"./ApplicationList\";\r\n\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\n\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\n\r\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\r\nimport { generateDefaultConfig } from \"./sdd_helpers\";\r\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\n\r\nconst MENU_NAME_MAX_LENGTH = 50;\r\n\r\nexport type ApplicationsProps = {\r\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\r\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\r\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\r\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\r\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\r\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\r\n\tdeleteMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteMenu;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nconst EMPTY_MENU_ERROR: ProjectError = {\r\n\tviewId: \"applications\",\r\n\tmessage: \"One or more of your app menus is empty\",\r\n};\r\n\r\nexport const Applications = (props: ApplicationsProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\r\n\tconst [menuName, setMenuName] = useState(\"\");\r\n\tconst [focusOnMenu, setFocusOnMenu] = useState(false);\r\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\r\n\r\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\r\n\r\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\r\n\r\n\tif (Object.values(menus).every((menu) => menu.applications.length > 1)) {\r\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\r\n\t} else {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\r\n\t}\r\n\r\n\tfunction updateAppList() {\r\n\t\tprops.getApps().then((response) => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\r\n\t\t\tprops.getMenus().then((response) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(response.menus));\r\n\t\t\t});\r\n\t\t\t// FSBL.Clients.Logger.log(\"apps\", response.apps);\r\n\t\t});\r\n\t}\r\n\r\n\tfunction setCurrentAppID(id: string | null) {\r\n\t\tif (id === null) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\r\n\t\t}\r\n\t\tsetFocusOnMenu(false);\r\n\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\r\n\t\tupdateAppList();\r\n\t}\r\n\r\n\tconst updateMenuItem = () => {\r\n\t\tconst whenDone = () => {\r\n\t\t\tupdateAppList();\r\n\t\t\tsetMenuName(\"\");\r\n\t\t\tsetFocusOnMenu(true);\r\n\t\t\tsetCurrentMenuID(\"\");\r\n\t\t};\r\n\t\tif (currentMenuID == \"new\") {\r\n\t\t\tprops\r\n\t\t\t\t.addMenu({\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: -1,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t} else {\r\n\t\t\tprops\r\n\t\t\t\t.updateMenu(currentMenuID, {\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: menus[currentMenuID].position,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t}\r\n\t};\r\n\r\n\tconst removeAppID = (id: string) => {\r\n\t\t// Delete app from list of apps\r\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\t// @todo : add error handling. Maybe react-toast-notify?\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\r\n\t\t\t// Remove reference to app from all menus\r\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\r\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\r\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\r\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\r\n\t\t\t\t\t\tupdateAppList();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst removeMenuID = (id: string) => {\r\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\t// @todo : add error handling. Maybe react-toast-notify?\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\t\t});\r\n\t};\r\n\r\n\tconst addNewMenu = () => {\r\n\t\tsetCurrentMenuID(\"new\");\r\n\t};\r\n\r\n\t/********* Lifecycle effects *********/\r\n\r\n\t// Call updateAppList once the componet has mounted\r\n\t// Can't call out of an effect, or it will cause an endless loop\r\n\tuseEffect(updateAppList, []);\r\n\r\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\r\n\t\tconst appId = String(new Date().getTime() + index);\r\n\t\tconst { path } = file;\r\n\r\n\t\t// Confirm that the file is an executable\r\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Generate defaults and then add app with those defaults\r\n\t\tprops.getAppConfigTemplate().then((response) => {\r\n\t\t\tconst { config } = response;\r\n\t\t\t// Get generated displayName\r\n\t\t\tconst { displayName } = generateDefaultConfig({\r\n\t\t\t\t...config,\r\n\t\t\t\tpath,\r\n\t\t\t});\r\n\t\t\tconfig.name = displayName;\r\n\t\t\tconfig.appName = displayName;\r\n\r\n\t\t\t// We generated appId above\r\n\t\t\tconfig.appId = appId;\r\n\r\n\t\t\t// A file was dropped, so we know this was a file, not a URL\r\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\r\n\t\t\tconfig.manifest.window.path = path;\r\n\t\t\tdelete config.manifest.window.url;\r\n\r\n\t\t\t// Add app with defaults\r\n\t\t\tprops.addApp(appId, config).then(() => {\r\n\t\t\t\tupdateAppList();\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{currentAppID ? (\r\n\t\t\t\t<Application\r\n\t\t\t\t\tid={currentAppID}\r\n\t\t\t\t\t{...{\r\n\t\t\t\t\t\tapps,\r\n\t\t\t\t\t\taddApp: props.addApp,\r\n\t\t\t\t\t\tupdateApp: props.updateApp,\r\n\t\t\t\t\t\tdeleteApp: props.deleteApp,\r\n\t\t\t\t\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\r\n\t\t\t\t\t\tsetCurrentAppID,\r\n\t\t\t\t\t\tonClose: (reason) => {\r\n\t\t\t\t\t\t\tif (reason === ApplicationCloseReason.NEW) {\r\n\t\t\t\t\t\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t\t\t\t\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\r\n\t\t\t\t\t\t\t\tprops.deleteApp(currentAppID);\r\n\t\t\t\t\t\t\t\tsetCurrentAppID(null);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tsetCurrentAppID(null);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tisInboundInteropAuthorized={props.isInboundInteropAuthorized}\r\n\t\t\t\t\tisOutboundInteropAuthorized={props.isOutboundInteropAuthorized}\r\n\t\t\t\t></Application>\r\n\t\t\t) : currentMenuID ? (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header\r\n\t\t\t\t\t\tbackFunction={() => {\r\n\t\t\t\t\t\t\tsetFocusOnMenu(true);\r\n\t\t\t\t\t\t\tsetCurrentMenuID(\"\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\tMenus\r\n\t\t\t\t\t</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tid=\"menu-name\"\r\n\t\t\t\t\t\t\t\tvalue={menuName}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\r\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\r\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group Contents</label>\r\n\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\r\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\r\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\r\n\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t<span></span>\r\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t) : (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header\r\n\t\t\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\t\t\tlaunchTutorialLink(\"managing-applications\");\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\tApps\r\n\t\t\t\t\t</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<Tab autofocus={focusOnMenu ? 1 : 0}>\r\n\t\t\t\t\t\t\t<div data-label=\"Apps\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">Drag an app into the list or click the Add button.</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\r\n\t\t\t\t\t\t\t\t\t<ApplicationList\r\n\t\t\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t\t\tapps: apps.filter((app) => !app?.manifest?.component?.temporary),\r\n\t\t\t\t\t\t\t\t\t\t\tclickApp: (appID: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tsetCurrentAppID(appID);\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\t\tdeleteApp: removeAppID,\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</DropZone>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div data-label=\"Menus\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\r\n\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\r\n\t\t\t\t\t\t\t\t\tonClick={addNewMenu}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ApplicationList\r\n\t\t\t\t\t\t\t\t\t{...{\r\n\t\t\t\t\t\t\t\t\t\tapps: Object.entries(menus).map(([key, value]) => {\r\n\t\t\t\t\t\t\t\t\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\r\n\t\t\t\t\t\t\t\t\t\t\tmenuObj.appId = key;\r\n\t\t\t\t\t\t\t\t\t\t\tmenuObj.appName = menuObj.displayName;\r\n\t\t\t\t\t\t\t\t\t\t\tif (menuObj.applications.length === 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmenuObj.icon = \"warning\";\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\treturn menuObj;\r\n\t\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\t\tclickApp: (menuId: string) => {\r\n\t\t\t\t\t\t\t\t\t\t\tsetCurrentMenuID(menuId);\r\n\t\t\t\t\t\t\t\t\t\t\tsetMenuName(menus[menuId].displayName);\r\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedApps(menus[menuId].applications);\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\tdeleteApp: removeMenuID,\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</Tab>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/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,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,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,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,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,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AAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,cAAc,GAAI,CAC9F,CACG,CACJ,CACP,CAAC,CAAC,CAAC,CACH,oBAAC,IAAI;QACJ,oBAAC,MAAM,IAAC,YAAY,EAAE,YAAY,WAAe;QACjD,oBAAC,OAAO;YACP,oBAAC,GAAG,IAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,2CAAgB,MAAM;oBACrB,6BAAK,SAAS,EAAC,aAAa,yDAAyD;oBACrF,oBAAC,MAAM,IAAC,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,MAAM,GAAI;oBAEtG,oBAAC,QAAQ,IAAC,WAAW,EAAE,aAAa;wBACnC,oBAAC,eAAe,oBAAK,aAAa,EAAI,CAC5B,CACN;gBAEN,2CAAgB,OAAO;oBACtB,6BAAK,SAAS,EAAC,aAAa;;wBAE3B,+BAAM;mEAED;oBACN,oBAAC,MAAM,IACN,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,KAAK,EACV,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,EACxC,OAAO,EAAE,UAAU,GAClB;oBACF,oBAAC,eAAe,oBAAK,oBAAoB,EAAI,CACxC,CACD,CACG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"../../store\";\r\nimport { View } from \"./View\";\r\nimport { Tab } from \"../common/Tab\";\r\nimport { Header } from \"../common/Header\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Button } from \"../common/Button\";\r\nimport { Content } from \"./Content\";\r\nimport { Application, ApplicationCloseReason } from \"./Application\";\r\nimport { ApplicationList } from \"./ApplicationList\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\r\nimport { generateDefaultConfig } from \"./sdd_helpers\";\r\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport { ApplicationProps } from \"./Application\";\r\nimport { ApplicationListProps } from \"./ApplicationList\";\r\nimport { services } from \"@finsemble/finsemble-core/\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nconst MENU_NAME_MAX_LENGTH = 50;\r\n\r\nexport type ApplicationsProps = {\r\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\r\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\r\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\r\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\r\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\r\n\tdeleteMenu: (value: string) => Promise<{ err: any }>;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nconst EMPTY_MENU_ERROR: ProjectError = {\r\n\tviewId: \"applications\",\r\n\tmessage: \"One or more of your app menus is empty\",\r\n};\r\n\r\nexport const Applications = (props: ApplicationsProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\r\n\tconst [menuName, setMenuName] = useState(\"\");\r\n\tconst [focusOnMenu, setFocusOnMenu] = useState(false);\r\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\r\n\r\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\r\n\r\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\r\n\r\n\tif (Object.values(menus).every((menu) => menu.applications.length > 1)) {\r\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\r\n\t} else {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\r\n\t}\r\n\r\n\tfunction updateAppList() {\r\n\t\tprops.getApps().then((response: any) => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\r\n\t\t\tprops.getMenus().then((getMenusResponse: any) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tfunction setCurrentAppID(id: string | null) {\r\n\t\tif (id === null) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\r\n\t\t}\r\n\t\tsetFocusOnMenu(false);\r\n\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\r\n\t\tupdateAppList();\r\n\t}\r\n\r\n\tconst updateMenuItem = () => {\r\n\t\tconst whenDone = () => {\r\n\t\t\tupdateAppList();\r\n\t\t\tsetMenuName(\"\");\r\n\t\t\tsetFocusOnMenu(true);\r\n\t\t\tsetCurrentMenuID(\"\");\r\n\t\t};\r\n\t\tif (currentMenuID == \"new\") {\r\n\t\t\tprops\r\n\t\t\t\t.addMenu({\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: -1,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t} else {\r\n\t\t\tprops\r\n\t\t\t\t.updateMenu(currentMenuID, {\r\n\t\t\t\t\tdisplayName: menuName,\r\n\t\t\t\t\tapplications: selectedApps,\r\n\t\t\t\t\tposition: menus[currentMenuID].position,\r\n\t\t\t\t})\r\n\t\t\t\t.then(whenDone);\r\n\t\t}\r\n\t};\r\n\r\n\tconst removeAppID = (id: string) => {\r\n\t\t// Delete app from list of apps\r\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\r\n\t\t\t// Remove reference to app from all menus\r\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\r\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\r\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\r\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\r\n\t\t\t\t\t\tupdateAppList();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst removeMenuID = (id: string) => {\r\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\r\n\t\t\tif (err) {\r\n\t\t\t\talert(err);\r\n\t\t\t}\r\n\t\t\tupdateAppList();\r\n\t\t});\r\n\t};\r\n\r\n\tconst addNewMenu = () => {\r\n\t\tsetCurrentMenuID(\"new\");\r\n\t};\r\n\r\n\t/********* Lifecycle effects *********/\r\n\r\n\t// Call updateAppList once the component has mounted\r\n\t// Can't call out of an effect, or it will cause an endless loop\r\n\tuseEffect(updateAppList, []);\r\n\r\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\r\n\t\tconst appId = String(new Date().getTime() + index);\r\n\t\tconst { path } = file;\r\n\r\n\t\t// Confirm that the file is an executable\r\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Generate defaults and then add app with those defaults\r\n\t\tprops.getAppConfigTemplate().then((response: any) => {\r\n\t\t\tconst { config }: { config: AppDefinition } = response;\r\n\t\t\t// Get generated displayName\r\n\t\t\tconst { displayName } = generateDefaultConfig({\r\n\t\t\t\t...config,\r\n\t\t\t\tpath,\r\n\t\t\t});\r\n\t\t\tconfig.name = displayName;\r\n\r\n\t\t\t// We generated appId above\r\n\t\t\tconfig.appId = appId;\r\n\r\n\t\t\t// A file was dropped, so we know this was a file, not a URL\r\n\t\t\tconfig.manifest = config.manifest ?? {};\r\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\r\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\r\n\t\t\tconfig.manifest.window.path = path;\r\n\t\t\tdelete config.manifest.window.url;\r\n\r\n\t\t\t// Add app with defaults\r\n\t\t\tprops.addApp(appId, config).then(() => {\r\n\t\t\t\tupdateAppList();\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\r\n\tconst onClose = (reason: ApplicationCloseReason) => {\r\n\t\tif (reason === ApplicationCloseReason.NEW) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\r\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\r\n\t\t\tsetCurrentAppID(null);\r\n\t\t} else {\r\n\t\t\tsetCurrentAppID(null);\r\n\t\t}\r\n\t};\r\n\r\n\tconst applicationProps: ApplicationProps = {\r\n\t\tid: currentAppID ?? \"\",\r\n\t\tapps,\r\n\t\taddApp: props.addApp,\r\n\t\tdeleteApp: props.deleteApp,\r\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\r\n\t\tsetCurrentAppID,\r\n\t\tonClose,\r\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\r\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\r\n\t};\r\n\r\n\tconst dropZoneProps: ApplicationListProps = {\r\n\t\tapps: apps.filter((app) => !app?.manifest?.temporary),\r\n\t\tclickApp: (appID: string) => {\r\n\t\t\tsetCurrentAppID(appID);\r\n\t\t},\r\n\t\tdeleteApp: removeAppID,\r\n\t};\r\n\r\n\tconst applicationListProps = {\r\n\t\tapps: Object.entries(menus).map(([key, value]) => {\r\n\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\r\n\t\t\tmenuObj.appId = key;\r\n\t\t\tmenuObj.name = menuObj.name ?? menuObj.displayName;\r\n\t\t\tif (menuObj.applications.length === 0) {\r\n\t\t\t\tmenuObj.icon = \"warning\";\r\n\t\t\t}\r\n\t\t\treturn menuObj;\r\n\t\t}),\r\n\t\tclickApp: (menuId: string) => {\r\n\t\t\tsetCurrentMenuID(menuId);\r\n\t\t\tsetMenuName(menus[menuId].displayName);\r\n\t\t\tsetSelectedApps(menus[menuId].applications);\r\n\t\t},\r\n\t\tdeleteApp: removeMenuID,\r\n\t};\r\n\r\n\tconst backFunction = () => {\r\n\t\tsetFocusOnMenu(true);\r\n\t\tsetCurrentMenuID(\"\");\r\n\t};\r\n\r\n\tconst helpFunction = () => {\r\n\t\tlaunchTutorialLink(\"managing-applications\");\r\n\t};\r\n\r\n\tconst addApp = () => {\r\n\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{currentAppID ? (\r\n\t\t\t\t<Application {...applicationProps} />\r\n\t\t\t) : currentMenuID ? (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header backFunction={backFunction}>Menus</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tid=\"menu-name\"\r\n\t\t\t\t\t\t\t\tvalue={menuName}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\r\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\r\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group Contents</label>\r\n\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\r\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\r\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\r\n\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t\t\t\t<span></span>\r\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t) : (\r\n\t\t\t\t<View>\r\n\t\t\t\t\t<Header helpFunction={helpFunction}>Apps</Header>\r\n\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t<Tab autofocus={focusOnMenu ? 1 : 0}>\r\n\t\t\t\t\t\t\t<div data-label=\"Apps\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">Drag an app into the list or click the Add button.</div>\r\n\t\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\r\n\r\n\t\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\r\n\t\t\t\t\t\t\t\t\t<ApplicationList {...dropZoneProps} />\r\n\t\t\t\t\t\t\t\t</DropZone>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div data-label=\"Menus\">\r\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\r\n\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\r\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\r\n\t\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\r\n\t\t\t\t\t\t\t\t\tonClick={addNewMenu}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t<ApplicationList {...applicationListProps} />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</Tab>\r\n\t\t\t\t\t</Content>\r\n\t\t\t\t</View>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
@@ -27,15 +27,9 @@ export const Authentication = (props) => {
27
27
  props
28
28
  .setAuthenticationProviders(authProviders.map((provider) => {
29
29
  if (name === provider.name) {
30
- return {
31
- ...value,
32
- enabled: true,
33
- };
30
+ return Object.assign(Object.assign({}, value), { enabled: true });
34
31
  }
35
- return {
36
- ...provider,
37
- enabled: false,
38
- };
32
+ return Object.assign(Object.assign({}, provider), { enabled: false });
39
33
  }))
40
34
  .then(() => {
41
35
  if (value) {
@@ -1 +1 @@
1
- {"version":3,"file":"Authentication.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Authentication.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAC5D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC7G,MAAM,oBAAoB,GA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,EAAE,CAAC,KAAK,EAAE,EAAE;oCACnB,mBAAmB,CAAC,KAAK,CAAC,CAAC;gCAC5B,CAAC,GACA,CACF,CACI,CACD;oBACL,aAAa,IAAI,CACjB,6BAAK,SAAS,EAAC,wBAAwB;wBACtC,oBAAC,MAAM,IACN,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAC,OAAO,EACf,IAAI,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,EACzD,OAAO,EAAE,GAAG,EAAE;gCACb,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAC;4BACpC,CAAC,GACA,CACG,CACN,CACK;gBACP,6BAAK,SAAS,EAAC,qBAAqB;oBACnC,yCAAe;oBAEf,qFAA0D;oBAE1D,yCAAe;oBAEf,6HAAkG;oBAElG,yCAAe;oBAEf,sKAGI,CACC,CACD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport { Header } from \"../common/Header\";\r\nimport \"./css/authentication.css\";\r\nimport { View } from \"./View\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { AuthenticationProviderConfig } from \"./AuthenticationProviderConfig\";\r\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { Content } from \"./Content\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { Button } from \"../common/Button\";\r\n\r\nexport type AuthenticationProps = {\r\n\tgetAuthenticationProviders: () => Promise<AuthenticationProvider[]>;\r\n\tsetAuthenticationProviders: (authenticationProviders: any) => Promise<Error | null>;\r\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\r\n};\r\n\r\nexport const Authentication = (props: AuthenticationProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst authProviders = useSelector((state: RootState) => state.smartDesktopDesigner.authentication.providers);\r\n\tconst enabledAuthProviders = authProviders.filter((provider) => provider.enabled);\r\n\r\n\tconst [isAdvancedMode, setIsAdvancedMode] = useState(false);\r\n\tconst shownProvider = enabledAuthProviders[0];\r\n\r\n\tuseEffect(() => {\r\n\t\tprops.getAuthenticationProviders().then((providers) => {\r\n\t\t\tproviders.forEach((provider) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(provider));\r\n\t\t\t});\r\n\t\t});\r\n\t}, []);\r\n\r\n\tfunction updateAuthProviders(value: AuthenticationProvider | null) {\r\n\t\tconst name = value ? value.name : \"none\";\r\n\r\n\t\tprops\r\n\t\t\t.setAuthenticationProviders(\r\n\t\t\t\tauthProviders.map((provider) => {\r\n\t\t\t\t\tif (name === provider.name) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t...value,\r\n\t\t\t\t\t\t\tenabled: true,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\t...provider,\r\n\t\t\t\t\t\tenabled: false,\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.then(() => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(value));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.enable_auth_provider(name));\r\n\t\t\t});\r\n\t}\r\n\r\n\treturn (\r\n\t\t<View>\r\n\t\t\t<Header\r\n\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\tlaunchTutorialLink(\"configuring-authentication\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tAuthentication\r\n\t\t\t</Header>\r\n\t\t\t<Content>\r\n\t\t\t\t<div className=\"auth-setup-content\">\r\n\t\t\t\t\t<form className=\"auth-setup-form\" onSubmit={(e) => e.preventDefault()}>\r\n\t\t\t\t\t\t<div className=\"auth-setup-fields\">\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-provider\">\r\n\t\t\t\t\t\t\t\t<div className=\"auth-setup-field\">\r\n\t\t\t\t\t\t\t\t\t<label>Provider</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<select\r\n\t\t\t\t\t\t\t\t\t\taria-label=\"Authentication Provider\"\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-select-provider\"\r\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(authProviders.find((p) => p.name === e.target.value) || null);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tvalue={enabledAuthProviders.map((provider) => provider.name)[0] || \"none\"}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t<option value=\"none\">None</option>\r\n\t\t\t\t\t\t\t\t\t\t{authProviders.map((provider, index) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<option key={index} value={provider.name}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\r\n\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t<Tooltip>\r\n\t\t\t\t\t\t\t\t\t\tChoose from the list of OAuth providers to configure Single Sign On (SSO) for your project.\r\n\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t\t\t<AuthenticationProviderConfig\r\n\t\t\t\t\t\t\t\t\t\tkey={shownProvider.name}\r\n\t\t\t\t\t\t\t\t\t\tvalue={shownProvider}\r\n\t\t\t\t\t\t\t\t\t\tisAdvancedMode={isAdvancedMode}\r\n\t\t\t\t\t\t\t\t\t\ttestAuthenticationProvider={props.testAuthenticationProvider}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(value);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-toggle-mode\">\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-toggle-mode-button\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"ghost\"\r\n\t\t\t\t\t\t\t\t\ttext={!isAdvancedMode ? \"Show advanced\" : \"Hide advanced\"}\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetIsAdvancedMode(!isAdvancedMode);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</form>\r\n\t\t\t\t\t<div className=\"auth-setup-tutorial\">\r\n\t\t\t\t\t\t<h3>Step 1</h3>\r\n\r\n\t\t\t\t\t\t<p>Select your OAuth2 provider from the dropdown list.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 2</h3>\r\n\r\n\t\t\t\t\t\t<p>Copy the provided Redirect URL into the OAuth2 app configuration for your service provider.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 3</h3>\r\n\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\tSave the app configuration on your OAuth2 service provider, and then input the given Client ID and any\r\n\t\t\t\t\t\t\tother configuration settings.\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</Content>\r\n\t\t</View>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Authentication.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AAC;4BACpC,CAAC,GACA,CACG,CACN,CACK;gBACP,6BAAK,SAAS,EAAC,qBAAqB;oBACnC,yCAAe;oBAEf,qFAA0D;oBAE1D,yCAAe;oBAEf,6HAAkG;oBAElG,yCAAe;oBAEf,sKAGI,CACC,CACD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport { Header } from \"../common/Header\";\r\nimport \"./css/authentication.css\";\r\nimport { View } from \"./View\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { AuthenticationProviderConfig } from \"./AuthenticationProviderConfig\";\r\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { Content } from \"./Content\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { Button } from \"../common/Button\";\r\n\r\nexport type AuthenticationProps = {\r\n\tgetAuthenticationProviders: () => Promise<AuthenticationProvider[]>;\r\n\tsetAuthenticationProviders: (authenticationProviders: any) => Promise<Error | null>;\r\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\r\n};\r\n\r\nexport const Authentication = (props: AuthenticationProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst authProviders = useSelector((state: RootState) => state.smartDesktopDesigner.authentication.providers);\r\n\tconst enabledAuthProviders = authProviders.filter((provider) => provider.enabled);\r\n\r\n\tconst [isAdvancedMode, setIsAdvancedMode] = useState(false);\r\n\tconst shownProvider = enabledAuthProviders[0];\r\n\r\n\tuseEffect(() => {\r\n\t\tprops.getAuthenticationProviders().then((providers) => {\r\n\t\t\tproviders.forEach((provider) => {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(provider));\r\n\t\t\t});\r\n\t\t});\r\n\t}, []);\r\n\r\n\tfunction updateAuthProviders(value: AuthenticationProvider | null) {\r\n\t\tconst name = value ? value.name : \"none\";\r\n\r\n\t\tprops\r\n\t\t\t.setAuthenticationProviders(\r\n\t\t\t\tauthProviders.map((provider) => {\r\n\t\t\t\t\tif (name === provider.name) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t...value,\r\n\t\t\t\t\t\t\tenabled: true,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\t...provider,\r\n\t\t\t\t\t\tenabled: false,\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.then(() => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(value));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.enable_auth_provider(name));\r\n\t\t\t});\r\n\t}\r\n\r\n\treturn (\r\n\t\t<View>\r\n\t\t\t<Header\r\n\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\tlaunchTutorialLink(\"configuring-authentication\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tAuthentication\r\n\t\t\t</Header>\r\n\t\t\t<Content>\r\n\t\t\t\t<div className=\"auth-setup-content\">\r\n\t\t\t\t\t<form className=\"auth-setup-form\" onSubmit={(e) => e.preventDefault()}>\r\n\t\t\t\t\t\t<div className=\"auth-setup-fields\">\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-provider\">\r\n\t\t\t\t\t\t\t\t<div className=\"auth-setup-field\">\r\n\t\t\t\t\t\t\t\t\t<label>Provider</label>\r\n\r\n\t\t\t\t\t\t\t\t\t<select\r\n\t\t\t\t\t\t\t\t\t\taria-label=\"Authentication Provider\"\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-select-provider\"\r\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(authProviders.find((p) => p.name === e.target.value) || null);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\tvalue={enabledAuthProviders.map((provider) => provider.name)[0] || \"none\"}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t<option value=\"none\">None</option>\r\n\t\t\t\t\t\t\t\t\t\t{authProviders.map((provider, index) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<option key={index} value={provider.name}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\r\n\t\t\t\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t<Tooltip>\r\n\t\t\t\t\t\t\t\t\t\tChoose from the list of OAuth providers to configure Single Sign On (SSO) for your project.\r\n\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t\t\t<AuthenticationProviderConfig\r\n\t\t\t\t\t\t\t\t\t\tkey={shownProvider.name}\r\n\t\t\t\t\t\t\t\t\t\tvalue={shownProvider}\r\n\t\t\t\t\t\t\t\t\t\tisAdvancedMode={isAdvancedMode}\r\n\t\t\t\t\t\t\t\t\t\ttestAuthenticationProvider={props.testAuthenticationProvider}\r\n\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\r\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(value);\r\n\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t{shownProvider && (\r\n\t\t\t\t\t\t\t<div className=\"auth-setup-toggle-mode\">\r\n\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-toggle-mode-button\"\r\n\t\t\t\t\t\t\t\t\tfashion=\"ghost\"\r\n\t\t\t\t\t\t\t\t\ttext={!isAdvancedMode ? \"Show advanced\" : \"Hide advanced\"}\r\n\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\tsetIsAdvancedMode(!isAdvancedMode);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</form>\r\n\t\t\t\t\t<div className=\"auth-setup-tutorial\">\r\n\t\t\t\t\t\t<h3>Step 1</h3>\r\n\r\n\t\t\t\t\t\t<p>Select your OAuth2 provider from the dropdown list.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 2</h3>\r\n\r\n\t\t\t\t\t\t<p>Copy the provided Redirect URL into the OAuth2 app configuration for your service provider.</p>\r\n\r\n\t\t\t\t\t\t<h3>Step 3</h3>\r\n\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\tSave the app configuration on your OAuth2 service provider, and then input the given Client ID and any\r\n\t\t\t\t\t\t\tother configuration settings.\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</Content>\r\n\t\t</View>\r\n\t);\r\n};\r\n"]}