stream-chat-react-native-core 4.0.0-beta.5 → 4.0.0-beta.6
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 +10 -10
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +4 -4
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +15 -15
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +8 -8
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +23 -23
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +13 -13
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +2 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +4 -4
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +6 -6
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +6 -6
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +34 -34
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +5 -5
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +26 -26
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +6 -6
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +8 -8
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +4 -4
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/data.js +44 -44
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +10 -10
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +4 -4
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +15 -15
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +8 -8
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +8 -8
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +23 -23
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +13 -13
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +2 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +4 -4
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Message/Message.js +6 -6
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +3 -3
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +3 -3
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +6 -6
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +34 -34
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +5 -5
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +26 -26
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +6 -6
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +3 -3
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +8 -8
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +4 -4
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/data.js +44 -44
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -2
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +4 -4
- package/lib/typescript/components/Attachment/Card.d.ts +4 -4
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +5 -5
- package/lib/typescript/components/Attachment/Giphy.d.ts +6 -6
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +2 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +3 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +5 -5
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +9 -9
- package/lib/typescript/components/Channel/Channel.d.ts +7 -7
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +14 -14
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -7
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +9 -9
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/Message/Message.d.ts +11 -11
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +4 -4
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
- package/lib/typescript/components/Message/utils/messageActions.d.ts +5 -5
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +7 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +4 -4
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +5 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +4 -3
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +4 -4
- package/lib/typescript/components/Thread/Thread.d.ts +7 -7
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +12 -12
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +18 -18
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +33 -33
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +21 -21
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +57 -57
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +4 -4
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +20 -20
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/icons/UserAdmin.d.ts +3 -0
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +4 -4
- package/lib/typescript/utils/utils.d.ts +21 -21
- package/package.json +2 -2
- package/src/components/Attachment/Attachment.tsx +15 -56
- package/src/components/Attachment/AttachmentActions.tsx +15 -55
- package/src/components/Attachment/Card.tsx +15 -48
- package/src/components/Attachment/FileAttachment.tsx +14 -48
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/Gallery.tsx +18 -59
- package/src/components/Attachment/Giphy.tsx +18 -59
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +6 -10
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -5
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -3
- package/src/components/Attachment/utils/getAspectRatio.ts +4 -4
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +21 -61
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +5 -3
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +12 -19
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +14 -21
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +21 -24
- package/src/components/Channel/Channel.tsx +174 -257
- package/src/components/Channel/hooks/useCreateChannelContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +52 -68
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +3 -18
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +28 -49
- package/src/components/ChannelList/ChannelListMessenger.tsx +19 -70
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +3 -18
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +11 -33
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +9 -31
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +4 -19
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +11 -29
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreview.tsx +18 -51
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +11 -21
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +13 -46
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +6 -27
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -26
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +7 -28
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +6 -27
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +7 -28
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +27 -78
- package/src/components/Chat/Chat.tsx +12 -40
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +4 -19
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +30 -40
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
- package/src/components/Message/Message.tsx +40 -93
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageContent.tsx +18 -61
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +17 -58
- package/src/components/Message/MessageSimple/MessageFooter.tsx +18 -60
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageReplies.tsx +15 -56
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +5 -26
- package/src/components/Message/MessageSimple/MessageSimple.tsx +16 -57
- package/src/components/Message/MessageSimple/MessageStatus.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +19 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +16 -57
- package/src/components/Message/MessageSimple/utils/renderText.tsx +6 -27
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -19
- package/src/components/Message/hooks/useMessageActionHandlers.ts +8 -23
- package/src/components/Message/hooks/useMessageActions.tsx +8 -23
- package/src/components/Message/utils/messageActions.ts +7 -34
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +13 -54
- package/src/components/MessageInput/CommandsButton.tsx +15 -56
- package/src/components/MessageInput/FileUploadPreview.tsx +15 -57
- package/src/components/MessageInput/ImageUploadPreview.tsx +13 -55
- package/src/components/MessageInput/InputButtons.tsx +13 -54
- package/src/components/MessageInput/MessageInput.tsx +25 -66
- package/src/components/MessageInput/MoreOptionsButton.tsx +13 -54
- package/src/components/MessageInput/SendButton.tsx +13 -54
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +4 -19
- package/src/components/MessageInput/hooks/useCooldown.ts +5 -19
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +34 -76
- package/src/components/MessageList/MessageSystem.tsx +5 -26
- package/src/components/MessageList/TypingIndicator.tsx +3 -18
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/hooks/useMessageList.ts +19 -52
- package/src/components/MessageList/hooks/useTypingString.ts +5 -20
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +6 -27
- package/src/components/MessageList/utils/getGroupStyles.ts +6 -27
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -18
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +15 -56
- package/src/components/MessageOverlay/MessageActionListItem.tsx +20 -9
- package/src/components/MessageOverlay/MessageOverlay.tsx +38 -81
- package/src/components/MessageOverlay/OverlayReactionList.tsx +21 -74
- package/src/components/MessageOverlay/OverlayReactions.tsx +3 -18
- package/src/components/Reply/Reply.tsx +22 -69
- package/src/components/Thread/Thread.tsx +20 -53
- package/src/components/Thread/components/ThreadFooterComponent.tsx +12 -47
- package/src/components/docs/data.js +38 -37
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +9 -7
- package/src/contexts/channelContext/ChannelContext.tsx +15 -48
- package/src/contexts/channelsContext/ChannelsContext.tsx +22 -59
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +38 -115
- package/src/contexts/channelsStateContext/useChannelState.ts +27 -60
- package/src/contexts/chatContext/ChatContext.tsx +14 -49
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +12 -54
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -7
- package/src/contexts/messageContext/MessageContext.tsx +15 -48
- package/src/contexts/messageInputContext/MessageInputContext.tsx +61 -110
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +5 -20
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +7 -31
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +24 -71
- package/src/contexts/messagesContext/MessagesContext.tsx +60 -99
- package/src/contexts/overlayContext/OverlayContext.tsx +18 -26
- package/src/contexts/overlayContext/OverlayProvider.tsx +7 -22
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +13 -53
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +39 -40
- package/src/contexts/threadContext/ThreadContext.tsx +13 -46
- package/src/contexts/translationContext/TranslationContext.tsx +12 -7
- package/src/contexts/typingContext/TypingContext.tsx +11 -44
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/utils.ts +63 -128
- package/src/version.json +1 -1
|
@@ -5,17 +5,9 @@ import type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/typ
|
|
|
5
5
|
|
|
6
6
|
import type { AttachmentPickerProps } from '../../components/AttachmentPicker/AttachmentPicker';
|
|
7
7
|
import type { ImageGalleryCustomComponents } from '../../components/ImageGallery/ImageGallery';
|
|
8
|
+
|
|
8
9
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
9
|
-
import type {
|
|
10
|
-
DefaultAttachmentType,
|
|
11
|
-
DefaultChannelType,
|
|
12
|
-
DefaultCommandType,
|
|
13
|
-
DefaultEventType,
|
|
14
|
-
DefaultMessageType,
|
|
15
|
-
DefaultReactionType,
|
|
16
|
-
DefaultUserType,
|
|
17
|
-
UnknownType,
|
|
18
|
-
} from '../../types/types';
|
|
10
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
19
11
|
import type { Streami18n } from '../../utils/Streami18n';
|
|
20
12
|
import type { AttachmentPickerContextValue } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
21
13
|
import type { MessageOverlayContextValue } from '../messageOverlayContext/MessageOverlayContext';
|
|
@@ -35,13 +27,7 @@ export type OverlayContextValue = {
|
|
|
35
27
|
export const OverlayContext = React.createContext<OverlayContextValue>({} as OverlayContextValue);
|
|
36
28
|
|
|
37
29
|
export type OverlayProviderProps<
|
|
38
|
-
|
|
39
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
40
|
-
Co extends string = DefaultCommandType,
|
|
41
|
-
Ev extends UnknownType = DefaultEventType,
|
|
42
|
-
Me extends UnknownType = DefaultMessageType,
|
|
43
|
-
Re extends UnknownType = DefaultReactionType,
|
|
44
|
-
Us extends UnknownType = DefaultUserType,
|
|
30
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
45
31
|
> = Partial<AttachmentPickerProps> &
|
|
46
32
|
Partial<
|
|
47
33
|
Pick<
|
|
@@ -55,10 +41,10 @@ export type OverlayProviderProps<
|
|
|
55
41
|
| 'topInset'
|
|
56
42
|
>
|
|
57
43
|
> &
|
|
58
|
-
ImageGalleryCustomComponents<
|
|
44
|
+
ImageGalleryCustomComponents<StreamChatGenerics> &
|
|
59
45
|
Partial<
|
|
60
46
|
Pick<
|
|
61
|
-
MessageOverlayContextValue<
|
|
47
|
+
MessageOverlayContextValue<StreamChatGenerics>,
|
|
62
48
|
| 'MessageActionList'
|
|
63
49
|
| 'MessageActionListItem'
|
|
64
50
|
| 'OverlayReactionList'
|
|
@@ -76,7 +62,7 @@ export type OverlayProviderProps<
|
|
|
76
62
|
imageGalleryGridSnapPoints?: [string | number, string | number];
|
|
77
63
|
isMyMessage?: boolean;
|
|
78
64
|
isThreadMessage?: boolean;
|
|
79
|
-
message?: MessageType<
|
|
65
|
+
message?: MessageType<StreamChatGenerics>;
|
|
80
66
|
messageReactions?: boolean;
|
|
81
67
|
messageTextNumberOfLines?: number;
|
|
82
68
|
numberOfImageGalleryGridColumns?: number;
|
|
@@ -86,14 +72,20 @@ export type OverlayProviderProps<
|
|
|
86
72
|
|
|
87
73
|
export const useOverlayContext = () => useContext(OverlayContext);
|
|
88
74
|
|
|
89
|
-
export const withOverlayContext = <
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
75
|
+
export const withOverlayContext = <
|
|
76
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
77
|
+
>(
|
|
78
|
+
Component: React.ComponentType<StreamChatGenerics>,
|
|
79
|
+
): React.FC<Omit<StreamChatGenerics, keyof OverlayContextValue>> => {
|
|
80
|
+
const WithOverlayContextComponent = (
|
|
81
|
+
props: Omit<StreamChatGenerics, keyof OverlayContextValue>,
|
|
82
|
+
) => {
|
|
93
83
|
const overlayContext = useOverlayContext();
|
|
94
84
|
|
|
95
|
-
return <Component {...(props as
|
|
85
|
+
return <Component {...(props as StreamChatGenerics)} {...overlayContext} />;
|
|
96
86
|
};
|
|
97
|
-
WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(
|
|
87
|
+
WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(
|
|
88
|
+
Component as React.ComponentType,
|
|
89
|
+
)}`;
|
|
98
90
|
return WithOverlayContextComponent;
|
|
99
91
|
};
|
|
@@ -28,16 +28,7 @@ import { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop
|
|
|
28
28
|
import { ChannelsStateProvider } from '../../contexts/channelsStateContext/ChannelsStateContext';
|
|
29
29
|
import { useStreami18n } from '../../hooks/useStreami18n';
|
|
30
30
|
|
|
31
|
-
import type {
|
|
32
|
-
DefaultAttachmentType,
|
|
33
|
-
DefaultChannelType,
|
|
34
|
-
DefaultCommandType,
|
|
35
|
-
DefaultEventType,
|
|
36
|
-
DefaultMessageType,
|
|
37
|
-
DefaultReactionType,
|
|
38
|
-
DefaultUserType,
|
|
39
|
-
UnknownType,
|
|
40
|
-
} from '../../types/types';
|
|
31
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
41
32
|
import { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
42
33
|
import { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';
|
|
43
34
|
import { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';
|
|
@@ -68,15 +59,9 @@ import {
|
|
|
68
59
|
* @example ./OverlayProvider.md
|
|
69
60
|
*/
|
|
70
61
|
export const OverlayProvider = <
|
|
71
|
-
|
|
72
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
73
|
-
Co extends string = DefaultCommandType,
|
|
74
|
-
Ev extends UnknownType = DefaultEventType,
|
|
75
|
-
Me extends UnknownType = DefaultMessageType,
|
|
76
|
-
Re extends UnknownType = DefaultReactionType,
|
|
77
|
-
Us extends UnknownType = DefaultUserType,
|
|
62
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
78
63
|
>(
|
|
79
|
-
props: PropsWithChildren<OverlayProviderProps<
|
|
64
|
+
props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,
|
|
80
65
|
) => {
|
|
81
66
|
const {
|
|
82
67
|
AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,
|
|
@@ -213,10 +198,10 @@ export const OverlayProvider = <
|
|
|
213
198
|
return (
|
|
214
199
|
<TranslationProvider value={translators}>
|
|
215
200
|
<OverlayContext.Provider value={overlayContext}>
|
|
216
|
-
<MessageOverlayProvider<
|
|
201
|
+
<MessageOverlayProvider<StreamChatGenerics>>
|
|
217
202
|
<AttachmentPickerProvider value={attachmentPickerContext}>
|
|
218
203
|
<ImageGalleryProvider>
|
|
219
|
-
<ChannelsStateProvider<
|
|
204
|
+
<ChannelsStateProvider<StreamChatGenerics>>{children}</ChannelsStateProvider>
|
|
220
205
|
<ThemeProvider style={overlayContext.style}>
|
|
221
206
|
<Animated.View
|
|
222
207
|
pointerEvents={overlay === 'none' ? 'none' : 'auto'}
|
|
@@ -225,7 +210,7 @@ export const OverlayProvider = <
|
|
|
225
210
|
<OverlayBackdrop style={[StyleSheet.absoluteFill, { height, width }]} />
|
|
226
211
|
</Animated.View>
|
|
227
212
|
{overlay === 'message' && (
|
|
228
|
-
<MessageOverlay<
|
|
213
|
+
<MessageOverlay<StreamChatGenerics>
|
|
229
214
|
MessageActionList={MessageActionList}
|
|
230
215
|
MessageActionListItem={MessageActionListItem}
|
|
231
216
|
messageTextNumberOfLines={messageTextNumberOfLines}
|
|
@@ -237,7 +222,7 @@ export const OverlayProvider = <
|
|
|
237
222
|
/>
|
|
238
223
|
)}
|
|
239
224
|
{overlay === 'gallery' && (
|
|
240
|
-
<ImageGallery<
|
|
225
|
+
<ImageGallery<StreamChatGenerics>
|
|
241
226
|
imageGalleryCustomComponents={imageGalleryCustomComponents}
|
|
242
227
|
imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}
|
|
243
228
|
imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}
|
|
@@ -2,26 +2,11 @@ import React, { PropsWithChildren, useContext } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { ChannelState } from 'stream-chat';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
DefaultAttachmentType,
|
|
7
|
-
DefaultChannelType,
|
|
8
|
-
DefaultCommandType,
|
|
9
|
-
DefaultEventType,
|
|
10
|
-
DefaultMessageType,
|
|
11
|
-
DefaultReactionType,
|
|
12
|
-
DefaultUserType,
|
|
13
|
-
UnknownType,
|
|
14
|
-
} from '../../types/types';
|
|
5
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
15
6
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
16
7
|
|
|
17
8
|
export type PaginatedMessageListContextValue<
|
|
18
|
-
|
|
19
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
20
|
-
Co extends string = DefaultCommandType,
|
|
21
|
-
Ev extends UnknownType = DefaultEventType,
|
|
22
|
-
Me extends UnknownType = DefaultMessageType,
|
|
23
|
-
Re extends UnknownType = DefaultReactionType,
|
|
24
|
-
Us extends UnknownType = DefaultUserType,
|
|
9
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
25
10
|
> = {
|
|
26
11
|
/**
|
|
27
12
|
* Has more messages to load
|
|
@@ -46,7 +31,7 @@ export type PaginatedMessageListContextValue<
|
|
|
46
31
|
/**
|
|
47
32
|
* Messages from client state
|
|
48
33
|
*/
|
|
49
|
-
messages: ChannelState<
|
|
34
|
+
messages: ChannelState<StreamChatGenerics>['messages'];
|
|
50
35
|
/**
|
|
51
36
|
* Set loadingMore
|
|
52
37
|
*/
|
|
@@ -62,18 +47,12 @@ export const PaginatedMessageListContext = React.createContext(
|
|
|
62
47
|
);
|
|
63
48
|
|
|
64
49
|
export const PaginatedMessageListProvider = <
|
|
65
|
-
|
|
66
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
67
|
-
Co extends string = DefaultCommandType,
|
|
68
|
-
Ev extends UnknownType = DefaultEventType,
|
|
69
|
-
Me extends UnknownType = DefaultMessageType,
|
|
70
|
-
Re extends UnknownType = DefaultReactionType,
|
|
71
|
-
Us extends UnknownType = DefaultUserType,
|
|
50
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
72
51
|
>({
|
|
73
52
|
children,
|
|
74
53
|
value,
|
|
75
54
|
}: PropsWithChildren<{
|
|
76
|
-
value?: PaginatedMessageListContextValue<
|
|
55
|
+
value?: PaginatedMessageListContextValue<StreamChatGenerics>;
|
|
77
56
|
}>) => (
|
|
78
57
|
<PaginatedMessageListContext.Provider
|
|
79
58
|
value={value as unknown as PaginatedMessageListContextValue}
|
|
@@ -83,23 +62,11 @@ export const PaginatedMessageListProvider = <
|
|
|
83
62
|
);
|
|
84
63
|
|
|
85
64
|
export const usePaginatedMessageListContext = <
|
|
86
|
-
|
|
87
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
88
|
-
Co extends string = DefaultCommandType,
|
|
89
|
-
Ev extends UnknownType = DefaultEventType,
|
|
90
|
-
Me extends UnknownType = DefaultMessageType,
|
|
91
|
-
Re extends UnknownType = DefaultReactionType,
|
|
92
|
-
Us extends UnknownType = DefaultUserType,
|
|
65
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
93
66
|
>() =>
|
|
94
|
-
useContext(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Co,
|
|
98
|
-
Ev,
|
|
99
|
-
Me,
|
|
100
|
-
Re,
|
|
101
|
-
Us
|
|
102
|
-
>;
|
|
67
|
+
useContext(
|
|
68
|
+
PaginatedMessageListContext,
|
|
69
|
+
) as unknown as PaginatedMessageListContextValue<StreamChatGenerics>;
|
|
103
70
|
|
|
104
71
|
/**
|
|
105
72
|
* Typescript currently does not support partial inference so if MessageListContextValue
|
|
@@ -108,21 +75,14 @@ export const usePaginatedMessageListContext = <
|
|
|
108
75
|
*/
|
|
109
76
|
export const withPaginatedMessageListContext = <
|
|
110
77
|
P extends UnknownType,
|
|
111
|
-
|
|
112
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
113
|
-
Co extends string = DefaultCommandType,
|
|
114
|
-
Ev extends UnknownType = DefaultEventType,
|
|
115
|
-
Me extends UnknownType = DefaultMessageType,
|
|
116
|
-
Re extends UnknownType = DefaultReactionType,
|
|
117
|
-
Us extends UnknownType = DefaultUserType,
|
|
78
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
118
79
|
>(
|
|
119
80
|
Component: React.ComponentType<P>,
|
|
120
|
-
): React.FC<Omit<P, keyof PaginatedMessageListContextValue<
|
|
81
|
+
): React.FC<Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>> => {
|
|
121
82
|
const WithPaginatedMessageListContextComponent = (
|
|
122
|
-
props: Omit<P, keyof PaginatedMessageListContextValue<
|
|
83
|
+
props: Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>,
|
|
123
84
|
) => {
|
|
124
|
-
const paginatedMessageListContext =
|
|
125
|
-
usePaginatedMessageListContext<At, Ch, Co, Ev, Me, Re, Us>();
|
|
85
|
+
const paginatedMessageListContext = usePaginatedMessageListContext<StreamChatGenerics>();
|
|
126
86
|
|
|
127
87
|
return <Component {...(props as P)} {...paginatedMessageListContext} />;
|
|
128
88
|
};
|
|
@@ -6,56 +6,58 @@ import type { AutoCompleteSuggestionHeaderProps } from '../../components/AutoCom
|
|
|
6
6
|
import type { AutoCompleteSuggestionItemProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionItem';
|
|
7
7
|
import type { AutoCompleteSuggestionListProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionList';
|
|
8
8
|
import type { Emoji } from '../../emoji-data/compiled';
|
|
9
|
-
import type {
|
|
9
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
10
10
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
11
11
|
|
|
12
12
|
export type SuggestionComponentType = 'command' | 'emoji' | 'mention';
|
|
13
13
|
|
|
14
14
|
export const isSuggestionCommand = <
|
|
15
|
-
|
|
16
|
-
Us extends UnknownType = DefaultUserType,
|
|
15
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
17
16
|
>(
|
|
18
|
-
suggestion: Suggestion<
|
|
19
|
-
): suggestion is SuggestionCommand<
|
|
17
|
+
suggestion: Suggestion<StreamChatGenerics>,
|
|
18
|
+
): suggestion is SuggestionCommand<StreamChatGenerics> => 'args' in suggestion;
|
|
20
19
|
|
|
21
20
|
export const isSuggestionEmoji = <
|
|
22
|
-
|
|
23
|
-
Us extends UnknownType = DefaultUserType,
|
|
21
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
24
22
|
>(
|
|
25
|
-
suggestion: Suggestion<
|
|
23
|
+
suggestion: Suggestion<StreamChatGenerics>,
|
|
26
24
|
): suggestion is Emoji => 'unicode' in suggestion;
|
|
27
25
|
|
|
28
26
|
export const isSuggestionUser = <
|
|
29
|
-
|
|
30
|
-
Us extends UnknownType = DefaultUserType,
|
|
27
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
31
28
|
>(
|
|
32
|
-
suggestion: Suggestion<
|
|
33
|
-
): suggestion is SuggestionUser<
|
|
29
|
+
suggestion: Suggestion<StreamChatGenerics>,
|
|
30
|
+
): suggestion is SuggestionUser<StreamChatGenerics> => 'id' in suggestion;
|
|
34
31
|
|
|
35
32
|
export type Suggestion<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
> = Emoji | SuggestionCommand<Co> | SuggestionUser<Us>;
|
|
33
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
34
|
+
> = Emoji | SuggestionCommand<StreamChatGenerics> | SuggestionUser<StreamChatGenerics>;
|
|
39
35
|
|
|
40
|
-
export type SuggestionCommand<
|
|
41
|
-
|
|
36
|
+
export type SuggestionCommand<
|
|
37
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
38
|
+
> = CommandResponse<StreamChatGenerics>;
|
|
39
|
+
export type SuggestionUser<
|
|
40
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
41
|
+
> = UserResponse<StreamChatGenerics>;
|
|
42
42
|
|
|
43
43
|
export type Suggestions<
|
|
44
|
-
|
|
45
|
-
Us extends UnknownType = DefaultUserType,
|
|
44
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
46
45
|
> = {
|
|
47
|
-
data: Suggestion<
|
|
48
|
-
onSelect: (item: Suggestion<
|
|
46
|
+
data: Suggestion<StreamChatGenerics>[];
|
|
47
|
+
onSelect: (item: Suggestion<StreamChatGenerics>) => void;
|
|
49
48
|
queryText?: string;
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
export type SuggestionsContextValue<
|
|
53
|
-
|
|
54
|
-
Us extends UnknownType = DefaultUserType,
|
|
52
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
55
53
|
> = {
|
|
56
54
|
AutoCompleteSuggestionHeader: React.ComponentType<AutoCompleteSuggestionHeaderProps>;
|
|
57
|
-
AutoCompleteSuggestionItem: React.ComponentType<
|
|
58
|
-
|
|
55
|
+
AutoCompleteSuggestionItem: React.ComponentType<
|
|
56
|
+
AutoCompleteSuggestionItemProps<StreamChatGenerics>
|
|
57
|
+
>;
|
|
58
|
+
AutoCompleteSuggestionList: React.ComponentType<
|
|
59
|
+
AutoCompleteSuggestionListProps<StreamChatGenerics>
|
|
60
|
+
>;
|
|
59
61
|
/** Override handler for closing suggestions (mentions, command autocomplete etc) */
|
|
60
62
|
closeSuggestions: () => void;
|
|
61
63
|
/**
|
|
@@ -65,7 +67,7 @@ export type SuggestionsContextValue<
|
|
|
65
67
|
* @overrideType Function
|
|
66
68
|
*/
|
|
67
69
|
openSuggestions: (component: SuggestionComponentType) => Promise<void>;
|
|
68
|
-
suggestions: Suggestions<
|
|
70
|
+
suggestions: Suggestions<StreamChatGenerics>;
|
|
69
71
|
triggerType: SuggestionComponentType;
|
|
70
72
|
/**
|
|
71
73
|
* Override handler for updating suggestions (mentions, command autocomplete etc)
|
|
@@ -73,7 +75,7 @@ export type SuggestionsContextValue<
|
|
|
73
75
|
* @param newSuggestions {Component|element} UI Component for suggestion item.
|
|
74
76
|
* @overrideType Function
|
|
75
77
|
*/
|
|
76
|
-
updateSuggestions: (newSuggestions: Suggestions<
|
|
78
|
+
updateSuggestions: (newSuggestions: Suggestions<StreamChatGenerics>) => void;
|
|
77
79
|
queryText?: string;
|
|
78
80
|
suggestionsViewActive?: boolean;
|
|
79
81
|
};
|
|
@@ -84,14 +86,13 @@ export const SuggestionsContext = React.createContext({} as SuggestionsContextVa
|
|
|
84
86
|
* This provider component exposes the properties stored within the SuggestionsContext.
|
|
85
87
|
*/
|
|
86
88
|
export const SuggestionsProvider = <
|
|
87
|
-
|
|
88
|
-
Us extends UnknownType = DefaultUserType,
|
|
89
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
89
90
|
>({
|
|
90
91
|
children,
|
|
91
92
|
value,
|
|
92
|
-
}: PropsWithChildren<{ value?: Partial<SuggestionsContextValue<
|
|
93
|
+
}: PropsWithChildren<{ value?: Partial<SuggestionsContextValue<StreamChatGenerics>> }>) => {
|
|
93
94
|
const [triggerType, setTriggerType] = useState<SuggestionComponentType | null>(null);
|
|
94
|
-
const [suggestions, setSuggestions] = useState<Suggestions<
|
|
95
|
+
const [suggestions, setSuggestions] = useState<Suggestions<StreamChatGenerics>>();
|
|
95
96
|
const [suggestionsViewActive, setSuggestionsViewActive] = useState(false);
|
|
96
97
|
|
|
97
98
|
const openSuggestions = (component: SuggestionComponentType) => {
|
|
@@ -99,7 +100,7 @@ export const SuggestionsProvider = <
|
|
|
99
100
|
setSuggestionsViewActive(true);
|
|
100
101
|
};
|
|
101
102
|
|
|
102
|
-
const updateSuggestions = (newSuggestions: Suggestions<
|
|
103
|
+
const updateSuggestions = (newSuggestions: Suggestions<StreamChatGenerics>) => {
|
|
103
104
|
setSuggestions(newSuggestions);
|
|
104
105
|
setSuggestionsViewActive(!!triggerType);
|
|
105
106
|
};
|
|
@@ -128,21 +129,19 @@ export const SuggestionsProvider = <
|
|
|
128
129
|
};
|
|
129
130
|
|
|
130
131
|
export const useSuggestionsContext = <
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
>() => useContext(SuggestionsContext) as unknown as SuggestionsContextValue<Co, Us>;
|
|
132
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
133
|
+
>() => useContext(SuggestionsContext) as unknown as SuggestionsContextValue<StreamChatGenerics>;
|
|
134
134
|
|
|
135
135
|
export const withSuggestionsContext = <
|
|
136
136
|
P extends UnknownType,
|
|
137
|
-
|
|
138
|
-
Us extends UnknownType = DefaultUserType,
|
|
137
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
139
138
|
>(
|
|
140
139
|
Component: React.ComponentType<P>,
|
|
141
|
-
): React.FC<Omit<P, keyof SuggestionsContextValue<
|
|
140
|
+
): React.FC<Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>> => {
|
|
142
141
|
const WithSuggestionsContextComponent = (
|
|
143
|
-
props: Omit<P, keyof SuggestionsContextValue<
|
|
142
|
+
props: Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>,
|
|
144
143
|
) => {
|
|
145
|
-
const suggestionsContext = useSuggestionsContext<
|
|
144
|
+
const suggestionsContext = useSuggestionsContext<StreamChatGenerics>();
|
|
146
145
|
|
|
147
146
|
return <Component {...(props as P)} {...suggestionsContext} />;
|
|
148
147
|
};
|
|
@@ -3,54 +3,33 @@ import React, { PropsWithChildren, useContext } from 'react';
|
|
|
3
3
|
import type { ChannelState } from 'stream-chat';
|
|
4
4
|
|
|
5
5
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
6
|
-
import type {
|
|
7
|
-
DefaultAttachmentType,
|
|
8
|
-
DefaultChannelType,
|
|
9
|
-
DefaultCommandType,
|
|
10
|
-
DefaultEventType,
|
|
11
|
-
DefaultMessageType,
|
|
12
|
-
DefaultReactionType,
|
|
13
|
-
DefaultUserType,
|
|
14
|
-
UnknownType,
|
|
15
|
-
} from '../../types/types';
|
|
6
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
16
7
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
17
8
|
|
|
18
9
|
export type ThreadContextValue<
|
|
19
|
-
|
|
20
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
21
|
-
Co extends string = DefaultCommandType,
|
|
22
|
-
Ev extends UnknownType = DefaultEventType,
|
|
23
|
-
Me extends UnknownType = DefaultMessageType,
|
|
24
|
-
Re extends UnknownType = DefaultReactionType,
|
|
25
|
-
Us extends UnknownType = DefaultUserType,
|
|
10
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
26
11
|
> = {
|
|
27
12
|
allowThreadMessagesInChannel: boolean;
|
|
28
13
|
closeThread: () => void;
|
|
29
14
|
loadMoreThread: () => Promise<void>;
|
|
30
|
-
openThread: (message: MessageType<
|
|
15
|
+
openThread: (message: MessageType<StreamChatGenerics>) => void;
|
|
31
16
|
reloadThread: () => void;
|
|
32
17
|
setThreadLoadingMore: React.Dispatch<React.SetStateAction<boolean>>;
|
|
33
|
-
thread: MessageType<
|
|
18
|
+
thread: MessageType<StreamChatGenerics> | null;
|
|
34
19
|
threadHasMore: boolean;
|
|
35
20
|
threadLoadingMore: boolean;
|
|
36
|
-
threadMessages: ChannelState<
|
|
21
|
+
threadMessages: ChannelState<StreamChatGenerics>['threads'][string];
|
|
37
22
|
};
|
|
38
23
|
|
|
39
24
|
export const ThreadContext = React.createContext({} as ThreadContextValue);
|
|
40
25
|
|
|
41
26
|
export const ThreadProvider = <
|
|
42
|
-
|
|
43
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
44
|
-
Co extends string = DefaultCommandType,
|
|
45
|
-
Ev extends UnknownType = DefaultEventType,
|
|
46
|
-
Me extends UnknownType = DefaultMessageType,
|
|
47
|
-
Re extends UnknownType = DefaultReactionType,
|
|
48
|
-
Us extends UnknownType = DefaultUserType,
|
|
27
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
49
28
|
>({
|
|
50
29
|
children,
|
|
51
30
|
value,
|
|
52
31
|
}: PropsWithChildren<{
|
|
53
|
-
value: ThreadContextValue<
|
|
32
|
+
value: ThreadContextValue<StreamChatGenerics>;
|
|
54
33
|
}>) => (
|
|
55
34
|
<ThreadContext.Provider value={value as unknown as ThreadContextValue}>
|
|
56
35
|
{children}
|
|
@@ -58,14 +37,8 @@ export const ThreadProvider = <
|
|
|
58
37
|
);
|
|
59
38
|
|
|
60
39
|
export const useThreadContext = <
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Co extends string = DefaultCommandType,
|
|
64
|
-
Ev extends UnknownType = DefaultEventType,
|
|
65
|
-
Me extends UnknownType = DefaultMessageType,
|
|
66
|
-
Re extends UnknownType = DefaultReactionType,
|
|
67
|
-
Us extends UnknownType = DefaultUserType,
|
|
68
|
-
>() => useContext(ThreadContext) as unknown as ThreadContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
40
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
41
|
+
>() => useContext(ThreadContext) as unknown as ThreadContextValue<StreamChatGenerics>;
|
|
69
42
|
|
|
70
43
|
/**
|
|
71
44
|
* Typescript currently does not support partial inference so if ThreadContext
|
|
@@ -74,20 +47,14 @@ export const useThreadContext = <
|
|
|
74
47
|
*/
|
|
75
48
|
export const withThreadContext = <
|
|
76
49
|
P extends UnknownType,
|
|
77
|
-
|
|
78
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
79
|
-
Co extends string = DefaultCommandType,
|
|
80
|
-
Ev extends UnknownType = DefaultEventType,
|
|
81
|
-
Me extends UnknownType = DefaultMessageType,
|
|
82
|
-
Re extends UnknownType = DefaultReactionType,
|
|
83
|
-
Us extends UnknownType = DefaultUserType,
|
|
50
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
84
51
|
>(
|
|
85
52
|
Component: React.ComponentType<P>,
|
|
86
|
-
): React.FC<Omit<P, keyof ThreadContextValue<
|
|
53
|
+
): React.FC<Omit<P, keyof ThreadContextValue<StreamChatGenerics>>> => {
|
|
87
54
|
const WithThreadContextComponent = (
|
|
88
|
-
props: Omit<P, keyof ThreadContextValue<
|
|
55
|
+
props: Omit<P, keyof ThreadContextValue<StreamChatGenerics>>,
|
|
89
56
|
) => {
|
|
90
|
-
const threadContext = useThreadContext<
|
|
57
|
+
const threadContext = useThreadContext<StreamChatGenerics>();
|
|
91
58
|
|
|
92
59
|
return <Component {...(props as P)} {...threadContext} />;
|
|
93
60
|
};
|
|
@@ -5,7 +5,8 @@ import Dayjs from 'dayjs';
|
|
|
5
5
|
import type { TFunction } from 'i18next';
|
|
6
6
|
import type { Moment } from 'moment';
|
|
7
7
|
|
|
8
|
-
import type {
|
|
8
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
9
|
+
|
|
9
10
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
10
11
|
|
|
11
12
|
export const isDayOrMoment = (output: TDateTimeParserOutput): output is Dayjs.Dayjs | Moment =>
|
|
@@ -35,16 +36,20 @@ export const TranslationProvider: React.FC<{
|
|
|
35
36
|
|
|
36
37
|
export const useTranslationContext = () => useContext(TranslationContext);
|
|
37
38
|
|
|
38
|
-
export const withTranslationContext = <
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
export const withTranslationContext = <
|
|
40
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
41
|
+
>(
|
|
42
|
+
Component: React.ComponentType<StreamChatGenerics>,
|
|
43
|
+
): React.FC<Omit<StreamChatGenerics, keyof TranslationContextValue>> => {
|
|
44
|
+
const WithTranslationContextComponent = (
|
|
45
|
+
props: Omit<StreamChatGenerics, keyof TranslationContextValue>,
|
|
46
|
+
) => {
|
|
42
47
|
const translationContext = useTranslationContext();
|
|
43
48
|
|
|
44
|
-
return <Component {...(props as
|
|
49
|
+
return <Component {...(props as StreamChatGenerics)} {...translationContext} />;
|
|
45
50
|
};
|
|
46
51
|
WithTranslationContextComponent.displayName = `WithTranslationContext${getDisplayName(
|
|
47
|
-
Component,
|
|
52
|
+
Component as React.ComponentType,
|
|
48
53
|
)}`;
|
|
49
54
|
return WithTranslationContextComponent;
|
|
50
55
|
};
|
|
@@ -2,45 +2,24 @@ import React, { PropsWithChildren, useContext } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { ChannelState } from 'stream-chat';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
DefaultAttachmentType,
|
|
7
|
-
DefaultChannelType,
|
|
8
|
-
DefaultCommandType,
|
|
9
|
-
DefaultEventType,
|
|
10
|
-
DefaultMessageType,
|
|
11
|
-
DefaultReactionType,
|
|
12
|
-
DefaultUserType,
|
|
13
|
-
UnknownType,
|
|
14
|
-
} from '../../types/types';
|
|
5
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
15
6
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
16
7
|
|
|
17
8
|
export type TypingContextValue<
|
|
18
|
-
|
|
19
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
20
|
-
Co extends string = DefaultCommandType,
|
|
21
|
-
Ev extends UnknownType = DefaultEventType,
|
|
22
|
-
Me extends UnknownType = DefaultMessageType,
|
|
23
|
-
Re extends UnknownType = DefaultReactionType,
|
|
24
|
-
Us extends UnknownType = DefaultUserType,
|
|
9
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
25
10
|
> = {
|
|
26
|
-
typing: ChannelState<
|
|
11
|
+
typing: ChannelState<StreamChatGenerics>['typing'];
|
|
27
12
|
};
|
|
28
13
|
|
|
29
14
|
export const TypingContext = React.createContext({} as TypingContextValue);
|
|
30
15
|
|
|
31
16
|
export const TypingProvider = <
|
|
32
|
-
|
|
33
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
34
|
-
Co extends string = DefaultCommandType,
|
|
35
|
-
Ev extends UnknownType = DefaultEventType,
|
|
36
|
-
Me extends UnknownType = DefaultMessageType,
|
|
37
|
-
Re extends UnknownType = DefaultReactionType,
|
|
38
|
-
Us extends UnknownType = DefaultUserType,
|
|
17
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
39
18
|
>({
|
|
40
19
|
children,
|
|
41
20
|
value,
|
|
42
21
|
}: PropsWithChildren<{
|
|
43
|
-
value: TypingContextValue<
|
|
22
|
+
value: TypingContextValue<StreamChatGenerics>;
|
|
44
23
|
}>) => (
|
|
45
24
|
<TypingContext.Provider value={value as unknown as TypingContextValue}>
|
|
46
25
|
{children}
|
|
@@ -48,14 +27,8 @@ export const TypingProvider = <
|
|
|
48
27
|
);
|
|
49
28
|
|
|
50
29
|
export const useTypingContext = <
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Co extends string = DefaultCommandType,
|
|
54
|
-
Ev extends UnknownType = DefaultEventType,
|
|
55
|
-
Me extends UnknownType = DefaultMessageType,
|
|
56
|
-
Re extends UnknownType = DefaultReactionType,
|
|
57
|
-
Us extends UnknownType = DefaultUserType,
|
|
58
|
-
>() => useContext(TypingContext) as unknown as TypingContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
30
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
31
|
+
>() => useContext(TypingContext) as unknown as TypingContextValue<StreamChatGenerics>;
|
|
59
32
|
|
|
60
33
|
/**
|
|
61
34
|
* Typescript currently does not support partial inference so if TypingContext
|
|
@@ -64,20 +37,14 @@ export const useTypingContext = <
|
|
|
64
37
|
*/
|
|
65
38
|
export const withTypingContext = <
|
|
66
39
|
P extends UnknownType,
|
|
67
|
-
|
|
68
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
69
|
-
Co extends string = DefaultCommandType,
|
|
70
|
-
Ev extends UnknownType = DefaultEventType,
|
|
71
|
-
Me extends UnknownType = DefaultMessageType,
|
|
72
|
-
Re extends UnknownType = DefaultReactionType,
|
|
73
|
-
Us extends UnknownType = DefaultUserType,
|
|
40
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
74
41
|
>(
|
|
75
42
|
Component: React.ComponentType<P>,
|
|
76
|
-
): React.FC<Omit<P, keyof TypingContextValue<
|
|
43
|
+
): React.FC<Omit<P, keyof TypingContextValue<StreamChatGenerics>>> => {
|
|
77
44
|
const WithTypingContextComponent = (
|
|
78
|
-
props: Omit<P, keyof TypingContextValue<
|
|
45
|
+
props: Omit<P, keyof TypingContextValue<StreamChatGenerics>>,
|
|
79
46
|
) => {
|
|
80
|
-
const typingContext = useTypingContext<
|
|
47
|
+
const typingContext = useTypingContext<StreamChatGenerics>();
|
|
81
48
|
|
|
82
49
|
return <Component {...(props as P)} {...typingContext} />;
|
|
83
50
|
};
|