stream-chat-react-native-core 7.0.0-rc.9 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/components/Attachment/Gallery.js +16 -3
  3. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  4. package/lib/commonjs/components/Attachment/ImageReloadIndicator.js.map +1 -1
  5. package/lib/commonjs/components/Channel/Channel.js +8 -5
  6. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  7. package/lib/commonjs/components/Channel/hooks/useChannelDataState.js.map +1 -1
  8. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  9. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  10. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  11. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
  12. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  13. package/lib/commonjs/components/Message/Message.js +12 -6
  14. package/lib/commonjs/components/Message/Message.js.map +1 -1
  15. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  16. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +14 -6
  17. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  18. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  19. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  20. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +3 -1
  21. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  22. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  23. package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
  24. package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +2 -1
  25. package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
  26. package/lib/commonjs/components/MessageList/MessageList.js +9 -7
  27. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  28. package/lib/commonjs/components/MessageList/hooks/useMessageList.js +18 -24
  29. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  30. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +1 -1
  31. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
  32. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  33. package/lib/commonjs/components/MessageList/utils/getReadState.js +20 -0
  34. package/lib/commonjs/components/MessageList/utils/getReadState.js.map +1 -0
  35. package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
  36. package/lib/commonjs/components/Poll/components/Button.js.map +1 -1
  37. package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
  38. package/lib/commonjs/components/Reply/Reply.js +2 -2
  39. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  40. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +1 -0
  41. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  42. package/lib/commonjs/components/ThreadList/ThreadListItem.js.map +1 -1
  43. package/lib/commonjs/components/index.js +15 -4
  44. package/lib/commonjs/components/index.js.map +1 -1
  45. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +5 -1
  46. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
  47. package/lib/commonjs/contexts/debugContext/DebugContext.js.map +1 -1
  48. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  49. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  50. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  51. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  52. package/lib/commonjs/contexts/pollContext/pollContext.js.map +1 -1
  53. package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
  54. package/lib/commonjs/contexts/threadsContext/ThreadListItemContext.js.map +1 -1
  55. package/lib/commonjs/hooks/index.js +11 -0
  56. package/lib/commonjs/hooks/index.js.map +1 -1
  57. package/lib/commonjs/i18n/en.json +3 -0
  58. package/lib/commonjs/i18n/es.json +3 -0
  59. package/lib/commonjs/i18n/fr.json +3 -0
  60. package/lib/commonjs/i18n/he.json +3 -0
  61. package/lib/commonjs/i18n/hi.json +2 -0
  62. package/lib/commonjs/i18n/it.json +3 -0
  63. package/lib/commonjs/i18n/ja.json +1 -0
  64. package/lib/commonjs/i18n/ko.json +1 -0
  65. package/lib/commonjs/i18n/nl.json +2 -0
  66. package/lib/commonjs/i18n/pt-br.json +3 -0
  67. package/lib/commonjs/i18n/ru.json +4 -0
  68. package/lib/commonjs/i18n/tr.json +2 -0
  69. package/lib/commonjs/utils/removeReservedFields.js.map +1 -1
  70. package/lib/commonjs/utils/utils.js +1 -3
  71. package/lib/commonjs/utils/utils.js.map +1 -1
  72. package/lib/commonjs/version.json +1 -1
  73. package/lib/module/components/Attachment/Gallery.js +16 -3
  74. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  75. package/lib/module/components/Attachment/ImageReloadIndicator.js.map +1 -1
  76. package/lib/module/components/Channel/Channel.js +8 -5
  77. package/lib/module/components/Channel/Channel.js.map +1 -1
  78. package/lib/module/components/Channel/hooks/useChannelDataState.js.map +1 -1
  79. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  80. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  81. package/lib/module/components/Chat/Chat.js.map +1 -1
  82. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
  83. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  84. package/lib/module/components/Message/Message.js +12 -6
  85. package/lib/module/components/Message/Message.js.map +1 -1
  86. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  87. package/lib/module/components/Message/MessageSimple/MessageStatus.js +14 -6
  88. package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  89. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  90. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  91. package/lib/module/components/Message/hooks/useCreateMessageContext.js +3 -1
  92. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  93. package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  94. package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
  95. package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +2 -1
  96. package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
  97. package/lib/module/components/MessageList/MessageList.js +9 -7
  98. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  99. package/lib/module/components/MessageList/hooks/useMessageList.js +18 -24
  100. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  101. package/lib/module/components/MessageList/utils/getGroupStyles.js +1 -1
  102. package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
  103. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  104. package/lib/module/components/MessageList/utils/getReadState.js +20 -0
  105. package/lib/module/components/MessageList/utils/getReadState.js.map +1 -0
  106. package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
  107. package/lib/module/components/Poll/components/Button.js.map +1 -1
  108. package/lib/module/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
  109. package/lib/module/components/Reply/Reply.js +2 -2
  110. package/lib/module/components/Reply/Reply.js.map +1 -1
  111. package/lib/module/components/Thread/components/ThreadFooterComponent.js +1 -0
  112. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  113. package/lib/module/components/ThreadList/ThreadListItem.js.map +1 -1
  114. package/lib/module/components/index.js +15 -4
  115. package/lib/module/components/index.js.map +1 -1
  116. package/lib/module/contexts/channelsStateContext/useChannelState.js +5 -1
  117. package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
  118. package/lib/module/contexts/debugContext/DebugContext.js.map +1 -1
  119. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  120. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  121. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  122. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  123. package/lib/module/contexts/pollContext/pollContext.js.map +1 -1
  124. package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
  125. package/lib/module/contexts/threadsContext/ThreadListItemContext.js.map +1 -1
  126. package/lib/module/hooks/index.js +11 -0
  127. package/lib/module/hooks/index.js.map +1 -1
  128. package/lib/module/i18n/en.json +3 -0
  129. package/lib/module/i18n/es.json +3 -0
  130. package/lib/module/i18n/fr.json +3 -0
  131. package/lib/module/i18n/he.json +3 -0
  132. package/lib/module/i18n/hi.json +2 -0
  133. package/lib/module/i18n/it.json +3 -0
  134. package/lib/module/i18n/ja.json +1 -0
  135. package/lib/module/i18n/ko.json +1 -0
  136. package/lib/module/i18n/nl.json +2 -0
  137. package/lib/module/i18n/pt-br.json +3 -0
  138. package/lib/module/i18n/ru.json +4 -0
  139. package/lib/module/i18n/tr.json +2 -0
  140. package/lib/module/utils/removeReservedFields.js.map +1 -1
  141. package/lib/module/utils/utils.js +1 -3
  142. package/lib/module/utils/utils.js.map +1 -1
  143. package/lib/module/version.json +1 -1
  144. package/lib/typescript/components/Attachment/Gallery.d.ts +3 -3
  145. package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
  146. package/lib/typescript/components/Attachment/ImageReloadIndicator.d.ts +4 -3
  147. package/lib/typescript/components/Attachment/ImageReloadIndicator.d.ts.map +1 -1
  148. package/lib/typescript/components/Channel/Channel.d.ts +3 -4
  149. package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
  150. package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts +2 -3
  151. package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts.map +1 -1
  152. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  153. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
  154. package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +4 -4
  155. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts +1 -1
  156. package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +1 -1
  157. package/lib/typescript/components/Chat/Chat.d.ts +0 -9
  158. package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
  159. package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleView.d.ts.map +1 -1
  160. package/lib/typescript/components/Message/Message.d.ts +4 -5
  161. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  162. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -3
  163. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts.map +1 -1
  164. package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +1 -1
  165. package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts.map +1 -1
  166. package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts.map +1 -1
  167. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +2 -2
  168. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts.map +1 -1
  169. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
  170. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
  171. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts.map +1 -1
  172. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +2 -2
  173. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts.map +1 -1
  174. package/lib/typescript/components/MessageList/MessageList.d.ts +3 -3
  175. package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
  176. package/lib/typescript/components/MessageList/MessageSystem.d.ts +2 -2
  177. package/lib/typescript/components/MessageList/MessageSystem.d.ts.map +1 -1
  178. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +11 -10
  179. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts.map +1 -1
  180. package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts.map +1 -1
  181. package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
  182. package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts.map +1 -1
  183. package/lib/typescript/components/MessageList/utils/getReadState.d.ts +9 -0
  184. package/lib/typescript/components/MessageList/utils/getReadState.d.ts.map +1 -0
  185. package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts +2 -3
  186. package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +1 -1
  187. package/lib/typescript/components/Poll/components/Button.d.ts +2 -3
  188. package/lib/typescript/components/Poll/components/Button.d.ts.map +1 -1
  189. package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts +2 -3
  190. package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts.map +1 -1
  191. package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
  192. package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts.map +1 -1
  193. package/lib/typescript/components/ThreadList/ThreadListItem.d.ts.map +1 -1
  194. package/lib/typescript/components/index.d.ts +2 -1
  195. package/lib/typescript/components/index.d.ts.map +1 -1
  196. package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts.map +1 -1
  197. package/lib/typescript/contexts/debugContext/DebugContext.d.ts +2 -3
  198. package/lib/typescript/contexts/debugContext/DebugContext.d.ts.map +1 -1
  199. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +3 -3
  200. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
  201. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +6 -4
  202. package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
  203. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +4 -5
  204. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
  205. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +24 -20
  206. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
  207. package/lib/typescript/contexts/pollContext/pollContext.d.ts +2 -3
  208. package/lib/typescript/contexts/pollContext/pollContext.d.ts.map +1 -1
  209. package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +4 -5
  210. package/lib/typescript/contexts/threadContext/ThreadContext.d.ts.map +1 -1
  211. package/lib/typescript/contexts/threadsContext/ThreadListItemContext.d.ts +3 -4
  212. package/lib/typescript/contexts/threadsContext/ThreadListItemContext.d.ts.map +1 -1
  213. package/lib/typescript/hooks/index.d.ts +1 -0
  214. package/lib/typescript/hooks/index.d.ts.map +1 -1
  215. package/lib/typescript/hooks/useTranslatedMessage.d.ts +55 -55
  216. package/lib/typescript/hooks/useTranslatedMessage.d.ts.map +1 -1
  217. package/lib/typescript/i18n/en.json +3 -0
  218. package/lib/typescript/i18n/es.json +3 -0
  219. package/lib/typescript/i18n/fr.json +3 -0
  220. package/lib/typescript/i18n/he.json +3 -0
  221. package/lib/typescript/i18n/hi.json +2 -0
  222. package/lib/typescript/i18n/it.json +3 -0
  223. package/lib/typescript/i18n/ja.json +1 -0
  224. package/lib/typescript/i18n/ko.json +1 -0
  225. package/lib/typescript/i18n/nl.json +2 -0
  226. package/lib/typescript/i18n/pt-br.json +3 -0
  227. package/lib/typescript/i18n/ru.json +4 -0
  228. package/lib/typescript/i18n/tr.json +2 -0
  229. package/lib/typescript/utils/i18n/Streami18n.d.ts +3 -0
  230. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  231. package/lib/typescript/utils/removeReservedFields.d.ts +2 -3
  232. package/lib/typescript/utils/removeReservedFields.d.ts.map +1 -1
  233. package/lib/typescript/utils/utils.d.ts +5 -6
  234. package/lib/typescript/utils/utils.d.ts.map +1 -1
  235. package/package.json +2 -2
  236. package/src/components/Attachment/Gallery.tsx +22 -7
  237. package/src/components/Attachment/ImageReloadIndicator.tsx +4 -5
  238. package/src/components/Channel/Channel.tsx +12 -9
  239. package/src/components/Channel/__tests__/Channel.test.js +2 -0
  240. package/src/components/Channel/hooks/useChannelDataState.ts +2 -4
  241. package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
  242. package/src/components/Chat/Chat.tsx +0 -9
  243. package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +8 -7
  244. package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +5 -4
  245. package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +5 -4
  246. package/src/components/ImageGallery/__tests__/ImageGalleryOverlay.test.tsx +3 -2
  247. package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx +6 -1
  248. package/src/components/Message/Message.tsx +10 -13
  249. package/src/components/Message/MessageSimple/MessageFooter.tsx +2 -3
  250. package/src/components/Message/MessageSimple/MessageStatus.tsx +19 -17
  251. package/src/components/Message/MessageSimple/MessageTextContainer.tsx +3 -3
  252. package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +11 -5
  253. package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.tsx +5 -4
  254. package/src/components/Message/MessageSimple/utils/renderText.tsx +2 -3
  255. package/src/components/Message/hooks/useCreateMessageContext.ts +3 -0
  256. package/src/components/Message/hooks/useMessageActionHandlers.ts +1 -3
  257. package/src/components/Message/hooks/useMessageActions.tsx +4 -3
  258. package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +1 -0
  259. package/src/components/MessageList/MessageList.tsx +24 -25
  260. package/src/components/MessageList/MessageSystem.tsx +2 -2
  261. package/src/components/MessageList/hooks/useMessageList.ts +48 -59
  262. package/src/components/MessageList/utils/getGroupStyles.ts +7 -5
  263. package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -3
  264. package/src/components/MessageList/utils/getReadState.ts +27 -0
  265. package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +2 -3
  266. package/src/components/MessageMenu/hooks/useFetchReactions.ts +2 -3
  267. package/src/components/Poll/components/Button.tsx +2 -4
  268. package/src/components/Poll/components/PollResults/PollResultItem.tsx +2 -3
  269. package/src/components/Reply/Reply.tsx +1 -2
  270. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +0 -15
  271. package/src/components/Thread/components/ThreadFooterComponent.tsx +1 -0
  272. package/src/components/ThreadList/ThreadListItem.tsx +6 -4
  273. package/src/components/index.ts +2 -1
  274. package/src/contexts/channelsStateContext/useChannelState.ts +5 -1
  275. package/src/contexts/debugContext/DebugContext.tsx +2 -4
  276. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +5 -4
  277. package/src/contexts/messageContext/MessageContext.tsx +6 -4
  278. package/src/contexts/messageInputContext/MessageInputContext.tsx +5 -5
  279. package/src/contexts/messageInputContext/__tests__/sendMessage.test.tsx +6 -5
  280. package/src/contexts/messageInputContext/__tests__/updateMessage.test.tsx +3 -5
  281. package/src/contexts/messageInputContext/__tests__/useMessageDetailsForState.test.tsx +14 -9
  282. package/src/contexts/messagesContext/MessagesContext.tsx +25 -20
  283. package/src/contexts/pollContext/pollContext.tsx +2 -4
  284. package/src/contexts/threadContext/ThreadContext.tsx +4 -6
  285. package/src/contexts/threadsContext/ThreadListItemContext.tsx +3 -5
  286. package/src/hooks/index.ts +1 -0
  287. package/src/i18n/en.json +3 -0
  288. package/src/i18n/es.json +3 -0
  289. package/src/i18n/fr.json +3 -0
  290. package/src/i18n/he.json +3 -0
  291. package/src/i18n/hi.json +2 -0
  292. package/src/i18n/it.json +3 -0
  293. package/src/i18n/ja.json +1 -0
  294. package/src/i18n/ko.json +1 -0
  295. package/src/i18n/nl.json +2 -0
  296. package/src/i18n/pt-br.json +3 -0
  297. package/src/i18n/ru.json +4 -0
  298. package/src/i18n/tr.json +2 -0
  299. package/src/utils/removeReservedFields.ts +3 -5
  300. package/src/utils/utils.ts +5 -10
  301. package/src/version.json +1 -1
  302. package/lib/commonjs/components/MessageList/hooks/useLastReadData.js +0 -20
  303. package/lib/commonjs/components/MessageList/hooks/useLastReadData.js.map +0 -1
  304. package/lib/commonjs/components/MessageList/utils/getReadStates.js +0 -34
  305. package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +0 -1
  306. package/lib/module/components/MessageList/hooks/useLastReadData.js +0 -20
  307. package/lib/module/components/MessageList/hooks/useLastReadData.js.map +0 -1
  308. package/lib/module/components/MessageList/utils/getReadStates.js +0 -34
  309. package/lib/module/components/MessageList/utils/getReadStates.js.map +0 -1
  310. package/lib/typescript/components/MessageList/hooks/useLastReadData.d.ts +0 -12
  311. package/lib/typescript/components/MessageList/hooks/useLastReadData.d.ts.map +0 -1
  312. package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +0 -5
  313. package/lib/typescript/components/MessageList/utils/getReadStates.d.ts.map +0 -1
  314. package/src/components/MessageList/hooks/useLastReadData.ts +0 -29
  315. package/src/components/MessageList/utils/getReadStates.ts +0 -55
@@ -1,60 +1,5 @@
1
1
  import type { LocalMessage, MessageResponse, TranslationLanguages } from 'stream-chat';
2
2
  export declare const useTranslatedMessage: (message?: MessageResponse | LocalMessage) => {
3
- id: string;
4
- attachments?: import("stream-chat").Attachment[];
5
- html?: string;
6
- mml?: string;
7
- parent_id?: string;
8
- pin_expires?: string | null;
9
- pinned?: boolean;
10
- pinned_at?: string | null;
11
- poll_id?: string;
12
- quoted_message_id?: string;
13
- restricted_visibility?: string[];
14
- show_in_channel?: boolean;
15
- silent?: boolean;
16
- text?: string;
17
- type: "regular" | "reply" | "deleted" | "ephemeral" | "error" | "system";
18
- user?: import("stream-chat").UserResponse | null;
19
- user_id?: string;
20
- args?: string;
21
- before_message_send_failed?: boolean;
22
- channel?: import("stream-chat").ChannelResponse;
23
- cid?: string;
24
- command?: string;
25
- command_info?: {
26
- name?: string;
27
- };
28
- created_at?: string;
29
- deleted_at?: string;
30
- deleted_reply_count?: number;
31
- i18n?: import("stream-chat").RequireAtLeastOne<Record<`${TranslationLanguages}_text`, string>> & {
32
- language: TranslationLanguages;
33
- };
34
- latest_reactions?: import("stream-chat").ReactionResponse[];
35
- mentioned_users?: import("stream-chat").UserResponse[];
36
- message_text_updated_at?: string;
37
- moderation?: import("stream-chat").ModerationResponse;
38
- moderation_details?: import("stream-chat").ModerationDetailsResponse;
39
- own_reactions?: import("stream-chat").ReactionResponse[] | null;
40
- pinned_by?: import("stream-chat").UserResponse | null;
41
- poll?: import("stream-chat").PollResponse;
42
- reaction_counts?: {
43
- [key: string]: number;
44
- } | null;
45
- reaction_groups?: {
46
- [key: string]: import("stream-chat").ReactionGroupResponse;
47
- } | null;
48
- reaction_scores?: {
49
- [key: string]: number;
50
- } | null;
51
- reply_count?: number;
52
- shadowed?: boolean;
53
- status?: string;
54
- thread_participants?: import("stream-chat").UserResponse[];
55
- updated_at?: string;
56
- quoted_message?: import("stream-chat").MessageResponseBase;
57
- } | {
58
3
  id: string;
59
4
  text?: string | undefined;
60
5
  channel?: import("stream-chat").ChannelResponse | undefined;
@@ -110,5 +55,60 @@ export declare const useTranslatedMessage: (message?: MessageResponse | LocalMes
110
55
  updated_at: Date;
111
56
  error?: import("stream-chat").ErrorFromResponse<import("stream-chat").APIErrorResponse>;
112
57
  quoted_message?: import("stream-chat").LocalMessageBase;
58
+ } | {
59
+ id: string;
60
+ attachments?: import("stream-chat").Attachment[];
61
+ html?: string;
62
+ mml?: string;
63
+ parent_id?: string;
64
+ pin_expires?: string | null;
65
+ pinned?: boolean;
66
+ pinned_at?: string | null;
67
+ poll_id?: string;
68
+ quoted_message_id?: string;
69
+ restricted_visibility?: string[];
70
+ show_in_channel?: boolean;
71
+ silent?: boolean;
72
+ text?: string;
73
+ type: "regular" | "reply" | "deleted" | "ephemeral" | "error" | "system";
74
+ user?: import("stream-chat").UserResponse | null;
75
+ user_id?: string;
76
+ args?: string;
77
+ before_message_send_failed?: boolean;
78
+ channel?: import("stream-chat").ChannelResponse;
79
+ cid?: string;
80
+ command?: string;
81
+ command_info?: {
82
+ name?: string;
83
+ };
84
+ created_at?: string;
85
+ deleted_at?: string;
86
+ deleted_reply_count?: number;
87
+ i18n?: import("stream-chat").RequireAtLeastOne<Record<`${TranslationLanguages}_text`, string>> & {
88
+ language: TranslationLanguages;
89
+ };
90
+ latest_reactions?: import("stream-chat").ReactionResponse[];
91
+ mentioned_users?: import("stream-chat").UserResponse[];
92
+ message_text_updated_at?: string;
93
+ moderation?: import("stream-chat").ModerationResponse;
94
+ moderation_details?: import("stream-chat").ModerationDetailsResponse;
95
+ own_reactions?: import("stream-chat").ReactionResponse[] | null;
96
+ pinned_by?: import("stream-chat").UserResponse | null;
97
+ poll?: import("stream-chat").PollResponse;
98
+ reaction_counts?: {
99
+ [key: string]: number;
100
+ } | null;
101
+ reaction_groups?: {
102
+ [key: string]: import("stream-chat").ReactionGroupResponse;
103
+ } | null;
104
+ reaction_scores?: {
105
+ [key: string]: number;
106
+ } | null;
107
+ reply_count?: number;
108
+ shadowed?: boolean;
109
+ status?: string;
110
+ thread_participants?: import("stream-chat").UserResponse[];
111
+ updated_at?: string;
112
+ quoted_message?: import("stream-chat").MessageResponseBase;
113
113
  } | undefined;
114
114
  //# sourceMappingURL=useTranslatedMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslatedMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslatedMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMvF,eAAO,MAAM,oBAAoB,GAAI,UAAU,eAAe,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;YAkBwxf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aADr2f,CAAC"}
1
+ {"version":3,"file":"useTranslatedMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslatedMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMvF,eAAO,MAAM,oBAAoB,GAAI,UAAU,eAAe,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;YAkBwxf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aADr2f,CAAC"}
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
3
+ "+{{count}}_one": "+{{count}}",
4
+ "+{{count}}_other": "+{{count}}",
2
5
  "1 Reply": "1 Reply",
3
6
  "1 Thread Reply": "1 Thread Reply",
4
7
  "Add a comment": "Add a comment",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
3
+ "+{{count}}_one": "+{{count}}",
4
+ "+{{count}}_other": "+{{count}}",
2
5
  "1 Reply": "1 respuesta",
3
6
  "1 Thread Reply": "1 respuesta de hilo",
4
7
  "Add a comment": "Agregar un comentario",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
3
+ "+{{count}}_one": "+{{count}}",
4
+ "+{{count}}_other": "+{{count}}",
2
5
  "1 Reply": "1 Réponse",
3
6
  "1 Thread Reply": "Réponse à 1 fil",
4
7
  "Add a comment": "Ajouter un commentaire",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_one": "+{{count}}",
3
+ "+{{count}}_other": "+{{count}}",
4
+ "+{{count}}_two": "+{{count}}",
2
5
  "1 Reply": "תגובה אחת",
3
6
  "1 Thread Reply": "תגובה אחת לשרשור",
4
7
  "Add a comment": "הוסף תגובה",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "+{{count}}_one": "+{{count}}",
3
+ "+{{count}}_other": "+{{count}}",
2
4
  "1 Reply": "1 रिप्लाई",
3
5
  "1 Thread Reply": "1 धागा उत्तर",
4
6
  "Add a comment": "एक टिप्पणी जोड़ें",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
3
+ "+{{count}}_one": "+{{count}}",
4
+ "+{{count}}_other": "+{{count}}",
2
5
  "1 Reply": "1 Risposta",
3
6
  "1 Thread Reply": "1 Risposta alla Discussione",
4
7
  "Add a comment": "Aggiungi un commento",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "+{{count}}_other": "+{{count}}",
2
3
  "1 Reply": "1件の返信",
3
4
  "1 Thread Reply": "1件のスレッド返信",
4
5
  "Add a comment": "コメントを追加",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "+{{count}}_other": "+{{count}}",
2
3
  "1 Reply": "답장 1개",
3
4
  "1 Thread Reply": "1개의 스레드\u3000답글",
4
5
  "Add a comment": "댓글 추가",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "+{{count}}_one": "+{{count}}",
3
+ "+{{count}}_other": "+{{count}}",
2
4
  "1 Reply": "1 Antwoord",
3
5
  "1 Thread Reply": "1 thread antwoord",
4
6
  "Add a comment": "Voeg een reactie toe",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "+{{count}}_many": "+{{count}}",
3
+ "+{{count}}_one": "+{{count}}",
4
+ "+{{count}}_other": "+{{count}}",
2
5
  "1 Reply": "1 Resposta",
3
6
  "1 Thread Reply": "1 Resposta de Thread",
4
7
  "Add a comment": "Adicionar um comentário",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "+{{count}}_few": "+{{count}}",
3
+ "+{{count}}_many": "+{{count}}",
4
+ "+{{count}}_one": "+{{count}}",
5
+ "+{{count}}_other": "+{{count}}",
2
6
  "1 Reply": "1 Ответ",
3
7
  "1 Thread Reply": "1 тема Ответить",
4
8
  "Add a comment": "Добавить комментарий",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "+{{count}}_one": "+{{count}}",
3
+ "+{{count}}_other": "+{{count}}",
2
4
  "1 Reply": "1 Cevap",
3
5
  "1 Thread Reply": "1 Konu Yanıtı",
4
6
  "Add a comment": "Yorum ekle",
@@ -123,6 +123,9 @@ export declare class Streami18n {
123
123
  getTranslations: () => {
124
124
  [key: string]: {
125
125
  [key: string]: Partial<{
126
+ "+{{count}}_many": string;
127
+ "+{{count}}_one": string;
128
+ "+{{count}}_other": string;
126
129
  "1 Reply": string;
127
130
  "1 Thread Reply": string;
128
131
  "Add a comment": string;
@@ -1 +1 @@
1
- {"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EAErB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAahD,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AAEzB;;;;GAIG;AACH,OAAO,iBAAiB,CAAC;AAoHzB,KAAK,oBAAoB,GAAG,O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C,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
@@ -1,4 +1,3 @@
1
- import type { MessageResponse } from 'stream-chat';
2
- import type { MessageType } from '../components/MessageList/hooks/useMessageList';
3
- export declare const removeReservedFields: (message: MessageType | MessageResponse) => MessageType | MessageResponse;
1
+ import type { LocalMessage, MessageResponse } from 'stream-chat';
2
+ export declare const removeReservedFields: (message: LocalMessage | MessageResponse) => LocalMessage | MessageResponse;
4
3
  //# sourceMappingURL=removeReservedFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeReservedFields.d.ts","sourceRoot":"","sources":["../../../src/utils/removeReservedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAElF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,WAAW,GAAG,eAAe,KACrC,WAAW,GAAG,eA0BhB,CAAC"}
1
+ {"version":3,"file":"removeReservedFields.d.ts","sourceRoot":"","sources":["../../../src/utils/removeReservedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,oBAAoB,GAC/B,SAAS,YAAY,GAAG,eAAe,KACtC,YAAY,GAAG,eA0BjB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import type React from 'react';
2
2
  import type { ChannelState, LocalMessage, MessageResponse } from 'stream-chat';
3
3
  import { IconProps } from '../../src/icons/utils/base';
4
- import { MessageType } from '../components/MessageList/hooks/useMessageList';
5
4
  import type { EmojiSearchIndex } from '../contexts/messageInputContext/MessageInputContext';
6
5
  import type { TableRowJoinedUser } from '../store/types';
7
6
  import { FileTypes, ValueOf } from '../types/types';
@@ -35,19 +34,19 @@ export declare const getIndicatorTypeForFileState: (fileState: FileStateValue, e
35
34
  * @param message
36
35
  * @returns boolean
37
36
  */
38
- export declare const isBlockedMessage: (message: MessageType | TableRowJoinedUser<"messages">) => boolean | "" | undefined;
37
+ export declare const isBlockedMessage: (message: LocalMessage | TableRowJoinedUser<"messages">) => boolean | "" | undefined;
39
38
  /**
40
39
  * Utility to check if the message is a Bounced message.
41
40
  * @param message
42
41
  * @returns boolean
43
42
  */
44
- export declare const isBouncedMessage: (message: MessageType) => boolean;
43
+ export declare const isBouncedMessage: (message: LocalMessage) => boolean;
45
44
  /**
46
45
  * Utility to check if the message is a edited message.
47
46
  * @param message
48
47
  * @returns boolean
49
48
  */
50
- export declare const isEditedMessage: (message: MessageType) => boolean;
49
+ export declare const isEditedMessage: (message: LocalMessage) => boolean;
51
50
  /**
52
51
  * Default emoji search index for auto complete text input
53
52
  */
@@ -62,7 +61,7 @@ export declare const hasOnlyEmojis: (text: string) => boolean;
62
61
  * @param {LocalMessage} message - the message object to be stringified
63
62
  * @returns {string} The stringified message
64
63
  */
65
- export declare const stringifyMessage: (message: MessageResponse | LocalMessage | MessageType) => string;
64
+ export declare const stringifyMessage: (message: MessageResponse | LocalMessage) => string;
66
65
  /**
67
66
  * Reduces a list of messages to strings that are used in useEffect & useMemo
68
67
  * @param {messages} messages - the array of messages to be compared
@@ -106,7 +105,7 @@ export declare const findInMessagesById: (messages: ChannelState["messages"], ta
106
105
  */
107
106
  export declare const findInMessagesByDate: (messages: MessageResponse[] | ChannelState["messages"], targetDate: Date) => {
108
107
  index: number;
109
- message: MessageResponse | LocalMessage;
108
+ message: LocalMessage | MessageResponse;
110
109
  } | {
111
110
  index: number;
112
111
  message?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/E,OAA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C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,YAA8B,CAAC;AAErE,eAAO,MAAM,gBAAgB,GAAI,UAAM,KAAG,MAIqC,CAAC;AAKhF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,YAazC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,eAAe,GAAG,YAAY,KAAG,MAwB1E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,YAAY,EAAE,KAAG,MAC3B,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,WAI/C,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,UAAU,MAAM,yEAUvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,WAgB5D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,YAAY,CAAC,UAAU,CAAC,EAAE,UAAU,MAAM,WAGtF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,eAAe,EAAE,GAAG,YAAY,CAAC,UAAU,CAAC,EACtD,YAAY,IAAI;;;;;;CAgCjB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "7.0.0-rc.9",
4
+ "version": "7.0.0",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -77,7 +77,7 @@
77
77
  "path": "0.12.7",
78
78
  "react-native-markdown-package": "1.8.2",
79
79
  "react-native-url-polyfill": "^1.3.0",
80
- "stream-chat": "9.0.0-rc.11",
80
+ "stream-chat": "^9.0.0",
81
81
  "use-sync-external-store": "^1.4.0"
82
82
  },
83
83
  "peerDependencies": {
@@ -1,10 +1,9 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { Pressable, StyleSheet, Text, View } from 'react-native';
3
3
 
4
- import type { Attachment } from 'stream-chat';
4
+ import type { Attachment, LocalMessage } from 'stream-chat';
5
5
 
6
6
  import { GalleryImage } from './GalleryImage';
7
- import { ImageReloadIndicator } from './ImageReloadIndicator';
8
7
  import { buildGallery } from './utils/buildGallery/buildGallery';
9
8
 
10
9
  import type { Thumbnail } from './utils/buildGallery/types';
@@ -12,7 +11,7 @@ import { getGalleryImageBorderRadius } from './utils/getGalleryImageBorderRadius
12
11
 
13
12
  import { openUrlSafely } from './utils/openUrlSafely';
14
13
 
15
- import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
14
+ import { useTranslationContext } from '../../contexts';
16
15
  import { useChatConfigContext } from '../../contexts/chatConfigContext/ChatConfigContext';
17
16
  import {
18
17
  ImageGalleryContextValue,
@@ -59,6 +58,7 @@ export type GalleryPropsWithContext = Pick<
59
58
  | 'VideoThumbnail'
60
59
  | 'ImageLoadingIndicator'
61
60
  | 'ImageLoadingFailedIndicator'
61
+ | 'ImageReloadIndicator'
62
62
  | 'myMessageTheme'
63
63
  > &
64
64
  Pick<OverlayContextValue, 'setOverlay'> & {
@@ -76,7 +76,7 @@ export type GalleryPropsWithContext = Pick<
76
76
  *
77
77
  * TODO: Fix circular dependencies of imports
78
78
  */
79
- message?: MessageType;
79
+ message?: LocalMessage;
80
80
  };
81
81
 
82
82
  const GalleryWithContext = (props: GalleryPropsWithContext) => {
@@ -87,6 +87,7 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
87
87
  hasThreadReplies,
88
88
  ImageLoadingFailedIndicator,
89
89
  ImageLoadingIndicator,
90
+ ImageReloadIndicator,
90
91
  images,
91
92
  legacyImageViewerSwipeBehaviour,
92
93
  message,
@@ -204,6 +205,7 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
204
205
  colIndex={colIndex}
205
206
  ImageLoadingFailedIndicator={ImageLoadingFailedIndicator}
206
207
  ImageLoadingIndicator={ImageLoadingIndicator}
208
+ ImageReloadIndicator={ImageReloadIndicator}
207
209
  imagesAndVideos={imagesAndVideos}
208
210
  invertedDirections={invertedDirections || false}
209
211
  key={rowIndex}
@@ -241,7 +243,7 @@ type GalleryThumbnailProps = {
241
243
  colIndex: number;
242
244
  imagesAndVideos: Attachment[];
243
245
  invertedDirections: boolean;
244
- message: MessageType;
246
+ message: LocalMessage;
245
247
  numOfColumns: number;
246
248
  numOfRows: number;
247
249
  rowIndex: number;
@@ -253,6 +255,7 @@ type GalleryThumbnailProps = {
253
255
  | 'VideoThumbnail'
254
256
  | 'ImageLoadingIndicator'
255
257
  | 'ImageLoadingFailedIndicator'
258
+ | 'ImageReloadIndicator'
256
259
  > &
257
260
  Pick<ImageGalleryContextValue, 'setSelectedMessage' | 'setMessages'> &
258
261
  Pick<MessageContextValue, 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'> &
@@ -264,6 +267,7 @@ const GalleryThumbnail = ({
264
267
  colIndex,
265
268
  ImageLoadingFailedIndicator,
266
269
  ImageLoadingIndicator,
270
+ ImageReloadIndicator,
267
271
  imagesAndVideos,
268
272
  invertedDirections,
269
273
  legacyImageViewerSwipeBehaviour,
@@ -296,6 +300,7 @@ const GalleryThumbnail = ({
296
300
  },
297
301
  },
298
302
  } = useTheme();
303
+ const { t } = useTranslationContext();
299
304
 
300
305
  const openImageViewer = () => {
301
306
  if (!legacyImageViewerSwipeBehaviour && message) {
@@ -387,6 +392,7 @@ const GalleryThumbnail = ({
387
392
  borderRadius={imageBorderRadius ?? borderRadius}
388
393
  ImageLoadingFailedIndicator={ImageLoadingFailedIndicator}
389
394
  ImageLoadingIndicator={ImageLoadingIndicator}
395
+ ImageReloadIndicator={ImageReloadIndicator}
390
396
  thumbnail={thumbnail}
391
397
  />
392
398
  </View>
@@ -401,7 +407,7 @@ const GalleryThumbnail = ({
401
407
  ]}
402
408
  >
403
409
  <Text style={[styles.moreImagesText, moreImagesText]}>
404
- {`+${imagesAndVideos.length - 4}`}
410
+ {String(t('+{{count}}', { count: imagesAndVideos.length - 4 }))}
405
411
  </Text>
406
412
  </View>
407
413
  ) : null}
@@ -413,10 +419,15 @@ const GalleryImageThumbnail = ({
413
419
  borderRadius,
414
420
  ImageLoadingFailedIndicator,
415
421
  ImageLoadingIndicator,
422
+ ImageReloadIndicator,
416
423
  thumbnail,
417
424
  }: Pick<
418
425
  GalleryThumbnailProps,
419
- 'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'thumbnail' | 'borderRadius'
426
+ | 'ImageLoadingFailedIndicator'
427
+ | 'ImageLoadingIndicator'
428
+ | 'ImageReloadIndicator'
429
+ | 'thumbnail'
430
+ | 'borderRadius'
420
431
  >) => {
421
432
  const {
422
433
  isLoadingImage,
@@ -564,6 +575,7 @@ export const Gallery = (props: GalleryProps) => {
564
575
  hasThreadReplies,
565
576
  ImageLoadingFailedIndicator: PropImageLoadingFailedIndicator,
566
577
  ImageLoadingIndicator: PropImageLoadingIndicator,
578
+ ImageReloadIndicator: PropImageReloadIndicator,
567
579
  images: propImages,
568
580
  message: propMessage,
569
581
  myMessageTheme: propMyMessageTheme,
@@ -595,6 +607,7 @@ export const Gallery = (props: GalleryProps) => {
595
607
  additionalPressableProps: contextAdditionalPressableProps,
596
608
  ImageLoadingFailedIndicator: ContextImageLoadingFailedIndicator,
597
609
  ImageLoadingIndicator: ContextImageLoadingIndicator,
610
+ ImageReloadIndicator: ContextImageReloadIndicator,
598
611
  legacyImageViewerSwipeBehaviour,
599
612
  myMessageTheme: contextMyMessageTheme,
600
613
  VideoThumbnail: ContextVideoThumnbnail,
@@ -624,6 +637,7 @@ export const Gallery = (props: GalleryProps) => {
624
637
  const ImageLoadingFailedIndicator =
625
638
  PropImageLoadingFailedIndicator || ContextImageLoadingFailedIndicator;
626
639
  const ImageLoadingIndicator = PropImageLoadingIndicator || ContextImageLoadingIndicator;
640
+ const ImageReloadIndicator = PropImageReloadIndicator || ContextImageReloadIndicator;
627
641
  const myMessageTheme = propMyMessageTheme || contextMyMessageTheme;
628
642
 
629
643
  return (
@@ -636,6 +650,7 @@ export const Gallery = (props: GalleryProps) => {
636
650
  hasThreadReplies: hasThreadReplies || !!message?.reply_count,
637
651
  ImageLoadingFailedIndicator,
638
652
  ImageLoadingIndicator,
653
+ ImageReloadIndicator,
639
654
  images,
640
655
  legacyImageViewerSwipeBehaviour,
641
656
  message,
@@ -6,13 +6,12 @@ import { Refresh } from '../../icons';
6
6
 
7
7
  const REFRESH_ICON_SIZE = 24;
8
8
 
9
- export const ImageReloadIndicator = ({
10
- onReloadImage,
11
- style,
12
- }: {
9
+ export type ImageReloadIndicatorProps = {
13
10
  onReloadImage: () => void;
14
11
  style: React.ComponentProps<typeof Pressable>['style'];
15
- }) => {
12
+ };
13
+
14
+ export const ImageReloadIndicator = ({ onReloadImage, style }: ImageReloadIndicatorProps) => {
16
15
  const {
17
16
  theme: {
18
17
  colors: { grey_dark },
@@ -119,6 +119,7 @@ import { Gallery as GalleryDefault } from '../Attachment/Gallery';
119
119
  import { Giphy as GiphyDefault } from '../Attachment/Giphy';
120
120
  import { ImageLoadingFailedIndicator as ImageLoadingFailedIndicatorDefault } from '../Attachment/ImageLoadingFailedIndicator';
121
121
  import { ImageLoadingIndicator as ImageLoadingIndicatorDefault } from '../Attachment/ImageLoadingIndicator';
122
+ import { ImageReloadIndicator as ImageReloadIndicatorDefault } from '../Attachment/ImageReloadIndicator';
122
123
  import { VideoThumbnail as VideoThumbnailDefault } from '../Attachment/VideoThumbnail';
123
124
  import { AutoCompleteSuggestionHeader as AutoCompleteSuggestionHeaderDefault } from '../AutoCompleteInput/AutoCompleteSuggestionHeader';
124
125
  import { AutoCompleteSuggestionItem as AutoCompleteSuggestionItemDefault } from '../AutoCompleteInput/AutoCompleteSuggestionItem';
@@ -170,7 +171,6 @@ import { ShowThreadMessageInChannelButton as ShowThreadMessageInChannelButtonDef
170
171
  import { StopMessageStreamingButton as DefaultStopMessageStreamingButton } from '../MessageInput/StopMessageStreamingButton';
171
172
  import { UploadProgressIndicator as UploadProgressIndicatorDefault } from '../MessageInput/UploadProgressIndicator';
172
173
  import { DateHeader as DateHeaderDefault } from '../MessageList/DateHeader';
173
- import type { MessageType } from '../MessageList/hooks/useMessageList';
174
174
  import { InlineDateSeparator as InlineDateSeparatorDefault } from '../MessageList/InlineDateSeparator';
175
175
  import { InlineUnreadIndicator as InlineUnreadIndicatorDefault } from '../MessageList/InlineUnreadIndicator';
176
176
  import { MessageList as MessageListDefault } from '../MessageList/MessageList';
@@ -321,6 +321,7 @@ export type ChannelPropsWithContext = Pick<ChannelContextValue, 'channel'> &
321
321
  | 'legacyImageViewerSwipeBehaviour'
322
322
  | 'ImageLoadingFailedIndicator'
323
323
  | 'ImageLoadingIndicator'
324
+ | 'ImageReloadIndicator'
324
325
  | 'markdownRules'
325
326
  | 'Message'
326
327
  | 'MessageActionList'
@@ -552,7 +553,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
552
553
  handleRetry,
553
554
  handleThreadReply,
554
555
  hasCameraPicker = isImagePickerAvailable(),
555
- hasCommands = true,
556
+ hasCommands,
556
557
  hasCreatePoll,
557
558
  // If pickDocument isn't available, default to hiding the file picker
558
559
  hasFilePicker = isDocumentPickerAvailable(),
@@ -561,6 +562,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
561
562
  hideStickyDateHeader = false,
562
563
  ImageLoadingFailedIndicator = ImageLoadingFailedIndicatorDefault,
563
564
  ImageLoadingIndicator = ImageLoadingIndicatorDefault,
565
+ ImageReloadIndicator = ImageReloadIndicatorDefault,
564
566
  ImageUploadPreview = ImageUploadPreviewDefault,
565
567
  initialScrollToFirstUnreadMessage = false,
566
568
  initialValue,
@@ -685,12 +687,12 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
685
687
  },
686
688
  } = useTheme();
687
689
  const [deleted, setDeleted] = useState<boolean>(false);
688
- const [editing, setEditing] = useState<MessageType | undefined>(undefined);
690
+ const [editing, setEditing] = useState<LocalMessage | undefined>(undefined);
689
691
  const [error, setError] = useState<Error | boolean>(false);
690
692
  const [lastRead, setLastRead] = useState<Date | undefined>();
691
693
 
692
- const [quotedMessage, setQuotedMessage] = useState<MessageType | undefined>(undefined);
693
- const [thread, setThread] = useState<MessageType | null>(threadProps || null);
694
+ const [quotedMessage, setQuotedMessage] = useState<LocalMessage | undefined>(undefined);
695
+ const [thread, setThread] = useState<LocalMessage | null>(threadProps || null);
694
696
  const [threadHasMore, setThreadHasMore] = useState(true);
695
697
  const [threadLoadingMore, setThreadLoadingMore] = useState(false);
696
698
  const [channelUnreadState, setChannelUnreadState] = useState<ChannelUnreadState | undefined>(
@@ -1583,7 +1585,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
1583
1585
  const updatedMessage = {
1584
1586
  ...message,
1585
1587
  cid: channel.cid,
1586
- deleted_at: new Date().toISOString(),
1588
+ deleted_at: new Date(),
1587
1589
  type: 'deleted' as MessageLabel,
1588
1590
  };
1589
1591
  updateMessage(updatedMessage);
@@ -1808,7 +1810,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
1808
1810
  FileUploadPreview,
1809
1811
  handleAttachButtonPress,
1810
1812
  hasCameraPicker,
1811
- hasCommands,
1813
+ hasCommands: hasCommands ?? (getChannelConfigSafely()?.commands ?? []).length > 0,
1812
1814
  hasFilePicker,
1813
1815
  hasImagePicker,
1814
1816
  ImageUploadPreview,
@@ -1897,6 +1899,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
1897
1899
  hasCreatePoll === undefined ? pollCreationEnabled : hasCreatePoll && pollCreationEnabled,
1898
1900
  ImageLoadingFailedIndicator,
1899
1901
  ImageLoadingIndicator,
1902
+ ImageReloadIndicator,
1900
1903
  initialScrollToFirstUnreadMessage: !messageId && initialScrollToFirstUnreadMessage, // when messageId is set, we scroll to the messageId instead of first unread
1901
1904
  InlineDateSeparator,
1902
1905
  InlineUnreadIndicator,
@@ -2035,7 +2038,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
2035
2038
 
2036
2039
  export type ChannelProps = Partial<Omit<ChannelPropsWithContext, 'channel' | 'thread'>> &
2037
2040
  Pick<ChannelPropsWithContext, 'channel'> & {
2038
- thread?: MessageType | ThreadType | null;
2041
+ thread?: LocalMessage | ThreadType | null;
2039
2042
  };
2040
2043
 
2041
2044
  /**
@@ -2054,7 +2057,7 @@ export const Channel = (props: PropsWithChildren<ChannelProps>) => {
2054
2057
  const threadInstance = (threadFromProps as ThreadType)?.threadInstance as Thread;
2055
2058
  const threadMessage = (
2056
2059
  threadInstance ? (threadFromProps as ThreadType).thread : threadFromProps
2057
- ) as MessageType;
2060
+ ) as LocalMessage;
2058
2061
 
2059
2062
  const thread: ThreadType = {
2060
2063
  thread: threadMessage,
@@ -77,6 +77,8 @@ describe('Channel', () => {
77
77
  useMockedApis(chatClient, [getOrCreateChannelApi(mockedChannel)]);
78
78
  channel = chatClient.channel('messaging', mockedChannel.id);
79
79
  channel.cid = mockedChannel.channel.cid;
80
+ const getConfigSpy = jest.fn();
81
+ channel.getConfig = getConfigSpy;
80
82
  });
81
83
 
82
84
  afterEach(() => {
@@ -1,8 +1,6 @@
1
1
  import { useCallback, useState } from 'react';
2
2
 
3
- import { Channel, ChannelState as StreamChannelState } from 'stream-chat';
4
-
5
- import { MessageType } from '../../MessageList/hooks/useMessageList';
3
+ import { Channel, LocalMessage, ChannelState as StreamChannelState } from 'stream-chat';
6
4
 
7
5
  export const channelInitialState = {
8
6
  hasMore: true,
@@ -38,7 +36,7 @@ export type ChannelMessagesState = {
38
36
  * The ChannelThreadState object
39
37
  */
40
38
  export type ChannelThreadState = {
41
- thread: MessageType | null;
39
+ thread: LocalMessage | null;
42
40
  threadHasMore?: boolean;
43
41
  threadLoadingMore?: boolean;
44
42
  threadMessages?: StreamChannelState['messages'];