@finsemble/finsemble-ui 6.2.0 → 6.3.0-beta.20211008

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 (705) hide show
  1. package/package.json +17 -16
  2. package/react/actions/smartDesktopDesignerActions.d.ts +7 -8
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/actions/toolbarActions.d.ts +2 -3
  5. package/react/actions/toolbarActions.js.map +1 -1
  6. package/react/assets/css/notificationsCenter.css +4 -2
  7. package/react/assets/css/userPreferences.css +1 -0
  8. package/react/assets/css/windowTitleBar.css +33 -1
  9. package/react/components/FinsembleProvider.js +1 -1
  10. package/react/components/FinsembleProvider.js.map +1 -1
  11. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  12. package/react/components/appCatalog/components/AppList.d.ts +7 -1
  13. package/react/components/appCatalog/components/AppList.js +1 -1
  14. package/react/components/appCatalog/components/AppList.js.map +1 -1
  15. package/react/components/appCatalog/components/AppResults.d.ts +10 -8
  16. package/react/components/appCatalog/components/AppResults.js +1 -1
  17. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  18. package/react/components/appCatalog/components/Carousel.js +1 -1
  19. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  20. package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
  21. package/react/components/appCatalog/components/EmptyResults.js +2 -4
  22. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  23. package/react/components/appCatalog/components/Hero.d.ts +24 -4
  24. package/react/components/appCatalog/components/Hero.js +2 -1
  25. package/react/components/appCatalog/components/Hero.js.map +1 -1
  26. package/react/components/appCatalog/components/Home.d.ts +18 -4
  27. package/react/components/appCatalog/components/Home.js.map +1 -1
  28. package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
  29. package/react/components/appCatalog/components/SearchBar.js +4 -7
  30. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  31. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
  32. package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
  33. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  34. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
  35. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  36. package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
  37. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  38. package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
  39. package/react/components/appCatalog/components/Showcase/Header.js +2 -2
  40. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  41. package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
  42. package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
  43. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  44. package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
  45. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  46. package/react/components/appCatalog/components/Tag.d.ts +6 -4
  47. package/react/components/appCatalog/components/Tag.js.map +1 -1
  48. package/react/components/appCatalog/components/Toast.d.ts +5 -3
  49. package/react/components/appCatalog/components/Toast.js +5 -4
  50. package/react/components/appCatalog/components/Toast.js.map +1 -1
  51. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
  52. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  53. package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
  54. package/react/components/appCatalog/modules/FDC3.js +20 -18
  55. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  56. package/react/components/appCatalog/stores/appStore.d.ts +9 -2
  57. package/react/components/appCatalog/stores/appStore.js +10 -4
  58. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  59. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  60. package/react/components/common/Button.d.ts +4 -4
  61. package/react/components/common/Button.js +1 -1
  62. package/react/components/common/Button.js.map +1 -1
  63. package/react/components/common/ButtonIcon.js +1 -1
  64. package/react/components/common/ButtonIcon.js.map +1 -1
  65. package/react/components/common/ColorPicker.js +1 -1
  66. package/react/components/common/ColorPicker.js.map +1 -1
  67. package/react/components/common/DropZone.d.ts +0 -5
  68. package/react/components/common/DropZone.js.map +1 -1
  69. package/react/components/common/DropdownButton.js +1 -1
  70. package/react/components/common/DropdownButton.js.map +1 -1
  71. package/react/components/common/FileInput.d.ts +0 -5
  72. package/react/components/common/FileInput.js +7 -9
  73. package/react/components/common/FileInput.js.map +1 -1
  74. package/react/components/common/FinsembleIcon.d.ts +2 -2
  75. package/react/components/common/FinsembleIcon.js.map +1 -1
  76. package/react/components/common/FinsembleSelect.js +2 -5
  77. package/react/components/common/FinsembleSelect.js.map +1 -1
  78. package/react/components/common/FinsembleToggle.js +2 -2
  79. package/react/components/common/FinsembleToggle.js.map +1 -1
  80. package/react/components/common/FontSizeSelector.js +2 -2
  81. package/react/components/common/FontSizeSelector.js.map +1 -1
  82. package/react/components/common/ImagePreview.js +2 -2
  83. package/react/components/common/ImagePreview.js.map +1 -1
  84. package/react/components/common/Tab.js +2 -1
  85. package/react/components/common/Tab.js.map +1 -1
  86. package/react/components/common/file_helpers.js +3 -2
  87. package/react/components/common/file_helpers.js.map +1 -1
  88. package/react/components/common/helpers.js +8 -10
  89. package/react/components/common/helpers.js.map +1 -1
  90. package/react/components/common/stories/Button.stories.js +1 -1
  91. package/react/components/common/stories/Button.stories.js.map +1 -1
  92. package/react/components/common/stories/ButtonIcon.stories.js +1 -1
  93. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  94. package/react/components/common/stories/ButtonRow.stories.js +2 -2
  95. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  96. package/react/components/common/stories/ButtonTile.stories.js +1 -1
  97. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  98. package/react/components/common/stories/Checkbox.stories.js +1 -1
  99. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  100. package/react/components/common/stories/ColorPicker.stories.js +1 -1
  101. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  102. package/react/components/common/stories/DropZone.stories.js +1 -1
  103. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  104. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  105. package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
  106. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  107. package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
  108. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  109. package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
  110. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  111. package/react/components/common/stories/Header.stories.js +1 -1
  112. package/react/components/common/stories/Header.stories.js.map +1 -1
  113. package/react/components/common/tests/Checkbox.spec.js +4 -4
  114. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  115. package/react/components/common/tests/ColorPicker.spec.js +6 -6
  116. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  117. package/react/components/common/tests/DropZone.spec.js +4 -4
  118. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  119. package/react/components/common/tests/FileInput.spec.js +5 -5
  120. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  121. package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
  122. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  123. package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
  124. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  125. package/react/components/common/tests/Header.spec.js +3 -3
  126. package/react/components/common/tests/Header.spec.js.map +1 -1
  127. package/react/components/common/tests/ImagePreview.spec.js +8 -8
  128. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  129. package/react/components/common/tests/Tab.spec.js +3 -3
  130. package/react/components/common/tests/Tab.spec.js.map +1 -1
  131. package/react/components/common/tests/Tooltip.spec.js +5 -5
  132. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  133. package/react/components/favorites/FavoriteMaker.d.ts +0 -5
  134. package/react/components/favorites/FavoriteMaker.js +1 -1
  135. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  136. package/react/components/favorites/FavoritesShell.js +1 -1
  137. package/react/components/favorites/FavoritesShell.js.map +1 -1
  138. package/react/components/favorites/FavoritesShell.spec.js +7 -7
  139. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  140. package/react/components/favorites/FavoritesShell.stories.js +5 -4
  141. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  142. package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
  143. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  144. package/react/components/fdc3Resolver/ResolverDialog.js +13 -13
  145. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  146. package/react/components/fdc3Resolver/ResolverDialog.spec.js +5 -5
  147. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  148. package/react/components/fdc3Resolver/ResolverDialog.stories.js +1 -1
  149. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  150. package/react/components/icon/Icon.js +5 -4
  151. package/react/components/icon/Icon.js.map +1 -1
  152. package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
  153. package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
  154. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  155. package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
  156. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  157. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  158. package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
  159. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  160. package/react/components/legacyControls/FinsembleDnDContext.js +18 -17
  161. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  162. package/react/components/legacyControls/FinsembleDraggable.js +3 -3
  163. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  164. package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
  165. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  166. package/react/components/legacyControls/FinsembleMenuSection.js +6 -3
  167. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  168. package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
  169. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  170. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
  171. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  172. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
  173. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  174. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
  175. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  176. package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
  177. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  178. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
  179. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  180. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
  181. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  182. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
  183. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  184. package/react/components/linker/LinkerMenu.js +4 -3
  185. package/react/components/linker/LinkerMenu.js.map +1 -1
  186. package/react/components/linker/LinkerMenuDeprecated.js +1 -1
  187. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  188. package/react/components/linker/remoteRedux.d.ts +10 -42
  189. package/react/components/linker/remoteRedux.js.map +1 -1
  190. package/react/components/menu/Menu.d.ts +1 -1
  191. package/react/components/menu/Menu.js +1 -1
  192. package/react/components/menu/Menu.js.map +1 -1
  193. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  194. package/react/components/menu/MenuPortal.js +7 -6
  195. package/react/components/menu/MenuPortal.js.map +1 -1
  196. package/react/components/menu/keyboardNavigation.js +14 -15
  197. package/react/components/menu/keyboardNavigation.js.map +1 -1
  198. package/react/components/notifications/components/NoNotifications.js +2 -4
  199. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  200. package/react/components/notifications/components/drawer/Drawer.js +2 -4
  201. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  202. package/react/components/notifications/components/drawer/DrawerControls.js +2 -4
  203. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  204. package/react/components/notifications/components/drawer/DrawerHeader.js +1 -4
  205. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  206. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +28 -43
  207. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  208. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +10 -9
  209. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  210. package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
  211. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  212. package/react/components/notifications/components/shared/IconButton.js +3 -5
  213. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  214. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
  215. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  216. package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
  217. package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
  218. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  219. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
  220. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +1 -1
  221. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  222. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
  223. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  224. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
  225. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
  226. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  227. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
  228. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  229. package/react/components/notifications/components/views/CardView.js +15 -24
  230. package/react/components/notifications/components/views/CardView.js.map +1 -1
  231. package/react/components/notifications/components/views/ListView.d.ts +2 -2
  232. package/react/components/notifications/components/views/ListView.js +9 -9
  233. package/react/components/notifications/components/views/ListView.js.map +1 -1
  234. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
  235. package/react/components/notifications/components/views/NotificationDetailsView.js +2 -6
  236. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  237. package/react/components/notifications/types.d.ts +7 -6
  238. package/react/components/notifications/types.js.map +1 -1
  239. package/react/components/notifications/utils.d.ts +6 -4
  240. package/react/components/notifications/utils.js +26 -32
  241. package/react/components/notifications/utils.js.map +1 -1
  242. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
  243. package/react/components/processMonitor/ProcessMonitor.js +17 -10
  244. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  245. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
  246. package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
  247. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
  248. package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
  249. package/react/components/processMonitor/components/ChildWindow.js +19 -10
  250. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  251. package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
  252. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  253. package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
  254. package/react/components/processMonitor/components/ProcessStatistics.js +25 -18
  255. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  256. package/react/components/processMonitor/constants.d.ts +11 -16
  257. package/react/components/processMonitor/constants.js +3 -1
  258. package/react/components/processMonitor/constants.js.map +1 -1
  259. package/react/components/processMonitor/helpers.d.ts +25 -5
  260. package/react/components/processMonitor/helpers.js +28 -20
  261. package/react/components/processMonitor/helpers.js.map +1 -1
  262. package/react/components/processMonitor/helpers.spec.d.ts +1 -0
  263. package/react/components/processMonitor/helpers.spec.js +44 -0
  264. package/react/components/processMonitor/helpers.spec.js.map +1 -0
  265. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +30 -15
  266. package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
  267. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  268. package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
  269. package/react/components/quickComponentForm/QuickComponentForm.js +13 -14
  270. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  271. package/react/components/search/Highlight.js +2 -2
  272. package/react/components/search/Highlight.js.map +1 -1
  273. package/react/components/search/Highlight.spec.js +3 -3
  274. package/react/components/search/Highlight.spec.js.map +1 -1
  275. package/react/components/search/Highlight.stories.js +1 -1
  276. package/react/components/search/Highlight.stories.js.map +1 -1
  277. package/react/components/search/Search.js +17 -8
  278. package/react/components/search/Search.js.map +1 -1
  279. package/react/components/search/SearchBestMatch.js +2 -1
  280. package/react/components/search/SearchBestMatch.js.map +1 -1
  281. package/react/components/search/SearchProviderResults.js +4 -5
  282. package/react/components/search/SearchProviderResults.js.map +1 -1
  283. package/react/components/search/SearchResult.js +3 -2
  284. package/react/components/search/SearchResult.js.map +1 -1
  285. package/react/components/search/SearchResults.js +1 -1
  286. package/react/components/search/SearchResults.js.map +1 -1
  287. package/react/components/shared/Button.js +2 -4
  288. package/react/components/shared/Button.js.map +1 -1
  289. package/react/components/shared/DefaultDropdownButton.js +1 -1
  290. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  291. package/react/components/shared/NavigationButton.js +9 -11
  292. package/react/components/shared/NavigationButton.js.map +1 -1
  293. package/react/components/shared/Tag.d.ts +11 -1
  294. package/react/components/shared/Tag.js.map +1 -1
  295. package/react/components/shared/TagsMenu.d.ts +26 -6
  296. package/react/components/shared/TagsMenu.js.map +1 -1
  297. package/react/components/shared/linkerUtil.d.ts +3 -1
  298. package/react/components/shared/linkerUtil.js.map +1 -1
  299. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  300. package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
  301. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  302. package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
  303. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  304. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +1 -1
  305. package/react/components/smartDesktopDesigner/AppEditAccess.js +17 -34
  306. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  307. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +4 -4
  308. package/react/components/smartDesktopDesigner/AppEditPage.js +2 -2
  309. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  310. package/react/components/smartDesktopDesigner/Appearance.js +3 -5
  311. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  312. package/react/components/smartDesktopDesigner/Application.d.ts +4 -4
  313. package/react/components/smartDesktopDesigner/Application.js +84 -92
  314. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  315. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +1 -1
  316. package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
  317. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  318. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
  319. package/react/components/smartDesktopDesigner/ApplicationList.js +23 -20
  320. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  321. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +4 -3
  322. package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
  323. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  324. package/react/components/smartDesktopDesigner/Applications.d.ts +0 -1
  325. package/react/components/smartDesktopDesigner/Applications.js +73 -62
  326. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  327. package/react/components/smartDesktopDesigner/Authentication.js +2 -8
  328. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  329. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
  330. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  331. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  332. package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
  333. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  334. package/react/components/smartDesktopDesigner/Export.js +3 -3
  335. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  336. package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
  337. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  338. package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
  339. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
  341. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  342. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
  343. package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
  344. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  345. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
  346. package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
  347. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/Publish.js +1 -1
  349. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  351. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -24
  352. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  353. package/react/components/smartDesktopDesigner/Themes.js +2 -8
  354. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  355. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -1
  357. package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
  358. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
  360. package/react/components/smartDesktopDesigner/common/views.js +4 -14
  361. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  362. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +4 -4
  363. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +2 -2
  365. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +2 -3
  367. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +4 -70
  369. package/react/components/smartDesktopDesigner/fixtures/apps.js +9 -20
  370. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  371. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
  373. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
  375. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
  377. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
  379. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +8 -8
  380. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
  382. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  383. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
  384. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  385. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
  386. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  387. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
  388. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  389. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +1 -1
  390. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
  392. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  393. package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
  394. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  395. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
  396. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  397. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
  398. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  399. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
  400. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
  401. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  402. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
  403. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  404. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
  405. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  406. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
  407. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
  408. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
  410. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
  412. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  413. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
  414. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  415. package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
  416. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  417. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +32 -32
  418. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  419. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
  420. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  421. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
  422. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  423. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
  424. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  425. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +35 -35
  426. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  427. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
  428. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  429. package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
  430. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  431. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
  432. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  433. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
  434. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  435. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
  436. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  437. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
  438. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
  440. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
  442. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
  444. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  445. package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
  446. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  447. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +2 -1
  448. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  449. package/react/components/system/System.spec.js +1 -1
  450. package/react/components/system/System.spec.js.map +1 -1
  451. package/react/components/system/SystemTrayComponentShell.js +1 -1
  452. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  453. package/react/components/toolbar/MinimizeAll.spec.js +5 -5
  454. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  455. package/react/components/toolbar/NotificationControl.js +3 -2
  456. package/react/components/toolbar/NotificationControl.js.map +1 -1
  457. package/react/components/toolbar/RevealAll.spec.js +5 -5
  458. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  459. package/react/components/toolbar/ToolbarIcon.js +14 -2
  460. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  461. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
  462. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
  463. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  464. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
  465. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  466. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
  467. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +24 -3
  468. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  469. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
  470. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
  471. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  472. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
  473. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
  474. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  475. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
  476. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +5 -4
  477. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  478. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
  479. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -2
  480. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  481. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
  482. package/react/components/toolbar/advancedAppLauncher/components/Content.js +23 -29
  483. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  484. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
  485. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
  486. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  487. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
  488. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +13 -8
  489. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  490. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
  491. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +7 -3
  492. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  493. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
  494. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
  495. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  496. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
  497. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
  498. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  499. package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
  500. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
  501. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  502. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
  503. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
  504. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  505. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
  506. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
  507. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  508. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -1
  509. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  510. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
  511. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  512. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
  513. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
  514. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  515. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +5 -4
  516. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  517. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
  518. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
  519. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  520. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
  521. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  522. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  523. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  524. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
  525. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +3 -10
  526. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  527. package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
  528. package/react/components/toolbar/appLauncher/components/componentList.js +24 -21
  529. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  530. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
  531. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +37 -55
  532. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  533. package/react/components/toolbar/dashbar/Dashbar.js +2 -3
  534. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  535. package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
  536. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  537. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
  538. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
  539. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  540. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
  541. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  542. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
  543. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
  544. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  545. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
  546. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
  547. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  548. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +65 -11
  549. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
  550. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  551. package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
  552. package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
  553. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
  554. package/react/components/userPreferences/UserPreferencesBase.js +2 -2
  555. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  556. package/react/components/userPreferences/UserPreferencesWrapper.js +1 -1
  557. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  558. package/react/components/userPreferences/components/ContentSection.js +2 -1
  559. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  560. package/react/components/userPreferences/components/LeftNav.d.ts +1 -1
  561. package/react/components/userPreferences/components/LeftNav.js +1 -1
  562. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  563. package/react/components/userPreferences/components/content/DashbarEditor.js +1 -1
  564. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  565. package/react/components/userPreferences/components/content/Notifications.js +2 -0
  566. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  567. package/react/components/userPreferences/components/content/Workspaces.js +21 -10
  568. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  569. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +48 -51
  570. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  571. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -9
  572. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  573. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +4 -6
  574. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  575. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
  576. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  577. package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -1
  578. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  579. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +3 -4
  580. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -1
  581. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  582. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -5
  583. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  584. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +15 -8
  585. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  586. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +16 -2
  587. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  588. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -12
  589. package/react/components/userPreferences/stores/UserPreferencesStore.js +9 -16
  590. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  591. package/react/components/userPreferences/stories/DashbarEditor.stories.js +1 -1
  592. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  593. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +1 -1
  594. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  595. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  596. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +1 -1
  597. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  598. package/react/components/userPreferences/stories/NotificationsSources.stories.js +1 -1
  599. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  600. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +1 -1
  601. package/react/components/userPreferences/stories/UserPreferences.stories.js +1 -1
  602. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  603. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +5 -9
  604. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +10 -3
  605. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  606. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +2 -2
  607. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  608. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  609. package/react/components/userPreferences/stories/Workspaces.stories.js +1 -1
  610. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  611. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  612. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  613. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  614. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  615. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  616. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  617. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  618. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  619. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  620. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  621. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +17 -3
  622. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  623. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +1 -1
  624. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  625. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  626. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  627. package/react/components/utils.js +1 -1
  628. package/react/components/utils.js.map +1 -1
  629. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
  630. package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
  631. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  632. package/react/components/windowTitleBar/components/center/Tab.d.ts +27 -7
  633. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  634. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  635. package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
  636. package/react/components/windowTitleBar/components/center/TabList.js +111 -37
  637. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  638. package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
  639. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  640. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
  641. package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
  642. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  643. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
  644. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
  645. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  646. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
  647. package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
  648. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  649. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +1 -21
  650. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
  651. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  652. package/react/components/windowTitleBar/components/windowTitle.js +11 -6
  653. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  654. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
  655. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
  656. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  657. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
  658. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  659. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
  660. package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
  661. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  662. package/react/components/yesNoDialog/Timer.spec.js +2 -2
  663. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  664. package/react/components/yesNoDialog/Timer.stories.js +1 -1
  665. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  666. package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
  667. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  668. package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
  669. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  670. package/react/hooks/useFavoritesShell.js.map +1 -1
  671. package/react/hooks/useLinker.js +1 -1
  672. package/react/hooks/useLinker.js.map +1 -1
  673. package/react/hooks/useMenu.js +1 -1
  674. package/react/hooks/useMenu.js.map +1 -1
  675. package/react/hooks/useNotifications.d.ts +6 -6
  676. package/react/hooks/useNotifications.js +16 -17
  677. package/react/hooks/useNotifications.js.map +1 -1
  678. package/react/hooks/useSearch.js +1 -1
  679. package/react/hooks/useSearch.js.map +1 -1
  680. package/react/hooks/useToolbar.js.map +1 -1
  681. package/react/hooks/useWorkspace.js +1 -1
  682. package/react/hooks/useWorkspace.js.map +1 -1
  683. package/react/reducers/favoriteReducer.js +1 -1
  684. package/react/reducers/favoriteReducer.js.map +1 -1
  685. package/react/reducers/rootReducer.d.ts +3 -4
  686. package/react/reducers/toolbarReducer.js +1 -1
  687. package/react/reducers/toolbarReducer.js.map +1 -1
  688. package/react/store.d.ts +6 -7
  689. package/react/types/advancedAppLauncherTypes.d.ts +28 -1
  690. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  691. package/react/types/favoriteTypes.d.ts +1 -1
  692. package/react/types/favoriteTypes.js.map +1 -1
  693. package/react/types/fdc3.d.ts +22 -0
  694. package/react/types/fdc3.js.map +1 -1
  695. package/react/types/smartDesktopDesignerTypes.d.ts +11 -9
  696. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  697. package/react/types/windowTitleBar.d.ts +46 -0
  698. package/react/types/windowTitleBar.js +2 -0
  699. package/react/types/windowTitleBar.js.map +1 -0
  700. package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
  701. package/react/components/processMonitor/components/ChildWindows.js +0 -11
  702. package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
  703. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
  704. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
  705. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
@@ -16,41 +16,35 @@ const defaultControls = {
16
16
  {
17
17
  action: "all",
18
18
  label: "All",
19
- run: (notifications) => {
20
- return notifications;
21
- },
19
+ run: (notifications) => notifications,
22
20
  },
23
21
  {
24
22
  action: "unread",
25
23
  label: "Unread",
26
- run: (notifications) => {
27
- return notifications.filter((notification) => !notification.isRead);
28
- },
24
+ run: (notifications) => notifications.filter((notification) => !notification.isRead),
29
25
  },
30
26
  {
31
27
  action: "read",
32
28
  label: "Read",
33
- run: (notifications) => {
34
- return notifications.filter((notification) => notification.isRead);
35
- },
29
+ run: (notifications) => notifications.filter((notification) => notification.isRead),
36
30
  },
37
31
  {
38
32
  action: "snoozed",
39
33
  label: "Snoozed",
40
- run: (notifications) => {
41
- return notifications.filter((notification) => notification.isSnoozed);
42
- },
34
+ run: (notifications) => notifications.filter((notification) => notification.isSnoozed),
43
35
  },
44
36
  ],
45
37
  active: "all",
46
38
  };
47
39
  const addPoppedInClasses = () => {
48
- document.getElementById("notifications-center-container")?.classList.add("notifications-popped-in");
49
- document.getElementById("FSBLHeader")?.classList.add("notifications-popped-in");
40
+ var _a, _b;
41
+ (_a = document.getElementById("notifications-center-container")) === null || _a === void 0 ? void 0 : _a.classList.add("notifications-popped-in");
42
+ (_b = document.getElementById("FSBLHeader")) === null || _b === void 0 ? void 0 : _b.classList.add("notifications-popped-in");
50
43
  };
51
44
  const removePoppedInClasses = () => {
52
- document.getElementById("notifications-center-container")?.classList.remove("notifications-popped-in");
53
- document.getElementById("FSBLHeader")?.classList.remove("notifications-popped-in");
45
+ var _a, _b;
46
+ (_a = document.getElementById("notifications-center-container")) === null || _a === void 0 ? void 0 : _a.classList.remove("notifications-popped-in");
47
+ (_b = document.getElementById("FSBLHeader")) === null || _b === void 0 ? void 0 : _b.classList.remove("notifications-popped-in");
54
48
  };
55
49
  const storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }) => {
56
50
  FSBL.Clients.StorageClient.save({
@@ -75,13 +69,11 @@ const setShowWindowForState = (centerState) => {
75
69
  FSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);
76
70
  storeNotificationsCenterWindowPosition(centerState);
77
71
  };
78
- const isValidPosition = (bounds) => {
79
- return (bounds &&
80
- typeof bounds.left !== "undefined" &&
81
- typeof bounds.top !== "undefined" &&
82
- typeof bounds.height !== "undefined" &&
83
- typeof bounds.width !== "undefined");
84
- };
72
+ const isValidPosition = (bounds) => bounds &&
73
+ typeof bounds.left !== "undefined" &&
74
+ typeof bounds.top !== "undefined" &&
75
+ typeof bounds.height !== "undefined" &&
76
+ typeof bounds.width !== "undefined";
85
77
  const LAZY_LOAD_NO_MORE_PAGES = -1;
86
78
  export const NotificationsCenter = (props) => {
87
79
  const params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };
@@ -125,10 +117,7 @@ export const NotificationsCenter = (props) => {
125
117
  const togglePoppedStatus = () => {
126
118
  const poppedOut = !uiState.poppedOut;
127
119
  poppedOutRef.current = poppedOut;
128
- setUIState({
129
- ...uiState,
130
- poppedOut,
131
- });
120
+ setUIState(Object.assign(Object.assign({}, uiState), { poppedOut }));
132
121
  };
133
122
  const setFullHeight = async (monitorInfo) => {
134
123
  if (!monitorInfo) {
@@ -154,7 +143,7 @@ export const NotificationsCenter = (props) => {
154
143
  FSBL.Clients.WindowClient.setShape([]);
155
144
  };
156
145
  const boundsChangeListener = (event) => {
157
- if (showCenterRef?.current && !poppedOutRef.current) {
146
+ if ((showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) && !poppedOutRef.current) {
158
147
  setFullHeight();
159
148
  }
160
149
  const position = {
@@ -164,7 +153,7 @@ export const NotificationsCenter = (props) => {
164
153
  width: event.data.width,
165
154
  };
166
155
  storeNotificationsCenterWindowPosition({
167
- showCenter: showCenterRef?.current ? showCenterRef.current : false,
156
+ showCenter: (showCenterRef === null || showCenterRef === void 0 ? void 0 : showCenterRef.current) ? showCenterRef.current : false,
168
157
  poppedOut: poppedOutRef.current,
169
158
  position,
170
159
  });
@@ -253,10 +242,10 @@ export const NotificationsCenter = (props) => {
253
242
  applicationState.current = response.data.state;
254
243
  });
255
244
  const hide = (event) => {
256
- const publishValue = { ...subscriptionMessageRef.current };
245
+ const publishValue = Object.assign({}, subscriptionMessageRef.current);
257
246
  publishValue["showCenter"] = false;
258
247
  setUIState(publishValue);
259
- if (applicationState?.current !== "closing") {
248
+ if ((applicationState === null || applicationState === void 0 ? void 0 : applicationState.current) !== "closing") {
260
249
  try {
261
250
  event.cancel();
262
251
  }
@@ -346,7 +335,7 @@ export const NotificationsCenter = (props) => {
346
335
  setFilteredNotifications([...notifications]);
347
336
  }, [notifications]);
348
337
  useEffect(() => {
349
- function listenMuteStateChanged(error, response) {
338
+ function listenMuteStateChanged(error) {
350
339
  if (error) {
351
340
  console.error("FinsembleNotificationsMuteStateChannel: ", error);
352
341
  }
@@ -363,20 +352,16 @@ export const NotificationsCenter = (props) => {
363
352
  async function loadMuteFilter() {
364
353
  return await FSBL.Clients.NotificationClient.getMuteFilters();
365
354
  }
366
- loadMuteFilter().then((muteFilters) => {
367
- setMuteFilters(muteFilters);
355
+ loadMuteFilter().then((loadedMuteFilters) => {
356
+ setMuteFilters(loadedMuteFilters);
368
357
  setReloadMuteFilters(false);
369
358
  });
370
359
  }, [reloadMuteFilters]);
371
- const notificationsMainView = () => {
372
- return (React.createElement(React.Fragment, null,
373
- React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
374
- React.createElement(DrawerControls, null),
375
- 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 })))));
376
- };
377
- const notificationDetailsViewComponent = () => {
378
- return React.createElement(NotificationDetailsView, { notification: selectedNotification });
379
- };
360
+ const notificationsMainView = () => (React.createElement(React.Fragment, null,
361
+ React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
362
+ React.createElement(DrawerControls, null),
363
+ 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 })))));
364
+ const notificationDetailsViewComponent = () => React.createElement(NotificationDetailsView, { notification: selectedNotification });
380
365
  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)) },
381
366
  React.createElement(NotificationsContext.Provider, { value: notificationsContextValues },
382
367
  React.createElement(Drawer, { classNames: uiState.poppedOut ? "popped-out" : "" }, selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()))));
@@ -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,EAA8B,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,gDAAgD,CAAC;AAGxD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Ac,OAAG;YAClB,6BAAK,SAAS,EAAC,iBAAiB,IAC9B,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAC7B,oBAAC,QAAQ,IAAC,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,GAAI,CACpF,CAAC,CAAC,CAAC,CACH,oBAAC,QAAQ,IACR,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,EAClD,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,GAC7C,CACF,CACI,CACJ,CACH,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,gCAAgC,GAAG,GAAG,EAAE;QAC7C,OAAO,oBAAC,uBAAuB,IAAC,YAAY,EAAE,oBAAoB,GAAI,CAAC;IACxE,CAAC,CAAC;IAEF,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\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\r\n\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC, ViewMode, SelectionMode } from \"../../constants\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\n// Hooks\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tgetNotificationConfig,\r\n\tmoveToToolbarMonitor,\r\n\tgetOS,\r\n\tgetFetchHistoryParams,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Types\r\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport IMuteFilter from \"common/notifications/definitions/IMuteFilter\";\r\n\r\n// Components\r\nimport CardView from \"../views/CardView\";\r\nimport Drawer from \"../drawer/Drawer\";\r\nimport DrawerControls from \"../drawer/DrawerControls\";\r\nimport DrawerHeader from \"../drawer/DrawerHeader\";\r\nimport ListView from \"../views/ListView\";\r\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\r\n\r\nconst defaultControls: NotificationCenterControlsProps = {\r\n\tcontrols: [\r\n\t\t{\r\n\t\t\taction: \"all\",\r\n\t\t\tlabel: \"All\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications;\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"unread\",\r\n\t\t\tlabel: \"Unread\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => !notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"read\",\r\n\t\t\tlabel: \"Read\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isRead);\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"snoozed\",\r\n\t\t\tlabel: \"Snoozed\",\r\n\t\t\trun: (notifications: INotification[]) => {\r\n\t\t\t\treturn notifications.filter((notification: INotification) => notification.isSnoozed);\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tactive: \"all\",\r\n};\r\n\r\nconst addPoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\r\n};\r\n\r\nconst removePoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\r\n};\r\n\r\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\r\n\tFSBL.Clients.StorageClient.save({\r\n\t\ttopic: \"finsemble.notifications\",\r\n\t\tkey: \"last.position\",\r\n\t\tvalue: {\r\n\t\t\tshowCenter,\r\n\t\t\tpoppedOut,\r\n\t\t\tposition,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nconst setShowWindowForState = (centerState: any) => {\r\n\tif (centerState.showCenter) {\r\n\t\tfinsembleWindow.show({}, () => {\r\n\t\t\tfinsembleWindow.bringToFront();\r\n\t\t});\r\n\t}\r\n\r\n\tif (centerState.position) {\r\n\t\tfinsembleWindow.setBounds(centerState.position);\r\n\t}\r\n\r\n\t// Always on top when popped in\r\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\r\n\tstoreNotificationsCenterWindowPosition(centerState);\r\n};\r\n\r\nconst isValidPosition = (bounds: any): boolean => {\r\n\treturn (\r\n\t\tbounds &&\r\n\t\ttypeof bounds.left !== \"undefined\" &&\r\n\t\ttypeof bounds.top !== \"undefined\" &&\r\n\t\ttypeof bounds.height !== \"undefined\" &&\r\n\t\ttypeof bounds.width !== \"undefined\"\r\n\t);\r\n};\r\n\r\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\r\n\r\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\r\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\r\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\r\n\tconst [uiState, setUIState] = useNotificationUI();\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isInitialized, setInitialized] = useState(false);\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\tconst nextPageToFetch = useRef(1);\r\n\r\n\t// Set up references for use in callbacks to FSBL functions\r\n\tconst showCenterRef = useRef(false);\r\n\tconst poppedOutRef = useRef(false);\r\n\tconst subscriptionMessageRef = useRef<any>({});\r\n\tconst applicationState = useRef(null);\r\n\r\n\tconst checkedNotifications: INotification[] = [];\r\n\r\n\tconst [searchString, setSearchString] = useState(\"\");\r\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\r\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\r\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\r\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\r\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\r\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\r\n\r\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\r\n\r\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\r\n\tconst notificationsContextValues: NotificationsContextType = {\r\n\t\tviewMode,\r\n\t\tsetViewMode,\r\n\t\tselectionMode,\r\n\t\tsetSelectionMode,\r\n\t\tdrawerControlProps,\r\n\t\tsetDrawerControlProps,\r\n\t\tselectedNotification,\r\n\t\tsetSelectedNotification,\r\n\t\tsearchString,\r\n\t\tsetSearchString,\r\n\t\tfilteredNotifications,\r\n\t\tcheckedNotifications,\r\n\t\tsetFilteredNotifications,\r\n\t\tmuteFilters,\r\n\t\tsetMuteFilters,\r\n\t};\r\n\r\n\tconst togglePoppedStatus = () => {\r\n\t\tconst poppedOut = !uiState.poppedOut;\r\n\t\tpoppedOutRef.current = poppedOut;\r\n\t\tsetUIState({\r\n\t\t\t...uiState,\r\n\t\t\tpoppedOut,\r\n\t\t});\r\n\t};\r\n\r\n\tconst setFullHeight = async (monitorInfo?: any) => {\r\n\t\tif (!monitorInfo) {\r\n\t\t\tawait new Promise<void>((resolve) => {\r\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\r\n\t\t\t\t\tmonitorInfo = monitor;\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst { data } = await finsembleWindow.getBounds();\r\n\t\tconst centerWindowPosition = {\r\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\r\n\t\t\ttop: monitorInfo.availableRect.top,\r\n\t\t\theight: monitorInfo.availableRect.height,\r\n\t\t\twidth: data.width,\r\n\t\t};\r\n\r\n\t\tsetShowWindowForState({\r\n\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition: centerWindowPosition,\r\n\t\t});\r\n\r\n\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t};\r\n\r\n\tconst boundsChangeListener = (event: any) => {\r\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\r\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\r\n\t\t\tsetFullHeight();\r\n\t\t}\r\n\t\tconst position = {\r\n\t\t\ttop: event.data.top,\r\n\t\t\tleft: event.data.left,\r\n\t\t\theight: event.data.height,\r\n\t\t\twidth: event.data.width,\r\n\t\t};\r\n\r\n\t\tstoreNotificationsCenterWindowPosition({\r\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition,\r\n\t\t});\r\n\t};\r\n\r\n\tconst getScrollPercentage = () => {\r\n\t\tconst maxScroll = document.body.scrollHeight;\r\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\r\n\t\treturn currentScroll / maxScroll;\r\n\t};\r\n\r\n\tconst lazyLoadNextPage = async () =>\r\n\t\tnew Promise<void>(async (resolve) => {\r\n\t\t\tif (nextPageToFetch.current > 0) {\r\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\r\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\r\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\r\n\t\t\t\tif (notificationList.length) {\r\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\r\n\t\t\t\t\tfor (const notification of notificationList) {\r\n\t\t\t\t\t\taddNotification(notification);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Stop fetching after this one\r\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\r\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\r\n\t\tif (isTransparent && !isMac) {\r\n\t\t\tif (poppedOut) {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx: 0,\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (show) {\r\n\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t}\r\n\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\r\n\tuseEffect(() => {\r\n\t\tsetOpaqueClassName(!config.isTransparent);\r\n\r\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\r\n\t\t\tapplicationState.current = response.data.state;\r\n\t\t});\r\n\r\n\t\tconst hide = (event: any) => {\r\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\r\n\t\t\tpublishValue[\"showCenter\"] = false;\r\n\t\t\tsetUIState(publishValue);\r\n\t\t\tif (applicationState?.current !== \"closing\") {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tevent.cancel();\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst scrollHandler = () => {\r\n\t\t\tif (getScrollPercentage() > 0.9) {\r\n\t\t\t\tlazyLoadNextPage();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\r\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\r\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\r\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst recursiveLoad = async () => {\r\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\r\n\t\t\tawait lazyLoadNextPage();\r\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\r\n\t\t\t\trecursiveLoad();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\trecursiveLoad();\r\n\t}, [viewMode, drawerControlProps.active]);\r\n\r\n\t// Hook to set up the center state from service data on component start\r\n\tuseEffect(() => {\r\n\t\tsubscriptionMessageRef.current = uiState;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\r\n\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\tremovePoppedInClasses();\r\n\t\t\t} else {\r\n\t\t\t\taddPoppedInClasses();\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPosition(uiState.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\tposition: uiState.position,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Setup references\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [uiState]);\r\n\r\n\t// Effect to run when we pop-in or pop-out the notification center\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\r\n\t\t\t\t\tremovePoppedInClasses();\r\n\r\n\t\t\t\t\tconst centerWindowPosition = {\r\n\t\t\t\t\t\tleft: data.left - 25,\r\n\t\t\t\t\t\ttop: data.top + 25,\r\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\r\n\t\t\t\t\t\twidth: data.width,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\t\tposition: centerWindowPosition,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\taddPoppedInClasses();\r\n\t\t\t\t\tsetFullHeight(monitorInfo);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [uiState.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [uiState.showCenter]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetFilteredNotifications([...notifications]);\r\n\t}, [notifications]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tsetReloadMuteFilters(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t// Sets the current active mute filters\r\n\tuseEffect(() => {\r\n\t\tasync function loadMuteFilter() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\r\n\t\t}\r\n\r\n\t\tloadMuteFilter().then((muteFilters: IMuteFilter[]) => {\r\n\t\t\tsetMuteFilters(muteFilters);\r\n\t\t\tsetReloadMuteFilters(false);\r\n\t\t});\r\n\t}, [reloadMuteFilters]);\r\n\r\n\tconst notificationsMainView = () => {\r\n\t\treturn (\r\n\t\t\t<>\r\n\t\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\r\n\t\t\t\t<DrawerControls />\r\n\t\t\t\t<div className=\"cards-container\">\r\n\t\t\t\t\t{viewMode === ViewMode.CARD ? (\r\n\t\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<ListView\r\n\t\t\t\t\t\t\tnotifications={notifications}\r\n\t\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\r\n\t\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</>\r\n\t\t);\r\n\t};\r\n\r\n\tconst notificationDetailsViewComponent = () => {\r\n\t\treturn <NotificationDetailsView notification={selectedNotification} />;\r\n\t};\r\n\r\n\treturn (\r\n\t\t<ConditionalWrapper\r\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</CSSTransition>\r\n\t\t\t)}\r\n\t\t>\r\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\r\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\r\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\r\n\t\t\t\t</Drawer>\r\n\t\t\t</NotificationsContext.Provider>\r\n\t\t</ConditionalWrapper>\r\n\t);\r\n};\r\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;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,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,uBAAuB,MAAM,kCAAkC,CA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AAC,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\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport ConditionalWrapper from \"../../../shared/ConditionalWrapper\";\r\n\r\nimport { ViewMode, SelectionMode } from \"../../constants\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\n// Hooks\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tgetNotificationConfig,\r\n\tmoveToToolbarMonitor,\r\n\tgetOS,\r\n\tgetFetchHistoryParams,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Types\r\nimport { INotificationCenterProps, NotificationCenterControlsProps, NotificationsContextType } from \"../../types\";\r\n\r\n// Components\r\nimport CardView from \"../views/CardView\";\r\nimport Drawer from \"../drawer/Drawer\";\r\nimport DrawerControls from \"../drawer/DrawerControls\";\r\nimport DrawerHeader from \"../drawer/DrawerHeader\";\r\nimport ListView from \"../views/ListView\";\r\nimport NotificationDetailsView from \"../views/NotificationDetailsView\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IMuteFilter = services.notification.types.IMuteFilter;\r\n\r\nconst defaultControls: NotificationCenterControlsProps = {\r\n\tcontrols: [\r\n\t\t{\r\n\t\t\taction: \"all\",\r\n\t\t\tlabel: \"All\",\r\n\t\t\trun: (notifications: INotification[]) => notifications,\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"unread\",\r\n\t\t\tlabel: \"Unread\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => !notification.isRead),\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"read\",\r\n\t\t\tlabel: \"Read\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isRead),\r\n\t\t},\r\n\t\t{\r\n\t\t\taction: \"snoozed\",\r\n\t\t\tlabel: \"Snoozed\",\r\n\t\t\trun: (notifications: INotification[]) =>\r\n\t\t\t\tnotifications.filter((notification: INotification) => notification.isSnoozed),\r\n\t\t},\r\n\t],\r\n\tactive: \"all\",\r\n};\r\n\r\nconst addPoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.add(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.add(\"notifications-popped-in\");\r\n};\r\n\r\nconst removePoppedInClasses = () => {\r\n\tdocument.getElementById(\"notifications-center-container\")?.classList.remove(\"notifications-popped-in\");\r\n\tdocument.getElementById(\"FSBLHeader\")?.classList.remove(\"notifications-popped-in\");\r\n};\r\n\r\nconst storeNotificationsCenterWindowPosition = ({ showCenter, poppedOut, position }: any) => {\r\n\tFSBL.Clients.StorageClient.save({\r\n\t\ttopic: \"finsemble.notifications\",\r\n\t\tkey: \"last.position\",\r\n\t\tvalue: {\r\n\t\t\tshowCenter,\r\n\t\t\tpoppedOut,\r\n\t\t\tposition,\r\n\t\t},\r\n\t});\r\n};\r\n\r\nconst setShowWindowForState = (centerState: any) => {\r\n\tif (centerState.showCenter) {\r\n\t\tfinsembleWindow.show({}, () => {\r\n\t\t\tfinsembleWindow.bringToFront();\r\n\t\t});\r\n\t}\r\n\r\n\tif (centerState.position) {\r\n\t\tfinsembleWindow.setBounds(centerState.position);\r\n\t}\r\n\r\n\t// Always on top when popped in\r\n\tFSBL.Clients.WindowClient.setAlwaysOnTop(!centerState.poppedOut);\r\n\tstoreNotificationsCenterWindowPosition(centerState);\r\n};\r\n\r\nconst isValidPosition = (bounds: any): boolean =>\r\n\tbounds &&\r\n\ttypeof bounds.left !== \"undefined\" &&\r\n\ttypeof bounds.top !== \"undefined\" &&\r\n\ttypeof bounds.height !== \"undefined\" &&\r\n\ttypeof bounds.width !== \"undefined\";\r\n\r\nconst LAZY_LOAD_NO_MORE_PAGES = -1;\r\n\r\nexport const NotificationsCenter: React.FunctionComponent<INotificationCenterProps> = (props) => {\r\n\tconst params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };\r\n\tconst { notifications, setOpaqueClassName, addNotification } = useNotifications(params);\r\n\tconst [uiState, setUIState] = useNotificationUI();\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isInitialized, setInitialized] = useState(false);\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\tconst nextPageToFetch = useRef(1);\r\n\r\n\t// Set up references for use in callbacks to FSBL functions\r\n\tconst showCenterRef = useRef(false);\r\n\tconst poppedOutRef = useRef(false);\r\n\tconst subscriptionMessageRef = useRef<any>({});\r\n\tconst applicationState = useRef(null);\r\n\r\n\tconst checkedNotifications: INotification[] = [];\r\n\r\n\tconst [searchString, setSearchString] = useState(\"\");\r\n\tconst [filteredNotifications, setFilteredNotifications] = useState([...notifications]);\r\n\tconst [viewMode, setViewMode] = useState<ViewMode>(ViewMode.CARD);\r\n\tconst [selectionMode, setSelectionMode] = useState<SelectionMode>(SelectionMode.NO_SELECTION);\r\n\tconst [selectedNotification, setSelectedNotification] = useState<INotification | null>(null);\r\n\tconst [muteFilters, setMuteFilters] = useState<IMuteFilter[]>([]);\r\n\tconst [reloadMuteFilters, setReloadMuteFilters] = useState(true);\r\n\r\n\tconst dcp: NotificationCenterControlsProps = props.controls ? props.controls : defaultControls;\r\n\r\n\tconst [drawerControlProps, setDrawerControlProps] = useState(dcp);\r\n\tconst notificationsContextValues: NotificationsContextType = {\r\n\t\tviewMode,\r\n\t\tsetViewMode,\r\n\t\tselectionMode,\r\n\t\tsetSelectionMode,\r\n\t\tdrawerControlProps,\r\n\t\tsetDrawerControlProps,\r\n\t\tselectedNotification,\r\n\t\tsetSelectedNotification,\r\n\t\tsearchString,\r\n\t\tsetSearchString,\r\n\t\tfilteredNotifications,\r\n\t\tcheckedNotifications,\r\n\t\tsetFilteredNotifications,\r\n\t\tmuteFilters,\r\n\t\tsetMuteFilters,\r\n\t};\r\n\r\n\tconst togglePoppedStatus = () => {\r\n\t\tconst poppedOut = !uiState.poppedOut;\r\n\t\tpoppedOutRef.current = poppedOut;\r\n\t\tsetUIState({\r\n\t\t\t...uiState,\r\n\t\t\tpoppedOut,\r\n\t\t});\r\n\t};\r\n\r\n\tconst setFullHeight = async (monitorInfo?: any) => {\r\n\t\tif (!monitorInfo) {\r\n\t\t\tawait new Promise<void>((resolve) => {\r\n\t\t\t\tfinsembleWindow.getMonitor((monitor: any) => {\r\n\t\t\t\t\tmonitorInfo = monitor;\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst { data } = await finsembleWindow.getBounds();\r\n\t\tconst centerWindowPosition = {\r\n\t\t\tleft: monitorInfo.availableRect.right - data.width,\r\n\t\t\ttop: monitorInfo.availableRect.top,\r\n\t\t\theight: monitorInfo.availableRect.height,\r\n\t\t\twidth: data.width,\r\n\t\t};\r\n\r\n\t\tsetShowWindowForState({\r\n\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition: centerWindowPosition,\r\n\t\t});\r\n\r\n\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t};\r\n\r\n\tconst boundsChangeListener = (event: any) => {\r\n\t\tif (showCenterRef?.current && !poppedOutRef.current) {\r\n\t\t\t// Bounds Changed fires when Windows Taskbar + Finsemble Toolbar docking changes\r\n\t\t\tsetFullHeight();\r\n\t\t}\r\n\t\tconst position = {\r\n\t\t\ttop: event.data.top,\r\n\t\t\tleft: event.data.left,\r\n\t\t\theight: event.data.height,\r\n\t\t\twidth: event.data.width,\r\n\t\t};\r\n\r\n\t\tstoreNotificationsCenterWindowPosition({\r\n\t\t\tshowCenter: showCenterRef?.current ? showCenterRef.current : false,\r\n\t\t\tpoppedOut: poppedOutRef.current,\r\n\t\t\tposition,\r\n\t\t});\r\n\t};\r\n\r\n\tconst getScrollPercentage = () => {\r\n\t\tconst maxScroll = document.body.scrollHeight;\r\n\t\tconst currentScroll = window.innerHeight + window.scrollY;\r\n\t\treturn currentScroll / maxScroll;\r\n\t};\r\n\r\n\tconst lazyLoadNextPage = async () =>\r\n\t\tnew Promise<void>(async (resolve) => {\r\n\t\t\tif (nextPageToFetch.current > 0) {\r\n\t\t\t\tconst [options, filter] = getFetchHistoryParams(config, params);\r\n\t\t\t\toptions.pageNumber = nextPageToFetch.current;\r\n\t\t\t\tconst notificationList = await FSBL.Clients.NotificationClient.fetchHistory(options, filter);\r\n\t\t\t\tif (notificationList.length) {\r\n\t\t\t\t\tnextPageToFetch.current = nextPageToFetch.current + 1;\r\n\t\t\t\t\tfor (const notification of notificationList) {\r\n\t\t\t\t\t\taddNotification(notification);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Stop fetching after this one\r\n\t\t\t\t\tnextPageToFetch.current = LAZY_LOAD_NO_MORE_PAGES;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresolve();\r\n\t\t});\r\n\r\n\tconst toggleCenter = async (show: boolean, isTransparent: boolean, poppedOut: boolean) => {\r\n\t\tif (isTransparent && !isMac) {\r\n\t\t\tif (poppedOut) {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (show) {\r\n\t\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([]);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx: 0,\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (show) {\r\n\t\t\t\tif (!poppedOut) {\r\n\t\t\t\t\tawait moveToToolbarMonitor();\r\n\t\t\t\t\tawait setFullHeight();\r\n\t\t\t\t}\r\n\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// When popped out we want to prevent the center to be closed when the close button is clicked (or alt +)\r\n\tuseEffect(() => {\r\n\t\tsetOpaqueClassName(!config.isTransparent);\r\n\r\n\t\tconst subscriptionId = FSBL.Clients.RouterClient.subscribe(\"Finsemble.Application.State\", (err, response) => {\r\n\t\t\tapplicationState.current = response.data.state;\r\n\t\t});\r\n\r\n\t\tconst hide = (event: any) => {\r\n\t\t\tconst publishValue = { ...subscriptionMessageRef.current };\r\n\t\t\tpublishValue[\"showCenter\"] = false;\r\n\t\t\tsetUIState(publishValue);\r\n\t\t\tif (applicationState?.current !== \"closing\") {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tevent.cancel();\r\n\t\t\t\t} catch (error) {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.error(\"Error cancelling the window close event\", error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tconst scrollHandler = () => {\r\n\t\t\tif (getScrollPercentage() > 0.9) {\r\n\t\t\t\tlazyLoadNextPage();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfinsembleWindow.addEventListener(\"close-requested\", hide);\r\n\t\tfinsembleWindow.addEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\twindow.addEventListener(\"scroll\", scrollHandler);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscriptionId);\r\n\t\t\tfinsembleWindow.removeEventListener(\"close-requested\", hide);\r\n\t\t\tfinsembleWindow.removeEventListener(\"bounds-change-end\", boundsChangeListener);\r\n\t\t\twindow.removeEventListener(\"scroll\", scrollHandler);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst recursiveLoad = async () => {\r\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\r\n\t\t\tawait lazyLoadNextPage();\r\n\t\t\tif (getScrollPercentage() === 1 && nextPageToFetch.current != LAZY_LOAD_NO_MORE_PAGES) {\r\n\t\t\t\trecursiveLoad();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\trecursiveLoad();\r\n\t}, [viewMode, drawerControlProps.active]);\r\n\r\n\t// Hook to set up the center state from service data on component start\r\n\tuseEffect(() => {\r\n\t\tsubscriptionMessageRef.current = uiState;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof uiState.showCenter !== \"undefined\") {\r\n\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\tremovePoppedInClasses();\r\n\t\t\t} else {\r\n\t\t\t\taddPoppedInClasses();\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPosition(uiState.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\tposition: uiState.position,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Setup references\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [uiState]);\r\n\r\n\t// Effect to run when we pop-in or pop-out the notification center\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tpoppedOutRef.current = uiState.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (uiState.poppedOut) {\r\n\t\t\t\t\tconst { data } = await finsembleWindow.getBounds({});\r\n\t\t\t\t\tremovePoppedInClasses();\r\n\r\n\t\t\t\t\tconst centerWindowPosition = {\r\n\t\t\t\t\t\tleft: data.left - 25,\r\n\t\t\t\t\t\ttop: data.top + 25,\r\n\t\t\t\t\t\theight: Math.round(monitorInfo.availableRect.height * 0.8),\r\n\t\t\t\t\t\twidth: data.width,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\t\tshowCenter: uiState.showCenter,\r\n\t\t\t\t\t\tpoppedOut: uiState.poppedOut,\r\n\t\t\t\t\t\tposition: centerWindowPosition,\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\taddPoppedInClasses();\r\n\t\t\t\t\tsetFullHeight(monitorInfo);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [uiState.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = uiState.showCenter;\r\n\t\t\ttoggleCenter(uiState.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [uiState.showCenter]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetFilteredNotifications([...notifications]);\r\n\t}, [notifications]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenMuteStateChanged(error: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tsetReloadMuteFilters(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t// Sets the current active mute filters\r\n\tuseEffect(() => {\r\n\t\tasync function loadMuteFilter() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getMuteFilters();\r\n\t\t}\r\n\r\n\t\tloadMuteFilter().then((loadedMuteFilters: IMuteFilter[]) => {\r\n\t\t\tsetMuteFilters(loadedMuteFilters);\r\n\t\t\tsetReloadMuteFilters(false);\r\n\t\t});\r\n\t}, [reloadMuteFilters]);\r\n\r\n\tconst notificationsMainView = () => (\r\n\t\t<>\r\n\t\t\t<DrawerHeader poppedOutStatus={uiState.poppedOut} popOutToggle={togglePoppedStatus} />\r\n\t\t\t<DrawerControls />\r\n\t\t\t<div className=\"cards-container\">\r\n\t\t\t\t{viewMode === ViewMode.CARD ? (\r\n\t\t\t\t\t<CardView notifications={notifications} notificationCard={props.notificationCard} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<ListView\r\n\t\t\t\t\t\tnotifications={notifications}\r\n\t\t\t\t\t\tnotificationHeaderRow={props.notificationHeaderRow}\r\n\t\t\t\t\t\tnotificationListRow={props.notificationListRow}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n\r\n\tconst notificationDetailsViewComponent = () => <NotificationDetailsView notification={selectedNotification} />;\r\n\r\n\treturn (\r\n\t\t<ConditionalWrapper\r\n\t\t\tcondition={(config.isTransparent as boolean) && !uiState.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={uiState.showCenter} timeout={500} classNames=\"drawer\" unmountOnExit>\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</CSSTransition>\r\n\t\t\t)}\r\n\t\t>\r\n\t\t\t<NotificationsContext.Provider value={notificationsContextValues}>\r\n\t\t\t\t<Drawer classNames={uiState.poppedOut ? \"popped-out\" : \"\"}>\r\n\t\t\t\t\t{selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()}\r\n\t\t\t\t</Drawer>\r\n\t\t\t</NotificationsContext.Provider>\r\n\t\t</ConditionalWrapper>\r\n\t);\r\n};\r\n"]}
@@ -96,18 +96,19 @@ export const NotificationsToasts = (props) => {
96
96
  }, []);
97
97
  useEffect(() => {
98
98
  moveToToolbarMonitor().then(() => {
99
+ var _a;
99
100
  let forceHide = false;
100
101
  if (activeNotifications(notifications).length === 0 &&
101
102
  activeNotifications(notificationsRef.current).length === 0) {
102
103
  forceHide = true;
103
104
  }
104
105
  notificationsRef.current = notifications;
105
- const rect = document.getElementById("notifications-toasts")?.getBoundingClientRect();
106
+ const rect = (_a = document.getElementById("notifications-toasts")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
106
107
  if (notifications.length === 0 || forceHide) {
107
108
  if (config.isTransparent && !isMac) {
108
109
  const roundedRect = {
109
- x: Math.round(rect?.x),
110
- y: Math.round(rect?.y),
110
+ x: Math.round(rect === null || rect === void 0 ? void 0 : rect.x),
111
+ y: Math.round(rect === null || rect === void 0 ? void 0 : rect.y),
111
112
  width: 1,
112
113
  height: 1,
113
114
  };
@@ -119,10 +120,10 @@ export const NotificationsToasts = (props) => {
119
120
  finsembleWindow.bringToFront();
120
121
  if (config.isTransparent && !isMac) {
121
122
  const roundedRect = {
122
- x: Math.round(rect?.x),
123
- y: Math.round(rect?.y),
124
- width: Math.round(rect?.width),
125
- height: Math.round(rect?.height),
123
+ x: Math.round(rect === null || rect === void 0 ? void 0 : rect.x),
124
+ y: Math.round(rect === null || rect === void 0 ? void 0 : rect.y),
125
+ width: Math.round(rect === null || rect === void 0 ? void 0 : rect.width),
126
+ height: Math.round(rect === null || rect === void 0 ? void 0 : rect.height),
126
127
  };
127
128
  finsembleWindow.show({}, () => {
128
129
  FSBL.Clients.WindowClient.setShape([roundedRect]);
@@ -137,7 +138,7 @@ export const NotificationsToasts = (props) => {
137
138
  }
138
139
  const bounds = (await finsembleWindow.getBounds({}));
139
140
  const width = bounds.data.right - bounds.data.left;
140
- const height = Math.round(rect?.height) + 6;
141
+ const height = Math.round(rect === null || rect === void 0 ? void 0 : rect.height) + 6;
141
142
  finsembleWindow.setBounds({
142
143
  bounds: {
143
144
  top: data["availableRect"]["top"],
@@ -155,6 +156,6 @@ export const NotificationsToasts = (props) => {
155
156
  }
156
157
  });
157
158
  }, [notifications]);
158
- return (React.createElement("div", null, notifications.map((notification) => (React.createElement(ToastCard, { key: `toast-card-${notification.id}`, notification: notification, informationalNotificationTimeout: informationalTimeout, actionableTimeoutEnabled: actionableTimeoutEnabled, removeFunction: removeNotification, isActiveFunction: isNotificationActive, ...props })))));
159
+ return (React.createElement("div", null, notifications.map((notification) => (React.createElement(ToastCard, Object.assign({ key: `toast-card-${notification.id}`, notification: notification, informationalNotificationTimeout: informationalTimeout, actionableTimeoutEnabled: actionableTimeoutEnabled, removeFunction: removeNotification, isActiveFunction: isNotificationActive }, props))))));
159
160
  };
160
161
  //# sourceMappingURL=NotificationsToasts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,OAAO,gDAAgD,CAAC;AAWxD,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,eAAe,GAAG,MAAM,EAAiB,CAAC;IAChD,MAAM,EAAE,YAAY,EAAE,gCAAgC,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,GACnH,KAAK,CAAC;IACP,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IACvE,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpE,SAAS,CAAC,GAAG,EAAE;QACd,eAAe,CAAC,OAAO,GAAG,YAAY,CAAC;QACvC,IAAI,SAAc,CAAC;QAEnB,IAAI,CAAC,YAAY,CAAC,OAAO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AC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,IACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,KAClC,KAAK,GACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\n\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [uiState] = useNotificationUI();\r\n\r\n\tconst isNotificationActive = (notification: INotification): boolean => {\r\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\r\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\r\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,gDAAgD,CAAC;AAcxD,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,eAAe,GAAG,MAAM,EAAiB,CAAC;IAChD,MAAM,EAAE,YAAY,EAAE,gCAAgC,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,GACnH,KAAK,CAAC;IACP,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IACvE,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpE,SAAS,CA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AAC,CAAC,KAAK,CAAC;gCACjC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK;gCAC5C,MAAM,EAAE,MAAM,GAAG,EAAE;gCACnB,KAAK,EAAE,KAAK;6BACZ;yBACD,EACD,CAAC,KAAU,EAAE,EAAE;4BACd,IAAI,KAAK,EAAE;gCACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;6BACrB;wBACF,CAAC,CACD,CAAC;oBACH,CAAC,CAAC,CAAC;iBACH;aACD;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,kBACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,IAClC,KAAK,EACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [uiState] = useNotificationUI();\r\n\r\n\tconst isNotificationActive = (notification: INotification): boolean => {\r\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\r\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tFSBL.Clients.WindowClient.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst bounds = (await finsembleWindow.getBounds({})) as any;\r\n\t\t\t\t\t\tconst width = bounds.data.right - bounds.data.left;\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -1,6 +1,6 @@
1
- /// <reference types="finsemble-core" />
2
1
  import React from "react";
3
- import { INotification } from "common/notifications/definitions/INotification";
2
+ import { services } from "@finsemble/finsemble-core";
3
+ declare type INotification = services.notification.types.INotification;
4
4
  export declare const CheckButton: React.FunctionComponent<{
5
5
  notification: INotification;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\r\n\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\nexport const CheckButton: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n}> = ({ notification }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { checkedNotifications } = notificationsContext;\r\n\tconst [isChecked, setIsChecked] = useState(false);\r\n\r\n\t// update isChecked value on action\r\n\tuseEffect(() => {\r\n\t\tif (checkedNotifications) {\r\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\r\n\t\t}\r\n\t}, [checkedNotifications]);\r\n\r\n\tconst checkNotification = () => {\r\n\t\tif (!isChecked) {\r\n\t\t\tcheckedNotifications.push(notification);\r\n\t\t} else {\r\n\t\t\tvar index = checkedNotifications.indexOf(notification);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tcheckedNotifications.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetIsChecked(!isChecked);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\r\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default CheckButton;\r\n"]}
1
+ {"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const CheckButton: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n}> = ({ notification }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { checkedNotifications } = notificationsContext;\r\n\tconst [isChecked, setIsChecked] = useState(false);\r\n\r\n\t// update isChecked value on action\r\n\tuseEffect(() => {\r\n\t\tif (checkedNotifications) {\r\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\r\n\t\t}\r\n\t}, [checkedNotifications]);\r\n\r\n\tconst checkNotification = () => {\r\n\t\tif (!isChecked) {\r\n\t\t\tcheckedNotifications.push(notification);\r\n\t\t} else {\r\n\t\t\tvar index = checkedNotifications.indexOf(notification);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tcheckedNotifications.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetIsChecked(!isChecked);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\r\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default CheckButton;\r\n"]}
@@ -1,8 +1,6 @@
1
1
  import React from "react";
2
- const IconButton = ({ clickHandler = () => { }, tooltip, iconName = "ff-finsemble", classNames, children, }) => {
3
- return (React.createElement("div", { className: `finsemble-icon__btn ${classNames ? classNames : ""}`, title: tooltip ? tooltip : "", onClick: () => clickHandler() },
4
- React.createElement("i", { className: iconName }),
5
- children));
6
- };
2
+ const IconButton = ({ clickHandler = () => { }, tooltip, iconName = "ff-finsemble", classNames, children, }) => (React.createElement("div", { className: `finsemble-icon__btn ${classNames ? classNames : ""}`, title: tooltip ? tooltip : "", onClick: () => clickHandler() },
3
+ React.createElement("i", { className: iconName }),
4
+ children));
7
5
  export default IconButton;
8
6
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE;IAC/B,OAAO,CACN,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;QAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;QACzB,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\r\n\r\nexport interface IFinsembleIconButtonProps {\r\n\ttooltip?: string;\r\n\tclickHandler?: Function;\r\n\ticonName?: string;\r\n\tclassNames?: string;\r\n\tchildren?: React.ReactNode;\r\n}\r\n\r\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\r\n\tclickHandler = () => {},\r\n\ttooltip,\r\n\ticonName = \"ff-finsemble\",\r\n\tclassNames,\r\n\tchildren,\r\n}: IFinsembleIconButtonProps) => {\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\r\n\t\t\ttitle={tooltip ? tooltip : \"\"}\r\n\t\t\tonClick={() => clickHandler()}\r\n\t\t>\r\n\t\t\t<i className={iconName} />\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default IconButton;\r\n"]}
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE,CAAC,CAChC,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;IAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;IACzB,QAAQ,CACJ,CACN,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\r\n\r\nexport interface IFinsembleIconButtonProps {\r\n\ttooltip?: string;\r\n\tclickHandler?: Function;\r\n\ticonName?: string;\r\n\tclassNames?: string;\r\n\tchildren?: React.ReactNode;\r\n}\r\n\r\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\r\n\tclickHandler = () => {},\r\n\ttooltip,\r\n\ticonName = \"ff-finsemble\",\r\n\tclassNames,\r\n\tchildren,\r\n}: IFinsembleIconButtonProps) => (\r\n\t<div\r\n\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\r\n\t\ttitle={tooltip ? tooltip : \"\"}\r\n\t\tonClick={() => clickHandler()}\r\n\t>\r\n\t\t<i className={iconName} />\r\n\t\t{children}\r\n\t</div>\r\n);\r\n\r\nexport default IconButton;\r\n"]}
@@ -1,9 +1,10 @@
1
- /// <reference types="finsemble-core" />
2
1
  import React from "react";
3
- import { INotification } from "common/notifications/definitions/INotification";
2
+ import { services } from "@finsemble/finsemble-core";
3
+ declare type INotification = services.notification.types.INotification;
4
4
  export declare type NotificationCardPropType = {
5
5
  notification: INotification;
6
6
  uiContext: "toasts" | "center";
7
7
  removeNotification: Function;
8
8
  };
9
9
  export declare const NotificationCardShell: React.FunctionComponent<NotificationCardPropType>;
10
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,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AAG,EAAE;oBACzC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAC1B,CAAC,EAAE,wBAAwB,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,gCAAgC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;aACjI;SACD;aAAM;YACN,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,YAAY,CAAC,uBAAuB,CAAC,CAAC;SACtC;QACD,OAAO,GAAG,EAAE;YACX,YAAY,CAAC,uBAAuB,CAAC,CAAC;QACvC,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAC,CAAC;IACrD,OAAO,CACN,6BACC,SAAS,EAAE,qBAAqB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;KAC1F,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,IAE7D,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\r\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\r\n\r\n// Types\r\nimport IPerformedAction from \"common/notifications/definitions/IPerformedAction\";\r\nimport { INotification } from \"common/notifications/definitions/INotification\";\r\n// Components\r\n\r\n// Utils\r\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\r\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\r\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\r\n\r\nexport type NotificationCardPropType = {\r\n\t/**\r\n\t * The Notification to be displayed\r\n\t */\r\n\tnotification: INotification;\r\n\r\n\t/**\r\n\t * Which UI context the Card is being used in\r\n\t */\r\n\tuiContext: \"toasts\" | \"center\";\r\n\r\n\t/**\r\n\t * The internal function that will be called on toasts when dismissed or marked as read\r\n\t */\r\n\tremoveNotification: Function;\r\n};\r\n\r\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\r\n\tnotification,\r\n\tuiContext,\r\n\tremoveNotification,\r\n\tchildren,\r\n}) => {\r\n\tconst { isRead } = notification;\r\n\r\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\r\n\r\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\r\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\r\n\t);\r\n\r\n\t// Sets the current default preference\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\r\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\r\n\t\t});\r\n\t}, []);\r\n\r\n\t// Listens for preferences change\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (\r\n\t\t\t\t\tdata.notificationPreferences &&\r\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\r\n\t\t\t\t) {\r\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isNewTimerId: any;\r\n\t\tif (isNew) {\r\n\t\t\tif (notification.isRead) {\r\n\t\t\t\tsetIsNew(false);\r\n\t\t\t\tclearTimeout(isNewTimerId);\r\n\t\t\t} else {\r\n\t\t\t\tisNewTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetIsNew(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isNewTimerId);\r\n\t\t};\r\n\t}, [isNew, notification]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isRenotificationTimerId: any;\r\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\r\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\r\n\t\t\tif (mostRecentAction) {\r\n\t\t\t\tsetWokeFromSnooze(true);\r\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetWokeFromSnooze(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetWokeFromSnooze(false);\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t};\r\n\t}, [newNotificationHaloPeriodSeconds, notification]);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \r\n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\r\n\t\t>\r\n\t\t\t{children ? (\r\n\t\t\t\tchildren\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<NotificationCardHeaderShell\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tremoveNotification={removeNotification}\r\n\t\t\t\t\t\tuiContext={uiContext}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAuBzF,MAAM,CAAC,MAAM,qBAAqB,GAAsD,CAAC,EACxF,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,MAAM,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAA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Y,CAAC,uBAAuB,CAAC,CAAC;SACtC;QACD,OAAO,GAAG,EAAE;YACX,YAAY,CAAC,uBAAuB,CAAC,CAAC;QACvC,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAC,CAAC;IACrD,OAAO,CACN,6BACC,SAAS,EAAE,qBAAqB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;KAC1F,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,IAE7D,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\r\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\r\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\r\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\r\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IPerformedAction = services.notification.types.IPerformedAction;\r\n\r\nexport type NotificationCardPropType = {\r\n\t/**\r\n\t * The Notification to be displayed\r\n\t */\r\n\tnotification: INotification;\r\n\r\n\t/**\r\n\t * Which UI context the Card is being used in\r\n\t */\r\n\tuiContext: \"toasts\" | \"center\";\r\n\r\n\t/**\r\n\t * The internal function that will be called on toasts when dismissed or marked as read\r\n\t */\r\n\tremoveNotification: Function;\r\n};\r\n\r\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\r\n\tnotification,\r\n\tuiContext,\r\n\tremoveNotification,\r\n\tchildren,\r\n}) => {\r\n\tconst { isRead } = notification;\r\n\r\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\r\n\r\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\r\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\r\n\t);\r\n\r\n\t// Sets the current default preference\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\r\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\r\n\t\t});\r\n\t}, []);\r\n\r\n\t// Listens for preferences change\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (\r\n\t\t\t\t\tdata.notificationPreferences &&\r\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\r\n\t\t\t\t) {\r\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isNewTimerId: any;\r\n\t\tif (isNew) {\r\n\t\t\tif (notification.isRead) {\r\n\t\t\t\tsetIsNew(false);\r\n\t\t\t\tclearTimeout(isNewTimerId);\r\n\t\t\t} else {\r\n\t\t\t\tisNewTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetIsNew(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isNewTimerId);\r\n\t\t};\r\n\t}, [isNew, notification]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isRenotificationTimerId: any;\r\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\r\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\r\n\t\t\tif (mostRecentAction) {\r\n\t\t\t\tsetWokeFromSnooze(true);\r\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetWokeFromSnooze(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetWokeFromSnooze(false);\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t};\r\n\t}, [newNotificationHaloPeriodSeconds, notification]);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \r\n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\r\n\t\t>\r\n\t\t\t{children ? (\r\n\t\t\t\tchildren\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<NotificationCardHeaderShell\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tremoveNotification={removeNotification}\r\n\t\t\t\t\t\tuiContext={uiContext}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -1,6 +1,7 @@
1
1
  import React, { Dispatch, SetStateAction } from "react";
2
- import { INotification } from "common/notifications/definitions/INotification";
3
2
  import { OverFlowMenuAction } from "../../types";
3
+ import { services } from "@finsemble/finsemble-core";
4
+ declare type INotification = services.notification.types.INotification;
4
5
  export declare const OverflowMenuActions: {
5
6
  [key: string]: OverFlowMenuAction;
6
7
  };
@@ -69,18 +69,19 @@ export const renderOverflowMenuAction = (notification, menuAction, isMuted) => {
69
69
  return null;
70
70
  }
71
71
  return (React.createElement("div", { key: `${notification.id}_${menuAction.name}`, className: "overflow-menu__action", onClick: () => {
72
- menuAction?.action(notification);
73
- } },
74
- menuAction?.icon,
75
- React.createElement("span", { className: "btn-label" }, menuAction?.label)));
72
+ menuAction === null || menuAction === void 0 ? void 0 : menuAction.action(notification);
73
+ } }, menuAction === null || menuAction === void 0 ? void 0 :
74
+ menuAction.icon,
75
+ React.createElement("span", { className: "btn-label" }, menuAction === null || menuAction === void 0 ? void 0 : menuAction.label)));
76
76
  };
77
77
  const OverflowMenu = ({ closeSelf, children }) => {
78
78
  const wrapperRef = useRef(null);
79
79
  const [className, setClassName] = useState("overflow-menu__container");
80
80
  useOutsideClickDetector(wrapperRef, () => closeSelf(false));
81
81
  const moveElementIntoView = () => {
82
+ var _a;
82
83
  const bottomViewPort = window.innerHeight + window.scrollY;
83
- const domRect = wrapperRef?.current?.getBoundingClientRect();
84
+ const domRect = (_a = wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
84
85
  const elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;
85
86
  if (elementBottom && elementBottom > bottomViewPort) {
86
87
  setClassName("overflow-menu__container flow-up");