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
|
@@ -5,14 +5,8 @@ exports.Attachment = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactNative = require("react-native");
|
|
7
7
|
var _streamChat = require("stream-chat");
|
|
8
|
-
var _Audio = require("./Audio");
|
|
9
|
-
var _UnsupportedAttachment = require("./UnsupportedAttachment");
|
|
10
|
-
var _UrlPreview = require("./UrlPreview");
|
|
11
|
-
var _URLPreviewCompact = require("./UrlPreview/URLPreviewCompact");
|
|
12
|
-
var _FileAttachment = require("../../components/Attachment/FileAttachment");
|
|
13
|
-
var _Gallery = require("../../components/Attachment/Gallery");
|
|
14
|
-
var _Giphy = require("../../components/Attachment/Giphy");
|
|
15
8
|
var _contexts = require("../../contexts");
|
|
9
|
+
var _ComponentsContext = require("../../contexts/componentsContext/ComponentsContext");
|
|
16
10
|
var _MessageContext = require("../../contexts/messageContext/MessageContext");
|
|
17
11
|
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
18
12
|
var _native = require("../../native");
|
|
@@ -25,16 +19,17 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
25
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
20
|
var AttachmentWithContext = function AttachmentWithContext(props) {
|
|
27
21
|
var attachment = props.attachment,
|
|
28
|
-
AudioAttachment = props.AudioAttachment,
|
|
29
|
-
FileAttachment = props.FileAttachment,
|
|
30
|
-
Gallery = props.Gallery,
|
|
31
|
-
Giphy = props.Giphy,
|
|
32
|
-
UrlPreview = props.UrlPreview,
|
|
33
|
-
URLPreviewCompact = props.URLPreviewCompact,
|
|
34
22
|
index = props.index,
|
|
35
23
|
message = props.message,
|
|
36
|
-
urlPreviewType = props.urlPreviewType
|
|
37
|
-
|
|
24
|
+
urlPreviewType = props.urlPreviewType;
|
|
25
|
+
var _useComponentsContext = (0, _ComponentsContext.useComponentsContext)(),
|
|
26
|
+
AudioAttachment = _useComponentsContext.AudioAttachment,
|
|
27
|
+
FileAttachment = _useComponentsContext.FileAttachment,
|
|
28
|
+
Gallery = _useComponentsContext.Gallery,
|
|
29
|
+
Giphy = _useComponentsContext.Giphy,
|
|
30
|
+
UrlPreview = _useComponentsContext.UrlPreview,
|
|
31
|
+
URLPreviewCompact = _useComponentsContext.URLPreviewCompact,
|
|
32
|
+
UnsupportedAttachment = _useComponentsContext.UnsupportedAttachment;
|
|
38
33
|
var audioAttachmentStyles = useAudioAttachmentStyles();
|
|
39
34
|
if (attachment.type === _types.FileTypes.Giphy || attachment.type === _types.FileTypes.Imgur) {
|
|
40
35
|
return (0, _jsxRuntime.jsx)(Giphy, {
|
|
@@ -112,54 +107,22 @@ var areEqual = function areEqual(prevProps, nextProps) {
|
|
|
112
107
|
};
|
|
113
108
|
var MemoizedAttachment = _react.default.memo(AttachmentWithContext, areEqual);
|
|
114
109
|
var Attachment = exports.Attachment = function Attachment(props) {
|
|
115
|
-
var attachment = props.attachment
|
|
116
|
-
PropAudioAttachment = props.AudioAttachment,
|
|
117
|
-
PropFileAttachment = props.FileAttachment,
|
|
118
|
-
PropGallery = props.Gallery,
|
|
119
|
-
PropGiphy = props.Giphy,
|
|
120
|
-
PropMyMessageTheme = props.myMessageTheme,
|
|
121
|
-
PropUrlPreview = props.UrlPreview,
|
|
122
|
-
PropURLPreviewCompact = props.URLPreviewCompact,
|
|
123
|
-
PropUrlPreviewType = props.urlPreviewType,
|
|
124
|
-
PropUnsupportedAttachment = props.UnsupportedAttachment;
|
|
110
|
+
var attachment = props.attachment;
|
|
125
111
|
var _useMessagesContext = (0, _MessagesContext.useMessagesContext)(),
|
|
126
|
-
ContextAudioAttachment = _useMessagesContext.AudioAttachment,
|
|
127
|
-
ContextFileAttachment = _useMessagesContext.FileAttachment,
|
|
128
|
-
ContextGallery = _useMessagesContext.Gallery,
|
|
129
|
-
ContextGiphy = _useMessagesContext.Giphy,
|
|
130
112
|
isAttachmentEqual = _useMessagesContext.isAttachmentEqual,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
ContextURLPreviewCompact = _useMessagesContext.URLPreviewCompact,
|
|
134
|
-
ContextUrlPreviewType = _useMessagesContext.urlPreviewType,
|
|
135
|
-
ContextUnsupportedAttachment = _useMessagesContext.UnsupportedAttachment;
|
|
113
|
+
myMessageTheme = _useMessagesContext.myMessageTheme,
|
|
114
|
+
urlPreviewType = _useMessagesContext.urlPreviewType;
|
|
136
115
|
var _useMessageContext = (0, _MessageContext.useMessageContext)(),
|
|
137
116
|
message = _useMessageContext.message;
|
|
138
117
|
if (!attachment) {
|
|
139
118
|
return null;
|
|
140
119
|
}
|
|
141
|
-
var AudioAttachment = PropAudioAttachment || ContextAudioAttachment || _Audio.AudioAttachment;
|
|
142
|
-
var FileAttachment = PropFileAttachment || ContextFileAttachment || _FileAttachment.FileAttachment;
|
|
143
|
-
var Gallery = PropGallery || ContextGallery || _Gallery.Gallery;
|
|
144
|
-
var Giphy = PropGiphy || ContextGiphy || _Giphy.Giphy;
|
|
145
|
-
var UrlPreview = PropUrlPreview || ContextUrlPreview || _UrlPreview.URLPreview;
|
|
146
|
-
var myMessageTheme = PropMyMessageTheme || ContextMyMessageTheme;
|
|
147
|
-
var URLPreviewCompact = PropURLPreviewCompact || ContextURLPreviewCompact || _URLPreviewCompact.URLPreviewCompact;
|
|
148
|
-
var urlPreviewType = PropUrlPreviewType || ContextUrlPreviewType;
|
|
149
|
-
var UnsupportedAttachment = PropUnsupportedAttachment || ContextUnsupportedAttachment || _UnsupportedAttachment.UnsupportedAttachment;
|
|
150
120
|
return (0, _jsxRuntime.jsx)(MemoizedAttachment, {
|
|
151
121
|
attachment: attachment,
|
|
152
|
-
message: message,
|
|
153
|
-
AudioAttachment: AudioAttachment,
|
|
154
|
-
FileAttachment: FileAttachment,
|
|
155
|
-
Gallery: Gallery,
|
|
156
|
-
Giphy: Giphy,
|
|
157
122
|
isAttachmentEqual: isAttachmentEqual,
|
|
123
|
+
message: message,
|
|
158
124
|
myMessageTheme: myMessageTheme,
|
|
159
|
-
|
|
160
|
-
URLPreviewCompact: URLPreviewCompact,
|
|
161
|
-
urlPreviewType: urlPreviewType,
|
|
162
|
-
UnsupportedAttachment: UnsupportedAttachment
|
|
125
|
+
urlPreviewType: urlPreviewType
|
|
163
126
|
});
|
|
164
127
|
};
|
|
165
128
|
var useAudioAttachmentStyles = function useAudioAttachmentStyles() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_streamChat","_Audio","_UnsupportedAttachment","_UrlPreview","_URLPreviewCompact","_FileAttachment","_Gallery","_Giphy","_contexts","_MessageContext","_MessagesContext","_native","_theme","_types","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AttachmentWithContext","props","attachment","AudioAttachment","FileAttachment","Gallery","Giphy","UrlPreview","URLPreviewCompact","index","message","urlPreviewType","UnsupportedAttachment","audioAttachmentStyles","useAudioAttachmentStyles","type","FileTypes","Imgur","jsx","og_scrape_url","title_link","isImageAttachment","images","isVideoAttachment","isVideoPlayerAvailable","videos","isAudioAttachment","isVoiceRecordingAttachment","isSoundPackageAvailable","_index$toString","item","assign","id","toString","showSpeedSettings","showTitle","styles","isFileAttachment","areEqual","prevProps","nextProps","_prevAttachment$actio","_nextAttachment$actio","prevAttachment","isAttachmentEqual","prevMyMessageTheme","myMessageTheme","nextAttachment","nextMyMessageTheme","attachmentEqual","actions","length","image_url","thumb_url","messageThemeEqual","JSON","stringify","MemoizedAttachment","React","memo","Attachment","exports","PropAudioAttachment","PropFileAttachment","PropGallery","PropGiphy","PropMyMessageTheme","PropUrlPreview","PropURLPreviewCompact","PropUrlPreviewType","PropUnsupportedAttachment","_useMessagesContext","useMessagesContext","ContextAudioAttachment","ContextFileAttachment","ContextGallery","ContextGiphy","ContextMyMessageTheme","ContextUrlPreview","ContextURLPreviewCompact","ContextUrlPreviewType","ContextUnsupportedAttachment","_useMessageContext","useMessageContext","AudioAttachmentDefault","FileAttachmentDefault","GalleryDefault","GiphyDefault","URLPreviewDefault","URLPreviewCompactDefault","UnsupportedAttachmentDefault","_useTheme","useTheme","semantics","theme","_useMessageContext2","isMyMessage","messageHasOnlySingleAttachment","showBackgroundTransparent","useMemo","StyleSheet","create","container","paddingVertical","primitives","spacingXs","paddingLeft","paddingRight","spacingSm","borderWidth","backgroundColor","chatBgAttachmentOutgoing","chatBgAttachmentIncoming","playPauseButton","borderColor","chatBorderOnChatOutgoing","chatBorderOnChatIncoming","speedSettingsButton","durationText","color","chatTextIncoming","fontWeight","typographyFontWeightSemiBold"],"sourceRoot":"../../../../src","sources":["components/Attachment/Attachment.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AASA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAEA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,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AA8B;EAEnD,IAAMC,yBAAyB,GAAGD,8BAA8B;EAEhE,OAAO,IAAAE,cAAO,EAAC,YAAM;IACnB,OAAOC,uBAAU,CAACC,MAAM,CAAC;MACvBC,SAAS,EAAE;QACTC,eAAe,EAAEC,iBAAU,CAACC,SAAS;QACrCC,WAAW,EAAEF,iBAAU,CAACC,SAAS;QACjCE,YAAY,EAAEH,iBAAU,CAACI,SAAS;QAClCC,WAAW,EAAE,CAAC;QACdC,eAAe,EAAEZ,yBAAyB,GACtC,aAAa,GACbF,WAAW,GACTH,SAAS,CAACkB,wBAAwB,GAClClB,SAAS,CAACmB;MAClB,CAAC;MACDC,eAAe,EAAE;QACfC,WAAW,EAAElB,WAAW,GACpBH,SAAS,CAACsB,wBAAwB,GAClCtB,SAAS,CAACuB;MAChB,CAAC;MACDC,mBAAmB,EAAE;QACnBH,WAAW,EAAElB,WAAW,GACpBH,SAAS,CAACsB,wBAAwB,GAClCtB,SAAS,CAACuB;MAChB,CAAC;MACDE,YAAY,EAAE;QACZC,KAAK,EAAE1B,SAAS,CAAC2B,gBAAgB;QACjCC,UAAU,EAAEjB,iBAAU,CAACkB;MACzB;IACF,CAAC,CAAC;EACJ,CAAC,EAAE,CAAC7B,SAAS,EAAEG,WAAW,EAAEE,yBAAyB,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_streamChat","_contexts","_ComponentsContext","_MessageContext","_MessagesContext","_native","_theme","_types","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AttachmentWithContext","props","attachment","index","message","urlPreviewType","_useComponentsContext","useComponentsContext","AudioAttachment","FileAttachment","Gallery","Giphy","UrlPreview","URLPreviewCompact","UnsupportedAttachment","audioAttachmentStyles","useAudioAttachmentStyles","type","FileTypes","Imgur","jsx","og_scrape_url","title_link","isImageAttachment","images","isVideoAttachment","isVideoPlayerAvailable","videos","isAudioAttachment","isVoiceRecordingAttachment","isSoundPackageAvailable","_index$toString","item","assign","id","toString","showSpeedSettings","showTitle","styles","isFileAttachment","areEqual","prevProps","nextProps","_prevAttachment$actio","_nextAttachment$actio","prevAttachment","isAttachmentEqual","prevMyMessageTheme","myMessageTheme","nextAttachment","nextMyMessageTheme","attachmentEqual","actions","length","image_url","thumb_url","messageThemeEqual","JSON","stringify","MemoizedAttachment","React","memo","Attachment","exports","_useMessagesContext","useMessagesContext","_useMessageContext","useMessageContext","_useTheme","useTheme","semantics","theme","_useMessageContext2","isMyMessage","messageHasOnlySingleAttachment","showBackgroundTransparent","useMemo","StyleSheet","create","container","paddingVertical","primitives","spacingXs","paddingLeft","paddingRight","spacingSm","borderWidth","backgroundColor","chatBgAttachmentOutgoing","chatBgAttachmentIncoming","playPauseButton","borderColor","chatBorderOnChatOutgoing","chatBorderOnChatIncoming","speedSettingsButton","durationText","color","chatTextIncoming","fontWeight","typographyFontWeightSemiBold"],"sourceRoot":"../../../../src","sources":["components/Attachment/Attachment.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AASA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAIA,IAAAM,gBAAA,GAAAN,OAAA;AAIA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAA8C,IAAAU,WAAA,GAAAV,OAAA;AAAA,IAAAW,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA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,SAAS,CAACsB,wBAAwB,GAClCtB,SAAS,CAACuB;MAChB,CAAC;MACDE,YAAY,EAAE;QACZC,KAAK,EAAE1B,SAAS,CAAC2B,gBAAgB;QACjCC,UAAU,EAAEjB,iBAAU,CAACkB;MACzB;IACF,CAAC,CAAC;EACJ,CAAC,EAAE,CAAC7B,SAAS,EAAEG,WAAW,EAAEE,yBAAyB,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ exports.FileAttachment = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactNative = require("react-native");
|
|
7
7
|
var _openUrlSafely = require("./utils/openUrlSafely");
|
|
8
|
+
var _ComponentsContext = require("../../contexts/componentsContext/ComponentsContext");
|
|
8
9
|
var _MessageContext = require("../../contexts/messageContext/MessageContext");
|
|
9
10
|
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
10
11
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
@@ -18,13 +19,14 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
18
19
|
var additionalPressableProps = props.additionalPressableProps,
|
|
19
20
|
attachment = props.attachment,
|
|
20
21
|
attachmentIconSize = props.attachmentIconSize,
|
|
21
|
-
FilePreview = props.FilePreview,
|
|
22
22
|
_onLongPress = props.onLongPress,
|
|
23
23
|
_onPress = props.onPress,
|
|
24
24
|
_onPressIn = props.onPressIn,
|
|
25
25
|
preventPress = props.preventPress,
|
|
26
26
|
_props$styles = props.styles,
|
|
27
27
|
stylesProp = _props$styles === void 0 ? styles : _props$styles;
|
|
28
|
+
var _useComponentsContext = (0, _ComponentsContext.useComponentsContext)(),
|
|
29
|
+
FilePreview = _useComponentsContext.FilePreview;
|
|
28
30
|
var defaultOnPress = function defaultOnPress() {
|
|
29
31
|
return (0, _openUrlSafely.openUrlSafely)(attachment.asset_url);
|
|
30
32
|
};
|
|
@@ -75,19 +77,15 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
75
77
|
}));
|
|
76
78
|
};
|
|
77
79
|
var FileAttachment = exports.FileAttachment = function FileAttachment(props) {
|
|
78
|
-
var PropFilePreview = props.FilePreview;
|
|
79
80
|
var _useMessageContext = (0, _MessageContext.useMessageContext)(),
|
|
80
81
|
onLongPress = _useMessageContext.onLongPress,
|
|
81
82
|
onPress = _useMessageContext.onPress,
|
|
82
83
|
onPressIn = _useMessageContext.onPressIn,
|
|
83
84
|
preventPress = _useMessageContext.preventPress;
|
|
84
85
|
var _useMessagesContext = (0, _MessagesContext.useMessagesContext)(),
|
|
85
|
-
additionalPressableProps = _useMessagesContext.additionalPressableProps
|
|
86
|
-
ContextFilePreview = _useMessagesContext.FilePreview;
|
|
87
|
-
var FilePreview = PropFilePreview || ContextFilePreview;
|
|
86
|
+
additionalPressableProps = _useMessagesContext.additionalPressableProps;
|
|
88
87
|
return (0, _jsxRuntime.jsx)(FileAttachmentWithContext, Object.assign({
|
|
89
88
|
additionalPressableProps: additionalPressableProps,
|
|
90
|
-
FilePreview: FilePreview,
|
|
91
89
|
onLongPress: onLongPress,
|
|
92
90
|
onPress: onPress,
|
|
93
91
|
onPressIn: onPressIn,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_openUrlSafely","_MessageContext","_MessagesContext","_ThemeContext","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FileAttachmentWithContext","props","styles","useStyles","additionalPressableProps","attachment","attachmentIconSize","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_openUrlSafely","_ComponentsContext","_MessageContext","_MessagesContext","_ThemeContext","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FileAttachmentWithContext","props","styles","useStyles","additionalPressableProps","attachment","attachmentIconSize","onLongPress","onPress","onPressIn","preventPress","_props$styles","stylesProp","_useComponentsContext","useComponentsContext","FilePreview","defaultOnPress","openUrlSafely","asset_url","jsx","Pressable","assign","disabled","event","additionalInfo","emitter","defaultHandler","testID","children","FileAttachment","exports","_useMessageContext","useMessageContext","_useMessagesContext","useMessagesContext","displayName","_useTheme","useTheme","semantics","theme","_useMessageContext2","isMyMessage","messageHasOnlySingleAttachment","showBackgroundTransparent","useMemo","StyleSheet","create","container","backgroundColor","chatBgAttachmentOutgoing","chatBgAttachmentIncoming"],"sourceRoot":"../../../../src","sources":["components/Attachment/FileAttachment.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,cAAA,GAAAF,OAAA;AAIA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAIA,IAAAK,gBAAA,GAAAL,OAAA;AAIA,IAAAM,aAAA,GAAAN,OAAA;AAAoE,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,C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;IACF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACP,yBAAyB,EAAEF,WAAW,EAAEH,SAAS,CAAC,CAAC;AACzD,CAAC","ignoreList":[]}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.FileAttachmentGroup = void 0;
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
8
|
+
var _ComponentsContext = require("../../contexts/componentsContext/ComponentsContext");
|
|
9
9
|
var _MessageContext = require("../../contexts/messageContext/MessageContext");
|
|
10
|
-
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
11
10
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
12
11
|
var _theme = require("../../theme");
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
var _this = this,
|
|
15
14
|
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/FileAttachmentGroup.tsx";
|
|
16
15
|
var FileAttachmentGroupWithContext = function FileAttachmentGroupWithContext(props) {
|
|
17
|
-
var
|
|
18
|
-
files = props.files,
|
|
16
|
+
var files = props.files,
|
|
19
17
|
message = props.message,
|
|
20
18
|
_props$styles = props.styles,
|
|
21
19
|
stylesProp = _props$styles === void 0 ? {} : _props$styles;
|
|
20
|
+
var _useComponentsContext = (0, _ComponentsContext.useComponentsContext)(),
|
|
21
|
+
Attachment = _useComponentsContext.Attachment;
|
|
22
22
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
23
23
|
_useTheme$theme$messa = _useTheme.theme.messageItemView.fileAttachmentGroup,
|
|
24
24
|
attachmentContainer = _useTheme$theme$messa.attachmentContainer,
|
|
@@ -52,17 +52,11 @@ var FileAttachmentGroup = exports.FileAttachmentGroup = function FileAttachmentG
|
|
|
52
52
|
var _useMessageContext = (0, _MessageContext.useMessageContext)(),
|
|
53
53
|
contextFiles = _useMessageContext.files,
|
|
54
54
|
message = _useMessageContext.message;
|
|
55
|
-
var _useMessagesContext = (0, _MessagesContext.useMessagesContext)(),
|
|
56
|
-
_useMessagesContext$A = _useMessagesContext.Attachment,
|
|
57
|
-
Attachment = _useMessagesContext$A === void 0 ? _Attachment.Attachment : _useMessagesContext$A,
|
|
58
|
-
AudioAttachment = _useMessagesContext.AudioAttachment;
|
|
59
55
|
var files = propFiles || contextFiles;
|
|
60
56
|
if (!files.length) {
|
|
61
57
|
return null;
|
|
62
58
|
}
|
|
63
59
|
return (0, _jsxRuntime.jsx)(MemoizedFileAttachmentGroup, {
|
|
64
|
-
Attachment: Attachment,
|
|
65
|
-
AudioAttachment: AudioAttachment,
|
|
66
60
|
files: files,
|
|
67
61
|
message: message
|
|
68
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ComponentsContext","_MessageContext","_ThemeContext","_theme","_jsxRuntime","_this","_jsxFileName","FileAttachmentGroupWithContext","props","files","message","_props$styles","styles","stylesProp","_useComponentsContext","useComponentsContext","Attachment","_useTheme","useTheme","_useTheme$theme$messa","theme","messageItemView","fileAttachmentGroup","attachmentContainer","container","jsx","View","style","children","map","file","index","item","attachment","id","areEqual","prevProps","nextProps","prevFiles","prevMessage","nextFiles","nextMessage","messageEqual","length","MemoizedFileAttachmentGroup","React","memo","FileAttachmentGroup","exports","propFiles","_useMessageContext","useMessageContext","contextFiles","StyleSheet","create","alignItems","gap","primitives","spacingXs","borderRadius","radiusLg","overflow","displayName"],"sourceRoot":"../../../../src","sources":["components/Attachment/FileAttachmentGroup.tsx"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAIA,IAAA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C;EAC/B9B,SAAS,EAAE;IACT+B,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEC,iBAAU,CAACC;EAClB,CAAC;EACD1B,IAAI,EAAE;IACJ2B,YAAY,EAAEF,iBAAU,CAACG,QAAQ;IACjCC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEFd,mBAAmB,CAACe,WAAW,GAAG,2DAA2D","ignoreList":[]}
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
exports.FilePreview = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactNative = require("react-native");
|
|
7
|
-
var
|
|
8
|
-
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
7
|
+
var _ComponentsContext = require("../../contexts/componentsContext/ComponentsContext");
|
|
9
8
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
10
9
|
var _theme = require("../../theme");
|
|
11
10
|
var _utils = require("../../utils/utils");
|
|
@@ -16,16 +15,14 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
16
|
var FilePreview = exports.FilePreview = function FilePreview(props) {
|
|
18
17
|
var attachment = props.attachment,
|
|
19
|
-
PropFileAttachmentIcon = props.FileAttachmentIcon,
|
|
20
18
|
attachmentIconSize = props.attachmentIconSize,
|
|
21
19
|
_props$styles = props.styles,
|
|
22
20
|
stylesProp = _props$styles === void 0 ? {} : _props$styles,
|
|
23
21
|
_props$titleNumberOfL = props.titleNumberOfLines,
|
|
24
22
|
titleNumberOfLines = _props$titleNumberOfL === void 0 ? 2 : _props$titleNumberOfL,
|
|
25
23
|
indicator = props.indicator;
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var FileAttachmentIcon = PropFileAttachmentIcon || ContextFileAttachmentIcon || _FileIcon.FileIcon;
|
|
24
|
+
var _useComponentsContext = (0, _ComponentsContext.useComponentsContext)(),
|
|
25
|
+
FileAttachmentIcon = _useComponentsContext.FileAttachmentIcon;
|
|
29
26
|
var styles = useStyles();
|
|
30
27
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
31
28
|
_useTheme$theme$messa = _useTheme.theme.messageItemView.file,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_ComponentsContext","_ThemeContext","_theme","_utils","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilePreview","exports","props","attachment","attachmentIconSize","_props$styles","styles","stylesProp","_props$titleNumberOfL","titleNumberOfLines","indicator","_useComponentsContext","useComponentsContext","FileAttachmentIcon","useStyles","_useTheme","useTheme","_useTheme$theme$messa","theme","messageItemView","file","container","details","fileSize","title","jsxs","View","style","children","jsx","mimeType","mime_type","size","Text","numberOfLines","duration","getDurationLabelFromDuration","getFileSizeDisplayText","file_size","displayName","_useTheme2","semantics","useMemo","StyleSheet","create","alignItems","flexDirection","padding","primitives","spacingSm","gap","width","flexShrink","spacingXxs","color","textPrimary","fontSize","typographyFontSizeXs","fontWeight","typographyFontWeightRegular","lineHeight","typographyLineHeightTight","typographyFontSizeSm","typographyFontWeightSemiBold"],"sourceRoot":"../../../../src","sources":["components/Attachment/FilePreview.ts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AAS;QAC7BC,GAAG,EAAEF,iBAAU,CAACC,SAAS;QACzBE,KAAK,EAAE;MACT,CAAC;MACD7B,OAAO,EAAE;QACP8B,UAAU,EAAE,CAAC;QACbF,GAAG,EAAEF,iBAAU,CAACK;MAClB,CAAC;MACDrB,IAAI,EAAE;QACJsB,KAAK,EAAEb,SAAS,CAACc,WAAW;QAC5BC,QAAQ,EAAER,iBAAU,CAACS,oBAAoB;QACzCC,UAAU,EAAEV,iBAAU,CAACW,2BAA2B;QAClDC,UAAU,EAAEZ,iBAAU,CAACa;MACzB,CAAC;MACDrC,KAAK,EAAE;QACL8B,KAAK,EAAEb,SAAS,CAACc,WAAW;QAC5BC,QAAQ,EAAER,iBAAU,CAACc,oBAAoB;QACzCJ,UAAU,EAAEV,iBAAU,CAACe,4BAA4B;QACnDH,UAAU,EAAEZ,iBAAU,CAACa;MACzB;IACF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACpB,SAAS,CAAC,CAAC;AACjB,CAAC","ignoreList":[]}
|
|
@@ -12,6 +12,7 @@ var _getGalleryImageBorderRadius = require("./utils/getGalleryImageBorderRadius"
|
|
|
12
12
|
var _openUrlSafely = require("./utils/openUrlSafely");
|
|
13
13
|
var _contexts = require("../../contexts");
|
|
14
14
|
var _ChatConfigContext = require("../../contexts/chatConfigContext/ChatConfigContext");
|
|
15
|
+
var _ComponentsContext = require("../../contexts/componentsContext/ComponentsContext");
|
|
15
16
|
var _ImageGalleryContext = require("../../contexts/imageGalleryContext/ImageGalleryContext");
|
|
16
17
|
var _MessageContext = require("../../contexts/messageContext/MessageContext");
|
|
17
18
|
var _MessagesContext = require("../../contexts/messagesContext/MessagesContext");
|
|
@@ -32,8 +33,6 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
32
33
|
var additionalPressableProps = props.additionalPressableProps,
|
|
33
34
|
alignment = props.alignment,
|
|
34
35
|
imageGalleryStateStore = props.imageGalleryStateStore,
|
|
35
|
-
ImageLoadingFailedIndicator = props.ImageLoadingFailedIndicator,
|
|
36
|
-
ImageLoadingIndicator = props.ImageLoadingIndicator,
|
|
37
36
|
images = props.images,
|
|
38
37
|
message = props.message,
|
|
39
38
|
onLongPress = props.onLongPress,
|
|
@@ -42,7 +41,6 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
42
41
|
preventPress = props.preventPress,
|
|
43
42
|
setOverlay = props.setOverlay,
|
|
44
43
|
videos = props.videos,
|
|
45
|
-
VideoThumbnail = props.VideoThumbnail,
|
|
46
44
|
_props$messageHasOnly = props.messageHasOnlyOneMedia,
|
|
47
45
|
messageHasOnlyOneMedia = _props$messageHasOnly === void 0 ? false : _props$messageHasOnly;
|
|
48
46
|
var _useChatConfigContext = (0, _ChatConfigContext.useChatConfigContext)(),
|
|
@@ -126,8 +124,6 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
126
124
|
borderRadius: borderRadius,
|
|
127
125
|
colIndex: colIndex,
|
|
128
126
|
imageGalleryStateStore: imageGalleryStateStore,
|
|
129
|
-
ImageLoadingFailedIndicator: ImageLoadingFailedIndicator,
|
|
130
|
-
ImageLoadingIndicator: ImageLoadingIndicator,
|
|
131
127
|
imagesAndVideos: imagesAndVideos,
|
|
132
128
|
invertedDirections: invertedDirections || false,
|
|
133
129
|
message: message,
|
|
@@ -139,8 +135,7 @@ var GalleryWithContext = function GalleryWithContext(props) {
|
|
|
139
135
|
preventPress: preventPress,
|
|
140
136
|
rowIndex: rowIndex,
|
|
141
137
|
setOverlay: setOverlay,
|
|
142
|
-
thumbnail: thumbnail
|
|
143
|
-
VideoThumbnail: VideoThumbnail
|
|
138
|
+
thumbnail: thumbnail
|
|
144
139
|
}, rowIndex);
|
|
145
140
|
})
|
|
146
141
|
}, `gallery-${invertedDirections ? 'row' : 'column'}-${colIndex}`);
|
|
@@ -152,8 +147,6 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
152
147
|
borderRadius = _ref.borderRadius,
|
|
153
148
|
colIndex = _ref.colIndex,
|
|
154
149
|
imageGalleryStateStore = _ref.imageGalleryStateStore,
|
|
155
|
-
ImageLoadingFailedIndicator = _ref.ImageLoadingFailedIndicator,
|
|
156
|
-
ImageLoadingIndicator = _ref.ImageLoadingIndicator,
|
|
157
150
|
imagesAndVideos = _ref.imagesAndVideos,
|
|
158
151
|
invertedDirections = _ref.invertedDirections,
|
|
159
152
|
message = _ref.message,
|
|
@@ -165,8 +158,9 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
165
158
|
preventPress = _ref.preventPress,
|
|
166
159
|
rowIndex = _ref.rowIndex,
|
|
167
160
|
setOverlay = _ref.setOverlay,
|
|
168
|
-
thumbnail = _ref.thumbnail
|
|
169
|
-
|
|
161
|
+
thumbnail = _ref.thumbnail;
|
|
162
|
+
var _useComponentsContext = (0, _ComponentsContext.useComponentsContext)(),
|
|
163
|
+
VideoThumbnail = _useComponentsContext.VideoThumbnail;
|
|
170
164
|
var _useTheme2 = (0, _ThemeContext.useTheme)(),
|
|
171
165
|
_useTheme2$theme = _useTheme2.theme,
|
|
172
166
|
_useTheme2$theme$mess = _useTheme2$theme.messageItemView.gallery,
|
|
@@ -245,8 +239,6 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
245
239
|
thumb_url: thumbnail.thumb_url
|
|
246
240
|
}) : (0, _jsxRuntime.jsx)(GalleryImageThumbnail, {
|
|
247
241
|
borderRadius: imageBorderRadius != null ? imageBorderRadius : borderRadius,
|
|
248
|
-
ImageLoadingFailedIndicator: ImageLoadingFailedIndicator,
|
|
249
|
-
ImageLoadingIndicator: ImageLoadingIndicator,
|
|
250
242
|
thumbnail: thumbnail
|
|
251
243
|
}), colIndex === numOfColumns - 1 && rowIndex === numOfRows - 1 && imagesAndVideos.length > 4 ? (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
252
244
|
style: [_reactNative.StyleSheet.absoluteFill, styles.moreImagesContainer, {
|
|
@@ -263,9 +255,10 @@ var GalleryThumbnail = function GalleryThumbnail(_ref) {
|
|
|
263
255
|
};
|
|
264
256
|
var GalleryImageThumbnail = function GalleryImageThumbnail(_ref2) {
|
|
265
257
|
var borderRadius = _ref2.borderRadius,
|
|
266
|
-
ImageLoadingFailedIndicator = _ref2.ImageLoadingFailedIndicator,
|
|
267
|
-
ImageLoadingIndicator = _ref2.ImageLoadingIndicator,
|
|
268
258
|
thumbnail = _ref2.thumbnail;
|
|
259
|
+
var _useComponentsContext2 = (0, _ComponentsContext.useComponentsContext)(),
|
|
260
|
+
ImageLoadingFailedIndicator = _useComponentsContext2.ImageLoadingFailedIndicator,
|
|
261
|
+
ImageLoadingIndicator = _useComponentsContext2.ImageLoadingIndicator;
|
|
269
262
|
var _useLoadingImage = (0, _useLoadingImage2.useLoadingImage)(),
|
|
270
263
|
isLoadingImage = _useLoadingImage.isLoadingImage,
|
|
271
264
|
isLoadingImageError = _useLoadingImage.isLoadingImageError,
|
|
@@ -349,8 +342,6 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
349
342
|
var _ref4, _ref5;
|
|
350
343
|
var propAlignment = props.alignment,
|
|
351
344
|
propAdditionalPressableProps = props.additionalPressableProps,
|
|
352
|
-
PropImageLoadingFailedIndicator = props.ImageLoadingFailedIndicator,
|
|
353
|
-
PropImageLoadingIndicator = props.ImageLoadingIndicator,
|
|
354
345
|
propImages = props.images,
|
|
355
346
|
propMessage = props.message,
|
|
356
347
|
propMyMessageTheme = props.myMessageTheme,
|
|
@@ -360,7 +351,6 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
360
351
|
propPreventPress = props.preventPress,
|
|
361
352
|
propSetOverlay = props.setOverlay,
|
|
362
353
|
propVideos = props.videos,
|
|
363
|
-
PropVideoThumbnail = props.VideoThumbnail,
|
|
364
354
|
propMessageContentOrder = props.messageContentOrder;
|
|
365
355
|
var _useImageGalleryConte = (0, _ImageGalleryContext.useImageGalleryContext)(),
|
|
366
356
|
imageGalleryStateStore = _useImageGalleryConte.imageGalleryStateStore;
|
|
@@ -376,10 +366,7 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
376
366
|
contextMessageContentOrder = _useMessageContext.messageContentOrder;
|
|
377
367
|
var _useMessagesContext = (0, _MessagesContext.useMessagesContext)(),
|
|
378
368
|
contextAdditionalPressableProps = _useMessagesContext.additionalPressableProps,
|
|
379
|
-
|
|
380
|
-
ContextImageLoadingIndicator = _useMessagesContext.ImageLoadingIndicator,
|
|
381
|
-
contextMyMessageTheme = _useMessagesContext.myMessageTheme,
|
|
382
|
-
ContextVideoThumnbnail = _useMessagesContext.VideoThumbnail;
|
|
369
|
+
contextMyMessageTheme = _useMessagesContext.myMessageTheme;
|
|
383
370
|
var _useOverlayContext = (0, _OverlayContext.useOverlayContext)(),
|
|
384
371
|
contextSetOverlay = _useOverlayContext.setOverlay;
|
|
385
372
|
var images = (_ref4 = propImages != null ? propImages : contextImages) != null ? _ref4 : [];
|
|
@@ -396,9 +383,6 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
396
383
|
var onPress = propOnPress || contextOnPress;
|
|
397
384
|
var preventPress = typeof propPreventPress === 'boolean' ? propPreventPress : contextPreventPress;
|
|
398
385
|
var setOverlay = propSetOverlay || contextSetOverlay;
|
|
399
|
-
var VideoThumbnail = PropVideoThumbnail || ContextVideoThumnbnail;
|
|
400
|
-
var ImageLoadingFailedIndicator = PropImageLoadingFailedIndicator || ContextImageLoadingFailedIndicator;
|
|
401
|
-
var ImageLoadingIndicator = PropImageLoadingIndicator || ContextImageLoadingIndicator;
|
|
402
386
|
var myMessageTheme = propMyMessageTheme || contextMyMessageTheme;
|
|
403
387
|
var messageContentOrder = propMessageContentOrder || contextMessageContentOrder;
|
|
404
388
|
var messageHasOnlyOneMedia = (messageContentOrder == null ? void 0 : messageContentOrder.length) === 1 && (messageContentOrder == null ? void 0 : messageContentOrder.includes('gallery')) && imagesAndVideos.length === 1;
|
|
@@ -407,8 +391,6 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
407
391
|
alignment: alignment,
|
|
408
392
|
channelId: message == null ? void 0 : message.cid,
|
|
409
393
|
imageGalleryStateStore: imageGalleryStateStore,
|
|
410
|
-
ImageLoadingFailedIndicator: ImageLoadingFailedIndicator,
|
|
411
|
-
ImageLoadingIndicator: ImageLoadingIndicator,
|
|
412
394
|
images: images,
|
|
413
395
|
message: message,
|
|
414
396
|
myMessageTheme: myMessageTheme,
|
|
@@ -418,7 +400,6 @@ var Gallery = exports.Gallery = function Gallery(props) {
|
|
|
418
400
|
preventPress: preventPress,
|
|
419
401
|
setOverlay: setOverlay,
|
|
420
402
|
videos: videos,
|
|
421
|
-
VideoThumbnail: VideoThumbnail,
|
|
422
403
|
messageHasOnlyOneMedia: messageHasOnlyOneMedia,
|
|
423
404
|
messageContentOrder: messageContentOrder
|
|
424
405
|
});
|