@finsemble/finsemble-ui 6.1.3 → 6.2.0

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 (276) hide show
  1. package/package.json +20 -17
  2. package/react/actions/smartDesktopDesignerActions.d.ts +5 -4
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/assets/css/defaultTheme.css +1 -1
  5. package/react/assets/css/notificationsCenter.css +1 -0
  6. package/react/assets/css/userPreferences.css +4 -2
  7. package/react/assets/css/windowTitleBar.css +1 -0
  8. package/react/assets/icons/check-square.svg +6 -0
  9. package/react/assets/icons/lock.svg +6 -0
  10. package/react/components/common/Button.d.ts +1 -0
  11. package/react/components/common/Button.js +2 -2
  12. package/react/components/common/Button.js.map +1 -1
  13. package/react/components/common/ButtonRow.d.ts +15 -0
  14. package/react/components/common/ButtonRow.js +32 -0
  15. package/react/components/common/ButtonRow.js.map +1 -0
  16. package/react/components/common/Checkbox.d.ts +8 -0
  17. package/react/components/common/Checkbox.js +22 -0
  18. package/react/components/common/Checkbox.js.map +1 -0
  19. package/react/components/common/FinsembleIcon.d.ts +1 -1
  20. package/react/components/common/FinsembleIcon.js +4 -0
  21. package/react/components/common/FinsembleIcon.js.map +1 -1
  22. package/react/components/common/FinsembleSelect.d.ts +3 -2
  23. package/react/components/common/FinsembleSelect.js +2 -2
  24. package/react/components/common/FinsembleSelect.js.map +1 -1
  25. package/react/components/common/Tooltip.d.ts +4 -3
  26. package/react/components/common/Tooltip.js +3 -3
  27. package/react/components/common/Tooltip.js.map +1 -1
  28. package/react/components/common/css/tooltip.css +10 -0
  29. package/react/components/common/helpers.js +12 -0
  30. package/react/components/common/helpers.js.map +1 -1
  31. package/react/components/common/stories/ButtonRow.stories.d.ts +14 -0
  32. package/react/components/common/stories/ButtonRow.stories.js +39 -0
  33. package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
  34. package/react/components/common/stories/Checkbox.stories.d.ts +13 -0
  35. package/react/components/common/stories/Checkbox.stories.js +29 -0
  36. package/react/components/common/stories/Checkbox.stories.js.map +1 -0
  37. package/react/components/common/stories/DropdownButton.stories.d.ts +22 -0
  38. package/react/components/common/stories/DropdownButton.stories.js +29 -0
  39. package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
  40. package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
  41. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  42. package/react/components/common/stories/FinsembleSelect.stories.d.ts +1 -1
  43. package/react/components/common/stories/Tooltip.stories.d.ts +1 -1
  44. package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
  45. package/react/components/common/tests/ButtonRow.spec.js +25 -0
  46. package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
  47. package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
  48. package/react/components/common/tests/Checkbox.spec.js +33 -0
  49. package/react/components/common/tests/Checkbox.spec.js.map +1 -0
  50. package/react/components/fdc3Resolver/ResolverDialog.css +1 -0
  51. package/react/components/fdc3Resolver/ResolverDialog.js +4 -5
  52. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  53. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -8
  54. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  55. package/react/components/fdc3Resolver/ResolverDialog.stories.js +45 -45
  56. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  57. package/react/components/notifications/components/drawer/DrawerHeader.js +6 -6
  58. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  59. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +32 -31
  60. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  61. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +4 -6
  62. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  63. package/react/components/notifications/components/views/ListView.js +1 -1
  64. package/react/components/notifications/components/views/ListView.js.map +1 -1
  65. package/react/components/notifications/components/views/NotificationDetailsView.js +3 -2
  66. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  67. package/react/components/notifications/constants.d.ts +13 -0
  68. package/react/components/notifications/constants.js.map +1 -1
  69. package/react/components/search/Highlight.js +13 -3
  70. package/react/components/search/Highlight.js.map +1 -1
  71. package/react/components/shared/DefaultDropdownButton.d.ts +1 -0
  72. package/react/components/shared/DefaultDropdownButton.js +14 -4
  73. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  74. package/react/components/shared/tests/DefaultDropdownButton.spec.d.ts +1 -0
  75. package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
  76. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
  77. package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
  78. package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
  79. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
  80. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +15 -0
  81. package/react/components/smartDesktopDesigner/AppEditAccess.js +155 -0
  82. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
  83. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +7 -1
  84. package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
  85. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  86. package/react/components/smartDesktopDesigner/Application.d.ts +4 -1
  87. package/react/components/smartDesktopDesigner/Application.js +20 -10
  88. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  89. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
  90. package/react/components/smartDesktopDesigner/ApplicationEdit.js +2 -2
  91. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  92. package/react/components/smartDesktopDesigner/ApplicationList.js +11 -1
  93. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  94. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +6 -1
  95. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  96. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -0
  97. package/react/components/smartDesktopDesigner/Applications.js +2 -2
  98. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  99. package/react/components/smartDesktopDesigner/common/views.js +2 -0
  100. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  101. package/react/components/smartDesktopDesigner/css/applications.css +38 -0
  102. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +18 -0
  103. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  104. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +9 -0
  105. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  106. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -2
  107. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  108. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +71 -2
  109. package/react/components/smartDesktopDesigner/fixtures/apps.js +16 -5
  110. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  111. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +1 -1
  112. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +20 -0
  113. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  114. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +2 -1
  115. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  116. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1 -0
  117. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  118. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  119. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +84 -7
  120. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  121. package/react/components/toolbar/advancedAppLauncher/components/Content.js +2 -3
  122. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  123. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +1 -1
  124. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  125. package/react/components/toolbar/dashbar/Dashbar.js +23 -11
  126. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  127. package/react/components/userPreferences/UserPreferences.js +8 -23
  128. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  129. package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
  130. package/react/components/userPreferences/UserPreferencesBase.js +5 -6
  131. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  132. package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
  133. package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
  134. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
  135. package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
  136. package/react/components/userPreferences/components/ContentSection.js +4 -2
  137. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  138. package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
  139. package/react/components/userPreferences/components/LeftNav.js +11 -10
  140. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  141. package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
  142. package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
  143. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  144. package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
  145. package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
  146. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
  147. package/react/components/userPreferences/components/content/General.d.ts +10 -3
  148. package/react/components/userPreferences/components/content/General.js +2 -2
  149. package/react/components/userPreferences/components/content/General.js.map +1 -1
  150. package/react/components/userPreferences/components/content/Workspaces.js +39 -112
  151. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  152. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +9 -11
  153. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  154. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
  155. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -7
  156. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  157. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
  158. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +13 -12
  159. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  160. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +24 -7
  161. package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -22
  162. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  163. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +9 -0
  164. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -0
  165. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
  166. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
  167. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -0
  168. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
  169. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
  170. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +82 -0
  171. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
  172. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
  173. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +7 -0
  174. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
  175. package/react/components/userPreferences/index.d.ts +1 -1
  176. package/react/components/userPreferences/index.js +1 -1
  177. package/react/components/userPreferences/index.js.map +1 -1
  178. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +0 -1
  179. package/react/components/userPreferences/stores/UserPreferencesStore.js +4 -9
  180. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  181. package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
  182. package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
  183. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  184. package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
  185. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
  186. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
  187. package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
  188. package/react/components/userPreferences/stories/General.stories.js +16 -0
  189. package/react/components/userPreferences/stories/General.stories.js.map +1 -0
  190. package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
  191. package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
  192. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
  193. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
  194. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
  195. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
  196. package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
  197. package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
  198. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
  199. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
  200. package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
  201. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
  202. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +15 -0
  203. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +13 -0
  204. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
  205. package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
  206. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
  207. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
  208. package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
  209. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
  210. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
  211. package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
  212. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
  213. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
  214. package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
  215. package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
  216. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
  217. package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
  218. package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
  219. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
  220. package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
  221. package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
  222. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
  223. package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
  224. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
  225. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
  226. package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
  227. package/react/components/userPreferences/tests/General.spec.js +28 -0
  228. package/react/components/userPreferences/tests/General.spec.js.map +1 -0
  229. package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
  230. package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
  231. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
  232. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
  233. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
  234. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
  235. package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
  236. package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
  237. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
  238. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
  239. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
  240. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
  241. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
  242. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
  243. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
  244. package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
  245. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
  246. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
  247. package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
  248. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +24 -0
  249. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
  250. package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
  251. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
  252. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
  253. package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
  254. package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
  255. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
  256. package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
  257. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
  258. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
  259. package/react/hooks/useNotifications.d.ts +4 -0
  260. package/react/hooks/useNotifications.js +47 -40
  261. package/react/hooks/useNotifications.js.map +1 -1
  262. package/react/hooks/usePubSub.js.map +1 -1
  263. package/react/hooks/useToolbar.js +71 -48
  264. package/react/hooks/useToolbar.js.map +1 -1
  265. package/react/reducers/rootReducer.d.ts +2 -2
  266. package/react/store.d.ts +4 -4
  267. package/react/types/dashbarTypes.d.ts +1 -1
  268. package/react/types/dashbarTypes.js.map +1 -1
  269. package/react/types/fdc3.d.ts +8 -22
  270. package/react/types/fdc3.js.map +1 -1
  271. package/react/types/smartDesktopDesignerTypes.d.ts +4 -1
  272. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  273. package/react/components/shared/addProtocolToValidURL.spec.js.map +0 -1
  274. package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
  275. package/react/components/userPreferences/components/Checkbox.js +0 -27
  276. package/react/components/userPreferences/components/Checkbox.js.map +0 -1
@@ -15,18 +15,18 @@ Short.args = {
15
15
  onCancel: action("cancel"),
16
16
  resolutionList: [
17
17
  {
18
- apps: [
18
+ launchableApps: [
19
19
  {
20
- appId: "Chart",
21
- name: "Chart",
22
- version: "1",
23
- description: "",
20
+ meta: {
21
+ appId: "Chart",
22
+ name: "Chart",
23
+ },
24
24
  },
25
25
  {
26
- appId: "Grid",
27
- name: "Grid",
28
- version: "1",
29
- description: "",
26
+ meta: {
27
+ appId: "Grid",
28
+ name: "Grid",
29
+ },
30
30
  },
31
31
  ],
32
32
  openApps: [
@@ -57,30 +57,30 @@ LongNames.args = {
57
57
  onCancel: action("cancel"),
58
58
  resolutionList: [
59
59
  {
60
- apps: [
60
+ launchableApps: [
61
61
  {
62
- appId: "abc",
63
- name: "jacuzzi",
64
- version: "1",
65
- description: "",
62
+ meta: {
63
+ appId: "abc",
64
+ name: "jacuzzi",
65
+ },
66
66
  },
67
67
  {
68
- appId: "def",
69
- name: "blizzard",
70
- version: "1",
71
- description: "",
68
+ meta: {
69
+ appId: "def",
70
+ name: "blizzard",
71
+ },
72
72
  },
73
73
  {
74
- appId: "ghi",
75
- name: "quizzical",
76
- version: "1",
77
- description: "",
74
+ meta: {
75
+ appId: "ghi",
76
+ name: "quizzical",
77
+ },
78
78
  },
79
79
  {
80
- appId: "jkl",
81
- name: "puzzlement",
82
- version: "1",
83
- description: "",
80
+ meta: {
81
+ appId: "jkl",
82
+ name: "puzzlement",
83
+ },
84
84
  },
85
85
  ],
86
86
  openApps: [],
@@ -98,18 +98,18 @@ MultiIntent.args = {
98
98
  onCancel: action("cancel"),
99
99
  resolutionList: [
100
100
  {
101
- apps: [
101
+ launchableApps: [
102
102
  {
103
- appId: "Grid",
104
- name: "Grid",
105
- version: "1",
106
- description: "",
103
+ meta: {
104
+ appId: "Grid",
105
+ name: "Grid",
106
+ },
107
107
  },
108
108
  {
109
- appId: "Chart",
110
- name: "Chart",
111
- version: "1",
112
- description: "",
109
+ meta: {
110
+ appId: "Chart",
111
+ name: "Chart",
112
+ },
113
113
  },
114
114
  ],
115
115
  openApps: [
@@ -126,12 +126,12 @@ MultiIntent.args = {
126
126
  },
127
127
  },
128
128
  {
129
- apps: [
129
+ launchableApps: [
130
130
  {
131
- appId: "Chart",
132
- name: "Chart",
133
- version: "1",
134
- description: "",
131
+ meta: {
132
+ appId: "Chart",
133
+ name: "Chart",
134
+ },
135
135
  },
136
136
  ],
137
137
  openApps: [],
@@ -141,12 +141,12 @@ MultiIntent.args = {
141
141
  },
142
142
  },
143
143
  {
144
- apps: [
144
+ launchableApps: [
145
145
  {
146
- appId: "Chart",
147
- name: "Chart",
148
- version: "1",
149
- description: "",
146
+ meta: {
147
+ appId: "Chart",
148
+ name: "Chart",
149
+ },
150
150
  },
151
151
  ],
152
152
  openApps: [],
@@ -1 +1 @@
1
- {"version":3,"file":"ResolverDialog.stories.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/Resol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G;oBACZ,WAAW,EAAE,EAAE;iBACf;aACD;YACD,QAAQ,EAAE;gBACT;oBACC,UAAU,EAAE,uBAAuB;oBACnC,IAAI,EAAE;wBACL,IAAI,EAAE,MAAM;qBACZ;iBACD;aACD;YACD,MAAM,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,WAAW;aACxB;SACD;QACD;YACC,IAAI,EAAE;gBACL;oBACC,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,GAAG;oBACZ,WAAW,EAAE,EAAE;iBACf;aACD;YACD,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE;gBACP,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,YAAY;aACzB;SACD;QACD;YACC,IAAI,EAAE;gBACL;oBACC,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,GAAG;oBACZ,WAAW,EAAE,EAAE;iBACf;aACD;YACD,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE;gBACP,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,kBAAkB;aAC/B;SACD;KACD;CACD,CAAC","sourcesContent":["import React from \"react\";\r\nimport { ResolverDialog, ResolverProps } from \"./ResolverDialog\";\r\nimport \"../../assets/css/finsemble.css\";\r\nimport \"../common/css/styles.css\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\n\r\nexport default {\r\n\ttitle: \"FDC3/ResolverDialog\",\r\n\tcomponent: ResolverDialog,\r\n};\r\n\r\nconst Template: Story<ResolverProps> = (args: ResolverProps) => <ResolverDialog {...args} />;\r\n\r\nexport const Short = Template.bind({});\r\nShort.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tapps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Grid\",\r\n\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Chart-1-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Grid-1-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View Chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n\r\nexport const LongNames = Template.bind({});\r\nLongNames.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tapps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"abc\",\r\n\t\t\t\t\tname: \"jacuzzi\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"def\",\r\n\t\t\t\t\tname: \"blizzard\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"ghi\",\r\n\t\t\t\t\tname: \"quizzical\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"jkl\",\r\n\t\t\t\t\tname: \"puzzlement\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View Chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n\r\nexport const MultiIntent = Template.bind({});\r\nMultiIntent.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tapps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Grid\",\r\n\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Grid-7-9140-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewNews\",\r\n\t\t\t\tdisplayName: \"View news\",\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\tapps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\tapps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\tversion: \"1\",\r\n\t\t\t\t\tdescription: \"\",\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChartStudy\",\r\n\t\t\t\tdisplayName: \"View chart study\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n"]}
1
+ {"version":3,"file":"ResolverDialog.stories.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/ResolverDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAiB,MAAM,kBAAkB,CAAC;AACjE,OAAO,gCAAgC,CAAC;AACxC,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAAyB,CAAC,IAAmB,EAAE,EAAE,CAAC,oBAAC,cAAc,OAAK,IAAI,GAAI,CAAC;AAE7F,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,YAAY,EAAE,8BAA8B;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,cAAc,EAAE;QACf;YACC,cAAc,EAAE;gBACf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G,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,YAAY,EAAE,8BAA8B;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,cAAc,EAAE;QACf;YACC,cAAc,EAAE;gBACf;oBACC,IAAI,EAAE;wBACL,KAAK,EAAE,MAAM;wBACb,IAAI,EAAE,MAAM;qBACZ;iBACD;gBACD;oBACC,IAAI,EAAE;wBACL,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,OAAO;qBACb;iBACD;aACD;YACD,QAAQ,EAAE;gBACT;oBACC,UAAU,EAAE,uBAAuB;oBACnC,IAAI,EAAE;wBACL,IAAI,EAAE,MAAM;qBACZ;iBACD;aACD;YACD,MAAM,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,WAAW;aACxB;SACD;QACD;YACC,cAAc,EAAE;gBACf;oBACC,IAAI,EAAE;wBACL,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,OAAO;qBACb;iBACD;aACD;YACD,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE;gBACP,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,YAAY;aACzB;SACD;QACD;YACC,cAAc,EAAE;gBACf;oBACC,IAAI,EAAE;wBACL,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,OAAO;qBACb;iBACD;aACD;YACD,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE;gBACP,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,kBAAkB;aAC/B;SACD;KACD;CACD,CAAC","sourcesContent":["import React from \"react\";\r\nimport { ResolverDialog, ResolverProps } from \"./ResolverDialog\";\r\nimport \"../../assets/css/finsemble.css\";\r\nimport \"../common/css/styles.css\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\n\r\nexport default {\r\n\ttitle: \"FDC3/ResolverDialog\",\r\n\tcomponent: ResolverDialog,\r\n};\r\n\r\nconst Template: Story<ResolverProps> = (args: ResolverProps) => <ResolverDialog {...args} />;\r\n\r\nexport const Short = Template.bind({});\r\nShort.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tlaunchableApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Grid\",\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Chart-1-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Grid-1-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View Chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n\r\nexport const LongNames = Template.bind({});\r\nLongNames.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tlaunchableApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"abc\",\r\n\t\t\t\t\t\tname: \"jacuzzi\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"def\",\r\n\t\t\t\t\t\tname: \"blizzard\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"ghi\",\r\n\t\t\t\t\t\tname: \"quizzical\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"jkl\",\r\n\t\t\t\t\t\tname: \"puzzlement\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View Chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n\r\nexport const MultiIntent = Template.bind({});\r\nMultiIntent.args = {\r\n\tintentRaiser: \"FDC3Tester-37-8788-Finsemble\",\r\n\tonSend: action(\"sent\"),\r\n\tonCancel: action(\"cancel\"),\r\n\tresolutionList: [\r\n\t\t{\r\n\t\t\tlaunchableApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Grid\",\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\twindowName: \"Grid-7-9140-Finsemble\",\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tname: \"Grid\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewNews\",\r\n\t\t\t\tdisplayName: \"View news\",\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\tlaunchableApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChart\",\r\n\t\t\t\tdisplayName: \"View chart\",\r\n\t\t\t},\r\n\t\t},\r\n\t\t{\r\n\t\t\tlaunchableApps: [\r\n\t\t\t\t{\r\n\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\tappId: \"Chart\",\r\n\t\t\t\t\t\tname: \"Chart\",\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t\topenApps: [],\r\n\t\t\tintent: {\r\n\t\t\t\tname: \"ViewChartStudy\",\r\n\t\t\t\tdisplayName: \"View chart study\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n};\r\n"]}
@@ -1,7 +1,6 @@
1
1
  import React, { useState, useRef, useContext } from "react";
2
2
  import debounce from "lodash/debounce";
3
- import { NOTIFICATIONS_PUBSUB_TOPIC } from "../../constants";
4
- import { usePubSub } from "../../../../hooks/usePubSub";
3
+ import { useNotificationUI } from "../../../../hooks/useNotifications";
5
4
  import IconButton from "../shared/IconButton";
6
5
  import { NotificationsContext } from "../../notificationsContext";
7
6
  const NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }) => {
@@ -28,15 +27,16 @@ const NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }) => {
28
27
  React.createElement("span", { className: "btn-label" }, "Settings"))));
29
28
  };
30
29
  const DrawerHeader = ({ poppedOutStatus, popOutToggle }) => {
31
- const [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);
30
+ const [uiState, setUIState] = useNotificationUI();
32
31
  const notificationsContext = useContext(NotificationsContext);
33
32
  const { searchString, setSearchString } = notificationsContext;
34
33
  const [searchInputValue, setSearchInputValue] = useState(searchString);
35
34
  const [showMenu, setShowMenu] = useState(false);
36
35
  const closeDrawerClick = () => {
37
- const publishValue = { ...notificationSubscribeMessage };
38
- publishValue["showCenter"] = false;
39
- notificationsPublish(publishValue);
36
+ setUIState({
37
+ ...uiState,
38
+ showCenter: false,
39
+ });
40
40
  };
41
41
  const toggleMenu = () => {
42
42
  setShowMenu(!showMenu);
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,uBAAuB,GAAG,CAAC,EAAE,eAAe,EAAE,YAAY,EAAO,EAAE,EAAE;IAC1E,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,iCAAiC,EAAE;YACrE,cAAc,EAAE,eAAe;SAC/B,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CACrC;YACC,aAAa,EAAE,iBAAiB;SAChC,EACD;YACC,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,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C,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\r\nimport debounce from \"lodash/debounce\";\r\n\r\n// Types\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\r\n\r\n// Hooks\r\nimport { usePubSub } from \"../../../../hooks/usePubSub\";\r\n\r\n// Components\r\nimport IconButton from \"../shared/IconButton\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\r\n\tconst goToSettings = () => {\r\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\r\n\t\t\tpreferencesTab: \"Notifications\",\r\n\t\t});\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"UserPreferences\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"overflow-menu__container\">\r\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\r\n\t\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\r\n\t\t\t\t</div>\r\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\r\n\t\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t\t<i className=\"ff-settings\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t<span className=\"btn-label\">Settings</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nconst DrawerHeader: React.FunctionComponent<{\r\n\tpoppedOutStatus: boolean;\r\n\tpopOutToggle: Function;\r\n}> = ({ poppedOutStatus, popOutToggle }) => {\r\n\tconst [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { searchString, setSearchString } = notificationsContext;\r\n\r\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\r\n\r\n\tconst [showMenu, setShowMenu] = useState(false);\r\n\r\n\tconst closeDrawerClick = () => {\r\n\t\tconst publishValue = { ...notificationSubscribeMessage };\r\n\t\tpublishValue[\"showCenter\"] = false;\r\n\t\tnotificationsPublish(publishValue);\r\n\t};\r\n\r\n\tconst toggleMenu = () => {\r\n\t\tsetShowMenu(!showMenu);\r\n\t};\r\n\r\n\t// This is unchanged across renders\r\n\tconst handleSearchTerm = useRef(\r\n\t\tdebounce((nextValue: string) => {\r\n\t\t\tconst regex = /^(title|details|source):/gi;\r\n\t\t\tnextValue = nextValue.trim();\r\n\r\n\t\t\tconst isFilter = regex.test(nextValue);\r\n\t\t\tlet parsedSearchTerm = \"\";\r\n\r\n\t\t\tif (isFilter) {\r\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\r\n\t\t\t} else {\r\n\t\t\t\tparsedSearchTerm = nextValue;\r\n\t\t\t}\r\n\r\n\t\t\tif (parsedSearchTerm.length > 2) {\r\n\t\t\t\tsetSearchString(nextValue);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.log(\"search string is too short\");\r\n\t\t\t\tsetSearchString(\"\");\r\n\t\t\t}\r\n\t\t}, 400)\r\n\t).current;\r\n\r\n\tconst handleChange = (ev: any) => {\r\n\t\tconst { value: nextValue } = ev.target;\r\n\t\tsetSearchInputValue(nextValue);\r\n\t\t// Even though handleChange is created on each render and executed\r\n\t\t// it references the same handleSearchTerm that was created initially\r\n\t\thandleSearchTerm(nextValue);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div id=\"notifications-center__header\">\r\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\r\n\t\t\t<input\r\n\t\t\t\tclassName=\"search-notifications__input\"\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tplaceholder={\"Search Notifications\"}\r\n\t\t\t\tvalue={searchInputValue}\r\n\t\t\t\tonChange={handleChange}\r\n\t\t\t/>\r\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\r\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\r\n\t\t\t</IconButton>\r\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default DrawerHeader;\r\n"]}
1
+ {"version":3,"file":"DrawerHeader.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/drawer/DrawerHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAMvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAA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AAC,EAAO,EAAE,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC;QACvC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAG/B,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,EAAE,EAAC,8BAA8B;QACrC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,UAAU,EAAC,UAAU,GAAG;QACzD,+BACC,SAAS,EAAC,6BAA6B,EACvC,IAAI,EAAC,MAAM,EACX,WAAW,EAAE,sBAAsB,EACnC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,YAAY,GACrB;QACF,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,aAAa,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,IAC7G,QAAQ,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI,CAChG;QACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,sBAAsB,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,GAAI,CACjF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { useState, useRef, useContext } from \"react\";\r\nimport debounce from \"lodash/debounce\";\r\n\r\n// Types\r\nimport { NOTIFICATIONS_PUBSUB_TOPIC } from \"../../constants\";\r\n\r\n// Hooks\r\nimport { useNotificationUI } from \"../../../../hooks/useNotifications\";\r\n\r\n// Components\r\nimport IconButton from \"../shared/IconButton\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\nconst NotificationsCenterMenu = ({ poppedOutStatus, popOutToggle }: any) => {\r\n\tconst goToSettings = () => {\r\n\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\r\n\t\t\tpreferencesTab: \"Notifications\",\r\n\t\t});\r\n\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t{\r\n\t\t\t\tcomponentType: \"UserPreferences\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\tleft: \"center\",\r\n\t\t\t\ttop: \"center\",\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"overflow-menu__container\">\r\n\t\t\t<div className=\"overflow-menu__action\" onClick={popOutToggle}>\r\n\t\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t\t<i className={`ff-${poppedOutStatus ? \"share\" : \"chat-popout\"}`} />\r\n\t\t\t\t</div>\r\n\t\t\t\t<span className=\"btn-label\">{poppedOutStatus ? \"Pop-in\" : \"Pop-out\"}</span>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"overflow-menu__action\" onClick={goToSettings}>\r\n\t\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t\t<i className=\"ff-settings\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t<span className=\"btn-label\">Settings</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nconst DrawerHeader: React.FunctionComponent<{\r\n\tpoppedOutStatus: boolean;\r\n\tpopOutToggle: Function;\r\n}> = ({ poppedOutStatus, popOutToggle }) => {\r\n\tconst [uiState, setUIState] = useNotificationUI();\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { searchString, setSearchString } = notificationsContext;\r\n\r\n\tconst [searchInputValue, setSearchInputValue] = useState(searchString);\r\n\r\n\tconst [showMenu, setShowMenu] = useState(false);\r\n\r\n\tconst closeDrawerClick = () => {\r\n\t\tsetUIState({\r\n\t\t\t...uiState,\r\n\t\t\tshowCenter: false,\r\n\t\t});\r\n\t};\r\n\r\n\tconst toggleMenu = () => {\r\n\t\tsetShowMenu(!showMenu);\r\n\t};\r\n\r\n\t// This is unchanged across renders\r\n\tconst handleSearchTerm = useRef(\r\n\t\tdebounce((nextValue: string) => {\r\n\t\t\tconst regex = /^(title|details|source):/gi;\r\n\t\t\tnextValue = nextValue.trim();\r\n\r\n\t\t\tconst isFilter = regex.test(nextValue);\r\n\t\t\tlet parsedSearchTerm = \"\";\r\n\r\n\t\t\tif (isFilter) {\r\n\t\t\t\tparsedSearchTerm = nextValue.split(\":\")[1].trim();\r\n\t\t\t} else {\r\n\t\t\t\tparsedSearchTerm = nextValue;\r\n\t\t\t}\r\n\r\n\t\t\tif (parsedSearchTerm.length > 2) {\r\n\t\t\t\tsetSearchString(nextValue);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.log(\"search string is too short\");\r\n\t\t\t\tsetSearchString(\"\");\r\n\t\t\t}\r\n\t\t}, 400)\r\n\t).current;\r\n\r\n\tconst handleChange = (ev: any) => {\r\n\t\tconst { value: nextValue } = ev.target;\r\n\t\tsetSearchInputValue(nextValue);\r\n\t\t// Even though handleChange is created on each render and executed\r\n\t\t// it references the same handleSearchTerm that was created initially\r\n\t\thandleSearchTerm(nextValue);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div id=\"notifications-center__header\">\r\n\t\t\t<IconButton iconName=\"ff-search\" classNames=\"no-hover\" />\r\n\t\t\t<input\r\n\t\t\t\tclassName=\"search-notifications__input\"\r\n\t\t\t\ttype=\"text\"\r\n\t\t\t\tplaceholder={\"Search Notifications\"}\r\n\t\t\t\tvalue={searchInputValue}\r\n\t\t\t\tonChange={handleChange}\r\n\t\t\t/>\r\n\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" classNames=\"center-menu\" clickHandler={() => toggleMenu()}>\r\n\t\t\t\t{showMenu ? <NotificationsCenterMenu poppedOutStatus={poppedOutStatus} popOutToggle={popOutToggle} /> : null}\r\n\t\t\t</IconButton>\r\n\t\t\t<IconButton iconName=\"ff-adp-chevron-right\" clickHandler={() => closeDrawerClick()} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default DrawerHeader;\r\n"]}
@@ -1,10 +1,9 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
  import { CSSTransition } from "react-transition-group";
3
3
  import ConditionalWrapper from "../../../shared/ConditionalWrapper";
4
- import { NOTIFICATIONS_PUBSUB_TOPIC, ViewMode, SelectionMode } from "../../constants";
4
+ import { ViewMode, SelectionMode } from "../../constants";
5
5
  import "../../../../assets/css/notificationsCenter.css";
6
- import { usePubSub } from "../../../../hooks/usePubSub";
7
- import useNotifications, { getNotificationConfig, moveToToolbarMonitor, getOS, getFetchHistoryParams, } from "../../../../hooks/useNotifications";
6
+ import useNotifications, { useNotificationUI, getNotificationConfig, moveToToolbarMonitor, getOS, getFetchHistoryParams, } from "../../../../hooks/useNotifications";
8
7
  import { NotificationsContext } from "../../notificationsContext";
9
8
  import CardView from "../views/CardView";
10
9
  import Drawer from "../drawer/Drawer";
@@ -87,7 +86,7 @@ const LAZY_LOAD_NO_MORE_PAGES = -1;
87
86
  export const NotificationsCenter = (props) => {
88
87
  const params = { config: { notificationsHistory: { options: { pageSize: 10 } } } };
89
88
  const { notifications, setOpaqueClassName, addNotification } = useNotifications(params);
90
- const [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);
89
+ const [uiState, setUIState] = useNotificationUI();
91
90
  const config = getNotificationConfig();
92
91
  const [isInitialized, setInitialized] = useState(false);
93
92
  const [isMac] = useState(getOS() === "Mac");
@@ -124,10 +123,12 @@ export const NotificationsCenter = (props) => {
124
123
  setMuteFilters,
125
124
  };
126
125
  const togglePoppedStatus = () => {
127
- const publishValue = { ...notificationSubscribeMessage };
128
- publishValue["poppedOut"] = !notificationSubscribeMessage.poppedOut;
129
- poppedOutRef.current = publishValue["poppedOut"];
130
- notificationsPublish(publishValue);
126
+ const poppedOut = !uiState.poppedOut;
127
+ poppedOutRef.current = poppedOut;
128
+ setUIState({
129
+ ...uiState,
130
+ poppedOut,
131
+ });
131
132
  };
132
133
  const setFullHeight = async (monitorInfo) => {
133
134
  if (!monitorInfo) {
@@ -146,7 +147,7 @@ export const NotificationsCenter = (props) => {
146
147
  width: data.width,
147
148
  };
148
149
  setShowWindowForState({
149
- showCenter: notificationSubscribeMessage.showCenter,
150
+ showCenter: uiState.showCenter,
150
151
  poppedOut: poppedOutRef.current,
151
152
  position: centerWindowPosition,
152
153
  });
@@ -254,7 +255,7 @@ export const NotificationsCenter = (props) => {
254
255
  const hide = (event) => {
255
256
  const publishValue = { ...subscriptionMessageRef.current };
256
257
  publishValue["showCenter"] = false;
257
- notificationsPublish(publishValue);
258
+ setUIState(publishValue);
258
259
  if (applicationState?.current !== "closing") {
259
260
  try {
260
261
  event.cancel();
@@ -289,31 +290,31 @@ export const NotificationsCenter = (props) => {
289
290
  recursiveLoad();
290
291
  }, [viewMode, drawerControlProps.active]);
291
292
  useEffect(() => {
292
- subscriptionMessageRef.current = notificationSubscribeMessage;
293
- if (!isInitialized && typeof notificationSubscribeMessage.showCenter !== "undefined") {
294
- if (notificationSubscribeMessage.poppedOut) {
293
+ subscriptionMessageRef.current = uiState;
294
+ if (!isInitialized && typeof uiState.showCenter !== "undefined") {
295
+ if (uiState.poppedOut) {
295
296
  removePoppedInClasses();
296
297
  }
297
298
  else {
298
299
  addPoppedInClasses();
299
300
  }
300
- if (isValidPosition(notificationSubscribeMessage.position)) {
301
+ if (isValidPosition(uiState.position)) {
301
302
  setShowWindowForState({
302
- showCenter: notificationSubscribeMessage.showCenter,
303
- poppedOut: notificationSubscribeMessage.poppedOut,
304
- position: notificationSubscribeMessage.position,
303
+ showCenter: uiState.showCenter,
304
+ poppedOut: uiState.poppedOut,
305
+ position: uiState.position,
305
306
  });
306
307
  }
307
- showCenterRef.current = notificationSubscribeMessage.showCenter;
308
- poppedOutRef.current = notificationSubscribeMessage.poppedOut;
308
+ showCenterRef.current = uiState.showCenter;
309
+ poppedOutRef.current = uiState.poppedOut;
309
310
  setInitialized(true);
310
311
  }
311
- }, [notificationSubscribeMessage]);
312
+ }, [uiState]);
312
313
  useEffect(() => {
313
314
  if (isInitialized) {
314
- poppedOutRef.current = notificationSubscribeMessage.poppedOut;
315
+ poppedOutRef.current = uiState.poppedOut;
315
316
  finsembleWindow.getMonitor(async (monitorInfo) => {
316
- if (notificationSubscribeMessage.poppedOut) {
317
+ if (uiState.poppedOut) {
317
318
  const { data } = await finsembleWindow.getBounds({});
318
319
  removePoppedInClasses();
319
320
  const centerWindowPosition = {
@@ -323,8 +324,8 @@ export const NotificationsCenter = (props) => {
323
324
  width: data.width,
324
325
  };
325
326
  setShowWindowForState({
326
- showCenter: notificationSubscribeMessage.showCenter,
327
- poppedOut: notificationSubscribeMessage.poppedOut,
327
+ showCenter: uiState.showCenter,
328
+ poppedOut: uiState.poppedOut,
328
329
  position: centerWindowPosition,
329
330
  });
330
331
  }
@@ -334,13 +335,13 @@ export const NotificationsCenter = (props) => {
334
335
  }
335
336
  });
336
337
  }
337
- }, [notificationSubscribeMessage.poppedOut]);
338
+ }, [uiState.poppedOut]);
338
339
  useEffect(() => {
339
340
  if (isInitialized) {
340
- showCenterRef.current = notificationSubscribeMessage.showCenter;
341
- toggleCenter(notificationSubscribeMessage.showCenter, config.isTransparent, poppedOutRef.current);
341
+ showCenterRef.current = uiState.showCenter;
342
+ toggleCenter(uiState.showCenter, config.isTransparent, poppedOutRef.current);
342
343
  }
343
- }, [notificationSubscribeMessage.showCenter]);
344
+ }, [uiState.showCenter]);
344
345
  useEffect(() => {
345
346
  setFilteredNotifications([...notifications]);
346
347
  }, [notifications]);
@@ -369,15 +370,15 @@ export const NotificationsCenter = (props) => {
369
370
  }, [reloadMuteFilters]);
370
371
  const notificationsMainView = () => {
371
372
  return (React.createElement(React.Fragment, null,
372
- React.createElement(DrawerHeader, { poppedOutStatus: notificationSubscribeMessage.poppedOut, popOutToggle: togglePoppedStatus }),
373
+ React.createElement(DrawerHeader, { poppedOutStatus: uiState.poppedOut, popOutToggle: togglePoppedStatus }),
373
374
  React.createElement(DrawerControls, null),
374
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 })))));
375
376
  };
376
377
  const notificationDetailsViewComponent = () => {
377
378
  return React.createElement(NotificationDetailsView, { notification: selectedNotification });
378
379
  };
379
- return (React.createElement(ConditionalWrapper, { condition: config.isTransparent && !notificationSubscribeMessage.poppedOut && !isMac, wrapper: (children) => (React.createElement(CSSTransition, { in: notificationSubscribeMessage.showCenter, timeout: 500, classNames: "drawer", unmountOnExit: true }, children)) },
380
+ 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)) },
380
381
  React.createElement(NotificationsContext.Provider, { value: notificationsContextValues },
381
- React.createElement(Drawer, { classNames: notificationSubscribeMessage.poppedOut ? "popped-out" : "" }, selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()))));
382
+ React.createElement(Drawer, { classNames: uiState.poppedOut ? "popped-out" : "" }, selectedNotification ? notificationDetailsViewComponent() : notificationsMainView()))));
382
383
  };
383
384
  //# sourceMappingURL=NotificationsCenter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsCenter.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsCenter/NotificationsCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,aAAa,EAAE,MAA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B,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 { usePubSub } from \"../../../../hooks/usePubSub\";\r\nimport useNotifications, {\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 [notificationSubscribeMessage, notificationsPublish] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);\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 publishValue = { ...notificationSubscribeMessage };\r\n\t\tpublishValue[\"poppedOut\"] = !notificationSubscribeMessage.poppedOut;\r\n\t\tpoppedOutRef.current = publishValue[\"poppedOut\"];\r\n\t\tnotificationsPublish(publishValue);\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: notificationSubscribeMessage.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\tnotificationsPublish(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 = notificationSubscribeMessage;\r\n\t\t// Hook can execute before initial pubsub response - waiting for actual values\r\n\t\tif (!isInitialized && typeof notificationSubscribeMessage.showCenter !== \"undefined\") {\r\n\t\t\tif (notificationSubscribeMessage.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(notificationSubscribeMessage.position)) {\r\n\t\t\t\tsetShowWindowForState({\r\n\t\t\t\t\tshowCenter: notificationSubscribeMessage.showCenter,\r\n\t\t\t\t\tpoppedOut: notificationSubscribeMessage.poppedOut,\r\n\t\t\t\t\tposition: notificationSubscribeMessage.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 = notificationSubscribeMessage.showCenter;\r\n\t\t\tpoppedOutRef.current = notificationSubscribeMessage.poppedOut;\r\n\r\n\t\t\tsetInitialized(true);\r\n\t\t}\r\n\t}, [notificationSubscribeMessage]);\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 = notificationSubscribeMessage.poppedOut;\r\n\t\t\tfinsembleWindow.getMonitor(async (monitorInfo: any) => {\r\n\t\t\t\tif (notificationSubscribeMessage.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: notificationSubscribeMessage.showCenter,\r\n\t\t\t\t\t\tpoppedOut: notificationSubscribeMessage.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}, [notificationSubscribeMessage.poppedOut]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isInitialized) {\r\n\t\t\tshowCenterRef.current = notificationSubscribeMessage.showCenter;\r\n\t\t\ttoggleCenter(notificationSubscribeMessage.showCenter, config.isTransparent as boolean, poppedOutRef.current);\r\n\t\t}\r\n\t}, [notificationSubscribeMessage.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={notificationSubscribeMessage.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) && !notificationSubscribeMessage.poppedOut && !isMac}\r\n\t\t\twrapper={(children) => (\r\n\t\t\t\t<CSSTransition in={notificationSubscribeMessage.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={notificationSubscribeMessage.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;AACv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,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,9 +1,7 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
- import useNotifications, { moveToToolbarMonitor, getNotificationConfig, getOS, } from "../../../../hooks/useNotifications";
3
- import { usePubSub } from "../../../../hooks/usePubSub";
2
+ import useNotifications, { useNotificationUI, moveToToolbarMonitor, getNotificationConfig, getOS, } from "../../../../hooks/useNotifications";
4
3
  import { NotificationCardShell } from "../shared/NotificationCardShell";
5
4
  import { CSSTransition } from "react-transition-group";
6
- import { NOTIFICATIONS_PUBSUB_TOPIC } from "../../constants";
7
5
  import "../../../../assets/css/notificationsCenter.css";
8
6
  const ToastCard = (props) => {
9
7
  const notificationRef = useRef();
@@ -51,10 +49,10 @@ const ToastCard = (props) => {
51
49
  export const NotificationsToasts = (props) => {
52
50
  const { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } = useNotifications({ config: { notificationsHistory: { options: { sentAfter: "startup" } } } });
53
51
  const notificationsRef = useRef(notifications);
54
- const [notificationSubscribeMessage] = usePubSub(NOTIFICATIONS_PUBSUB_TOPIC);
52
+ const [uiState] = useNotificationUI();
55
53
  const isNotificationActive = (notification) => {
56
- return (notificationIsActive(notification) &&
57
- (!notificationSubscribeMessage.showCenter || notificationSubscribeMessage.poppedOut));
54
+ const notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;
55
+ return notificationIsActive(notification) && notificationCenterNotActive;
58
56
  };
59
57
  const config = getNotificationConfig();
60
58
  const [isMac] = useState(getOS() === "Mac");