stream-chat-react-native-core 4.0.0-beta.5 → 4.0.0-beta.8
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/README.md +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js +10 -10
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +4 -4
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +15 -15
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +8 -8
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +23 -23
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +13 -13
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +2 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +8 -4
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +6 -6
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +6 -6
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +34 -34
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +5 -5
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +26 -26
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +6 -6
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +8 -8
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +4 -4
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/data.js +44 -44
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -4
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +21 -10
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +10 -10
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +4 -4
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +15 -15
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +8 -8
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +8 -8
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +23 -23
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +13 -13
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +2 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +8 -4
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Message/Message.js +6 -6
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +3 -3
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +3 -3
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +6 -6
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +34 -34
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +5 -5
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +26 -26
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +6 -6
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +3 -3
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +8 -8
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +4 -4
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/data.js +44 -44
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -4
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -2
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/init.js +13 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +21 -10
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +4 -4
- package/lib/typescript/components/Attachment/Card.d.ts +4 -4
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +5 -5
- package/lib/typescript/components/Attachment/Giphy.d.ts +6 -6
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +2 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +3 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +5 -5
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +9 -9
- package/lib/typescript/components/Channel/Channel.d.ts +7 -7
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +14 -14
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -7
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +9 -9
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/Message/Message.d.ts +11 -11
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +4 -4
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
- package/lib/typescript/components/Message/utils/messageActions.d.ts +5 -5
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +7 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +4 -4
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +5 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +4 -3
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +4 -4
- package/lib/typescript/components/Thread/Thread.d.ts +7 -7
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +12 -12
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +18 -18
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +33 -33
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +21 -21
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +57 -57
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +4 -4
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +20 -20
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/icons/UserAdmin.d.ts +3 -0
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +4 -4
- package/lib/typescript/utils/getResizedImageUrl.d.ts +2 -1
- package/lib/typescript/utils/utils.d.ts +21 -21
- package/package.json +3 -5
- package/src/components/Attachment/Attachment.tsx +15 -56
- package/src/components/Attachment/AttachmentActions.tsx +15 -55
- package/src/components/Attachment/Card.tsx +15 -48
- package/src/components/Attachment/FileAttachment.tsx +14 -48
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/Gallery.tsx +18 -59
- package/src/components/Attachment/Giphy.tsx +18 -59
- package/src/components/Attachment/__tests__/buildGallery.test.js +4 -4
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +6 -10
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -5
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -3
- package/src/components/Attachment/utils/getAspectRatio.ts +4 -4
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +21 -61
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +5 -3
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +12 -19
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +14 -21
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +21 -24
- package/src/components/Channel/Channel.tsx +174 -257
- package/src/components/Channel/hooks/useCreateChannelContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +52 -68
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +3 -18
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +28 -49
- package/src/components/ChannelList/ChannelListMessenger.tsx +19 -70
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +3 -18
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +11 -33
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +9 -31
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +4 -19
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +11 -29
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreview.tsx +18 -51
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +11 -21
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +13 -46
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +6 -27
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -26
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +7 -28
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +6 -27
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +7 -28
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +27 -78
- package/src/components/Chat/Chat.tsx +15 -40
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +4 -19
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +30 -40
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
- package/src/components/Message/Message.tsx +40 -93
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageContent.tsx +18 -61
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +17 -58
- package/src/components/Message/MessageSimple/MessageFooter.tsx +18 -60
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageReplies.tsx +15 -56
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +5 -26
- package/src/components/Message/MessageSimple/MessageSimple.tsx +16 -57
- package/src/components/Message/MessageSimple/MessageStatus.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +19 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +16 -57
- package/src/components/Message/MessageSimple/utils/renderText.tsx +6 -27
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -19
- package/src/components/Message/hooks/useMessageActionHandlers.ts +8 -23
- package/src/components/Message/hooks/useMessageActions.tsx +8 -23
- package/src/components/Message/utils/messageActions.ts +7 -34
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +13 -54
- package/src/components/MessageInput/CommandsButton.tsx +15 -56
- package/src/components/MessageInput/FileUploadPreview.tsx +15 -57
- package/src/components/MessageInput/ImageUploadPreview.tsx +13 -55
- package/src/components/MessageInput/InputButtons.tsx +13 -54
- package/src/components/MessageInput/MessageInput.tsx +25 -66
- package/src/components/MessageInput/MoreOptionsButton.tsx +13 -54
- package/src/components/MessageInput/SendButton.tsx +13 -54
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +4 -19
- package/src/components/MessageInput/hooks/useCooldown.ts +5 -19
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +34 -76
- package/src/components/MessageList/MessageSystem.tsx +5 -26
- package/src/components/MessageList/TypingIndicator.tsx +3 -18
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/hooks/useMessageList.ts +19 -52
- package/src/components/MessageList/hooks/useTypingString.ts +5 -20
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +6 -27
- package/src/components/MessageList/utils/getGroupStyles.ts +6 -27
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -18
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +15 -56
- package/src/components/MessageOverlay/MessageActionListItem.tsx +20 -9
- package/src/components/MessageOverlay/MessageOverlay.tsx +38 -81
- package/src/components/MessageOverlay/OverlayReactionList.tsx +21 -74
- package/src/components/MessageOverlay/OverlayReactions.tsx +3 -18
- package/src/components/Reply/Reply.tsx +22 -69
- package/src/components/Thread/Thread.tsx +20 -53
- package/src/components/Thread/components/ThreadFooterComponent.tsx +12 -47
- package/src/components/docs/data.js +38 -37
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +9 -7
- package/src/contexts/channelContext/ChannelContext.tsx +15 -48
- package/src/contexts/channelsContext/ChannelsContext.tsx +22 -59
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +38 -115
- package/src/contexts/channelsStateContext/useChannelState.ts +27 -60
- package/src/contexts/chatContext/ChatContext.tsx +14 -49
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +12 -54
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -7
- package/src/contexts/messageContext/MessageContext.tsx +15 -48
- package/src/contexts/messageInputContext/MessageInputContext.tsx +61 -112
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +5 -20
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +7 -31
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +24 -71
- package/src/contexts/messagesContext/MessagesContext.tsx +60 -99
- package/src/contexts/overlayContext/OverlayContext.tsx +18 -26
- package/src/contexts/overlayContext/OverlayProvider.tsx +7 -22
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +13 -53
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +39 -40
- package/src/contexts/threadContext/ThreadContext.tsx +13 -46
- package/src/contexts/translationContext/TranslationContext.tsx +12 -7
- package/src/contexts/typingContext/TypingContext.tsx +11 -44
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/init.ts +5 -0
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/__tests__/getResizedImageUrl.test.js +57 -0
- package/src/utils/getResizedImageUrl.ts +33 -17
- package/src/utils/utils.ts +63 -128
- package/src/version.json +1 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
- package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
- package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
- package/lib/commonjs/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/BottomSheet.js +0 -25
- package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/module/styleguideComponents/JsDoc.js +0 -87
- package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/module/styleguideComponents/Markdown.js +0 -12
- package/lib/module/styleguideComponents/Markdown.js.map +0 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/Reanimated.js +0 -2
- package/lib/module/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/module/styleguideComponents/Wrapper.js +0 -29
- package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -60
- package/src/styleguideComponents/BottomSheet.tsx +0 -3
- package/src/styleguideComponents/JsDoc.tsx +0 -45
- package/src/styleguideComponents/Markdown.tsx +0 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +0 -45
- package/src/styleguideComponents/PropsRenderer.tsx +0 -141
- package/src/styleguideComponents/Reanimated.tsx +0 -0
- package/src/styleguideComponents/Wrapper.tsx +0 -7
- package/src/styleguideComponents/register-react-native-web.js +0 -13
- package/src/styleguideComponents/resolveAssetSource.js +0 -2
|
@@ -23,16 +23,7 @@ import {
|
|
|
23
23
|
useMessagesContext,
|
|
24
24
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
25
25
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
26
|
-
import type {
|
|
27
|
-
DefaultAttachmentType,
|
|
28
|
-
DefaultChannelType,
|
|
29
|
-
DefaultCommandType,
|
|
30
|
-
DefaultEventType,
|
|
31
|
-
DefaultMessageType,
|
|
32
|
-
DefaultReactionType,
|
|
33
|
-
DefaultUserType,
|
|
34
|
-
UnknownType,
|
|
35
|
-
} from '../../types/types';
|
|
26
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
36
27
|
import { makeImageCompatibleUrl } from '../../utils/utils';
|
|
37
28
|
|
|
38
29
|
const styles = StyleSheet.create({
|
|
@@ -88,20 +79,14 @@ const goToURL = (url?: string) => {
|
|
|
88
79
|
};
|
|
89
80
|
|
|
90
81
|
export type CardPropsWithContext<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Co extends string = DefaultCommandType,
|
|
94
|
-
Ev extends UnknownType = DefaultEventType,
|
|
95
|
-
Me extends UnknownType = DefaultMessageType,
|
|
96
|
-
Re extends UnknownType = DefaultReactionType,
|
|
97
|
-
Us extends UnknownType = DefaultUserType,
|
|
98
|
-
> = Attachment<At> &
|
|
82
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
83
|
+
> = Attachment<StreamChatGenerics> &
|
|
99
84
|
Pick<
|
|
100
|
-
MessageContextValue<
|
|
85
|
+
MessageContextValue<StreamChatGenerics>,
|
|
101
86
|
'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
|
|
102
87
|
> &
|
|
103
88
|
Pick<
|
|
104
|
-
MessagesContextValue<
|
|
89
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
105
90
|
'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'
|
|
106
91
|
> & {
|
|
107
92
|
channelId: string | undefined;
|
|
@@ -121,15 +106,9 @@ export type CardPropsWithContext<
|
|
|
121
106
|
};
|
|
122
107
|
|
|
123
108
|
const CardWithContext = <
|
|
124
|
-
|
|
125
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
126
|
-
Co extends string = DefaultCommandType,
|
|
127
|
-
Ev extends UnknownType = DefaultEventType,
|
|
128
|
-
Me extends UnknownType = DefaultMessageType,
|
|
129
|
-
Re extends UnknownType = DefaultReactionType,
|
|
130
|
-
Us extends UnknownType = DefaultUserType,
|
|
109
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
131
110
|
>(
|
|
132
|
-
props: CardPropsWithContext<
|
|
111
|
+
props: CardPropsWithContext<StreamChatGenerics>,
|
|
133
112
|
) => {
|
|
134
113
|
const {
|
|
135
114
|
additionalTouchableProps,
|
|
@@ -289,18 +268,12 @@ const CardWithContext = <
|
|
|
289
268
|
const MemoizedCard = React.memo(CardWithContext, () => true) as typeof CardWithContext;
|
|
290
269
|
|
|
291
270
|
export type CardProps<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
Co extends string = DefaultCommandType,
|
|
295
|
-
Ev extends UnknownType = DefaultEventType,
|
|
296
|
-
Me extends UnknownType = DefaultMessageType,
|
|
297
|
-
Re extends UnknownType = DefaultReactionType,
|
|
298
|
-
Us extends UnknownType = DefaultUserType,
|
|
299
|
-
> = Attachment<At> &
|
|
271
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
272
|
+
> = Attachment<StreamChatGenerics> &
|
|
300
273
|
Partial<
|
|
301
|
-
Pick<MessageContextValue<
|
|
274
|
+
Pick<MessageContextValue<StreamChatGenerics>, 'onLongPress' | 'onPress' | 'onPressIn'> &
|
|
302
275
|
Pick<
|
|
303
|
-
MessagesContextValue<
|
|
276
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
304
277
|
'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'
|
|
305
278
|
>
|
|
306
279
|
>;
|
|
@@ -309,20 +282,14 @@ export type CardProps<
|
|
|
309
282
|
* UI component for card in attachments.
|
|
310
283
|
*/
|
|
311
284
|
export const Card = <
|
|
312
|
-
|
|
313
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
314
|
-
Co extends string = DefaultCommandType,
|
|
315
|
-
Ev extends UnknownType = DefaultEventType,
|
|
316
|
-
Me extends UnknownType = DefaultMessageType,
|
|
317
|
-
Re extends UnknownType = DefaultReactionType,
|
|
318
|
-
Us extends UnknownType = DefaultUserType,
|
|
285
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
319
286
|
>(
|
|
320
|
-
props: CardProps<
|
|
287
|
+
props: CardProps<StreamChatGenerics>,
|
|
321
288
|
) => {
|
|
322
289
|
const { message, onLongPress, onPress, onPressIn, preventPress } =
|
|
323
|
-
useMessageContext<
|
|
290
|
+
useMessageContext<StreamChatGenerics>();
|
|
324
291
|
const { additionalTouchableProps, CardCover, CardFooter, CardHeader } =
|
|
325
|
-
useMessagesContext<
|
|
292
|
+
useMessagesContext<StreamChatGenerics>();
|
|
326
293
|
|
|
327
294
|
return (
|
|
328
295
|
<MemoizedCard
|
|
@@ -23,16 +23,7 @@ import {
|
|
|
23
23
|
useMessagesContext,
|
|
24
24
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
25
25
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
26
|
-
import type {
|
|
27
|
-
DefaultAttachmentType,
|
|
28
|
-
DefaultChannelType,
|
|
29
|
-
DefaultCommandType,
|
|
30
|
-
DefaultEventType,
|
|
31
|
-
DefaultMessageType,
|
|
32
|
-
DefaultReactionType,
|
|
33
|
-
DefaultUserType,
|
|
34
|
-
UnknownType,
|
|
35
|
-
} from '../../types/types';
|
|
26
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
36
27
|
import { vw } from '../../utils/utils';
|
|
37
28
|
|
|
38
29
|
const styles = StyleSheet.create({
|
|
@@ -56,23 +47,17 @@ const styles = StyleSheet.create({
|
|
|
56
47
|
});
|
|
57
48
|
|
|
58
49
|
export type FileAttachmentPropsWithContext<
|
|
59
|
-
|
|
60
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
61
|
-
Co extends string = DefaultCommandType,
|
|
62
|
-
Ev extends UnknownType = DefaultEventType,
|
|
63
|
-
Me extends UnknownType = DefaultMessageType,
|
|
64
|
-
Re extends UnknownType = DefaultReactionType,
|
|
65
|
-
Us extends UnknownType = DefaultUserType,
|
|
50
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
66
51
|
> = Pick<
|
|
67
|
-
MessageContextValue<
|
|
52
|
+
MessageContextValue<StreamChatGenerics>,
|
|
68
53
|
'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
|
|
69
54
|
> &
|
|
70
55
|
Pick<
|
|
71
|
-
MessagesContextValue<
|
|
56
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
72
57
|
'additionalTouchableProps' | 'AttachmentActions' | 'FileAttachmentIcon'
|
|
73
58
|
> & {
|
|
74
59
|
/** The attachment to render */
|
|
75
|
-
attachment: Attachment<
|
|
60
|
+
attachment: Attachment<StreamChatGenerics>;
|
|
76
61
|
attachmentSize?: number;
|
|
77
62
|
styles?: Partial<{
|
|
78
63
|
container: StyleProp<ViewStyle>;
|
|
@@ -83,15 +68,9 @@ export type FileAttachmentPropsWithContext<
|
|
|
83
68
|
};
|
|
84
69
|
|
|
85
70
|
const FileAttachmentWithContext = <
|
|
86
|
-
|
|
87
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
88
|
-
Co extends string = DefaultCommandType,
|
|
89
|
-
Ev extends UnknownType = DefaultEventType,
|
|
90
|
-
Me extends UnknownType = DefaultMessageType,
|
|
91
|
-
Re extends UnknownType = DefaultReactionType,
|
|
92
|
-
Us extends UnknownType = DefaultUserType,
|
|
71
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
93
72
|
>(
|
|
94
|
-
props: FileAttachmentPropsWithContext<
|
|
73
|
+
props: FileAttachmentPropsWithContext<StreamChatGenerics>,
|
|
95
74
|
) => {
|
|
96
75
|
const {
|
|
97
76
|
additionalTouchableProps,
|
|
@@ -166,34 +145,21 @@ const FileAttachmentWithContext = <
|
|
|
166
145
|
};
|
|
167
146
|
|
|
168
147
|
export type FileAttachmentProps<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
Ev extends UnknownType = DefaultEventType,
|
|
173
|
-
Me extends UnknownType = DefaultMessageType,
|
|
174
|
-
Re extends UnknownType = DefaultReactionType,
|
|
175
|
-
Us extends UnknownType = DefaultUserType,
|
|
176
|
-
> = Partial<Omit<FileAttachmentPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'attachment'>> &
|
|
177
|
-
Pick<FileAttachmentPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'attachment'>;
|
|
148
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
149
|
+
> = Partial<Omit<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>> &
|
|
150
|
+
Pick<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>;
|
|
178
151
|
|
|
179
152
|
export const FileAttachment = <
|
|
180
|
-
|
|
181
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
182
|
-
Co extends string = DefaultCommandType,
|
|
183
|
-
Ev extends UnknownType = DefaultEventType,
|
|
184
|
-
Me extends UnknownType = DefaultMessageType,
|
|
185
|
-
Re extends UnknownType = DefaultReactionType,
|
|
186
|
-
Us extends UnknownType = DefaultUserType,
|
|
153
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
187
154
|
>(
|
|
188
|
-
props: FileAttachmentProps<
|
|
155
|
+
props: FileAttachmentProps<StreamChatGenerics>,
|
|
189
156
|
) => {
|
|
190
|
-
const { onLongPress, onPress, onPressIn, preventPress } =
|
|
191
|
-
useMessageContext<At, Ch, Co, Ev, Me, Re, Us>();
|
|
157
|
+
const { onLongPress, onPress, onPressIn, preventPress } = useMessageContext<StreamChatGenerics>();
|
|
192
158
|
const {
|
|
193
159
|
additionalTouchableProps,
|
|
194
160
|
AttachmentActions = AttachmentActionsDefault,
|
|
195
161
|
FileAttachmentIcon = FileIconDefault,
|
|
196
|
-
} = useMessagesContext<
|
|
162
|
+
} = useMessagesContext<StreamChatGenerics>();
|
|
197
163
|
|
|
198
164
|
return (
|
|
199
165
|
<FileAttachmentWithContext
|
|
@@ -13,16 +13,7 @@ import {
|
|
|
13
13
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
14
14
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
15
15
|
|
|
16
|
-
import type {
|
|
17
|
-
DefaultAttachmentType,
|
|
18
|
-
DefaultChannelType,
|
|
19
|
-
DefaultCommandType,
|
|
20
|
-
DefaultEventType,
|
|
21
|
-
DefaultMessageType,
|
|
22
|
-
DefaultReactionType,
|
|
23
|
-
DefaultUserType,
|
|
24
|
-
UnknownType,
|
|
25
|
-
} from '../../types/types';
|
|
16
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
26
17
|
|
|
27
18
|
const styles = StyleSheet.create({
|
|
28
19
|
container: {
|
|
@@ -31,15 +22,9 @@ const styles = StyleSheet.create({
|
|
|
31
22
|
});
|
|
32
23
|
|
|
33
24
|
export type FileAttachmentGroupPropsWithContext<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Ev extends UnknownType = DefaultEventType,
|
|
38
|
-
Me extends UnknownType = DefaultMessageType,
|
|
39
|
-
Re extends UnknownType = DefaultReactionType,
|
|
40
|
-
Us extends UnknownType = DefaultUserType,
|
|
41
|
-
> = Pick<MessageContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'files'> &
|
|
42
|
-
Pick<MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'Attachment'> & {
|
|
25
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
26
|
+
> = Pick<MessageContextValue<StreamChatGenerics>, 'files'> &
|
|
27
|
+
Pick<MessagesContextValue<StreamChatGenerics>, 'Attachment'> & {
|
|
43
28
|
/**
|
|
44
29
|
* The unique id for the message with file attachments
|
|
45
30
|
*/
|
|
@@ -51,15 +36,9 @@ export type FileAttachmentGroupPropsWithContext<
|
|
|
51
36
|
};
|
|
52
37
|
|
|
53
38
|
const FileAttachmentGroupWithContext = <
|
|
54
|
-
|
|
55
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
56
|
-
Co extends string = DefaultCommandType,
|
|
57
|
-
Ev extends UnknownType = DefaultEventType,
|
|
58
|
-
Me extends UnknownType = DefaultMessageType,
|
|
59
|
-
Re extends UnknownType = DefaultReactionType,
|
|
60
|
-
Us extends UnknownType = DefaultUserType,
|
|
39
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
61
40
|
>(
|
|
62
|
-
props: FileAttachmentGroupPropsWithContext<
|
|
41
|
+
props: FileAttachmentGroupPropsWithContext<StreamChatGenerics>,
|
|
63
42
|
) => {
|
|
64
43
|
const { Attachment, files, messageId, styles: stylesProp = {} } = props;
|
|
65
44
|
|
|
@@ -88,17 +67,9 @@ const FileAttachmentGroupWithContext = <
|
|
|
88
67
|
);
|
|
89
68
|
};
|
|
90
69
|
|
|
91
|
-
const areEqual = <
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Co extends string = DefaultCommandType,
|
|
95
|
-
Ev extends UnknownType = DefaultEventType,
|
|
96
|
-
Me extends UnknownType = DefaultMessageType,
|
|
97
|
-
Re extends UnknownType = DefaultReactionType,
|
|
98
|
-
Us extends UnknownType = DefaultUserType,
|
|
99
|
-
>(
|
|
100
|
-
prevProps: FileAttachmentGroupPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
101
|
-
nextProps: FileAttachmentGroupPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
70
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
71
|
+
prevProps: FileAttachmentGroupPropsWithContext<StreamChatGenerics>,
|
|
72
|
+
nextProps: FileAttachmentGroupPropsWithContext<StreamChatGenerics>,
|
|
102
73
|
) => {
|
|
103
74
|
const { files: prevFiles } = prevProps;
|
|
104
75
|
const { files: nextFiles } = nextProps;
|
|
@@ -114,32 +85,20 @@ const MemoizedFileAttachmentGroup = React.memo(
|
|
|
114
85
|
) as typeof FileAttachmentGroupWithContext;
|
|
115
86
|
|
|
116
87
|
export type FileAttachmentGroupProps<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Ev extends UnknownType = DefaultEventType,
|
|
121
|
-
Me extends UnknownType = DefaultMessageType,
|
|
122
|
-
Re extends UnknownType = DefaultReactionType,
|
|
123
|
-
Us extends UnknownType = DefaultUserType,
|
|
124
|
-
> = Partial<Omit<FileAttachmentGroupPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'messageId'>> &
|
|
125
|
-
Pick<FileAttachmentGroupPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'messageId'>;
|
|
88
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
89
|
+
> = Partial<Omit<FileAttachmentGroupPropsWithContext<StreamChatGenerics>, 'messageId'>> &
|
|
90
|
+
Pick<FileAttachmentGroupPropsWithContext<StreamChatGenerics>, 'messageId'>;
|
|
126
91
|
|
|
127
92
|
export const FileAttachmentGroup = <
|
|
128
|
-
|
|
129
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
130
|
-
Co extends string = DefaultCommandType,
|
|
131
|
-
Ev extends UnknownType = DefaultEventType,
|
|
132
|
-
Me extends UnknownType = DefaultMessageType,
|
|
133
|
-
Re extends UnknownType = DefaultReactionType,
|
|
134
|
-
Us extends UnknownType = DefaultUserType,
|
|
93
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
135
94
|
>(
|
|
136
|
-
props: FileAttachmentGroupProps<
|
|
95
|
+
props: FileAttachmentGroupProps<StreamChatGenerics>,
|
|
137
96
|
) => {
|
|
138
97
|
const { files: propFiles, messageId } = props;
|
|
139
98
|
|
|
140
|
-
const { files: contextFiles } = useMessageContext<
|
|
99
|
+
const { files: contextFiles } = useMessageContext<StreamChatGenerics>();
|
|
141
100
|
|
|
142
|
-
const { Attachment = AttachmentDefault } = useMessagesContext<
|
|
101
|
+
const { Attachment = AttachmentDefault } = useMessagesContext<StreamChatGenerics>();
|
|
143
102
|
|
|
144
103
|
const files = propFiles || contextFiles;
|
|
145
104
|
|
|
@@ -23,16 +23,7 @@ import {
|
|
|
23
23
|
useOverlayContext,
|
|
24
24
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
25
25
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
26
|
-
import type {
|
|
27
|
-
DefaultAttachmentType,
|
|
28
|
-
DefaultChannelType,
|
|
29
|
-
DefaultCommandType,
|
|
30
|
-
DefaultEventType,
|
|
31
|
-
DefaultMessageType,
|
|
32
|
-
DefaultReactionType,
|
|
33
|
-
DefaultUserType,
|
|
34
|
-
UnknownType,
|
|
35
|
-
} from '../../types/types';
|
|
26
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
36
27
|
import { getUrlWithoutParams, makeImageCompatibleUrl } from '../../utils/utils';
|
|
37
28
|
|
|
38
29
|
const GalleryImage: React.FC<
|
|
@@ -78,16 +69,10 @@ const styles = StyleSheet.create({
|
|
|
78
69
|
});
|
|
79
70
|
|
|
80
71
|
export type GalleryPropsWithContext<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Co extends string = DefaultCommandType,
|
|
84
|
-
Ev extends UnknownType = DefaultEventType,
|
|
85
|
-
Me extends UnknownType = DefaultMessageType,
|
|
86
|
-
Re extends UnknownType = DefaultReactionType,
|
|
87
|
-
Us extends UnknownType = DefaultUserType,
|
|
88
|
-
> = Pick<ImageGalleryContextValue, 'setImage' | 'setImages'> &
|
|
72
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
73
|
+
> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> &
|
|
89
74
|
Pick<
|
|
90
|
-
MessageContextValue<
|
|
75
|
+
MessageContextValue<StreamChatGenerics>,
|
|
91
76
|
| 'alignment'
|
|
92
77
|
| 'groupStyles'
|
|
93
78
|
| 'images'
|
|
@@ -98,7 +83,7 @@ export type GalleryPropsWithContext<
|
|
|
98
83
|
| 'threadList'
|
|
99
84
|
> &
|
|
100
85
|
Pick<
|
|
101
|
-
MessagesContextValue<
|
|
86
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
102
87
|
'additionalTouchableProps' | 'legacyImageViewerSwipeBehaviour'
|
|
103
88
|
> &
|
|
104
89
|
Pick<OverlayContextValue, 'setOverlay'> & {
|
|
@@ -116,19 +101,13 @@ export type GalleryPropsWithContext<
|
|
|
116
101
|
*
|
|
117
102
|
* TODO: Fix circular dependencies of imports
|
|
118
103
|
*/
|
|
119
|
-
message?: MessageType<
|
|
104
|
+
message?: MessageType<StreamChatGenerics>;
|
|
120
105
|
};
|
|
121
106
|
|
|
122
107
|
const GalleryWithContext = <
|
|
123
|
-
|
|
124
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
125
|
-
Co extends string = DefaultCommandType,
|
|
126
|
-
Ev extends UnknownType = DefaultEventType,
|
|
127
|
-
Me extends UnknownType = DefaultMessageType,
|
|
128
|
-
Re extends UnknownType = DefaultReactionType,
|
|
129
|
-
Us extends UnknownType = DefaultUserType,
|
|
108
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
130
109
|
>(
|
|
131
|
-
props: GalleryPropsWithContext<
|
|
110
|
+
props: GalleryPropsWithContext<StreamChatGenerics>,
|
|
132
111
|
) => {
|
|
133
112
|
const {
|
|
134
113
|
additionalTouchableProps,
|
|
@@ -331,17 +310,9 @@ const GalleryWithContext = <
|
|
|
331
310
|
);
|
|
332
311
|
};
|
|
333
312
|
|
|
334
|
-
const areEqual = <
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
Co extends string = DefaultCommandType,
|
|
338
|
-
Ev extends UnknownType = DefaultEventType,
|
|
339
|
-
Me extends UnknownType = DefaultMessageType,
|
|
340
|
-
Re extends UnknownType = DefaultReactionType,
|
|
341
|
-
Us extends UnknownType = DefaultUserType,
|
|
342
|
-
>(
|
|
343
|
-
prevProps: GalleryPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
344
|
-
nextProps: GalleryPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
313
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
314
|
+
prevProps: GalleryPropsWithContext<StreamChatGenerics>,
|
|
315
|
+
nextProps: GalleryPropsWithContext<StreamChatGenerics>,
|
|
345
316
|
) => {
|
|
346
317
|
const {
|
|
347
318
|
groupStyles: prevGroupStyles,
|
|
@@ -381,28 +352,16 @@ const areEqual = <
|
|
|
381
352
|
const MemoizedGallery = React.memo(GalleryWithContext, areEqual) as typeof GalleryWithContext;
|
|
382
353
|
|
|
383
354
|
export type GalleryProps<
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
Co extends string = DefaultCommandType,
|
|
387
|
-
Ev extends UnknownType = DefaultEventType,
|
|
388
|
-
Me extends UnknownType = DefaultMessageType,
|
|
389
|
-
Re extends UnknownType = DefaultReactionType,
|
|
390
|
-
Us extends UnknownType = DefaultUserType,
|
|
391
|
-
> = Partial<GalleryPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
355
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
356
|
+
> = Partial<GalleryPropsWithContext<StreamChatGenerics>>;
|
|
392
357
|
|
|
393
358
|
/**
|
|
394
359
|
* UI component for card in attachments.
|
|
395
360
|
*/
|
|
396
361
|
export const Gallery = <
|
|
397
|
-
|
|
398
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
399
|
-
Co extends string = DefaultCommandType,
|
|
400
|
-
Ev extends UnknownType = DefaultEventType,
|
|
401
|
-
Me extends UnknownType = DefaultMessageType,
|
|
402
|
-
Re extends UnknownType = DefaultReactionType,
|
|
403
|
-
Us extends UnknownType = DefaultUserType,
|
|
362
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
404
363
|
>(
|
|
405
|
-
props: GalleryProps<
|
|
364
|
+
props: GalleryProps<StreamChatGenerics>,
|
|
406
365
|
) => {
|
|
407
366
|
const {
|
|
408
367
|
additionalTouchableProps: propAdditionalTouchableProps,
|
|
@@ -419,7 +378,7 @@ export const Gallery = <
|
|
|
419
378
|
threadList: propThreadList,
|
|
420
379
|
} = props;
|
|
421
380
|
|
|
422
|
-
const { setImage: contextSetImage, setImages } = useImageGalleryContext();
|
|
381
|
+
const { setImage: contextSetImage, setImages } = useImageGalleryContext<StreamChatGenerics>();
|
|
423
382
|
const {
|
|
424
383
|
alignment: contextAlignment,
|
|
425
384
|
groupStyles: contextGroupStyles,
|
|
@@ -430,11 +389,11 @@ export const Gallery = <
|
|
|
430
389
|
onPressIn: contextOnPressIn,
|
|
431
390
|
preventPress: contextPreventPress,
|
|
432
391
|
threadList: contextThreadList,
|
|
433
|
-
} = useMessageContext<
|
|
392
|
+
} = useMessageContext<StreamChatGenerics>();
|
|
434
393
|
const {
|
|
435
394
|
additionalTouchableProps: contextAdditionalTouchableProps,
|
|
436
395
|
legacyImageViewerSwipeBehaviour,
|
|
437
|
-
} = useMessagesContext<
|
|
396
|
+
} = useMessagesContext<StreamChatGenerics>();
|
|
438
397
|
const { setOverlay: contextSetOverlay } = useOverlayContext();
|
|
439
398
|
|
|
440
399
|
const images = propImages || contextImages;
|
|
@@ -14,16 +14,7 @@ import {
|
|
|
14
14
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
15
15
|
import { GiphyIcon } from '../../icons';
|
|
16
16
|
import { Lightning } from '../../icons/Lightning';
|
|
17
|
-
import type {
|
|
18
|
-
DefaultAttachmentType,
|
|
19
|
-
DefaultChannelType,
|
|
20
|
-
DefaultCommandType,
|
|
21
|
-
DefaultEventType,
|
|
22
|
-
DefaultMessageType,
|
|
23
|
-
DefaultReactionType,
|
|
24
|
-
DefaultUserType,
|
|
25
|
-
UnknownType,
|
|
26
|
-
} from '../../types/types';
|
|
17
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
27
18
|
import { makeImageCompatibleUrl } from '../../utils/utils';
|
|
28
19
|
|
|
29
20
|
const styles = StyleSheet.create({
|
|
@@ -102,31 +93,19 @@ const styles = StyleSheet.create({
|
|
|
102
93
|
});
|
|
103
94
|
|
|
104
95
|
export type GiphyPropsWithContext<
|
|
105
|
-
|
|
106
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
107
|
-
Co extends string = DefaultCommandType,
|
|
108
|
-
Ev extends UnknownType = DefaultEventType,
|
|
109
|
-
Me extends UnknownType = DefaultMessageType,
|
|
110
|
-
Re extends UnknownType = DefaultReactionType,
|
|
111
|
-
Us extends UnknownType = DefaultUserType,
|
|
96
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
112
97
|
> = Pick<
|
|
113
|
-
MessageContextValue<
|
|
98
|
+
MessageContextValue<StreamChatGenerics>,
|
|
114
99
|
'handleAction' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
|
|
115
100
|
> &
|
|
116
|
-
Pick<MessagesContextValue<
|
|
117
|
-
attachment: Attachment<
|
|
101
|
+
Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps'> & {
|
|
102
|
+
attachment: Attachment<StreamChatGenerics>;
|
|
118
103
|
};
|
|
119
104
|
|
|
120
105
|
const GiphyWithContext = <
|
|
121
|
-
|
|
122
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
123
|
-
Co extends string = DefaultCommandType,
|
|
124
|
-
Ev extends UnknownType = DefaultEventType,
|
|
125
|
-
Me extends UnknownType = DefaultMessageType,
|
|
126
|
-
Re extends UnknownType = DefaultReactionType,
|
|
127
|
-
Us extends UnknownType = DefaultUserType,
|
|
106
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
128
107
|
>(
|
|
129
|
-
props: GiphyPropsWithContext<
|
|
108
|
+
props: GiphyPropsWithContext<StreamChatGenerics>,
|
|
130
109
|
) => {
|
|
131
110
|
const {
|
|
132
111
|
additionalTouchableProps,
|
|
@@ -282,17 +261,9 @@ const GiphyWithContext = <
|
|
|
282
261
|
);
|
|
283
262
|
};
|
|
284
263
|
|
|
285
|
-
const areEqual = <
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
Co extends string = DefaultCommandType,
|
|
289
|
-
Ev extends UnknownType = DefaultEventType,
|
|
290
|
-
Me extends UnknownType = DefaultMessageType,
|
|
291
|
-
Re extends UnknownType = DefaultReactionType,
|
|
292
|
-
Us extends UnknownType = DefaultUserType,
|
|
293
|
-
>(
|
|
294
|
-
prevProps: GiphyPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
295
|
-
nextProps: GiphyPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
264
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
265
|
+
prevProps: GiphyPropsWithContext<StreamChatGenerics>,
|
|
266
|
+
nextProps: GiphyPropsWithContext<StreamChatGenerics>,
|
|
296
267
|
) => {
|
|
297
268
|
const {
|
|
298
269
|
attachment: { actions: prevActions, image_url: prevImageUrl, thumb_url: prevThumbUrl },
|
|
@@ -321,37 +292,25 @@ const areEqual = <
|
|
|
321
292
|
const MemoizedGiphy = React.memo(GiphyWithContext, areEqual) as typeof GiphyWithContext;
|
|
322
293
|
|
|
323
294
|
export type GiphyProps<
|
|
324
|
-
|
|
325
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
326
|
-
Co extends string = DefaultCommandType,
|
|
327
|
-
Ev extends UnknownType = DefaultEventType,
|
|
328
|
-
Me extends UnknownType = DefaultMessageType,
|
|
329
|
-
Re extends UnknownType = DefaultReactionType,
|
|
330
|
-
Us extends UnknownType = DefaultUserType,
|
|
295
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
331
296
|
> = Partial<
|
|
332
|
-
Pick<MessageContextValue<
|
|
333
|
-
Pick<MessagesContextValue<
|
|
297
|
+
Pick<MessageContextValue<StreamChatGenerics>, 'onLongPress' | 'onPressIn'> &
|
|
298
|
+
Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps'>
|
|
334
299
|
> & {
|
|
335
|
-
attachment: Attachment<
|
|
300
|
+
attachment: Attachment<StreamChatGenerics>;
|
|
336
301
|
};
|
|
337
302
|
|
|
338
303
|
/**
|
|
339
304
|
* UI component for card in attachments.
|
|
340
305
|
*/
|
|
341
306
|
export const Giphy = <
|
|
342
|
-
|
|
343
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
344
|
-
Co extends string = DefaultCommandType,
|
|
345
|
-
Ev extends UnknownType = DefaultEventType,
|
|
346
|
-
Me extends UnknownType = DefaultMessageType,
|
|
347
|
-
Re extends UnknownType = DefaultReactionType,
|
|
348
|
-
Us extends UnknownType = DefaultUserType,
|
|
307
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
349
308
|
>(
|
|
350
|
-
props: GiphyProps<
|
|
309
|
+
props: GiphyProps<StreamChatGenerics>,
|
|
351
310
|
) => {
|
|
352
311
|
const { handleAction, onLongPress, onPress, onPressIn, preventPress } =
|
|
353
|
-
useMessageContext<
|
|
354
|
-
const { additionalTouchableProps } = useMessagesContext<
|
|
312
|
+
useMessageContext<StreamChatGenerics>();
|
|
313
|
+
const { additionalTouchableProps } = useMessagesContext<StreamChatGenerics>();
|
|
355
314
|
|
|
356
315
|
return (
|
|
357
316
|
<MemoizedGiphy
|
|
@@ -97,7 +97,7 @@ describe('buildGallery', () => {
|
|
|
97
97
|
it('thumbnail size should be smaller than the limits set by sizeConfig', () => {
|
|
98
98
|
const bigImage = generateImageAttachment({
|
|
99
99
|
image_url:
|
|
100
|
-
'https://stream-io
|
|
100
|
+
'https://us-east.stream-io-cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&oh=200&ow=300&h=*&w=*&resize=*',
|
|
101
101
|
original_height: 1200,
|
|
102
102
|
original_width: 900,
|
|
103
103
|
});
|
|
@@ -107,13 +107,13 @@ describe('buildGallery', () => {
|
|
|
107
107
|
sizeConfig: defaultSizeConfig,
|
|
108
108
|
});
|
|
109
109
|
const t1 = tg1[0][0];
|
|
110
|
-
expect(t1.url.includes(
|
|
110
|
+
expect(t1.url.includes(`&h=${PixelRatio.getPixelSizeForLayoutSize(t1.height)}`)).toBe(true);
|
|
111
111
|
expect(t1.url.includes(`&w=${PixelRatio.getPixelSizeForLayoutSize(t1.width)}`)).toBe(true);
|
|
112
112
|
expect(t1.url.includes(`&resize=clip`)).toBe(true);
|
|
113
113
|
|
|
114
114
|
const smallImage = generateImageAttachment({
|
|
115
115
|
image_url:
|
|
116
|
-
'https://stream-io
|
|
116
|
+
'https://us-east.stream-io-cdn.com/23kn4k2j3n4k2n3k4n23?sig=34k23n4k23nk423&h=*&w=*&resize=*&oh=200&ow=300',
|
|
117
117
|
original_height: 30,
|
|
118
118
|
original_width: 20,
|
|
119
119
|
});
|
|
@@ -124,7 +124,7 @@ describe('buildGallery', () => {
|
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
const t2 = tg2[0][0];
|
|
127
|
-
expect(t2.url.includes(
|
|
127
|
+
expect(t2.url.includes(`&h=*`)).toBe(true);
|
|
128
128
|
expect(t2.url.includes(`&w=*`)).toBe(true);
|
|
129
129
|
expect(t2.url.includes(`&resize=*`)).toBe(true);
|
|
130
130
|
});
|
|
@@ -8,7 +8,7 @@ import { buildThumbnailGrid } from './buildThumbnailGrid';
|
|
|
8
8
|
|
|
9
9
|
import type { GallerySizeAndThumbnailGrid, GallerySizeConfig } from './types';
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type { DefaultStreamChatGenerics } from '../../../../types/types';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Builds and returns a gallery of optimized images to be rendered on UI.
|
|
@@ -26,11 +26,13 @@ import type { DefaultAttachmentType, UnknownType } from '../../../../types/types
|
|
|
26
26
|
*
|
|
27
27
|
* @return {GallerySizeAndThumbnailGrid}
|
|
28
28
|
*/
|
|
29
|
-
export function buildGallery<
|
|
29
|
+
export function buildGallery<
|
|
30
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
31
|
+
>({
|
|
30
32
|
images,
|
|
31
33
|
sizeConfig,
|
|
32
34
|
}: {
|
|
33
|
-
images: Attachment<
|
|
35
|
+
images: Attachment<StreamChatGenerics>[];
|
|
34
36
|
sizeConfig: GallerySizeConfig;
|
|
35
37
|
}): GallerySizeAndThumbnailGrid {
|
|
36
38
|
if (images.length === 1) {
|