@finsemble/finsemble-ui 6.3.2 → 6.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/package.json +31 -42
  2. package/react/actions/smartDesktopDesignerActions.d.ts +6 -4
  3. package/react/actions/smartDesktopDesignerActions.js +2 -1
  4. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  5. package/react/assets/css/userPreferences.css +0 -30
  6. package/react/assets/css/windowTitleBar.css +6 -5
  7. package/react/assets/icons/always-on-top.svg +20 -0
  8. package/react/assets/icons/caret.svg +7 -0
  9. package/react/assets/icons/close.svg +11 -0
  10. package/react/assets/icons/code-block.svg +15 -0
  11. package/react/assets/icons/documentation.svg +20 -0
  12. package/react/assets/icons/linker.svg +18 -0
  13. package/react/assets/icons/maximize.svg +16 -0
  14. package/react/assets/icons/minimize.svg +15 -0
  15. package/react/assets/icons/toolbar.svg +12 -0
  16. package/react/assets/img/finsemble-display.png +0 -0
  17. package/react/componentTemplateGenerator.js +1 -1
  18. package/react/componentTemplateGenerator.js.map +1 -1
  19. package/react/components/FinsembleProvider.js.map +1 -1
  20. package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
  21. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  22. package/react/components/appCatalog/stores/appStore.d.ts +2 -2
  23. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  24. package/react/components/common/Accordion.d.ts +11 -0
  25. package/react/components/common/Accordion.js +20 -0
  26. package/react/components/common/Accordion.js.map +1 -0
  27. package/react/components/common/Checkbox.d.ts +1 -0
  28. package/react/components/common/Checkbox.js +4 -2
  29. package/react/components/common/Checkbox.js.map +1 -1
  30. package/react/components/common/DropZone.js +3 -1
  31. package/react/components/common/DropZone.js.map +1 -1
  32. package/react/components/common/FileInput.d.ts +2 -1
  33. package/react/components/common/FileInput.js +9 -4
  34. package/react/components/common/FileInput.js.map +1 -1
  35. package/react/components/common/FinsembleIcon.d.ts +1 -1
  36. package/react/components/common/FinsembleIcon.js +18 -0
  37. package/react/components/common/FinsembleIcon.js.map +1 -1
  38. package/react/components/common/FinsembleSelect.js +1 -1
  39. package/react/components/common/FinsembleSelect.js.map +1 -1
  40. package/react/components/common/Header.js +1 -1
  41. package/react/components/common/Header.js.map +1 -1
  42. package/react/components/common/InputTable.d.ts +11 -0
  43. package/react/components/common/InputTable.js +50 -0
  44. package/react/components/common/InputTable.js.map +1 -0
  45. package/react/components/common/Tooltip.js +3 -1
  46. package/react/components/common/Tooltip.js.map +1 -1
  47. package/react/components/common/css/accordion.css +99 -0
  48. package/react/components/common/css/application-edit-page.css +209 -2
  49. package/react/components/common/css/application-list.css +6 -0
  50. package/react/components/common/css/button.css +9 -7
  51. package/react/components/common/css/checkbox.css +30 -0
  52. package/react/components/common/css/file-input.css +16 -0
  53. package/react/components/common/css/header.css +1 -14
  54. package/react/components/common/css/preload-edit-page.css +37 -0
  55. package/react/components/common/css/styles.css +0 -1
  56. package/react/components/common/css/tab.css +1 -1
  57. package/react/components/common/stories/Accordion.stories.d.ts +14 -0
  58. package/react/components/common/stories/Accordion.stories.js +42 -0
  59. package/react/components/common/stories/Accordion.stories.js.map +1 -0
  60. package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
  61. package/react/components/common/stories/DropdownButton.stories.js +12 -0
  62. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  63. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  64. package/react/components/common/stories/FileInput.stories.js +6 -0
  65. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  66. package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
  67. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  68. package/react/components/common/stories/InputTable.stories.d.ts +12 -0
  69. package/react/components/common/stories/InputTable.stories.js +35 -0
  70. package/react/components/common/stories/InputTable.stories.js.map +1 -0
  71. package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
  72. package/react/components/common/tests/Accordion.spec.js +53 -0
  73. package/react/components/common/tests/Accordion.spec.js.map +1 -0
  74. package/react/components/common/tests/Checkbox.spec.js +5 -3
  75. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  76. package/react/components/common/tests/FileInput.spec.js +20 -5
  77. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  78. package/react/components/common/tests/Header.spec.js +6 -2
  79. package/react/components/common/tests/Header.spec.js.map +1 -1
  80. package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
  81. package/react/components/common/tests/InputTable.spec.js +166 -0
  82. package/react/components/common/tests/InputTable.spec.js.map +1 -0
  83. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  84. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  85. package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
  86. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  87. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
  88. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  89. package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
  90. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  91. package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
  92. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  93. package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
  94. package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
  95. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  96. package/react/components/linker/remoteRedux.d.ts +1 -1
  97. package/react/components/linker/remoteRedux.js.map +1 -1
  98. package/react/components/menu/Menu.d.ts +1 -0
  99. package/react/components/menu/Menu.js.map +1 -1
  100. package/react/components/menu/MenuAutoResizer.d.ts +2 -1
  101. package/react/components/menu/MenuAutoResizer.js +4 -3
  102. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  103. package/react/components/menu/MenuPortal.js +118 -92
  104. package/react/components/menu/MenuPortal.js.map +1 -1
  105. package/react/components/menu/MenuShell.d.ts +1 -0
  106. package/react/components/menu/MenuShell.js +3 -2
  107. package/react/components/menu/MenuShell.js.map +1 -1
  108. package/react/components/menu/menuContext.d.ts +1 -0
  109. package/react/components/menu/menuContext.js.map +1 -1
  110. package/react/components/menu/menuHelpers.d.ts +1 -1
  111. package/react/components/menu/menuHelpers.js +2 -2
  112. package/react/components/menu/menuHelpers.js.map +1 -1
  113. package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
  114. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  115. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
  116. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  117. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
  118. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  119. package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
  120. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  121. package/react/components/notifications/components/shared/IconButton.js +5 -1
  122. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  123. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  124. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  125. package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
  126. package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
  127. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  128. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
  129. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  130. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
  131. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  132. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  133. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  134. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  135. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  136. package/react/components/notifications/components/views/CardView.js.map +1 -1
  137. package/react/components/notifications/components/views/ListView.d.ts +1 -1
  138. package/react/components/notifications/components/views/ListView.js.map +1 -1
  139. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
  140. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  141. package/react/components/notifications/types.d.ts +1 -1
  142. package/react/components/notifications/types.js.map +1 -1
  143. package/react/components/notifications/utils.d.ts +1 -1
  144. package/react/components/notifications/utils.js.map +1 -1
  145. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  146. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  147. package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
  148. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  149. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +3 -3
  150. package/react/components/processMonitor/stores/ProcessMonitorStore.js +49 -49
  151. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  152. package/react/components/search/SearchResult.js +4 -3
  153. package/react/components/search/SearchResult.js.map +1 -1
  154. package/react/components/shared/DefaultDropdownButton.js +1 -1
  155. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  156. package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
  157. package/react/components/smartDesktopDesigner/AddApp.js +60 -0
  158. package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
  159. package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
  160. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  161. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +6 -19
  162. package/react/components/smartDesktopDesigner/AppEditPage.js +552 -59
  163. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  164. package/react/components/smartDesktopDesigner/Appearance.css +8 -67
  165. package/react/components/smartDesktopDesigner/Appearance.js +1 -1
  166. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  167. package/react/components/smartDesktopDesigner/Application.d.ts +11 -3
  168. package/react/components/smartDesktopDesigner/Application.js +155 -104
  169. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  170. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -3
  171. package/react/components/smartDesktopDesigner/Applications.js +67 -107
  172. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  173. package/react/components/smartDesktopDesigner/Authentication.js +2 -9
  174. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  175. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
  176. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  177. package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
  178. package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
  179. package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
  180. package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
  181. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  182. package/react/components/smartDesktopDesigner/EditPreload.d.ts +14 -0
  183. package/react/components/smartDesktopDesigner/EditPreload.js +169 -0
  184. package/react/components/smartDesktopDesigner/EditPreload.js.map +1 -0
  185. package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
  186. package/react/components/smartDesktopDesigner/Export.js +40 -9
  187. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  188. package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
  189. package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
  190. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  191. package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
  192. package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
  193. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  194. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
  195. package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
  196. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  197. package/react/components/smartDesktopDesigner/ItemList.d.ts +17 -0
  198. package/react/components/smartDesktopDesigner/ItemList.js +58 -0
  199. package/react/components/smartDesktopDesigner/ItemList.js.map +1 -0
  200. package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
  201. package/react/components/smartDesktopDesigner/Navigation.js +17 -15
  202. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  203. package/react/components/smartDesktopDesigner/OptionalSettingsView.d.ts +11 -0
  204. package/react/components/smartDesktopDesigner/OptionalSettingsView.js +71 -0
  205. package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +1 -0
  206. package/react/components/smartDesktopDesigner/Preloads.d.ts +8 -0
  207. package/react/components/smartDesktopDesigner/Preloads.js +26 -0
  208. package/react/components/smartDesktopDesigner/Preloads.js.map +1 -0
  209. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  210. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
  211. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
  212. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  213. package/react/components/smartDesktopDesigner/ThemePage.css +0 -1
  214. package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
  215. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  216. package/react/components/smartDesktopDesigner/Themes.js +0 -2
  217. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  218. package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
  219. package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
  220. package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
  221. package/react/components/smartDesktopDesigner/View.js +1 -1
  222. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  223. package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
  224. package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
  225. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  226. package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
  227. package/react/components/smartDesktopDesigner/common/views.js +168 -111
  228. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  229. package/react/components/smartDesktopDesigner/css/appearance.css +20 -9
  230. package/react/components/smartDesktopDesigner/css/applications.css +40 -0
  231. package/react/components/smartDesktopDesigner/css/authentication.css +5 -11
  232. package/react/components/smartDesktopDesigner/css/export.css +32 -19
  233. package/react/components/smartDesktopDesigner/css/getting-started.css +22 -0
  234. package/react/components/smartDesktopDesigner/css/nav.css +38 -11
  235. package/react/components/smartDesktopDesigner/css/project-header.css +19 -16
  236. package/react/components/smartDesktopDesigner/css/styles.css +2 -3
  237. package/react/components/smartDesktopDesigner/css/views.css +11 -4
  238. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +3 -1
  239. package/react/components/smartDesktopDesigner/fixtures/apps.js +63 -6
  240. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  241. package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
  242. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  243. package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +22 -0
  244. package/react/components/smartDesktopDesigner/fixtures/preloads.js +40 -0
  245. package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +1 -0
  246. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +1 -1
  247. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  248. package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
  249. package/react/components/smartDesktopDesigner/fixtures/views.js +67 -26
  250. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  251. package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
  252. package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
  253. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  254. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
  255. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +13 -33
  256. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  257. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
  258. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
  259. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
  260. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +11 -0
  261. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +35 -0
  262. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +1 -0
  263. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
  264. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
  265. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  266. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
  267. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
  268. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  269. package/react/components/smartDesktopDesigner/stories/ItemList.stories.d.ts +16 -0
  270. package/react/components/smartDesktopDesigner/stories/{ApplicationList.stories.js → ItemList.stories.js} +30 -23
  271. package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +1 -0
  272. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.d.ts +11 -0
  273. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +28 -0
  274. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +1 -0
  275. package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +11 -0
  276. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +31 -0
  277. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +1 -0
  278. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
  279. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  280. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
  281. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
  282. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
  283. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1100 -308
  284. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  285. package/react/components/smartDesktopDesigner/tests/{ApplicationSetup.spec.d.ts → Application.spec.d.ts} +0 -0
  286. package/react/components/smartDesktopDesigner/tests/Application.spec.js +1496 -0
  287. package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +1 -0
  288. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  289. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +62 -561
  290. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  291. package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
  292. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
  293. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
  294. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.d.ts +1 -0
  295. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js +61 -0
  296. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +1 -0
  297. package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
  298. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  299. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
  300. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  301. package/react/components/smartDesktopDesigner/tests/ItemList.spec.d.ts +1 -0
  302. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.js → ItemList.spec.js} +8 -8
  303. package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +1 -0
  304. package/react/components/smartDesktopDesigner/tests/Preloads.spec.d.ts +1 -0
  305. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +47 -0
  306. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +1 -0
  307. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
  308. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  309. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +7 -30
  310. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  311. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
  312. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
  313. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
  314. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
  315. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
  316. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
  317. package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
  318. package/react/components/toolbar/DragHandle.spec.js +31 -0
  319. package/react/components/toolbar/DragHandle.spec.js.map +1 -0
  320. package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
  321. package/react/components/toolbar/DragHandle.stories.js +39 -0
  322. package/react/components/toolbar/DragHandle.stories.js.map +1 -0
  323. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
  324. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  325. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
  326. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  327. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  328. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
  329. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
  330. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  331. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
  332. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  333. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
  334. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  335. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  336. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  337. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
  338. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  339. package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
  340. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  341. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +3 -2
  342. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
  343. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  344. package/react/components/toolbar/dashbar/Dashbar.js +12 -13
  345. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  346. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
  347. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  348. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  349. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  350. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  351. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  352. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
  353. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +1 -1
  354. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  355. package/react/components/userPreferences/components/content/Workspaces.d.ts +1 -1
  356. package/react/components/userPreferences/components/content/Workspaces.js +1 -1
  357. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  358. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  359. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  360. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +1 -1
  361. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  362. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
  363. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  364. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +4 -2
  365. package/react/components/windowTitleBar/WindowTitleBarShell.js +60 -52
  366. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  367. package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
  368. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  369. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  370. package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -3
  371. package/react/components/windowTitleBar/components/center/TabList.js +19 -79
  372. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  373. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  374. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  375. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
  376. package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
  377. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  378. package/react/components/windowTitleBar/components/windowTitle.d.ts +9 -5
  379. package/react/components/windowTitleBar/components/windowTitle.js +154 -42
  380. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  381. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
  382. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +214 -214
  383. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  384. package/react/enzymeSetup.js +1 -1
  385. package/react/enzymeSetup.js.map +1 -1
  386. package/react/hooks/useDashbar.d.ts +8 -0
  387. package/react/hooks/useDashbar.js +104 -0
  388. package/react/hooks/useDashbar.js.map +1 -0
  389. package/react/hooks/useFavoritesShell.js.map +1 -1
  390. package/react/hooks/useNotifications.d.ts +1 -1
  391. package/react/hooks/useNotifications.js.map +1 -1
  392. package/react/hooks/useToolbar.d.ts +0 -6
  393. package/react/hooks/useToolbar.js +0 -101
  394. package/react/hooks/useToolbar.js.map +1 -1
  395. package/react/reducers/rootReducer.d.ts +11 -7
  396. package/react/reducers/smartDesktopDesignerReducer.js +8 -3
  397. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  398. package/react/store.d.ts +22 -14
  399. package/react/types/fdc3.d.ts +7 -35
  400. package/react/types/fdc3.js.map +1 -1
  401. package/react/types/searchTypes.d.ts +1 -8
  402. package/react/types/searchTypes.js.map +1 -1
  403. package/react/types/smartDesktopDesignerTypes.d.ts +52 -6
  404. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  405. package/react/types/windowTitleBar.d.ts +4 -2
  406. package/react/types/windowTitleBar.js.map +1 -1
  407. package/react/components/common/FontSizeSelector.d.ts +0 -7
  408. package/react/components/common/FontSizeSelector.js +0 -42
  409. package/react/components/common/FontSizeSelector.js.map +0 -1
  410. package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
  411. package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
  412. package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
  413. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
  414. package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
  415. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
  416. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -15
  417. package/react/components/smartDesktopDesigner/ApplicationList.js +0 -56
  418. package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
  419. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
  420. package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
  421. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
  422. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
  423. package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
  424. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
  425. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
  426. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
  427. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
  428. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
  429. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
  430. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
  431. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
  432. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
  433. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
  434. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -15
  435. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
  436. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
  437. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
  438. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
  439. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
  440. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
  441. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
  442. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
  443. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
  444. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
  445. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
  446. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
  447. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
  448. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
@@ -5,35 +5,30 @@
5
5
  import React, { useEffect, useState } from "react";
6
6
  import { useSelector, useDispatch } from "../../store";
7
7
  import { View } from "./View";
8
- import { Tab } from "../common/Tab";
9
8
  import { Header } from "../common/Header";
10
- import { FinsembleSelect } from "../common/FinsembleSelect";
11
9
  import { Button } from "../common/Button";
12
10
  import { Content } from "./Content";
13
11
  import { Application, ApplicationCloseReason } from "./Application";
14
- import { ApplicationList } from "./ApplicationList";
12
+ import { ItemList } from "./ItemList";
15
13
  import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
16
14
  import { DropZone } from "../common/DropZone";
17
15
  import { generateDefaultConfig } from "./sdd_helpers";
18
16
  import { launchTutorialLink } from "./common/fsbl_functions";
19
17
  import { validateFilename, VALID_APP_EXTENSIONS } from "../common/file_helpers";
20
- const MENU_NAME_MAX_LENGTH = 50;
18
+ import { AddApp } from "./AddApp";
21
19
  const EMPTY_MENU_ERROR = {
22
20
  viewId: "applications",
23
21
  message: "One or more of your app menus is empty",
24
22
  };
25
23
  export const Applications = (props) => {
26
- var _a;
27
24
  const dispatch = useDispatch();
28
- const [currentMenuID, setCurrentMenuID] = useState("");
29
- const [menuName, setMenuName] = useState("");
30
- const [focusOnMenu, setFocusOnMenu] = useState(false);
31
- const [selectedApps, setSelectedApps] = useState([]);
25
+ const [editMode, setEditMode] = useState(false);
32
26
  const apps = useSelector((state) => state.smartDesktopDesigner.apps);
33
27
  const menus = useSelector((state) => state.smartDesktopDesigner.menus);
28
+ const preloads = useSelector((state) => state.smartDesktopDesigner.preloads);
34
29
  const newAppID = useSelector((state) => state.smartDesktopDesigner.newAppId);
35
30
  const currentAppID = useSelector((state) => state.smartDesktopDesigner.currentAppId);
36
- if (Object.values(menus).every((menu) => menu.applications.length > 1)) {
31
+ if (Object.values(menus).every((menu) => menu.applications.length > 0)) {
37
32
  dispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));
38
33
  }
39
34
  else {
@@ -42,45 +37,19 @@ export const Applications = (props) => {
42
37
  function updateAppList() {
43
38
  props.getApps().then((response) => {
44
39
  dispatch(SmartDesktopDesignerActions.update_apps(response.apps));
45
- props.getMenus().then((getMenusResponse) => {
46
- dispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));
47
- });
48
40
  });
49
41
  }
42
+ const updatePreloadList = async () => {
43
+ const { preloads } = await props.getPreloads();
44
+ dispatch(SmartDesktopDesignerActions.update_preloads(preloads));
45
+ };
50
46
  function setCurrentAppID(id) {
51
47
  if (id === null) {
52
48
  dispatch(SmartDesktopDesignerActions.new_app(null));
53
49
  }
54
- setFocusOnMenu(false);
55
50
  dispatch(SmartDesktopDesignerActions.set_current_app_id(id));
56
51
  updateAppList();
57
52
  }
58
- const updateMenuItem = () => {
59
- const whenDone = () => {
60
- updateAppList();
61
- setMenuName("");
62
- setFocusOnMenu(true);
63
- setCurrentMenuID("");
64
- };
65
- if (currentMenuID == "new") {
66
- props
67
- .addMenu({
68
- displayName: menuName,
69
- applications: selectedApps,
70
- position: -1,
71
- })
72
- .then(whenDone);
73
- }
74
- else {
75
- props
76
- .updateMenu(currentMenuID, {
77
- displayName: menuName,
78
- applications: selectedApps,
79
- position: menus[currentMenuID].position,
80
- })
81
- .then(whenDone);
82
- }
83
- };
84
53
  const removeAppID = (id) => {
85
54
  props.deleteApp(id).then(({ err }) => {
86
55
  if (err) {
@@ -100,18 +69,10 @@ export const Applications = (props) => {
100
69
  });
101
70
  });
102
71
  };
103
- const removeMenuID = (id) => {
104
- props.deleteMenu(id).then(({ err }) => {
105
- if (err) {
106
- alert(err);
107
- }
108
- updateAppList();
109
- });
110
- };
111
- const addNewMenu = () => {
112
- setCurrentMenuID("new");
113
- };
114
- useEffect(updateAppList, []);
72
+ useEffect(() => {
73
+ updateAppList();
74
+ updatePreloadList();
75
+ }, []);
115
76
  const addDroppedApp = (file, index) => {
116
77
  const appId = String(new Date().getTime() + index);
117
78
  const { path } = file;
@@ -134,6 +95,42 @@ export const Applications = (props) => {
134
95
  });
135
96
  });
136
97
  };
98
+ const addAppByUrl = (url, displayName) => {
99
+ const appId = String(new Date().getTime());
100
+ setEditMode(false);
101
+ props.getAppConfigTemplate().then((response) => {
102
+ var _a, _b;
103
+ const { config } = response;
104
+ config.name = displayName;
105
+ config.appId = appId;
106
+ config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
107
+ config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
108
+ delete config.manifest.window.windowType;
109
+ delete config.manifest.window.path;
110
+ config.manifest.window.url = url;
111
+ props.addApp(appId, config).then(() => {
112
+ updateAppList();
113
+ });
114
+ });
115
+ };
116
+ const addAppByPath = (path, displayName) => {
117
+ const appId = String(new Date().getTime());
118
+ setEditMode(false);
119
+ props.getAppConfigTemplate().then((response) => {
120
+ var _a, _b;
121
+ const { config } = response;
122
+ config.name = displayName;
123
+ config.appId = appId;
124
+ config.manifest = (_a = config.manifest) !== null && _a !== void 0 ? _a : {};
125
+ config.manifest.window = (_b = config.manifest.window) !== null && _b !== void 0 ? _b : {};
126
+ config.manifest.window.windowType = "assimilation";
127
+ config.manifest.window.path = path;
128
+ delete config.manifest.window.url;
129
+ props.addApp(appId, config).then(() => {
130
+ updateAppList();
131
+ });
132
+ });
133
+ };
137
134
  const onClose = (reason) => {
138
135
  if (reason === ApplicationCloseReason.NEW) {
139
136
  dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
@@ -152,75 +149,38 @@ export const Applications = (props) => {
152
149
  apps,
153
150
  addApp: props.addApp,
154
151
  deleteApp: props.deleteApp,
152
+ updateApp: props.updateApp,
155
153
  getAppConfigTemplate: props.getAppConfigTemplate,
156
154
  setCurrentAppID,
157
155
  onClose,
158
156
  isInboundInteropAuthorized: props.isInboundInteropAuthorized,
159
157
  isOutboundInteropAuthorized: props.isOutboundInteropAuthorized,
158
+ preloads,
160
159
  };
161
160
  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);
161
+ items: apps.filter((app) => { var _a; return !((_a = app === null || app === void 0 ? void 0 : app.manifest) === null || _a === void 0 ? void 0 : _a.temporary); }),
162
+ clickItem: (appID) => {
163
+ FSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, (err, data) => { });
165
164
  },
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);
165
+ editItem: (appID) => {
166
+ setCurrentAppID(appID);
183
167
  },
184
- deleteApp: removeMenuID,
185
- };
186
- const backFunction = () => {
187
- setFocusOnMenu(true);
188
- setCurrentMenuID("");
168
+ deleteItem: removeAppID,
189
169
  };
190
170
  const helpFunction = () => {
191
- launchTutorialLink("managing-applications");
171
+ launchTutorialLink("SDD-02-ManageApps");
192
172
  };
193
173
  const addApp = () => {
194
- dispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));
174
+ setEditMode(!editMode);
195
175
  };
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"),
198
- React.createElement(Content, null,
199
- React.createElement("div", { className: "app-edit-field" },
200
- React.createElement("label", { htmlFor: "menu-name" }, "Name"),
201
- React.createElement("input", { type: "text", id: "menu-name", value: menuName, onChange: (e) => {
202
- setMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));
203
- } })),
204
- React.createElement("div", { className: "app-edit-field" },
205
- React.createElement("label", { htmlFor: "menu-group" }, "Group Contents"),
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 })),
207
- React.createElement("div", { className: "app-edit-actions" },
208
- React.createElement("span", null),
209
- React.createElement(Button, { fashion: "secondary", text: "Save", disabled: menuName.length <= 0, onClick: updateMenuItem }))))) : (React.createElement(View, null,
210
- React.createElement(Header, { helpFunction: helpFunction }, "Apps"),
176
+ return (React.createElement(React.Fragment, null, currentAppID ? (React.createElement(Application, Object.assign({}, applicationProps))) : (React.createElement(View, null,
177
+ React.createElement(Header, { helpFunction: helpFunction }, "Manage apps"),
211
178
  React.createElement(Content, null,
212
- React.createElement(Tab, { autofocus: focusOnMenu ? 1 : 0 },
213
- React.createElement("div", { "data-label": "Apps" },
214
- React.createElement("div", { className: "frontmatter" }, "Drag an app into the list or click the Add button."),
215
- React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: addApp }),
216
- React.createElement(DropZone, { processFile: addDroppedApp },
217
- React.createElement(ApplicationList, Object.assign({}, dropZoneProps)))),
218
- React.createElement("div", { "data-label": "Menus" },
219
- React.createElement("div", { className: "frontmatter" },
220
- "This screen allows you to make menus that will appear on your Toolbar.",
221
- React.createElement("br", null),
222
- "You are allowed a maximum of five Menus."),
223
- React.createElement(Button, { className: "icon-before-add", fashion: "primary", text: "Add", iconBefore: "plus", disabled: Object.keys(menus).length >= 5, onClick: addNewMenu }),
224
- React.createElement(ApplicationList, Object.assign({}, applicationListProps)))))))));
179
+ React.createElement("div", { "data-label": "Apps" },
180
+ React.createElement("div", { className: "frontmatter" }, "Click Add or drag your apps into the list."),
181
+ React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: addApp }),
182
+ React.createElement(AddApp, { show: editMode, checkValidURL: FSBL.Clients.SmartDesktopClient.checkValidURL, addAppByUrl: addAppByUrl, addAppByPath: addAppByPath, close: addApp }),
183
+ React.createElement(DropZone, { processFile: addDroppedApp },
184
+ React.createElement(ItemList, Object.assign({}, dropZoneProps)))))))));
225
185
  };
226
186
  //# 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,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AM,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":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\nimport { Tab } from \"../common/Tab\";\nimport { Header } from \"../common/Header\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { Application, ApplicationCloseReason } from \"./Application\";\nimport { ApplicationList } from \"./ApplicationList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\nimport { ApplicationProps } from \"./Application\";\nimport { ApplicationListProps } from \"./ApplicationList\";\nimport { services } from \"@finsemble/finsemble-core/\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nconst MENU_NAME_MAX_LENGTH = 50;\n\nexport type ApplicationsProps = {\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\n\tdeleteMenu: (value: string) => Promise<{ err: any }>;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"applications\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Applications = (props: ApplicationsProps) => {\n\tconst dispatch = useDispatch();\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\n\tconst [menuName, setMenuName] = useState(\"\");\n\tconst [focusOnMenu, setFocusOnMenu] = useState(false);\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\n\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 1)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateAppList() {\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t\tprops.getMenus().then((getMenusResponse: any) => {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));\n\t\t\t});\n\t\t});\n\t}\n\n\tfunction setCurrentAppID(id: string | null) {\n\t\tif (id === null) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\n\t\t}\n\t\tsetFocusOnMenu(false);\n\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\n\t\tupdateAppList();\n\t}\n\n\tconst updateMenuItem = () => {\n\t\tconst whenDone = () => {\n\t\t\tupdateAppList();\n\t\t\tsetMenuName(\"\");\n\t\t\tsetFocusOnMenu(true);\n\t\t\tsetCurrentMenuID(\"\");\n\t\t};\n\t\tif (currentMenuID == \"new\") {\n\t\t\tprops\n\t\t\t\t.addMenu({\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: -1,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t} else {\n\t\t\tprops\n\t\t\t\t.updateMenu(currentMenuID, {\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: menus[currentMenuID].position,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t}\n\t};\n\n\tconst removeAppID = (id: string) => {\n\t\t// Delete app from list of apps\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateAppList();\n\n\t\t\t// Remove reference to app from all menus\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\n\t\t\t\t\t\tupdateAppList();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\n\tconst removeMenuID = (id: string) => {\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateAppList();\n\t\t});\n\t};\n\n\tconst addNewMenu = () => {\n\t\tsetCurrentMenuID(\"new\");\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateAppList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(updateAppList, []);\n\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\n\t\tconst appId = String(new Date().getTime() + index);\n\t\tconst { path } = file;\n\n\t\t// Confirm that the file is an executable\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate defaults and then add app with those defaults\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tconst { config }: { config: AppDefinition } = response;\n\t\t\t// Get generated displayName\n\t\t\tconst { displayName } = generateDefaultConfig({\n\t\t\t\t...config,\n\t\t\t\tpath,\n\t\t\t});\n\t\t\tconfig.name = displayName;\n\n\t\t\t// We generated appId above\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst onClose = (reason: ApplicationCloseReason) => {\n\t\tif (reason === ApplicationCloseReason.NEW) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\n\t\t\tsetCurrentAppID(null);\n\t\t} else {\n\t\t\tsetCurrentAppID(null);\n\t\t}\n\t};\n\n\tconst applicationProps: ApplicationProps = {\n\t\tid: currentAppID ?? \"\",\n\t\tapps,\n\t\taddApp: props.addApp,\n\t\tdeleteApp: props.deleteApp,\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\n\t\tsetCurrentAppID,\n\t\tonClose,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t};\n\n\tconst dropZoneProps: ApplicationListProps = {\n\t\tapps: apps.filter((app) => !app?.manifest?.temporary),\n\t\tclickApp: (appID: string) => {\n\t\t\tsetCurrentAppID(appID);\n\t\t},\n\t\tdeleteApp: removeAppID,\n\t};\n\n\tconst applicationListProps = {\n\t\tapps: Object.entries(menus).map(([key, value]) => {\n\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\n\t\t\tmenuObj.appId = key;\n\t\t\tmenuObj.name = menuObj.name ?? menuObj.displayName;\n\t\t\tif (menuObj.applications.length === 0) {\n\t\t\t\tmenuObj.icon = \"warning\";\n\t\t\t}\n\t\t\treturn menuObj;\n\t\t}),\n\t\tclickApp: (menuId: string) => {\n\t\t\tsetCurrentMenuID(menuId);\n\t\t\tsetMenuName(menus[menuId].displayName);\n\t\t\tsetSelectedApps(menus[menuId].applications);\n\t\t},\n\t\tdeleteApp: removeMenuID,\n\t};\n\n\tconst backFunction = () => {\n\t\tsetFocusOnMenu(true);\n\t\tsetCurrentMenuID(\"\");\n\t};\n\n\tconst helpFunction = () => {\n\t\tlaunchTutorialLink(\"managing-applications\");\n\t};\n\n\tconst addApp = () => {\n\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentAppID ? (\n\t\t\t\t<Application {...applicationProps} />\n\t\t\t) : currentMenuID ? (\n\t\t\t\t<View>\n\t\t\t\t\t<Header backFunction={backFunction}>Menus</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tid=\"menu-name\"\n\t\t\t\t\t\t\t\tvalue={menuName}\n\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group Contents</label>\n\t\t\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\n\t\t\t\t\t\t\t\tshowSearch={true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header helpFunction={helpFunction}>Apps</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t<Tab autofocus={focusOnMenu ? 1 : 0}>\n\t\t\t\t\t\t\t<div data-label=\"Apps\">\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">Drag an app into the list or click the Add button.</div>\n\t\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\n\n\t\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\n\t\t\t\t\t\t\t\t\t<ApplicationList {...dropZoneProps} />\n\t\t\t\t\t\t\t\t</DropZone>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div data-label=\"Menus\">\n\t\t\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\n\t\t\t\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\t\t\t\ttext=\"Add\"\n\t\t\t\t\t\t\t\t\ticonBefore=\"plus\"\n\t\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\n\t\t\t\t\t\t\t\t\tonClick={addNewMenu}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<ApplicationList {...applicationListProps} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Tab>\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../../src/components/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;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,E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oBAAC,QAAQ,IAAC,WAAW,EAAE,aAAa;oBACnC,oBAAC,QAAQ,oBAAK,aAAa,EAAI,CACrB,CACN,CAEG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\n// import { Tab } from \"../common/Tab\";\nimport { Header } from \"../common/Header\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { Application, ApplicationCloseReason } from \"./Application\";\nimport { ItemList, ItemListProps } from \"./ItemList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { DropZone, FileWithPath } from \"../common/DropZone\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { MenuType, PreloadType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\nimport { ApplicationProps } from \"./Application\";\nimport { services } from \"@finsemble/finsemble-api/\";\nimport { AddApp } from \"./AddApp\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nexport type ApplicationsProps = {\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\n\tgetPreloads: typeof FSBL.Clients.SmartDesktopClient.prototype.getPreloads;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"applications\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Applications = (props: ApplicationsProps) => {\n\tconst dispatch = useDispatch();\n\tconst [editMode, setEditMode] = useState(false);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\tconst preloads = useSelector<PreloadType[]>((state: RootState) => state.smartDesktopDesigner.preloads);\n\n\tconst newAppID = useSelector((state: RootState) => state.smartDesktopDesigner.newAppId);\n\n\tconst currentAppID = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppId);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 0)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateAppList() {\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t});\n\t}\n\n\tconst updatePreloadList = async () => {\n\t\tconst { preloads } = await props.getPreloads();\n\t\tdispatch(SmartDesktopDesignerActions.update_preloads(preloads));\n\t};\n\n\tfunction setCurrentAppID(id: string | null) {\n\t\tif (id === null) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(null));\n\t\t}\n\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_id(id));\n\t\tupdateAppList();\n\t}\n\n\tconst removeAppID = (id: string) => {\n\t\t// Delete app from list of apps\n\t\tprops.deleteApp(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateAppList();\n\n\t\t\t// Remove reference to app from all menus\n\t\t\tprops.getMenus().then(({ menus: grabbedMenus }: { menus: MenuType }) => {\n\t\t\t\tObject.keys(grabbedMenus).forEach((menuId) => {\n\t\t\t\t\tif (!grabbedMenus[menuId].applications.includes(id)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tgrabbedMenus[menuId].applications.splice(grabbedMenus[menuId].applications.indexOf(id), 1);\n\t\t\t\t\tprops.updateMenu(menuId, grabbedMenus[menuId]).then(() => {\n\t\t\t\t\t\tupdateAppList();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateAppList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(() => {\n\t\tupdateAppList();\n\t\tupdatePreloadList();\n\t}, []);\n\n\tconst addDroppedApp = (file: FileWithPath, index: number) => {\n\t\tconst appId = String(new Date().getTime() + index);\n\t\tconst { path } = file;\n\n\t\t// Confirm that the file is an executable\n\t\tif (path !== undefined && validateFilename(VALID_APP_EXTENSIONS, path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate defaults and then add app with those defaults\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tconst { config }: { config: AppDefinition } = response;\n\t\t\t// Get generated displayName\n\t\t\tconst { displayName } = generateDefaultConfig({\n\t\t\t\t...config,\n\t\t\t\tpath,\n\t\t\t});\n\t\t\tconfig.name = displayName;\n\n\t\t\t// We generated appId above\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst addAppByUrl = (url: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tdelete config.manifest.window.windowType;\n\t\t\tdelete config.manifest.window.path;\n\t\t\tconfig.manifest.window.url = url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\tconst addAppByPath = (path: string, displayName: string) => {\n\t\tconst appId = String(new Date().getTime());\n\t\tsetEditMode(false);\n\t\t// @todo: show loading spinner\n\n\t\tprops.getAppConfigTemplate().then((response: { config: AppDefinition }) => {\n\t\t\tconst { config } = response;\n\t\t\tconfig.name = displayName;\n\t\t\tconfig.appId = appId;\n\n\t\t\t// A file was dropped, so we know this was a file, not a URL\n\t\t\tconfig.manifest = config.manifest ?? {};\n\t\t\tconfig.manifest.window = config.manifest.window ?? {};\n\t\t\tconfig.manifest.window.windowType = \"assimilation\";\n\t\t\tconfig.manifest.window.path = path;\n\t\t\tdelete config.manifest.window.url;\n\n\t\t\t// Add app with defaults\n\t\t\tprops.addApp(appId, config).then(() => {\n\t\t\t\tupdateAppList();\n\t\t\t});\n\t\t});\n\t};\n\n\tconst onClose = (reason: ApplicationCloseReason) => {\n\t\tif (reason === ApplicationCloseReason.NEW) {\n\t\t\tdispatch(SmartDesktopDesignerActions.new_app(new Date().getTime().toString()));\n\t\t} else if (reason === ApplicationCloseReason.CANCEL && currentAppID === newAppID) {\n\t\t\tif (currentAppID) props.deleteApp(currentAppID);\n\t\t\tsetCurrentAppID(null);\n\t\t} else {\n\t\t\tsetCurrentAppID(null);\n\t\t}\n\t};\n\n\tconst applicationProps: ApplicationProps = {\n\t\tid: currentAppID ?? \"\",\n\t\tapps,\n\t\taddApp: props.addApp,\n\t\tdeleteApp: props.deleteApp,\n\t\tupdateApp: props.updateApp,\n\t\tgetAppConfigTemplate: props.getAppConfigTemplate,\n\t\tsetCurrentAppID,\n\t\tonClose,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t\tpreloads,\n\t};\n\n\tconst dropZoneProps: ItemListProps = {\n\t\titems: apps.filter((app) => !app?.manifest?.temporary),\n\t\tclickItem: (appID: string) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow({ componentType: appID }, { spawnIfNotFound: true }, (err, data) => {});\n\t\t},\n\t\teditItem: (appID: string) => {\n\t\t\tsetCurrentAppID(appID);\n\t\t},\n\t\tdeleteItem: removeAppID,\n\t};\n\n\tconst helpFunction = () => {\n\t\tlaunchTutorialLink(\"SDD-02-ManageApps\");\n\t};\n\n\tconst addApp = () => {\n\t\tsetEditMode(!editMode);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentAppID ? (\n\t\t\t\t<Application {...applicationProps} />\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header helpFunction={helpFunction}>Manage apps</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{/* <Tab> */}\n\t\t\t\t\t\t<div data-label=\"Apps\">\n\t\t\t\t\t\t\t<div className=\"frontmatter\">Click Add or drag your apps into the list.</div>\n\t\t\t\t\t\t\t<Button className=\"icon-before-add\" fashion=\"primary\" iconBefore=\"plus\" text=\"Add\" onClick={addApp} />\n\n\t\t\t\t\t\t\t<AddApp\n\t\t\t\t\t\t\t\tshow={editMode}\n\t\t\t\t\t\t\t\tcheckValidURL={FSBL.Clients.SmartDesktopClient.checkValidURL}\n\t\t\t\t\t\t\t\taddAppByUrl={addAppByUrl}\n\t\t\t\t\t\t\t\taddAppByPath={addAppByPath}\n\t\t\t\t\t\t\t\tclose={addApp}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<DropZone processFile={addDroppedApp}>\n\t\t\t\t\t\t\t\t<ItemList {...dropZoneProps} />\n\t\t\t\t\t\t\t</DropZone>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* </Tab> */}\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
@@ -40,7 +40,7 @@ export const Authentication = (props) => {
40
40
  }
41
41
  return (React.createElement(View, null,
42
42
  React.createElement(Header, { helpFunction: () => {
43
- launchTutorialLink("configuring-authentication");
43
+ launchTutorialLink("SDD-05-Authentication");
44
44
  } }, "Authentication"),
45
45
  React.createElement(Content, null,
46
46
  React.createElement("div", { className: "auth-setup-content" },
@@ -61,13 +61,6 @@ export const Authentication = (props) => {
61
61
  shownProvider && (React.createElement("div", { className: "auth-setup-toggle-mode" },
62
62
  React.createElement(Button, { className: "auth-setup-toggle-mode-button", fashion: "ghost", text: !isAdvancedMode ? "Show advanced" : "Hide advanced", onClick: () => {
63
63
  setIsAdvancedMode(!isAdvancedMode);
64
- } })))),
65
- React.createElement("div", { className: "auth-setup-tutorial" },
66
- React.createElement("h3", null, "Step 1"),
67
- React.createElement("p", null, "Select your OAuth2 provider from the dropdown list."),
68
- React.createElement("h3", null, "Step 2"),
69
- React.createElement("p", null, "Copy the provided Redirect URL into the OAuth2 app configuration for your service provider."),
70
- React.createElement("h3", null, "Step 3"),
71
- React.createElement("p", null, "Save the app configuration on your OAuth2 service provider, and then input the given Client ID and any other configuration settings."))))));
64
+ } }))))))));
72
65
  };
73
66
  //# sourceMappingURL=Authentication.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Authentication.js","sourceRoot":"","sources":["../../../src/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ACG,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\";\nimport { Header } from \"../common/Header\";\nimport \"./css/authentication.css\";\nimport { View } from \"./View\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { AuthenticationProviderConfig } from \"./AuthenticationProviderConfig\";\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\nimport { Content } from \"./Content\";\nimport { Tooltip } from \"../common/Tooltip\";\nimport { Button } from \"../common/Button\";\n\nexport type AuthenticationProps = {\n\tgetAuthenticationProviders: () => Promise<AuthenticationProvider[]>;\n\tsetAuthenticationProviders: (authenticationProviders: any) => Promise<Error | null>;\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\n};\n\nexport const Authentication = (props: AuthenticationProps) => {\n\tconst dispatch = useDispatch();\n\tconst authProviders = useSelector((state: RootState) => state.smartDesktopDesigner.authentication.providers);\n\tconst enabledAuthProviders = authProviders.filter((provider) => provider.enabled);\n\n\tconst [isAdvancedMode, setIsAdvancedMode] = useState(false);\n\tconst shownProvider = enabledAuthProviders[0];\n\n\tuseEffect(() => {\n\t\tprops.getAuthenticationProviders().then((providers) => {\n\t\t\tproviders.forEach((provider) => {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(provider));\n\t\t\t});\n\t\t});\n\t}, []);\n\n\tfunction updateAuthProviders(value: AuthenticationProvider | null) {\n\t\tconst name = value ? value.name : \"none\";\n\n\t\tprops\n\t\t\t.setAuthenticationProviders(\n\t\t\t\tauthProviders.map((provider) => {\n\t\t\t\t\tif (name === provider.name) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...value,\n\t\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...provider,\n\t\t\t\t\t\tenabled: false,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t)\n\t\t\t.then(() => {\n\t\t\t\tif (value) {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(value));\n\t\t\t\t}\n\n\t\t\t\tdispatch(SmartDesktopDesignerActions.enable_auth_provider(name));\n\t\t\t});\n\t}\n\n\treturn (\n\t\t<View>\n\t\t\t<Header\n\t\t\t\thelpFunction={() => {\n\t\t\t\t\tlaunchTutorialLink(\"configuring-authentication\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAuthentication\n\t\t\t</Header>\n\t\t\t<Content>\n\t\t\t\t<div className=\"auth-setup-content\">\n\t\t\t\t\t<form className=\"auth-setup-form\" onSubmit={(e) => e.preventDefault()}>\n\t\t\t\t\t\t<div className=\"auth-setup-fields\">\n\t\t\t\t\t\t\t<div className=\"auth-setup-provider\">\n\t\t\t\t\t\t\t\t<div className=\"auth-setup-field\">\n\t\t\t\t\t\t\t\t\t<label>Provider</label>\n\n\t\t\t\t\t\t\t\t\t<select\n\t\t\t\t\t\t\t\t\t\taria-label=\"Authentication Provider\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-select-provider\"\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(authProviders.find((p) => p.name === e.target.value) || null);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tvalue={enabledAuthProviders.map((provider) => provider.name)[0] || \"none\"}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<option value=\"none\">None</option>\n\t\t\t\t\t\t\t\t\t\t{authProviders.map((provider, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<option key={index} value={provider.name}>\n\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<Tooltip>\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.\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{shownProvider && (\n\t\t\t\t\t\t\t\t\t<AuthenticationProviderConfig\n\t\t\t\t\t\t\t\t\t\tkey={shownProvider.name}\n\t\t\t\t\t\t\t\t\t\tvalue={shownProvider}\n\t\t\t\t\t\t\t\t\t\tisAdvancedMode={isAdvancedMode}\n\t\t\t\t\t\t\t\t\t\ttestAuthenticationProvider={props.testAuthenticationProvider}\n\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(value);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{shownProvider && (\n\t\t\t\t\t\t\t<div className=\"auth-setup-toggle-mode\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-toggle-mode-button\"\n\t\t\t\t\t\t\t\t\tfashion=\"ghost\"\n\t\t\t\t\t\t\t\t\ttext={!isAdvancedMode ? \"Show advanced\" : \"Hide advanced\"}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tsetIsAdvancedMode(!isAdvancedMode);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</form>\n\t\t\t\t\t<div className=\"auth-setup-tutorial\">\n\t\t\t\t\t\t<h3>Step 1</h3>\n\n\t\t\t\t\t\t<p>Select your OAuth2 provider from the dropdown list.</p>\n\n\t\t\t\t\t\t<h3>Step 2</h3>\n\n\t\t\t\t\t\t<p>Copy the provided Redirect URL into the OAuth2 app configuration for your service provider.</p>\n\n\t\t\t\t\t\t<h3>Step 3</h3>\n\n\t\t\t\t\t\t<p>\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\n\t\t\t\t\t\t\tother configuration settings.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Content>\n\t\t</View>\n\t);\n};\n"]}
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;IA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IAAI,EACvB,KAAK,EAAE,aAAa,EACpB,cAAc,EAAE,cAAc,EAC9B,0BAA0B,EAAE,KAAK,CAAC,0BAA0B,EAC5D,QAAQ,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,CACF,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { Header } from \"../common/Header\";\nimport \"./css/authentication.css\";\nimport { View } from \"./View\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { AuthenticationProviderConfig } from \"./AuthenticationProviderConfig\";\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\nimport { Content } from \"./Content\";\nimport { Tooltip } from \"../common/Tooltip\";\nimport { Button } from \"../common/Button\";\n\nexport type AuthenticationProps = {\n\tgetAuthenticationProviders: () => Promise<AuthenticationProvider[]>;\n\tsetAuthenticationProviders: (authenticationProviders: any) => Promise<Error | null>;\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\n};\n\nexport const Authentication = (props: AuthenticationProps) => {\n\tconst dispatch = useDispatch();\n\tconst authProviders = useSelector((state: RootState) => state.smartDesktopDesigner.authentication.providers);\n\tconst enabledAuthProviders = authProviders.filter((provider) => provider.enabled);\n\n\tconst [isAdvancedMode, setIsAdvancedMode] = useState(false);\n\tconst shownProvider = enabledAuthProviders[0];\n\n\tuseEffect(() => {\n\t\tprops.getAuthenticationProviders().then((providers) => {\n\t\t\tproviders.forEach((provider) => {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(provider));\n\t\t\t});\n\t\t});\n\t}, []);\n\n\tfunction updateAuthProviders(value: AuthenticationProvider | null) {\n\t\tconst name = value ? value.name : \"none\";\n\n\t\tprops\n\t\t\t.setAuthenticationProviders(\n\t\t\t\tauthProviders.map((provider) => {\n\t\t\t\t\tif (name === provider.name) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...value,\n\t\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...provider,\n\t\t\t\t\t\tenabled: false,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t)\n\t\t\t.then(() => {\n\t\t\t\tif (value) {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_auth_provider(value));\n\t\t\t\t}\n\n\t\t\t\tdispatch(SmartDesktopDesignerActions.enable_auth_provider(name));\n\t\t\t});\n\t}\n\n\treturn (\n\t\t<View>\n\t\t\t<Header\n\t\t\t\thelpFunction={() => {\n\t\t\t\t\tlaunchTutorialLink(\"SDD-05-Authentication\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAuthentication\n\t\t\t</Header>\n\t\t\t<Content>\n\t\t\t\t<div className=\"auth-setup-content\">\n\t\t\t\t\t<form className=\"auth-setup-form\" onSubmit={(e) => e.preventDefault()}>\n\t\t\t\t\t\t<div className=\"auth-setup-fields\">\n\t\t\t\t\t\t\t<div className=\"auth-setup-provider\">\n\t\t\t\t\t\t\t\t<div className=\"auth-setup-field\">\n\t\t\t\t\t\t\t\t\t<label>Provider</label>\n\n\t\t\t\t\t\t\t\t\t<select\n\t\t\t\t\t\t\t\t\t\taria-label=\"Authentication Provider\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-select-provider\"\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(authProviders.find((p) => p.name === e.target.value) || null);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tvalue={enabledAuthProviders.map((provider) => provider.name)[0] || \"none\"}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<option value=\"none\">None</option>\n\t\t\t\t\t\t\t\t\t\t{authProviders.map((provider, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<option key={index} value={provider.name}>\n\t\t\t\t\t\t\t\t\t\t\t\t{provider.name}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<Tooltip>\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.\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{shownProvider && (\n\t\t\t\t\t\t\t\t\t<AuthenticationProviderConfig\n\t\t\t\t\t\t\t\t\t\tkey={shownProvider.name}\n\t\t\t\t\t\t\t\t\t\tvalue={shownProvider}\n\t\t\t\t\t\t\t\t\t\tisAdvancedMode={isAdvancedMode}\n\t\t\t\t\t\t\t\t\t\ttestAuthenticationProvider={props.testAuthenticationProvider}\n\t\t\t\t\t\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\t\t\t\t\t\tupdateAuthProviders(value);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{shownProvider && (\n\t\t\t\t\t\t\t<div className=\"auth-setup-toggle-mode\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"auth-setup-toggle-mode-button\"\n\t\t\t\t\t\t\t\t\tfashion=\"ghost\"\n\t\t\t\t\t\t\t\t\ttext={!isAdvancedMode ? \"Show advanced\" : \"Hide advanced\"}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tsetIsAdvancedMode(!isAdvancedMode);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</Content>\n\t\t</View>\n\t);\n};\n"]}
@@ -3,6 +3,7 @@ import { Button } from "../common/Button";
3
3
  import { ButtonIcon } from "../common/ButtonIcon";
4
4
  import { FinsembleToggle } from "../common/FinsembleToggle";
5
5
  import { Tooltip } from "../common/Tooltip";
6
+ import { FinsembleIcon } from "../common/FinsembleIcon";
6
7
  export const AuthenticationProviderConfig = (props) => {
7
8
  const provider = props.value;
8
9
  const redirectURIField = useRef(null);
@@ -12,6 +13,7 @@ export const AuthenticationProviderConfig = (props) => {
12
13
  const [redirectURI, setRedirectURI] = useState(provider.redirect_uri);
13
14
  const [nonce, setNonce] = useState(provider.nonce);
14
15
  const [authError, setAuthError] = useState(null);
16
+ const [authSuccess, setAuthSuccess] = useState(false);
15
17
  const checkValid = (stateValue, storeValue) => {
16
18
  if (stateValue === storeValue) {
17
19
  return true;
@@ -22,10 +24,12 @@ export const AuthenticationProviderConfig = (props) => {
22
24
  const endpointURLValid = endpointURL && FSBL.Clients.SmartDesktopClient.checkValidURL(endpointURL || "");
23
25
  const save = () => {
24
26
  const providerObject = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, provider), (clientIDValid ? { client_id: clientID } : {})), (endpointURLValid ? { authorization_endpoint: endpointURL } : {})), (redirectURI ? { redirect_uri: redirectURI } : {})), { scope }), { nonce });
27
+ setAuthSuccess(false);
25
28
  setAuthError(null);
26
29
  props
27
30
  .testAuthenticationProvider(providerObject)
28
31
  .then(() => {
32
+ setAuthSuccess(true);
29
33
  props.onChange(providerObject);
30
34
  })
31
35
  .catch((err) => {
@@ -75,7 +79,10 @@ export const AuthenticationProviderConfig = (props) => {
75
79
  authError && React.createElement("div", { className: "auth-setup-error" },
76
80
  "Error: ",
77
81
  authError),
82
+ authSuccess && (React.createElement("div", { className: "auth-setup-success" },
83
+ React.createElement(FinsembleIcon, { icon: "check" }),
84
+ " Configuration Saved")),
78
85
  React.createElement("div", { className: "auth-setup-actions" },
79
- React.createElement(Button, { fashion: "secondary", text: "Test & Save", onClick: save, disabled: !endpointURLValid }))));
86
+ React.createElement(Button, { fashion: "secondary", text: "Test and save", onClick: save, disabled: !endpointURLValid }))));
80
87
  };
81
88
  //# sourceMappingURL=AuthenticationProviderConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationProviderConfig.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AuthenticationProviderConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAS5C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAkC,EAAE,EAAE;IAClF,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;IAE7B,MAAM,gBAAgB,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAE/D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,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":["import React, { useRef, useState } from \"react\";\nimport { AuthenticationProvider } from \"../../types/smartDesktopDesignerTypes\";\nimport { Button } from \"../common/Button\";\nimport { ButtonIcon } from \"../common/ButtonIcon\";\nimport { FinsembleToggle } from \"../common/FinsembleToggle\";\nimport { Tooltip } from \"../common/Tooltip\";\n\nexport type AuthenticationProviderProps = {\n\tvalue: AuthenticationProvider;\n\tonChange: (provider: AuthenticationProvider) => void;\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\n\tisAdvancedMode: boolean;\n};\n\nexport const AuthenticationProviderConfig = (props: AuthenticationProviderProps) => {\n\tconst provider = props.value;\n\n\tconst redirectURIField = useRef<HTMLInputElement | null>(null);\n\n\tconst [clientID, setClientID] = useState(provider.client_id || \"\");\n\tconst [endpointURL, setEndpointURL] = useState(provider.authorization_endpoint);\n\tconst [scope, setScope] = useState(provider.scope);\n\tconst [redirectURI, setRedirectURI] = useState(provider.redirect_uri);\n\tconst [nonce, setNonce] = useState(provider.nonce);\n\tconst [authError, setAuthError] = useState<string | null>(null);\n\n\tconst checkValid = (stateValue: string, storeValue: string) => {\n\t\tif (stateValue === storeValue) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn stateValue.length > 0;\n\t};\n\n\tconst clientIDValid = checkValid(clientID, provider.client_id || \"\");\n\tconst endpointURLValid = endpointURL && FSBL.Clients.SmartDesktopClient.checkValidURL(endpointURL || \"\");\n\n\tconst save = () => {\n\t\tconst providerObject: AuthenticationProvider = {\n\t\t\t...provider,\n\t\t\t...(clientIDValid ? { client_id: clientID } : {}),\n\t\t\t// ...(secretValid ? { secret } : {}),\n\t\t\t...(endpointURLValid ? { authorization_endpoint: endpointURL } : {}),\n\t\t\t...(redirectURI ? { redirect_uri: redirectURI } : {}),\n\t\t\t...{ scope },\n\t\t\t...{ nonce },\n\t\t};\n\n\t\tsetAuthError(null);\n\n\t\tprops\n\t\t\t.testAuthenticationProvider(providerObject)\n\t\t\t.then(() => {\n\t\t\t\tprops.onChange(providerObject);\n\t\t\t})\n\t\t\t.catch((err: any) => {\n\t\t\t\tsetAuthError(err);\n\t\t\t});\n\t};\n\n\tif (!redirectURI) {\n\t\tsetRedirectURI(`https://cloud.finsemble.com/sso/oauth/response`);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{/* The simple fields */}\n\t\t\t<>\n\t\t\t\t<div className=\"auth-setup-field auth-setup-redirect\">\n\t\t\t\t\t<label>Redirect URL</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclassName=\"auth-setup-redirect-input\"\n\t\t\t\t\t\taria-label=\"Redirect URL\"\n\t\t\t\t\t\tref={redirectURIField}\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={redirectURI}\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t/>\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tclassName=\"auth-setup-redirect-button\"\n\t\t\t\t\t\ttext=\"Copy\"\n\t\t\t\t\t\ticon=\"copy\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tconst input = redirectURIField.current as HTMLInputElement;\n\t\t\t\t\t\t\tinput.focus();\n\t\t\t\t\t\t\tinput.select();\n\t\t\t\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t></ButtonIcon>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"auth-setup-field auth-setup-endpoint-url\">\n\t\t\t\t\t<label>Endpoint URL</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\taria-label=\"Endpoint URL\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={endpointURL}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetEndpointURL(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\taria-invalid={!endpointURLValid}\n\t\t\t\t\t/>\n\t\t\t\t\t<Tooltip>OAuth API endpoint URL for your OAuth provider</Tooltip>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"auth-setup-field auth-setup-clientid\">\n\t\t\t\t\t<label>Client ID</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\taria-label=\"Client ID\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={clientID}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetClientID(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\taria-invalid={!clientIDValid}\n\t\t\t\t\t/>\n\t\t\t\t\t<Tooltip>The Client ID is generated by your OAuth provider</Tooltip>\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{/* The advanced fields */}\n\t\t\t{props.isAdvancedMode && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"auth-setup-field auth-setup-scope\">\n\t\t\t\t\t\t<label>Scope Parameter</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\taria-label=\"Scope Parameter\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tvalue={scope}\n\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\tsetScope(e.target.value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Tooltip>The scope accepted by your OAuth provider</Tooltip>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"auth-setup-field auth-setup-nonce\">\n\t\t\t\t\t\t<label>Require Nonce Parameter</label>\n\t\t\t\t\t\t<div className=\"auth-setup-nonce-wrapper\">\n\t\t\t\t\t\t\t<FinsembleToggle\n\t\t\t\t\t\t\t\tlabel=\"Require Nonce Parameter\"\n\t\t\t\t\t\t\t\tchecked={nonce}\n\t\t\t\t\t\t\t\tonChange={(value: boolean) => {\n\t\t\t\t\t\t\t\t\tsetNonce(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></FinsembleToggle>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Tooltip>If the `nonce` parameter is supported by your OAuth provider</Tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{authError && <div className=\"auth-setup-error\">Error: {authError}</div>}\n\n\t\t\t<div className=\"auth-setup-actions\">\n\t\t\t\t<Button fashion=\"secondary\" text=\"Test &amp; Save\" onClick={save} disabled={!endpointURLValid}></Button>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
1
+ {"version":3,"file":"AuthenticationProviderConfig.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AuthenticationProviderConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAkC,EAAE,EAAE;IAClF,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;IAE7B,MAAM,gBAAgB,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAE/D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IACnE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAChF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;I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ticationProvider } from \"../../types/smartDesktopDesignerTypes\";\nimport { Button } from \"../common/Button\";\nimport { ButtonIcon } from \"../common/ButtonIcon\";\nimport { FinsembleToggle } from \"../common/FinsembleToggle\";\nimport { Tooltip } from \"../common/Tooltip\";\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\n\nexport type AuthenticationProviderProps = {\n\tvalue: AuthenticationProvider;\n\tonChange: (provider: AuthenticationProvider) => void;\n\ttestAuthenticationProvider: (provider: AuthenticationProvider) => Promise<null>;\n\tisAdvancedMode: boolean;\n};\n\nexport const AuthenticationProviderConfig = (props: AuthenticationProviderProps) => {\n\tconst provider = props.value;\n\n\tconst redirectURIField = useRef<HTMLInputElement | null>(null);\n\n\tconst [clientID, setClientID] = useState(provider.client_id || \"\");\n\tconst [endpointURL, setEndpointURL] = useState(provider.authorization_endpoint);\n\tconst [scope, setScope] = useState(provider.scope);\n\tconst [redirectURI, setRedirectURI] = useState(provider.redirect_uri);\n\tconst [nonce, setNonce] = useState(provider.nonce);\n\tconst [authError, setAuthError] = useState<string | null>(null);\n\tconst [authSuccess, setAuthSuccess] = useState<boolean>(false);\n\n\tconst checkValid = (stateValue: string, storeValue: string) => {\n\t\tif (stateValue === storeValue) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn stateValue.length > 0;\n\t};\n\n\tconst clientIDValid = checkValid(clientID, provider.client_id || \"\");\n\tconst endpointURLValid = endpointURL && FSBL.Clients.SmartDesktopClient.checkValidURL(endpointURL || \"\");\n\n\tconst save = () => {\n\t\tconst providerObject: AuthenticationProvider = {\n\t\t\t...provider,\n\t\t\t...(clientIDValid ? { client_id: clientID } : {}),\n\t\t\t// ...(secretValid ? { secret } : {}),\n\t\t\t...(endpointURLValid ? { authorization_endpoint: endpointURL } : {}),\n\t\t\t...(redirectURI ? { redirect_uri: redirectURI } : {}),\n\t\t\t...{ scope },\n\t\t\t...{ nonce },\n\t\t};\n\n\t\tsetAuthSuccess(false);\n\t\tsetAuthError(null);\n\n\t\tprops\n\t\t\t.testAuthenticationProvider(providerObject)\n\t\t\t.then(() => {\n\t\t\t\tsetAuthSuccess(true);\n\t\t\t\tprops.onChange(providerObject);\n\t\t\t})\n\t\t\t.catch((err: any) => {\n\t\t\t\tsetAuthError(err);\n\t\t\t});\n\t};\n\n\tif (!redirectURI) {\n\t\tsetRedirectURI(`https://cloud.finsemble.com/sso/oauth/response`);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{/* The simple fields */}\n\t\t\t<>\n\t\t\t\t<div className=\"auth-setup-field auth-setup-redirect\">\n\t\t\t\t\t<label>Redirect URL</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclassName=\"auth-setup-redirect-input\"\n\t\t\t\t\t\taria-label=\"Redirect URL\"\n\t\t\t\t\t\tref={redirectURIField}\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={redirectURI}\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t/>\n\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\tclassName=\"auth-setup-redirect-button\"\n\t\t\t\t\t\ttext=\"Copy\"\n\t\t\t\t\t\ticon=\"copy\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tconst input = redirectURIField.current as HTMLInputElement;\n\t\t\t\t\t\t\tinput.focus();\n\t\t\t\t\t\t\tinput.select();\n\t\t\t\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t></ButtonIcon>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"auth-setup-field auth-setup-endpoint-url\">\n\t\t\t\t\t<label>Endpoint URL</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\taria-label=\"Endpoint URL\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={endpointURL}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetEndpointURL(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\taria-invalid={!endpointURLValid}\n\t\t\t\t\t/>\n\t\t\t\t\t<Tooltip>OAuth API endpoint URL for your OAuth provider</Tooltip>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"auth-setup-field auth-setup-clientid\">\n\t\t\t\t\t<label>Client ID</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\taria-label=\"Client ID\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tvalue={clientID}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetClientID(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\taria-invalid={!clientIDValid}\n\t\t\t\t\t/>\n\t\t\t\t\t<Tooltip>The Client ID is generated by your OAuth provider</Tooltip>\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{/* The advanced fields */}\n\t\t\t{props.isAdvancedMode && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"auth-setup-field auth-setup-scope\">\n\t\t\t\t\t\t<label>Scope Parameter</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\taria-label=\"Scope Parameter\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tvalue={scope}\n\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\tsetScope(e.target.value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Tooltip>The scope accepted by your OAuth provider</Tooltip>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"auth-setup-field auth-setup-nonce\">\n\t\t\t\t\t\t<label>Require Nonce Parameter</label>\n\t\t\t\t\t\t<div className=\"auth-setup-nonce-wrapper\">\n\t\t\t\t\t\t\t<FinsembleToggle\n\t\t\t\t\t\t\t\tlabel=\"Require Nonce Parameter\"\n\t\t\t\t\t\t\t\tchecked={nonce}\n\t\t\t\t\t\t\t\tonChange={(value: boolean) => {\n\t\t\t\t\t\t\t\t\tsetNonce(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></FinsembleToggle>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Tooltip>If the `nonce` parameter is supported by your OAuth provider</Tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{authError && <div className=\"auth-setup-error\">Error: {authError}</div>}\n\t\t\t{authSuccess && (\n\t\t\t\t<div className=\"auth-setup-success\">\n\t\t\t\t\t<FinsembleIcon icon=\"check\" /> Configuration Saved\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<div className=\"auth-setup-actions\">\n\t\t\t\t<Button fashion=\"secondary\" text=\"Test and save\" onClick={save} disabled={!endpointURLValid}></Button>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export interface HeaderProps {
3
+ name?: string;
4
+ }
5
+ export declare const ContentHeader: React.FunctionComponent<HeaderProps>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export const ContentHeader = ({ name }) => {
3
+ name = !name || name == "default" ? "Untitled project" : name;
4
+ const letter = name.substr(0, 1).toUpperCase();
5
+ return (React.createElement("div", { className: "project-header" },
6
+ React.createElement("div", { className: "text-icon project-title-icon" },
7
+ React.createElement("span", null, letter)),
8
+ React.createElement("div", { className: "project-name" }, name)));
9
+ };
10
+ //# sourceMappingURL=ContentHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentHeader.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ContentHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,CAAC,MAAM,aAAa,GAAyC,CAAC,EAAE,IAAI,EAAe,EAAE,EAAE;IAC5F,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAE/C,OAAO,CACN,6BAAK,SAAS,EAAC,gBAAgB;QAC9B,6BAAK,SAAS,EAAC,8BAA8B;YAC5C,kCAAO,MAAM,CAAQ,CAChB;QACN,6BAAK,SAAS,EAAC,cAAc,IAAE,IAAI,CAAO,CACrC,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\n\nexport interface HeaderProps {\n\tname?: string;\n}\n\nexport const ContentHeader: React.FunctionComponent<HeaderProps> = ({ name }: HeaderProps) => {\n\tname = !name || name == \"default\" ? \"Untitled project\" : name;\n\tconst letter = name.substr(0, 1).toUpperCase();\n\n\treturn (\n\t\t<div className=\"project-header\">\n\t\t\t<div className=\"text-icon project-title-icon\">\n\t\t\t\t<span>{letter}</span>\n\t\t\t</div>\n\t\t\t<div className=\"project-name\">{name}</div>\n\t\t</div>\n\t);\n};\n"]}
@@ -6,7 +6,8 @@ import React from "react";
6
6
  import { useSelector } from "../../store";
7
7
  export const CurrentView = ({ theme, views }) => {
8
8
  const currentViewId = useSelector((state) => state.smartDesktopDesigner.currentViewId);
9
- const currentView = views.filter((view) => view.id === currentViewId)[0] || views[0];
9
+ const flatView = views.map((section) => section.views).flat();
10
+ const currentView = flatView.filter((view) => view.id === currentViewId)[0] || views[0];
10
11
  let View = currentView.component;
11
12
  return React.createElement(View, Object.assign({ theme: theme }, currentView.props));
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentView.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/CurrentView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAS1C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAoB,EAAE,EAAE;IACjE,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAElG,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IAErF,IAAI,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC;IAEjC,OAAO,oBAAC,IAAI,kBAAC,KAAK,EAAE,KAAK,IAAO,WAAW,CAAC,KAAa,EAAS,CAAC;AACpE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { ThemeConfig } from \"./SmartDesktopDesigner\";\n\nexport type CurrentViewProps = {\n\ttheme: ThemeConfig;\n\tviews: any[];\n};\n\nexport const CurrentView = ({ theme, views }: CurrentViewProps) => {\n\tconst currentViewId = useSelector((state: RootState) => state.smartDesktopDesigner.currentViewId);\n\n\tconst currentView = views.filter((view) => view.id === currentViewId)[0] || views[0];\n\n\tlet View = currentView.component;\n\n\treturn <View theme={theme} {...(currentView.props as any)}></View>;\n};\n"]}
1
+ {"version":3,"file":"CurrentView.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/CurrentView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAS1C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAoB,EAAE,EAAE;IACjE,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAElG,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IAE9D,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IAExF,IAAI,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC;IAEjC,OAAO,oBAAC,IAAI,kBAAC,KAAK,EAAE,KAAK,IAAO,WAAW,CAAC,KAAa,EAAS,CAAC;AACpE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { ThemeConfig } from \"./SmartDesktopDesigner\";\n\nexport type CurrentViewProps = {\n\ttheme: ThemeConfig;\n\tviews: any[];\n};\n\nexport const CurrentView = ({ theme, views }: CurrentViewProps) => {\n\tconst currentViewId = useSelector((state: RootState) => state.smartDesktopDesigner.currentViewId);\n\n\tconst flatView = views.map((section) => section.views).flat();\n\n\tconst currentView = flatView.filter((view) => view.id === currentViewId)[0] || views[0];\n\n\tlet View = currentView.component;\n\n\treturn <View theme={theme} {...(currentView.props as any)}></View>;\n};\n"]}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "../common/css/preload-edit-page.css";
3
+ import { PreloadType } from "../../types/smartDesktopDesignerTypes";
4
+ export interface EditPreloadProps {
5
+ getConfig: typeof FSBL.Clients.ConfigClient.getValue;
6
+ preload: PreloadType;
7
+ getApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;
8
+ updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
9
+ cancelFunction: Function;
10
+ addPreload: Function;
11
+ updatePreload: Function;
12
+ deletePreload: (alias: string) => Promise<void>;
13
+ }
14
+ export declare const EditPreload: React.FunctionComponent<EditPreloadProps>;