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
|
@@ -6,6 +6,7 @@ import { GestureDetector } from 'react-native-gesture-handler';
|
|
|
6
6
|
import { cleanup, render, screen, waitFor } from '@testing-library/react-native';
|
|
7
7
|
|
|
8
8
|
import { ChannelsStateProvider } from '../../../../contexts/channelsStateContext/ChannelsStateContext';
|
|
9
|
+
import { WithComponents } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
9
10
|
import { useMessageContext } from '../../../../contexts/messageContext/MessageContext';
|
|
10
11
|
|
|
11
12
|
import { getOrCreateChannelApi } from '../../../../mock-builders/api/getOrCreateChannel';
|
|
@@ -42,13 +43,21 @@ describe('MessageItemView', () => {
|
|
|
42
43
|
useMockedApis(chatClient, [getOrCreateChannelApi(mockedChannel)]);
|
|
43
44
|
channel = chatClient.channel('messaging', mockedChannel.id);
|
|
44
45
|
|
|
45
|
-
renderMessage = (options, channelProps) =>
|
|
46
|
+
renderMessage = (options, channelProps, componentOverrides) =>
|
|
46
47
|
render(
|
|
47
48
|
<ChannelsStateProvider>
|
|
48
49
|
<Chat client={chatClient}>
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
50
|
+
{componentOverrides ? (
|
|
51
|
+
<WithComponents overrides={componentOverrides}>
|
|
52
|
+
<Channel channel={channel} {...channelProps}>
|
|
53
|
+
<Message groupStyles={['bottom']} {...options} />
|
|
54
|
+
</Channel>
|
|
55
|
+
</WithComponents>
|
|
56
|
+
) : (
|
|
57
|
+
<Channel channel={channel} {...channelProps}>
|
|
58
|
+
<Message groupStyles={['bottom']} {...options} />
|
|
59
|
+
</Channel>
|
|
60
|
+
)}
|
|
52
61
|
</Chat>
|
|
53
62
|
</ChannelsStateProvider>,
|
|
54
63
|
);
|
|
@@ -136,7 +145,7 @@ describe('MessageItemView', () => {
|
|
|
136
145
|
return <Text ref={contextMenuAnchorRef}>Custom Message Item</Text>;
|
|
137
146
|
};
|
|
138
147
|
|
|
139
|
-
renderMessage({ message }, { MessageItemView: CustomMessageItemView });
|
|
148
|
+
renderMessage({ message }, {}, { MessageItemView: CustomMessageItemView });
|
|
140
149
|
|
|
141
150
|
await waitFor(() => {
|
|
142
151
|
expect(screen.queryByText('Custom Message Item')).not.toBeNull();
|
|
@@ -147,7 +156,7 @@ describe('MessageItemView', () => {
|
|
|
147
156
|
const user = generateUser();
|
|
148
157
|
const message = generateMessage({ user });
|
|
149
158
|
|
|
150
|
-
renderMessage({ message }, { MessageSpacer: () => <Text>Message Spacer</Text> });
|
|
159
|
+
renderMessage({ message }, {}, { MessageSpacer: () => <Text>Message Spacer</Text> });
|
|
151
160
|
|
|
152
161
|
await waitFor(() => {
|
|
153
162
|
expect(screen.queryByText('Message Spacer')).not.toBeNull();
|
|
@@ -193,7 +202,7 @@ describe('MessageItemView', () => {
|
|
|
193
202
|
const user = generateUser();
|
|
194
203
|
const message = generateMessage({ user });
|
|
195
204
|
|
|
196
|
-
renderMessage({ message }, { MessageHeader: () => <Text>Message Header</Text> });
|
|
205
|
+
renderMessage({ message }, {}, { MessageHeader: () => <Text>Message Header</Text> });
|
|
197
206
|
|
|
198
207
|
await waitFor(() => {
|
|
199
208
|
expect(screen.queryByText('Message Header')).not.toBeNull();
|
|
@@ -5,6 +5,7 @@ import { cleanup, render, waitFor } from '@testing-library/react-native';
|
|
|
5
5
|
|
|
6
6
|
import { LocalMessage } from 'stream-chat';
|
|
7
7
|
|
|
8
|
+
import { WithComponents } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
8
9
|
import { OverlayProvider } from '../../../../contexts/overlayContext/OverlayProvider';
|
|
9
10
|
import { ThemeProvider } from '../../../../contexts/themeContext/ThemeContext';
|
|
10
11
|
import { defaultTheme } from '../../../../contexts/themeContext/utils/theme';
|
|
@@ -43,10 +44,13 @@ describe('MessageTextContainer', () => {
|
|
|
43
44
|
|
|
44
45
|
rerender(
|
|
45
46
|
<ThemeProvider theme={defaultTheme}>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
<WithComponents
|
|
48
|
+
overrides={{
|
|
49
|
+
MessageText: ({ message }) => <Text testID='message-text'>{message?.text}</Text>,
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
<MessageTextContainer message={message as unknown as LocalMessage} />
|
|
53
|
+
</WithComponents>
|
|
50
54
|
</ThemeProvider>,
|
|
51
55
|
);
|
|
52
56
|
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
ChannelContextValue,
|
|
28
28
|
useChannelContext,
|
|
29
29
|
} from '../../contexts/channelContext/ChannelContext';
|
|
30
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
30
31
|
import {
|
|
31
32
|
MessageComposerAPIContextValue,
|
|
32
33
|
useMessageComposerAPIContext,
|
|
@@ -36,10 +37,6 @@ import {
|
|
|
36
37
|
MessageInputContextValue,
|
|
37
38
|
useMessageInputContext,
|
|
38
39
|
} from '../../contexts/messageInputContext/MessageInputContext';
|
|
39
|
-
import {
|
|
40
|
-
MessagesContextValue,
|
|
41
|
-
useMessagesContext,
|
|
42
|
-
} from '../../contexts/messagesContext/MessagesContext';
|
|
43
40
|
|
|
44
41
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
45
42
|
import {
|
|
@@ -160,36 +157,18 @@ type MessageComposerPropsWithContext = Pick<ChatContextValue, 'isOnline'> &
|
|
|
160
157
|
| 'asyncMessagesLockDistance'
|
|
161
158
|
| 'asyncMessagesMinimumPressDuration'
|
|
162
159
|
| 'asyncMessagesSlideToCancelDistance'
|
|
163
|
-
| 'AttachmentUploadPreviewList'
|
|
164
|
-
| 'AudioRecorder'
|
|
165
|
-
| 'AudioRecordingInProgress'
|
|
166
|
-
| 'AudioRecordingLockIndicator'
|
|
167
|
-
| 'AudioRecordingPreview'
|
|
168
|
-
| 'AutoCompleteSuggestionList'
|
|
169
160
|
| 'closeAttachmentPicker'
|
|
170
161
|
| 'compressImageQuality'
|
|
171
|
-
| 'Input'
|
|
172
|
-
| 'InputView'
|
|
173
162
|
| 'inputBoxRef'
|
|
174
|
-
| 'InputButtons'
|
|
175
|
-
| 'MessageComposerLeadingView'
|
|
176
|
-
| 'MessageComposerTrailingView'
|
|
177
163
|
| 'messageInputFloating'
|
|
178
164
|
| 'messageInputHeightStore'
|
|
179
|
-
| 'MessageInputHeaderView'
|
|
180
|
-
| 'MessageInputTrailingView'
|
|
181
|
-
| 'SendButton'
|
|
182
|
-
| 'StartAudioRecordingButton'
|
|
183
165
|
| 'uploadNewFile'
|
|
184
166
|
| 'openPollCreationDialog'
|
|
185
167
|
| 'closePollCreationDialog'
|
|
186
168
|
| 'showPollCreationDialog'
|
|
187
169
|
| 'sendMessage'
|
|
188
|
-
| 'CreatePollContent'
|
|
189
170
|
| 'createPollOptionGap'
|
|
190
|
-
| 'StopMessageStreamingButton'
|
|
191
171
|
> &
|
|
192
|
-
Pick<MessagesContextValue, 'Reply'> &
|
|
193
172
|
Pick<TranslationContextValue, 't'> &
|
|
194
173
|
Pick<MessageComposerAPIContextValue, 'clearEditingState'> &
|
|
195
174
|
Pick<AudioRecorderManagerState, 'micLocked'> & {
|
|
@@ -210,23 +189,11 @@ const MessageComposerWithContext = (props: MessageComposerPropsWithContext) => {
|
|
|
210
189
|
additionalTextInputProps,
|
|
211
190
|
asyncMessagesLockDistance,
|
|
212
191
|
asyncMessagesSlideToCancelDistance,
|
|
213
|
-
AudioRecorder,
|
|
214
|
-
AudioRecordingInProgress,
|
|
215
|
-
AudioRecordingLockIndicator,
|
|
216
|
-
AudioRecordingPreview,
|
|
217
|
-
AutoCompleteSuggestionList,
|
|
218
192
|
closeAttachmentPicker,
|
|
219
193
|
closePollCreationDialog,
|
|
220
|
-
CreatePollContent,
|
|
221
194
|
createPollOptionGap,
|
|
222
|
-
InputView,
|
|
223
|
-
MessageComposerLeadingView,
|
|
224
|
-
MessageComposerTrailingView,
|
|
225
195
|
messageInputFloating,
|
|
226
196
|
messageInputHeightStore,
|
|
227
|
-
MessageInputHeaderView,
|
|
228
|
-
MessageInputTrailingView,
|
|
229
|
-
Input,
|
|
230
197
|
inputBoxRef,
|
|
231
198
|
isKeyboardVisible,
|
|
232
199
|
members,
|
|
@@ -239,6 +206,20 @@ const MessageComposerWithContext = (props: MessageComposerPropsWithContext) => {
|
|
|
239
206
|
recordingStatus,
|
|
240
207
|
} = props;
|
|
241
208
|
|
|
209
|
+
const {
|
|
210
|
+
AudioRecorder,
|
|
211
|
+
AudioRecordingInProgress,
|
|
212
|
+
AudioRecordingLockIndicator,
|
|
213
|
+
AudioRecordingPreview,
|
|
214
|
+
AutoCompleteSuggestionList,
|
|
215
|
+
Input,
|
|
216
|
+
InputView,
|
|
217
|
+
MessageComposerLeadingView,
|
|
218
|
+
MessageComposerTrailingView,
|
|
219
|
+
MessageInputHeaderView,
|
|
220
|
+
MessageInputTrailingView,
|
|
221
|
+
} = useComponentsContext();
|
|
222
|
+
|
|
242
223
|
const styles = useStyles();
|
|
243
224
|
const { selectedPicker } = useAttachmentPickerState();
|
|
244
225
|
const { attachmentPickerBottomSheetHeight, bottomInset } = useAttachmentPickerContext();
|
|
@@ -486,7 +467,6 @@ const MessageComposerWithContext = (props: MessageComposerPropsWithContext) => {
|
|
|
486
467
|
<SafeAreaViewWrapper style={styles.pollSafeArea}>
|
|
487
468
|
<CreatePoll
|
|
488
469
|
closePollCreationDialog={closePollCreationDialog}
|
|
489
|
-
CreatePollContent={CreatePollContent}
|
|
490
470
|
createPollOptionGap={createPollOptionGap}
|
|
491
471
|
sendMessage={sendMessage}
|
|
492
472
|
/>
|
|
@@ -660,42 +640,22 @@ export const MessageComposer = (props: MessageComposerProps) => {
|
|
|
660
640
|
asyncMessagesLockDistance,
|
|
661
641
|
asyncMessagesMinimumPressDuration,
|
|
662
642
|
asyncMessagesSlideToCancelDistance,
|
|
663
|
-
AttachmentUploadPreviewList,
|
|
664
|
-
AudioRecorder,
|
|
665
643
|
audioRecordingEnabled,
|
|
666
|
-
AudioRecordingInProgress,
|
|
667
|
-
AudioRecordingLockIndicator,
|
|
668
|
-
AudioRecordingPreview,
|
|
669
|
-
AudioRecordingWaveform,
|
|
670
|
-
AutoCompleteSuggestionList,
|
|
671
644
|
closeAttachmentPicker,
|
|
672
645
|
closePollCreationDialog,
|
|
673
646
|
compressImageQuality,
|
|
674
|
-
CreatePollContent,
|
|
675
|
-
Input,
|
|
676
|
-
InputView,
|
|
677
647
|
inputBoxRef,
|
|
678
|
-
InputButtons,
|
|
679
|
-
MessageComposerLeadingView,
|
|
680
|
-
MessageComposerTrailingView,
|
|
681
648
|
messageInputFloating,
|
|
682
649
|
messageInputHeightStore,
|
|
683
|
-
MessageInputHeaderView,
|
|
684
|
-
MessageInputTrailingView,
|
|
685
650
|
openPollCreationDialog,
|
|
686
|
-
SendButton,
|
|
687
651
|
sendMessage,
|
|
688
|
-
SendMessageDisallowedIndicator,
|
|
689
652
|
showPollCreationDialog,
|
|
690
|
-
StartAudioRecordingButton,
|
|
691
|
-
StopMessageStreamingButton,
|
|
692
653
|
uploadNewFile,
|
|
693
654
|
} = useMessageInputContext();
|
|
655
|
+
const { SendMessageDisallowedIndicator } = useComponentsContext();
|
|
694
656
|
const messageComposer = useMessageComposer();
|
|
695
657
|
const editing = !!messageComposer.editedMessage;
|
|
696
658
|
const { clearEditingState } = useMessageComposerAPIContext();
|
|
697
|
-
|
|
698
|
-
const { Reply } = useMessagesContext();
|
|
699
659
|
const isKeyboardVisible = useKeyboardVisibility();
|
|
700
660
|
|
|
701
661
|
const { micLocked, isRecordingStateIdle, recordingStatus } = useStateStore(
|
|
@@ -725,43 +685,23 @@ export const MessageComposer = (props: MessageComposerProps) => {
|
|
|
725
685
|
asyncMessagesLockDistance,
|
|
726
686
|
asyncMessagesMinimumPressDuration,
|
|
727
687
|
asyncMessagesSlideToCancelDistance,
|
|
728
|
-
AttachmentUploadPreviewList,
|
|
729
|
-
AudioRecorder,
|
|
730
688
|
audioRecordingEnabled,
|
|
731
|
-
AudioRecordingInProgress,
|
|
732
|
-
AudioRecordingLockIndicator,
|
|
733
|
-
AudioRecordingPreview,
|
|
734
|
-
AudioRecordingWaveform,
|
|
735
|
-
AutoCompleteSuggestionList,
|
|
736
689
|
channel,
|
|
737
690
|
clearEditingState,
|
|
738
691
|
closeAttachmentPicker,
|
|
739
692
|
closePollCreationDialog,
|
|
740
693
|
compressImageQuality,
|
|
741
|
-
CreatePollContent,
|
|
742
694
|
// TODO: probably not needed anymore, please check
|
|
743
695
|
editing,
|
|
744
|
-
Input,
|
|
745
|
-
InputView,
|
|
746
696
|
inputBoxRef,
|
|
747
|
-
InputButtons,
|
|
748
|
-
MessageComposerLeadingView,
|
|
749
|
-
MessageComposerTrailingView,
|
|
750
697
|
isKeyboardVisible,
|
|
751
698
|
isOnline,
|
|
752
699
|
members,
|
|
753
700
|
messageInputFloating,
|
|
754
701
|
messageInputHeightStore,
|
|
755
|
-
MessageInputHeaderView,
|
|
756
|
-
MessageInputTrailingView,
|
|
757
702
|
openPollCreationDialog,
|
|
758
|
-
Reply,
|
|
759
|
-
SendButton,
|
|
760
703
|
sendMessage,
|
|
761
|
-
SendMessageDisallowedIndicator,
|
|
762
704
|
showPollCreationDialog,
|
|
763
|
-
StartAudioRecordingButton,
|
|
764
|
-
StopMessageStreamingButton,
|
|
765
705
|
t,
|
|
766
706
|
uploadNewFile,
|
|
767
707
|
watchers,
|
|
@@ -9,11 +9,11 @@ import { useHasLinkPreviews } from './hooks/useLinkPreviews';
|
|
|
9
9
|
import { idleRecordingStateSelector } from './utils/audioRecorderSelectors';
|
|
10
10
|
import { messageComposerStateStoreSelector } from './utils/messageComposerSelectors';
|
|
11
11
|
|
|
12
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
12
13
|
import { useMessageComposerAPIContext } from '../../contexts/messageComposerContext/MessageComposerAPIContext';
|
|
13
14
|
import { useHasAttachments } from '../../contexts/messageInputContext/hooks/useHasAttachments';
|
|
14
15
|
import { useMessageComposer } from '../../contexts/messageInputContext/hooks/useMessageComposer';
|
|
15
16
|
import { useMessageInputContext } from '../../contexts/messageInputContext/MessageInputContext';
|
|
16
|
-
import { useMessagesContext } from '../../contexts/messagesContext/MessagesContext';
|
|
17
17
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
18
18
|
import { useStateStore } from '../../hooks/useStateStore';
|
|
19
19
|
import { primitives } from '../../theme';
|
|
@@ -30,8 +30,8 @@ export const MessageInputHeaderView = () => {
|
|
|
30
30
|
const { clearEditingState } = useMessageComposerAPIContext();
|
|
31
31
|
const { quotedMessage } = useStateStore(messageComposer.state, messageComposerStateStoreSelector);
|
|
32
32
|
const hasLinkPreviews = useHasLinkPreviews();
|
|
33
|
-
const { audioRecorderManager
|
|
34
|
-
const { Reply } =
|
|
33
|
+
const { audioRecorderManager } = useMessageInputContext();
|
|
34
|
+
const { AttachmentUploadPreviewList, Reply } = useComponentsContext();
|
|
35
35
|
const { isRecordingStateIdle } = useStateStore(
|
|
36
36
|
audioRecorderManager.state,
|
|
37
37
|
idleRecordingStateSelector,
|
package/src/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.tsx
CHANGED
|
@@ -31,11 +31,9 @@ import {
|
|
|
31
31
|
} from 'stream-chat';
|
|
32
32
|
|
|
33
33
|
import { useMessageComposer } from '../../../../contexts';
|
|
34
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
34
35
|
import { useAttachmentManagerState } from '../../../../contexts/messageInputContext/hooks/useAttachmentManagerState';
|
|
35
|
-
import {
|
|
36
|
-
MessageInputContextValue,
|
|
37
|
-
useMessageInputContext,
|
|
38
|
-
} from '../../../../contexts/messageInputContext/MessageInputContext';
|
|
36
|
+
import { useMessageInputContext } from '../../../../contexts/messageInputContext/MessageInputContext';
|
|
39
37
|
import { useTheme } from '../../../../contexts/themeContext/ThemeContext';
|
|
40
38
|
import { isSoundPackageAvailable } from '../../../../native';
|
|
41
39
|
import { primitives } from '../../../../theme';
|
|
@@ -44,13 +42,7 @@ const END_ANCHOR_THRESHOLD = 16;
|
|
|
44
42
|
const END_SHRINK_COMPENSATION_DURATION = 200;
|
|
45
43
|
const MAX_AUDIO_ATTACHMENTS_CONTAINER_WIDTH = 560;
|
|
46
44
|
|
|
47
|
-
export type AttachmentUploadListPreviewPropsWithContext =
|
|
48
|
-
MessageInputContextValue,
|
|
49
|
-
| 'AudioAttachmentUploadPreview'
|
|
50
|
-
| 'FileAttachmentUploadPreview'
|
|
51
|
-
| 'ImageAttachmentUploadPreview'
|
|
52
|
-
| 'VideoAttachmentUploadPreview'
|
|
53
|
-
>;
|
|
45
|
+
export type AttachmentUploadListPreviewPropsWithContext = Record<string, never>;
|
|
54
46
|
|
|
55
47
|
const AttachmentPreviewCell = ({ children }: { children: React.ReactNode }) => (
|
|
56
48
|
<Animated.View
|
|
@@ -85,15 +77,13 @@ const getIsAudioAttachmentPreview =
|
|
|
85
77
|
* AttachmentUploadPreviewList
|
|
86
78
|
* UI Component to preview the files set for upload
|
|
87
79
|
*/
|
|
88
|
-
const UnMemoizedAttachmentUploadPreviewList = (
|
|
89
|
-
props: AttachmentUploadListPreviewPropsWithContext,
|
|
90
|
-
) => {
|
|
80
|
+
const UnMemoizedAttachmentUploadPreviewList = () => {
|
|
91
81
|
const {
|
|
92
82
|
AudioAttachmentUploadPreview,
|
|
93
83
|
FileAttachmentUploadPreview,
|
|
94
84
|
ImageAttachmentUploadPreview,
|
|
95
85
|
VideoAttachmentUploadPreview,
|
|
96
|
-
} =
|
|
86
|
+
} = useComponentsContext();
|
|
97
87
|
const { audioRecordingSendOnComplete } = useMessageInputContext();
|
|
98
88
|
const { attachmentManager } = useMessageComposer();
|
|
99
89
|
const { attachments } = useAttachmentManagerState();
|
|
@@ -370,7 +360,7 @@ const UnMemoizedAttachmentUploadPreviewList = (
|
|
|
370
360
|
);
|
|
371
361
|
};
|
|
372
362
|
|
|
373
|
-
export type AttachmentUploadPreviewListProps =
|
|
363
|
+
export type AttachmentUploadPreviewListProps = Record<string, never>;
|
|
374
364
|
|
|
375
365
|
const MemoizedAttachmentUploadPreviewListWithContext = React.memo(
|
|
376
366
|
UnMemoizedAttachmentUploadPreviewList,
|
|
@@ -380,25 +370,7 @@ const MemoizedAttachmentUploadPreviewListWithContext = React.memo(
|
|
|
380
370
|
* AttachmentUploadPreviewList
|
|
381
371
|
* UI Component to preview the files set for upload
|
|
382
372
|
*/
|
|
383
|
-
export const AttachmentUploadPreviewList = (
|
|
384
|
-
const {
|
|
385
|
-
AudioAttachmentUploadPreview,
|
|
386
|
-
FileAttachmentUploadPreview,
|
|
387
|
-
ImageAttachmentUploadPreview,
|
|
388
|
-
VideoAttachmentUploadPreview,
|
|
389
|
-
} = useMessageInputContext();
|
|
390
|
-
return (
|
|
391
|
-
<MemoizedAttachmentUploadPreviewListWithContext
|
|
392
|
-
{...{
|
|
393
|
-
AudioAttachmentUploadPreview,
|
|
394
|
-
FileAttachmentUploadPreview,
|
|
395
|
-
ImageAttachmentUploadPreview,
|
|
396
|
-
VideoAttachmentUploadPreview,
|
|
397
|
-
}}
|
|
398
|
-
{...props}
|
|
399
|
-
/>
|
|
400
|
-
);
|
|
401
|
-
};
|
|
373
|
+
export const AttachmentUploadPreviewList = () => <MemoizedAttachmentUploadPreviewListWithContext />;
|
|
402
374
|
|
|
403
375
|
const styles = StyleSheet.create({
|
|
404
376
|
audioAttachmentsContainer: {
|
package/src/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { AttachmentRemoveControl } from './AttachmentRemoveControl';
|
|
|
8
8
|
|
|
9
9
|
import { FilePreview } from '../../../../components/Attachment/FilePreview';
|
|
10
10
|
import { useChatContext } from '../../../../contexts/chatContext/ChatContext';
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
12
12
|
import { useTheme } from '../../../../contexts/themeContext/ThemeContext';
|
|
13
13
|
import { primitives } from '../../../../theme';
|
|
14
14
|
import { UploadAttachmentPreviewProps } from '../../../../types/types';
|
|
@@ -31,7 +31,7 @@ export const FileAttachmentUploadPreview = ({
|
|
|
31
31
|
FileUploadInProgressIndicator,
|
|
32
32
|
FileUploadRetryIndicator,
|
|
33
33
|
FileUploadNotSupportedIndicator,
|
|
34
|
-
} =
|
|
34
|
+
} = useComponentsContext();
|
|
35
35
|
const { enableOfflineSupport } = useChatContext();
|
|
36
36
|
const indicatorType = getIndicatorTypeForFileState(
|
|
37
37
|
attachment.localMetadata.uploadState,
|
package/src/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { LocalImageAttachment } from 'stream-chat';
|
|
|
7
7
|
import { AttachmentRemoveControl } from './AttachmentRemoveControl';
|
|
8
8
|
|
|
9
9
|
import { useChatContext } from '../../../../contexts/chatContext/ChatContext';
|
|
10
|
-
import {
|
|
10
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
11
11
|
import { useTheme } from '../../../../contexts/themeContext/ThemeContext';
|
|
12
12
|
import { primitives } from '../../../../theme';
|
|
13
13
|
import { UploadAttachmentPreviewProps } from '../../../../types/types';
|
|
@@ -29,7 +29,7 @@ export const ImageAttachmentUploadPreview = ({
|
|
|
29
29
|
ImageUploadInProgressIndicator,
|
|
30
30
|
ImageUploadRetryIndicator,
|
|
31
31
|
ImageUploadNotSupportedIndicator,
|
|
32
|
-
} =
|
|
32
|
+
} = useComponentsContext();
|
|
33
33
|
const indicatorType = loading
|
|
34
34
|
? ProgressIndicatorTypes.IN_PROGRESS
|
|
35
35
|
: getIndicatorTypeForFileState(attachment.localMetadata.uploadState, enableOfflineSupport);
|
|
@@ -3,6 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
|
|
6
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
6
7
|
import {
|
|
7
8
|
MessageInputContextValue,
|
|
8
9
|
useMessageInputContext,
|
|
@@ -15,7 +16,7 @@ import { primitives } from '../../../../theme';
|
|
|
15
16
|
|
|
16
17
|
type AudioRecordingInProgressPropsWithContext = Pick<
|
|
17
18
|
MessageInputContextValue,
|
|
18
|
-
'audioRecorderManager'
|
|
19
|
+
'audioRecorderManager'
|
|
19
20
|
> &
|
|
20
21
|
Pick<AudioRecorderManagerState, 'duration' | 'waveformData'> & {
|
|
21
22
|
/**
|
|
@@ -25,7 +26,8 @@ type AudioRecordingInProgressPropsWithContext = Pick<
|
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const AudioRecordingInProgressWithContext = (props: AudioRecordingInProgressPropsWithContext) => {
|
|
28
|
-
const {
|
|
29
|
+
const { maxDataPointsDrawn = 60, duration, waveformData } = props;
|
|
30
|
+
const { AudioRecordingWaveform } = useComponentsContext();
|
|
29
31
|
|
|
30
32
|
const styles = useStyles();
|
|
31
33
|
|
|
@@ -69,7 +71,7 @@ const audioRecorderSelector = (state: AudioRecorderManagerState) => ({
|
|
|
69
71
|
* Component displayed when the audio is in the recording state.
|
|
70
72
|
*/
|
|
71
73
|
export const AudioRecordingInProgress = (props: AudioRecordingInProgressProps) => {
|
|
72
|
-
const { audioRecorderManager
|
|
74
|
+
const { audioRecorderManager } = useMessageInputContext();
|
|
73
75
|
|
|
74
76
|
const { duration, waveformData } = useStateStore(
|
|
75
77
|
audioRecorderManager.state,
|
|
@@ -78,7 +80,7 @@ export const AudioRecordingInProgress = (props: AudioRecordingInProgressProps) =
|
|
|
78
80
|
|
|
79
81
|
return (
|
|
80
82
|
<MemoizedAudioRecordingInProgress
|
|
81
|
-
{...{ audioRecorderManager,
|
|
83
|
+
{...{ audioRecorderManager, duration, waveformData }}
|
|
82
84
|
{...props}
|
|
83
85
|
/>
|
|
84
86
|
);
|
|
@@ -10,6 +10,7 @@ import Animated, {
|
|
|
10
10
|
} from 'react-native-reanimated';
|
|
11
11
|
|
|
12
12
|
import { OwnCapabilitiesContextValue } from '../../../../contexts';
|
|
13
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
13
14
|
import { useActiveCommand } from '../../../../contexts/messageInputContext/hooks/useActiveCommand';
|
|
14
15
|
import {
|
|
15
16
|
MessageInputContextValue,
|
|
@@ -23,19 +24,19 @@ export type InputButtonsProps = Partial<InputButtonsWithContextProps>;
|
|
|
23
24
|
|
|
24
25
|
export type InputButtonsWithContextProps = Pick<
|
|
25
26
|
MessageInputContextValue,
|
|
26
|
-
'
|
|
27
|
+
'hasCameraPicker' | 'hasCommands' | 'hasFilePicker' | 'hasImagePicker'
|
|
27
28
|
> &
|
|
28
29
|
Pick<OwnCapabilitiesContextValue, 'uploadFile'>;
|
|
29
30
|
|
|
30
31
|
export const InputButtonsWithContext = (props: InputButtonsWithContextProps) => {
|
|
31
32
|
const {
|
|
32
|
-
AttachButton,
|
|
33
33
|
hasCameraPicker,
|
|
34
34
|
hasCommands,
|
|
35
35
|
hasFilePicker,
|
|
36
36
|
hasImagePicker,
|
|
37
37
|
uploadFile: ownCapabilitiesUploadFile,
|
|
38
38
|
} = props;
|
|
39
|
+
const { AttachButton } = useComponentsContext();
|
|
39
40
|
const { selectedPicker } = useAttachmentPickerState();
|
|
40
41
|
const rotation = useSharedValue(0);
|
|
41
42
|
const command = useActiveCommand();
|
|
@@ -107,14 +108,12 @@ const MemoizedInputButtonsWithContext = React.memo(
|
|
|
107
108
|
) as typeof InputButtonsWithContext;
|
|
108
109
|
|
|
109
110
|
export const InputButtons = (props: InputButtonsProps) => {
|
|
110
|
-
const {
|
|
111
|
-
useMessageInputContext();
|
|
111
|
+
const { hasCameraPicker, hasCommands, hasFilePicker, hasImagePicker } = useMessageInputContext();
|
|
112
112
|
const { uploadFile } = useOwnCapabilitiesContext();
|
|
113
113
|
|
|
114
114
|
return (
|
|
115
115
|
<MemoizedInputButtonsWithContext
|
|
116
116
|
{...{
|
|
117
|
-
AttachButton,
|
|
118
117
|
hasCameraPicker,
|
|
119
118
|
hasCommands,
|
|
120
119
|
hasFilePicker,
|
|
@@ -9,7 +9,8 @@ import { LinkPreviewsManager } from 'stream-chat';
|
|
|
9
9
|
|
|
10
10
|
import { AttachmentRemoveControl } from './AttachmentPreview/AttachmentRemoveControl';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { useMessageComposer, useTheme } from '../../../contexts';
|
|
13
|
+
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
|
|
13
14
|
import { Link } from '../../../icons/link';
|
|
14
15
|
import { components, primitives } from '../../../theme';
|
|
15
16
|
import { useLinkPreviews } from '../hooks/useLinkPreviews';
|
|
@@ -38,7 +39,7 @@ type LinkPreviewProps = {
|
|
|
38
39
|
|
|
39
40
|
export const LinkPreviewCard = ({ linkPreview }: LinkPreviewProps) => {
|
|
40
41
|
const styles = useStyles();
|
|
41
|
-
const { ImageComponent } =
|
|
42
|
+
const { ImageComponent } = useComponentsContext();
|
|
42
43
|
const { linkPreviewsManager } = useMessageComposer();
|
|
43
44
|
const { image_url, thumb_url, title, text, og_scrape_url } = linkPreview;
|
|
44
45
|
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
useMessageComposerHasSendableData,
|
|
15
15
|
useTheme,
|
|
16
16
|
} from '../../../../contexts';
|
|
17
|
+
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
17
18
|
import { useHasAttachments } from '../../../../contexts/messageInputContext/hooks/useHasAttachments';
|
|
18
19
|
import { useMessageComposer } from '../../../../contexts/messageInputContext/hooks/useMessageComposer';
|
|
19
20
|
import {
|
|
@@ -36,10 +37,6 @@ export type OutputButtonsWithContextProps = Pick<ChatContextValue, 'isOnline'> &
|
|
|
36
37
|
| 'asyncMessagesLockDistance'
|
|
37
38
|
| 'audioRecordingSendOnComplete'
|
|
38
39
|
| 'audioRecordingEnabled'
|
|
39
|
-
| 'CooldownTimer'
|
|
40
|
-
| 'SendButton'
|
|
41
|
-
| 'StopMessageStreamingButton'
|
|
42
|
-
| 'StartAudioRecordingButton'
|
|
43
40
|
> & {
|
|
44
41
|
cooldownIsActive: boolean;
|
|
45
42
|
hasAttachments: boolean;
|
|
@@ -51,17 +48,9 @@ const textComposerStateSelector = (state: TextComposerState) => ({
|
|
|
51
48
|
});
|
|
52
49
|
|
|
53
50
|
export const OutputButtonsWithContext = (props: OutputButtonsWithContextProps) => {
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
CooldownTimer,
|
|
58
|
-
cooldownIsActive,
|
|
59
|
-
isOnline,
|
|
60
|
-
SendButton,
|
|
61
|
-
StopMessageStreamingButton,
|
|
62
|
-
StartAudioRecordingButton,
|
|
63
|
-
hasAttachments,
|
|
64
|
-
} = props;
|
|
51
|
+
const { audioRecordingEnabled, channel, cooldownIsActive, isOnline, hasAttachments } = props;
|
|
52
|
+
const { CooldownTimer, SendButton, StartAudioRecordingButton, StopMessageStreamingButton } =
|
|
53
|
+
useComponentsContext();
|
|
65
54
|
const {
|
|
66
55
|
theme: {
|
|
67
56
|
messageComposer: {
|
|
@@ -180,10 +169,6 @@ export const OutputButtons = (props: OutputButtonsProps) => {
|
|
|
180
169
|
asyncMessagesSlideToCancelDistance,
|
|
181
170
|
asyncMessagesLockDistance,
|
|
182
171
|
audioRecordingSendOnComplete,
|
|
183
|
-
CooldownTimer,
|
|
184
|
-
SendButton,
|
|
185
|
-
StopMessageStreamingButton,
|
|
186
|
-
StartAudioRecordingButton,
|
|
187
172
|
} = useMessageInputContext();
|
|
188
173
|
const cooldownIsActive = useIsCooldownActive();
|
|
189
174
|
const hasAttachments = useHasAttachments();
|
|
@@ -198,11 +183,7 @@ export const OutputButtons = (props: OutputButtonsProps) => {
|
|
|
198
183
|
audioRecordingEnabled,
|
|
199
184
|
channel,
|
|
200
185
|
cooldownIsActive,
|
|
201
|
-
CooldownTimer,
|
|
202
186
|
isOnline,
|
|
203
|
-
SendButton,
|
|
204
|
-
StartAudioRecordingButton,
|
|
205
|
-
StopMessageStreamingButton,
|
|
206
187
|
hasAttachments,
|
|
207
188
|
}}
|
|
208
189
|
{...props}
|