@finsemble/finsemble-ui 6.3.0-beta.20211021 → 6.3.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 (550) hide show
  1. package/README.md +28 -28
  2. package/package.json +3 -2
  3. package/react/actions/favoriteActions.js.map +1 -1
  4. package/react/actions/linkerActions.js.map +1 -1
  5. package/react/actions/menuActions.js.map +1 -1
  6. package/react/actions/rootActions.js.map +1 -1
  7. package/react/actions/searchActions.js.map +1 -1
  8. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  9. package/react/actions/toolbarActions.js.map +1 -1
  10. package/react/actions/workspaceActions.js.map +1 -1
  11. package/react/assets/css/advancedAppLauncher.css +636 -636
  12. package/react/assets/css/appCatalog.css +1069 -1069
  13. package/react/assets/css/authentication.css +78 -78
  14. package/react/assets/css/button.css +220 -220
  15. package/react/assets/css/core/formElements.css +23 -23
  16. package/react/assets/css/core/icons.css +69 -69
  17. package/react/assets/css/core/notifications.css +75 -75
  18. package/react/assets/css/core/windowFrame.css +36 -36
  19. package/react/assets/css/dashbar.css +78 -78
  20. package/react/assets/css/defaultTheme.css +356 -356
  21. package/react/assets/css/dialogs.css +158 -158
  22. package/react/assets/css/favorites.css +101 -101
  23. package/react/assets/css/finsemble.css +38 -38
  24. package/react/assets/css/focus.css +4 -4
  25. package/react/assets/css/font-finance.css +385 -385
  26. package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
  27. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
  28. package/react/assets/css/fonts/font-finance.svg +124 -124
  29. package/react/assets/css/fonts/icons-reference.html +1174 -1174
  30. package/react/assets/css/linkerWindow.css +124 -124
  31. package/react/assets/css/menus.css +195 -195
  32. package/react/assets/css/notificationsCenter.css +597 -597
  33. package/react/assets/css/processMonitor.css +213 -213
  34. package/react/assets/css/search.css +128 -128
  35. package/react/assets/css/shared/animations.css +99 -99
  36. package/react/assets/css/tags.css +136 -136
  37. package/react/assets/css/toolbar.css +413 -413
  38. package/react/assets/css/userPreferences.css +568 -568
  39. package/react/assets/css/windowTitleBar.css +652 -652
  40. package/react/assets/icons/check-square.svg +5 -5
  41. package/react/assets/icons/check.svg +3 -3
  42. package/react/assets/icons/chevron-left.svg +3 -3
  43. package/react/assets/icons/chevron-right.svg +3 -3
  44. package/react/assets/icons/copy.svg +10 -10
  45. package/react/assets/icons/exclamation-circle.svg +4 -4
  46. package/react/assets/icons/external-link.svg +12 -12
  47. package/react/assets/icons/flag.svg +10 -10
  48. package/react/assets/icons/folder.svg +3 -3
  49. package/react/assets/icons/font.svg +3 -3
  50. package/react/assets/icons/globe.svg +3 -3
  51. package/react/assets/icons/hdd.svg +9 -9
  52. package/react/assets/icons/key.svg +10 -10
  53. package/react/assets/icons/life-ring.svg +3 -3
  54. package/react/assets/icons/lock.svg +5 -5
  55. package/react/assets/icons/magic.svg +15 -15
  56. package/react/assets/icons/moon.svg +10 -10
  57. package/react/assets/icons/paint-roller.svg +3 -3
  58. package/react/assets/icons/pencil.svg +10 -10
  59. package/react/assets/icons/plus.svg +3 -3
  60. package/react/assets/icons/question-circle.svg +5 -5
  61. package/react/assets/icons/search.svg +3 -3
  62. package/react/assets/icons/sun.svg +9 -9
  63. package/react/assets/icons/times.svg +3 -3
  64. package/react/assets/icons/toggle-off.svg +6 -6
  65. package/react/assets/icons/toggle-on.svg +6 -6
  66. package/react/assets/icons/tools.svg +3 -3
  67. package/react/assets/icons/trash.svg +12 -12
  68. package/react/assets/icons/upload.svg +10 -10
  69. package/react/assets/icons/window.svg +3 -3
  70. package/react/componentTemplateGenerator.js +85 -85
  71. package/react/componentTemplateGenerator.js.map +1 -1
  72. package/react/components/FinsembleProvider.js.map +1 -1
  73. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  74. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  75. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  76. package/react/components/appCatalog/components/AppList.js.map +1 -1
  77. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  78. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  79. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  80. package/react/components/appCatalog/components/Hero.js.map +1 -1
  81. package/react/components/appCatalog/components/Home.js.map +1 -1
  82. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  83. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  84. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  85. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  86. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  87. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  88. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  89. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  90. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  91. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  92. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  93. package/react/components/appCatalog/components/Tag.js.map +1 -1
  94. package/react/components/appCatalog/components/Toast.js.map +1 -1
  95. package/react/components/appCatalog/components/helpers.js.map +1 -1
  96. package/react/components/appCatalog/index.js.map +1 -1
  97. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  98. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  99. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  100. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  101. package/react/components/common/Button.js.map +1 -1
  102. package/react/components/common/ButtonIcon.js.map +1 -1
  103. package/react/components/common/ButtonRow.js.map +1 -1
  104. package/react/components/common/ButtonTile.js.map +1 -1
  105. package/react/components/common/Checkbox.js.map +1 -1
  106. package/react/components/common/ColorPicker.js.map +1 -1
  107. package/react/components/common/DropZone.js.map +1 -1
  108. package/react/components/common/DropdownButton.js.map +1 -1
  109. package/react/components/common/FileInput.js.map +1 -1
  110. package/react/components/common/FinsembleIcon.js.map +1 -1
  111. package/react/components/common/FinsembleSelect.js.map +1 -1
  112. package/react/components/common/FinsembleToggle.js.map +1 -1
  113. package/react/components/common/FontSizeSelector.js.map +1 -1
  114. package/react/components/common/Header.js.map +1 -1
  115. package/react/components/common/ImagePreview.js.map +1 -1
  116. package/react/components/common/LoadingSpinner.js.map +1 -1
  117. package/react/components/common/Tab.js.map +1 -1
  118. package/react/components/common/Tooltip.js.map +1 -1
  119. package/react/components/common/css/application-edit-page.css +117 -117
  120. package/react/components/common/css/application-list.css +47 -47
  121. package/react/components/common/css/button.css +164 -164
  122. package/react/components/common/css/color-picker.css +52 -52
  123. package/react/components/common/css/drop-zone.css +17 -17
  124. package/react/components/common/css/file-input.css +49 -49
  125. package/react/components/common/css/header.css +43 -43
  126. package/react/components/common/css/icon.css +13 -13
  127. package/react/components/common/css/image-preview.css +57 -57
  128. package/react/components/common/css/loading-spinner.css +39 -39
  129. package/react/components/common/css/selector.css +51 -51
  130. package/react/components/common/css/styles.css +128 -128
  131. package/react/components/common/css/tab.css +56 -56
  132. package/react/components/common/css/toggle.css +32 -32
  133. package/react/components/common/css/tooltip.css +78 -78
  134. package/react/components/common/file_helpers.js.map +1 -1
  135. package/react/components/common/fixtures/FinsembleIcon.css +4 -4
  136. package/react/components/common/helpers.js.map +1 -1
  137. package/react/components/common/stories/Button.stories.js.map +1 -1
  138. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  139. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  140. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  141. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  142. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  143. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  144. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  145. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  146. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  147. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  148. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  149. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  150. package/react/components/common/stories/Header.stories.js.map +1 -1
  151. package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
  152. package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
  153. package/react/components/common/stories/Tab.stories.js.map +1 -1
  154. package/react/components/common/stories/Tooltip.stories.js.map +1 -1
  155. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  156. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  157. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  158. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  159. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  160. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  161. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  162. package/react/components/common/tests/Header.spec.js.map +1 -1
  163. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  164. package/react/components/common/tests/Tab.spec.js.map +1 -1
  165. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  166. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  167. package/react/components/favorites/FavoritesShell.js.map +1 -1
  168. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  169. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  170. package/react/components/favorites/index.js.map +1 -1
  171. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  172. package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
  173. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  174. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  175. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  176. package/react/components/icon/Icon.js.map +1 -1
  177. package/react/components/icon/index.js.map +1 -1
  178. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  179. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  180. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  181. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  182. package/react/components/legacyControls/FinsembleDnDContext.js +1 -1
  183. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  184. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  185. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  186. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  187. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  188. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  189. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  190. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  191. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  192. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  193. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  194. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  195. package/react/components/linker/LinkerMenu.js.map +1 -1
  196. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  197. package/react/components/linker/index.js.map +1 -1
  198. package/react/components/linker/remoteRedux.js.map +1 -1
  199. package/react/components/menu/Menu.js.map +1 -1
  200. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  201. package/react/components/menu/MenuContent.js.map +1 -1
  202. package/react/components/menu/MenuHotKey.js.map +1 -1
  203. package/react/components/menu/MenuItem.js.map +1 -1
  204. package/react/components/menu/MenuPortal.js.map +1 -1
  205. package/react/components/menu/MenuShell.js.map +1 -1
  206. package/react/components/menu/MenuToggle.js.map +1 -1
  207. package/react/components/menu/index.js.map +1 -1
  208. package/react/components/menu/keyboardNavigation.js.map +1 -1
  209. package/react/components/menu/menuContext.js.map +1 -1
  210. package/react/components/menu/menuHelpers.js.map +1 -1
  211. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  212. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  213. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  214. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  215. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  216. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  217. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  218. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  219. package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
  220. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  221. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  222. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  223. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
  224. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  225. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  226. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
  227. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  228. package/react/components/notifications/components/views/CardView.js.map +1 -1
  229. package/react/components/notifications/components/views/ListView.js +1 -1
  230. package/react/components/notifications/components/views/ListView.js.map +1 -1
  231. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  232. package/react/components/notifications/constants.js.map +1 -1
  233. package/react/components/notifications/icons/Card.js.map +1 -1
  234. package/react/components/notifications/icons/Chevron.js.map +1 -1
  235. package/react/components/notifications/icons/CloseIcon.js.map +1 -1
  236. package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
  237. package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
  238. package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
  239. package/react/components/notifications/index.js.map +1 -1
  240. package/react/components/notifications/notificationsContext.js.map +1 -1
  241. package/react/components/notifications/types.js.map +1 -1
  242. package/react/components/notifications/utils.js.map +1 -1
  243. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  244. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  245. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  246. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  247. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  248. package/react/components/processMonitor/constants.js.map +1 -1
  249. package/react/components/processMonitor/helpers.js.map +1 -1
  250. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  251. package/react/components/processMonitor/index.js.map +1 -1
  252. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +1 -0
  253. package/react/components/processMonitor/stores/ProcessMonitorStore.js +2 -1
  254. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  255. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  256. package/react/components/quickComponentForm/index.js.map +1 -1
  257. package/react/components/quickComponentForm/quickComponent.css +3 -3
  258. package/react/components/search/Highlight.js.map +1 -1
  259. package/react/components/search/Highlight.spec.js.map +1 -1
  260. package/react/components/search/Highlight.stories.js.map +1 -1
  261. package/react/components/search/Search.js.map +1 -1
  262. package/react/components/search/SearchBestMatch.js.map +1 -1
  263. package/react/components/search/SearchInput.js.map +1 -1
  264. package/react/components/search/SearchProviderResults.js.map +1 -1
  265. package/react/components/search/SearchResult.js.map +1 -1
  266. package/react/components/search/SearchResults.js.map +1 -1
  267. package/react/components/search/index.js.map +1 -1
  268. package/react/components/shared/Animate.js.map +1 -1
  269. package/react/components/shared/BellIcon.js.map +1 -1
  270. package/react/components/shared/BellIconCrossed.js.map +1 -1
  271. package/react/components/shared/Button.js.map +1 -1
  272. package/react/components/shared/ConditionalWrapper.js.map +1 -1
  273. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  274. package/react/components/shared/NavigationButton.js.map +1 -1
  275. package/react/components/shared/Tag.js.map +1 -1
  276. package/react/components/shared/TagsMenu.js.map +1 -1
  277. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  278. package/react/components/shared/linkerUtil.js.map +1 -1
  279. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  280. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  281. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  282. package/react/components/shared/validateURL.js.map +1 -1
  283. package/react/components/shared/validateURL.spec.js.map +1 -1
  284. package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
  285. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  286. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  287. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  288. package/react/components/singleInputDialog/index.js.map +1 -1
  289. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  290. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  291. package/react/components/smartDesktopDesigner/Appearance.css +94 -94
  292. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
  293. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  294. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  295. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  296. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  297. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  298. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  299. package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
  300. package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
  301. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  302. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  303. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  304. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  305. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  306. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  307. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  308. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  309. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  310. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  311. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
  312. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  313. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  314. package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
  315. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  316. package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
  317. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  318. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  319. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  320. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  321. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  322. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  323. package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
  324. package/react/components/smartDesktopDesigner/css/applications.css +127 -127
  325. package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
  326. package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
  327. package/react/components/smartDesktopDesigner/css/export.css +163 -163
  328. package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
  329. package/react/components/smartDesktopDesigner/css/nav.css +93 -93
  330. package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
  331. package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
  332. package/react/components/smartDesktopDesigner/css/styles.css +179 -179
  333. package/react/components/smartDesktopDesigner/css/views.css +16 -16
  334. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  335. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  336. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  337. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  338. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
  339. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
  341. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  342. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  343. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  344. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  345. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  347. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  349. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
  352. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  353. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  355. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  358. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  362. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  369. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  370. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  371. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  373. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  375. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  377. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  379. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  380. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
  382. package/react/components/system/System.js.map +1 -1
  383. package/react/components/system/System.spec.js.map +1 -1
  384. package/react/components/system/System.stories.js.map +1 -1
  385. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  386. package/react/components/system/index.js.map +1 -1
  387. package/react/components/toolbar/AutoArrange.js.map +1 -1
  388. package/react/components/toolbar/DragHandle.js.map +1 -1
  389. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  390. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  391. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  392. package/react/components/toolbar/NotificationControl.js.map +1 -1
  393. package/react/components/toolbar/RevealAll.js.map +1 -1
  394. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  395. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  396. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  397. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  398. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  399. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  400. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  401. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  402. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  403. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  404. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  405. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  406. package/react/components/toolbar/advancedAppLauncher/components/Content.js +3 -1
  407. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  408. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  409. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  410. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  411. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  412. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  413. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  414. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  415. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  416. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  417. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  418. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  419. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  420. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  421. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  422. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  423. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  424. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  425. package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
  426. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  427. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  428. package/react/components/toolbar/dashbar/Dashbar.js +2 -2
  429. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  430. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  431. package/react/components/toolbar/index.js.map +1 -1
  432. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  433. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  434. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  435. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  436. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  437. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
  438. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  439. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
  440. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  441. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  442. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  443. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  444. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  445. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  446. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
  447. package/react/components/userPreferences/components/content/General.js.map +1 -1
  448. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  449. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  450. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  451. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  452. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  453. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  454. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  455. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  456. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  457. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  458. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  459. package/react/components/userPreferences/index.js.map +1 -1
  460. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  461. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  462. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  463. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  464. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
  465. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  466. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  467. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  468. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  469. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
  470. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  471. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  472. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  473. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  474. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  475. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  476. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  477. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  478. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  479. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  480. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  481. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  482. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  483. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  484. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  485. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  486. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  487. package/react/components/utils.js.map +1 -1
  488. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  489. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  490. package/react/components/windowTitleBar/components/center/TabList.js +1 -1
  491. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  492. package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
  493. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  494. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  495. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  496. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  497. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  498. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  499. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  500. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  501. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  502. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  503. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  504. package/react/components/windowTitleBar/index.js.map +1 -1
  505. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  506. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  507. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  508. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  509. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  510. package/react/components/yesNoDialog/YesNoDialog.css +3 -3
  511. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  512. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  513. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  514. package/react/components/yesNoDialog/index.js.map +1 -1
  515. package/react/components/yesNoDialog/timer.js.map +1 -1
  516. package/react/enzymeSetup.js.map +1 -1
  517. package/react/hooks/index.js.map +1 -1
  518. package/react/hooks/useAuth.js.map +1 -1
  519. package/react/hooks/useDeepEffect.js.map +1 -1
  520. package/react/hooks/useFavorites.js.map +1 -1
  521. package/react/hooks/useFavoritesShell.js.map +1 -1
  522. package/react/hooks/useHotkey.js.map +1 -1
  523. package/react/hooks/useLinker.js.map +1 -1
  524. package/react/hooks/useMenu.js.map +1 -1
  525. package/react/hooks/useNotifications.js.map +1 -1
  526. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  527. package/react/hooks/usePubSub.js.map +1 -1
  528. package/react/hooks/useSearch.js.map +1 -1
  529. package/react/hooks/useToolbar.js.map +1 -1
  530. package/react/hooks/useWorkspace.js.map +1 -1
  531. package/react/reducers/favoriteReducer.js.map +1 -1
  532. package/react/reducers/linkerReducer.js.map +1 -1
  533. package/react/reducers/menuReducer.js.map +1 -1
  534. package/react/reducers/rootReducer.js.map +1 -1
  535. package/react/reducers/searchReducer.js.map +1 -1
  536. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  537. package/react/reducers/toolbarReducer.js.map +1 -1
  538. package/react/reducers/workspaceReducer.js.map +1 -1
  539. package/react/store.js.map +1 -1
  540. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  541. package/react/types/dashbarTypes.js.map +1 -1
  542. package/react/types/favoriteTypes.js.map +1 -1
  543. package/react/types/fdc3.js.map +1 -1
  544. package/react/types/hotkeyTypes.js.map +1 -1
  545. package/react/types/iconTypes.js.map +1 -1
  546. package/react/types/linkerTypes.js.map +1 -1
  547. package/react/types/searchTypes.js.map +1 -1
  548. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  549. package/react/types/windowTitleBar.js.map +1 -1
  550. package/react/types/workspaceTypes.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SingleInputDialog.stories.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,qCAAqC;IAC5C,SAAS,EAAE,iBAAiB;CAC5B,CAAC;AAEF,MA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gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,CAAC;KACjB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,gBAAgB,CAAC,IAAI,GAAG;IACvB,KAAK,EAAE;QACN,KAAK,EAAE,oBAAoB;QAC3B,gBAAgB,EAAE,IAAI;QACtB,YAAY,EAAE,UAAU;KACxB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,GAAG;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,oBAAoB;QAC3B,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,gBAAgB;KAClC;CACD,CAAC","sourcesContent":["import React from \"react\";\r\nimport { SingleInputDialog } from \"./SingleInputDialog\";\r\nimport { initFSBL } from \"../common/helpers\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport \"../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"SingleInputDialog/SingleInputDialog\",\r\n\tcomponent: SingleInputDialog,\r\n};\r\n\r\nconst Template: Story<{}> = (args: any) => {\r\n\tinitFSBL(window);\r\n\r\n\tif (args._data) {\r\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\r\n\t\t\tcb(\"\", { data: args._data });\r\n\t\t};\r\n\t}\r\n\r\n\treturn <SingleInputDialog {...args} />;\r\n};\r\n\r\nexport const Empty = Template.bind({});\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example title\",\r\n\t\tshowCancelButton: true,\r\n\t},\r\n};\r\n\r\nexport const CustomButtonLabels = Template.bind({});\r\nCustomButtonLabels.args = {\r\n\t_data: {\r\n\t\tshowCancelButton: true,\r\n\t\taffirmativeResponseLabel: \"Да\",\r\n\t\tcancelResponseLabel: \"Отмена\",\r\n\t},\r\n};\r\n\r\nexport const NoCancelButton = Template.bind({});\r\nNoCancelButton.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example title\",\r\n\t\tshowCancelButton: false,\r\n\t},\r\n};\r\n\r\nexport const WithMaxLength = Template.bind({});\r\nWithMaxLength.args = {\r\n\t_data: {\r\n\t\ttitle: \"Max length of 5 characters\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputMaxLength: 5,\r\n\t},\r\n};\r\n\r\nexport const WithInputPattern = Template.bind({});\r\nWithInputPattern.args = {\r\n\t_data: {\r\n\t\ttitle: \"Only input numbers\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputPattern: \"^[0-9]+$\",\r\n\t},\r\n};\r\n\r\nexport const WithInputPlaceholder = Template.bind({});\r\nWithInputPlaceholder.args = {\r\n\t_data: {\r\n\t\ttitle: \"Custom Placeholder\",\r\n\t\tshowCancelButton: true,\r\n\t\tinputPlaceholder: \"My placeholder\",\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"SingleInputDialog.stories.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/SingleInputDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,qCAAqC;IAC5C,SAAS,EAAE,iBAAiB;CAC5B,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,GAAG,CAAC,EAAY,EAAE,EAAE;YACpE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,C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B,YAAY,EAAE,UAAU;KACxB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,GAAG;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,oBAAoB;QAC3B,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,gBAAgB;KAClC;CACD,CAAC","sourcesContent":["import React from \"react\";\nimport { SingleInputDialog } from \"./SingleInputDialog\";\nimport { initFSBL } from \"../common/helpers\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"SingleInputDialog/SingleInputDialog\",\n\tcomponent: SingleInputDialog,\n};\n\nconst Template: Story<{}> = (args: any) => {\n\tinitFSBL(window);\n\n\tif (args._data) {\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\n\t\t\tcb(\"\", { data: args._data });\n\t\t};\n\t}\n\n\treturn <SingleInputDialog {...args} />;\n};\n\nexport const Empty = Template.bind({});\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\t_data: {\n\t\ttitle: \"Example title\",\n\t\tshowCancelButton: true,\n\t},\n};\n\nexport const CustomButtonLabels = Template.bind({});\nCustomButtonLabels.args = {\n\t_data: {\n\t\tshowCancelButton: true,\n\t\taffirmativeResponseLabel: \"Да\",\n\t\tcancelResponseLabel: \"Отмена\",\n\t},\n};\n\nexport const NoCancelButton = Template.bind({});\nNoCancelButton.args = {\n\t_data: {\n\t\ttitle: \"Example title\",\n\t\tshowCancelButton: false,\n\t},\n};\n\nexport const WithMaxLength = Template.bind({});\nWithMaxLength.args = {\n\t_data: {\n\t\ttitle: \"Max length of 5 characters\",\n\t\tshowCancelButton: true,\n\t\tinputMaxLength: 5,\n\t},\n};\n\nexport const WithInputPattern = Template.bind({});\nWithInputPattern.args = {\n\t_data: {\n\t\ttitle: \"Only input numbers\",\n\t\tshowCancelButton: true,\n\t\tinputPattern: \"^[0-9]+$\",\n\t},\n};\n\nexport const WithInputPlaceholder = Template.bind({});\nWithInputPlaceholder.args = {\n\t_data: {\n\t\ttitle: \"Custom Placeholder\",\n\t\tshowCancelButton: true,\n\t\tinputPlaceholder: \"My placeholder\",\n\t},\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { SingleInputDialog } from \"./SingleInputDialog\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/singleInputDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { SingleInputDialog } from \"./SingleInputDialog\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppEditAccess.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AppEditAccess.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAcxD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CA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CAAA,EAAA,CACxE,CAAC;iCACF;qCAAM;oCACN,QAAQ,CAAC,IAAI,CAAC;wCACb,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;qCAC/B,CAAC,CAAC;iCACH;4BACF,CAAC,CAAC,CAAC;4BAEH,UAAU,CAAC,QAAQ,CAAC,CAAC;wBACtB,CAAC,EACD,UAAU,EAAE,IAAI,GACE,CACd,CACD,CACD,CACD,CACN,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useEffect, useState } from \"react\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { useDispatch, useSelector } from \"../../store\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport RelativePortal from \"react-relative-portal\";\r\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type AppEditAccessProps = {\r\n\tappName: string;\r\n\trules: ApplicationRule[];\r\n\tonChange: (data: ApplicationRule[]) => any;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const AppEditAccess = (props: AppEditAccessProps) => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\r\n\r\n\tconst [rules, setRules] = useState(props.rules);\r\n\r\n\tconst [scrolling, setScrolling] = useState(false);\r\n\tlet timeout: any = null;\r\n\r\n\tuseEffect(() => {\r\n\t\tconst handleScroll = () => {\r\n\t\t\tsetScrolling(true);\r\n\t\t\tclearTimeout(timeout);\r\n\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\tsetScrolling(false);\r\n\t\t\t}, 50);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"scroll\", handleScroll, { passive: true, capture: true });\r\n\r\n\t\treturn () => window.removeEventListener(\"scroll\", handleScroll);\r\n\t}, []);\r\n\r\n\t/**\r\n\t * Get a list of all apps other than this one (in order to pick which ones to authorize)\r\n\t */\r\n\tconst filteredApps = apps\r\n\t\t.filter((app) => !app.manifest?.temporary && app.name !== props.appName)\r\n\t\t.sort((a, b) => {\r\n\t\t\tif (a.name > b.name) {\r\n\t\t\t\treturn 1;\r\n\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t\treturn 0;\r\n\t\t});\r\n\r\n\t/**\r\n\t * When adding an app, there will not yet be a name. The app that is flagged as temporary is us.\r\n\t * During editing of an app, the app will not be temporary but it will have a name.\r\n\t * We must check for both circumstances in order to know which app in the list is the current app.\r\n\t */\r\n\tconst currentApp = apps.find((app) => app.manifest?.temporary || app.name === props.appName);\r\n\r\n\tconst [inboundAuthorizedApps, setInboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [outboundAuthorizedApps, setOutboundAuthorizedApps] = useState<string[]>([]);\r\n\tconst [advancedExpanded, setAdvancedExpanded] = useState(false);\r\n\r\n\tfunction doSetRules(newRules: ApplicationRule[]) {\r\n\t\tsetRules(newRules);\r\n\r\n\t\tprops.onChange(newRules);\r\n\t}\r\n\r\n\tfunction updateBlockingApp(config: AppDefinition) {\r\n\t\tprops.addApp(config.appId, config).then(() => {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\r\n\t\t});\r\n\t}\r\n\r\n\tfunction getOptions() {\r\n\t\treturn filteredApps.map((app) => {\r\n\t\t\tconst isInboundAuthorized = inboundAuthorizedApps.includes(app.name);\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tclassName={[\"app-edit-access-item\", !isInboundAuthorized ? \"app-edit-access-blocked\" : \"\"].join(\" \")}\r\n\t\t\t\t\tkey={app.name}\r\n\t\t\t\t>\r\n\t\t\t\t\t<span className=\"app-edit-access-item-name\">{app.name}</span>\r\n\t\t\t\t\t{!isInboundAuthorized && (\r\n\t\t\t\t\t\t<RelativePortal\r\n\t\t\t\t\t\t\tclassName={[\"tooltip-portal\", scrolling || !advancedExpanded ? \"is-scrolling\" : \"\"].join(\" \")}\r\n\t\t\t\t\t\t\tcomponent=\"div\"\r\n\t\t\t\t\t\t\tleft={-13}\r\n\t\t\t\t\t\t\ttop={0}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tooltip\r\n\t\t\t\t\t\t\t\ttype=\"lock\"\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tupdateBlockingApp({\r\n\t\t\t\t\t\t\t\t\t\t...app,\r\n\t\t\t\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\t\t\t\t...app.manifest,\r\n\t\t\t\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\t\t\t\t...app.manifest?.interop,\r\n\t\t\t\t\t\t\t\t\t\t\t\tselectConnect: [\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t...(app.manifest?.interop?.selectConnect || []),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorize: [{ name: props.appName || \"\" }],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tThis app is blocking access. Click to allow access\r\n\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t</RelativePortal>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t});\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tif (currentApp) {\r\n\t\t\tfilteredApps.forEach((targetApp) => {\r\n\t\t\t\tif (targetApp.name === props.appName) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isInboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((inboundAuthorized: boolean) => {\r\n\t\t\t\t\t\tif (inboundAuthorized && !inboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetInboundAuthorizedApps([...inboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.isOutboundInteropAuthorized(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t...currentApp,\r\n\t\t\t\t\t\t\tname: props.appName,\r\n\t\t\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttargetApp\r\n\t\t\t\t\t)\r\n\t\t\t\t\t.then((outboundAuthorized: boolean) => {\r\n\t\t\t\t\t\tif (outboundAuthorized && !outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps([...outboundAuthorizedApps, targetApp.name]);\r\n\t\t\t\t\t\t} else if (!outboundAuthorized && outboundAuthorizedApps.includes(targetApp.name)) {\r\n\t\t\t\t\t\t\tconst outboundAuthorizedAppsCopy = outboundAuthorizedApps.slice(0);\r\n\t\t\t\t\t\t\toutboundAuthorizedAppsCopy.splice(outboundAuthorizedAppsCopy.indexOf(targetApp.name), 1);\r\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps(outboundAuthorizedAppsCopy);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{filteredApps.length > 0 && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<div className={[\"app-edit-advanced\", advancedExpanded ? \"is-expanded\" : \"\"].join(\" \")}>\r\n\t\t\t\t\t\t<h2\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tsetAdvancedExpanded(!advancedExpanded);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FinsembleIcon className=\"expand-icon\" icon=\"chevron-right\"></FinsembleIcon> Advanced settings\r\n\t\t\t\t\t\t</h2>\r\n\r\n\t\t\t\t\t\t<div className=\"app-edit-advanced-content\">\r\n\t\t\t\t\t\t\t<div className=\"app-edit-access\">\r\n\t\t\t\t\t\t\t\t<h3>Configure access</h3>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\tUse the controls below to decide which apps this app will be able to share information with. By\r\n\t\t\t\t\t\t\t\t\tdefault, your app is able to share with all other apps.\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t\t<FinsembleIcon icon=\"check-square\"></FinsembleIcon>\r\n\t\t\t\t\t\t\t\t\tChoose which apps to authorize\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t<FinsembleSelect\r\n\t\t\t\t\t\t\t\t\toptions={filteredApps.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\toptionComponents={getOptions()}\r\n\t\t\t\t\t\t\t\t\tselected={filteredApps\r\n\t\t\t\t\t\t\t\t\t\t.filter((app) => outboundAuthorizedApps.includes(app.name))\r\n\t\t\t\t\t\t\t\t\t\t.map((app) => app.name)}\r\n\t\t\t\t\t\t\t\t\tupdateCallback={(selected) => {\r\n\t\t\t\t\t\t\t\t\t\tlet newRules = [...rules];\r\n\r\n\t\t\t\t\t\t\t\t\t\tfilteredApps.forEach((app) => {\r\n\t\t\t\t\t\t\t\t\t\t\tconst isSelected = selected.find((name) => name === app.name);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (!isSelected) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules = newRules.filter((rule) =>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\trule.authorize?.some((auth: { name: string }) => auth.name !== app.name)\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules.push({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tauthorize: [{ name: app.name }],\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\tdoSetRules(newRules);\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\tshowSearch={true}\r\n\t\t\t\t\t\t\t\t></FinsembleSelect>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\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AgB,EAAE,UAAU,EAAE,EAC9B,QAAQ,EAAE,YAAY;6BACpB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;6BAC1D,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EACxB,cAAc,EAAE,CAAC,QAAQ,EAAE,EAAE;4BAC5B,IAAI,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;4BAE1B,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gCAC5B,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;gCAE9D,IAAI,CAAC,UAAU,EAAE;oCAChB,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,WACnC,OAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,IAAI,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA,EAAA,CACxE,CAAC;iCACF;qCAAM;oCACN,QAAQ,CAAC,IAAI,CAAC;wCACb,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;qCAC/B,CAAC,CAAC;iCACH;4BACF,CAAC,CAAC,CAAC;4BAEH,UAAU,CAAC,QAAQ,CAAC,CAAC;wBACtB,CAAC,EACD,UAAU,EAAE,IAAI,GACE,CACd,CACD,CACD,CACD,CACN,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 { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\nimport { Tooltip } from \"../common/Tooltip\";\nimport RelativePortal from \"react-relative-portal\";\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nexport type AppEditAccessProps = {\n\tappName: string;\n\trules: ApplicationRule[];\n\tonChange: (data: ApplicationRule[]) => any;\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nexport const AppEditAccess = (props: AppEditAccessProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\n\tconst [rules, setRules] = useState(props.rules);\n\n\tconst [scrolling, setScrolling] = useState(false);\n\tlet timeout: any = null;\n\n\tuseEffect(() => {\n\t\tconst handleScroll = () => {\n\t\t\tsetScrolling(true);\n\t\t\tclearTimeout(timeout);\n\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\tsetScrolling(false);\n\t\t\t}, 50);\n\t\t};\n\n\t\twindow.addEventListener(\"scroll\", handleScroll, { passive: true, capture: true });\n\n\t\treturn () => window.removeEventListener(\"scroll\", handleScroll);\n\t}, []);\n\n\t/**\n\t * Get a list of all apps other than this one (in order to pick which ones to authorize)\n\t */\n\tconst filteredApps = apps\n\t\t.filter((app) => !app.manifest?.temporary && app.name !== props.appName)\n\t\t.sort((a, b) => {\n\t\t\tif (a.name > b.name) {\n\t\t\t\treturn 1;\n\t\t\t} else if (b.name > a.name) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\n\t/**\n\t * When adding an app, there will not yet be a name. The app that is flagged as temporary is us.\n\t * During editing of an app, the app will not be temporary but it will have a name.\n\t * We must check for both circumstances in order to know which app in the list is the current app.\n\t */\n\tconst currentApp = apps.find((app) => app.manifest?.temporary || app.name === props.appName);\n\n\tconst [inboundAuthorizedApps, setInboundAuthorizedApps] = useState<string[]>([]);\n\tconst [outboundAuthorizedApps, setOutboundAuthorizedApps] = useState<string[]>([]);\n\tconst [advancedExpanded, setAdvancedExpanded] = useState(false);\n\n\tfunction doSetRules(newRules: ApplicationRule[]) {\n\t\tsetRules(newRules);\n\n\t\tprops.onChange(newRules);\n\t}\n\n\tfunction updateBlockingApp(config: AppDefinition) {\n\t\tprops.addApp(config.appId, config).then(() => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\n\t\t});\n\t}\n\n\tfunction getOptions() {\n\t\treturn filteredApps.map((app) => {\n\t\t\tconst isInboundAuthorized = inboundAuthorizedApps.includes(app.name);\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={[\"app-edit-access-item\", !isInboundAuthorized ? \"app-edit-access-blocked\" : \"\"].join(\" \")}\n\t\t\t\t\tkey={app.name}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"app-edit-access-item-name\">{app.name}</span>\n\t\t\t\t\t{!isInboundAuthorized && (\n\t\t\t\t\t\t<RelativePortal\n\t\t\t\t\t\t\tclassName={[\"tooltip-portal\", scrolling || !advancedExpanded ? \"is-scrolling\" : \"\"].join(\" \")}\n\t\t\t\t\t\t\tcomponent=\"div\"\n\t\t\t\t\t\t\tleft={-13}\n\t\t\t\t\t\t\ttop={0}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\ttype=\"lock\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tupdateBlockingApp({\n\t\t\t\t\t\t\t\t\t\t...app,\n\t\t\t\t\t\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t\t\t\t\t\t...app.manifest,\n\t\t\t\t\t\t\t\t\t\t\tinterop: {\n\t\t\t\t\t\t\t\t\t\t\t\t...app.manifest?.interop,\n\t\t\t\t\t\t\t\t\t\t\t\tselectConnect: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t...(app.manifest?.interop?.selectConnect || []),\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tauthorize: [{ name: props.appName || \"\" }],\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t},\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>\n\t\t\t\t\t\t\t\tThis app is blocking access. Click to allow access\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</RelativePortal>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (currentApp) {\n\t\t\tfilteredApps.forEach((targetApp) => {\n\t\t\t\tif (targetApp.name === props.appName) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tprops\n\t\t\t\t\t.isInboundInteropAuthorized(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...currentApp,\n\t\t\t\t\t\t\tname: props.appName,\n\t\t\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t\t\tinterop: {\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttargetApp\n\t\t\t\t\t)\n\t\t\t\t\t.then((inboundAuthorized: boolean) => {\n\t\t\t\t\t\tif (inboundAuthorized && !inboundAuthorizedApps.includes(targetApp.name)) {\n\t\t\t\t\t\t\tsetInboundAuthorizedApps([...inboundAuthorizedApps, targetApp.name]);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\tprops\n\t\t\t\t\t.isOutboundInteropAuthorized(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...currentApp,\n\t\t\t\t\t\t\tname: props.appName,\n\t\t\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t\t\tinterop: {\n\t\t\t\t\t\t\t\t\tselectConnect: rules,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttargetApp\n\t\t\t\t\t)\n\t\t\t\t\t.then((outboundAuthorized: boolean) => {\n\t\t\t\t\t\tif (outboundAuthorized && !outboundAuthorizedApps.includes(targetApp.name)) {\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps([...outboundAuthorizedApps, targetApp.name]);\n\t\t\t\t\t\t} else if (!outboundAuthorized && outboundAuthorizedApps.includes(targetApp.name)) {\n\t\t\t\t\t\t\tconst outboundAuthorizedAppsCopy = outboundAuthorizedApps.slice(0);\n\t\t\t\t\t\t\toutboundAuthorizedAppsCopy.splice(outboundAuthorizedAppsCopy.indexOf(targetApp.name), 1);\n\t\t\t\t\t\t\tsetOutboundAuthorizedApps(outboundAuthorizedAppsCopy);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t});\n\t\t}\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t{filteredApps.length > 0 && (\n\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t<div className={[\"app-edit-advanced\", advancedExpanded ? \"is-expanded\" : \"\"].join(\" \")}>\n\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetAdvancedExpanded(!advancedExpanded);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FinsembleIcon className=\"expand-icon\" icon=\"chevron-right\"></FinsembleIcon> Advanced settings\n\t\t\t\t\t\t</h2>\n\n\t\t\t\t\t\t<div className=\"app-edit-advanced-content\">\n\t\t\t\t\t\t\t<div className=\"app-edit-access\">\n\t\t\t\t\t\t\t\t<h3>Configure access</h3>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tUse the controls below to decide which apps this app will be able to share information with. By\n\t\t\t\t\t\t\t\t\tdefault, your app is able to share with all other apps.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<FinsembleIcon icon=\"check-square\"></FinsembleIcon>\n\t\t\t\t\t\t\t\t\tChoose which apps to authorize\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\t\t\t\toptions={filteredApps.map((app) => app.name)}\n\t\t\t\t\t\t\t\t\toptionComponents={getOptions()}\n\t\t\t\t\t\t\t\t\tselected={filteredApps\n\t\t\t\t\t\t\t\t\t\t.filter((app) => outboundAuthorizedApps.includes(app.name))\n\t\t\t\t\t\t\t\t\t\t.map((app) => app.name)}\n\t\t\t\t\t\t\t\t\tupdateCallback={(selected) => {\n\t\t\t\t\t\t\t\t\t\tlet newRules = [...rules];\n\n\t\t\t\t\t\t\t\t\t\tfilteredApps.forEach((app) => {\n\t\t\t\t\t\t\t\t\t\t\tconst isSelected = selected.find((name) => name === app.name);\n\n\t\t\t\t\t\t\t\t\t\t\tif (!isSelected) {\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules = newRules.filter((rule) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\trule.authorize?.some((auth: { name: string }) => auth.name !== app.name)\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnewRules.push({\n\t\t\t\t\t\t\t\t\t\t\t\t\tauthorize: [{ name: app.name }],\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\tdoSetRules(newRules);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tshowSearch={true}\n\t\t\t\t\t\t\t\t></FinsembleSelect>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppEditPage.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AppEditPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAe,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAiChC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,KAAK,EACrB,UAAU,GAAG,IAAI,EACjB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,EAAE,EACtB,kBAAkB,GAAG,EAAE,EACvB,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,oBAAoB,EACpC,cAAc,GAAG,qBAAqB,EACtC,aAAa,GAAG,EAAE,EAClB,WAAW,EACX,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC,EAC9B,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB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EAAE,CAAC,CAAC,EAAE,EAAE;4BACf,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;wBACrD,CAAC,GACA;oBACF,8BAAM,SAAS,EAAC,MAAM,SAAU,CAC3B,CACI,CACN;QAEN,oBAAC,aAAa,IACb,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,2BAA2B,EAAE,2BAA2B,EACxD,MAAM,EAAE,MAAM,GACE;QAEjB,6BAAK,SAAS,EAAC,kBAAkB;YAChC,iCACE,UAAU,IAAI,CACd,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,mBAAmB,EAAE,CAAC;oBACtB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACpB,CAAC,GACA,CACF,CACI;YAEN,6BAAK,SAAS,EAAC,2BAA2B;gBACzC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,GAAI;gBAC3D,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CACpF,CACD,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { ChangeEvent, useState } from \"react\";\r\nimport { FileInput } from \"../common/FileInput\";\r\nimport { Button } from \"../common/Button\";\r\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\r\nimport \"../common/css/application-edit-page.css\";\r\nimport { AppEditAccess } from \"./AppEditAccess\";\r\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nconst DEFAULT_WINDOW_WIDTH = 1280;\r\nconst DEFAULT_WINDOW_HEIGHT = 600;\r\nconst MINIMUM_WINDOW_WIDTH = 0;\r\nconst MINIMUM_WINDOW_HEIGHT = 0;\r\n\r\nexport type AppEditPageProps = {\r\n\tstartingDisplayName: string;\r\n\tisSetupWizard: boolean;\r\n\tisEditMode: boolean;\r\n\tstartingAppType: string;\r\n\tstartingWindowURL: string;\r\n\tstartingNativePath: string;\r\n\tstartingDescription: string;\r\n\tstartingWidth: number | string;\r\n\tstartingHeight: number | string;\r\n\tstartingRules: ApplicationRule[];\r\n\tvalidateURL: (s: string) => boolean;\r\n\tremoveApplicationFn: () => void;\r\n\tcancelFn: () => void;\r\n\tsubmitFn: (data: SubmittedDataProps) => void;\r\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport type SubmittedDataProps = {\r\n\tname: string;\r\n\turl: string;\r\n\tpath: string;\r\n\tappType: string;\r\n\tdescription: string;\r\n\twidth: number;\r\n\theight: number;\r\n\trules: ApplicationRule[];\r\n};\r\n\r\nexport const AppEditPage = ({\r\n\tstartingDisplayName = \"\",\r\n\tisSetupWizard = false,\r\n\tisEditMode = true,\r\n\tstartingAppType = \"web\",\r\n\tstartingWindowURL = \"\",\r\n\tstartingNativePath = \"\",\r\n\tstartingDescription = \"\",\r\n\tstartingWidth = DEFAULT_WINDOW_WIDTH,\r\n\tstartingHeight = DEFAULT_WINDOW_HEIGHT,\r\n\tstartingRules = [],\r\n\tvalidateURL,\r\n\tremoveApplicationFn = () => {},\r\n\tcancelFn = () => {},\r\n\tsubmitFn,\r\n\taddApp,\r\n\tisInboundInteropAuthorized,\r\n\tisOutboundInteropAuthorized,\r\n}: AppEditPageProps) => {\r\n\tconst [displayName, setDisplayName] = useState(startingDisplayName);\r\n\tconst [currentAppType, setCurrentAppType] = useState(startingAppType);\r\n\tconst [windowURL, setWindowURL] = useState(startingWindowURL);\r\n\tconst [nativePath, setNativePath] = useState(startingNativePath);\r\n\tconst [componentDescription, setComponentDescription] = useState(startingDescription);\r\n\tconst [windowWidth, setWindowWidth] = useState<number | string>(startingWidth || DEFAULT_WINDOW_WIDTH);\r\n\tconst [windowHeight, setWindowHeight] = useState<number | string>(startingHeight || DEFAULT_WINDOW_HEIGHT);\r\n\tconst [rules, setRules] = useState(startingRules || []);\r\n\r\n\tconst isWindowURLValid = validateURL(windowURL);\r\n\tconst isHeightValid = !(typeof windowHeight !== \"number\" || windowHeight < MINIMUM_WINDOW_HEIGHT);\r\n\tconst isWidthValid = !(typeof windowWidth !== \"number\" || windowWidth < MINIMUM_WINDOW_WIDTH);\r\n\r\n\tconst disableSubmit =\r\n\t\t(currentAppType === \"web\" && (!isWindowURLValid || windowURL.length === 0)) ||\r\n\t\t(currentAppType === \"native\" &&\r\n\t\t\t(!nativePath || nativePath.length === 0 || validateFilename(VALID_APP_EXTENSIONS, nativePath))) ||\r\n\t\tdisplayName === undefined ||\r\n\t\tdisplayName === \"\" ||\r\n\t\t!isWidthValid ||\r\n\t\t!isHeightValid;\r\n\r\n\tconst clickSubmit = () => {\r\n\t\t// Shouldn't be possible to get in a state where windowWith/windowHeight aren't numbers,\r\n\t\t// but let's check anyway\r\n\t\tif (!(typeof windowWidth === \"number\" && typeof windowHeight === \"number\")) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsubmitFn({\r\n\t\t\tname: displayName,\r\n\t\t\turl: windowURL,\r\n\t\t\tpath: nativePath,\r\n\t\t\tappType: currentAppType,\r\n\t\t\twidth: windowWidth,\r\n\t\t\theight: windowHeight,\r\n\t\t\tdescription: componentDescription,\r\n\t\t\trules,\r\n\t\t});\r\n\t};\r\n\r\n\t// When we try to use the form/type=submit interaction, it acts like we pressed the back button, rather than the submit button\r\n\tconst submitOnEnter = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\tif (e.key !== \"Enter\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\te.preventDefault();\r\n\t\tif (!disableSubmit) {\r\n\t\t\tclickSubmit();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-name\">Name</label>\r\n\t\t\t\t<input\r\n\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\tid=\"app-name\"\r\n\t\t\t\t\tvalue={displayName}\r\n\t\t\t\t\tplaceholder=\"Untitled Application\"\r\n\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetDisplayName(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\r\n\t\t\t{isSetupWizard !== true && (\r\n\t\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t\t<label>App type</label>\r\n\r\n\t\t\t\t\t<div className=\"app-edit-type-field\">\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-web\"\r\n\t\t\t\t\t\t\t\tvalue=\"web\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"web\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-web\">Web</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"app-type-container\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\t\tname=\"app-type\"\r\n\t\t\t\t\t\t\t\tid=\"app-type-native\"\r\n\t\t\t\t\t\t\t\tvalue=\"native\"\r\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"native\"}\r\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\t\tonChange={(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-native\">Native</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t{currentAppType === \"web\" ? (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label htmlFor=\"app-url\">Web URL</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-url\"\r\n\t\t\t\t\t\t\tplaceholder=\"https://...\"\r\n\t\t\t\t\t\t\tvalue={windowURL}\r\n\t\t\t\t\t\t\taria-invalid={!isWindowURLValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowURL(e.target.value);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</>\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<label>File Path</label>\r\n\t\t\t\t\t\t<div className=\"app-file-input\">\r\n\t\t\t\t\t\t\t<FileInput\r\n\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\r\n\t\t\t\t\t\t\t\tshouldUpload={false}\r\n\t\t\t\t\t\t\t\tvalue={nativePath}\r\n\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\t\t\t\tsetNativePath(value);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t></FileInput>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field description\">\r\n\t\t\t\t<label htmlFor=\"app-description\">Description</label>\r\n\t\t\t\t<textarea\r\n\t\t\t\t\tid=\"app-description\"\r\n\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\tsetComponentDescription(e.target.value);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tvalue={componentDescription}\r\n\t\t\t\t></textarea>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div className=\"app-edit-field\">\r\n\t\t\t\t<label htmlFor=\"app-size\">Default window size</label>\r\n\t\t\t\t<fieldset className=\"app-size-fieldset\">\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-width\">Width</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-width\"\r\n\t\t\t\t\t\t\tvalue={windowWidth}\r\n\t\t\t\t\t\t\taria-invalid={!isWidthValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowWidth(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"app-size-field\">\r\n\t\t\t\t\t\t<label htmlFor=\"app-height\">Height</label>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tid=\"app-height\"\r\n\t\t\t\t\t\t\tvalue={windowHeight}\r\n\t\t\t\t\t\t\taria-invalid={!isHeightValid}\r\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\r\n\t\t\t\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\t\t\t\tsetWindowHeight(parseInt(e.target.value, 10) || \"\");\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span className=\"unit\">px</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</fieldset>\r\n\t\t\t</div>\r\n\r\n\t\t\t<AppEditAccess\r\n\t\t\t\tappName={displayName}\r\n\t\t\t\trules={startingRules}\r\n\t\t\t\tonChange={(newRules) => setRules(newRules)}\r\n\t\t\t\tisInboundInteropAuthorized={isInboundInteropAuthorized}\r\n\t\t\t\tisOutboundInteropAuthorized={isOutboundInteropAuthorized}\r\n\t\t\t\taddApp={addApp}\r\n\t\t\t></AppEditAccess>\r\n\r\n\t\t\t<div className=\"app-edit-actions\">\r\n\t\t\t\t<div>\r\n\t\t\t\t\t{isEditMode && (\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\tfashion=\"danger\"\r\n\t\t\t\t\t\t\ttext=\"Remove app\"\r\n\t\t\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\t\t\tremoveApplicationFn();\r\n\t\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div className=\"app-actions-right-wrapper\">\r\n\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={cancelFn} />\r\n\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={disableSubmit} onClick={clickSubmit} />\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"AppEditPage.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/AppEditPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAe,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAiChC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,KAAK,EACrB,UAAU,GAAG,IAAI,EACjB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,EAAE,EACtB,kBAAkB,GAAG,EAAE,EACvB,mBAAmB,GAAG,EAAE,EACxB,aAAa,GAAG,oBAAoB,EACpC,cAAc,GAAG,qBAAqB,EACtC,aAAa,GAAG,EAAE,EAClB,WAAW,EACX,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC,EAC9B,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB,QAAQ,EACR,MAAM,EACN,0BAA0B,EAC1B,2BAA2B,GACT,EAAE,EAAE;IACtB,MAAM,CAAC,WAAW,EAAE,cAAc,CAA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AAC,IAAI,EAAE,CAAC,CAAC;wBACrD,CAAC,GACA;oBACF,8BAAM,SAAS,EAAC,MAAM,SAAU,CAC3B,CACI,CACN;QAEN,oBAAC,aAAa,IACb,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC1C,0BAA0B,EAAE,0BAA0B,EACtD,2BAA2B,EAAE,2BAA2B,EACxD,MAAM,EAAE,MAAM,GACE;QAEjB,6BAAK,SAAS,EAAC,kBAAkB;YAChC,iCACE,UAAU,IAAI,CACd,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,mBAAmB,EAAE,CAAC;oBACtB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACpB,CAAC,GACA,CACF,CACI;YAEN,6BAAK,SAAS,EAAC,2BAA2B;gBACzC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,GAAI;gBAC3D,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAI,CACpF,CACD,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { ChangeEvent, useState } from \"react\";\nimport { FileInput } from \"../common/FileInput\";\nimport { Button } from \"../common/Button\";\nimport { validateFilename, VALID_APP_EXTENSIONS } from \"../common/file_helpers\";\nimport \"../common/css/application-edit-page.css\";\nimport { AppEditAccess } from \"./AppEditAccess\";\nimport { ApplicationRule } from \"../../types/smartDesktopDesignerTypes\";\n\nconst DEFAULT_WINDOW_WIDTH = 1280;\nconst DEFAULT_WINDOW_HEIGHT = 600;\nconst MINIMUM_WINDOW_WIDTH = 0;\nconst MINIMUM_WINDOW_HEIGHT = 0;\n\nexport type AppEditPageProps = {\n\tstartingDisplayName: string;\n\tisSetupWizard: boolean;\n\tisEditMode: boolean;\n\tstartingAppType: string;\n\tstartingWindowURL: string;\n\tstartingNativePath: string;\n\tstartingDescription: string;\n\tstartingWidth: number | string;\n\tstartingHeight: number | string;\n\tstartingRules: ApplicationRule[];\n\tvalidateURL: (s: string) => boolean;\n\tremoveApplicationFn: () => void;\n\tcancelFn: () => void;\n\tsubmitFn: (data: SubmittedDataProps) => void;\n\taddApp: typeof FSBL.Clients.SmartDesktopClient.prototype.addApp;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nexport type SubmittedDataProps = {\n\tname: string;\n\turl: string;\n\tpath: string;\n\tappType: string;\n\tdescription: string;\n\twidth: number;\n\theight: number;\n\trules: ApplicationRule[];\n};\n\nexport const AppEditPage = ({\n\tstartingDisplayName = \"\",\n\tisSetupWizard = false,\n\tisEditMode = true,\n\tstartingAppType = \"web\",\n\tstartingWindowURL = \"\",\n\tstartingNativePath = \"\",\n\tstartingDescription = \"\",\n\tstartingWidth = DEFAULT_WINDOW_WIDTH,\n\tstartingHeight = DEFAULT_WINDOW_HEIGHT,\n\tstartingRules = [],\n\tvalidateURL,\n\tremoveApplicationFn = () => {},\n\tcancelFn = () => {},\n\tsubmitFn,\n\taddApp,\n\tisInboundInteropAuthorized,\n\tisOutboundInteropAuthorized,\n}: AppEditPageProps) => {\n\tconst [displayName, setDisplayName] = useState(startingDisplayName);\n\tconst [currentAppType, setCurrentAppType] = useState(startingAppType);\n\tconst [windowURL, setWindowURL] = useState(startingWindowURL);\n\tconst [nativePath, setNativePath] = useState(startingNativePath);\n\tconst [componentDescription, setComponentDescription] = useState(startingDescription);\n\tconst [windowWidth, setWindowWidth] = useState<number | string>(startingWidth || DEFAULT_WINDOW_WIDTH);\n\tconst [windowHeight, setWindowHeight] = useState<number | string>(startingHeight || DEFAULT_WINDOW_HEIGHT);\n\tconst [rules, setRules] = useState(startingRules || []);\n\n\tconst isWindowURLValid = validateURL(windowURL);\n\tconst isHeightValid = !(typeof windowHeight !== \"number\" || windowHeight < MINIMUM_WINDOW_HEIGHT);\n\tconst isWidthValid = !(typeof windowWidth !== \"number\" || windowWidth < MINIMUM_WINDOW_WIDTH);\n\n\tconst disableSubmit =\n\t\t(currentAppType === \"web\" && (!isWindowURLValid || windowURL.length === 0)) ||\n\t\t(currentAppType === \"native\" &&\n\t\t\t(!nativePath || nativePath.length === 0 || validateFilename(VALID_APP_EXTENSIONS, nativePath))) ||\n\t\tdisplayName === undefined ||\n\t\tdisplayName === \"\" ||\n\t\t!isWidthValid ||\n\t\t!isHeightValid;\n\n\tconst clickSubmit = () => {\n\t\t// Shouldn't be possible to get in a state where windowWith/windowHeight aren't numbers,\n\t\t// but let's check anyway\n\t\tif (!(typeof windowWidth === \"number\" && typeof windowHeight === \"number\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tsubmitFn({\n\t\t\tname: displayName,\n\t\t\turl: windowURL,\n\t\t\tpath: nativePath,\n\t\t\tappType: currentAppType,\n\t\t\twidth: windowWidth,\n\t\t\theight: windowHeight,\n\t\t\tdescription: componentDescription,\n\t\t\trules,\n\t\t});\n\t};\n\n\t// When we try to use the form/type=submit interaction, it acts like we pressed the back button, rather than the submit button\n\tconst submitOnEnter = (e: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tif (e.key !== \"Enter\") {\n\t\t\treturn;\n\t\t}\n\n\t\te.preventDefault();\n\t\tif (!disableSubmit) {\n\t\t\tclickSubmit();\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t<label htmlFor=\"app-name\">Name</label>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tid=\"app-name\"\n\t\t\t\t\tvalue={displayName}\n\t\t\t\t\tplaceholder=\"Untitled Application\"\n\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetDisplayName(e.target.value);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{isSetupWizard !== true && (\n\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t<label>App type</label>\n\n\t\t\t\t\t<div className=\"app-edit-type-field\">\n\t\t\t\t\t\t<div className=\"app-type-container\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tname=\"app-type\"\n\t\t\t\t\t\t\t\tid=\"app-type-web\"\n\t\t\t\t\t\t\t\tvalue=\"web\"\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"web\"}\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-web\">Web</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-type-container\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tname=\"app-type\"\n\t\t\t\t\t\t\t\tid=\"app-type-native\"\n\t\t\t\t\t\t\t\tvalue=\"native\"\n\t\t\t\t\t\t\t\tchecked={currentAppType == \"native\"}\n\t\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\t\t\t\tonChange={(e: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\t\tsetCurrentAppType(e.target.value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<label htmlFor=\"app-type-native\">Native</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t{currentAppType === \"web\" ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<label htmlFor=\"app-url\">Web URL</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tid=\"app-url\"\n\t\t\t\t\t\t\tplaceholder=\"https://...\"\n\t\t\t\t\t\t\tvalue={windowURL}\n\t\t\t\t\t\t\taria-invalid={!isWindowURLValid}\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\tsetWindowURL(e.target.value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<label>File Path</label>\n\t\t\t\t\t\t<div className=\"app-file-input\">\n\t\t\t\t\t\t\t<FileInput\n\t\t\t\t\t\t\t\tacceptTypes={VALID_APP_EXTENSIONS}\n\t\t\t\t\t\t\t\tshouldUpload={false}\n\t\t\t\t\t\t\t\tvalue={nativePath}\n\t\t\t\t\t\t\t\tonSetValue={(value: string) => {\n\t\t\t\t\t\t\t\t\tsetNativePath(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></FileInput>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t<div className=\"app-edit-field description\">\n\t\t\t\t<label htmlFor=\"app-description\">Description</label>\n\t\t\t\t<textarea\n\t\t\t\t\tid=\"app-description\"\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tsetComponentDescription(e.target.value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={componentDescription}\n\t\t\t\t></textarea>\n\t\t\t</div>\n\n\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t<label htmlFor=\"app-size\">Default window size</label>\n\t\t\t\t<fieldset className=\"app-size-fieldset\">\n\t\t\t\t\t<div className=\"app-size-field\">\n\t\t\t\t\t\t<label htmlFor=\"app-width\">Width</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tid=\"app-width\"\n\t\t\t\t\t\t\tvalue={windowWidth}\n\t\t\t\t\t\t\taria-invalid={!isWidthValid}\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\tsetWindowWidth(parseInt(e.target.value, 10) || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"unit\">px</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"app-size-field\">\n\t\t\t\t\t\t<label htmlFor=\"app-height\">Height</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclassName=\"app-size-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tid=\"app-height\"\n\t\t\t\t\t\t\tvalue={windowHeight}\n\t\t\t\t\t\t\taria-invalid={!isHeightValid}\n\t\t\t\t\t\t\tonKeyDown={submitOnEnter}\n\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\tsetWindowHeight(parseInt(e.target.value, 10) || \"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"unit\">px</span>\n\t\t\t\t\t</div>\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\n\t\t\t<AppEditAccess\n\t\t\t\tappName={displayName}\n\t\t\t\trules={startingRules}\n\t\t\t\tonChange={(newRules) => setRules(newRules)}\n\t\t\t\tisInboundInteropAuthorized={isInboundInteropAuthorized}\n\t\t\t\tisOutboundInteropAuthorized={isOutboundInteropAuthorized}\n\t\t\t\taddApp={addApp}\n\t\t\t></AppEditAccess>\n\n\t\t\t<div className=\"app-edit-actions\">\n\t\t\t\t<div>\n\t\t\t\t\t{isEditMode && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tfashion=\"danger\"\n\t\t\t\t\t\t\ttext=\"Remove app\"\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\tremoveApplicationFn();\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"app-actions-right-wrapper\">\n\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={cancelFn} />\n\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={disableSubmit} onClick={clickSubmit} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
@@ -1,94 +1,94 @@
1
- .view-container {
2
- height: 100%;
3
- overflow-x: hidden;
4
- overflow-y: auto;
5
- background-color: #171a20;
6
- border-radius: 20px 0 0 0;
7
- display: flex;
8
- flex-direction: column;
9
- }
10
-
11
- .view-content {
12
- margin: 0em 2.1rem;
13
- }
14
-
15
- [role="tab"]:hover,
16
- [role="tab"]:focus:not([aria-selected="true"]) {
17
- border-bottom: solid 3px #36788b;
18
- margin-bottom: -3px;
19
- }
20
-
21
- [role="tablist"] {
22
- width: 100px;
23
- padding-bottom: 20px;
24
- }
25
-
26
- [role="tab"] {
27
- display: inline;
28
- width: fit-content;
29
- height: 22px;
30
- margin: 22px 32px 3px 6px;
31
- font-family: OpenSans;
32
- font-size: 16px;
33
- font-weight: bold;
34
- font-stretch: normal;
35
- font-style: normal;
36
- line-height: normal;
37
- letter-spacing: normal;
38
- border-bottom: solid 3px transparent;
39
- transition: border-bottom 0.2s ease-in;
40
- }
41
-
42
- [role="tab"][aria-selected="true"] {
43
- border-bottom: solid 3px #42a5ba;
44
- margin-bottom: -3px;
45
- }
46
-
47
- [role="tab"]:first-child {
48
- margin-top: 0px;
49
- }
50
-
51
- [role="tabpanel"] {
52
- padding-left: 5px;
53
- overflow-y: scroll;
54
- overflow-x: hidden;
55
- visibility: hidden;
56
- opacity: 0;
57
- height: 0px;
58
- transition: visibility 0s, opacity 0.5s linear;
59
- }
60
-
61
- .visible {
62
- visibility: visible;
63
- opacity: 1;
64
- height: 100%;
65
- }
66
-
67
- div.frontmatter {
68
- opacity: 0.75;
69
- font-family: OpenSans;
70
- font-size: 12px;
71
- font-weight: normal;
72
- font-stretch: normal;
73
- font-style: italic;
74
- margin-bottom: 22px;
75
- }
76
-
77
- .template-row {
78
- margin-bottom: 20px;
79
- }
80
-
81
- .template-row label {
82
- font-size: 1.25em;
83
- margin-right: 2em;
84
- font-weight: bold;
85
- font-stretch: normal;
86
- font-style: normal;
87
- line-height: 1.13;
88
- letter-spacing: normal;
89
- color: #ffffff;
90
- }
91
-
92
- .template-row button {
93
- margin-left: 10px;
94
- }
1
+ .view-container {
2
+ height: 100%;
3
+ overflow-x: hidden;
4
+ overflow-y: auto;
5
+ background-color: #171a20;
6
+ border-radius: 20px 0 0 0;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+
11
+ .view-content {
12
+ margin: 0em 2.1rem;
13
+ }
14
+
15
+ [role="tab"]:hover,
16
+ [role="tab"]:focus:not([aria-selected="true"]) {
17
+ border-bottom: solid 3px #36788b;
18
+ margin-bottom: -3px;
19
+ }
20
+
21
+ [role="tablist"] {
22
+ width: 100px;
23
+ padding-bottom: 20px;
24
+ }
25
+
26
+ [role="tab"] {
27
+ display: inline;
28
+ width: fit-content;
29
+ height: 22px;
30
+ margin: 22px 32px 3px 6px;
31
+ font-family: OpenSans;
32
+ font-size: 16px;
33
+ font-weight: bold;
34
+ font-stretch: normal;
35
+ font-style: normal;
36
+ line-height: normal;
37
+ letter-spacing: normal;
38
+ border-bottom: solid 3px transparent;
39
+ transition: border-bottom 0.2s ease-in;
40
+ }
41
+
42
+ [role="tab"][aria-selected="true"] {
43
+ border-bottom: solid 3px #42a5ba;
44
+ margin-bottom: -3px;
45
+ }
46
+
47
+ [role="tab"]:first-child {
48
+ margin-top: 0px;
49
+ }
50
+
51
+ [role="tabpanel"] {
52
+ padding-left: 5px;
53
+ overflow-y: scroll;
54
+ overflow-x: hidden;
55
+ visibility: hidden;
56
+ opacity: 0;
57
+ height: 0px;
58
+ transition: visibility 0s, opacity 0.5s linear;
59
+ }
60
+
61
+ .visible {
62
+ visibility: visible;
63
+ opacity: 1;
64
+ height: 100%;
65
+ }
66
+
67
+ div.frontmatter {
68
+ opacity: 0.75;
69
+ font-family: OpenSans;
70
+ font-size: 12px;
71
+ font-weight: normal;
72
+ font-stretch: normal;
73
+ font-style: italic;
74
+ margin-bottom: 22px;
75
+ }
76
+
77
+ .template-row {
78
+ margin-bottom: 20px;
79
+ }
80
+
81
+ .template-row label {
82
+ font-size: 1.25em;
83
+ margin-right: 2em;
84
+ font-weight: bold;
85
+ font-stretch: normal;
86
+ font-style: normal;
87
+ line-height: 1.13;
88
+ letter-spacing: normal;
89
+ color: #ffffff;
90
+ }
91
+
92
+ .template-row button {
93
+ margin-left: 10px;
94
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Appearance.helpers.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Appearance.helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["export const clone = (obj: object) => JSON.parse(JSON.stringify(obj));\r\n"]}
1
+ {"version":3,"file":"Appearance.helpers.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Appearance.helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["export const clone = (obj: object) => JSON.parse(JSON.stringify(obj));\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Appearance.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Appearance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAe,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AA2B7D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAC1B,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,OAAO,EACP,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACF,EAAE,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,GAAG,GAAG,MAAM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AAY,EAAE,CAAC,EAAU,EAAE,QAAgB,EAAE,EAAE;4BAC9C,QAAQ,iCACJ,KAAK,KACR,CAAC,EAAE,CAAC,EAAE,QAAQ,IACb,CAAC;4BACH,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;wBAC5B,CAAC,GACA,CACG;gBAEN,2CAAgB,QAAQ;oBACvB,6BAAK,SAAS,EAAC,aAAa;;wBAE3B,+BAAM;mFAED;oBACN,oBAAC,UAAU,IACV,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,GACvC,CACG,CACD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useRef, useLayoutEffect } from \"react\";\r\nimport { Button } from \"../common/Button\";\r\nimport { Header } from \"../common/Header\";\r\nimport \"./Appearance.css\";\r\nimport { AssetsPage } from \"./AssetsPage\";\r\nimport { ThemePage, ThemeBundle } from \"./ThemePage\";\r\nimport { clone } from \"./Appearance.helpers\";\r\nimport { FileInputUploadCb } from \"../common/FileInput\";\r\nimport { View } from \"./View\";\r\nimport { Content } from \"./Content\";\r\nimport { Tab } from \"../common/Tab\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\n\r\nexport type AppearanceProps = {\r\n\tstartTheme: ThemeBundle;\r\n\tdarkTheme: ThemeBundle;\r\n\tlightTheme: ThemeBundle;\r\n\tupdateThemes: (id: string, newValue: string) => void;\r\n\tareYouSure: (affirmativeCallback: () => void) => void;\r\n\tbaseURL: string;\r\n\ttoolbarIcon: string;\r\n\ttaskbarIcon: string;\r\n\tinstallerIcon: string;\r\n\tsystemTrayIcon: string;\r\n\tsplashScreenImage: string;\r\n\tsetToolbarIcon: (s: string) => void;\r\n\tsetTaskbarIcon: (s: string) => void;\r\n\tsetInstallerIcon: (s: string) => void;\r\n\tsetSystemTrayIcon: (s: string) => void;\r\n\tsetSplashScreenImage: (s: string) => void;\r\n\tsetIconsChanged: (n: number) => void;\r\n\tupdateSplashScreen: FileInputUploadCb;\r\n\tupdateToolbarIcon: FileInputUploadCb;\r\n\tupdateTaskbarIcon: FileInputUploadCb;\r\n\tupdateSystemTrayIcon: FileInputUploadCb;\r\n\tupdateInstallerIcon: FileInputUploadCb;\r\n};\r\n\r\nexport const Appearance = ({\r\n\tstartTheme,\r\n\tdarkTheme,\r\n\tlightTheme,\r\n\tupdateThemes,\r\n\tareYouSure,\r\n\tbaseURL,\r\n\ttoolbarIcon,\r\n\ttaskbarIcon,\r\n\tinstallerIcon,\r\n\tsystemTrayIcon,\r\n\tsplashScreenImage,\r\n\tsetToolbarIcon,\r\n\tsetTaskbarIcon,\r\n\tsetInstallerIcon,\r\n\tsetSystemTrayIcon,\r\n\tsetSplashScreenImage,\r\n\tsetIconsChanged,\r\n\tupdateSplashScreen,\r\n\tupdateToolbarIcon,\r\n\tupdateTaskbarIcon,\r\n\tupdateSystemTrayIcon,\r\n\tupdateInstallerIcon,\r\n}: AppearanceProps) => {\r\n\tconst [theme, setTheme] = useState(startTheme);\r\n\tconst ref = useRef<HTMLDivElement>(null);\r\n\r\n\tconst applyDarkTheme = () => {\r\n\t\tareYouSure(() => setTheme(clone(darkTheme)));\r\n\t};\r\n\tconst applyLightTheme = () => {\r\n\t\tareYouSure(() => setTheme(clone(lightTheme)));\r\n\t};\r\n\r\n\tuseLayoutEffect(() => {\r\n\t\t// Allow for the tab panel content to look nice with its own scrollbar,\r\n\t\t// which also keeps the heading/tab group at the top of the page.\r\n\t\t// It feels like css flex should do this, but I could never get it to work.\r\n\t\tif (ref.current !== null) {\r\n\t\t\tref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;\r\n\t\t}\r\n\t});\r\n\r\n\treturn (\r\n\t\t<View>\r\n\t\t\t<Header\r\n\t\t\t\thelpFunction={() => {\r\n\t\t\t\t\tlaunchTutorialLink(\"creating-a-theme\");\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\tTheme\r\n\t\t\t</Header>\r\n\r\n\t\t\t<Content>\r\n\t\t\t\t<Tab>\r\n\t\t\t\t\t<div data-label=\"Themes\">\r\n\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\tUse a template to set or reset your theme.\r\n\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\tUse either template to start building your own theme.\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div className=\"template-row\">\r\n\t\t\t\t\t\t\t<label>Templates:</label>\r\n\t\t\t\t\t\t\t<Button fashion=\"primary\" iconBefore=\"moon\" text=\"Dark theme\" onClick={applyDarkTheme} />\r\n\t\t\t\t\t\t\t<Button fashion=\"primary\" iconBefore=\"sun\" text=\"Light theme\" onClick={applyLightTheme} />\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<ThemePage\r\n\t\t\t\t\t\t\ttheme={theme}\r\n\t\t\t\t\t\t\tupdateThemes={(id: string, newValue: string) => {\r\n\t\t\t\t\t\t\t\tsetTheme({\r\n\t\t\t\t\t\t\t\t\t...theme,\r\n\t\t\t\t\t\t\t\t\t[id]: newValue,\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tupdateThemes(id, newValue);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div data-label=\"Images\">\r\n\t\t\t\t\t\t<div className=\"frontmatter\">\r\n\t\t\t\t\t\t\tBrowse your computer for images to use in Finsemble.\r\n\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\tYou can also drag and drop images into the fields below.\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<AssetsPage\r\n\t\t\t\t\t\t\tbaseURL={baseURL}\r\n\t\t\t\t\t\t\ttoolbarIcon={toolbarIcon}\r\n\t\t\t\t\t\t\ttaskbarIcon={taskbarIcon}\r\n\t\t\t\t\t\t\tinstallerIcon={installerIcon}\r\n\t\t\t\t\t\t\tsystemTrayIcon={systemTrayIcon}\r\n\t\t\t\t\t\t\tsplashScreenImage={splashScreenImage}\r\n\t\t\t\t\t\t\tsetToolbarIcon={setToolbarIcon}\r\n\t\t\t\t\t\t\tsetTaskbarIcon={setTaskbarIcon}\r\n\t\t\t\t\t\t\tsetInstallerIcon={setInstallerIcon}\r\n\t\t\t\t\t\t\tsetSystemTrayIcon={setSystemTrayIcon}\r\n\t\t\t\t\t\t\tsetSplashScreenImage={setSplashScreenImage}\r\n\t\t\t\t\t\t\tsetIconsChanged={setIconsChanged}\r\n\t\t\t\t\t\t\tupdateSplashScreen={updateSplashScreen}\r\n\t\t\t\t\t\t\tupdateToolbarIcon={updateToolbarIcon}\r\n\t\t\t\t\t\t\tupdateTaskbarIcon={updateTaskbarIcon}\r\n\t\t\t\t\t\t\tupdateSystemTrayIcon={updateSystemTrayIcon}\r\n\t\t\t\t\t\t\tupdateInstallerIcon={updateInstallerIcon}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</Tab>\r\n\t\t\t</Content>\r\n\t\t</View>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Appearance.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Appearance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,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FAED;oBACN,oBAAC,UAAU,IACV,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,GACvC,CACG,CACD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useRef, useLayoutEffect } from \"react\";\nimport { Button } from \"../common/Button\";\nimport { Header } from \"../common/Header\";\nimport \"./Appearance.css\";\nimport { AssetsPage } from \"./AssetsPage\";\nimport { ThemePage, ThemeBundle } from \"./ThemePage\";\nimport { clone } from \"./Appearance.helpers\";\nimport { FileInputUploadCb } from \"../common/FileInput\";\nimport { View } from \"./View\";\nimport { Content } from \"./Content\";\nimport { Tab } from \"../common/Tab\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\n\nexport type AppearanceProps = {\n\tstartTheme: ThemeBundle;\n\tdarkTheme: ThemeBundle;\n\tlightTheme: ThemeBundle;\n\tupdateThemes: (id: string, newValue: string) => void;\n\tareYouSure: (affirmativeCallback: () => void) => void;\n\tbaseURL: string;\n\ttoolbarIcon: string;\n\ttaskbarIcon: string;\n\tinstallerIcon: string;\n\tsystemTrayIcon: string;\n\tsplashScreenImage: string;\n\tsetToolbarIcon: (s: string) => void;\n\tsetTaskbarIcon: (s: string) => void;\n\tsetInstallerIcon: (s: string) => void;\n\tsetSystemTrayIcon: (s: string) => void;\n\tsetSplashScreenImage: (s: string) => void;\n\tsetIconsChanged: (n: number) => void;\n\tupdateSplashScreen: FileInputUploadCb;\n\tupdateToolbarIcon: FileInputUploadCb;\n\tupdateTaskbarIcon: FileInputUploadCb;\n\tupdateSystemTrayIcon: FileInputUploadCb;\n\tupdateInstallerIcon: FileInputUploadCb;\n};\n\nexport const Appearance = ({\n\tstartTheme,\n\tdarkTheme,\n\tlightTheme,\n\tupdateThemes,\n\tareYouSure,\n\tbaseURL,\n\ttoolbarIcon,\n\ttaskbarIcon,\n\tinstallerIcon,\n\tsystemTrayIcon,\n\tsplashScreenImage,\n\tsetToolbarIcon,\n\tsetTaskbarIcon,\n\tsetInstallerIcon,\n\tsetSystemTrayIcon,\n\tsetSplashScreenImage,\n\tsetIconsChanged,\n\tupdateSplashScreen,\n\tupdateToolbarIcon,\n\tupdateTaskbarIcon,\n\tupdateSystemTrayIcon,\n\tupdateInstallerIcon,\n}: AppearanceProps) => {\n\tconst [theme, setTheme] = useState(startTheme);\n\tconst ref = useRef<HTMLDivElement>(null);\n\n\tconst applyDarkTheme = () => {\n\t\tareYouSure(() => setTheme(clone(darkTheme)));\n\t};\n\tconst applyLightTheme = () => {\n\t\tareYouSure(() => setTheme(clone(lightTheme)));\n\t};\n\n\tuseLayoutEffect(() => {\n\t\t// Allow for the tab panel content to look nice with its own scrollbar,\n\t\t// which also keeps the heading/tab group at the top of the page.\n\t\t// It feels like css flex should do this, but I could never get it to work.\n\t\tif (ref.current !== null) {\n\t\t\tref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;\n\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(\"creating-a-theme\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tTheme\n\t\t\t</Header>\n\n\t\t\t<Content>\n\t\t\t\t<Tab>\n\t\t\t\t\t<div data-label=\"Themes\">\n\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\tUse a template to set or reset your theme.\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\tUse either template to start building your own theme.\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"template-row\">\n\t\t\t\t\t\t\t<label>Templates:</label>\n\t\t\t\t\t\t\t<Button fashion=\"primary\" iconBefore=\"moon\" text=\"Dark theme\" onClick={applyDarkTheme} />\n\t\t\t\t\t\t\t<Button fashion=\"primary\" iconBefore=\"sun\" text=\"Light theme\" onClick={applyLightTheme} />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<ThemePage\n\t\t\t\t\t\t\ttheme={theme}\n\t\t\t\t\t\t\tupdateThemes={(id: string, newValue: string) => {\n\t\t\t\t\t\t\t\tsetTheme({\n\t\t\t\t\t\t\t\t\t...theme,\n\t\t\t\t\t\t\t\t\t[id]: newValue,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tupdateThemes(id, newValue);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div data-label=\"Images\">\n\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\tBrowse your computer for images to use in Finsemble.\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\tYou can also drag and drop images into the fields below.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<AssetsPage\n\t\t\t\t\t\t\tbaseURL={baseURL}\n\t\t\t\t\t\t\ttoolbarIcon={toolbarIcon}\n\t\t\t\t\t\t\ttaskbarIcon={taskbarIcon}\n\t\t\t\t\t\t\tinstallerIcon={installerIcon}\n\t\t\t\t\t\t\tsystemTrayIcon={systemTrayIcon}\n\t\t\t\t\t\t\tsplashScreenImage={splashScreenImage}\n\t\t\t\t\t\t\tsetToolbarIcon={setToolbarIcon}\n\t\t\t\t\t\t\tsetTaskbarIcon={setTaskbarIcon}\n\t\t\t\t\t\t\tsetInstallerIcon={setInstallerIcon}\n\t\t\t\t\t\t\tsetSystemTrayIcon={setSystemTrayIcon}\n\t\t\t\t\t\t\tsetSplashScreenImage={setSplashScreenImage}\n\t\t\t\t\t\t\tsetIconsChanged={setIconsChanged}\n\t\t\t\t\t\t\tupdateSplashScreen={updateSplashScreen}\n\t\t\t\t\t\t\tupdateToolbarIcon={updateToolbarIcon}\n\t\t\t\t\t\t\tupdateTaskbarIcon={updateTaskbarIcon}\n\t\t\t\t\t\t\tupdateSystemTrayIcon={updateSystemTrayIcon}\n\t\t\t\t\t\t\tupdateInstallerIcon={updateInstallerIcon}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Tab>\n\t\t\t</Content>\n\t\t</View>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Application.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAU7D,MAAM,UAAU,kBAAkB,CAAC,SAAwB;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BACP,4BAAI,SAAS,EAAC,oBAAoB,oCAAmC;gBACrE,6BAAK,SAAS,EAAC,mBAAmB;oBACjC,oBAAC,UAAU,IAAC,SAAS,EAAC,aAAa,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,WAAW,GAAI;oBAC3F,oBAAC,UAAU,IAAC,SAAS,EAAC,aAAa,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,yBAAyB,EAAC,OAAO,EAAE,WAAW,GAAI,CACnG,CACG,CACJ,CACF,CACN,CAAC,CAAC,CAAC,gBAAgB,KAAK,oBAAoB,CAAC,iBAAiB;QAC7D,gBAAgB,KAAK,oBAAoB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAC9D,oBAAC,eAAe,oBAAK,oBAAoB,EAAI,CAC7C,CAAC,CAAC,CAAC,CAEH,oBAAC,gBAAgB,oBAAK,qBAAqB,EAAI,CAC/C,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React from \"react\";\r\nimport { useSelector, useDispatch } from \"../../store\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { ApplicationEdit } from \"./ApplicationEdit\";\r\nimport { ApplicationSetup } from \"./ApplicationSetup\";\r\nimport { ButtonTile } from \"../common/ButtonTile\";\r\nimport { CircularLoadingSpinner } from \"../common/LoadingSpinner\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { ApplicationSetupType } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { RootState } from \"../../reducers/rootReducer\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport * as Types from \"../../types/smartDesktopDesignerTypes\";\r\nimport { ApplicationEditProps } from \"./ApplicationEdit\";\r\nimport { ApplicationSetupProps } from \"./ApplicationSetup\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n// Get the type of the window object within an AppD manifest. Use Required<> to resolve the ?:\r\ntype ManifestWindow = Required<AppDefinition>[\"manifest\"][\"window\"];\r\n\r\nexport function appConfigToAppData(appConfig: AppDefinition): Types.ApplicationSaveData {\r\n\treturn {\r\n\t\tname: appConfig.name || appConfig.manifest?.component?.displayName,\r\n\t\tdescription: appConfig.description || \"\",\r\n\t\turl: appConfig.manifest?.window?.url,\r\n\t\tpath: appConfig.manifest?.window?.path,\r\n\t\twidth: appConfig.manifest?.window?.width,\r\n\t\theight: appConfig.manifest?.window?.height,\r\n\t\trules: appConfig.manifest?.interop?.selectConnect,\r\n\t};\r\n}\r\n\r\nexport enum ApplicationCloseReason {\r\n\tSUCCESS,\r\n\tCANCEL,\r\n\tNEW,\r\n}\r\n\r\nexport type ApplicationProps = {\r\n\tid: string;\r\n\tapps: AppDefinition[];\r\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\r\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\r\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\r\n\tonClose: (reason: ApplicationCloseReason) => void;\r\n\tsetCurrentAppID: (id: string | null) => void;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const Application = (props: ApplicationProps) => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst currentAppID = props.id;\r\n\r\n\tconst currentAppConfig = useSelector((state: RootState) =>\r\n\t\tstate.smartDesktopDesigner.apps.find((app: AppDefinition) => app.appId === currentAppID)\r\n\t);\r\n\r\n\tconst currentSetupType = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppSetupType);\r\n\r\n\tconst isGettingStarted = useSelector((state: RootState) => state.smartDesktopDesigner.isGettingStarted);\r\n\r\n\tif (!currentAppConfig) {\r\n\t\tprops.getAppConfigTemplate().then((response: any) => {\r\n\t\t\tprops.deleteApp(currentAppID).then(() => {\r\n\t\t\t\tconst config: AppDefinition = {\r\n\t\t\t\t\t...response.config,\r\n\t\t\t\t\tappId: currentAppID,\r\n\t\t\t\t\tmanifest: {\r\n\t\t\t\t\t\t...response.config.manifest,\r\n\t\t\t\t\t\t// Apps that are flagged temporary will be removed if the user cancels out of adding an app\r\n\t\t\t\t\t\ttemporary: true,\r\n\t\t\t\t\t},\r\n\t\t\t\t};\r\n\r\n\t\t\t\tprops.addApp(currentAppID, config).then(() => {\r\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t<div style={{ overflow: \"hidden\" }}>\r\n\t\t\t\t\t<div style={{ marginTop: \"43vh\" }}>\r\n\t\t\t\t\t\t<CircularLoadingSpinner />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</>\r\n\t\t);\r\n\t}\r\n\r\n\tconst isEditMode =\r\n\t\tcurrentSetupType === ApplicationSetupType.APP_EDIT_ADVANCED ||\r\n\t\tcurrentSetupType === ApplicationSetupType.APP_EDIT_SIMPLE;\r\n\r\n\tconst onSaveData = (data: Types.ApplicationSaveData) =>\r\n\t\tnew Promise<any>((resolve, reject) => {\r\n\t\t\tif (!currentAppID) {\r\n\t\t\t\treturn reject(new Error(\"no app ID specified\"));\r\n\t\t\t}\r\n\r\n\t\t\tlet windowParams: ManifestWindow = currentAppConfig.manifest\r\n\t\t\t\t? {\r\n\t\t\t\t\t\t...currentAppConfig.manifest.window,\r\n\t\t\t\t }\r\n\t\t\t\t: {};\r\n\r\n\t\t\tif (data.appType == \"native\") {\r\n\t\t\t\twindowParams.windowType = \"assimilation\";\r\n\t\t\t\twindowParams.path = data.path;\r\n\t\t\t\tdelete windowParams.url;\r\n\t\t\t} else {\r\n\t\t\t\tdelete windowParams.windowType;\r\n\t\t\t\tdelete windowParams.path;\r\n\t\t\t\twindowParams.url = data.url;\r\n\t\t\t}\r\n\r\n\t\t\twindowParams.width = data.width;\r\n\t\t\twindowParams.height = data.height;\r\n\r\n\t\t\tlet appConfig: AppDefinition = {\r\n\t\t\t\t...currentAppConfig,\r\n\t\t\t\tappId: currentAppID,\r\n\t\t\t\tname: data.name,\r\n\t\t\t\tdescription: data.description,\r\n\t\t\t\tmanifest: {\r\n\t\t\t\t\t...currentAppConfig.manifest,\r\n\t\t\t\t\twindow: windowParams,\r\n\t\t\t\t\tinterop: {\r\n\t\t\t\t\t\t...currentAppConfig.manifest?.interop,\r\n\t\t\t\t\t\tselectConnect: data.rules,\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tdelete appConfig.manifest?.temporary;\r\n\r\n\t\t\t// Always remove and replace component\r\n\t\t\tprops.deleteApp(currentAppID).then(({ err }: { err: string }) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\talert(err);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprops\r\n\t\t\t\t\t.addApp(currentAppID, appConfig)\r\n\t\t\t\t\t.then((response: any) => {\r\n\t\t\t\t\t\tresolve(response);\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.catch((e: any) => {\r\n\t\t\t\t\t\treject(e);\r\n\t\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\r\n\tconst onClickBackButton = () => {\r\n\t\tif (!isEditMode) {\r\n\t\t\tif (currentSetupType === null) {\r\n\t\t\t\tprops.onClose(ApplicationCloseReason.CANCEL);\r\n\t\t\t} else {\r\n\t\t\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(null));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprops.onClose(ApplicationCloseReason.CANCEL);\r\n\t\t}\r\n\t};\r\n\r\n\tconst setCurrentSetupType = (type: ApplicationSetupType | null) => {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(type));\r\n\t};\r\n\r\n\tconst backFunction = () => {\r\n\t\tprops.onClose(ApplicationCloseReason.CANCEL);\r\n\r\n\t\tif (isGettingStarted) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.change_view(\"getting-started\"));\r\n\t\t}\r\n\t};\r\n\r\n\tconst clickWizard = () => {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(ApplicationSetupType.APP_ADD_SIMPLE));\r\n\t};\r\n\r\n\tconst clickManual = () => {\r\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(ApplicationSetupType.APP_ADD_ADVANCED));\r\n\t};\r\n\r\n\tconst helpFunction = () => {\r\n\t\tlaunchTutorialLink(\"adding-applications\");\r\n\t};\r\n\r\n\tconst setCurrentComponentID = (id: string | null) => {\r\n\t\tif (id === \"new\") {\r\n\t\t\tprops.onClose(ApplicationCloseReason.NEW);\r\n\t\t} else {\r\n\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\r\n\t\t}\r\n\t};\r\n\r\n\tconst applicationEditProps: ApplicationEditProps = {\r\n\t\tid: currentAppID,\r\n\t\tdata: appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData,\r\n\t\tapps: props.apps,\r\n\t\tisSetupWizard: false,\r\n\t\tisEditMode,\r\n\t\tremoveAppID: props.deleteApp,\r\n\t\tsetCurrentComponentID,\r\n\t\tonClickBackButton,\r\n\t\tonSaveData,\r\n\t\taddApp: props.addApp,\r\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\r\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\r\n\t};\r\n\r\n\tconst applicationSetupProps: ApplicationSetupProps = {\r\n\t\tid: currentAppID,\r\n\t\tdata: appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData,\r\n\t\tapps: props.apps,\r\n\t\tbackFunction: () => {\r\n\t\t\tsetCurrentSetupType(null);\r\n\t\t},\r\n\t\tremoveAppID: props.deleteApp,\r\n\t\tsetCurrentComponentID,\r\n\t\tonClickBackButton,\r\n\t\tonSaveData,\r\n\t\taddApp: props.addApp,\r\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\r\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{currentSetupType === null ? (\r\n\t\t\t\t<div className=\"setup-type-container\">\r\n\t\t\t\t\t<View>\r\n\t\t\t\t\t\t<Header helpFunction={helpFunction} backFunction={backFunction}>\r\n\t\t\t\t\t\t\tAdd an app\r\n\t\t\t\t\t\t</Header>\r\n\r\n\t\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Choose a method to add an app</h2>\r\n\t\t\t\t\t\t\t<div className=\"tile-type-buttons\">\r\n\t\t\t\t\t\t\t\t<ButtonTile className=\"icon-wizard\" icon=\"magic\" text=\"App wizard\" onClick={clickWizard} />\r\n\t\t\t\t\t\t\t\t<ButtonTile className=\"icon-manual\" icon=\"tools\" text=\"Manual setup (advanced)\" onClick={clickManual} />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</Content>\r\n\t\t\t\t\t</View>\r\n\t\t\t\t</div>\r\n\t\t\t) : currentSetupType === ApplicationSetupType.APP_EDIT_ADVANCED ||\r\n\t\t\t currentSetupType === ApplicationSetupType.APP_ADD_ADVANCED ? (\r\n\t\t\t\t<ApplicationEdit {...applicationEditProps} />\r\n\t\t\t) : (\r\n\t\t\t\t// else \"application setup wizard\"\r\n\t\t\t\t<ApplicationSetup {...applicationSetupProps} />\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Application.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAE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CAC/C,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Content } from \"./Content\";\nimport { ApplicationEdit } from \"./ApplicationEdit\";\nimport { ApplicationSetup } from \"./ApplicationSetup\";\nimport { ButtonTile } from \"../common/ButtonTile\";\nimport { CircularLoadingSpinner } from \"../common/LoadingSpinner\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { ApplicationSetupType } from \"../../types/smartDesktopDesignerTypes\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport * as Types from \"../../types/smartDesktopDesignerTypes\";\nimport { ApplicationEditProps } from \"./ApplicationEdit\";\nimport { ApplicationSetupProps } from \"./ApplicationSetup\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n// Get the type of the window object within an AppD manifest. Use Required<> to resolve the ?:\ntype ManifestWindow = Required<AppDefinition>[\"manifest\"][\"window\"];\n\nexport function appConfigToAppData(appConfig: AppDefinition): Types.ApplicationSaveData {\n\treturn {\n\t\tname: appConfig.name || appConfig.manifest?.component?.displayName,\n\t\tdescription: appConfig.description || \"\",\n\t\turl: appConfig.manifest?.window?.url,\n\t\tpath: appConfig.manifest?.window?.path,\n\t\twidth: appConfig.manifest?.window?.width,\n\t\theight: appConfig.manifest?.window?.height,\n\t\trules: appConfig.manifest?.interop?.selectConnect,\n\t};\n}\n\nexport enum ApplicationCloseReason {\n\tSUCCESS,\n\tCANCEL,\n\tNEW,\n}\n\nexport type ApplicationProps = {\n\tid: string;\n\tapps: AppDefinition[];\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tdeleteApp: typeof FSBL.Clients.SmartDesktopClient.prototype.deleteApp;\n\tgetAppConfigTemplate: typeof FSBL.Clients.SmartDesktopClient.prototype.getAppConfigTemplate;\n\tonClose: (reason: ApplicationCloseReason) => void;\n\tsetCurrentAppID: (id: string | null) => void;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nexport const Application = (props: ApplicationProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst currentAppID = props.id;\n\n\tconst currentAppConfig = useSelector((state: RootState) =>\n\t\tstate.smartDesktopDesigner.apps.find((app: AppDefinition) => app.appId === currentAppID)\n\t);\n\n\tconst currentSetupType = useSelector((state: RootState) => state.smartDesktopDesigner.currentAppSetupType);\n\n\tconst isGettingStarted = useSelector((state: RootState) => state.smartDesktopDesigner.isGettingStarted);\n\n\tif (!currentAppConfig) {\n\t\tprops.getAppConfigTemplate().then((response: any) => {\n\t\t\tprops.deleteApp(currentAppID).then(() => {\n\t\t\t\tconst config: AppDefinition = {\n\t\t\t\t\t...response.config,\n\t\t\t\t\tappId: currentAppID,\n\t\t\t\t\tmanifest: {\n\t\t\t\t\t\t...response.config.manifest,\n\t\t\t\t\t\t// Apps that are flagged temporary will be removed if the user cancels out of adding an app\n\t\t\t\t\t\ttemporary: true,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tprops.addApp(currentAppID, config).then(() => {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.update_app(config));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div style={{ overflow: \"hidden\" }}>\n\t\t\t\t\t<div style={{ marginTop: \"43vh\" }}>\n\t\t\t\t\t\t<CircularLoadingSpinner />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst isEditMode =\n\t\tcurrentSetupType === ApplicationSetupType.APP_EDIT_ADVANCED ||\n\t\tcurrentSetupType === ApplicationSetupType.APP_EDIT_SIMPLE;\n\n\tconst onSaveData = (data: Types.ApplicationSaveData) =>\n\t\tnew Promise<any>((resolve, reject) => {\n\t\t\tif (!currentAppID) {\n\t\t\t\treturn reject(new Error(\"no app ID specified\"));\n\t\t\t}\n\n\t\t\tlet windowParams: ManifestWindow = currentAppConfig.manifest\n\t\t\t\t? {\n\t\t\t\t\t\t...currentAppConfig.manifest.window,\n\t\t\t\t }\n\t\t\t\t: {};\n\n\t\t\tif (data.appType == \"native\") {\n\t\t\t\twindowParams.windowType = \"assimilation\";\n\t\t\t\twindowParams.path = data.path;\n\t\t\t\tdelete windowParams.url;\n\t\t\t} else {\n\t\t\t\tdelete windowParams.windowType;\n\t\t\t\tdelete windowParams.path;\n\t\t\t\twindowParams.url = data.url;\n\t\t\t}\n\n\t\t\twindowParams.width = data.width;\n\t\t\twindowParams.height = data.height;\n\n\t\t\tlet appConfig: AppDefinition = {\n\t\t\t\t...currentAppConfig,\n\t\t\t\tappId: currentAppID,\n\t\t\t\tname: data.name,\n\t\t\t\tdescription: data.description,\n\t\t\t\tmanifest: {\n\t\t\t\t\t...currentAppConfig.manifest,\n\t\t\t\t\twindow: windowParams,\n\t\t\t\t\tinterop: {\n\t\t\t\t\t\t...currentAppConfig.manifest?.interop,\n\t\t\t\t\t\tselectConnect: data.rules,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t\tdelete appConfig.manifest?.temporary;\n\n\t\t\t// Always remove and replace component\n\t\t\tprops.deleteApp(currentAppID).then(({ err }: { err: string }) => {\n\t\t\t\tif (err) {\n\t\t\t\t\talert(err);\n\t\t\t\t}\n\n\t\t\t\tprops\n\t\t\t\t\t.addApp(currentAppID, appConfig)\n\t\t\t\t\t.then((response: any) => {\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((e: any) => {\n\t\t\t\t\t\treject(e);\n\t\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\tconst onClickBackButton = () => {\n\t\tif (!isEditMode) {\n\t\t\tif (currentSetupType === null) {\n\t\t\t\tprops.onClose(ApplicationCloseReason.CANCEL);\n\t\t\t} else {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(null));\n\t\t\t}\n\t\t} else {\n\t\t\tprops.onClose(ApplicationCloseReason.CANCEL);\n\t\t}\n\t};\n\n\tconst setCurrentSetupType = (type: ApplicationSetupType | null) => {\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(type));\n\t};\n\n\tconst backFunction = () => {\n\t\tprops.onClose(ApplicationCloseReason.CANCEL);\n\n\t\tif (isGettingStarted) {\n\t\t\tdispatch(SmartDesktopDesignerActions.change_view(\"getting-started\"));\n\t\t}\n\t};\n\n\tconst clickWizard = () => {\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(ApplicationSetupType.APP_ADD_SIMPLE));\n\t};\n\n\tconst clickManual = () => {\n\t\tdispatch(SmartDesktopDesignerActions.set_current_app_setup_type(ApplicationSetupType.APP_ADD_ADVANCED));\n\t};\n\n\tconst helpFunction = () => {\n\t\tlaunchTutorialLink(\"adding-applications\");\n\t};\n\n\tconst setCurrentComponentID = (id: string | null) => {\n\t\tif (id === \"new\") {\n\t\t\tprops.onClose(ApplicationCloseReason.NEW);\n\t\t} else {\n\t\t\tprops.onClose(ApplicationCloseReason.SUCCESS);\n\t\t}\n\t};\n\n\tconst applicationEditProps: ApplicationEditProps = {\n\t\tid: currentAppID,\n\t\tdata: appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData,\n\t\tapps: props.apps,\n\t\tisSetupWizard: false,\n\t\tisEditMode,\n\t\tremoveAppID: props.deleteApp,\n\t\tsetCurrentComponentID,\n\t\tonClickBackButton,\n\t\tonSaveData,\n\t\taddApp: props.addApp,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t};\n\n\tconst applicationSetupProps: ApplicationSetupProps = {\n\t\tid: currentAppID,\n\t\tdata: appConfigToAppData(currentAppConfig) as Types.ApplicationSaveData,\n\t\tapps: props.apps,\n\t\tbackFunction: () => {\n\t\t\tsetCurrentSetupType(null);\n\t\t},\n\t\tremoveAppID: props.deleteApp,\n\t\tsetCurrentComponentID,\n\t\tonClickBackButton,\n\t\tonSaveData,\n\t\taddApp: props.addApp,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentSetupType === null ? (\n\t\t\t\t<div className=\"setup-type-container\">\n\t\t\t\t\t<View>\n\t\t\t\t\t\t<Header helpFunction={helpFunction} backFunction={backFunction}>\n\t\t\t\t\t\t\tAdd an app\n\t\t\t\t\t\t</Header>\n\n\t\t\t\t\t\t<Content>\n\t\t\t\t\t\t\t<h2 className=\"setup-type-heading\">Choose a method to add an app</h2>\n\t\t\t\t\t\t\t<div className=\"tile-type-buttons\">\n\t\t\t\t\t\t\t\t<ButtonTile className=\"icon-wizard\" icon=\"magic\" text=\"App wizard\" onClick={clickWizard} />\n\t\t\t\t\t\t\t\t<ButtonTile className=\"icon-manual\" icon=\"tools\" text=\"Manual setup (advanced)\" onClick={clickManual} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Content>\n\t\t\t\t\t</View>\n\t\t\t\t</div>\n\t\t\t) : currentSetupType === ApplicationSetupType.APP_EDIT_ADVANCED ||\n\t\t\t currentSetupType === ApplicationSetupType.APP_ADD_ADVANCED ? (\n\t\t\t\t<ApplicationEdit {...applicationEditProps} />\n\t\t\t) : (\n\t\t\t\t// else \"application setup wizard\"\n\t\t\t\t<ApplicationSetup {...applicationSetupProps} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationEdit.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Application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E,YAAY,EAAE,CAAC,GAGxD,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CACrC,CACD;wBAET,oBAAC,OAAO,QACN,CAAC,aAAa,CAAC,CAAC,CAAC,CACjB,oBAAC,WAAW,oBAAK,gBAAgB,EAAI,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,kBAAkB;4BAChC,4DAAkC;4BAElC,6BAAK,SAAS,EAAC,0BAA0B;gCACxC,6BAAK,SAAS,EAAC,mBAAmB;oCACjC,sDAA2B;oCAC3B,oBAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,QAAQ,GAAI,CAC5D;gCACN,yHAAoF;gCACpF,6BAAK,SAAS,EAAC,0BAA0B;oCACxC,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,yBAAyB,EAC9B,OAAO,EAAE,GAAG,EAAE;4CACb,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;wCACpC,CAAC,GACA;oCACF,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,GAAG,EAAE;4CACb,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;wCACjC,CAAC,GACA,CACG,CACD,CACD,CACN,CACQ,CACA,CACL,CACF,CACA,CACF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState } from \"react\";\r\nimport { View } from \"./View\";\r\nimport { Header } from \"../common/Header\";\r\nimport { Content } from \"./Content\";\r\nimport { Button } from \"../common/Button\";\r\nimport { AppEditPage, SubmittedDataProps } from \"./AppEditPage\";\r\nimport { generateDefaultConfig } from \"./sdd_helpers\";\r\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\r\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\r\nimport { AppEditPageProps } from \"./AppEditPage\";\r\nimport { AppDefinition } from \"@finsemble/finsemble-core/types/services/Interop/types\";\r\n\r\nexport type ApplicationEditProps = {\r\n\tid: string;\r\n\tisEditMode: boolean;\r\n\tisSetupWizard: boolean;\r\n\tonClickBackButton?: (e: React.MouseEvent<HTMLElement>) => void;\r\n\tsetCurrentComponentID: (id: string | null) => void;\r\n\tremoveAppID: (id: string) => void;\r\n\tremoveComponentID?: (id: string) => void;\r\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\r\n\tapps: object[];\r\n\tdata: ApplicationSaveData;\r\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\r\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\r\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\r\n};\r\n\r\nexport const ApplicationEdit = (props: ApplicationEditProps) => {\r\n\tconst [setupComplete, setSetupComplete] = useState(false);\r\n\tconst { displayName, windowURL, nativePath, currentAppType } = generateDefaultConfig(props.data);\r\n\r\n\tconst submitFn = (data: SubmittedDataProps) => {\r\n\t\tprops\r\n\t\t\t?.onSaveData?.({\r\n\t\t\t\t...data,\r\n\t\t\t\ttags: props.data.tags,\r\n\t\t\t})\r\n\t\t\t.then(() => {\r\n\t\t\t\tsetSetupComplete(true);\r\n\r\n\t\t\t\tif (props?.isEditMode) {\r\n\t\t\t\t\tprops?.setCurrentComponentID?.(\"\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t};\r\n\r\n\tconst cancelFn = () => {\r\n\t\tif (!props.isEditMode) {\r\n\t\t\tprops.removeAppID(props.id);\r\n\t\t}\r\n\r\n\t\tprops.setCurrentComponentID(null);\r\n\t};\r\n\r\n\tconst removeApplicationFn = () => {\r\n\t\tprops.removeAppID(props.id);\r\n\t\tprops.setCurrentComponentID(\"\");\r\n\t};\r\n\r\n\tconst validateURL = (url: string) => FSBL.Clients.SmartDesktopClient.checkValidURL(url);\r\n\r\n\tconst seeItNow = (e: React.MouseEvent<HTMLButtonElement>) => {\r\n\t\tFSBL.Clients.LauncherClient.spawn(props.id, {}, (err: any, response: any) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\"ApplicationEdit spawn error:\", err);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.log(\"ApplicationEdit spawn response:\", response);\r\n\t\t\t}\r\n\t\t});\r\n\t\te.preventDefault();\r\n\t};\r\n\r\n\tconst backFunction = (e: React.MouseEvent<HTMLButtonElement>) => {\r\n\t\tsetSetupComplete(false);\r\n\r\n\t\tif (!props.isEditMode) {\r\n\t\t\tprops.removeAppID(props.id);\r\n\t\t}\r\n\r\n\t\tif (typeof props.onClickBackButton === \"function\") {\r\n\t\t\t// we're a child of of ApplicationSetup\r\n\t\t\treturn props.onClickBackButton(e);\r\n\t\t}\r\n\t};\r\n\r\n\tconst helpFunction = () => {\r\n\t\tconst helpLink = props.isEditMode ? \"editing-applications\" : \"adding-applications\";\r\n\t\tlaunchTutorialLink(helpLink);\r\n\t};\r\n\r\n\tconst appEditPageProps: AppEditPageProps = {\r\n\t\tstartingDisplayName: displayName,\r\n\t\tisSetupWizard: props.isSetupWizard,\r\n\t\tisEditMode: props.isEditMode,\r\n\t\tstartingAppType: currentAppType,\r\n\t\tstartingWindowURL: windowURL,\r\n\t\tstartingNativePath: nativePath,\r\n\t\tstartingDescription: props?.data?.description || \"\",\r\n\t\tvalidateURL,\r\n\t\tstartingWidth: props.data.width || 0,\r\n\t\tstartingHeight: props.data.height || 0,\r\n\t\tstartingRules: props.data.rules || [],\r\n\t\tremoveApplicationFn,\r\n\t\tcancelFn,\r\n\t\tsubmitFn,\r\n\t\taddApp: props.addApp,\r\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\r\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-edit\">\r\n\t\t\t<View>\r\n\t\t\t\t<div>\r\n\t\t\t\t\t<form onSubmit={(e) => e.preventDefault()}>\r\n\t\t\t\t\t\t<fieldset className=\"app-edit-fieldset\">\r\n\t\t\t\t\t\t\t<legend>\r\n\t\t\t\t\t\t\t\t<Header\r\n\t\t\t\t\t\t\t\t\thelpFunction={helpFunction}\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t// Only display the back button during setup. Once setup is complete, hide the back button.\r\n\t\t\t\t\t\t\t\t\t\t...(setupComplete ? {} : { backFunction: backFunction })\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{props.isEditMode ? \"Edit App\" : \"Add an app\"}\r\n\t\t\t\t\t\t\t\t</Header>\r\n\t\t\t\t\t\t\t</legend>\r\n\r\n\t\t\t\t\t\t\t<Content>\r\n\t\t\t\t\t\t\t\t{!setupComplete ? (\r\n\t\t\t\t\t\t\t\t\t<AppEditPage {...appEditPageProps} />\r\n\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>Your application is added</h2>\r\n\r\n\t\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success-content\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-trial-wrapper\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Want to test it out?</p>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Button fashion=\"primary\" text=\"See it Now\" onClick={seeItNow} />\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<p>Your application is now available to be launched in the toolbar under “Apps”.</p>\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success-actions\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Add Another Application\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprops.setCurrentComponentID(\"new\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Return to List\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprops.setCurrentComponentID(\"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</Content>\r\n\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</div>\r\n\t\t\t</View>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"ApplicationEdit.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationEdit.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAA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K,SAAS,EAAC,0BAA0B;gCACxC,6BAAK,SAAS,EAAC,mBAAmB;oCACjC,sDAA2B;oCAC3B,oBAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,EAAC,OAAO,EAAE,QAAQ,GAAI,CAC5D;gCACN,yHAAoF;gCACpF,6BAAK,SAAS,EAAC,0BAA0B;oCACxC,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,yBAAyB,EAC9B,OAAO,EAAE,GAAG,EAAE;4CACb,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;wCACpC,CAAC,GACA;oCACF,oBAAC,MAAM,IACN,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,gBAAgB,EACrB,OAAO,EAAE,GAAG,EAAE;4CACb,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;wCACjC,CAAC,GACA,CACG,CACD,CACD,CACN,CACQ,CACA,CACL,CACF,CACA,CACF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState } from \"react\";\nimport { View } from \"./View\";\nimport { Header } from \"../common/Header\";\nimport { Content } from \"./Content\";\nimport { Button } from \"../common/Button\";\nimport { AppEditPage, SubmittedDataProps } from \"./AppEditPage\";\nimport { generateDefaultConfig } from \"./sdd_helpers\";\nimport { ApplicationSaveData } from \"../../types/smartDesktopDesignerTypes\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { AppEditPageProps } from \"./AppEditPage\";\nimport { AppDefinition } from \"@finsemble/finsemble-core/types/services/Interop/types\";\n\nexport type ApplicationEditProps = {\n\tid: string;\n\tisEditMode: boolean;\n\tisSetupWizard: boolean;\n\tonClickBackButton?: (e: React.MouseEvent<HTMLElement>) => void;\n\tsetCurrentComponentID: (id: string | null) => void;\n\tremoveAppID: (id: string) => void;\n\tremoveComponentID?: (id: string) => void;\n\tonSaveData: (data: ApplicationSaveData) => Promise<any>;\n\tapps: object[];\n\tdata: ApplicationSaveData;\n\taddApp: (appId: string, config: AppDefinition) => Promise<{ err: null }>;\n\tisInboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized;\n\tisOutboundInteropAuthorized: typeof FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized;\n};\n\nexport const ApplicationEdit = (props: ApplicationEditProps) => {\n\tconst [setupComplete, setSetupComplete] = useState(false);\n\tconst { displayName, windowURL, nativePath, currentAppType } = generateDefaultConfig(props.data);\n\n\tconst submitFn = (data: SubmittedDataProps) => {\n\t\tprops\n\t\t\t?.onSaveData?.({\n\t\t\t\t...data,\n\t\t\t\ttags: props.data.tags,\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tsetSetupComplete(true);\n\n\t\t\t\tif (props?.isEditMode) {\n\t\t\t\t\tprops?.setCurrentComponentID?.(\"\");\n\t\t\t\t}\n\t\t\t});\n\t};\n\n\tconst cancelFn = () => {\n\t\tif (!props.isEditMode) {\n\t\t\tprops.removeAppID(props.id);\n\t\t}\n\n\t\tprops.setCurrentComponentID(null);\n\t};\n\n\tconst removeApplicationFn = () => {\n\t\tprops.removeAppID(props.id);\n\t\tprops.setCurrentComponentID(\"\");\n\t};\n\n\tconst validateURL = (url: string) => FSBL.Clients.SmartDesktopClient.checkValidURL(url);\n\n\tconst seeItNow = (e: React.MouseEvent<HTMLButtonElement>) => {\n\t\tFSBL.Clients.LauncherClient.spawn(props.id, {}, (err: any, response: any) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"ApplicationEdit spawn error:\", err);\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.log(\"ApplicationEdit spawn response:\", response);\n\t\t\t}\n\t\t});\n\t\te.preventDefault();\n\t};\n\n\tconst backFunction = (e: React.MouseEvent<HTMLButtonElement>) => {\n\t\tsetSetupComplete(false);\n\n\t\tif (!props.isEditMode) {\n\t\t\tprops.removeAppID(props.id);\n\t\t}\n\n\t\tif (typeof props.onClickBackButton === \"function\") {\n\t\t\t// we're a child of of ApplicationSetup\n\t\t\treturn props.onClickBackButton(e);\n\t\t}\n\t};\n\n\tconst helpFunction = () => {\n\t\tconst helpLink = props.isEditMode ? \"editing-applications\" : \"adding-applications\";\n\t\tlaunchTutorialLink(helpLink);\n\t};\n\n\tconst appEditPageProps: AppEditPageProps = {\n\t\tstartingDisplayName: displayName,\n\t\tisSetupWizard: props.isSetupWizard,\n\t\tisEditMode: props.isEditMode,\n\t\tstartingAppType: currentAppType,\n\t\tstartingWindowURL: windowURL,\n\t\tstartingNativePath: nativePath,\n\t\tstartingDescription: props?.data?.description || \"\",\n\t\tvalidateURL,\n\t\tstartingWidth: props.data.width || 0,\n\t\tstartingHeight: props.data.height || 0,\n\t\tstartingRules: props.data.rules || [],\n\t\tremoveApplicationFn,\n\t\tcancelFn,\n\t\tsubmitFn,\n\t\taddApp: props.addApp,\n\t\tisInboundInteropAuthorized: props.isInboundInteropAuthorized,\n\t\tisOutboundInteropAuthorized: props.isOutboundInteropAuthorized,\n\t};\n\n\treturn (\n\t\t<div className=\"app-edit\">\n\t\t\t<View>\n\t\t\t\t<div>\n\t\t\t\t\t<form onSubmit={(e) => e.preventDefault()}>\n\t\t\t\t\t\t<fieldset className=\"app-edit-fieldset\">\n\t\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t\t<Header\n\t\t\t\t\t\t\t\t\thelpFunction={helpFunction}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// Only display the back button during setup. Once setup is complete, hide the back button.\n\t\t\t\t\t\t\t\t\t\t...(setupComplete ? {} : { backFunction: backFunction })\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\t\t{props.isEditMode ? \"Edit App\" : \"Add an app\"}\n\t\t\t\t\t\t\t\t</Header>\n\t\t\t\t\t\t\t</legend>\n\n\t\t\t\t\t\t\t<Content>\n\t\t\t\t\t\t\t\t{!setupComplete ? (\n\t\t\t\t\t\t\t\t\t<AppEditPage {...appEditPageProps} />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success\">\n\t\t\t\t\t\t\t\t\t\t<h2>Your application is added</h2>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success-content\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-trial-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Want to test it out?</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button fashion=\"primary\" text=\"See it Now\" onClick={seeItNow} />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<p>Your application is now available to be launched in the toolbar under “Apps”.</p>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"app-edit-success-actions\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Add Another Application\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprops.setCurrentComponentID(\"new\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tfashion=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext=\"Return to List\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprops.setCurrentComponentID(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Content>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</View>\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAW5C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAAC,CACvF,0CACE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,6BAAK,SAAS,EAAC,gBAAgB;;IAE9B,+BAAM;wCAED,CACN,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB,EAAC,IAAI,EAAC,MAAM,IACzC,IAAI;KACH,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACd,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QAC3B,OAAO,CAAC,CAAC,CAAC;KACV;IAED,OAAO,CAAC,CAAC;AACV,CAAC,CAAC;KACD,GAAG,CAAC,CAAC,SAAwB,EAAE,EAAE;;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;IAE9B,MAAM,mBAAmB,GAAG,CAAC,CAA2D,EAAE,EAAE;QAC3F,QAAQ,CAAC,KAAK,CAAC,CAAC;Q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EACb,OAAO,EAAE,qBAAqB,GAC7B,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC,CACE,CACN,CACC,CACH,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React from \"react\";\r\nimport { ButtonIcon } from \"../common/ButtonIcon\";\r\nimport \"../common/css/application-list.css\";\r\nimport { Tooltip } from \"../common/Tooltip\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype AppDefinition = services.Interop.types.AppDefinition;\r\n\r\nexport type ApplicationListProps = {\r\n\tapps: AppDefinition[];\r\n\tclickApp: (s: string) => void;\r\n\tdeleteApp: (s: string) => void;\r\n};\r\n\r\nexport const ApplicationList = ({ apps, clickApp, deleteApp }: ApplicationListProps) => (\r\n\t<>\r\n\t\t{apps.length < 1 ? (\r\n\t\t\t<div className=\"app-list-empty\">\r\n\t\t\t\tThere’s nothing here!\r\n\t\t\t\t<br />\r\n\t\t\t\tClick the Add button to add apps.\r\n\t\t\t</div>\r\n\t\t) : (\r\n\t\t\t<div className=\"app-list-table\" role=\"list\">\r\n\t\t\t\t{apps\r\n\t\t\t\t\t.sort((a, b) => {\r\n\t\t\t\t\t\tif (a.name > b.name) {\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t} else if (b.name > a.name) {\r\n\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.map((appDEntry: AppDefinition) => {\r\n\t\t\t\t\t\tconst appID = appDEntry.appId;\r\n\r\n\t\t\t\t\t\tconst openAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\tclickApp(appID);\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst deleteAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\tdeleteApp(appID);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\t\t\t\tswitch (e.key) {\r\n\t\t\t\t\t\t\t\tcase \"Enter\": {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \" \": {\r\n\t\t\t\t\t\t\t\t\topenAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcase \"Delete\": {\r\n\t\t\t\t\t\t\t\t\tdeleteAppEventHandler(e);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tdefault: {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tconst displayName = appDEntry.manifest?.component?.displayName || appDEntry.name || appID;\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={appID}\r\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\r\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\r\n\t\t\t\t\t\t\t\trole=\"listitem\"\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonClick={openAppEventHandler}\r\n\t\t\t\t\t\t\t\tonKeyDown={keyDownHandler}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{displayName}</span>\r\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\r\n\t\t\t\t\t\t\t\t\t{appDEntry.icons ? (\r\n\t\t\t\t\t\t\t\t\t\t<Tooltip altClassName=\"icon-warning\" position=\"left\">\r\n\t\t\t\t\t\t\t\t\t\t\tThis app group is empty.\r\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t<ButtonIcon\r\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\r\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\r\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\r\n\t\t\t\t\t\t\t\t\t\tonClick={deleteAppEventHandler}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t</div>\r\n\t\t)}\r\n\t</>\r\n);\r\n"]}
1
+ {"version":3,"file":"ApplicationList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ApplicationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAW5C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,EAAE,EAAE,CAAC,CACvF,0CACE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,6BAAK,SAAS,EAAC,gBAAgB;;IAE9B,+BAAM;wCAED,CACN,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB,EAAC,IAAI,EAAC,MAAM,IACzC,IAAI;KACH,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACd,IAAI,CAAC,C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,EAC5B,SAAS,EAAE,cAAc;QAEzB,8BAAM,SAAS,EAAC,UAAU,IAAE,WAAW,CAAQ;QAC/C,6BAAK,SAAS,EAAC,UAAU;YACvB,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAClB,oBAAC,OAAO,IAAC,YAAY,EAAC,cAAc,EAAC,QAAQ,EAAC,MAAM,+BAE1C,CACV,CAAC,CAAC,CAAC,CACH,EAAE,CACF;YACD,oBAAC,UAAU,IACV,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,aAAa,EACvB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,qBAAqB,GAC7B,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC,CACE,CACN,CACC,CACH,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { ButtonIcon } from \"../common/ButtonIcon\";\nimport \"../common/css/application-list.css\";\nimport { Tooltip } from \"../common/Tooltip\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nexport type ApplicationListProps = {\n\tapps: AppDefinition[];\n\tclickApp: (s: string) => void;\n\tdeleteApp: (s: string) => void;\n};\n\nexport const ApplicationList = ({ apps, clickApp, deleteApp }: ApplicationListProps) => (\n\t<>\n\t\t{apps.length < 1 ? (\n\t\t\t<div className=\"app-list-empty\">\n\t\t\t\tThere’s nothing here!\n\t\t\t\t<br />\n\t\t\t\tClick the Add button to add apps.\n\t\t\t</div>\n\t\t) : (\n\t\t\t<div className=\"app-list-table\" role=\"list\">\n\t\t\t\t{apps\n\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\tif (a.name > b.name) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else if (b.name > a.name) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t})\n\t\t\t\t\t.map((appDEntry: AppDefinition) => {\n\t\t\t\t\t\tconst appID = appDEntry.appId;\n\n\t\t\t\t\t\tconst openAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\n\t\t\t\t\t\t\tclickApp(appID);\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst deleteAppEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\tdeleteApp(appID);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\t\t\t\tswitch (e.key) {\n\t\t\t\t\t\t\t\tcase \"Enter\": {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase \" \": {\n\t\t\t\t\t\t\t\t\topenAppEventHandler(e);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase \"Delete\": {\n\t\t\t\t\t\t\t\t\tdeleteAppEventHandler(e);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst displayName = appDEntry.manifest?.component?.displayName || appDEntry.name || appID;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={appID}\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\n\t\t\t\t\t\t\t\trole=\"listitem\"\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\tonClick={openAppEventHandler}\n\t\t\t\t\t\t\t\tonKeyDown={keyDownHandler}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{displayName}</span>\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\n\t\t\t\t\t\t\t\t\t{appDEntry.icons ? (\n\t\t\t\t\t\t\t\t\t\t<Tooltip altClassName=\"icon-warning\" position=\"left\">\n\t\t\t\t\t\t\t\t\t\t\tThis app group is empty.\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t) : (\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\t<ButtonIcon\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\n\t\t\t\t\t\t\t\t\t\tonClick={deleteAppEventHandler}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t</div>\n\t\t)}\n\t</>\n);\n"]}