stream-chat-react-native-core 9.0.0-beta.30 → 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/Message/MessageItemView/utils/renderText.js +3 -1
- package/lib/commonjs/components/Message/MessageItemView/utils/renderText.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 +8 -4
- 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/MultipleAnswersField.js +5 -3
- package/lib/commonjs/components/Poll/components/MultipleAnswersField.js.map +1 -1
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js +5 -3
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.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/PollInputDialog.js +2 -1
- package/lib/commonjs/components/Poll/components/PollInputDialog.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 +11 -4
- 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/hooks/messagePreview/useMessagePreviewText.js +28 -13
- package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
- package/lib/commonjs/i18n/en.json +20 -0
- package/lib/commonjs/i18n/es.json +20 -0
- package/lib/commonjs/i18n/fr.json +20 -0
- package/lib/commonjs/i18n/he.json +20 -0
- package/lib/commonjs/i18n/hi.json +20 -0
- package/lib/commonjs/i18n/it.json +20 -0
- package/lib/commonjs/i18n/ja.json +20 -0
- package/lib/commonjs/i18n/ko.json +20 -0
- package/lib/commonjs/i18n/nl.json +20 -0
- package/lib/commonjs/i18n/pt-br.json +20 -0
- package/lib/commonjs/i18n/ru.json +20 -0
- package/lib/commonjs/i18n/tr.json +20 -0
- package/lib/commonjs/icons/arrow-up-right.js +10 -6
- package/lib/commonjs/icons/arrow-up-right.js.map +1 -1
- package/lib/commonjs/icons/audio.js +10 -6
- package/lib/commonjs/icons/audio.js.map +1 -1
- package/lib/commonjs/icons/chevron-left.js +10 -6
- package/lib/commonjs/icons/chevron-left.js.map +1 -1
- package/lib/commonjs/icons/leave.js +10 -6
- package/lib/commonjs/icons/leave.js.map +1 -1
- package/lib/commonjs/icons/message-bubble.js +10 -6
- package/lib/commonjs/icons/message-bubble.js.map +1 -1
- package/lib/commonjs/icons/mute.js +11 -7
- package/lib/commonjs/icons/mute.js.map +1 -1
- package/lib/commonjs/icons/reply.js +10 -6
- package/lib/commonjs/icons/reply.js.map +1 -1
- package/lib/commonjs/icons/search.js +11 -7
- package/lib/commonjs/icons/search.js.map +1 -1
- package/lib/commonjs/icons/send.js +11 -7
- package/lib/commonjs/icons/send.js.map +1 -1
- package/lib/commonjs/icons/thread.js +10 -6
- package/lib/commonjs/icons/thread.js.map +1 -1
- package/lib/commonjs/icons/video-fill.js +2 -0
- package/lib/commonjs/icons/video-fill.js.map +1 -1
- package/lib/commonjs/icons/video.js +10 -6
- package/lib/commonjs/icons/video.js.map +1 -1
- package/lib/commonjs/utils/rtlMirrorSwitchStyle.js +20 -0
- package/lib/commonjs/utils/rtlMirrorSwitchStyle.js.map +1 -0
- 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/Message/MessageItemView/utils/renderText.js +3 -1
- package/lib/module/components/Message/MessageItemView/utils/renderText.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 +8 -4
- 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/MultipleAnswersField.js +5 -3
- package/lib/module/components/Poll/components/MultipleAnswersField.js.map +1 -1
- package/lib/module/components/Poll/components/MultipleVotesSettings.js +5 -3
- package/lib/module/components/Poll/components/MultipleVotesSettings.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/PollInputDialog.js +2 -1
- package/lib/module/components/Poll/components/PollInputDialog.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 +11 -4
- 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/hooks/messagePreview/useMessagePreviewText.js +28 -13
- package/lib/module/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
- package/lib/module/i18n/en.json +20 -0
- package/lib/module/i18n/es.json +20 -0
- package/lib/module/i18n/fr.json +20 -0
- package/lib/module/i18n/he.json +20 -0
- package/lib/module/i18n/hi.json +20 -0
- package/lib/module/i18n/it.json +20 -0
- package/lib/module/i18n/ja.json +20 -0
- package/lib/module/i18n/ko.json +20 -0
- package/lib/module/i18n/nl.json +20 -0
- package/lib/module/i18n/pt-br.json +20 -0
- package/lib/module/i18n/ru.json +20 -0
- package/lib/module/i18n/tr.json +20 -0
- package/lib/module/icons/arrow-up-right.js +10 -6
- package/lib/module/icons/arrow-up-right.js.map +1 -1
- package/lib/module/icons/audio.js +10 -6
- package/lib/module/icons/audio.js.map +1 -1
- package/lib/module/icons/chevron-left.js +10 -6
- package/lib/module/icons/chevron-left.js.map +1 -1
- package/lib/module/icons/leave.js +10 -6
- package/lib/module/icons/leave.js.map +1 -1
- package/lib/module/icons/message-bubble.js +10 -6
- package/lib/module/icons/message-bubble.js.map +1 -1
- package/lib/module/icons/mute.js +11 -7
- package/lib/module/icons/mute.js.map +1 -1
- package/lib/module/icons/reply.js +10 -6
- package/lib/module/icons/reply.js.map +1 -1
- package/lib/module/icons/search.js +11 -7
- package/lib/module/icons/search.js.map +1 -1
- package/lib/module/icons/send.js +11 -7
- package/lib/module/icons/send.js.map +1 -1
- package/lib/module/icons/thread.js +10 -6
- package/lib/module/icons/thread.js.map +1 -1
- package/lib/module/icons/video-fill.js +2 -0
- package/lib/module/icons/video-fill.js.map +1 -1
- package/lib/module/icons/video.js +10 -6
- package/lib/module/icons/video.js.map +1 -1
- package/lib/module/utils/rtlMirrorSwitchStyle.js +20 -0
- package/lib/module/utils/rtlMirrorSwitchStyle.js.map +1 -0
- 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/Message/MessageItemView/utils/renderText.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/MultipleVotesSettings.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/lib/typescript/hooks/messagePreview/useMessagePreviewText.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +20 -0
- package/lib/typescript/i18n/es.json +20 -0
- package/lib/typescript/i18n/fr.json +20 -0
- package/lib/typescript/i18n/he.json +20 -0
- package/lib/typescript/i18n/hi.json +20 -0
- package/lib/typescript/i18n/it.json +20 -0
- package/lib/typescript/i18n/ja.json +20 -0
- package/lib/typescript/i18n/ko.json +20 -0
- package/lib/typescript/i18n/nl.json +20 -0
- package/lib/typescript/i18n/pt-br.json +20 -0
- package/lib/typescript/i18n/ru.json +20 -0
- package/lib/typescript/i18n/tr.json +20 -0
- package/lib/typescript/icons/arrow-up-right.d.ts.map +1 -1
- package/lib/typescript/icons/audio.d.ts.map +1 -1
- package/lib/typescript/icons/chevron-left.d.ts.map +1 -1
- package/lib/typescript/icons/leave.d.ts.map +1 -1
- package/lib/typescript/icons/message-bubble.d.ts.map +1 -1
- package/lib/typescript/icons/mute.d.ts.map +1 -1
- package/lib/typescript/icons/reply.d.ts.map +1 -1
- package/lib/typescript/icons/search.d.ts.map +1 -1
- package/lib/typescript/icons/send.d.ts.map +1 -1
- package/lib/typescript/icons/thread.d.ts.map +1 -1
- package/lib/typescript/icons/video-fill.d.ts.map +1 -1
- package/lib/typescript/icons/video.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +20 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/rtlMirrorSwitchStyle.d.ts +9 -0
- package/lib/typescript/utils/rtlMirrorSwitchStyle.d.ts.map +1 -0
- 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/Message/MessageItemView/__tests__/__snapshots__/MessageTextContainer.test.tsx.snap +1 -0
- package/src/components/Message/MessageItemView/utils/renderText.tsx +2 -0
- package/src/components/MessageInput/MessageComposer.tsx +16 -76
- package/src/components/MessageInput/MessageInputHeaderView.tsx +3 -3
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +54 -36
- 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 +7 -6
- package/src/components/Poll/Poll.tsx +22 -24
- package/src/components/Poll/components/MultipleAnswersField.tsx +4 -3
- package/src/components/Poll/components/MultipleVotesSettings.tsx +4 -2
- package/src/components/Poll/components/PollAnswersList.tsx +9 -11
- package/src/components/Poll/components/PollInputDialog.tsx +1 -0
- 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 +25 -10
- package/src/components/Thread/Thread.tsx +3 -18
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +31 -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/hooks/messagePreview/useMessagePreviewText.tsx +17 -13
- package/src/i18n/en.json +20 -0
- package/src/i18n/es.json +20 -0
- package/src/i18n/fr.json +20 -0
- package/src/i18n/he.json +20 -0
- package/src/i18n/hi.json +20 -0
- package/src/i18n/it.json +20 -0
- package/src/i18n/ja.json +20 -0
- package/src/i18n/ko.json +20 -0
- package/src/i18n/nl.json +20 -0
- package/src/i18n/pt-br.json +20 -0
- package/src/i18n/ru.json +20 -0
- package/src/i18n/tr.json +20 -0
- package/src/icons/arrow-up-right.tsx +11 -8
- package/src/icons/audio.tsx +11 -8
- package/src/icons/chevron-left.tsx +11 -8
- package/src/icons/leave.tsx +11 -8
- package/src/icons/message-bubble.tsx +11 -8
- package/src/icons/mute.tsx +12 -9
- package/src/icons/reply.tsx +11 -8
- package/src/icons/search.tsx +12 -9
- package/src/icons/send.tsx +12 -9
- package/src/icons/thread.tsx +11 -8
- package/src/icons/video-fill.tsx +5 -1
- package/src/icons/video.tsx +11 -8
- package/src/utils/rtlMirrorSwitchStyle.ts +20 -0
- package/src/version.json +1 -1
|
@@ -11,17 +11,8 @@ import {
|
|
|
11
11
|
type Attachment as AttachmentType,
|
|
12
12
|
} from 'stream-chat';
|
|
13
13
|
|
|
14
|
-
import { AudioAttachment as AudioAttachmentDefault } from './Audio';
|
|
15
|
-
|
|
16
|
-
import { UnsupportedAttachment as UnsupportedAttachmentDefault } from './UnsupportedAttachment';
|
|
17
|
-
import { URLPreview as URLPreviewDefault } from './UrlPreview';
|
|
18
|
-
import { URLPreviewCompact as URLPreviewCompactDefault } from './UrlPreview/URLPreviewCompact';
|
|
19
|
-
|
|
20
|
-
import { FileAttachment as FileAttachmentDefault } from '../../components/Attachment/FileAttachment';
|
|
21
|
-
import { Gallery as GalleryDefault } from '../../components/Attachment/Gallery';
|
|
22
|
-
import { Giphy as GiphyDefault } from '../../components/Attachment/Giphy';
|
|
23
|
-
|
|
24
14
|
import { useTheme } from '../../contexts';
|
|
15
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
25
16
|
import {
|
|
26
17
|
MessageContextValue,
|
|
27
18
|
useMessageContext,
|
|
@@ -39,16 +30,7 @@ export type ActionHandler = (name: string, value: string) => void;
|
|
|
39
30
|
|
|
40
31
|
export type AttachmentPropsWithContext = Pick<
|
|
41
32
|
MessagesContextValue,
|
|
42
|
-
| '
|
|
43
|
-
| 'FileAttachment'
|
|
44
|
-
| 'Gallery'
|
|
45
|
-
| 'Giphy'
|
|
46
|
-
| 'isAttachmentEqual'
|
|
47
|
-
| 'UrlPreview'
|
|
48
|
-
| 'URLPreviewCompact'
|
|
49
|
-
| 'myMessageTheme'
|
|
50
|
-
| 'urlPreviewType'
|
|
51
|
-
| 'UnsupportedAttachment'
|
|
33
|
+
'isAttachmentEqual' | 'myMessageTheme' | 'urlPreviewType'
|
|
52
34
|
> &
|
|
53
35
|
Pick<MessageContextValue, 'message'> & {
|
|
54
36
|
/**
|
|
@@ -62,19 +44,16 @@ export type AttachmentPropsWithContext = Pick<
|
|
|
62
44
|
};
|
|
63
45
|
|
|
64
46
|
const AttachmentWithContext = (props: AttachmentPropsWithContext) => {
|
|
47
|
+
const { attachment, index, message, urlPreviewType } = props;
|
|
65
48
|
const {
|
|
66
|
-
attachment,
|
|
67
49
|
AudioAttachment,
|
|
68
50
|
FileAttachment,
|
|
69
51
|
Gallery,
|
|
70
52
|
Giphy,
|
|
71
53
|
UrlPreview,
|
|
72
54
|
URLPreviewCompact,
|
|
73
|
-
index,
|
|
74
|
-
message,
|
|
75
|
-
urlPreviewType,
|
|
76
55
|
UnsupportedAttachment,
|
|
77
|
-
} =
|
|
56
|
+
} = useComponentsContext();
|
|
78
57
|
const audioAttachmentStyles = useAudioAttachmentStyles();
|
|
79
58
|
|
|
80
59
|
if (attachment.type === FileTypes.Giphy || attachment.type === FileTypes.Imgur) {
|
|
@@ -164,31 +143,9 @@ export type AttachmentProps = Partial<AttachmentPropsWithContext>;
|
|
|
164
143
|
* Attachment - The message attachment
|
|
165
144
|
*/
|
|
166
145
|
export const Attachment = (props: AttachmentProps) => {
|
|
167
|
-
const {
|
|
168
|
-
attachment,
|
|
169
|
-
AudioAttachment: PropAudioAttachment,
|
|
170
|
-
FileAttachment: PropFileAttachment,
|
|
171
|
-
Gallery: PropGallery,
|
|
172
|
-
Giphy: PropGiphy,
|
|
173
|
-
myMessageTheme: PropMyMessageTheme,
|
|
174
|
-
UrlPreview: PropUrlPreview,
|
|
175
|
-
URLPreviewCompact: PropURLPreviewCompact,
|
|
176
|
-
urlPreviewType: PropUrlPreviewType,
|
|
177
|
-
UnsupportedAttachment: PropUnsupportedAttachment,
|
|
178
|
-
} = props;
|
|
146
|
+
const { attachment } = props;
|
|
179
147
|
|
|
180
|
-
const {
|
|
181
|
-
AudioAttachment: ContextAudioAttachment,
|
|
182
|
-
FileAttachment: ContextFileAttachment,
|
|
183
|
-
Gallery: ContextGallery,
|
|
184
|
-
Giphy: ContextGiphy,
|
|
185
|
-
isAttachmentEqual,
|
|
186
|
-
myMessageTheme: ContextMyMessageTheme,
|
|
187
|
-
UrlPreview: ContextUrlPreview,
|
|
188
|
-
URLPreviewCompact: ContextURLPreviewCompact,
|
|
189
|
-
urlPreviewType: ContextUrlPreviewType,
|
|
190
|
-
UnsupportedAttachment: ContextUnsupportedAttachment,
|
|
191
|
-
} = useMessagesContext();
|
|
148
|
+
const { isAttachmentEqual, myMessageTheme, urlPreviewType } = useMessagesContext();
|
|
192
149
|
|
|
193
150
|
const { message } = useMessageContext();
|
|
194
151
|
|
|
@@ -196,33 +153,14 @@ export const Attachment = (props: AttachmentProps) => {
|
|
|
196
153
|
return null;
|
|
197
154
|
}
|
|
198
155
|
|
|
199
|
-
const AudioAttachment = PropAudioAttachment || ContextAudioAttachment || AudioAttachmentDefault;
|
|
200
|
-
const FileAttachment = PropFileAttachment || ContextFileAttachment || FileAttachmentDefault;
|
|
201
|
-
const Gallery = PropGallery || ContextGallery || GalleryDefault;
|
|
202
|
-
const Giphy = PropGiphy || ContextGiphy || GiphyDefault;
|
|
203
|
-
const UrlPreview = PropUrlPreview || ContextUrlPreview || URLPreviewDefault;
|
|
204
|
-
const myMessageTheme = PropMyMessageTheme || ContextMyMessageTheme;
|
|
205
|
-
const URLPreviewCompact =
|
|
206
|
-
PropURLPreviewCompact || ContextURLPreviewCompact || URLPreviewCompactDefault;
|
|
207
|
-
const urlPreviewType = PropUrlPreviewType || ContextUrlPreviewType;
|
|
208
|
-
const UnsupportedAttachment =
|
|
209
|
-
PropUnsupportedAttachment || ContextUnsupportedAttachment || UnsupportedAttachmentDefault;
|
|
210
|
-
|
|
211
156
|
return (
|
|
212
157
|
<MemoizedAttachment
|
|
213
158
|
{...{
|
|
214
159
|
attachment,
|
|
215
|
-
message,
|
|
216
|
-
AudioAttachment,
|
|
217
|
-
FileAttachment,
|
|
218
|
-
Gallery,
|
|
219
|
-
Giphy,
|
|
220
160
|
isAttachmentEqual,
|
|
161
|
+
message,
|
|
221
162
|
myMessageTheme,
|
|
222
|
-
UrlPreview,
|
|
223
|
-
URLPreviewCompact,
|
|
224
163
|
urlPreviewType,
|
|
225
|
-
UnsupportedAttachment,
|
|
226
164
|
}}
|
|
227
165
|
/>
|
|
228
166
|
);
|
|
@@ -7,6 +7,7 @@ import { openUrlSafely } from './utils/openUrlSafely';
|
|
|
7
7
|
|
|
8
8
|
import { FileIconProps } from '../../components/Attachment/FileIcon';
|
|
9
9
|
|
|
10
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
10
11
|
import {
|
|
11
12
|
MessageContextValue,
|
|
12
13
|
useMessageContext,
|
|
@@ -21,7 +22,7 @@ export type FileAttachmentPropsWithContext = Pick<
|
|
|
21
22
|
MessageContextValue,
|
|
22
23
|
'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
|
|
23
24
|
> &
|
|
24
|
-
Pick<MessagesContextValue, 'additionalPressableProps'
|
|
25
|
+
Pick<MessagesContextValue, 'additionalPressableProps'> & {
|
|
25
26
|
/** The attachment to render */
|
|
26
27
|
attachment: Attachment;
|
|
27
28
|
attachmentIconSize?: FileIconProps['size'];
|
|
@@ -41,13 +42,13 @@ const FileAttachmentWithContext = (props: FileAttachmentPropsWithContext) => {
|
|
|
41
42
|
additionalPressableProps,
|
|
42
43
|
attachment,
|
|
43
44
|
attachmentIconSize,
|
|
44
|
-
FilePreview,
|
|
45
45
|
onLongPress,
|
|
46
46
|
onPress,
|
|
47
47
|
onPressIn,
|
|
48
48
|
preventPress,
|
|
49
49
|
styles: stylesProp = styles,
|
|
50
50
|
} = props;
|
|
51
|
+
const { FilePreview } = useComponentsContext();
|
|
51
52
|
|
|
52
53
|
const defaultOnPress = () => openUrlSafely(attachment.asset_url);
|
|
53
54
|
|
|
@@ -99,17 +100,13 @@ export type FileAttachmentProps = Partial<Omit<FileAttachmentPropsWithContext, '
|
|
|
99
100
|
Pick<FileAttachmentPropsWithContext, 'attachment'>;
|
|
100
101
|
|
|
101
102
|
export const FileAttachment = (props: FileAttachmentProps) => {
|
|
102
|
-
const { FilePreview: PropFilePreview } = props;
|
|
103
103
|
const { onLongPress, onPress, onPressIn, preventPress } = useMessageContext();
|
|
104
|
-
const { additionalPressableProps
|
|
105
|
-
|
|
106
|
-
const FilePreview = PropFilePreview || ContextFilePreview;
|
|
104
|
+
const { additionalPressableProps } = useMessagesContext();
|
|
107
105
|
|
|
108
106
|
return (
|
|
109
107
|
<FileAttachmentWithContext
|
|
110
108
|
{...{
|
|
111
109
|
additionalPressableProps,
|
|
112
|
-
FilePreview,
|
|
113
110
|
onLongPress,
|
|
114
111
|
onPress,
|
|
115
112
|
onPressIn,
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
6
5
|
import {
|
|
7
6
|
MessageContextValue,
|
|
8
7
|
useMessageContext,
|
|
9
8
|
} from '../../contexts/messageContext/MessageContext';
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
MessagesContextValue,
|
|
13
|
-
useMessagesContext,
|
|
14
|
-
} from '../../contexts/messagesContext/MessagesContext';
|
|
15
9
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
16
10
|
import { primitives } from '../../theme';
|
|
17
11
|
|
|
18
|
-
export type FileAttachmentGroupPropsWithContext = Pick<MessageContextValue, 'files' | 'message'> &
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
12
|
+
export type FileAttachmentGroupPropsWithContext = Pick<MessageContextValue, 'files' | 'message'> & {
|
|
13
|
+
styles?: Partial<{
|
|
14
|
+
attachmentContainer: StyleProp<ViewStyle>;
|
|
15
|
+
container: StyleProp<ViewStyle>;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
25
18
|
|
|
26
19
|
const FileAttachmentGroupWithContext = (props: FileAttachmentGroupPropsWithContext) => {
|
|
27
|
-
const {
|
|
20
|
+
const { files, message, styles: stylesProp = {} } = props;
|
|
21
|
+
const { Attachment } = useComponentsContext();
|
|
28
22
|
|
|
29
23
|
const {
|
|
30
24
|
theme: {
|
|
@@ -75,8 +69,6 @@ export const FileAttachmentGroup = (props: FileAttachmentGroupProps) => {
|
|
|
75
69
|
|
|
76
70
|
const { files: contextFiles, message } = useMessageContext();
|
|
77
71
|
|
|
78
|
-
const { Attachment = AttachmentDefault, AudioAttachment } = useMessagesContext();
|
|
79
|
-
|
|
80
72
|
const files = propFiles || contextFiles;
|
|
81
73
|
|
|
82
74
|
if (!files.length) {
|
|
@@ -86,8 +78,6 @@ export const FileAttachmentGroup = (props: FileAttachmentGroupProps) => {
|
|
|
86
78
|
return (
|
|
87
79
|
<MemoizedFileAttachmentGroup
|
|
88
80
|
{...{
|
|
89
|
-
Attachment,
|
|
90
|
-
AudioAttachment,
|
|
91
81
|
files,
|
|
92
82
|
message,
|
|
93
83
|
}}
|
|
@@ -3,16 +3,13 @@ import { StyleProp, StyleSheet, Text, TextStyle, View, ViewStyle } from 'react-n
|
|
|
3
3
|
|
|
4
4
|
import type { Attachment } from 'stream-chat';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
MessagesContextValue,
|
|
9
|
-
useMessagesContext,
|
|
10
|
-
} from '../../contexts/messagesContext/MessagesContext';
|
|
6
|
+
import type { FileIconProps } from '../../components/Attachment/FileIcon';
|
|
7
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
11
8
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
12
9
|
import { primitives } from '../../theme';
|
|
13
10
|
import { getDurationLabelFromDuration, getFileSizeDisplayText } from '../../utils/utils';
|
|
14
11
|
|
|
15
|
-
export type FilePreviewProps =
|
|
12
|
+
export type FilePreviewProps = {
|
|
16
13
|
/** The attachment to render */
|
|
17
14
|
attachment: Attachment;
|
|
18
15
|
attachmentIconSize?: FileIconProps['size'];
|
|
@@ -30,14 +27,12 @@ export type FilePreviewProps = Partial<Pick<MessagesContextValue, 'FileAttachmen
|
|
|
30
27
|
export const FilePreview = (props: FilePreviewProps) => {
|
|
31
28
|
const {
|
|
32
29
|
attachment,
|
|
33
|
-
FileAttachmentIcon: PropFileAttachmentIcon,
|
|
34
30
|
attachmentIconSize,
|
|
35
31
|
styles: stylesProp = {},
|
|
36
32
|
titleNumberOfLines = 2,
|
|
37
33
|
indicator,
|
|
38
34
|
} = props;
|
|
39
|
-
const { FileAttachmentIcon
|
|
40
|
-
const FileAttachmentIcon = PropFileAttachmentIcon || ContextFileAttachmentIcon || FileIconDefault;
|
|
35
|
+
const { FileAttachmentIcon } = useComponentsContext();
|
|
41
36
|
|
|
42
37
|
const styles = useStyles();
|
|
43
38
|
|
|
@@ -16,6 +16,7 @@ import { openUrlSafely } from './utils/openUrlSafely';
|
|
|
16
16
|
|
|
17
17
|
import { useTranslationContext } from '../../contexts';
|
|
18
18
|
import { useChatConfigContext } from '../../contexts/chatConfigContext/ChatConfigContext';
|
|
19
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
19
20
|
import {
|
|
20
21
|
ImageGalleryContextValue,
|
|
21
22
|
useImageGalleryContext,
|
|
@@ -54,14 +55,7 @@ export type GalleryPropsWithContext = Pick<ImageGalleryContextValue, 'imageGalle
|
|
|
54
55
|
| 'message'
|
|
55
56
|
| 'messageContentOrder'
|
|
56
57
|
> &
|
|
57
|
-
Pick<
|
|
58
|
-
MessagesContextValue,
|
|
59
|
-
| 'additionalPressableProps'
|
|
60
|
-
| 'VideoThumbnail'
|
|
61
|
-
| 'ImageLoadingIndicator'
|
|
62
|
-
| 'ImageLoadingFailedIndicator'
|
|
63
|
-
| 'myMessageTheme'
|
|
64
|
-
> &
|
|
58
|
+
Pick<MessagesContextValue, 'additionalPressableProps' | 'myMessageTheme'> &
|
|
65
59
|
Pick<OverlayContextValue, 'setOverlay'> & {
|
|
66
60
|
channelId: string | undefined;
|
|
67
61
|
messageHasOnlyOneMedia: boolean;
|
|
@@ -72,8 +66,6 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
72
66
|
additionalPressableProps,
|
|
73
67
|
alignment,
|
|
74
68
|
imageGalleryStateStore,
|
|
75
|
-
ImageLoadingFailedIndicator,
|
|
76
|
-
ImageLoadingIndicator,
|
|
77
69
|
images,
|
|
78
70
|
message,
|
|
79
71
|
onLongPress,
|
|
@@ -82,10 +74,8 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
82
74
|
preventPress,
|
|
83
75
|
setOverlay,
|
|
84
76
|
videos,
|
|
85
|
-
VideoThumbnail,
|
|
86
77
|
messageHasOnlyOneMedia = false,
|
|
87
78
|
} = props;
|
|
88
|
-
|
|
89
79
|
const { resizableCDNHosts } = useChatConfigContext();
|
|
90
80
|
const {
|
|
91
81
|
theme: {
|
|
@@ -103,9 +93,7 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
103
93
|
},
|
|
104
94
|
},
|
|
105
95
|
} = useTheme();
|
|
106
|
-
|
|
107
96
|
const styles = useStyles();
|
|
108
|
-
|
|
109
97
|
const sizeConfig = {
|
|
110
98
|
gridHeight,
|
|
111
99
|
gridWidth,
|
|
@@ -114,12 +102,10 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
114
102
|
minHeight,
|
|
115
103
|
minWidth,
|
|
116
104
|
};
|
|
117
|
-
|
|
118
105
|
const imagesAndVideos = [...(images || []), ...(videos || [])];
|
|
119
106
|
const imagesAndVideosValue = `${images?.length}${videos?.length}${images
|
|
120
107
|
?.map((i) => `${i.image_url}${i.thumb_url}`)
|
|
121
108
|
.join('')}${videos?.map((i) => `${i.image_url}${i.thumb_url}`).join('')}`;
|
|
122
|
-
|
|
123
109
|
const { height, invertedDirections, thumbnailGrid, width } = useMemo(
|
|
124
110
|
() =>
|
|
125
111
|
buildGallery({
|
|
@@ -130,12 +116,10 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
130
116
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
117
|
[imagesAndVideosValue],
|
|
132
118
|
);
|
|
133
|
-
|
|
134
119
|
if (!imagesAndVideos?.length) {
|
|
135
120
|
return null;
|
|
136
121
|
}
|
|
137
122
|
const numOfColumns = thumbnailGrid.length;
|
|
138
|
-
|
|
139
123
|
return (
|
|
140
124
|
<View
|
|
141
125
|
style={[
|
|
@@ -180,19 +164,15 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
180
164
|
width,
|
|
181
165
|
messageHasOnlyOneMedia,
|
|
182
166
|
});
|
|
183
|
-
|
|
184
167
|
if (!message) {
|
|
185
168
|
return null;
|
|
186
169
|
}
|
|
187
|
-
|
|
188
170
|
return (
|
|
189
171
|
<GalleryThumbnail
|
|
190
172
|
additionalPressableProps={additionalPressableProps}
|
|
191
173
|
borderRadius={borderRadius}
|
|
192
174
|
colIndex={colIndex}
|
|
193
175
|
imageGalleryStateStore={imageGalleryStateStore}
|
|
194
|
-
ImageLoadingFailedIndicator={ImageLoadingFailedIndicator}
|
|
195
|
-
ImageLoadingIndicator={ImageLoadingIndicator}
|
|
196
176
|
imagesAndVideos={imagesAndVideos}
|
|
197
177
|
invertedDirections={invertedDirections || false}
|
|
198
178
|
key={rowIndex}
|
|
@@ -206,7 +186,6 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
206
186
|
rowIndex={rowIndex}
|
|
207
187
|
setOverlay={setOverlay}
|
|
208
188
|
thumbnail={thumbnail}
|
|
209
|
-
VideoThumbnail={VideoThumbnail}
|
|
210
189
|
/>
|
|
211
190
|
);
|
|
212
191
|
})}
|
|
@@ -216,7 +195,6 @@ const GalleryWithContext = (props: GalleryPropsWithContext) => {
|
|
|
216
195
|
</View>
|
|
217
196
|
);
|
|
218
197
|
};
|
|
219
|
-
|
|
220
198
|
type GalleryThumbnailProps = {
|
|
221
199
|
borderRadius: GalleryImageBorderRadius;
|
|
222
200
|
colIndex: number;
|
|
@@ -227,24 +205,15 @@ type GalleryThumbnailProps = {
|
|
|
227
205
|
numOfRows: number;
|
|
228
206
|
rowIndex: number;
|
|
229
207
|
thumbnail: Thumbnail;
|
|
230
|
-
} & Pick<
|
|
231
|
-
MessagesContextValue,
|
|
232
|
-
| 'additionalPressableProps'
|
|
233
|
-
| 'VideoThumbnail'
|
|
234
|
-
| 'ImageLoadingIndicator'
|
|
235
|
-
| 'ImageLoadingFailedIndicator'
|
|
236
|
-
> &
|
|
208
|
+
} & Pick<MessagesContextValue, 'additionalPressableProps'> &
|
|
237
209
|
Pick<ImageGalleryContextValue, 'imageGalleryStateStore'> &
|
|
238
210
|
Pick<MessageContextValue, 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'> &
|
|
239
211
|
Pick<OverlayContextValue, 'setOverlay'>;
|
|
240
|
-
|
|
241
212
|
const GalleryThumbnail = ({
|
|
242
213
|
additionalPressableProps,
|
|
243
214
|
borderRadius,
|
|
244
215
|
colIndex,
|
|
245
216
|
imageGalleryStateStore,
|
|
246
|
-
ImageLoadingFailedIndicator,
|
|
247
|
-
ImageLoadingIndicator,
|
|
248
217
|
imagesAndVideos,
|
|
249
218
|
invertedDirections,
|
|
250
219
|
message,
|
|
@@ -257,8 +226,8 @@ const GalleryThumbnail = ({
|
|
|
257
226
|
rowIndex,
|
|
258
227
|
setOverlay,
|
|
259
228
|
thumbnail,
|
|
260
|
-
VideoThumbnail,
|
|
261
229
|
}: GalleryThumbnailProps) => {
|
|
230
|
+
const { VideoThumbnail } = useComponentsContext();
|
|
262
231
|
const {
|
|
263
232
|
theme: {
|
|
264
233
|
messageItemView: {
|
|
@@ -269,7 +238,6 @@ const GalleryThumbnail = ({
|
|
|
269
238
|
} = useTheme();
|
|
270
239
|
const { t } = useTranslationContext();
|
|
271
240
|
const styles = useStyles();
|
|
272
|
-
|
|
273
241
|
const openImageViewer = () => {
|
|
274
242
|
if (!message) {
|
|
275
243
|
return;
|
|
@@ -280,7 +248,6 @@ const GalleryThumbnail = ({
|
|
|
280
248
|
});
|
|
281
249
|
setOverlay('gallery');
|
|
282
250
|
};
|
|
283
|
-
|
|
284
251
|
const defaultOnPress = () => {
|
|
285
252
|
// If the url is defined then only try to open the file.
|
|
286
253
|
if (thumbnail.url) {
|
|
@@ -293,7 +260,6 @@ const GalleryThumbnail = ({
|
|
|
293
260
|
}
|
|
294
261
|
}
|
|
295
262
|
};
|
|
296
|
-
|
|
297
263
|
return (
|
|
298
264
|
<Pressable
|
|
299
265
|
disabled={preventPress}
|
|
@@ -339,8 +305,6 @@ const GalleryThumbnail = ({
|
|
|
339
305
|
) : (
|
|
340
306
|
<GalleryImageThumbnail
|
|
341
307
|
borderRadius={imageBorderRadius ?? borderRadius}
|
|
342
|
-
ImageLoadingFailedIndicator={ImageLoadingFailedIndicator}
|
|
343
|
-
ImageLoadingIndicator={ImageLoadingIndicator}
|
|
344
308
|
thumbnail={thumbnail}
|
|
345
309
|
/>
|
|
346
310
|
)}
|
|
@@ -362,16 +326,11 @@ const GalleryThumbnail = ({
|
|
|
362
326
|
</Pressable>
|
|
363
327
|
);
|
|
364
328
|
};
|
|
365
|
-
|
|
366
329
|
const GalleryImageThumbnail = ({
|
|
367
330
|
borderRadius,
|
|
368
|
-
ImageLoadingFailedIndicator,
|
|
369
|
-
ImageLoadingIndicator,
|
|
370
331
|
thumbnail,
|
|
371
|
-
}: Pick<
|
|
372
|
-
|
|
373
|
-
'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'thumbnail' | 'borderRadius'
|
|
374
|
-
>) => {
|
|
332
|
+
}: Pick<GalleryThumbnailProps, 'thumbnail' | 'borderRadius'>) => {
|
|
333
|
+
const { ImageLoadingFailedIndicator, ImageLoadingIndicator } = useComponentsContext();
|
|
375
334
|
const {
|
|
376
335
|
isLoadingImage,
|
|
377
336
|
isLoadingImageError,
|
|
@@ -379,33 +338,27 @@ const GalleryImageThumbnail = ({
|
|
|
379
338
|
setLoadingImage,
|
|
380
339
|
setLoadingImageError,
|
|
381
340
|
} = useLoadingImage();
|
|
382
|
-
|
|
383
341
|
const {
|
|
384
342
|
theme: {
|
|
385
343
|
messageItemView: { gallery },
|
|
386
344
|
},
|
|
387
345
|
} = useTheme();
|
|
388
|
-
|
|
389
346
|
const styles = useStyles();
|
|
390
|
-
|
|
391
347
|
const onLoadStart = useStableCallback(() => {
|
|
392
348
|
setLoadingImageError(false);
|
|
393
349
|
setLoadingImage(true);
|
|
394
350
|
});
|
|
395
|
-
|
|
396
351
|
const onLoad = useStableCallback(() => {
|
|
397
352
|
setTimeout(() => {
|
|
398
353
|
setLoadingImage(false);
|
|
399
354
|
setLoadingImageError(false);
|
|
400
355
|
}, 0);
|
|
401
356
|
});
|
|
402
|
-
|
|
403
357
|
const onError = useStableCallback(({ nativeEvent: { error } }: ImageErrorEvent) => {
|
|
404
358
|
console.warn(error);
|
|
405
359
|
setLoadingImage(false);
|
|
406
360
|
setLoadingImageError(true);
|
|
407
361
|
});
|
|
408
|
-
|
|
409
362
|
return (
|
|
410
363
|
<View style={[styles.image, borderRadius]}>
|
|
411
364
|
{isLoadingImageError ? (
|
|
@@ -426,7 +379,6 @@ const GalleryImageThumbnail = ({
|
|
|
426
379
|
</View>
|
|
427
380
|
);
|
|
428
381
|
};
|
|
429
|
-
|
|
430
382
|
const areEqual = (prevProps: GalleryPropsWithContext, nextProps: GalleryPropsWithContext) => {
|
|
431
383
|
const {
|
|
432
384
|
alignment: prevAlignment,
|
|
@@ -442,19 +394,16 @@ const areEqual = (prevProps: GalleryPropsWithContext, nextProps: GalleryPropsWit
|
|
|
442
394
|
myMessageTheme: nextMyMessageTheme,
|
|
443
395
|
videos: nextVideos,
|
|
444
396
|
} = nextProps;
|
|
445
|
-
|
|
446
397
|
const alignmentEqual = prevAlignment === nextAlignment;
|
|
447
398
|
if (!alignmentEqual) {
|
|
448
399
|
return false;
|
|
449
400
|
}
|
|
450
|
-
|
|
451
401
|
const messageEqual =
|
|
452
402
|
prevMessage?.id === nextMessage?.id &&
|
|
453
403
|
`${prevMessage?.updated_at}` === `${nextMessage?.updated_at}`;
|
|
454
404
|
if (!messageEqual) {
|
|
455
405
|
return false;
|
|
456
406
|
}
|
|
457
|
-
|
|
458
407
|
const imagesEqual =
|
|
459
408
|
prevImages.length === nextImages.length &&
|
|
460
409
|
prevImages.every(
|
|
@@ -465,7 +414,6 @@ const areEqual = (prevProps: GalleryPropsWithContext, nextProps: GalleryPropsWit
|
|
|
465
414
|
if (!imagesEqual) {
|
|
466
415
|
return false;
|
|
467
416
|
}
|
|
468
|
-
|
|
469
417
|
const videosEqual =
|
|
470
418
|
prevVideos.length === nextVideos.length &&
|
|
471
419
|
prevVideos.every(
|
|
@@ -476,20 +424,15 @@ const areEqual = (prevProps: GalleryPropsWithContext, nextProps: GalleryPropsWit
|
|
|
476
424
|
if (!videosEqual) {
|
|
477
425
|
return false;
|
|
478
426
|
}
|
|
479
|
-
|
|
480
427
|
const messageThemeEqual =
|
|
481
428
|
JSON.stringify(prevMyMessageTheme) === JSON.stringify(nextMyMessageTheme);
|
|
482
429
|
if (!messageThemeEqual) {
|
|
483
430
|
return false;
|
|
484
431
|
}
|
|
485
|
-
|
|
486
432
|
return true;
|
|
487
433
|
};
|
|
488
|
-
|
|
489
434
|
const MemoizedGallery = React.memo(GalleryWithContext, areEqual) as typeof GalleryWithContext;
|
|
490
|
-
|
|
491
435
|
export type GalleryProps = Partial<GalleryPropsWithContext>;
|
|
492
|
-
|
|
493
436
|
/**
|
|
494
437
|
* UI component for card in attachments.
|
|
495
438
|
*/
|
|
@@ -497,8 +440,6 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
497
440
|
const {
|
|
498
441
|
alignment: propAlignment,
|
|
499
442
|
additionalPressableProps: propAdditionalPressableProps,
|
|
500
|
-
ImageLoadingFailedIndicator: PropImageLoadingFailedIndicator,
|
|
501
|
-
ImageLoadingIndicator: PropImageLoadingIndicator,
|
|
502
443
|
images: propImages,
|
|
503
444
|
message: propMessage,
|
|
504
445
|
myMessageTheme: propMyMessageTheme,
|
|
@@ -508,10 +449,8 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
508
449
|
preventPress: propPreventPress,
|
|
509
450
|
setOverlay: propSetOverlay,
|
|
510
451
|
videos: propVideos,
|
|
511
|
-
VideoThumbnail: PropVideoThumbnail,
|
|
512
452
|
messageContentOrder: propMessageContentOrder,
|
|
513
453
|
} = props;
|
|
514
|
-
|
|
515
454
|
const { imageGalleryStateStore } = useImageGalleryContext();
|
|
516
455
|
const {
|
|
517
456
|
alignment: contextAlignment,
|
|
@@ -526,13 +465,9 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
526
465
|
} = useMessageContext();
|
|
527
466
|
const {
|
|
528
467
|
additionalPressableProps: contextAdditionalPressableProps,
|
|
529
|
-
ImageLoadingFailedIndicator: ContextImageLoadingFailedIndicator,
|
|
530
|
-
ImageLoadingIndicator: ContextImageLoadingIndicator,
|
|
531
468
|
myMessageTheme: contextMyMessageTheme,
|
|
532
|
-
VideoThumbnail: ContextVideoThumnbnail,
|
|
533
469
|
} = useMessagesContext();
|
|
534
470
|
const { setOverlay: contextSetOverlay } = useOverlayContext();
|
|
535
|
-
|
|
536
471
|
const images = propImages ?? contextImages ?? [];
|
|
537
472
|
const videos = propVideos ?? contextVideos ?? [];
|
|
538
473
|
const imagesAndVideos = [...images, ...videos];
|
|
@@ -541,7 +476,6 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
541
476
|
if (!images.length && !videos.length) {
|
|
542
477
|
return null;
|
|
543
478
|
}
|
|
544
|
-
|
|
545
479
|
const additionalPressableProps = propAdditionalPressableProps || contextAdditionalPressableProps;
|
|
546
480
|
const onLongPress = propOnLongPress || contextOnLongPress;
|
|
547
481
|
const onPressIn = propOnPressIn || contextOnPressIn;
|
|
@@ -549,18 +483,12 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
549
483
|
const preventPress =
|
|
550
484
|
typeof propPreventPress === 'boolean' ? propPreventPress : contextPreventPress;
|
|
551
485
|
const setOverlay = propSetOverlay || contextSetOverlay;
|
|
552
|
-
const VideoThumbnail = PropVideoThumbnail || ContextVideoThumnbnail;
|
|
553
|
-
const ImageLoadingFailedIndicator =
|
|
554
|
-
PropImageLoadingFailedIndicator || ContextImageLoadingFailedIndicator;
|
|
555
|
-
const ImageLoadingIndicator = PropImageLoadingIndicator || ContextImageLoadingIndicator;
|
|
556
486
|
const myMessageTheme = propMyMessageTheme || contextMyMessageTheme;
|
|
557
487
|
const messageContentOrder = propMessageContentOrder || contextMessageContentOrder;
|
|
558
|
-
|
|
559
488
|
const messageHasOnlyOneMedia =
|
|
560
489
|
messageContentOrder?.length === 1 &&
|
|
561
490
|
messageContentOrder?.includes('gallery') &&
|
|
562
491
|
imagesAndVideos.length === 1;
|
|
563
|
-
|
|
564
492
|
return (
|
|
565
493
|
<MemoizedGallery
|
|
566
494
|
{...{
|
|
@@ -568,8 +496,6 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
568
496
|
alignment,
|
|
569
497
|
channelId: message?.cid,
|
|
570
498
|
imageGalleryStateStore,
|
|
571
|
-
ImageLoadingFailedIndicator,
|
|
572
|
-
ImageLoadingIndicator,
|
|
573
499
|
images,
|
|
574
500
|
message,
|
|
575
501
|
myMessageTheme,
|
|
@@ -579,14 +505,12 @@ export const Gallery = (props: GalleryProps) => {
|
|
|
579
505
|
preventPress,
|
|
580
506
|
setOverlay,
|
|
581
507
|
videos,
|
|
582
|
-
VideoThumbnail,
|
|
583
508
|
messageHasOnlyOneMedia,
|
|
584
509
|
messageContentOrder,
|
|
585
510
|
}}
|
|
586
511
|
/>
|
|
587
512
|
);
|
|
588
513
|
};
|
|
589
|
-
|
|
590
514
|
const useStyles = () => {
|
|
591
515
|
const {
|
|
592
516
|
theme: { semantics },
|
|
@@ -675,5 +599,4 @@ const useStyles = () => {
|
|
|
675
599
|
});
|
|
676
600
|
}, [semantics, isMyMessage]);
|
|
677
601
|
};
|
|
678
|
-
|
|
679
602
|
Gallery.displayName = 'Gallery{messageItemView{gallery}}';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Image, ImageProps, StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
|
|
5
5
|
|
|
6
6
|
import { getUrlWithoutParams, isLocalUrl, makeImageCompatibleUrl } from '../../utils/utils';
|
|
7
7
|
|
|
8
|
-
export type GalleryImageWithContextProps = GalleryImageProps &
|
|
9
|
-
|
|
8
|
+
export type GalleryImageWithContextProps = GalleryImageProps & {
|
|
9
|
+
ImageComponent?: React.ComponentType<ImageProps>;
|
|
10
|
+
};
|
|
10
11
|
|
|
11
12
|
export const GalleryImageWithContext = (props: GalleryImageWithContextProps) => {
|
|
12
13
|
const { ImageComponent = Image, uri, style, ...rest } = props;
|
|
@@ -48,7 +49,7 @@ export type GalleryImageProps = Omit<ImageProps, 'height' | 'source'> & {
|
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
export const GalleryImage = (props: GalleryImageProps) => {
|
|
51
|
-
const { ImageComponent } =
|
|
52
|
+
const { ImageComponent } = useComponentsContext();
|
|
52
53
|
|
|
53
54
|
return <MemoizedGalleryImage ImageComponent={ImageComponent} {...props} />;
|
|
54
55
|
};
|