@finsemble/finsemble-ui 6.3.0-beta.20211021 → 6.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (550) hide show
  1. package/README.md +28 -28
  2. package/package.json +3 -2
  3. package/react/actions/favoriteActions.js.map +1 -1
  4. package/react/actions/linkerActions.js.map +1 -1
  5. package/react/actions/menuActions.js.map +1 -1
  6. package/react/actions/rootActions.js.map +1 -1
  7. package/react/actions/searchActions.js.map +1 -1
  8. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  9. package/react/actions/toolbarActions.js.map +1 -1
  10. package/react/actions/workspaceActions.js.map +1 -1
  11. package/react/assets/css/advancedAppLauncher.css +636 -636
  12. package/react/assets/css/appCatalog.css +1069 -1069
  13. package/react/assets/css/authentication.css +78 -78
  14. package/react/assets/css/button.css +220 -220
  15. package/react/assets/css/core/formElements.css +23 -23
  16. package/react/assets/css/core/icons.css +69 -69
  17. package/react/assets/css/core/notifications.css +75 -75
  18. package/react/assets/css/core/windowFrame.css +36 -36
  19. package/react/assets/css/dashbar.css +78 -78
  20. package/react/assets/css/defaultTheme.css +356 -356
  21. package/react/assets/css/dialogs.css +158 -158
  22. package/react/assets/css/favorites.css +101 -101
  23. package/react/assets/css/finsemble.css +38 -38
  24. package/react/assets/css/focus.css +4 -4
  25. package/react/assets/css/font-finance.css +385 -385
  26. package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
  27. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
  28. package/react/assets/css/fonts/font-finance.svg +124 -124
  29. package/react/assets/css/fonts/icons-reference.html +1174 -1174
  30. package/react/assets/css/linkerWindow.css +124 -124
  31. package/react/assets/css/menus.css +195 -195
  32. package/react/assets/css/notificationsCenter.css +597 -597
  33. package/react/assets/css/processMonitor.css +213 -213
  34. package/react/assets/css/search.css +128 -128
  35. package/react/assets/css/shared/animations.css +99 -99
  36. package/react/assets/css/tags.css +136 -136
  37. package/react/assets/css/toolbar.css +413 -413
  38. package/react/assets/css/userPreferences.css +568 -568
  39. package/react/assets/css/windowTitleBar.css +652 -652
  40. package/react/assets/icons/check-square.svg +5 -5
  41. package/react/assets/icons/check.svg +3 -3
  42. package/react/assets/icons/chevron-left.svg +3 -3
  43. package/react/assets/icons/chevron-right.svg +3 -3
  44. package/react/assets/icons/copy.svg +10 -10
  45. package/react/assets/icons/exclamation-circle.svg +4 -4
  46. package/react/assets/icons/external-link.svg +12 -12
  47. package/react/assets/icons/flag.svg +10 -10
  48. package/react/assets/icons/folder.svg +3 -3
  49. package/react/assets/icons/font.svg +3 -3
  50. package/react/assets/icons/globe.svg +3 -3
  51. package/react/assets/icons/hdd.svg +9 -9
  52. package/react/assets/icons/key.svg +10 -10
  53. package/react/assets/icons/life-ring.svg +3 -3
  54. package/react/assets/icons/lock.svg +5 -5
  55. package/react/assets/icons/magic.svg +15 -15
  56. package/react/assets/icons/moon.svg +10 -10
  57. package/react/assets/icons/paint-roller.svg +3 -3
  58. package/react/assets/icons/pencil.svg +10 -10
  59. package/react/assets/icons/plus.svg +3 -3
  60. package/react/assets/icons/question-circle.svg +5 -5
  61. package/react/assets/icons/search.svg +3 -3
  62. package/react/assets/icons/sun.svg +9 -9
  63. package/react/assets/icons/times.svg +3 -3
  64. package/react/assets/icons/toggle-off.svg +6 -6
  65. package/react/assets/icons/toggle-on.svg +6 -6
  66. package/react/assets/icons/tools.svg +3 -3
  67. package/react/assets/icons/trash.svg +12 -12
  68. package/react/assets/icons/upload.svg +10 -10
  69. package/react/assets/icons/window.svg +3 -3
  70. package/react/componentTemplateGenerator.js +85 -85
  71. package/react/componentTemplateGenerator.js.map +1 -1
  72. package/react/components/FinsembleProvider.js.map +1 -1
  73. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  74. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  75. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  76. package/react/components/appCatalog/components/AppList.js.map +1 -1
  77. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  78. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  79. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  80. package/react/components/appCatalog/components/Hero.js.map +1 -1
  81. package/react/components/appCatalog/components/Home.js.map +1 -1
  82. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  83. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  84. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  85. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  86. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  87. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  88. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  89. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  90. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  91. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  92. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  93. package/react/components/appCatalog/components/Tag.js.map +1 -1
  94. package/react/components/appCatalog/components/Toast.js.map +1 -1
  95. package/react/components/appCatalog/components/helpers.js.map +1 -1
  96. package/react/components/appCatalog/index.js.map +1 -1
  97. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  98. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  99. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  100. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  101. package/react/components/common/Button.js.map +1 -1
  102. package/react/components/common/ButtonIcon.js.map +1 -1
  103. package/react/components/common/ButtonRow.js.map +1 -1
  104. package/react/components/common/ButtonTile.js.map +1 -1
  105. package/react/components/common/Checkbox.js.map +1 -1
  106. package/react/components/common/ColorPicker.js.map +1 -1
  107. package/react/components/common/DropZone.js.map +1 -1
  108. package/react/components/common/DropdownButton.js.map +1 -1
  109. package/react/components/common/FileInput.js.map +1 -1
  110. package/react/components/common/FinsembleIcon.js.map +1 -1
  111. package/react/components/common/FinsembleSelect.js.map +1 -1
  112. package/react/components/common/FinsembleToggle.js.map +1 -1
  113. package/react/components/common/FontSizeSelector.js.map +1 -1
  114. package/react/components/common/Header.js.map +1 -1
  115. package/react/components/common/ImagePreview.js.map +1 -1
  116. package/react/components/common/LoadingSpinner.js.map +1 -1
  117. package/react/components/common/Tab.js.map +1 -1
  118. package/react/components/common/Tooltip.js.map +1 -1
  119. package/react/components/common/css/application-edit-page.css +117 -117
  120. package/react/components/common/css/application-list.css +47 -47
  121. package/react/components/common/css/button.css +164 -164
  122. package/react/components/common/css/color-picker.css +52 -52
  123. package/react/components/common/css/drop-zone.css +17 -17
  124. package/react/components/common/css/file-input.css +49 -49
  125. package/react/components/common/css/header.css +43 -43
  126. package/react/components/common/css/icon.css +13 -13
  127. package/react/components/common/css/image-preview.css +57 -57
  128. package/react/components/common/css/loading-spinner.css +39 -39
  129. package/react/components/common/css/selector.css +51 -51
  130. package/react/components/common/css/styles.css +128 -128
  131. package/react/components/common/css/tab.css +56 -56
  132. package/react/components/common/css/toggle.css +32 -32
  133. package/react/components/common/css/tooltip.css +78 -78
  134. package/react/components/common/file_helpers.js.map +1 -1
  135. package/react/components/common/fixtures/FinsembleIcon.css +4 -4
  136. package/react/components/common/helpers.js.map +1 -1
  137. package/react/components/common/stories/Button.stories.js.map +1 -1
  138. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  139. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  140. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  141. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  142. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  143. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  144. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  145. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  146. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  147. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  148. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  149. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  150. package/react/components/common/stories/Header.stories.js.map +1 -1
  151. package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
  152. package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
  153. package/react/components/common/stories/Tab.stories.js.map +1 -1
  154. package/react/components/common/stories/Tooltip.stories.js.map +1 -1
  155. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  156. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  157. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  158. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  159. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  160. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  161. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  162. package/react/components/common/tests/Header.spec.js.map +1 -1
  163. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  164. package/react/components/common/tests/Tab.spec.js.map +1 -1
  165. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  166. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  167. package/react/components/favorites/FavoritesShell.js.map +1 -1
  168. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  169. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  170. package/react/components/favorites/index.js.map +1 -1
  171. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  172. package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
  173. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  174. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  175. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  176. package/react/components/icon/Icon.js.map +1 -1
  177. package/react/components/icon/index.js.map +1 -1
  178. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  179. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  180. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  181. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  182. package/react/components/legacyControls/FinsembleDnDContext.js +1 -1
  183. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  184. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  185. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  186. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  187. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  188. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  189. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  190. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  191. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  192. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  193. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  194. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  195. package/react/components/linker/LinkerMenu.js.map +1 -1
  196. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  197. package/react/components/linker/index.js.map +1 -1
  198. package/react/components/linker/remoteRedux.js.map +1 -1
  199. package/react/components/menu/Menu.js.map +1 -1
  200. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  201. package/react/components/menu/MenuContent.js.map +1 -1
  202. package/react/components/menu/MenuHotKey.js.map +1 -1
  203. package/react/components/menu/MenuItem.js.map +1 -1
  204. package/react/components/menu/MenuPortal.js.map +1 -1
  205. package/react/components/menu/MenuShell.js.map +1 -1
  206. package/react/components/menu/MenuToggle.js.map +1 -1
  207. package/react/components/menu/index.js.map +1 -1
  208. package/react/components/menu/keyboardNavigation.js.map +1 -1
  209. package/react/components/menu/menuContext.js.map +1 -1
  210. package/react/components/menu/menuHelpers.js.map +1 -1
  211. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  212. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  213. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  214. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  215. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  216. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  217. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  218. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  219. package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
  220. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  221. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  222. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  223. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
  224. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  225. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  226. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
  227. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  228. package/react/components/notifications/components/views/CardView.js.map +1 -1
  229. package/react/components/notifications/components/views/ListView.js +1 -1
  230. package/react/components/notifications/components/views/ListView.js.map +1 -1
  231. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  232. package/react/components/notifications/constants.js.map +1 -1
  233. package/react/components/notifications/icons/Card.js.map +1 -1
  234. package/react/components/notifications/icons/Chevron.js.map +1 -1
  235. package/react/components/notifications/icons/CloseIcon.js.map +1 -1
  236. package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
  237. package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
  238. package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
  239. package/react/components/notifications/index.js.map +1 -1
  240. package/react/components/notifications/notificationsContext.js.map +1 -1
  241. package/react/components/notifications/types.js.map +1 -1
  242. package/react/components/notifications/utils.js.map +1 -1
  243. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  244. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  245. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  246. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  247. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  248. package/react/components/processMonitor/constants.js.map +1 -1
  249. package/react/components/processMonitor/helpers.js.map +1 -1
  250. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  251. package/react/components/processMonitor/index.js.map +1 -1
  252. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +1 -0
  253. package/react/components/processMonitor/stores/ProcessMonitorStore.js +2 -1
  254. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  255. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  256. package/react/components/quickComponentForm/index.js.map +1 -1
  257. package/react/components/quickComponentForm/quickComponent.css +3 -3
  258. package/react/components/search/Highlight.js.map +1 -1
  259. package/react/components/search/Highlight.spec.js.map +1 -1
  260. package/react/components/search/Highlight.stories.js.map +1 -1
  261. package/react/components/search/Search.js.map +1 -1
  262. package/react/components/search/SearchBestMatch.js.map +1 -1
  263. package/react/components/search/SearchInput.js.map +1 -1
  264. package/react/components/search/SearchProviderResults.js.map +1 -1
  265. package/react/components/search/SearchResult.js.map +1 -1
  266. package/react/components/search/SearchResults.js.map +1 -1
  267. package/react/components/search/index.js.map +1 -1
  268. package/react/components/shared/Animate.js.map +1 -1
  269. package/react/components/shared/BellIcon.js.map +1 -1
  270. package/react/components/shared/BellIconCrossed.js.map +1 -1
  271. package/react/components/shared/Button.js.map +1 -1
  272. package/react/components/shared/ConditionalWrapper.js.map +1 -1
  273. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  274. package/react/components/shared/NavigationButton.js.map +1 -1
  275. package/react/components/shared/Tag.js.map +1 -1
  276. package/react/components/shared/TagsMenu.js.map +1 -1
  277. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  278. package/react/components/shared/linkerUtil.js.map +1 -1
  279. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  280. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  281. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  282. package/react/components/shared/validateURL.js.map +1 -1
  283. package/react/components/shared/validateURL.spec.js.map +1 -1
  284. package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
  285. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  286. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  287. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  288. package/react/components/singleInputDialog/index.js.map +1 -1
  289. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  290. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  291. package/react/components/smartDesktopDesigner/Appearance.css +94 -94
  292. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
  293. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  294. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  295. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  296. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  297. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  298. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  299. package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
  300. package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
  301. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  302. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  303. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  304. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  305. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  306. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  307. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  308. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  309. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  310. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  311. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
  312. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  313. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  314. package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
  315. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  316. package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
  317. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  318. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  319. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  320. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  321. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  322. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  323. package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
  324. package/react/components/smartDesktopDesigner/css/applications.css +127 -127
  325. package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
  326. package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
  327. package/react/components/smartDesktopDesigner/css/export.css +163 -163
  328. package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
  329. package/react/components/smartDesktopDesigner/css/nav.css +93 -93
  330. package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
  331. package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
  332. package/react/components/smartDesktopDesigner/css/styles.css +179 -179
  333. package/react/components/smartDesktopDesigner/css/views.css +16 -16
  334. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  335. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  336. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  337. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  338. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
  339. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
  341. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  342. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  343. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  344. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  345. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  347. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  349. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
  352. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  353. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  355. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  358. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  362. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  369. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  370. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  371. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  373. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  375. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  377. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  379. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  380. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
  382. package/react/components/system/System.js.map +1 -1
  383. package/react/components/system/System.spec.js.map +1 -1
  384. package/react/components/system/System.stories.js.map +1 -1
  385. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  386. package/react/components/system/index.js.map +1 -1
  387. package/react/components/toolbar/AutoArrange.js.map +1 -1
  388. package/react/components/toolbar/DragHandle.js.map +1 -1
  389. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  390. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  391. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  392. package/react/components/toolbar/NotificationControl.js.map +1 -1
  393. package/react/components/toolbar/RevealAll.js.map +1 -1
  394. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  395. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  396. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  397. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  398. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  399. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  400. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  401. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  402. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  403. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  404. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  405. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  406. package/react/components/toolbar/advancedAppLauncher/components/Content.js +3 -1
  407. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  408. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  409. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  410. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  411. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  412. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  413. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  414. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  415. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  416. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  417. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  418. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  419. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  420. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  421. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  422. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  423. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  424. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  425. package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
  426. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  427. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  428. package/react/components/toolbar/dashbar/Dashbar.js +2 -2
  429. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  430. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  431. package/react/components/toolbar/index.js.map +1 -1
  432. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  433. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  434. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  435. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  436. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  437. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
  438. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  439. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
  440. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  441. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  442. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  443. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  444. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  445. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  446. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
  447. package/react/components/userPreferences/components/content/General.js.map +1 -1
  448. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  449. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  450. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  451. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  452. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  453. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  454. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  455. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  456. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  457. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  458. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  459. package/react/components/userPreferences/index.js.map +1 -1
  460. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  461. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  462. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  463. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  464. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
  465. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  466. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  467. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  468. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  469. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
  470. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  471. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  472. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  473. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  474. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  475. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  476. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  477. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  478. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  479. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  480. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  481. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  482. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  483. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  484. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  485. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  486. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  487. package/react/components/utils.js.map +1 -1
  488. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  489. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  490. package/react/components/windowTitleBar/components/center/TabList.js +1 -1
  491. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  492. package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
  493. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  494. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  495. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  496. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  497. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  498. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  499. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  500. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  501. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  502. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  503. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  504. package/react/components/windowTitleBar/index.js.map +1 -1
  505. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  506. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  507. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  508. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  509. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  510. package/react/components/yesNoDialog/YesNoDialog.css +3 -3
  511. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  512. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  513. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  514. package/react/components/yesNoDialog/index.js.map +1 -1
  515. package/react/components/yesNoDialog/timer.js.map +1 -1
  516. package/react/enzymeSetup.js.map +1 -1
  517. package/react/hooks/index.js.map +1 -1
  518. package/react/hooks/useAuth.js.map +1 -1
  519. package/react/hooks/useDeepEffect.js.map +1 -1
  520. package/react/hooks/useFavorites.js.map +1 -1
  521. package/react/hooks/useFavoritesShell.js.map +1 -1
  522. package/react/hooks/useHotkey.js.map +1 -1
  523. package/react/hooks/useLinker.js.map +1 -1
  524. package/react/hooks/useMenu.js.map +1 -1
  525. package/react/hooks/useNotifications.js.map +1 -1
  526. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  527. package/react/hooks/usePubSub.js.map +1 -1
  528. package/react/hooks/useSearch.js.map +1 -1
  529. package/react/hooks/useToolbar.js.map +1 -1
  530. package/react/hooks/useWorkspace.js.map +1 -1
  531. package/react/reducers/favoriteReducer.js.map +1 -1
  532. package/react/reducers/linkerReducer.js.map +1 -1
  533. package/react/reducers/menuReducer.js.map +1 -1
  534. package/react/reducers/rootReducer.js.map +1 -1
  535. package/react/reducers/searchReducer.js.map +1 -1
  536. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  537. package/react/reducers/toolbarReducer.js.map +1 -1
  538. package/react/reducers/workspaceReducer.js.map +1 -1
  539. package/react/store.js.map +1 -1
  540. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  541. package/react/types/dashbarTypes.js.map +1 -1
  542. package/react/types/favoriteTypes.js.map +1 -1
  543. package/react/types/fdc3.js.map +1 -1
  544. package/react/types/hotkeyTypes.js.map +1 -1
  545. package/react/types/iconTypes.js.map +1 -1
  546. package/react/types/linkerTypes.js.map +1 -1
  547. package/react/types/searchTypes.js.map +1 -1
  548. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  549. package/react/types/windowTitleBar.js.map +1 -1
  550. package/react/types/workspaceTypes.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,O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CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\r\nimport useNotifications, {\r\n\tuseNotificationUI,\r\n\tmoveToToolbarMonitor,\r\n\tgetNotificationConfig,\r\n\tgetOS,\r\n} from \"../../../../hooks/useNotifications\";\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport { CSSTransition } from \"react-transition-group\";\r\nimport { INotificationToastsProps } from \"../../types\";\r\nimport \"../../../../assets/css/notificationsCenter.css\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\ntype ToastCardProps = {\r\n\tnotification: INotification;\r\n\tremoveFunction: Function;\r\n\tisActiveFunction: Function;\r\n\tinformationalNotificationTimeout: number | false;\r\n\tactionableTimeoutEnabled: boolean;\r\n\tnotificationCard?: React.ComponentType<any>;\r\n};\r\n\r\nconst ToastCard = (props: ToastCardProps) => {\r\n\tconst notificationRef = useRef<INotification>();\r\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\r\n\t\tprops;\r\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\r\n\tconst [showNotification] = useState(isActiveFunction(notification));\r\n\r\n\tuseEffect(() => {\r\n\t\tnotificationRef.current = notification;\r\n\t\tlet timeoutId: any;\r\n\r\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\r\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\r\n\t\t\tlet timeoutLength;\r\n\r\n\t\t\tif (informationalNotificationTimeout !== false) {\r\n\t\t\t\t// Convert to milliseconds\r\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\r\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\r\n\t\t\t\t\ttimeoutLength = notification.timeout;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (timeoutLength) {\r\n\t\t\t\ttimeoutId = setTimeout(() => {\r\n\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t}, timeoutLength);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tclearInterval(timeoutId);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!isActiveFunction(notificationRef.current)) {\r\n\t\t\tremoveFunction(notification);\r\n\t\t}\r\n\t\tsetSlideIn(isActiveFunction(notification));\r\n\t}, [notification]);\r\n\r\n\tconst onExited = () => {\r\n\t\tremoveFunction(notification);\r\n\t};\r\n\r\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\treturn (\r\n\t\tshowNotification && (\r\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\r\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\r\n\t\t\t\t\t<Card\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tuiContext=\"toasts\"\r\n\t\t\t\t\t\tremoveNotification={() => {\r\n\t\t\t\t\t\t\tsetSlideIn(false);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\r\n\t\t\t\t</div>\r\n\t\t\t</CSSTransition>\r\n\t\t)\r\n\t);\r\n};\r\n\r\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\r\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\r\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\r\n\tconst notificationsRef = useRef<INotification[]>(notifications);\r\n\tconst [uiState] = useNotificationUI();\r\n\r\n\tconst isNotificationActive = (notification: INotification): boolean => {\r\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\r\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\r\n\t};\r\n\r\n\tconst config = getNotificationConfig();\r\n\tconst [isMac] = useState(getOS() === \"Mac\");\r\n\r\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\r\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data.notificationPreferences) {\r\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\r\n\t\t\t\t\t\tdata.notificationPreferences;\r\n\r\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\r\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\r\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst transparencySupported = config.isTransparent;\r\n\r\n\t\tsetOpaqueClassName(!transparencySupported);\r\n\r\n\t\tif (transparencySupported) {\r\n\t\t\tfinsembleWindow.show();\r\n\t\t}\r\n\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveToToolbarMonitor().then(() => {\r\n\t\t\tlet forceHide = false;\r\n\t\t\tif (\r\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\r\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\r\n\t\t\t) {\r\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\r\n\t\t\t\tforceHide = true;\r\n\t\t\t}\r\n\r\n\t\t\tnotificationsRef.current = notifications;\r\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\r\n\t\t\tif (notifications.length === 0 || forceHide) {\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: 1,\r\n\t\t\t\t\t\theight: 1,\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinsembleWindow.hide();\r\n\t\t\t} else {\r\n\t\t\t\tfinsembleWindow.bringToFront();\r\n\t\t\t\tif (config.isTransparent && !isMac) {\r\n\t\t\t\t\tconst roundedRect = {\r\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\r\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\r\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\r\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfinsembleWindow.show({}, () => {\r\n\t\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\r\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst { data: bounds } = await finsembleWindow.getBounds();\r\n\t\t\t\t\t\tconst width = (bounds?.right ?? 0) - (bounds?.left ?? 0);\r\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\r\n\r\n\t\t\t\t\t\tfinsembleWindow.setBounds(\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbounds: {\r\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\r\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\r\n\t\t\t\t\t\t\t\t\theight: height + 10,\r\n\t\t\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t(error: any) => {\r\n\t\t\t\t\t\t\t\tif (error) {\r\n\t\t\t\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}, [notifications]);\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t{notifications.map((notification: INotification) => (\r\n\t\t\t\t<ToastCard\r\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\r\n\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\r\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\r\n\t\t\t\t\tremoveFunction={removeNotification}\r\n\t\t\t\t\tisActiveFunction={isNotificationActive}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t))}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationsToasts.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/notificationsToasts/NotificationsToasts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,EAAE,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,gDAAgD,CAAC;AAcxD,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3C,MAAM,eAAe,GAAG,MAAM,EAAiB,CAAC;IAChD,MAAM,EAAE,YAAY,EAAE,gCAAgC,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,GACnH,KAAK,CAAC;IACP,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IACvE,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpE,SAAS,CAAC,GAAG,EAAE;QACd,eAAe,CAAC,OAAO,GAAG,YAAY,CAAC;QACvC,IAAI,SAAc,CAAC;QAEnB,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,wBAAwB,EAAE;YAE1F,IAAI,aAAa,CAAC;YAElB,IAAI,gCAAgC,KAAK,KAAK,EAAE;gBAE/C,aAAa,GAAG,gCAAgC,GAAG,IAAI,CAAC;gBACxD,IAAI,YAAY,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;oBACnE,aAAa,GAAG,YAAY,CAAC,OAAO,C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aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACN,iCACE,aAAa,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,EAAE,CAAC,CACnD,oBAAC,SAAS,kBACT,GAAG,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,EACpC,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,oBAAoB,EACtD,wBAAwB,EAAE,wBAAwB,EAClD,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,IAClC,KAAK,EACR,CACF,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport useNotifications, {\n\tuseNotificationUI,\n\tmoveToToolbarMonitor,\n\tgetNotificationConfig,\n\tgetOS,\n} from \"../../../../hooks/useNotifications\";\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { INotificationToastsProps } from \"../../types\";\nimport \"../../../../assets/css/notificationsCenter.css\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\ntype ToastCardProps = {\n\tnotification: INotification;\n\tremoveFunction: Function;\n\tisActiveFunction: Function;\n\tinformationalNotificationTimeout: number | false;\n\tactionableTimeoutEnabled: boolean;\n\tnotificationCard?: React.ComponentType<any>;\n};\n\nconst ToastCard = (props: ToastCardProps) => {\n\tconst notificationRef = useRef<INotification>();\n\tconst { notification, informationalNotificationTimeout, removeFunction, isActiveFunction, actionableTimeoutEnabled } =\n\t\tprops;\n\tconst [slideIn, setSlideIn] = useState(isActiveFunction(notification));\n\tconst [showNotification] = useState(isActiveFunction(notification));\n\n\tuseEffect(() => {\n\t\tnotificationRef.current = notification;\n\t\tlet timeoutId: any;\n\n\t\tif (!notification.actions || notification.actions.length == 0 || actionableTimeoutEnabled) {\n\t\t\t// Is an informational notification or timeout enabled actionable notifications\n\t\t\tlet timeoutLength;\n\n\t\t\tif (informationalNotificationTimeout !== false) {\n\t\t\t\t// Convert to milliseconds\n\t\t\t\ttimeoutLength = informationalNotificationTimeout * 1000;\n\t\t\t\tif (notification.timeout && Number.isInteger(notification.timeout)) {\n\t\t\t\t\ttimeoutLength = notification.timeout;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (timeoutLength) {\n\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t}, timeoutLength);\n\t\t\t}\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearInterval(timeoutId);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (!isActiveFunction(notificationRef.current)) {\n\t\t\tremoveFunction(notification);\n\t\t}\n\t\tsetSlideIn(isActiveFunction(notification));\n\t}, [notification]);\n\n\tconst onExited = () => {\n\t\tremoveFunction(notification);\n\t};\n\n\tconst Card = props.notificationCard ? props.notificationCard : NotificationCardShell;\n\n\treturn (\n\t\tshowNotification && (\n\t\t\t<CSSTransition in={slideIn} timeout={500} onExited={onExited} classNames=\"notifications-toast\">\n\t\t\t\t<div className=\"notifications-toast__offscreen\">\n\t\t\t\t\t<Card\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tuiContext=\"toasts\"\n\t\t\t\t\t\tremoveNotification={() => {\n\t\t\t\t\t\t\tsetSlideIn(false);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\n\t\t\t\t</div>\n\t\t\t</CSSTransition>\n\t\t)\n\t);\n};\n\nexport const NotificationsToasts: React.FunctionComponent<INotificationToastsProps> = (props) => {\n\tconst { notifications, notificationIsActive, setOpaqueClassName, removeNotification, activeNotifications } =\n\t\tuseNotifications({ config: { notificationsHistory: { options: { sentAfter: \"startup\" } } } });\n\tconst notificationsRef = useRef<INotification[]>(notifications);\n\tconst [uiState] = useNotificationUI();\n\n\tconst isNotificationActive = (notification: INotification): boolean => {\n\t\tconst notificationCenterNotActive = !uiState.showCenter || uiState.poppedOut;\n\t\treturn notificationIsActive(notification) && notificationCenterNotActive;\n\t};\n\n\tconst config = getNotificationConfig();\n\tconst [isMac] = useState(getOS() === \"Mac\");\n\n\tconst [informationalTimeout, setInformationalTimeout] = useState<number | false>(false);\n\tconst [actionableTimeoutEnabled, setActionableTimeoutEnabled] = useState<boolean>(true);\n\n\tuseEffect(() => {\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (data.notificationPreferences) {\n\t\t\t\t\tconst { informationalNotificationToastPeriodSeconds, toastTimeoutOnActionableNotifications } =\n\t\t\t\t\t\tdata.notificationPreferences;\n\n\t\t\t\t\tif (informationalNotificationToastPeriodSeconds) {\n\t\t\t\t\t\tsetInformationalTimeout(informationalNotificationToastPeriodSeconds);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof toastTimeoutOnActionableNotifications !== \"undefined\") {\n\t\t\t\t\t\tsetActionableTimeoutEnabled(toastTimeoutOnActionableNotifications);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst transparencySupported = config.isTransparent;\n\n\t\tsetOpaqueClassName(!transparencySupported);\n\n\t\tif (transparencySupported) {\n\t\t\tfinsembleWindow.show();\n\t\t}\n\n\t\tasync function getNotificationsPreferences() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\n\t\t}\n\n\t\tgetNotificationsPreferences().then((preferences: any) => {\n\t\t\tsetInformationalTimeout(preferences.informationalNotificationToastPeriodSeconds);\n\t\t});\n\t}, []);\n\n\tuseEffect(() => {\n\t\tmoveToToolbarMonitor().then(() => {\n\t\t\tlet forceHide = false;\n\t\t\tif (\n\t\t\t\tactiveNotifications(notifications).length === 0 &&\n\t\t\t\tactiveNotifications(notificationsRef.current).length === 0\n\t\t\t) {\n\t\t\t\t// Bug fix: Toasts flash when inActive components (partially caused by allowing notifications to animate out)\n\t\t\t\tforceHide = true;\n\t\t\t}\n\n\t\t\tnotificationsRef.current = notifications;\n\t\t\tconst rect = document.getElementById(\"notifications-toasts\")?.getBoundingClientRect();\n\t\t\tif (notifications.length === 0 || forceHide) {\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: 1,\n\t\t\t\t\t\theight: 1,\n\t\t\t\t\t};\n\n\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t}\n\n\t\t\t\tfinsembleWindow.hide();\n\t\t\t} else {\n\t\t\t\tfinsembleWindow.bringToFront();\n\t\t\t\tif (config.isTransparent && !isMac) {\n\t\t\t\t\tconst roundedRect = {\n\t\t\t\t\t\tx: Math.round(rect?.x as number),\n\t\t\t\t\t\ty: Math.round(rect?.y as number),\n\t\t\t\t\t\twidth: Math.round(rect?.width as number),\n\t\t\t\t\t\theight: Math.round(rect?.height as number),\n\t\t\t\t\t};\n\n\t\t\t\t\tfinsembleWindow.show({}, () => {\n\t\t\t\t\t\tfinsembleWindow.setShape([roundedRect]);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tfinsembleWindow.show({}, async () => {\n\t\t\t\t\t\tconst { err, data } = (await FSBL.Clients.LauncherClient.getMonitorInfo({ monitor: \"mine\" })) as any;\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst { data: bounds } = await finsembleWindow.getBounds();\n\t\t\t\t\t\tconst width = (bounds?.right ?? 0) - (bounds?.left ?? 0);\n\t\t\t\t\t\tconst height = Math.round(rect?.height as number) + 6;\n\n\t\t\t\t\t\tfinsembleWindow.setBounds(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbounds: {\n\t\t\t\t\t\t\t\t\ttop: data[\"availableRect\"][\"top\"],\n\t\t\t\t\t\t\t\t\tleft: data[\"availableRect\"][\"right\"] - width,\n\t\t\t\t\t\t\t\t\theight: height + 10,\n\t\t\t\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(error: any) => {\n\t\t\t\t\t\t\t\tif (error) {\n\t\t\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}, [notifications]);\n\n\treturn (\n\t\t<div>\n\t\t\t{notifications.map((notification: INotification) => (\n\t\t\t\t<ToastCard\n\t\t\t\t\tkey={`toast-card-${notification.id}`}\n\t\t\t\t\tnotification={notification}\n\t\t\t\t\tinformationalNotificationTimeout={informationalTimeout}\n\t\t\t\t\tactionableTimeoutEnabled={actionableTimeoutEnabled}\n\t\t\t\t\tremoveFunction={removeNotification}\n\t\t\t\t\tisActiveFunction={isNotificationActive}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const CheckButton: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n}> = ({ notification }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { checkedNotifications } = notificationsContext;\r\n\tconst [isChecked, setIsChecked] = useState(false);\r\n\r\n\t// update isChecked value on action\r\n\tuseEffect(() => {\r\n\t\tif (checkedNotifications) {\r\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\r\n\t\t}\r\n\t}, [checkedNotifications]);\r\n\r\n\tconst checkNotification = () => {\r\n\t\tif (!isChecked) {\r\n\t\t\tcheckedNotifications.push(notification);\r\n\t\t} else {\r\n\t\t\tvar index = checkedNotifications.indexOf(notification);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tcheckedNotifications.splice(index, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetIsChecked(!isChecked);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\r\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default CheckButton;\r\n"]}
1
+ {"version":3,"file":"CheckButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/CheckButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAGlD,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,oBAAoB,EAAE;YACzB,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC/D;IACF,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,EAAE;YACf,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACxC;aAAM;YACN,IAAI,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBACjB,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aACtC;SACD;QACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,iBAAiB;QAC/D,2BAAG,SAAS,EAAE,mCAAmC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,GAAI,CAC5E,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\nimport { NotificationsContext } from \"../../notificationsContext\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const CheckButton: React.FunctionComponent<{\n\tnotification: INotification;\n}> = ({ notification }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { checkedNotifications } = notificationsContext;\n\tconst [isChecked, setIsChecked] = useState(false);\n\n\t// update isChecked value on action\n\tuseEffect(() => {\n\t\tif (checkedNotifications) {\n\t\t\tsetIsChecked(checkedNotifications.indexOf(notification) != -1);\n\t\t}\n\t}, [checkedNotifications]);\n\n\tconst checkNotification = () => {\n\t\tif (!isChecked) {\n\t\t\tcheckedNotifications.push(notification);\n\t\t} else {\n\t\t\tvar index = checkedNotifications.indexOf(notification);\n\t\t\tif (index !== -1) {\n\t\t\t\tcheckedNotifications.splice(index, 1);\n\t\t\t}\n\t\t}\n\t\tsetIsChecked(!isChecked);\n\t};\n\n\treturn (\n\t\t<div className=\"check_icon_container\" onClick={checkNotification}>\n\t\t\t<i className={`ff-check-mark default-img large ${isChecked ? \"checked\" : \"\"}`} />\n\t\t</div>\n\t);\n};\n\nexport default CheckButton;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE,CAAC,CAChC,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;IAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;IACzB,QAAQ,CACJ,CACN,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\r\n\r\nexport interface IFinsembleIconButtonProps {\r\n\ttooltip?: string;\r\n\tclickHandler?: Function;\r\n\ticonName?: string;\r\n\tclassNames?: string;\r\n\tchildren?: React.ReactNode;\r\n}\r\n\r\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\r\n\tclickHandler = () => {},\r\n\ttooltip,\r\n\ticonName = \"ff-finsemble\",\r\n\tclassNames,\r\n\tchildren,\r\n}: IFinsembleIconButtonProps) => (\r\n\t<div\r\n\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\r\n\t\ttitle={tooltip ? tooltip : \"\"}\r\n\t\tonClick={() => clickHandler()}\r\n\t>\r\n\t\t<i className={iconName} />\r\n\t\t{children}\r\n\t</div>\r\n);\r\n\r\nexport default IconButton;\r\n"]}
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,UAAU,GAAuD,CAAC,EACvE,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,OAAO,EACP,QAAQ,GAAG,cAAc,EACzB,UAAU,EACV,QAAQ,GACmB,EAAE,EAAE,CAAC,CAChC,6BACC,SAAS,EAAE,uBAAuB,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE;IAE7B,2BAAG,SAAS,EAAE,QAAQ,GAAI;IACzB,QAAQ,CACJ,CACN,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\n\nexport interface IFinsembleIconButtonProps {\n\ttooltip?: string;\n\tclickHandler?: Function;\n\ticonName?: string;\n\tclassNames?: string;\n\tchildren?: React.ReactNode;\n}\n\nconst IconButton: React.FunctionComponent<IFinsembleIconButtonProps> = ({\n\tclickHandler = () => {},\n\ttooltip,\n\ticonName = \"ff-finsemble\",\n\tclassNames,\n\tchildren,\n}: IFinsembleIconButtonProps) => (\n\t<div\n\t\tclassName={`finsemble-icon__btn ${classNames ? classNames : \"\"}`}\n\t\ttitle={tooltip ? tooltip : \"\"}\n\t\tonClick={() => clickHandler()}\n\t>\n\t\t<i className={iconName} />\n\t\t{children}\n\t</div>\n);\n\nexport default IconButton;\n"]}
@@ -71,7 +71,7 @@ export const NotificationCardShell = ({ notification, uiContext, removeNotificat
71
71
  clearTimeout(isRenotificationTimerId);
72
72
  };
73
73
  }, [newNotificationHaloPeriodSeconds, notification]);
74
- return (React.createElement("div", { className: `notification-card ${isRead ? "read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
74
+ return (React.createElement("div", { className: `notification-card ${isRead ? "read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
75
75
  ${notification.cssClassName ? notification.cssClassName : ""}` }, children ? (children) : (React.createElement(React.Fragment, null,
76
76
  React.createElement(NotificationCardHeaderShell, { notification: notification, removeNotification: removeNotification, uiContext: uiContext }),
77
77
  React.createElement(NotificationCardBodyShell, { notification: notification })))));
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAuBzF,MAAM,CAAC,MAAM,qBAAqB,GAAsD,CAAC,EACxF,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,MAAM,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEzF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC,CAAC;IACtG,MAAM,CAAC,cAAc,E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CAAC,CAAC;IACrD,OAAO,CACN,6BACC,SAAS,EAAE,qBAAqB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;KAC1F,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,IAE7D,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\r\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\r\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\r\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\r\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IPerformedAction = services.notification.types.IPerformedAction;\r\n\r\nexport type NotificationCardPropType = {\r\n\t/**\r\n\t * The Notification to be displayed\r\n\t */\r\n\tnotification: INotification;\r\n\r\n\t/**\r\n\t * Which UI context the Card is being used in\r\n\t */\r\n\tuiContext: \"toasts\" | \"center\";\r\n\r\n\t/**\r\n\t * The internal function that will be called on toasts when dismissed or marked as read\r\n\t */\r\n\tremoveNotification: Function;\r\n};\r\n\r\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\r\n\tnotification,\r\n\tuiContext,\r\n\tremoveNotification,\r\n\tchildren,\r\n}) => {\r\n\tconst { isRead } = notification;\r\n\r\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\r\n\r\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\r\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\r\n\t);\r\n\r\n\t// Sets the current default preference\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\r\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\r\n\t\t});\r\n\t}, []);\r\n\r\n\t// Listens for preferences change\r\n\tuseEffect(() => {\r\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (\r\n\t\t\t\t\tdata.notificationPreferences &&\r\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\r\n\t\t\t\t) {\r\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isNewTimerId: any;\r\n\t\tif (isNew) {\r\n\t\t\tif (notification.isRead) {\r\n\t\t\t\tsetIsNew(false);\r\n\t\t\t\tclearTimeout(isNewTimerId);\r\n\t\t\t} else {\r\n\t\t\t\tisNewTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetIsNew(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isNewTimerId);\r\n\t\t};\r\n\t}, [isNew, notification]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isRenotificationTimerId: any;\r\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\r\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\r\n\t\t\tif (mostRecentAction) {\r\n\t\t\t\tsetWokeFromSnooze(true);\r\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetWokeFromSnooze(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetWokeFromSnooze(false);\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t};\r\n\t}, [newNotificationHaloPeriodSeconds, notification]);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \r\n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\r\n\t\t>\r\n\t\t\t{children ? (\r\n\t\t\t\tchildren\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<NotificationCardHeaderShell\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tremoveNotification={removeNotification}\r\n\t\t\t\t\t\tuiContext={uiContext}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardShell.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/NotificationCardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAuBzF,MAAM,CAAC,MAAM,qBAAqB,GAAsD,CAAC,EACxF,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAEhC,MAAM,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEzF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC,CAAC;IACtG,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CACnD,gBAAgB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAChE,CAAC;IAGF,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,UAAU,2BAA2B;YACzC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;QAC/D,CAAC;QAED,2BAA2B,EAAE,CAAC,IAAI,CAAC,CAAC,WAAgB,E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,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,2BAA2B,IAC3B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB;QACF,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,GAAI,CACvD,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { parseISO, differenceInMilliseconds, addSeconds } from \"date-fns\";\nimport { isNewNotification, isReNotification, getMostRecentAction } from \"../../utils\";\nimport { NotificationCardHeaderShell } from \"./notificationCard/NotificationCardHeaderShell\";\nimport { NotificationCardBodyShell } from \"./notificationCard/NotificationCardBodyShell\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\ntype IPerformedAction = services.notification.types.IPerformedAction;\n\nexport type NotificationCardPropType = {\n\t/**\n\t * The Notification to be displayed\n\t */\n\tnotification: INotification;\n\n\t/**\n\t * Which UI context the Card is being used in\n\t */\n\tuiContext: \"toasts\" | \"center\";\n\n\t/**\n\t * The internal function that will be called on toasts when dismissed or marked as read\n\t */\n\tremoveNotification: Function;\n};\n\nexport const NotificationCardShell: React.FunctionComponent<NotificationCardPropType> = ({\n\tnotification,\n\tuiContext,\n\tremoveNotification,\n\tchildren,\n}) => {\n\tconst { isRead } = notification;\n\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\n\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\n\t);\n\n\t// Sets the current default preference\n\tuseEffect(() => {\n\t\tasync function getNotificationsPreferences() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\n\t\t}\n\n\t\tgetNotificationsPreferences().then((preferences: any) => {\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\n\t\t\tsetIsNew(isNewNotification(notification, preferences.newNotificationHaloPeriodSeconds));\n\t\t});\n\t}, []);\n\n\t// Listens for preferences change\n\tuseEffect(() => {\n\t\tasync function listenForPreferenceChange(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleUserPreferencesChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (\n\t\t\t\t\tdata.notificationPreferences &&\n\t\t\t\t\tdata.notificationPreferences.hasOwnProperty(\"newNotificationHaloPeriodSeconds\")\n\t\t\t\t) {\n\t\t\t\t\tsetNotificationHaloPeriodSeconds(data.notificationPreferences.newNotificationHaloPeriodSeconds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleUserPreferencesChannel\", listenForPreferenceChange);\n\t\t};\n\t}, []);\n\n\tuseEffect(() => {\n\t\tlet isNewTimerId: any;\n\t\tif (isNew) {\n\t\t\tif (notification.isRead) {\n\t\t\t\tsetIsNew(false);\n\t\t\t\tclearTimeout(isNewTimerId);\n\t\t\t} else {\n\t\t\t\tisNewTimerId = setTimeout(() => {\n\t\t\t\t\tsetIsNew(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isNewTimerId);\n\t\t};\n\t}, [isNew, notification]);\n\n\tuseEffect(() => {\n\t\tlet isRenotificationTimerId: any;\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\n\t\t\tif (mostRecentAction) {\n\t\t\t\tsetWokeFromSnooze(true);\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\n\t\t\t\t\tsetWokeFromSnooze(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(mostRecentAction.datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t} else {\n\t\t\tsetWokeFromSnooze(false);\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t};\n\t}, [newNotificationHaloPeriodSeconds, notification]);\n\treturn (\n\t\t<div\n\t\t\tclassName={`notification-card ${isRead ? \"read\" : \"\"} ${isNew || wokeFromSnooze ? \"new\" : \"\"} \n\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\n\t\t>\n\t\t\t{children ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<NotificationCardHeaderShell\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tremoveNotification={removeNotification}\n\t\t\t\t\t\tuiContext={uiContext}\n\t\t\t\t\t/>\n\t\t\t\t\t<NotificationCardBodyShell notification={notification} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/OverflowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAM5C,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD,MAAM,CAAC,MAAM,mBA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Q,CACjD,CACN,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,YAAY,GAEb,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;IAEvE,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5D,MAAM,mBAAmB,GAAG,GAAG,EAAE;;QAChC,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3D,MAAM,OAAO,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,qBAAqB,EAAE,CAAC;QAC7D,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAEnF,IAAI,aAAa,IAAI,aAAa,GAAG,cAAc,EAAE;YACpD,YAAY,CAAC,kCAAkC,CAAC,CAAC;SACjD;IACF,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACd,mBAAmB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IACxC,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from \"react\";\r\n\r\n// Hooks\r\nimport { useOutsideClickDetector } from \"../../../../hooks/useOutsideClickDetector\";\r\nimport {\r\n\tmarkNotificationsRead,\r\n\tmarkNotificationsUnread,\r\n\tsnoozeNotifications,\r\n} from \"../../../../hooks/useNotifications\";\r\n\r\n// Types\r\nimport { OverFlowMenuAction } from \"../../types\";\r\n\r\n// Icons\r\nimport EnvelopeCloseIcon from \"../../icons/EnvelopeClose\";\r\nimport EnvelopeOpenIcon from \"../../icons/EnvelopeOpen\";\r\nimport SnoozeIcon from \"../../icons/SnoozeIcon\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const OverflowMenuActions: { [key: string]: OverFlowMenuAction } = {\r\n\tMARK_AS_UNREAD: {\r\n\t\tname: \"MARK_AS_UNREAD\",\r\n\t\ticon: <EnvelopeCloseIcon />,\r\n\t\tlabel: \"Mark Unread\",\r\n\t\taction: (notification: INotification) => markNotificationsUnread([notification]),\r\n\t},\r\n\tMARK_AS_READ: {\r\n\t\tname: \"MARK_AS_READ\",\r\n\t\ticon: <EnvelopeOpenIcon />,\r\n\t\tlabel: \"Mark Read\",\r\n\t\taction: (notification: INotification) => markNotificationsRead([notification]),\r\n\t},\r\n\tSNOOZE: {\r\n\t\tname: \"SNOOZE\",\r\n\t\ticon: <SnoozeIcon />,\r\n\t\tlabel: \"Snooze\",\r\n\t\taction: (notification: INotification) => snoozeNotifications([notification]),\r\n\t},\r\n\tDISMISS: {\r\n\t\tname: \"DISMISS\",\r\n\t\ticon: (\r\n\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t<i className=\"ff-close\" />\r\n\t\t\t</div>\r\n\t\t),\r\n\t\tlabel: \"Dismiss\",\r\n\t\taction: () => {\r\n\t\t\t// Empty - filled in later\r\n\t\t},\r\n\t},\r\n\tSETTINGS: {\r\n\t\tname: \"SETTINGS\",\r\n\t\ticon: (\r\n\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t<i className=\"ff-settings\" />\r\n\t\t\t</div>\r\n\t\t),\r\n\t\tlabel: \"Settings\",\r\n\t\taction: (notification: INotification) => {\r\n\t\t\tFSBL.Clients.LauncherClient.showWindow(\r\n\t\t\t\t{\r\n\t\t\t\t\tcomponentType: \"UserPreferences\",\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tmonitor: \"mine\",\r\n\t\t\t\t\tleft: \"center\",\r\n\t\t\t\t\ttop: \"center\",\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\r\n\t\t\t\t\t\tpreferencesTab: \"Notifications\",\r\n\t\t\t\t\t\tnotification,\r\n\t\t\t\t\t});\r\n\t\t\t\t\t// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleNotificationsNavigationChannel\", { notification });\r\n\t\t\t\t\t}, 50);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\tDETAILS: {\r\n\t\tname: \"DETAILS\",\r\n\t\ticon: (\r\n\t\t\t<div className=\"finsemble-icon\">\r\n\t\t\t\t<i className=\"ff-dots-horz\" />\r\n\t\t\t</div>\r\n\t\t),\r\n\t\tlabel: \"Details\",\r\n\t\taction: () => {\r\n\t\t\t// Empty - filled in later\r\n\t\t},\r\n\t},\r\n};\r\n\r\nexport const renderOverflowMenuAction = (\r\n\tnotification: INotification,\r\n\tmenuAction: OverFlowMenuAction,\r\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n\tisMuted: boolean\r\n) => {\r\n\tif (\r\n\t\t// Don't display read if notification is read\r\n\t\t(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||\r\n\t\t// Don't display unread if notification is unread\r\n\t\t(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)\r\n\t) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tkey={`${notification.id}_${menuAction.name}`}\r\n\t\t\tclassName=\"overflow-menu__action\"\r\n\t\t\tonClick={() => {\r\n\t\t\t\tmenuAction?.action(notification);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{menuAction?.icon}\r\n\t\t\t<span className=\"btn-label\">{menuAction?.label}</span>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\n/**\r\n * Overflow menu component for notifications that will provide a set of actions\r\n * a user can perform on a notification (e.g. dismiss, snooze)\r\n */\r\nconst OverflowMenu: React.FunctionComponent<{\r\n\tcloseSelf: Dispatch<SetStateAction<boolean>>;\r\n}> = ({ closeSelf, children }) => {\r\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\r\n\tconst [className, setClassName] = useState(\"overflow-menu__container\");\r\n\r\n\tuseOutsideClickDetector(wrapperRef, () => closeSelf(false));\r\n\r\n\tconst moveElementIntoView = () => {\r\n\t\tconst bottomViewPort = window.innerHeight + window.scrollY;\r\n\t\tconst domRect = wrapperRef?.current?.getBoundingClientRect();\r\n\t\tconst elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;\r\n\r\n\t\tif (elementBottom && elementBottom > bottomViewPort) {\r\n\t\t\tsetClassName(\"overflow-menu__container flow-up\");\r\n\t\t}\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tmoveElementIntoView();\r\n\t});\r\n\r\n\treturn (\r\n\t\t<div ref={wrapperRef} className={className}>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default OverflowMenu;\r\n"]}
1
+ {"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/OverflowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAM5C,OAAO,iBAAiB,MAAM,2BAA2B,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,UAAU;QAAV,UAAU,CAAE,IAAI;QACjB,8BAAM,SAAS,EAAC,WAAW,IAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAQ,CACjD,CACN,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,YAAY,GAEb,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;IAEvE,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5D,MAAM,mBAAmB,GAAG,GAAG,EAAE;;QAChC,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3D,MAAM,OAAO,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,qBAAqB,EAAE,CAAC;QAC7D,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAEnF,IAAI,aAAa,IAAI,aAAa,GAAG,cAAc,EAAE;YACpD,YAAY,CAAC,kCAAkC,CAAC,CAAC;SACjD;IACF,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACd,mBAAmB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IACxC,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from \"react\";\n\n// Hooks\nimport { useOutsideClickDetector } from \"../../../../hooks/useOutsideClickDetector\";\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Types\nimport { OverFlowMenuAction } from \"../../types\";\n\n// Icons\nimport EnvelopeCloseIcon from \"../../icons/EnvelopeClose\";\nimport EnvelopeOpenIcon from \"../../icons/EnvelopeOpen\";\nimport SnoozeIcon from \"../../icons/SnoozeIcon\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const OverflowMenuActions: { [key: string]: OverFlowMenuAction } = {\n\tMARK_AS_UNREAD: {\n\t\tname: \"MARK_AS_UNREAD\",\n\t\ticon: <EnvelopeCloseIcon />,\n\t\tlabel: \"Mark Unread\",\n\t\taction: (notification: INotification) => markNotificationsUnread([notification]),\n\t},\n\tMARK_AS_READ: {\n\t\tname: \"MARK_AS_READ\",\n\t\ticon: <EnvelopeOpenIcon />,\n\t\tlabel: \"Mark Read\",\n\t\taction: (notification: INotification) => markNotificationsRead([notification]),\n\t},\n\tSNOOZE: {\n\t\tname: \"SNOOZE\",\n\t\ticon: <SnoozeIcon />,\n\t\tlabel: \"Snooze\",\n\t\taction: (notification: INotification) => snoozeNotifications([notification]),\n\t},\n\tDISMISS: {\n\t\tname: \"DISMISS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-close\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Dismiss\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n\tSETTINGS: {\n\t\tname: \"SETTINGS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Settings\",\n\t\taction: (notification: INotification) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t\t{\n\t\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmonitor: \"mine\",\n\t\t\t\t\tleft: \"center\",\n\t\t\t\t\ttop: \"center\",\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\t\t\t\tpreferencesTab: \"Notifications\",\n\t\t\t\t\t\tnotification,\n\t\t\t\t\t});\n\t\t\t\t\t// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleNotificationsNavigationChannel\", { notification });\n\t\t\t\t\t}, 50);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t},\n\tDETAILS: {\n\t\tname: \"DETAILS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-dots-horz\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Details\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n};\n\nexport const renderOverflowMenuAction = (\n\tnotification: INotification,\n\tmenuAction: OverFlowMenuAction,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tisMuted: boolean\n) => {\n\tif (\n\t\t// Don't display read if notification is read\n\t\t(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||\n\t\t// Don't display unread if notification is unread\n\t\t(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tkey={`${notification.id}_${menuAction.name}`}\n\t\t\tclassName=\"overflow-menu__action\"\n\t\t\tonClick={() => {\n\t\t\t\tmenuAction?.action(notification);\n\t\t\t}}\n\t\t>\n\t\t\t{menuAction?.icon}\n\t\t\t<span className=\"btn-label\">{menuAction?.label}</span>\n\t\t</div>\n\t);\n};\n\n/**\n * Overflow menu component for notifications that will provide a set of actions\n * a user can perform on a notification (e.g. dismiss, snooze)\n */\nconst OverflowMenu: React.FunctionComponent<{\n\tcloseSelf: Dispatch<SetStateAction<boolean>>;\n}> = ({ closeSelf, children }) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [className, setClassName] = useState(\"overflow-menu__container\");\n\n\tuseOutsideClickDetector(wrapperRef, () => closeSelf(false));\n\n\tconst moveElementIntoView = () => {\n\t\tconst bottomViewPort = window.innerHeight + window.scrollY;\n\t\tconst domRect = wrapperRef?.current?.getBoundingClientRect();\n\t\tconst elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;\n\n\t\tif (elementBottom && elementBottom > bottomViewPort) {\n\t\t\tsetClassName(\"overflow-menu__container flow-up\");\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tmoveElementIntoView();\n\t});\n\n\treturn (\n\t\t<div ref={wrapperRef} className={className}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default OverflowMenu;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardBodyActions.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAuD,MAAM,mCAAmC,CAAC;AACxG,OAAO,MAAiC,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAMjE,MAAM,mBAAmB,GAAG,CAAC,YAA2B,EAAE,MAA2B,EAAE,EAAmB,EAAE,EAAE;IAC7G,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,UAAU,GAAG,EAAyC,CAAC;QAC3D,IAAI,aAAa,GAA4B,EAAE,CAAC;QAChD,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,KAAK,EAAE,EAAE;YACzC,IAAI,KAAK,KAAK,CAAC,EAAE;gBAChB,UAAU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AC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport DropdownButton, { IFinsembleDropdownActionButtonProps } from \"../../../../common/DropdownButton\";\r\nimport Button, { IFinsembleButtonProps } from \"../../../../shared/Button\";\r\nimport { doAction } from \"../../../../../hooks/useNotifications\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IAction = services.notification.types.IAction;\r\n\r\nconst renderActionButtons = (notification: INotification, action: IAction | IAction[], id: string | number) => {\r\n\tif (Array.isArray(action)) {\r\n\t\tlet buttonData = {} as IFinsembleDropdownActionButtonProps;\r\n\t\tlet buttonOptions: IFinsembleButtonProps[] = [];\r\n\t\taction.forEach((compositeAction, index) => {\r\n\t\t\tif (index === 0) {\r\n\t\t\t\tbuttonData.mainAction = () => doAction && doAction(notification, compositeAction);\r\n\t\t\t\tbuttonData.buttonLabel = compositeAction.buttonText;\r\n\t\t\t} else {\r\n\t\t\t\tbuttonOptions.push({\r\n\t\t\t\t\tbuttonLabel: compositeAction.buttonText,\r\n\t\t\t\t\tclickHandler: () => doAction && doAction(notification, compositeAction),\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn (\r\n\t\t\t<DropdownButton\r\n\t\t\t\tkey={id}\r\n\t\t\t\tbuttonLabel={buttonData.buttonLabel}\r\n\t\t\t\tmainAction={buttonData.mainAction}\r\n\t\t\t\tbuttonOptions={buttonOptions}\r\n\t\t\t/>\r\n\t\t);\r\n\t} else {\r\n\t\treturn (\r\n\t\t\t<Button\r\n\t\t\t\tkey={id}\r\n\t\t\t\tbuttonLabel={action.buttonText}\r\n\t\t\t\tclickHandler={() => doAction && doAction(notification, action)}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n};\r\n\r\nexport const NotificationCardBodyActions: React.FunctionComponent<{ notification: INotification }> = ({\r\n\tnotification,\r\n}) => {\r\n\tconst { actions } = notification;\r\n\tconst hasActions = actions && actions.length > 0;\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{hasActions ? (\r\n\t\t\t\t<div className=\"actions-panel\">\r\n\t\t\t\t\t{actions?.map((action: IAction | IAction[], index: any) => renderActionButtons(notification, action, index))}\r\n\t\t\t\t</div>\r\n\t\t\t) : null}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardBodyActions.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAuD,MAAM,mCAAmC,CAAC;AACxG,OAAO,MAAiC,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAMjE,MAAM,mBAAmB,GAAG,CAAC,YAA2B,EAAE,MAA2B,EAAE,EAAmB,EAAE,EAAE;IAC7G,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,UAAU,GAAG,EAAyC,CAAC;QAC3D,IAAI,aAAa,GAA4B,EAAE,CAAC;QAChD,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,KAAK,EAAE,EAAE;YACzC,IAAI,KAAK,KAAK,CAAC,EAAE;gBAChB,UAAU,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;gBAClF,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC;aACpD;iBAAM;gBACN,aAAa,CAAC,IAAI,CAAC;oBAClB,WAAW,EAAE,eAAe,CAAC,UAAU;oBACvC,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;iBACvE,CAAC,CAAC;aACH;QACF,CAAC,CAAC,CAAC;QACH,OAAO,CACN,oBAAC,cAAc,IACd,GAAG,EAAE,EAAE,EACP,WAAW,EAAE,UAAU,CAAC,WAAW,EACnC,UAAU,EAAE,UAAU,CAAC,UAAU,EACjC,aAAa,EAAE,aAAa,GAC3B,CACF,CAAC;KACF;SAAM;QACN,OAAO,CACN,oBAAC,MAAM,IACN,GAAG,EAAE,EAAE,EACP,WAAW,EAAE,MAAM,CAAC,UAAU,EAC9B,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,GAC7D,CACF,CAAC;KACF;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAA6D,CAAC,EACrG,YAAY,GACZ,EAAE,EAAE;IACJ,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC;IACjC,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEjD,OAAO,CACN,0CACE,UAAU,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,IAC5B,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,MAA2B,EAAE,KAAU,EAAE,EAAE,CAAC,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CACvG,CACN,CAAC,CAAC,CAAC,IAAI,CACN,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport DropdownButton, { IFinsembleDropdownActionButtonProps } from \"../../../../common/DropdownButton\";\nimport Button, { IFinsembleButtonProps } from \"../../../../shared/Button\";\nimport { doAction } from \"../../../../../hooks/useNotifications\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\ntype IAction = services.notification.types.IAction;\n\nconst renderActionButtons = (notification: INotification, action: IAction | IAction[], id: string | number) => {\n\tif (Array.isArray(action)) {\n\t\tlet buttonData = {} as IFinsembleDropdownActionButtonProps;\n\t\tlet buttonOptions: IFinsembleButtonProps[] = [];\n\t\taction.forEach((compositeAction, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tbuttonData.mainAction = () => doAction && doAction(notification, compositeAction);\n\t\t\t\tbuttonData.buttonLabel = compositeAction.buttonText;\n\t\t\t} else {\n\t\t\t\tbuttonOptions.push({\n\t\t\t\t\tbuttonLabel: compositeAction.buttonText,\n\t\t\t\t\tclickHandler: () => doAction && doAction(notification, compositeAction),\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\treturn (\n\t\t\t<DropdownButton\n\t\t\t\tkey={id}\n\t\t\t\tbuttonLabel={buttonData.buttonLabel}\n\t\t\t\tmainAction={buttonData.mainAction}\n\t\t\t\tbuttonOptions={buttonOptions}\n\t\t\t/>\n\t\t);\n\t} else {\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tkey={id}\n\t\t\t\tbuttonLabel={action.buttonText}\n\t\t\t\tclickHandler={() => doAction && doAction(notification, action)}\n\t\t\t/>\n\t\t);\n\t}\n};\n\nexport const NotificationCardBodyActions: React.FunctionComponent<{ notification: INotification }> = ({\n\tnotification,\n}) => {\n\tconst { actions } = notification;\n\tconst hasActions = actions && actions.length > 0;\n\n\treturn (\n\t\t<>\n\t\t\t{hasActions ? (\n\t\t\t\t<div className=\"actions-panel\">\n\t\t\t\t\t{actions?.map((action: IAction | IAction[], index: any) => renderActionButtons(notification, action, index))}\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardBodyContentLogo.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,+BAA+B,GAAsD,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACrH,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/D,OAAO,CACN,6BACC,SAAS,EAAE,uCAAuC,EAClD,KAAK,EAAE,CAAC,gBAAgB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;QAEnE,6BAAK,GAAG,EAAC,OAAO,EAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAI,CAC3E,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\n\r\nexport const NotificationCardBodyContentLogo: React.FunctionComponent<{ contentLogo?: string }> = ({ contentLogo }) => {\r\n\tconst [isImageAvailable, setIsImageAvailable] = useState(true);\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={\"notification-card__body_img_container\"}\r\n\t\t\tstyle={!isImageAvailable || !contentLogo ? { display: \"none\" } : {}}\r\n\t\t>\r\n\t\t\t<img alt=\"Image\" src={contentLogo} onError={() => setIsImageAvailable(false)} />\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardBodyContentLogo.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,+BAA+B,GAAsD,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACrH,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/D,OAAO,CACN,6BACC,SAAS,EAAE,uCAAuC,EAClD,KAAK,EAAE,CAAC,gBAAgB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;QAEnE,6BAAK,GAAG,EAAC,OAAO,EAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAI,CAC3E,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport const NotificationCardBodyContentLogo: React.FunctionComponent<{ contentLogo?: string }> = ({ contentLogo }) => {\n\tconst [isImageAvailable, setIsImageAvailable] = useState(true);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={\"notification-card__body_img_container\"}\n\t\t\tstyle={!isImageAvailable || !contentLogo ? { display: \"none\" } : {}}\n\t\t>\n\t\t\t<img alt=\"Image\" src={contentLogo} onError={() => setIsImageAvailable(false)} />\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardBodyShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAKpF,MAAM,CAAC,MAAM,yBAAyB,GAA6D,CAAC,EACnG,YAAY,EACZ,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;IACvD,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEjD,OAAO,CACN,6BAAK,SAAS,EAAE,2BAA2B,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;QACtE,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;YACC,oBAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI;YAC7D,6BAAK,SAAS,EAAC,8BAA8B,IAAE,OAAO,CAAO,CAC3D,CACH;QACD,oBAAC,2BAA2B,IAAC,YAAY,EAAE,YAAY,GAAI,CACtD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport { NotificationCardBodyActions } from \"./NotificationCardBodyActions\";\r\nimport { NotificationCardBodyContentLogo } from \"./NotificationCardBodyContentLogo\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const NotificationCardBodyShell: React.FunctionComponent<{ notification: INotification }> = ({\r\n\tnotification,\r\n\tchildren,\r\n}) => {\r\n\tconst { actions, details, contentLogo } = notification;\r\n\tconst hasActions = actions && actions.length > 0;\r\n\r\n\treturn (\r\n\t\t<div className={`notification-card__body ${hasActions ? \"actions\" : \"\"}`}>\r\n\t\t\t{children ? (\r\n\t\t\t\tchildren\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<NotificationCardBodyContentLogo contentLogo={contentLogo} />\r\n\t\t\t\t\t<div className=\"notification-card__body_text\">{details}</div>\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t\t<NotificationCardBodyActions notification={notification} />\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardBodyShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAKpF,MAAM,CAAC,MAAM,yBAAyB,GAA6D,CAAC,EACnG,YAAY,EACZ,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;IACvD,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAEjD,OAAO,CACN,6BAAK,SAAS,EAAE,2BAA2B,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;QACtE,QAAQ,CAAC,CAAC,CAAC,CACX,QAAQ,CACR,CAAC,CAAC,CAAC,CACH;YACC,oBAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI;YAC7D,6BAAK,SAAS,EAAC,8BAA8B,IAAE,OAAO,CAAO,CAC3D,CACH;QACD,oBAAC,2BAA2B,IAAC,YAAY,EAAE,YAAY,GAAI,CACtD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { NotificationCardBodyActions } from \"./NotificationCardBodyActions\";\nimport { NotificationCardBodyContentLogo } from \"./NotificationCardBodyContentLogo\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const NotificationCardBodyShell: React.FunctionComponent<{ notification: INotification }> = ({\n\tnotification,\n\tchildren,\n}) => {\n\tconst { actions, details, contentLogo } = notification;\n\tconst hasActions = actions && actions.length > 0;\n\n\treturn (\n\t\t<div className={`notification-card__body ${hasActions ? \"actions\" : \"\"}`}>\n\t\t\t{children ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<NotificationCardBodyContentLogo contentLogo={contentLogo} />\n\t\t\t\t\t<div className=\"notification-card__body_text\">{details}</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<NotificationCardBodyActions notification={notification} />\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardHeaderControls.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAA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c,CAAC,wCAAwC,EAAE,sBAAsB,CAAC,CAAC;QAC5G,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAChE,wBAAwB,CAAC,YAAY,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAClE,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAE,sBAAsB,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC;QACrF,8BAAM,SAAS,EAAC,iCAAiC;YAChD,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,YAAY,EAAE,kBAAkB,IACpF,gBAAgB,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,SAAS,EAAE,mBAAmB,IAAG,WAAW,CAAgB,CAAC,CAAC,CAAC,IAAI,CACzF,CACP;QACN,SAAS,IAAI,QAAQ,IAAI,CACzB,oBAAC,UAAU,IACV,QAAQ,EAAC,UAAU,EACnB,UAAU,EAAE,qCAAqC,EACjD,OAAO,EAAC,SAAS,EACjB,YAAY,EAAE,kBAAkB,GAC/B,CACF;QACA,SAAS,IAAI,QAAQ,IAAI,8BAAM,SAAS,EAAC,6BAA6B,IAAE,IAAI,CAAQ,CAChF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useContext, useEffect, useState } from \"react\";\r\nimport IconButton from \"../IconButton\";\r\nimport OverflowMenu, { OverflowMenuActions, renderOverflowMenuAction } from \"../OverflowMenu\";\r\nimport { NotificationsContext } from \"../../../notificationsContext\";\r\nimport { formatDistanceToNow } from \"date-fns\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const NotificationCardHeaderControls: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n\tuiContext?: string;\r\n\tremoveNotification?: Function;\r\n}> = ({ notification, removeNotification, uiContext = \"center\" }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { setSelectedNotification, muteFilters } = notificationsContext;\r\n\r\n\tconst [overflowMenuOpen, setOverflowMenuOpen] = useState(false);\r\n\tconst [isMuteFilterApplied, setIsMuteFilterApplied] = useState(\r\n\t\tmuteFilters\r\n\t\t\t? muteFilters.some((filter) => filter.source === notification.source && filter.type === notification.type)\r\n\t\t\t: false\r\n\t);\r\n\r\n\tconst [time, setTime] = useState(\r\n\t\tformatDistanceToNow(new Date(notification.issuedAt), {\r\n\t\t\tincludeSeconds: true,\r\n\t\t})\r\n\t);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst id = setInterval(() => {\r\n\t\t\tsetTime(\r\n\t\t\t\tformatDistanceToNow(new Date(notification.issuedAt), {\r\n\t\t\t\t\tincludeSeconds: true,\r\n\t\t\t\t})\r\n\t\t\t);\r\n\t\t}, 60000);\r\n\t\treturn () => clearInterval(id);\r\n\t});\r\n\r\n\tconst toggleOverflowMenu = () => {\r\n\t\tsetOverflowMenuOpen(!overflowMenuOpen);\r\n\t};\r\n\r\n\tconst overFlowActions = Object.assign({}, OverflowMenuActions);\r\n\tlet optionsToggleClassName = \"notification-card__more-options__toggle\";\r\n\r\n\tif (uiContext === \"center\") {\r\n\t\tdelete overFlowActions.DISMISS;\r\n\t\toverFlowActions.DETAILS.action = (overflowNotification: INotification) => {\r\n\t\t\tsetSelectedNotification(overflowNotification);\r\n\t\t};\r\n\t} else {\r\n\t\toptionsToggleClassName = \"notification-card__more-options__no-toggle\";\r\n\t\tdelete overFlowActions.MARK_AS_READ;\r\n\t\tdelete overFlowActions.MARK_AS_UNREAD;\r\n\t\tdelete overFlowActions.DETAILS;\r\n\t\tdelete overFlowActions.DISMISS;\r\n\t}\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\tconst { data } = response;\r\n\t\t\t\tif (notification.source === data.source && notification.type === data.type) {\r\n\t\t\t\t\tsetIsMuteFilterApplied(data.isMuted);\r\n\t\t\t\t}\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\tconst menuActions = Object.values(overFlowActions).map((value) =>\r\n\t\trenderOverflowMenuAction(notification, value, isMuteFilterApplied)\r\n\t);\r\n\r\n\treturn (\r\n\t\t<div className={optionsToggleClassName} onMouseLeave={() => setOverflowMenuOpen(false)}>\r\n\t\t\t<span className=\"notification-card_overflow_menu\">\r\n\t\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" clickHandler={toggleOverflowMenu}>\r\n\t\t\t\t\t{overflowMenuOpen ? <OverflowMenu closeSelf={setOverflowMenuOpen}>{menuActions}</OverflowMenu> : null}\r\n\t\t\t\t</IconButton>\r\n\t\t\t</span>\r\n\t\t\t{uiContext == \"toasts\" && (\r\n\t\t\t\t<IconButton\r\n\t\t\t\t\ticonName=\"ff-close\"\r\n\t\t\t\t\tclassNames={\"notification-card__dismiss no-hover\"}\r\n\t\t\t\t\ttooltip=\"Dismiss\"\r\n\t\t\t\t\tclickHandler={removeNotification}\r\n\t\t\t\t/>\r\n\t\t\t)}\r\n\t\t\t{uiContext == \"center\" && <span className=\"notification-card_timestamp\">{time}</span>}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardHeaderControls.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,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AAC,WAAW,CAAC,wCAAwC,EAAE,sBAAsB,CAAC,CAAC;QACxG,OAAO,GAAG,EAAE;YACX,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,wCAAwC,EAAE,sBAAsB,CAAC,CAAC;QAC5G,CAAC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAChE,wBAAwB,CAAC,YAAY,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAClE,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAE,sBAAsB,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC;QACrF,8BAAM,SAAS,EAAC,iCAAiC;YAChD,oBAAC,UAAU,IAAC,QAAQ,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,YAAY,EAAE,kBAAkB,IACpF,gBAAgB,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,SAAS,EAAE,mBAAmB,IAAG,WAAW,CAAgB,CAAC,CAAC,CAAC,IAAI,CACzF,CACP;QACN,SAAS,IAAI,QAAQ,IAAI,CACzB,oBAAC,UAAU,IACV,QAAQ,EAAC,UAAU,EACnB,UAAU,EAAE,qCAAqC,EACjD,OAAO,EAAC,SAAS,EACjB,YAAY,EAAE,kBAAkB,GAC/B,CACF;QACA,SAAS,IAAI,QAAQ,IAAI,8BAAM,SAAS,EAAC,6BAA6B,IAAE,IAAI,CAAQ,CAChF,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useContext, useEffect, useState } from \"react\";\nimport IconButton from \"../IconButton\";\nimport OverflowMenu, { OverflowMenuActions, renderOverflowMenuAction } from \"../OverflowMenu\";\nimport { NotificationsContext } from \"../../../notificationsContext\";\nimport { formatDistanceToNow } from \"date-fns\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const NotificationCardHeaderControls: React.FunctionComponent<{\n\tnotification: INotification;\n\tuiContext?: string;\n\tremoveNotification?: Function;\n}> = ({ notification, removeNotification, uiContext = \"center\" }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { setSelectedNotification, muteFilters } = notificationsContext;\n\n\tconst [overflowMenuOpen, setOverflowMenuOpen] = useState(false);\n\tconst [isMuteFilterApplied, setIsMuteFilterApplied] = useState(\n\t\tmuteFilters\n\t\t\t? muteFilters.some((filter) => filter.source === notification.source && filter.type === notification.type)\n\t\t\t: false\n\t);\n\n\tconst [time, setTime] = useState(\n\t\tformatDistanceToNow(new Date(notification.issuedAt), {\n\t\t\tincludeSeconds: true,\n\t\t})\n\t);\n\n\tuseEffect(() => {\n\t\tconst id = setInterval(() => {\n\t\t\tsetTime(\n\t\t\t\tformatDistanceToNow(new Date(notification.issuedAt), {\n\t\t\t\t\tincludeSeconds: true,\n\t\t\t\t})\n\t\t\t);\n\t\t}, 60000);\n\t\treturn () => clearInterval(id);\n\t});\n\n\tconst toggleOverflowMenu = () => {\n\t\tsetOverflowMenuOpen(!overflowMenuOpen);\n\t};\n\n\tconst overFlowActions = Object.assign({}, OverflowMenuActions);\n\tlet optionsToggleClassName = \"notification-card__more-options__toggle\";\n\n\tif (uiContext === \"center\") {\n\t\tdelete overFlowActions.DISMISS;\n\t\toverFlowActions.DETAILS.action = (overflowNotification: INotification) => {\n\t\t\tsetSelectedNotification(overflowNotification);\n\t\t};\n\t} else {\n\t\toptionsToggleClassName = \"notification-card__more-options__no-toggle\";\n\t\tdelete overFlowActions.MARK_AS_READ;\n\t\tdelete overFlowActions.MARK_AS_UNREAD;\n\t\tdelete overFlowActions.DETAILS;\n\t\tdelete overFlowActions.DISMISS;\n\t}\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (notification.source === data.source && notification.type === data.type) {\n\t\t\t\t\tsetIsMuteFilterApplied(data.isMuted);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\tconst menuActions = Object.values(overFlowActions).map((value) =>\n\t\trenderOverflowMenuAction(notification, value, isMuteFilterApplied)\n\t);\n\n\treturn (\n\t\t<div className={optionsToggleClassName} onMouseLeave={() => setOverflowMenuOpen(false)}>\n\t\t\t<span className=\"notification-card_overflow_menu\">\n\t\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" clickHandler={toggleOverflowMenu}>\n\t\t\t\t\t{overflowMenuOpen ? <OverflowMenu closeSelf={setOverflowMenuOpen}>{menuActions}</OverflowMenu> : null}\n\t\t\t\t</IconButton>\n\t\t\t</span>\n\t\t\t{uiContext == \"toasts\" && (\n\t\t\t\t<IconButton\n\t\t\t\t\ticonName=\"ff-close\"\n\t\t\t\t\tclassNames={\"notification-card__dismiss no-hover\"}\n\t\t\t\t\ttooltip=\"Dismiss\"\n\t\t\t\t\tclickHandler={removeNotification}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{uiContext == \"center\" && <span className=\"notification-card_timestamp\">{time}</span>}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardHeaderLogo.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,0BAA0B,GAAqD,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAC9G,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,OAAO,CACN;QACC,6BACC,GAAG,EAAC,UAAU,EACd,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAChE,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACtC;QACD,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC,IAAI,CACvF,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\n\r\nexport const NotificationCardHeaderLogo: React.FunctionComponent<{ headerLogo?: string }> = ({ headerLogo }) => {\r\n\tconst [showDefaultIcon, setShowDefaultIcon] = useState(false);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<img\r\n\t\t\t\talt=\"App logo\"\r\n\t\t\t\tsrc={headerLogo}\r\n\t\t\t\tstyle={showDefaultIcon || !headerLogo ? { display: \"none\" } : {}}\r\n\t\t\t\tonError={() => setShowDefaultIcon(true)}\r\n\t\t\t/>\r\n\t\t\t{showDefaultIcon || !headerLogo ? <i className=\"ff-finsemble default-img large\" /> : null}\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardHeaderLogo.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,0BAA0B,GAAqD,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAC9G,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,OAAO,CACN;QACC,6BACC,GAAG,EAAC,UAAU,EACd,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAChE,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACtC;QACD,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC,IAAI,CACvF,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport const NotificationCardHeaderLogo: React.FunctionComponent<{ headerLogo?: string }> = ({ headerLogo }) => {\n\tconst [showDefaultIcon, setShowDefaultIcon] = useState(false);\n\n\treturn (\n\t\t<>\n\t\t\t<img\n\t\t\t\talt=\"App logo\"\n\t\t\t\tsrc={headerLogo}\n\t\t\t\tstyle={showDefaultIcon || !headerLogo ? { display: \"none\" } : {}}\n\t\t\t\tonError={() => setShowDefaultIcon(true)}\n\t\t\t/>\n\t\t\t{showDefaultIcon || !headerLogo ? <i className=\"ff-finsemble default-img large\" /> : null}\n\t\t</>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCardHeaderShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,MAAM,CAAC,MAAM,2BAA2B,GAInC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7E,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,aAAa,EAAE,GAAG,oBAAoB,CAAC;IAE/C,OAAO,CACN,6BAAK,SAAS,EAAC,2BAA2B;QACxC,QAAQ,CAAC,CAAC,CAAC,CACX;YACE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,yCAAK;YAC/F,QAAQ,CACP,CACH,CAAC,CAAC,CAAC,CACH;YACE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAC5C,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAC3C,CAAC,CAAC,CAAC,CACH,oBAAC,0BAA0B,IAAC,UAAU,EAAE,YAAY,CAAC,UAAU,GAAI,CACnE;YACD,6BAAK,SAAS,EAAC,0BAA0B,IAAE,YAAY,CAAC,KAAK,CAAO,CAClE,CACH;QACD,oBAAC,8BAA8B,IAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useContext } from \"react\";\r\nimport { NotificationCardHeaderControls } from \"./NotificationCardHeaderControls\";\r\nimport { NotificationCardHeaderLogo } from \"./NotificationCardHeaderLogo\";\r\nimport { NotificationsContext } from \"../../../notificationsContext\";\r\nimport { SelectionMode } from \"../../../constants\";\r\nimport { CheckButton } from \"../CheckButton\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nexport const NotificationCardHeaderShell: React.FunctionComponent<{\r\n\tnotification: INotification;\r\n\tuiContext: string;\r\n\tremoveNotification: Function;\r\n}> = ({ notification, removeNotification, uiContext = \"center\", children }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { selectionMode } = notificationsContext;\r\n\r\n\treturn (\r\n\t\t<div className=\"notification-card__header\">\r\n\t\t\t{children ? (\r\n\t\t\t\t<>\r\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? <CheckButton notification={notification} /> : <></>}\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</>\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\r\n\t\t\t\t\t\t<CheckButton notification={notification} />\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<NotificationCardHeaderLogo headerLogo={notification.headerLogo} />\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t<div className=\"notification-card__title\">{notification.title}</div>\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t\t<NotificationCardHeaderControls\r\n\t\t\t\tnotification={notification}\r\n\t\t\t\tremoveNotification={removeNotification}\r\n\t\t\t\tuiContext={uiContext}\r\n\t\t\t/>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"NotificationCardHeaderShell.js","sourceRoot":"","sources":["../../../../../../src/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,MAAM,CAAC,MAAM,2BAA2B,GAInC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7E,MAAM,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,EAAE,aAAa,EAAE,GAAG,oBAAoB,CAAC;IAE/C,OAAO,CACN,6BAAK,SAAS,EAAC,2BAA2B;QACxC,QAAQ,CAAC,CAAC,CAAC,CACX;YACE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,yCAAK;YAC/F,QAAQ,CACP,CACH,CAAC,CAAC,CAAC,CACH;YACE,aAAa,KAAK,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAC5C,oBAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,CAC3C,CAAC,CAAC,CAAC,CACH,oBAAC,0BAA0B,IAAC,UAAU,EAAE,YAAY,CAAC,UAAU,GAAI,CACnE;YACD,6BAAK,SAAS,EAAC,0BAA0B,IAAE,YAAY,CAAC,KAAK,CAAO,CAClE,CACH;QACD,oBAAC,8BAA8B,IAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,GACnB,CACG,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useContext } from \"react\";\nimport { NotificationCardHeaderControls } from \"./NotificationCardHeaderControls\";\nimport { NotificationCardHeaderLogo } from \"./NotificationCardHeaderLogo\";\nimport { NotificationsContext } from \"../../../notificationsContext\";\nimport { SelectionMode } from \"../../../constants\";\nimport { CheckButton } from \"../CheckButton\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const NotificationCardHeaderShell: React.FunctionComponent<{\n\tnotification: INotification;\n\tuiContext: string;\n\tremoveNotification: Function;\n}> = ({ notification, removeNotification, uiContext = \"center\", children }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { selectionMode } = notificationsContext;\n\n\treturn (\n\t\t<div className=\"notification-card__header\">\n\t\t\t{children ? (\n\t\t\t\t<>\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? <CheckButton notification={notification} /> : <></>}\n\t\t\t\t\t{children}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\n\t\t\t\t\t\t<CheckButton notification={notification} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<NotificationCardHeaderLogo headerLogo={notification.headerLogo} />\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"notification-card__title\">{notification.title}</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<NotificationCardHeaderControls\n\t\t\t\tnotification={notification}\n\t\t\t\tremoveNotification={removeNotification}\n\t\t\t\tuiContext={uiContext}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/CardView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAM5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMnE,IAAK,OAKJ;AALD,WAAK,OAAO;IACX,0BAAe,CAAA;IACf,iCAAsB,CAAA;IACtB,kCAAuB,CAAA;IACvB,0BAAe,CAAA;AAChB,CAAC,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AAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAiB,CAAC,CAAC,CAAI,CACtG,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useContext, useEffect } from \"react\";\r\nimport { isToday, isYesterday, isThisWeek } from \"date-fns\";\r\n\r\n// Types\r\nimport { NotificationCardViewProps } from \"../../types\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Components\r\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\r\nimport NoNotifications from \"../NoNotifications\";\r\n\r\n// Utils\r\nimport { getActiveFilter, searchNotifications } from \"../../utils\";\r\n\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\n\r\nenum Periods {\r\n\tTODAY = \"today\",\r\n\tTHIS_WEEK = \"thisWeek\",\r\n\tYESTERDAY = \"yesterday\",\r\n\tOLDER = \"older\",\r\n}\r\n\r\nconst isEmpty = (byPeriodNotifications: Record<Periods, INotification[]>, accountForSnooze: boolean) => {\r\n\tif (accountForSnooze) {\r\n\t\treturn Object.values(byPeriodNotifications).every((value: INotification[]) => value.length === 0);\r\n\t} else {\r\n\t\treturn Object.values(byPeriodNotifications).every(\r\n\t\t\t(value: INotification[]) =>\r\n\t\t\t\tvalue.length === 0 || value.filter((notification: INotification) => !notification.isSnoozed).length === 0\r\n\t\t);\r\n\t}\r\n};\r\n\r\nexport const CardView: React.FunctionComponent<NotificationCardViewProps> = (props: NotificationCardViewProps) => {\r\n\tconst { notifications } = props;\r\n\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;\r\n\tconst activeFilter = getActiveFilter(drawerControlProps);\r\n\r\n\tconst byPeriodNotifications: Record<Periods, INotification[]> = {\r\n\t\ttoday: [],\r\n\t\tyesterday: [],\r\n\t\tthisWeek: [],\r\n\t\tolder: [],\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tif (searchString === \"\") {\r\n\t\t\tsetFilteredNotifications(notifications);\r\n\t\t} else {\r\n\t\t\tsetFilteredNotifications(searchNotifications(notifications, searchString));\r\n\t\t}\r\n\t}, [searchString, notifications]);\r\n\r\n\tconst controlFilteredNotifications = activeFilter ? activeFilter.run?.(filteredNotifications) : [];\r\n\r\n\tcontrolFilteredNotifications.reduce((accumulator: any, notification: INotification) => {\r\n\t\tconst notificationDate: number = Date.parse(notification.issuedAt);\r\n\t\tif (isToday(notificationDate)) {\r\n\t\t\taccumulator.today.push(notification);\r\n\t\t} else if (isYesterday(notificationDate)) {\r\n\t\t\taccumulator.yesterday.push(notification);\r\n\t\t} else if (isThisWeek(notificationDate)) {\r\n\t\t\taccumulator.thisWeek.push(notification);\r\n\t\t} else {\r\n\t\t\taccumulator.older.push(notification);\r\n\t\t}\r\n\t\treturn accumulator;\r\n\t}, byPeriodNotifications);\r\n\r\n\tconst NotificationCardComponent = props.notificationCard ? props.notificationCard : NotificationCardShell;\r\n\r\n\tconst renderSeparatorLabel = (period: string) => {\r\n\t\tif (period === Periods.TODAY) {\r\n\t\t\treturn <p className=\"notification-day\">Today</p>;\r\n\t\t} else if (period === Periods.YESTERDAY) {\r\n\t\t\treturn <p className=\"notification-day\">Yesterday</p>;\r\n\t\t} else if (period === Periods.THIS_WEEK) {\r\n\t\t\treturn <p className=\"notification-day\">This Week</p>;\r\n\t\t} else {\r\n\t\t\treturn <p className=\"notification-day\">Older</p>;\r\n\t\t}\r\n\t};\r\n\r\n\tconst renderNotificationsBlock = (period: Periods) =>\r\n\t\tbyPeriodNotifications[period]\r\n\t\t\t.sort((a: INotification, b: INotification) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt))\r\n\t\t\t.filter((notification) => (activeFilter.action === \"snoozed\" ? notification.isSnoozed : !notification.isSnoozed))\r\n\t\t\t.map((notification, index) => {\r\n\t\t\t\tconst id = notification.id || index.toString();\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<div key={id}>\r\n\t\t\t\t\t\t{index === 0 ? renderSeparatorLabel(period) : null}\r\n\t\t\t\t\t\t<NotificationCardComponent notification={notification} removeNotification={() => {}} uiContext={\"center\"} />\r\n\t\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t);\r\n\t\t\t});\r\n\r\n\treturn isEmpty(byPeriodNotifications, activeFilter.action === \"snoozed\") ? (\r\n\t\t<NoNotifications />\r\n\t) : (\r\n\t\t<>{Object.keys(byPeriodNotifications).map((period) => renderNotificationsBlock(period as Periods))}</>\r\n\t);\r\n};\r\n\r\nexport default CardView;\r\n"]}
1
+ {"version":3,"file":"CardView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/CardView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAM5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMnE,IAAK,OAKJ;AALD,WAAK,OAAO;IACX,0BAAe,CAAA;IACf,iCAAsB,CAAA;IACtB,kCAAuB,CAAA;IACvB,0BAAe,CAAA;AAChB,CAAC,EALI,OAAO,KAAP,OAAO,QAKX;AAED,MAAM,OAAO,GAAG,CAAC,qBAAuD,EAAE,gBAAyB,EAAE,EAAE;IACtG,IAAI,gBAAgB,EAAE;QACrB,OAAO,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAsB,EAAE,EAAE,CAAC,KAAK,CAAC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,CAAC,CAAC,CAAgB,EAAE,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7F,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;SAChH,GAAG,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE;QAC5B,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC/C,OAAO,CACN,6BAAK,GAAG,EAAE,EAAE;YACV,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;YAClD,oBAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAI;YAC5G,6BAAK,SAAS,EAAC,SAAS,aAAa,CAChC,CACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC,qBAAqB,EAAE,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAC1E,oBAAC,eAAe,OAAG,CACnB,CAAC,CAAC,CAAC,CACH,0CAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAiB,CAAC,CAAC,CAAI,CACtG,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { isToday, isYesterday, isThisWeek } from \"date-fns\";\n\n// Types\nimport { NotificationCardViewProps } from \"../../types\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Components\nimport { NotificationCardShell } from \"../shared/NotificationCardShell\";\nimport NoNotifications from \"../NoNotifications\";\n\n// Utils\nimport { getActiveFilter, searchNotifications } from \"../../utils\";\n\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\n\nenum Periods {\n\tTODAY = \"today\",\n\tTHIS_WEEK = \"thisWeek\",\n\tYESTERDAY = \"yesterday\",\n\tOLDER = \"older\",\n}\n\nconst isEmpty = (byPeriodNotifications: Record<Periods, INotification[]>, accountForSnooze: boolean) => {\n\tif (accountForSnooze) {\n\t\treturn Object.values(byPeriodNotifications).every((value: INotification[]) => value.length === 0);\n\t} else {\n\t\treturn Object.values(byPeriodNotifications).every(\n\t\t\t(value: INotification[]) =>\n\t\t\t\tvalue.length === 0 || value.filter((notification: INotification) => !notification.isSnoozed).length === 0\n\t\t);\n\t}\n};\n\nexport const CardView: React.FunctionComponent<NotificationCardViewProps> = (props: NotificationCardViewProps) => {\n\tconst { notifications } = props;\n\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;\n\tconst activeFilter = getActiveFilter(drawerControlProps);\n\n\tconst byPeriodNotifications: Record<Periods, INotification[]> = {\n\t\ttoday: [],\n\t\tyesterday: [],\n\t\tthisWeek: [],\n\t\tolder: [],\n\t};\n\n\tuseEffect(() => {\n\t\tif (searchString === \"\") {\n\t\t\tsetFilteredNotifications(notifications);\n\t\t} else {\n\t\t\tsetFilteredNotifications(searchNotifications(notifications, searchString));\n\t\t}\n\t}, [searchString, notifications]);\n\n\tconst controlFilteredNotifications = activeFilter ? activeFilter.run?.(filteredNotifications) : [];\n\n\tcontrolFilteredNotifications.reduce((accumulator: any, notification: INotification) => {\n\t\tconst notificationDate: number = Date.parse(notification.issuedAt);\n\t\tif (isToday(notificationDate)) {\n\t\t\taccumulator.today.push(notification);\n\t\t} else if (isYesterday(notificationDate)) {\n\t\t\taccumulator.yesterday.push(notification);\n\t\t} else if (isThisWeek(notificationDate)) {\n\t\t\taccumulator.thisWeek.push(notification);\n\t\t} else {\n\t\t\taccumulator.older.push(notification);\n\t\t}\n\t\treturn accumulator;\n\t}, byPeriodNotifications);\n\n\tconst NotificationCardComponent = props.notificationCard ? props.notificationCard : NotificationCardShell;\n\n\tconst renderSeparatorLabel = (period: string) => {\n\t\tif (period === Periods.TODAY) {\n\t\t\treturn <p className=\"notification-day\">Today</p>;\n\t\t} else if (period === Periods.YESTERDAY) {\n\t\t\treturn <p className=\"notification-day\">Yesterday</p>;\n\t\t} else if (period === Periods.THIS_WEEK) {\n\t\t\treturn <p className=\"notification-day\">This Week</p>;\n\t\t} else {\n\t\t\treturn <p className=\"notification-day\">Older</p>;\n\t\t}\n\t};\n\n\tconst renderNotificationsBlock = (period: Periods) =>\n\t\tbyPeriodNotifications[period]\n\t\t\t.sort((a: INotification, b: INotification) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt))\n\t\t\t.filter((notification) => (activeFilter.action === \"snoozed\" ? notification.isSnoozed : !notification.isSnoozed))\n\t\t\t.map((notification, index) => {\n\t\t\t\tconst id = notification.id || index.toString();\n\t\t\t\treturn (\n\t\t\t\t\t<div key={id}>\n\t\t\t\t\t\t{index === 0 ? renderSeparatorLabel(period) : null}\n\t\t\t\t\t\t<NotificationCardComponent notification={notification} removeNotification={() => {}} uiContext={\"center\"} />\n\t\t\t\t\t\t<div className=\"divider\">&nbsp;</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t});\n\n\treturn isEmpty(byPeriodNotifications, activeFilter.action === \"snoozed\") ? (\n\t\t<NoNotifications />\n\t) : (\n\t\t<>{Object.keys(byPeriodNotifications).map((period) => renderNotificationsBlock(period as Periods))}</>\n\t);\n};\n\nexport default CardView;\n"]}
@@ -88,7 +88,7 @@ export const NotificationListRowShell = ({ notification, newNotificationHaloPeri
88
88
  };
89
89
  }, []);
90
90
  const menuActions = Object.values(overFlowActions).map((value) => renderOverflowMenuAction(notification, value, isMuteFilterApplied));
91
- return (React.createElement("div", { className: `list-row__container notification-item ${notification.isRead ? "is-read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
91
+ return (React.createElement("div", { className: `list-row__container notification-item ${notification.isRead ? "is-read" : ""} ${isNew || wokeFromSnooze ? "new" : ""}
92
92
  ${notification.cssClassName ? notification.cssClassName : ""}` },
93
93
  children ? (React.createElement(React.Fragment, null,
94
94
  selectionMode === SelectionMode.SELECTION ? (React.createElement("div", { className: "list-row__cell" },
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/ListView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,wBAAwB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,YAAY,EAAE,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACN,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AAGnG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CACjC,6BAAK,SAAS,EAAC,wBAAwB;IACtC,6BAAK,SAAS,EAAC,kBAAkB,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CAAC,GAAG,+CAAhB,YAAY,EAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjG,4BAA4B,CAAC,IAAI,CAChC,CAAC,CAAgB,EAAE,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CACvF,CAAC;IAEF,4BAA4B,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC,YAA2B,EAAE,EAAE,CAClG,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CACpF,CAAC;IAEF,OAAO,4BAA4B,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAClD,oBAAC,eAAe,OAAG,CACnB,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,qBAAqB,OAAG;QACxB,4BAA4B,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,KAAa,EAAE,EAAE;YAChF,MAAM,GAAG,GAAG,GAAG,KAAK,IAAI,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;YACpF,OAAO,CACN,oBAAC,mBAAmB,IACnB,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,gCAAgC,GACjE,CACF,CAAC;QACH,CAAC,CAAC,CACA,CACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useContext, useState, useEffect } from \"react\";\r\nimport { format, differenceInMilliseconds, parseISO, addSeconds } from \"date-fns\";\r\n\r\n// types\r\nimport { NotificationListViewProps } from \"../../types\";\r\n\r\n// Context\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\n\r\n// Components\r\nimport IconButton from \"../shared/IconButton\";\r\nimport NoNotifications from \"../NoNotifications\";\r\nimport OverflowMenu, { OverflowMenuActions, renderOverflowMenuAction } from \"../shared/OverflowMenu\";\r\nimport { CheckButton } from \"../shared/CheckButton\";\r\n\r\n// Utils\r\nimport {\r\n\tgetActiveFilter,\r\n\tgetMostRecentAction,\r\n\tisNewNotification,\r\n\tisReNotification,\r\n\tsearchNotifications,\r\n} from \"../../utils\";\r\n\r\nimport { NotificationCardHeaderLogo } from \"../shared/notificationCard/NotificationCardHeaderLogo\";\r\n\r\n// Constants\r\nimport { SelectionMode } from \"../../constants\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IPerformedAction = services.notification.types.IPerformedAction;\r\n\r\nconst ListHeaderComponent = () => (\r\n\t<div className=\"list-header__container\">\r\n\t\t<div className=\"list-header_cell\">Received</div>\r\n\t\t<div className=\"list-header_cell\">App</div>\r\n\t\t<div className=\"list-header_cell\">Content</div>\r\n\t\t<div className=\"list-header_cell\">{\"\"}</div>\r\n\t</div>\r\n);\r\n\r\nexport type NotificationListRowPropType = {\r\n\tnotification: INotification;\r\n\tnewNotificationHaloPeriodSeconds: number;\r\n};\r\n\r\nexport const NotificationListRowShell: React.FunctionComponent<NotificationListRowPropType> = ({\r\n\tnotification,\r\n\tnewNotificationHaloPeriodSeconds,\r\n\tchildren,\r\n}: any) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst { setSelectedNotification, muteFilters, selectionMode } = notificationsContext;\r\n\tconst [overflowMenuOpen, setOverflowMenuOpen] = useState(false);\r\n\tconst toggleOverflowMenu = () => {\r\n\t\tsetOverflowMenuOpen(!overflowMenuOpen);\r\n\t};\r\n\r\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\r\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\r\n\t);\r\n\tconst [isMuteFilterApplied, setIsMuteFilterApplied] = useState(\r\n\t\tmuteFilters\r\n\t\t\t? muteFilters.some((filter) => filter.source === notification.source && filter.type === notification.type)\r\n\t\t\t: false\r\n\t);\r\n\r\n\t// effect needed as the newNotificationHaloPeriodSeconds is fecthed asynchronously in the parent component\r\n\t// and sometimes at the first render, this value is still 0\r\n\tuseEffect(() => {\r\n\t\tsetIsNew(isNewNotification(notification, newNotificationHaloPeriodSeconds));\r\n\t}, [newNotificationHaloPeriodSeconds]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isNewTimerId: any;\r\n\t\tif (isNew) {\r\n\t\t\tif (notification.isRead) {\r\n\t\t\t\tsetIsNew(false);\r\n\t\t\t\tclearTimeout(isNewTimerId);\r\n\t\t\t} else {\r\n\t\t\t\tisNewTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetIsNew(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isNewTimerId);\r\n\t\t};\r\n\t}, [isNew, notification]);\r\n\r\n\tuseEffect(() => {\r\n\t\tlet isRenotificationTimerId: any;\r\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\r\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\r\n\t\t\tif (mostRecentAction) {\r\n\t\t\t\tconst { datePerformed } = mostRecentAction;\r\n\t\t\t\tsetWokeFromSnooze(true);\r\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\r\n\t\t\t\t\tsetWokeFromSnooze(false);\r\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsetWokeFromSnooze(false);\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t}\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(isRenotificationTimerId);\r\n\t\t};\r\n\t}, [newNotificationHaloPeriodSeconds, notification]);\r\n\r\n\tconst overFlowActions = Object.assign({}, OverflowMenuActions);\r\n\toverFlowActions.DETAILS.action = (detailNotification: INotification) => {\r\n\t\tsetSelectedNotification(detailNotification);\r\n\t};\r\n\r\n\tdelete overFlowActions.DISMISS;\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\tconst { data } = response;\r\n\t\t\t\tif (notification.source === data.source && notification.type === data.type) {\r\n\t\t\t\t\tsetIsMuteFilterApplied(data.isMuted);\r\n\t\t\t\t}\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\tconst menuActions = Object.values(overFlowActions).map((value) =>\r\n\t\trenderOverflowMenuAction(notification, value, isMuteFilterApplied)\r\n\t);\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={`list-row__container notification-item ${notification.isRead ? \"is-read\" : \"\"} ${\r\n\t\t\t\tisNew || wokeFromSnooze ? \"new\" : \"\"\r\n\t\t\t}\r\n\t\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\r\n\t\t>\r\n\t\t\t{children ? (\r\n\t\t\t\t<>\r\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\r\n\t\t\t\t\t\t<div className=\"list-row__cell\">\r\n\t\t\t\t\t\t\t<CheckButton notification={notification} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<></>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</>\r\n\t\t\t) : (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<div className=\"list-row__cell\">{format(Date.parse(notification.issuedAt), \"dd-MM-yyyy HH:mm\")}</div>\r\n\t\t\t\t\t<div className=\"list-row__cell\">\r\n\t\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\r\n\t\t\t\t\t\t\t<div className=\"list-row__cell\">\r\n\t\t\t\t\t\t\t\t<CheckButton notification={notification} />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t<NotificationCardHeaderLogo headerLogo={notification.headerLogo} />\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"list-row__cell\">{`${notification.title} - ${notification.details}`}</div>\r\n\t\t\t\t</>\r\n\t\t\t)}\r\n\t\t\t<div className=\"list-row__cell\">\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" clickHandler={toggleOverflowMenu}>\r\n\t\t\t\t\t\t{overflowMenuOpen ? <OverflowMenu closeSelf={setOverflowMenuOpen}>{menuActions}</OverflowMenu> : null}\r\n\t\t\t\t\t</IconButton>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nconst ListView: React.FunctionComponent<NotificationListViewProps> = ({\r\n\tnotificationHeaderRow,\r\n\tnotificationListRow,\r\n\tnotifications,\r\n}) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\t// The context will be used to filter the notifications\r\n\tconst { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;\r\n\r\n\tconst activeFilter = getActiveFilter(drawerControlProps);\r\n\r\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\r\n\r\n\tconst NotificationHeaderRow = notificationHeaderRow || ListHeaderComponent;\r\n\tconst NotificationListRow = notificationListRow || NotificationListRowShell;\r\n\r\n\t// Sets the current default preference\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (searchString === \"\") {\r\n\t\t\tsetFilteredNotifications(notifications);\r\n\t\t} else {\r\n\t\t\tsetFilteredNotifications(searchNotifications(notifications, searchString));\r\n\t\t}\r\n\t}, [searchString, notifications]);\r\n\r\n\tlet controlFilteredNotifications = activeFilter ? activeFilter.run?.(filteredNotifications) : [];\r\n\tcontrolFilteredNotifications.sort(\r\n\t\t(a: INotification, b: INotification) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt)\r\n\t);\r\n\r\n\tcontrolFilteredNotifications = controlFilteredNotifications.filter((notification: INotification) =>\r\n\t\tactiveFilter.action === \"snoozed\" ? notification.isSnoozed : !notification.isSnoozed\r\n\t);\r\n\r\n\treturn controlFilteredNotifications.length === 0 ? (\r\n\t\t<NoNotifications />\r\n\t) : (\r\n\t\t<>\r\n\t\t\t<NotificationHeaderRow />\r\n\t\t\t{controlFilteredNotifications.map((notification: INotification, index: number) => {\r\n\t\t\t\tconst key = `${index}_${notification.id ? notification.id : notification.issuedAt}`;\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<NotificationListRow\r\n\t\t\t\t\t\tkey={key}\r\n\t\t\t\t\t\tnotification={notification}\r\n\t\t\t\t\t\tnewNotificationHaloPeriodSeconds={newNotificationHaloPeriodSeconds}\r\n\t\t\t\t\t/>\r\n\t\t\t\t);\r\n\t\t\t})}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default ListView;\r\n"]}
1
+ {"version":3,"file":"ListView.js","sourceRoot":"","sources":["../../../../../src/components/notif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AAY,CAAC,SAAS,CACpF,CAAC;IAEF,OAAO,4BAA4B,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAClD,oBAAC,eAAe,OAAG,CACnB,CAAC,CAAC,CAAC,CACH;QACC,oBAAC,qBAAqB,OAAG;QACxB,4BAA4B,CAAC,GAAG,CAAC,CAAC,YAA2B,EAAE,KAAa,EAAE,EAAE;YAChF,MAAM,GAAG,GAAG,GAAG,KAAK,IAAI,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;YACpF,OAAO,CACN,oBAAC,mBAAmB,IACnB,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,YAAY,EAC1B,gCAAgC,EAAE,gCAAgC,GACjE,CACF,CAAC;QACH,CAAC,CAAC,CACA,CACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useContext, useState, useEffect } from \"react\";\nimport { format, differenceInMilliseconds, parseISO, addSeconds } from \"date-fns\";\n\n// types\nimport { NotificationListViewProps } from \"../../types\";\n\n// Context\nimport { NotificationsContext } from \"../../notificationsContext\";\n\n// Components\nimport IconButton from \"../shared/IconButton\";\nimport NoNotifications from \"../NoNotifications\";\nimport OverflowMenu, { OverflowMenuActions, renderOverflowMenuAction } from \"../shared/OverflowMenu\";\nimport { CheckButton } from \"../shared/CheckButton\";\n\n// Utils\nimport {\n\tgetActiveFilter,\n\tgetMostRecentAction,\n\tisNewNotification,\n\tisReNotification,\n\tsearchNotifications,\n} from \"../../utils\";\n\nimport { NotificationCardHeaderLogo } from \"../shared/notificationCard/NotificationCardHeaderLogo\";\n\n// Constants\nimport { SelectionMode } from \"../../constants\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\ntype IPerformedAction = services.notification.types.IPerformedAction;\n\nconst ListHeaderComponent = () => (\n\t<div className=\"list-header__container\">\n\t\t<div className=\"list-header_cell\">Received</div>\n\t\t<div className=\"list-header_cell\">App</div>\n\t\t<div className=\"list-header_cell\">Content</div>\n\t\t<div className=\"list-header_cell\">{\"\"}</div>\n\t</div>\n);\n\nexport type NotificationListRowPropType = {\n\tnotification: INotification;\n\tnewNotificationHaloPeriodSeconds: number;\n};\n\nexport const NotificationListRowShell: React.FunctionComponent<NotificationListRowPropType> = ({\n\tnotification,\n\tnewNotificationHaloPeriodSeconds,\n\tchildren,\n}: any) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst { setSelectedNotification, muteFilters, selectionMode } = notificationsContext;\n\tconst [overflowMenuOpen, setOverflowMenuOpen] = useState(false);\n\tconst toggleOverflowMenu = () => {\n\t\tsetOverflowMenuOpen(!overflowMenuOpen);\n\t};\n\n\tconst [isNew, setIsNew] = useState(isNewNotification(notification, newNotificationHaloPeriodSeconds));\n\tconst [wokeFromSnooze, setWokeFromSnooze] = useState(\n\t\tisReNotification(notification, newNotificationHaloPeriodSeconds)\n\t);\n\tconst [isMuteFilterApplied, setIsMuteFilterApplied] = useState(\n\t\tmuteFilters\n\t\t\t? muteFilters.some((filter) => filter.source === notification.source && filter.type === notification.type)\n\t\t\t: false\n\t);\n\n\t// effect needed as the newNotificationHaloPeriodSeconds is fecthed asynchronously in the parent component\n\t// and sometimes at the first render, this value is still 0\n\tuseEffect(() => {\n\t\tsetIsNew(isNewNotification(notification, newNotificationHaloPeriodSeconds));\n\t}, [newNotificationHaloPeriodSeconds]);\n\n\tuseEffect(() => {\n\t\tlet isNewTimerId: any;\n\t\tif (isNew) {\n\t\t\tif (notification.isRead) {\n\t\t\t\tsetIsNew(false);\n\t\t\t\tclearTimeout(isNewTimerId);\n\t\t\t} else {\n\t\t\t\tisNewTimerId = setTimeout(() => {\n\t\t\t\t\tsetIsNew(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(notification.issuedAt), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isNewTimerId);\n\t\t};\n\t}, [isNew, notification]);\n\n\tuseEffect(() => {\n\t\tlet isRenotificationTimerId: any;\n\t\tif (isReNotification(notification, newNotificationHaloPeriodSeconds)) {\n\t\t\tconst mostRecentAction: IPerformedAction | null = getMostRecentAction(notification);\n\t\t\tif (mostRecentAction) {\n\t\t\t\tconst { datePerformed } = mostRecentAction;\n\t\t\t\tsetWokeFromSnooze(true);\n\t\t\t\tisRenotificationTimerId = setTimeout(() => {\n\t\t\t\t\tsetWokeFromSnooze(false);\n\t\t\t\t}, differenceInMilliseconds(addSeconds(parseISO(datePerformed), newNotificationHaloPeriodSeconds), Date.now()));\n\t\t\t}\n\t\t} else {\n\t\t\tsetWokeFromSnooze(false);\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t}\n\t\treturn () => {\n\t\t\tclearTimeout(isRenotificationTimerId);\n\t\t};\n\t}, [newNotificationHaloPeriodSeconds, notification]);\n\n\tconst overFlowActions = Object.assign({}, OverflowMenuActions);\n\toverFlowActions.DETAILS.action = (detailNotification: INotification) => {\n\t\tsetSelectedNotification(detailNotification);\n\t};\n\n\tdelete overFlowActions.DISMISS;\n\n\tuseEffect(() => {\n\t\tfunction listenMuteStateChanged(error: any, response: any) {\n\t\t\tif (error) {\n\t\t\t\tconsole.error(\"FinsembleNotificationsMuteStateChannel: \", error);\n\t\t\t} else {\n\t\t\t\tconst { data } = response;\n\t\t\t\tif (notification.source === data.source && notification.type === data.type) {\n\t\t\t\t\tsetIsMuteFilterApplied(data.isMuted);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\treturn () => {\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsMuteStateChannel\", listenMuteStateChanged);\n\t\t};\n\t}, []);\n\n\tconst menuActions = Object.values(overFlowActions).map((value) =>\n\t\trenderOverflowMenuAction(notification, value, isMuteFilterApplied)\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`list-row__container notification-item ${notification.isRead ? \"is-read\" : \"\"} ${\n\t\t\t\tisNew || wokeFromSnooze ? \"new\" : \"\"\n\t\t\t}\n\t\t\t\t${notification.cssClassName ? notification.cssClassName : \"\"}`}\n\t\t>\n\t\t\t{children ? (\n\t\t\t\t<>\n\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\n\t\t\t\t\t\t<div className=\"list-row__cell\">\n\t\t\t\t\t\t\t<CheckButton notification={notification} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<></>\n\t\t\t\t\t)}\n\t\t\t\t\t{children}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"list-row__cell\">{format(Date.parse(notification.issuedAt), \"dd-MM-yyyy HH:mm\")}</div>\n\t\t\t\t\t<div className=\"list-row__cell\">\n\t\t\t\t\t\t{selectionMode === SelectionMode.SELECTION ? (\n\t\t\t\t\t\t\t<div className=\"list-row__cell\">\n\t\t\t\t\t\t\t\t<CheckButton notification={notification} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<NotificationCardHeaderLogo headerLogo={notification.headerLogo} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"list-row__cell\">{`${notification.title} - ${notification.details}`}</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t<div className=\"list-row__cell\">\n\t\t\t\t<span>\n\t\t\t\t\t<IconButton iconName=\"ff-dots-vert\" tooltip=\"Options\" clickHandler={toggleOverflowMenu}>\n\t\t\t\t\t\t{overflowMenuOpen ? <OverflowMenu closeSelf={setOverflowMenuOpen}>{menuActions}</OverflowMenu> : null}\n\t\t\t\t\t</IconButton>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst ListView: React.FunctionComponent<NotificationListViewProps> = ({\n\tnotificationHeaderRow,\n\tnotificationListRow,\n\tnotifications,\n}) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\t// The context will be used to filter the notifications\n\tconst { drawerControlProps, searchString, filteredNotifications, setFilteredNotifications } = notificationsContext;\n\n\tconst activeFilter = getActiveFilter(drawerControlProps);\n\n\tconst [newNotificationHaloPeriodSeconds, setNotificationHaloPeriodSeconds] = useState(0);\n\n\tconst NotificationHeaderRow = notificationHeaderRow || ListHeaderComponent;\n\tconst NotificationListRow = notificationListRow || NotificationListRowShell;\n\n\t// Sets the current default preference\n\tuseEffect(() => {\n\t\tasync function getNotificationsPreferences() {\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\n\t\t}\n\n\t\tgetNotificationsPreferences().then((preferences: any) => {\n\t\t\tsetNotificationHaloPeriodSeconds(preferences.newNotificationHaloPeriodSeconds);\n\t\t});\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (searchString === \"\") {\n\t\t\tsetFilteredNotifications(notifications);\n\t\t} else {\n\t\t\tsetFilteredNotifications(searchNotifications(notifications, searchString));\n\t\t}\n\t}, [searchString, notifications]);\n\n\tlet controlFilteredNotifications = activeFilter ? activeFilter.run?.(filteredNotifications) : [];\n\tcontrolFilteredNotifications.sort(\n\t\t(a: INotification, b: INotification) => Date.parse(b.issuedAt) - Date.parse(a.issuedAt)\n\t);\n\n\tcontrolFilteredNotifications = controlFilteredNotifications.filter((notification: INotification) =>\n\t\tactiveFilter.action === \"snoozed\" ? notification.isSnoozed : !notification.isSnoozed\n\t);\n\n\treturn controlFilteredNotifications.length === 0 ? (\n\t\t<NoNotifications />\n\t) : (\n\t\t<>\n\t\t\t<NotificationHeaderRow />\n\t\t\t{controlFilteredNotifications.map((notification: INotification, index: number) => {\n\t\t\t\tconst key = `${index}_${notification.id ? notification.id : notification.issuedAt}`;\n\t\t\t\treturn (\n\t\t\t\t\t<NotificationListRow\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\tnewNotificationHaloPeriodSeconds={newNotificationHaloPeriodSeconds}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default ListView;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationDetailsView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/NotificationDetailsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtD,QAAQ,UAAU,EAAE;QACnB,KAAK,oBAAoB;YACxB,OAAO,uBAAuB,CAAC;QAEhC,KAAK,gBAAgB;YACpB,OAAO,6BAA6B,CAAC;QAEtC,KAAK,kBAAkB;YACtB,OAAO,+BAA+B,CAAC;QAExC,KAAK,QAAQ;YACZ,OAAO,SAAS,CAAC;QAElB,KAAK,gBAAgB;YACpB,OAAO,YAAY,CAAC;QAErB,KAAK,OAAO;YACX,OAAO,eAAe,CAAC;QAExB;YACC,OAAO,UAAU,CAAC;KACnB;AACF,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAiB,EAAE,UAAU,GAAG,kBAAkB,EAAE,EAAE,CAC9E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;AAE3C,MAAM,wBAAwB,GAAG,CAAC,0BAA0D,EAAE,EAAE;IAC/F,IAAI,CAAC,0BAA0B,IAAI,0BAA0B,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3E,OAAO,0DAAkC,CAAC;KAC1C;SAAM;QACN,OAAO,0BAA0B;aAC/B,IAAI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EAAC,8BAA8B;YAC5C,6BACC,GAAG,EAAE,YAAY,CAAC,UAAU,EAC5B,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACtC;YACD,eAAe,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,0BAA0B,GAAG,CAAC,CAAC,CAAC,IAAI;YACpE,6BAAK,SAAS,EAAC,0BAA0B,IAAE,YAAY,CAAC,KAAK,CAAO,CAC/D;QACN,6BAAK,SAAS,EAAC,4BAA4B,IAAE,YAAY,CAAC,OAAO,CAAO;QACxE,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,cAAc;YACjE,wBAAwB,CAAC,YAAY,CAAC,cAAc,CAAC,CACjD;QACN,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,UAAU;YAC7D,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAChD;QACL,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,WAAW;YAC/D,8BAAM,SAAS,EAAC,0CAA0C,IAAE,YAAY,CAAC,IAAI,CAAQ,CAChF,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC,CAAC,CAAC,IAAI,CAAC;AACV,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useContext, useState } from \"react\";\r\nimport { format } from \"date-fns\";\r\n\r\nimport { NotificationsContext } from \"../../notificationsContext\";\r\nimport { Button } from \"../../../common/Button\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype INotification = services.notification.types.INotification;\r\ntype IPerformedAction = services.notification.types.IPerformedAction;\r\n\r\nconst translateAction = (actionType: string): string => {\r\n\tswitch (actionType) {\r\n\t\tcase \"FINSEMBLE:RECEIVED\":\r\n\t\t\treturn \"Notification received\";\r\n\r\n\t\tcase \"FINSEMBLE:READ\":\r\n\t\t\treturn \"Notification marked as read\";\r\n\r\n\t\tcase \"FINSEMBLE:UNREAD\":\r\n\t\t\treturn \"Notification marked as unread\";\r\n\r\n\t\tcase \"SNOOZE\":\r\n\t\t\treturn \"Snoozed\";\r\n\r\n\t\tcase \"FINSEMBLE:WAKE\":\r\n\t\t\treturn \"Renotified\";\r\n\r\n\t\tcase \"SPAWN\":\r\n\t\t\treturn \"Action: Spawn\";\r\n\r\n\t\tdefault:\r\n\t\t\treturn actionType;\r\n\t}\r\n};\r\n\r\nconst formatTimeStamp = (timestamp: string, dateFormat = \"dd-MM-yyyy HH:mm\") =>\r\n\tformat(Date.parse(timestamp), dateFormat);\r\n\r\nconst renderActionHistoryItems = (notificationActionsHistory: IPerformedAction[] | undefined) => {\r\n\tif (!notificationActionsHistory || notificationActionsHistory.length === 0) {\r\n\t\treturn <span>No actions to display</span>;\r\n\t} else {\r\n\t\treturn notificationActionsHistory\r\n\t\t\t.sort((a: IPerformedAction, b: IPerformedAction) => Date.parse(b.datePerformed) - Date.parse(a.datePerformed))\r\n\t\t\t.map((actionHistoryItem, index) => {\r\n\t\t\t\tconst performedAction = actionHistoryItem as IPerformedAction;\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<div key={performedAction.id || index} className=\"notification-details__performed-action\">\r\n\t\t\t\t\t\t<span className=\"notification-details__performed-action-timestamp\">\r\n\t\t\t\t\t\t\t{formatTimeStamp(performedAction.datePerformed, \"HH:mm dd-MM-yyyy\")}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span className=\"notification-details__performed-action-translated\">\r\n\t\t\t\t\t\t\t{translateAction(performedAction.type)}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t}\r\n};\r\n\r\nconst NotificationDetailsView: React.FunctionComponent<{ notification: INotification | null }> = ({ notification }) => {\r\n\tconst notificationsContext = useContext(NotificationsContext);\r\n\tconst [showDefaultIcon, setShowDefaultIcon] = useState(false);\r\n\r\n\tconst goBack = () => {\r\n\t\tnotificationsContext.setSelectedNotification(null);\r\n\t};\r\n\r\n\treturn notification ? (\r\n\t\t<div className=\"notifications-details__container\">\r\n\t\t\t<div style={{ paddingRight: 8, marginLeft: -3 }}>\r\n\t\t\t\t<Button onClick={() => goBack()} fashion=\"primary\" iconBefore=\"chevron-left\" text=\"Back\" />\r\n\t\t\t</div>\r\n\t\t\t<div className=\"notification-details__header\">\r\n\t\t\t\t<img\r\n\t\t\t\t\tsrc={notification.headerLogo}\r\n\t\t\t\t\tstyle={showDefaultIcon ? { display: \"none\" } : {}}\r\n\t\t\t\t\tonError={() => setShowDefaultIcon(true)}\r\n\t\t\t\t/>\r\n\t\t\t\t{showDefaultIcon ? <i className=\"ff-finsemble default-img\" /> : null}\r\n\t\t\t\t<div className=\"notification-card__title\">{notification.title}</div>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"notification-details__body\">{notification.details}</div>\r\n\t\t\t<div className=\"notification-details__section\">\r\n\t\t\t\t<div className=\"notification-details__section-title\">History</div>\r\n\t\t\t\t{renderActionHistoryItems(notification.actionsHistory)}\r\n\t\t\t</div>\r\n\t\t\t<div className=\"notification-details__section\">\r\n\t\t\t\t<div className=\"notification-details__section-title\">App</div>\r\n\t\t\t\t{notification.source ? notification.source : \"Uknown\"}\r\n\t\t\t</div>\r\n\t\t\t{notification.type ? (\r\n\t\t\t\t<div className=\"notification-details__section\">\r\n\t\t\t\t\t<div className=\"notification-details__section-title\">Type</div>\r\n\t\t\t\t\t<span className=\"notification-details__section-type-label\">{notification.type}</span>\r\n\t\t\t\t</div>\r\n\t\t\t) : null}\r\n\t\t</div>\r\n\t) : null;\r\n};\r\n\r\nexport default NotificationDetailsView;\r\n"]}
1
+ {"version":3,"file":"NotificationDetailsView.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/views/NotificationDetailsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAU,EAAE;IACtD,QAAQ,UAAU,EAAE;QACnB,KAAK,oBAAoB;YACxB,OAAO,uBAAuB,CAAC;QAEhC,KAAK,gBAAgB;YACpB,OAAO,6BAA6B,CAAC;QAEtC,KAAK,kBAAkB;YACtB,OAAO,+BAA+B,CAAC;QAExC,KAAK,QAAQ;YACZ,OAAO,SAAS,CAAC;QAElB,KAAK,gBAAgB;YACpB,OAAO,YAAY,CAAC;QAErB,KAAK,OAAO;YACX,OAAO,eAAe,CAAC;QAExB;YACC,OAAO,UAAU,CAAC;KACnB;AACF,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAiB,EAAE,UAAU,GAAG,kBAAkB,EAAE,EAAE,CAC9E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;AAE3C,MAAM,wBAAwB,GAAG,CAAC,0BAA0D,EAAE,EAAE;IAC/F,IAAI,CAAC,0BAA0B,IAAI,0BAA0B,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3E,OAAO,0DAAkC,CAAC;KAC1C;SAAM;QACN,OAAO,0BAA0B;aAC/B,IAAI,CAAC,CAAC,CAAmB,EAAE,CAAmB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa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C,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GACtC;YACD,eAAe,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,0BAA0B,GAAG,CAAC,CAAC,CAAC,IAAI;YACpE,6BAAK,SAAS,EAAC,0BAA0B,IAAE,YAAY,CAAC,KAAK,CAAO,CAC/D;QACN,6BAAK,SAAS,EAAC,4BAA4B,IAAE,YAAY,CAAC,OAAO,CAAO;QACxE,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,cAAc;YACjE,wBAAwB,CAAC,YAAY,CAAC,cAAc,CAAC,CACjD;QACN,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,UAAU;YAC7D,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAChD;QACL,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAC,+BAA+B;YAC7C,6BAAK,SAAS,EAAC,qCAAqC,WAAW;YAC/D,8BAAM,SAAS,EAAC,0CAA0C,IAAE,YAAY,CAAC,IAAI,CAAQ,CAChF,CACN,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC,CAAC,CAAC,IAAI,CAAC;AACV,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useContext, useState } from \"react\";\nimport { format } from \"date-fns\";\n\nimport { NotificationsContext } from \"../../notificationsContext\";\nimport { Button } from \"../../../common/Button\";\nimport { services } from \"@finsemble/finsemble-core\";\n\ntype INotification = services.notification.types.INotification;\ntype IPerformedAction = services.notification.types.IPerformedAction;\n\nconst translateAction = (actionType: string): string => {\n\tswitch (actionType) {\n\t\tcase \"FINSEMBLE:RECEIVED\":\n\t\t\treturn \"Notification received\";\n\n\t\tcase \"FINSEMBLE:READ\":\n\t\t\treturn \"Notification marked as read\";\n\n\t\tcase \"FINSEMBLE:UNREAD\":\n\t\t\treturn \"Notification marked as unread\";\n\n\t\tcase \"SNOOZE\":\n\t\t\treturn \"Snoozed\";\n\n\t\tcase \"FINSEMBLE:WAKE\":\n\t\t\treturn \"Renotified\";\n\n\t\tcase \"SPAWN\":\n\t\t\treturn \"Action: Spawn\";\n\n\t\tdefault:\n\t\t\treturn actionType;\n\t}\n};\n\nconst formatTimeStamp = (timestamp: string, dateFormat = \"dd-MM-yyyy HH:mm\") =>\n\tformat(Date.parse(timestamp), dateFormat);\n\nconst renderActionHistoryItems = (notificationActionsHistory: IPerformedAction[] | undefined) => {\n\tif (!notificationActionsHistory || notificationActionsHistory.length === 0) {\n\t\treturn <span>No actions to display</span>;\n\t} else {\n\t\treturn notificationActionsHistory\n\t\t\t.sort((a: IPerformedAction, b: IPerformedAction) => Date.parse(b.datePerformed) - Date.parse(a.datePerformed))\n\t\t\t.map((actionHistoryItem, index) => {\n\t\t\t\tconst performedAction = actionHistoryItem as IPerformedAction;\n\t\t\t\treturn (\n\t\t\t\t\t<div key={performedAction.id || index} className=\"notification-details__performed-action\">\n\t\t\t\t\t\t<span className=\"notification-details__performed-action-timestamp\">\n\t\t\t\t\t\t\t{formatTimeStamp(performedAction.datePerformed, \"HH:mm dd-MM-yyyy\")}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"notification-details__performed-action-translated\">\n\t\t\t\t\t\t\t{translateAction(performedAction.type)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t});\n\t}\n};\n\nconst NotificationDetailsView: React.FunctionComponent<{ notification: INotification | null }> = ({ notification }) => {\n\tconst notificationsContext = useContext(NotificationsContext);\n\tconst [showDefaultIcon, setShowDefaultIcon] = useState(false);\n\n\tconst goBack = () => {\n\t\tnotificationsContext.setSelectedNotification(null);\n\t};\n\n\treturn notification ? (\n\t\t<div className=\"notifications-details__container\">\n\t\t\t<div style={{ paddingRight: 8, marginLeft: -3 }}>\n\t\t\t\t<Button onClick={() => goBack()} fashion=\"primary\" iconBefore=\"chevron-left\" text=\"Back\" />\n\t\t\t</div>\n\t\t\t<div className=\"notification-details__header\">\n\t\t\t\t<img\n\t\t\t\t\tsrc={notification.headerLogo}\n\t\t\t\t\tstyle={showDefaultIcon ? { display: \"none\" } : {}}\n\t\t\t\t\tonError={() => setShowDefaultIcon(true)}\n\t\t\t\t/>\n\t\t\t\t{showDefaultIcon ? <i className=\"ff-finsemble default-img\" /> : null}\n\t\t\t\t<div className=\"notification-card__title\">{notification.title}</div>\n\t\t\t</div>\n\t\t\t<div className=\"notification-details__body\">{notification.details}</div>\n\t\t\t<div className=\"notification-details__section\">\n\t\t\t\t<div className=\"notification-details__section-title\">History</div>\n\t\t\t\t{renderActionHistoryItems(notification.actionsHistory)}\n\t\t\t</div>\n\t\t\t<div className=\"notification-details__section\">\n\t\t\t\t<div className=\"notification-details__section-title\">App</div>\n\t\t\t\t{notification.source ? notification.source : \"Uknown\"}\n\t\t\t</div>\n\t\t\t{notification.type ? (\n\t\t\t\t<div className=\"notification-details__section\">\n\t\t\t\t\t<div className=\"notification-details__section-title\">Type</div>\n\t\t\t\t\t<span className=\"notification-details__section-type-label\">{notification.type}</span>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t) : null;\n};\n\nexport default NotificationDetailsView;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/notifications/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IACnB,uCAAI,CAAA;IACJ,uCAAI,CAAA;AACL,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,2DAAS,CAAA;IACT,iEAAY,CAAA;AACb,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["export const NOTIFICATIONS_PUBSUB_TOPIC = \"notification-ui\";\r\n\r\nexport enum ViewMode {\r\n\tLIST,\r\n\tCARD,\r\n}\r\n\r\nexport enum SelectionMode {\r\n\tSELECTION,\r\n\tNO_SELECTION,\r\n}\r\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/notifications/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IACnB,uCAAI,CAAA;IACJ,uCAAI,CAAA;AACL,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,2DAAS,CAAA;IACT,iEAAY,CAAA;AACb,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["export const NOTIFICATIONS_PUBSUB_TOPIC = \"notification-ui\";\n\nexport enum ViewMode {\n\tLIST,\n\tCARD,\n}\n\nexport enum SelectionMode {\n\tSELECTION,\n\tNO_SELECTION,\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAU;IACtC,MAAM,cAAc,GAAG,gDAAgD,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACtG,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,MAAM;QACpG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;YAChG,2BAAG,SAAS,EAAC,uCAAuC;gBACnD,8BAAM,CAAC,EAAC,6NAA6N,GAAG;gBACxO,gCAAQ,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,GAAG;gBACpC,8BAAM,CAAC,EAAC,4NAA4N,GAAG,CACpO,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\r\nexport default function Card(props: any) {\r\n\tconst wrapperClasses = `finsemble-notifications_center__control icon ${props.className || \"\"}`.trim();\r\n\treturn (\r\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"List\"}>\r\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"#ACB2C0\" width=\"19\" height=\"16\" viewBox=\"0 0 19 16\">\r\n\t\t\t\t<g transform=\"translate(-340 -43) translate(339 42)\">\r\n\t\t\t\t\t<path d=\"M18 .5H3C1.62.5.5 1.62.5 3v12c0 1.38 1.12 2.5 2.5 2.5h15c1.38 0 2.5-1.12 2.5-2.5V3c0-1.38-1.12-2.5-2.5-2.5zm-15 1h15c.828 0 1.5.672 1.5 1.5v12c0 .828-.672 1.5-1.5 1.5H3c-.828 0-1.5-.672-1.5-1.5V3c0-.828.672-1.5 1.5-1.5z\" />\r\n\t\t\t\t\t<circle cx=\"6.5\" cy=\"6.5\" r=\"2.5\" />\r\n\t\t\t\t\t<path d=\"M16 6c.552 0 1 .448 1 1 0 .513-.386.936-.883.993L16 8h-4c-.552 0-1-.448-1-1 0-.513.386-.936.883-.993L12 6h4zM16 11c.552 0 1 .448 1 1 0 .513-.386.936-.883.993L16 13H5c-.552 0-1-.448-1-1 0-.513.386-.936.883-.993L5 11h11z\" />\r\n\t\t\t\t</g>\r\n\t\t\t</svg>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAU;IACtC,MAAM,cAAc,GAAG,gDAAgD,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACtG,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,MAAM;QACpG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;YAChG,2BAAG,SAAS,EAAC,uCAAuC;gBACnD,8BAAM,CAAC,EAAC,6NAA6N,GAAG;gBACxO,gCAAQ,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,GAAG;gBACpC,8BAAM,CAAC,EAAC,4NAA4N,GAAG,CACpO,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\nexport default function Card(props: any) {\n\tconst wrapperClasses = `finsemble-notifications_center__control icon ${props.className || \"\"}`.trim();\n\treturn (\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"List\"}>\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"#ACB2C0\" width=\"19\" height=\"16\" viewBox=\"0 0 19 16\">\n\t\t\t\t<g transform=\"translate(-340 -43) translate(339 42)\">\n\t\t\t\t\t<path d=\"M18 .5H3C1.62.5.5 1.62.5 3v12c0 1.38 1.12 2.5 2.5 2.5h15c1.38 0 2.5-1.12 2.5-2.5V3c0-1.38-1.12-2.5-2.5-2.5zm-15 1h15c.828 0 1.5.672 1.5 1.5v12c0 .828-.672 1.5-1.5 1.5H3c-.828 0-1.5-.672-1.5-1.5V3c0-.828.672-1.5 1.5-1.5z\" />\n\t\t\t\t\t<circle cx=\"6.5\" cy=\"6.5\" r=\"2.5\" />\n\t\t\t\t\t<path d=\"M16 6c.552 0 1 .448 1 1 0 .513-.386.936-.883.993L16 8h-4c-.552 0-1-.448-1-1 0-.513.386-.936.883-.993L12 6h4zM16 11c.552 0 1 .448 1 1 0 .513-.386.936-.883.993L16 13H5c-.552 0-1-.448-1-1 0-.513.386-.936.883-.993L5 11h11z\" />\n\t\t\t\t</g>\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Chevron.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/Chevron.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAU;IACzC,MAAM,cAAc,GAAG,+CAA+C,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACrG,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QACvG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU;YAC/E;gBACC,gCAAQ,EAAE,EAAC,YAAY;oBACtB,uCACC,EAAE,EAAC,eAAe,EAClB,MAAM,EAAC,qEAAqE,GAC3E,CACM,CACH;YACP,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;gBAChC,2BAAG,MAAM,EAAC,kBAAkB,EAAC,SAAS,EAAC,qBAAqB;oBAC3D;wBACC,8BACC,IAAI,EAAC,MAAM,EACX,CAAC,EAAC,+LAA+L,EACjM,SAAS,EAAC,8CAA8C,GACvD,CACC,CACD,CACD,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\r\nexport default function Chevron(props: any) {\r\n\tconst wrapperClasses = `finsemble-notifications_center__header icon ${props.className || \"\"}`.trim();\r\n\treturn (\r\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"Dismiss\"}>\r\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9\" height=\"14\" viewBox=\"0 0 9 14\">\r\n\t\t\t\t<defs>\r\n\t\t\t\t\t<filter id=\"86g0ee3xia\">\r\n\t\t\t\t\t\t<feColorMatrix\r\n\t\t\t\t\t\t\tin=\"SourceGraphic\"\r\n\t\t\t\t\t\t\tvalues=\"0 0 0 0 0.674510 0 0 0 0 0.698039 0 0 0 0 0.752941 0 0 0 1.000000 0\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</filter>\r\n\t\t\t\t</defs>\r\n\t\t\t\t<g fill=\"none\" fillRule=\"evenodd\">\r\n\t\t\t\t\t<g filter=\"url(#86g0ee3xia)\" transform=\"translate(-405 -17)\">\r\n\t\t\t\t\t\t<g>\r\n\t\t\t\t\t\t\t<path\r\n\t\t\t\t\t\t\t\tfill=\"#FFF\"\r\n\t\t\t\t\t\t\t\td=\"M12.329.9c.483-.52 1.282-.535 1.784-.035s.518 1.325.034 1.845L8.201 9.1c-.509.547-1.36.53-1.85-.035l-5.53-6.39c-.464-.537-.42-1.362.1-1.843.519-.48 1.316-.434 1.781.103l4.623 5.342L12.33.9z\"\r\n\t\t\t\t\t\t\t\ttransform=\"rotate(-90 218 -186.5) matrix(-1 0 0 1 15 0)\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</g>\r\n\t\t\t\t\t</g>\r\n\t\t\t\t</g>\r\n\t\t\t</svg>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
1
+ {"version":3,"file":"Chevron.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/Chevron.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAU;IACzC,MAAM,cAAc,GAAG,+CAA+C,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACrG,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QACvG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU;YAC/E;gBACC,gCAAQ,EAAE,EAAC,YAAY;oBACtB,uCACC,EAAE,EAAC,eAAe,EAClB,MAAM,EAAC,qEAAqE,GAC3E,CACM,CACH;YACP,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;gBAChC,2BAAG,MAAM,EAAC,kBAAkB,EAAC,SAAS,EAAC,qBAAqB;oBAC3D;wBACC,8BACC,IAAI,EAAC,MAAM,EACX,CAAC,EAAC,+LAA+L,EACjM,SAAS,EAAC,8CAA8C,GACvD,CACC,CACD,CACD,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\nexport default function Chevron(props: any) {\n\tconst wrapperClasses = `finsemble-notifications_center__header icon ${props.className || \"\"}`.trim();\n\treturn (\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"Dismiss\"}>\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9\" height=\"14\" viewBox=\"0 0 9 14\">\n\t\t\t\t<defs>\n\t\t\t\t\t<filter id=\"86g0ee3xia\">\n\t\t\t\t\t\t<feColorMatrix\n\t\t\t\t\t\t\tin=\"SourceGraphic\"\n\t\t\t\t\t\t\tvalues=\"0 0 0 0 0.674510 0 0 0 0 0.698039 0 0 0 0 0.752941 0 0 0 1.000000 0\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</filter>\n\t\t\t\t</defs>\n\t\t\t\t<g fill=\"none\" fillRule=\"evenodd\">\n\t\t\t\t\t<g filter=\"url(#86g0ee3xia)\" transform=\"translate(-405 -17)\">\n\t\t\t\t\t\t<g>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\tfill=\"#FFF\"\n\t\t\t\t\t\t\t\td=\"M12.329.9c.483-.52 1.282-.535 1.784-.035s.518 1.325.034 1.845L8.201 9.1c-.509.547-1.36.53-1.85-.035l-5.53-6.39c-.464-.537-.42-1.362.1-1.843.519-.48 1.316-.434 1.781.103l4.623 5.342L12.33.9z\"\n\t\t\t\t\t\t\t\ttransform=\"rotate(-90 218 -186.5) matrix(-1 0 0 1 15 0)\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</g>\n\t\t\t\t\t</g>\n\t\t\t\t</g>\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CloseIcon.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/CloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAU;IAC3C,MAAM,cAAc,GAAG,kBAAkB,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACxE,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QACvG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;YACjF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;gBAChC,2BAAG,MAAM,EAAC,SAAS,EAAC,WAAW,EAAC,KAAK;oBACpC,8BAAM,CAAC,EAAC,sBAAsB,GAAG,CAC9B,CACD,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\r\nexport default function CloseIcon(props: any) {\r\n\tconst wrapperClasses = `finsemble-icon ${props.className || \"\"}`.trim();\r\n\treturn (\r\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"Dismiss\"}>\r\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"3 3 16 16\">\r\n\t\t\t\t<g fill=\"none\" fillRule=\"evenodd\">\r\n\t\t\t\t\t<g stroke=\"#ACB2C0\" strokeWidth=\"1.5\">\r\n\t\t\t\t\t\t<path d=\"M8 8l10 10m0-10L8 18\" />\r\n\t\t\t\t\t</g>\r\n\t\t\t\t</g>\r\n\t\t\t</svg>\r\n\t\t</div>\r\n\t);\r\n}\r\n"]}
1
+ {"version":3,"file":"CloseIcon.js","sourceRoot":"","sources":["../../../../src/components/notifications/icons/CloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAU;IAC3C,MAAM,cAAc,GAAG,kBAAkB,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACxE,OAAO,CACN,6BAAK,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QACvG,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;YACjF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;gBAChC,2BAAG,MAAM,EAAC,SAAS,EAAC,WAAW,EAAC,KAAK;oBACpC,8BAAM,CAAC,EAAC,sBAAsB,GAAG,CAC9B,CACD,CACC,CACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import * as React from \"react\";\nexport default function CloseIcon(props: any) {\n\tconst wrapperClasses = `finsemble-icon ${props.className || \"\"}`.trim();\n\treturn (\n\t\t<div className={wrapperClasses} onClick={() => props.onClickHandler()} title={props.tooltip || \"Dismiss\"}>\n\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"3 3 16 16\">\n\t\t\t\t<g fill=\"none\" fillRule=\"evenodd\">\n\t\t\t\t\t<g stroke=\"#ACB2C0\" strokeWidth=\"1.5\">\n\t\t\t\t\t\t<path d=\"M8 8l10 10m0-10L8 18\" />\n\t\t\t\t\t</g>\n\t\t\t\t</g>\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n"]}