stream-chat-react-native-core 4.4.0 → 4.5.0-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 (568) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/components/Attachment/Attachment.js +1 -1
  3. package/lib/commonjs/components/Attachment/AttachmentActions.js +1 -1
  4. package/lib/commonjs/components/Attachment/Card.js +26 -29
  5. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  6. package/lib/commonjs/components/Attachment/FileAttachment.js +20 -25
  7. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  8. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
  9. package/lib/commonjs/components/Attachment/FileIcon.js +1 -1
  10. package/lib/commonjs/components/Attachment/Gallery.js +1 -1
  11. package/lib/commonjs/components/Attachment/Giphy.js +1 -1
  12. package/lib/commonjs/components/Attachment/hooks/useGoToURL.js +42 -0
  13. package/lib/commonjs/components/Attachment/hooks/useGoToURL.js.map +1 -0
  14. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +1 -1
  15. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
  16. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
  17. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
  18. package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
  19. package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
  20. package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
  21. package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
  22. package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
  23. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
  24. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
  25. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
  26. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
  27. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
  28. package/lib/commonjs/components/Avatar/Avatar.js +1 -1
  29. package/lib/commonjs/components/Avatar/GroupAvatar.js +1 -1
  30. package/lib/commonjs/components/Channel/Channel.js +1 -1
  31. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  32. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +4 -12
  33. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  34. package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js +4 -12
  35. package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  36. package/lib/commonjs/components/ChannelList/ChannelList.js +1 -1
  37. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
  38. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
  39. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
  40. package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
  41. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +1 -1
  42. package/lib/commonjs/components/ChannelList/Skeleton.js +1 -1
  43. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +1 -1
  44. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +1 -1
  45. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
  46. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
  47. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
  48. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
  49. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  50. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
  51. package/lib/commonjs/components/Chat/Chat.js +9 -5
  52. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  53. package/lib/commonjs/components/Chat/hooks/useAppSettings.js +80 -0
  54. package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -0
  55. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +3 -1
  56. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  57. package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
  58. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
  59. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +1 -1
  60. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
  61. package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
  62. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +1 -1
  63. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +1 -1
  64. package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
  65. package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
  66. package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
  67. package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
  68. package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
  69. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
  70. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
  71. package/lib/commonjs/components/Message/Message.js +28 -23
  72. package/lib/commonjs/components/Message/Message.js.map +1 -1
  73. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +1 -1
  74. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +1 -1
  75. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
  76. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +1 -1
  77. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
  78. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +1 -1
  79. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
  80. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +1 -1
  81. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +1 -1
  82. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
  83. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +1 -1
  84. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +29 -15
  85. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  86. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +1 -1
  87. package/lib/commonjs/components/Message/hooks/useMessageActions.js +1 -1
  88. package/lib/commonjs/components/MessageInput/AttachButton.js +1 -1
  89. package/lib/commonjs/components/MessageInput/CommandsButton.js +1 -1
  90. package/lib/commonjs/components/MessageInput/CooldownTimer.js +1 -1
  91. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +109 -41
  92. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  93. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +118 -25
  94. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  95. package/lib/commonjs/components/MessageInput/InputButtons.js +1 -1
  96. package/lib/commonjs/components/MessageInput/MessageInput.js +1 -1
  97. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +1 -1
  98. package/lib/commonjs/components/MessageInput/SendButton.js +1 -1
  99. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
  100. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
  101. package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +53 -21
  102. package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  103. package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js +1 -1
  104. package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +1 -1
  105. package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js +1 -1
  106. package/lib/commonjs/components/MessageList/DateHeader.js +1 -1
  107. package/lib/commonjs/components/MessageList/InlineDateSeparator.js +1 -1
  108. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  109. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  110. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  111. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -1
  112. package/lib/commonjs/components/MessageList/MessageList.js +1 -1
  113. package/lib/commonjs/components/MessageList/MessageSystem.js +1 -1
  114. package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +1 -1
  115. package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
  116. package/lib/commonjs/components/MessageList/TypingIndicator.js +1 -1
  117. package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +1 -1
  118. package/lib/commonjs/components/MessageOverlay/MessageActionList.js +1 -1
  119. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +1 -1
  120. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +1 -1
  121. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +1 -1
  122. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +1 -1
  123. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +1 -1
  124. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
  125. package/lib/commonjs/components/Reply/Reply.js +1 -1
  126. package/lib/commonjs/components/Spinner/Spinner.js +1 -1
  127. package/lib/commonjs/components/Thread/Thread.js +1 -1
  128. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +1 -1
  129. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
  130. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
  131. package/lib/commonjs/contexts/channelContext/ChannelContext.js +1 -1
  132. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +1 -1
  133. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
  134. package/lib/commonjs/contexts/chatContext/ChatContext.js +3 -3
  135. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  136. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
  137. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
  138. package/lib/commonjs/contexts/messageContext/MessageContext.js +3 -3
  139. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  140. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +146 -120
  141. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  142. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  143. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
  144. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
  145. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +1 -1
  146. package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
  147. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -1
  148. package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
  149. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
  150. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +1 -1
  151. package/lib/commonjs/contexts/themeContext/ThemeContext.js +1 -1
  152. package/lib/commonjs/contexts/threadContext/ThreadContext.js +1 -1
  153. package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
  154. package/lib/commonjs/contexts/typingContext/TypingContext.js +1 -1
  155. package/lib/commonjs/i18n/en.json +2 -0
  156. package/lib/commonjs/i18n/fr.json +2 -0
  157. package/lib/commonjs/i18n/hi.json +2 -0
  158. package/lib/commonjs/i18n/it.json +2 -0
  159. package/lib/commonjs/i18n/ja.json +3 -1
  160. package/lib/commonjs/i18n/ko.json +3 -1
  161. package/lib/commonjs/i18n/nl.json +2 -0
  162. package/lib/commonjs/i18n/ru.json +2 -0
  163. package/lib/commonjs/i18n/tr.json +2 -0
  164. package/lib/commonjs/icons/ArrowRight.js +1 -1
  165. package/lib/commonjs/icons/AtMentions.js +1 -1
  166. package/lib/commonjs/icons/Attach.js +1 -1
  167. package/lib/commonjs/icons/Audio.js +1 -1
  168. package/lib/commonjs/icons/CSV.js +1 -1
  169. package/lib/commonjs/icons/Camera.js +1 -1
  170. package/lib/commonjs/icons/Check.js +1 -1
  171. package/lib/commonjs/icons/CheckAll.js +1 -1
  172. package/lib/commonjs/icons/CheckSend.js +1 -1
  173. package/lib/commonjs/icons/CircleClose.js +1 -1
  174. package/lib/commonjs/icons/CirclePlus.js +1 -1
  175. package/lib/commonjs/icons/CircleRight.js +1 -1
  176. package/lib/commonjs/icons/Close.js +1 -1
  177. package/lib/commonjs/icons/Copy.js +1 -1
  178. package/lib/commonjs/icons/CurveLineLeftUp.js +1 -1
  179. package/lib/commonjs/icons/DOC.js +1 -1
  180. package/lib/commonjs/icons/DOCX.js +1 -1
  181. package/lib/commonjs/icons/Delete.js +1 -1
  182. package/lib/commonjs/icons/Down.js +1 -1
  183. package/lib/commonjs/icons/DownloadArrow.js +1 -1
  184. package/lib/commonjs/icons/DownloadCloud.js +1 -1
  185. package/lib/commonjs/icons/Edit.js +1 -1
  186. package/lib/commonjs/icons/Error.js +1 -1
  187. package/lib/commonjs/icons/Eye.js +1 -1
  188. package/lib/commonjs/icons/Flag.js +1 -1
  189. package/lib/commonjs/icons/Folder.js +1 -1
  190. package/lib/commonjs/icons/GenericFile.js +1 -1
  191. package/lib/commonjs/icons/GiphyIcon.js +1 -1
  192. package/lib/commonjs/icons/Grid.js +1 -1
  193. package/lib/commonjs/icons/Group.js +1 -1
  194. package/lib/commonjs/icons/HTML.js +1 -1
  195. package/lib/commonjs/icons/Imgur.js +1 -1
  196. package/lib/commonjs/icons/LOLReaction.js +1 -1
  197. package/lib/commonjs/icons/Lightning.js +1 -1
  198. package/lib/commonjs/icons/Link.js +1 -1
  199. package/lib/commonjs/icons/Loading.js +1 -1
  200. package/lib/commonjs/icons/Logo.js +1 -1
  201. package/lib/commonjs/icons/LoveReaction.js +1 -1
  202. package/lib/commonjs/icons/MD.js +1 -1
  203. package/lib/commonjs/icons/MailOpen.js +1 -1
  204. package/lib/commonjs/icons/MenuPointHorizontal.js +1 -1
  205. package/lib/commonjs/icons/MenuPointVertical.js +1 -1
  206. package/lib/commonjs/icons/MessageFlag.js +1 -1
  207. package/lib/commonjs/icons/MessageIcon.js +1 -1
  208. package/lib/commonjs/icons/Mute.js +1 -1
  209. package/lib/commonjs/icons/Notification.js +1 -1
  210. package/lib/commonjs/icons/ODT.js +1 -1
  211. package/lib/commonjs/icons/PDF.js +1 -1
  212. package/lib/commonjs/icons/PPT.js +1 -1
  213. package/lib/commonjs/icons/PPTX.js +1 -1
  214. package/lib/commonjs/icons/Picture.js +1 -1
  215. package/lib/commonjs/icons/Pin.js +1 -1
  216. package/lib/commonjs/icons/PinHeader.js +1 -1
  217. package/lib/commonjs/icons/RAR.js +1 -1
  218. package/lib/commonjs/icons/RTF.js +1 -1
  219. package/lib/commonjs/icons/Refresh.js +1 -1
  220. package/lib/commonjs/icons/SEVEN_Z.js +1 -1
  221. package/lib/commonjs/icons/Search.js +1 -1
  222. package/lib/commonjs/icons/SendRight.js +1 -1
  223. package/lib/commonjs/icons/SendUp.js +1 -1
  224. package/lib/commonjs/icons/Share.js +1 -1
  225. package/lib/commonjs/icons/ShareRightArrow.js +1 -1
  226. package/lib/commonjs/icons/Smile.js +1 -1
  227. package/lib/commonjs/icons/Sound.js +1 -1
  228. package/lib/commonjs/icons/TAR.js +1 -1
  229. package/lib/commonjs/icons/TXT.js +1 -1
  230. package/lib/commonjs/icons/ThreadReply.js +1 -1
  231. package/lib/commonjs/icons/ThumbsDownReaction.js +1 -1
  232. package/lib/commonjs/icons/ThumbsUpReaction.js +1 -1
  233. package/lib/commonjs/icons/Time.js +1 -1
  234. package/lib/commonjs/icons/Unknown.js +1 -1
  235. package/lib/commonjs/icons/Unpin.js +1 -1
  236. package/lib/commonjs/icons/User.js +1 -1
  237. package/lib/commonjs/icons/UserAdd.js +1 -1
  238. package/lib/commonjs/icons/UserAdmin.js +1 -1
  239. package/lib/commonjs/icons/UserDelete.js +1 -1
  240. package/lib/commonjs/icons/UserMinus.js +1 -1
  241. package/lib/commonjs/icons/Warning.js +38 -0
  242. package/lib/commonjs/icons/Warning.js.map +1 -0
  243. package/lib/commonjs/icons/WutReaction.js +1 -1
  244. package/lib/commonjs/icons/XLS.js +1 -1
  245. package/lib/commonjs/icons/XLSX.js +1 -1
  246. package/lib/commonjs/icons/ZIP.js +1 -1
  247. package/lib/commonjs/icons/index.js +13 -0
  248. package/lib/commonjs/icons/index.js.map +1 -1
  249. package/lib/commonjs/icons/utils/base.js +1 -1
  250. package/lib/commonjs/utils/utils.js +33 -2
  251. package/lib/commonjs/utils/utils.js.map +1 -1
  252. package/lib/commonjs/version.json +1 -1
  253. package/lib/module/components/Attachment/Attachment.js +1 -1
  254. package/lib/module/components/Attachment/AttachmentActions.js +1 -1
  255. package/lib/module/components/Attachment/Card.js +26 -29
  256. package/lib/module/components/Attachment/Card.js.map +1 -1
  257. package/lib/module/components/Attachment/FileAttachment.js +20 -25
  258. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  259. package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
  260. package/lib/module/components/Attachment/FileIcon.js +1 -1
  261. package/lib/module/components/Attachment/Gallery.js +1 -1
  262. package/lib/module/components/Attachment/Giphy.js +1 -1
  263. package/lib/module/components/Attachment/hooks/useGoToURL.js +42 -0
  264. package/lib/module/components/Attachment/hooks/useGoToURL.js.map +1 -0
  265. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +1 -1
  266. package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
  267. package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
  268. package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
  269. package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
  270. package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
  271. package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
  272. package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
  273. package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
  274. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
  275. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
  276. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
  277. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
  278. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
  279. package/lib/module/components/Avatar/Avatar.js +1 -1
  280. package/lib/module/components/Avatar/GroupAvatar.js +1 -1
  281. package/lib/module/components/Channel/Channel.js +1 -1
  282. package/lib/module/components/Channel/Channel.js.map +1 -1
  283. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +4 -12
  284. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  285. package/lib/module/components/Channel/hooks/useCreateThreadContext.js +4 -12
  286. package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  287. package/lib/module/components/ChannelList/ChannelList.js +1 -1
  288. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
  289. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
  290. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
  291. package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
  292. package/lib/module/components/ChannelList/ChannelListMessenger.js +1 -1
  293. package/lib/module/components/ChannelList/Skeleton.js +1 -1
  294. package/lib/module/components/ChannelPreview/ChannelAvatar.js +1 -1
  295. package/lib/module/components/ChannelPreview/ChannelPreview.js +1 -1
  296. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
  297. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
  298. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
  299. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
  300. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  301. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
  302. package/lib/module/components/Chat/Chat.js +9 -5
  303. package/lib/module/components/Chat/Chat.js.map +1 -1
  304. package/lib/module/components/Chat/hooks/useAppSettings.js +80 -0
  305. package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -0
  306. package/lib/module/components/Chat/hooks/useCreateChatContext.js +3 -1
  307. package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  308. package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
  309. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
  310. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +1 -1
  311. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
  312. package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
  313. package/lib/module/components/ImageGallery/components/ImageGrid.js +1 -1
  314. package/lib/module/components/ImageGallery/components/ImageGridHandle.js +1 -1
  315. package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
  316. package/lib/module/components/Indicators/LoadingDot.js +1 -1
  317. package/lib/module/components/Indicators/LoadingDots.js +1 -1
  318. package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
  319. package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
  320. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
  321. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
  322. package/lib/module/components/Message/Message.js +28 -23
  323. package/lib/module/components/Message/Message.js.map +1 -1
  324. package/lib/module/components/Message/MessageSimple/MessageAvatar.js +1 -1
  325. package/lib/module/components/Message/MessageSimple/MessageContent.js +1 -1
  326. package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
  327. package/lib/module/components/Message/MessageSimple/MessageFooter.js +1 -1
  328. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
  329. package/lib/module/components/Message/MessageSimple/MessageReplies.js +1 -1
  330. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
  331. package/lib/module/components/Message/MessageSimple/MessageSimple.js +1 -1
  332. package/lib/module/components/Message/MessageSimple/MessageStatus.js +1 -1
  333. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
  334. package/lib/module/components/Message/MessageSimple/ReactionList.js +1 -1
  335. package/lib/module/components/Message/MessageSimple/utils/renderText.js +29 -15
  336. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  337. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +1 -1
  338. package/lib/module/components/Message/hooks/useMessageActions.js +1 -1
  339. package/lib/module/components/MessageInput/AttachButton.js +1 -1
  340. package/lib/module/components/MessageInput/CommandsButton.js +1 -1
  341. package/lib/module/components/MessageInput/CooldownTimer.js +1 -1
  342. package/lib/module/components/MessageInput/FileUploadPreview.js +109 -41
  343. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  344. package/lib/module/components/MessageInput/ImageUploadPreview.js +118 -25
  345. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  346. package/lib/module/components/MessageInput/InputButtons.js +1 -1
  347. package/lib/module/components/MessageInput/MessageInput.js +1 -1
  348. package/lib/module/components/MessageInput/MoreOptionsButton.js +1 -1
  349. package/lib/module/components/MessageInput/SendButton.js +1 -1
  350. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
  351. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
  352. package/lib/module/components/MessageInput/UploadProgressIndicator.js +53 -21
  353. package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  354. package/lib/module/components/MessageInput/components/InputEditingStateHeader.js +1 -1
  355. package/lib/module/components/MessageInput/components/InputGiphySearch.js +1 -1
  356. package/lib/module/components/MessageInput/components/InputReplyStateHeader.js +1 -1
  357. package/lib/module/components/MessageList/DateHeader.js +1 -1
  358. package/lib/module/components/MessageList/InlineDateSeparator.js +1 -1
  359. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  360. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  361. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  362. package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -1
  363. package/lib/module/components/MessageList/MessageList.js +1 -1
  364. package/lib/module/components/MessageList/MessageSystem.js +1 -1
  365. package/lib/module/components/MessageList/NetworkDownIndicator.js +1 -1
  366. package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
  367. package/lib/module/components/MessageList/TypingIndicator.js +1 -1
  368. package/lib/module/components/MessageList/TypingIndicatorContainer.js +1 -1
  369. package/lib/module/components/MessageOverlay/MessageActionList.js +1 -1
  370. package/lib/module/components/MessageOverlay/MessageActionListItem.js +1 -1
  371. package/lib/module/components/MessageOverlay/MessageOverlay.js +1 -1
  372. package/lib/module/components/MessageOverlay/OverlayBackdrop.js +1 -1
  373. package/lib/module/components/MessageOverlay/OverlayReactionList.js +1 -1
  374. package/lib/module/components/MessageOverlay/OverlayReactions.js +1 -1
  375. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
  376. package/lib/module/components/Reply/Reply.js +1 -1
  377. package/lib/module/components/Spinner/Spinner.js +1 -1
  378. package/lib/module/components/Thread/Thread.js +1 -1
  379. package/lib/module/components/Thread/components/ThreadFooterComponent.js +1 -1
  380. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
  381. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
  382. package/lib/module/contexts/channelContext/ChannelContext.js +1 -1
  383. package/lib/module/contexts/channelsContext/ChannelsContext.js +1 -1
  384. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
  385. package/lib/module/contexts/chatContext/ChatContext.js +3 -3
  386. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  387. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
  388. package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
  389. package/lib/module/contexts/messageContext/MessageContext.js +3 -3
  390. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  391. package/lib/module/contexts/messageInputContext/MessageInputContext.js +146 -120
  392. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  393. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  394. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
  395. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
  396. package/lib/module/contexts/messagesContext/MessagesContext.js +1 -1
  397. package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
  398. package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -1
  399. package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
  400. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
  401. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +1 -1
  402. package/lib/module/contexts/themeContext/ThemeContext.js +1 -1
  403. package/lib/module/contexts/threadContext/ThreadContext.js +1 -1
  404. package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
  405. package/lib/module/contexts/typingContext/TypingContext.js +1 -1
  406. package/lib/module/i18n/en.json +2 -0
  407. package/lib/module/i18n/fr.json +2 -0
  408. package/lib/module/i18n/hi.json +2 -0
  409. package/lib/module/i18n/it.json +2 -0
  410. package/lib/module/i18n/ja.json +3 -1
  411. package/lib/module/i18n/ko.json +3 -1
  412. package/lib/module/i18n/nl.json +2 -0
  413. package/lib/module/i18n/ru.json +2 -0
  414. package/lib/module/i18n/tr.json +2 -0
  415. package/lib/module/icons/ArrowRight.js +1 -1
  416. package/lib/module/icons/AtMentions.js +1 -1
  417. package/lib/module/icons/Attach.js +1 -1
  418. package/lib/module/icons/Audio.js +1 -1
  419. package/lib/module/icons/CSV.js +1 -1
  420. package/lib/module/icons/Camera.js +1 -1
  421. package/lib/module/icons/Check.js +1 -1
  422. package/lib/module/icons/CheckAll.js +1 -1
  423. package/lib/module/icons/CheckSend.js +1 -1
  424. package/lib/module/icons/CircleClose.js +1 -1
  425. package/lib/module/icons/CirclePlus.js +1 -1
  426. package/lib/module/icons/CircleRight.js +1 -1
  427. package/lib/module/icons/Close.js +1 -1
  428. package/lib/module/icons/Copy.js +1 -1
  429. package/lib/module/icons/CurveLineLeftUp.js +1 -1
  430. package/lib/module/icons/DOC.js +1 -1
  431. package/lib/module/icons/DOCX.js +1 -1
  432. package/lib/module/icons/Delete.js +1 -1
  433. package/lib/module/icons/Down.js +1 -1
  434. package/lib/module/icons/DownloadArrow.js +1 -1
  435. package/lib/module/icons/DownloadCloud.js +1 -1
  436. package/lib/module/icons/Edit.js +1 -1
  437. package/lib/module/icons/Error.js +1 -1
  438. package/lib/module/icons/Eye.js +1 -1
  439. package/lib/module/icons/Flag.js +1 -1
  440. package/lib/module/icons/Folder.js +1 -1
  441. package/lib/module/icons/GenericFile.js +1 -1
  442. package/lib/module/icons/GiphyIcon.js +1 -1
  443. package/lib/module/icons/Grid.js +1 -1
  444. package/lib/module/icons/Group.js +1 -1
  445. package/lib/module/icons/HTML.js +1 -1
  446. package/lib/module/icons/Imgur.js +1 -1
  447. package/lib/module/icons/LOLReaction.js +1 -1
  448. package/lib/module/icons/Lightning.js +1 -1
  449. package/lib/module/icons/Link.js +1 -1
  450. package/lib/module/icons/Loading.js +1 -1
  451. package/lib/module/icons/Logo.js +1 -1
  452. package/lib/module/icons/LoveReaction.js +1 -1
  453. package/lib/module/icons/MD.js +1 -1
  454. package/lib/module/icons/MailOpen.js +1 -1
  455. package/lib/module/icons/MenuPointHorizontal.js +1 -1
  456. package/lib/module/icons/MenuPointVertical.js +1 -1
  457. package/lib/module/icons/MessageFlag.js +1 -1
  458. package/lib/module/icons/MessageIcon.js +1 -1
  459. package/lib/module/icons/Mute.js +1 -1
  460. package/lib/module/icons/Notification.js +1 -1
  461. package/lib/module/icons/ODT.js +1 -1
  462. package/lib/module/icons/PDF.js +1 -1
  463. package/lib/module/icons/PPT.js +1 -1
  464. package/lib/module/icons/PPTX.js +1 -1
  465. package/lib/module/icons/Picture.js +1 -1
  466. package/lib/module/icons/Pin.js +1 -1
  467. package/lib/module/icons/PinHeader.js +1 -1
  468. package/lib/module/icons/RAR.js +1 -1
  469. package/lib/module/icons/RTF.js +1 -1
  470. package/lib/module/icons/Refresh.js +1 -1
  471. package/lib/module/icons/SEVEN_Z.js +1 -1
  472. package/lib/module/icons/Search.js +1 -1
  473. package/lib/module/icons/SendRight.js +1 -1
  474. package/lib/module/icons/SendUp.js +1 -1
  475. package/lib/module/icons/Share.js +1 -1
  476. package/lib/module/icons/ShareRightArrow.js +1 -1
  477. package/lib/module/icons/Smile.js +1 -1
  478. package/lib/module/icons/Sound.js +1 -1
  479. package/lib/module/icons/TAR.js +1 -1
  480. package/lib/module/icons/TXT.js +1 -1
  481. package/lib/module/icons/ThreadReply.js +1 -1
  482. package/lib/module/icons/ThumbsDownReaction.js +1 -1
  483. package/lib/module/icons/ThumbsUpReaction.js +1 -1
  484. package/lib/module/icons/Time.js +1 -1
  485. package/lib/module/icons/Unknown.js +1 -1
  486. package/lib/module/icons/Unpin.js +1 -1
  487. package/lib/module/icons/User.js +1 -1
  488. package/lib/module/icons/UserAdd.js +1 -1
  489. package/lib/module/icons/UserAdmin.js +1 -1
  490. package/lib/module/icons/UserDelete.js +1 -1
  491. package/lib/module/icons/UserMinus.js +1 -1
  492. package/lib/module/icons/Warning.js +38 -0
  493. package/lib/module/icons/Warning.js.map +1 -0
  494. package/lib/module/icons/WutReaction.js +1 -1
  495. package/lib/module/icons/XLS.js +1 -1
  496. package/lib/module/icons/XLSX.js +1 -1
  497. package/lib/module/icons/ZIP.js +1 -1
  498. package/lib/module/icons/index.js +13 -0
  499. package/lib/module/icons/index.js.map +1 -1
  500. package/lib/module/icons/utils/base.js +1 -1
  501. package/lib/module/utils/utils.js +33 -2
  502. package/lib/module/utils/utils.js.map +1 -1
  503. package/lib/module/version.json +1 -1
  504. package/lib/typescript/components/Attachment/FileAttachment.d.ts +0 -1
  505. package/lib/typescript/components/Attachment/hooks/useGoToURL.d.ts +2 -0
  506. package/lib/typescript/components/Chat/hooks/__tests__/useAppSettings.test.d.ts +1 -0
  507. package/lib/typescript/components/Chat/hooks/useAppSettings.d.ts +3 -0
  508. package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
  509. package/lib/typescript/components/Message/Message.d.ts +12 -2
  510. package/lib/typescript/components/MessageInput/UploadProgressIndicator.d.ts +1 -3
  511. package/lib/typescript/contexts/chatContext/ChatContext.d.ts +5 -1
  512. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -4
  513. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +3 -3
  514. package/lib/typescript/i18n/en.json +2 -0
  515. package/lib/typescript/i18n/fr.json +2 -0
  516. package/lib/typescript/i18n/hi.json +2 -0
  517. package/lib/typescript/i18n/it.json +2 -0
  518. package/lib/typescript/i18n/ja.json +3 -1
  519. package/lib/typescript/i18n/ko.json +3 -1
  520. package/lib/typescript/i18n/nl.json +2 -0
  521. package/lib/typescript/i18n/ru.json +2 -0
  522. package/lib/typescript/i18n/tr.json +2 -0
  523. package/lib/typescript/icons/Warning.d.ts +3 -0
  524. package/lib/typescript/icons/index.d.ts +1 -0
  525. package/lib/typescript/utils/Streami18n.d.ts +6 -0
  526. package/lib/typescript/utils/utils.d.ts +15 -2
  527. package/package.json +1 -1
  528. package/src/components/Attachment/Card.tsx +5 -13
  529. package/src/components/Attachment/FileAttachment.tsx +5 -13
  530. package/src/components/Attachment/__tests__/Attachment.test.js +39 -0
  531. package/src/components/Attachment/hooks/useGoToURL.ts +27 -0
  532. package/src/components/Channel/Channel.tsx +1 -1
  533. package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +3 -9
  534. package/src/components/Channel/hooks/useCreateThreadContext.ts +3 -9
  535. package/src/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.tsx +1 -0
  536. package/src/components/Chat/Chat.tsx +4 -0
  537. package/src/components/Chat/hooks/__tests__/useAppSettings.test.tsx +34 -0
  538. package/src/components/Chat/hooks/useAppSettings.ts +39 -0
  539. package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
  540. package/src/components/Message/Message.tsx +56 -48
  541. package/src/components/Message/MessageSimple/utils/renderText.tsx +17 -2
  542. package/src/components/MessageInput/FileUploadPreview.tsx +60 -14
  543. package/src/components/MessageInput/ImageUploadPreview.tsx +95 -42
  544. package/src/components/MessageInput/UploadProgressIndicator.tsx +49 -22
  545. package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +50 -80
  546. package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +49 -74
  547. package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +36 -13
  548. package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +122 -17
  549. package/src/contexts/chatContext/ChatContext.tsx +5 -1
  550. package/src/contexts/messageContext/MessageContext.tsx +7 -4
  551. package/src/contexts/messageInputContext/MessageInputContext.tsx +127 -96
  552. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +2 -2
  553. package/src/i18n/en.json +2 -0
  554. package/src/i18n/fr.json +2 -0
  555. package/src/i18n/hi.json +2 -0
  556. package/src/i18n/it.json +2 -0
  557. package/src/i18n/ja.json +3 -1
  558. package/src/i18n/ko.json +3 -1
  559. package/src/i18n/nl.json +2 -0
  560. package/src/i18n/ru.json +2 -0
  561. package/src/i18n/tr.json +2 -0
  562. package/src/icons/Warning.tsx +12 -0
  563. package/src/icons/index.ts +1 -0
  564. package/src/utils/utils.ts +53 -1
  565. package/src/version.json +1 -1
  566. package/CHANGELOG.md +0 -1519
  567. package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +0 -4413
  568. package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +0 -2373
@@ -14,11 +14,12 @@ describe('ImageUploadPreview', () => {
14
14
  generateImageUploadPreview({ id: 'image-upload-preview-1', state: FileState.UPLOADING }),
15
15
  generateImageUploadPreview({ id: 'image-upload-preview-2', state: FileState.UPLOADING }),
16
16
  generateImageUploadPreview({ id: 'image-upload-preview-3', state: FileState.UPLOADING }),
17
+ generateImageUploadPreview({ id: 'image-upload-preview-4', state: FileState.UPLOADING }),
17
18
  ];
18
19
  const removeImage = jest.fn();
19
20
  const uploadImage = jest.fn();
20
21
 
21
- const { getAllByTestId, queryAllByTestId, rerender, toJSON } = render(
22
+ const { getAllByTestId, queryAllByTestId, queryAllByText } = render(
22
23
  <ThemeProvider>
23
24
  <ImageUploadPreview
24
25
  imageUploads={imageUploads}
@@ -35,6 +36,7 @@ describe('ImageUploadPreview', () => {
35
36
  expect(queryAllByTestId('inactive-upload-progress-indicator')).toHaveLength(0);
36
37
  expect(queryAllByTestId('upload-progress-indicator')).toHaveLength(imageUploads.length);
37
38
  expect(queryAllByTestId('retry-upload-progress-indicator')).toHaveLength(0);
39
+ expect(queryAllByText('Not supported')).toHaveLength(0);
38
40
  expect(removeImage).toHaveBeenCalledTimes(0);
39
41
  expect(uploadImage).toHaveBeenCalledTimes(0);
40
42
  });
@@ -45,25 +47,6 @@ describe('ImageUploadPreview', () => {
45
47
  expect(removeImage).toHaveBeenCalledTimes(1);
46
48
  expect(uploadImage).toHaveBeenCalledTimes(0);
47
49
  });
48
-
49
- rerender(
50
- <ThemeProvider>
51
- <ImageUploadPreview
52
- imageUploads={imageUploads.map((image, index) => ({
53
- ...image,
54
- id: `${index}`,
55
- }))}
56
- removeImage={removeImage}
57
- uploadImage={uploadImage}
58
- />
59
- </ThemeProvider>,
60
- );
61
-
62
- const snapshot = toJSON();
63
-
64
- await waitFor(() => {
65
- expect(snapshot).toMatchSnapshot();
66
- });
67
50
  });
68
51
 
69
52
  it('should render ImageUploadPreview with all uploaded images', async () => {
@@ -71,11 +54,12 @@ describe('ImageUploadPreview', () => {
71
54
  generateImageUploadPreview({ id: 'image-upload-preview-1', state: FileState.UPLOADED }),
72
55
  generateImageUploadPreview({ id: 'image-upload-preview-2', state: FileState.UPLOADED }),
73
56
  generateImageUploadPreview({ id: 'image-upload-preview-3', state: FileState.UPLOADED }),
57
+ generateImageUploadPreview({ id: 'image-upload-preview-4', state: FileState.UPLOADED }),
74
58
  ];
75
59
  const removeImage = jest.fn();
76
60
  const uploadImage = jest.fn();
77
61
 
78
- const { getAllByTestId, queryAllByTestId, rerender, toJSON } = render(
62
+ const { getAllByTestId, queryAllByTestId, queryAllByText } = render(
79
63
  <ThemeProvider>
80
64
  <ImageUploadPreview
81
65
  imageUploads={imageUploads}
@@ -92,6 +76,7 @@ describe('ImageUploadPreview', () => {
92
76
  );
93
77
  expect(queryAllByTestId('upload-progress-indicator')).toHaveLength(0);
94
78
  expect(queryAllByTestId('retry-upload-progress-indicator')).toHaveLength(0);
79
+ expect(queryAllByText('Not supported')).toHaveLength(0);
95
80
  expect(removeImage).toHaveBeenCalledTimes(0);
96
81
  expect(uploadImage).toHaveBeenCalledTimes(0);
97
82
  });
@@ -102,25 +87,6 @@ describe('ImageUploadPreview', () => {
102
87
  expect(removeImage).toHaveBeenCalledTimes(1);
103
88
  expect(uploadImage).toHaveBeenCalledTimes(0);
104
89
  });
105
-
106
- rerender(
107
- <ThemeProvider>
108
- <ImageUploadPreview
109
- imageUploads={imageUploads.map((image, index) => ({
110
- ...image,
111
- id: `${index}`,
112
- }))}
113
- removeImage={removeImage}
114
- uploadImage={uploadImage}
115
- />
116
- </ThemeProvider>,
117
- );
118
-
119
- const snapshot = toJSON();
120
-
121
- await waitFor(() => {
122
- expect(snapshot).toMatchSnapshot();
123
- });
124
90
  });
125
91
 
126
92
  it('should render ImageUploadPreview with all failed images', async () => {
@@ -128,11 +94,12 @@ describe('ImageUploadPreview', () => {
128
94
  generateImageUploadPreview({ id: 'image-upload-preview-1', state: FileState.UPLOAD_FAILED }),
129
95
  generateImageUploadPreview({ id: 'image-upload-preview-2', state: FileState.UPLOAD_FAILED }),
130
96
  generateImageUploadPreview({ id: 'image-upload-preview-3', state: FileState.UPLOAD_FAILED }),
97
+ generateImageUploadPreview({ id: 'image-upload-preview-4', state: FileState.UPLOAD_FAILED }),
131
98
  ];
132
99
  const removeImage = jest.fn();
133
100
  const uploadImage = jest.fn();
134
101
 
135
- const { getAllByTestId, queryAllByTestId, rerender, toJSON } = render(
102
+ const { getAllByTestId, queryAllByTestId, queryAllByText } = render(
136
103
  <ThemeProvider>
137
104
  <ImageUploadPreview
138
105
  imageUploads={imageUploads}
@@ -149,6 +116,7 @@ describe('ImageUploadPreview', () => {
149
116
  expect(queryAllByTestId('inactive-upload-progress-indicator')).toHaveLength(0);
150
117
  expect(queryAllByTestId('upload-progress-indicator')).toHaveLength(0);
151
118
  expect(queryAllByTestId('retry-upload-progress-indicator')).toHaveLength(imageUploads.length);
119
+ expect(queryAllByText('Not supported')).toHaveLength(0);
152
120
  expect(removeImage).toHaveBeenCalledTimes(0);
153
121
  expect(uploadImage).toHaveBeenCalledTimes(0);
154
122
  });
@@ -166,37 +134,65 @@ describe('ImageUploadPreview', () => {
166
134
  expect(removeImage).toHaveBeenCalledTimes(1);
167
135
  expect(uploadImage).toHaveBeenCalledTimes(1);
168
136
  });
137
+ });
169
138
 
170
- rerender(
139
+ it('should render ImageUploadPreview with all unsupported', async () => {
140
+ const imageUploads = [
141
+ generateImageUploadPreview({
142
+ id: 'image-upload-preview-1',
143
+ state: FileState.NOT_SUPPORTED,
144
+ }),
145
+ generateImageUploadPreview({
146
+ id: 'image-upload-preview-2',
147
+ state: FileState.NOT_SUPPORTED,
148
+ }),
149
+ generateImageUploadPreview({
150
+ id: 'image-upload-preview-3',
151
+ state: FileState.NOT_SUPPORTED,
152
+ }),
153
+ generateImageUploadPreview({
154
+ id: 'image-upload-preview-4',
155
+ state: FileState.NOT_SUPPORTED,
156
+ }),
157
+ ];
158
+ const removeImage = jest.fn();
159
+ const uploadImage = jest.fn();
160
+
161
+ const { queryAllByTestId, queryAllByText } = render(
171
162
  <ThemeProvider>
172
163
  <ImageUploadPreview
173
- imageUploads={imageUploads.map((image, index) => ({
174
- ...image,
175
- id: `${index}`,
176
- }))}
164
+ imageUploads={imageUploads}
177
165
  removeImage={removeImage}
178
166
  uploadImage={uploadImage}
179
167
  />
180
168
  </ThemeProvider>,
181
169
  );
182
170
 
183
- const snapshot = toJSON();
184
-
185
171
  await waitFor(() => {
186
- expect(snapshot).toMatchSnapshot();
172
+ expect(queryAllByTestId('active-upload-progress-indicator')).toHaveLength(
173
+ imageUploads.length,
174
+ );
175
+ expect(queryAllByTestId('upload-progress-indicator')).toHaveLength(0);
176
+ expect(queryAllByTestId('inactive-upload-progress-indicator')).toHaveLength(0);
177
+ expect(queryAllByText('Not supported')).toHaveLength(imageUploads.length);
178
+ expect(queryAllByTestId('retry-upload-progress-indicator')).toHaveLength(0);
179
+
180
+ expect(removeImage).toHaveBeenCalledTimes(0);
181
+ expect(uploadImage).toHaveBeenCalledTimes(0);
187
182
  });
188
183
  });
189
184
 
190
- it('should render ImageUploadPreview with 1 uploading, 1 uploaded, and 1 failed image', async () => {
185
+ it('should render ImageUploadPreview with 1 uploading, 1 uploaded, and 1 failed image, and 1 unsupported', async () => {
191
186
  const imageUploads = [
192
187
  generateImageUploadPreview({ id: 'image-upload-preview-1', state: FileState.UPLOADING }),
193
188
  generateImageUploadPreview({ id: 'image-upload-preview-2', state: FileState.UPLOADED }),
194
189
  generateImageUploadPreview({ id: 'image-upload-preview-3', state: FileState.UPLOAD_FAILED }),
190
+ generateImageUploadPreview({ id: 'image-upload-preview-4', state: FileState.NOT_SUPPORTED }),
195
191
  ];
196
192
  const removeImage = jest.fn();
197
193
  const uploadImage = jest.fn();
198
194
 
199
- const { queryAllByTestId, rerender, toJSON } = render(
195
+ const { queryAllByTestId, queryAllByText } = render(
200
196
  <ThemeProvider>
201
197
  <ImageUploadPreview
202
198
  imageUploads={imageUploads}
@@ -207,33 +203,12 @@ describe('ImageUploadPreview', () => {
207
203
  );
208
204
 
209
205
  await waitFor(() => {
210
- expect(queryAllByTestId('active-upload-progress-indicator')).toHaveLength(
211
- imageUploads.length - 1,
212
- );
213
- expect(queryAllByTestId('inactive-upload-progress-indicator')).toHaveLength(1);
214
206
  expect(queryAllByTestId('upload-progress-indicator')).toHaveLength(1);
207
+ expect(queryAllByTestId('inactive-upload-progress-indicator')).toHaveLength(1);
215
208
  expect(queryAllByTestId('retry-upload-progress-indicator')).toHaveLength(1);
209
+ expect(queryAllByText('Not supported')).toHaveLength(1);
216
210
  expect(removeImage).toHaveBeenCalledTimes(0);
217
211
  expect(uploadImage).toHaveBeenCalledTimes(0);
218
212
  });
219
-
220
- rerender(
221
- <ThemeProvider>
222
- <ImageUploadPreview
223
- imageUploads={imageUploads.map((image, index) => ({
224
- ...image,
225
- id: `${index}`,
226
- }))}
227
- removeImage={removeImage}
228
- uploadImage={uploadImage}
229
- />
230
- </ThemeProvider>,
231
- );
232
-
233
- const snapshot = toJSON();
234
-
235
- await waitFor(() => {
236
- expect(snapshot).toMatchSnapshot();
237
- });
238
213
  });
239
214
  });
@@ -7,14 +7,14 @@ import { ProgressIndicatorTypes } from '../../../utils/utils';
7
7
  import { UploadProgressIndicator } from '../UploadProgressIndicator';
8
8
 
9
9
  describe('UploadProgressIndicator', () => {
10
- it('should render an inactive IN_PROGRESS UploadProgressIndicator', async () => {
10
+ it('should render an inactive UploadProgressIndicator', async () => {
11
11
  const action = jest.fn();
12
12
 
13
13
  const { queryByTestId, toJSON } = render(
14
14
  <ThemeProvider>
15
15
  <UploadProgressIndicator
16
16
  action={action}
17
- type={ProgressIndicatorTypes.IN_PROGRESS}
17
+ type={ProgressIndicatorTypes.INACTIVE}
18
18
  ></UploadProgressIndicator>
19
19
  </ThemeProvider>,
20
20
  );
@@ -32,21 +32,21 @@ describe('UploadProgressIndicator', () => {
32
32
  });
33
33
  });
34
34
 
35
- it('should render an inactive RETRY UploadProgressIndicator', async () => {
35
+ it('should render an active UploadProgressIndicator', async () => {
36
36
  const action = jest.fn();
37
37
 
38
38
  const { queryByTestId, toJSON } = render(
39
39
  <ThemeProvider>
40
40
  <UploadProgressIndicator
41
41
  action={action}
42
- type={ProgressIndicatorTypes.RETRY}
42
+ type={ProgressIndicatorTypes.IN_PROGRESS}
43
43
  ></UploadProgressIndicator>
44
44
  </ThemeProvider>,
45
45
  );
46
46
 
47
47
  await waitFor(() => {
48
- expect(queryByTestId('active-upload-progress-indicator')).toBeFalsy();
49
- expect(queryByTestId('inactive-upload-progress-indicator')).toBeTruthy();
48
+ expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
49
+ expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
50
50
  expect(action).toHaveBeenCalledTimes(0);
51
51
  });
52
52
 
@@ -57,24 +57,48 @@ describe('UploadProgressIndicator', () => {
57
57
  });
58
58
  });
59
59
 
60
- it('should render an active IN_PROGRESS UploadProgressIndicator', async () => {
60
+ it('should render an active UploadProgressIndicator and not-supported indicator', async () => {
61
61
  const action = jest.fn();
62
62
 
63
63
  const { queryByTestId, toJSON } = render(
64
64
  <ThemeProvider>
65
65
  <UploadProgressIndicator
66
66
  action={action}
67
- active
68
- type={ProgressIndicatorTypes.IN_PROGRESS}
67
+ type={ProgressIndicatorTypes.NOT_SUPPORTED}
69
68
  ></UploadProgressIndicator>
70
69
  </ThemeProvider>,
71
70
  );
72
71
 
73
72
  await waitFor(() => {
74
73
  expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
74
+ expect(queryByTestId('not-supported-upload-progress-indicator')).toBeTruthy();
75
75
  expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
76
+ expect(action).toHaveBeenCalledTimes(0);
77
+ });
78
+
79
+ const snapshot = toJSON();
80
+
81
+ await waitFor(() => {
82
+ expect(snapshot).toMatchSnapshot();
83
+ });
84
+ });
85
+
86
+ it('should render an active UploadProgressIndicator and in-progress indicator', async () => {
87
+ const action = jest.fn();
88
+
89
+ const { queryByTestId, toJSON } = render(
90
+ <ThemeProvider>
91
+ <UploadProgressIndicator
92
+ action={action}
93
+ type={ProgressIndicatorTypes.IN_PROGRESS}
94
+ ></UploadProgressIndicator>
95
+ </ThemeProvider>,
96
+ );
97
+
98
+ await waitFor(() => {
99
+ expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
76
100
  expect(queryByTestId('upload-progress-indicator')).toBeTruthy();
77
- expect(queryByTestId('retry-upload-progress-indicator')).toBeFalsy();
101
+ expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
78
102
  expect(action).toHaveBeenCalledTimes(0);
79
103
  });
80
104
 
@@ -85,14 +109,13 @@ describe('UploadProgressIndicator', () => {
85
109
  });
86
110
  });
87
111
 
88
- it('should render an active RETRY UploadProgressIndicator', async () => {
112
+ it('should render an active UploadProgressIndicator and retry indicator', async () => {
89
113
  const action = jest.fn();
90
114
 
91
115
  const { getByTestId, queryByTestId, toJSON } = render(
92
116
  <ThemeProvider>
93
117
  <UploadProgressIndicator
94
118
  action={action}
95
- active
96
119
  type={ProgressIndicatorTypes.RETRY}
97
120
  ></UploadProgressIndicator>
98
121
  </ThemeProvider>,
@@ -100,8 +123,8 @@ describe('UploadProgressIndicator', () => {
100
123
 
101
124
  await waitFor(() => {
102
125
  expect(queryByTestId('active-upload-progress-indicator')).toBeTruthy();
103
- expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
104
126
  expect(queryByTestId('upload-progress-indicator')).toBeFalsy();
127
+ expect(queryByTestId('inactive-upload-progress-indicator')).toBeFalsy();
105
128
  expect(queryByTestId('retry-upload-progress-indicator')).toBeTruthy();
106
129
  expect(action).toHaveBeenCalledTimes(0);
107
130
  });
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`UploadProgressIndicator should render an active IN_PROGRESS UploadProgressIndicator 1`] = `
3
+ exports[`UploadProgressIndicator should render an active UploadProgressIndicator 1`] = `
4
4
  <View
5
5
  style={
6
6
  Array [
@@ -46,6 +46,7 @@ exports[`UploadProgressIndicator should render an active IN_PROGRESS UploadProgr
46
46
  Object {},
47
47
  ]
48
48
  }
49
+ testID="not-supported-upload-progress-indicator"
49
50
  >
50
51
  <View
51
52
  style={
@@ -69,7 +70,7 @@ exports[`UploadProgressIndicator should render an active IN_PROGRESS UploadProgr
69
70
  </View>
70
71
  `;
71
72
 
72
- exports[`UploadProgressIndicator should render an active RETRY UploadProgressIndicator 1`] = `
73
+ exports[`UploadProgressIndicator should render an active UploadProgressIndicator and in-progress indicator 1`] = `
73
74
  <View
74
75
  style={
75
76
  Array [
@@ -115,6 +116,124 @@ exports[`UploadProgressIndicator should render an active RETRY UploadProgressInd
115
116
  Object {},
116
117
  ]
117
118
  }
119
+ testID="not-supported-upload-progress-indicator"
120
+ >
121
+ <View
122
+ style={
123
+ Object {
124
+ "alignItems": "center",
125
+ "bottom": 0,
126
+ "justifyContent": "center",
127
+ "left": 0,
128
+ "position": "absolute",
129
+ "right": 0,
130
+ "top": 0,
131
+ }
132
+ }
133
+ >
134
+ <ActivityIndicator
135
+ color="#F2F2F2"
136
+ testID="upload-progress-indicator"
137
+ />
138
+ </View>
139
+ </View>
140
+ </View>
141
+ `;
142
+
143
+ exports[`UploadProgressIndicator should render an active UploadProgressIndicator and not-supported indicator 1`] = `
144
+ <View
145
+ style={
146
+ Array [
147
+ Object {
148
+ "overflow": "hidden",
149
+ },
150
+ undefined,
151
+ ]
152
+ }
153
+ testID="active-upload-progress-indicator"
154
+ >
155
+ <View
156
+ style={
157
+ Array [
158
+ Object {
159
+ "alignItems": "center",
160
+ "height": "100%",
161
+ "justifyContent": "center",
162
+ "opacity": 0,
163
+ "position": "absolute",
164
+ "width": "100%",
165
+ },
166
+ Object {
167
+ "backgroundColor": "#000000CC",
168
+ },
169
+ Object {},
170
+ ]
171
+ }
172
+ />
173
+ <View
174
+ style={
175
+ Array [
176
+ Object {
177
+ "overflow": "hidden",
178
+ },
179
+ Object {
180
+ "backgroundColor": "#000000CC",
181
+ },
182
+ Object {},
183
+ ]
184
+ }
185
+ testID="not-supported-upload-progress-indicator"
186
+ />
187
+ </View>
188
+ `;
189
+
190
+ exports[`UploadProgressIndicator should render an active UploadProgressIndicator and retry indicator 1`] = `
191
+ <View
192
+ style={
193
+ Array [
194
+ Object {
195
+ "overflow": "hidden",
196
+ },
197
+ undefined,
198
+ ]
199
+ }
200
+ testID="active-upload-progress-indicator"
201
+ >
202
+ <View
203
+ style={
204
+ Array [
205
+ Object {
206
+ "alignItems": "center",
207
+ "height": "100%",
208
+ "justifyContent": "center",
209
+ "opacity": 0,
210
+ "position": "absolute",
211
+ "width": "100%",
212
+ },
213
+ Object {
214
+ "backgroundColor": "#000000CC",
215
+ },
216
+ Object {},
217
+ ]
218
+ }
219
+ />
220
+ <View
221
+ style={
222
+ Array [
223
+ Object {
224
+ "alignItems": "center",
225
+ "height": "100%",
226
+ "justifyContent": "center",
227
+ "position": "absolute",
228
+ "width": "100%",
229
+ },
230
+ Object {
231
+ "backgroundColor": "#000000CC",
232
+ },
233
+ Object {},
234
+ ]
235
+ }
236
+ testID="not-supported-upload-progress-indicator"
118
237
  >
119
238
  <View
120
239
  accessible={true}
@@ -188,21 +307,7 @@ exports[`UploadProgressIndicator should render an active RETRY UploadProgressInd
188
307
  </View>
189
308
  `;
190
309
 
191
- exports[`UploadProgressIndicator should render an inactive IN_PROGRESS UploadProgressIndicator 1`] = `
192
- <View
193
- style={
194
- Array [
195
- Object {
196
- "overflow": "hidden",
197
- },
198
- undefined,
199
- ]
200
- }
201
- testID="inactive-upload-progress-indicator"
202
- />
203
- `;
204
-
205
- exports[`UploadProgressIndicator should render an inactive RETRY UploadProgressIndicator 1`] = `
310
+ exports[`UploadProgressIndicator should render an inactive UploadProgressIndicator 1`] = `
206
311
  <View
207
312
  style={
208
313
  Array [
@@ -1,6 +1,6 @@
1
1
  import React, { PropsWithChildren, useContext } from 'react';
2
2
 
3
- import type { Channel, Mute, StreamChat } from 'stream-chat';
3
+ import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
4
4
 
5
5
  import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
6
6
  import { getDisplayName } from '../utils/getDisplayName';
@@ -8,6 +8,10 @@ import { getDisplayName } from '../utils/getDisplayName';
8
8
  export type ChatContextValue<
9
9
  StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
10
10
  > = {
11
+ /**
12
+ * Object of application settings returned from Stream.
13
+ * */
14
+ appSettings: AppSettingsAPIResponse<StreamChatGenerics> | null;
11
15
  /**
12
16
  * The StreamChat client object
13
17
  *
@@ -3,7 +3,10 @@ import React, { PropsWithChildren, useContext } from 'react';
3
3
  import type { Attachment } from 'stream-chat';
4
4
 
5
5
  import type { ActionHandler } from '../../components/Attachment/Attachment';
6
- import type { TouchableHandlerPayload } from '../../components/Message/Message';
6
+ import type {
7
+ MessageTouchableHandlerPayload,
8
+ TouchableHandlerPayload,
9
+ } from '../../components/Message/Message';
7
10
  import type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';
8
11
  import type { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';
9
12
  import type { MessageContentType } from '../../contexts/messagesContext/MessagesContext';
@@ -62,7 +65,7 @@ export type MessageContextValue<
62
65
  *
63
66
  * By default, we show the overlay with all the message actions on long press.
64
67
  *
65
- * @param event Event object for onLongPress event
68
+ * @param payload Payload object for onLongPress event
66
69
  */
67
70
  onLongPress: (payload: TouchableHandlerPayload) => void;
68
71
  /** Whether the message is only text and the text is only emojis */
@@ -77,9 +80,9 @@ export type MessageContextValue<
77
80
  *
78
81
  * By default, we will dismiss the keyboard on press.
79
82
  *
80
- * @param event Event object for onPress event
83
+ * @param payload Payload object for onPress event
81
84
  */
82
- onPress: (payload: TouchableHandlerPayload) => void;
85
+ onPress: (payload: MessageTouchableHandlerPayload) => void;
83
86
  onPressIn: ((payload: TouchableHandlerPayload) => void) | null;
84
87
  /** The images attached to a message */
85
88
  otherAttachments: Attachment<StreamChatGenerics>[];