@layers-app/shared 0.4.7 → 0.4.8

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 (378) 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/AttachmentsGalleryContext.d.ts +0 -2
  21. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
  22. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +17 -22
  23. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
  24. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +120 -172
  26. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  27. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -32
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  31. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +22 -20
  32. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
  33. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  34. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
  35. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  36. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
  37. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  38. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  39. package/dist/components/Chat/ChatInput/index.js +264 -164
  40. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  41. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  42. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  43. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  44. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  45. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  46. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  47. package/dist/components/Chat/ChatMessage/index.js +153 -118
  48. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  49. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  50. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  51. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  52. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  53. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  54. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  55. package/dist/components/Chat/MessageActions/index.js +188 -50
  56. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  57. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  58. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  59. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  60. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  61. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  62. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  63. package/dist/components/Chat/MessageList/index.js +201 -149
  64. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  65. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
  66. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  67. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
  68. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  69. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  70. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  71. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  72. package/dist/components/ColorPicker/ColorPickerList.js +83 -72
  73. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  74. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  75. package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
  76. package/dist/components/ColorPicker/icons.js +5 -5
  77. package/dist/components/ColorPicker/types.d.ts +6 -0
  78. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  79. package/dist/components/ColorPicker/types.js +53 -11
  80. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  81. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  82. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  83. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  84. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  85. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  86. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  87. package/dist/components/CommentComposer/index.d.ts +1 -1
  88. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  89. package/dist/components/CommentComposer/index.js +70 -68
  90. package/dist/components/CommentComposer/types.d.ts +6 -0
  91. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  92. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  93. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  94. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  95. package/dist/components/CustomKBD/index.js +21 -22
  96. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  97. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  98. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  99. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  100. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  101. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  102. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  103. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  104. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  105. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  106. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  107. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  108. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  109. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  110. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  111. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  112. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  113. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  114. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  115. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  116. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  117. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  118. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  119. package/dist/components/Loaders/styles.module.css.js +6 -6
  120. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  121. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  122. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  123. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  124. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  125. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  126. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  127. package/dist/components/Notification/InfiniteScroll.js +42 -0
  128. package/dist/components/Notification/Notification.d.ts +4 -1
  129. package/dist/components/Notification/Notification.d.ts.map +1 -1
  130. package/dist/components/Notification/Notification.module.css.js +28 -4
  131. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  132. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  133. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  134. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  135. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  136. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  137. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  138. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  139. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  140. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  141. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  142. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  143. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  144. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  145. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  146. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  147. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  148. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  149. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  150. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  151. package/dist/components/Notification/atoms/index.d.ts +5 -0
  152. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  153. package/dist/components/Notification/hooks/index.d.ts +8 -0
  154. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  155. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  156. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  157. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  158. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  159. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  160. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  161. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  162. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  163. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  164. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  165. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  166. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  167. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  168. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  169. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  170. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  171. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  172. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  173. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  174. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  175. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  176. package/dist/components/Notification/lib/api.d.ts +4 -0
  177. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  178. package/dist/components/Notification/lib/api.js +19 -0
  179. package/dist/components/Notification/lib/index.d.ts +5 -0
  180. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  181. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  182. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  183. package/dist/components/Notification/lib/notificationText.js +131 -0
  184. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  185. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  186. package/dist/components/Notification/lib/stripHtml.js +6 -0
  187. package/dist/components/Notification/lib/types.d.ts +45 -0
  188. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  189. package/dist/components/Notification/lib/types.js +9 -0
  190. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  191. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  192. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  193. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  194. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  195. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  196. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  197. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  198. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  199. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  200. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  201. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  202. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  203. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  204. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  205. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  206. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  207. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  208. package/dist/components/Notification/molecules/index.d.ts +7 -0
  209. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  210. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  211. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  212. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  213. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  214. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  215. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  216. package/dist/components/Notification/organisms/index.d.ts +3 -0
  217. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  218. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  219. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  220. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  221. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  222. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  223. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  224. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  225. package/dist/components/table/FrontTable.d.ts.map +1 -1
  226. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  227. package/dist/config/envConfig.d.ts +2 -0
  228. package/dist/config/envConfig.d.ts.map +1 -1
  229. package/dist/config/envConfig.js +29 -28
  230. package/dist/helpers/getFileIcons.js +5 -5
  231. package/dist/helpers/getFileType.d.ts.map +1 -1
  232. package/dist/helpers/getFileType.js +11 -2
  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/index.css +1 -1
  239. package/dist/index.d.ts +0 -2
  240. package/dist/index.d.ts.map +1 -1
  241. package/dist/index.js +560 -571
  242. package/dist/lang/locales/ui_en.json.js +1 -1
  243. package/dist/lang/locales/ui_es.json.js +1 -1
  244. package/dist/lang/locales/ui_ru.json.js +1 -1
  245. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  246. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  247. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  248. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  249. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  250. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  251. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  252. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  253. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  254. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  255. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  256. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  257. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  258. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  259. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  260. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  261. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  262. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  263. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  264. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  265. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  266. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  267. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  268. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  269. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  270. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  271. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  272. package/docs/README.md +499 -499
  273. package/package.json +80 -79
  274. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +0 -15
  275. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +0 -1
  276. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +0 -36
  277. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +0 -14
  278. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +0 -1
  279. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +0 -31
  280. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +0 -18
  281. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +0 -1
  282. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +0 -35
  283. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +0 -33
  284. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +0 -1
  285. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +0 -70
  286. package/dist/components/Notification/Notification.js +0 -119
  287. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  288. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  289. package/dist/components/Notification/NotificationCard.js +0 -93
  290. package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -24
  291. package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +0 -1
  292. package/dist/components/VideoPlayer/VideoPlayer.js +0 -727
  293. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +0 -8
  294. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +0 -1
  295. package/dist/components/VideoPlayer/components/MobileDrawer/index.js +0 -67
  296. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +0 -7
  297. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +0 -1
  298. package/dist/components/VideoPlayer/components/SelectListOptionButton.js +0 -44
  299. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +0 -9
  300. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +0 -1
  301. package/dist/components/VideoPlayer/components/StoryboardPreview.js +0 -38
  302. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +0 -33
  303. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +0 -1
  304. package/dist/components/VideoPlayer/components/VideoCustomControls.js +0 -601
  305. package/dist/components/VideoPlayer/components/VideoIcons.d.ts +0 -25
  306. package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +0 -1
  307. package/dist/components/VideoPlayer/components/VideoIcons.js +0 -145
  308. package/dist/components/VideoPlayer/components/VideoMenu.d.ts +0 -27
  309. package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +0 -1
  310. package/dist/components/VideoPlayer/components/VideoMenu.js +0 -77
  311. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +0 -17
  312. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +0 -1
  313. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +0 -289
  314. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +0 -10
  315. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +0 -1
  316. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +0 -55
  317. package/dist/components/VideoPlayer/components/VideoSelect.d.ts +0 -10
  318. package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +0 -1
  319. package/dist/components/VideoPlayer/components/VideoSelect.js +0 -168
  320. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +0 -12
  321. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +0 -1
  322. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +0 -48
  323. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +0 -25
  324. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +0 -1
  325. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +0 -384
  326. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +0 -21
  327. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +0 -1
  328. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +0 -264
  329. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +0 -10
  330. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +0 -1
  331. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +0 -39
  332. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +0 -14
  333. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +0 -1
  334. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +0 -360
  335. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +0 -16
  336. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +0 -1
  337. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +0 -14
  338. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +0 -1
  339. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +0 -4
  340. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +0 -1
  341. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +0 -14
  342. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +0 -22
  343. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +0 -1
  344. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +0 -211
  345. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +0 -11
  346. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +0 -1
  347. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +0 -41
  348. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +0 -10
  349. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +0 -1
  350. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +0 -69
  351. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +0 -21
  352. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +0 -1
  353. package/dist/components/VideoPlayer/hooks/useStoryboard.js +0 -91
  354. package/dist/components/VideoPlayer/index.d.ts +0 -11
  355. package/dist/components/VideoPlayer/index.d.ts.map +0 -1
  356. package/dist/components/VideoPlayer/types.d.ts +0 -101
  357. package/dist/components/VideoPlayer/types.d.ts.map +0 -1
  358. package/dist/components/VideoPlayer/utils/chapters.d.ts +0 -8
  359. package/dist/components/VideoPlayer/utils/chapters.d.ts.map +0 -1
  360. package/dist/components/VideoPlayer/utils/chapters.js +0 -38
  361. package/dist/components/VideoPlayer/utils/storyboard.d.ts +0 -5
  362. package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +0 -1
  363. package/dist/components/VideoPlayer/utils/storyboard.js +0 -47
  364. package/dist/components/VideoPlayer/utils/subtitles.d.ts +0 -18
  365. package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +0 -1
  366. package/dist/components/VideoPlayer/utils/subtitles.js +0 -23
  367. package/dist/components/VideoPlayer/utils/touch.d.ts +0 -3
  368. package/dist/components/VideoPlayer/utils/touch.d.ts.map +0 -1
  369. package/dist/components/VideoPlayer/utils/touch.js +0 -5
  370. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +0 -10
  371. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +0 -1
  372. package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +0 -22
  373. package/dist/components/VideoPlayer/utils/videoSettings.d.ts +0 -69
  374. package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +0 -1
  375. package/dist/components/VideoPlayer/utils/videoSettings.js +0 -90
  376. package/dist/videoSettings/createVideoSettingsDataSource.d.ts +0 -19
  377. package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +0 -1
  378. package/dist/videoSettings/createVideoSettingsDataSource.js +0 -127
@@ -0,0 +1,49 @@
1
+ import { useCallback as d, useEffect as L, useRef as M } from "react";
2
+ import { useNotificationStore as n, getActiveSourceValues as p } from "./useNotificationStore.js";
3
+ import { useNotificationsApi as P } from "./useNotificationsApi.js";
4
+ const A = 20;
5
+ function T(e) {
6
+ const a = P(), c = n((t) => t.tab), r = n((t) => t.unreadOnly), s = n((t) => t.activeSources), g = n((t) => t.page), y = n((t) => t.loading), f = n((t) => t.hasMore), N = n((t) => t.refreshTrigger), C = n((t) => t.setNotifications), x = n((t) => t.appendNotifications), u = n((t) => t.setUnreadCounts), h = n((t) => t.setLoading), m = n((t) => t.nextPage), i = d(
7
+ async (t) => {
8
+ h(!0);
9
+ try {
10
+ const b = p(s), o = await a.fetchNotifications(
11
+ c,
12
+ t,
13
+ A,
14
+ r,
15
+ b,
16
+ e || void 0
17
+ );
18
+ t === 0 ? C(o.data.notifications, o.pagination.totalElements) : x(o.data.notifications, o.pagination.totalElements), u({ all: o.data.unreadCount, mentions: o.data.unreadMentions });
19
+ } catch {
20
+ } finally {
21
+ h(!1);
22
+ }
23
+ },
24
+ [a, c, r, s, e]
25
+ );
26
+ L(() => {
27
+ i(0);
28
+ }, [c, r, s, e, N]);
29
+ const l = M(!1), E = d(() => {
30
+ if (l.current || !f) return;
31
+ l.current = !0;
32
+ const t = g + 1;
33
+ m(), i(t).finally(() => {
34
+ l.current = !1;
35
+ });
36
+ }, [f, g, m, i]), S = d(async () => {
37
+ try {
38
+ const t = p(s);
39
+ u(
40
+ await a.fetchCounts(e || void 0, t)
41
+ );
42
+ } catch {
43
+ }
44
+ }, [a, e, s, u]);
45
+ return { loadPage: i, handleLoadMore: E, refreshCounts: S, loading: y, hasMore: f };
46
+ }
47
+ export {
48
+ T as useInboxLoader
49
+ };
@@ -0,0 +1,26 @@
1
+ import type { NotificationDTO, NotificationVariant } from '../lib/types';
2
+ export declare function useNotificationItem(n: NotificationDTO): {
3
+ resolved: string | null;
4
+ variant: NotificationVariant;
5
+ isUser: boolean;
6
+ actorName: string;
7
+ verb: string;
8
+ source: string;
9
+ sourceKey: string | null;
10
+ time: string;
11
+ statusValue: string | null;
12
+ statusOldValue: string | null;
13
+ taskKey: string | null;
14
+ commentPreview: string | null;
15
+ objectName: string;
16
+ systemTitle: string | null;
17
+ showInvitationActor: boolean;
18
+ fallbackUser: {
19
+ id: string;
20
+ avatar: string | null;
21
+ name: string | null;
22
+ } | null;
23
+ statusFirst: boolean;
24
+ tailConnector: string;
25
+ };
26
+ //# sourceMappingURL=useNotificationItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/hooks/useNotificationItem.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAoBzE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;EAuIrD"}
@@ -0,0 +1,51 @@
1
+ import { useTranslation as U } from "react-i18next";
2
+ import { IconEntity as G } from "../../ProjectIcon/ProjectIcon.js";
3
+ import { useAppContainerDataStore as x } from "../../AppContainer/hooks/useAppContainerDataStore.js";
4
+ import { resolveNotificationType as F, getNotificationVerbSelf as $, getNotificationVerb as Y, getSourceLabel as B, getSourceKey as W, getSystemMessage as X } from "../lib/notificationText.js";
5
+ import { stripHtml as q } from "../lib/stripHtml.js";
6
+ import { useNotificationTime as z } from "./useNotificationTime.js";
7
+ function J(e) {
8
+ const o = e || "";
9
+ return o.includes("WORKSPACE_CREATED") ? "system-success" : o.includes("INVITATION_ACCEPTED") ? "system-invitation-accepted" : o.includes("INVITATION_DECLINED") ? "system-invitation-declined" : o.includes("WORKSPACE_DELETED") ? "system-alert" : o === "MISSED_CALL" ? "system-call-missed" : o.includes("SUBSCRIPTION") || o.includes("EXPIRE") ? "system-warning" : "user-action";
10
+ }
11
+ function De(e) {
12
+ const { t: o } = U("appContainer"), r = x((n) => n.user), v = z(), t = F(e.notificationType), A = J(t), E = A === "user-action", D = !e.actorUserId || e.actorUserId === r.id, _ = D ? "" : e.actorName || o("inbox.actor.someone"), c = e.params?.reaction || "", d = c.includes("=") && G.parse(c)?.emoji || c, N = d ? { emoji: d } : void 0, O = D ? $(o, e.notificationType, N) : Y(o, e.notificationType, N), M = B(o, e.notificationType, e.link ?? e.parentId), P = W(e.notificationType, e.link ?? e.parentId), b = v(e.createdAt), l = t === "ACCESS_GRANTED" || t === "ACCESS_REVOKED" || t === "INVITATION_ACCEPTED_BY", C = (n) => {
13
+ const a = `inbox.role.${n}`, i = o(a, { defaultValue: n });
14
+ return i === a ? n : i;
15
+ }, T = t === "TASK_TIME_ESTIMATE_ADDED", m = t === "TASK_TIME_ESTIMATE_CHANGED", S = (n) => {
16
+ if (!n) return null;
17
+ const a = Number(n);
18
+ if (!Number.isFinite(a) || a <= 0) return null;
19
+ const i = a / 60;
20
+ return i >= 1 ? i % 1 === 0 ? `${i}h` : `${i.toFixed(1)}h` : `${Math.round(a)}m`;
21
+ }, p = t === "TASK_TIME_ESTIMATE_REMOVED" || (t === "TASK_START_DATE_REMOVED" || t === "TASK_DUE_DATE_REMOVED") || t === "TASK_PARENT_REMOVED" ? null : e.params?.newValue || null, f = e.params?.oldValue || null, u = l ? e.params?.role || null : T || m ? S(p) : p, K = l && u ? C(u) : u, I = t === "TASK_START_DATE_CHANGED" || t === "TASK_DUE_DATE_CHANGED", R = t === "TASK_START_DATE_ADDED" || t === "TASK_DUE_DATE_ADDED", V = I || m ? m ? S(f) : f : null, g = o(l ? "inbox.asConnector" : "inbox.statusConnector"), h = e.params?.taskKey || null, y = (t === "TASK_COMMENT_ADDED" || t === "PAGE_COMMENT_ADDED" || t === "COMMENT_REPLIED") && e.params?.commentPreview || "", w = y && q(y) || null, k = t === "COMMENT_RESOLVED" || t === "COMMENT_REACTION_ADDED" || t === "MISSED_CALL" || t === "CHANNEL_ADDED" ? "" : e.objectName || "", s = {};
22
+ e.objectName && (s.role = e.objectName, s.channel = e.objectName, s.workspace = e.objectName), e.params?.role && (s.role = C(e.params.role)), e.params?.actor ? s.actor = e.params.actor : e.actorName && (s.actor = e.actorName);
23
+ const L = E ? null : X(
24
+ o,
25
+ e.notificationType,
26
+ Object.keys(s).length ? s : void 0
27
+ ) || e.notificationType || "", j = !E && !!_ && !!(t?.includes("INVITATION_ACCEPTED") || t?.includes("INVITATION_DECLINED")), H = r.id ? { id: r.id, avatar: r.avatar || null, name: r.name || null } : null;
28
+ return {
29
+ resolved: t,
30
+ variant: A,
31
+ isUser: E,
32
+ actorName: _,
33
+ verb: O,
34
+ source: M,
35
+ sourceKey: P,
36
+ time: b,
37
+ statusValue: K,
38
+ statusOldValue: V,
39
+ taskKey: h,
40
+ commentPreview: w,
41
+ objectName: k,
42
+ systemTitle: L,
43
+ showInvitationActor: j,
44
+ fallbackUser: H,
45
+ statusFirst: t === "TASK_STATUS_CHANGED" || t === "TASK_TYPE_CHANGED" || t === "TASK_PRIORITY_CHANGED" || t === "TASK_PARENT_CHANGED" || I || R || T || m,
46
+ tailConnector: g
47
+ };
48
+ }
49
+ export {
50
+ De as useNotificationItem
51
+ };
@@ -0,0 +1,49 @@
1
+ import type { NotificationDTO, NotificationTab, SourceCategoryKey, UnreadCounts } from '../lib/types';
2
+ interface PerWorkspaceFilter {
3
+ activeSources: SourceCategoryKey[];
4
+ unreadOnly: boolean;
5
+ }
6
+ interface NotificationStore {
7
+ notifications: NotificationDTO[];
8
+ tab: NotificationTab;
9
+ unreadOnly: boolean;
10
+ activeSources: Set<SourceCategoryKey>;
11
+ unreadCounts: UnreadCounts;
12
+ page: number;
13
+ totalElements: number;
14
+ loading: boolean;
15
+ hasMore: boolean;
16
+ refreshTrigger: number;
17
+ currentWorkspaceId: string | null;
18
+ wsFilters: Record<string, PerWorkspaceFilter>;
19
+ setTab: (tab: NotificationTab) => void;
20
+ setUnreadOnly: (v: boolean) => void;
21
+ toggleSource: (key: SourceCategoryKey) => void;
22
+ setSources: (keys: SourceCategoryKey[]) => void;
23
+ setWorkspaceContext: (workspaceId: string) => void;
24
+ setNotifications: (items: NotificationDTO[], total: number) => void;
25
+ appendNotifications: (items: NotificationDTO[], total: number) => void;
26
+ setUnreadCounts: (counts: UnreadCounts) => void;
27
+ setLoading: (v: boolean) => void;
28
+ nextPage: () => void;
29
+ resetPage: () => void;
30
+ updateNotification: (id: number, patch: Partial<NotificationDTO>) => void;
31
+ removeNotification: (id: number) => void;
32
+ triggerRefresh: () => void;
33
+ }
34
+ export declare const useNotificationStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<NotificationStore>, "setState" | "persist"> & {
35
+ setState(partial: NotificationStore | Partial<NotificationStore> | ((state: NotificationStore) => NotificationStore | Partial<NotificationStore>), replace?: false | undefined): unknown;
36
+ setState(state: NotificationStore | ((state: NotificationStore) => NotificationStore), replace: true): unknown;
37
+ persist: {
38
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<NotificationStore, unknown, unknown>>) => void;
39
+ clearStorage: () => void;
40
+ rehydrate: () => Promise<void> | void;
41
+ hasHydrated: () => boolean;
42
+ onHydrate: (fn: (state: NotificationStore) => void) => () => void;
43
+ onFinishHydration: (fn: (state: NotificationStore) => void) => () => void;
44
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<NotificationStore, unknown, unknown>>;
45
+ };
46
+ }>;
47
+ export declare function getActiveSourceValues(sources: Set<SourceCategoryKey>): number[] | undefined;
48
+ export {};
49
+ //# sourceMappingURL=useNotificationStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationStore.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/hooks/useNotificationStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,MAAM,cAAc,CAAC;AAGtB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,GAAG,EAAE,eAAe,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAE9C,MAAM,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IACvC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,mBAAmB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,eAAe,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC1E,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AA+CD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EA8GhC,CAAC;AAQF,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,GAAG,CAAC,iBAAiB,CAAC,GAC9B,MAAM,EAAE,GAAG,SAAS,CAWtB"}
@@ -0,0 +1,139 @@
1
+ import { create as l } from "zustand";
2
+ import { persist as d, createJSONStorage as g } from "zustand/middleware";
3
+ import { NotificationSourceCategory as S } from "../lib/types.js";
4
+ const p = /* @__PURE__ */ new Set(["INVITATION_CREATED", "INVITATION_CREATE"]), E = /* @__PURE__ */ new Set([
5
+ "ROLE_CREATED",
6
+ "ROLE_ASSIGNED",
7
+ "ROLE_UPDATED",
8
+ "ROLE_DELETED"
9
+ ]);
10
+ function c(t) {
11
+ return t.filter((e) => !(e.objectName?.startsWith("_system.") || e.notificationType && p.has(e.notificationType) || !e.notificationType && e.title && E.has(e.title)));
12
+ }
13
+ const m = /* @__PURE__ */ new Set([
14
+ "PAGE",
15
+ "PROJECT",
16
+ "FORM",
17
+ "FLOW"
18
+ ]);
19
+ function h(t) {
20
+ return Array.isArray(t) ? t.filter(
21
+ (e) => typeof e == "string" && m.has(e)
22
+ ) : [];
23
+ }
24
+ function o(t) {
25
+ return t.currentWorkspaceId ? {
26
+ ...t.wsFilters,
27
+ [t.currentWorkspaceId]: {
28
+ activeSources: [...t.activeSources],
29
+ unreadOnly: t.unreadOnly
30
+ }
31
+ } : t.wsFilters;
32
+ }
33
+ const N = l()(
34
+ d(
35
+ (t) => ({
36
+ notifications: [],
37
+ tab: "ALL",
38
+ unreadOnly: !1,
39
+ activeSources: /* @__PURE__ */ new Set(),
40
+ unreadCounts: { all: 0, mentions: 0 },
41
+ page: 0,
42
+ totalElements: 0,
43
+ loading: !1,
44
+ hasMore: !0,
45
+ refreshTrigger: 0,
46
+ currentWorkspaceId: null,
47
+ wsFilters: {},
48
+ setTab: (e) => t({ tab: e, page: 0, notifications: [], hasMore: !0 }),
49
+ setUnreadOnly: (e) => t((r) => ({
50
+ unreadOnly: e,
51
+ wsFilters: o({ ...r, unreadOnly: e }),
52
+ page: 0,
53
+ notifications: [],
54
+ hasMore: !0
55
+ })),
56
+ toggleSource: (e) => t((r) => {
57
+ const i = new Set(r.activeSources);
58
+ return i.has(e) ? i.delete(e) : i.add(e), {
59
+ activeSources: i,
60
+ wsFilters: o({ ...r, activeSources: i }),
61
+ page: 0,
62
+ notifications: [],
63
+ hasMore: !0
64
+ };
65
+ }),
66
+ setSources: (e) => t((r) => {
67
+ const i = new Set(e);
68
+ return {
69
+ activeSources: i,
70
+ wsFilters: o({ ...r, activeSources: i }),
71
+ page: 0,
72
+ notifications: [],
73
+ hasMore: !0
74
+ };
75
+ }),
76
+ setWorkspaceContext: (e) => t((r) => {
77
+ if (r.currentWorkspaceId === e) return r;
78
+ const i = o(r), n = i[e];
79
+ return {
80
+ currentWorkspaceId: e,
81
+ wsFilters: i,
82
+ activeSources: new Set(h(n?.activeSources)),
83
+ unreadOnly: n?.unreadOnly ?? !1,
84
+ page: 0,
85
+ notifications: [],
86
+ hasMore: !0
87
+ };
88
+ }),
89
+ setNotifications: (e, r) => {
90
+ const i = c(e);
91
+ t({
92
+ notifications: i,
93
+ totalElements: r,
94
+ hasMore: e.length < r
95
+ });
96
+ },
97
+ appendNotifications: (e, r) => t((i) => {
98
+ const n = c(e), u = new Set(i.notifications.map((a) => a.id)), f = n.filter((a) => !u.has(a.id)), s = [...i.notifications, ...f];
99
+ return {
100
+ notifications: s,
101
+ totalElements: r,
102
+ hasMore: e.length > 0 && s.length < r
103
+ };
104
+ }),
105
+ setUnreadCounts: (e) => t({ unreadCounts: e }),
106
+ setLoading: (e) => t({ loading: e }),
107
+ nextPage: () => t((e) => ({ page: e.page + 1 })),
108
+ resetPage: () => t({ page: 0, notifications: [], hasMore: !0 }),
109
+ updateNotification: (e, r) => t((i) => ({
110
+ notifications: i.notifications.map(
111
+ (n) => n.id === e ? { ...n, ...r } : n
112
+ )
113
+ })),
114
+ removeNotification: (e) => t((r) => ({
115
+ notifications: r.notifications.filter((i) => i.id !== e),
116
+ totalElements: r.totalElements - 1
117
+ })),
118
+ triggerRefresh: () => t((e) => ({ refreshTrigger: e.refreshTrigger + 1 }))
119
+ }),
120
+ {
121
+ name: "inbox-filters",
122
+ version: 1,
123
+ storage: g(() => localStorage),
124
+ partialize: (t) => ({ wsFilters: t.wsFilters }),
125
+ migrate: (t, e) => ({ wsFilters: {} })
126
+ }
127
+ )
128
+ );
129
+ function I(t) {
130
+ if (t.size === 0) return;
131
+ const e = /* @__PURE__ */ new Set();
132
+ for (const r of t)
133
+ e.add(S[r]), r === "PROJECT" && (e.add(4), e.add(5));
134
+ return [...e];
135
+ }
136
+ export {
137
+ I as getActiveSourceValues,
138
+ N as useNotificationStore
139
+ };
@@ -0,0 +1,2 @@
1
+ export declare function useNotificationStream(enabled?: boolean, workspaceId?: string): void;
2
+ //# sourceMappingURL=useNotificationStream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationStream.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/hooks/useNotificationStream.ts"],"names":[],"mappings":"AAWA,wBAAgB,qBAAqB,CAAC,OAAO,UAAO,EAAE,WAAW,CAAC,EAAE,MAAM,QA4JzE"}
@@ -0,0 +1,86 @@
1
+ import { useRef as v, useEffect as g } from "react";
2
+ import { fetchUnreadCounts as U } from "../lib/api.js";
3
+ import { useNotificationStore as S, getActiveSourceValues as p } from "./useNotificationStore.js";
4
+ const w = "/v1/notifications/stream", A = 15e3, M = 1e4, O = 6e4;
5
+ function V(u = !0, t) {
6
+ const C = S((e) => e.setUnreadCounts), y = S((e) => e.triggerRefresh), a = S((e) => e.activeSources), L = S(
7
+ (e) => e.setWorkspaceContext
8
+ ), f = v(C), E = v(y), _ = v(t), h = v(a);
9
+ f.current = C, E.current = y, _.current = t, h.current = a, g(() => {
10
+ t && L(t);
11
+ }, [t, L]), g(() => {
12
+ if (!u) return;
13
+ let e = null, n, s, l = M, c = !1, r = !1;
14
+ const o = async () => {
15
+ if (!r)
16
+ try {
17
+ const i = p(h.current), m = await U(
18
+ _.current,
19
+ i
20
+ );
21
+ r || f.current(m);
22
+ } catch (i) {
23
+ console.warn("[NotificationStream] Failed to fetch counts:", i);
24
+ }
25
+ }, N = () => {
26
+ n || r || (n = setInterval(o, A));
27
+ }, T = () => {
28
+ n && (clearInterval(n), n = void 0);
29
+ }, R = () => {
30
+ if (!r) {
31
+ e && (e.close(), e = null);
32
+ try {
33
+ e = new EventSource(w, { withCredentials: !0 }), e.onopen = () => {
34
+ l = M, c = !1, T();
35
+ }, e.addEventListener("notification_created", () => {
36
+ o(), E.current();
37
+ }), e.addEventListener("badge_update", (i) => {
38
+ if (!r) {
39
+ if (h.current.size > 0) {
40
+ o();
41
+ return;
42
+ }
43
+ try {
44
+ const m = JSON.parse(i.data);
45
+ f.current({
46
+ all: m.allUnread ?? 0,
47
+ mentions: m.mentionsUnread ?? 0
48
+ });
49
+ } catch {
50
+ o();
51
+ }
52
+ }
53
+ }), e.onerror = () => {
54
+ e && (e.close(), e = null), !r && (c || (c = !0, o(), N()), s = setTimeout(() => {
55
+ R();
56
+ }, l), l = Math.min(l * 2, O));
57
+ };
58
+ } catch {
59
+ c = !0, N();
60
+ }
61
+ }
62
+ };
63
+ o(), R();
64
+ const d = () => {
65
+ document.visibilityState === "visible" && (o(), E.current(), (c || !e) && R());
66
+ };
67
+ return document.addEventListener("visibilitychange", d), window.addEventListener("focus", d), () => {
68
+ r = !0, e && (e.close(), e = null), s && clearTimeout(s), T(), document.removeEventListener("visibilitychange", d), window.removeEventListener("focus", d);
69
+ };
70
+ }, [u]), g(() => {
71
+ if (!u) return;
72
+ let e = !1;
73
+ return (async () => {
74
+ try {
75
+ const n = p(a), s = await U(t, n);
76
+ e || f.current(s);
77
+ } catch {
78
+ }
79
+ })(), () => {
80
+ e = !0;
81
+ };
82
+ }, [u, t, a]);
83
+ }
84
+ export {
85
+ V as useNotificationStream
86
+ };
@@ -0,0 +1,2 @@
1
+ export declare function useNotificationTime(): (dateStr: string) => string;
2
+ //# sourceMappingURL=useNotificationTime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationTime.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/hooks/useNotificationTime.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,IAAI,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAyBjE"}
@@ -0,0 +1,23 @@
1
+ import { useCallback as c } from "react";
2
+ import { useTranslation as f } from "react-i18next";
3
+ function h() {
4
+ const { t, i18n: o } = f("appContainer");
5
+ return c(
6
+ (u) => {
7
+ const e = new Date(u), i = /* @__PURE__ */ new Date(), r = i.getTime() - e.getTime(), n = Math.floor(r / 6e4), a = Math.floor(r / 36e5);
8
+ if (n < 1) return t("inbox.time.justNow");
9
+ if (n < 60) return t("inbox.time.minutesAgo", { count: n });
10
+ if (a < 24) return t("inbox.time.hoursAgo", { count: a });
11
+ const s = o.language === "ru" ? "ru-RU" : "en-US", m = e.getFullYear() === i.getFullYear();
12
+ return new Intl.DateTimeFormat(s, {
13
+ day: "numeric",
14
+ month: "short",
15
+ ...m ? {} : { year: "numeric" }
16
+ }).format(e);
17
+ },
18
+ [t, o.language]
19
+ );
20
+ }
21
+ export {
22
+ h as useNotificationTime
23
+ };
@@ -0,0 +1,25 @@
1
+ import type { NotificationsResponse, NotificationTab, UnreadCounts } from '../lib/types';
2
+ declare function fetchNotifications(tab: NotificationTab, page: number, size: number, unreadOnly: boolean, sources?: number[], workspaceId?: string): Promise<NotificationsResponse>;
3
+ declare function fetchCounts(workspaceId?: string, sources?: number[]): Promise<UnreadCounts>;
4
+ declare function markAsRead(ids: number[]): Promise<unknown>;
5
+ declare function markAsUnread(ids: number[]): Promise<unknown>;
6
+ declare function markAllAsRead(): Promise<unknown>;
7
+ declare function archiveIds(ids: number[]): Promise<unknown>;
8
+ declare function unarchiveIds(ids: number[]): Promise<unknown>;
9
+ declare function archiveAll(): Promise<unknown>;
10
+ declare function archiveRead(): Promise<unknown>;
11
+ declare const api: {
12
+ readonly fetchNotifications: typeof fetchNotifications;
13
+ readonly fetchCounts: typeof fetchCounts;
14
+ readonly markAsRead: typeof markAsRead;
15
+ readonly markAsUnread: typeof markAsUnread;
16
+ readonly markAllAsRead: typeof markAllAsRead;
17
+ readonly archiveIds: typeof archiveIds;
18
+ readonly unarchiveIds: typeof unarchiveIds;
19
+ readonly archiveAll: typeof archiveAll;
20
+ readonly archiveRead: typeof archiveRead;
21
+ };
22
+ export type NotificationsApi = typeof api;
23
+ export declare function useNotificationsApi(): NotificationsApi;
24
+ export {};
25
+ //# sourceMappingURL=useNotificationsApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationsApi.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/hooks/useNotificationsApi.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACb,MAAM,cAAc,CAAC;AAEtB,iBAAS,kBAAkB,CACzB,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,OAAO,EACnB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAchC;AAED,iBAAS,WAAW,CAClB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,YAAY,CAAC,CAEvB;AAED,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,oBAKhC;AAED,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,oBAKlC;AAED,iBAAS,aAAa,qBAErB;AAED,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,oBAKhC;AAED,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,oBAKlC;AAED,iBAAS,UAAU,qBAElB;AAED,iBAAS,WAAW,qBAEnB;AAED,QAAA,MAAM,GAAG;;;;;;;;;;CAUC,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,CAAC;AAE1C,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD"}
@@ -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"}