stream-chat-react-native-core 9.0.0-beta.31 → 9.0.0-beta.32
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.
- package/lib/commonjs/components/Attachment/Attachment.js +15 -52
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +4 -6
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -10
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/FilePreview.js +3 -6
- package/lib/commonjs/components/Attachment/FilePreview.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +9 -28
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +3 -3
- package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy/GiphyImage.js +7 -13
- package/lib/commonjs/components/Attachment/Giphy/GiphyImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/UnsupportedAttachment.js +4 -6
- package/lib/commonjs/components/Attachment/UnsupportedAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/UrlPreview/URLPreview.js +3 -3
- package/lib/commonjs/components/Attachment/UrlPreview/URLPreview.js.map +1 -1
- package/lib/commonjs/components/Attachment/UrlPreview/URLPreviewCompact.js +3 -3
- package/lib/commonjs/components/Attachment/UrlPreview/URLPreviewCompact.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +4 -2
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +7 -4
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +9 -13
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +9 -418
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +0 -8
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +3 -77
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -132
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +1 -57
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +4 -2
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListView.js +11 -20
- package/lib/commonjs/components/ChannelList/ChannelListView.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +1 -39
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +3 -2
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +4 -6
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +6 -18
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +8 -28
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +3 -3
- package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +4 -6
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +7 -9
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +4 -2
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +9 -13
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageBubble.js +4 -2
- package/lib/commonjs/components/Message/MessageItemView/MessageBubble.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageContent.js +18 -39
- package/lib/commonjs/components/Message/MessageItemView/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageDeleted.js +5 -7
- package/lib/commonjs/components/Message/MessageItemView/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageFooter.js +4 -8
- package/lib/commonjs/components/Message/MessageItemView/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageHeader.js +8 -16
- package/lib/commonjs/components/Message/MessageItemView/MessageHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js +13 -35
- package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js +3 -5
- package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageTextContainer.js +3 -3
- package/lib/commonjs/components/Message/MessageItemView/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js +6 -4
- package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListBottom.js +6 -8
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListBottom.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListTop.js +7 -11
- package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListTop.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageComposer.js +15 -55
- package/lib/commonjs/components/MessageInput/MessageComposer.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInputHeaderView.js +5 -5
- package/lib/commonjs/components/MessageInput/MessageInputHeaderView.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js +9 -17
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js +5 -5
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js +5 -5
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +5 -5
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputButtons/index.js +4 -4
- package/lib/commonjs/components/MessageInput/components/InputButtons/index.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js +3 -2
- package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/OutputButtons/index.js +7 -13
- package/lib/commonjs/components/MessageInput/components/OutputButtons/index.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageFlashList.js +14 -40
- package/lib/commonjs/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +12 -38
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/StickyHeader.js +3 -1
- package/lib/commonjs/components/MessageList/StickyHeader.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageActionList.js +4 -2
- package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageMenu.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +4 -8
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/commonjs/components/Poll/CreatePollContent.js +3 -1
- package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/commonjs/components/Poll/Poll.js +12 -9
- package/lib/commonjs/components/Poll/Poll.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +5 -3
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +5 -3
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +5 -5
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollResults.js +5 -3
- package/lib/commonjs/components/Poll/components/PollResults/PollResults.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +4 -2
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +4 -8
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +4 -6
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadList.js +12 -15
- package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListItem.js +8 -11
- package/lib/commonjs/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/commonjs/components/ui/Avatar/Avatar.js +3 -3
- package/lib/commonjs/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/componentsContext/ComponentsContext.js +37 -0
- package/lib/commonjs/contexts/componentsContext/ComponentsContext.js.map +1 -0
- package/lib/commonjs/contexts/componentsContext/PLAN.md +148 -0
- package/lib/commonjs/contexts/componentsContext/defaultComponents.js +286 -0
- package/lib/commonjs/contexts/componentsContext/defaultComponents.js.map +1 -0
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -9
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContextBase.js.map +1 -1
- package/lib/commonjs/contexts/index.js +11 -0
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -76
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/MessageOverlayHostLayer.js +7 -5
- package/lib/commonjs/contexts/overlayContext/MessageOverlayHostLayer.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -4
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/threadsContext/ThreadsContext.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +15 -52
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +4 -6
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -10
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/FilePreview.js +3 -6
- package/lib/module/components/Attachment/FilePreview.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +9 -28
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +3 -3
- package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/module/components/Attachment/Giphy/GiphyImage.js +7 -13
- package/lib/module/components/Attachment/Giphy/GiphyImage.js.map +1 -1
- package/lib/module/components/Attachment/UnsupportedAttachment.js +4 -6
- package/lib/module/components/Attachment/UnsupportedAttachment.js.map +1 -1
- package/lib/module/components/Attachment/UrlPreview/URLPreview.js +3 -3
- package/lib/module/components/Attachment/UrlPreview/URLPreview.js.map +1 -1
- package/lib/module/components/Attachment/UrlPreview/URLPreviewCompact.js +3 -3
- package/lib/module/components/Attachment/UrlPreview/URLPreviewCompact.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +4 -2
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +7 -4
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +9 -13
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +9 -418
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +0 -8
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +3 -77
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -132
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +1 -57
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +4 -2
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListView.js +11 -20
- package/lib/module/components/ChannelList/ChannelListView.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +1 -39
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +3 -2
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +4 -6
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +6 -18
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js +8 -28
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +3 -3
- package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +4 -6
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +7 -9
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +4 -2
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/Message/Message.js +9 -13
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageBubble.js +4 -2
- package/lib/module/components/Message/MessageItemView/MessageBubble.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageContent.js +18 -39
- package/lib/module/components/Message/MessageItemView/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageDeleted.js +5 -7
- package/lib/module/components/Message/MessageItemView/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageFooter.js +4 -8
- package/lib/module/components/Message/MessageItemView/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageHeader.js +8 -16
- package/lib/module/components/Message/MessageItemView/MessageHeader.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageItemView.js +13 -35
- package/lib/module/components/Message/MessageItemView/MessageItemView.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageReplies.js +3 -5
- package/lib/module/components/Message/MessageItemView/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageTextContainer.js +3 -3
- package/lib/module/components/Message/MessageItemView/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageWrapper.js +6 -4
- package/lib/module/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListBottom.js +6 -8
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListBottom.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListTop.js +7 -11
- package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListTop.js.map +1 -1
- package/lib/module/components/MessageInput/MessageComposer.js +15 -55
- package/lib/module/components/MessageInput/MessageComposer.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInputHeaderView.js +5 -5
- package/lib/module/components/MessageInput/MessageInputHeaderView.js.map +1 -1
- package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js +9 -17
- package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js.map +1 -1
- package/lib/module/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js +5 -5
- package/lib/module/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js +5 -5
- package/lib/module/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +5 -5
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputButtons/index.js +4 -4
- package/lib/module/components/MessageInput/components/InputButtons/index.js.map +1 -1
- package/lib/module/components/MessageInput/components/LinkPreviewList.js +3 -2
- package/lib/module/components/MessageInput/components/LinkPreviewList.js.map +1 -1
- package/lib/module/components/MessageInput/components/OutputButtons/index.js +7 -13
- package/lib/module/components/MessageInput/components/OutputButtons/index.js.map +1 -1
- package/lib/module/components/MessageList/MessageFlashList.js +14 -40
- package/lib/module/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +12 -38
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/StickyHeader.js +3 -1
- package/lib/module/components/MessageList/StickyHeader.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageActionList.js +4 -2
- package/lib/module/components/MessageMenu/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageMenu.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js +4 -8
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/module/components/Poll/CreatePollContent.js +3 -1
- package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/module/components/Poll/Poll.js +12 -9
- package/lib/module/components/Poll/Poll.js.map +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js +5 -3
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +5 -3
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +5 -5
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollResults.js +5 -3
- package/lib/module/components/Poll/components/PollResults/PollResults.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +4 -2
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +4 -8
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +4 -6
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadList.js +12 -15
- package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadListItem.js +8 -11
- package/lib/module/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/module/components/ui/Avatar/Avatar.js +3 -3
- package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/componentsContext/ComponentsContext.js +37 -0
- package/lib/module/contexts/componentsContext/ComponentsContext.js.map +1 -0
- package/lib/module/contexts/componentsContext/PLAN.md +148 -0
- package/lib/module/contexts/componentsContext/defaultComponents.js +286 -0
- package/lib/module/contexts/componentsContext/defaultComponents.js.map +1 -0
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -9
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContextBase.js.map +1 -1
- package/lib/module/contexts/index.js +11 -0
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -76
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/MessageOverlayHostLayer.js +7 -5
- package/lib/module/contexts/overlayContext/MessageOverlayHostLayer.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -4
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/threadsContext/ThreadsContext.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -2
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FilePreview.d.ts +2 -3
- package/lib/typescript/components/Attachment/FilePreview.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/GalleryImage.d.ts +3 -2
- package/lib/typescript/components/Attachment/GalleryImage.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Giphy/GiphyImage.d.ts +4 -2
- package/lib/typescript/components/Attachment/Giphy/GiphyImage.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/UnsupportedAttachment.d.ts +2 -3
- package/lib/typescript/components/Attachment/UnsupportedAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/UrlPreview/URLPreview.d.ts +4 -3
- package/lib/typescript/components/Attachment/UrlPreview/URLPreview.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/UrlPreview/URLPreviewCompact.d.ts +4 -3
- package/lib/typescript/components/Attachment/UrlPreview/URLPreviewCompact.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +2 -3
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +3 -28
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +2 -10
- package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelListLoadingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelListView.d.ts +1 -1
- package/lib/typescript/components/ChannelList/ChannelListView.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +1 -1
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts +1 -2
- package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +1 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts +1 -3
- package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts +1 -7
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +6 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/types.d.ts +0 -2
- package/lib/typescript/components/ImageGallery/components/types.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageBubble.d.ts +1 -2
- package/lib/typescript/components/Message/MessageItemView/MessageBubble.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageDeleted.d.ts +1 -2
- package/lib/typescript/components/Message/MessageItemView/MessageDeleted.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageFooter.d.ts +0 -2
- package/lib/typescript/components/Message/MessageItemView/MessageFooter.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageHeader.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageReplies.d.ts +1 -2
- package/lib/typescript/components/Message/MessageItemView/MessageReplies.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageTextContainer.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageTextContainer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListBottom.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListBottom.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListTop.d.ts +1 -1
- package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListTop.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageComposer.d.ts +1 -2
- package/lib/typescript/components/MessageInput/MessageComposer.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.d.ts +3 -4
- package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/InputButtons/index.d.ts +1 -1
- package/lib/typescript/components/MessageInput/components/InputButtons/index.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/LinkPreviewList.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/OutputButtons/index.d.ts +1 -1
- package/lib/typescript/components/MessageInput/components/OutputButtons/index.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageFlashList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageFlashList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/StickyHeader.d.ts +2 -3
- package/lib/typescript/components/MessageList/StickyHeader.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts +1 -2
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts +1 -2
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts +2 -3
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -1
- package/lib/typescript/components/Poll/CreatePollContent.d.ts +2 -2
- package/lib/typescript/components/Poll/CreatePollContent.d.ts.map +1 -1
- package/lib/typescript/components/Poll/Poll.d.ts +5 -8
- package/lib/typescript/components/Poll/Poll.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +1 -2
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts +1 -2
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts +1 -4
- package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts +1 -2
- package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +4 -3
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/Thread/Thread.d.ts +2 -8
- package/lib/typescript/components/Thread/Thread.d.ts.map +1 -1
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +1 -2
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadList.d.ts +2 -3
- package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadListItem.d.ts.map +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +0 -17
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +0 -23
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +0 -112
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +0 -5
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/componentsContext/ComponentsContext.d.ts +321 -0
- package/lib/typescript/contexts/componentsContext/ComponentsContext.d.ts.map +1 -0
- package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts +296 -0
- package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts.map +1 -0
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContextBase.d.ts +0 -5
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContextBase.d.ts.map +1 -1
- package/lib/typescript/contexts/index.d.ts +1 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -169
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -332
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/MessageOverlayHostLayer.d.ts +2 -5
- package/lib/typescript/contexts/overlayContext/MessageOverlayHostLayer.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +0 -4
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/contexts/threadsContext/ThreadsContext.d.ts +0 -9
- package/lib/typescript/contexts/threadsContext/ThreadsContext.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/offline-support/offline-feature.js +64 -67
- package/src/components/Attachment/Attachment.tsx +7 -69
- package/src/components/Attachment/FileAttachment.tsx +4 -7
- package/src/components/Attachment/FileAttachmentGroup.tsx +9 -19
- package/src/components/Attachment/FilePreview.tsx +4 -9
- package/src/components/Attachment/Gallery.tsx +6 -83
- package/src/components/Attachment/GalleryImage.tsx +5 -4
- package/src/components/Attachment/Giphy/GiphyImage.tsx +15 -37
- package/src/components/Attachment/UnsupportedAttachment.tsx +5 -10
- package/src/components/Attachment/UrlPreview/URLPreview.tsx +6 -4
- package/src/components/Attachment/UrlPreview/URLPreviewCompact.tsx +6 -4
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +2 -2
- package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx +5 -4
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +4 -20
- package/src/components/Channel/Channel.tsx +31 -438
- package/src/components/Channel/__tests__/isAttachmentEqualHandler.test.js +12 -9
- package/src/components/Channel/hooks/useCreateChannelContext.ts +0 -8
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +1 -81
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +0 -130
- package/src/components/ChannelList/ChannelList.tsx +3 -76
- package/src/components/ChannelList/ChannelListLoadingIndicator.tsx +3 -1
- package/src/components/ChannelList/ChannelListView.tsx +12 -33
- package/src/components/ChannelList/__tests__/ChannelList.test.js +173 -116
- package/src/components/ChannelList/__tests__/ChannelListView.test.js +64 -41
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +0 -39
- package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +2 -2
- package/src/components/ChannelPreview/ChannelPreview.tsx +6 -14
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +7 -33
- package/src/components/ChannelPreview/ChannelPreviewView.tsx +11 -40
- package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +2 -4
- package/src/components/ChannelPreview/__tests__/ChannelDetailsBottomSheet.test.tsx +16 -12
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.tsx +25 -24
- package/src/components/ChannelPreview/__tests__/ChannelSwipableWrapper.test.tsx +11 -6
- package/src/components/Chat/Chat.tsx +5 -12
- package/src/components/Chat/hooks/useCreateChatContext.ts +0 -2
- package/src/components/ImageGallery/ImageGallery.tsx +14 -16
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +0 -8
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +25 -21
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +3 -1
- package/src/components/ImageGallery/components/types.ts +0 -3
- package/src/components/Message/Message.tsx +11 -32
- package/src/components/Message/MessageItemView/MessageBubble.tsx +11 -7
- package/src/components/Message/MessageItemView/MessageContent.tsx +14 -47
- package/src/components/Message/MessageItemView/MessageDeleted.tsx +3 -9
- package/src/components/Message/MessageItemView/MessageFooter.tsx +2 -14
- package/src/components/Message/MessageItemView/MessageHeader.tsx +11 -29
- package/src/components/Message/MessageItemView/MessageItemView.tsx +10 -42
- package/src/components/Message/MessageItemView/MessageReplies.tsx +2 -8
- package/src/components/Message/MessageItemView/MessageTextContainer.tsx +4 -8
- package/src/components/Message/MessageItemView/MessageWrapper.tsx +4 -9
- package/src/components/Message/MessageItemView/ReactionList/ReactionListBottom.tsx +4 -12
- package/src/components/Message/MessageItemView/ReactionList/ReactionListTop.tsx +4 -20
- package/src/components/Message/MessageItemView/__tests__/MessageContent.test.js +47 -30
- package/src/components/Message/MessageItemView/__tests__/MessageItemView.test.js +16 -7
- package/src/components/Message/MessageItemView/__tests__/MessageTextContainer.test.tsx +8 -4
- package/src/components/MessageInput/MessageComposer.tsx +16 -76
- package/src/components/MessageInput/MessageInputHeaderView.tsx +3 -3
- package/src/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.tsx +7 -35
- package/src/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.tsx +2 -2
- package/src/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.tsx +2 -2
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.tsx +6 -4
- package/src/components/MessageInput/components/InputButtons/index.tsx +4 -5
- package/src/components/MessageInput/components/LinkPreviewList.tsx +3 -2
- package/src/components/MessageInput/components/OutputButtons/index.tsx +4 -23
- package/src/components/MessageList/MessageFlashList.tsx +13 -57
- package/src/components/MessageList/MessageList.tsx +15 -57
- package/src/components/MessageList/StickyHeader.tsx +4 -3
- package/src/components/MessageMenu/MessageActionList.tsx +4 -3
- package/src/components/MessageMenu/MessageMenu.tsx +35 -47
- package/src/components/MessageMenu/MessageUserReactions.tsx +7 -27
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +3 -6
- package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +12 -11
- package/src/components/Poll/CreatePollContent.tsx +3 -4
- package/src/components/Poll/Poll.tsx +22 -24
- package/src/components/Poll/components/PollAnswersList.tsx +9 -11
- package/src/components/Poll/components/PollOption.tsx +9 -11
- package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +10 -11
- package/src/components/Poll/components/PollResults/PollResults.tsx +9 -15
- package/src/components/Reply/Reply.tsx +18 -5
- package/src/components/Thread/Thread.tsx +3 -18
- package/src/components/Thread/components/ThreadFooterComponent.tsx +10 -11
- package/src/components/ThreadList/ThreadList.tsx +14 -22
- package/src/components/ThreadList/ThreadListItem.tsx +6 -11
- package/src/components/ui/Avatar/Avatar.tsx +2 -2
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +0 -15
- package/src/contexts/channelContext/ChannelContext.tsx +0 -24
- package/src/contexts/channelsContext/ChannelsContext.tsx +0 -113
- package/src/contexts/chatContext/ChatContext.tsx +0 -5
- package/src/contexts/componentsContext/ComponentsContext.tsx +62 -0
- package/src/contexts/componentsContext/PLAN.md +148 -0
- package/src/contexts/componentsContext/__tests__/defaultComponents.test.ts +44 -0
- package/src/contexts/componentsContext/defaultComponents.ts +332 -0
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +0 -8
- package/src/contexts/imageGalleryContext/ImageGalleryContextBase.tsx +0 -10
- package/src/contexts/index.ts +1 -0
- package/src/contexts/messageInputContext/MessageInputContext.tsx +0 -185
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +1 -75
- package/src/contexts/messagesContext/MessagesContext.tsx +3 -358
- package/src/contexts/overlayContext/MessageOverlayHostLayer.tsx +5 -7
- package/src/contexts/overlayContext/OverlayContext.tsx +0 -4
- package/src/contexts/overlayContext/OverlayProvider.tsx +1 -2
- package/src/contexts/overlayContext/__tests__/MessageOverlayHostLayer.test.tsx +21 -6
- package/src/contexts/threadsContext/ThreadsContext.tsx +0 -9
- package/src/version.json +1 -1
|
@@ -3,18 +3,13 @@ import { StyleSheet, Text, View } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import type { Attachment, LocalMessage } from 'stream-chat';
|
|
5
5
|
|
|
6
|
-
import type { MessageStatusProps } from './MessageStatus';
|
|
7
|
-
|
|
8
6
|
import type { ChannelContextValue } from '../../../contexts/channelContext/ChannelContext';
|
|
7
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
9
8
|
import {
|
|
10
9
|
Alignment,
|
|
11
10
|
MessageContextValue,
|
|
12
11
|
useMessageContext,
|
|
13
12
|
} from '../../../contexts/messageContext/MessageContext';
|
|
14
|
-
import {
|
|
15
|
-
MessagesContextValue,
|
|
16
|
-
useMessagesContext,
|
|
17
|
-
} from '../../../contexts/messagesContext/MessagesContext';
|
|
18
13
|
|
|
19
14
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
20
15
|
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
|
|
@@ -37,7 +32,6 @@ type MessageFooterPropsWithContext = Pick<
|
|
|
37
32
|
| 'lastGroupMessage'
|
|
38
33
|
| 'isMessageAIGenerated'
|
|
39
34
|
> &
|
|
40
|
-
Pick<MessagesContextValue, 'MessageStatus' | 'MessageTimestamp'> &
|
|
41
35
|
MessageFooterComponentProps;
|
|
42
36
|
|
|
43
37
|
const MessageFooterWithContext = (props: MessageFooterPropsWithContext) => {
|
|
@@ -49,10 +43,9 @@ const MessageFooterWithContext = (props: MessageFooterPropsWithContext) => {
|
|
|
49
43
|
lastGroupMessage,
|
|
50
44
|
members,
|
|
51
45
|
message,
|
|
52
|
-
MessageStatus,
|
|
53
|
-
MessageTimestamp,
|
|
54
46
|
showMessageStatus,
|
|
55
47
|
} = props;
|
|
48
|
+
const { MessageStatus, MessageTimestamp } = useComponentsContext();
|
|
56
49
|
const styles = useStyles();
|
|
57
50
|
|
|
58
51
|
const {
|
|
@@ -169,7 +162,6 @@ export type MessageFooterProps = Partial<Pick<ChannelContextValue, 'members'>> &
|
|
|
169
162
|
alignment?: Alignment;
|
|
170
163
|
lastGroupMessage?: boolean;
|
|
171
164
|
message?: LocalMessage;
|
|
172
|
-
MessageStatus?: React.ComponentType<MessageStatusProps>;
|
|
173
165
|
otherAttachments?: Attachment[];
|
|
174
166
|
showMessageStatus?: boolean;
|
|
175
167
|
};
|
|
@@ -178,8 +170,6 @@ export const MessageFooter = (props: MessageFooterProps) => {
|
|
|
178
170
|
const { alignment, isMessageAIGenerated, lastGroupMessage, members, message, showMessageStatus } =
|
|
179
171
|
useMessageContext();
|
|
180
172
|
|
|
181
|
-
const { MessageStatus, MessageTimestamp } = useMessagesContext();
|
|
182
|
-
|
|
183
173
|
return (
|
|
184
174
|
<MemoizedMessageFooter
|
|
185
175
|
{...{
|
|
@@ -188,8 +178,6 @@ export const MessageFooter = (props: MessageFooterProps) => {
|
|
|
188
178
|
lastGroupMessage,
|
|
189
179
|
members,
|
|
190
180
|
message,
|
|
191
|
-
MessageStatus,
|
|
192
|
-
MessageTimestamp,
|
|
193
181
|
showMessageStatus,
|
|
194
182
|
}}
|
|
195
183
|
{...props}
|
|
@@ -2,43 +2,35 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { View, ViewStyle } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
5
6
|
import {
|
|
6
7
|
MessageContextValue,
|
|
7
8
|
useMessageContext,
|
|
8
9
|
} from '../../../contexts/messageContext/MessageContext';
|
|
9
|
-
import {
|
|
10
|
-
MessagesContextValue,
|
|
11
|
-
useMessagesContext,
|
|
12
|
-
} from '../../../contexts/messagesContext/MessagesContext';
|
|
13
10
|
import { useMessageReminder } from '../../../hooks/useMessageReminder';
|
|
14
11
|
|
|
15
|
-
type MessageHeaderPropsWithContext = Pick<MessageContextValue, 'alignment' | 'message'> &
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| 'SentToChannelHeader'
|
|
22
|
-
> & {
|
|
23
|
-
shouldShowSavedForLaterHeader?: boolean;
|
|
24
|
-
shouldShowPinnedHeader: boolean;
|
|
25
|
-
shouldShowReminderHeader: boolean;
|
|
26
|
-
shouldShowSentToChannelHeader: boolean;
|
|
27
|
-
};
|
|
12
|
+
type MessageHeaderPropsWithContext = Pick<MessageContextValue, 'alignment' | 'message'> & {
|
|
13
|
+
shouldShowSavedForLaterHeader?: boolean;
|
|
14
|
+
shouldShowPinnedHeader: boolean;
|
|
15
|
+
shouldShowReminderHeader: boolean;
|
|
16
|
+
shouldShowSentToChannelHeader: boolean;
|
|
17
|
+
};
|
|
28
18
|
|
|
29
19
|
const MessageHeaderWithContext = (props: MessageHeaderPropsWithContext) => {
|
|
30
20
|
const {
|
|
31
21
|
alignment,
|
|
32
22
|
message,
|
|
33
|
-
MessagePinnedHeader,
|
|
34
23
|
shouldShowSavedForLaterHeader,
|
|
35
24
|
shouldShowPinnedHeader,
|
|
36
25
|
shouldShowReminderHeader,
|
|
37
26
|
shouldShowSentToChannelHeader,
|
|
27
|
+
} = props;
|
|
28
|
+
const {
|
|
29
|
+
MessagePinnedHeader,
|
|
38
30
|
MessageReminderHeader,
|
|
39
31
|
MessageSavedForLaterHeader,
|
|
40
32
|
SentToChannelHeader,
|
|
41
|
-
} =
|
|
33
|
+
} = useComponentsContext();
|
|
42
34
|
|
|
43
35
|
const containerStyle: ViewStyle = useMemo(() => {
|
|
44
36
|
return {
|
|
@@ -115,12 +107,6 @@ export type MessageHeaderProps = Partial<Pick<MessageContextValue, 'message'>>;
|
|
|
115
107
|
|
|
116
108
|
export const MessageHeader = (props: MessageHeaderProps) => {
|
|
117
109
|
const { alignment, message } = useMessageContext();
|
|
118
|
-
const {
|
|
119
|
-
MessagePinnedHeader,
|
|
120
|
-
MessageReminderHeader,
|
|
121
|
-
MessageSavedForLaterHeader,
|
|
122
|
-
SentToChannelHeader,
|
|
123
|
-
} = useMessagesContext();
|
|
124
110
|
const reminder = useMessageReminder(message.id);
|
|
125
111
|
|
|
126
112
|
const shouldShowSavedForLaterHeader = reminder && !reminder.remindAt;
|
|
@@ -141,14 +127,10 @@ export const MessageHeader = (props: MessageHeaderProps) => {
|
|
|
141
127
|
<MemoizedMessageHeader
|
|
142
128
|
alignment={alignment}
|
|
143
129
|
message={message}
|
|
144
|
-
MessagePinnedHeader={MessagePinnedHeader}
|
|
145
130
|
shouldShowSavedForLaterHeader={shouldShowSavedForLaterHeader}
|
|
146
131
|
shouldShowPinnedHeader={shouldShowPinnedHeader}
|
|
147
132
|
shouldShowReminderHeader={!!shouldShowReminderHeader}
|
|
148
133
|
shouldShowSentToChannelHeader={shouldShowSentToChannelHeader}
|
|
149
|
-
MessageReminderHeader={MessageReminderHeader}
|
|
150
|
-
MessageSavedForLaterHeader={MessageSavedForLaterHeader}
|
|
151
|
-
SentToChannelHeader={SentToChannelHeader}
|
|
152
134
|
{...props}
|
|
153
135
|
/>
|
|
154
136
|
);
|
|
@@ -3,6 +3,7 @@ import { Dimensions, StyleSheet, View, ViewStyle } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { SwipableMessageWrapper } from './MessageBubble';
|
|
5
5
|
|
|
6
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
6
7
|
import {
|
|
7
8
|
Alignment,
|
|
8
9
|
MessageContextValue,
|
|
@@ -216,20 +217,9 @@ export type MessageItemViewPropsWithContext = Pick<
|
|
|
216
217
|
| 'enableMessageGroupingByUser'
|
|
217
218
|
| 'enableSwipeToReply'
|
|
218
219
|
| 'myMessageTheme'
|
|
219
|
-
| 'MessageAuthor'
|
|
220
|
-
| 'MessageContent'
|
|
221
|
-
| 'MessageDeleted'
|
|
222
|
-
| 'MessageError'
|
|
223
|
-
| 'MessageFooter'
|
|
224
|
-
| 'MessageHeader'
|
|
225
|
-
| 'MessageReplies'
|
|
226
|
-
| 'MessageSpacer'
|
|
227
|
-
| 'MessageSwipeContent'
|
|
228
220
|
| 'messageSwipeToReplyHitSlop'
|
|
229
|
-
| 'ReactionListBottom'
|
|
230
221
|
| 'reactionListPosition'
|
|
231
222
|
| 'reactionListType'
|
|
232
|
-
| 'ReactionListTop'
|
|
233
223
|
>;
|
|
234
224
|
|
|
235
225
|
const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
|
|
@@ -245,6 +235,14 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
|
|
|
245
235
|
hasAttachmentActions,
|
|
246
236
|
isMyMessage,
|
|
247
237
|
message,
|
|
238
|
+
messageSwipeToReplyHitSlop = { left: width, right: width },
|
|
239
|
+
onlyEmojis,
|
|
240
|
+
otherAttachments,
|
|
241
|
+
reactionListPosition,
|
|
242
|
+
reactionListType,
|
|
243
|
+
setQuotedMessage,
|
|
244
|
+
} = props;
|
|
245
|
+
const {
|
|
248
246
|
MessageAuthor,
|
|
249
247
|
MessageContent,
|
|
250
248
|
MessageDeleted,
|
|
@@ -253,16 +251,9 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
|
|
|
253
251
|
MessageHeader,
|
|
254
252
|
MessageReplies,
|
|
255
253
|
MessageSpacer,
|
|
256
|
-
MessageSwipeContent,
|
|
257
|
-
messageSwipeToReplyHitSlop = { left: width, right: width },
|
|
258
|
-
onlyEmojis,
|
|
259
|
-
otherAttachments,
|
|
260
254
|
ReactionListBottom,
|
|
261
|
-
reactionListPosition,
|
|
262
|
-
reactionListType,
|
|
263
255
|
ReactionListTop,
|
|
264
|
-
|
|
265
|
-
} = props;
|
|
256
|
+
} = useComponentsContext();
|
|
266
257
|
|
|
267
258
|
const {
|
|
268
259
|
theme: {
|
|
@@ -380,7 +371,6 @@ const MessageItemViewWithContext = (props: MessageItemViewPropsWithContext) => {
|
|
|
380
371
|
|
|
381
372
|
return enableSwipeToReply && !isMessageTypeDeleted ? (
|
|
382
373
|
<SwipableMessageWrapper
|
|
383
|
-
MessageSwipeContent={MessageSwipeContent}
|
|
384
374
|
messageSwipeToReplyHitSlop={messageSwipeToReplyHitSlop}
|
|
385
375
|
onSwipe={onSwipeActionHandler}
|
|
386
376
|
>
|
|
@@ -540,21 +530,10 @@ export const MessageItemView = (props: MessageItemViewProps) => {
|
|
|
540
530
|
customMessageSwipeAction,
|
|
541
531
|
enableMessageGroupingByUser,
|
|
542
532
|
enableSwipeToReply,
|
|
543
|
-
MessageAuthor,
|
|
544
|
-
MessageContent,
|
|
545
|
-
MessageDeleted,
|
|
546
|
-
MessageError,
|
|
547
|
-
MessageFooter,
|
|
548
|
-
MessageHeader,
|
|
549
|
-
MessageReplies,
|
|
550
|
-
MessageSpacer,
|
|
551
|
-
MessageSwipeContent,
|
|
552
533
|
messageSwipeToReplyHitSlop,
|
|
553
534
|
myMessageTheme,
|
|
554
|
-
ReactionListBottom,
|
|
555
535
|
reactionListPosition,
|
|
556
536
|
reactionListType,
|
|
557
|
-
ReactionListTop,
|
|
558
537
|
} = useMessagesContext();
|
|
559
538
|
|
|
560
539
|
return (
|
|
@@ -570,23 +549,12 @@ export const MessageItemView = (props: MessageItemViewProps) => {
|
|
|
570
549
|
hasAttachmentActions,
|
|
571
550
|
isMyMessage,
|
|
572
551
|
message,
|
|
573
|
-
MessageAuthor,
|
|
574
|
-
MessageContent,
|
|
575
|
-
MessageDeleted,
|
|
576
|
-
MessageError,
|
|
577
|
-
MessageFooter,
|
|
578
|
-
MessageHeader,
|
|
579
|
-
MessageReplies,
|
|
580
|
-
MessageSpacer,
|
|
581
|
-
MessageSwipeContent,
|
|
582
552
|
messageSwipeToReplyHitSlop,
|
|
583
553
|
myMessageTheme,
|
|
584
554
|
onlyEmojis,
|
|
585
555
|
otherAttachments,
|
|
586
|
-
ReactionListBottom,
|
|
587
556
|
reactionListPosition,
|
|
588
557
|
reactionListType,
|
|
589
|
-
ReactionListTop,
|
|
590
558
|
setQuotedMessage,
|
|
591
559
|
lastGroupMessage,
|
|
592
560
|
members,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { I18nManager, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
4
5
|
import {
|
|
5
6
|
MessageContextValue,
|
|
6
7
|
useMessageContext,
|
|
7
8
|
} from '../../../contexts/messageContext/MessageContext';
|
|
8
|
-
import {
|
|
9
|
-
MessagesContextValue,
|
|
10
|
-
useMessagesContext,
|
|
11
|
-
} from '../../../contexts/messagesContext/MessagesContext';
|
|
12
9
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
13
10
|
import {
|
|
14
11
|
TranslationContextValue,
|
|
@@ -31,7 +28,6 @@ export type MessageRepliesPropsWithContext = Pick<
|
|
|
31
28
|
| 'preventPress'
|
|
32
29
|
| 'threadList'
|
|
33
30
|
> &
|
|
34
|
-
Pick<MessagesContextValue, 'MessageRepliesAvatars'> &
|
|
35
31
|
Pick<TranslationContextValue, 't'>;
|
|
36
32
|
|
|
37
33
|
const MessageRepliesWithContext = (props: MessageRepliesPropsWithContext) => {
|
|
@@ -39,7 +35,6 @@ const MessageRepliesWithContext = (props: MessageRepliesPropsWithContext) => {
|
|
|
39
35
|
alignment,
|
|
40
36
|
isMyMessage,
|
|
41
37
|
message,
|
|
42
|
-
MessageRepliesAvatars,
|
|
43
38
|
onLongPress,
|
|
44
39
|
onOpenThread,
|
|
45
40
|
onPress,
|
|
@@ -48,6 +43,7 @@ const MessageRepliesWithContext = (props: MessageRepliesPropsWithContext) => {
|
|
|
48
43
|
t,
|
|
49
44
|
threadList,
|
|
50
45
|
} = props;
|
|
46
|
+
const { MessageRepliesAvatars } = useComponentsContext();
|
|
51
47
|
|
|
52
48
|
const {
|
|
53
49
|
theme: {
|
|
@@ -190,7 +186,6 @@ export const MessageReplies = (props: MessageRepliesProps) => {
|
|
|
190
186
|
preventPress,
|
|
191
187
|
threadList,
|
|
192
188
|
} = useMessageContext();
|
|
193
|
-
const { MessageRepliesAvatars } = useMessagesContext();
|
|
194
189
|
const { t } = useTranslationContext();
|
|
195
190
|
|
|
196
191
|
return (
|
|
@@ -199,7 +194,6 @@ export const MessageReplies = (props: MessageRepliesProps) => {
|
|
|
199
194
|
alignment,
|
|
200
195
|
isMyMessage,
|
|
201
196
|
message,
|
|
202
|
-
MessageRepliesAvatars,
|
|
203
197
|
onLongPress,
|
|
204
198
|
onOpenThread,
|
|
205
199
|
onPress,
|
|
@@ -5,6 +5,7 @@ import { LocalMessage } from 'stream-chat';
|
|
|
5
5
|
|
|
6
6
|
import { renderText, RenderTextParams } from './utils/renderText';
|
|
7
7
|
|
|
8
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
8
9
|
import {
|
|
9
10
|
MessageContextValue,
|
|
10
11
|
useMessageContext,
|
|
@@ -32,10 +33,7 @@ export type MessageTextContainerPropsWithContext = Pick<
|
|
|
32
33
|
MessageContextValue,
|
|
33
34
|
'message' | 'onLongPress' | 'onlyEmojis' | 'onPress' | 'preventPress' | 'isMyMessage'
|
|
34
35
|
> &
|
|
35
|
-
Pick<
|
|
36
|
-
MessagesContextValue,
|
|
37
|
-
'markdownRules' | 'MessageText' | 'myMessageTheme' | 'messageTextNumberOfLines'
|
|
38
|
-
> & {
|
|
36
|
+
Pick<MessagesContextValue, 'markdownRules' | 'myMessageTheme' | 'messageTextNumberOfLines'> & {
|
|
39
37
|
markdownStyles?: MarkdownStyle;
|
|
40
38
|
messageOverlay?: boolean;
|
|
41
39
|
styles?: Partial<{
|
|
@@ -52,7 +50,6 @@ const MessageTextContainerWithContext = (props: MessageTextContainerPropsWithCon
|
|
|
52
50
|
markdownStyles: markdownStylesProp = {},
|
|
53
51
|
message,
|
|
54
52
|
messageOverlay,
|
|
55
|
-
MessageText,
|
|
56
53
|
messageTextNumberOfLines,
|
|
57
54
|
onLongPress,
|
|
58
55
|
onlyEmojis,
|
|
@@ -60,6 +57,7 @@ const MessageTextContainerWithContext = (props: MessageTextContainerPropsWithCon
|
|
|
60
57
|
preventPress,
|
|
61
58
|
styles: stylesProp = {},
|
|
62
59
|
} = props;
|
|
60
|
+
const { MessageText } = useComponentsContext();
|
|
63
61
|
|
|
64
62
|
const {
|
|
65
63
|
theme: {
|
|
@@ -186,8 +184,7 @@ export type MessageTextContainerProps = Partial<MessageTextContainerPropsWithCon
|
|
|
186
184
|
export const MessageTextContainer = (props: MessageTextContainerProps) => {
|
|
187
185
|
const { message, onLongPress, onlyEmojis, onPress, preventPress, isMyMessage } =
|
|
188
186
|
useMessageContext();
|
|
189
|
-
const { markdownRules,
|
|
190
|
-
useMessagesContext();
|
|
187
|
+
const { markdownRules, messageTextNumberOfLines, myMessageTheme } = useMessagesContext();
|
|
191
188
|
|
|
192
189
|
return (
|
|
193
190
|
<MemoizedMessageTextContainer
|
|
@@ -195,7 +192,6 @@ export const MessageTextContainer = (props: MessageTextContainerProps) => {
|
|
|
195
192
|
markdownRules,
|
|
196
193
|
message,
|
|
197
194
|
isMyMessage,
|
|
198
|
-
MessageText,
|
|
199
195
|
messageTextNumberOfLines,
|
|
200
196
|
myMessageTheme,
|
|
201
197
|
onLongPress,
|
|
@@ -8,6 +8,7 @@ import { useMessageDateSeparator } from '../../../components/MessageList/hooks/u
|
|
|
8
8
|
import { useMessageGroupStyles } from '../../../components/MessageList/hooks/useMessageGroupStyles';
|
|
9
9
|
import { useChannelContext } from '../../../contexts/channelContext/ChannelContext';
|
|
10
10
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
11
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
11
12
|
import { useMessageListItemContext } from '../../../contexts/messageListItemContext/MessageListItemContext';
|
|
12
13
|
import { useMessagesContext } from '../../../contexts/messagesContext/MessagesContext';
|
|
13
14
|
import { ThemeProvider, useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
@@ -40,15 +41,9 @@ export const MessageWrapper = React.memo((props: MessageWrapperProps) => {
|
|
|
40
41
|
maxTimeBetweenGroupedMessages,
|
|
41
42
|
threadList,
|
|
42
43
|
} = useChannelContext();
|
|
43
|
-
const {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
InlineUnreadIndicator,
|
|
47
|
-
Message,
|
|
48
|
-
MessageSystem,
|
|
49
|
-
myMessageTheme,
|
|
50
|
-
shouldShowUnreadUnderlay,
|
|
51
|
-
} = useMessagesContext();
|
|
44
|
+
const { InlineDateSeparator, InlineUnreadIndicator, Message, MessageSystem } =
|
|
45
|
+
useComponentsContext();
|
|
46
|
+
const { getMessageGroupStyle, myMessageTheme, shouldShowUnreadUnderlay } = useMessagesContext();
|
|
52
47
|
const { goToMessage, onThreadSelect, noGroupByUser, modifiedTheme } = useMessageListItemContext();
|
|
53
48
|
|
|
54
49
|
const dateSeparatorDate = useMessageDateSeparator({
|
|
@@ -3,6 +3,7 @@ import { FlatList, StyleSheet, View } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { ReactionListItemProps } from './ReactionListItem';
|
|
5
5
|
|
|
6
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
6
7
|
import {
|
|
7
8
|
MessageContextValue,
|
|
8
9
|
useMessageContext,
|
|
@@ -29,9 +30,7 @@ export type ReactionListBottomProps = Partial<
|
|
|
29
30
|
| 'showReactionsOverlay'
|
|
30
31
|
>
|
|
31
32
|
> &
|
|
32
|
-
Partial<
|
|
33
|
-
Pick<MessagesContextValue, 'supportedReactions' | 'ReactionListClustered' | 'ReactionListItem'>
|
|
34
|
-
> & {
|
|
33
|
+
Partial<Pick<MessagesContextValue, 'supportedReactions'>> & {
|
|
35
34
|
type?: 'clustered' | 'segmented';
|
|
36
35
|
showCount?: boolean;
|
|
37
36
|
};
|
|
@@ -55,8 +54,6 @@ export const ReactionListBottom = (props: ReactionListBottomProps) => {
|
|
|
55
54
|
supportedReactions: propSupportedReactions,
|
|
56
55
|
type,
|
|
57
56
|
showCount = true,
|
|
58
|
-
ReactionListClustered: propReactionListClustered,
|
|
59
|
-
ReactionListItem: propReactionListItem,
|
|
60
57
|
} = props;
|
|
61
58
|
|
|
62
59
|
const {
|
|
@@ -71,11 +68,8 @@ export const ReactionListBottom = (props: ReactionListBottomProps) => {
|
|
|
71
68
|
showReactionsOverlay: contextShowReactionsOverlay,
|
|
72
69
|
} = useMessageContext();
|
|
73
70
|
|
|
74
|
-
const {
|
|
75
|
-
|
|
76
|
-
ReactionListClustered: contextReactionListClustered,
|
|
77
|
-
ReactionListItem: contextReactionListItem,
|
|
78
|
-
} = useMessagesContext();
|
|
71
|
+
const { ReactionListClustered, ReactionListItem } = useComponentsContext();
|
|
72
|
+
const { supportedReactions: contextSupportedReactions } = useMessagesContext();
|
|
79
73
|
|
|
80
74
|
const alignment = propAlignment || contextAlignment;
|
|
81
75
|
const handleReaction = propHandlerReaction || contextHandleReaction;
|
|
@@ -87,8 +81,6 @@ export const ReactionListBottom = (props: ReactionListBottomProps) => {
|
|
|
87
81
|
const reactions = propReactions || contextReactions;
|
|
88
82
|
const showReactionsOverlay = propShowReactionsOverlay || contextShowReactionsOverlay;
|
|
89
83
|
const supportedReactions = propSupportedReactions || contextSupportedReactions;
|
|
90
|
-
const ReactionListClustered = propReactionListClustered || contextReactionListClustered;
|
|
91
|
-
const ReactionListItem = propReactionListItem || contextReactionListItem;
|
|
92
84
|
|
|
93
85
|
const renderItem = useCallback(
|
|
94
86
|
({ index, item }: { index: number; item: ReactionListItemProps }) => (
|
|
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../../../../contexts';
|
|
5
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
5
6
|
import {
|
|
6
7
|
MessageContextValue,
|
|
7
8
|
useMessageContext,
|
|
@@ -26,14 +27,7 @@ export type ReactionListTopProps = Partial<
|
|
|
26
27
|
| 'showReactionsOverlay'
|
|
27
28
|
| 'handleReaction'
|
|
28
29
|
> &
|
|
29
|
-
Pick<
|
|
30
|
-
MessagesContextValue,
|
|
31
|
-
| 'supportedReactions'
|
|
32
|
-
| 'reactionListType'
|
|
33
|
-
| 'ReactionListClustered'
|
|
34
|
-
| 'ReactionListItem'
|
|
35
|
-
| 'ReactionListCountItem'
|
|
36
|
-
>
|
|
30
|
+
Pick<MessagesContextValue, 'supportedReactions' | 'reactionListType'>
|
|
37
31
|
> & {
|
|
38
32
|
type?: 'clustered' | 'segmented';
|
|
39
33
|
showCount?: boolean;
|
|
@@ -56,9 +50,6 @@ export const ReactionListTop = (props: ReactionListTopProps) => {
|
|
|
56
50
|
handleReaction: propHandleReaction,
|
|
57
51
|
type,
|
|
58
52
|
showCount = true,
|
|
59
|
-
ReactionListClustered: propReactionListClustered,
|
|
60
|
-
ReactionListItem: propReactionListItem,
|
|
61
|
-
ReactionListCountItem: propReactionListCountItem,
|
|
62
53
|
} = props;
|
|
63
54
|
|
|
64
55
|
const {
|
|
@@ -73,12 +64,8 @@ export const ReactionListTop = (props: ReactionListTopProps) => {
|
|
|
73
64
|
handleReaction: contextHandleReaction,
|
|
74
65
|
} = useMessageContext();
|
|
75
66
|
|
|
76
|
-
const {
|
|
77
|
-
|
|
78
|
-
ReactionListClustered: contextReactionListClustered,
|
|
79
|
-
ReactionListItem: contextReactionListItem,
|
|
80
|
-
ReactionListCountItem: contextReactionListCountItem,
|
|
81
|
-
} = useMessagesContext();
|
|
67
|
+
const { ReactionListClustered, ReactionListCountItem, ReactionListItem } = useComponentsContext();
|
|
68
|
+
const { supportedReactions: contextSupportedReactions } = useMessagesContext();
|
|
82
69
|
|
|
83
70
|
const alignment = propAlignment || contextAlignment;
|
|
84
71
|
const hasReactions = propHasReactions || contextHasReactions;
|
|
@@ -90,9 +77,6 @@ export const ReactionListTop = (props: ReactionListTopProps) => {
|
|
|
90
77
|
const showReactionsOverlay = propShowReactionsOverlay || contextShowReactionsOverlay;
|
|
91
78
|
const supportedReactions = propSupportedReactions || contextSupportedReactions;
|
|
92
79
|
const handleReaction = propHandleReaction || contextHandleReaction;
|
|
93
|
-
const ReactionListClustered = propReactionListClustered || contextReactionListClustered;
|
|
94
|
-
const ReactionListItem = propReactionListItem || contextReactionListItem;
|
|
95
|
-
const ReactionListCountItem = propReactionListCountItem || contextReactionListCountItem;
|
|
96
80
|
|
|
97
81
|
const styles = useStyles({ alignment });
|
|
98
82
|
|
|
@@ -4,6 +4,7 @@ import { StyleSheet, View } from 'react-native';
|
|
|
4
4
|
import { cleanup, render, screen, waitFor } from '@testing-library/react-native';
|
|
5
5
|
|
|
6
6
|
import { ChannelsStateProvider } from '../../../../contexts/channelsStateContext/ChannelsStateContext';
|
|
7
|
+
import { WithComponents } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
7
8
|
|
|
8
9
|
import { getOrCreateChannelApi } from '../../../../mock-builders/api/getOrCreateChannel';
|
|
9
10
|
import { useMockedApis } from '../../../../mock-builders/api/useMockedApis';
|
|
@@ -116,9 +117,11 @@ describe('MessageContent', () => {
|
|
|
116
117
|
render(
|
|
117
118
|
<ChannelsStateProvider>
|
|
118
119
|
<Chat client={chatClient}>
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
|
|
120
|
+
<WithComponents overrides={{ MessageHeader: ContextMessageHeader }}>
|
|
121
|
+
<Channel channel={channel}>
|
|
122
|
+
<Message groupStyles={['bottom']} message={message} />
|
|
123
|
+
</Channel>
|
|
124
|
+
</WithComponents>
|
|
122
125
|
</Chat>
|
|
123
126
|
</ChannelsStateProvider>,
|
|
124
127
|
);
|
|
@@ -138,9 +141,11 @@ describe('MessageContent', () => {
|
|
|
138
141
|
render(
|
|
139
142
|
<ChannelsStateProvider>
|
|
140
143
|
<Chat client={chatClient}>
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
+
<WithComponents overrides={{ MessageFooter: ContextMessageFooter }}>
|
|
145
|
+
<Channel channel={channel}>
|
|
146
|
+
<Message groupStyles={['bottom']} message={message} />
|
|
147
|
+
</Channel>
|
|
148
|
+
</WithComponents>
|
|
144
149
|
</Chat>
|
|
145
150
|
</ChannelsStateProvider>,
|
|
146
151
|
);
|
|
@@ -158,13 +163,16 @@ describe('MessageContent', () => {
|
|
|
158
163
|
render(
|
|
159
164
|
<ChannelsStateProvider>
|
|
160
165
|
<Chat client={chatClient}>
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
166
|
+
<WithComponents
|
|
167
|
+
overrides={{
|
|
168
|
+
MessageContentBottomView: () => <View testID='message-content-bottom-view' />,
|
|
169
|
+
MessageContentTopView: () => <View testID='message-content-top-view' />,
|
|
170
|
+
}}
|
|
165
171
|
>
|
|
166
|
-
<
|
|
167
|
-
|
|
172
|
+
<Channel channel={channel}>
|
|
173
|
+
<Message groupStyles={['bottom']} message={message} />
|
|
174
|
+
</Channel>
|
|
175
|
+
</WithComponents>
|
|
168
176
|
</Chat>
|
|
169
177
|
</ChannelsStateProvider>,
|
|
170
178
|
);
|
|
@@ -183,13 +191,16 @@ describe('MessageContent', () => {
|
|
|
183
191
|
render(
|
|
184
192
|
<ChannelsStateProvider>
|
|
185
193
|
<Chat client={chatClient}>
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
194
|
+
<WithComponents
|
|
195
|
+
overrides={{
|
|
196
|
+
MessageContentLeadingView: () => <View testID='message-content-leading-view' />,
|
|
197
|
+
MessageContentTrailingView: () => <View testID='message-content-trailing-view' />,
|
|
198
|
+
}}
|
|
190
199
|
>
|
|
191
|
-
<
|
|
192
|
-
|
|
200
|
+
<Channel channel={channel}>
|
|
201
|
+
<Message groupStyles={['bottom']} message={message} />
|
|
202
|
+
</Channel>
|
|
203
|
+
</WithComponents>
|
|
193
204
|
</Chat>
|
|
194
205
|
</ChannelsStateProvider>,
|
|
195
206
|
);
|
|
@@ -209,13 +220,16 @@ describe('MessageContent', () => {
|
|
|
209
220
|
const { rerender } = render(
|
|
210
221
|
<ChannelsStateProvider>
|
|
211
222
|
<Chat client={chatClient}>
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
223
|
+
<WithComponents
|
|
224
|
+
overrides={{
|
|
225
|
+
MessageContentLeadingView: () => <View testID='message-content-leading-view' />,
|
|
226
|
+
MessageContentTrailingView: () => <View testID='message-content-trailing-view' />,
|
|
227
|
+
}}
|
|
216
228
|
>
|
|
217
|
-
<
|
|
218
|
-
|
|
229
|
+
<Channel channel={channel}>
|
|
230
|
+
<Message groupStyles={['bottom']} message={leftAlignedMessage} />
|
|
231
|
+
</Channel>
|
|
232
|
+
</WithComponents>
|
|
219
233
|
</Chat>
|
|
220
234
|
</ChannelsStateProvider>,
|
|
221
235
|
);
|
|
@@ -231,13 +245,16 @@ describe('MessageContent', () => {
|
|
|
231
245
|
rerender(
|
|
232
246
|
<ChannelsStateProvider>
|
|
233
247
|
<Chat client={chatClient}>
|
|
234
|
-
<
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
248
|
+
<WithComponents
|
|
249
|
+
overrides={{
|
|
250
|
+
MessageContentLeadingView: () => <View testID='message-content-leading-view' />,
|
|
251
|
+
MessageContentTrailingView: () => <View testID='message-content-trailing-view' />,
|
|
252
|
+
}}
|
|
238
253
|
>
|
|
239
|
-
<
|
|
240
|
-
|
|
254
|
+
<Channel channel={channel}>
|
|
255
|
+
<Message groupStyles={['bottom']} message={rightAlignedMessage} />
|
|
256
|
+
</Channel>
|
|
257
|
+
</WithComponents>
|
|
241
258
|
</Chat>
|
|
242
259
|
</ChannelsStateProvider>,
|
|
243
260
|
);
|