@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/workspaceTypes.d.ts +8 -0
@@ -1,12 +1,16 @@
1
- import React, { useContext } from "react";
1
+ import React, { useContext, useEffect } from "react";
2
+ // Context
2
3
  import { NotificationsContext } from "../../notificationsContext";
3
4
  import { ViewMode, SelectionMode } from "../../constants";
5
+ // Hooks
4
6
  import { markNotificationsRead, markNotificationsUnread, dismissNotification, snoozeNotifications, } from "../../../../hooks/useNotifications";
7
+ // Components
5
8
  import IconButton from "../shared/IconButton";
6
9
  const DrawerControls = () => {
7
10
  const notificationsContext = useContext(NotificationsContext);
8
- const { viewMode, setViewMode, drawerControlProps, setDrawerControlProps, selectionMode, setSelectionMode, checkedNotifications, } = notificationsContext;
11
+ const { viewMode, setViewMode, drawerControlProps, setDrawerControlProps, selectionMode, isSelectAll, setSelectAll, setSelectionMode, checkedNotifications, setCheckedNotifications, } = notificationsContext;
9
12
  const toggleControl = (clickedControl) => {
13
+ // If we click on the control aready active, then there's nothing to toggle and we bail out.
10
14
  if (clickedControl.action === drawerControlProps.active)
11
15
  return;
12
16
  drawerControlProps.controls.forEach((control) => {
@@ -32,22 +36,37 @@ const DrawerControls = () => {
32
36
  const toggleSelect = () => {
33
37
  setSelectionMode(selectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION);
34
38
  };
39
+ const toggleSelectAll = () => {
40
+ if (isSelectAll) {
41
+ // this variable is a toggle, therefore
42
+ // if we are currently in select all mode
43
+ // means we are about to unselect all (as in a batch action)
44
+ setCheckedNotifications([]);
45
+ }
46
+ setSelectAll(!isSelectAll);
47
+ };
35
48
  const readChecked = () => {
36
49
  markNotificationsRead(checkedNotifications);
37
- setSelectionMode(SelectionMode.NO_SELECTION);
38
50
  };
39
51
  const unreadChecked = () => {
40
52
  markNotificationsUnread(checkedNotifications);
41
- setSelectionMode(SelectionMode.NO_SELECTION);
42
53
  };
43
54
  const hideChecked = () => {
44
55
  dismissNotification(checkedNotifications);
45
- setSelectionMode(SelectionMode.NO_SELECTION);
46
56
  };
47
57
  const snoozeChecked = () => {
48
58
  snoozeNotifications(checkedNotifications);
49
- setSelectionMode(SelectionMode.NO_SELECTION);
50
59
  };
60
+ const isSelectionMode = selectionMode === SelectionMode.SELECTION;
61
+ const selectAllControlStyle = `notifications-center-controls__filter-btn ${isSelectAll ? "active" : ""} ${isSelectionMode ? "visible" : "invisible"}`;
62
+ const controlClassname = `notifications-center-controls__filter-btn ${isSelectionMode ? "visible" : "invisible"} ${checkedNotifications.length ? "enabled" : "disabled"}`;
63
+ useEffect(() => {
64
+ // unchecks "Select All"
65
+ if (selectionMode === SelectionMode.NO_SELECTION) {
66
+ setSelectAll(false);
67
+ checkedNotifications.length = 0;
68
+ }
69
+ }, [selectionMode, checkedNotifications]);
51
70
  return (React.createElement("div", { id: "notifications-center-controls" },
52
71
  React.createElement("div", { className: "notifications-center-controls__row" }, renderControls()),
53
72
  React.createElement("div", { className: "notifications-center-controls__row" },
@@ -56,40 +75,43 @@ const DrawerControls = () => {
56
75
  toggleSelect();
57
76
  }
58
77
  } },
59
- React.createElement("i", { className: selectionMode === SelectionMode.NO_SELECTION ? "ff-check-mark" : "ff-close", style: {
60
- paddingRight: "5px",
61
- color: selectionMode === SelectionMode.NO_SELECTION ? "var(--accent-positive)" : "",
62
- } }),
78
+ React.createElement("i", { className: isSelectionMode ? "ff-close" : "ff-check-mark icon_active" }),
63
79
  "Select"),
64
- React.createElement("div", { className: "notifications-center-controls__filter-btn active", onClick: () => readChecked(), style: selectionMode === SelectionMode.SELECTION ? { visibility: "visible" } : { visibility: "hidden" }, tabIndex: 0, onKeyDown: (e) => {
80
+ React.createElement("div", { className: selectAllControlStyle, tabIndex: 0, onClick: () => toggleSelectAll(), onKeyDown: (e) => {
81
+ if (e.key === "Enter") {
82
+ toggleSelectAll();
83
+ }
84
+ } }, "Select All"),
85
+ React.createElement("div", { className: "notifications-center-controls__view_mode" },
86
+ React.createElement(IconButton, { iconName: "ff-chart-alt-2", classNames: viewMode === ViewMode.CARD ? "active" : "", clickHandler: () => {
87
+ setSelectionMode(SelectionMode.NO_SELECTION);
88
+ setViewMode(ViewMode.CARD);
89
+ } }),
90
+ React.createElement(IconButton, { iconName: "ff-adp-hamburger", classNames: viewMode === ViewMode.LIST ? "active" : "", clickHandler: () => {
91
+ setSelectionMode(SelectionMode.NO_SELECTION);
92
+ setViewMode(ViewMode.LIST);
93
+ } }))),
94
+ React.createElement("div", { className: "notifications-center-controls__row center" },
95
+ React.createElement("div", { className: controlClassname, onClick: () => readChecked(), tabIndex: 0, onKeyDown: (e) => {
65
96
  if (e.key === "Enter") {
66
97
  readChecked();
67
98
  }
68
99
  } }, "Mark Read"),
69
- React.createElement("div", { className: "notifications-center-controls__filter-btn active", onClick: () => unreadChecked(), style: selectionMode === SelectionMode.SELECTION ? { visibility: "visible" } : { visibility: "hidden" }, tabIndex: 0, onKeyDown: (e) => {
100
+ React.createElement("div", { className: controlClassname, onClick: () => unreadChecked(), tabIndex: 0, onKeyDown: (e) => {
70
101
  if (e.key === "Enter") {
71
102
  unreadChecked();
72
103
  }
73
104
  } }, "Mark Unread"),
74
- React.createElement("div", { className: "notifications-center-controls__filter-btn active", onClick: () => hideChecked(), tabIndex: 0, onKeyDown: (e) => {
105
+ React.createElement("div", { className: controlClassname, onClick: () => hideChecked(), tabIndex: 0, onKeyDown: (e) => {
75
106
  if (e.key === "Enter") {
76
107
  hideChecked();
77
108
  }
78
- }, style: selectionMode === SelectionMode.SELECTION ? { visibility: "visible" } : { visibility: "hidden" } }, "Hide"),
79
- React.createElement("div", { className: "notifications-center-controls__filter-btn active", onClick: () => snoozeChecked(), tabIndex: 0, onKeyDown: (e) => {
109
+ } }, "Hide"),
110
+ React.createElement("div", { className: controlClassname, onClick: () => snoozeChecked(), tabIndex: 0, onKeyDown: (e) => {
80
111
  if (e.key === "Enter") {
81
112
  snoozeChecked();
82
113
  }
83
- }, style: selectionMode === SelectionMode.SELECTION ? { visibility: "visible" } : { visibility: "hidden" } }, "Snooze"),
84
- React.createElement("div", { className: "notifications-center-controls__view_mode" },
85
- React.createElement(IconButton, { iconName: "ff-chart-alt-2", classNames: viewMode === ViewMode.CARD ? "active" : "", clickHandler: () => {
86
- setSelectionMode(SelectionMode.NO_SELECTION);
87
- setViewMode(ViewMode.CARD);
88
- } }),
89
- React.createElement(IconButton, { iconName: "ff-adp-hamburger", classNames: viewMode === ViewMode.LIST ? "active" : "", clickHandler: () => {
90
- setSelectionMode(SelectionMode.NO_SELECTION);
91
- setViewMode(ViewMode.LIST);
92
- } })))));
114
+ } }, "Snooze"))));
93
115
  };
94
116
  export default DrawerControls;
95
117
  //# sourceMappingURL=DrawerControls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,MAAM,cAAc,GAA4B,GAAG,EAAE;IACpD,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EACL,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,GACpB,GAAG,oBAAoB,CAAC;IAEzB,MAAM,aAAa,GAAG,CAAC,cAAuB,EAAE,EAAE;QAEjD,IAAI,cAAc,CAAC,MAAM,KAAK,kBAAkB,CAAC,MAAM;YAAE,OAAO;QAChE,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAgB,EAAE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AC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,WAGlG;YAEN,6BACC,SAAS,EAAC,kDAAkD,EAC5D,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,EAC9B,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;oBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;wBACtB,aAAa,EAAE,CAAC;qBAChB;gBACF,CAAC,EACD,KAAK,EAAE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,aAGlG;YAEN,6BAAK,SAAS,EAAC,0CAA0C;gBACxD,oBAAC,UAAU,IACV,QAAQ,EAAC,gBAAgB,EACzB,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA;gBACF,oBAAC,UAAU,IACV,QAAQ,EAAC,kBAAkB,EAC3B,UAAU,EAAE,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACtD,YAAY,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;wBAC7C,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,GACA,CACG,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext } from \"react\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types & Constants\nimport { Control } from \"../../types\";\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\n// Hooks\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tdismissNotification,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\n\nconst DrawerControls: React.FunctionComponent = () => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tcheckedNotifications,\n\t} = notificationsContext;\n\n\tconst toggleControl = (clickedControl: Control) => {\n\t\t// If we click on the control aready active, then there's nothing to toggle and we bail out.\n\t\tif (clickedControl.action === drawerControlProps.active) return;\n\t\tdrawerControlProps.controls.forEach((control: Control) => {\n\t\t\tif (control.action === clickedControl.action) {\n\t\t\t\tif (drawerControlProps.active === control.action) {\n\t\t\t\t\tdelete drawerControlProps.active;\n\t\t\t\t} else {\n\t\t\t\t\tdrawerControlProps.active = control.action;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDrawerControlProps({ ...drawerControlProps });\n\t};\n\n\tconst renderControls = () => {\n\t\tlet className = \"notifications-center-controls__filter-btn\";\n\t\treturn drawerControlProps.controls.map((control: Control) => (\n\t\t\t<div\n\t\t\t\tkey={control.action}\n\t\t\t\tclassName={`${className} ${drawerControlProps.active === control.action ? \"active\" : \"\"}`}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t\tonClick={() => toggleControl(control)}\n\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\ttoggleControl(control);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { pointerEvents: \"none\", opacity: \"0.4\" } : {}}\n\t\t\t>\n\t\t\t\t{control.label}\n\t\t\t</div>\n\t\t));\n\t};\n\n\tconst toggleSelect = () => {\n\t\tsetSelectionMode(\n\t\t\tselectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION\n\t\t);\n\t};\n\n\tconst readChecked = () => {\n\t\tmarkNotificationsRead(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst unreadChecked = () => {\n\t\tmarkNotificationsUnread(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst hideChecked = () => {\n\t\tdismissNotification(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\tconst snoozeChecked = () => {\n\t\tsnoozeNotifications(checkedNotifications);\n\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center-controls\">\n\t\t\t<div className=\"notifications-center-controls__row\">{renderControls()}</div>\n\t\t\t<div className=\"notifications-center-controls__row\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelect()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelect();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<i\n\t\t\t\t\t\tclassName={selectionMode === SelectionMode.NO_SELECTION ? \"ff-check-mark\" : \"ff-close\"}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tpaddingRight: \"5px\",\n\t\t\t\t\t\t\tcolor: selectionMode === SelectionMode.NO_SELECTION ? \"var(--accent-positive)\" : \"\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\tSelect\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => readChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\treadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Read\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => unreadChecked()}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tunreadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Unread\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => hideChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\thideChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tHide\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn active\"\n\t\t\t\t\tonClick={() => snoozeChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tsnoozeChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { visibility: \"visible\" } : { visibility: \"hidden\" }}\n\t\t\t\t>\n\t\t\t\t\tSnooze\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"notifications-center-controls__view_mode\">\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-chart-alt-2\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.CARD ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.CARD);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-adp-hamburger\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.LIST ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.LIST);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DrawerControls;\n"]}
1
+ {"version":3,"file":"DrawerControls.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,UAAU;AACV,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,QAAQ;AACR,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAE5C,aAAa;AACb,OAAO,UAAU,MAAM,sBAAsB,CAA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ACN,6BACC,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,EAC5B,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;oBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;wBACtB,WAAW,EAAE,CAAC;qBACd;gBACF,CAAC,WAGI;YAEN,6BACC,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,EAC9B,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;oBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;wBACtB,aAAa,EAAE,CAAC;qBAChB;gBACF,CAAC,aAGI,CACD,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext, useEffect } from \"react\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types & Constants\nimport { Control } from \"../../types\";\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\n// Hooks\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tdismissNotification,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\n\nconst DrawerControls: React.FunctionComponent = () => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\n\tconst {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectionMode,\n\t\tisSelectAll,\n\t\tsetSelectAll,\n\t\tsetSelectionMode,\n\t\tcheckedNotifications,\n\t\tsetCheckedNotifications,\n\t} = notificationsContext;\n\n\tconst toggleControl = (clickedControl: Control) => {\n\t\t// If we click on the control aready active, then there's nothing to toggle and we bail out.\n\t\tif (clickedControl.action === drawerControlProps.active) return;\n\t\tdrawerControlProps.controls.forEach((control: Control) => {\n\t\t\tif (control.action === clickedControl.action) {\n\t\t\t\tif (drawerControlProps.active === control.action) {\n\t\t\t\t\tdelete drawerControlProps.active;\n\t\t\t\t} else {\n\t\t\t\t\tdrawerControlProps.active = control.action;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDrawerControlProps({ ...drawerControlProps });\n\t};\n\n\tconst renderControls = () => {\n\t\tlet className = \"notifications-center-controls__filter-btn\";\n\t\treturn drawerControlProps.controls.map((control: Control) => (\n\t\t\t<div\n\t\t\t\tkey={control.action}\n\t\t\t\tclassName={`${className} ${drawerControlProps.active === control.action ? \"active\" : \"\"}`}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t\tonClick={() => toggleControl(control)}\n\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\ttoggleControl(control);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={selectionMode === SelectionMode.SELECTION ? { pointerEvents: \"none\", opacity: \"0.4\" } : {}}\n\t\t\t>\n\t\t\t\t{control.label}\n\t\t\t</div>\n\t\t));\n\t};\n\n\tconst toggleSelect = () => {\n\t\tsetSelectionMode(\n\t\t\tselectionMode === SelectionMode.NO_SELECTION ? SelectionMode.SELECTION : SelectionMode.NO_SELECTION\n\t\t);\n\t};\n\n\tconst toggleSelectAll = () => {\n\t\tif (isSelectAll) {\n\t\t\t// this variable is a toggle, therefore\n\t\t\t// if we are currently in select all mode\n\t\t\t// means we are about to unselect all (as in a batch action)\n\t\t\tsetCheckedNotifications([]);\n\t\t}\n\t\tsetSelectAll(!isSelectAll);\n\t};\n\n\tconst readChecked = () => {\n\t\tmarkNotificationsRead(checkedNotifications);\n\t};\n\n\tconst unreadChecked = () => {\n\t\tmarkNotificationsUnread(checkedNotifications);\n\t};\n\n\tconst hideChecked = () => {\n\t\tdismissNotification(checkedNotifications);\n\t};\n\n\tconst snoozeChecked = () => {\n\t\tsnoozeNotifications(checkedNotifications);\n\t};\n\n\tconst isSelectionMode = selectionMode === SelectionMode.SELECTION;\n\n\tconst selectAllControlStyle = `notifications-center-controls__filter-btn ${isSelectAll ? \"active\" : \"\"} ${\n\t\tisSelectionMode ? \"visible\" : \"invisible\"\n\t}`;\n\n\tconst controlClassname = `notifications-center-controls__filter-btn ${isSelectionMode ? \"visible\" : \"invisible\"} ${\n\t\tcheckedNotifications.length ? \"enabled\" : \"disabled\"\n\t}`;\n\n\tuseEffect(() => {\n\t\t// unchecks \"Select All\"\n\t\tif (selectionMode === SelectionMode.NO_SELECTION) {\n\t\t\tsetSelectAll(false);\n\t\t\tcheckedNotifications.length = 0;\n\t\t}\n\t}, [selectionMode, checkedNotifications]);\n\n\treturn (\n\t\t<div id=\"notifications-center-controls\">\n\t\t\t<div className=\"notifications-center-controls__row\">{renderControls()}</div>\n\t\t\t<div className=\"notifications-center-controls__row\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"notifications-center-controls__filter-btn\"\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelect()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelect();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<i className={isSelectionMode ? \"ff-close\" : \"ff-check-mark icon_active\"} />\n\t\t\t\t\tSelect\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={selectAllControlStyle}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonClick={() => toggleSelectAll()}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\ttoggleSelectAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSelect All\n\t\t\t\t</div>\n\t\t\t\t<div className=\"notifications-center-controls__view_mode\">\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-chart-alt-2\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.CARD ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.CARD);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticonName=\"ff-adp-hamburger\"\n\t\t\t\t\t\tclassNames={viewMode === ViewMode.LIST ? \"active\" : \"\"}\n\t\t\t\t\t\tclickHandler={() => {\n\t\t\t\t\t\t\tsetSelectionMode(SelectionMode.NO_SELECTION);\n\t\t\t\t\t\t\tsetViewMode(ViewMode.LIST);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"notifications-center-controls__row center\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => readChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\treadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Read\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => unreadChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tunreadChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tMark Unread\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => hideChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\thideChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tHide\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName={controlClassname}\n\t\t\t\t\tonClick={() => snoozeChecked()}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\t\t\tsnoozeChecked();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSnooze\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DrawerControls;\n"]}
@@ -1,6 +1,8 @@
1
1
  import React, { useState, useRef, useContext } from "react";
2
2
  import debounce from "lodash/debounce";
3
+ // Hooks
3
4
  import { useNotificationUI } from "../../../../hooks/useNotifications";
5
+ // Components
4
6
  import IconButton from "../shared/IconButton";
5
7
  import { NotificationsContext } from "../../notificationsContext";
6
8
  const NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }) => {
@@ -38,6 +40,7 @@ const DrawerHeader = ({ poppedOutStatus, popOutToggle }) => {
38
40
  const toggleMenu = () => {
39
41
  setShowMenu(!showMenu);
40
42
  };
43
+ // This is unchanged across renders
41
44
  const handleSearchTerm = useRef(debounce((nextValue) => {
42
45
  const regex = /^(title|details|source):/gi;
43
46
  nextValue = nextValue.trim();
@@ -60,6 +63,8 @@ const DrawerHeader = ({ poppedOutStatus, popOutToggle }) => {
60
63
  const handleChange = (ev) => {
61
64
  const { value: nextValue } = ev.target;
62
65
  setSearchInputValue(nextValue);
66
+ // Even though handleChange is created on each render and executed
67
+ // it references the same handleSearchTerm that was created initially
63
68
  handleSearchTerm(nextValue);
64
69
  };
65
70
  return (React.createElement("div", { id: "notifications-center__header" },
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerHeader.js","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E;YAChC,eAAe,CAAC,SAAS,CAAC,CAAC;SAC3B;aAAM;YACN,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,eAAe,CAAC,EAAE,CAAC,CAAC;SACpB;IACF,CAAC,EAAE,GAAG,CAAC,CACP,CAAC,OAAO,CAAC;IAEV,MAAM,YAAY,GAAG,CAAC,EAAO,EAAE,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAG/B,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\nimport debounce from \"lodash/debounce\";\n\n// Hooks\nimport { useNotificationUI } from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\nimport { NotificationsContext } from \"../../notificationsContext\";\n\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\n\tconst goToSettings = () => {\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\tpreferencesTab: \"Notifications\",\n\t\t});\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"overflow-menu__container\">\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\n\t\t\t</div>\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">Settings</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst DrawerHeader: React.FunctionComponent<{\n\tpoppedOutStatus: boolean;\n\tpopOutToggle: Function;\n}> = ({ poppedOutStatus, popOutToggle }) => {\n\tconst [uiState, setUIState] = useNotificationUI();\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { searchString, setSearchString } = notificationsContext;\n\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\n\n\tconst [showMenu, setShowMenu] = useState(false);\n\n\tconst closeDrawerClick = () => {\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tshowCenter: false,\n\t\t});\n\t};\n\n\tconst toggleMenu = () => {\n\t\tsetShowMenu(!showMenu);\n\t};\n\n\t// This is unchanged across renders\n\tconst handleSearchTerm = useRef(\n\t\tdebounce((nextValue: string) => {\n\t\t\tconst regex = /^(title|details|source):/gi;\n\t\t\tnextValue = nextValue.trim();\n\n\t\t\tconst isFilter = regex.test(nextValue);\n\t\t\tlet parsedSearchTerm = \"\";\n\n\t\t\tif (isFilter) {\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\n\t\t\t} else {\n\t\t\t\tparsedSearchTerm = nextValue;\n\t\t\t}\n\n\t\t\tif (parsedSearchTerm.length > 2) {\n\t\t\t\tsetSearchString(nextValue);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"search string is too short\");\n\t\t\t\tsetSearchString(\"\");\n\t\t\t}\n\t\t}, 400)\n\t).current;\n\n\tconst handleChange = (ev: any) => {\n\t\tconst { value: nextValue } = ev.target;\n\t\tsetSearchInputValue(nextValue);\n\t\t// Even though handleChange is created on each render and executed\n\t\t// it references the same handleSearchTerm that was created initially\n\t\thandleSearchTerm(nextValue);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center__header\">\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\n\t\t\t<input\n\t\t\t\tclassName=\"search-notifications__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder={\"Search Notifications\"}\n\t\t\t\tvalue={searchInputValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\n\t\t\t</IconButton>\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\n\t\t</div>\n\t);\n};\n\nexport default DrawerHeader;\n"]}
1
+ {"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/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C,EAAE;YAChC,eAAe,CAAC,SAAS,CAAC,CAAC;SAC3B;aAAM;YACN,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,eAAe,CAAC,EAAE,CAAC,CAAC;SACpB;IACF,CAAC,EAAE,GAAG,CAAC,CACP,CAAC,OAAO,CAAC;IAEV,MAAM,YAAY,GAAG,CAAC,EAAO,EAAE,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC/B,kEAAkE;QAClE,qEAAqE;QACrE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\nimport debounce from \"lodash/debounce\";\n\n// Hooks\nimport { useNotificationUI } from \"../../../../hooks/useNotifications\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\nimport { NotificationsContext } from \"../../notificationsContext\";\n\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\n\tconst goToSettings = () => {\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\tpreferencesTab: \"Notifications\",\n\t\t});\n\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t{\n\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tmonitor: \"mine\",\n\t\t\t\tleft: \"center\",\n\t\t\t\ttop: \"center\",\n\t\t\t}\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"overflow-menu__container\">\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\n\t\t\t</div>\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\n\t\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t\t</div>\n\t\t\t\t<span className=\"btn-label\">Settings</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst DrawerHeader: React.FunctionComponent<{\n\tpoppedOutStatus: boolean;\n\tpopOutToggle: Function;\n}> = ({ poppedOutStatus, popOutToggle }) => {\n\tconst [uiState, setUIState] = useNotificationUI();\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { searchString, setSearchString } = notificationsContext;\n\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\n\n\tconst [showMenu, setShowMenu] = useState(false);\n\n\tconst closeDrawerClick = () => {\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tshowCenter: false,\n\t\t});\n\t};\n\n\tconst toggleMenu = () => {\n\t\tsetShowMenu(!showMenu);\n\t};\n\n\t// This is unchanged across renders\n\tconst handleSearchTerm = useRef(\n\t\tdebounce((nextValue: string) => {\n\t\t\tconst regex = /^(title|details|source):/gi;\n\t\t\tnextValue = nextValue.trim();\n\n\t\t\tconst isFilter = regex.test(nextValue);\n\t\t\tlet parsedSearchTerm = \"\";\n\n\t\t\tif (isFilter) {\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\n\t\t\t} else {\n\t\t\t\tparsedSearchTerm = nextValue;\n\t\t\t}\n\n\t\t\tif (parsedSearchTerm.length > 2) {\n\t\t\t\tsetSearchString(nextValue);\n\t\t\t} else {\n\t\t\t\tconsole.log(\"search string is too short\");\n\t\t\t\tsetSearchString(\"\");\n\t\t\t}\n\t\t}, 400)\n\t).current;\n\n\tconst handleChange = (ev: any) => {\n\t\tconst { value: nextValue } = ev.target;\n\t\tsetSearchInputValue(nextValue);\n\t\t// Even though handleChange is created on each render and executed\n\t\t// it references the same handleSearchTerm that was created initially\n\t\thandleSearchTerm(nextValue);\n\t};\n\n\treturn (\n\t\t<div id=\"notifications-center__header\">\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\n\t\t\t<input\n\t\t\t\tclassName=\"search-notifications__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder={\"Search Notifications\"}\n\t\t\t\tvalue={searchInputValue}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\n\t\t\t</IconButton>\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\n\t\t</div>\n\t);\n};\n\nexport default DrawerHeader;\n"]}
@@ -3,8 +3,11 @@ import { CSSTransition } from "react-transition-group";
3
3
  import ConditionalWrapper from "../../../shared/ConditionalWrapper";
4
4
  import { ViewMode, SelectionMode } from "../../constants";
5
5
  import "../../../../assets/css/notificationsCenter.css";
6
+ // Hooks
6
7
  import useNotifications, { useNotificationUI, getNotificationConfig, moveToToolbarMonitor, getOS, getFetchHistoryParams, } from "../../../../hooks/useNotifications";
8
+ // Context
7
9
  import { NotificationsContext } from "../../notificationsContext";
10
+ // Components
8
11
  import CardView from "../views/CardView";
9
12
  import Drawer from "../drawer/Drawer";
10
13
  import DrawerControls from "../drawer/DrawerControls";
@@ -12,6 +15,8 @@ import DrawerHeader from "../drawer/DrawerHeader";
12
15
  import ListView from "../views/ListView";
13
16
  import NotificationDetailsView from "../views/NotificationDetailsView";
14
17
  import FloatingFocus from "@q42/floating-focus-a11y";
18
+ // The package FloatingFocus injects a focus indicator that moves around the page, but only for
19
+ // keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.
15
20
  new FloatingFocus();
16
21
  const defaultControls = {
17
22
  controls: [
@@ -68,6 +73,7 @@ const setShowWindowForState = (centerState) => {
68
73
  if (centerState.position) {
69
74
  finsembleWindow.setBounds(centerState.position);
70
75
  }
76
+ // Always on top when popped in
71
77
  FSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);
72
78
  storeNotificationsCenterWindowPosition(centerState);
73
79
  };
@@ -85,11 +91,12 @@ export const NotificationsCenter = (props) => {
85
91
  const [isInitialized, setInitialized] = useState(false);
86
92
  const [isMac] = useState(getOS() === "Mac");
87
93
  const nextPageToFetch = useRef(1);
94
+ // Set up references for use in callbacks to FSBL functions
88
95
  const showCenterRef = useRef(false);
89
96
  const poppedOutRef = useRef(false);
90
97
  const subscriptionMessageRef = useRef({});
91
98
  const applicationState = useRef(null);
92
- const checkedNotifications = [];
99
+ const scrollContainer = useRef(null);
93
100
  const [searchString, setSearchString] = useState("");
94
101
  const [filteredNotifications, setFilteredNotifications] = useState([...notifications]);
95
102
  const [viewMode, setViewMode] = useState(ViewMode.CARD);
@@ -97,6 +104,8 @@ export const NotificationsCenter = (props) => {
97
104
  const [selectedNotification, setSelectedNotification] = useState(null);
98
105
  const [muteFilters, setMuteFilters] = useState([]);
99
106
  const [reloadMuteFilters, setReloadMuteFilters] = useState(true);
107
+ const [isSelectAll, setSelectAll] = useState(false);
108
+ const [checkedNotifications, setCheckedNotifications] = useState([]);
100
109
  const dcp = props.controls ? props.controls : defaultControls;
101
110
  const [drawerControlProps, setDrawerControlProps] = useState(dcp);
102
111
  const notificationsContextValues = {
@@ -112,9 +121,12 @@ export const NotificationsCenter = (props) => {
112
121
  setSearchString,
113
122
  filteredNotifications,
114
123
  checkedNotifications,
124
+ setCheckedNotifications,
115
125
  setFilteredNotifications,
116
126
  muteFilters,
117
127
  setMuteFilters,
128
+ isSelectAll,
129
+ setSelectAll,
118
130
  };
119
131
  const togglePoppedStatus = () => {
120
132
  const poppedOut = !uiState.poppedOut;
@@ -148,6 +160,7 @@ export const NotificationsCenter = (props) => {
148
160
  };
149
161
  const boundsChangeListener = (event) => {
150
162
  if ((showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) && !poppedOutRef.current) {
163
+ // Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes
151
164
  setFullHeight();
152
165
  }
153
166
  const position = {
@@ -163,8 +176,10 @@ export const NotificationsCenter = (props) => {
163
176
  });
164
177
  };
165
178
  const getScrollPercentage = () => {
166
- const maxScroll = document.body.scrollHeight;
167
- const currentScroll = window.innerHeight + window.scrollY;
179
+ var _a, _b, _c, _d, _e, _f;
180
+ // document.getElementsByClassName("cards-container")[0].scrollHeight - document.getElementsByClassName("cards-container")[0].clientHeight
181
+ const maxScroll = ((_b = (_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = scrollContainer.current) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0);
182
+ const currentScroll = (_f = (_e = scrollContainer.current) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0;
168
183
  return currentScroll / maxScroll;
169
184
  };
170
185
  const lazyLoadNextPage = async () => new Promise(async (resolve) => {
@@ -179,6 +194,7 @@ export const NotificationsCenter = (props) => {
179
194
  }
180
195
  }
181
196
  else {
197
+ // Stop fetching after this one
182
198
  nextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;
183
199
  }
184
200
  }
@@ -236,7 +252,9 @@ export const NotificationsCenter = (props) => {
236
252
  }
237
253
  }
238
254
  };
255
+ // When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)
239
256
  useEffect(() => {
257
+ var _a;
240
258
  setOpaqueClassName(!config.isTransparent);
241
259
  const subscriptionId = FSBL.Clients.RouterClient.subscribe("Finsemble.Application.State", (err, response) => {
242
260
  applicationState.current = response.data.state;
@@ -261,16 +279,18 @@ export const NotificationsCenter = (props) => {
261
279
  };
262
280
  finsembleWindow.addEventListener("close-requested", hide);
263
281
  finsembleWindow.addEventListener("bounds-change-end", boundsChangeListener);
264
- window.addEventListener("scroll", scrollHandler);
282
+ (_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", scrollHandler);
265
283
  return () => {
284
+ var _a;
266
285
  FSBL.Clients.RouterClient.unsubscribe(subscriptionId);
267
286
  finsembleWindow.removeEventListener("close-requested", hide);
268
287
  finsembleWindow.removeEventListener("bounds-change-end", boundsChangeListener);
269
- window.removeEventListener("scroll", scrollHandler);
288
+ (_a = scrollContainer.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", scrollHandler);
270
289
  };
271
290
  }, []);
272
291
  useEffect(() => {
273
292
  const recursiveLoad = async () => {
293
+ // Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages
274
294
  await lazyLoadNextPage();
275
295
  if (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {
276
296
  recursiveLoad();
@@ -278,8 +298,10 @@ export const NotificationsCenter = (props) => {
278
298
  };
279
299
  recursiveLoad();
280
300
  }, [viewMode, drawerControlProps.active]);
301
+ // Hook to set up the center state from service data on component start
281
302
  useEffect(() => {
282
303
  subscriptionMessageRef.current = uiState;
304
+ // Hook can execute before initial pubsub response - waiting for actual values
283
305
  if (!isInitialized && typeof uiState.showCenter !== "undefined") {
284
306
  if (uiState.poppedOut) {
285
307
  removePoppedInClasses();
@@ -294,11 +316,13 @@ export const NotificationsCenter = (props) => {
294
316
  position: uiState.position,
295
317
  });
296
318
  }
319
+ // Setup references
297
320
  showCenterRef.current = uiState.showCenter;
298
321
  poppedOutRef.current = uiState.poppedOut;
299
322
  setInitialized(true);
300
323
  }
301
324
  }, [uiState]);
325
+ // Effect to run when we pop-in or pop-out the notification center
302
326
  useEffect(() => {
303
327
  if (isInitialized) {
304
328
  poppedOutRef.current = uiState.poppedOut;
@@ -350,6 +374,7 @@ export const NotificationsCenter = (props) => {
350
374
  FSBL.Clients.RouterClient.removeListener("FinsembleNotificationsMuteStateChannel", listenMuteStateChanged);
351
375
  };
352
376
  }, []);
377
+ // Sets the current active mute filters
353
378
  useEffect(() => {
354
379
  async function loadMuteFilter() {
355
380
  return await FSBL.Clients.NotificationClient.getMuteFilters();
@@ -359,10 +384,16 @@ export const NotificationsCenter = (props) => {
359
384
  setReloadMuteFilters(false);
360
385
  });
361
386
  }, [reloadMuteFilters]);
387
+ // Sets the select all status from user selecting notifications individually
388
+ useEffect(() => {
389
+ if (notifications.length > 0 && checkedNotifications.length === notifications.length) {
390
+ setSelectAll(true);
391
+ }
392
+ }, [checkedNotifications, notifications]);
362
393
  const notificationsMainView = () => (React.createElement(React.Fragment, null,
363
394
  React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
364
395
  React.createElement(DrawerControls, null),
365
- React.createElement("div", { className: "cards-container" }, viewMode === ViewMode.CARD ? (React.createElement(CardView, { notifications: notifications, notificationCard: props.notificationCard })) : (React.createElement(ListView, { notifications: notifications, notificationHeaderRow: props.notificationHeaderRow, notificationListRow: props.notificationListRow })))));
396
+ React.createElement("div", { className: "cards-container", ref: scrollContainer }, viewMode === ViewMode.CARD ? (React.createElement(CardView, { notifications: notifications, notificationCard: props.notificationCard })) : (React.createElement(ListView, { notifications: notifications, notificationHeaderRow: props.notificationHeaderRow, notificationListRow: props.notificationListRow })))));
366
397
  const notificationDetailsViewComponent = () => React.createElement(NotificationDetailsView, { notification: selectedNotification });
367
398
  return (React.createElement(ConditionalWrapper, { condition: config.isTransparent && !uiState.poppedOut && !isMac, wrapper: (children) => (React.createElement(CSSTransition, { in: uiState.showCenter, timeout: 500, classNames: "drawer", unmountOnExit: true }, children)) },
368
399
  React.createElement(NotificationsContext.Provider, { value: notificationsContextValues },
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,gDAAgD,CAAC;AAGxD,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMlE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,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CAAgC,GAAG,GAAG,EAAE,CAAC,oBAAC,uBAAuB,IAAC,YAAY,EAAE,oBAAoB,GAAI,CAAC;IAE/G,OAAO,CACN,oBAAC,kBAAkB,IAClB,SAAS,EAAG,MAAM,CAAC,aAAyB,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,KAAK,EAC5E,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CACtB,oBAAC,aAAa,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAC,QAAQ,EAAC,aAAa,UACpF,QAAQ,CACM,CAChB;QAED,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,0BAA0B;YAC/D,oBAAC,MAAM,IAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IACvD,oBAAoB,CAAC,CAAC,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAC5E,CACsB,CACZ,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { CSSTransition } from \"react-transition-group\";\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\n\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\n\n// Hooks\nimport useNotifications, {\n\tuseNotificationUI,\n\tgetNotificationConfig,\n\tmoveToToolbarMonitor,\n\tgetOS,\n\tgetFetchHistoryParams,\n} from \"../../../../hooks/useNotifications\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\n\n// Components\nimport CardView from \"../views/CardView\";\nimport Drawer from \"../drawer/Drawer\";\nimport DrawerControls from \"../drawer/DrawerControls\";\nimport DrawerHeader from \"../drawer/DrawerHeader\";\nimport ListView from \"../views/ListView\";\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\nimport { services } from \"@finsemble/finsemble-api\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype INotification = services.notification.types.INotification;\ntype IMuteFilter = services.notification.types.IMuteFilter;\n\nconst defaultControls: NotificationCenterControlsProps = {\n\tcontrols: [\n\t\t{\n\t\t\taction: \"all\",\n\t\t\tlabel: \"All\",\n\t\t\trun: (notifications: INotification[]) => notifications,\n\t\t},\n\t\t{\n\t\t\taction: \"unread\",\n\t\t\tlabel: \"Unread\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"read\",\n\t\t\tlabel: \"Read\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"snoozed\",\n\t\t\tlabel: \"Snoozed\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\n\t\t},\n\t],\n\tactive: \"all\",\n};\n\nconst addPoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\n};\n\nconst removePoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\n};\n\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\n\tFSBL.Clients.StorageClient.save({\n\t\ttopic: \"finsemble.notifications\",\n\t\tkey: \"last.position\",\n\t\tvalue: {\n\t\t\tshowCenter,\n\t\t\tpoppedOut,\n\t\t\tposition,\n\t\t},\n\t});\n};\n\nconst setShowWindowForState = (centerState: any) => {\n\tif (centerState.showCenter) {\n\t\tfinsembleWindow.show({}, () => {\n\t\t\tfinsembleWindow.bringToFront();\n\t\t});\n\t}\n\n\tif (centerState.position) {\n\t\tfinsembleWindow.setBounds(centerState.position);\n\t}\n\n\t// Always on top when popped in\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\n\tstoreNotificationsCenterWindowPosition(centerState);\n};\n\nconst isValidPosition = (bounds: any): boolean =>\n\tbounds &&\n\ttypeof bounds.left !== \"undefined\" &&\n\ttypeof bounds.top !== \"undefined\" &&\n\ttypeof bounds.height !== \"undefined\" &&\n\ttypeof bounds.width !== \"undefined\";\n\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\n\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\n\tconst [uiState, setUIState] = useNotificationUI();\n\n\tconst config = getNotificationConfig();\n\tconst [isInitialized, setInitialized] = useState(false);\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\tconst nextPageToFetch = useRef(1);\n\n\t// Set up references for use in callbacks to FSBL functions\n\tconst showCenterRef = useRef(false);\n\tconst poppedOutRef = useRef(false);\n\tconst subscriptionMessageRef = useRef<any>({});\n\tconst applicationState = useRef(null);\n\n\tconst checkedNotifications: INotification[] = [];\n\n\tconst [searchString, setSearchString] = useState(\"\");\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\n\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\n\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\n\tconst notificationsContextValues: NotificationsContextType = {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectedNotification,\n\t\tsetSelectedNotification,\n\t\tsearchString,\n\t\tsetSearchString,\n\t\tfilteredNotifications,\n\t\tcheckedNotifications,\n\t\tsetFilteredNotifications,\n\t\tmuteFilters,\n\t\tsetMuteFilters,\n\t};\n\n\tconst togglePoppedStatus = () => {\n\t\tconst poppedOut = !uiState.poppedOut;\n\t\tpoppedOutRef.current = poppedOut;\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tpoppedOut,\n\t\t});\n\t};\n\n\tconst setFullHeight = async (monitorInfo?: any) => {\n\t\tif (!monitorInfo) {\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\n\t\t\t\t\tmonitorInfo = monitor;\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tconst { data } = await finsembleWindow.getBounds();\n\t\tif (data) {\n\t\t\tconst centerWindowPosition = {\n\t\t\t\tleft: monitorInfo.availableRect.right - data.width,\n\t\t\t\ttop: monitorInfo.availableRect.top,\n\t\t\t\theight: monitorInfo.availableRect.height,\n\t\t\t\twidth: data.width,\n\t\t\t};\n\n\t\t\tsetShowWindowForState({\n\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\t\tposition: centerWindowPosition,\n\t\t\t});\n\n\t\t\tfinsembleWindow.setShape([]);\n\t\t}\n\t};\n\n\tconst boundsChangeListener = (event: any) => {\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\n\t\t\tsetFullHeight();\n\t\t}\n\t\tconst position = {\n\t\t\ttop: event.data.top,\n\t\t\tleft: event.data.left,\n\t\t\theight: event.data.height,\n\t\t\twidth: event.data.width,\n\t\t};\n\n\t\tstoreNotificationsCenterWindowPosition({\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition,\n\t\t});\n\t};\n\n\tconst getScrollPercentage = () => {\n\t\tconst maxScroll = document.body.scrollHeight;\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\n\t\treturn currentScroll / maxScroll;\n\t};\n\n\tconst lazyLoadNextPage = async () =>\n\t\tnew Promise<void>(async (resolve) => {\n\t\t\tif (nextPageToFetch.current > 0) {\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\n\t\t\t\tif (notificationList.length) {\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\n\t\t\t\t\tfor (const notification of notificationList) {\n\t\t\t\t\t\taddNotification(notification);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Stop fetching after this one\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\n\t\tif (isTransparent && !isMac) {\n\t\t\tif (poppedOut) {\n\t\t\t\tif (show) {\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (show) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tfinsembleWindow.setShape([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tif (!poppedOut) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t}\n\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t}\n\t\t}\n\t};\n\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\n\tuseEffect(() => {\n\t\tsetOpaqueClassName(!config.isTransparent);\n\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\n\t\t\tapplicationState.current = response.data.state;\n\t\t});\n\n\t\tconst hide = (event: any) => {\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\n\t\t\tpublishValue[\"showCenter\"] = false;\n\t\t\tsetUIState(publishValue);\n\t\t\tif (applicationState?.current !== \"closing\") {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst scrollHandler = () => {\n\t\t\tif (getScrollPercentage() > 0.9) {\n\t\t\t\tlazyLoadNextPage();\n\t\t\t}\n\t\t};\n\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst recursiveLoad = async () => {\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\n\t\t\tawait lazyLoadNextPage();\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\n\t\t\t\trecursiveLoad();\n\t\t\t}\n\t\t};\n\n\t\trecursiveLoad();\n\t}, [viewMode, drawerControlProps.active]);\n\n\t// Hook to set up the center state from service data on component start\n\tuseEffect(() => {\n\t\tsubscriptionMessageRef.current = uiState;\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\n\t\t\tif (uiState.poppedOut) {\n\t\t\t\tremovePoppedInClasses();\n\t\t\t} else {\n\t\t\t\taddPoppedInClasses();\n\t\t\t}\n\n\t\t\tif (isValidPosition(uiState.position)) {\n\t\t\t\tsetShowWindowForState({\n\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\tposition: uiState.position,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Setup references\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\n\t\t\tsetInitialized(true);\n\t\t}\n\t}, [uiState]);\n\n\t// Effect to run when we pop-in or pop-out the notification center\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\n\t\t\t\tif (uiState.poppedOut) {\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds();\n\t\t\t\t\tremovePoppedInClasses();\n\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tconst centerWindowPosition = {\n\t\t\t\t\t\t\tleft: data.left - 25,\n\t\t\t\t\t\t\ttop: data.top + 25,\n\t\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\n\t\t\t\t\t\t\twidth: data.width,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tsetShowWindowForState({\n\t\t\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\t\t\tposition: centerWindowPosition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\taddPoppedInClasses();\n\t\t\t\t\tsetFullHeight(monitorInfo);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [uiState.poppedOut]);\n\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\n\t\t}\n\t}, [uiState.showCenter]);\n\n\tuseEffect(() => {\n\t\tsetFilteredNotifications([...notifications]);\n\t}, [notifications]);\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tsetReloadMuteFilters(true);\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\t// Sets the current active mute filters\n\tuseEffect(() => {\n\t\tasync function loadMuteFilter() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\n\t\t}\n\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\n\t\t\tsetMuteFilters(loadedMuteFilters);\n\t\t\tsetReloadMuteFilters(false);\n\t\t});\n\t}, [reloadMuteFilters]);\n\n\tconst notificationsMainView = () => (\n\t\t<>\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\n\t\t\t<DrawerControls />\n\t\t\t<div className=\"cards-container\">\n\t\t\t\t{viewMode === ViewMode.CARD ? (\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\n\t\t\t\t) : (\n\t\t\t\t\t<ListView\n\t\t\t\t\t\tnotifications={notifications}\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\n\n\treturn (\n\t\t<ConditionalWrapper\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\n\t\t\twrapper={(children) => (\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\n\t\t\t\t\t{children}\n\t\t\t\t</CSSTransition>\n\t\t\t)}\n\t\t>\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\n\t\t\t\t</Drawer>\n\t\t\t</NotificationsContext.Provider>\n\t\t</ConditionalWrapper>\n\t);\n};\n"]}
1
+ {"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,gDAAgD,CAAC;AAExD,QAAQ;AACR,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GACrB,MAAM,oCAAoC,CAAC;AAE5C,UAAU;AACV,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,aAAa;AACb,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,uBAAuB,MAAM,kCAAkC,CAAC;AAGvE,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,+FAA+F;AAC/F,oGAAoG;AACpG,IAAI,aAAa,EAAE,CAAC;AAMpB,MAAM,eAAe,GAAoC;IACxD,QAAQ,EAAE;QACT;YACC,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,CAAC,aAA8B,EAAE,EAAE,CAAC,aAAa;SACtD;QACD;YACC,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,QA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";\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\n\nimport { ViewMode, SelectionMode } from \"../../constants\";\n\nimport \"../../../../assets/css/notificationsCenter.css\";\n\n// Hooks\nimport useNotifications, {\n\tuseNotificationUI,\n\tgetNotificationConfig,\n\tmoveToToolbarMonitor,\n\tgetOS,\n\tgetFetchHistoryParams,\n} from \"../../../../hooks/useNotifications\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Types\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\n\n// Components\nimport CardView from \"../views/CardView\";\nimport Drawer from \"../drawer/Drawer\";\nimport DrawerControls from \"../drawer/DrawerControls\";\nimport DrawerHeader from \"../drawer/DrawerHeader\";\nimport ListView from \"../views/ListView\";\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\nimport { services } from \"@finsemble/finsemble-api\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype INotification = services.notification.types.INotification;\ntype IMuteFilter = services.notification.types.IMuteFilter;\n\nconst defaultControls: NotificationCenterControlsProps = {\n\tcontrols: [\n\t\t{\n\t\t\taction: \"all\",\n\t\t\tlabel: \"All\",\n\t\t\trun: (notifications: INotification[]) => notifications,\n\t\t},\n\t\t{\n\t\t\taction: \"unread\",\n\t\t\tlabel: \"Unread\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"read\",\n\t\t\tlabel: \"Read\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\n\t\t},\n\t\t{\n\t\t\taction: \"snoozed\",\n\t\t\tlabel: \"Snoozed\",\n\t\t\trun: (notifications: INotification[]) =>\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\n\t\t},\n\t],\n\tactive: \"all\",\n};\n\nconst addPoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\n};\n\nconst removePoppedInClasses = () => {\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\n};\n\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\n\tFSBL.Clients.StorageClient.save({\n\t\ttopic: \"finsemble.notifications\",\n\t\tkey: \"last.position\",\n\t\tvalue: {\n\t\t\tshowCenter,\n\t\t\tpoppedOut,\n\t\t\tposition,\n\t\t},\n\t});\n};\n\nconst setShowWindowForState = (centerState: any) => {\n\tif (centerState.showCenter) {\n\t\tfinsembleWindow.show({}, () => {\n\t\t\tfinsembleWindow.bringToFront();\n\t\t});\n\t}\n\n\tif (centerState.position) {\n\t\tfinsembleWindow.setBounds(centerState.position);\n\t}\n\n\t// Always on top when popped in\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\n\tstoreNotificationsCenterWindowPosition(centerState);\n};\n\nconst isValidPosition = (bounds: any): boolean =>\n\tbounds &&\n\ttypeof bounds.left !== \"undefined\" &&\n\ttypeof bounds.top !== \"undefined\" &&\n\ttypeof bounds.height !== \"undefined\" &&\n\ttypeof bounds.width !== \"undefined\";\n\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\n\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\n\tconst [uiState, setUIState] = useNotificationUI();\n\n\tconst config = getNotificationConfig();\n\tconst [isInitialized, setInitialized] = useState(false);\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\tconst nextPageToFetch = useRef(1);\n\n\t// Set up references for use in callbacks to FSBL functions\n\tconst showCenterRef = useRef(false);\n\tconst poppedOutRef = useRef(false);\n\tconst subscriptionMessageRef = useRef<any>({});\n\tconst applicationState = useRef(null);\n\tconst scrollContainer = useRef<HTMLDivElement>(null);\n\n\tconst [searchString, setSearchString] = useState(\"\");\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\n\tconst [isSelectAll, setSelectAll] = useState<boolean>(false);\n\tconst [checkedNotifications, setCheckedNotifications] = useState<INotification[]>([]);\n\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\n\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\n\tconst notificationsContextValues: NotificationsContextType = {\n\t\tviewMode,\n\t\tsetViewMode,\n\t\tselectionMode,\n\t\tsetSelectionMode,\n\t\tdrawerControlProps,\n\t\tsetDrawerControlProps,\n\t\tselectedNotification,\n\t\tsetSelectedNotification,\n\t\tsearchString,\n\t\tsetSearchString,\n\t\tfilteredNotifications,\n\t\tcheckedNotifications,\n\t\tsetCheckedNotifications,\n\t\tsetFilteredNotifications,\n\t\tmuteFilters,\n\t\tsetMuteFilters,\n\t\tisSelectAll,\n\t\tsetSelectAll,\n\t};\n\n\tconst togglePoppedStatus = () => {\n\t\tconst poppedOut = !uiState.poppedOut;\n\t\tpoppedOutRef.current = poppedOut;\n\t\tsetUIState({\n\t\t\t...uiState,\n\t\t\tpoppedOut,\n\t\t});\n\t};\n\n\tconst setFullHeight = async (monitorInfo?: any) => {\n\t\tif (!monitorInfo) {\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\n\t\t\t\t\tmonitorInfo = monitor;\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tconst { data } = await finsembleWindow.getBounds();\n\t\tif (data) {\n\t\t\tconst centerWindowPosition = {\n\t\t\t\tleft: monitorInfo.availableRect.right - data.width,\n\t\t\t\ttop: monitorInfo.availableRect.top,\n\t\t\t\theight: monitorInfo.availableRect.height,\n\t\t\t\twidth: data.width,\n\t\t\t};\n\n\t\t\tsetShowWindowForState({\n\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\t\tposition: centerWindowPosition,\n\t\t\t});\n\n\t\t\tfinsembleWindow.setShape([]);\n\t\t}\n\t};\n\n\tconst boundsChangeListener = (event: any) => {\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\n\t\t\tsetFullHeight();\n\t\t}\n\t\tconst position = {\n\t\t\ttop: event.data.top,\n\t\t\tleft: event.data.left,\n\t\t\theight: event.data.height,\n\t\t\twidth: event.data.width,\n\t\t};\n\n\t\tstoreNotificationsCenterWindowPosition({\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\n\t\t\tpoppedOut: poppedOutRef.current,\n\t\t\tposition,\n\t\t});\n\t};\n\n\tconst getScrollPercentage = () => {\n\t\t// document.getElementsByClassName(\"cards-container\")[0].scrollHeight - document.getElementsByClassName(\"cards-container\")[0].clientHeight\n\t\tconst maxScroll = (scrollContainer.current?.scrollHeight ?? 0) - (scrollContainer.current?.clientHeight ?? 0);\n\t\tconst currentScroll = scrollContainer.current?.scrollTop ?? 0;\n\t\treturn currentScroll / maxScroll;\n\t};\n\n\tconst lazyLoadNextPage = async () =>\n\t\tnew Promise<void>(async (resolve) => {\n\t\t\tif (nextPageToFetch.current > 0) {\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\n\t\t\t\tif (notificationList.length) {\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\n\t\t\t\t\tfor (const notification of notificationList) {\n\t\t\t\t\t\taddNotification(notification);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Stop fetching after this one\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\n\t\tif (isTransparent && !isMac) {\n\t\t\tif (poppedOut) {\n\t\t\t\tif (show) {\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (show) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t\t\tfinsembleWindow.setShape([]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tfinsembleWindow.setShape([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tfinsembleWindow.hide();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (show) {\n\t\t\t\tif (!poppedOut) {\n\t\t\t\t\tawait moveToToolbarMonitor();\n\t\t\t\t\tawait setFullHeight();\n\t\t\t\t}\n\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t}\n\t\t}\n\t};\n\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\n\tuseEffect(() => {\n\t\tsetOpaqueClassName(!config.isTransparent);\n\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\n\t\t\tapplicationState.current = response.data.state;\n\t\t});\n\n\t\tconst hide = (event: any) => {\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\n\t\t\tpublishValue[\"showCenter\"] = false;\n\t\t\tsetUIState(publishValue);\n\t\t\tif (applicationState?.current !== \"closing\") {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst scrollHandler = () => {\n\t\t\tif (getScrollPercentage() > 0.9) {\n\t\t\t\tlazyLoadNextPage();\n\t\t\t}\n\t\t};\n\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\tscrollContainer.current?.addEventListener(\"scroll\", scrollHandler);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\n\t\t\tscrollContainer.current?.removeEventListener(\"scroll\", scrollHandler);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst recursiveLoad = async () => {\n\t\t\t// Cater for the case where there is no scroll bar to trigger lazy load - keep loading until scrollbar or no pages\n\t\t\tawait lazyLoadNextPage();\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\n\t\t\t\trecursiveLoad();\n\t\t\t}\n\t\t};\n\n\t\trecursiveLoad();\n\t}, [viewMode, drawerControlProps.active]);\n\n\t// Hook to set up the center state from service data on component start\n\tuseEffect(() => {\n\t\tsubscriptionMessageRef.current = uiState;\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\n\t\t\tif (uiState.poppedOut) {\n\t\t\t\tremovePoppedInClasses();\n\t\t\t} else {\n\t\t\t\taddPoppedInClasses();\n\t\t\t}\n\n\t\t\tif (isValidPosition(uiState.position)) {\n\t\t\t\tsetShowWindowForState({\n\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\tposition: uiState.position,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Setup references\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\n\t\t\tsetInitialized(true);\n\t\t}\n\t}, [uiState]);\n\n\t// Effect to run when we pop-in or pop-out the notification center\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\n\t\t\t\tif (uiState.poppedOut) {\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds();\n\t\t\t\t\tremovePoppedInClasses();\n\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tconst centerWindowPosition = {\n\t\t\t\t\t\t\tleft: data.left - 25,\n\t\t\t\t\t\t\ttop: data.top + 25,\n\t\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\n\t\t\t\t\t\t\twidth: data.width,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tsetShowWindowForState({\n\t\t\t\t\t\t\tshowCenter: uiState.showCenter,\n\t\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\n\t\t\t\t\t\t\tposition: centerWindowPosition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\taddPoppedInClasses();\n\t\t\t\t\tsetFullHeight(monitorInfo);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [uiState.poppedOut]);\n\n\tuseEffect(() => {\n\t\tif (isInitialized) {\n\t\t\tshowCenterRef.current = uiState.showCenter;\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\n\t\t}\n\t}, [uiState.showCenter]);\n\n\tuseEffect(() => {\n\t\tsetFilteredNotifications([...notifications]);\n\t}, [notifications]);\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tsetReloadMuteFilters(true);\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\t// Sets the current active mute filters\n\tuseEffect(() => {\n\t\tasync function loadMuteFilter() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\n\t\t}\n\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\n\t\t\tsetMuteFilters(loadedMuteFilters);\n\t\t\tsetReloadMuteFilters(false);\n\t\t});\n\t}, [reloadMuteFilters]);\n\n\t// Sets the select all status from user selecting notifications individually\n\tuseEffect(() => {\n\t\tif (notifications.length > 0 && checkedNotifications.length === notifications.length) {\n\t\t\tsetSelectAll(true);\n\t\t}\n\t}, [checkedNotifications, notifications]);\n\n\tconst notificationsMainView = () => (\n\t\t<>\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\n\t\t\t<DrawerControls />\n\t\t\t<div className=\"cards-container\" ref={scrollContainer}>\n\t\t\t\t{viewMode === ViewMode.CARD ? (\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\n\t\t\t\t) : (\n\t\t\t\t\t<ListView\n\t\t\t\t\t\tnotifications={notifications}\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\n\n\treturn (\n\t\t<ConditionalWrapper\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\n\t\t\twrapper={(children) => (\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\n\t\t\t\t\t{children}\n\t\t\t\t</CSSTransition>\n\t\t\t)}\n\t\t>\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\n\t\t\t\t</Drawer>\n\t\t\t</NotificationsContext.Provider>\n\t\t</ConditionalWrapper>\n\t);\n};\n"]}
@@ -4,32 +4,38 @@ import { NotificationCardShell } from "../shared/NotificationCardShell";
4
4
  import { CSSTransition } from "react-transition-group";
5
5
  import "../../../../assets/css/notificationsCenter.css";
6
6
  const ToastCard = (props) => {
7
- const notificationRef = useRef();
8
7
  const { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } = props;
8
+ const notificationRef = useRef(notification);
9
9
  const [slideIn, setSlideIn] = useState(isActiveFunction(notification));
10
10
  const [showNotification] = useState(isActiveFunction(notification));
11
+ const [timeoutId, setTimeoutId] = useState();
11
12
  useEffect(() => {
12
- notificationRef.current = notification;
13
- let timeoutId;
13
+ return () => {
14
+ if (timeoutId) {
15
+ clearInterval(timeoutId);
16
+ }
17
+ };
18
+ }, []);
19
+ useEffect(() => {
20
+ if (timeoutId) {
21
+ clearInterval(timeoutId);
22
+ }
14
23
  if (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {
24
+ // Is an informational notification or timeout enabled actionable notifications
15
25
  let timeoutLength;
16
26
  if (informationalNotificationTimeout !== false) {
27
+ // Convert to milliseconds
17
28
  timeoutLength = informationalNotificationTimeout * 1000;
18
29
  if (notification.timeout && Number.isInteger(notification.timeout)) {
19
30
  timeoutLength = notification.timeout;
20
31
  }
21
32
  }
22
33
  if (timeoutLength) {
23
- timeoutId = setTimeout(() => {
34
+ setTimeoutId(setTimeout(() => {
24
35
  setSlideIn(false);
25
- }, timeoutLength);
36
+ }, timeoutLength));
26
37
  }
27
38
  }
28
- return () => {
29
- clearInterval(timeoutId);
30
- };
31
- }, []);
32
- useEffect(() => {
33
39
  if (!isActiveFunction(notificationRef.current)) {
34
40
  removeFunction(notification);
35
41
  }
@@ -100,6 +106,7 @@ export const NotificationsToasts = (props) => {
100
106
  let forceHide = false;
101
107
  if (activeNotifications(notifications).length === 0 &&
102
108
  activeNotifications(notificationsRef.current).length === 0) {
109
+ // Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)
103
110
  forceHide = true;
104
111
  }
105
112
  notificationsRef.current = notifications;