stream-chat-react-native-core 4.0.0-beta.3 → 4.0.0-beta.7
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 +112 -148
- 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/Avatar/Avatar.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 +28 -11
- 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 +20 -16
- 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 +51 -51
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +145 -64
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- 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 -2
- 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/themeContext/utils/theme.js +7 -6
- package/lib/commonjs/contexts/themeContext/utils/theme.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/icons/index.js +0 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- 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 +8 -5
- 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 +112 -148
- 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/Avatar/Avatar.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 +28 -11
- 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 +20 -16
- 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 +51 -51
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +145 -64
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- 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 -2
- 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/themeContext/utils/theme.js +7 -6
- package/lib/module/contexts/themeContext/utils/theme.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/icons/index.js +0 -26
- package/lib/module/icons/index.js.map +1 -1
- 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 +8 -5
- 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/Avatar/Avatar.d.ts +1 -1
- 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/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
- 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 +19 -5
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- 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/themeContext/utils/theme.d.ts +6 -5
- 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/{Left.d.ts → UserAdmin.d.ts} +1 -1
- package/lib/typescript/icons/index.d.ts +0 -2
- 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 +82 -125
- 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/Avatar/Avatar.tsx +1 -1
- 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 +42 -20
- package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -0
- 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 +23 -65
- 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 +47 -88
- package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +89 -74
- 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 -110
- 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/themeContext/utils/theme.ts +13 -11
- 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/icons/index.ts +0 -2
- 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 +56 -0
- package/src/utils/getResizedImageUrl.ts +15 -13
- package/src/utils/utils.ts +63 -128
- package/src/version.json +1 -1
- package/lib/commonjs/icons/Left.js +0 -38
- package/lib/commonjs/icons/Left.js.map +0 -1
- package/lib/commonjs/icons/Right.js +0 -38
- package/lib/commonjs/icons/Right.js.map +0 -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/icons/Left.js +0 -38
- package/lib/module/icons/Left.js.map +0 -1
- package/lib/module/icons/Right.js +0 -38
- package/lib/module/icons/Right.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/lib/typescript/icons/Right.d.ts +0 -3
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
- 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
|
@@ -10,16 +10,7 @@ import {
|
|
|
10
10
|
} from '../../contexts/messageOverlayContext/MessageOverlayContext';
|
|
11
11
|
import type { OverlayProviderProps } from '../../contexts/overlayContext/OverlayContext';
|
|
12
12
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
13
|
-
import type {
|
|
14
|
-
DefaultAttachmentType,
|
|
15
|
-
DefaultChannelType,
|
|
16
|
-
DefaultCommandType,
|
|
17
|
-
DefaultEventType,
|
|
18
|
-
DefaultMessageType,
|
|
19
|
-
DefaultReactionType,
|
|
20
|
-
DefaultUserType,
|
|
21
|
-
UnknownType,
|
|
22
|
-
} from '../../types/types';
|
|
13
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
23
14
|
import { vw } from '../../utils/utils';
|
|
24
15
|
|
|
25
16
|
const styles = StyleSheet.create({
|
|
@@ -45,15 +36,9 @@ const styles = StyleSheet.create({
|
|
|
45
36
|
});
|
|
46
37
|
|
|
47
38
|
export type MessageActionListPropsWithContext<
|
|
48
|
-
|
|
49
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
50
|
-
Co extends string = DefaultCommandType,
|
|
51
|
-
Ev extends UnknownType = DefaultEventType,
|
|
52
|
-
Me extends UnknownType = DefaultMessageType,
|
|
53
|
-
Re extends UnknownType = DefaultReactionType,
|
|
54
|
-
Us extends UnknownType = DefaultUserType,
|
|
39
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
55
40
|
> = Pick<
|
|
56
|
-
OverlayProviderProps<
|
|
41
|
+
OverlayProviderProps<StreamChatGenerics>,
|
|
57
42
|
| 'MessageActionListItem'
|
|
58
43
|
| 'error'
|
|
59
44
|
| 'isMyMessage'
|
|
@@ -61,20 +46,14 @@ export type MessageActionListPropsWithContext<
|
|
|
61
46
|
| 'message'
|
|
62
47
|
| 'messageReactions'
|
|
63
48
|
> &
|
|
64
|
-
Pick<MessageOverlayData<
|
|
49
|
+
Pick<MessageOverlayData<StreamChatGenerics>, 'alignment' | 'messageActions'> & {
|
|
65
50
|
showScreen: Animated.SharedValue<number>;
|
|
66
51
|
};
|
|
67
52
|
|
|
68
53
|
const MessageActionListWithContext = <
|
|
69
|
-
|
|
70
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
71
|
-
Co extends string = DefaultCommandType,
|
|
72
|
-
Ev extends UnknownType = DefaultEventType,
|
|
73
|
-
Me extends UnknownType = DefaultMessageType,
|
|
74
|
-
Re extends UnknownType = DefaultReactionType,
|
|
75
|
-
Us extends UnknownType = DefaultUserType,
|
|
54
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
76
55
|
>(
|
|
77
|
-
props: MessageActionListPropsWithContext<
|
|
56
|
+
props: MessageActionListPropsWithContext<StreamChatGenerics>,
|
|
78
57
|
) => {
|
|
79
58
|
const {
|
|
80
59
|
alignment,
|
|
@@ -146,17 +125,9 @@ const MessageActionListWithContext = <
|
|
|
146
125
|
);
|
|
147
126
|
};
|
|
148
127
|
|
|
149
|
-
const areEqual = <
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Co extends string = DefaultCommandType,
|
|
153
|
-
Ev extends UnknownType = DefaultEventType,
|
|
154
|
-
Me extends UnknownType = DefaultMessageType,
|
|
155
|
-
Re extends UnknownType = DefaultReactionType,
|
|
156
|
-
Us extends UnknownType = DefaultUserType,
|
|
157
|
-
>(
|
|
158
|
-
prevProps: MessageActionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
159
|
-
nextProps: MessageActionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
128
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
129
|
+
prevProps: MessageActionListPropsWithContext<StreamChatGenerics>,
|
|
130
|
+
nextProps: MessageActionListPropsWithContext<StreamChatGenerics>,
|
|
160
131
|
) => {
|
|
161
132
|
const { alignment: prevAlignment, messageActions: prevMessageActions } = prevProps;
|
|
162
133
|
const { alignment: nextAlignment, messageActions: nextMessageActions } = nextProps;
|
|
@@ -176,16 +147,10 @@ const MemoizedMessageActionList = React.memo(
|
|
|
176
147
|
) as typeof MessageActionListWithContext;
|
|
177
148
|
|
|
178
149
|
export type MessageActionListProps<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Co extends string = DefaultCommandType,
|
|
182
|
-
Ev extends UnknownType = DefaultEventType,
|
|
183
|
-
Me extends UnknownType = DefaultMessageType,
|
|
184
|
-
Re extends UnknownType = DefaultReactionType,
|
|
185
|
-
Us extends UnknownType = DefaultUserType,
|
|
186
|
-
> = Partial<Omit<MessageActionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'showScreen'>> &
|
|
150
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
151
|
+
> = Partial<Omit<MessageActionListPropsWithContext<StreamChatGenerics>, 'showScreen'>> &
|
|
187
152
|
Pick<
|
|
188
|
-
MessageActionListPropsWithContext<
|
|
153
|
+
MessageActionListPropsWithContext<StreamChatGenerics>,
|
|
189
154
|
'showScreen' | 'message' | 'isMyMessage' | 'error' | 'isThreadMessage' | 'messageReactions'
|
|
190
155
|
>;
|
|
191
156
|
|
|
@@ -193,17 +158,11 @@ export type MessageActionListProps<
|
|
|
193
158
|
* MessageActionList - A high level component which implements all the logic required for MessageActions
|
|
194
159
|
*/
|
|
195
160
|
export const MessageActionList = <
|
|
196
|
-
|
|
197
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
198
|
-
Co extends string = DefaultCommandType,
|
|
199
|
-
Ev extends UnknownType = DefaultEventType,
|
|
200
|
-
Me extends UnknownType = DefaultMessageType,
|
|
201
|
-
Re extends UnknownType = DefaultReactionType,
|
|
202
|
-
Us extends UnknownType = DefaultUserType,
|
|
161
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
203
162
|
>(
|
|
204
|
-
props: MessageActionListProps<
|
|
163
|
+
props: MessageActionListProps<StreamChatGenerics>,
|
|
205
164
|
) => {
|
|
206
|
-
const { data } = useMessageOverlayContext<
|
|
165
|
+
const { data } = useMessageOverlayContext<StreamChatGenerics>();
|
|
207
166
|
|
|
208
167
|
const { alignment, messageActions } = data || {};
|
|
209
168
|
|
|
@@ -6,6 +6,7 @@ import Animated from 'react-native-reanimated';
|
|
|
6
6
|
import { useMessageActionAnimation } from './hooks/useMessageActionAnimation';
|
|
7
7
|
|
|
8
8
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
9
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
9
10
|
import { vw } from '../../utils/utils';
|
|
10
11
|
import type { MessageOverlayPropsWithContext } from '../MessageOverlay/MessageOverlay';
|
|
11
12
|
|
|
@@ -54,16 +55,22 @@ export type MessageActionType = {
|
|
|
54
55
|
titleStyle?: StyleProp<TextStyle>;
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
export type MessageActionListItemProps
|
|
58
|
+
export type MessageActionListItemProps<
|
|
59
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
60
|
+
> = MessageActionType &
|
|
58
61
|
Pick<
|
|
59
|
-
MessageOverlayPropsWithContext
|
|
62
|
+
MessageOverlayPropsWithContext<StreamChatGenerics>,
|
|
60
63
|
'error' | 'isMyMessage' | 'isThreadMessage' | 'message' | 'messageReactions'
|
|
61
64
|
> & {
|
|
62
65
|
index: number;
|
|
63
66
|
length: number;
|
|
64
67
|
};
|
|
65
68
|
|
|
66
|
-
const MessageActionListItemWithContext =
|
|
69
|
+
const MessageActionListItemWithContext = <
|
|
70
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
71
|
+
>(
|
|
72
|
+
props: MessageActionListItemProps<StreamChatGenerics>,
|
|
73
|
+
) => {
|
|
67
74
|
const { action, actionType, icon, index, length, title, titleStyle } = props;
|
|
68
75
|
|
|
69
76
|
const {
|
|
@@ -95,9 +102,11 @@ const MessageActionListItemWithContext = (props: MessageActionListItemProps) =>
|
|
|
95
102
|
);
|
|
96
103
|
};
|
|
97
104
|
|
|
98
|
-
const messageActionIsEqual =
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
const messageActionIsEqual = <
|
|
106
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
107
|
+
>(
|
|
108
|
+
prevProps: MessageActionListItemProps<StreamChatGenerics>,
|
|
109
|
+
nextProps: MessageActionListItemProps<StreamChatGenerics>,
|
|
101
110
|
) => prevProps.length === nextProps.length;
|
|
102
111
|
|
|
103
112
|
export const MemoizedMessageActionListItem = React.memo(
|
|
@@ -108,6 +117,8 @@ export const MemoizedMessageActionListItem = React.memo(
|
|
|
108
117
|
/**
|
|
109
118
|
* MessageActionListItem - A high-level component that implements all the logic required for a `MessageAction` in a `MessageActionList`
|
|
110
119
|
*/
|
|
111
|
-
export const MessageActionListItem =
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
export const MessageActionListItem = <
|
|
121
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
122
|
+
>(
|
|
123
|
+
props: MessageActionListItemProps<StreamChatGenerics>,
|
|
124
|
+
) => <MemoizedMessageActionListItem {...props} />;
|
|
@@ -39,19 +39,13 @@ import {
|
|
|
39
39
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
40
40
|
import { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
41
41
|
|
|
42
|
-
import type {
|
|
43
|
-
DefaultAttachmentType,
|
|
44
|
-
DefaultChannelType,
|
|
45
|
-
DefaultCommandType,
|
|
46
|
-
DefaultEventType,
|
|
47
|
-
DefaultMessageType,
|
|
48
|
-
DefaultReactionType,
|
|
49
|
-
DefaultUserType,
|
|
50
|
-
UnknownType,
|
|
51
|
-
} from '../../types/types';
|
|
42
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
52
43
|
import { vh, vw } from '../../utils/utils';
|
|
53
44
|
import { MessageTextContainer } from '../Message/MessageSimple/MessageTextContainer';
|
|
54
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
OverlayReactions as DefaultOverlayReactions,
|
|
47
|
+
Reaction,
|
|
48
|
+
} from '../MessageOverlay/OverlayReactions';
|
|
55
49
|
import type { ReplyProps } from '../Reply/Reply';
|
|
56
50
|
|
|
57
51
|
const styles = StyleSheet.create({
|
|
@@ -87,15 +81,9 @@ const halfScreenHeight = vh(50);
|
|
|
87
81
|
const DefaultMessageTextNumberOfLines = 5;
|
|
88
82
|
|
|
89
83
|
export type MessageOverlayPropsWithContext<
|
|
90
|
-
|
|
91
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
92
|
-
Co extends string = DefaultCommandType,
|
|
93
|
-
Ev extends UnknownType = DefaultEventType,
|
|
94
|
-
Me extends UnknownType = DefaultMessageType,
|
|
95
|
-
Re extends UnknownType = DefaultReactionType,
|
|
96
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
84
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
97
85
|
> = Pick<
|
|
98
|
-
MessageOverlayContextValue<
|
|
86
|
+
MessageOverlayContextValue<StreamChatGenerics>,
|
|
99
87
|
| 'MessageActionList'
|
|
100
88
|
| 'MessageActionListItem'
|
|
101
89
|
| 'OverlayReactionList'
|
|
@@ -103,10 +91,10 @@ export type MessageOverlayPropsWithContext<
|
|
|
103
91
|
| 'OverlayReactionsAvatar'
|
|
104
92
|
| 'reset'
|
|
105
93
|
> &
|
|
106
|
-
Omit<MessageOverlayData<
|
|
94
|
+
Omit<MessageOverlayData<StreamChatGenerics>, 'supportedReactions'> &
|
|
107
95
|
Pick<OverlayContextValue, 'overlay' | 'setOverlay'> &
|
|
108
96
|
Pick<
|
|
109
|
-
OverlayProviderProps<
|
|
97
|
+
OverlayProviderProps<StreamChatGenerics>,
|
|
110
98
|
| 'error'
|
|
111
99
|
| 'isMyMessage'
|
|
112
100
|
| 'isThreadMessage'
|
|
@@ -120,15 +108,9 @@ export type MessageOverlayPropsWithContext<
|
|
|
120
108
|
};
|
|
121
109
|
|
|
122
110
|
const MessageOverlayWithContext = <
|
|
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 DefaultUserType = DefaultUserType,
|
|
111
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
130
112
|
>(
|
|
131
|
-
props: MessageOverlayPropsWithContext<
|
|
113
|
+
props: MessageOverlayPropsWithContext<StreamChatGenerics>,
|
|
132
114
|
) => {
|
|
133
115
|
const {
|
|
134
116
|
alignment,
|
|
@@ -339,7 +321,7 @@ const MessageOverlayWithContext = <
|
|
|
339
321
|
const { Attachment, FileAttachmentGroup, Gallery, MessageAvatar, Reply } = messagesContext || {};
|
|
340
322
|
|
|
341
323
|
return (
|
|
342
|
-
<MessagesProvider
|
|
324
|
+
<MessagesProvider value={messagesContext}>
|
|
343
325
|
<MessageProvider value={messageContext}>
|
|
344
326
|
<ThemeProvider mergedStyle={wrapMessageInTheme ? modifiedTheme : theme}>
|
|
345
327
|
<Animated.View
|
|
@@ -449,15 +431,7 @@ const MessageOverlayWithContext = <
|
|
|
449
431
|
>
|
|
450
432
|
<Reply
|
|
451
433
|
quotedMessage={
|
|
452
|
-
message.quoted_message as ReplyProps<
|
|
453
|
-
At,
|
|
454
|
-
Ch,
|
|
455
|
-
Co,
|
|
456
|
-
Ev,
|
|
457
|
-
Me,
|
|
458
|
-
Re,
|
|
459
|
-
Us
|
|
460
|
-
>['quotedMessage']
|
|
434
|
+
message.quoted_message as ReplyProps<StreamChatGenerics>['quotedMessage']
|
|
461
435
|
}
|
|
462
436
|
styles={{
|
|
463
437
|
messageContainer: {
|
|
@@ -506,7 +480,7 @@ const MessageOverlayWithContext = <
|
|
|
506
480
|
default:
|
|
507
481
|
return otherAttachments?.length &&
|
|
508
482
|
otherAttachments[0].actions ? null : (
|
|
509
|
-
<MessageTextContainer<
|
|
483
|
+
<MessageTextContainer<StreamChatGenerics>
|
|
510
484
|
key={`message_text_container_${messageContentOrderIndex}`}
|
|
511
485
|
message={message}
|
|
512
486
|
messageOverlay
|
|
@@ -524,6 +498,7 @@ const MessageOverlayWithContext = <
|
|
|
524
498
|
MessageActionListItem={MessageActionListItem}
|
|
525
499
|
showScreen={showScreen}
|
|
526
500
|
{...messageActionProps}
|
|
501
|
+
message={message}
|
|
527
502
|
/>
|
|
528
503
|
)}
|
|
529
504
|
{!!messageReactionTitle &&
|
|
@@ -532,14 +507,16 @@ const MessageOverlayWithContext = <
|
|
|
532
507
|
<OverlayReactions
|
|
533
508
|
alignment={alignment}
|
|
534
509
|
OverlayReactionsAvatar={OverlayReactionsAvatar}
|
|
535
|
-
reactions={
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
510
|
+
reactions={
|
|
511
|
+
message.latest_reactions.map((reaction) => ({
|
|
512
|
+
alignment:
|
|
513
|
+
clientId && clientId === reaction.user?.id ? 'right' : 'left',
|
|
514
|
+
id: reaction?.user?.id || '',
|
|
515
|
+
image: reaction?.user?.image,
|
|
516
|
+
name: reaction?.user?.name || reaction.user_id || '',
|
|
517
|
+
type: reaction.type,
|
|
518
|
+
})) as Reaction[]
|
|
519
|
+
}
|
|
543
520
|
showScreen={showScreen}
|
|
544
521
|
supportedReactions={messagesContext?.supportedReactions}
|
|
545
522
|
title={messageReactionTitle}
|
|
@@ -559,17 +536,9 @@ const MessageOverlayWithContext = <
|
|
|
559
536
|
);
|
|
560
537
|
};
|
|
561
538
|
|
|
562
|
-
const areEqual = <
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
Co extends string = DefaultCommandType,
|
|
566
|
-
Ev extends UnknownType = DefaultEventType,
|
|
567
|
-
Me extends UnknownType = DefaultMessageType,
|
|
568
|
-
Re extends UnknownType = DefaultReactionType,
|
|
569
|
-
Us extends UnknownType = DefaultUserType,
|
|
570
|
-
>(
|
|
571
|
-
prevProps: MessageOverlayPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
572
|
-
nextProps: MessageOverlayPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
539
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
540
|
+
prevProps: MessageOverlayPropsWithContext<StreamChatGenerics>,
|
|
541
|
+
nextProps: MessageOverlayPropsWithContext<StreamChatGenerics>,
|
|
573
542
|
) => {
|
|
574
543
|
const {
|
|
575
544
|
alignment: prevAlignment,
|
|
@@ -611,33 +580,21 @@ const MemoizedMessageOverlay = React.memo(
|
|
|
611
580
|
) as typeof MessageOverlayWithContext;
|
|
612
581
|
|
|
613
582
|
export type MessageOverlayProps<
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
Ev extends UnknownType = DefaultEventType,
|
|
618
|
-
Me extends UnknownType = DefaultMessageType,
|
|
619
|
-
Re extends UnknownType = DefaultReactionType,
|
|
620
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
621
|
-
> = Partial<Omit<MessageOverlayPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'overlayOpacity'>> &
|
|
622
|
-
Pick<MessageOverlayPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'overlayOpacity'> &
|
|
583
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
584
|
+
> = Partial<Omit<MessageOverlayPropsWithContext<StreamChatGenerics>, 'overlayOpacity'>> &
|
|
585
|
+
Pick<MessageOverlayPropsWithContext<StreamChatGenerics>, 'overlayOpacity'> &
|
|
623
586
|
Pick<
|
|
624
|
-
MessageOverlayPropsWithContext<
|
|
625
|
-
'isMyMessage' | 'error' | 'isThreadMessage' | 'messageReactions'
|
|
587
|
+
MessageOverlayPropsWithContext<StreamChatGenerics>,
|
|
588
|
+
'isMyMessage' | 'error' | 'isThreadMessage' | 'message' | 'messageReactions'
|
|
626
589
|
>;
|
|
627
590
|
|
|
628
591
|
/**
|
|
629
592
|
* MessageOverlay - A high level component which implements all the logic required for a message overlay
|
|
630
593
|
*/
|
|
631
594
|
export const MessageOverlay = <
|
|
632
|
-
|
|
633
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
634
|
-
Co extends string = DefaultCommandType,
|
|
635
|
-
Ev extends UnknownType = DefaultEventType,
|
|
636
|
-
Me extends UnknownType = DefaultMessageType,
|
|
637
|
-
Re extends UnknownType = DefaultReactionType,
|
|
638
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
595
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
639
596
|
>(
|
|
640
|
-
props: MessageOverlayProps<
|
|
597
|
+
props: MessageOverlayProps<StreamChatGenerics>,
|
|
641
598
|
) => {
|
|
642
599
|
const {
|
|
643
600
|
data,
|
|
@@ -647,7 +604,7 @@ export const MessageOverlay = <
|
|
|
647
604
|
OverlayReactions,
|
|
648
605
|
OverlayReactionsAvatar,
|
|
649
606
|
reset,
|
|
650
|
-
} = useMessageOverlayContext<
|
|
607
|
+
} = useMessageOverlayContext<StreamChatGenerics>();
|
|
651
608
|
const { overlay, setOverlay } = useOverlayContext();
|
|
652
609
|
|
|
653
610
|
const componentProps = {
|
|
@@ -661,14 +618,14 @@ export const MessageOverlay = <
|
|
|
661
618
|
|
|
662
619
|
return (
|
|
663
620
|
<MemoizedMessageOverlay
|
|
664
|
-
{...(data || {})}
|
|
665
621
|
{...{
|
|
666
622
|
overlay,
|
|
667
623
|
reset,
|
|
668
624
|
setOverlay,
|
|
669
625
|
}}
|
|
670
|
-
{...props}
|
|
671
626
|
{...componentProps}
|
|
627
|
+
{...(data || {})}
|
|
628
|
+
{...props}
|
|
672
629
|
/>
|
|
673
630
|
);
|
|
674
631
|
};
|
|
@@ -40,16 +40,7 @@ import {
|
|
|
40
40
|
|
|
41
41
|
import { triggerHaptic } from '../../native';
|
|
42
42
|
|
|
43
|
-
import type {
|
|
44
|
-
DefaultAttachmentType,
|
|
45
|
-
DefaultChannelType,
|
|
46
|
-
DefaultCommandType,
|
|
47
|
-
DefaultEventType,
|
|
48
|
-
DefaultMessageType,
|
|
49
|
-
DefaultReactionType,
|
|
50
|
-
DefaultUserType,
|
|
51
|
-
UnknownType,
|
|
52
|
-
} from '../../types/types';
|
|
43
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
53
44
|
import type { ReactionData } from '../../utils/utils';
|
|
54
45
|
|
|
55
46
|
const AnimatedCircle = Animated.createAnimatedComponent
|
|
@@ -98,15 +89,9 @@ const reactionData: ReactionData[] = [
|
|
|
98
89
|
];
|
|
99
90
|
|
|
100
91
|
type ReactionButtonProps<
|
|
101
|
-
|
|
102
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
103
|
-
Co extends string = DefaultCommandType,
|
|
104
|
-
Ev extends UnknownType = DefaultEventType,
|
|
105
|
-
Me extends UnknownType = DefaultMessageType,
|
|
106
|
-
Re extends UnknownType = DefaultReactionType,
|
|
107
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
92
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
108
93
|
> = Pick<
|
|
109
|
-
OverlayReactionListPropsWithContext<
|
|
94
|
+
OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
110
95
|
'ownReactionTypes' | 'handleReaction' | 'setOverlay'
|
|
111
96
|
> & {
|
|
112
97
|
Icon: React.FC<IconProps>;
|
|
@@ -117,15 +102,9 @@ type ReactionButtonProps<
|
|
|
117
102
|
};
|
|
118
103
|
|
|
119
104
|
export const ReactionButton = <
|
|
120
|
-
|
|
121
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
122
|
-
Co extends string = DefaultCommandType,
|
|
123
|
-
Ev extends UnknownType = DefaultEventType,
|
|
124
|
-
Me extends UnknownType = DefaultMessageType,
|
|
125
|
-
Re extends UnknownType = DefaultReactionType,
|
|
126
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
105
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
127
106
|
>(
|
|
128
|
-
props: ReactionButtonProps<
|
|
107
|
+
props: ReactionButtonProps<StreamChatGenerics>,
|
|
129
108
|
) => {
|
|
130
109
|
const {
|
|
131
110
|
handleReaction,
|
|
@@ -248,18 +227,12 @@ export const ReactionButton = <
|
|
|
248
227
|
};
|
|
249
228
|
|
|
250
229
|
export type OverlayReactionListPropsWithContext<
|
|
251
|
-
|
|
252
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
253
|
-
Co extends string = DefaultCommandType,
|
|
254
|
-
Ev extends UnknownType = DefaultEventType,
|
|
255
|
-
Me extends UnknownType = DefaultMessageType,
|
|
256
|
-
Re extends UnknownType = DefaultReactionType,
|
|
257
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
230
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
258
231
|
> = Pick<
|
|
259
|
-
MessageOverlayData<
|
|
232
|
+
MessageOverlayData<StreamChatGenerics>,
|
|
260
233
|
'alignment' | 'handleReaction' | 'messagesContext'
|
|
261
234
|
> &
|
|
262
|
-
Pick<MessagesContextValue<
|
|
235
|
+
Pick<MessagesContextValue<StreamChatGenerics>, 'supportedReactions'> &
|
|
263
236
|
Pick<OverlayContextValue, 'setOverlay'> & {
|
|
264
237
|
messageLayout: Animated.SharedValue<{
|
|
265
238
|
x: number;
|
|
@@ -272,15 +245,9 @@ export type OverlayReactionListPropsWithContext<
|
|
|
272
245
|
};
|
|
273
246
|
|
|
274
247
|
const OverlayReactionListWithContext = <
|
|
275
|
-
|
|
276
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
277
|
-
Co extends string = DefaultCommandType,
|
|
278
|
-
Ev extends UnknownType = DefaultEventType,
|
|
279
|
-
Me extends UnknownType = DefaultMessageType,
|
|
280
|
-
Re extends UnknownType = DefaultReactionType,
|
|
281
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
248
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
282
249
|
>(
|
|
283
|
-
props: OverlayReactionListPropsWithContext<
|
|
250
|
+
props: OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
284
251
|
) => {
|
|
285
252
|
const {
|
|
286
253
|
alignment,
|
|
@@ -399,7 +366,7 @@ const OverlayReactionListWithContext = <
|
|
|
399
366
|
]}
|
|
400
367
|
>
|
|
401
368
|
{supportedReactions?.map(({ Icon, type }, index) => (
|
|
402
|
-
<ReactionButton<
|
|
369
|
+
<ReactionButton<StreamChatGenerics>
|
|
403
370
|
handleReaction={handleReaction}
|
|
404
371
|
Icon={Icon}
|
|
405
372
|
index={index}
|
|
@@ -417,17 +384,9 @@ const OverlayReactionListWithContext = <
|
|
|
417
384
|
);
|
|
418
385
|
};
|
|
419
386
|
|
|
420
|
-
const areEqual = <
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
Co extends string = DefaultCommandType,
|
|
424
|
-
Ev extends UnknownType = DefaultEventType,
|
|
425
|
-
Me extends UnknownType = DefaultMessageType,
|
|
426
|
-
Re extends UnknownType = DefaultReactionType,
|
|
427
|
-
Us extends UnknownType = DefaultUserType,
|
|
428
|
-
>(
|
|
429
|
-
prevProps: OverlayReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
430
|
-
nextProps: OverlayReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,
|
|
387
|
+
const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
|
|
388
|
+
prevProps: OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
389
|
+
nextProps: OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
431
390
|
) => {
|
|
432
391
|
const { alignment: prevAlignment, ownReactionTypes: prevOwnReactionTypes } = prevProps;
|
|
433
392
|
const { alignment: nextAlignment, ownReactionTypes: nextOwnReactionTypes } = nextProps;
|
|
@@ -447,20 +406,14 @@ const MemoizedOverlayReactionList = React.memo(
|
|
|
447
406
|
) as typeof OverlayReactionListWithContext;
|
|
448
407
|
|
|
449
408
|
export type OverlayReactionListProps<
|
|
450
|
-
|
|
451
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
452
|
-
Co extends string = DefaultCommandType,
|
|
453
|
-
Ev extends UnknownType = DefaultEventType,
|
|
454
|
-
Me extends UnknownType = DefaultMessageType,
|
|
455
|
-
Re extends UnknownType = DefaultReactionType,
|
|
456
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
409
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
457
410
|
> = Omit<
|
|
458
|
-
OverlayReactionListPropsWithContext<
|
|
411
|
+
OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
459
412
|
'setOverlay' | 'supportedReactions'
|
|
460
413
|
> &
|
|
461
414
|
Partial<
|
|
462
415
|
Pick<
|
|
463
|
-
OverlayReactionListPropsWithContext<
|
|
416
|
+
OverlayReactionListPropsWithContext<StreamChatGenerics>,
|
|
464
417
|
'setOverlay' | 'supportedReactions'
|
|
465
418
|
>
|
|
466
419
|
>;
|
|
@@ -469,18 +422,12 @@ export type OverlayReactionListProps<
|
|
|
469
422
|
* OverlayReactionList - A high level component which implements all the logic required for a message overlay reaction list
|
|
470
423
|
*/
|
|
471
424
|
export const OverlayReactionList = <
|
|
472
|
-
|
|
473
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
474
|
-
Co extends string = DefaultCommandType,
|
|
475
|
-
Ev extends UnknownType = DefaultEventType,
|
|
476
|
-
Me extends UnknownType = DefaultMessageType,
|
|
477
|
-
Re extends UnknownType = DefaultReactionType,
|
|
478
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
425
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
479
426
|
>(
|
|
480
|
-
props: OverlayReactionListProps<
|
|
427
|
+
props: OverlayReactionListProps<StreamChatGenerics>,
|
|
481
428
|
) => {
|
|
482
|
-
const { data } = useMessageOverlayContext<
|
|
483
|
-
const { supportedReactions } = useMessagesContext<
|
|
429
|
+
const { data } = useMessageOverlayContext<StreamChatGenerics>();
|
|
430
|
+
const { supportedReactions } = useMessagesContext<StreamChatGenerics>();
|
|
484
431
|
const { setOverlay } = useOverlayContext();
|
|
485
432
|
|
|
486
433
|
return (
|
|
@@ -16,16 +16,7 @@ import {
|
|
|
16
16
|
WutReaction,
|
|
17
17
|
} from '../../icons';
|
|
18
18
|
|
|
19
|
-
import type {
|
|
20
|
-
DefaultAttachmentType,
|
|
21
|
-
DefaultChannelType,
|
|
22
|
-
DefaultCommandType,
|
|
23
|
-
DefaultEventType,
|
|
24
|
-
DefaultMessageType,
|
|
25
|
-
DefaultReactionType,
|
|
26
|
-
DefaultUserType,
|
|
27
|
-
UnknownType,
|
|
28
|
-
} from '../../types/types';
|
|
19
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
29
20
|
import type { ReactionData } from '../../utils/utils';
|
|
30
21
|
|
|
31
22
|
const styles = StyleSheet.create({
|
|
@@ -111,14 +102,8 @@ export type Reaction = {
|
|
|
111
102
|
};
|
|
112
103
|
|
|
113
104
|
export type OverlayReactionsProps<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Co extends string = DefaultCommandType,
|
|
117
|
-
Ev extends UnknownType = DefaultEventType,
|
|
118
|
-
Me extends UnknownType = DefaultMessageType,
|
|
119
|
-
Re extends UnknownType = DefaultReactionType,
|
|
120
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
121
|
-
> = Pick<MessageOverlayContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'OverlayReactionsAvatar'> & {
|
|
105
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
106
|
+
> = Pick<MessageOverlayContextValue<StreamChatGenerics>, 'OverlayReactionsAvatar'> & {
|
|
122
107
|
reactions: Reaction[];
|
|
123
108
|
showScreen: Animated.SharedValue<number>;
|
|
124
109
|
title: string;
|