stream-chat-react-native-core 5.25.0-beta.7 → 5.25.1-beta.1

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 (619) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +422 -393
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  4. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -2
  5. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  6. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +1 -4
  7. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  8. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  9. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  10. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  11. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  12. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  13. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  14. package/lib/commonjs/components/Message/Message.js +7 -7
  15. package/lib/commonjs/components/Message/Message.js.map +1 -1
  16. package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -1
  17. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +5 -5
  18. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  19. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  20. package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
  21. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  22. package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
  23. package/lib/commonjs/i18n/en.json +1 -1
  24. package/lib/commonjs/i18n/es.json +38 -38
  25. package/lib/commonjs/i18n/fr.json +38 -38
  26. package/lib/commonjs/i18n/he.json +38 -38
  27. package/lib/commonjs/i18n/hi.json +38 -38
  28. package/lib/commonjs/i18n/it.json +39 -39
  29. package/lib/commonjs/i18n/ja.json +39 -39
  30. package/lib/commonjs/i18n/ko.json +39 -39
  31. package/lib/commonjs/i18n/nl.json +39 -39
  32. package/lib/commonjs/i18n/ru.json +36 -36
  33. package/lib/commonjs/i18n/tr.json +36 -36
  34. package/lib/commonjs/icons/ArrowRight.js.map +1 -1
  35. package/lib/commonjs/icons/AtMentions.js.map +1 -1
  36. package/lib/commonjs/icons/Attach.js.map +1 -1
  37. package/lib/commonjs/icons/Audio.js.map +1 -1
  38. package/lib/commonjs/icons/CSV.js.map +1 -1
  39. package/lib/commonjs/icons/Camera.js.map +1 -1
  40. package/lib/commonjs/icons/Check.js.map +1 -1
  41. package/lib/commonjs/icons/CheckAll.js.map +1 -1
  42. package/lib/commonjs/icons/CheckSend.js.map +1 -1
  43. package/lib/commonjs/icons/CircleClose.js.map +1 -1
  44. package/lib/commonjs/icons/CirclePlus.js.map +1 -1
  45. package/lib/commonjs/icons/CircleRight.js.map +1 -1
  46. package/lib/commonjs/icons/Close.js.map +1 -1
  47. package/lib/commonjs/icons/Copy.js.map +1 -1
  48. package/lib/commonjs/icons/CurveLineLeftUp.js.map +1 -1
  49. package/lib/commonjs/icons/DOC.js.map +1 -1
  50. package/lib/commonjs/icons/DOCX.js.map +1 -1
  51. package/lib/commonjs/icons/Delete.js.map +1 -1
  52. package/lib/commonjs/icons/Down.js.map +1 -1
  53. package/lib/commonjs/icons/DownloadArrow.js.map +1 -1
  54. package/lib/commonjs/icons/DownloadCloud.js.map +1 -1
  55. package/lib/commonjs/icons/Edit.js.map +1 -1
  56. package/lib/commonjs/icons/Error.js.map +1 -1
  57. package/lib/commonjs/icons/Eye.js.map +1 -1
  58. package/lib/commonjs/icons/Flag.js.map +1 -1
  59. package/lib/commonjs/icons/Folder.js.map +1 -1
  60. package/lib/commonjs/icons/GenericFile.js.map +1 -1
  61. package/lib/commonjs/icons/GiphyIcon.js.map +1 -1
  62. package/lib/commonjs/icons/Grid.js.map +1 -1
  63. package/lib/commonjs/icons/Group.js.map +1 -1
  64. package/lib/commonjs/icons/HTML.js.map +1 -1
  65. package/lib/commonjs/icons/Imgur.js.map +1 -1
  66. package/lib/commonjs/icons/LOLReaction.js.map +1 -1
  67. package/lib/commonjs/icons/Lightning.js.map +1 -1
  68. package/lib/commonjs/icons/Link.js.map +1 -1
  69. package/lib/commonjs/icons/Logo.js.map +1 -1
  70. package/lib/commonjs/icons/LoveReaction.js.map +1 -1
  71. package/lib/commonjs/icons/MD.js.map +1 -1
  72. package/lib/commonjs/icons/MailOpen.js.map +1 -1
  73. package/lib/commonjs/icons/MenuPointHorizontal.js.map +1 -1
  74. package/lib/commonjs/icons/MenuPointVertical.js.map +1 -1
  75. package/lib/commonjs/icons/MessageFlag.js.map +1 -1
  76. package/lib/commonjs/icons/MessageIcon.js.map +1 -1
  77. package/lib/commonjs/icons/Mute.js.map +1 -1
  78. package/lib/commonjs/icons/Notification.js.map +1 -1
  79. package/lib/commonjs/icons/ODT.js.map +1 -1
  80. package/lib/commonjs/icons/PDF.js.map +1 -1
  81. package/lib/commonjs/icons/PPT.js.map +1 -1
  82. package/lib/commonjs/icons/PPTX.js.map +1 -1
  83. package/lib/commonjs/icons/Pause.js.map +1 -1
  84. package/lib/commonjs/icons/Picture.js.map +1 -1
  85. package/lib/commonjs/icons/Pin.js.map +1 -1
  86. package/lib/commonjs/icons/PinHeader.js.map +1 -1
  87. package/lib/commonjs/icons/Play.js.map +1 -1
  88. package/lib/commonjs/icons/RAR.js.map +1 -1
  89. package/lib/commonjs/icons/RTF.js.map +1 -1
  90. package/lib/commonjs/icons/Recorder.js.map +1 -1
  91. package/lib/commonjs/icons/Refresh.js.map +1 -1
  92. package/lib/commonjs/icons/SEVEN_Z.js.map +1 -1
  93. package/lib/commonjs/icons/Search.js.map +1 -1
  94. package/lib/commonjs/icons/SendRight.js.map +1 -1
  95. package/lib/commonjs/icons/SendUp.js.map +1 -1
  96. package/lib/commonjs/icons/Share.js.map +1 -1
  97. package/lib/commonjs/icons/ShareRightArrow.js.map +1 -1
  98. package/lib/commonjs/icons/Smile.js.map +1 -1
  99. package/lib/commonjs/icons/Sound.js.map +1 -1
  100. package/lib/commonjs/icons/TAR.js.map +1 -1
  101. package/lib/commonjs/icons/TXT.js.map +1 -1
  102. package/lib/commonjs/icons/ThreadReply.js.map +1 -1
  103. package/lib/commonjs/icons/ThumbsDownReaction.js.map +1 -1
  104. package/lib/commonjs/icons/ThumbsUpReaction.js.map +1 -1
  105. package/lib/commonjs/icons/Time.js.map +1 -1
  106. package/lib/commonjs/icons/Unknown.js.map +1 -1
  107. package/lib/commonjs/icons/Unpin.js.map +1 -1
  108. package/lib/commonjs/icons/User.js.map +1 -1
  109. package/lib/commonjs/icons/UserAdd.js.map +1 -1
  110. package/lib/commonjs/icons/UserAdmin.js.map +1 -1
  111. package/lib/commonjs/icons/UserDelete.js.map +1 -1
  112. package/lib/commonjs/icons/UserMinus.js.map +1 -1
  113. package/lib/commonjs/icons/Video.js.map +1 -1
  114. package/lib/commonjs/icons/Warning.js.map +1 -1
  115. package/lib/commonjs/icons/WutReaction.js.map +1 -1
  116. package/lib/commonjs/icons/XLS.js.map +1 -1
  117. package/lib/commonjs/icons/XLSX.js.map +1 -1
  118. package/lib/commonjs/icons/ZIP.js.map +1 -1
  119. package/lib/commonjs/icons/utils/base.js.map +1 -1
  120. package/lib/commonjs/version.json +1 -1
  121. package/lib/module/components/Channel/Channel.js +422 -393
  122. package/lib/module/components/Channel/Channel.js.map +1 -1
  123. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  124. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -2
  125. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  126. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +1 -4
  127. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  128. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  129. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  130. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  131. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  132. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  133. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  134. package/lib/module/components/Message/Message.js +7 -7
  135. package/lib/module/components/Message/Message.js.map +1 -1
  136. package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -1
  137. package/lib/module/components/MessageOverlay/MessageActionListItem.js +5 -5
  138. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  139. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  140. package/lib/module/contexts/chatContext/ChatContext.js +2 -2
  141. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  142. package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
  143. package/lib/module/i18n/en.json +1 -1
  144. package/lib/module/i18n/es.json +38 -38
  145. package/lib/module/i18n/fr.json +38 -38
  146. package/lib/module/i18n/he.json +38 -38
  147. package/lib/module/i18n/hi.json +38 -38
  148. package/lib/module/i18n/it.json +39 -39
  149. package/lib/module/i18n/ja.json +39 -39
  150. package/lib/module/i18n/ko.json +39 -39
  151. package/lib/module/i18n/nl.json +39 -39
  152. package/lib/module/i18n/ru.json +36 -36
  153. package/lib/module/i18n/tr.json +36 -36
  154. package/lib/module/icons/ArrowRight.js.map +1 -1
  155. package/lib/module/icons/AtMentions.js.map +1 -1
  156. package/lib/module/icons/Attach.js.map +1 -1
  157. package/lib/module/icons/Audio.js.map +1 -1
  158. package/lib/module/icons/CSV.js.map +1 -1
  159. package/lib/module/icons/Camera.js.map +1 -1
  160. package/lib/module/icons/Check.js.map +1 -1
  161. package/lib/module/icons/CheckAll.js.map +1 -1
  162. package/lib/module/icons/CheckSend.js.map +1 -1
  163. package/lib/module/icons/CircleClose.js.map +1 -1
  164. package/lib/module/icons/CirclePlus.js.map +1 -1
  165. package/lib/module/icons/CircleRight.js.map +1 -1
  166. package/lib/module/icons/Close.js.map +1 -1
  167. package/lib/module/icons/Copy.js.map +1 -1
  168. package/lib/module/icons/CurveLineLeftUp.js.map +1 -1
  169. package/lib/module/icons/DOC.js.map +1 -1
  170. package/lib/module/icons/DOCX.js.map +1 -1
  171. package/lib/module/icons/Delete.js.map +1 -1
  172. package/lib/module/icons/Down.js.map +1 -1
  173. package/lib/module/icons/DownloadArrow.js.map +1 -1
  174. package/lib/module/icons/DownloadCloud.js.map +1 -1
  175. package/lib/module/icons/Edit.js.map +1 -1
  176. package/lib/module/icons/Error.js.map +1 -1
  177. package/lib/module/icons/Eye.js.map +1 -1
  178. package/lib/module/icons/Flag.js.map +1 -1
  179. package/lib/module/icons/Folder.js.map +1 -1
  180. package/lib/module/icons/GenericFile.js.map +1 -1
  181. package/lib/module/icons/GiphyIcon.js.map +1 -1
  182. package/lib/module/icons/Grid.js.map +1 -1
  183. package/lib/module/icons/Group.js.map +1 -1
  184. package/lib/module/icons/HTML.js.map +1 -1
  185. package/lib/module/icons/Imgur.js.map +1 -1
  186. package/lib/module/icons/LOLReaction.js.map +1 -1
  187. package/lib/module/icons/Lightning.js.map +1 -1
  188. package/lib/module/icons/Link.js.map +1 -1
  189. package/lib/module/icons/Logo.js.map +1 -1
  190. package/lib/module/icons/LoveReaction.js.map +1 -1
  191. package/lib/module/icons/MD.js.map +1 -1
  192. package/lib/module/icons/MailOpen.js.map +1 -1
  193. package/lib/module/icons/MenuPointHorizontal.js.map +1 -1
  194. package/lib/module/icons/MenuPointVertical.js.map +1 -1
  195. package/lib/module/icons/MessageFlag.js.map +1 -1
  196. package/lib/module/icons/MessageIcon.js.map +1 -1
  197. package/lib/module/icons/Mute.js.map +1 -1
  198. package/lib/module/icons/Notification.js.map +1 -1
  199. package/lib/module/icons/ODT.js.map +1 -1
  200. package/lib/module/icons/PDF.js.map +1 -1
  201. package/lib/module/icons/PPT.js.map +1 -1
  202. package/lib/module/icons/PPTX.js.map +1 -1
  203. package/lib/module/icons/Pause.js.map +1 -1
  204. package/lib/module/icons/Picture.js.map +1 -1
  205. package/lib/module/icons/Pin.js.map +1 -1
  206. package/lib/module/icons/PinHeader.js.map +1 -1
  207. package/lib/module/icons/Play.js.map +1 -1
  208. package/lib/module/icons/RAR.js.map +1 -1
  209. package/lib/module/icons/RTF.js.map +1 -1
  210. package/lib/module/icons/Recorder.js.map +1 -1
  211. package/lib/module/icons/Refresh.js.map +1 -1
  212. package/lib/module/icons/SEVEN_Z.js.map +1 -1
  213. package/lib/module/icons/Search.js.map +1 -1
  214. package/lib/module/icons/SendRight.js.map +1 -1
  215. package/lib/module/icons/SendUp.js.map +1 -1
  216. package/lib/module/icons/Share.js.map +1 -1
  217. package/lib/module/icons/ShareRightArrow.js.map +1 -1
  218. package/lib/module/icons/Smile.js.map +1 -1
  219. package/lib/module/icons/Sound.js.map +1 -1
  220. package/lib/module/icons/TAR.js.map +1 -1
  221. package/lib/module/icons/TXT.js.map +1 -1
  222. package/lib/module/icons/ThreadReply.js.map +1 -1
  223. package/lib/module/icons/ThumbsDownReaction.js.map +1 -1
  224. package/lib/module/icons/ThumbsUpReaction.js.map +1 -1
  225. package/lib/module/icons/Time.js.map +1 -1
  226. package/lib/module/icons/Unknown.js.map +1 -1
  227. package/lib/module/icons/Unpin.js.map +1 -1
  228. package/lib/module/icons/User.js.map +1 -1
  229. package/lib/module/icons/UserAdd.js.map +1 -1
  230. package/lib/module/icons/UserAdmin.js.map +1 -1
  231. package/lib/module/icons/UserDelete.js.map +1 -1
  232. package/lib/module/icons/UserMinus.js.map +1 -1
  233. package/lib/module/icons/Video.js.map +1 -1
  234. package/lib/module/icons/Warning.js.map +1 -1
  235. package/lib/module/icons/WutReaction.js.map +1 -1
  236. package/lib/module/icons/XLS.js.map +1 -1
  237. package/lib/module/icons/XLSX.js.map +1 -1
  238. package/lib/module/icons/ZIP.js.map +1 -1
  239. package/lib/module/icons/utils/base.js.map +1 -1
  240. package/lib/module/version.json +1 -1
  241. package/lib/typescript/components/Attachment/Attachment.d.ts +3 -3
  242. package/lib/typescript/components/Attachment/AttachmentActions.d.ts +2 -2
  243. package/lib/typescript/components/Attachment/AudioAttachment.d.ts +2 -2
  244. package/lib/typescript/components/Attachment/Card.d.ts +2 -2
  245. package/lib/typescript/components/Attachment/FileAttachment.d.ts +3 -3
  246. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +2 -2
  247. package/lib/typescript/components/Attachment/FileIcon.d.ts +1 -1
  248. package/lib/typescript/components/Attachment/Gallery.d.ts +2 -2
  249. package/lib/typescript/components/Attachment/GalleryImage.d.ts +2 -2
  250. package/lib/typescript/components/Attachment/Giphy.d.ts +2 -2
  251. package/lib/typescript/components/Attachment/ImageLoadingFailedIndicator.d.ts +1 -1
  252. package/lib/typescript/components/Attachment/ImageLoadingIndicator.d.ts +1 -1
  253. package/lib/typescript/components/Attachment/VideoThumbnail.d.ts +1 -1
  254. package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +4 -4
  255. package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +1 -1
  256. package/lib/typescript/components/Attachment/utils/openUrlSafely.d.ts +1 -1
  257. package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +1 -1
  258. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerError.d.ts +1 -1
  259. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts +1 -1
  260. package/lib/typescript/components/AttachmentPicker/components/ImageSelectorIcon.d.ts +1 -1
  261. package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +2 -2
  262. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +2 -2
  263. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +2 -2
  264. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +3 -3
  265. package/lib/typescript/components/Avatar/Avatar.d.ts +1 -1
  266. package/lib/typescript/components/Avatar/GroupAvatar.d.ts +1 -1
  267. package/lib/typescript/components/Channel/Channel.d.ts +2 -2
  268. package/lib/typescript/components/Channel/hooks/useTargetedMessage.d.ts +1 -1
  269. package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
  270. package/lib/typescript/components/ChannelList/ChannelListHeaderErrorIndicator.d.ts +1 -1
  271. package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +2 -2
  272. package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +1 -1
  273. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +1 -1
  274. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +1 -1
  275. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +1 -1
  276. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +1 -1
  277. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +1 -1
  278. package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +1 -1
  279. package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +1 -1
  280. package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +1 -1
  281. package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +1 -1
  282. package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +3 -3
  283. package/lib/typescript/components/ChannelList/utils.d.ts +2 -2
  284. package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +2 -2
  285. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +3 -3
  286. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -1
  287. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
  288. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +1 -2
  289. package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +5 -4
  290. package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +5 -3
  291. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +1 -1
  292. package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +2 -2
  293. package/lib/typescript/components/Chat/Chat.d.ts +1 -1
  294. package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts +1 -1
  295. package/lib/typescript/components/Chat/hooks/useSyncDatabase.d.ts +1 -1
  296. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +3 -3
  297. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
  298. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +1 -1
  299. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +6 -6
  300. package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +3 -3
  301. package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts +1 -1
  302. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +4 -4
  303. package/lib/typescript/components/ImageGallery/components/ImageGridHandle.d.ts +3 -3
  304. package/lib/typescript/components/Indicators/EmptyStateIndicator.d.ts +1 -1
  305. package/lib/typescript/components/Indicators/LoadingDot.d.ts +1 -1
  306. package/lib/typescript/components/Indicators/LoadingDots.d.ts +1 -1
  307. package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
  308. package/lib/typescript/components/Indicators/LoadingIndicator.d.ts +1 -1
  309. package/lib/typescript/components/Message/Message.d.ts +18 -9
  310. package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +2 -2
  311. package/lib/typescript/components/Message/MessageSimple/MessageBounce.d.ts +2 -2
  312. package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +2 -2
  313. package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +2 -2
  314. package/lib/typescript/components/Message/MessageSimple/MessageError.d.ts +1 -1
  315. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -2
  316. package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +2 -2
  317. package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +2 -2
  318. package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +2 -2
  319. package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +2 -2
  320. package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +2 -2
  321. package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +3 -3
  322. package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +3 -3
  323. package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts +1 -1
  324. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +2 -2
  325. package/lib/typescript/components/Message/utils/messageActions.d.ts +2 -2
  326. package/lib/typescript/components/MessageInput/AttachButton.d.ts +2 -2
  327. package/lib/typescript/components/MessageInput/CommandsButton.d.ts +2 -2
  328. package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +1 -1
  329. package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +2 -2
  330. package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +2 -2
  331. package/lib/typescript/components/MessageInput/InputButtons.d.ts +2 -2
  332. package/lib/typescript/components/MessageInput/MessageInput.d.ts +2 -2
  333. package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +2 -2
  334. package/lib/typescript/components/MessageInput/SendButton.d.ts +2 -2
  335. package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
  336. package/lib/typescript/components/MessageInput/UploadProgressIndicator.d.ts +1 -1
  337. package/lib/typescript/components/MessageInput/components/InputEditingStateHeader.d.ts +2 -2
  338. package/lib/typescript/components/MessageInput/components/InputGiphySearch.d.ts +2 -2
  339. package/lib/typescript/components/MessageInput/components/InputReplyStateHeader.d.ts +2 -2
  340. package/lib/typescript/components/MessageList/DateHeader.d.ts +1 -1
  341. package/lib/typescript/components/MessageList/InlineDateSeparator.d.ts +1 -1
  342. package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +1 -1
  343. package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +1 -1
  344. package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +1 -1
  345. package/lib/typescript/components/MessageList/MessageList.d.ts +2 -2
  346. package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -1
  347. package/lib/typescript/components/MessageList/ScrollToBottomButton.d.ts +1 -1
  348. package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +2 -2
  349. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +4 -4
  350. package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +1 -1
  351. package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +2 -2
  352. package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +1 -1
  353. package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +1 -0
  354. package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +2 -2
  355. package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +19 -3
  356. package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +2 -2
  357. package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +1 -1
  358. package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +3 -3
  359. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
  360. package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +1 -1
  361. package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
  362. package/lib/typescript/components/ProgressControl/ProgressControl.d.ts +1 -1
  363. package/lib/typescript/components/RTLComponents/WritingDirectionAwareText.d.ts +1 -1
  364. package/lib/typescript/components/Reply/Reply.d.ts +2 -2
  365. package/lib/typescript/components/Spinner/Spinner.d.ts +1 -1
  366. package/lib/typescript/components/Thread/Thread.d.ts +2 -2
  367. package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +1 -1
  368. package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
  369. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +1 -1
  370. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +2 -2
  371. package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +5 -5
  372. package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +1 -1
  373. package/lib/typescript/contexts/chatContext/ChatContext.d.ts +4 -1
  374. package/lib/typescript/contexts/debugContext/DebugContext.d.ts +2 -2
  375. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +2 -2
  376. package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +1 -1
  377. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +3 -3
  378. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +5 -5
  379. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
  380. package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +2 -2
  381. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -3
  382. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +3 -3
  383. package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +2 -2
  384. package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +1 -1
  385. package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +6 -6
  386. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts +5 -5
  387. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +2 -2
  388. package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +1 -1
  389. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +5 -5
  390. package/lib/typescript/contexts/typingContext/TypingContext.d.ts +1 -1
  391. package/lib/typescript/emoji-data/index.d.ts +2 -2
  392. package/lib/typescript/hooks/useAppStateListener.d.ts +1 -1
  393. package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
  394. package/lib/typescript/hooks/useViewport.d.ts +1 -1
  395. package/lib/typescript/i18n/en.json +1 -1
  396. package/lib/typescript/i18n/es.json +38 -38
  397. package/lib/typescript/i18n/fr.json +38 -38
  398. package/lib/typescript/i18n/he.json +38 -38
  399. package/lib/typescript/i18n/hi.json +38 -38
  400. package/lib/typescript/i18n/it.json +39 -39
  401. package/lib/typescript/i18n/ja.json +39 -39
  402. package/lib/typescript/i18n/ko.json +39 -39
  403. package/lib/typescript/i18n/nl.json +39 -39
  404. package/lib/typescript/i18n/ru.json +36 -36
  405. package/lib/typescript/i18n/tr.json +36 -36
  406. package/lib/typescript/icons/ArrowRight.d.ts +2 -2
  407. package/lib/typescript/icons/AtMentions.d.ts +2 -2
  408. package/lib/typescript/icons/Attach.d.ts +2 -2
  409. package/lib/typescript/icons/Audio.d.ts +2 -2
  410. package/lib/typescript/icons/CSV.d.ts +2 -2
  411. package/lib/typescript/icons/Camera.d.ts +2 -2
  412. package/lib/typescript/icons/Check.d.ts +2 -2
  413. package/lib/typescript/icons/CheckAll.d.ts +2 -2
  414. package/lib/typescript/icons/CheckSend.d.ts +2 -2
  415. package/lib/typescript/icons/CircleClose.d.ts +2 -2
  416. package/lib/typescript/icons/CirclePlus.d.ts +2 -2
  417. package/lib/typescript/icons/CircleRight.d.ts +2 -2
  418. package/lib/typescript/icons/Close.d.ts +2 -2
  419. package/lib/typescript/icons/CurveLineLeftUp.d.ts +2 -2
  420. package/lib/typescript/icons/DOC.d.ts +2 -2
  421. package/lib/typescript/icons/DOCX.d.ts +2 -2
  422. package/lib/typescript/icons/Delete.d.ts +2 -2
  423. package/lib/typescript/icons/Down.d.ts +2 -2
  424. package/lib/typescript/icons/DownloadArrow.d.ts +2 -2
  425. package/lib/typescript/icons/DownloadCloud.d.ts +2 -2
  426. package/lib/typescript/icons/Edit.d.ts +2 -2
  427. package/lib/typescript/icons/Error.d.ts +2 -2
  428. package/lib/typescript/icons/Eye.d.ts +2 -2
  429. package/lib/typescript/icons/Flag.d.ts +2 -2
  430. package/lib/typescript/icons/Folder.d.ts +2 -2
  431. package/lib/typescript/icons/GenericFile.d.ts +2 -2
  432. package/lib/typescript/icons/GiphyIcon.d.ts +2 -2
  433. package/lib/typescript/icons/Grid.d.ts +2 -2
  434. package/lib/typescript/icons/Group.d.ts +2 -2
  435. package/lib/typescript/icons/HTML.d.ts +2 -2
  436. package/lib/typescript/icons/Imgur.d.ts +2 -2
  437. package/lib/typescript/icons/LOLReaction.d.ts +2 -2
  438. package/lib/typescript/icons/Lightning.d.ts +2 -2
  439. package/lib/typescript/icons/Link.d.ts +2 -2
  440. package/lib/typescript/icons/Loading.d.ts +1 -1
  441. package/lib/typescript/icons/Logo.d.ts +2 -2
  442. package/lib/typescript/icons/LoveReaction.d.ts +2 -2
  443. package/lib/typescript/icons/MD.d.ts +2 -2
  444. package/lib/typescript/icons/MailOpen.d.ts +2 -2
  445. package/lib/typescript/icons/MenuPointHorizontal.d.ts +2 -2
  446. package/lib/typescript/icons/MenuPointVertical.d.ts +2 -2
  447. package/lib/typescript/icons/MessageFlag.d.ts +2 -2
  448. package/lib/typescript/icons/MessageIcon.d.ts +2 -2
  449. package/lib/typescript/icons/Mute.d.ts +2 -2
  450. package/lib/typescript/icons/Notification.d.ts +2 -2
  451. package/lib/typescript/icons/ODT.d.ts +2 -2
  452. package/lib/typescript/icons/PDF.d.ts +2 -2
  453. package/lib/typescript/icons/PPT.d.ts +2 -2
  454. package/lib/typescript/icons/PPTX.d.ts +2 -2
  455. package/lib/typescript/icons/Pause.d.ts +2 -2
  456. package/lib/typescript/icons/Picture.d.ts +2 -2
  457. package/lib/typescript/icons/Pin.d.ts +2 -2
  458. package/lib/typescript/icons/PinHeader.d.ts +2 -2
  459. package/lib/typescript/icons/Play.d.ts +2 -2
  460. package/lib/typescript/icons/RAR.d.ts +2 -2
  461. package/lib/typescript/icons/RTF.d.ts +2 -2
  462. package/lib/typescript/icons/Recorder.d.ts +2 -2
  463. package/lib/typescript/icons/Refresh.d.ts +2 -2
  464. package/lib/typescript/icons/SEVEN_Z.d.ts +2 -2
  465. package/lib/typescript/icons/Search.d.ts +2 -2
  466. package/lib/typescript/icons/SendRight.d.ts +2 -2
  467. package/lib/typescript/icons/SendUp.d.ts +2 -2
  468. package/lib/typescript/icons/Share.d.ts +2 -2
  469. package/lib/typescript/icons/ShareRightArrow.d.ts +2 -2
  470. package/lib/typescript/icons/Smile.d.ts +2 -2
  471. package/lib/typescript/icons/Sound.d.ts +2 -2
  472. package/lib/typescript/icons/TAR.d.ts +2 -2
  473. package/lib/typescript/icons/TXT.d.ts +2 -2
  474. package/lib/typescript/icons/ThreadReply.d.ts +2 -2
  475. package/lib/typescript/icons/ThumbsDownReaction.d.ts +2 -2
  476. package/lib/typescript/icons/ThumbsUpReaction.d.ts +2 -2
  477. package/lib/typescript/icons/Time.d.ts +2 -2
  478. package/lib/typescript/icons/Unknown.d.ts +2 -2
  479. package/lib/typescript/icons/Unpin.d.ts +2 -2
  480. package/lib/typescript/icons/User.d.ts +2 -2
  481. package/lib/typescript/icons/UserAdd.d.ts +2 -2
  482. package/lib/typescript/icons/UserAdmin.d.ts +2 -2
  483. package/lib/typescript/icons/UserDelete.d.ts +2 -2
  484. package/lib/typescript/icons/UserMinus.d.ts +2 -2
  485. package/lib/typescript/icons/Video.d.ts +2 -2
  486. package/lib/typescript/icons/Warning.d.ts +2 -2
  487. package/lib/typescript/icons/WutReaction.d.ts +2 -2
  488. package/lib/typescript/icons/XLS.d.ts +2 -2
  489. package/lib/typescript/icons/XLSX.d.ts +2 -2
  490. package/lib/typescript/icons/ZIP.d.ts +2 -2
  491. package/lib/typescript/icons/utils/base.d.ts +5 -5
  492. package/lib/typescript/native.d.ts +26 -26
  493. package/lib/typescript/store/QuickSqliteClient.d.ts +1 -1
  494. package/lib/typescript/store/apis/upsertChannels.d.ts +2 -2
  495. package/lib/typescript/store/apis/upsertCidsForQuery.d.ts +2 -2
  496. package/lib/typescript/store/mappers/mapDateTimeToStorable.d.ts +1 -1
  497. package/lib/typescript/store/schema.d.ts +2 -2
  498. package/lib/typescript/store/sqlite-utils/appendOrderByClause.d.ts +1 -1
  499. package/lib/typescript/store/sqlite-utils/appendWhereCluase.d.ts +1 -1
  500. package/lib/typescript/store/sqlite-utils/createUpsertQuery.d.ts +1 -1
  501. package/lib/typescript/store/types.d.ts +8 -8
  502. package/lib/typescript/types/types.d.ts +7 -7
  503. package/lib/typescript/utils/StreamChatRN.d.ts +1 -1
  504. package/lib/typescript/utils/Streami18n.d.ts +2 -2
  505. package/lib/typescript/utils/compressImage.d.ts +1 -1
  506. package/lib/typescript/utils/getResizedImageUrl.d.ts +1 -1
  507. package/lib/typescript/utils/utils.d.ts +14 -14
  508. package/package.json +2 -6
  509. package/src/components/Channel/Channel.tsx +27 -20
  510. package/src/components/ChannelPreview/ChannelPreview.tsx +1 -1
  511. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +3 -0
  512. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +2 -3
  513. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +1 -3
  514. package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -12
  515. package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -4
  516. package/src/components/Message/Message.tsx +9 -0
  517. package/src/components/MessageInput/hooks/useCountdown.ts +1 -1
  518. package/src/components/MessageOverlay/MessageActionListItem.tsx +16 -0
  519. package/src/contexts/channelsContext/ChannelsContext.tsx +1 -1
  520. package/src/contexts/chatContext/ChatContext.tsx +3 -0
  521. package/src/contexts/themeContext/ThemeContext.tsx +3 -3
  522. package/src/i18n/en.json +1 -1
  523. package/src/i18n/es.json +38 -38
  524. package/src/i18n/fr.json +38 -38
  525. package/src/i18n/he.json +38 -38
  526. package/src/i18n/hi.json +38 -38
  527. package/src/i18n/it.json +39 -39
  528. package/src/i18n/ja.json +39 -39
  529. package/src/i18n/ko.json +39 -39
  530. package/src/i18n/nl.json +39 -39
  531. package/src/i18n/ru.json +36 -36
  532. package/src/i18n/tr.json +36 -36
  533. package/src/icons/ArrowRight.tsx +1 -1
  534. package/src/icons/AtMentions.tsx +1 -1
  535. package/src/icons/Attach.tsx +1 -1
  536. package/src/icons/Audio.tsx +1 -1
  537. package/src/icons/CSV.tsx +1 -1
  538. package/src/icons/Camera.tsx +1 -1
  539. package/src/icons/Check.tsx +1 -1
  540. package/src/icons/CheckAll.tsx +1 -1
  541. package/src/icons/CheckSend.tsx +1 -1
  542. package/src/icons/CircleClose.tsx +1 -1
  543. package/src/icons/CirclePlus.tsx +1 -1
  544. package/src/icons/CircleRight.tsx +1 -1
  545. package/src/icons/Close.tsx +1 -1
  546. package/src/icons/Copy.tsx +1 -1
  547. package/src/icons/CurveLineLeftUp.tsx +1 -1
  548. package/src/icons/DOC.tsx +1 -1
  549. package/src/icons/DOCX.tsx +1 -1
  550. package/src/icons/Delete.tsx +1 -1
  551. package/src/icons/Down.tsx +1 -1
  552. package/src/icons/DownloadArrow.tsx +1 -1
  553. package/src/icons/DownloadCloud.tsx +1 -1
  554. package/src/icons/Edit.tsx +1 -1
  555. package/src/icons/Error.tsx +1 -1
  556. package/src/icons/Eye.tsx +1 -1
  557. package/src/icons/Flag.tsx +1 -1
  558. package/src/icons/Folder.tsx +1 -1
  559. package/src/icons/GenericFile.tsx +1 -1
  560. package/src/icons/GiphyIcon.tsx +1 -1
  561. package/src/icons/Grid.tsx +1 -1
  562. package/src/icons/Group.tsx +1 -1
  563. package/src/icons/HTML.tsx +1 -1
  564. package/src/icons/Imgur.tsx +1 -1
  565. package/src/icons/LOLReaction.tsx +1 -1
  566. package/src/icons/Lightning.tsx +1 -1
  567. package/src/icons/Link.tsx +1 -1
  568. package/src/icons/Logo.tsx +1 -1
  569. package/src/icons/LoveReaction.tsx +1 -1
  570. package/src/icons/MD.tsx +1 -1
  571. package/src/icons/MailOpen.tsx +1 -1
  572. package/src/icons/MenuPointHorizontal.tsx +1 -1
  573. package/src/icons/MenuPointVertical.tsx +1 -1
  574. package/src/icons/MessageFlag.tsx +1 -1
  575. package/src/icons/MessageIcon.tsx +1 -1
  576. package/src/icons/Mute.tsx +1 -1
  577. package/src/icons/Notification.tsx +1 -1
  578. package/src/icons/ODT.tsx +1 -1
  579. package/src/icons/PDF.tsx +1 -1
  580. package/src/icons/PPT.tsx +1 -1
  581. package/src/icons/PPTX.tsx +1 -1
  582. package/src/icons/Pause.tsx +1 -1
  583. package/src/icons/Picture.tsx +1 -1
  584. package/src/icons/Pin.tsx +1 -1
  585. package/src/icons/PinHeader.tsx +1 -1
  586. package/src/icons/Play.tsx +1 -1
  587. package/src/icons/RAR.tsx +1 -1
  588. package/src/icons/RTF.tsx +1 -1
  589. package/src/icons/Recorder.tsx +1 -1
  590. package/src/icons/Refresh.tsx +1 -1
  591. package/src/icons/SEVEN_Z.tsx +1 -1
  592. package/src/icons/Search.tsx +1 -1
  593. package/src/icons/SendRight.tsx +1 -1
  594. package/src/icons/SendUp.tsx +1 -1
  595. package/src/icons/Share.tsx +1 -1
  596. package/src/icons/ShareRightArrow.tsx +1 -1
  597. package/src/icons/Smile.tsx +1 -1
  598. package/src/icons/Sound.tsx +1 -1
  599. package/src/icons/TAR.tsx +1 -1
  600. package/src/icons/TXT.tsx +1 -1
  601. package/src/icons/ThreadReply.tsx +1 -1
  602. package/src/icons/ThumbsDownReaction.tsx +1 -1
  603. package/src/icons/ThumbsUpReaction.tsx +1 -1
  604. package/src/icons/Time.tsx +1 -1
  605. package/src/icons/Unknown.tsx +1 -1
  606. package/src/icons/Unpin.tsx +1 -1
  607. package/src/icons/User.tsx +1 -1
  608. package/src/icons/UserAdd.tsx +1 -1
  609. package/src/icons/UserAdmin.tsx +1 -1
  610. package/src/icons/UserDelete.tsx +1 -1
  611. package/src/icons/UserMinus.tsx +1 -1
  612. package/src/icons/Video.tsx +1 -1
  613. package/src/icons/Warning.tsx +1 -1
  614. package/src/icons/WutReaction.tsx +1 -1
  615. package/src/icons/XLS.tsx +1 -1
  616. package/src/icons/XLSX.tsx +1 -1
  617. package/src/icons/ZIP.tsx +1 -1
  618. package/src/icons/utils/base.tsx +2 -2
  619. package/src/version.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_useLatestMessagePreview","_ChannelsContext","_ChatContext","_useTranslatedMessage","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ChannelPreviewWithContext","props","channel","client","channelListForceUpdate","forceUpdate","Preview","_useState","useState","state","messages","length","_useState2","_slicedToArray2","lastMessage","setLastMessage","translatedLastMessage","useTranslatedMessage","_useState3","_useState4","setForceUpdate","_useState5","countUnread","_useState6","unread","setUnread","latestMessagePreview","useLatestMessagePreview","channelLastMessage","channelLastMessageString","id","updated_at","useEffect","_client$on","on","unsubscribe","newUnreadCount","handleNewMessageEvent","event","message","parent_id","show_in_channel","handleUpdatedOrDeletedMessage","prevLastMessage","_event$message","listeners","forEach","l","handleReadEvent","_event$user","_event$user2","user","userID","prev","listener","createElement","__self","__source","fileName","lineNumber","columnNumber","ChannelPreview","_useChatContext","useChatContext","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreview.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { Channel, ChannelState, Event, MessageResponse } from 'stream-chat';\n\nimport { useLatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\n\nimport { useTranslatedMessage } from '../../hooks/useTranslatedMessage';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ChannelsContextValue<StreamChatGenerics>, 'Preview' | 'forceUpdate'> & {\n /**\n * The previewed channel\n */\n channel: Channel<StreamChatGenerics>;\n };\n\n/**\n * This component manages state for the ChannelPreviewMessenger UI component and receives\n * all props from the ChannelListMessenger component.\n */\nconst ChannelPreviewWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewPropsWithContext<StreamChatGenerics>,\n) => {\n const { channel, client, forceUpdate: channelListForceUpdate, Preview } = props;\n\n const [lastMessage, setLastMessage] = useState<\n | ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>\n | MessageResponse<StreamChatGenerics>\n | undefined\n >(channel.state.messages[channel.state.messages.length - 1]);\n\n const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(\n lastMessage || ({} as MessageResponse<StreamChatGenerics>),\n );\n\n const [forceUpdate, setForceUpdate] = useState(0);\n const [unread, setUnread] = useState(channel.countUnread());\n\n const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate, translatedLastMessage);\n\n const channelLastMessage = channel.lastMessage();\n const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;\n\n useEffect(() => {\n const { unsubscribe } = client.on('notification.mark_read', () => {\n setUnread(channel.countUnread());\n });\n return unsubscribe;\n }, []);\n\n useEffect(() => {\n if (\n channelLastMessage &&\n (channelLastMessage.id !== lastMessage?.id ||\n channelLastMessage.updated_at !== lastMessage?.updated_at)\n ) {\n setLastMessage(channelLastMessage);\n }\n\n const newUnreadCount = channel.countUnread();\n setUnread(newUnreadCount);\n }, [channelLastMessageString, channelListForceUpdate]);\n\n useEffect(() => {\n const handleNewMessageEvent = (event: Event<StreamChatGenerics>) => {\n const message = event.message;\n if (message && (!message.parent_id || message.show_in_channel)) {\n setLastMessage(event.message);\n setUnread(channel.countUnread());\n }\n };\n\n const handleUpdatedOrDeletedMessage = (event: Event<StreamChatGenerics>) => {\n setLastMessage((prevLastMessage) => {\n if (prevLastMessage?.id === event.message?.id) {\n return event.message;\n }\n return prevLastMessage;\n });\n };\n\n const listeners = [\n channel.on('message.new', handleNewMessageEvent),\n channel.on('message.updated', handleUpdatedOrDeletedMessage),\n channel.on('message.deleted', handleUpdatedOrDeletedMessage),\n ];\n\n return () => listeners.forEach((l) => l.unsubscribe());\n }, []);\n\n useEffect(() => {\n const handleReadEvent = (event: Event<StreamChatGenerics>) => {\n if (event.user?.id === client.userID) {\n setUnread(0);\n } else if (event.user?.id) {\n setForceUpdate((prev) => prev + 1);\n }\n };\n\n const listener = channel.on('message.read', handleReadEvent);\n return () => listener.unsubscribe();\n }, []);\n\n return <Preview channel={channel} latestMessagePreview={latestMessagePreview} unread={unread} />;\n};\n\nexport type ChannelPreviewProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>> &\n Pick<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>;\n\nexport const ChannelPreview = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewProps<StreamChatGenerics>,\n) => {\n const { client } = useChatContext<StreamChatGenerics>();\n const { forceUpdate, Preview } = useChannelsContext<StreamChatGenerics>();\n\n return <ChannelPreviewWithContext {...{ client, forceUpdate, Preview }} {...props} />;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAA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A,oBAAqB;IAACF,MAAM,EAAEA,MAAO;IAAAgC,MAAA,EAAAhF,KAAA;IAAAiF,QAAA;MAAAC,QAAA,EAAAjF,YAAA;MAAAkF,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAAC;AAClG,CAAC;AAOM,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAGzB5D,KAA8C,EAC3C;EACH,IAAA6D,eAAA,GAAmB,IAAAC,2BAAc,EAAqB,CAAC;IAA/C5D,MAAM,GAAA2D,eAAA,CAAN3D,MAAM;EACd,IAAA6D,mBAAA,GAAiC,IAAAC,mCAAkB,EAAqB,CAAC;IAAjE5D,WAAW,GAAA2D,mBAAA,CAAX3D,WAAW;IAAEC,OAAO,GAAA0D,mBAAA,CAAP1D,OAAO;EAE5B,OAAOrC,MAAA,YAAAsF,aAAA,CAACvD,yBAAyB,MAAAkE,SAAA;IAAO/D,MAAM,EAANA,MAAM;IAAEE,WAAW,EAAXA,WAAW;IAAEC,OAAO,EAAPA;EAAO,GAAQL,KAAK;IAAAuD,MAAA,EAAAhF,KAAA;IAAAiF,QAAA;MAAAC,QAAA,EAAAjF,YAAA;MAAAkF,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG,CAAC;AACvF,CAAC;AAACO,OAAA,CAAAN,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_useLatestMessagePreview","_ChannelsContext","_ChatContext","_useTranslatedMessage","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ChannelPreviewWithContext","props","channel","client","channelListForceUpdate","forceUpdate","Preview","_useState","useState","state","messages","length","_useState2","_slicedToArray2","lastMessage","setLastMessage","translatedLastMessage","useTranslatedMessage","_useState3","_useState4","setForceUpdate","_useState5","countUnread","_useState6","unread","setUnread","latestMessagePreview","useLatestMessagePreview","channelLastMessage","channelLastMessageString","id","updated_at","useEffect","_client$on","on","unsubscribe","newUnreadCount","handleNewMessageEvent","event","message","parent_id","show_in_channel","handleUpdatedOrDeletedMessage","prevLastMessage","_event$message","listeners","forEach","l","handleReadEvent","_event$user","_event$user2","user","userID","prev","listener","createElement","__self","__source","fileName","lineNumber","columnNumber","ChannelPreview","_useChatContext","useChatContext","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreview.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { Channel, ChannelState, Event, MessageResponse } from 'stream-chat';\n\nimport { useLatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';\n\nimport { useTranslatedMessage } from '../../hooks/useTranslatedMessage';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChatContextValue<StreamChatGenerics>, 'client'> &\n Pick<ChannelsContextValue<StreamChatGenerics>, 'Preview' | 'forceUpdate'> & {\n /**\n * Instance of Channel from stream-chat package.\n */\n channel: Channel<StreamChatGenerics>;\n };\n\n/**\n * This component manages state for the ChannelPreviewMessenger UI component and receives\n * all props from the ChannelListMessenger component.\n */\nconst ChannelPreviewWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewPropsWithContext<StreamChatGenerics>,\n) => {\n const { channel, client, forceUpdate: channelListForceUpdate, Preview } = props;\n\n const [lastMessage, setLastMessage] = useState<\n | ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>\n | MessageResponse<StreamChatGenerics>\n | undefined\n >(channel.state.messages[channel.state.messages.length - 1]);\n\n const translatedLastMessage = useTranslatedMessage<StreamChatGenerics>(\n lastMessage || ({} as MessageResponse<StreamChatGenerics>),\n );\n\n const [forceUpdate, setForceUpdate] = useState(0);\n const [unread, setUnread] = useState(channel.countUnread());\n\n const latestMessagePreview = useLatestMessagePreview(channel, forceUpdate, translatedLastMessage);\n\n const channelLastMessage = channel.lastMessage();\n const channelLastMessageString = `${channelLastMessage?.id}${channelLastMessage?.updated_at}`;\n\n useEffect(() => {\n const { unsubscribe } = client.on('notification.mark_read', () => {\n setUnread(channel.countUnread());\n });\n return unsubscribe;\n }, []);\n\n useEffect(() => {\n if (\n channelLastMessage &&\n (channelLastMessage.id !== lastMessage?.id ||\n channelLastMessage.updated_at !== lastMessage?.updated_at)\n ) {\n setLastMessage(channelLastMessage);\n }\n\n const newUnreadCount = channel.countUnread();\n setUnread(newUnreadCount);\n }, [channelLastMessageString, channelListForceUpdate]);\n\n useEffect(() => {\n const handleNewMessageEvent = (event: Event<StreamChatGenerics>) => {\n const message = event.message;\n if (message && (!message.parent_id || message.show_in_channel)) {\n setLastMessage(event.message);\n setUnread(channel.countUnread());\n }\n };\n\n const handleUpdatedOrDeletedMessage = (event: Event<StreamChatGenerics>) => {\n setLastMessage((prevLastMessage) => {\n if (prevLastMessage?.id === event.message?.id) {\n return event.message;\n }\n return prevLastMessage;\n });\n };\n\n const listeners = [\n channel.on('message.new', handleNewMessageEvent),\n channel.on('message.updated', handleUpdatedOrDeletedMessage),\n channel.on('message.deleted', handleUpdatedOrDeletedMessage),\n ];\n\n return () => listeners.forEach((l) => l.unsubscribe());\n }, []);\n\n useEffect(() => {\n const handleReadEvent = (event: Event<StreamChatGenerics>) => {\n if (event.user?.id === client.userID) {\n setUnread(0);\n } else if (event.user?.id) {\n setForceUpdate((prev) => prev + 1);\n }\n };\n\n const listener = channel.on('message.read', handleReadEvent);\n return () => listener.unsubscribe();\n }, []);\n\n return <Preview channel={channel} latestMessagePreview={latestMessagePreview} unread={unread} />;\n};\n\nexport type ChannelPreviewProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>> &\n Pick<ChannelPreviewPropsWithContext<StreamChatGenerics>, 'channel'>;\n\nexport const ChannelPreview = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewProps<StreamChatGenerics>,\n) => {\n const { client } = useChatContext<StreamChatGenerics>();\n const { forceUpdate, Preview } = useChannelsContext<StreamChatGenerics>();\n\n return <ChannelPreviewWithContext {...{ client, forceUpdate, Preview }} {...props} />;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAIA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AAAwE,IAAAK,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBA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+32,7 @@ var ChannelPreviewMessage = function ChannelPreviewMessage(props) {
32
32
  __self: _this,
33
33
  __source: {
34
34
  fileName: _jsxFileName,
35
- lineNumber: 39,
35
+ lineNumber: 42,
36
36
  columnNumber: 5
37
37
  }
38
38
  }, latestMessagePreview == null ? void 0 : (_latestMessagePreview = latestMessagePreview.previews) == null ? void 0 : _latestMessagePreview.map(function (preview, index) {
@@ -44,7 +44,7 @@ var ChannelPreviewMessage = function ChannelPreviewMessage(props) {
44
44
  __self: _this,
45
45
  __source: {
46
46
  fileName: _jsxFileName,
47
- lineNumber: 43,
47
+ lineNumber: 46,
48
48
  columnNumber: 13
49
49
  }
50
50
  }, preview.text);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","styles","StyleSheet","create","bold","fontWeight","message","flexShrink","fontSize","ChannelPreviewMessage","props","_latestMessagePreview","latestMessagePreview","_useTheme","useTheme","_useTheme$theme","theme","channelPreview","grey","colors","createElement","Text","numberOfLines","style","color","__self","__source","fileName","lineNumber","columnNumber","previews","map","preview","index","text","key","exports"],"sources":["ChannelPreviewMessage.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport type { LatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n bold: { fontWeight: '600' },\n message: {\n flexShrink: 1,\n fontSize: 12,\n },\n});\n\nexport type ChannelPreviewMessageProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n latestMessagePreview: LatestMessagePreview<StreamChatGenerics>;\n};\n\nexport const ChannelPreviewMessage = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessageProps<StreamChatGenerics>,\n) => {\n const { latestMessagePreview } = props;\n\n const {\n theme: {\n channelPreview: { message },\n colors: { grey },\n },\n } = useTheme();\n\n return (\n <Text numberOfLines={1} style={[styles.message, { color: grey }, message]}>\n {latestMessagePreview?.previews?.map(\n (preview, index) =>\n preview.text && (\n <Text\n key={`${preview.text}_${index}`}\n style={[{ color: grey }, preview.bold ? styles.bold : {}, message]}\n >\n {preview.text}\n </Text>\n ),\n )}\n </Text>\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,aAAA,GAAAF,OAAA;AAAoE,IAAAG,KAAA;EAAAC,YAAA;AAIpE,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,IAAI,EAAE;IAAEC,UAAU,EAAE;EAAM,CAAC;EAC3BC,OAAO,EAAE;IACPC,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAQK,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAGhCC,KAAqD,EAClD;EAAA,IAAAC,qBAAA;EACH,IAAQC,oBAAoB,GAAKF,KAAK,CAA9BE,oBAAoB;EAE5B,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IACeV,OAAO,GAAAS,eAAA,CAAzBE,cAAc,CAAIX,OAAO;IACfY,IAAI,GAAAH,eAAA,CAAdI,MAAM,CAAID,IAAI;EAIlB,OACExB,MAAA,YAAA0B,aAAA,CAACvB,YAAA,CAAAwB,IAAI;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAE,CAACtB,MAAM,CAACK,OAAO,EAAE;MAAEkB,KAAK,EAAEN;IAAK,CAAC,EAAEZ,OAAO,CAAE;IAAAmB,MAAA,EAAA1B,KAAA;IAAA2B,QAAA;MAAAC,QAAA,EAAA3B,YAAA;MAAA4B,UAAA;MAAAC,YAAA;IAAA;EAAA,GACvEjB,oBAAoB,qBAAAD,qBAAA,GAApBC,oBAAoB,CAAEkB,QAAQ,qBAA9BnB,qBAAA,CAAgCoB,GAAG,CAClC,UAACC,OAAO,EAAEC,KAAK;IAAA,OACbD,OAAO,CAACE,IAAI,IACVxC,MAAA,YAAA0B,aAAA,CAACvB,YAAA,CAAAwB,IAAI;MACHc,GAAG,EAAKH,OAAO,CAACE,IAAI,SAAID,KAAQ;MAChCV,KAAK,EAAE,CAAC;QAAEC,KAAK,EAAEN;MAAK,CAAC,EAAEc,OAAO,CAAC5B,IAAI,GAAGH,MAAM,CAACG,IAAI,GAAG,CAAC,CAAC,EAAEE,OAAO,CAAE;MAAAmB,MAAA,EAAA1B,KAAA;MAAA2B,QAAA;QAAAC,QAAA,EAAA3B,YAAA;QAAA4B,UAAA;QAAAC,YAAA;MAAA;IAAA,GAElEG,OAAO,CAACE,IACL,CACP;EAAA,CACL,CACI,CAAC;AAEX,CAAC;AAACE,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","styles","StyleSheet","create","bold","fontWeight","message","flexShrink","fontSize","ChannelPreviewMessage","props","_latestMessagePreview","latestMessagePreview","_useTheme","useTheme","_useTheme$theme","theme","channelPreview","grey","colors","createElement","Text","numberOfLines","style","color","__self","__source","fileName","lineNumber","columnNumber","previews","map","preview","index","text","key","exports"],"sources":["ChannelPreviewMessage.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport type { LatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n bold: { fontWeight: '600' },\n message: {\n flexShrink: 1,\n fontSize: 12,\n },\n});\n\nexport type ChannelPreviewMessageProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Latest message on a channel, formatted for preview.\n */\n latestMessagePreview: LatestMessagePreview<StreamChatGenerics>;\n};\n\nexport const ChannelPreviewMessage = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessageProps<StreamChatGenerics>,\n) => {\n const { latestMessagePreview } = props;\n\n const {\n theme: {\n channelPreview: { message },\n colors: { grey },\n },\n } = useTheme();\n\n return (\n <Text numberOfLines={1} style={[styles.message, { color: grey }, message]}>\n {latestMessagePreview?.previews?.map(\n (preview, index) =>\n preview.text && (\n <Text\n key={`${preview.text}_${index}`}\n style={[{ color: grey }, preview.bold ? styles.bold : {}, message]}\n >\n {preview.text}\n </Text>\n ),\n )}\n </Text>\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,aAAA,GAAAF,OAAA;AAAoE,IAAAG,KAAA;EAAAC,YAAA;AAIpE,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,IAAI,EAAE;IAAEC,UAAU,EAAE;EAAM,CAAC;EAC3BC,OAAO,EAAE;IACPC,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAWK,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAGhCC,KAAqD,EAClD;EAAA,IAAAC,qBAAA;EACH,IAAQC,oBAAoB,GAAKF,KAAK,CAA9BE,oBAAoB;EAE5B,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IACeV,OAAO,GAAAS,eAAA,CAAzBE,cAAc,CAAIX,OAAO;IACfY,IAAI,GAAAH,eAAA,CAAdI,MAAM,CAAID,IAAI;EAIlB,OACExB,MAAA,YAAA0B,aAAA,CAACvB,YAAA,CAAAwB,IAAI;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAE,CAACtB,MAAM,CAACK,OAAO,EAAE;MAAEkB,KAAK,EAAEN;IAAK,CAAC,EAAEZ,OAAO,CAAE;IAAAmB,MAAA,EAAA1B,KAAA;IAAA2B,QAAA;MAAAC,QAAA,EAAA3B,YAAA;MAAA4B,UAAA;MAAAC,YAAA;IAAA;EAAA,GACvEjB,oBAAoB,qBAAAD,qBAAA,GAApBC,oBAAoB,CAAEkB,QAAQ,qBAA9BnB,qBAAA,CAAgCoB,GAAG,CAClC,UAACC,OAAO,EAAEC,KAAK;IAAA,OACbD,OAAO,CAACE,IAAI,IACVxC,MAAA,YAAA0B,aAAA,CAACvB,YAAA,CAAAwB,IAAI;MACHc,GAAG,EAAKH,OAAO,CAACE,IAAI,SAAID,KAAQ;MAChCV,KAAK,EAAE,CAAC;QAAEC,KAAK,EAAEN;MAAK,CAAC,EAAEc,OAAO,CAAC5B,IAAI,GAAGH,MAAM,CAACG,IAAI,GAAG,CAAC,CAAC,EAAEE,OAAO,CAAE;MAAAmB,MAAA,EAAA1B,KAAA;MAAA2B,QAAA;QAAAC,QAAA,EAAA3B,YAAA;QAAA4B,UAAA;QAAAC,YAAA;MAAA;IAAA,GAElEG,OAAO,CAACE,IACL,CACP;EAAA,CACL,CACI,CAAC;AAEX,CAAC;AAACE,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA"}
@@ -144,7 +144,6 @@ var ChannelPreviewMessengerWithContext = function ChannelPreviewMessengerWithCon
144
144
  columnNumber: 9
145
145
  }
146
146
  }, _react["default"].createElement(PreviewTitle, {
147
- channel: channel,
148
147
  displayName: displayName,
149
148
  __self: _this,
150
149
  __source: {
@@ -168,7 +167,6 @@ var ChannelPreviewMessengerWithContext = function ChannelPreviewMessengerWithCon
168
167
  columnNumber: 32
169
168
  }
170
169
  }), _react["default"].createElement(PreviewUnreadCount, {
171
- channel: channel,
172
170
  maxUnreadCount: maxUnreadCount,
173
171
  unread: unread,
174
172
  __self: _this,
@@ -194,7 +192,6 @@ var ChannelPreviewMessengerWithContext = function ChannelPreviewMessengerWithCon
194
192
  columnNumber: 11
195
193
  }
196
194
  }), _react["default"].createElement(PreviewStatus, {
197
- channel: channel,
198
195
  formatLatestMessageDate: formatLatestMessageDate,
199
196
  latestMessagePreview: latestMessagePreview,
200
197
  __self: _this,
@@ -229,7 +226,7 @@ var ChannelPreviewMessenger = function ChannelPreviewMessenger(props) {
229
226
  __self: _this,
230
227
  __source: {
231
228
  fileName: _jsxFileName,
232
- lineNumber: 224,
229
+ lineNumber: 223,
233
230
  columnNumber: 5
234
231
  }
235
232
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_ChannelAvatar","_ChannelPreviewMessage","_ChannelPreviewMutedStatus","_ChannelPreviewStatus","_ChannelPreviewTitle","_ChannelPreviewUnreadCount","_useChannelPreviewDisplayName","_ChannelsContext","_ChatContext","_ThemeContext","_useViewport2","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","styles","StyleSheet","create","container","borderBottomWidth","flex","flexDirection","paddingHorizontal","paddingVertical","contentContainer","row","alignItems","justifyContent","paddingLeft","statusContainer","display","title","fontSize","fontWeight","ChannelPreviewMessengerWithContext","props","channel","formatLatestMessageDate","latestMessagePreview","maxUnreadCount","onSelect","_props$PreviewAvatar","PreviewAvatar","ChannelAvatar","_props$PreviewMessage","PreviewMessage","ChannelPreviewMessage","_props$PreviewStatus","PreviewStatus","ChannelPreviewStatus","_props$PreviewTitle","PreviewTitle","ChannelPreviewTitle","_props$PreviewUnreadC","PreviewUnreadCount","ChannelPreviewUnreadCount","_props$PreviewMutedSt","PreviewMutedStatus","ChannelPreviewMutedStatus","unread","_useViewport","useViewport","vw","maxWidth","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","_useTheme$theme$color","colors","border","white_snow","_useChatContext","useChatContext","client","displayName","useChannelPreviewDisplayName","Math","floor","_useState","useState","muteStatus","muted","_useState2","_slicedToArray2","isChannelMuted","setIsChannelMuted","useEffect","handleEvent","on","off","createElement","TouchableOpacity","onPress","style","backgroundColor","borderBottomColor","testID","__self","__source","fileName","lineNumber","columnNumber","View","id","MemoizedChannelPreviewMessengerWithContext","React","memo","ChannelPreviewMessenger","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreviewMessenger.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\n\nimport { ChannelAvatar } from './ChannelAvatar';\nimport type { ChannelPreviewProps } from './ChannelPreview';\nimport { ChannelPreviewMessage } from './ChannelPreviewMessage';\nimport { ChannelPreviewMutedStatus } from './ChannelPreviewMutedStatus';\nimport { ChannelPreviewStatus } from './ChannelPreviewStatus';\nimport { ChannelPreviewTitle } from './ChannelPreviewTitle';\nimport { ChannelPreviewUnreadCount } from './ChannelPreviewUnreadCount';\nimport { useChannelPreviewDisplayName } from './hooks/useChannelPreviewDisplayName';\n\nimport type { LatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { useChatContext } from '../../contexts/chatContext/ChatContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n container: {\n borderBottomWidth: 1,\n flex: 1,\n flexDirection: 'row',\n paddingHorizontal: 8,\n paddingVertical: 12,\n },\n contentContainer: { flex: 1 },\n row: {\n alignItems: 'center',\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingLeft: 8,\n },\n statusContainer: {\n display: 'flex',\n flexDirection: 'row',\n },\n title: { fontSize: 14, fontWeight: '700' },\n});\n\nexport type ChannelPreviewMessengerPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> &\n Pick<\n ChannelsContextValue<StreamChatGenerics>,\n | 'maxUnreadCount'\n | 'onSelect'\n | 'PreviewAvatar'\n | 'PreviewMessage'\n | 'PreviewMutedStatus'\n | 'PreviewStatus'\n | 'PreviewTitle'\n | 'PreviewUnreadCount'\n > & {\n /**\n * Latest message on a channel, formatted for preview\n *\n * e.g.,\n *\n * ```json\n * {\n * created_at: '' ,\n * messageObject: { ... },\n * previews: {\n * bold: true,\n * text: 'This is the message preview text'\n * },\n * status: 0 | 1 | 2 // read states of the latest message.\n * }\n * ```\n *\n * The read status is either of the following:\n *\n * 0: The message was not sent by the current user\n * 1: The message was sent by the current user and is unread\n * 2: The message was sent by the current user and is read\n *\n * @overrideType object\n */\n latestMessagePreview: LatestMessagePreview<StreamChatGenerics>;\n /**\n * Formatter function for date of latest message.\n * @param date Message date\n * @returns Formatted date string\n *\n * By default today's date is shown in 'HH:mm A' format and other dates\n * are displayed in 'DD/MM/YY' format. props.latestMessage.created_at is the\n * default formatted date. This default logic is part of ChannelPreview component.\n */\n formatLatestMessageDate?: (date: Date) => string;\n /** Number of unread messages on the channel */\n unread?: number;\n };\n\nconst ChannelPreviewMessengerWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n channel,\n formatLatestMessageDate,\n latestMessagePreview,\n maxUnreadCount,\n onSelect,\n PreviewAvatar = ChannelAvatar,\n PreviewMessage = ChannelPreviewMessage,\n PreviewStatus = ChannelPreviewStatus,\n PreviewTitle = ChannelPreviewTitle,\n PreviewUnreadCount = ChannelPreviewUnreadCount,\n PreviewMutedStatus = ChannelPreviewMutedStatus,\n unread,\n } = props;\n const { vw } = useViewport();\n\n const maxWidth = vw(80) - 16 - 40;\n\n const {\n theme: {\n channelPreview: { container, contentContainer, row, title },\n colors: { border, white_snow },\n },\n } = useTheme();\n\n const { client } = useChatContext<StreamChatGenerics>();\n\n const displayName = useChannelPreviewDisplayName(\n channel,\n Math.floor(maxWidth / ((title.fontSize || styles.title.fontSize) / 2)),\n );\n\n const [isChannelMuted, setIsChannelMuted] = useState(() => channel.muteStatus().muted);\n\n useEffect(() => {\n const handleEvent = () => setIsChannelMuted(channel.muteStatus().muted);\n\n client.on('notification.channel_mutes_updated', handleEvent);\n return () => client.off('notification.channel_mutes_updated', handleEvent);\n }, [client]);\n\n return (\n <TouchableOpacity\n onPress={() => {\n if (onSelect) {\n onSelect(channel);\n }\n }}\n style={[\n styles.container,\n { backgroundColor: white_snow, borderBottomColor: border },\n container,\n ]}\n testID='channel-preview-button'\n >\n <PreviewAvatar channel={channel} />\n <View\n style={[styles.contentContainer, contentContainer]}\n testID={`channel-preview-content-${channel.id}`}\n >\n <View style={[styles.row, row]}>\n <PreviewTitle channel={channel} displayName={displayName} />\n <View style={[styles.statusContainer, row]}>\n {isChannelMuted && <PreviewMutedStatus />}\n <PreviewUnreadCount channel={channel} maxUnreadCount={maxUnreadCount} unread={unread} />\n </View>\n </View>\n <View style={[styles.row, row]}>\n <PreviewMessage latestMessagePreview={latestMessagePreview} />\n <PreviewStatus\n channel={channel}\n formatLatestMessageDate={formatLatestMessageDate}\n latestMessagePreview={latestMessagePreview}\n />\n </View>\n </View>\n </TouchableOpacity>\n );\n};\n\nexport type ChannelPreviewMessengerProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<\n Omit<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'channel' | 'latestMessagePreview'\n >\n> &\n Pick<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'channel' | 'latestMessagePreview'\n >;\n\nconst MemoizedChannelPreviewMessengerWithContext = React.memo(\n ChannelPreviewMessengerWithContext,\n) as typeof ChannelPreviewMessengerWithContext;\n\n/**\n * This UI component displays an individual preview item for each channel in a list. It also receives all props\n * from the ChannelPreview component.\n */\nexport const ChannelPreviewMessenger = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessengerProps<StreamChatGenerics>,\n) => {\n const {\n maxUnreadCount,\n onSelect,\n PreviewAvatar,\n PreviewMessage,\n PreviewMutedStatus,\n PreviewStatus,\n PreviewTitle,\n PreviewUnreadCount,\n } = useChannelsContext<StreamChatGenerics>();\n return (\n <MemoizedChannelPreviewMessengerWithContext\n {...{\n maxUnreadCount,\n onSelect,\n PreviewAvatar,\n PreviewMessage,\n PreviewMutedStatus,\n PreviewStatus,\n PreviewTitle,\n PreviewUnreadCount,\n }}\n {...props}\n />\n );\n};\n\nChannelPreviewMessenger.displayName = 'ChannelPreviewMessenger{channelPreview}';\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,0BAAA,GAAAR,OAAA;AACA,IAAAS,6BAAA,GAAAT,OAAA;AAIA,IAAAU,gBAAA,GAAAV,OAAA;AAIA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AAAsD,IAAAc,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAA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IACbG,cAAc,EAAdA,cAAc;IACdY,kBAAkB,EAAlBA,kBAAkB;IAClBT,aAAa,EAAbA,aAAa;IACbG,YAAY,EAAZA,YAAY;IACZG,kBAAkB,EAAlBA;EAAkB,GAEhBnB,KAAK;IAAAiE,MAAA,EAAA7G,KAAA;IAAA8G,QAAA;MAAAC,QAAA,EAAA9G,YAAA;MAAA+G,UAAA;MAAAC,YAAA;IAAA;EAAA,EACV,CAAC;AAEN,CAAC;AAACU,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEFA,uBAAuB,CAACjC,WAAW,GAAG,yCAAyC"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_ChannelAvatar","_ChannelPreviewMessage","_ChannelPreviewMutedStatus","_ChannelPreviewStatus","_ChannelPreviewTitle","_ChannelPreviewUnreadCount","_useChannelPreviewDisplayName","_ChannelsContext","_ChatContext","_ThemeContext","_useViewport2","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","styles","StyleSheet","create","container","borderBottomWidth","flex","flexDirection","paddingHorizontal","paddingVertical","contentContainer","row","alignItems","justifyContent","paddingLeft","statusContainer","display","title","fontSize","fontWeight","ChannelPreviewMessengerWithContext","props","channel","formatLatestMessageDate","latestMessagePreview","maxUnreadCount","onSelect","_props$PreviewAvatar","PreviewAvatar","ChannelAvatar","_props$PreviewMessage","PreviewMessage","ChannelPreviewMessage","_props$PreviewStatus","PreviewStatus","ChannelPreviewStatus","_props$PreviewTitle","PreviewTitle","ChannelPreviewTitle","_props$PreviewUnreadC","PreviewUnreadCount","ChannelPreviewUnreadCount","_props$PreviewMutedSt","PreviewMutedStatus","ChannelPreviewMutedStatus","unread","_useViewport","useViewport","vw","maxWidth","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","_useTheme$theme$color","colors","border","white_snow","_useChatContext","useChatContext","client","displayName","useChannelPreviewDisplayName","Math","floor","_useState","useState","muteStatus","muted","_useState2","_slicedToArray2","isChannelMuted","setIsChannelMuted","useEffect","handleEvent","on","off","createElement","TouchableOpacity","onPress","style","backgroundColor","borderBottomColor","testID","__self","__source","fileName","lineNumber","columnNumber","View","id","MemoizedChannelPreviewMessengerWithContext","React","memo","ChannelPreviewMessenger","_useChannelsContext","useChannelsContext","_extends2","exports"],"sources":["ChannelPreviewMessenger.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\n\nimport { ChannelAvatar } from './ChannelAvatar';\nimport type { ChannelPreviewProps } from './ChannelPreview';\nimport { ChannelPreviewMessage } from './ChannelPreviewMessage';\nimport { ChannelPreviewMutedStatus } from './ChannelPreviewMutedStatus';\nimport { ChannelPreviewStatus } from './ChannelPreviewStatus';\nimport { ChannelPreviewTitle } from './ChannelPreviewTitle';\nimport { ChannelPreviewUnreadCount } from './ChannelPreviewUnreadCount';\nimport { useChannelPreviewDisplayName } from './hooks/useChannelPreviewDisplayName';\n\nimport type { LatestMessagePreview } from './hooks/useLatestMessagePreview';\n\nimport {\n ChannelsContextValue,\n useChannelsContext,\n} from '../../contexts/channelsContext/ChannelsContext';\nimport { useChatContext } from '../../contexts/chatContext/ChatContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n container: {\n borderBottomWidth: 1,\n flex: 1,\n flexDirection: 'row',\n paddingHorizontal: 8,\n paddingVertical: 12,\n },\n contentContainer: { flex: 1 },\n row: {\n alignItems: 'center',\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingLeft: 8,\n },\n statusContainer: {\n display: 'flex',\n flexDirection: 'row',\n },\n title: { fontSize: 14, fontWeight: '700' },\n});\n\nexport type ChannelPreviewMessengerPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> &\n Pick<\n ChannelsContextValue<StreamChatGenerics>,\n | 'maxUnreadCount'\n | 'onSelect'\n | 'PreviewAvatar'\n | 'PreviewMessage'\n | 'PreviewMutedStatus'\n | 'PreviewStatus'\n | 'PreviewTitle'\n | 'PreviewUnreadCount'\n > & {\n /**\n * Latest message on a channel, formatted for preview\n *\n * e.g.,\n *\n * ```json\n * {\n * created_at: '' ,\n * messageObject: { ... },\n * previews: {\n * bold: true,\n * text: 'This is the message preview text'\n * },\n * status: 0 | 1 | 2 // read states of the latest message.\n * }\n * ```\n *\n * The read status is either of the following:\n *\n * 0: The message was not sent by the current user\n * 1: The message was sent by the current user and is unread\n * 2: The message was sent by the current user and is read\n *\n * @overrideType object\n */\n latestMessagePreview: LatestMessagePreview<StreamChatGenerics>;\n /**\n * Formatter function for date of latest message.\n * @param date Message date\n * @returns Formatted date string\n *\n * By default today's date is shown in 'HH:mm A' format and other dates\n * are displayed in 'DD/MM/YY' format. props.latestMessage.created_at is the\n * default formatted date. This default logic is part of ChannelPreview component.\n */\n formatLatestMessageDate?: (date: Date) => string;\n /** Number of unread messages on the channel */\n unread?: number;\n };\n\nconst ChannelPreviewMessengerWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n channel,\n formatLatestMessageDate,\n latestMessagePreview,\n maxUnreadCount,\n onSelect,\n PreviewAvatar = ChannelAvatar,\n PreviewMessage = ChannelPreviewMessage,\n PreviewStatus = ChannelPreviewStatus,\n PreviewTitle = ChannelPreviewTitle,\n PreviewUnreadCount = ChannelPreviewUnreadCount,\n PreviewMutedStatus = ChannelPreviewMutedStatus,\n unread,\n } = props;\n const { vw } = useViewport();\n\n const maxWidth = vw(80) - 16 - 40;\n\n const {\n theme: {\n channelPreview: { container, contentContainer, row, title },\n colors: { border, white_snow },\n },\n } = useTheme();\n\n const { client } = useChatContext<StreamChatGenerics>();\n\n const displayName = useChannelPreviewDisplayName(\n channel,\n Math.floor(maxWidth / ((title.fontSize || styles.title.fontSize) / 2)),\n );\n\n const [isChannelMuted, setIsChannelMuted] = useState(() => channel.muteStatus().muted);\n\n useEffect(() => {\n const handleEvent = () => setIsChannelMuted(channel.muteStatus().muted);\n\n client.on('notification.channel_mutes_updated', handleEvent);\n return () => client.off('notification.channel_mutes_updated', handleEvent);\n }, [client]);\n\n return (\n <TouchableOpacity\n onPress={() => {\n if (onSelect) {\n onSelect(channel);\n }\n }}\n style={[\n styles.container,\n { backgroundColor: white_snow, borderBottomColor: border },\n container,\n ]}\n testID='channel-preview-button'\n >\n <PreviewAvatar channel={channel} />\n <View\n style={[styles.contentContainer, contentContainer]}\n testID={`channel-preview-content-${channel.id}`}\n >\n <View style={[styles.row, row]}>\n <PreviewTitle displayName={displayName} />\n <View style={[styles.statusContainer, row]}>\n {isChannelMuted && <PreviewMutedStatus />}\n <PreviewUnreadCount maxUnreadCount={maxUnreadCount} unread={unread} />\n </View>\n </View>\n <View style={[styles.row, row]}>\n <PreviewMessage latestMessagePreview={latestMessagePreview} />\n <PreviewStatus\n formatLatestMessageDate={formatLatestMessageDate}\n latestMessagePreview={latestMessagePreview}\n />\n </View>\n </View>\n </TouchableOpacity>\n );\n};\n\nexport type ChannelPreviewMessengerProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<\n Omit<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'channel' | 'latestMessagePreview'\n >\n> &\n Pick<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'channel' | 'latestMessagePreview'\n >;\n\nconst MemoizedChannelPreviewMessengerWithContext = React.memo(\n ChannelPreviewMessengerWithContext,\n) as typeof ChannelPreviewMessengerWithContext;\n\n/**\n * This UI component displays an individual preview item for each channel in a list. It also receives all props\n * from the ChannelPreview component.\n */\nexport const ChannelPreviewMessenger = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewMessengerProps<StreamChatGenerics>,\n) => {\n const {\n maxUnreadCount,\n onSelect,\n PreviewAvatar,\n PreviewMessage,\n PreviewMutedStatus,\n PreviewStatus,\n PreviewTitle,\n PreviewUnreadCount,\n } = useChannelsContext<StreamChatGenerics>();\n return (\n <MemoizedChannelPreviewMessengerWithContext\n {...{\n maxUnreadCount,\n onSelect,\n PreviewAvatar,\n PreviewMessage,\n PreviewMutedStatus,\n PreviewStatus,\n PreviewTitle,\n PreviewUnreadCount,\n }}\n {...props}\n />\n );\n};\n\nChannelPreviewMessenger.displayName = 'ChannelPreviewMessenger{channelPreview}';\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,0BAAA,GAAAR,OAAA;AACA,IAAAS,6BAAA,GAAAT,OAAA;AAIA,IAAAU,gBAAA,GAAAV,OAAA;AAIA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AAAsD,IAAAc,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA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kB,EAAlBA;EAAkB,GAEhBnB,KAAK;IAAAiE,MAAA,EAAA7G,KAAA;IAAA8G,QAAA;MAAAC,QAAA,EAAA9G,YAAA;MAAA+G,UAAA;MAAAC,YAAA;IAAA;EAAA,EACV,CAAC;AAEN,CAAC;AAACU,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEFA,uBAAuB,CAACjC,WAAW,GAAG,yCAAyC"}
@@ -42,7 +42,7 @@ var ChannelPreviewStatus = function ChannelPreviewStatus(props) {
42
42
  __self: _this,
43
43
  __source: {
44
44
  fileName: _jsxFileName,
45
- lineNumber: 50,
45
+ lineNumber: 48,
46
46
  columnNumber: 5
47
47
  }
48
48
  }, status === _useLatestMessagePreview.MessageReadStatus.READ ? _react["default"].createElement(_icons.CheckAll, (0, _extends2["default"])({
@@ -51,7 +51,7 @@ var ChannelPreviewStatus = function ChannelPreviewStatus(props) {
51
51
  __self: _this,
52
52
  __source: {
53
53
  fileName: _jsxFileName,
54
- lineNumber: 52,
54
+ lineNumber: 50,
55
55
  columnNumber: 9
56
56
  }
57
57
  })) : status === _useLatestMessagePreview.MessageReadStatus.UNREAD ? _react["default"].createElement(_icons.Check, (0, _extends2["default"])({
@@ -60,7 +60,7 @@ var ChannelPreviewStatus = function ChannelPreviewStatus(props) {
60
60
  __self: _this,
61
61
  __source: {
62
62
  fileName: _jsxFileName,
63
- lineNumber: 54,
63
+ lineNumber: 52,
64
64
  columnNumber: 9
65
65
  }
66
66
  })) : null, _react["default"].createElement(_reactNative.Text, {
@@ -70,7 +70,7 @@ var ChannelPreviewStatus = function ChannelPreviewStatus(props) {
70
70
  __self: _this,
71
71
  __source: {
72
72
  fileName: _jsxFileName,
73
- lineNumber: 56,
73
+ lineNumber: 54,
74
74
  columnNumber: 7
75
75
  }
76
76
  }, formatLatestMessageDate && latestMessageDate ? formatLatestMessageDate(latestMessageDate) : latestMessagePreview.created_at));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useLatestMessagePreview","_ThemeContext","_icons","_this","_jsxFileName","styles","StyleSheet","create","date","fontSize","marginLeft","textAlign","flexRow","flexDirection","ChannelPreviewStatus","props","_latestMessagePreview","formatLatestMessageDate","latestMessagePreview","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","checkAllIcon","checkIcon","_useTheme$theme$color","colors","accent_blue","grey","created_at","messageObject","latestMessageDate","Date","status","createElement","View","style","__self","__source","fileName","lineNumber","columnNumber","MessageReadStatus","READ","CheckAll","_extends2","pathFill","UNREAD","Check","Text","color","exports"],"sources":["ChannelPreviewStatus.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ChannelPreviewProps } from './ChannelPreview';\nimport type { ChannelPreviewMessengerPropsWithContext } from './ChannelPreviewMessenger';\nimport { MessageReadStatus } from './hooks/useLatestMessagePreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Check, CheckAll } from '../../icons';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n date: {\n fontSize: 12,\n marginLeft: 2,\n textAlign: 'right',\n },\n flexRow: {\n flexDirection: 'row',\n },\n});\n\nexport type ChannelPreviewStatusProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'latestMessagePreview' | 'formatLatestMessageDate'\n> &\n Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'>;\n\nexport const ChannelPreviewStatus = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewStatusProps<StreamChatGenerics>,\n) => {\n const { formatLatestMessageDate, latestMessagePreview } = props;\n const {\n theme: {\n channelPreview: { checkAllIcon, checkIcon, date },\n colors: { accent_blue, grey },\n },\n } = useTheme();\n\n const created_at = latestMessagePreview.messageObject?.created_at;\n const latestMessageDate = created_at ? new Date(created_at) : new Date();\n const status = latestMessagePreview.status;\n\n return (\n <View style={styles.flexRow}>\n {status === MessageReadStatus.READ ? (\n <CheckAll pathFill={accent_blue} {...checkAllIcon} />\n ) : status === MessageReadStatus.UNREAD ? (\n <Check pathFill={grey} {...checkIcon} />\n ) : null}\n <Text style={[styles.date, { color: grey }, date]}>\n {formatLatestMessageDate && latestMessageDate\n ? formatLatestMessageDate(latestMessageDate)\n : latestMessagePreview.created_at}\n </Text>\n </View>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,wBAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA8C,IAAAK,KAAA;EAAAC,YAAA;AAI9C,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,IAAI,EAAE;IACJC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,CAAC;IACbC,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAUK,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAG/BC,KAAoD,EACjD;EAAA,IAAAC,qBAAA;EACH,IAAQC,uBAAuB,GAA2BF,KAAK,CAAvDE,uBAAuB;IAAEC,oBAAoB,GAAKH,KAAK,CAA9BG,oBAAoB;EACrD,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IAAAC,qBAAA,GAAAF,eAAA,CACHG,cAAc;IAAIC,YAAY,GAAAF,qBAAA,CAAZE,YAAY;IAAEC,SAAS,GAAAH,qBAAA,CAATG,SAAS;IAAElB,IAAI,GAAAe,qBAAA,CAAJf,IAAI;IAAAmB,qBAAA,GAAAN,eAAA,CAC/CO,MAAM;IAAI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EtB,IAAI,CAAE;IAAA+B,MAAA,EAAApC,KAAA;IAAAqC,QAAA;MAAAC,QAAA,EAAArC,YAAA;MAAAsC,UAAA;MAAAC,YAAA;IAAA;EAAA,GAC/C1B,uBAAuB,IAAIgB,iBAAiB,GACzChB,uBAAuB,CAACgB,iBAAiB,CAAC,GAC1Cf,oBAAoB,CAACa,UACrB,CACF,CAAC;AAEX,CAAC;AAACsB,OAAA,CAAAvC,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useLatestMessagePreview","_ThemeContext","_icons","_this","_jsxFileName","styles","StyleSheet","create","date","fontSize","marginLeft","textAlign","flexRow","flexDirection","ChannelPreviewStatus","props","_latestMessagePreview","formatLatestMessageDate","latestMessagePreview","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","checkAllIcon","checkIcon","_useTheme$theme$color","colors","accent_blue","grey","created_at","messageObject","latestMessageDate","Date","status","createElement","View","style","__self","__source","fileName","lineNumber","columnNumber","MessageReadStatus","READ","CheckAll","_extends2","pathFill","UNREAD","Check","Text","color","exports"],"sources":["ChannelPreviewStatus.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ChannelPreviewMessengerPropsWithContext } from './ChannelPreviewMessenger';\nimport { MessageReadStatus } from './hooks/useLatestMessagePreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Check, CheckAll } from '../../icons';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n date: {\n fontSize: 12,\n marginLeft: 2,\n textAlign: 'right',\n },\n flexRow: {\n flexDirection: 'row',\n },\n});\n\nexport type ChannelPreviewStatusProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,\n 'latestMessagePreview' | 'formatLatestMessageDate'\n>;\n\nexport const ChannelPreviewStatus = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewStatusProps<StreamChatGenerics>,\n) => {\n const { formatLatestMessageDate, latestMessagePreview } = props;\n const {\n theme: {\n channelPreview: { checkAllIcon, checkIcon, date },\n colors: { accent_blue, grey },\n },\n } = useTheme();\n\n const created_at = latestMessagePreview.messageObject?.created_at;\n const latestMessageDate = created_at ? new Date(created_at) : new Date();\n const status = latestMessagePreview.status;\n\n return (\n <View style={styles.flexRow}>\n {status === MessageReadStatus.READ ? (\n <CheckAll pathFill={accent_blue} {...checkAllIcon} />\n ) : status === MessageReadStatus.UNREAD ? (\n <Check pathFill={grey} {...checkIcon} />\n ) : null}\n <Text style={[styles.date, { color: grey }, date]}>\n {formatLatestMessageDate && latestMessageDate\n ? formatLatestMessageDate(latestMessageDate)\n : latestMessagePreview.created_at}\n </Text>\n </View>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,wBAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA8C,IAAAK,KAAA;EAAAC,YAAA;AAI9C,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,IAAI,EAAE;IACJC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,CAAC;IACbC,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AASK,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAG/BC,KAAoD,EACjD;EAAA,IAAAC,qBAAA;EACH,IAAQC,uBAAuB,GAA2BF,KAAK,CAAvDE,uBAAuB;IAAEC,oBAAoB,GAAKH,KAAK,CAA9BG,oBAAoB;EACrD,IAAAC,SAAA,GAKI,IAAAC,sBAA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AA,EAAApC,KAAA;IAAAqC,QAAA;MAAAC,QAAA,EAAArC,YAAA;MAAAsC,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG,CAAC,GACtC,IAAI,EACR/C,MAAA,YAAAwC,aAAA,CAACrC,YAAA,CAAAoD,IAAI;IAACb,KAAK,EAAE,CAACjC,MAAM,CAACG,IAAI,EAAE;MAAE4C,KAAK,EAAEtB;IAAK,CAAC,EAAEtB,IAAI,CAAE;IAAA+B,MAAA,EAAApC,KAAA;IAAAqC,QAAA;MAAAC,QAAA,EAAArC,YAAA;MAAAsC,UAAA;MAAAC,YAAA;IAAA;EAAA,GAC/C1B,uBAAuB,IAAIgB,iBAAiB,GACzChB,uBAAuB,CAACgB,iBAAiB,CAAC,GAC1Cf,oBAAoB,CAACa,UACrB,CACF,CAAC;AAEX,CAAC;AAACsB,OAAA,CAAAvC,oBAAA,GAAAA,oBAAA"}
@@ -28,7 +28,7 @@ var ChannelPreviewTitle = function ChannelPreviewTitle(props) {
28
28
  __self: _this,
29
29
  __source: {
30
30
  fileName: _jsxFileName,
31
- lineNumber: 34,
31
+ lineNumber: 27,
32
32
  columnNumber: 5
33
33
  }
34
34
  }, displayName);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","styles","StyleSheet","create","title","fontSize","fontWeight","ChannelPreviewTitle","props","displayName","_useTheme","useTheme","_useTheme$theme","theme","channelPreview","black","colors","createElement","Text","numberOfLines","style","color","__self","__source","fileName","lineNumber","columnNumber","exports"],"sources":["ChannelPreviewTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport type { ChannelPreviewProps } from './ChannelPreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst styles = StyleSheet.create({\n title: { fontSize: 14, fontWeight: '700' },\n});\n\nexport type ChannelPreviewTitleProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {\n displayName: string;\n};\n\nexport const ChannelPreviewTitle = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewTitleProps<StreamChatGenerics>,\n) => {\n const { displayName } = props;\n const {\n theme: {\n channelPreview: { title },\n colors: { black },\n },\n } = useTheme();\n\n return (\n <Text numberOfLines={1} style={[styles.title, { color: black }, title]}>\n {displayName}\n </Text>\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,aAAA,GAAAF,OAAA;AAAoE,IAAAG,KAAA;EAAAC,YAAA;AAIpE,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,KAAK,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAM;AAC3C,CAAC,CAAC;AAQK,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAG9BC,KAAmD,EAChD;EACH,IAAQC,WAAW,GAAKD,KAAK,CAArBC,WAAW;EACnB,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IACeT,KAAK,GAAAQ,eAAA,CAAvBE,cAAc,CAAIV,KAAK;IACbW,KAAK,GAAAH,eAAA,CAAfI,MAAM,CAAID,KAAK;EAInB,OACErB,MAAA,YAAAuB,aAAA,CAACpB,YAAA,CAAAqB,IAAI;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAE,CAACnB,MAAM,CAACG,KAAK,EAAE;MAAEiB,KAAK,EAAEN;IAAM,CAAC,EAAEX,KAAK,CAAE;IAAAkB,MAAA,EAAAvB,KAAA;IAAAwB,QAAA;MAAAC,QAAA,EAAAxB,YAAA;MAAAyB,UAAA;MAAAC,YAAA;IAAA;EAAA,GACpEjB,WACG,CAAC;AAEX,CAAC;AAACkB,OAAA,CAAApB,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","styles","StyleSheet","create","title","fontSize","fontWeight","ChannelPreviewTitle","props","displayName","_useTheme","useTheme","_useTheme$theme","theme","channelPreview","black","colors","createElement","Text","numberOfLines","style","color","__self","__source","fileName","lineNumber","columnNumber","exports"],"sources":["ChannelPreviewTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nconst styles = StyleSheet.create({\n title: { fontSize: 14, fontWeight: '700' },\n});\n\nexport type ChannelPreviewTitleProps = {\n /**\n * Formatted name for the previewed channel.\n */\n displayName: string;\n};\n\nexport const ChannelPreviewTitle = (props: ChannelPreviewTitleProps) => {\n const { displayName } = props;\n const {\n theme: {\n channelPreview: { title },\n colors: { black },\n },\n } = useTheme();\n\n return (\n <Text numberOfLines={1} style={[styles.title, { color: black }, title]}>\n {displayName}\n </Text>\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAAoE,IAAAG,KAAA;EAAAC,YAAA;AAEpE,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,KAAK,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAM;AAC3C,CAAC,CAAC;AASK,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAA+B,EAAK;EACtE,IAAQC,WAAW,GAAKD,KAAK,CAArBC,WAAW;EACnB,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IACeT,KAAK,GAAAQ,eAAA,CAAvBE,cAAc,CAAIV,KAAK;IACbW,KAAK,GAAAH,eAAA,CAAfI,MAAM,CAAID,KAAK;EAInB,OACErB,MAAA,YAAAuB,aAAA,CAACpB,YAAA,CAAAqB,IAAI;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAE,CAACnB,MAAM,CAACG,KAAK,EAAE;MAAEiB,KAAK,EAAEN;IAAM,CAAC,EAAEX,KAAK,CAAE;IAAAkB,MAAA,EAAAvB,KAAA;IAAAwB,QAAA;MAAAC,QAAA,EAAAxB,YAAA;MAAAyB,UAAA;MAAAC,YAAA;IAAA;EAAA,GACpEjB,WACG,CAAC;AAEX,CAAC;AAACkB,OAAA,CAAApB,mBAAA,GAAAA,mBAAA"}
@@ -25,7 +25,7 @@ var ChannelPreviewUnreadCount = function ChannelPreviewUnreadCount(props) {
25
25
  __self: _this,
26
26
  __source: {
27
27
  fileName: _jsxFileName,
28
- lineNumber: 33,
28
+ lineNumber: 34,
29
29
  columnNumber: 5
30
30
  }
31
31
  }, _react["default"].createElement(_reactNative.Text, {
@@ -34,7 +34,7 @@ var ChannelPreviewUnreadCount = function ChannelPreviewUnreadCount(props) {
34
34
  __self: _this,
35
35
  __source: {
36
36
  fileName: _jsxFileName,
37
- lineNumber: 34,
37
+ lineNumber: 35,
38
38
  columnNumber: 7
39
39
  }
40
40
  }, unread > maxUnreadCount ? maxUnreadCount + "+" : unread));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","ChannelPreviewUnreadCount","props","maxUnreadCount","unread","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","unreadContainer","unreadText","accent_red","colors","createElement","View","style","styles","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","Text","numberOfLines","exports","StyleSheet","create","alignItems","borderRadius","flexShrink","justifyContent","color","fontSize","fontWeight","paddingHorizontal","paddingVertical"],"sources":["ChannelPreviewUnreadCount.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ChannelPreviewProps } from './ChannelPreview';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewUnreadCountProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {\n maxUnreadCount: number;\n unread?: number;\n};\n\nexport const ChannelPreviewUnreadCount = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewUnreadCountProps<StreamChatGenerics>,\n) => {\n const { maxUnreadCount, unread } = props;\n const {\n theme: {\n channelPreview: { unreadContainer, unreadText },\n colors: { accent_red },\n },\n } = useTheme();\n\n if (!unread) return null;\n\n return (\n <View style={[styles.unreadContainer, { backgroundColor: accent_red }, unreadContainer]}>\n <Text numberOfLines={1} style={[styles.unreadText, unreadText]}>\n {unread > maxUnreadCount ? `${maxUnreadCount}+` : unread}\n </Text>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n unreadContainer: {\n alignItems: 'center',\n borderRadius: 8,\n flexShrink: 1,\n justifyContent: 'center',\n },\n unreadText: {\n color: '#FFFFFF',\n fontSize: 11,\n fontWeight: '700',\n paddingHorizontal: 5,\n paddingVertical: 1,\n },\n});\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,aAAA,GAAAF,OAAA;AAAoE,IAAAG,KAAA;EAAAC,YAAA;AAW7D,IAAMC,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAGpCC,KAAyD,EACtD;EACH,IAAQC,cAAc,GAAaD,KAAK,CAAhCC,cAAc;IAAEC,MAAM,GAAKF,KAAK,CAAhBE,MAAM;EAC9B,IAAAC,SAAA,GAKI,I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pBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ThemeContext","_this","_jsxFileName","ChannelPreviewUnreadCount","props","maxUnreadCount","unread","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$chann","channelPreview","unreadContainer","unreadText","accent_red","colors","createElement","View","style","styles","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","Text","numberOfLines","exports","StyleSheet","create","alignItems","borderRadius","flexShrink","justifyContent","color","fontSize","fontWeight","paddingHorizontal","paddingVertical"],"sources":["ChannelPreviewUnreadCount.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport type { ChannelsContextValue } from '../../contexts/channelsContext/ChannelsContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nexport type ChannelPreviewUnreadCountProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<ChannelsContextValue<StreamChatGenerics>, 'maxUnreadCount'> & {\n /**\n * Number of unread messages on the channel\n */\n unread?: number;\n};\n\nexport const ChannelPreviewUnreadCount = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ChannelPreviewUnreadCountProps<StreamChatGenerics>,\n) => {\n const { maxUnreadCount, unread } = props;\n const {\n theme: {\n channelPreview: { unreadContainer, unreadText },\n colors: { accent_red },\n },\n } = useTheme();\n\n if (!unread) return null;\n\n return (\n <View style={[styles.unreadContainer, { backgroundColor: accent_red }, unreadContainer]}>\n <Text numberOfLines={1} style={[styles.unreadText, unreadText]}>\n {unread > maxUnreadCount ? `${maxUnreadCount}+` : unread}\n </Text>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n unreadContainer: {\n alignItems: 'center',\n borderRadius: 8,\n flexShrink: 1,\n justifyContent: 'center',\n },\n unreadText: {\n color: '#FFFFFF',\n fontSize: 11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AMA,cAAc,SAAMC,MAC9C,CACF,CAAC;AAEX,CAAC;AAACuB,OAAA,CAAA1B,yBAAA,GAAAA,yBAAA;AAEF,IAAMiB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BlB,eAAe,EAAE;IACfmB,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,CAAC;IACbC,cAAc,EAAE;EAClB,CAAC;EACDrB,UAAU,EAAE;IACVsB,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"}
@@ -517,7 +517,7 @@ var MessageWithContext = function MessageWithContext(props) {
517
517
  __self: _this,
518
518
  __source: {
519
519
  fileName: _jsxFileName,
520
- lineNumber: 731,
520
+ lineNumber: 740,
521
521
  columnNumber: 5
522
522
  }
523
523
  }, _react["default"].createElement(_reactNative.View, {
@@ -527,7 +527,7 @@ var MessageWithContext = function MessageWithContext(props) {
527
527
  __self: _this,
528
528
  __source: {
529
529
  fileName: _jsxFileName,
530
- lineNumber: 740,
530
+ lineNumber: 749,
531
531
  columnNumber: 7
532
532
  }
533
533
  }, _react["default"].createElement(_reactNative.View, {
@@ -537,7 +537,7 @@ var MessageWithContext = function MessageWithContext(props) {
537
537
  __self: _this,
538
538
  __source: {
539
539
  fileName: _jsxFileName,
540
- lineNumber: 748,
540
+ lineNumber: 757,
541
541
  columnNumber: 9
542
542
  }
543
543
  }, _react["default"].createElement(_MessageContext.MessageProvider, {
@@ -545,14 +545,14 @@ var MessageWithContext = function MessageWithContext(props) {
545
545
  __self: _this,
546
546
  __source: {
547
547
  fileName: _jsxFileName,
548
- lineNumber: 755,
548
+ lineNumber: 764,
549
549
  columnNumber: 11
550
550
  }
551
551
  }, _react["default"].createElement(MessageSimple, {
552
552
  __self: _this,
553
553
  __source: {
554
554
  fileName: _jsxFileName,
555
- lineNumber: 756,
555
+ lineNumber: 765,
556
556
  columnNumber: 13
557
557
  }
558
558
  }), isBounceDialogOpen && _react["default"].createElement(MessageBounce, {
@@ -560,7 +560,7 @@ var MessageWithContext = function MessageWithContext(props) {
560
560
  __self: _this,
561
561
  __source: {
562
562
  fileName: _jsxFileName,
563
- lineNumber: 757,
563
+ lineNumber: 766,
564
564
  columnNumber: 36
565
565
  }
566
566
  })))));
@@ -681,7 +681,7 @@ var Message = function Message(props) {
681
681
  __self: _this,
682
682
  __source: {
683
683
  fileName: _jsxFileName,
684
- lineNumber: 936,
684
+ lineNumber: 945,
685
685
  columnNumber: 5
686
686
  }
687
687
  }));