@layers-app/shared 0.4.7 → 0.4.9

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 (278) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  5. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  6. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  7. package/dist/components/AppContainer/AppContainer.js +76 -71
  8. package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
  9. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  11. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  13. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  14. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
  17. package/dist/components/AppContainer/types.d.ts +12 -0
  18. package/dist/components/AppContainer/types.d.ts.map +1 -1
  19. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  20. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  21. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +59 -52
  22. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  23. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +1 -0
  24. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +16 -15
  26. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +22 -22
  27. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
  31. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
  32. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  33. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
  34. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  35. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
  36. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  37. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  38. package/dist/components/Chat/ChatInput/index.js +264 -164
  39. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  40. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  41. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  42. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  43. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  44. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  45. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  46. package/dist/components/Chat/ChatMessage/index.js +153 -118
  47. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  48. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  49. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  50. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  51. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  52. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  53. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  54. package/dist/components/Chat/MessageActions/index.js +188 -50
  55. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  56. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  57. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  58. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  59. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  60. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  61. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  62. package/dist/components/Chat/MessageList/index.js +201 -149
  63. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  64. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
  65. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  66. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
  67. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  68. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  69. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  70. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  71. package/dist/components/ColorPicker/ColorPickerList.js +83 -72
  72. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  73. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  74. package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
  75. package/dist/components/ColorPicker/icons.js +5 -5
  76. package/dist/components/ColorPicker/types.d.ts +6 -0
  77. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  78. package/dist/components/ColorPicker/types.js +53 -11
  79. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  80. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  81. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  82. package/dist/components/CommentComposer/CommentComposer.module.css.js +14 -10
  83. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  84. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  85. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  86. package/dist/components/CommentComposer/index.d.ts +2 -1
  87. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  88. package/dist/components/CommentComposer/index.js +333 -313
  89. package/dist/components/CommentComposer/types.d.ts +10 -0
  90. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  91. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  92. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  93. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  94. package/dist/components/CustomKBD/index.js +21 -22
  95. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  96. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  97. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  98. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  99. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  100. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  101. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  102. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  103. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  104. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  105. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  106. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  107. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  108. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  109. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  110. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  111. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  112. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  113. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  114. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  115. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  116. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  117. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  118. package/dist/components/Loaders/styles.module.css.js +6 -6
  119. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  120. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  121. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  122. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  123. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  124. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  125. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  126. package/dist/components/Notification/InfiniteScroll.js +42 -0
  127. package/dist/components/Notification/Notification.d.ts +4 -1
  128. package/dist/components/Notification/Notification.d.ts.map +1 -1
  129. package/dist/components/Notification/Notification.module.css.js +28 -4
  130. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  131. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  132. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  133. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  134. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  135. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  136. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  137. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  138. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  139. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  140. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  141. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  142. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  143. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  144. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  145. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  146. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  147. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  148. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  149. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  150. package/dist/components/Notification/atoms/index.d.ts +5 -0
  151. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  152. package/dist/components/Notification/hooks/index.d.ts +8 -0
  153. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  154. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  155. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  156. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  157. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  158. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  159. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  160. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  161. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  162. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  163. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  164. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  165. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  166. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  167. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  168. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  169. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  170. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  171. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  172. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  173. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  174. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  175. package/dist/components/Notification/lib/api.d.ts +4 -0
  176. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  177. package/dist/components/Notification/lib/api.js +19 -0
  178. package/dist/components/Notification/lib/index.d.ts +5 -0
  179. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  180. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  181. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  182. package/dist/components/Notification/lib/notificationText.js +131 -0
  183. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  184. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  185. package/dist/components/Notification/lib/stripHtml.js +6 -0
  186. package/dist/components/Notification/lib/types.d.ts +45 -0
  187. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  188. package/dist/components/Notification/lib/types.js +9 -0
  189. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  190. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  191. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  192. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  193. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  194. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  195. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  196. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  197. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  198. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  199. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  200. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  201. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  202. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  203. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  204. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  205. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  206. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  207. package/dist/components/Notification/molecules/index.d.ts +7 -0
  208. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  209. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  210. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  211. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  212. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  213. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  214. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  215. package/dist/components/Notification/organisms/index.d.ts +3 -0
  216. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  217. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  218. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  219. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  220. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  221. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  222. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  223. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  224. package/dist/components/table/FrontTable.d.ts.map +1 -1
  225. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  226. package/dist/config/envConfig.d.ts +2 -0
  227. package/dist/config/envConfig.d.ts.map +1 -1
  228. package/dist/config/envConfig.js +29 -28
  229. package/dist/helpers/getFileIcons.js +5 -5
  230. package/dist/helpers/getFileType.d.ts +1 -1
  231. package/dist/helpers/getFileType.d.ts.map +1 -1
  232. package/dist/helpers/getFileType.js +11 -1
  233. package/dist/helpers/platform.d.ts +1 -1
  234. package/dist/helpers/platform.d.ts.map +1 -1
  235. package/dist/helpers/platform.js +1 -0
  236. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  237. package/dist/helpers/showNotifications.module.css.js +1 -1
  238. package/dist/hooks/useDateUtils.d.ts +3 -1
  239. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  240. package/dist/hooks/useDateUtils.js +23 -18
  241. package/dist/index.css +1 -1
  242. package/dist/index.js +595 -588
  243. package/dist/lang/locales/ui_en.json.js +9 -7
  244. package/dist/lang/locales/ui_es.json.js +6 -4
  245. package/dist/lang/locales/ui_ru.json.js +8 -6
  246. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  247. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  248. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  249. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  250. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  251. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  252. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  253. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  254. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  255. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  256. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  257. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  258. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  259. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  260. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  261. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  262. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  263. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  264. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  265. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  266. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  267. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  268. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  269. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  270. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  271. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  272. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  273. package/docs/README.md +499 -499
  274. package/package.json +81 -79
  275. package/dist/components/Notification/Notification.js +0 -119
  276. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  277. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  278. package/dist/components/Notification/NotificationCard.js +0 -93
@@ -0,0 +1,64 @@
1
+ import { useMemo as s } from "react";
2
+ import { apiFetch as n, fetchUnreadCounts as d } from "../lib/api.js";
3
+ function u(i, t, a, c, r, e) {
4
+ const o = new URLSearchParams({
5
+ tab: i,
6
+ page: String(t),
7
+ size: String(a),
8
+ unreadOnly: String(c)
9
+ });
10
+ return r?.length && r.forEach((f) => o.append("sources", String(f))), e && o.set("workspaceId", e), n(`/v1/notifications?${o}`);
11
+ }
12
+ function h(i, t) {
13
+ return d(i, t);
14
+ }
15
+ function m(i) {
16
+ return n("/v1/notifications/read", {
17
+ method: "PATCH",
18
+ body: JSON.stringify({ notificationIds: i })
19
+ });
20
+ }
21
+ function v(i) {
22
+ return n("/v1/notifications/unread", {
23
+ method: "PATCH",
24
+ body: JSON.stringify({ notificationIds: i })
25
+ });
26
+ }
27
+ function A() {
28
+ return n("/v1/notifications/readAll", { method: "PATCH" });
29
+ }
30
+ function g(i) {
31
+ return n("/v1/notifications/archive", {
32
+ method: "PATCH",
33
+ body: JSON.stringify({ notificationIds: i })
34
+ });
35
+ }
36
+ function l(i) {
37
+ return n("/v1/notifications/unarchive", {
38
+ method: "PATCH",
39
+ body: JSON.stringify({ notificationIds: i })
40
+ });
41
+ }
42
+ function p() {
43
+ return n("/v1/notifications/archiveAll", { method: "PATCH" });
44
+ }
45
+ function y() {
46
+ return n("/v1/notifications/archiveRead", { method: "PATCH" });
47
+ }
48
+ const C = {
49
+ fetchNotifications: u,
50
+ fetchCounts: h,
51
+ markAsRead: m,
52
+ markAsUnread: v,
53
+ markAllAsRead: A,
54
+ archiveIds: g,
55
+ unarchiveIds: l,
56
+ archiveAll: p,
57
+ archiveRead: y
58
+ };
59
+ function H() {
60
+ return s(() => C, []);
61
+ }
62
+ export {
63
+ H as useNotificationsApi
64
+ };
@@ -0,0 +1,4 @@
1
+ import type { UnreadCounts } from './types';
2
+ export declare function apiFetch<T>(url: string, options?: RequestInit): Promise<T>;
3
+ export declare function fetchUnreadCounts(workspaceId?: string, sources?: number[]): Promise<UnreadCounts>;
4
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAsB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAQhF;AAED,wBAAsB,iBAAiB,CACrC,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,YAAY,CAAC,CAMvB"}
@@ -0,0 +1,19 @@
1
+ async function o(n, e) {
2
+ const t = await fetch(n, {
3
+ credentials: "include",
4
+ headers: { "Content-Type": "application/json" },
5
+ ...e
6
+ });
7
+ if (!t.ok) throw new Error(`${t.status} ${t.statusText}`);
8
+ return t.json();
9
+ }
10
+ async function r(n, e) {
11
+ const t = new URLSearchParams();
12
+ n && t.set("workspaceId", n), e?.length && e.forEach((a) => t.append("sources", String(a)));
13
+ const s = t.toString();
14
+ return o(`/v1/notifications/counts${s ? `?${s}` : ""}`);
15
+ }
16
+ export {
17
+ o as apiFetch,
18
+ r as fetchUnreadCounts
19
+ };
@@ -0,0 +1,5 @@
1
+ export * from './api';
2
+ export * from './stripHtml';
3
+ export * from './types';
4
+ export * from './notificationText';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { TFunction } from 'i18next';
2
+ export declare function resolveNotificationType(raw: string | null): string | null;
3
+ export declare function getNotificationVerb(t: TFunction, notificationType: string | null, params?: Record<string, string>): string;
4
+ export declare function getNotificationVerbSelf(t: TFunction, notificationType: string | null, params?: Record<string, string>): string;
5
+ export declare function getSystemMessage(t: TFunction, notificationType: string | null, params?: Record<string, string>): string | null;
6
+ export declare function getSourceLabel(t: TFunction, notificationType: string | number | null, storedLink?: string | null): string;
7
+ export declare function getSourceKey(notificationType: string | number | null, storedLink?: string | null): string | null;
8
+ export declare function isMention(notificationType: string | null): boolean;
9
+ export declare function buildNotificationLink(notificationType: string | null, objectId: string | null, parentId: string | null, wsAlias: string, storedLink?: string | null): string | null;
10
+ //# sourceMappingURL=notificationText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationText.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/notificationText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAYzC,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAMzE;AAED,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7E,MAAM,CAKR;AAED,wBAAgB,uBAAuB,CACrC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7E,MAAM,CAOR;AAED,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,SAAS,EACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,GAAG,IAAI,CAMf;AAmFD,wBAAgB,cAAc,CAC5B,CAAC,EAAE,SAAS,EACZ,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACxC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,CASR;AAED,wBAAgB,YAAY,CAC1B,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACxC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,SAAS,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAIlE;AAED,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAgCf"}
@@ -0,0 +1,131 @@
1
+ const D = {
2
+ PAGE_DELETE: "PAGE_DELETED",
3
+ PROJECT_DELETE: "PROJECT_DELETED",
4
+ PROJECTTASK_DELETE: "TASK_DELETED",
5
+ TASK_DELETE: "TASK_DELETED",
6
+ INVITATION_CREATE: "INVITATION_CREATED",
7
+ ACCESS_GRANT: "ACCESS_GRANTED",
8
+ ACCESS_REVOKE: "ACCESS_REVOKED"
9
+ };
10
+ function A(E) {
11
+ if (!E) return null;
12
+ if (D[E]) return D[E];
13
+ const T = E.replace(/_DESC$/, "");
14
+ return D[T] ? D[T] : E;
15
+ }
16
+ function S(E, T, t) {
17
+ const e = A(T);
18
+ if (!e) return "";
19
+ const r = E(`inbox.verb.${e}`, { ...t, defaultValue: "" });
20
+ return r === `inbox.verb.${e}` ? "" : r;
21
+ }
22
+ function u(E, T, t) {
23
+ const e = A(T);
24
+ if (!e) return "";
25
+ const r = `inbox.verbSelf.${e}`, _ = E(r, { ...t, defaultValue: "" });
26
+ return _ && _ !== r ? _ : S(E, T, t);
27
+ }
28
+ function O(E, T, t) {
29
+ const e = A(T);
30
+ if (!e) return null;
31
+ const r = `inbox.system.${e}`, _ = E(r, { ...t, defaultValue: "" });
32
+ return _ === r || !_ ? null : _;
33
+ }
34
+ const n = {
35
+ MENTION_IN_PAGE: "pages",
36
+ MENTION_IN_TASK: "projects",
37
+ MENTION_IN_COMMENT: "comments",
38
+ MENTION_IN_CHAT_CHANNEL: "chat",
39
+ MENTION_IN_CHAT_DM: "chat",
40
+ TASK_ASSIGNED: "projects",
41
+ TASK_UNASSIGNED: "projects",
42
+ TASK_DELETED: "projects",
43
+ TASK_RESTORED: "projects",
44
+ TASK_STATUS_CHANGED: "projects",
45
+ TASK_TYPE_CHANGED: "projects",
46
+ TASK_PRIORITY_CHANGED: "projects",
47
+ TASK_START_DATE_ADDED: "projects",
48
+ TASK_START_DATE_CHANGED: "projects",
49
+ TASK_START_DATE_REMOVED: "projects",
50
+ TASK_DUE_DATE_ADDED: "projects",
51
+ TASK_DUE_DATE_CHANGED: "projects",
52
+ TASK_DUE_DATE_REMOVED: "projects",
53
+ TASK_TIME_ESTIMATE_ADDED: "projects",
54
+ TASK_TIME_ESTIMATE_CHANGED: "projects",
55
+ TASK_TIME_ESTIMATE_REMOVED: "projects",
56
+ TASK_PARENT_CHANGED: "projects",
57
+ TASK_PARENT_REMOVED: "projects",
58
+ TASK_TITLE_CHANGED: "projects",
59
+ TASK_COMMENT_ADDED: "projects",
60
+ TASK_LIST_DELETED: "projects",
61
+ TASK_LIST_RESTORED: "projects",
62
+ PAGE_CREATED: "pages",
63
+ PAGE_DELETED: "pages",
64
+ PAGE_RESTORED: "pages",
65
+ PAGE_COMMENT_ADDED: "pages",
66
+ PROJECT_DELETED: "projects",
67
+ PROJECT_RESTORED: "projects",
68
+ FORM_DELETED: "forms",
69
+ FORM_RESTORED: "forms",
70
+ FLOW_DELETED: "flow",
71
+ FLOW_RESTORED: "flow",
72
+ INVITATION_CREATED: "workspace",
73
+ INVITATION_ACCEPTED_BY: "workspace",
74
+ INVITATION_DECLINED_BY: "workspace",
75
+ INVITATION_REVOKED: "workspace",
76
+ INVITATION_ROLE_CHANGED: "workspace",
77
+ INVITATION_ROLE_CHANGED_BY_OWNER: "workspace",
78
+ COMMENT_RESOLVED: "comments",
79
+ COMMENT_REPLIED: "comments",
80
+ ACCESS_GRANTED: "workspace",
81
+ ACCESS_REVOKED: "workspace",
82
+ CHANNEL_ADDED: "chat",
83
+ MISSED_CALL: "chat",
84
+ WORKSPACE_DELETED: "workspace",
85
+ WORKSPACE_CREATED: "workspace",
86
+ WORKSPACE_UPDATED: "workspace"
87
+ };
88
+ function N(E) {
89
+ return !E || typeof E != "string" ? null : E.includes("/pages/") ? "pages" : E.includes("/projects/") ? "projects" : E.includes("/forms/") ? "forms" : E.includes("/flow/") ? "flow" : E.includes("/connect/") ? "chat" : null;
90
+ }
91
+ const c = /* @__PURE__ */ new Set([
92
+ "ACCESS_GRANTED",
93
+ "ACCESS_REVOKED",
94
+ "COMMENT_REPLIED",
95
+ "COMMENT_RESOLVED",
96
+ "MENTION_IN_COMMENT",
97
+ "INVITATION_ROLE_CHANGED",
98
+ "INVITATION_ROLE_CHANGED_BY_OWNER"
99
+ ]);
100
+ function l(E, T, t) {
101
+ if (T == null) return "";
102
+ const e = A(String(T));
103
+ let r = e ? n[e] : null;
104
+ return e && c.has(e) && (r = N(t) ?? r), r ? E(`inbox.sourceLabel.${r}`, { defaultValue: r }) : "";
105
+ }
106
+ function C(E, T) {
107
+ if (E == null) return null;
108
+ const t = A(String(E));
109
+ let e = t ? n[t] : null;
110
+ return t && c.has(t) && (e = N(T) ?? e), e;
111
+ }
112
+ function I(E) {
113
+ return E ? A(E)?.startsWith("MENTION_") ?? !1 : !1;
114
+ }
115
+ function R(E, T, t, e, r) {
116
+ const _ = e ? `/${e}` : "", o = r && r.startsWith("/") ? r : t && t.startsWith("/") ? t : null;
117
+ if (o) return `${_}${o}`;
118
+ if (!T) return null;
119
+ const s = A(E);
120
+ return s ? s.startsWith("TASK_") || s === "MENTION_IN_TASK" ? t ? `${_}/projects/${t}/issues/${T}` : null : s.startsWith("PAGE") || s === "MENTION_IN_PAGE" ? `${_}/pages/${T}` : s.startsWith("PROJECT") ? `${_}/projects/${T}` : (s === "MENTION_IN_COMMENT" || s.startsWith("INVITATION") || s.startsWith("ACCESS"), null) : null;
121
+ }
122
+ export {
123
+ R as buildNotificationLink,
124
+ S as getNotificationVerb,
125
+ u as getNotificationVerbSelf,
126
+ C as getSourceKey,
127
+ l as getSourceLabel,
128
+ O as getSystemMessage,
129
+ I as isMention,
130
+ A as resolveNotificationType
131
+ };
@@ -0,0 +1,2 @@
1
+ export declare function stripHtml(html: string): string;
2
+ //# sourceMappingURL=stripHtml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripHtml.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/stripHtml.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C"}
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return !t || !t.includes("<") ? t : new DOMParser().parseFromString(t, "text/html").body.textContent?.trim() || "";
3
+ }
4
+ export {
5
+ e as stripHtml
6
+ };
@@ -0,0 +1,45 @@
1
+ export interface NotificationDTO {
2
+ id: number;
3
+ actorUserId: string | null;
4
+ actorName: string | null;
5
+ actorAvatarUrl: string | null;
6
+ notificationType: string | null;
7
+ link: string | null;
8
+ read: boolean;
9
+ archived: boolean;
10
+ objectId: string | null;
11
+ objectName: string | null;
12
+ parentId: string | null;
13
+ createdAt: string;
14
+ archivedAt: string | null;
15
+ priority: string | null;
16
+ notificationCategory: string | null;
17
+ params: Record<string, string> | null;
18
+ title: string | null;
19
+ }
20
+ export interface UnreadCounts {
21
+ all: number;
22
+ mentions: number;
23
+ }
24
+ export interface NotificationsResponse {
25
+ pagination: {
26
+ page: number;
27
+ size: number;
28
+ totalElements: number;
29
+ };
30
+ data: {
31
+ notifications: NotificationDTO[];
32
+ unreadCount: number;
33
+ unreadMentions: number;
34
+ };
35
+ }
36
+ export type NotificationTab = 'ALL' | 'MENTIONS' | 'ARCHIVE';
37
+ export declare const NotificationSourceCategory: {
38
+ readonly PAGE: 2;
39
+ readonly PROJECT: 3;
40
+ readonly FORM: 6;
41
+ readonly FLOW: 11;
42
+ };
43
+ export type SourceCategoryKey = keyof typeof NotificationSourceCategory;
44
+ export type NotificationVariant = 'user-action' | 'system-success' | 'system-info' | 'system-alert' | 'system-warning' | 'system-invitation-accepted' | 'system-invitation-declined' | 'system-call-missed' | 'system-channel-added';
45
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,IAAI,EAAE;QACJ,aAAa,EAAE,eAAe,EAAE,CAAC;QACjC,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,0BAA0B,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAC3B,aAAa,GACb,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,4BAA4B,GAC5B,4BAA4B,GAC5B,oBAAoB,GACpB,sBAAsB,CAAC"}
@@ -0,0 +1,9 @@
1
+ const o = {
2
+ PAGE: 2,
3
+ PROJECT: 3,
4
+ FORM: 6,
5
+ FLOW: 11
6
+ };
7
+ export {
8
+ o as NotificationSourceCategory
9
+ };
@@ -0,0 +1,8 @@
1
+ import type { NotificationTab } from '../lib/types';
2
+ interface InboxEmptyProps {
3
+ tab: NotificationTab;
4
+ caughtUp?: boolean;
5
+ }
6
+ export declare function InboxEmpty({ tab, caughtUp }: InboxEmptyProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=InboxEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InboxEmpty.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxEmpty.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,UAAU,eAAe;IACvB,GAAG,EAAE,eAAe,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAWD,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAe5D"}
@@ -0,0 +1,21 @@
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import { useTranslation as x } from "react-i18next";
3
+ import { Stack as f, Text as i } from "@mantine/core";
4
+ import { IconCheck as I, IconArchive as C, IconInbox as h, IconMail as y } from "@tabler/icons-react";
5
+ const t = "var(--mantine-color-gray-5)", s = {
6
+ ALL: /* @__PURE__ */ o(y, { size: 32, stroke: 1.5, color: t }),
7
+ MENTIONS: /* @__PURE__ */ o(h, { size: 32, stroke: 1.5, color: t }),
8
+ ARCHIVE: /* @__PURE__ */ o(C, { size: 32, stroke: 1.5, color: t }),
9
+ CAUGHT_UP: /* @__PURE__ */ o(I, { size: 32, stroke: 1.75, color: "var(--mantine-color-indigo-5)" })
10
+ };
11
+ function A({ tab: e, caughtUp: n }) {
12
+ const { t: r } = x("appContainer"), c = n ? "caughtUp" : e.toLowerCase(), l = r(`inbox.empty.${c}.title`), a = r(`inbox.empty.${c}.desc`), m = n ? s.CAUGHT_UP : s[e];
13
+ return /* @__PURE__ */ p(f, { gap: 10, align: "center", justify: "center", px: 10, style: { flex: 1, minHeight: 0 }, children: [
14
+ m,
15
+ /* @__PURE__ */ o(i, { fw: 600, fz: 16, lh: 1.55, ta: "center", c: "var(--mantine-color-text)", children: l }),
16
+ /* @__PURE__ */ o(i, { fz: 14, c: "gray.6", lh: 1.45, ta: "center", children: a })
17
+ ] });
18
+ }
19
+ export {
20
+ A as InboxEmpty
21
+ };
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SourceCategoryKey } from '../lib/types';
3
+ interface SourceItem {
4
+ key: SourceCategoryKey;
5
+ i18nKey: string;
6
+ icon: ReactNode | null;
7
+ }
8
+ interface InboxHeaderProps {
9
+ sourceItems: SourceItem[];
10
+ activeSources: Set<SourceCategoryKey>;
11
+ onToggleSource: (key: SourceCategoryKey) => void;
12
+ unreadOnly: boolean;
13
+ onUnreadOnlyChange: (value: boolean) => void;
14
+ }
15
+ export declare function InboxHeader({ sourceItems, activeSources, onToggleSource, unreadOnly, onUnreadOnlyChange, }: InboxHeaderProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=InboxHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InboxHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAItD,UAAU,UAAU;IAClB,GAAG,EAAE,iBAAiB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;CACxB;AAED,UAAU,gBAAgB;IACxB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,cAAc,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EAAE,aAAa,EAAE,cAAc,EAC1C,UAAU,EAAE,kBAAkB,GAC/B,EAAE,gBAAgB,2CAwDlB"}
@@ -0,0 +1,73 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { useTranslation as x } from "react-i18next";
3
+ import { Group as a, Text as s, Switch as f, Menu as i, ActionIcon as g } from "@mantine/core";
4
+ import { IconSettings as I, IconCheck as z } from "@tabler/icons-react";
5
+ import t from "../Notification.module.css.js";
6
+ function T({
7
+ sourceItems: p,
8
+ activeSources: c,
9
+ onToggleSource: d,
10
+ unreadOnly: m,
11
+ onUnreadOnlyChange: h
12
+ }) {
13
+ const { t: n } = x("appContainer"), w = c.size === 0;
14
+ return /* @__PURE__ */ r(a, { justify: "space-between", wrap: "nowrap", px: "md", py: "md", gap: "md", children: [
15
+ /* @__PURE__ */ e(s, { fw: 700, fz: 18, lh: 1.6, style: { whiteSpace: "nowrap" }, children: n("inbox.title") }),
16
+ /* @__PURE__ */ r(a, { gap: 10, wrap: "nowrap", align: "center", children: [
17
+ /* @__PURE__ */ r(a, { gap: 8, wrap: "nowrap", align: "center", children: [
18
+ /* @__PURE__ */ e(s, { fz: 14, lh: 1.45, c: "var(--mantine-color-text)", style: { whiteSpace: "nowrap" }, children: n("inbox.showUnread") }),
19
+ /* @__PURE__ */ e(
20
+ f,
21
+ {
22
+ size: "xs",
23
+ checked: m,
24
+ onChange: (o) => h(o.currentTarget.checked)
25
+ }
26
+ )
27
+ ] }),
28
+ /* @__PURE__ */ r(
29
+ i,
30
+ {
31
+ position: "bottom-end",
32
+ shadow: "md",
33
+ withinPortal: !1,
34
+ closeOnItemClick: !1,
35
+ classNames: { dropdown: t.inboxMenu, item: t.inboxMenuItem, label: t.inboxMenuLabel },
36
+ children: [
37
+ /* @__PURE__ */ e(i.Target, { children: /* @__PURE__ */ e(
38
+ g,
39
+ {
40
+ variant: "subtle",
41
+ size: 28,
42
+ radius: "md",
43
+ color: "gray",
44
+ "aria-label": n("inbox.sources"),
45
+ children: /* @__PURE__ */ e(I, { size: 18, stroke: 1.5 })
46
+ }
47
+ ) }),
48
+ /* @__PURE__ */ r(i.Dropdown, { w: 200, children: [
49
+ /* @__PURE__ */ e(i.Label, { children: n("inbox.sources") }),
50
+ p.map(({ key: o, i18nKey: b, icon: u }) => {
51
+ const l = w || c.has(o);
52
+ return /* @__PURE__ */ e(
53
+ i.Item,
54
+ {
55
+ leftSection: u,
56
+ rightSection: l ? /* @__PURE__ */ e(z, { size: 16, stroke: 1.75, color: "var(--mantine-color-indigo-5)" }) : null,
57
+ onClick: () => d(o),
58
+ className: l ? t.inboxMenuItemActive : void 0,
59
+ children: n(`inbox.sourceLabel.${b}`)
60
+ },
61
+ o
62
+ );
63
+ })
64
+ ] })
65
+ ]
66
+ }
67
+ )
68
+ ] })
69
+ ] });
70
+ }
71
+ export {
72
+ T as InboxHeader
73
+ };
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NotificationTab, UnreadCounts } from '../lib/types';
3
+ interface InboxTabsProps {
4
+ tab: NotificationTab;
5
+ onTabChange: (tab: NotificationTab) => void;
6
+ unreadCounts: UnreadCounts;
7
+ onMarkAllRead: () => void;
8
+ onArchiveAll: () => void;
9
+ onArchiveRead: () => void;
10
+ children: ReactNode;
11
+ isEmpty: boolean;
12
+ }
13
+ export declare function InboxTabs({ tab, onTabChange, unreadCounts, onMarkAllRead, onArchiveAll, onArchiveRead, children, isEmpty, }: InboxTabsProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=InboxTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InboxTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIlE,UAAU,cAAc;IACtB,GAAG,EAAE,eAAe,CAAC;IACrB,WAAW,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,SAAS,CAAC,EACxB,GAAG,EAAE,WAAW,EAAE,YAAY,EAC9B,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAC9D,EAAE,cAAc,2CA6ChB"}
@@ -0,0 +1,60 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { useTranslation as I } from "react-i18next";
3
+ import { Tabs as a, Stack as c, Group as g, Box as k, Menu as n, ActionIcon as v } from "@mantine/core";
4
+ import { IconDotsVertical as T, IconChecks as N, IconArchive as m } from "@tabler/icons-react";
5
+ import { TabBadge as h } from "../atoms/TabBadge.js";
6
+ import i from "../Notification.module.css.js";
7
+ function z({
8
+ tab: r,
9
+ onTabChange: d,
10
+ unreadCounts: l,
11
+ onMarkAllRead: b,
12
+ onArchiveAll: p,
13
+ onArchiveRead: x,
14
+ children: f,
15
+ isEmpty: u
16
+ }) {
17
+ const { t } = I("appContainer");
18
+ return /* @__PURE__ */ e(
19
+ a,
20
+ {
21
+ value: r,
22
+ onChange: (s) => s && d(s),
23
+ variant: "pills",
24
+ classNames: { list: i.tabsList, tab: i.tab },
25
+ style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" },
26
+ children: /* @__PURE__ */ o(c, { gap: 0, h: "100%", style: { minHeight: 0 }, children: [
27
+ /* @__PURE__ */ o(g, { justify: "space-between", wrap: "nowrap", gap: 0, px: "md", className: i.tabsBar, children: [
28
+ /* @__PURE__ */ o(a.List, { children: [
29
+ /* @__PURE__ */ e(a.Tab, { value: "ALL", rightSection: /* @__PURE__ */ e(h, { count: l.all, active: r === "ALL" }), children: t("inbox.tab.all") }),
30
+ /* @__PURE__ */ e(a.Tab, { value: "MENTIONS", rightSection: /* @__PURE__ */ e(h, { count: l.mentions, active: r === "MENTIONS" }), children: t("inbox.tab.mentions") }),
31
+ /* @__PURE__ */ e(k, { className: i.tabDivider }),
32
+ /* @__PURE__ */ e(a.Tab, { value: "ARCHIVE", children: t("inbox.tab.archive") })
33
+ ] }),
34
+ /* @__PURE__ */ o(
35
+ n,
36
+ {
37
+ position: "bottom-end",
38
+ shadow: "md",
39
+ withinPortal: !1,
40
+ closeOnItemClick: !0,
41
+ classNames: { dropdown: i.inboxMenu, item: i.inboxMenuItem },
42
+ children: [
43
+ /* @__PURE__ */ e(n.Target, { children: /* @__PURE__ */ e(v, { variant: "subtle", size: 28, radius: "md", color: "gray", mt: 4, children: /* @__PURE__ */ e(T, { size: 20, stroke: 1.5 }) }) }),
44
+ /* @__PURE__ */ o(n.Dropdown, { w: 200, children: [
45
+ /* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(N, { size: 16, stroke: 1.5 }), onClick: b, children: t("inbox.markAllRead") }),
46
+ /* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(m, { size: 16, stroke: 1.5 }), onClick: p, children: t("inbox.archiveAll") }),
47
+ /* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(m, { size: 16, stroke: 1.5 }), onClick: x, children: t("inbox.archiveRead") })
48
+ ] })
49
+ ]
50
+ }
51
+ )
52
+ ] }),
53
+ /* @__PURE__ */ e(c, { gap: 0, style: { flex: 1, minHeight: 0, justifyContent: u ? "center" : "flex-start" }, className: i.shrink, children: f })
54
+ ] })
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ z as InboxTabs
60
+ };
@@ -0,0 +1,9 @@
1
+ interface NotificationActionsProps {
2
+ read: boolean;
3
+ archived: boolean;
4
+ onToggleRead: (e: React.MouseEvent) => void;
5
+ onToggleArchive: (e: React.MouseEvent) => void;
6
+ }
7
+ export declare function NotificationActions({ read, archived, onToggleRead, onToggleArchive, }: NotificationActionsProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=NotificationActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationActions.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/NotificationActions.tsx"],"names":[],"mappings":"AASA,UAAU,wBAAwB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAChD;AAID,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,GAC9C,EAAE,wBAAwB,2CAwD1B"}
@@ -0,0 +1,64 @@
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { useTranslation as d } from "react-i18next";
3
+ import { UndoIcon as p } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as h } from "@hugeicons/react";
5
+ import { Flex as l, Tooltip as o, ActionIcon as n } from "@mantine/core";
6
+ import { ArchiveIcon as b } from "../atoms/ArchiveIcon.js";
7
+ import { MarkReadIcon as u } from "../atoms/MarkReadIcon.js";
8
+ const a = "var(--mantine-color-gray-6)";
9
+ function C({
10
+ read: e,
11
+ archived: c,
12
+ onToggleRead: s,
13
+ onToggleArchive: t
14
+ }) {
15
+ const { t: i } = d("appContainer");
16
+ return c ? /* @__PURE__ */ r(l, { gap: 2, style: { flexShrink: 0 }, children: /* @__PURE__ */ r(o, { label: i("inbox.unarchive"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
17
+ n,
18
+ {
19
+ variant: "subtle",
20
+ size: 28,
21
+ radius: "md",
22
+ color: "gray",
23
+ onClick: t,
24
+ "aria-label": i("inbox.unarchive"),
25
+ children: /* @__PURE__ */ r(
26
+ h,
27
+ {
28
+ icon: p,
29
+ size: 20,
30
+ color: a,
31
+ strokeWidth: 1.5
32
+ }
33
+ )
34
+ }
35
+ ) }) }) : /* @__PURE__ */ m(l, { gap: 2, style: { flexShrink: 0 }, children: [
36
+ /* @__PURE__ */ r(o, { label: i(e ? "inbox.markUnread" : "inbox.markRead"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
37
+ n,
38
+ {
39
+ variant: "subtle",
40
+ size: 28,
41
+ radius: "md",
42
+ color: "gray",
43
+ onClick: s,
44
+ "aria-label": i(e ? "inbox.markUnread" : "inbox.markRead"),
45
+ children: /* @__PURE__ */ r(u, { size: 20, color: a })
46
+ }
47
+ ) }),
48
+ /* @__PURE__ */ r(o, { label: i("inbox.archive"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
49
+ n,
50
+ {
51
+ variant: "subtle",
52
+ size: 28,
53
+ radius: "md",
54
+ color: "gray",
55
+ onClick: t,
56
+ "aria-label": i("inbox.archive"),
57
+ children: /* @__PURE__ */ r(b, { size: 20, color: a })
58
+ }
59
+ ) })
60
+ ] });
61
+ }
62
+ export {
63
+ C as NotificationActions
64
+ };
@@ -0,0 +1,17 @@
1
+ import type { NotificationVariant } from '../lib/types';
2
+ interface NotificationAvatarProps {
3
+ actorUserId: string | null;
4
+ actorName: string | null;
5
+ actorAvatarUrl: string | null;
6
+ variant: NotificationVariant;
7
+ notificationType: string | null;
8
+ fallbackUser: {
9
+ id: string;
10
+ avatar: string | null;
11
+ name: string | null;
12
+ } | null;
13
+ unread?: boolean;
14
+ }
15
+ export declare function NotificationAvatar({ actorUserId, actorName, actorAvatarUrl, variant, notificationType, fallbackUser, unread, }: NotificationAvatarProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=NotificationAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationAvatar.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/NotificationAvatar.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAChF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAaD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GACxF,EAAE,uBAAuB,2CAuBzB"}