@finsemble/finsemble-ui 6.6.1 → 7.0.0-beta-X

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 (902) hide show
  1. package/package.json +31 -43
  2. package/react/actions/favoriteActions.d.ts +1 -0
  3. package/react/actions/favoriteActions.js +1 -0
  4. package/react/actions/favoriteActions.js.map +1 -1
  5. package/react/actions/menuActions.d.ts +1 -0
  6. package/react/actions/menuActions.js +1 -0
  7. package/react/actions/menuActions.js.map +1 -1
  8. package/react/actions/rootActions.d.ts +1 -0
  9. package/react/actions/rootActions.js +1 -0
  10. package/react/actions/rootActions.js.map +1 -1
  11. package/react/actions/searchActions.d.ts +1 -0
  12. package/react/actions/searchActions.js +1 -0
  13. package/react/actions/searchActions.js.map +1 -1
  14. package/react/actions/toolbarActions.d.ts +34 -0
  15. package/react/actions/toolbarActions.js +17 -0
  16. package/react/actions/toolbarActions.js.map +1 -1
  17. package/react/actions/workspaceActions.d.ts +1 -0
  18. package/react/actions/workspaceActions.js +1 -0
  19. package/react/actions/workspaceActions.js.map +1 -1
  20. package/react/assets/css/advancedAppLauncher.css +22 -19
  21. package/react/assets/css/appCatalog.css +67 -72
  22. package/react/assets/css/authentication.css +4 -3
  23. package/react/assets/css/button.css +4 -11
  24. package/react/assets/css/core/formElements.css +1 -1
  25. package/react/assets/css/core/icons.css +3 -2
  26. package/react/assets/css/core/notifications.css +2 -2
  27. package/react/assets/css/core/windowFrame.css +9 -9
  28. package/react/assets/css/dashbar.css +1 -1
  29. package/react/assets/css/defaultTheme.css +9 -53
  30. package/react/assets/css/dialogs.css +13 -11
  31. package/react/assets/css/favorites.css +3 -48
  32. package/react/assets/css/finsemble.css +6 -2
  33. package/react/assets/css/font-finance.css +233 -120
  34. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +10 -10
  35. package/react/assets/css/linkerWindow.css +15 -3
  36. package/react/assets/css/menus.css +12 -12
  37. package/react/assets/css/notificationsCenter.css +49 -33
  38. package/react/assets/css/processMonitor.css +7 -4
  39. package/react/assets/css/search.css +1 -1
  40. package/react/assets/css/shared/animations.css +10 -4
  41. package/react/assets/css/shared/common.css +40 -0
  42. package/react/assets/css/tags.css +10 -10
  43. package/react/assets/css/toolbar.css +22 -19
  44. package/react/assets/css/userPreferences.css +29 -26
  45. package/react/assets/css/windowTitleBar.css +86 -40
  46. package/react/assets/icons/server.svg +26 -0
  47. package/react/componentTemplateGenerator.js +3 -2
  48. package/react/componentTemplateGenerator.js.map +1 -1
  49. package/react/components/FinsembleProvider.d.ts +7 -0
  50. package/react/components/FinsembleProvider.js +2 -0
  51. package/react/components/FinsembleProvider.js.map +1 -1
  52. package/react/components/appCatalog/AppCatalog.d.ts +4 -0
  53. package/react/components/appCatalog/AppCatalog.js +4 -0
  54. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  55. package/react/components/appCatalog/AppCatalogComponent.d.ts +58 -0
  56. package/react/components/appCatalog/AppCatalogComponent.js +70 -1
  57. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  58. package/react/components/appCatalog/components/AppCard.d.ts +35 -0
  59. package/react/components/appCatalog/components/AppCard.js +42 -0
  60. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  61. package/react/components/appCatalog/components/AppResults.d.ts +10 -0
  62. package/react/components/appCatalog/components/AppResults.js +24 -0
  63. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  64. package/react/components/appCatalog/components/Carousel.d.ts +26 -0
  65. package/react/components/appCatalog/components/Carousel.js +34 -0
  66. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  67. package/react/components/appCatalog/components/EmptyResults.d.ts +4 -0
  68. package/react/components/appCatalog/components/EmptyResults.js +8 -0
  69. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  70. package/react/components/appCatalog/components/Hero.d.ts +15 -0
  71. package/react/components/appCatalog/components/Hero.js +15 -0
  72. package/react/components/appCatalog/components/Hero.js.map +1 -1
  73. package/react/components/appCatalog/components/Home.d.ts +6 -4
  74. package/react/components/appCatalog/components/Home.js +10 -0
  75. package/react/components/appCatalog/components/Home.js.map +1 -1
  76. package/react/components/appCatalog/components/SearchBar.d.ts +31 -0
  77. package/react/components/appCatalog/components/SearchBar.js +33 -0
  78. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  79. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -0
  80. package/react/components/appCatalog/components/Showcase/AppDescription.js +9 -0
  81. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  82. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +7 -0
  83. package/react/components/appCatalog/components/Showcase/AppDevNotes.js +15 -0
  84. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  85. package/react/components/appCatalog/components/Showcase/AppShowcase.d.ts +17 -0
  86. package/react/components/appCatalog/components/Showcase/AppShowcase.js +25 -0
  87. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  88. package/react/components/appCatalog/components/Showcase/Header.d.ts +7 -0
  89. package/react/components/appCatalog/components/Showcase/Header.js +12 -0
  90. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  91. package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +7 -0
  92. package/react/components/appCatalog/components/Showcase/ImageCarousel.js +11 -0
  93. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  94. package/react/components/appCatalog/components/Showcase/Modal.d.ts +10 -0
  95. package/react/components/appCatalog/components/Showcase/Modal.js +10 -0
  96. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  97. package/react/components/appCatalog/components/Showcase/ReleaseNotes.d.ts +5 -0
  98. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js +9 -0
  99. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  100. package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +6 -0
  101. package/react/components/appCatalog/components/Showcase/SupportNotes.js +11 -0
  102. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  103. package/react/components/appCatalog/components/Showcase/VersionNotes.d.ts +5 -0
  104. package/react/components/appCatalog/components/Showcase/VersionNotes.js +9 -0
  105. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  106. package/react/components/appCatalog/components/Tag.d.ts +6 -0
  107. package/react/components/appCatalog/components/Tag.js +10 -0
  108. package/react/components/appCatalog/components/Tag.js.map +1 -1
  109. package/react/components/appCatalog/components/Toast.d.ts +5 -0
  110. package/react/components/appCatalog/components/Toast.js +9 -0
  111. package/react/components/appCatalog/components/Toast.js.map +1 -1
  112. package/react/components/appCatalog/components/helpers.js +1 -0
  113. package/react/components/appCatalog/components/helpers.js.map +1 -1
  114. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -0
  115. package/react/components/appCatalog/modules/AppDirectory.js +5 -0
  116. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  117. package/react/components/appCatalog/modules/FDC3.d.ts +37 -0
  118. package/react/components/appCatalog/modules/FDC3.js +40 -0
  119. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  120. package/react/components/appCatalog/stores/appStore.js +1 -0
  121. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  122. package/react/components/appCatalog/stores/storeActions.d.ts +91 -0
  123. package/react/components/appCatalog/stores/storeActions.js +116 -1
  124. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  125. package/react/components/common/ButtonIcon.js +1 -1
  126. package/react/components/common/ButtonIcon.js.map +1 -1
  127. package/react/components/common/ButtonRow.js +2 -2
  128. package/react/components/common/ButtonRow.js.map +1 -1
  129. package/react/components/common/Checkbox.d.ts +1 -0
  130. package/react/components/common/Checkbox.js +3 -3
  131. package/react/components/common/Checkbox.js.map +1 -1
  132. package/react/components/common/ColorPicker.d.ts +5 -0
  133. package/react/components/common/ColorPicker.js +56 -15
  134. package/react/components/common/ColorPicker.js.map +1 -1
  135. package/react/components/common/DropZone.d.ts +11 -0
  136. package/react/components/common/DropZone.js +21 -1
  137. package/react/components/common/DropZone.js.map +1 -1
  138. package/react/components/common/DropdownButton.d.ts +4 -0
  139. package/react/components/common/DropdownButton.js +4 -0
  140. package/react/components/common/DropdownButton.js.map +1 -1
  141. package/react/components/common/ErrorBoundary.d.ts +34 -0
  142. package/react/components/common/ErrorBoundary.js +43 -0
  143. package/react/components/common/ErrorBoundary.js.map +1 -0
  144. package/react/components/common/FileInput.d.ts +8 -1
  145. package/react/components/common/FileInput.js +19 -4
  146. package/react/components/common/FileInput.js.map +1 -1
  147. package/react/components/common/FinsembleIcon.d.ts +13 -2
  148. package/react/components/common/FinsembleIcon.js +61 -5
  149. package/react/components/common/FinsembleIcon.js.map +1 -1
  150. package/react/components/common/FinsembleLink.d.ts +6 -0
  151. package/react/components/common/FinsembleLink.js +12 -0
  152. package/react/components/common/FinsembleLink.js.map +1 -0
  153. package/react/components/common/FinsembleSelect.js +5 -1
  154. package/react/components/common/FinsembleSelect.js.map +1 -1
  155. package/react/components/common/FinsembleToggle.d.ts +1 -2
  156. package/react/components/common/FinsembleToggle.js +2 -6
  157. package/react/components/common/FinsembleToggle.js.map +1 -1
  158. package/react/components/common/FinsembleToggleButtonBar.d.ts +13 -0
  159. package/react/components/common/FinsembleToggleButtonBar.js +44 -0
  160. package/react/components/common/FinsembleToggleButtonBar.js.map +1 -0
  161. package/react/components/common/InputTable.d.ts +10 -3
  162. package/react/components/common/InputTable.js +20 -13
  163. package/react/components/common/InputTable.js.map +1 -1
  164. package/react/components/common/Tab.js +36 -5
  165. package/react/components/common/Tab.js.map +1 -1
  166. package/react/components/common/TimeSelect.js +34 -3
  167. package/react/components/common/TimeSelect.js.map +1 -1
  168. package/react/components/common/Tooltip.js +2 -0
  169. package/react/components/common/Tooltip.js.map +1 -1
  170. package/react/components/common/css/FinsembleToggle.css +22 -0
  171. package/react/components/common/css/accordion.css +9 -6
  172. package/react/components/common/css/application-edit-page.css +48 -45
  173. package/react/components/common/css/button.css +10 -5
  174. package/react/components/common/css/color-picker.css +3 -3
  175. package/react/components/common/css/drop-zone.css +2 -6
  176. package/react/components/common/css/file-input.css +5 -5
  177. package/react/components/common/css/header.css +3 -2
  178. package/react/components/common/css/icon.css +1 -1
  179. package/react/components/common/css/loading-spinner.css +7 -12
  180. package/react/components/common/css/selector.css +4 -4
  181. package/react/components/common/css/styles.css +22 -16
  182. package/react/components/common/css/tab.css +14 -14
  183. package/react/components/common/css/time-select.css +2 -1
  184. package/react/components/common/css/toggle.css +4 -12
  185. package/react/components/common/css/tooltip.css +2 -3
  186. package/react/components/common/file_helpers.js +2 -0
  187. package/react/components/common/file_helpers.js.map +1 -1
  188. package/react/components/common/helpers.js +12 -1
  189. package/react/components/common/helpers.js.map +1 -1
  190. package/react/components/common/stories/ColorPicker.stories.js +9 -11
  191. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  192. package/react/components/common/stories/FileInput.stories.d.ts +3 -1
  193. package/react/components/common/stories/FileInput.stories.js +12 -0
  194. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  195. package/react/components/common/stories/FinsembleToggle.stories.d.ts +1 -2
  196. package/react/components/common/stories/FinsembleToggle.stories.js +0 -7
  197. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  198. package/react/components/common/stories/FinsembleToggleButtonBar.stories.d.ts +14 -0
  199. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js +97 -0
  200. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js.map +1 -0
  201. package/react/components/common/stories/InputTable.stories.d.ts +4 -3
  202. package/react/components/common/stories/InputTable.stories.js +18 -8
  203. package/react/components/common/stories/InputTable.stories.js.map +1 -1
  204. package/react/components/common/tests/Accordion.spec.js +6 -0
  205. package/react/components/common/tests/Accordion.spec.js.map +1 -1
  206. package/react/components/common/tests/ButtonRow.spec.js +5 -0
  207. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  208. package/react/components/common/tests/Checkbox.spec.js +1 -0
  209. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  210. package/react/components/common/tests/ColorPicker.spec.js +6 -0
  211. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  212. package/react/components/common/tests/DropZone.spec.js +1 -0
  213. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  214. package/react/components/common/tests/FileInput.spec.js +22 -0
  215. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  216. package/react/components/common/tests/FinsembleSelect.spec.js +1 -0
  217. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  218. package/react/components/common/tests/FinsembleToggle.spec.js +2 -6
  219. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  220. package/react/components/common/tests/FinsembleToggleButtonBar.spec.d.ts +1 -0
  221. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +41 -0
  222. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -0
  223. package/react/components/common/tests/InputTable.spec.js +3 -3
  224. package/react/components/common/tests/InputTable.spec.js.map +1 -1
  225. package/react/components/common/tests/TimeSelect.spec.js +4 -0
  226. package/react/components/common/tests/TimeSelect.spec.js.map +1 -1
  227. package/react/components/common/tests/Tooltip.spec.js +16 -0
  228. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  229. package/react/components/favorites/FavoriteMaker.d.ts +8 -0
  230. package/react/components/favorites/FavoriteMaker.js +10 -1
  231. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  232. package/react/components/favorites/FavoritesShell.d.ts +4 -0
  233. package/react/components/favorites/FavoritesShell.js +13 -1
  234. package/react/components/favorites/FavoritesShell.js.map +1 -1
  235. package/react/components/favorites/FavoritesShell.spec.js +3 -0
  236. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  237. package/react/components/fdc3Resolver/ResolverContainer.js +12 -7
  238. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  239. package/react/components/fdc3Resolver/ResolverDialog.css +16 -3
  240. package/react/components/fdc3Resolver/ResolverDialog.js +7 -2
  241. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  242. package/react/components/fdc3Resolver/ResolverDialog.spec.js +3 -2
  243. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  244. package/react/components/fdc3Resolver/ResolverDialog.stories.js +2 -0
  245. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  246. package/react/components/icon/Icon.d.ts +14 -1
  247. package/react/components/icon/Icon.js +42 -1
  248. package/react/components/icon/Icon.js.map +1 -1
  249. package/react/components/legacyControls/FinsembleDialog.d.ts +4 -0
  250. package/react/components/legacyControls/FinsembleDialog.js +16 -1
  251. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  252. package/react/components/legacyControls/FinsembleDialogButton.d.ts +3 -0
  253. package/react/components/legacyControls/FinsembleDialogButton.js +6 -1
  254. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  255. package/react/components/legacyControls/FinsembleDialogQuestion.d.ts +7 -0
  256. package/react/components/legacyControls/FinsembleDialogQuestion.js +7 -0
  257. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  258. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +3 -0
  259. package/react/components/legacyControls/FinsembleDialogTextInput.js +14 -0
  260. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  261. package/react/components/legacyControls/FinsembleDnDContext.d.ts +19 -0
  262. package/react/components/legacyControls/FinsembleDnDContext.js +133 -8
  263. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  264. package/react/components/legacyControls/FinsembleDraggable.d.ts +3 -0
  265. package/react/components/legacyControls/FinsembleDraggable.js +3 -0
  266. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  267. package/react/components/legacyControls/FinsembleHoverDetector.d.ts +15 -0
  268. package/react/components/legacyControls/FinsembleHoverDetector.js +26 -1
  269. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  270. package/react/components/legacyControls/FinsembleMenuSection.d.ts +4 -0
  271. package/react/components/legacyControls/FinsembleMenuSection.js +38 -0
  272. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  273. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +1 -0
  274. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  275. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -0
  276. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  277. package/react/components/linker/LinkerMenu.d.ts +3 -0
  278. package/react/components/linker/LinkerMenu.js +21 -0
  279. package/react/components/linker/LinkerMenu.js.map +1 -1
  280. package/react/components/linker/LinkerMenuDeprecated.d.ts +3 -0
  281. package/react/components/linker/LinkerMenuDeprecated.js +9 -0
  282. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  283. package/react/components/linker/remoteRedux.js +1 -0
  284. package/react/components/linker/remoteRedux.js.map +1 -1
  285. package/react/components/menu/Menu.d.ts +15 -0
  286. package/react/components/menu/Menu.js +15 -0
  287. package/react/components/menu/Menu.js.map +1 -1
  288. package/react/components/menu/MenuAutoResizer.d.ts +7 -0
  289. package/react/components/menu/MenuAutoResizer.js +27 -0
  290. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  291. package/react/components/menu/MenuContent.d.ts +4 -0
  292. package/react/components/menu/MenuContent.js +4 -0
  293. package/react/components/menu/MenuContent.js.map +1 -1
  294. package/react/components/menu/MenuHotKey.d.ts +14 -0
  295. package/react/components/menu/MenuHotKey.js +15 -0
  296. package/react/components/menu/MenuHotKey.js.map +1 -1
  297. package/react/components/menu/MenuItem.d.ts +8 -0
  298. package/react/components/menu/MenuItem.js +13 -2
  299. package/react/components/menu/MenuItem.js.map +1 -1
  300. package/react/components/menu/MenuPortal.js +125 -24
  301. package/react/components/menu/MenuPortal.js.map +1 -1
  302. package/react/components/menu/MenuShell.d.ts +16 -0
  303. package/react/components/menu/MenuShell.js +26 -0
  304. package/react/components/menu/MenuShell.js.map +1 -1
  305. package/react/components/menu/MenuToggle.d.ts +3 -0
  306. package/react/components/menu/MenuToggle.js +5 -2
  307. package/react/components/menu/MenuToggle.js.map +1 -1
  308. package/react/components/menu/keyboardNavigation.d.ts +13 -22
  309. package/react/components/menu/keyboardNavigation.js +165 -160
  310. package/react/components/menu/keyboardNavigation.js.map +1 -1
  311. package/react/components/menu/menuContext.d.ts +6 -0
  312. package/react/components/menu/menuContext.js +6 -0
  313. package/react/components/menu/menuContext.js.map +1 -1
  314. package/react/components/menu/menuHelpers.d.ts +22 -0
  315. package/react/components/menu/menuHelpers.js +58 -1
  316. package/react/components/menu/menuHelpers.js.map +1 -1
  317. package/react/components/notifications/components/drawer/DrawerControls.js +47 -25
  318. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  319. package/react/components/notifications/components/drawer/DrawerHeader.js +5 -0
  320. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  321. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +37 -6
  322. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  323. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +17 -10
  324. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  325. package/react/components/notifications/components/shared/CheckButton.js +19 -8
  326. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  327. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +9 -0
  328. package/react/components/notifications/components/shared/NotificationCardShell.js +15 -7
  329. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  330. package/react/components/notifications/components/shared/OverflowMenu.d.ts +4 -0
  331. package/react/components/notifications/components/shared/OverflowMenu.js +16 -2
  332. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  333. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -1
  334. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  335. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js +2 -1
  336. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  337. package/react/components/notifications/components/views/CardView.js +8 -3
  338. package/react/components/notifications/components/views/CardView.js.map +1 -1
  339. package/react/components/notifications/components/views/ListView.js +11 -1
  340. package/react/components/notifications/components/views/ListView.js.map +1 -1
  341. package/react/components/notifications/notificationsContext.d.ts +4 -0
  342. package/react/components/notifications/notificationsContext.js +4 -0
  343. package/react/components/notifications/notificationsContext.js.map +1 -1
  344. package/react/components/notifications/types.d.ts +6 -0
  345. package/react/components/notifications/types.js.map +1 -1
  346. package/react/components/notifications/utils.d.ts +4 -0
  347. package/react/components/notifications/utils.js +4 -0
  348. package/react/components/notifications/utils.js.map +1 -1
  349. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -0
  350. package/react/components/processMonitor/ProcessMonitor.js +21 -3
  351. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  352. package/react/components/processMonitor/components/ChildWindow.d.ts +3 -0
  353. package/react/components/processMonitor/components/ChildWindow.js +5 -0
  354. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  355. package/react/components/processMonitor/components/ListHeader.d.ts +5 -0
  356. package/react/components/processMonitor/components/ListHeader.js +7 -0
  357. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  358. package/react/components/processMonitor/components/ProcessStatistics.js +12 -3
  359. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  360. package/react/components/processMonitor/constants.js +6 -0
  361. package/react/components/processMonitor/constants.js.map +1 -1
  362. package/react/components/processMonitor/helpers.d.ts +13 -0
  363. package/react/components/processMonitor/helpers.js +27 -6
  364. package/react/components/processMonitor/helpers.js.map +1 -1
  365. package/react/components/processMonitor/helpers.spec.js +7 -3
  366. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  367. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +39 -0
  368. package/react/components/processMonitor/stores/ProcessMonitorStore.js +50 -0
  369. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  370. package/react/components/quickComponentForm/QuickComponentForm.d.ts +3 -0
  371. package/react/components/quickComponentForm/QuickComponentForm.js +20 -0
  372. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  373. package/react/components/quickComponentForm/quickComponent.css +1 -1
  374. package/react/components/sdd/AddApp.d.ts +7 -4
  375. package/react/components/sdd/AddApp.js +144 -34
  376. package/react/components/sdd/AddApp.js.map +1 -1
  377. package/react/components/sdd/AppEditAccess.d.ts +4 -3
  378. package/react/components/sdd/AppEditAccess.js +8 -0
  379. package/react/components/sdd/AppEditAccess.js.map +1 -1
  380. package/react/components/sdd/AppEditPage.d.ts +6 -4
  381. package/react/components/sdd/AppEditPage.js +205 -393
  382. package/react/components/sdd/AppEditPage.js.map +1 -1
  383. package/react/components/sdd/Appearance.css +1 -1
  384. package/react/components/sdd/Appearance.d.ts +2 -1
  385. package/react/components/sdd/Appearance.js +18 -7
  386. package/react/components/sdd/Appearance.js.map +1 -1
  387. package/react/components/sdd/Application.d.ts +5 -4
  388. package/react/components/sdd/Application.js +94 -44
  389. package/react/components/sdd/Application.js.map +1 -1
  390. package/react/components/sdd/Applications.d.ts +12 -11
  391. package/react/components/sdd/Applications.js +110 -15
  392. package/react/components/sdd/Applications.js.map +1 -1
  393. package/react/components/sdd/AssetsPage.css +3 -3
  394. package/react/components/sdd/Authentication.js +1 -6
  395. package/react/components/sdd/Authentication.js.map +1 -1
  396. package/react/components/sdd/AuthenticationProviderConfig.js +5 -3
  397. package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -1
  398. package/react/components/sdd/EditPreload.d.ts +4 -3
  399. package/react/components/sdd/EditPreload.js +49 -22
  400. package/react/components/sdd/EditPreload.js.map +1 -1
  401. package/react/components/sdd/Export.d.ts +7 -6
  402. package/react/components/sdd/Export.js +4 -3
  403. package/react/components/sdd/Export.js.map +1 -1
  404. package/react/components/sdd/ExportCloud.js +4 -0
  405. package/react/components/sdd/ExportCloud.js.map +1 -1
  406. package/react/components/sdd/GettingStarted.js +3 -3
  407. package/react/components/sdd/GettingStarted.js.map +1 -1
  408. package/react/components/sdd/Navigation.js +28 -4
  409. package/react/components/sdd/Navigation.js.map +1 -1
  410. package/react/components/sdd/OptionalSettingsView.d.ts +6 -5
  411. package/react/components/sdd/OptionalSettingsView.js +2 -10
  412. package/react/components/sdd/OptionalSettingsView.js.map +1 -1
  413. package/react/components/sdd/ProjectErrors.js +1 -1
  414. package/react/components/sdd/ProjectErrors.js.map +1 -1
  415. package/react/components/sdd/Publish.js +4 -2
  416. package/react/components/sdd/Publish.js.map +1 -1
  417. package/react/components/sdd/PublishProgress.js +11 -1
  418. package/react/components/sdd/PublishProgress.js.map +1 -1
  419. package/react/components/sdd/SmartDesktopDesigner.d.ts +17 -16
  420. package/react/components/sdd/SmartDesktopDesigner.js +54 -34
  421. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
  422. package/react/components/sdd/ThemePage.css +6 -23
  423. package/react/components/sdd/ThemePage.js +8 -5
  424. package/react/components/sdd/ThemePage.js.map +1 -1
  425. package/react/components/sdd/Themes.d.ts +2 -1
  426. package/react/components/sdd/Themes.js +4 -2
  427. package/react/components/sdd/Themes.js.map +1 -1
  428. package/react/components/sdd/Toolbar.d.ts +5 -4
  429. package/react/components/sdd/Toolbar.js +18 -9
  430. package/react/components/sdd/Toolbar.js.map +1 -1
  431. package/react/components/sdd/appEditPage/Behavior.d.ts +34 -0
  432. package/react/components/sdd/appEditPage/Behavior.js +134 -0
  433. package/react/components/sdd/appEditPage/Behavior.js.map +1 -0
  434. package/react/components/sdd/appEditPage/Component.d.ts +22 -0
  435. package/react/components/sdd/appEditPage/Component.js +76 -0
  436. package/react/components/sdd/appEditPage/Component.js.map +1 -0
  437. package/react/components/sdd/appEditPage/DebugToolkit.d.ts +9 -0
  438. package/react/components/sdd/appEditPage/DebugToolkit.js +20 -0
  439. package/react/components/sdd/appEditPage/DebugToolkit.js.map +1 -0
  440. package/react/components/sdd/appEditPage/Interop.d.ts +10 -0
  441. package/react/components/sdd/appEditPage/Interop.js +40 -0
  442. package/react/components/sdd/appEditPage/Interop.js.map +1 -0
  443. package/react/components/sdd/appEditPage/Position.d.ts +18 -0
  444. package/react/components/sdd/appEditPage/Position.js +72 -0
  445. package/react/components/sdd/appEditPage/Position.js.map +1 -0
  446. package/react/components/sdd/appEditPage/Preloads.d.ts +9 -0
  447. package/react/components/sdd/appEditPage/Preloads.js +16 -0
  448. package/react/components/sdd/appEditPage/Preloads.js.map +1 -0
  449. package/react/components/sdd/appEditPage/SelectConnect.d.ts +15 -0
  450. package/react/components/sdd/appEditPage/SelectConnect.js +28 -0
  451. package/react/components/sdd/appEditPage/SelectConnect.js.map +1 -0
  452. package/react/components/sdd/appEditPage/Workspace.d.ts +12 -0
  453. package/react/components/sdd/appEditPage/Workspace.js +30 -0
  454. package/react/components/sdd/appEditPage/Workspace.js.map +1 -0
  455. package/react/components/sdd/common/getCSSVars.js +7 -2
  456. package/react/components/sdd/common/getCSSVars.js.map +1 -1
  457. package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -1
  458. package/react/components/sdd/common/setPreloadDefaults.js +9 -4
  459. package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
  460. package/react/components/sdd/common/views.js +7 -4
  461. package/react/components/sdd/common/views.js.map +1 -1
  462. package/react/components/sdd/css/addApp.css +65 -0
  463. package/react/components/sdd/css/appearance.css +6 -0
  464. package/react/components/sdd/css/applications.css +27 -34
  465. package/react/components/sdd/css/authentication.css +7 -6
  466. package/react/components/sdd/css/buttons.css +1 -1
  467. package/react/components/sdd/css/export.css +5 -3
  468. package/react/components/sdd/css/getting-started.css +2 -2
  469. package/react/components/sdd/css/nav.css +11 -14
  470. package/react/components/sdd/css/project-header.css +5 -7
  471. package/react/components/sdd/css/styles.css +29 -23
  472. package/react/components/sdd/css/views.css +4 -3
  473. package/react/components/sdd/fixtures/apps.js +12 -0
  474. package/react/components/sdd/fixtures/apps.js.map +1 -1
  475. package/react/components/sdd/fixtures/authenticationProps.js +15 -1
  476. package/react/components/sdd/fixtures/authenticationProps.js.map +1 -1
  477. package/react/components/sdd/fixtures/configTemplate.js +1 -0
  478. package/react/components/sdd/fixtures/configTemplate.js.map +1 -1
  479. package/react/components/sdd/fixtures/preloads.js +14 -12
  480. package/react/components/sdd/fixtures/preloads.js.map +1 -1
  481. package/react/components/sdd/fixtures/publishProgress.js +40 -0
  482. package/react/components/sdd/fixtures/publishProgress.js.map +1 -1
  483. package/react/components/sdd/sdd_helpers.d.ts +6 -0
  484. package/react/components/sdd/sdd_helpers.js +6 -0
  485. package/react/components/sdd/sdd_helpers.js.map +1 -1
  486. package/react/components/sdd/smartDesktopClient.d.ts +466 -0
  487. package/react/components/sdd/smartDesktopClient.js +906 -0
  488. package/react/components/sdd/smartDesktopClient.js.map +1 -0
  489. package/react/components/sdd/smartDesktopClient.spec.d.ts +1 -0
  490. package/react/components/sdd/smartDesktopClient.spec.js +64 -0
  491. package/react/components/sdd/smartDesktopClient.spec.js.map +1 -0
  492. package/react/components/sdd/stories/AddApp.stories.d.ts +11 -0
  493. package/react/components/sdd/stories/AddApp.stories.js +26 -0
  494. package/react/components/sdd/stories/AddApp.stories.js.map +1 -0
  495. package/react/components/sdd/stories/AppEditPage.stories.d.ts +5 -1
  496. package/react/components/sdd/stories/AppEditPage.stories.js +5 -0
  497. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
  498. package/react/components/sdd/stories/Appearance.stories.d.ts +1 -1
  499. package/react/components/sdd/stories/Appearance.stories.js +2 -0
  500. package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
  501. package/react/components/sdd/stories/Authentication.stories.js +2 -16
  502. package/react/components/sdd/stories/Authentication.stories.js.map +1 -1
  503. package/react/components/sdd/stories/OptionalSettingsView.stories.js +1 -1
  504. package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -1
  505. package/react/components/sdd/stories/SmartDesktopDesigner.stories.d.ts +1 -1
  506. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js +3 -0
  507. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -1
  508. package/react/components/sdd/stories/Themes.stories.d.ts +1 -1
  509. package/react/components/sdd/stories/Themes.stories.js +1 -0
  510. package/react/components/sdd/stories/Themes.stories.js.map +1 -1
  511. package/react/components/sdd/tests/AddApp.spec.d.ts +1 -0
  512. package/react/components/sdd/tests/AddApp.spec.js +133 -0
  513. package/react/components/sdd/tests/AddApp.spec.js.map +1 -0
  514. package/react/components/sdd/tests/AppEditPage.spec.js +108 -23
  515. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
  516. package/react/components/sdd/tests/Application.spec.js +351 -369
  517. package/react/components/sdd/tests/Application.spec.js.map +1 -1
  518. package/react/components/sdd/tests/Applications.spec.d.ts +1 -1
  519. package/react/components/sdd/tests/Applications.spec.js +30 -50
  520. package/react/components/sdd/tests/Applications.spec.js.map +1 -1
  521. package/react/components/sdd/tests/Authentication.spec.js +8 -1
  522. package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
  523. package/react/components/sdd/tests/ContentHeader.spec.js +2 -0
  524. package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -1
  525. package/react/components/sdd/tests/EditPreload.spec.js +63 -7
  526. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
  527. package/react/components/sdd/tests/Export.spec.js +8 -1
  528. package/react/components/sdd/tests/Export.spec.js.map +1 -1
  529. package/react/components/sdd/tests/ItemList.spec.js +4 -0
  530. package/react/components/sdd/tests/ItemList.spec.js.map +1 -1
  531. package/react/components/sdd/tests/Navigation.spec.js +2 -2
  532. package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
  533. package/react/components/sdd/tests/OptionalSettingsView.spec.js +264 -0
  534. package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
  535. package/react/components/sdd/tests/ProjectErrors.spec.js +3 -1
  536. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
  537. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +2 -2
  538. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
  539. package/react/components/sdd/tests/Themes.spec.js +1 -1
  540. package/react/components/sdd/tests/Themes.spec.js.map +1 -1
  541. package/react/components/sdd/tests/Toolbar.spec.js +53 -0
  542. package/react/components/sdd/tests/Toolbar.spec.js.map +1 -1
  543. package/react/components/sdd/tests/a11y_helper.js +8 -0
  544. package/react/components/sdd/tests/a11y_helper.js.map +1 -1
  545. package/react/components/search/Highlight.d.ts +6 -0
  546. package/react/components/search/Highlight.js +19 -0
  547. package/react/components/search/Highlight.js.map +1 -1
  548. package/react/components/search/Highlight.stories.js +1 -1
  549. package/react/components/search/Highlight.stories.js.map +1 -1
  550. package/react/components/search/Search.js +1 -1
  551. package/react/components/search/Search.js.map +1 -1
  552. package/react/components/search/SearchBestMatch.d.ts +4 -0
  553. package/react/components/search/SearchBestMatch.js +11 -0
  554. package/react/components/search/SearchBestMatch.js.map +1 -1
  555. package/react/components/search/SearchInput.d.ts +5 -0
  556. package/react/components/search/SearchInput.js +6 -0
  557. package/react/components/search/SearchInput.js.map +1 -1
  558. package/react/components/search/SearchProviderResults.js +2 -0
  559. package/react/components/search/SearchProviderResults.js.map +1 -1
  560. package/react/components/search/SearchResult.d.ts +5 -0
  561. package/react/components/search/SearchResult.js +6 -0
  562. package/react/components/search/SearchResult.js.map +1 -1
  563. package/react/components/search/SearchResult.spec.d.ts +1 -0
  564. package/react/components/search/SearchResult.spec.js +46 -0
  565. package/react/components/search/SearchResult.spec.js.map +1 -0
  566. package/react/components/search/SearchResult.stories.d.ts +16 -0
  567. package/react/components/search/SearchResult.stories.js +113 -0
  568. package/react/components/search/SearchResult.stories.js.map +1 -0
  569. package/react/components/search/SearchResults.js +5 -1
  570. package/react/components/search/SearchResults.js.map +1 -1
  571. package/react/components/search/SearchResults.spec.d.ts +1 -0
  572. package/react/components/search/SearchResults.spec.js +35 -0
  573. package/react/components/search/SearchResults.spec.js.map +1 -0
  574. package/react/components/search/SearchResults.stories.d.ts +11 -0
  575. package/react/components/search/SearchResults.stories.js +458 -0
  576. package/react/components/search/SearchResults.stories.js.map +1 -0
  577. package/react/components/shared/Animate.d.ts +5 -0
  578. package/react/components/shared/Animate.js +12 -1
  579. package/react/components/shared/Animate.js.map +1 -1
  580. package/react/components/shared/DefaultDropdownButton.js +26 -6
  581. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  582. package/react/components/shared/Tag.d.ts +0 -4
  583. package/react/components/shared/Tag.js +4 -0
  584. package/react/components/shared/Tag.js.map +1 -1
  585. package/react/components/shared/TagsMenu.d.ts +6 -0
  586. package/react/components/shared/TagsMenu.js +7 -0
  587. package/react/components/shared/TagsMenu.js.map +1 -1
  588. package/react/components/shared/addProtocolToValidURL.d.ts +6 -0
  589. package/react/components/shared/addProtocolToValidURL.js +6 -0
  590. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  591. package/react/components/shared/openQuitConfirmationDialog.d.ts +1 -1
  592. package/react/components/shared/openQuitConfirmationDialog.js +4 -4
  593. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  594. package/react/components/shared/tests/DefaultDropdownButton.spec.js +12 -0
  595. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  596. package/react/components/shared/tests/addProtocolToValidURL.spec.js +1 -0
  597. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  598. package/react/components/shared/validateURL.d.ts +18 -0
  599. package/react/components/shared/validateURL.js +24 -5
  600. package/react/components/shared/validateURL.js.map +1 -1
  601. package/react/components/singleInputDialog/SingleInputDialog.css +1 -1
  602. package/react/components/singleInputDialog/SingleInputDialog.d.ts +3 -0
  603. package/react/components/singleInputDialog/SingleInputDialog.js +46 -0
  604. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  605. package/react/components/singleInputDialog/SingleInputDialog.stories.js +2 -2
  606. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  607. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -16
  608. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +5 -3
  609. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  610. package/react/components/system/System.d.ts +22 -0
  611. package/react/components/system/System.js +23 -1
  612. package/react/components/system/System.js.map +1 -1
  613. package/react/components/system/System.stories.js +1 -0
  614. package/react/components/system/System.stories.js.map +1 -1
  615. package/react/components/system/SystemTrayComponentShell.d.ts +6 -0
  616. package/react/components/system/SystemTrayComponentShell.js +9 -0
  617. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  618. package/react/components/toolbar/AutoArrange.d.ts +5 -0
  619. package/react/components/toolbar/AutoArrange.js +8 -1
  620. package/react/components/toolbar/AutoArrange.js.map +1 -1
  621. package/react/components/toolbar/AutoArrange.spec.js +10 -4
  622. package/react/components/toolbar/AutoArrange.spec.js.map +1 -1
  623. package/react/components/toolbar/AutoArrange.stories.js +1 -0
  624. package/react/components/toolbar/AutoArrange.stories.js.map +1 -1
  625. package/react/components/toolbar/DragHandle.d.ts +4 -0
  626. package/react/components/toolbar/DragHandle.js +11 -0
  627. package/react/components/toolbar/DragHandle.js.map +1 -1
  628. package/react/components/toolbar/DragHandle.spec.js +1 -0
  629. package/react/components/toolbar/DragHandle.spec.js.map +1 -1
  630. package/react/components/toolbar/DragHandle.stories.js +1 -0
  631. package/react/components/toolbar/DragHandle.stories.js.map +1 -1
  632. package/react/components/toolbar/MinimizeAll.d.ts +4 -0
  633. package/react/components/toolbar/MinimizeAll.js +7 -1
  634. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  635. package/react/components/toolbar/MinimizeAll.spec.js +1 -0
  636. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  637. package/react/components/toolbar/MinimizeAll.stories.js +1 -0
  638. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  639. package/react/components/toolbar/NotificationControl.d.ts +5 -0
  640. package/react/components/toolbar/NotificationControl.js +8 -1
  641. package/react/components/toolbar/NotificationControl.js.map +1 -1
  642. package/react/components/toolbar/RevealAll.d.ts +4 -0
  643. package/react/components/toolbar/RevealAll.js +7 -1
  644. package/react/components/toolbar/RevealAll.js.map +1 -1
  645. package/react/components/toolbar/RevealAll.spec.js +1 -0
  646. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  647. package/react/components/toolbar/RevealAll.stories.js +1 -0
  648. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  649. package/react/components/toolbar/SddButton.d.ts +4 -0
  650. package/react/components/toolbar/SddButton.js +4 -0
  651. package/react/components/toolbar/SddButton.js.map +1 -1
  652. package/react/components/toolbar/ToolbarIcon.d.ts +4 -0
  653. package/react/components/toolbar/ToolbarIcon.js +6 -2
  654. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  655. package/react/components/toolbar/ToolbarSection.d.ts +8 -9
  656. package/react/components/toolbar/ToolbarSection.js +21 -7
  657. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  658. package/react/components/toolbar/ToolbarShell.d.ts +5 -0
  659. package/react/components/toolbar/ToolbarShell.js +7 -0
  660. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  661. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +16 -0
  662. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +20 -0
  663. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  664. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +52 -0
  665. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +58 -0
  666. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  667. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +5 -0
  668. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +5 -0
  669. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  670. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +27 -0
  671. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +49 -0
  672. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  673. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +13 -0
  674. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +21 -10
  675. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  676. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +5 -0
  677. package/react/components/toolbar/advancedAppLauncher/components/Content.js +19 -0
  678. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  679. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +4 -0
  680. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -0
  681. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  682. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +16 -0
  683. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +39 -0
  684. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  685. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +4 -0
  686. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +9 -0
  687. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  688. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +3 -0
  689. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  690. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +6 -0
  691. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +7 -0
  692. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  693. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.d.ts +5 -0
  694. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js +5 -0
  695. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  696. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -0
  697. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js +5 -0
  698. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  699. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +37 -0
  700. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +40 -0
  701. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  702. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +3 -0
  703. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +83 -1
  704. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  705. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +10 -0
  706. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +12 -3
  707. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  708. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +18 -0
  709. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +20 -0
  710. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  711. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +9 -0
  712. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +12 -0
  713. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  714. package/react/components/toolbar/appLauncher/appLauncher.css +1 -1
  715. package/react/components/toolbar/appLauncher/components/componentList.d.ts +3 -0
  716. package/react/components/toolbar/appLauncher/components/componentList.js +17 -3
  717. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  718. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +6 -0
  719. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +26 -0
  720. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  721. package/react/components/toolbar/dashbar/Dashbar.js +91 -15
  722. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  723. package/react/components/toolbar/dashbar/DashbarItem.js +5 -0
  724. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  725. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +8 -1
  726. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +7 -0
  727. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  728. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +17 -1
  729. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +21 -1
  730. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  731. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +26 -0
  732. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +29 -0
  733. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  734. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +6 -1
  735. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +6 -0
  736. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  737. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +78 -2
  738. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +191 -40
  739. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  740. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +8 -18
  741. package/react/components/userPreferences/NotificationsPreferencesContext.d.ts +4 -0
  742. package/react/components/userPreferences/NotificationsPreferencesContext.js +4 -0
  743. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  744. package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -0
  745. package/react/components/userPreferences/UserPreferences.d.ts +8 -0
  746. package/react/components/userPreferences/UserPreferences.js +8 -0
  747. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  748. package/react/components/userPreferences/UserPreferencesBase.js +4 -0
  749. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  750. package/react/components/userPreferences/components/ContentSection.d.ts +5 -0
  751. package/react/components/userPreferences/components/ContentSection.js +1 -1
  752. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  753. package/react/components/userPreferences/components/LeftNav.d.ts +4 -0
  754. package/react/components/userPreferences/components/content/DashbarEditor.js +3 -0
  755. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  756. package/react/components/userPreferences/components/content/Notifications.js +3 -0
  757. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  758. package/react/components/userPreferences/components/content/Workspaces.d.ts +14 -2
  759. package/react/components/userPreferences/components/content/Workspaces.js +78 -38
  760. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  761. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +7 -3
  762. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  763. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +3 -0
  764. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  765. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +3 -0
  766. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  767. package/react/components/userPreferences/components/general/ScheduledClose.js +26 -5
  768. package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
  769. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +1 -1
  770. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  771. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
  772. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +20 -10
  773. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  774. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +18 -1
  775. package/react/components/userPreferences/stores/UserPreferencesStore.js +35 -6
  776. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  777. package/react/components/userPreferences/tests/LeftNav.spec.js +15 -1
  778. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  779. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +1 -0
  780. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  781. package/react/components/userPreferences/tests/UserPreferencesBase.spec.d.ts +1 -0
  782. package/react/components/userPreferences/tests/UserPreferencesBase.spec.js +42 -0
  783. package/react/components/userPreferences/tests/UserPreferencesBase.spec.js.map +1 -0
  784. package/react/components/userPreferences/tests/Workspace.spec.d.ts +1 -0
  785. package/react/components/userPreferences/tests/Workspace.spec.js +139 -0
  786. package/react/components/userPreferences/tests/Workspace.spec.js.map +1 -0
  787. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +130 -2
  788. package/react/components/windowTitleBar/WindowTitleBarShell.js +386 -27
  789. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  790. package/react/components/windowTitleBar/components/center/Tab.d.ts +3 -0
  791. package/react/components/windowTitleBar/components/center/Tab.js +3 -0
  792. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  793. package/react/components/windowTitleBar/components/center/TabList.d.ts +90 -0
  794. package/react/components/windowTitleBar/components/center/TabList.js +170 -4
  795. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  796. package/react/components/windowTitleBar/components/left/LinkerButton.d.ts +9 -1
  797. package/react/components/windowTitleBar/components/left/LinkerButton.js +27 -5
  798. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  799. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +47 -0
  800. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +76 -1
  801. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  802. package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts +4 -0
  803. package/react/components/windowTitleBar/components/left/LinkerGroups.js +5 -0
  804. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  805. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +18 -0
  806. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +49 -0
  807. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  808. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +17 -0
  809. package/react/components/windowTitleBar/components/left/ShareButton.js +39 -0
  810. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  811. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +4 -0
  812. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  813. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +27 -0
  814. package/react/components/windowTitleBar/components/right/CloseButton.js +27 -0
  815. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  816. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +37 -0
  817. package/react/components/windowTitleBar/components/right/GroupingButton.js +40 -0
  818. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  819. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +46 -0
  820. package/react/components/windowTitleBar/components/right/MaximizeButton.js +54 -0
  821. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  822. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +26 -0
  823. package/react/components/windowTitleBar/components/right/MinimizeButton.js +26 -0
  824. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  825. package/react/components/windowTitleBar/components/windowTitle.d.ts +40 -0
  826. package/react/components/windowTitleBar/components/windowTitle.js +245 -48
  827. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  828. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +5 -0
  829. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +81 -6
  830. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  831. package/react/components/yesNoDialog/YesNoDialog.css +1 -1
  832. package/react/components/yesNoDialog/YesNoDialog.d.ts +3 -0
  833. package/react/components/yesNoDialog/YesNoDialog.js +64 -1
  834. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  835. package/react/components/yesNoDialog/YesNoDialog.spec.js +4 -0
  836. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  837. package/react/components/yesNoDialog/YesNoDialog.stories.js +2 -2
  838. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  839. package/react/components/yesNoDialog/timer.js +2 -0
  840. package/react/components/yesNoDialog/timer.js.map +1 -1
  841. package/react/enzymeSetup.js +10 -0
  842. package/react/enzymeSetup.js.map +1 -1
  843. package/react/hooks/useDashbar.js +10 -0
  844. package/react/hooks/useDashbar.js.map +1 -1
  845. package/react/hooks/useDeepEffect.d.ts +4 -0
  846. package/react/hooks/useDeepEffect.js +21 -0
  847. package/react/hooks/useDeepEffect.js.map +1 -1
  848. package/react/hooks/useFavorites.d.ts +15 -0
  849. package/react/hooks/useFavorites.js +3 -0
  850. package/react/hooks/useFavorites.js.map +1 -1
  851. package/react/hooks/useFavoritesShell.d.ts +4 -0
  852. package/react/hooks/useFavoritesShell.js +23 -0
  853. package/react/hooks/useFavoritesShell.js.map +1 -1
  854. package/react/hooks/useHotkey.d.ts +6 -0
  855. package/react/hooks/useHotkey.js +9 -0
  856. package/react/hooks/useHotkey.js.map +1 -1
  857. package/react/hooks/useLinker.js +14 -0
  858. package/react/hooks/useLinker.js.map +1 -1
  859. package/react/hooks/useMenu.d.ts +29 -0
  860. package/react/hooks/useMenu.js +12 -1
  861. package/react/hooks/useMenu.js.map +1 -1
  862. package/react/hooks/useNotifications.d.ts +44 -0
  863. package/react/hooks/useNotifications.js +104 -12
  864. package/react/hooks/useNotifications.js.map +1 -1
  865. package/react/hooks/useOutsideClickDetector.d.ts +3 -0
  866. package/react/hooks/useOutsideClickDetector.js +3 -0
  867. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  868. package/react/hooks/usePubSub.d.ts +17 -0
  869. package/react/hooks/usePubSub.js +18 -0
  870. package/react/hooks/usePubSub.js.map +1 -1
  871. package/react/hooks/useSearch.d.ts +5 -0
  872. package/react/hooks/useSearch.js +30 -0
  873. package/react/hooks/useSearch.js.map +1 -1
  874. package/react/hooks/useToolbar.d.ts +1 -1
  875. package/react/hooks/useToolbar.js +54 -2
  876. package/react/hooks/useToolbar.js.map +1 -1
  877. package/react/reducers/favoriteReducer.d.ts +3 -0
  878. package/react/reducers/linkerReducer.d.ts +3 -0
  879. package/react/reducers/linkerReducer.js +4 -0
  880. package/react/reducers/linkerReducer.js.map +1 -1
  881. package/react/reducers/menuReducer.d.ts +28 -0
  882. package/react/reducers/menuReducer.js +34 -0
  883. package/react/reducers/menuReducer.js.map +1 -1
  884. package/react/reducers/rootReducer.d.ts +2 -2
  885. package/react/reducers/rootReducer.js +3 -0
  886. package/react/reducers/rootReducer.js.map +1 -1
  887. package/react/reducers/searchReducer.d.ts +7 -0
  888. package/react/reducers/searchReducer.js +6 -0
  889. package/react/reducers/searchReducer.js.map +1 -1
  890. package/react/reducers/workspaceReducer.js +1 -0
  891. package/react/reducers/workspaceReducer.js.map +1 -1
  892. package/react/store.d.ts +8 -4
  893. package/react/store.js +11 -0
  894. package/react/store.js.map +1 -1
  895. package/react/tsconfig.tsbuildinfo +1 -0
  896. package/react/types/fdc3.d.ts +2 -0
  897. package/react/types/linkerTypes.d.ts +13 -0
  898. package/react/types/linkerTypes.js +1 -0
  899. package/react/types/linkerTypes.js.map +1 -1
  900. package/react/types/smartDesktopDesignerTypes.d.ts +8 -0
  901. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  902. package/react/types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AC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC;IAE7E,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACrE,UAAU,EAAE,CAAC;AACd,CAAC;AAMD,SAAS,SAAS,CAAC,GAAG;IACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAMD,SAAS,aAAa,CAAC,GAAG;IACzB,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE;QACpE,UAAU,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,MAAM,CAAC,GAAG;IAClB,aAAa,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED,eAAe;IACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,MAAM;CACN,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { getStore } from \"./appStore\";\nimport { findIndex } from \"lodash\";\n\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\n\nconst data = {};\nlet FDC3Client;\nlet appd;\n\nfunction initialize(done = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\n\t\tappd = new AppDirectory(FDC3Client);\n\n\t\tconst store = getStore();\n\t\tdata.apps = store.values.apps;\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\n\t\t\tdata.folders = folders;\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\n\t\t\tdata.activeFolder = active;\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\n\t\t\tdata.defaultFolder = folder;\n\t\t});\n\n\t\tdata.installed = store.values.appDefinitions;\n\t\tdata.tags = store.values.tags;\n\t\tdata.filteredApps = store.values.filteredApps;\n\t\tdata.activeTags = store.values.activeTags;\n\t\tdata.activeApp = store.values.activeApp;\n\t\tdata.searchText = store.values.searchText;\n\t\tdata.forceSearch = store.values.forceSearch;\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\n\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\n\t\tdone();\n\t});\n}\n\n/**\n * Clears all active tags\n */\nfunction _clearActiveTags() {\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\n}\n\n/**\n * Async function to fetch apps from the FDC3 api (appD)\n */\nasync function getApps() {\n\treturn await appd.getAll((err, retrievedApps) => {\n\t\tif (!err) {\n\t\t\tgetStore().setValue({\n\t\t\t\tfield: \"apps\",\n\t\t\t\tvalue: retrievedApps,\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Call to appD to get the list of all tags\n */\nasync function getTags() {\n\treturn await appd.getTags((err, retrievedTags) => {\n\t\tgetStore().setValue({\n\t\t\tfield: \"tags\",\n\t\t\tvalue: retrievedTags,\n\t\t});\n\t});\n}\n\n/**\n * Function to write errors to the log\n * @param {string} message The log message\n * @param {string} [protocol] Provide the logging protocol (default is error)\n */\nfunction writeToLog(message, protocol = \"error\") {\n\tFSBL.Clients.Logger[protocol](message);\n}\n\n/**\n * Function to \"install\" an app. Adds the id to a list of installed apps\n * @param {string} name The name of the app\n */\nasync function addApp(id, cb = Function.prototype) {\n\tconst { activeApp, installed, apps } = data;\n\tconst appID = id;\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\n\n\tif (!app) {\n\t\tFSBL.Clients.Logger.system.error(\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\n\t\t);\n\t\treturn cb();\n\t}\n\n\tconst name = app.title || app.name;\n\tconst folder = data.activeFolder;\n\n\tif (app === undefined) {\n\t\tconsole.warn(\"App not found.\");\n\t\treturn cb();\n\t}\n\n\tlet manifest;\n\tlet appConfig;\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\n\t// If both paths fail, notify the user that this app can't be added\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\n\t\ttry {\n\t\t\tmanifest = JSON.parse(app.manifest);\n\t\t} catch (e) {\n\t\t\ttry {\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\n\t\t\t\tmanifest = await urlRes.json();\n\t\t\t} catch (err) {\n\t\t\t\twriteToLog(\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\n\t\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t} finally {\n\t\t\tappConfig = installed[appID] = {\n\t\t\t\tappID,\n\t\t\t\ttags: app.tags,\n\t\t\t\tname: name.trim(),\n\t\t\t\ttype: \"component\",\n\t\t\t\tmanifest,\n\t\t\t\tcanDelete: true,\n\t\t\t\tsource: \"FDC3\",\n\t\t\t};\n\t\t}\n\t} else {\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\n\t\treturn cb();\n\t}\n\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\n\tconst { folders } = data;\n\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\n\n\tFSBL.Clients.LauncherClient.registerComponent(\n\t\t{\n\t\t\tcomponentType: appConfig.name,\n\t\t\tmanifest: appConfig.manifest,\n\t\t},\n\t\t() => {\n\t\t\tgetStore().setValues(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"activeApp\",\n\t\t\t\t\t\tvalue: activeApp,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\t\tvalue: installed,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\t\tvalue: folders,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\n * @param {string} name The name of the app\n */\nfunction removeApp(id, cb = Function.prototype) {\n\tlet { installed, folders } = data;\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\n\t\tif (err) {\n\t\t\tconsole.warn(\"Failed to deregister a component\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in data.folders) {\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\n\t\t\tif (appIndex > -1) {\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Delete the app from the list\n\t\tdelete installed[id];\n\n\t\tgetStore().setValues(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\tvalue: installed,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\tvalue: folders,\n\t\t\t\t},\n\t\t\t],\n\t\t\tcb\n\t\t);\n\t});\n}\n\n/**\n * Function to set the 'active app' for the catalog.\n * @param {string} id The app id to show as the actively showcasing app\n */\nfunction openApp(id) {\n\tlet { apps } = data;\n\n\tlet index = apps.findIndex((app) => app.appId === id);\n\n\tif (index > -1) {\n\t\tgetStore().setValue({\n\t\t\tfield: \"activeApp\",\n\t\t\tvalue: id,\n\t\t});\n\t}\n}\n\n/**\n * Clear the activeApp in store\n */\nfunction clearApp() {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t});\n}\n\n/**\n * Return activeApp from store\n *\n * @returns {string} activeApp\n */\nfunction getActiveApp() {\n\treturn data.activeApp;\n}\n\n/**\n * Set the activeApp param in store\n *\n * @param {*} app\n */\nfunction setActiveApp(app) {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: app,\n\t});\n}\n\n/**\n * Retrieves a list of installed apps by id\n */\nfunction getInstalledApps() {\n\treturn data.installed;\n}\n\n/**\n * Gets the list of filtered apps (when searching/filtering by tags)\n */\nfunction getFilteredApps() {\n\treturn data.filteredApps;\n}\n\n/**\n * Clears the list of filtered apps\n */\nfunction clearFilteredApps() {\n\tgetStore().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t});\n}\n\n/**\n * Set the value of the search text in store\n *\n * @param {set} val Search string\n */\nfunction setSearchValue(val) {\n\tgetStore().setValue({ field: \"searchText\", value: val });\n}\n\n/**\n * Get the current value of the text in the store\n *\n * @returns {string} Search string\n */\nfunction getSearchValue() {\n\treturn data.searchText;\n}\n\n/**\n * Clears the search text in store\n *\n */\nfunction clearSearchText() {\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\n}\n\n/**\n * Get forceSearch store value\n *\n * @returns {boolean} forceSearch\n */\nfunction getForceSearch() {\n\treturn data.forceSearch;\n}\n\n/**\n * Set the forceSearch value\n *\n * @param {string} val Boolean value for forceSearch\n */\nfunction setForceSearch(val) {\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\n}\n\n/**\n * Gets the list of active tags (these are tags that are actively filtering the content list)\n */\nfunction getActiveTags() {\n\treturn data.activeTags; // type: string[]\n}\n\n/**\n * Removes all tags from the active tags list\n */\nfunction clearTags() {\n\t_clearActiveTags();\n}\n\n/**\n * Return to the App Catalog home page\n */\nfunction goHome() {\n\tsetForceSearch(false);\n\tclearFilteredApps();\n\tclearApp();\n\tclearTags();\n\tclearSearchText();\n}\n\n/**\n * Send the search text and tags to the appd server and get a list of apps\n */\nfunction filterApps() {\n\tlet { activeTags, searchText } = data;\n\n\tif (activeTags.length === 0 && searchText === \"\") {\n\t\tgoHome();\n\t} else {\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\n\t\t});\n\t}\n}\n\n/**\n * Refreshes the active tags search\n */\nfunction refreshTagSearch() {\n\tfilterApps();\n}\n\n/**\n * Calls appD to search the directory of apps based on search text and tag names\n * @param {string} terms The search terms provided by the user\n */\nfunction searchApps(terms, cb = Function.prototype) {\n\tdata.searchText = terms;\n\tsetForceSearch(true);\n\tgetStore().setValue(\n\t\t{\n\t\t\tfield: \"searchText\",\n\t\t\tvalue: terms,\n\t\t},\n\t\t() => {\n\t\t\tfilterApps();\n\t\t\tcb();\n\t\t}\n\t);\n}\n\n/**\n * Private function to remove an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _removeActiveTag(tag) {\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\n\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\n\tfilterApps();\n}\n\n/**\n * Removes an 'active tag' from the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction removeTag(tag) {\n\t_removeActiveTag(tag);\n}\n\n/**\n * Private function to add an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _addActiveTag(tag) {\n\tlet { activeTags } = data;\n\tif (!activeTags.includes(tag)) {\n\t\tactiveTags.push(tag);\n\t}\n\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\n\t\tfilterApps();\n\t});\n}\n\n/**\n * Adds an 'active tag' to the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction addTag(tag) {\n\t_addActiveTag(tag);\n}\n\nexport default {\n\tinitialize,\n\tgetApps,\n\tgetFilteredApps,\n\tclearFilteredApps,\n\tsearchApps,\n\tgetActiveTags,\n\tgetTags,\n\taddTag,\n\tremoveTag,\n\trefreshTagSearch,\n\tclearTags,\n\tclearSearchText,\n\taddApp,\n\tremoveApp,\n\topenApp,\n\tclearApp,\n\tgetInstalledApps,\n\tgetActiveApp,\n\tsetActiveApp,\n\tfilterApps,\n\tsetSearchValue,\n\tsetForceSearch,\n\tgetSearchValue,\n\tgetForceSearch,\n\tgoHome,\n};\n"]}
1
+ {"version":3,"file":"storeActions.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/storeActions.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAClE,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAEnE,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,IAAI,UAAU,CAAC;AACf,IAAI,IAAI,CAAC;AAET,SAAS,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS;IAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,gCAAgC,EAAE,EAAE,CAAC,GAAG,EAAE,oBAAoB,EAAE,EAAE;QAC7G,UAAU,GAAG,IAAI,IAAI,CAAC,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,CAAC;QACrD,IAAI,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;QAEpC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YACjE,IAAI,CAA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ACd,UAAU;IACV,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,MAAM;CACN,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport AppDirectory from \"../modules/AppDirectory\";\nimport FDC3 from \"../modules/FDC3\";\nimport { getStore } from \"./appStore\";\nimport { findIndex } from \"lodash\";\n\nexport const findAppIndexInFolder = (appID, folderName, folders) =>\n\tfindIndex(folders[folderName].apps, (app) => app.appID === appID);\n\nconst data = {};\nlet FDC3Client;\nlet appd;\n\nfunction initialize(done = Function.prototype) {\n\tFSBL.Clients.ConfigClient.getValue({ field: \"finsemble.appDirectoryEndpoint\" }, (err, appDirectoryEndpoint) => {\n\t\tFDC3Client = new FDC3({ url: appDirectoryEndpoint });\n\t\tappd = new AppDirectory(FDC3Client);\n\n\t\tconst store = getStore();\n\t\tdata.apps = store.values.apps;\n\t\tstore.getValue({ field: \"appFolders.folders\" }, (_err, folders) => {\n\t\t\tdata.folders = folders;\n\t\t\tstore.addListener({ field: \"appFolders.folders\" }, (__err, dt) => (data.folders = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"activeFolder\" }, (_err, active) => {\n\t\t\tdata.activeFolder = active;\n\t\t\tstore.addListener({ field: \"activeFolder\" }, (__err, dt) => (data.activeFolder = dt.value));\n\t\t});\n\t\tstore.getValue({ field: \"defaultFolder\" }, (_err, folder) => {\n\t\t\tdata.defaultFolder = folder;\n\t\t});\n\n\t\tdata.installed = store.values.appDefinitions;\n\t\tdata.tags = store.values.tags;\n\t\tdata.filteredApps = store.values.filteredApps;\n\t\tdata.activeTags = store.values.activeTags;\n\t\tdata.activeApp = store.values.activeApp;\n\t\tdata.searchText = store.values.searchText;\n\t\tdata.forceSearch = store.values.forceSearch;\n\t\tdata.ADVANCED_APP_LAUNCHER = store.values.defaultFolder;\n\n\t\tstore.addListener({ field: \"apps\" }, (_err, dt) => (data.apps = dt.value));\n\t\tstore.addListener({ field: \"appDefinitions\" }, (_err, dt) => (data.installed = dt.value));\n\t\tstore.addListener({ field: \"tags\" }, (_err, dt) => (data.tags = dt.value));\n\t\tstore.addListener({ field: \"activeApp\" }, (_err, dt) => (data.activeApp = dt.value));\n\t\tstore.addListener({ field: \"activeTags\" }, (_err, dt) => (data.activeTags = dt.value));\n\t\tstore.addListener({ field: \"filteredApps\" }, (_err, dt) => (data.filteredApps = dt.value));\n\t\tstore.addListener({ field: \"searchText\" }, (_err, dt) => (data.searchText = dt.value));\n\t\tstore.addListener({ field: \"forceSearch\" }, (_err, dt) => (data.forceSearch = dt.value));\n\t\tdone();\n\t});\n}\n\n/**\n * Clears all active tags\n */\nfunction _clearActiveTags() {\n\tgetStore().setValue({ field: \"activeTags\", value: [] });\n}\n\n/**\n * Async function to fetch apps from the FDC3 api (appD)\n */\nasync function getApps() {\n\treturn await appd.getAll((err, retrievedApps) => {\n\t\tif (!err) {\n\t\t\tgetStore().setValue({\n\t\t\t\tfield: \"apps\",\n\t\t\t\tvalue: retrievedApps,\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Call to appD to get the list of all tags\n */\nasync function getTags() {\n\treturn await appd.getTags((err, retrievedTags) => {\n\t\tgetStore().setValue({\n\t\t\tfield: \"tags\",\n\t\t\tvalue: retrievedTags,\n\t\t});\n\t});\n}\n\n/**\n * Function to write errors to the log\n * @param {string} message The log message\n * @param {string} [protocol] Provide the logging protocol (default is error)\n */\nfunction writeToLog(message, protocol = \"error\") {\n\tFSBL.Clients.Logger[protocol](message);\n}\n\n/**\n * Function to \"install\" an app. Adds the id to a list of installed apps\n * @param {string} name The name of the app\n */\nasync function addApp(id, cb = Function.prototype) {\n\tconst { activeApp, installed, apps } = data;\n\tconst appID = id;\n\tconst app = apps.find((checkedApp) => checkedApp.appId === appID);\n\n\tif (!app) {\n\t\tFSBL.Clients.Logger.system.error(\n\t\t\t`Attempted to install app with id: ${id}, but could not find it in the local store.`\n\t\t);\n\t\treturn cb();\n\t}\n\n\tconst name = app.title || app.name;\n\tconst folder = data.activeFolder;\n\n\tif (app === undefined) {\n\t\tconsole.warn(\"App not found.\");\n\t\treturn cb();\n\t}\n\n\tlet manifest;\n\tlet appConfig;\n\t// Manifest from FDC3 is a string property which can either be a stringified JSON, or a uri which delivers valid JSON.\n\t// The catalog will attempt to parse the string as JSON, then fetch from a URL if that fails.\n\t// If both paths fail, notify the user that this app can't be added\n\tif (app.manifestType.toLowerCase() === \"finsemble\") {\n\t\ttry {\n\t\t\tmanifest = JSON.parse(app.manifest);\n\t\t} catch (e) {\n\t\t\ttry {\n\t\t\t\tconst urlRes = await fetch(app.manifest, { method: \"GET\" });\n\t\t\t\tmanifest = await urlRes.json();\n\t\t\t} catch (err) {\n\t\t\t\twriteToLog(\n\t\t\t\t\t`${name} is missing a valid manifest or URI that delivers a valid JSON manifest. Unable to add app.`,\n\t\t\t\t\t\"error\"\n\t\t\t\t);\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t} finally {\n\t\t\tappConfig = installed[appID] = {\n\t\t\t\tappID,\n\t\t\t\ttags: app.tags,\n\t\t\t\tname: name.trim(),\n\t\t\t\ttype: \"component\",\n\t\t\t\tmanifest,\n\t\t\t\tcanDelete: true,\n\t\t\t\tsource: \"FDC3\",\n\t\t\t};\n\t\t}\n\t} else {\n\t\twriteToLog(`${name} does not appear to be a Finsemble manifest. This app cannot be added to Finsemble.`, \"error\");\n\t\treturn cb();\n\t}\n\n\tconst ADVANCED_APP_LAUNCHER = data.defaultFolder;\n\tconst { folders } = data;\n\n\tfolders[ADVANCED_APP_LAUNCHER].apps.push(appConfig);\n\tif (folder !== ADVANCED_APP_LAUNCHER) folders[folder].apps.push(appConfig);\n\n\tFSBL.Clients.LauncherClient.registerComponent(\n\t\t{\n\t\t\tcomponentType: appConfig.name,\n\t\t\tmanifest: appConfig.manifest,\n\t\t},\n\t\t() => {\n\t\t\tgetStore().setValues(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"activeApp\",\n\t\t\t\t\t\tvalue: activeApp,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\t\tvalue: installed,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\t\tvalue: folders,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t);\n}\n\n/**\n * Function to \"uninstall\" an app. Removes the id from a list of installed apps\n * @param {string} name The name of the app\n */\nfunction removeApp(id, cb = Function.prototype) {\n\tlet { installed, folders } = data;\n\tFSBL.Clients.LauncherClient.unRegisterComponent({ componentType: installed[id].name }, (err) => {\n\t\tif (err) {\n\t\t\tconsole.warn(\"Failed to deregister a component\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in data.folders) {\n\t\t\tconst appIndex = findAppIndexInFolder(id, key, data.folders);\n\t\t\tif (appIndex > -1) {\n\t\t\t\tfolders[key].apps.splice(appIndex, 1);\n\t\t\t}\n\t\t}\n\n\t\t// Delete the app from the list\n\t\tdelete installed[id];\n\n\t\tgetStore().setValues(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfield: \"appDefinitions\",\n\t\t\t\t\tvalue: installed,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tfield: \"appFolders.folders\",\n\t\t\t\t\tvalue: folders,\n\t\t\t\t},\n\t\t\t],\n\t\t\tcb\n\t\t);\n\t});\n}\n\n/**\n * Function to set the 'active app' for the catalog.\n * @param {string} id The app id to show as the actively showcasing app\n */\nfunction openApp(id) {\n\tlet { apps } = data;\n\n\tlet index = apps.findIndex((app) => app.appId === id);\n\n\tif (index > -1) {\n\t\tgetStore().setValue({\n\t\t\tfield: \"activeApp\",\n\t\t\tvalue: id,\n\t\t});\n\t}\n}\n\n/**\n * Clear the activeApp in store\n */\nfunction clearApp() {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t});\n}\n\n/**\n * Return activeApp from store\n *\n * @returns {string} activeApp\n */\nfunction getActiveApp() {\n\treturn data.activeApp;\n}\n\n/**\n * Set the activeApp param in store\n *\n * @param {*} app\n */\nfunction setActiveApp(app) {\n\tgetStore().setValue({\n\t\tfield: \"activeApp\",\n\t\tvalue: app,\n\t});\n}\n\n/**\n * Retrieves a list of installed apps by id\n */\nfunction getInstalledApps() {\n\treturn data.installed;\n}\n\n/**\n * Gets the list of filtered apps (when searching/filtering by tags)\n */\nfunction getFilteredApps() {\n\treturn data.filteredApps;\n}\n\n/**\n * Clears the list of filtered apps\n */\nfunction clearFilteredApps() {\n\tgetStore().setValue({\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t});\n}\n\n/**\n * Set the value of the search text in store\n *\n * @param {set} val Search string\n */\nfunction setSearchValue(val) {\n\tgetStore().setValue({ field: \"searchText\", value: val });\n}\n\n/**\n * Get the current value of the text in the store\n *\n * @returns {string} Search string\n */\nfunction getSearchValue() {\n\treturn data.searchText;\n}\n\n/**\n * Clears the search text in store\n *\n */\nfunction clearSearchText() {\n\tgetStore().setValue({ field: \"searchText\", value: \"\" });\n}\n\n/**\n * Get forceSearch store value\n *\n * @returns {boolean} forceSearch\n */\nfunction getForceSearch() {\n\treturn data.forceSearch;\n}\n\n/**\n * Set the forceSearch value\n *\n * @param {string} val Boolean value for forceSearch\n */\nfunction setForceSearch(val) {\n\tgetStore().setValue({ field: \"forceSearch\", value: val });\n}\n\n/**\n * Gets the list of active tags (these are tags that are actively filtering the content list)\n */\nfunction getActiveTags() {\n\treturn data.activeTags; // type: string[]\n}\n\n/**\n * Removes all tags from the active tags list\n */\nfunction clearTags() {\n\t_clearActiveTags();\n}\n\n/**\n * Return to the App Catalog home page\n */\nfunction goHome() {\n\tsetForceSearch(false);\n\tclearFilteredApps();\n\tclearApp();\n\tclearTags();\n\tclearSearchText();\n}\n\n/**\n * Send the search text and tags to the appd server and get a list of apps\n */\nfunction filterApps() {\n\tlet { activeTags, searchText } = data;\n\n\tif (activeTags.length === 0 && searchText === \"\") {\n\t\tgoHome();\n\t} else {\n\t\tappd.search({ text: searchText, tags: activeTags }, (err, retrievedData) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Logger.system.error(`FDC3 App search failed!: ${err}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgetStore().setValue({ field: \"activeApp\", value: null });\n\t\t\tgetStore().setValue({ field: \"activeTags\", value: activeTags });\n\t\t\tgetStore().setValue({ field: \"filteredApps\", value: retrievedData });\n\t\t});\n\t}\n}\n\n/**\n * Refreshes the active tags search\n */\nfunction refreshTagSearch() {\n\tfilterApps();\n}\n\n/**\n * Calls appD to search the directory of apps based on search text and tag names\n * @param {string} terms The search terms provided by the user\n */\nfunction searchApps(terms, cb = Function.prototype) {\n\tdata.searchText = terms;\n\tsetForceSearch(true);\n\tgetStore().setValue(\n\t\t{\n\t\t\tfield: \"searchText\",\n\t\t\tvalue: terms,\n\t\t},\n\t\t() => {\n\t\t\tfilterApps();\n\t\t\tcb();\n\t\t}\n\t);\n}\n\n/**\n * Private function to remove an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _removeActiveTag(tag) {\n\tdata.activeTags = data.activeTags.filter((currentTag) => currentTag !== tag);\n\n\tgetStore().setValue({ field: \"activeTags\", value: data.activeTags });\n\tfilterApps();\n}\n\n/**\n * Removes an 'active tag' from the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction removeTag(tag) {\n\t_removeActiveTag(tag);\n}\n\n/**\n * Private function to add an active tag. This will filter apps based on tags\n * @param {string} tag The name of the tag\n */\nfunction _addActiveTag(tag) {\n\tlet { activeTags } = data;\n\tif (!activeTags.includes(tag)) {\n\t\tactiveTags.push(tag);\n\t}\n\n\tgetStore().setValue({ field: \"activeTags\", value: activeTags }, () => {\n\t\tfilterApps();\n\t});\n}\n\n/**\n * Adds an 'active tag' to the list of filtered tags\n * @param {string} tag The tag name\n */\nfunction addTag(tag) {\n\t_addActiveTag(tag);\n}\n\nexport default {\n\tinitialize,\n\tgetApps,\n\tgetFilteredApps,\n\tclearFilteredApps,\n\tsearchApps,\n\tgetActiveTags,\n\tgetTags,\n\taddTag,\n\tremoveTag,\n\trefreshTagSearch,\n\tclearTags,\n\tclearSearchText,\n\taddApp,\n\tremoveApp,\n\topenApp,\n\tclearApp,\n\tgetInstalledApps,\n\tgetActiveApp,\n\tsetActiveApp,\n\tfilterApps,\n\tsetSearchValue,\n\tsetForceSearch,\n\tgetSearchValue,\n\tgetForceSearch,\n\tgoHome,\n};\n"]}
@@ -5,7 +5,7 @@ import { FinsembleIcon } from "./FinsembleIcon";
5
5
  export const ButtonIcon = ({ icon, text = "", disabled = false, tabIndex = 0, onClick = () => { }, className = "", buttonAttributes = {}, }) => {
6
6
  const containerClassName = fashion_class_lookup.icon;
7
7
  return (React.createElement("div", { className: `${containerClassName} ${className}` },
8
- React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, title: text, tabIndex: tabIndex }),
8
+ React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, title: text, "aria-label": text, tabIndex: tabIndex }),
9
9
  React.createElement(FinsembleIcon, { icon: icon }))));
10
10
  };
11
11
  //# sourceMappingURL=ButtonIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDAAY,gBAAgB,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;YAClG,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\nimport \"./css/button.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport const ButtonIcon: React.FC<AdvancedButtonProps> = ({\n\ticon,\n\ttext = \"\",\n\tdisabled = false,\n\ttabIndex = 0,\n\tonClick = () => {},\n\tclassName = \"\",\n\tbuttonAttributes = {},\n}) => {\n\tconst containerClassName = fashion_class_lookup.icon;\n\n\treturn (\n\t\t<div className={`${containerClassName} ${className}`}>\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} title={text} tabIndex={tabIndex}>\n\t\t\t\t<FinsembleIcon icon={icon}></FinsembleIcon>\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDACK,gBAAgB,IACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,IAAI,gBACC,IAAI,EAChB,QAAQ,EAAE,QAAQ;YAElB,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\nimport \"./css/button.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport const ButtonIcon: React.FC<AdvancedButtonProps> = ({\n\ticon,\n\ttext = \"\",\n\tdisabled = false,\n\ttabIndex = 0,\n\tonClick = () => {},\n\tclassName = \"\",\n\tbuttonAttributes = {},\n}) => {\n\tconst containerClassName = fashion_class_lookup.icon;\n\n\treturn (\n\t\t<div className={`${containerClassName} ${className}`}>\n\t\t\t<button\n\t\t\t\t{...buttonAttributes}\n\t\t\t\tonClick={onClick}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={text}\n\t\t\t\taria-label={text}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t>\n\t\t\t\t<FinsembleIcon icon={icon}></FinsembleIcon>\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
@@ -20,12 +20,12 @@ const ButtonRow = ({ label, onClick, iconClass, disabled, img, showDefaultIcon,
20
20
  func();
21
21
  }
22
22
  } },
23
- img && (React.createElement("img", { src: img, style: showDefaultIcon || imgError ? { display: "none" } : { width: "auto", height: "20px" }, onError: () => {
23
+ img && (React.createElement("img", { src: img, alt: "", style: showDefaultIcon || imgError ? { display: "none" } : { width: "auto", height: "20px" }, onError: () => {
24
24
  setImgError(true);
25
25
  } })),
26
26
  (showDefaultIcon || imgError) && React.createElement("i", { className: "ff-finsemble default-img" }),
27
27
  React.createElement("span", { className: "row__lbl" }, label),
28
- React.createElement("i", { className: iconClass })));
28
+ React.createElement("i", { className: iconClass, "aria-hidden": true })));
29
29
  };
30
30
  ButtonRow.defaultProps = defaultProps;
31
31
  export default ButtonRow;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,YAAY,GAAmB;IACpC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,SAAS,GAA6B,CAAC,EAC5C,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,eAAe,EACf,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACN,6BACC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,EACpD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACd,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC;QAEA,GAAG,IAAI,CACP,6BACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5F,OAAO,EAAE,GAAG,EAAE;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,GACA,CACF;QACA,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,2BAAG,SAAS,EAAC,0BAA0B,GAAG;QAC5E,8BAAM,SAAS,EAAC,UAAU,IAAE,KAAK,CAAQ;QACzC,2BAAG,SAAS,EAAE,SAAS,GAAI,CACtB,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport interface ButtonRowProps {\n\tlabel?: string;\n\tonClick: Function;\n\ticonClass?: string;\n\tdisabled?: boolean;\n\timg?: string;\n\tshowDefaultIcon?: boolean;\n\tclassName?: string;\n\trole?: string;\n\ttabIndex?: number;\n\tonKeyDown?: Function;\n}\n\nconst defaultProps: ButtonRowProps = {\n\tlabel: \"\",\n\tonClick: () => {},\n\ticonClass: \"\",\n\tdisabled: false,\n\tshowDefaultIcon: false,\n\tclassName: \"row-btn\",\n};\n\nconst ButtonRow: React.FC<ButtonRowProps> = ({\n\tlabel,\n\tonClick,\n\ticonClass,\n\tdisabled,\n\timg,\n\tshowDefaultIcon,\n\tclassName,\n}) => {\n\tconst [imgError, setImgError] = useState(false);\n\treturn (\n\t\t<div\n\t\t\tclassName={disabled ? \"row-btn-disabled\" : className}\n\t\t\trole=\"button\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tif (!disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{img && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={img}\n\t\t\t\t\tstyle={showDefaultIcon || imgError ? { display: \"none\" } : { width: \"auto\", height: \"20px\" }}\n\t\t\t\t\tonError={() => {\n\t\t\t\t\t\tsetImgError(true);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{(showDefaultIcon || imgError) && <i className=\"ff-finsemble default-img\" />}\n\t\t\t<span className=\"row__lbl\">{label}</span>\n\t\t\t<i className={iconClass} />\n\t\t</div>\n\t);\n};\n\nButtonRow.defaultProps = defaultProps;\nexport default ButtonRow;\n"]}
1
+ {"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,YAAY,GAAmB;IACpC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,SAA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C,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport interface ButtonRowProps {\n\tlabel?: string;\n\tonClick: Function;\n\ticonClass?: string;\n\tdisabled?: boolean;\n\timg?: string;\n\tshowDefaultIcon?: boolean;\n\tclassName?: string;\n\trole?: string;\n\ttabIndex?: number;\n\tonKeyDown?: Function;\n}\n\nconst defaultProps: ButtonRowProps = {\n\tlabel: \"\",\n\tonClick: () => {},\n\ticonClass: \"\",\n\tdisabled: false,\n\tshowDefaultIcon: false,\n\tclassName: \"row-btn\",\n};\n\nconst ButtonRow: React.FC<ButtonRowProps> = ({\n\tlabel,\n\tonClick,\n\ticonClass,\n\tdisabled,\n\timg,\n\tshowDefaultIcon,\n\tclassName,\n}) => {\n\tconst [imgError, setImgError] = useState(false);\n\treturn (\n\t\t<div\n\t\t\tclassName={disabled ? \"row-btn-disabled\" : className}\n\t\t\trole=\"button\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tif (!disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{img && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={img}\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tstyle={showDefaultIcon || imgError ? { display: \"none\" } : { width: \"auto\", height: \"20px\" }}\n\t\t\t\t\tonError={() => {\n\t\t\t\t\t\tsetImgError(true);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{(showDefaultIcon || imgError) && <i className=\"ff-finsemble default-img\" />}\n\t\t\t<span className=\"row__lbl\">{label}</span>\n\t\t\t<i className={iconClass} aria-hidden={true} />\n\t\t</div>\n\t);\n};\n\nButtonRow.defaultProps = defaultProps;\nexport default ButtonRow;\n"]}
@@ -4,6 +4,7 @@ export interface CheckboxProps {
4
4
  checked?: boolean;
5
5
  disabled?: boolean;
6
6
  label?: string;
7
+ showLabel?: boolean;
7
8
  onClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;
8
9
  }
9
10
  export declare const Checkbox: React.FC<CheckboxProps>;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { FinsembleIcon } from "./FinsembleIcon";
3
3
  import "./css/checkbox.css";
4
- export const Checkbox = ({ checked = false, disabled = false, label = "", onClick = () => { }, }) => {
4
+ export const Checkbox = ({ checked = false, disabled = false, label = "", showLabel = true, onClick = () => { }, }) => {
5
5
  let checkboxClasses = "complex-menu-checkbox";
6
6
  if (checked) {
7
7
  checkboxClasses = `${checkboxClasses} checked`;
@@ -10,7 +10,7 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
10
10
  if (disabled) {
11
11
  style = {
12
12
  cursor: "default",
13
- opacity: ".55",
13
+ opacity: ".3",
14
14
  };
15
15
  }
16
16
  return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-checked": checked, "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
@@ -19,6 +19,6 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
19
19
  }
20
20
  } },
21
21
  React.createElement("div", { className: checkboxClasses }, checked && React.createElement(FinsembleIcon, { icon: "check" })),
22
- React.createElement("div", { className: "complex-menu-checkbox-label" }, label)));
22
+ showLabel && React.createElement("div", { className: "complex-menu-checkbox-label" }, label)));
23
23
  };
24
24
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"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nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".55\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-checked={checked}\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAU5B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,IAAI,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACJ,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,OAAO,EAAE;QACZ,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAC/C;IACD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,QAAQ,EAAE;QACb,KAAK,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,IAAI;SACb,CAAC;KACF;IACD,OAAO,CACN,6BACC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,UAAU,kBACD,OAAO,gBACT,KAAK,EACjB,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EACtC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACvC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;aACxB;QACF,CAAC;QAED,6BAAK,SAAS,EAAE,eAAe,IAAG,OAAO,IAAI,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QACjF,SAAS,IAAI,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACnE,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tshowLabel?: boolean;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tshowLabel = true,\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".3\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-checked={checked}\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t{showLabel && <div className=\"complex-menu-checkbox-label\">{label}</div>}\n\t\t</div>\n\t);\n};\n"]}
@@ -12,4 +12,9 @@ export interface ColorPickerProps {
12
12
  updateColor: (newColor: string) => void;
13
13
  id?: string;
14
14
  }
15
+ /**
16
+ * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.
17
+ *
18
+ * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }
19
+ */
15
20
  export declare const ColorPicker: ({ id, startColor, updateColor }: ColorPickerProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from "react";
1
+ import React, { useState } from "react";
2
2
  import "./css/color-picker.css";
3
3
  const RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;
4
4
  export var RGBA_CHANNEL;
@@ -8,7 +8,14 @@ export var RGBA_CHANNEL;
8
8
  RGBA_CHANNEL[RGBA_CHANNEL["BLUE"] = 2] = "BLUE";
9
9
  RGBA_CHANNEL[RGBA_CHANNEL["ALPHA"] = 3] = "ALPHA";
10
10
  })(RGBA_CHANNEL || (RGBA_CHANNEL = {}));
11
+ // From https://stackoverflow.com/a/24390910
11
12
  export function colorToRGBA(color) {
13
+ // Returns the color as an array of [r, g, b, a] -- all range from 0 - 255
14
+ // color must be a valid canvas fillStyle. This will cover most anything
15
+ // you'd want to use.
16
+ // Examples:
17
+ // colorToRGBA('red') # [255, 0, 0, 255]
18
+ // colorToRGBA('#f00') # [255, 0, 0, 255]
12
19
  const cvs = document.createElement("canvas");
13
20
  cvs.height = 1;
14
21
  cvs.width = 1;
@@ -18,9 +25,15 @@ export function colorToRGBA(color) {
18
25
  return ctx.getImageData(0, 0, 1, 1).data;
19
26
  }
20
27
  function byteToHex(num) {
28
+ // Turns a number (0-255) into a 2-character hex number (00-ff)
21
29
  return `0${num.toString(16)}`.slice(-2);
22
30
  }
23
31
  function colorToHex(color) {
32
+ // Convert any CSS color to a hex representation
33
+ // Examples:
34
+ // colorToHex('red') # '#ff0000'
35
+ // colorToHex('rgb(255, 0, 0)') # '#ff0000'
36
+ // colorToHex('#ff0000') # '#ff0000'
24
37
  if (color.match(RE_HEX_COLOR) !== null) {
25
38
  return color;
26
39
  }
@@ -28,24 +41,52 @@ function colorToHex(color) {
28
41
  const hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join("");
29
42
  return `#${hex}`;
30
43
  }
44
+ /**
45
+ * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.
46
+ *
47
+ * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }
48
+ */
31
49
  export const ColorPicker = ({ id, startColor, updateColor }) => {
32
- const [color, setColor] = useState(colorToHex(startColor));
33
- const isValid = color.match(RE_HEX_COLOR) !== null;
34
- useEffect(() => {
35
- if (isValid) {
36
- updateColor(color);
37
- }
38
- }, [color]);
39
- useEffect(() => {
40
- if (startColor) {
41
- setColor(startColor);
42
- }
43
- }, [startColor]);
50
+ /**
51
+ * There is a delicate ballet here between the color picket and the input box. This is because this color picker
52
+ * has state (when the end user is in the midst of picking a color by editing the input field) and also
53
+ * receives state (via props). When prop startColor is received, it overrides the input box. But when the user is editing,
54
+ * the input box overrides the prop.
55
+ */
56
+ const [priorColor, setPriorColor] = useState(startColor);
57
+ /**
58
+ * inputValue state is set _whenever the user is editing the input box_. Only at this time, the value in the input
59
+ * box reflects the user's editing. If at any point the editing yields a valid color then it is immediately
60
+ * passed up as an action, which updates the screen and resets the startColor prop. Whenever an invalid color has
61
+ * been entered, the value is flagged invalid which causes the input box to be underlined red.
62
+ */
63
+ const [inputValue, setInputValue] = useState(null);
64
+ /**
65
+ * If the value of the startColor prop changes then we reset the input to the new color. This occurs for instance
66
+ * when the user presses the light or dark themes on the theme page. At that point, the parent sends new values
67
+ * down to all color pickers as a new prop.
68
+ */
69
+ if (priorColor !== startColor) {
70
+ setPriorColor(startColor);
71
+ setInputValue(null);
72
+ }
73
+ // If the value in the input box isn't valid then give UI feedback
74
+ const isValid = inputValue === null || inputValue.match(RE_HEX_COLOR) !== null;
75
+ // The swatch always displays the current color from prop. This won't change
76
+ // until a valid alternative color is picked.
77
+ const color = colorToHex(startColor);
44
78
  const onColorChanged = ({ target }) => {
45
- setColor(target.value);
79
+ const maybeNewColor = target.value;
80
+ // Update the value in the input box
81
+ setInputValue(maybeNewColor);
82
+ // If the color is valid then send an update
83
+ const isNewValueValid = maybeNewColor.match(RE_HEX_COLOR) !== null;
84
+ if (isNewValueValid) {
85
+ updateColor(maybeNewColor);
86
+ }
46
87
  };
47
88
  return (React.createElement("div", { className: "color-picker" },
48
89
  React.createElement("input", { className: "theme-color-picker", type: "color", value: color, onChange: onColorChanged, "aria-hidden": "true" }),
49
- React.createElement("input", Object.assign({ className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: color, onChange: onColorChanged }, { id }))));
90
+ React.createElement("input", Object.assign({ className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: inputValue !== null && inputValue !== void 0 ? inputValue : color, onChange: onColorChanged }, { id }))));
50
91
  };
51
92
  //# sourceMappingURL=ColorPicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.js","s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C,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport \"./css/color-picker.css\";\n\nconst RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;\n\nexport enum RGBA_CHANNEL {\n\tRED = 0,\n\tGREEN = 1,\n\tBLUE = 2,\n\tALPHA = 3,\n}\n\n// From https://stackoverflow.com/a/24390910\nexport function colorToRGBA(color: string) {\n\t// Returns the color as an array of [r, g, b, a] -- all range from 0 - 255\n\t// color must be a valid canvas fillStyle. This will cover most anything\n\t// you'd want to use.\n\t// Examples:\n\t// colorToRGBA('red') # [255, 0, 0, 255]\n\t// colorToRGBA('#f00') # [255, 0, 0, 255]\n\tconst cvs = document.createElement(\"canvas\");\n\tcvs.height = 1;\n\tcvs.width = 1;\n\n\tconst ctx = cvs.getContext(\"2d\")!;\n\tctx.fillStyle = color;\n\tctx.fillRect(0, 0, 1, 1);\n\treturn ctx.getImageData(0, 0, 1, 1).data;\n}\n\nfunction byteToHex(num: number) {\n\t// Turns a number (0-255) into a 2-character hex number (00-ff)\n\treturn `0${num.toString(16)}`.slice(-2);\n}\n\nfunction colorToHex(color: string) {\n\t// Convert any CSS color to a hex representation\n\t// Examples:\n\t// colorToHex('red') # '#ff0000'\n\t// colorToHex('rgb(255, 0, 0)') # '#ff0000'\n\t// colorToHex('#ff0000') # '#ff0000'\n\tif (color.match(RE_HEX_COLOR) !== null) {\n\t\treturn color;\n\t}\n\tconst rgba = colorToRGBA(color);\n\tconst hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join(\"\");\n\treturn `#${hex}`;\n}\n\nexport interface ColorPickerProps {\n\tstartColor: string;\n\tupdateColor: (newColor: string) => void;\n\tid?: string;\n}\n\n/**\n * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.\n *\n * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }\n */\nexport const ColorPicker = ({ id, startColor, updateColor }: ColorPickerProps) => {\n\tconst [color, setColor] = useState(colorToHex(startColor));\n\tconst isValid = color.match(RE_HEX_COLOR) !== null;\n\n\tuseEffect(() => {\n\t\tif (isValid) {\n\t\t\tupdateColor(color);\n\t\t}\n\t}, [color]);\n\n\tuseEffect(() => {\n\t\tif (startColor) {\n\t\t\tsetColor(startColor);\n\t\t}\n\t}, [startColor]);\n\n\tconst onColorChanged = ({ target }: { target: HTMLInputElement }) => {\n\t\tsetColor(target.value);\n\t};\n\n\treturn (\n\t\t<div className=\"color-picker\">\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker\"\n\t\t\t\ttype=\"color\"\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></input>\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker-text\"\n\t\t\t\ttype=\"text\"\n\t\t\t\taria-invalid={!isValid}\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\t{...{ id }}\n\t\t\t></input>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../../src/components/common/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAEvC,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,6CAAO,CAAA;IACP,iDAAS,CAAA;IACT,+CAAQ,CAAA;IACR,iDAAS,CAAA;AACV,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,4CAA4C;AAC5C,MAAM,UAAU,WAAW,CAAC,KAAa;IACxC,0EAA0E;IAC1E,wEAAwE;IACxE,qBAAqB;IACrB,YAAY;IACZ,yCAAyC;IACzC,yCAAyC;IACzC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC7C,GAAG,CAAC,MAAM,GAAG,C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-9a-f]{6}$/i;\n\nexport enum RGBA_CHANNEL {\n\tRED = 0,\n\tGREEN = 1,\n\tBLUE = 2,\n\tALPHA = 3,\n}\n\n// From https://stackoverflow.com/a/24390910\nexport function colorToRGBA(color: string) {\n\t// Returns the color as an array of [r, g, b, a] -- all range from 0 - 255\n\t// color must be a valid canvas fillStyle. This will cover most anything\n\t// you'd want to use.\n\t// Examples:\n\t// colorToRGBA('red') # [255, 0, 0, 255]\n\t// colorToRGBA('#f00') # [255, 0, 0, 255]\n\tconst cvs = document.createElement(\"canvas\");\n\tcvs.height = 1;\n\tcvs.width = 1;\n\n\tconst ctx = cvs.getContext(\"2d\")!;\n\tctx.fillStyle = color;\n\tctx.fillRect(0, 0, 1, 1);\n\treturn ctx.getImageData(0, 0, 1, 1).data;\n}\n\nfunction byteToHex(num: number) {\n\t// Turns a number (0-255) into a 2-character hex number (00-ff)\n\treturn `0${num.toString(16)}`.slice(-2);\n}\n\nfunction colorToHex(color: string) {\n\t// Convert any CSS color to a hex representation\n\t// Examples:\n\t// colorToHex('red') # '#ff0000'\n\t// colorToHex('rgb(255, 0, 0)') # '#ff0000'\n\t// colorToHex('#ff0000') # '#ff0000'\n\tif (color.match(RE_HEX_COLOR) !== null) {\n\t\treturn color;\n\t}\n\tconst rgba = colorToRGBA(color);\n\tconst hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join(\"\");\n\treturn `#${hex}`;\n}\n\nexport interface ColorPickerProps {\n\tstartColor: string;\n\tupdateColor: (newColor: string) => void;\n\tid?: string;\n}\n\n/**\n * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.\n *\n * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }\n */\nexport const ColorPicker = ({ id, startColor, updateColor }: ColorPickerProps) => {\n\t/**\n\t * There is a delicate ballet here between the color picket and the input box. This is because this color picker\n\t * has state (when the end user is in the midst of picking a color by editing the input field) and also\n\t * receives state (via props). When prop startColor is received, it overrides the input box. But when the user is editing,\n\t * the input box overrides the prop.\n\t */\n\tconst [priorColor, setPriorColor] = useState(startColor);\n\t/**\n\t * inputValue state is set _whenever the user is editing the input box_. Only at this time, the value in the input\n\t * box reflects the user's editing. If at any point the editing yields a valid color then it is immediately\n\t * passed up as an action, which updates the screen and resets the startColor prop. Whenever an invalid color has\n\t * been entered, the value is flagged invalid which causes the input box to be underlined red.\n\t */\n\tconst [inputValue, setInputValue] = useState<string | null>(null);\n\n\t/**\n\t * If the value of the startColor prop changes then we reset the input to the new color. This occurs for instance\n\t * when the user presses the light or dark themes on the theme page. At that point, the parent sends new values\n\t * down to all color pickers as a new prop.\n\t */\n\tif (priorColor !== startColor) {\n\t\tsetPriorColor(startColor);\n\t\tsetInputValue(null);\n\t}\n\n\t// If the value in the input box isn't valid then give UI feedback\n\tconst isValid = inputValue === null || inputValue.match(RE_HEX_COLOR) !== null;\n\n\t// The swatch always displays the current color from prop. This won't change\n\t// until a valid alternative color is picked.\n\tconst color = colorToHex(startColor);\n\n\tconst onColorChanged = ({ target }: { target: HTMLInputElement }) => {\n\t\tconst maybeNewColor = target.value;\n\t\t// Update the value in the input box\n\t\tsetInputValue(maybeNewColor);\n\t\t// If the color is valid then send an update\n\t\tconst isNewValueValid = maybeNewColor.match(RE_HEX_COLOR) !== null;\n\t\tif (isNewValueValid) {\n\t\t\tupdateColor(maybeNewColor);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"color-picker\">\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker\"\n\t\t\t\ttype=\"color\"\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></input>\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker-text\"\n\t\t\t\ttype=\"text\"\n\t\t\t\taria-invalid={!isValid}\n\t\t\t\tvalue={inputValue ?? color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\t{...{ id }}\n\t\t\t></input>\n\t\t</div>\n\t);\n};\n"]}
@@ -8,4 +8,15 @@ export declare type DropZoneProps = {
8
8
  processFile: (fileObj: FileWithPath, index: number) => void;
9
9
  suppress?: boolean;
10
10
  };
11
+ /***
12
+ * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for
13
+ * drag-and-drop.
14
+ *
15
+ * The DropZone component is intended to be a container element for other elements, such as text, lists,
16
+ * images, input elements, etc.
17
+ *
18
+ * @callback processFile - This function will be called for each file that is dropped in the dropzone.
19
+ * @param {ReactNode} children - React will fill this in.
20
+ * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div
21
+ */
11
22
  export declare const DropZone: ({ processFile, children, suppress }: DropZoneProps) => JSX.Element;
@@ -1,5 +1,16 @@
1
1
  import React, { useState } from "react";
2
2
  import "./css/drop-zone.css";
3
+ /***
4
+ * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for
5
+ * drag-and-drop.
6
+ *
7
+ * The DropZone component is intended to be a container element for other elements, such as text, lists,
8
+ * images, input elements, etc.
9
+ *
10
+ * @callback processFile - This function will be called for each file that is dropped in the dropzone.
11
+ * @param {ReactNode} children - React will fill this in.
12
+ * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div
13
+ */
3
14
  export const DropZone = ({ processFile, children, suppress = false }) => {
4
15
  const [isDragging, setIsDragging] = useState(false);
5
16
  const [potential, setPotential] = useState(false);
@@ -8,17 +19,26 @@ export const DropZone = ({ processFile, children, suppress = false }) => {
8
19
  e.preventDefault();
9
20
  e.stopPropagation();
10
21
  };
22
+ // Check if something is being dragged somewhere on the page
23
+ // If dragging is happening on the page, there will be a visual indication for potential drop zone
11
24
  if (singleton) {
25
+ // "dragenter" and "dragleave" events are fired off of every single child element, and counting them isn't reliable
26
+ // so, when "dragover" events are fired, we know dragging is happening.
27
+ // we will wait 100ms after the last "dragover" event is fired, and then turn off the potential zone.
12
28
  let timeout = null;
13
29
  document.addEventListener("dragover", (e) => {
14
30
  preventDefaults(e);
15
31
  setPotential(true);
32
+ // If timeout was previously set, clear it
16
33
  if (timeout !== null) {
17
34
  clearTimeout(timeout);
18
35
  }
36
+ // Set a new timeout, now that we've gotten a new dragover event
19
37
  timeout = setTimeout(() => {
38
+ // If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.
20
39
  setPotential(false);
21
- }, 100);
40
+ }, 100); // 100ms was chosen by trial and error.
41
+ // 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay
22
42
  });
23
43
  setSingleton(false);
24
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,CAAC,CAA0D,EAAE,EAAE;QACtF,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IACrB,CAAC,CAAC;IAIF,IAAI,SAAS,EAAE;QAId,IAAI,OAAO,GAA0B,IAAI,CAAC;QAC1C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;YAC3C,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,YAAY,CAAC,IAAI,CAAC,CAAC;YAGnB,IAAI,OAAO,KAAK,IAAI,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;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\tconst isPotentialStr = potential ? \"isPotential\" : \"\";\n\tconst isDraggingStr = isDragging ? \"isDragging\" : isPotentialStr;\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDraggingStr}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAW7B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,Y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W,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\tconst isPotentialStr = potential ? \"isPotential\" : \"\";\n\tconst isDraggingStr = isDragging ? \"isDragging\" : isPotentialStr;\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDraggingStr}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
@@ -6,5 +6,9 @@ export interface IFinsembleDropdownActionButtonProps {
6
6
  buttonOptions: Array<IFinsembleButtonProps>;
7
7
  mainAction: Function;
8
8
  }
9
+ /**
10
+ * @TODO: Consolidate this and DefaultDropDownButton and change all usages to use DefaultDropDownButton.
11
+ * @deprecated Use DefaultDropDownButton instead.
12
+ */
9
13
  declare const DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps>;
10
14
  export default DropdownButton;
@@ -1,6 +1,10 @@
1
1
  import React, { useState, useRef } from "react";
2
2
  import "../../assets/css/button.css";
3
3
  import { useOutsideClickDetector } from "../../hooks/useOutsideClickDetector";
4
+ /**
5
+ * @TODO: Consolidate this and DefaultDropDownButton and change all usages to use DefaultDropDownButton.
6
+ * @deprecated Use DefaultDropDownButton instead.
7
+ */
4
8
  const DropdownButton = ({ buttonLabel = "Label", buttonOptions = [], mainAction, }) => {
5
9
  const wrapperRef = useRef(null);
6
10
  const [expanded, setExpanded] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAa9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE;YACb,MAAM,CAAC,YAAY,EAAE,CAAC;YACtB,WAAW,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,IAEA,MAAM,CAAC,WAAW,CACd,CACN,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACb,WAAW,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;SACP;QAED,IAAI,UAAU,EAAE;YACf,UAAU,EAAE,CAAC;SACb;aAAM;YACN,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7B;IACF,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,0CAA0C;QACzE,6BAAK,SAAS,EAAC,gCAAgC;YAC9C,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\nimport { IFinsembleButtonProps } from \"../shared/Button\";\n\nexport interface IFinsembleDropdownActionButtonProps {\n\tbuttonLabel: string;\n\tbuttonOptions: Array<IFinsembleButtonProps>;\n\tmainAction: Function;\n}\n\n/**\n * @TODO: Consolidate this and DefaultDropDownButton and change all usages to use DefaultDropDownButton.\n * @deprecated Use DefaultDropDownButton instead.\n */\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\n\tbuttonLabel = \"Label\",\n\tbuttonOptions = [],\n\tmainAction,\n}: IFinsembleDropdownActionButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [expanded, setExpanded] = useState(false);\n\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\toption.clickHandler();\n\t\t\t\tsetExpanded(false);\n\t\t\t}}\n\t\t>\n\t\t\t{option.buttonLabel}\n\t\t</div>\n\t));\n\n\tconst buttonAction = () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif (mainAction) {\n\t\t\tmainAction();\n\t\t} else {\n\t\t\t() => setExpanded(!expanded);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\n\t\t\t\t\t{buttonLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\n\t\t\t\t\t<span className=\"caret\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DropdownButton;\n"]}
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AAC,gCAAgC;YAC9C,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\nimport { IFinsembleButtonProps } from \"../shared/Button\";\n\nexport interface IFinsembleDropdownActionButtonProps {\n\tbuttonLabel: string;\n\tbuttonOptions: Array<IFinsembleButtonProps>;\n\tmainAction: Function;\n}\n\n/**\n * @TODO: Consolidate this and DefaultDropDownButton and change all usages to use DefaultDropDownButton.\n * @deprecated Use DefaultDropDownButton instead.\n */\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\n\tbuttonLabel = \"Label\",\n\tbuttonOptions = [],\n\tmainAction,\n}: IFinsembleDropdownActionButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [expanded, setExpanded] = useState(false);\n\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\toption.clickHandler();\n\t\t\t\tsetExpanded(false);\n\t\t\t}}\n\t\t>\n\t\t\t{option.buttonLabel}\n\t\t</div>\n\t));\n\n\tconst buttonAction = () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif (mainAction) {\n\t\t\tmainAction();\n\t\t} else {\n\t\t\t() => setExpanded(!expanded);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\n\t\t\t\t\t{buttonLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\n\t\t\t\t\t<span className=\"caret\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DropdownButton;\n"]}
@@ -0,0 +1,34 @@
1
+ import React, { ErrorInfo, ReactNode } from "react";
2
+ declare type ErrorBoundaryProps = {
3
+ fallBackUI?: ReactNode;
4
+ };
5
+ declare type ErrorBoundaryState = {
6
+ hasError: boolean;
7
+ };
8
+ /**
9
+ * Something like a try catch in React component form with some exceptions. Catches Errors and logs them to the central
10
+ * logger. Prevents uncaught exceptions on the render of child components from unintentionally breaking the entire UI.
11
+ * Has the added benefit of sending the errors to the Central Logger
12
+ *
13
+ * Note: The exceptions are that it not catch errors in Event handlers and Asynchronous code.
14
+ * Note: This does not catch errors in the current component directly, only child components. See below for example
15
+ *
16
+ * Eg: WON'T WORK
17
+ *
18
+ * const ContainerComponent = ({test}:any) => <ErrorBoundary><div>{test.undefined.length}</div></ErrorBoundary>
19
+ *
20
+ * WILL WORK:
21
+ * const BrokenComponent = ({test}:any) => <div>{test.undefined.length}</div>
22
+ * const ContainerComponent = ({test}:any) => <ErrorBoundary><BrokenComponent test={test}/></ErrorBoundary>
23
+ *
24
+ * @see https://reactjs.org/docs/error-boundaries.html for more information on Error Boundaries
25
+ */
26
+ export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
27
+ constructor(props: ErrorBoundaryProps);
28
+ static getDerivedStateFromError(error: Error): {
29
+ hasError: boolean;
30
+ };
31
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
32
+ render(): React.ReactNode;
33
+ }
34
+ export {};
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ /**
3
+ * Something like a try catch in React component form with some exceptions. Catches Errors and logs them to the central
4
+ * logger. Prevents uncaught exceptions on the render of child components from unintentionally breaking the entire UI.
5
+ * Has the added benefit of sending the errors to the Central Logger
6
+ *
7
+ * Note: The exceptions are that it not catch errors in Event handlers and Asynchronous code.
8
+ * Note: This does not catch errors in the current component directly, only child components. See below for example
9
+ *
10
+ * Eg: WON'T WORK
11
+ *
12
+ * const ContainerComponent = ({test}:any) => <ErrorBoundary><div>{test.undefined.length}</div></ErrorBoundary>
13
+ *
14
+ * WILL WORK:
15
+ * const BrokenComponent = ({test}:any) => <div>{test.undefined.length}</div>
16
+ * const ContainerComponent = ({test}:any) => <ErrorBoundary><BrokenComponent test={test}/></ErrorBoundary>
17
+ *
18
+ * @see https://reactjs.org/docs/error-boundaries.html for more information on Error Boundaries
19
+ */
20
+ export class ErrorBoundary extends React.Component {
21
+ constructor(props) {
22
+ super(props);
23
+ this.state = { hasError: false };
24
+ }
25
+ static getDerivedStateFromError(error) {
26
+ // Update state so the next render will show the fallback UI.
27
+ return { hasError: true };
28
+ }
29
+ componentDidCatch(error, errorInfo) {
30
+ // Log the error to the dev tools where developers will expect it but also send it to the central logger
31
+ console.error(error, errorInfo);
32
+ FSBL.Clients.Logger.system.error(error, errorInfo);
33
+ }
34
+ render() {
35
+ var _a;
36
+ if (this.state.hasError) {
37
+ // Render custom fallback UI or default to nothing
38
+ return (_a = this.props.fallBackUI) !== null && _a !== void 0 ? _a : React.createElement(React.Fragment, null);
39
+ }
40
+ return this.props.children;
41
+ }
42
+ }
43
+ //# sourceMappingURL=ErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AASpD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACzF,YAAY,KAAyB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAC3C,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QACnD,wGAAwG;QACxG,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;;QACL,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACxB,kDAAkD;YAClD,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,UAAU,mCAAI,yCAAK,CAAC;SACtC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACD","sourcesContent":["import React, { ErrorInfo, ReactNode } from \"react\";\n\ntype ErrorBoundaryProps = {\n\tfallBackUI?: ReactNode;\n};\ntype ErrorBoundaryState = {\n\thasError: boolean;\n};\n\n/**\n * Something like a try catch in React component form with some exceptions. Catches Errors and logs them to the central\n * logger. Prevents uncaught exceptions on the render of child components from unintentionally breaking the entire UI.\n * Has the added benefit of sending the errors to the Central Logger\n *\n * Note: The exceptions are that it not catch errors in Event handlers and Asynchronous code.\n * Note: This does not catch errors in the current component directly, only child components. See below for example\n *\n * Eg: WON'T WORK\n *\n * const ContainerComponent = ({test}:any) => <ErrorBoundary><div>{test.undefined.length}</div></ErrorBoundary>\n *\n * WILL WORK:\n * const BrokenComponent = ({test}:any) => <div>{test.undefined.length}</div>\n * const ContainerComponent = ({test}:any) => <ErrorBoundary><BrokenComponent test={test}/></ErrorBoundary>\n *\n * @see https://reactjs.org/docs/error-boundaries.html for more information on Error Boundaries\n */\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\t\tthis.state = { hasError: false };\n\t}\n\n\tstatic getDerivedStateFromError(error: Error) {\n\t\t// Update state so the next render will show the fallback UI.\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch(error: Error, errorInfo: ErrorInfo) {\n\t\t// Log the error to the dev tools where developers will expect it but also send it to the central logger\n\t\tconsole.error(error, errorInfo);\n\t\tFSBL.Clients.Logger.system.error(error, errorInfo);\n\t}\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\t// Render custom fallback UI or default to nothing\n\t\t\treturn this.props.fallBackUI ?? <></>;\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n"]}