@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
@@ -37,90 +37,90 @@ if (!fs.existsSync(dir)) {
37
37
  console.log(`Target directory, ${path.relative(".", dir)}, does not exist`);
38
38
  return;
39
39
  }
40
- const component_template = `
41
- import React from "react";
42
-
43
- export interface ${name}Props {
44
- example: string;
45
- onClick: () => void;
46
- };
47
-
48
- export const ${name} = (props: ${name}Props) => {
49
- // Do things
50
- return (
51
- <div>
52
- <button onClick={props.onClick}>{props.example}</button>
53
- </div>
54
- );
55
- };
40
+ const component_template = `
41
+ import React from "react";
42
+
43
+ export interface ${name}Props {
44
+ example: string;
45
+ onClick: () => void;
46
+ };
47
+
48
+ export const ${name} = (props: ${name}Props) => {
49
+ // Do things
50
+ return (
51
+ <div>
52
+ <button onClick={props.onClick}>{props.example}</button>
53
+ </div>
54
+ );
55
+ };
56
56
  `;
57
- const story_template = `
58
- import React from "react";
59
- import { ${name}, ${name}Props } from "./${parsed_component_file.name}";
60
- import { Story } from "@storybook/react/types-6-0";
61
- import { action } from "@storybook/addon-actions";
62
- import "${prepRelativeLink(story_file, "./src/assets/css/finsemble.css")}";
63
-
64
- export default {
65
- title: "${name}",
66
- component: ${name}
67
- };
68
-
69
- const Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;
70
-
71
- export const BasicStory = Template.bind({});
72
- BasicStory.args = {
73
- example: "My Example",
74
- onClick: action("Clicked")
75
- };
57
+ const story_template = `
58
+ import React from "react";
59
+ import { ${name}, ${name}Props } from "./${parsed_component_file.name}";
60
+ import { Story } from "@storybook/react/types-6-0";
61
+ import { action } from "@storybook/addon-actions";
62
+ import "${prepRelativeLink(story_file, "./src/assets/css/finsemble.css")}";
63
+
64
+ export default {
65
+ title: "${name}",
66
+ component: ${name}
67
+ };
68
+
69
+ const Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;
70
+
71
+ export const BasicStory = Template.bind({});
72
+ BasicStory.args = {
73
+ example: "My Example",
74
+ onClick: action("Clicked")
75
+ };
76
76
  `;
77
- const test_template = `
78
- import * as React from "react";
79
- import { mount } from "enzyme";
80
- import { describe, it, afterEach } from "mocha";
81
- import { expect } from "chai";
82
- import { ${name}Props } from "./${path.parse(component_file).name}";
83
- import { BasicStory } from "./${path.parse(component_file).name}.stories";
84
-
85
- // For running accessibility scans
86
- import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/smartDesktopDesigner/tests/a11y_helper")}";
87
-
88
- // For testing user interactions (like click events):
89
- import sinon from "sinon";
90
- // Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)
91
- import addons, { mockChannel } from "@storybook/addons";
92
- addons.setChannel(mockChannel());
93
-
94
- describe("<${name}/>", () => {
95
- // Used to clear after each interactive test using sinon
96
- afterEach(() => {
97
- sinon.restore();
98
- });
99
-
100
- // Example basic test
101
- it("should display text", () => {
102
- const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
103
-
104
- expect(wrapper.find("button").exists(), "The button exists").to.be.true;
105
- expect(wrapper.find("button").text(), "The button's text").to.equal("My Example");
106
- });
107
-
108
- // Example interactive test
109
- it("should call function when clicked", () => {
110
- const buttonSpy = sinon.spy(BasicStory.args as ${name}Props, "onClick");
111
- const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
112
-
113
- wrapper.find("button").simulate("click");
114
- expect(buttonSpy.calledOnce).to.be.true;
115
- });
116
-
117
- // Example accessibility scan
118
- it("should pass accessibility scans", async () => {
119
- const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
120
-
121
- expect(await accessibilityAssessor(wrapper)).to.be.true;
122
- });
123
- });
77
+ const test_template = `
78
+ import * as React from "react";
79
+ import { mount } from "enzyme";
80
+ import { describe, it, afterEach } from "mocha";
81
+ import { expect } from "chai";
82
+ import { ${name}Props } from "./${path.parse(component_file).name}";
83
+ import { BasicStory } from "./${path.parse(component_file).name}.stories";
84
+
85
+ // For running accessibility scans
86
+ import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/smartDesktopDesigner/tests/a11y_helper")}";
87
+
88
+ // For testing user interactions (like click events):
89
+ import sinon from "sinon";
90
+ // Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)
91
+ import addons, { mockChannel } from "@storybook/addons";
92
+ addons.setChannel(mockChannel());
93
+
94
+ describe("<${name}/>", () => {
95
+ // Used to clear after each interactive test using sinon
96
+ afterEach(() => {
97
+ sinon.restore();
98
+ });
99
+
100
+ // Example basic test
101
+ it("should display text", () => {
102
+ const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
103
+
104
+ expect(wrapper.find("button").exists(), "The button exists").to.be.true;
105
+ expect(wrapper.find("button").text(), "The button's text").to.equal("My Example");
106
+ });
107
+
108
+ // Example interactive test
109
+ it("should call function when clicked", () => {
110
+ const buttonSpy = sinon.spy(BasicStory.args as ${name}Props, "onClick");
111
+ const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
112
+
113
+ wrapper.find("button").simulate("click");
114
+ expect(buttonSpy.calledOnce).to.be.true;
115
+ });
116
+
117
+ // Example accessibility scan
118
+ it("should pass accessibility scans", async () => {
119
+ const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);
120
+
121
+ expect(await accessibilityAssessor(wrapper)).to.be.true;
122
+ });
123
+ });
124
124
  `;
125
125
  fs.writeFile(component_file, component_template, (err) => {
126
126
  if (err) {
@@ -134,7 +134,7 @@ fs.writeFile(story_file, story_template, (err) => {
134
134
  console.log(`Error writing to file path ${story_file}`, err);
135
135
  return;
136
136
  }
137
- console.log(`Story added at path "${path.relative(".", story_file)}".
137
+ console.log(`Story added at path "${path.relative(".", story_file)}".
138
138
  To view it, run: yarn storybook`);
139
139
  });
140
140
  fs.writeFile(test_file, test_template, (err) => {
@@ -142,8 +142,8 @@ fs.writeFile(test_file, test_template, (err) => {
142
142
  console.log(`Error writing to file path ${test_file}`, err);
143
143
  return;
144
144
  }
145
- console.log(`Tests added at "${path.relative(".", test_file)}".
146
- To run this test, run: yarn test-storybook -g ${name}
145
+ console.log(`Tests added at "${path.relative(".", test_file)}".
146
+ To run this test, run: yarn test-storybook -g ${name}
147
147
  To run all tests, run: yarn test`);
148
148
  });
149
149
  //# sourceMappingURL=componentTemplateGenerator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"componentTemplateGenerator.js","sourceRoot":"","sources":["../src/componentTemplateGenerator.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,IAAI,GAAG,OAAO,C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IAChD,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;gCACnC,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;IAC9C,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC;QAC5D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gDACb,IAAI;iCACnB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC","sourcesContent":["const fs = require(\"fs\");\r\nconst path = require(\"path\");\r\n\r\nconst args = process.argv.slice(2);\r\nlet file = \"\";\r\nlet name = \"MyComponent\";\r\n\r\n// Stupid simple args parser\r\nfor (let i = 0; i < args.length; i++) {\r\n\tswitch (args[i]) {\r\n\t\tcase \"--file\": {\r\n\t\t\tfile = args[++i];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"--name\": {\r\n\t\t\tname = args[++i];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\tconsole.log(`Unknown flag: ${args[i]}`);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nif (file === \"\") {\r\n\tconsole.log(\"Error: no provided file\");\r\n\treturn;\r\n}\r\n\r\nconst prepRelativeLink = (from, to) =>\r\n\tpath\r\n\t\t.relative(from, to)\r\n\t\t.replace(/\\\\/g, \"/\") // swap the slashes\r\n\t\t.replace(\"../\", \"\"); // path.relative adds an extra \"../\" for some reason, so remove it\r\nconst base_path = path.join(\"src\", \"components\", file);\r\nconst component_file = `${base_path}.tsx`;\r\nconst story_file = `${base_path}.stories.tsx`;\r\nconst test_file = `${base_path}.spec.tsx`;\r\n\r\nconst parsed_component_file = path.parse(component_file);\r\nconst { dir } = parsed_component_file;\r\nif (!fs.existsSync(dir)) {\r\n\tconsole.log(`Target directory, ${path.relative(\".\", dir)}, does not exist`);\r\n\treturn;\r\n}\r\n\r\nconst component_template = `\r\nimport React from \"react\";\r\n\r\nexport interface ${name}Props {\r\n example: string;\r\n onClick: () => void;\r\n};\r\n\r\nexport const ${name} = (props: ${name}Props) => {\r\n // Do things\r\n return (\r\n <div>\r\n <button onClick={props.onClick}>{props.example}</button>\r\n </div>\r\n );\r\n};\r\n`;\r\n\r\nconst story_template = `\r\nimport React from \"react\";\r\nimport { ${name}, ${name}Props } from \"./${parsed_component_file.name}\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\nimport \"${prepRelativeLink(story_file, \"./src/assets/css/finsemble.css\")}\";\r\n\r\nexport default {\r\n title: \"${name}\",\r\n component: ${name}\r\n};\r\n\r\nconst Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;\r\n\r\nexport const BasicStory = Template.bind({});\r\nBasicStory.args = {\r\n example: \"My Example\",\r\n onClick: action(\"Clicked\")\r\n};\r\n`;\r\n\r\nconst test_template = `\r\nimport * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it, afterEach } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport { ${name}Props } from \"./${path.parse(component_file).name}\";\r\nimport { BasicStory } from \"./${path.parse(component_file).name}.stories\";\r\n\r\n// For running accessibility scans\r\nimport { accessibilityAssessor } from \"${prepRelativeLink(\r\n\ttest_file,\r\n\t\"./src/components/smartDesktopDesigner/tests/a11y_helper\"\r\n)}\";\r\n\r\n// For testing user interactions (like click events):\r\nimport sinon from \"sinon\";\r\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\r\nimport addons, { mockChannel } from \"@storybook/addons\";\r\naddons.setChannel(mockChannel());\r\n\r\ndescribe(\"<${name}/>\", () => {\r\n // Used to clear after each interactive test using sinon\r\n afterEach(() => {\r\n sinon.restore();\r\n });\r\n\r\n // Example basic test\r\n it(\"should display text\", () => {\r\n const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\r\n\r\n expect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\r\n expect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"My Example\");\r\n });\r\n\r\n // Example interactive test\r\n it(\"should call function when clicked\", () => {\r\n\t\tconst buttonSpy = sinon.spy(BasicStory.args as ${name}Props, \"onClick\");\r\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\r\n\r\n wrapper.find(\"button\").simulate(\"click\");\r\n expect(buttonSpy.calledOnce).to.be.true;\r\n });\r\n\r\n\t// Example accessibility scan\r\n\tit(\"should pass accessibility scans\", async () => {\r\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n});\r\n`;\r\n\r\nfs.writeFile(component_file, component_template, (err) => {\r\n\tif (err) {\r\n\t\tconsole.log(`Error writing to file path ${component_file}`, err);\r\n\t\treturn;\r\n\t}\r\n\tconsole.log(`Component added at ${path.relative(\".\", component_file)}`);\r\n});\r\nfs.writeFile(story_file, story_template, (err) => {\r\n\tif (err) {\r\n\t\tconsole.log(`Error writing to file path ${story_file}`, err);\r\n\t\treturn;\r\n\t}\r\n\tconsole.log(`Story added at path \"${path.relative(\".\", story_file)}\".\r\nTo view it, run: yarn storybook`);\r\n});\r\nfs.writeFile(test_file, test_template, (err) => {\r\n\tif (err) {\r\n\t\tconsole.log(`Error writing to file path ${test_file}`, err);\r\n\t\treturn;\r\n\t}\r\n\tconsole.log(`Tests added at \"${path.relative(\".\", test_file)}\".\r\nTo run this test, run: yarn test-storybook -g ${name}\r\nTo run all tests, run: yarn test`);\r\n});\r\n"]}
1
+ {"version":3,"file":"componentTemplateGenerator.js","sourceRoot":"","sources":["../src/componentTemplateGenerator.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,IAAI,GAAG,aAAa,CAAC;AAGzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB,MAAM;SACN;QACD,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB,MAAM;SACN;QACD,OAAO,CAAC,CAAC;YACR,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACxC;KACD;CACD;AAED,IAAI,IAAI,KAAK,EAAE,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO;CACP;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CACrC,IAAI;KACF,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;KAClB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;KACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACtB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,CAA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cAAc,EAAE,EAAE,GAAG,CAAC,CAAC;QACjE,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,CAAC,GAAG,EAAE,EAAE;IAChD,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;gCACnC,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;IAC9C,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC;QAC5D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gDACb,IAAI;iCACnB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC","sourcesContent":["const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst args = process.argv.slice(2);\nlet file = \"\";\nlet name = \"MyComponent\";\n\n// Stupid simple args parser\nfor (let i = 0; i < args.length; i++) {\n\tswitch (args[i]) {\n\t\tcase \"--file\": {\n\t\t\tfile = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tcase \"--name\": {\n\t\t\tname = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.log(`Unknown flag: ${args[i]}`);\n\t\t}\n\t}\n}\n\nif (file === \"\") {\n\tconsole.log(\"Error: no provided file\");\n\treturn;\n}\n\nconst prepRelativeLink = (from, to) =>\n\tpath\n\t\t.relative(from, to)\n\t\t.replace(/\\\\/g, \"/\") // swap the slashes\n\t\t.replace(\"../\", \"\"); // path.relative adds an extra \"../\" for some reason, so remove it\nconst base_path = path.join(\"src\", \"components\", file);\nconst component_file = `${base_path}.tsx`;\nconst story_file = `${base_path}.stories.tsx`;\nconst test_file = `${base_path}.spec.tsx`;\n\nconst parsed_component_file = path.parse(component_file);\nconst { dir } = parsed_component_file;\nif (!fs.existsSync(dir)) {\n\tconsole.log(`Target directory, ${path.relative(\".\", dir)}, does not exist`);\n\treturn;\n}\n\nconst component_template = `\nimport React from \"react\";\n\nexport interface ${name}Props {\n example: string;\n onClick: () => void;\n};\n\nexport const ${name} = (props: ${name}Props) => {\n // Do things\n return (\n <div>\n <button onClick={props.onClick}>{props.example}</button>\n </div>\n );\n};\n`;\n\nconst story_template = `\nimport React from \"react\";\nimport { ${name}, ${name}Props } from \"./${parsed_component_file.name}\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"${prepRelativeLink(story_file, \"./src/assets/css/finsemble.css\")}\";\n\nexport default {\n title: \"${name}\",\n component: ${name}\n};\n\nconst Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;\n\nexport const BasicStory = Template.bind({});\nBasicStory.args = {\n example: \"My Example\",\n onClick: action(\"Clicked\")\n};\n`;\n\nconst test_template = `\nimport * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ${name}Props } from \"./${path.parse(component_file).name}\";\nimport { BasicStory } from \"./${path.parse(component_file).name}.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"${prepRelativeLink(\n\ttest_file,\n\t\"./src/components/smartDesktopDesigner/tests/a11y_helper\"\n)}\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<${name}/>\", () => {\n // Used to clear after each interactive test using sinon\n afterEach(() => {\n sinon.restore();\n });\n\n // Example basic test\n it(\"should display text\", () => {\n const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n expect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n expect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"My Example\");\n });\n\n // Example interactive test\n it(\"should call function when clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(BasicStory.args as ${name}Props, \"onClick\");\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n wrapper.find(\"button\").simulate(\"click\");\n expect(buttonSpy.calledOnce).to.be.true;\n });\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n`;\n\nfs.writeFile(component_file, component_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${component_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Component added at ${path.relative(\".\", component_file)}`);\n});\nfs.writeFile(story_file, story_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${story_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Story added at path \"${path.relative(\".\", story_file)}\".\nTo view it, run: yarn storybook`);\n});\nfs.writeFile(test_file, test_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${test_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Tests added at \"${path.relative(\".\", test_file)}\".\nTo run this test, run: yarn test-storybook -g ${name}\nTo run all tests, run: yarn test`);\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { store, createStore } from \"../store\";\r\nimport { Provider } from \"react-redux\";\r\nimport { useState, useEffect } from \"react\";\r\n//import { common } from \"@finsemble/finsemble-core\";\r\n\r\n//let { Globals } = common;\r\n\r\nexport { createStore };\r\n\r\n/**\r\n * The <FinsembleProvider> must be an ancestor of any Finsemble React UI components or hooks.\r\n * It manages FSBL initialization (ensuring that all components and hooks are operating with a properly initialized API.)\r\n * It also constructs the UI API's redux store and makes it available through a Context Provider for all descendent components and hooks.\r\n *\r\n * The <FinsembleProvider> will render its children.\r\n */\r\n\r\nexport type FinsembleProviderProps = {\r\n\tstore?: typeof store;\r\n};\r\n\r\nexport const FinsembleProvider: React.FunctionComponent<FinsembleProviderProps> = (props) => {\r\n\tconst [ready, setReady] = useState(false);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (ready) return;\r\n\t\tconst release = () => {\r\n\t\t\tsetReady(true);\r\n\t\t};\r\n\t\twindow.FSBL && FSBL?.addEventListener\r\n\t\t\t? FSBL.addEventListener(\"onReady\", release)\r\n\t\t\t: window.addEventListener(\"FSBLReady\", release);\r\n\t}, [ready]);\r\n\r\n\treturn ready ? <Provider store={props.store || store}>{props.children}</Provider> : null;\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { store, createStore } from \"../store\";\nimport { Provider } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\n//import { common } from \"@finsemble/finsemble-core\";\n\n//let { Globals } = common;\n\nexport { createStore };\n\n/**\n * The <FinsembleProvider> must be an ancestor of any Finsemble React UI components or hooks.\n * It manages FSBL initialization (ensuring that all components and hooks are operating with a properly initialized API.)\n * It also constructs the UI API's redux store and makes it available through a Context Provider for all descendent components and hooks.\n *\n * The <FinsembleProvider> will render its children.\n */\n\nexport type FinsembleProviderProps = {\n\tstore?: typeof store;\n};\n\nexport const FinsembleProvider: React.FunctionComponent<FinsembleProviderProps> = (props) => {\n\tconst [ready, setReady] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (ready) return;\n\t\tconst release = () => {\n\t\t\tsetReady(true);\n\t\t};\n\t\twindow.FSBL && FSBL?.addEventListener\n\t\t\t? FSBL.addEventListener(\"onReady\", release)\n\t\t\t: window.addEventListener(\"FSBLReady\", release);\n\t}, [ready]);\n\n\treturn ready ? <Provider store={props.store || store}>{props.children}</Provider> : null;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppCatalog.js","sourceRoot":"","sources":["../../../src/components/appCatalog/AppCatalog.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAMjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,GAAG,EAAE;YAChB,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,OAAO,0CAAG,OAAO,IAAI,oBAAC,mBAAmB,OAAG,CAAI,CAAC;AAClD,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { createStore } from \"./stores/appStore\";\r\nimport { AppCatalogComponent } from \"./AppCatalogComponent\";\r\nimport storeActions from \"./stores/storeActions\";\r\n\r\n/**\r\n * A UI component that stores all the applications and allows the end user to add, remove, browse, or launch an application\r\n * from the app catalog window.\r\n */\r\nexport const AppCatalog = () => {\r\n\tconst [isReady, setIsReady] = useState(false);\r\n\tuseEffect(() => {\r\n\t\tcreateStore(() => {\r\n\t\t\tstoreActions.initialize(() => {\r\n\t\t\t\tsetIsReady(true);\r\n\t\t\t});\r\n\t\t});\r\n\t\treturn () => {};\r\n\t});\r\n\treturn <>{isReady && <AppCatalogComponent />}</>;\r\n};\r\n"]}
1
+ {"version":3,"file":"AppCatalog.js","sourceRoot":"","sources":["../../../src/components/appCatalog/AppCatalog.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAMjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,GAAG,EAAE;YAChB,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,OAAO,0CAAG,OAAO,IAAI,oBAAC,mBAAmB,OAAG,CAAI,CAAC;AAClD,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\nimport { createStore } from \"./stores/appStore\";\nimport { AppCatalogComponent } from \"./AppCatalogComponent\";\nimport storeActions from \"./stores/storeActions\";\n\n/**\n * A UI component that stores all the applications and allows the end user to add, remove, browse, or launch an application\n * from the app catalog window.\n */\nexport const AppCatalog = () => {\n\tconst [isReady, setIsReady] = useState(false);\n\tuseEffect(() => {\n\t\tcreateStore(() => {\n\t\t\tstoreActions.initialize(() => {\n\t\t\t\tsetIsReady(true);\n\t\t\t});\n\t\t});\n\t\treturn () => {};\n\t});\n\treturn <>{isReady && <AppCatalogComponent />}</>;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppCatalogComponent.js","sourceRoot":"","sources":["../../../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IAAI,CAAC,aAAa,EAC9B,WAAW,EAAE,IAAI,CAAC,MAAM,EACxB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,uBAAuB,EAC3D,MAAM,EAAE,IAAI,CAAC,YAAY,EACzB,YAAY,EAAE,IAAI,CAAC,WAAW,GAC7B;gBACF,6BAAK,SAAS,EAAC,gBAAgB,IAAE,YAAY,CAAO,CAC/C,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\n// components\r\nimport SearchBar from \"./components/SearchBar\";\r\nimport Home from \"./components/Home\";\r\nimport AppResults from \"./components/AppResults\";\r\nimport AppShowcase from \"./components/Showcase/AppShowcase\";\r\n\r\n// data\r\nimport { getStore } from \"./stores/appStore\";\r\nimport storeActions from \"./stores/storeActions\";\r\n\r\nimport \"../../assets/css/appCatalog.css\";\r\n\r\nexport class AppCatalogComponent extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tapps: [], // type: AppMetadata (from \"../../../types/fdc3\")\r\n\t\t\tisLoading: false,\r\n\t\t\tserverError: false,\r\n\t\t\tinstalled: [],\r\n\t\t\ttags: [], // type: string[]\r\n\t\t\tinstallationActionTaken: null, // type: string | null\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.addedAppsChanged = this.addedAppsChanged.bind(this);\r\n\t\tthis.update = this.update.bind(this);\r\n\t\tthis.goHome = this.goHome.bind(this);\r\n\t\tthis.addTag = this.addTag.bind(this);\r\n\t\tthis.removeTag = this.removeTag.bind(this);\r\n\t\tthis.changeSearch = this.changeSearch.bind(this);\r\n\t\tthis.openAppShowcase = this.openAppShowcase.bind(this);\r\n\t\tthis.stopShowingInstalledNotification = this.stopShowingInstalledNotification.bind(this);\r\n\t\tthis.compileAddedInfo = this.compileAddedInfo.bind(this);\r\n\t\tthis.getPageContents = this.getPageContents.bind(this);\r\n\t\tthis.determineActivePage = this.determineActivePage.bind(this);\r\n\t\tthis.navigateToShowcase = this.navigateToShowcase.bind(this);\r\n\t\tthis.viewApp = this.viewApp.bind(this);\r\n\t\tthis.isActiveApp = this.isActiveApp.bind(this);\r\n\t\tthis.getActiveTags = this.getActiveTags.bind(this);\r\n\t}\r\n\r\n\t// eslint-disable-next-line react/no-deprecated\r\n\tUNSAFE_componentWillMount() {\r\n\t\t// For more information on async react rendering, see here\r\n\t\t// https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html\r\n\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tisLoading: true,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tthis._asyncAppRequest = storeActions\r\n\t\t\t\t\t.getApps()\r\n\t\t\t\t\t.then((apps) => {\r\n\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\tapps,\r\n\t\t\t\t\t\t\tisLoading: false,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.catch((err) => {\r\n\t\t\t\t\t\tthis.setState(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tserverError: true,\r\n\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\tFSBL.Clients.Logger.error(\"Error connecting to FDC3 AppD server.\", err);\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}\r\n\t\t);\r\n\r\n\t\tthis._asyncTagsRequest = storeActions\r\n\t\t\t.getTags()\r\n\t\t\t.then((tags) => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\ttags,\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tthis.setState(\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tserverError: true,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.error(\"Error retrieving tags from FDC3 AppD server.\", err);\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tgetStore().addListener({ field: \"appDefinitions\" }, this.addedAppsChanged);\r\n\t\tgetStore().addListener({ field: \"filteredApps\" }, this.update);\r\n\t\tgetStore().addListener({ field: \"activeTags\" }, this.update);\r\n\t\tgetStore().addListener({ field: \"activeApp\" }, this.openAppShowcase);\r\n\t\t// Get notified when user wants to view an app\r\n\t\tFSBL.Clients.RouterClient.addListener(\"viewApp\", this.viewApp);\r\n\t\tlet installed = storeActions.getInstalledApps();\r\n\r\n\t\tthis.setState({\r\n\t\t\tinstalled: Object.keys(installed),\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tgetStore().removeListener({ field: \"appDefinitions\" }, this.addedAppsChanged);\r\n\t\tgetStore().removeListener({ field: \"filteredApps\" }, this.update);\r\n\t\tgetStore().removeListener({ field: \"activeTags\" }, this.update);\r\n\t\tgetStore().removeListener({ field: \"activeApp\" }, this.openAppShowcase);\r\n\t\t// Get notified when user wants to view an app\r\n\t\tFSBL.Clients.RouterClient.removeListener(\"viewApp\", this.viewApp);\r\n\r\n\t\t// Make sure async requests have finished.\r\n\t\tif (this._asyncAppRequest && this._asyncAppRequest.cancel) {\r\n\t\t\tthis._asyncAppRequest.cancel();\r\n\t\t}\r\n\r\n\t\tif (this._asyncTagsRequest && this._asyncTagsRequest.cancel) {\r\n\t\t\tthis._asyncTagsRequest.cancel();\r\n\t\t}\r\n\t}\r\n\r\n\tviewApp(error, event) {\r\n\t\t!error && this.navigateToShowcase(event.data.app.appID);\r\n\t}\r\n\r\n\taddedAppsChanged() {\r\n\t\tlet action;\r\n\t\tif (this.state.installed.length > Object.keys(storeActions.getInstalledApps()).length) {\r\n\t\t\t// If the components installed apps is greater than that of the store, that means an app was removed\r\n\t\t\taction = \"remove\";\r\n\t\t} else if (this.state.installed.length < Object.keys(storeActions.getInstalledApps()).length) {\r\n\t\t\t// If the component's installed apps is less than that of the store, that means an app was added\r\n\t\t\taction = \"add\";\r\n\t\t}\r\n\r\n\t\tif (action) {\r\n\t\t\tthis.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tinstallationActionTaken: action,\r\n\t\t\t\t\tinstalled: Object.keys(storeActions.getInstalledApps()),\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tsetTimeout(this.stopShowingInstalledNotification, 1500);\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Force an update. Used to update from store listeners.\r\n\t *\r\n\t * @memberof AppMarket\r\n\t */\r\n\tupdate() {\r\n\t\tthis.forceUpdate();\r\n\t}\r\n\r\n\t/**\r\n\t * Determines the apps page based on the state of the activeTags, search text, etc\r\n\t */\r\n\tdetermineActivePage() {\r\n\t\tconst activeTags = this.getActiveTags();\r\n\t\tconst filteredApps = this.getFilteredApps();\r\n\t\tconst activeApp = this.getActiveApp();\r\n\t\tconst forceSearch = storeActions.getForceSearch();\r\n\t\tlet page;\r\n\r\n\t\tif (activeApp && !forceSearch) {\r\n\t\t\tpage = \"showcase\";\r\n\t\t} else if (filteredApps.length > 0 || forceSearch) {\r\n\t\t\tpage = \"appSearch\";\r\n\t\t} else if (filteredApps.length === 0 && activeTags.length === 0) {\r\n\t\t\tpage = \"home\";\r\n\t\t}\r\n\r\n\t\treturn page;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the activeApp from the Store\r\n\t *\r\n\t * @returns {string} activeApp\r\n\t * @memberof AppMarket\r\n\t */\r\n\tgetActiveApp() {\r\n\t\treturn storeActions.getActiveApp();\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if we have an activeApp defined\r\n\t *\r\n\t * @returns {boolean}\r\n\t * @memberof AppMarket\r\n\t */\r\n\tisActiveApp() {\r\n\t\treturn storeActions.getActiveApp() !== null;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the active tags from the store\r\n\t *\r\n\t * @returns {array} activeTags\r\n\t * @memberof AppMarket\r\n\t */\r\n\tgetActiveTags() {\r\n\t\treturn storeActions.getActiveTags();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the filtered list of apps from search\r\n\t *\r\n\t * @returns {object} filteredApps\r\n\t * @memberof AppMarket\r\n\t */\r\n\tgetFilteredApps() {\r\n\t\treturn storeActions.getFilteredApps();\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the store to add a tag to the activeTag list. Also updates the app view to switch to the AppResults page (since adding a tag implies filtering has begun)\r\n\t * @param {string} tag The name of the tag to add\r\n\t */\r\n\taddTag(tag) {\r\n\t\tstoreActions.addTag(tag);\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the store to remove a tag from the activeTag list. Also updates the app view to switch to the homepage if all tags have been removed\r\n\t * @param {string} tag The name of the tag to add\r\n\t */\r\n\tremoveTag(tag) {\r\n\t\tstoreActions.removeTag(tag);\r\n\t}\r\n\r\n\t/**\r\n\t * Action to take when the back button is clicked (which just goes home)\r\n\t */\r\n\tgoHome() {\r\n\t\tstoreActions.goHome();\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a search through the catalog\r\n\t * @param {string} search The text to search the catalog with\r\n\t */\r\n\tchangeSearch(search) {\r\n\t\tstoreActions.searchApps(search);\r\n\t}\r\n\r\n\t/**\r\n\t * When the notification for installing/removing an app is shown a timeout is set to call this function to cease showing the notification\r\n\t */\r\n\tstopShowingInstalledNotification() {\r\n\t\tthis.setState({\r\n\t\t\tinstallationActionTaken: null,\r\n\t\t});\r\n\t}\r\n\r\n\tnavigateToShowcase(id) {\r\n\t\tstoreActions.openApp(id);\r\n\t}\r\n\r\n\t/**\r\n\t * Opens the AppShowcase page for the app supplied\r\n\t */\r\n\topenAppShowcase() {\r\n\t\tlet app = storeActions.getActiveApp();\r\n\r\n\t\tif (app !== null) {\r\n\t\t\tstoreActions.setForceSearch(false);\r\n\t\t\tstoreActions.clearTags();\r\n\t\t\tstoreActions.clearFilteredApps();\r\n\t\t}\r\n\r\n\t\tthis.forceUpdate();\r\n\t}\r\n\r\n\t/**\r\n\t * Compiles a list of apps that are installed from the information received back from appd\r\n\t * and the information contained on the system\r\n\t * @param {boolean} filtered If true, uses the filtered apps array. Otherwise uses all apps\r\n\t */\r\n\tcompileAddedInfo(filtered) {\r\n\t\tconst { installed } = this.state;\r\n\t\tconst forceSearch = storeActions.getForceSearch();\r\n\t\tconst apps = filtered || forceSearch ? storeActions.getFilteredApps() : this.state.apps;\r\n\r\n\t\treturn apps.map((app) => {\r\n\t\t\tif (installed.includes(app.appId)) {\r\n\t\t\t\tapp.installed = true;\r\n\t\t\t} else {\r\n\t\t\t\tapp.installed = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn app;\r\n\t\t});\r\n\t}\r\n\r\n\tgetPageContents() {\r\n\t\tconst filteredApps = this.getFilteredApps();\r\n\t\tconst activeTags = this.getActiveTags();\r\n\t\tconst activePage = this.determineActivePage();\r\n\t\tconst apps = this.compileAddedInfo(filteredApps.length > 0);\r\n\t\t// Force default case if activepage isn't search and apps.length is 0\r\n\t\tif (apps.length === 0 && activePage !== \"appSearch\") activePage = -1;\r\n\t\tconst theApp = this.compileAddedInfo(false).find((app) => this.getActiveApp() === app.appId);\r\n\t\tswitch (activePage) {\r\n\t\t\tcase \"home\":\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<Home\r\n\t\t\t\t\t\ttags={this.state.tags}\r\n\t\t\t\t\t\tcards={apps}\r\n\t\t\t\t\t\tseeMore={this.addTag}\r\n\t\t\t\t\t\taddApp={this.addApp}\r\n\t\t\t\t\t\tremoveApp={this.removeApp}\r\n\t\t\t\t\t\taddTag={this.addTag}\r\n\t\t\t\t\t\tviewAppShowcase={this.navigateToShowcase}\r\n\t\t\t\t\t/>\r\n\t\t\t\t);\r\n\t\t\tcase \"appSearch\":\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<AppResults\r\n\t\t\t\t\t\tcards={apps}\r\n\t\t\t\t\t\ttags={activeTags}\r\n\t\t\t\t\t\taddApp={this.addApp}\r\n\t\t\t\t\t\tremoveApp={this.removeApp}\r\n\t\t\t\t\t\tviewAppShowcase={this.navigateToShowcase}\r\n\t\t\t\t\t\taddTag={this.addTag}\r\n\t\t\t\t\t/>\r\n\t\t\t\t);\r\n\t\t\tcase \"showcase\":\r\n\t\t\t\treturn <AppShowcase app={theApp} addApp={this.addApp} removeApp={this.removeApp} addTag={this.addTag} />;\r\n\t\t\tdefault:\r\n\t\t\t\treturn <div></div>;\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { tags } = this.state;\r\n\t\tlet page = this.determineActivePage();\r\n\t\tlet pageContents = this.getPageContents();\r\n\r\n\t\treturn (\r\n\t\t\t<div className=\"app-catalog\">\r\n\t\t\t\t{this.state.serverError && (\r\n\t\t\t\t\t<div className=\"server-error\">\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<span>Catalog contents are currently unavailable.</span>\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<span>Please check your connection or consult your System Admin.</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t\t{this.state.apps.length === 0 && !this.state.isLoading && (\r\n\t\t\t\t\t<div className=\"server-error\">\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<span>There are no apps available in this catalog.</span>\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<span>Please contact your System Admin.</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t\t{this.state.apps.length > 0 && (\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<SearchBar\r\n\t\t\t\t\t\t\thidden={page === \"showcase\"}\r\n\t\t\t\t\t\t\tbackButton={page !== \"home\"}\r\n\t\t\t\t\t\t\ttags={tags}\r\n\t\t\t\t\t\t\tactiveTags={this.getActiveTags}\r\n\t\t\t\t\t\t\ttagSelected={this.addTag}\r\n\t\t\t\t\t\t\tremoveTag={this.removeTag}\r\n\t\t\t\t\t\t\tgoHome={this.goHome}\r\n\t\t\t\t\t\t\tinstallationActionTaken={this.state.installationActionTaken}\r\n\t\t\t\t\t\t\tsearch={this.changeSearch}\r\n\t\t\t\t\t\t\tisViewingApp={this.isActiveApp}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<div className=\"market_content\">{pageContents}</div>\r\n\t\t\t\t\t</div>\r\n\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":"AppCatalogComponent.js","sourceRoot":"","sources":["../../../src/components/appCatalog/AppCatalogComponent.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAEjD,OAAO,iCAAiC,CAAC;AAEzC,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,SAAS;IACvD,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,KAAK;YAClB,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,EAAE;YACR,uBAAuB,EAAE,IAAI;SAC7B,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAED,kBAAk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EAAC,cAAc;gBAC5B,+BAAM;gBACN,+BAAM;gBACN,gFAAwD;gBACxD,+BAAM;gBACN,+FAAuE,CAClE,CACN;YACA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CACzD,6BAAK,SAAS,EAAC,cAAc;gBAC5B,+BAAM;gBACN,+BAAM;gBACN,iFAAyD;gBACzD,+BAAM;gBACN,sEAA8C,CACzC,CACN;YACA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B;gBACC,oBAAC,SAAS,IACT,MAAM,EAAE,IAAI,KAAK,UAAU,EAC3B,UAAU,EAAE,IAAI,KAAK,MAAM,EAC3B,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,IAAI,CAAC,aAAa,EAC9B,WAAW,EAAE,IAAI,CAAC,MAAM,EACxB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,uBAAuB,EAC3D,MAAM,EAAE,IAAI,CAAC,YAAY,EACzB,YAAY,EAAE,IAAI,CAAC,WAAW,GAC7B;gBACF,6BAAK,SAAS,EAAC,gBAAgB,IAAE,YAAY,CAAO,CAC/C,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\n// components\nimport SearchBar from \"./components/SearchBar\";\nimport Home from \"./components/Home\";\nimport AppResults from \"./components/AppResults\";\nimport AppShowcase from \"./components/Showcase/AppShowcase\";\n\n// data\nimport { getStore } from \"./stores/appStore\";\nimport storeActions from \"./stores/storeActions\";\n\nimport \"../../assets/css/appCatalog.css\";\n\nexport class AppCatalogComponent extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tapps: [], // type: AppMetadata (from \"../../../types/fdc3\")\n\t\t\tisLoading: false,\n\t\t\tserverError: false,\n\t\t\tinstalled: [],\n\t\t\ttags: [], // type: string[]\n\t\t\tinstallationActionTaken: null, // type: string | null\n\t\t};\n\t\tthis.bindCorrectContext();\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.addedAppsChanged = this.addedAppsChanged.bind(this);\n\t\tthis.update = this.update.bind(this);\n\t\tthis.goHome = this.goHome.bind(this);\n\t\tthis.addTag = this.addTag.bind(this);\n\t\tthis.removeTag = this.removeTag.bind(this);\n\t\tthis.changeSearch = this.changeSearch.bind(this);\n\t\tthis.openAppShowcase = this.openAppShowcase.bind(this);\n\t\tthis.stopShowingInstalledNotification = this.stopShowingInstalledNotification.bind(this);\n\t\tthis.compileAddedInfo = this.compileAddedInfo.bind(this);\n\t\tthis.getPageContents = this.getPageContents.bind(this);\n\t\tthis.determineActivePage = this.determineActivePage.bind(this);\n\t\tthis.navigateToShowcase = this.navigateToShowcase.bind(this);\n\t\tthis.viewApp = this.viewApp.bind(this);\n\t\tthis.isActiveApp = this.isActiveApp.bind(this);\n\t\tthis.getActiveTags = this.getActiveTags.bind(this);\n\t}\n\n\t// eslint-disable-next-line react/no-deprecated\n\tUNSAFE_componentWillMount() {\n\t\t// For more information on async react rendering, see here\n\t\t// https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html\n\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis._asyncAppRequest = storeActions\n\t\t\t\t\t.getApps()\n\t\t\t\t\t.then((apps) => {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tapps,\n\t\t\t\t\t\t\tisLoading: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t})\n\t\t\t\t\t.catch((err) => {\n\t\t\t\t\t\tthis.setState(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tserverError: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tFSBL.Clients.Logger.error(\"Error connecting to FDC3 AppD server.\", err);\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}\n\t\t);\n\n\t\tthis._asyncTagsRequest = storeActions\n\t\t\t.getTags()\n\t\t\t.then((tags) => {\n\t\t\t\tthis.setState({\n\t\t\t\t\ttags,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\tthis.setState(\n\t\t\t\t\t{\n\t\t\t\t\t\tserverError: true,\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\tFSBL.Clients.Logger.error(\"Error retrieving tags from FDC3 AppD server.\", err);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\tgetStore().addListener({ field: \"appDefinitions\" }, this.addedAppsChanged);\n\t\tgetStore().addListener({ field: \"filteredApps\" }, this.update);\n\t\tgetStore().addListener({ field: \"activeTags\" }, this.update);\n\t\tgetStore().addListener({ field: \"activeApp\" }, this.openAppShowcase);\n\t\t// Get notified when user wants to view an app\n\t\tFSBL.Clients.RouterClient.addListener(\"viewApp\", this.viewApp);\n\t\tlet installed = storeActions.getInstalledApps();\n\n\t\tthis.setState({\n\t\t\tinstalled: Object.keys(installed),\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tgetStore().removeListener({ field: \"appDefinitions\" }, this.addedAppsChanged);\n\t\tgetStore().removeListener({ field: \"filteredApps\" }, this.update);\n\t\tgetStore().removeListener({ field: \"activeTags\" }, this.update);\n\t\tgetStore().removeListener({ field: \"activeApp\" }, this.openAppShowcase);\n\t\t// Get notified when user wants to view an app\n\t\tFSBL.Clients.RouterClient.removeListener(\"viewApp\", this.viewApp);\n\n\t\t// Make sure async requests have finished.\n\t\tif (this._asyncAppRequest && this._asyncAppRequest.cancel) {\n\t\t\tthis._asyncAppRequest.cancel();\n\t\t}\n\n\t\tif (this._asyncTagsRequest && this._asyncTagsRequest.cancel) {\n\t\t\tthis._asyncTagsRequest.cancel();\n\t\t}\n\t}\n\n\tviewApp(error, event) {\n\t\t!error && this.navigateToShowcase(event.data.app.appID);\n\t}\n\n\taddedAppsChanged() {\n\t\tlet action;\n\t\tif (this.state.installed.length > Object.keys(storeActions.getInstalledApps()).length) {\n\t\t\t// If the components installed apps is greater than that of the store, that means an app was removed\n\t\t\taction = \"remove\";\n\t\t} else if (this.state.installed.length < Object.keys(storeActions.getInstalledApps()).length) {\n\t\t\t// If the component's installed apps is less than that of the store, that means an app was added\n\t\t\taction = \"add\";\n\t\t}\n\n\t\tif (action) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tinstallationActionTaken: action,\n\t\t\t\t\tinstalled: Object.keys(storeActions.getInstalledApps()),\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tsetTimeout(this.stopShowingInstalledNotification, 1500);\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Force an update. Used to update from store listeners.\n\t *\n\t * @memberof AppMarket\n\t */\n\tupdate() {\n\t\tthis.forceUpdate();\n\t}\n\n\t/**\n\t * Determines the apps page based on the state of the activeTags, search text, etc\n\t */\n\tdetermineActivePage() {\n\t\tconst activeTags = this.getActiveTags();\n\t\tconst filteredApps = this.getFilteredApps();\n\t\tconst activeApp = this.getActiveApp();\n\t\tconst forceSearch = storeActions.getForceSearch();\n\t\tlet page;\n\n\t\tif (activeApp && !forceSearch) {\n\t\t\tpage = \"showcase\";\n\t\t} else if (filteredApps.length > 0 || forceSearch) {\n\t\t\tpage = \"appSearch\";\n\t\t} else if (filteredApps.length === 0 && activeTags.length === 0) {\n\t\t\tpage = \"home\";\n\t\t}\n\n\t\treturn page;\n\t}\n\n\t/**\n\t * Returns the activeApp from the Store\n\t *\n\t * @returns {string} activeApp\n\t * @memberof AppMarket\n\t */\n\tgetActiveApp() {\n\t\treturn storeActions.getActiveApp();\n\t}\n\n\t/**\n\t * Checks if we have an activeApp defined\n\t *\n\t * @returns {boolean}\n\t * @memberof AppMarket\n\t */\n\tisActiveApp() {\n\t\treturn storeActions.getActiveApp() !== null;\n\t}\n\n\t/**\n\t * Returns the active tags from the store\n\t *\n\t * @returns {array} activeTags\n\t * @memberof AppMarket\n\t */\n\tgetActiveTags() {\n\t\treturn storeActions.getActiveTags();\n\t}\n\n\t/**\n\t * Returns the filtered list of apps from search\n\t *\n\t * @returns {object} filteredApps\n\t * @memberof AppMarket\n\t */\n\tgetFilteredApps() {\n\t\treturn storeActions.getFilteredApps();\n\t}\n\n\t/**\n\t * Calls the store to add a tag to the activeTag list. Also updates the app view to switch to the AppResults page (since adding a tag implies filtering has begun)\n\t * @param {string} tag The name of the tag to add\n\t */\n\taddTag(tag) {\n\t\tstoreActions.addTag(tag);\n\t}\n\n\t/**\n\t * Calls the store to remove a tag from the activeTag list. Also updates the app view to switch to the homepage if all tags have been removed\n\t * @param {string} tag The name of the tag to add\n\t */\n\tremoveTag(tag) {\n\t\tstoreActions.removeTag(tag);\n\t}\n\n\t/**\n\t * Action to take when the back button is clicked (which just goes home)\n\t */\n\tgoHome() {\n\t\tstoreActions.goHome();\n\t}\n\n\t/**\n\t * Performs a search through the catalog\n\t * @param {string} search The text to search the catalog with\n\t */\n\tchangeSearch(search) {\n\t\tstoreActions.searchApps(search);\n\t}\n\n\t/**\n\t * When the notification for installing/removing an app is shown a timeout is set to call this function to cease showing the notification\n\t */\n\tstopShowingInstalledNotification() {\n\t\tthis.setState({\n\t\t\tinstallationActionTaken: null,\n\t\t});\n\t}\n\n\tnavigateToShowcase(id) {\n\t\tstoreActions.openApp(id);\n\t}\n\n\t/**\n\t * Opens the AppShowcase page for the app supplied\n\t */\n\topenAppShowcase() {\n\t\tlet app = storeActions.getActiveApp();\n\n\t\tif (app !== null) {\n\t\t\tstoreActions.setForceSearch(false);\n\t\t\tstoreActions.clearTags();\n\t\t\tstoreActions.clearFilteredApps();\n\t\t}\n\n\t\tthis.forceUpdate();\n\t}\n\n\t/**\n\t * Compiles a list of apps that are installed from the information received back from appd\n\t * and the information contained on the system\n\t * @param {boolean} filtered If true, uses the filtered apps array. Otherwise uses all apps\n\t */\n\tcompileAddedInfo(filtered) {\n\t\tconst { installed } = this.state;\n\t\tconst forceSearch = storeActions.getForceSearch();\n\t\tconst apps = filtered || forceSearch ? storeActions.getFilteredApps() : this.state.apps;\n\n\t\treturn apps.map((app) => {\n\t\t\tif (installed.includes(app.appId)) {\n\t\t\t\tapp.installed = true;\n\t\t\t} else {\n\t\t\t\tapp.installed = false;\n\t\t\t}\n\n\t\t\treturn app;\n\t\t});\n\t}\n\n\tgetPageContents() {\n\t\tconst filteredApps = this.getFilteredApps();\n\t\tconst activeTags = this.getActiveTags();\n\t\tconst activePage = this.determineActivePage();\n\t\tconst apps = this.compileAddedInfo(filteredApps.length > 0);\n\t\t// Force default case if activepage isn't search and apps.length is 0\n\t\tif (apps.length === 0 && activePage !== \"appSearch\") activePage = -1;\n\t\tconst theApp = this.compileAddedInfo(false).find((app) => this.getActiveApp() === app.appId);\n\t\tswitch (activePage) {\n\t\t\tcase \"home\":\n\t\t\t\treturn (\n\t\t\t\t\t<Home\n\t\t\t\t\t\ttags={this.state.tags}\n\t\t\t\t\t\tcards={apps}\n\t\t\t\t\t\tseeMore={this.addTag}\n\t\t\t\t\t\taddApp={this.addApp}\n\t\t\t\t\t\tremoveApp={this.removeApp}\n\t\t\t\t\t\taddTag={this.addTag}\n\t\t\t\t\t\tviewAppShowcase={this.navigateToShowcase}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\tcase \"appSearch\":\n\t\t\t\treturn (\n\t\t\t\t\t<AppResults\n\t\t\t\t\t\tcards={apps}\n\t\t\t\t\t\ttags={activeTags}\n\t\t\t\t\t\taddApp={this.addApp}\n\t\t\t\t\t\tremoveApp={this.removeApp}\n\t\t\t\t\t\tviewAppShowcase={this.navigateToShowcase}\n\t\t\t\t\t\taddTag={this.addTag}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\tcase \"showcase\":\n\t\t\t\treturn <AppShowcase app={theApp} addApp={this.addApp} removeApp={this.removeApp} addTag={this.addTag} />;\n\t\t\tdefault:\n\t\t\t\treturn <div></div>;\n\t\t}\n\t}\n\n\trender() {\n\t\tlet { tags } = this.state;\n\t\tlet page = this.determineActivePage();\n\t\tlet pageContents = this.getPageContents();\n\n\t\treturn (\n\t\t\t<div className=\"app-catalog\">\n\t\t\t\t{this.state.serverError && (\n\t\t\t\t\t<div className=\"server-error\">\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span>Catalog contents are currently unavailable.</span>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span>Please check your connection or consult your System Admin.</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{this.state.apps.length === 0 && !this.state.isLoading && (\n\t\t\t\t\t<div className=\"server-error\">\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span>There are no apps available in this catalog.</span>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span>Please contact your System Admin.</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{this.state.apps.length > 0 && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<SearchBar\n\t\t\t\t\t\t\thidden={page === \"showcase\"}\n\t\t\t\t\t\t\tbackButton={page !== \"home\"}\n\t\t\t\t\t\t\ttags={tags}\n\t\t\t\t\t\t\tactiveTags={this.getActiveTags}\n\t\t\t\t\t\t\ttagSelected={this.addTag}\n\t\t\t\t\t\t\tremoveTag={this.removeTag}\n\t\t\t\t\t\t\tgoHome={this.goHome}\n\t\t\t\t\t\t\tinstallationActionTaken={this.state.installationActionTaken}\n\t\t\t\t\t\t\tsearch={this.changeSearch}\n\t\t\t\t\t\t\tisViewingApp={this.isActiveApp}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"market_content\">{pageContents}</div>\n\t\t\t\t\t</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AAC,CAAC,IAAI,CACzC,CACP,CAAC;gBACH,CAAC,CAAC,CACG,CACD,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { Component } from \"react\";\r\nimport { getAppNameIconWhenNoImage, getTruncatedStringWithEllipses } from \"./helpers\";\r\n\r\n// data\r\nimport storeActions from \"../stores/storeActions\";\r\n\r\n/**\r\n * The card that displays on any page with information about an app. Clicking on it will lead to the AppShowcase or install (if the check is clicked)\r\n * @param {object} props Component props\r\n * @param {object} props...card The entire object that belongs to a single app. See FDC app directory.\r\n * @param {boolean} props.entitled If true, the app cannot be installed by this user, only viewed\r\n * @param {boolean} props.installed If true the app is installed on this local fsbl\r\n */\r\nclass AppCard extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tcheckShown: this.props.installed === true,\r\n\t\t\tcheckHighlighted: false,\r\n\t\t\tawaitingInstall: false,\r\n\t\t\ttoggleCheckAfterAction: false,\r\n\t\t\ttitleUnderlined: false,\r\n\t\t\tappName: this.props.title || this.props.name,\r\n\t\t\tid: this.props.appId,\r\n\t\t\tentitled: this.props.entitled ? this.props.entitled : false,\r\n\t\t\ttags: this.props.tags || [],\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.toggleHighlight = this.toggleHighlight.bind(this);\r\n\t\tthis.toggleTitleUnderline = this.toggleTitleUnderline.bind(this);\r\n\t\tthis.showCheck = this.showCheck.bind(this);\r\n\t\tthis.hideCheck = this.hideCheck.bind(this);\r\n\t\tthis.openAppShowcase = this.openAppShowcase.bind(this);\r\n\t\tthis.addApp = this.addApp.bind(this);\r\n\t\tthis.removeApp = this.removeApp.bind(this);\r\n\t\tthis.addTag = this.addTag.bind(this);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tif (!this.props.tags || this.props.tags.length === 0) return;\r\n\t\tconst list = this.tagNamesList;\r\n\t\tconst { footer } = this;\r\n\t\tif (list.offsetHeight >= footer.scrollHeight + 5) {\r\n\t\t\tlet newTags = this.state.tags.slice(0, 2);\r\n\t\t\tthis.setState({\r\n\t\t\t\ttags: newTags,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles the highlight state of the check mark for installing an app\r\n\t */\r\n\ttoggleHighlight() {\r\n\t\tthis.setState({\r\n\t\t\tcheckHighlighted: !this.state.checkHighlighted,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles the 'highlight' state of the app title. On mouse over, the title is underlined to show that its a link\r\n\t */\r\n\ttoggleTitleUnderline() {\r\n\t\tthis.setState({\r\n\t\t\ttitleUnderlined: !this.state.titleUnderlined,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Shows the check mark for adding/removing an app\r\n\t */\r\n\tshowCheck() {\r\n\t\tthis.setState({\r\n\t\t\tcheckShown: true,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Hides the check mark for adding/removing an app\r\n\t */\r\n\thideCheck() {\r\n\t\tif (this.state.awaitingInstall) {\r\n\t\t\t// If an add/remove is taking place and this is called, toggle the check after the action completes\r\n\t\t\tthis.setState({\r\n\t\t\t\ttoggleCheckAfterAction: true,\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// Don't hide if installed. Stay green and showing\r\n\t\t\tif (!this.props.installed) {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tcheckShown: false,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Calls parent passed function to open the app showcase for the supplied app\r\n\t */\r\n\topenAppShowcase() {\r\n\t\tthis.props.viewAppShowcase(this.state.id);\r\n\t}\r\n\r\n\t/**\r\n\t * Prevents bubbling (which would open the app showcase), then calls to add an app\r\n\t * @param {object} e React Synthetic event\r\n\t */\r\n\taddApp(e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tawaitingInstall: true,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tstoreActions.addApp(this.state.id, (err) => {\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tawaitingInstall: false,\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Prevents bubbling (which would open the app showcase), then calls to remove an app\r\n\t * @param {object} e React Synthetic event\r\n\t */\r\n\tremoveApp(e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tawaitingInstall: true,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tstoreActions.removeApp(this.state.id, (err) => {\r\n\t\t\t\t\tif (this.state.toggleCheckAfterAction) {\r\n\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\tawaitingInstall: false,\r\n\t\t\t\t\t\t\ttoggleCheckAfterAction: false,\r\n\t\t\t\t\t\t\tcheckShown: !this.state.checkShown,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\tawaitingInstall: false,\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}\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Prevents bubbling (which would open the app showcase), then calls to add a filtering tag\r\n\t * @param {string} name The tag name to add\r\n\t * @param {object} e React Synthetic event\r\n\t */\r\n\taddTag(name, e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\r\n\t\tstoreActions.addTag(name);\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet imageUrl = this.props.icons !== undefined ? this.props.icons[0].url : null;\r\n\r\n\t\tlet { appName, checkShown, checkHighlighted } = this.state;\r\n\r\n\t\tlet imageIconClasses = \"ff-check-mark-2\";\r\n\t\tif (this.props.installed && checkHighlighted) imageIconClasses = `${imageIconClasses} highlighted added`;\r\n\t\telse if (this.props.installed || checkHighlighted) imageIconClasses = `${imageIconClasses} highlighted`;\r\n\t\telse imageIconClasses = `${imageIconClasses} faded`;\r\n\r\n\t\tlet titleClass = this.state.titleUnderlined ? \"app-title highlighted\" : \"app-title\";\r\n\r\n\t\tlet entitled = this.state.entitled ? \" entitled\" : \"\";\r\n\r\n\t\tlet imageStyle = `app-image ${entitled}`;\r\n\r\n\t\tif (!imageUrl) {\r\n\t\t\timageUrl = this.props.images !== undefined ? this.props.images[0].url : null;\r\n\t\t\timageStyle = `${imageStyle} noIcon`;\r\n\t\t}\r\n\r\n\t\tif (!imageUrl) {\r\n\t\t\timageStyle = `${imageStyle} noImg`;\r\n\t\t}\r\n\r\n\t\tlet cardStyle = this.state.tags.length > 0 ? \"app-card\" : \"app-card no-tags\";\r\n\r\n\t\tlet appAction = this.props.installed ? this.removeApp : this.addApp;\r\n\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tclassName={cardStyle}\r\n\t\t\t\tonClick={this.openAppShowcase}\r\n\t\t\t\tonMouseEnter={this.showCheck}\r\n\t\t\t\tonMouseLeave={this.hideCheck}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"app-image-container\">\r\n\t\t\t\t\t{imageUrl ? (\r\n\t\t\t\t\t\t<img className={imageStyle} src={imageUrl} />\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<div className={imageStyle}>\r\n\t\t\t\t\t\t\t<span>{getAppNameIconWhenNoImage(appName)}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclassName={titleClass}\r\n\t\t\t\t\t\tonMouseEnter={this.toggleTitleUnderline}\r\n\t\t\t\t\t\tonMouseLeave={this.toggleTitleUnderline}\r\n\t\t\t\t\t\ttitle={appName}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{appName}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"row_description\">\r\n\t\t\t\t\t<div className=\"status-indicator\">\r\n\t\t\t\t\t\t{!entitled || !checkShown ? (\r\n\t\t\t\t\t\t\t<i>&nbsp;</i>\r\n\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t<i\r\n\t\t\t\t\t\t\t\tclassName={imageIconClasses}\r\n\t\t\t\t\t\t\t\tonMouseEnter={this.toggleHighlight}\r\n\t\t\t\t\t\t\t\tonMouseLeave={this.toggleHighlight}\r\n\t\t\t\t\t\t\t\tonClick={appAction}\r\n\t\t\t\t\t\t\t></i>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"app-description\">{this.props.description ? this.props.description : \"\"}</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t{this.state.tags.length > 0 && (\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclassName=\"app-tags\"\r\n\t\t\t\t\t\tref={(el) => {\r\n\t\t\t\t\t\t\tthis.footer = el;\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<i className=\"ff-tag\"></i>\r\n\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\tclassName=\"app-tag-names\"\r\n\t\t\t\t\t\t\tref={(el) => {\r\n\t\t\t\t\t\t\t\tthis.tagNamesList = el;\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{this.state.tags.map((tag, i) => {\r\n\t\t\t\t\t\t\t\tconst tagName = tag;\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<span key={i} className=\"tag-name\" onClick={this.addTag.bind(this, tag)} title={tagName}>\r\n\t\t\t\t\t\t\t\t\t\t{getTruncatedStringWithEllipses(tagName)}\r\n\t\t\t\t\t\t\t\t\t\t{i !== this.props.tags.length - 1 ? \", \" : null}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default AppCard;\r\n"]}
1
+ {"version":3,"file":"AppCard.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/AppCard.jsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAGtF,OAAO,YAAY,MAAM,wBAAwB,CAAC;AASlD,MAAM,OAAQ,SAAQ,SAAS;IAC9B,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI;YACzC,gBAAgB,EAAE,KAAK;YACvB,eAAe,EAAE,KAAK;YACtB,sBAAsB,EAAE,KAAK;YAC7B,eAAe,EAAE,KAAK;YACtB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;YAC5C,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACpB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;YAC3D,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE;SAC3B,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC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AAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO;wBACrF,8BAA8B,CAAC,OAAO,CAAC;wBACvC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CACzC,CACP,CAAC;gBACH,CAAC,CAAC,CACG,CACD,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React, { Component } from \"react\";\nimport { getAppNameIconWhenNoImage, getTruncatedStringWithEllipses } from \"./helpers\";\n\n// data\nimport storeActions from \"../stores/storeActions\";\n\n/**\n * The card that displays on any page with information about an app. Clicking on it will lead to the AppShowcase or install (if the check is clicked)\n * @param {object} props Component props\n * @param {object} props...card The entire object that belongs to a single app. See FDC app directory.\n * @param {boolean} props.entitled If true, the app cannot be installed by this user, only viewed\n * @param {boolean} props.installed If true the app is installed on this local fsbl\n */\nclass AppCard extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tcheckShown: this.props.installed === true,\n\t\t\tcheckHighlighted: false,\n\t\t\tawaitingInstall: false,\n\t\t\ttoggleCheckAfterAction: false,\n\t\t\ttitleUnderlined: false,\n\t\t\tappName: this.props.title || this.props.name,\n\t\t\tid: this.props.appId,\n\t\t\tentitled: this.props.entitled ? this.props.entitled : false,\n\t\t\ttags: this.props.tags || [],\n\t\t};\n\t\tthis.bindCorrectContext();\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.toggleHighlight = this.toggleHighlight.bind(this);\n\t\tthis.toggleTitleUnderline = this.toggleTitleUnderline.bind(this);\n\t\tthis.showCheck = this.showCheck.bind(this);\n\t\tthis.hideCheck = this.hideCheck.bind(this);\n\t\tthis.openAppShowcase = this.openAppShowcase.bind(this);\n\t\tthis.addApp = this.addApp.bind(this);\n\t\tthis.removeApp = this.removeApp.bind(this);\n\t\tthis.addTag = this.addTag.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tif (!this.props.tags || this.props.tags.length === 0) return;\n\t\tconst list = this.tagNamesList;\n\t\tconst { footer } = this;\n\t\tif (list.offsetHeight >= footer.scrollHeight + 5) {\n\t\t\tlet newTags = this.state.tags.slice(0, 2);\n\t\t\tthis.setState({\n\t\t\t\ttags: newTags,\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Toggles the highlight state of the check mark for installing an app\n\t */\n\ttoggleHighlight() {\n\t\tthis.setState({\n\t\t\tcheckHighlighted: !this.state.checkHighlighted,\n\t\t});\n\t}\n\n\t/**\n\t * Toggles the 'highlight' state of the app title. On mouse over, the title is underlined to show that its a link\n\t */\n\ttoggleTitleUnderline() {\n\t\tthis.setState({\n\t\t\ttitleUnderlined: !this.state.titleUnderlined,\n\t\t});\n\t}\n\n\t/**\n\t * Shows the check mark for adding/removing an app\n\t */\n\tshowCheck() {\n\t\tthis.setState({\n\t\t\tcheckShown: true,\n\t\t});\n\t}\n\n\t/**\n\t * Hides the check mark for adding/removing an app\n\t */\n\thideCheck() {\n\t\tif (this.state.awaitingInstall) {\n\t\t\t// If an add/remove is taking place and this is called, toggle the check after the action completes\n\t\t\tthis.setState({\n\t\t\t\ttoggleCheckAfterAction: true,\n\t\t\t});\n\t\t} else {\n\t\t\t// Don't hide if installed. Stay green and showing\n\t\t\tif (!this.props.installed) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tcheckShown: false,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calls parent passed function to open the app showcase for the supplied app\n\t */\n\topenAppShowcase() {\n\t\tthis.props.viewAppShowcase(this.state.id);\n\t}\n\n\t/**\n\t * Prevents bubbling (which would open the app showcase), then calls to add an app\n\t * @param {object} e React Synthetic event\n\t */\n\taddApp(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tawaitingInstall: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tstoreActions.addApp(this.state.id, (err) => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tawaitingInstall: false,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Prevents bubbling (which would open the app showcase), then calls to remove an app\n\t * @param {object} e React Synthetic event\n\t */\n\tremoveApp(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tawaitingInstall: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tstoreActions.removeApp(this.state.id, (err) => {\n\t\t\t\t\tif (this.state.toggleCheckAfterAction) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tawaitingInstall: false,\n\t\t\t\t\t\t\ttoggleCheckAfterAction: false,\n\t\t\t\t\t\t\tcheckShown: !this.state.checkShown,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tawaitingInstall: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Prevents bubbling (which would open the app showcase), then calls to add a filtering tag\n\t * @param {string} name The tag name to add\n\t * @param {object} e React Synthetic event\n\t */\n\taddTag(name, e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tstoreActions.addTag(name);\n\t}\n\n\trender() {\n\t\tlet imageUrl = this.props.icons !== undefined ? this.props.icons[0].url : null;\n\n\t\tlet { appName, checkShown, checkHighlighted } = this.state;\n\n\t\tlet imageIconClasses = \"ff-check-mark-2\";\n\t\tif (this.props.installed && checkHighlighted) imageIconClasses = `${imageIconClasses} highlighted added`;\n\t\telse if (this.props.installed || checkHighlighted) imageIconClasses = `${imageIconClasses} highlighted`;\n\t\telse imageIconClasses = `${imageIconClasses} faded`;\n\n\t\tlet titleClass = this.state.titleUnderlined ? \"app-title highlighted\" : \"app-title\";\n\n\t\tlet entitled = this.state.entitled ? \" entitled\" : \"\";\n\n\t\tlet imageStyle = `app-image ${entitled}`;\n\n\t\tif (!imageUrl) {\n\t\t\timageUrl = this.props.images !== undefined ? this.props.images[0].url : null;\n\t\t\timageStyle = `${imageStyle} noIcon`;\n\t\t}\n\n\t\tif (!imageUrl) {\n\t\t\timageStyle = `${imageStyle} noImg`;\n\t\t}\n\n\t\tlet cardStyle = this.state.tags.length > 0 ? \"app-card\" : \"app-card no-tags\";\n\n\t\tlet appAction = this.props.installed ? this.removeApp : this.addApp;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cardStyle}\n\t\t\t\tonClick={this.openAppShowcase}\n\t\t\t\tonMouseEnter={this.showCheck}\n\t\t\t\tonMouseLeave={this.hideCheck}\n\t\t\t>\n\t\t\t\t<div className=\"app-image-container\">\n\t\t\t\t\t{imageUrl ? (\n\t\t\t\t\t\t<img className={imageStyle} src={imageUrl} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className={imageStyle}>\n\t\t\t\t\t\t\t<span>{getAppNameIconWhenNoImage(appName)}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={titleClass}\n\t\t\t\t\t\tonMouseEnter={this.toggleTitleUnderline}\n\t\t\t\t\t\tonMouseLeave={this.toggleTitleUnderline}\n\t\t\t\t\t\ttitle={appName}\n\t\t\t\t\t>\n\t\t\t\t\t\t{appName}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row_description\">\n\t\t\t\t\t<div className=\"status-indicator\">\n\t\t\t\t\t\t{!entitled || !checkShown ? (\n\t\t\t\t\t\t\t<i>&nbsp;</i>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\tclassName={imageIconClasses}\n\t\t\t\t\t\t\t\tonMouseEnter={this.toggleHighlight}\n\t\t\t\t\t\t\t\tonMouseLeave={this.toggleHighlight}\n\t\t\t\t\t\t\t\tonClick={appAction}\n\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"app-description\">{this.props.description ? this.props.description : \"\"}</div>\n\t\t\t\t</div>\n\t\t\t\t{this.state.tags.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"app-tags\"\n\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\tthis.footer = el;\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<i className=\"ff-tag\"></i>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"app-tag-names\"\n\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\tthis.tagNamesList = el;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.state.tags.map((tag, i) => {\n\t\t\t\t\t\t\t\tconst tagName = tag;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<span key={i} className=\"tag-name\" onClick={this.addTag.bind(this, tag)} title={tagName}>\n\t\t\t\t\t\t\t\t\t\t{getTruncatedStringWithEllipses(tagName)}\n\t\t\t\t\t\t\t\t\t\t{i !== this.props.tags.length - 1 ? \", \" : null}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default AppCard;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppList.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/AppList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,aAAa,GA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const CARDS_PER_ROW = 2;\r\n\r\ntype AppListProps = {\r\n\tcards: AppMetadata[];\r\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\r\n};\r\n\r\nconst AppList = (props: AppListProps) => {\r\n\tconst getCardsInRow = () => {\r\n\t\tconst rows = [];\r\n\t\tlet cardsInRow = [];\r\n\r\n\t\tfor (let i = 0; i < props.cards.length; i++) {\r\n\t\t\tconst card = props.cards[i];\r\n\t\t\tconst name = card.title || card.name;\r\n\r\n\t\t\tconst cardKey = `card ${name} ${i}`;\r\n\r\n\t\t\tcardsInRow.push(\r\n\t\t\t\t<td key={cardKey}>\r\n\t\t\t\t\t<AppCard {...card} viewAppShowcase={props.viewAppShowcase} />\r\n\t\t\t\t</td>\r\n\t\t\t);\r\n\r\n\t\t\tif (cardsInRow.length === CARDS_PER_ROW || i === props.cards.length - 1) {\r\n\t\t\t\trows.push(cardsInRow);\r\n\t\t\t\tcardsInRow = [];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"app-card-list\">\r\n\t\t\t<table>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t{getCardsInRow().map((row, i) => (\r\n\t\t\t\t\t\t<tr key={`cardrow-${i}`}>{row}</tr>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default AppList;\r\n"]}
1
+ {"version":3,"file":"AppList.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/AppList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,aAAa,GAAG,CAAC,CAAC;AAOxB,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvC,MAAM,aAAa,GAAG,GAAG,EAAE;QAC1B,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAI,UAAU,GAAG,EAAE,CAAC;QAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;YAErC,MAAM,OAAO,GAAG,QAAQ,IAAI,IAAI,CAAC,EAAE,CAAC;YAEpC,UAAU,CAAC,IAAI,CACd,4BAAI,GAAG,EAAE,OAAO;gBACf,oBAAC,OAAO,oBAAK,IAAI,IAAE,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,CACzD,CACL,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,KAAK,aAAa,IAAI,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACxE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACtB,UAAU,GAAG,EAAE,CAAC;aAChB;SACD;QAED,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe;QAC7B;YACC,mCACE,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAChC,4BAAI,GAAG,EAAE,WAAW,CAAC,EAAE,IAAG,GAAG,CAAM,CACnC,CAAC,CACK,CACD,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import React from \"react\";\nimport AppCard from \"./AppCard\";\nimport { AppMetadata } from \"../../../types/fdc3\";\n\nconst CARDS_PER_ROW = 2;\n\ntype AppListProps = {\n\tcards: AppMetadata[];\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\n};\n\nconst AppList = (props: AppListProps) => {\n\tconst getCardsInRow = () => {\n\t\tconst rows = [];\n\t\tlet cardsInRow = [];\n\n\t\tfor (let i = 0; i < props.cards.length; i++) {\n\t\t\tconst card = props.cards[i];\n\t\t\tconst name = card.title || card.name;\n\n\t\t\tconst cardKey = `card ${name} ${i}`;\n\n\t\t\tcardsInRow.push(\n\t\t\t\t<td key={cardKey}>\n\t\t\t\t\t<AppCard {...card} viewAppShowcase={props.viewAppShowcase} />\n\t\t\t\t</td>\n\t\t\t);\n\n\t\t\tif (cardsInRow.length === CARDS_PER_ROW || i === props.cards.length - 1) {\n\t\t\t\trows.push(cardsInRow);\n\t\t\t\tcardsInRow = [];\n\t\t\t}\n\t\t}\n\n\t\treturn rows;\n\t};\n\n\treturn (\n\t\t<div className=\"app-card-list\">\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t{getCardsInRow().map((row, i) => (\n\t\t\t\t\t\t<tr key={`cardrow-${i}`}>{row}</tr>\n\t\t\t\t\t))}\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t);\n};\n\nexport default AppList;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AppResults.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/AppResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,OAAO,MAAM,WAAW,CAAC;AAIhC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAkBlC,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAK1C,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC7B,IAAI,gBAAgB,GAAG,EAAE,CAAC;QAG1B,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACxC,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC9C,KAAK,IAAI,CAAC,GAAG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;IACjB,CAAC,CAAC;IAEF,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,oBAAC,YAAY,OAAG,CAAC;IAE3D,IAAI,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE7B,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;QAC3B,+BAAO,SAAS,EAAC,mBAAmB;YACnC,mCACE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,4BAAI,GAAG,EAAE,YAAY,CAAC,EAAE,IAAG,GAAG,CAAM,CACpC,CAAC,CACK,CACD,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\n\r\n//components\r\nimport EmptyResults from \"./EmptyResults\";\r\nimport AppCard from \"./AppCard\";\r\nimport { AppMetadata } from \"../../../types/fdc3\";\r\n\r\n//consts\r\nconst NUMBER_OF_CARDS_PER_ROW = 2;\r\n\r\ntype ResultsProps = {\r\n\ttags: string[];\r\n\tcards: (AppMetadata & { tags: string[] })[];\r\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\r\n};\r\n\r\n/**\r\n * The results page. Shown when filter tags are applied, search text is entered, or both.\r\n * @param {object} props Component props\r\n * @param {array} props.tags Array of tags that are applied for filtering\r\n * @param {array} props.cards Array of app card objects (apps that come from FDC app directory)\r\n * @param {func} props.addApp See AppCard.jsx\r\n * @param {func} props.removeApp See AppCard.jsx\r\n * @param {func} props.openAppShowcase See AppCard.jsx\r\n * @param {func} props.addTag Parent function to add a filtering tag\r\n */\r\nconst AppResults = (props: ResultsProps) => {\r\n\t/**\r\n\t * Function to take the incoming apps and any filtering tags and filter the list.\r\n\t * If there are no tags, we'll use all of the cards supplied\r\n\t */\r\n\tconst buildResultCards = () => {\r\n\t\tlet cardsForShowcase = [];\r\n\r\n\t\t//Filter cards by tags\r\n\t\tif (props.tags && props.tags.length > 0) {\r\n\t\t\tcardsForShowcase = props.cards.filter((card) => {\r\n\t\t\t\tfor (let i = 0; i < props.tags.length; i++) {\r\n\t\t\t\t\tlet tagToSearchFor = props.tags[i];\r\n\t\t\t\t\tif (!card.tags.includes(tagToSearchFor)) return false;\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcardsForShowcase = props.cards;\r\n\t\t}\r\n\r\n\t\treturn cardsForShowcase;\r\n\t};\r\n\r\n\tlet cardsForShowcase = buildResultCards();\r\n\r\n\t/**\r\n\t * Function to build the table of cards based on filtered information\r\n\t */\r\n\tconst getCardRows = () => {\r\n\t\tlet cardRows = [];\r\n\t\tlet cardsInRow = [];\r\n\t\tfor (let i = 0; i < cardsForShowcase.length; i++) {\r\n\t\t\tlet card = cardsForShowcase[i];\r\n\t\t\tlet name = card.title || card.name;\r\n\r\n\t\t\tlet key = `card-${i}-${name.toLowerCase()}`;\r\n\r\n\t\t\tcardsInRow.push(\r\n\t\t\t\t<td key={key}>\r\n\t\t\t\t\t<AppCard {...card} viewAppShowcase={props.viewAppShowcase} />\r\n\t\t\t\t</td>\r\n\t\t\t);\r\n\r\n\t\t\tif (cardsInRow.length === NUMBER_OF_CARDS_PER_ROW || i === cardsForShowcase.length - 1) {\r\n\t\t\t\tcardRows.push(cardsInRow);\r\n\t\t\t\tcardsInRow = [];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn cardRows;\r\n\t};\r\n\r\n\tif (cardsForShowcase.length === 0) return <EmptyResults />;\r\n\r\n\tlet cardRows = getCardRows();\r\n\r\n\treturn (\r\n\t\t<div className=\"app-results\">\r\n\t\t\t<table className=\"app-results-table\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t{cardRows.map((row, i) => (\r\n\t\t\t\t\t\t<tr key={`tablerow-${i}`}>{row}</tr>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default AppResults;\r\n"]}
1
+ {"version":3,"file":"AppResults.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/AppResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,OAAO,MAAM,WAAW,CAAC;AAIhC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAkBlC,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAK1C,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC7B,IAAI,gBAAgB,GAAG,EAAE,CAAC;QAG1B,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACxC,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC3C,IAAI,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;wBAAE,OAAO,KAAK,CAAC;iBACtD;gBACD,OAAO,IAAI,CAAC;YACb,CAAC,CAAC,CAAC;SACH;aAAM;YACN,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC;SAC/B;QAED,OAAO,gBAAgB,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;IAK1C,MAAM,WAAW,GAAG,GAAG,EAAE;QACxB,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACjD,IAAI,IAAI,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;YAEnC,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAE5C,UAAU,CAAC,IAAI,CACd,4BAAI,GAAG,EAAE,GAAG;gBACX,oBAAC,OAAO,oBAAK,IAAI,IAAE,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,CACzD,CACL,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,KAAK,uBAAuB,IAAI,CAAC,KAAK,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvF,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC1B,UAAU,GAAG,EAAE,CAAC;aAChB;SACD;QAED,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC;IAEF,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,oBAAC,YAAY,OAAG,CAAC;IAE3D,IAAI,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE7B,OAAO,CACN,6BAAK,SAAS,EAAC,aAAa;QAC3B,+BAAO,SAAS,EAAC,mBAAmB;YACnC,mCACE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,4BAAI,GAAG,EAAE,YAAY,CAAC,EAAE,IAAG,GAAG,CAAM,CACpC,CAAC,CACK,CACD,CACH,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\n\n//components\nimport EmptyResults from \"./EmptyResults\";\nimport AppCard from \"./AppCard\";\nimport { AppMetadata } from \"../../../types/fdc3\";\n\n//consts\nconst NUMBER_OF_CARDS_PER_ROW = 2;\n\ntype ResultsProps = {\n\ttags: string[];\n\tcards: (AppMetadata & { tags: string[] })[];\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\n};\n\n/**\n * The results page. Shown when filter tags are applied, search text is entered, or both.\n * @param {object} props Component props\n * @param {array} props.tags Array of tags that are applied for filtering\n * @param {array} props.cards Array of app card objects (apps that come from FDC app directory)\n * @param {func} props.addApp See AppCard.jsx\n * @param {func} props.removeApp See AppCard.jsx\n * @param {func} props.openAppShowcase See AppCard.jsx\n * @param {func} props.addTag Parent function to add a filtering tag\n */\nconst AppResults = (props: ResultsProps) => {\n\t/**\n\t * Function to take the incoming apps and any filtering tags and filter the list.\n\t * If there are no tags, we'll use all of the cards supplied\n\t */\n\tconst buildResultCards = () => {\n\t\tlet cardsForShowcase = [];\n\n\t\t//Filter cards by tags\n\t\tif (props.tags && props.tags.length > 0) {\n\t\t\tcardsForShowcase = props.cards.filter((card) => {\n\t\t\t\tfor (let i = 0; i < props.tags.length; i++) {\n\t\t\t\t\tlet tagToSearchFor = props.tags[i];\n\t\t\t\t\tif (!card.tags.includes(tagToSearchFor)) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t});\n\t\t} else {\n\t\t\tcardsForShowcase = props.cards;\n\t\t}\n\n\t\treturn cardsForShowcase;\n\t};\n\n\tlet cardsForShowcase = buildResultCards();\n\n\t/**\n\t * Function to build the table of cards based on filtered information\n\t */\n\tconst getCardRows = () => {\n\t\tlet cardRows = [];\n\t\tlet cardsInRow = [];\n\t\tfor (let i = 0; i < cardsForShowcase.length; i++) {\n\t\t\tlet card = cardsForShowcase[i];\n\t\t\tlet name = card.title || card.name;\n\n\t\t\tlet key = `card-${i}-${name.toLowerCase()}`;\n\n\t\t\tcardsInRow.push(\n\t\t\t\t<td key={key}>\n\t\t\t\t\t<AppCard {...card} viewAppShowcase={props.viewAppShowcase} />\n\t\t\t\t</td>\n\t\t\t);\n\n\t\t\tif (cardsInRow.length === NUMBER_OF_CARDS_PER_ROW || i === cardsForShowcase.length - 1) {\n\t\t\t\tcardRows.push(cardsInRow);\n\t\t\t\tcardsInRow = [];\n\t\t\t}\n\t\t}\n\n\t\treturn cardRows;\n\t};\n\n\tif (cardsForShowcase.length === 0) return <EmptyResults />;\n\n\tlet cardRows = getCardRows();\n\n\treturn (\n\t\t<div className=\"app-results\">\n\t\t\t<table className=\"app-results-table\">\n\t\t\t\t<tbody>\n\t\t\t\t\t{cardRows.map((row, i) => (\n\t\t\t\t\t\t<tr key={`tablerow-${i}`}>{row}</tr>\n\t\t\t\t\t))}\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t);\n};\n\nexport default AppResults;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/Carousel.jsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAGlD,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,cAAc,GAAG,CAAC,CAAC;AASzB,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS;IAC9C,YAAY,KAAK;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE,CAAC;YACb,gBAAgB,EAAE,KAAK;SACvB,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,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N,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { Component } from \"react\";\r\n\r\n//data\r\nimport storeActions from \"../stores/storeActions\";\r\n\r\n//components\r\nimport AppCard from \"./AppCard\";\r\n\r\n//consts\r\nconst CARDS_PER_PAGE = 2;\r\n\r\n/**\r\n * A carousel of AppCards\r\n * @param {object} props Component props\r\n * @param {array} props.cards An array of AppCards to display in a carousel\r\n * @param {string} props.tag The carousel's tag (title)\r\n * @param {func} props.openAppShowcase Parent function to show the AppShowcase for the selected card\r\n */\r\nexport default class Carousel extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tfirstIndex: 0,\r\n\t\t\ttitleHighlighted: false,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t\tif (this.props.cards.length < 3) this.notEnoughCards();\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.pageUp = this.pageUp.bind(this);\r\n\t\tthis.pageDown = this.pageDown.bind(this);\r\n\t\tthis.highlightTitle = this.highlightTitle.bind(this);\r\n\t\tthis.seeMore = this.seeMore.bind(this);\r\n\t\tthis.notEnoughCards = this.notEnoughCards.bind(this);\r\n\t\tthis.buildCarousel = this.buildCarousel.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Pages through the carousel by one card (right)\r\n\t */\r\n\tpageUp() {\r\n\t\tlet index = this.state.firstIndex;\r\n\r\n\t\t//If increasing the carousel's first index will move beyond the array's limits, we reset back to zero\r\n\t\tif (index + 1 <= this.props.cards.length - 1) {\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tfirstIndex: index,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Pages through the carousel by one card (left)\r\n\t */\r\n\tpageDown() {\r\n\t\tlet index = this.state.firstIndex;\r\n\t\tif (index - 1 >= 0) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tfirstIndex: index - 1,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles the highlight on a carousel's title. When a user mouses over, we want to style it so its obvious its a link\r\n\t * @param {*} highlight\r\n\t */\r\n\thighlightTitle(highlight) {\r\n\t\tthis.setState({\r\n\t\t\ttitleHighlighted: highlight,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Calls the parents seeMore function, which will add the selected tag as a filter\r\n\t */\r\n\tseeMore() {\r\n\t\tstoreActions.addTag(this.props.tag);\r\n\t}\r\n\r\n\t/**\r\n\t * Spits out a warning if the number of cards supplied to the carousel is < 3\r\n\t */\r\n\tnotEnoughCards() {\r\n\t\tconsole.warn(\"Less than 3 card supplied. This carousel will not display optimally\");\r\n\t}\r\n\r\n\t/**\r\n\t * Function to build the items in the carousel\r\n\t */\r\n\tbuildCarousel() {\r\n\t\tlet { cards } = this.props;\r\n\t\tlet firstCard = this.state.firstIndex;\r\n\r\n\t\tlet displayCards = [];\r\n\t\tfor (let i = 0; i < CARDS_PER_PAGE; i++) {\r\n\t\t\tif (firstCard >= 0 && firstCard <= cards.length - 1) {\r\n\t\t\t\tdisplayCards.push(cards[firstCard]);\r\n\t\t\t\tfirstCard++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn displayCards;\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet displayCards = this.buildCarousel();\r\n\t\tlet titleClass = \"carousel-title\";\r\n\t\tif (this.state.titleHighlighted) titleClass = `${titleClass} highlight`;\r\n\r\n\t\tlet chevron_left_style = \"ff-adp-chevron-left\",\r\n\t\t\tchevron_right_style = \"ff-adp-chevron-right\";\r\n\t\tlet left_click = this.pageDown,\r\n\t\t\tright_click = this.pageUp;\r\n\r\n\t\tif (this.state.firstIndex + 2 >= this.props.cards.length - 1) {\r\n\t\t\tchevron_right_style = `${chevron_right_style} disabled`;\r\n\t\t\tright_click = Function.prototype;\r\n\t\t}\r\n\r\n\t\tif (this.state.firstIndex === 0) {\r\n\t\t\tchevron_left_style = `${chevron_left_style} disabled`;\r\n\t\t\tleft_click = Function.prototype;\r\n\t\t}\r\n\r\n\t\tconst carouselTagHeader = this.props.tag.length >= 50 ? `${this.props.tag.substring(0, 49)}...` : this.props.tag;\r\n\r\n\t\treturn (\r\n\t\t\t<div className=\"carousel-main\">\r\n\t\t\t\t<div className=\"carousel-header\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\ttitle={this.props.tag}\r\n\t\t\t\t\t\tclassName={titleClass}\r\n\t\t\t\t\t\tonClick={this.seeMore}\r\n\t\t\t\t\t\tonMouseEnter={this.highlightTitle.bind(this, true)}\r\n\t\t\t\t\t\tonMouseLeave={this.highlightTitle.bind(this, false)}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{carouselTagHeader}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t{this.props.cards.length > 2 && (\r\n\t\t\t\t\t\t<button className=\"see-more\" onClick={this.seeMore}>\r\n\t\t\t\t\t\t\t<span className=\"button-label\">See More</span>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"carousel-content\">\r\n\t\t\t\t\t<i className={chevron_left_style} onClick={left_click} />\r\n\t\t\t\t\t{displayCards.map((card, i) => (\r\n\t\t\t\t\t\t<AppCard key={(card.title || card.name) + i} {...card} viewAppShowcase={this.props.viewAppShowcase} />\r\n\t\t\t\t\t))}\r\n\t\t\t\t\t{displayCards.length === 1 && <div className=\"app-card placeholder\"></div>}{\" \"}\r\n\t\t\t\t\t{/* This is so extremely bad, I hate it. Prevent odd spacing when single card by inserting a blank empty card to consume the space */}\r\n\t\t\t\t\t<i className={chevron_right_style} onClick={right_click} />\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":"Carousel.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/Carousel.j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K,CAAC,MAAM,GAAG,CAAC,IAAI,CAC/B,gCAAQ,SAAS,EAAC,UAAU,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO;oBACjD,8BAAM,SAAS,EAAC,cAAc,eAAgB,CACtC,CACT,CACI;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,2BAAG,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,GAAI;gBACxD,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC9B,oBAAC,OAAO,kBAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAM,IAAI,IAAE,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CACtG,CAAC;gBACD,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,6BAAK,SAAS,EAAC,sBAAsB,GAAO;gBAAE,GAAG;gBAE/E,2BAAG,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,WAAW,GAAI,CACtD,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React, { Component } from \"react\";\n\n//data\nimport storeActions from \"../stores/storeActions\";\n\n//components\nimport AppCard from \"./AppCard\";\n\n//consts\nconst CARDS_PER_PAGE = 2;\n\n/**\n * A carousel of AppCards\n * @param {object} props Component props\n * @param {array} props.cards An array of AppCards to display in a carousel\n * @param {string} props.tag The carousel's tag (title)\n * @param {func} props.openAppShowcase Parent function to show the AppShowcase for the selected card\n */\nexport default class Carousel extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfirstIndex: 0,\n\t\t\ttitleHighlighted: false,\n\t\t};\n\t\tthis.bindCorrectContext();\n\t\tif (this.props.cards.length < 3) this.notEnoughCards();\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.pageUp = this.pageUp.bind(this);\n\t\tthis.pageDown = this.pageDown.bind(this);\n\t\tthis.highlightTitle = this.highlightTitle.bind(this);\n\t\tthis.seeMore = this.seeMore.bind(this);\n\t\tthis.notEnoughCards = this.notEnoughCards.bind(this);\n\t\tthis.buildCarousel = this.buildCarousel.bind(this);\n\t}\n\n\t/**\n\t * Pages through the carousel by one card (right)\n\t */\n\tpageUp() {\n\t\tlet index = this.state.firstIndex;\n\n\t\t//If increasing the carousel's first index will move beyond the array's limits, we reset back to zero\n\t\tif (index + 1 <= this.props.cards.length - 1) {\n\t\t\tindex++;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tfirstIndex: index,\n\t\t});\n\t}\n\n\t/**\n\t * Pages through the carousel by one card (left)\n\t */\n\tpageDown() {\n\t\tlet index = this.state.firstIndex;\n\t\tif (index - 1 >= 0) {\n\t\t\tthis.setState({\n\t\t\t\tfirstIndex: index - 1,\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Toggles the highlight on a carousel's title. When a user mouses over, we want to style it so its obvious its a link\n\t * @param {*} highlight\n\t */\n\thighlightTitle(highlight) {\n\t\tthis.setState({\n\t\t\ttitleHighlighted: highlight,\n\t\t});\n\t}\n\n\t/**\n\t * Calls the parents seeMore function, which will add the selected tag as a filter\n\t */\n\tseeMore() {\n\t\tstoreActions.addTag(this.props.tag);\n\t}\n\n\t/**\n\t * Spits out a warning if the number of cards supplied to the carousel is < 3\n\t */\n\tnotEnoughCards() {\n\t\tconsole.warn(\"Less than 3 card supplied. This carousel will not display optimally\");\n\t}\n\n\t/**\n\t * Function to build the items in the carousel\n\t */\n\tbuildCarousel() {\n\t\tlet { cards } = this.props;\n\t\tlet firstCard = this.state.firstIndex;\n\n\t\tlet displayCards = [];\n\t\tfor (let i = 0; i < CARDS_PER_PAGE; i++) {\n\t\t\tif (firstCard >= 0 && firstCard <= cards.length - 1) {\n\t\t\t\tdisplayCards.push(cards[firstCard]);\n\t\t\t\tfirstCard++;\n\t\t\t}\n\t\t}\n\n\t\treturn displayCards;\n\t}\n\n\trender() {\n\t\tlet displayCards = this.buildCarousel();\n\t\tlet titleClass = \"carousel-title\";\n\t\tif (this.state.titleHighlighted) titleClass = `${titleClass} highlight`;\n\n\t\tlet chevron_left_style = \"ff-adp-chevron-left\",\n\t\t\tchevron_right_style = \"ff-adp-chevron-right\";\n\t\tlet left_click = this.pageDown,\n\t\t\tright_click = this.pageUp;\n\n\t\tif (this.state.firstIndex + 2 >= this.props.cards.length - 1) {\n\t\t\tchevron_right_style = `${chevron_right_style} disabled`;\n\t\t\tright_click = Function.prototype;\n\t\t}\n\n\t\tif (this.state.firstIndex === 0) {\n\t\t\tchevron_left_style = `${chevron_left_style} disabled`;\n\t\t\tleft_click = Function.prototype;\n\t\t}\n\n\t\tconst carouselTagHeader = this.props.tag.length >= 50 ? `${this.props.tag.substring(0, 49)}...` : this.props.tag;\n\n\t\treturn (\n\t\t\t<div className=\"carousel-main\">\n\t\t\t\t<div className=\"carousel-header\">\n\t\t\t\t\t<div\n\t\t\t\t\t\ttitle={this.props.tag}\n\t\t\t\t\t\tclassName={titleClass}\n\t\t\t\t\t\tonClick={this.seeMore}\n\t\t\t\t\t\tonMouseEnter={this.highlightTitle.bind(this, true)}\n\t\t\t\t\t\tonMouseLeave={this.highlightTitle.bind(this, false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{carouselTagHeader}\n\t\t\t\t\t</div>\n\t\t\t\t\t{this.props.cards.length > 2 && (\n\t\t\t\t\t\t<button className=\"see-more\" onClick={this.seeMore}>\n\t\t\t\t\t\t\t<span className=\"button-label\">See More</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"carousel-content\">\n\t\t\t\t\t<i className={chevron_left_style} onClick={left_click} />\n\t\t\t\t\t{displayCards.map((card, i) => (\n\t\t\t\t\t\t<AppCard key={(card.title || card.name) + i} {...card} viewAppShowcase={this.props.viewAppShowcase} />\n\t\t\t\t\t))}\n\t\t\t\t\t{displayCards.length === 1 && <div className=\"app-card placeholder\"></div>}{\" \"}\n\t\t\t\t\t{/* This is so extremely bad, I hate it. Prevent odd spacing when single card by inserting a blank empty card to consume the space */}\n\t\t\t\t\t<i className={chevron_right_style} onClick={right_click} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyResults.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/EmptyResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CAC1B,6BAAK,SAAS,EAAC,aAAa;IAC3B,4BAAI,SAAS,EAAC,wBAAwB,0CAAyC,CAC1E,CACN,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\n\r\n/**\r\n * Empty Results to show on the search page when filters/search text apply to zero results\r\n\r\n */\r\nconst EmptyResults = () => (\r\n\t<div className=\"app-results\">\r\n\t\t<h3 className=\"app-results-no-results\">No results found. Please try again.</h3>\r\n\t</div>\r\n);\r\n\r\nexport default EmptyResults;\r\n"]}
1
+ {"version":3,"file":"EmptyResults.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/EmptyResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CAC1B,6BAAK,SAAS,EAAC,aAAa;IAC3B,4BAAI,SAAS,EAAC,wBAAwB,0CAAyC,CAC1E,CACN,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\n\n/**\n * Empty Results to show on the search page when filters/search text apply to zero results\n\n */\nconst EmptyResults = () => (\n\t<div className=\"app-results\">\n\t\t<h3 className=\"app-results-no-results\">No results found. Please try again.</h3>\n\t</div>\n);\n\nexport default EmptyResults;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Hero.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/Hero.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAoBtD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAyB;IAC1D,YAAY,KAAa;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,MAAM,EAAE,CAAC;SACT,CAAC;QACF,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAED,kBAAkB;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAMD,UAAU,CAAC,MAAW;QACrB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3B,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAElC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC/B,SAAS,GAAG,MAAM,CAAC;SACnB;aAAM;YACN,QAAQ,MAAM,EAAE;gBACf,KAAK,WAAW;oBACf,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC;oBACjE,MAAM;gBACP,KAAK,SAAS;oBACb,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,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BAC/C,6BAAK,SAAS,EAAC,iBAAiB,IAAE,UAAU,CAAO,CAC9C;oBACL,QAAQ,CAAC,CAAC,CAAC,CACX,6BAAK,SAAS,EAAC,WAAW,EAAC,GAAG,EAAE,QAAQ,GAAI,CAC5C,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,iBAAiB,IAAE,yBAAyB,CAAC,YAAY,CAAC,CAAO,CAChF,CACI;gBACN,2BAAG,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,GAAI,CACjF;YACN,+BAAM;YACL,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,EAAE,IAAI,CAC3C,6BAAK,SAAS,EAAC,WAAW,IACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;gBACtB,IAAI,OAAO,GAAG,iBAAiB,CAAC;gBAChC,IAAI,CAAC,KAAK,MAAM;oBAAE,OAAO,GAAG,GAAG,OAAO,SAAS,CAAC;gBAChD,OAAO,6BAAK,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAI,CAAC;YACpF,CAAC,CAAC,CACG,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n/**\r\n * This component is the name of a component and a pin that will pin that component to all toolbars.\r\n *\r\n */\r\nimport React, { Component } from \"react\";\r\nimport { getAppNameIconWhenNoImage } from \"./helpers\";\r\nimport { AppMetadata } from \"../../../types/fdc3\";\r\n\r\ntype Images = {\r\n\turl: string;\r\n};\r\n\r\ninterface IProps {\r\n\tcards: (AppMetadata & { tags: string[]; images: Images[] })[];\r\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\r\n}\r\n\r\ninterface IState {\r\n\tactive: number;\r\n}\r\n\r\n/**\r\n * The hero component at the top of the App Catalog homepage. Display images and textual descriptions of showcased apps\r\n * @param {object} props Component props\r\n */\r\nexport default class Hero extends Component<IProps, IState> {\r\n\tconstructor(props: IProps) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tactive: 0,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tthis.changePage = this.changePage.bind(this);\r\n\t\tthis.openApp = this.openApp.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Changes the page of the hero component depending on the action its handed\r\n\t * @param {string} action One of 'page_down' or 'page_up'. Any other action is ignored\r\n\t */\r\n\tchangePage(action: any) {\r\n\t\tlet { cards } = this.props;\r\n\t\tlet newActive = this.state.active;\r\n\r\n\t\tif (typeof action === \"number\") {\r\n\t\t\tnewActive = action;\r\n\t\t} else {\r\n\t\t\tswitch (action) {\r\n\t\t\t\tcase \"page_down\":\r\n\t\t\t\t\tnewActive = newActive - 1 < 0 ? cards.length - 1 : newActive - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"page_up\":\r\n\t\t\t\t\tnewActive = newActive + 1 > cards.length - 1 ? 0 : newActive + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tactive: newActive,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Called the parent function to open the AppShowcase for the clicked app\r\n\t */\r\n\topenApp() {\r\n\t\tthis.props.viewAppShowcase(this.props.cards[this.state.active].appId);\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { active } = this.state;\r\n\t\tlet { cards } = this.props;\r\n\t\tlet contentTitle = cards[active].title === undefined ? cards[active].name : cards[active].title;\r\n\t\tlet contentMsg = cards[active].description;\r\n\t\tlet imageUrl = cards[active].images ? cards[active].images?.[0].url : null;\r\n\r\n\t\treturn (\r\n\t\t\t<div>\r\n\t\t\t\t<div className=\"hero-content\">\r\n\t\t\t\t\t<i className=\"ff-adp-chevron-left\" onClick={this.changePage.bind(this, \"page_down\")} />\r\n\t\t\t\t\t<div className=\"visible-card\" onClick={this.openApp}>\r\n\t\t\t\t\t\t<div className=\"app-details\">\r\n\t\t\t\t\t\t\t<div className=\"app-title\">{contentTitle}</div>\r\n\t\t\t\t\t\t\t<div className=\"app-description\">{contentMsg}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t{imageUrl ? (\r\n\t\t\t\t\t\t\t<img className=\"app-image\" src={imageUrl} />\r\n\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t<div className=\"app-image noimg\">{getAppNameIconWhenNoImage(contentTitle)}</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<i className=\"ff-adp-chevron-right\" onClick={this.changePage.bind(this, \"page_up\")} />\r\n\t\t\t\t</div>\r\n\t\t\t\t<br />\r\n\t\t\t\t{cards.length >= 2 && cards.length <= 10 && (\r\n\t\t\t\t\t<div className=\"paginator\">\r\n\t\t\t\t\t\t{cards.map((card, i) => {\r\n\t\t\t\t\t\t\tlet classes = \"pagination-oval\";\r\n\t\t\t\t\t\t\tif (i === active) classes = `${classes} active`;\r\n\t\t\t\t\t\t\treturn <div key={i} className={classes} onClick={this.changePage.bind(this, i)} />;\r\n\t\t\t\t\t\t})}\r\n\t\t\t\t\t</div>\r\n\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":"Hero.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/components/Hero.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAA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,EAAC,sBAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,GAAI,CACjF;YACN,+BAAM;YACL,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,EAAE,IAAI,CAC3C,6BAAK,SAAS,EAAC,WAAW,IACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;gBACtB,IAAI,OAAO,GAAG,iBAAiB,CAAC;gBAChC,IAAI,CAAC,KAAK,MAAM;oBAAE,OAAO,GAAG,GAAG,OAAO,SAAS,CAAC;gBAChD,OAAO,6BAAK,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAI,CAAC;YACpF,CAAC,CAAC,CACG,CACN,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n/**\n * This component is the name of a component and a pin that will pin that component to all toolbars.\n *\n */\nimport React, { Component } from \"react\";\nimport { getAppNameIconWhenNoImage } from \"./helpers\";\nimport { AppMetadata } from \"../../../types/fdc3\";\n\ntype Images = {\n\turl: string;\n};\n\ninterface IProps {\n\tcards: (AppMetadata & { tags: string[]; images: Images[] })[];\n\tviewAppShowcase: (id: AppMetadata[\"appId\"]) => void;\n}\n\ninterface IState {\n\tactive: number;\n}\n\n/**\n * The hero component at the top of the App Catalog homepage. Display images and textual descriptions of showcased apps\n * @param {object} props Component props\n */\nexport default class Hero extends Component<IProps, IState> {\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tactive: 0,\n\t\t};\n\t\tthis.bindCorrectContext();\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.changePage = this.changePage.bind(this);\n\t\tthis.openApp = this.openApp.bind(this);\n\t}\n\n\t/**\n\t * Changes the page of the hero component depending on the action its handed\n\t * @param {string} action One of 'page_down' or 'page_up'. Any other action is ignored\n\t */\n\tchangePage(action: any) {\n\t\tlet { cards } = this.props;\n\t\tlet newActive = this.state.active;\n\n\t\tif (typeof action === \"number\") {\n\t\t\tnewActive = action;\n\t\t} else {\n\t\t\tswitch (action) {\n\t\t\t\tcase \"page_down\":\n\t\t\t\t\tnewActive = newActive - 1 < 0 ? cards.length - 1 : newActive - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"page_up\":\n\t\t\t\t\tnewActive = newActive + 1 > cards.length - 1 ? 0 : newActive + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({\n\t\t\tactive: newActive,\n\t\t});\n\t}\n\n\t/**\n\t * Called the parent function to open the AppShowcase for the clicked app\n\t */\n\topenApp() {\n\t\tthis.props.viewAppShowcase(this.props.cards[this.state.active].appId);\n\t}\n\n\trender() {\n\t\tlet { active } = this.state;\n\t\tlet { cards } = this.props;\n\t\tlet contentTitle = cards[active].title === undefined ? cards[active].name : cards[active].title;\n\t\tlet contentMsg = cards[active].description;\n\t\tlet imageUrl = cards[active].images ? cards[active].images?.[0].url : null;\n\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<div className=\"hero-content\">\n\t\t\t\t\t<i className=\"ff-adp-chevron-left\" onClick={this.changePage.bind(this, \"page_down\")} />\n\t\t\t\t\t<div className=\"visible-card\" onClick={this.openApp}>\n\t\t\t\t\t\t<div className=\"app-details\">\n\t\t\t\t\t\t\t<div className=\"app-title\">{contentTitle}</div>\n\t\t\t\t\t\t\t<div className=\"app-description\">{contentMsg}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{imageUrl ? (\n\t\t\t\t\t\t\t<img className=\"app-image\" src={imageUrl} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"app-image noimg\">{getAppNameIconWhenNoImage(contentTitle)}</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<i className=\"ff-adp-chevron-right\" onClick={this.changePage.bind(this, \"page_up\")} />\n\t\t\t\t</div>\n\t\t\t\t<br />\n\t\t\t\t{cards.length >= 2 && cards.length <= 10 && (\n\t\t\t\t\t<div className=\"paginator\">\n\t\t\t\t\t\t{cards.map((card, i) => {\n\t\t\t\t\t\t\tlet classes = \"pagination-oval\";\n\t\t\t\t\t\t\tif (i === active) classes = `${classes} active`;\n\t\t\t\t\t\t\treturn <div key={i} className={classes} onClick={this.changePage.bind(this, i)} />;\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}