stream-chat-react-native-core 5.0.0 → 5.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Attachment.js +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +1 -1
- package/lib/commonjs/components/Attachment/AudioAttachment.js +1 -1
- package/lib/commonjs/components/Attachment/Card.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js +1 -1
- package/lib/commonjs/components/Attachment/VideoThumbnail.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +1 -1
- package/lib/commonjs/components/Channel/Channel.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
- package/lib/commonjs/components/Chat/Chat.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +107 -101
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +15 -17
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +14 -17
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +7 -7
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/commonjs/components/Message/Message.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +1 -1
- package/lib/commonjs/components/MessageInput/CooldownTimer.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +50 -32
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js +1 -1
- package/lib/commonjs/components/MessageList/DateHeader.js +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +1 -1
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +7 -7
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/RTLComponents/WritingDirectionAwareText.js +1 -1
- package/lib/commonjs/components/Reply/Reply.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/Thread/Thread.js +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +1 -1
- package/lib/commonjs/icons/ArrowRight.js +1 -1
- package/lib/commonjs/icons/AtMentions.js +1 -1
- package/lib/commonjs/icons/Attach.js +1 -1
- package/lib/commonjs/icons/Audio.js +1 -1
- package/lib/commonjs/icons/CSV.js +1 -1
- package/lib/commonjs/icons/Camera.js +1 -1
- package/lib/commonjs/icons/Check.js +1 -1
- package/lib/commonjs/icons/CheckAll.js +1 -1
- package/lib/commonjs/icons/CheckSend.js +1 -1
- package/lib/commonjs/icons/CircleClose.js +1 -1
- package/lib/commonjs/icons/CirclePlus.js +1 -1
- package/lib/commonjs/icons/CircleRight.js +1 -1
- package/lib/commonjs/icons/Close.js +1 -1
- package/lib/commonjs/icons/Copy.js +1 -1
- package/lib/commonjs/icons/CurveLineLeftUp.js +1 -1
- package/lib/commonjs/icons/DOC.js +1 -1
- package/lib/commonjs/icons/DOCX.js +1 -1
- package/lib/commonjs/icons/Delete.js +1 -1
- package/lib/commonjs/icons/Down.js +1 -1
- package/lib/commonjs/icons/DownloadArrow.js +1 -1
- package/lib/commonjs/icons/DownloadCloud.js +1 -1
- package/lib/commonjs/icons/Edit.js +1 -1
- package/lib/commonjs/icons/Error.js +1 -1
- package/lib/commonjs/icons/Eye.js +1 -1
- package/lib/commonjs/icons/Flag.js +1 -1
- package/lib/commonjs/icons/Folder.js +1 -1
- package/lib/commonjs/icons/GenericFile.js +1 -1
- package/lib/commonjs/icons/GiphyIcon.js +1 -1
- package/lib/commonjs/icons/Grid.js +1 -1
- package/lib/commonjs/icons/Group.js +1 -1
- package/lib/commonjs/icons/HTML.js +1 -1
- package/lib/commonjs/icons/Imgur.js +1 -1
- package/lib/commonjs/icons/LOLReaction.js +1 -1
- package/lib/commonjs/icons/Lightning.js +1 -1
- package/lib/commonjs/icons/Link.js +1 -1
- package/lib/commonjs/icons/Loading.js +1 -1
- package/lib/commonjs/icons/Logo.js +1 -1
- package/lib/commonjs/icons/LoveReaction.js +1 -1
- package/lib/commonjs/icons/MD.js +1 -1
- package/lib/commonjs/icons/MailOpen.js +1 -1
- package/lib/commonjs/icons/MenuPointHorizontal.js +1 -1
- package/lib/commonjs/icons/MenuPointVertical.js +1 -1
- package/lib/commonjs/icons/MessageFlag.js +1 -1
- package/lib/commonjs/icons/MessageIcon.js +1 -1
- package/lib/commonjs/icons/Mute.js +1 -1
- package/lib/commonjs/icons/Notification.js +1 -1
- package/lib/commonjs/icons/ODT.js +1 -1
- package/lib/commonjs/icons/PDF.js +1 -1
- package/lib/commonjs/icons/PPT.js +1 -1
- package/lib/commonjs/icons/PPTX.js +1 -1
- package/lib/commonjs/icons/Pause.js +1 -1
- package/lib/commonjs/icons/Picture.js +1 -1
- package/lib/commonjs/icons/Pin.js +1 -1
- package/lib/commonjs/icons/PinHeader.js +1 -1
- package/lib/commonjs/icons/Play.js +1 -1
- package/lib/commonjs/icons/RAR.js +1 -1
- package/lib/commonjs/icons/RTF.js +1 -1
- package/lib/commonjs/icons/Recorder.js +1 -1
- package/lib/commonjs/icons/Refresh.js +1 -1
- package/lib/commonjs/icons/SEVEN_Z.js +1 -1
- package/lib/commonjs/icons/Search.js +1 -1
- package/lib/commonjs/icons/SendRight.js +1 -1
- package/lib/commonjs/icons/SendUp.js +1 -1
- package/lib/commonjs/icons/Share.js +1 -1
- package/lib/commonjs/icons/ShareRightArrow.js +1 -1
- package/lib/commonjs/icons/Smile.js +1 -1
- package/lib/commonjs/icons/Sound.js +1 -1
- package/lib/commonjs/icons/TAR.js +1 -1
- package/lib/commonjs/icons/TXT.js +1 -1
- package/lib/commonjs/icons/ThreadReply.js +1 -1
- package/lib/commonjs/icons/ThumbsDownReaction.js +1 -1
- package/lib/commonjs/icons/ThumbsUpReaction.js +1 -1
- package/lib/commonjs/icons/Time.js +1 -1
- package/lib/commonjs/icons/Unknown.js +1 -1
- package/lib/commonjs/icons/Unpin.js +1 -1
- package/lib/commonjs/icons/User.js +1 -1
- package/lib/commonjs/icons/UserAdd.js +1 -1
- package/lib/commonjs/icons/UserAdmin.js +1 -1
- package/lib/commonjs/icons/UserDelete.js +1 -1
- package/lib/commonjs/icons/UserMinus.js +1 -1
- package/lib/commonjs/icons/Video.js +1 -1
- package/lib/commonjs/icons/Warning.js +1 -1
- package/lib/commonjs/icons/WutReaction.js +1 -1
- package/lib/commonjs/icons/XLS.js +1 -1
- package/lib/commonjs/icons/XLSX.js +1 -1
- package/lib/commonjs/icons/ZIP.js +1 -1
- package/lib/commonjs/icons/utils/base.js +1 -1
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +1 -1
- package/lib/module/components/Attachment/AudioAttachment.js +1 -1
- package/lib/module/components/Attachment/Card.js +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/module/components/Attachment/FileIcon.js +1 -1
- package/lib/module/components/Attachment/Gallery.js +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +1 -1
- package/lib/module/components/Attachment/Giphy.js +1 -1
- package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js +1 -1
- package/lib/module/components/Attachment/ImageLoadingIndicator.js +1 -1
- package/lib/module/components/Attachment/VideoThumbnail.js +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +1 -1
- package/lib/module/components/Channel/Channel.js +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
- package/lib/module/components/Chat/Chat.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +107 -101
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +15 -17
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +14 -17
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +7 -7
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/module/components/Message/Message.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +1 -1
- package/lib/module/components/MessageInput/CooldownTimer.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +50 -32
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/module/components/MessageInput/SendButton.js +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js +1 -1
- package/lib/module/components/MessageInput/components/InputGiphySearch.js +1 -1
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js +1 -1
- package/lib/module/components/MessageList/DateHeader.js +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +1 -1
- package/lib/module/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js +7 -7
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/RTLComponents/WritingDirectionAwareText.js +1 -1
- package/lib/module/components/Reply/Reply.js +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/Thread/Thread.js +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +1 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +1 -1
- package/lib/module/icons/ArrowRight.js +1 -1
- package/lib/module/icons/AtMentions.js +1 -1
- package/lib/module/icons/Attach.js +1 -1
- package/lib/module/icons/Audio.js +1 -1
- package/lib/module/icons/CSV.js +1 -1
- package/lib/module/icons/Camera.js +1 -1
- package/lib/module/icons/Check.js +1 -1
- package/lib/module/icons/CheckAll.js +1 -1
- package/lib/module/icons/CheckSend.js +1 -1
- package/lib/module/icons/CircleClose.js +1 -1
- package/lib/module/icons/CirclePlus.js +1 -1
- package/lib/module/icons/CircleRight.js +1 -1
- package/lib/module/icons/Close.js +1 -1
- package/lib/module/icons/Copy.js +1 -1
- package/lib/module/icons/CurveLineLeftUp.js +1 -1
- package/lib/module/icons/DOC.js +1 -1
- package/lib/module/icons/DOCX.js +1 -1
- package/lib/module/icons/Delete.js +1 -1
- package/lib/module/icons/Down.js +1 -1
- package/lib/module/icons/DownloadArrow.js +1 -1
- package/lib/module/icons/DownloadCloud.js +1 -1
- package/lib/module/icons/Edit.js +1 -1
- package/lib/module/icons/Error.js +1 -1
- package/lib/module/icons/Eye.js +1 -1
- package/lib/module/icons/Flag.js +1 -1
- package/lib/module/icons/Folder.js +1 -1
- package/lib/module/icons/GenericFile.js +1 -1
- package/lib/module/icons/GiphyIcon.js +1 -1
- package/lib/module/icons/Grid.js +1 -1
- package/lib/module/icons/Group.js +1 -1
- package/lib/module/icons/HTML.js +1 -1
- package/lib/module/icons/Imgur.js +1 -1
- package/lib/module/icons/LOLReaction.js +1 -1
- package/lib/module/icons/Lightning.js +1 -1
- package/lib/module/icons/Link.js +1 -1
- package/lib/module/icons/Loading.js +1 -1
- package/lib/module/icons/Logo.js +1 -1
- package/lib/module/icons/LoveReaction.js +1 -1
- package/lib/module/icons/MD.js +1 -1
- package/lib/module/icons/MailOpen.js +1 -1
- package/lib/module/icons/MenuPointHorizontal.js +1 -1
- package/lib/module/icons/MenuPointVertical.js +1 -1
- package/lib/module/icons/MessageFlag.js +1 -1
- package/lib/module/icons/MessageIcon.js +1 -1
- package/lib/module/icons/Mute.js +1 -1
- package/lib/module/icons/Notification.js +1 -1
- package/lib/module/icons/ODT.js +1 -1
- package/lib/module/icons/PDF.js +1 -1
- package/lib/module/icons/PPT.js +1 -1
- package/lib/module/icons/PPTX.js +1 -1
- package/lib/module/icons/Pause.js +1 -1
- package/lib/module/icons/Picture.js +1 -1
- package/lib/module/icons/Pin.js +1 -1
- package/lib/module/icons/PinHeader.js +1 -1
- package/lib/module/icons/Play.js +1 -1
- package/lib/module/icons/RAR.js +1 -1
- package/lib/module/icons/RTF.js +1 -1
- package/lib/module/icons/Recorder.js +1 -1
- package/lib/module/icons/Refresh.js +1 -1
- package/lib/module/icons/SEVEN_Z.js +1 -1
- package/lib/module/icons/Search.js +1 -1
- package/lib/module/icons/SendRight.js +1 -1
- package/lib/module/icons/SendUp.js +1 -1
- package/lib/module/icons/Share.js +1 -1
- package/lib/module/icons/ShareRightArrow.js +1 -1
- package/lib/module/icons/Smile.js +1 -1
- package/lib/module/icons/Sound.js +1 -1
- package/lib/module/icons/TAR.js +1 -1
- package/lib/module/icons/TXT.js +1 -1
- package/lib/module/icons/ThreadReply.js +1 -1
- package/lib/module/icons/ThumbsDownReaction.js +1 -1
- package/lib/module/icons/ThumbsUpReaction.js +1 -1
- package/lib/module/icons/Time.js +1 -1
- package/lib/module/icons/Unknown.js +1 -1
- package/lib/module/icons/Unpin.js +1 -1
- package/lib/module/icons/User.js +1 -1
- package/lib/module/icons/UserAdd.js +1 -1
- package/lib/module/icons/UserAdmin.js +1 -1
- package/lib/module/icons/UserDelete.js +1 -1
- package/lib/module/icons/UserMinus.js +1 -1
- package/lib/module/icons/Video.js +1 -1
- package/lib/module/icons/Warning.js +1 -1
- package/lib/module/icons/WutReaction.js +1 -1
- package/lib/module/icons/XLS.js +1 -1
- package/lib/module/icons/XLSX.js +1 -1
- package/lib/module/icons/ZIP.js +1 -1
- package/lib/module/icons/utils/base.js +1 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +3 -0
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +5 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -3
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
- package/lib/typescript/native.d.ts +3 -2
- package/package.json +1 -1
- package/src/components/ImageGallery/ImageGallery.tsx +87 -65
- package/src/components/ImageGallery/__tests__/AnimatedVideoGallery.test.tsx +2 -2
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +40 -28
- package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +16 -9
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +1 -6
- package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +5 -6
- package/src/components/MessageInput/ImageUploadPreview.tsx +35 -9
- package/src/components/ProgressControl/ProgressControl.tsx +8 -4
- package/src/contexts/themeContext/utils/theme.ts +2 -0
- package/src/native.ts +3 -2
- package/src/version.json +1 -1
|
@@ -55,12 +55,7 @@ import {
|
|
|
55
55
|
useOverlayContext,
|
|
56
56
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
57
57
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
58
|
-
import {
|
|
59
|
-
isVideoPackageAvailable,
|
|
60
|
-
VideoPayloadData,
|
|
61
|
-
VideoProgressData,
|
|
62
|
-
VideoType,
|
|
63
|
-
} from '../../native';
|
|
58
|
+
import { isVideoPackageAvailable, VideoType } from '../../native';
|
|
64
59
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
65
60
|
import { getResizedImageUrl } from '../../utils/getResizedImageUrl';
|
|
66
61
|
import { getUrlOfImageAttachment } from '../../utils/getUrlOfImageAttachment';
|
|
@@ -151,9 +146,9 @@ export const ImageGallery = <
|
|
|
151
146
|
numberOfImageGalleryGridColumns,
|
|
152
147
|
overlayOpacity,
|
|
153
148
|
} = props;
|
|
154
|
-
const [
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
const [imageGalleryAttachments, setImageGalleryAttachments] = useState<
|
|
150
|
+
Photo<StreamChatGenerics>[]
|
|
151
|
+
>([]);
|
|
157
152
|
const {
|
|
158
153
|
theme: {
|
|
159
154
|
colors: { white_snow },
|
|
@@ -282,11 +277,14 @@ export const ImageGallery = <
|
|
|
282
277
|
return {
|
|
283
278
|
channelId: cur.cid,
|
|
284
279
|
created_at: cur.created_at,
|
|
280
|
+
duration: 0,
|
|
285
281
|
id: `photoId-${cur.id}-${imageUrl}`,
|
|
286
282
|
messageId: cur.id,
|
|
287
283
|
mime_type: a.type === 'giphy' ? getGiphyMimeType(giphyURL ?? '') : a.mime_type,
|
|
288
284
|
original_height: a.original_height,
|
|
289
285
|
original_width: a.original_width,
|
|
286
|
+
paused: true,
|
|
287
|
+
progress: 0,
|
|
290
288
|
type: a.type,
|
|
291
289
|
uri:
|
|
292
290
|
a.type === 'giphy'
|
|
@@ -312,6 +310,10 @@ export const ImageGallery = <
|
|
|
312
310
|
*/
|
|
313
311
|
const photoLength = photos.length;
|
|
314
312
|
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
setImageGalleryAttachments(photos);
|
|
315
|
+
}, []);
|
|
316
|
+
|
|
315
317
|
/**
|
|
316
318
|
* The URL for the images may differ because of dimensions passed as
|
|
317
319
|
* part of the query.
|
|
@@ -338,10 +340,6 @@ export const ImageGallery = <
|
|
|
338
340
|
stripQueryFromUrl(photo.uri) === stripQueryFromUrl(selectedMessage?.url || ''),
|
|
339
341
|
);
|
|
340
342
|
|
|
341
|
-
if (photoLength > 1) {
|
|
342
|
-
setPaused(true);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
343
|
runOnUI(updatePosition)(newIndex);
|
|
346
344
|
}, [selectedMessage, photoLength]);
|
|
347
345
|
|
|
@@ -351,10 +349,11 @@ export const ImageGallery = <
|
|
|
351
349
|
* to the proper scaled height based on the width being restricted to the
|
|
352
350
|
* screen width when the dimensions are received.
|
|
353
351
|
*/
|
|
354
|
-
const uriForCurrentImage =
|
|
352
|
+
const uriForCurrentImage = imageGalleryAttachments[selectedIndex]?.uri;
|
|
353
|
+
|
|
355
354
|
useEffect(() => {
|
|
356
355
|
setCurrentImageHeight(screenHeight);
|
|
357
|
-
const photo =
|
|
356
|
+
const photo = imageGalleryAttachments[index.value];
|
|
358
357
|
const height = photo?.original_height;
|
|
359
358
|
const width = photo?.original_width;
|
|
360
359
|
|
|
@@ -463,53 +462,69 @@ export const ImageGallery = <
|
|
|
463
462
|
const openGridView = () => {
|
|
464
463
|
if (bottomSheetModalRef.current?.present) {
|
|
465
464
|
bottomSheetModalRef.current.present();
|
|
466
|
-
setGridPhotos(
|
|
465
|
+
setGridPhotos(imageGalleryAttachments);
|
|
467
466
|
}
|
|
468
467
|
};
|
|
469
468
|
|
|
469
|
+
const handleEnd = () => {
|
|
470
|
+
handlePlayPause(imageGalleryAttachments[selectedIndex].id, true);
|
|
471
|
+
handleProgress(imageGalleryAttachments[selectedIndex].id, 1, true);
|
|
472
|
+
};
|
|
473
|
+
|
|
470
474
|
const videoRef = useRef<VideoType>(null);
|
|
471
475
|
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
|
|
476
|
+
const handleLoad = (index: string, duration: number) => {
|
|
477
|
+
setImageGalleryAttachments((prevImageGalleryAttachment) =>
|
|
478
|
+
prevImageGalleryAttachment.map((imageGalleryAttachment) => ({
|
|
479
|
+
...imageGalleryAttachment,
|
|
480
|
+
duration: imageGalleryAttachment.id === index ? duration : imageGalleryAttachment.duration,
|
|
481
|
+
})),
|
|
482
|
+
);
|
|
475
483
|
};
|
|
476
484
|
|
|
477
|
-
const
|
|
478
|
-
|
|
485
|
+
const handleProgress = (index: string, progress: number, hasEnd?: boolean) => {
|
|
486
|
+
setImageGalleryAttachments((prevImageGalleryAttachments) =>
|
|
487
|
+
prevImageGalleryAttachments.map((imageGalleryAttachment) => ({
|
|
488
|
+
...imageGalleryAttachment,
|
|
489
|
+
progress:
|
|
490
|
+
imageGalleryAttachment.id === index
|
|
491
|
+
? hasEnd
|
|
492
|
+
? 1
|
|
493
|
+
: progress
|
|
494
|
+
: imageGalleryAttachment.progress,
|
|
495
|
+
})),
|
|
496
|
+
);
|
|
479
497
|
};
|
|
480
498
|
|
|
481
|
-
const
|
|
482
|
-
if (
|
|
483
|
-
|
|
499
|
+
const handlePlayPause = (index: string, pausedStatus?: boolean) => {
|
|
500
|
+
if (pausedStatus === false) {
|
|
501
|
+
// If the status is false we set the audio with the index as playing and the others as paused.
|
|
502
|
+
setImageGalleryAttachments((prevImageGalleryAttachment) =>
|
|
503
|
+
prevImageGalleryAttachment.map((imageGalleryAttachment) => ({
|
|
504
|
+
...imageGalleryAttachment,
|
|
505
|
+
paused: imageGalleryAttachment.id === index ? false : true,
|
|
506
|
+
})),
|
|
507
|
+
);
|
|
508
|
+
} else {
|
|
509
|
+
// If the status is true we simply set all the audio's paused state as true.
|
|
510
|
+
setImageGalleryAttachments((prevImageGalleryAttachment) =>
|
|
511
|
+
prevImageGalleryAttachment.map((imageGalleryAttachment) => ({
|
|
512
|
+
...imageGalleryAttachment,
|
|
513
|
+
paused: true,
|
|
514
|
+
})),
|
|
515
|
+
);
|
|
484
516
|
}
|
|
485
517
|
};
|
|
486
518
|
|
|
487
|
-
const
|
|
519
|
+
const onPlayPause = (status?: boolean) => {
|
|
488
520
|
if (status === undefined) {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
// Expo AV for Expo has replayAsync as an API to move to a starting of the video
|
|
494
|
-
if (progress === 1 && videoRef.current && videoRef.current.replayAsync) {
|
|
495
|
-
videoRef.current.replayAsync();
|
|
521
|
+
if (imageGalleryAttachments[selectedIndex].paused) {
|
|
522
|
+
handlePlayPause(imageGalleryAttachments[selectedIndex].id, false);
|
|
523
|
+
} else {
|
|
524
|
+
handlePlayPause(imageGalleryAttachments[selectedIndex].id, true);
|
|
496
525
|
}
|
|
497
|
-
|
|
498
|
-
setPaused((state) => !state);
|
|
499
526
|
} else {
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
const onProgressDrag = (progress: number) => {
|
|
505
|
-
// React Native Video for RN CLI has seek as an API to move to a particular location in the video
|
|
506
|
-
if (videoRef.current && videoRef.current.seek) {
|
|
507
|
-
videoRef.current.seek(progress);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// Expo AV for Expo has setPositionAsync as an API to move to a particular location of the video
|
|
511
|
-
if (videoRef.current && videoRef.current.setPositionAsync) {
|
|
512
|
-
videoRef.current.setPositionAsync(progress * 1000);
|
|
527
|
+
handlePlayPause(imageGalleryAttachments[selectedIndex].id, status);
|
|
513
528
|
}
|
|
514
529
|
};
|
|
515
530
|
|
|
@@ -568,17 +583,19 @@ export const ImageGallery = <
|
|
|
568
583
|
},
|
|
569
584
|
]}
|
|
570
585
|
>
|
|
571
|
-
{
|
|
586
|
+
{imageGalleryAttachments.map((photo, i) =>
|
|
572
587
|
photo.type === 'video' ? (
|
|
573
588
|
<AnimatedGalleryVideo
|
|
589
|
+
attachmentId={photo.id}
|
|
574
590
|
handleEnd={handleEnd}
|
|
575
591
|
handleLoad={handleLoad}
|
|
576
592
|
handleProgress={handleProgress}
|
|
577
593
|
index={i}
|
|
578
594
|
key={`${photo.uri}-${i}`}
|
|
579
595
|
offsetScale={offsetScale}
|
|
580
|
-
paused={paused}
|
|
596
|
+
paused={photo.paused || false}
|
|
581
597
|
previous={selectedIndex > i}
|
|
598
|
+
repeat={true}
|
|
582
599
|
scale={scale}
|
|
583
600
|
screenHeight={screenHeight}
|
|
584
601
|
selected={selectedIndex === i}
|
|
@@ -632,25 +649,27 @@ export const ImageGallery = <
|
|
|
632
649
|
</TapGestureHandler>
|
|
633
650
|
<ImageGalleryHeader<StreamChatGenerics>
|
|
634
651
|
opacity={headerFooterOpacity}
|
|
635
|
-
photo={
|
|
652
|
+
photo={imageGalleryAttachments[selectedIndex]}
|
|
636
653
|
visible={headerFooterVisible}
|
|
637
654
|
{...imageGalleryCustomComponents?.header}
|
|
638
655
|
/>
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
656
|
+
|
|
657
|
+
{imageGalleryAttachments.length > 0 && (
|
|
658
|
+
<ImageGalleryFooter<StreamChatGenerics>
|
|
659
|
+
accessibilityLabel={'Image Gallery Footer'}
|
|
660
|
+
duration={imageGalleryAttachments[selectedIndex].duration || 0}
|
|
661
|
+
onPlayPause={onPlayPause}
|
|
662
|
+
opacity={headerFooterOpacity}
|
|
663
|
+
openGridView={openGridView}
|
|
664
|
+
paused={imageGalleryAttachments[selectedIndex].paused || false}
|
|
665
|
+
photo={imageGalleryAttachments[selectedIndex]}
|
|
666
|
+
photoLength={imageGalleryAttachments.length}
|
|
667
|
+
progress={imageGalleryAttachments[selectedIndex].progress || 0}
|
|
668
|
+
selectedIndex={selectedIndex}
|
|
669
|
+
visible={headerFooterVisible}
|
|
670
|
+
{...imageGalleryCustomComponents?.footer}
|
|
671
|
+
/>
|
|
672
|
+
)}
|
|
654
673
|
|
|
655
674
|
<ImageGalleryOverlay
|
|
656
675
|
animatedBottomSheetIndex={animatedBottomSheetIndex}
|
|
@@ -708,10 +727,13 @@ export type Photo<
|
|
|
708
727
|
uri: string;
|
|
709
728
|
channelId?: string;
|
|
710
729
|
created_at?: string | Date;
|
|
730
|
+
duration?: number;
|
|
711
731
|
messageId?: string;
|
|
712
732
|
mime_type?: string;
|
|
713
733
|
original_height?: number;
|
|
714
734
|
original_width?: number;
|
|
735
|
+
paused?: boolean;
|
|
736
|
+
progress?: number;
|
|
715
737
|
type?: string;
|
|
716
738
|
user?: UserResponse<StreamChatGenerics> | null;
|
|
717
739
|
user_id?: string;
|
|
@@ -78,7 +78,7 @@ describe('ImageGallery', () => {
|
|
|
78
78
|
|
|
79
79
|
act(() => {
|
|
80
80
|
fireEvent(videoComponent, 'onEnd');
|
|
81
|
-
fireEvent(videoComponent, 'onProgress');
|
|
81
|
+
fireEvent(videoComponent, 'onProgress', { currentTime: 10, seekableDuration: 60 });
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
expect(handleEndMock).toHaveBeenCalled();
|
|
@@ -127,7 +127,7 @@ describe('ImageGallery', () => {
|
|
|
127
127
|
const spinnerComponent = queryByA11yLabel('Spinner');
|
|
128
128
|
|
|
129
129
|
act(() => {
|
|
130
|
-
fireEvent(videoComponent, 'onLoad');
|
|
130
|
+
fireEvent(videoComponent, 'onLoad', { duration: 10 });
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
expect(handleLoadMock).toHaveBeenCalled();
|
|
@@ -64,22 +64,25 @@ describe('ImageGallery', () => {
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
it('handle handleLoad function when video item present and payload duration is available', () => {
|
|
67
|
+
const attachment = generateVideoAttachment({ type: 'video' });
|
|
68
|
+
const message = generateMessage({
|
|
69
|
+
attachments: [attachment],
|
|
70
|
+
});
|
|
67
71
|
const { getByA11yLabel } = render(
|
|
68
72
|
getComponent({
|
|
69
|
-
messages: [
|
|
70
|
-
generateMessage({
|
|
71
|
-
attachments: [generateVideoAttachment({ type: 'video' })],
|
|
72
|
-
}),
|
|
73
|
-
] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
73
|
+
messages: [message] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
74
74
|
}),
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
const videoItemComponent = getByA11yLabel('Image Gallery Video');
|
|
78
78
|
|
|
79
79
|
act(() => {
|
|
80
|
-
fireEvent(
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
fireEvent(
|
|
81
|
+
videoItemComponent,
|
|
82
|
+
'handleLoad',
|
|
83
|
+
`photoId-${message.id}-${attachment.asset_url}`,
|
|
84
|
+
10,
|
|
85
|
+
);
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
const videoDurationComponent = getByA11yLabel('Video Duration');
|
|
@@ -110,26 +113,32 @@ describe('ImageGallery', () => {
|
|
|
110
113
|
});
|
|
111
114
|
|
|
112
115
|
it('handle handleProgress function when video item present and payload is well defined', () => {
|
|
116
|
+
const attachment = generateVideoAttachment({ type: 'video' });
|
|
117
|
+
const message = generateMessage({
|
|
118
|
+
attachments: [attachment],
|
|
119
|
+
});
|
|
120
|
+
|
|
113
121
|
const { getByA11yLabel } = render(
|
|
114
122
|
getComponent({
|
|
115
|
-
messages: [
|
|
116
|
-
generateMessage({
|
|
117
|
-
attachments: [generateVideoAttachment({ type: 'video' })],
|
|
118
|
-
}),
|
|
119
|
-
] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
123
|
+
messages: [message] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
120
124
|
}),
|
|
121
125
|
);
|
|
122
126
|
|
|
123
127
|
const videoItemComponent = getByA11yLabel('Image Gallery Video');
|
|
124
128
|
|
|
125
129
|
act(() => {
|
|
126
|
-
fireEvent(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
fireEvent(
|
|
131
|
+
videoItemComponent,
|
|
132
|
+
'handleLoad',
|
|
133
|
+
`photoId-${message.id}-${attachment.asset_url}`,
|
|
134
|
+
10,
|
|
135
|
+
);
|
|
136
|
+
fireEvent(
|
|
137
|
+
videoItemComponent,
|
|
138
|
+
'handleProgress',
|
|
139
|
+
`photoId-${message.id}-${attachment.asset_url}`,
|
|
140
|
+
0.3,
|
|
141
|
+
);
|
|
133
142
|
});
|
|
134
143
|
|
|
135
144
|
const progressDurationComponent = getByA11yLabel('Progress Duration');
|
|
@@ -166,22 +175,25 @@ describe('ImageGallery', () => {
|
|
|
166
175
|
});
|
|
167
176
|
|
|
168
177
|
it('handle handleEnd function when video item present', () => {
|
|
178
|
+
const attachment = generateVideoAttachment({ type: 'video' });
|
|
179
|
+
const message = generateMessage({
|
|
180
|
+
attachments: [attachment],
|
|
181
|
+
});
|
|
169
182
|
const { getByA11yLabel } = render(
|
|
170
183
|
getComponent({
|
|
171
|
-
messages: [
|
|
172
|
-
generateMessage({
|
|
173
|
-
attachments: [generateVideoAttachment({ type: 'video' })],
|
|
174
|
-
}),
|
|
175
|
-
] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
184
|
+
messages: [message] as unknown as MessageType<DefaultStreamChatGenerics>[],
|
|
176
185
|
}),
|
|
177
186
|
);
|
|
178
187
|
|
|
179
188
|
const videoItemComponent = getByA11yLabel('Image Gallery Video');
|
|
180
189
|
|
|
181
190
|
act(() => {
|
|
182
|
-
fireEvent(
|
|
183
|
-
|
|
184
|
-
|
|
191
|
+
fireEvent(
|
|
192
|
+
videoItemComponent,
|
|
193
|
+
'handleLoad',
|
|
194
|
+
`photoId-${message.id}-${attachment.asset_url}`,
|
|
195
|
+
10,
|
|
196
|
+
);
|
|
185
197
|
fireEvent(videoItemComponent, 'handleEnd');
|
|
186
198
|
});
|
|
187
199
|
|
|
@@ -20,9 +20,10 @@ const halfScreenWidth = vw(50);
|
|
|
20
20
|
const oneEighth = 1 / 8;
|
|
21
21
|
|
|
22
22
|
export type AnimatedGalleryVideoType = {
|
|
23
|
+
attachmentId: string;
|
|
23
24
|
handleEnd: () => void;
|
|
24
|
-
handleLoad: (
|
|
25
|
-
handleProgress: (
|
|
25
|
+
handleLoad: (index: string, duration: number) => void;
|
|
26
|
+
handleProgress: (index: string, progress: number, hasEnd?: boolean) => void;
|
|
26
27
|
index: number;
|
|
27
28
|
offsetScale: Animated.SharedValue<number>;
|
|
28
29
|
paused: boolean;
|
|
@@ -35,6 +36,7 @@ export type AnimatedGalleryVideoType = {
|
|
|
35
36
|
translateX: Animated.SharedValue<number>;
|
|
36
37
|
translateY: Animated.SharedValue<number>;
|
|
37
38
|
videoRef: React.RefObject<VideoType>;
|
|
39
|
+
repeat?: boolean;
|
|
38
40
|
style?: StyleProp<ViewStyle>;
|
|
39
41
|
};
|
|
40
42
|
|
|
@@ -51,7 +53,9 @@ const styles = StyleSheet.create({
|
|
|
51
53
|
export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.memo(
|
|
52
54
|
(props) => {
|
|
53
55
|
const [opacity, setOpacity] = useState<number>(1);
|
|
56
|
+
|
|
54
57
|
const {
|
|
58
|
+
attachmentId,
|
|
55
59
|
handleEnd,
|
|
56
60
|
handleLoad,
|
|
57
61
|
handleProgress,
|
|
@@ -59,6 +63,7 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
59
63
|
offsetScale,
|
|
60
64
|
paused,
|
|
61
65
|
previous,
|
|
66
|
+
repeat,
|
|
62
67
|
scale,
|
|
63
68
|
screenHeight,
|
|
64
69
|
selected,
|
|
@@ -76,7 +81,7 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
76
81
|
|
|
77
82
|
const onLoad = (payload: VideoPayloadData) => {
|
|
78
83
|
setOpacity(0);
|
|
79
|
-
handleLoad(payload);
|
|
84
|
+
handleLoad(attachmentId, payload.duration);
|
|
80
85
|
};
|
|
81
86
|
|
|
82
87
|
const onEnd = () => {
|
|
@@ -84,7 +89,7 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
84
89
|
};
|
|
85
90
|
|
|
86
91
|
const onProgress = (data: VideoProgressData) => {
|
|
87
|
-
handleProgress(data);
|
|
92
|
+
handleProgress(attachmentId, data.currentTime / data.seekableDuration);
|
|
88
93
|
};
|
|
89
94
|
|
|
90
95
|
const onBuffer = ({ isBuffering }: { isBuffering: boolean }) => {
|
|
@@ -102,13 +107,13 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
102
107
|
} else {
|
|
103
108
|
// Update your UI for the loaded state
|
|
104
109
|
setOpacity(0);
|
|
105
|
-
handleLoad(
|
|
110
|
+
handleLoad(attachmentId, playbackStatus.durationMillis / 1000);
|
|
106
111
|
if (playbackStatus.isPlaying) {
|
|
107
112
|
// Update your UI for the playing state
|
|
108
|
-
handleProgress(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
handleProgress(
|
|
114
|
+
attachmentId,
|
|
115
|
+
playbackStatus.positionMillis / 1000 / (playbackStatus.durationMillis / 1000),
|
|
116
|
+
);
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
if (playbackStatus.isBuffering) {
|
|
@@ -189,6 +194,7 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
189
194
|
onPlaybackStatusUpdate={onPlayBackStatusUpdate}
|
|
190
195
|
onProgress={onProgress}
|
|
191
196
|
paused={paused}
|
|
197
|
+
repeat={repeat}
|
|
192
198
|
resizeMode='contain'
|
|
193
199
|
style={style}
|
|
194
200
|
testID='video-player'
|
|
@@ -219,6 +225,7 @@ export const AnimatedGalleryVideo: React.FC<AnimatedGalleryVideoType> = React.me
|
|
|
219
225
|
(prevProps, nextProps) => {
|
|
220
226
|
if (
|
|
221
227
|
prevProps.paused === nextProps.paused &&
|
|
228
|
+
prevProps.repeat === nextProps.repeat &&
|
|
222
229
|
prevProps.shouldRender === nextProps.shouldRender &&
|
|
223
230
|
prevProps.source.uri === nextProps.source.uri &&
|
|
224
231
|
prevProps.screenHeight === nextProps.screenHeight &&
|
|
@@ -65,7 +65,6 @@ export type ImageGalleryFooterCustomComponent<
|
|
|
65
65
|
export type ImageGalleryFooterVideoControlProps = {
|
|
66
66
|
duration: number;
|
|
67
67
|
onPlayPause: (status?: boolean) => void;
|
|
68
|
-
onProgressDrag: (progress: number) => void;
|
|
69
68
|
paused: boolean;
|
|
70
69
|
progress: number;
|
|
71
70
|
};
|
|
@@ -73,7 +72,6 @@ export type ImageGalleryFooterVideoControlProps = {
|
|
|
73
72
|
export type ImageGalleryFooterVideoControlComponent = ({
|
|
74
73
|
duration,
|
|
75
74
|
onPlayPause,
|
|
76
|
-
onProgressDrag,
|
|
77
75
|
paused,
|
|
78
76
|
progress,
|
|
79
77
|
}: ImageGalleryFooterVideoControlProps) => React.ReactElement | null;
|
|
@@ -95,7 +93,6 @@ type ImageGalleryFooterPropsWithContext<
|
|
|
95
93
|
accessibilityLabel: string;
|
|
96
94
|
duration: number;
|
|
97
95
|
onPlayPause: () => void;
|
|
98
|
-
onProgressDrag: (progress: number) => void;
|
|
99
96
|
opacity: Animated.SharedValue<number>;
|
|
100
97
|
openGridView: () => void;
|
|
101
98
|
paused: boolean;
|
|
@@ -118,7 +115,6 @@ export const ImageGalleryFooterWithContext = <
|
|
|
118
115
|
GridIcon,
|
|
119
116
|
leftElement,
|
|
120
117
|
onPlayPause,
|
|
121
|
-
onProgressDrag,
|
|
122
118
|
opacity,
|
|
123
119
|
openGridView,
|
|
124
120
|
paused,
|
|
@@ -192,12 +188,11 @@ export const ImageGalleryFooterWithContext = <
|
|
|
192
188
|
<ReanimatedSafeAreaView style={[container, footerStyle, { backgroundColor: white }]}>
|
|
193
189
|
{photo.type === 'video' ? (
|
|
194
190
|
videoControlElement ? (
|
|
195
|
-
videoControlElement({ duration, onPlayPause,
|
|
191
|
+
videoControlElement({ duration, onPlayPause, paused, progress })
|
|
196
192
|
) : (
|
|
197
193
|
<ImageGalleryVideoControl
|
|
198
194
|
duration={duration}
|
|
199
195
|
onPlayPause={onPlayPause}
|
|
200
|
-
onProgressDrag={onProgressDrag}
|
|
201
196
|
paused={paused}
|
|
202
197
|
progress={progress}
|
|
203
198
|
/>
|
|
@@ -35,7 +35,7 @@ const styles = StyleSheet.create({
|
|
|
35
35
|
|
|
36
36
|
export const ImageGalleryVideoControl: React.FC<ImageGalleryFooterVideoControlProps> = React.memo(
|
|
37
37
|
(props) => {
|
|
38
|
-
const { duration, onPlayPause,
|
|
38
|
+
const { duration, onPlayPause, paused, progress } = props;
|
|
39
39
|
|
|
40
40
|
const videoDuration = duration
|
|
41
41
|
? duration / 3600 >= 1
|
|
@@ -53,7 +53,7 @@ export const ImageGalleryVideoControl: React.FC<ImageGalleryFooterVideoControlPr
|
|
|
53
53
|
|
|
54
54
|
const {
|
|
55
55
|
theme: {
|
|
56
|
-
colors: { static_black, static_white },
|
|
56
|
+
colors: { accent_blue, black, static_black, static_white },
|
|
57
57
|
imageGallery: {
|
|
58
58
|
videoControl: { durationTextStyle, roundedView, videoContainer },
|
|
59
59
|
},
|
|
@@ -83,22 +83,21 @@ export const ImageGalleryVideoControl: React.FC<ImageGalleryFooterVideoControlPr
|
|
|
83
83
|
</TouchableOpacity>
|
|
84
84
|
<Text
|
|
85
85
|
accessibilityLabel='Progress Duration'
|
|
86
|
-
style={[styles.durationTextStyle, durationTextStyle, { color:
|
|
86
|
+
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
|
|
87
87
|
>
|
|
88
88
|
{progressDuration ? progressDuration : '00:00'}
|
|
89
89
|
</Text>
|
|
90
90
|
<ProgressControl
|
|
91
91
|
duration={duration}
|
|
92
|
-
filledColor={
|
|
92
|
+
filledColor={accent_blue}
|
|
93
93
|
onPlayPause={onPlayPause}
|
|
94
|
-
onProgressDrag={onProgressDrag}
|
|
95
94
|
progress={progress}
|
|
96
95
|
testID={'progress-control'}
|
|
97
96
|
width={180}
|
|
98
97
|
/>
|
|
99
98
|
<Text
|
|
100
99
|
accessibilityLabel='Video Duration'
|
|
101
|
-
style={[styles.durationTextStyle, durationTextStyle, { color:
|
|
100
|
+
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
|
|
102
101
|
>
|
|
103
102
|
{videoDuration ? videoDuration : '00:00'}
|
|
104
103
|
</Text>
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
FlatList,
|
|
4
|
+
Image,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
TouchableOpacity,
|
|
8
|
+
TouchableOpacityProps,
|
|
9
|
+
View,
|
|
10
|
+
} from 'react-native';
|
|
3
11
|
|
|
4
12
|
import { UploadProgressIndicator } from './UploadProgressIndicator';
|
|
5
13
|
|
|
@@ -87,9 +95,8 @@ const ImageUploadPreviewWithContext = <
|
|
|
87
95
|
|
|
88
96
|
const {
|
|
89
97
|
theme: {
|
|
90
|
-
colors: { overlay, white },
|
|
91
98
|
messageInput: {
|
|
92
|
-
imageUploadPreview: {
|
|
99
|
+
imageUploadPreview: { flatList, itemContainer, upload },
|
|
93
100
|
},
|
|
94
101
|
},
|
|
95
102
|
} = useTheme();
|
|
@@ -140,15 +147,11 @@ const ImageUploadPreviewWithContext = <
|
|
|
140
147
|
style={[styles.upload, upload]}
|
|
141
148
|
/>
|
|
142
149
|
</UploadProgressIndicator>
|
|
143
|
-
<
|
|
150
|
+
<DismissUpload
|
|
144
151
|
onPress={() => {
|
|
145
152
|
removeImage(item.id);
|
|
146
153
|
}}
|
|
147
|
-
|
|
148
|
-
testID='remove-image-upload-preview'
|
|
149
|
-
>
|
|
150
|
-
<Close pathFill={white} />
|
|
151
|
-
</TouchableOpacity>
|
|
154
|
+
/>
|
|
152
155
|
<UnsupportedImageTypeIndicator indicatorType={indicatorType} />
|
|
153
156
|
</View>
|
|
154
157
|
);
|
|
@@ -170,6 +173,29 @@ const ImageUploadPreviewWithContext = <
|
|
|
170
173
|
) : null;
|
|
171
174
|
};
|
|
172
175
|
|
|
176
|
+
type DismissUploadProps = Pick<TouchableOpacityProps, 'onPress'>;
|
|
177
|
+
|
|
178
|
+
const DismissUpload = ({ onPress }: DismissUploadProps) => {
|
|
179
|
+
const {
|
|
180
|
+
theme: {
|
|
181
|
+
colors: { overlay, white },
|
|
182
|
+
messageInput: {
|
|
183
|
+
imageUploadPreview: { dismiss, dismissIconColor },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
} = useTheme();
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<TouchableOpacity
|
|
190
|
+
onPress={onPress}
|
|
191
|
+
style={[styles.dismiss, { backgroundColor: overlay }, dismiss]}
|
|
192
|
+
testID='remove-image-upload-preview'
|
|
193
|
+
>
|
|
194
|
+
<Close pathFill={dismissIconColor || white} />
|
|
195
|
+
</TouchableOpacity>
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
|
|
173
199
|
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
174
200
|
prevProps: ImageUploadPreviewPropsWithContext<StreamChatGenerics>,
|
|
175
201
|
nextProps: ImageUploadPreviewPropsWithContext<StreamChatGenerics>,
|
|
@@ -15,10 +15,10 @@ export type ProgressControlProps = {
|
|
|
15
15
|
duration: number;
|
|
16
16
|
filledColor: string;
|
|
17
17
|
onPlayPause: (status?: boolean) => void;
|
|
18
|
-
onProgressDrag: (progress: number) => void;
|
|
19
18
|
progress: number;
|
|
20
19
|
testID: string;
|
|
21
20
|
width: number;
|
|
21
|
+
onProgressDrag?: (progress: number) => void;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const height = 2;
|
|
@@ -94,7 +94,7 @@ export const ProgressControl: React.FC<ProgressControlProps> = React.memo(
|
|
|
94
94
|
onFinish: () => {
|
|
95
95
|
translateX.value = state.value;
|
|
96
96
|
const dragFinishLocationInSeconds = (state.value / width) * duration;
|
|
97
|
-
runOnJS(onProgressDrag)(dragFinishLocationInSeconds);
|
|
97
|
+
if (onProgressDrag) runOnJS(onProgressDrag)(dragFinishLocationInSeconds);
|
|
98
98
|
runOnJS(onPlayPause)(false);
|
|
99
99
|
},
|
|
100
100
|
onStart: () => {
|
|
@@ -109,9 +109,13 @@ export const ProgressControl: React.FC<ProgressControlProps> = React.memo(
|
|
|
109
109
|
<View style={[styles.containerStyle, { backgroundColor: grey_dark, width }]}>
|
|
110
110
|
<Animated.View style={[styles.innerStyle, animatedStyles]} />
|
|
111
111
|
|
|
112
|
-
<PanGestureHandler
|
|
112
|
+
<PanGestureHandler
|
|
113
|
+
maxPointers={1}
|
|
114
|
+
onGestureEvent={onProgressDrag ? onGestureEvent : undefined}
|
|
115
|
+
testID={testID}
|
|
116
|
+
>
|
|
113
117
|
<Animated.View style={[thumbStyles]}>
|
|
114
|
-
<ProgressControlThumb />
|
|
118
|
+
{onProgressDrag && <ProgressControlThumb />}
|
|
115
119
|
</Animated.View>
|
|
116
120
|
</PanGestureHandler>
|
|
117
121
|
</View>
|