stream-chat-react-native-core 3.10.2 → 4.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Attachment.js +2 -2
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +18 -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/FileIcon.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +97 -113
- 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 +46 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +21 -45
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/commonjs/components/Avatar/Avatar.js +13 -7
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +10 -10
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +332 -247
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +5 -5
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +9 -31
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/commonjs/components/ChannelList/ChannelList.js +6 -6
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +5 -4
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +4 -3
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +17 -17
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- 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 +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- 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 +2 -2
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +89 -64
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +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.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +49 -20
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- 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.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 +16 -7
- 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 +2 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +12 -5
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +90 -58
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +14 -16
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +7 -7
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +9 -9
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +151 -860
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +39 -38
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +8 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +33 -21
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +5 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +27 -13
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +25 -24
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +7 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +52 -80
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +170 -73
- 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 +1 -5
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/commonjs/components/Message/utils/messageActions.js +17 -15
- 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/CooldownTimer.js +78 -0
- package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +4 -4
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +9 -9
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +17 -22
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +93 -65
- 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/SendMessageDisallowedIndicator.js +71 -0
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +4 -3
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/commonjs/components/MessageList/DateHeader.js +2 -2
- package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +2 -2
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +77 -44
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js +23 -10
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +10 -5
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/{module/components/MessageOverlay/MessageActions.js → commonjs/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +97 -78
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +12 -11
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +31 -34
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/commonjs/components/Reply/Reply.js +25 -19
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +11 -2
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +20 -12
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/ListProps.md +1 -1
- package/lib/commonjs/components/docs/data.js +1 -1
- package/lib/commonjs/components/index.js +133 -55
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +68 -0
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -0
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
- 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 +155 -0
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -0
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +144 -0
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -0
- 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 +2 -2
- 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 +122 -84
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- 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 +55 -46
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- 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 +20 -33
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +2 -2
- package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +45 -20
- 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 +1 -1
- 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/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/commonjs/emoji-data/compiled.js +0 -315
- package/lib/commonjs/emoji-data/compiled.js.map +1 -1
- package/lib/commonjs/emoji-data/emojiNames.js +0 -105
- package/lib/commonjs/emoji-data/emojiNames.js.map +1 -1
- package/lib/commonjs/emoji-data/emojis.js +0 -175
- package/lib/commonjs/emoji-data/emojis.js.map +1 -1
- package/lib/commonjs/emoji-data/index.js +2 -2
- package/lib/commonjs/emoji-data/index.js.map +1 -1
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/i18n/en.json +9 -3
- package/lib/commonjs/i18n/fr.json +9 -3
- package/lib/commonjs/i18n/hi.json +9 -3
- package/lib/commonjs/i18n/it.json +9 -3
- package/lib/commonjs/i18n/ja.json +9 -0
- package/lib/commonjs/i18n/ko.json +9 -0
- package/lib/commonjs/i18n/nl.json +9 -3
- package/lib/commonjs/i18n/ru.json +9 -3
- package/lib/commonjs/i18n/tr.json +10 -4
- package/lib/commonjs/icons/Pin.js +42 -0
- package/lib/commonjs/icons/Pin.js.map +1 -0
- package/lib/commonjs/icons/PinHeader.js +38 -0
- package/lib/commonjs/icons/PinHeader.js.map +1 -0
- package/lib/commonjs/icons/Unpin.js +38 -0
- package/lib/commonjs/icons/Unpin.js.map +1 -0
- package/lib/commonjs/icons/index.js +39 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +1 -1
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/mock-builders/api/error.js +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js +4 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/attachment.js +1 -3
- package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/channel.js +101 -50
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/user.js +32 -33
- package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
- package/lib/commonjs/mock-builders/mock.js +3 -3
- package/lib/commonjs/mock-builders/mock.js.map +1 -1
- package/lib/commonjs/native.js +1 -7
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +7 -7
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +4 -4
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +1 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +7 -7
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +25 -25
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js +1 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +1 -1
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/date.js +13 -0
- package/lib/commonjs/utils/date.js.map +1 -0
- package/lib/commonjs/utils/getResizedImageUrl.js +26 -0
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/commonjs/utils/utils.js +17 -9
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +2 -2
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +18 -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/FileIcon.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +97 -113
- 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 +46 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +21 -45
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/module/components/Avatar/Avatar.js +13 -7
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +10 -10
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +332 -247
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +5 -5
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +9 -31
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/module/components/ChannelList/ChannelList.js +6 -6
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +5 -4
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +4 -3
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +17 -17
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- 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 +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- 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 +2 -2
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +89 -64
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +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.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +49 -20
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- 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.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 +16 -7
- 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 +2 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +12 -5
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +90 -58
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +14 -16
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +7 -7
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +9 -9
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +151 -860
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +39 -38
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +8 -6
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +33 -21
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +5 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +27 -13
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +25 -24
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +7 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +52 -80
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +170 -73
- 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 +1 -5
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/module/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/module/components/Message/utils/messageActions.js +17 -15
- 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/CooldownTimer.js +78 -0
- package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/module/components/MessageInput/FileUploadPreview.js +4 -4
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +9 -9
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +17 -22
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +93 -65
- 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/SendMessageDisallowedIndicator.js +71 -0
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +4 -3
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/module/components/MessageList/DateHeader.js +2 -2
- package/lib/module/components/MessageList/DateHeader.js.map +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +2 -2
- package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +77 -44
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +5 -5
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js +23 -10
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js +10 -5
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/{commonjs/components/MessageOverlay/MessageActions.js → module/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageOverlay.js +97 -78
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +12 -11
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +31 -34
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/module/components/Reply/Reply.js +25 -19
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +11 -2
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +20 -12
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/ListProps.md +1 -1
- package/lib/module/components/docs/data.js +1 -1
- package/lib/module/components/index.js +133 -55
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +68 -0
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -0
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
- 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 +155 -0
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -0
- package/lib/module/contexts/channelsStateContext/useChannelState.js +144 -0
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -0
- 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 +2 -2
- 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 +122 -84
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- 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 +55 -46
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- 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 +20 -33
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +2 -2
- package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +45 -20
- 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 +1 -1
- 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/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/module/emoji-data/compiled.js +0 -315
- package/lib/module/emoji-data/compiled.js.map +1 -1
- package/lib/module/emoji-data/emojiNames.js +0 -105
- package/lib/module/emoji-data/emojiNames.js.map +1 -1
- package/lib/module/emoji-data/emojis.js +0 -175
- package/lib/module/emoji-data/emojis.js.map +1 -1
- package/lib/module/emoji-data/index.js +2 -2
- package/lib/module/emoji-data/index.js.map +1 -1
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/i18n/en.json +9 -3
- package/lib/module/i18n/fr.json +9 -3
- package/lib/module/i18n/hi.json +9 -3
- package/lib/module/i18n/it.json +9 -3
- package/lib/module/i18n/ja.json +9 -0
- package/lib/module/i18n/ko.json +9 -0
- package/lib/module/i18n/nl.json +9 -3
- package/lib/module/i18n/ru.json +9 -3
- package/lib/module/i18n/tr.json +10 -4
- package/lib/module/icons/Pin.js +42 -0
- package/lib/module/icons/Pin.js.map +1 -0
- package/lib/module/icons/PinHeader.js +38 -0
- package/lib/module/icons/PinHeader.js.map +1 -0
- package/lib/module/icons/Unpin.js +38 -0
- package/lib/module/icons/Unpin.js.map +1 -0
- package/lib/module/icons/index.js +39 -26
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/utils/base.js +1 -1
- package/lib/module/index.js +6 -6
- package/lib/module/mock-builders/api/error.js +1 -1
- package/lib/module/mock-builders/api/sendMessage.js +4 -1
- package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/module/mock-builders/generator/attachment.js +1 -3
- package/lib/module/mock-builders/generator/attachment.js.map +1 -1
- package/lib/module/mock-builders/generator/channel.js +101 -50
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/mock-builders/generator/user.js +32 -33
- package/lib/module/mock-builders/generator/user.js.map +1 -1
- package/lib/module/mock-builders/mock.js +3 -3
- package/lib/module/mock-builders/mock.js.map +1 -1
- package/lib/module/native.js +1 -7
- package/lib/module/native.js.map +1 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +7 -7
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/JsDoc.js +4 -4
- package/lib/module/styleguideComponents/JsDoc.js.map +1 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +7 -7
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +25 -25
- package/lib/module/styleguideComponents/PropsRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/Wrapper.js +1 -1
- package/lib/module/styleguideComponents/Wrapper.js.map +1 -1
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/date.js +13 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/module/utils/getResizedImageUrl.js +26 -0
- package/lib/module/utils/getResizedImageUrl.js.map +1 -0
- package/lib/module/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/module/utils/utils.js +17 -9
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +3 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +4 -6
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +10 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +137 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +9 -0
- package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +22 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +7 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +4 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +8 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +10 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +21 -0
- package/lib/typescript/components/Channel/Channel.d.ts +13 -12
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -68
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -126
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +7 -0
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +4 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +12 -0
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +4 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts +4 -3
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +2 -2
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -2
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +8 -0
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +2 -1
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.d.ts +7 -0
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.test.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +18 -3
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +15 -0
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +26 -0
- package/lib/typescript/components/Message/utils/messageActions.d.ts +22 -21
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +1 -1
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +1 -1
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +1 -1
- package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +10 -0
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +1 -1
- package/lib/typescript/components/MessageInput/SendMessageDisallowedIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +9 -0
- package/lib/typescript/components/MessageInput/hooks/useCountdown.d.ts +8 -0
- package/lib/typescript/components/MessageList/MessageList.d.ts +2 -1
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -1
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +1 -0
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +1 -1
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +12 -0
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +20 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +6 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +12 -0
- package/lib/typescript/components/Reply/Reply.d.ts +1 -1
- package/lib/typescript/components/Thread/Thread.d.ts +2 -2
- package/lib/typescript/components/index.d.ts +13 -7
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +9 -0
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +28 -30
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +13 -5
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +41 -0
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +20 -0
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +2 -6
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +21 -10
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +3 -3
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +12 -13
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +12 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +1 -0
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +23 -114
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +14 -7
- package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +25 -0
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +14 -13
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +41 -16
- package/lib/typescript/contexts/utils/getDisplayName.d.ts +2 -2
- package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
- package/lib/typescript/i18n/en.json +9 -3
- package/lib/typescript/i18n/fr.json +9 -3
- package/lib/typescript/i18n/hi.json +9 -3
- package/lib/typescript/i18n/it.json +9 -3
- package/lib/typescript/i18n/ja.json +9 -0
- package/lib/typescript/i18n/ko.json +9 -0
- package/lib/typescript/i18n/nl.json +9 -3
- package/lib/typescript/i18n/ru.json +9 -3
- package/lib/typescript/i18n/tr.json +10 -4
- package/lib/typescript/icons/{Left.d.ts → Pin.d.ts} +1 -1
- package/lib/typescript/icons/PinHeader.d.ts +3 -0
- package/lib/typescript/icons/{Right.d.ts → Unpin.d.ts} +1 -1
- package/lib/typescript/icons/index.d.ts +3 -2
- package/lib/typescript/native.d.ts +1 -9
- package/lib/typescript/utils/Streami18n.d.ts +11 -8
- package/lib/typescript/utils/date.d.ts +2 -0
- package/lib/typescript/utils/getResizedImageUrl.d.ts +19 -0
- package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
- package/lib/typescript/utils/utils.d.ts +14 -11
- package/package.json +12 -14
- package/src/components/Attachment/Attachment.tsx +3 -3
- package/src/components/Attachment/AttachmentActions.tsx +2 -2
- package/src/components/Attachment/Card.tsx +8 -5
- package/src/components/Attachment/FileAttachment.tsx +3 -4
- package/src/components/Attachment/FileIcon.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +164 -193
- package/src/components/Attachment/Giphy.tsx +67 -70
- package/src/components/Attachment/__tests__/Attachment.test.js +22 -14
- package/src/components/Attachment/__tests__/Gallery.test.js +233 -0
- package/src/components/Attachment/__tests__/buildGallery.test.js +131 -0
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +75 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +95 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +64 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +46 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +186 -0
- package/src/components/Attachment/utils/buildGallery/types.ts +27 -0
- package/src/components/Attachment/utils/getAspectRatio.ts +21 -0
- package/src/components/Attachment/utils/getGalleryImageBorderRadius.ts +71 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +43 -28
- package/src/components/AutoCompleteInput/{CommandsItem.tsx → AutoCompleteSuggestionCommandIcon.tsx} +3 -57
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +109 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +156 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +212 -0
- package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +6 -12
- package/src/components/Avatar/Avatar.tsx +7 -10
- package/src/components/Avatar/GroupAvatar.tsx +7 -21
- package/src/components/Avatar/__tests__/Avatar.test.js +2 -30
- package/src/components/Channel/Channel.tsx +288 -232
- package/src/components/Channel/__tests__/Channel.test.js +34 -29
- package/src/components/Channel/__tests__/ownCapabilities.test.js +376 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +6 -6
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +4 -3
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +9 -30
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +54 -0
- package/src/components/ChannelList/ChannelList.tsx +8 -9
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +2 -3
- package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
- package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +5 -2
- package/src/components/ChannelList/ChannelListMessenger.tsx +3 -4
- package/src/components/ChannelList/__tests__/ChannelList.test.js +73 -13
- package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +11 -12
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +3 -3
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +3 -3
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +2 -3
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +4 -4
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +2 -2
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +1 -2
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +86 -44
- package/src/components/ChannelPreview/ChannelAvatar.tsx +3 -5
- package/src/components/ChannelPreview/ChannelPreview.tsx +3 -3
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +2 -2
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +27 -11
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +71 -0
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +4 -3
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +2 -2
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +2 -1
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +8 -9
- package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +8 -9
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +8 -2
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +3 -4
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +2 -2
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +4 -3
- package/src/components/Chat/Chat.tsx +6 -6
- package/src/components/Chat/__tests__/Chat.test.js +10 -6
- package/src/components/Chat/hooks/useIsOnline.ts +12 -8
- package/src/components/ImageGallery/ImageGallery.tsx +83 -49
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -5
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +5 -7
- package/src/components/ImageGallery/components/ImageGrid.tsx +4 -5
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
- package/src/components/Indicators/LoadingErrorIndicator.tsx +1 -1
- package/src/components/Indicators/LoadingIndicator.tsx +1 -2
- package/src/components/Message/Message.tsx +155 -594
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +23 -25
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +8 -6
- package/src/components/Message/MessageSimple/MessageFooter.tsx +45 -27
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +150 -0
- package/src/components/Message/MessageSimple/MessageReplies.tsx +5 -0
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +2 -3
- package/src/components/Message/MessageSimple/MessageSimple.tsx +47 -26
- package/src/components/Message/MessageSimple/MessageStatus.tsx +19 -34
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +5 -0
- package/src/components/Message/MessageSimple/ReactionList.tsx +64 -77
- package/src/components/Message/MessageSimple/__tests__/Message.test.js +9 -10
- package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +40 -47
- package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +53 -0
- package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +4 -5
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -1
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +80 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +100 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +95 -0
- package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +98 -58
- package/src/components/Message/hooks/useCreateMessageContext.ts +1 -7
- package/src/components/Message/hooks/useMessageActionHandlers.ts +172 -0
- package/src/components/Message/hooks/useMessageActions.tsx +386 -0
- package/src/components/Message/utils/messageActions.ts +64 -38
- package/src/components/Message/utils/removeReservedFields.ts +1 -1
- package/src/components/MessageInput/AttachButton.tsx +1 -2
- package/src/components/MessageInput/CommandsButton.tsx +1 -2
- package/src/components/MessageInput/CooldownTimer.tsx +67 -0
- package/src/components/MessageInput/FileUploadPreview.tsx +5 -5
- package/src/components/MessageInput/ImageUploadPreview.tsx +3 -4
- package/src/components/MessageInput/InputButtons.tsx +4 -10
- package/src/components/MessageInput/MessageInput.tsx +62 -35
- package/src/components/MessageInput/MoreOptionsButton.tsx +1 -2
- package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +47 -0
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +2 -2
- package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +43 -45
- package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +15 -15
- package/src/components/MessageInput/__tests__/MessageInput.test.js +15 -23
- package/src/components/MessageInput/__tests__/SendButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +2 -2
- package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +3593 -2889
- package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +1912 -1572
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +539 -296
- package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +4 -4
- package/src/components/MessageInput/hooks/useCooldown.ts +62 -0
- package/src/components/MessageInput/hooks/useCountdown.ts +48 -0
- package/src/components/MessageList/DateHeader.tsx +2 -2
- package/src/components/MessageList/InlineDateSeparator.tsx +2 -2
- package/src/components/MessageList/MessageList.tsx +63 -39
- package/src/components/MessageList/MessageSystem.tsx +2 -2
- package/src/components/MessageList/TypingIndicator.tsx +1 -2
- package/src/components/MessageList/__tests__/MessageList.test.js +241 -116
- package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
- package/src/components/MessageList/__tests__/TypingIndicator.test.js +5 -6
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +1 -1
- package/src/components/MessageList/hooks/useMessageList.ts +19 -9
- package/src/components/MessageList/hooks/useTypingString.ts +1 -2
- package/src/components/MessageList/utils/getDateSeparators.ts +4 -3
- package/src/components/MessageList/utils/getGroupStyles.ts +14 -9
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +6 -1
- package/src/components/MessageOverlay/{MessageActions.tsx → MessageActionList.tsx} +59 -91
- package/src/components/MessageOverlay/MessageActionListItem.tsx +113 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +258 -217
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +18 -0
- package/src/components/MessageOverlay/OverlayReactionList.tsx +3 -5
- package/src/components/MessageOverlay/OverlayReactions.tsx +27 -8
- package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +44 -0
- package/src/components/Reply/Reply.tsx +25 -15
- package/src/components/Thread/Thread.tsx +13 -6
- package/src/components/Thread/__tests__/Thread.test.js +38 -113
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +1085 -1018
- package/src/components/Thread/components/ThreadFooterComponent.tsx +14 -3
- package/src/components/docs/ListProps.md +1 -1
- package/src/components/index.ts +13 -7
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +32 -0
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -2
- package/src/contexts/channelContext/ChannelContext.tsx +28 -32
- package/src/contexts/channelsContext/ChannelsContext.tsx +18 -7
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +286 -0
- package/src/contexts/channelsStateContext/useChannelState.ts +207 -0
- package/src/contexts/chatContext/ChatContext.tsx +1 -2
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +1 -2
- package/src/contexts/keyboardContext/KeyboardContext.tsx +1 -2
- package/src/contexts/messageContext/MessageContext.tsx +2 -10
- package/src/contexts/messageInputContext/MessageInputContext.tsx +77 -36
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +9 -7
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -10
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +19 -28
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +46 -0
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +39 -140
- package/src/contexts/overlayContext/OverlayContext.tsx +19 -11
- package/src/contexts/overlayContext/OverlayProvider.tsx +48 -42
- package/src/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.tsx +38 -0
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +1 -2
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +26 -46
- package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +1 -1
- package/src/contexts/themeContext/ThemeContext.tsx +1 -0
- package/src/contexts/themeContext/utils/theme.ts +84 -35
- package/src/contexts/threadContext/ThreadContext.tsx +1 -2
- package/src/contexts/translationContext/TranslationContext.tsx +3 -3
- package/src/contexts/typingContext/TypingContext.tsx +1 -2
- package/src/contexts/utils/getDisplayName.ts +3 -1
- package/src/emoji-data/compiled.ts +1830 -9609
- package/src/emoji-data/emojiNames.ts +0 -140
- package/src/emoji-data/emojis.ts +0 -210
- package/src/emoji-data/index.js +1 -1
- package/src/hooks/useStreami18n.ts +1 -1
- package/src/i18n/en.json +9 -3
- package/src/i18n/fr.json +9 -3
- package/src/i18n/hi.json +9 -3
- package/src/i18n/it.json +9 -3
- package/src/i18n/ja.json +9 -0
- package/src/i18n/ko.json +9 -0
- package/src/i18n/nl.json +9 -3
- package/src/i18n/ru.json +9 -3
- package/src/i18n/tr.json +10 -4
- package/src/icons/Pin.tsx +17 -0
- package/src/icons/PinHeader.tsx +12 -0
- package/src/icons/Unpin.tsx +12 -0
- package/src/icons/index.ts +3 -2
- package/src/mock-builders/api/sendMessage.js +3 -1
- package/src/mock-builders/generator/attachment.js +0 -2
- package/src/mock-builders/generator/channel.js +101 -46
- package/src/mock-builders/generator/user.js +33 -26
- package/src/mock-builders/mock.js +2 -2
- package/src/native.ts +2 -13
- package/src/styleguideComponents/ArgumentsRenderer.tsx +2 -1
- package/src/styleguideComponents/JsDoc.tsx +3 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +2 -1
- package/src/styleguideComponents/PropsRenderer.tsx +7 -4
- package/src/styleguideComponents/Wrapper.tsx +1 -0
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/__tests__/Streami18n.test.js +1 -2
- package/src/utils/date.ts +4 -0
- package/src/utils/getResizedImageUrl.ts +43 -0
- package/src/utils/getUrlOfImageAttachment.ts +10 -0
- package/src/utils/utils.ts +23 -16
- package/src/version.json +1 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActions.js.map +0 -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/module/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/module/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/module/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/module/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActions.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/typescript/components/AutoCompleteInput/CommandsHeader.d.ts +0 -2
- package/lib/typescript/components/AutoCompleteInput/CommandsItem.d.ts +0 -15
- package/lib/typescript/components/AutoCompleteInput/EmojisHeader.d.ts +0 -5
- package/lib/typescript/components/AutoCompleteInput/EmojisItem.d.ts +0 -12
- package/lib/typescript/components/AutoCompleteInput/MentionsItem.d.ts +0 -16
- package/lib/typescript/components/AutoCompleteInput/SuggestionsList.d.ts +0 -13
- package/lib/typescript/components/MessageOverlay/MessageActions.d.ts +0 -11
- package/src/components/AutoCompleteInput/CommandsHeader.tsx +0 -43
- package/src/components/AutoCompleteInput/EmojisHeader.tsx +0 -45
- package/src/components/AutoCompleteInput/EmojisItem.tsx +0 -52
- package/src/components/AutoCompleteInput/MentionsItem.tsx +0 -74
- package/src/components/AutoCompleteInput/SuggestionsList.tsx +0 -138
- package/src/components/AutoCompleteInput/__tests__/CommandsItem.test.js +0 -26
- package/src/components/AutoCompleteInput/__tests__/MentionsItem.test.js +0 -62
- package/src/components/MessageList/__tests__/__snapshots__/MessageList.test.js.snap +0 -936
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { FlatListProps } from 'react-native';
|
|
3
3
|
import type { FlatList } from 'react-native-gesture-handler';
|
|
4
|
+
import type { ChannelPreviewMutedStatusProps } from 'src/components/ChannelPreview/ChannelPreviewMutedStatus';
|
|
4
5
|
import type { Channel } from 'stream-chat';
|
|
5
6
|
import type { HeaderErrorProps } from '../../components/ChannelList/ChannelListHeaderErrorIndicator';
|
|
7
|
+
import type { QueryChannels } from '../../components/ChannelList/hooks/usePaginatedChannels';
|
|
6
8
|
import type { ChannelAvatarProps } from '../../components/ChannelPreview/ChannelAvatar';
|
|
7
9
|
import type { ChannelPreviewMessageProps } from '../../components/ChannelPreview/ChannelPreviewMessage';
|
|
8
10
|
import type { ChannelPreviewMessengerProps } from '../../components/ChannelPreview/ChannelPreviewMessenger';
|
|
@@ -42,10 +44,6 @@ export declare type ChannelsContextValue<At extends UnknownType = DefaultAttachm
|
|
|
42
44
|
* Default: [EmptyStateIndicator](https://getstream.github.io/stream-chat-react-native/v3/#emptystateindicator)
|
|
43
45
|
* */
|
|
44
46
|
EmptyStateIndicator: React.ComponentType<EmptyStateProps>;
|
|
45
|
-
/**
|
|
46
|
-
* Error in channels query, if any
|
|
47
|
-
*/
|
|
48
|
-
error: boolean;
|
|
49
47
|
/**
|
|
50
48
|
* Custom loading indicator to display at bottom of the list, while loading further pages
|
|
51
49
|
*
|
|
@@ -99,7 +97,7 @@ export declare type ChannelsContextValue<At extends UnknownType = DefaultAttachm
|
|
|
99
97
|
/**
|
|
100
98
|
* Loads the next page of `channels`, which is present as a required prop
|
|
101
99
|
*/
|
|
102
|
-
loadNextPage:
|
|
100
|
+
loadNextPage: QueryChannels | undefined;
|
|
103
101
|
/**
|
|
104
102
|
* Max number to display within notification badge. Default: 255 and it cannot be higher than that for now due to backend limitations
|
|
105
103
|
*/
|
|
@@ -146,6 +144,10 @@ export declare type ChannelsContextValue<At extends UnknownType = DefaultAttachm
|
|
|
146
144
|
* Default: [Skeleton](https://getstream.github.io/stream-chat-react-native/v3/#skeleton)
|
|
147
145
|
*/
|
|
148
146
|
Skeleton: React.ComponentType;
|
|
147
|
+
/**
|
|
148
|
+
* Error in channels query, if any
|
|
149
|
+
*/
|
|
150
|
+
error?: Error;
|
|
149
151
|
ListHeaderComponent?: React.ComponentType;
|
|
150
152
|
/**
|
|
151
153
|
* Function to set the currently active channel, acts as a bridge between ChannelList and Channel components
|
|
@@ -165,6 +167,12 @@ export declare type ChannelsContextValue<At extends UnknownType = DefaultAttachm
|
|
|
165
167
|
* **Default** [ChannelPreviewMessage](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMessage.tsx)
|
|
166
168
|
*/
|
|
167
169
|
PreviewMessage?: React.ComponentType<ChannelPreviewMessageProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
170
|
+
/**
|
|
171
|
+
* Custom UI component to render muted status.
|
|
172
|
+
*
|
|
173
|
+
* **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
|
|
174
|
+
*/
|
|
175
|
+
PreviewMutedStatus?: React.ComponentType<ChannelPreviewMutedStatusProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
168
176
|
/**
|
|
169
177
|
* Custom UI component to render preview avatar.
|
|
170
178
|
*
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { DefaultAttachmentType, DefaultChannelType, DefaultCommandType, DefaultEventType, DefaultMessageType, DefaultReactionType, DefaultUserType, UnknownType } from '../../types/types';
|
|
3
|
+
import type { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
4
|
+
import type { PaginatedMessageListContextValue } from '../paginatedMessageListContext/PaginatedMessageListContext';
|
|
5
|
+
import type { ThreadContextValue } from '../threadContext/ThreadContext';
|
|
6
|
+
import type { TypingContextValue } from '../typingContext/TypingContext';
|
|
7
|
+
export declare type ChannelState<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
8
|
+
members: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['members'];
|
|
9
|
+
messages: PaginatedMessageListContextValue<At, Ch, Co, Ev, Me, Re, Us>['messages'];
|
|
10
|
+
read: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['read'];
|
|
11
|
+
subscriberCount: number;
|
|
12
|
+
threadMessages: ThreadContextValue<At, Ch, Co, Ev, Me, Re, Us>['threadMessages'];
|
|
13
|
+
typing: TypingContextValue<At, Ch, Co, Ev, Me, Re, Us>['typing'];
|
|
14
|
+
watcherCount: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['watcherCount'];
|
|
15
|
+
watchers: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['watchers'];
|
|
16
|
+
};
|
|
17
|
+
declare type ChannelsState<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
18
|
+
[cid: string]: ChannelState<At, Ch, Co, Ev, Me, Re, Us>;
|
|
19
|
+
};
|
|
20
|
+
export declare type Keys = keyof ChannelState;
|
|
21
|
+
export declare type Payload<Key extends Keys = Keys, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
22
|
+
cid: string;
|
|
23
|
+
key: Key;
|
|
24
|
+
value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>[Key];
|
|
25
|
+
};
|
|
26
|
+
export declare type ChannelsStateContextValue<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
27
|
+
decreaseSubscriberCount: (value: {
|
|
28
|
+
cid: string;
|
|
29
|
+
}) => void;
|
|
30
|
+
increaseSubscriberCount: (value: {
|
|
31
|
+
cid: string;
|
|
32
|
+
}) => void;
|
|
33
|
+
setState: (value: Payload<Keys, At, Ch, Co, Ev, Me, Re, Us>) => void;
|
|
34
|
+
state: ChannelsState<At, Ch, Co, Ev, Me, Re, Us>;
|
|
35
|
+
};
|
|
36
|
+
export declare const ChannelsStateProvider: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>({ children, }: {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}) => JSX.Element;
|
|
39
|
+
export declare const useChannelsStateContext: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>() => ChannelsStateContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
40
|
+
export declare const withChannelsStateContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, keyof ChannelsStateContextValue<At, Ch, Co, Ev, Me, Re, Us>>>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Channel as ChannelType } from 'stream-chat';
|
|
2
|
+
import type { ChannelState } from './ChannelsStateContext';
|
|
3
|
+
import type { DefaultAttachmentType, DefaultChannelType, DefaultCommandType, DefaultEventType, DefaultMessageType, DefaultReactionType, DefaultUserType, UnknownType } from '../../types/types';
|
|
4
|
+
export declare type UseChannelStateValue<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
5
|
+
members: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['members'];
|
|
6
|
+
messages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages'];
|
|
7
|
+
read: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['read'];
|
|
8
|
+
setMembers: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['members']) => void;
|
|
9
|
+
setMessages: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages']) => void;
|
|
10
|
+
setRead: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['read']) => void;
|
|
11
|
+
setThreadMessages: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threadMessages']) => void;
|
|
12
|
+
setTyping: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['typing']) => void;
|
|
13
|
+
setWatcherCount: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watcherCount']) => void;
|
|
14
|
+
setWatchers: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watchers']) => void;
|
|
15
|
+
threadMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threadMessages'];
|
|
16
|
+
typing: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['typing'];
|
|
17
|
+
watcherCount: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watcherCount'];
|
|
18
|
+
watchers: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watchers'];
|
|
19
|
+
};
|
|
20
|
+
export declare function useChannelState<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType>(channel: ChannelType<At, Ch, Co, Ev, Me, Re, Us> | undefined, threadId?: string): UseChannelStateValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
@@ -16,10 +16,6 @@ export declare type MessageContextValue<At extends UnknownType = DefaultAttachme
|
|
|
16
16
|
actionsEnabled: boolean;
|
|
17
17
|
/** Position of the message, either 'right' or 'left' */
|
|
18
18
|
alignment: Alignment;
|
|
19
|
-
/**
|
|
20
|
-
* Function that returns a boolean indicating whether or not the user can edit/delete the message.
|
|
21
|
-
*/
|
|
22
|
-
canModifyMessage: boolean;
|
|
23
19
|
/** The files attached to a message */
|
|
24
20
|
files: Attachment<At>[];
|
|
25
21
|
/**
|
|
@@ -91,7 +87,7 @@ export declare type MessageContextValue<At extends UnknownType = DefaultAttachme
|
|
|
91
87
|
preventPress?: boolean;
|
|
92
88
|
/** Whether or not the avatar show show next to Message */
|
|
93
89
|
showAvatar?: boolean;
|
|
94
|
-
} & Pick<ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'channel' | 'disabled' | 'members'
|
|
90
|
+
} & Pick<ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'channel' | 'disabled' | 'members'>;
|
|
95
91
|
export declare const MessageContext: React.Context<MessageContextValue<DefaultAttachmentType, DefaultChannelType, import("stream-chat").LiteralStringForUnion, UnknownType, UnknownType, UnknownType, DefaultUserType>>;
|
|
96
92
|
export declare const MessageProvider: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>({ children, value, }: React.PropsWithChildren<{
|
|
97
93
|
value?: MessageContextValue<At, Ch, Co, Ev, Me, Re, Us> | undefined;
|
|
@@ -102,4 +98,4 @@ export declare const useMessageContext: <At extends UnknownType = DefaultAttachm
|
|
|
102
98
|
* typing is desired while using the HOC withMessageContextContext the Props for the
|
|
103
99
|
* wrapped component must be provided as the first generic.
|
|
104
100
|
*/
|
|
105
|
-
export declare const withMessageContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, "
|
|
101
|
+
export declare const withMessageContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, "disabled" | "onPress" | "onPressIn" | "onLongPress" | "channel" | "members" | "threadList" | "images" | "reactions" | "message" | "alignment" | "actionsEnabled" | "files" | "groupStyles" | "handleAction" | "handleDeleteMessage" | "handleEditMessage" | "handleQuotedReplyMessage" | "handleResendMessage" | "handleToggleBanUser" | "handleToggleMuteUser" | "handleToggleReaction" | "hasReactions" | "isMyMessage" | "lastGroupMessage" | "messageContentOrder" | "onlyEmojis" | "onOpenThread" | "otherAttachments" | "showMessageOverlay" | "showMessageStatus" | "goToMessage" | "lastReceivedId" | "preventPress" | "showAvatar">>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { Attachment, SendFileAPIResponse, StreamChat, Message as StreamMessage, UserFilters, UserOptions, UserResponse, UserSort } from 'stream-chat';
|
|
3
|
-
import { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
4
|
-
import { ACITriggerSettingsParams, TriggerSettings } from '../../utils/utils';
|
|
5
|
-
import { Asset } from '../../native';
|
|
6
2
|
import type { TextInput, TextInputProps } from 'react-native';
|
|
3
|
+
import { Attachment, SendFileAPIResponse, StreamChat, Message as StreamMessage, UserFilters, UserOptions, UserResponse, UserSort } from 'stream-chat';
|
|
7
4
|
import type { AttachButtonProps } from '../../components/MessageInput/AttachButton';
|
|
8
5
|
import type { CommandsButtonProps } from '../../components/MessageInput/CommandsButton';
|
|
6
|
+
import type { CooldownTimerProps } from '../../components/MessageInput/CooldownTimer';
|
|
9
7
|
import type { FileUploadPreviewProps } from '../../components/MessageInput/FileUploadPreview';
|
|
10
8
|
import type { ImageUploadPreviewProps } from '../../components/MessageInput/ImageUploadPreview';
|
|
11
9
|
import type { InputButtonsProps } from '../../components/MessageInput/InputButtons';
|
|
@@ -14,7 +12,10 @@ import type { MoreOptionsButtonProps } from '../../components/MessageInput/MoreO
|
|
|
14
12
|
import type { SendButtonProps } from '../../components/MessageInput/SendButton';
|
|
15
13
|
import type { UploadProgressIndicatorProps } from '../../components/MessageInput/UploadProgressIndicator';
|
|
16
14
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
15
|
+
import { Asset } from '../../native';
|
|
17
16
|
import type { DefaultAttachmentType, DefaultChannelType, DefaultCommandType, DefaultEventType, DefaultMessageType, DefaultReactionType, DefaultUserType, UnknownType } from '../../types/types';
|
|
17
|
+
import { ACITriggerSettingsParams, TriggerSettings } from '../../utils/utils';
|
|
18
|
+
import { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
18
19
|
export declare type FileUpload = {
|
|
19
20
|
file: {
|
|
20
21
|
name: string;
|
|
@@ -32,11 +33,9 @@ export declare type ImageUpload = {
|
|
|
32
33
|
};
|
|
33
34
|
id: string;
|
|
34
35
|
state: string;
|
|
36
|
+
height?: number;
|
|
35
37
|
url?: string;
|
|
36
|
-
|
|
37
|
-
export declare type InputConfig = {
|
|
38
|
-
maxMessageLength?: number;
|
|
39
|
-
uploadsEnabled?: boolean;
|
|
38
|
+
width?: number;
|
|
40
39
|
};
|
|
41
40
|
export declare type MentionAllAppUsersQuery<Us extends DefaultUserType> = {
|
|
42
41
|
filters?: UserFilters<Us>;
|
|
@@ -53,6 +52,8 @@ export declare type LocalMessageInputContext<At extends UnknownType = DefaultAtt
|
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
54
|
closeAttachmentPicker: () => void;
|
|
55
|
+
/** The time at which the active cooldown will end */
|
|
56
|
+
cooldownEndsAt: Date;
|
|
56
57
|
/**
|
|
57
58
|
* An array of file objects which are set for upload. It has the following structure:
|
|
58
59
|
*
|
|
@@ -186,6 +187,14 @@ export declare type InputMessageInputContextValue<At extends UnknownType = Defau
|
|
|
186
187
|
* Defaults to and accepts same props as: [CommandsButton](https://getstream.github.io/stream-chat-react-native/v3/#commandsbutton)
|
|
187
188
|
*/
|
|
188
189
|
CommandsButton: React.ComponentType<CommandsButtonProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
190
|
+
/**
|
|
191
|
+
* Custom UI component to display the remaining cooldown a user will have to wait before
|
|
192
|
+
* being allowed to send another message. This component is displayed in place of the
|
|
193
|
+
* send button for the MessageInput component.
|
|
194
|
+
*
|
|
195
|
+
* **default** [CooldownTimer](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/CooldownTimer.tsx)
|
|
196
|
+
*/
|
|
197
|
+
CooldownTimer: React.ComponentType<CooldownTimerProps>;
|
|
189
198
|
editing: boolean | MessageType<At, Ch, Co, Ev, Me, Re, Us>;
|
|
190
199
|
editMessage: StreamChat<At, Ch, Co, Ev, Me, Re, Us>['updateMessage'];
|
|
191
200
|
/**
|
|
@@ -307,6 +316,7 @@ export declare type InputMessageInputContextValue<At extends UnknownType = Defau
|
|
|
307
316
|
* - toggleAttachmentPicker
|
|
308
317
|
*/
|
|
309
318
|
InputButtons?: React.ComponentType<InputButtonsProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
319
|
+
maxMessageLength?: number;
|
|
310
320
|
mentionAllAppUsersEnabled?: boolean;
|
|
311
321
|
/** Object containing filters/sort/options overrides for an @mention user query */
|
|
312
322
|
mentionAllAppUsersQuery?: MentionAllAppUsersQuery<Us>;
|
|
@@ -314,6 +324,7 @@ export declare type InputMessageInputContextValue<At extends UnknownType = Defau
|
|
|
314
324
|
* Callback that is called when the text input's text changes. Changed text is passed as a single string argument to the callback handler.
|
|
315
325
|
*/
|
|
316
326
|
onChangeText?: (newText: string) => void;
|
|
327
|
+
SendMessageDisallowedIndicator?: React.ComponentType;
|
|
317
328
|
/**
|
|
318
329
|
* ref for input setter function
|
|
319
330
|
*
|
|
@@ -322,7 +333,7 @@ export declare type InputMessageInputContextValue<At extends UnknownType = Defau
|
|
|
322
333
|
* @overrideType Function
|
|
323
334
|
*/
|
|
324
335
|
setInputRef?: (ref: TextInput | null) => void;
|
|
325
|
-
}
|
|
336
|
+
};
|
|
326
337
|
export declare type MessageInputContextValue<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = LocalMessageInputContext<At, Co, Us> & Omit<InputMessageInputContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'sendMessage'>;
|
|
327
338
|
export declare const MessageInputContext: React.Context<MessageInputContextValue<DefaultAttachmentType, DefaultChannelType, import("stream-chat").LiteralStringForUnion, UnknownType, UnknownType, UnknownType, DefaultUserType>>;
|
|
328
339
|
export declare const MessageInputProvider: <At extends DefaultAttachmentType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>({ children, value, }: React.PropsWithChildren<{
|
|
@@ -334,4 +345,4 @@ export declare const useMessageInputContext: <At extends UnknownType = DefaultAt
|
|
|
334
345
|
* typing is desired while using the HOC withMessageInputContext the Props for the
|
|
335
346
|
* wrapped component must be provided as the first generic.
|
|
336
347
|
*/
|
|
337
|
-
export declare const withMessageInputContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, "
|
|
348
|
+
export declare const withMessageInputContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, "AttachButton" | "clearEditingState" | "clearQuotedMessageState" | "CommandsButton" | "CooldownTimer" | "editing" | "editMessage" | "FileUploadPreview" | "hasCommands" | "hasFilePicker" | "hasImagePicker" | "ImageUploadPreview" | "maxNumberOfFiles" | "MoreOptionsButton" | "numberOfLines" | "quotedMessage" | "SendButton" | "sendImageAsync" | "setQuotedMessageState" | "ShowThreadMessageInChannelButton" | "UploadProgressIndicator" | "additionalTextInputProps" | "autoCompleteSuggestionsLimit" | "autoCompleteTriggerSettings" | "compressImageQuality" | "doDocUploadRequest" | "doImageUploadRequest" | "initialValue" | "Input" | "InputButtons" | "maxMessageLength" | "mentionAllAppUsersEnabled" | "mentionAllAppUsersQuery" | "onChangeText" | "SendMessageDisallowedIndicator" | "setInputRef" | keyof LocalMessageInputContext<At, Co, Us>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageInputContextValue } from '../MessageInputContext';
|
|
2
|
-
import type { ThreadContextValue } from '../../threadContext/ThreadContext';
|
|
3
1
|
import type { DefaultAttachmentType, DefaultChannelType, DefaultUserType, UnknownType } from '../../../types/types';
|
|
4
|
-
|
|
2
|
+
import type { ThreadContextValue } from '../../threadContext/ThreadContext';
|
|
3
|
+
import type { MessageInputContextValue } from '../MessageInputContext';
|
|
4
|
+
export declare const useCreateMessageInputContext: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>({ additionalTextInputProps, appendText, asyncIds, asyncUploads, AttachButton, autoCompleteSuggestionsLimit, clearEditingState, clearQuotedMessageState, closeAttachmentPicker, CommandsButton, compressImageQuality, cooldownEndsAt, CooldownTimer, doDocUploadRequest, doImageUploadRequest, editing, editMessage, FileUploadPreview, fileUploads, giphyActive, hasCommands, hasFilePicker, hasImagePicker, ImageUploadPreview, imageUploads, initialValue, Input, inputBoxRef, InputButtons, isValidMessage, maxMessageLength, maxNumberOfFiles, mentionAllAppUsersEnabled, mentionAllAppUsersQuery, mentionedUsers, MoreOptionsButton, numberOfLines, numberOfUploads, onChange, onChangeText, onSelectItem, openAttachmentPicker, openCommandsPicker, openFilePicker, openMentionsPicker, pickFile, quotedMessage, removeFile, removeImage, resetInput, selectedPicker, SendButton, sendImageAsync, sending, sendMessage, sendMessageAsync, SendMessageDisallowedIndicator, sendThreadMessageInChannel, setAsyncIds, setAsyncUploads, setFileUploads, setGiphyActive, setImageUploads, setInputBoxRef, setInputRef, setMentionedUsers, setNumberOfUploads, setQuotedMessageState, setSendThreadMessageInChannel, setShowMoreOptions, setText, showMoreOptions, ShowThreadMessageInChannelButton, text, thread, toggleAttachmentPicker, triggerSettings, updateMessage, uploadFile, uploadImage, uploadNewFile, uploadNewImage, UploadProgressIndicator, }: import("../MessageInputContext").LocalMessageInputContext<At, Co, Us> & Omit<import("../MessageInputContext").InputMessageInputContextValue<At, Ch, Co, Ev, Me, Re, Us>, "sendMessage"> & Pick<ThreadContextValue<At, Ch, Co, Ev, Me, Re, Us>, "thread">) => MessageInputContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FileUpload, ImageUpload, MessageInputContextValue } from '../MessageInputContext';
|
|
3
2
|
import type { DefaultAttachmentType, DefaultChannelType, DefaultUserType, UnknownType } from '../../../types/types';
|
|
3
|
+
import type { FileUpload, ImageUpload, MessageInputContextValue } from '../MessageInputContext';
|
|
4
4
|
export declare const isEditingBoolean: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(editing: boolean | import("../../..").MessageType<At, Ch, Co, Ev, Me, Re, Us>) => editing is boolean;
|
|
5
5
|
export declare const useMessageDetailsForState: <At extends DefaultAttachmentType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(message: boolean | import("../../..").MessageType<At, Ch, Co, Ev, Me, Re, Us>, initialValue?: string | undefined) => {
|
|
6
6
|
fileUploads: FileUpload[];
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import type { StyleProp, TextStyle } from 'react-native';
|
|
3
2
|
import type { Attachment } from 'stream-chat';
|
|
4
|
-
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
|
|
5
|
-
import type { MessagesContextValue } from '../messagesContext/MessagesContext';
|
|
6
3
|
import type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
7
|
-
import type {
|
|
4
|
+
import type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';
|
|
5
|
+
import type { MessageActionListItemProps, MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';
|
|
8
6
|
import type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';
|
|
9
7
|
import type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';
|
|
8
|
+
import type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';
|
|
10
9
|
import type { DefaultAttachmentType, DefaultChannelType, DefaultCommandType, DefaultEventType, DefaultMessageType, DefaultReactionType, DefaultUserType, UnknownType } from '../../types/types';
|
|
11
10
|
import type { ReactionData } from '../../utils/utils';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
icon?: React.ReactElement;
|
|
16
|
-
titleStyle?: StyleProp<TextStyle>;
|
|
17
|
-
};
|
|
11
|
+
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
|
|
12
|
+
import type { MessagesContextValue } from '../messagesContext/MessagesContext';
|
|
13
|
+
import type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
18
14
|
export declare type MessageOverlayData<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
19
15
|
alignment?: Alignment;
|
|
20
16
|
clientId?: string;
|
|
@@ -23,13 +19,14 @@ export declare type MessageOverlayData<At extends UnknownType = DefaultAttachmen
|
|
|
23
19
|
handleReaction?: (reactionType: string) => Promise<void>;
|
|
24
20
|
images?: Attachment<At>[];
|
|
25
21
|
message?: MessageType<At, Ch, Co, Ev, Me, Re, Us>;
|
|
26
|
-
messageActions?:
|
|
22
|
+
messageActions?: MessageActionType[];
|
|
27
23
|
messageContext?: MessageContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
28
24
|
messageReactionTitle?: string;
|
|
29
25
|
messagesContext?: MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
30
26
|
onlyEmojis?: boolean;
|
|
31
27
|
otherAttachments?: Attachment<At>[];
|
|
32
28
|
OverlayReactionList?: React.ComponentType<OverlayReactionListProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
29
|
+
ownCapabilities?: OwnCapabilitiesContextValue;
|
|
33
30
|
supportedReactions?: ReactionData[];
|
|
34
31
|
threadList?: boolean;
|
|
35
32
|
};
|
|
@@ -37,9 +34,10 @@ export declare type MessageOverlayContextValue<At extends UnknownType = DefaultA
|
|
|
37
34
|
/**
|
|
38
35
|
* Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/2.png) in overlay.
|
|
39
36
|
*
|
|
40
|
-
* **Default** [
|
|
37
|
+
* **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/MessageActions.tsx)
|
|
41
38
|
*/
|
|
42
|
-
|
|
39
|
+
MessageActionList: React.ComponentType<MessageActionListProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
40
|
+
MessageActionListItem: React.ComponentType<MessageActionListItemProps>;
|
|
43
41
|
/**
|
|
44
42
|
* Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/2.png) in overlay (which shows up on long press on message).
|
|
45
43
|
*
|
|
@@ -52,6 +50,7 @@ export declare type MessageOverlayContextValue<At extends UnknownType = DefaultA
|
|
|
52
50
|
* **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/OverlayReactions.tsx)
|
|
53
51
|
*/
|
|
54
52
|
OverlayReactions: React.ComponentType<OverlayReactionsProps>;
|
|
53
|
+
OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;
|
|
55
54
|
reset: () => void;
|
|
56
55
|
setData: React.Dispatch<React.SetStateAction<MessageOverlayData<At, Ch, Co, Ev, Me, Re, Us>>>;
|
|
57
56
|
data?: MessageOverlayData<At, Ch, Co, Ev, Me, Re, Us>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper around useState that provides a `reset`
|
|
4
|
+
* function to reset the state to its initial value.
|
|
5
|
+
*
|
|
6
|
+
* Will not set state after being unmounted.
|
|
7
|
+
* */
|
|
8
|
+
export declare const useResettableState: <T>(values: T) => {
|
|
9
|
+
data: T;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
setData: import("react").Dispatch<import("react").SetStateAction<T>>;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { TouchableOpacityProps } from 'react-native';
|
|
3
|
+
import type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';
|
|
3
4
|
import type { ChannelState, MessageResponse } from 'stream-chat';
|
|
4
|
-
import type { Alignment } from '../messageContext/MessageContext';
|
|
5
|
-
import type { MessageAction } from '../messageOverlayContext/MessageOverlayContext';
|
|
6
|
-
import type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';
|
|
7
|
-
import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
8
|
-
import type { Theme } from '../themeContext/utils/theme';
|
|
9
|
-
import type { TDateTimeParserInput } from '../translationContext/TranslationContext';
|
|
10
5
|
import type { AttachmentProps } from '../../components/Attachment/Attachment';
|
|
11
6
|
import type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';
|
|
12
7
|
import type { CardProps } from '../../components/Attachment/Card';
|
|
@@ -22,30 +17,31 @@ import type { MessageDeletedProps } from '../../components/Message/MessageSimple
|
|
|
22
17
|
import type { MessageFooterProps } from '../../components/Message/MessageSimple/MessageFooter';
|
|
23
18
|
import type { MessageRepliesProps } from '../../components/Message/MessageSimple/MessageReplies';
|
|
24
19
|
import type { MessageRepliesAvatarsProps } from '../../components/Message/MessageSimple/MessageRepliesAvatars';
|
|
25
|
-
import type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';
|
|
26
20
|
import type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';
|
|
21
|
+
import type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';
|
|
27
22
|
import type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';
|
|
23
|
+
import type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';
|
|
28
24
|
import type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';
|
|
25
|
+
import type { MessageActionsParams } from '../../components/Message/utils/messageActions';
|
|
29
26
|
import type { DateHeaderProps } from '../../components/MessageList/DateHeader';
|
|
30
27
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
31
28
|
import type { InlineDateSeparatorProps } from '../../components/MessageList/InlineDateSeparator';
|
|
32
29
|
import type { MessageListProps } from '../../components/MessageList/MessageList';
|
|
33
|
-
import type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';
|
|
34
30
|
import type { MessageSystemProps } from '../../components/MessageList/MessageSystem';
|
|
31
|
+
import type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';
|
|
32
|
+
import type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';
|
|
35
33
|
import type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';
|
|
36
|
-
import type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';
|
|
37
34
|
import type { ReplyProps } from '../../components/Reply/Reply';
|
|
38
35
|
import type { FlatList } from '../../native';
|
|
39
36
|
import type { DefaultAttachmentType, DefaultChannelType, DefaultCommandType, DefaultEventType, DefaultMessageType, DefaultReactionType, DefaultUserType, UnknownType } from '../../types/types';
|
|
40
37
|
import type { ReactionData } from '../../utils/utils';
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
38
|
+
import type { Alignment } from '../messageContext/MessageContext';
|
|
39
|
+
import type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';
|
|
40
|
+
import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
41
|
+
import type { Theme } from '../themeContext/utils/theme';
|
|
42
|
+
import type { TDateTimeParserInput } from '../translationContext/TranslationContext';
|
|
47
43
|
export declare type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';
|
|
48
|
-
export declare type MessagesContextValue<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> =
|
|
44
|
+
export declare type MessagesContextValue<At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = DefaultCommandType, Ev extends UnknownType = DefaultEventType, Me extends UnknownType = DefaultMessageType, Re extends UnknownType = DefaultReactionType, Us extends UnknownType = DefaultUserType> = {
|
|
49
45
|
/**
|
|
50
46
|
* UI component for Attachment.
|
|
51
47
|
* Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Attachment/Attachment.tsx)
|
|
@@ -132,6 +128,10 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
132
128
|
*/
|
|
133
129
|
MessageFooter: React.ComponentType<MessageFooterProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
134
130
|
MessageList: React.ComponentType<MessageListProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
131
|
+
/**
|
|
132
|
+
* Custom message pinned component
|
|
133
|
+
*/
|
|
134
|
+
MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
135
135
|
/**
|
|
136
136
|
* UI component for MessageReplies
|
|
137
137
|
* Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageSimple/MessageReplies.tsx)
|
|
@@ -214,16 +214,6 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
214
214
|
* @overrideType Object
|
|
215
215
|
*/
|
|
216
216
|
additionalTouchableProps?: Omit<TouchableOpacityProps, 'style'>;
|
|
217
|
-
/**
|
|
218
|
-
* When false, pop-out animation will be disabled for message bubble, onLongPress
|
|
219
|
-
*/
|
|
220
|
-
animatedLongPress?: boolean;
|
|
221
|
-
/**
|
|
222
|
-
* Full override of the block user button in the Message Actions
|
|
223
|
-
*
|
|
224
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
225
|
-
*/
|
|
226
|
-
blockUser?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
227
217
|
/**
|
|
228
218
|
* Custom UI component to override default cover (between Header and Footer) of Card component.
|
|
229
219
|
* Accepts the same props as Card component.
|
|
@@ -239,31 +229,14 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
239
229
|
* Accepts the same props as Card component.
|
|
240
230
|
*/
|
|
241
231
|
CardHeader?: React.ComponentType<CardProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
242
|
-
/**
|
|
243
|
-
* Full override of the copy message button in the Message Actions
|
|
244
|
-
*
|
|
245
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
246
|
-
*/
|
|
247
|
-
copyMessage?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
248
232
|
/**
|
|
249
233
|
* Full override of the delete message button in the Message Actions
|
|
250
234
|
*
|
|
251
235
|
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
252
236
|
*/
|
|
253
|
-
|
|
237
|
+
/** Control if the deleted message is visible to both the send and reciever, either of them or none */
|
|
238
|
+
deletedMessagesVisibilityType?: 'always' | 'never' | 'receiver' | 'sender';
|
|
254
239
|
disableTypingIndicator?: boolean;
|
|
255
|
-
/**
|
|
256
|
-
* Full override of the edit message button in the Message Actions
|
|
257
|
-
*
|
|
258
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
259
|
-
*/
|
|
260
|
-
editMessage?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
261
|
-
/**
|
|
262
|
-
* Full override of the flag message button in the Message Actions
|
|
263
|
-
*
|
|
264
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
265
|
-
*/
|
|
266
|
-
flagMessage?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
267
240
|
/**
|
|
268
241
|
* Whether messages should be aligned to right or left part of screen.
|
|
269
242
|
* By default, messages will be received messages will be aligned to left and
|
|
@@ -285,6 +258,8 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
285
258
|
handleFlag?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;
|
|
286
259
|
/** Handler to access when a mute user action is invoked */
|
|
287
260
|
handleMute?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;
|
|
261
|
+
/** Handler to access when a pin/unpin user action is invoked*/
|
|
262
|
+
handlePinMessage?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageActionType) | null;
|
|
288
263
|
/** Handler to access when a quoted reply action is invoked */
|
|
289
264
|
handleQuotedReply?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;
|
|
290
265
|
/** Handler to process a reaction */
|
|
@@ -346,66 +321,17 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
346
321
|
*
|
|
347
322
|
* @overrideType Function | Array<Objects>
|
|
348
323
|
*/
|
|
349
|
-
messageActions?: (
|
|
350
|
-
blockUser: MessageAction | null;
|
|
351
|
-
canModifyMessage: boolean;
|
|
352
|
-
copyMessage: MessageAction | null;
|
|
353
|
-
deleteMessage: MessageAction | null;
|
|
354
|
-
dismissOverlay: () => void;
|
|
355
|
-
editMessage: MessageAction | null;
|
|
356
|
-
error: boolean;
|
|
357
|
-
flagMessage: MessageAction | null;
|
|
358
|
-
isMyMessage: boolean;
|
|
359
|
-
isThreadMessage: boolean;
|
|
360
|
-
message: MessageType<At, Ch, Co, Ev, Me, Re, Us>;
|
|
361
|
-
messageReactions: boolean;
|
|
362
|
-
muteUser: MessageAction | null;
|
|
363
|
-
quotedReply: MessageAction | null;
|
|
364
|
-
retry: MessageAction | null;
|
|
365
|
-
threadReply: MessageAction | null;
|
|
366
|
-
quotedRepliesEnabled?: boolean;
|
|
367
|
-
threadRepliesEnabled?: boolean;
|
|
368
|
-
}) => (MessageAction | null)[] | undefined);
|
|
324
|
+
messageActions?: (param: MessageActionsParams<At, Ch, Co, Ev, Me, Re, Us>) => MessageActionType[];
|
|
369
325
|
/**
|
|
370
326
|
* Custom message header component
|
|
371
327
|
*/
|
|
372
328
|
MessageHeader?: React.ComponentType<MessageFooterProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
373
329
|
/** Custom UI component for message text */
|
|
374
330
|
MessageText?: React.ComponentType<MessageTextProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
375
|
-
/**
|
|
376
|
-
* Full override of the mute user button in the Message Actions
|
|
377
|
-
*
|
|
378
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
379
|
-
* */
|
|
380
|
-
muteUser?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
381
331
|
/**
|
|
382
332
|
* Theme provided only to messages that are the current users
|
|
383
333
|
*/
|
|
384
334
|
myMessageTheme?: DeepPartial<Theme>;
|
|
385
|
-
/**
|
|
386
|
-
* Add double tap handler for message.
|
|
387
|
-
*
|
|
388
|
-
* ```
|
|
389
|
-
* <Channel
|
|
390
|
-
* onDoubleTapMessage={({
|
|
391
|
-
* actionHandlers: {
|
|
392
|
-
* deleteMessage, // () => Promise<void>;
|
|
393
|
-
* editMessage, // () => void;
|
|
394
|
-
* quotedReply, // () => void;
|
|
395
|
-
* resendMessage, // () => Promise<void>;
|
|
396
|
-
* showMessageOverlay, // () => void;
|
|
397
|
-
* toggleBanUser, // () => Promise<void>;
|
|
398
|
-
* toggleMuteUser, // () => Promise<void>;
|
|
399
|
-
* toggleReaction, // (reactionType: string) => Promise<void>;
|
|
400
|
-
* },
|
|
401
|
-
* message // message object on which longPress occured
|
|
402
|
-
* }) => {
|
|
403
|
-
* // Your custom action
|
|
404
|
-
* }}
|
|
405
|
-
* />
|
|
406
|
-
* ```
|
|
407
|
-
*/
|
|
408
|
-
onDoubleTapMessage?: (payload: MessageTouchableHandlerPayload<At, Ch, Co, Ev, Me, Re, Us>) => void;
|
|
409
335
|
/**
|
|
410
336
|
* Override default handler for onLongPress on message. You have access to payload of that handler as param:
|
|
411
337
|
*
|
|
@@ -487,30 +413,13 @@ export declare type MessagesContextValue<At extends UnknownType = DefaultAttachm
|
|
|
487
413
|
* ```
|
|
488
414
|
*/
|
|
489
415
|
onPressMessage?: (payload: MessageTouchableHandlerPayload<At, Ch, Co, Ev, Me, Re, Us>) => void;
|
|
490
|
-
/**
|
|
491
|
-
* Full override of the quoted reply button in the Message Actions
|
|
492
|
-
*
|
|
493
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
494
|
-
*/
|
|
495
|
-
quotedReply?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
496
|
-
/**
|
|
497
|
-
* Full override of the resend button in the Message Actions
|
|
498
|
-
*
|
|
499
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
500
|
-
* */
|
|
501
|
-
retry?: ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction) | null;
|
|
502
416
|
/**
|
|
503
417
|
* Full override of the reaction function on Message and Message Overlay
|
|
504
418
|
*
|
|
505
419
|
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
506
420
|
* */
|
|
507
421
|
selectReaction?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => (reactionType: string) => Promise<void>;
|
|
508
|
-
|
|
509
|
-
* Full override of the thread reply button in the Message Actions
|
|
510
|
-
*
|
|
511
|
-
* Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.
|
|
512
|
-
* */
|
|
513
|
-
threadReply?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageAction;
|
|
422
|
+
targetedMessage?: string;
|
|
514
423
|
};
|
|
515
424
|
export declare const MessagesContext: React.Context<MessagesContextValue<DefaultAttachmentType, DefaultChannelType, import("stream-chat").LiteralStringForUnion, UnknownType, UnknownType, UnknownType, DefaultUserType>>;
|
|
516
425
|
export declare const MessagesProvider: <At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>({ children, value, }: React.PropsWithChildren<{
|
|
@@ -522,4 +431,4 @@ export declare const useMessagesContext: <At extends UnknownType = DefaultAttach
|
|
|
522
431
|
* typing is desired while using the HOC withMessagesContext the Props for the
|
|
523
432
|
* wrapped component must be provided as the first generic.
|
|
524
433
|
*/
|
|
525
|
-
export declare const withMessagesContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P,
|
|
434
|
+
export declare const withMessagesContext: <P extends UnknownType, At extends UnknownType = DefaultAttachmentType, Ch extends UnknownType = DefaultChannelType, Co extends string = import("stream-chat").LiteralStringForUnion, Ev extends UnknownType = UnknownType, Me extends UnknownType = UnknownType, Re extends UnknownType = UnknownType, Us extends UnknownType = DefaultUserType>(Component: React.ComponentType<P>) => React.FC<Omit<P, keyof MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>>>;
|