stream-chat-react-native-core 4.0.0-beta.5 → 4.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js +10 -10
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +4 -4
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +15 -15
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +8 -8
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +23 -23
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +13 -13
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +2 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +8 -4
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +6 -6
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +6 -6
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +34 -34
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +5 -5
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +26 -26
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +6 -6
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +8 -8
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +4 -4
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/data.js +44 -44
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -4
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +21 -10
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +10 -10
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +4 -4
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +15 -15
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +8 -8
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +8 -8
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +23 -23
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +13 -13
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +2 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +8 -4
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Message/Message.js +6 -6
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +18 -18
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +14 -14
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +3 -3
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +3 -3
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +6 -6
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +34 -34
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +5 -5
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +26 -26
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +6 -6
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +3 -3
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +8 -8
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +4 -4
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/data.js +44 -44
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -4
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -2
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/init.js +13 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +21 -10
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +4 -4
- package/lib/typescript/components/Attachment/Card.d.ts +4 -4
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +5 -5
- package/lib/typescript/components/Attachment/Giphy.d.ts +6 -6
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +2 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +3 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +5 -5
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +9 -9
- package/lib/typescript/components/Channel/Channel.d.ts +7 -7
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +14 -14
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -7
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +9 -9
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/Message/Message.d.ts +11 -11
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +4 -4
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
- package/lib/typescript/components/Message/utils/messageActions.d.ts +5 -5
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +7 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +4 -4
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +5 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +4 -3
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +4 -4
- package/lib/typescript/components/Thread/Thread.d.ts +7 -7
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +12 -12
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +18 -18
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +33 -33
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +21 -21
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +57 -57
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +4 -4
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +20 -20
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/icons/UserAdmin.d.ts +3 -0
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +4 -4
- package/lib/typescript/utils/getResizedImageUrl.d.ts +2 -1
- package/lib/typescript/utils/utils.d.ts +21 -21
- package/package.json +3 -5
- package/src/components/Attachment/Attachment.tsx +15 -56
- package/src/components/Attachment/AttachmentActions.tsx +15 -55
- package/src/components/Attachment/Card.tsx +15 -48
- package/src/components/Attachment/FileAttachment.tsx +14 -48
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/Gallery.tsx +18 -59
- package/src/components/Attachment/Giphy.tsx +18 -59
- package/src/components/Attachment/__tests__/buildGallery.test.js +4 -4
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +6 -10
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -5
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -3
- package/src/components/Attachment/utils/getAspectRatio.ts +4 -4
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +21 -61
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +5 -3
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +12 -19
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +14 -21
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +21 -24
- package/src/components/Channel/Channel.tsx +174 -257
- package/src/components/Channel/hooks/useCreateChannelContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +52 -68
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +3 -18
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +28 -49
- package/src/components/ChannelList/ChannelListMessenger.tsx +19 -70
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +3 -18
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +11 -33
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +9 -31
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +4 -19
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +11 -29
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreview.tsx +18 -51
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +11 -21
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +13 -46
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +6 -27
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -26
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +7 -28
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +6 -27
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +7 -28
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +27 -78
- package/src/components/Chat/Chat.tsx +15 -40
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +4 -19
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +30 -40
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
- package/src/components/Message/Message.tsx +40 -93
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageContent.tsx +18 -61
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +17 -58
- package/src/components/Message/MessageSimple/MessageFooter.tsx +18 -60
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageReplies.tsx +15 -56
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +5 -26
- package/src/components/Message/MessageSimple/MessageSimple.tsx +16 -57
- package/src/components/Message/MessageSimple/MessageStatus.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +19 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +16 -57
- package/src/components/Message/MessageSimple/utils/renderText.tsx +6 -27
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -19
- package/src/components/Message/hooks/useMessageActionHandlers.ts +8 -23
- package/src/components/Message/hooks/useMessageActions.tsx +8 -23
- package/src/components/Message/utils/messageActions.ts +7 -34
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +13 -54
- package/src/components/MessageInput/CommandsButton.tsx +15 -56
- package/src/components/MessageInput/FileUploadPreview.tsx +15 -57
- package/src/components/MessageInput/ImageUploadPreview.tsx +13 -55
- package/src/components/MessageInput/InputButtons.tsx +13 -54
- package/src/components/MessageInput/MessageInput.tsx +25 -66
- package/src/components/MessageInput/MoreOptionsButton.tsx +13 -54
- package/src/components/MessageInput/SendButton.tsx +13 -54
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +4 -19
- package/src/components/MessageInput/hooks/useCooldown.ts +5 -19
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +34 -76
- package/src/components/MessageList/MessageSystem.tsx +5 -26
- package/src/components/MessageList/TypingIndicator.tsx +3 -18
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/hooks/useMessageList.ts +19 -52
- package/src/components/MessageList/hooks/useTypingString.ts +5 -20
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +6 -27
- package/src/components/MessageList/utils/getGroupStyles.ts +6 -27
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -18
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +15 -56
- package/src/components/MessageOverlay/MessageActionListItem.tsx +20 -9
- package/src/components/MessageOverlay/MessageOverlay.tsx +38 -81
- package/src/components/MessageOverlay/OverlayReactionList.tsx +21 -74
- package/src/components/MessageOverlay/OverlayReactions.tsx +3 -18
- package/src/components/Reply/Reply.tsx +22 -69
- package/src/components/Thread/Thread.tsx +20 -53
- package/src/components/Thread/components/ThreadFooterComponent.tsx +12 -47
- package/src/components/docs/data.js +38 -37
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +9 -7
- package/src/contexts/channelContext/ChannelContext.tsx +15 -48
- package/src/contexts/channelsContext/ChannelsContext.tsx +22 -59
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +38 -115
- package/src/contexts/channelsStateContext/useChannelState.ts +27 -60
- package/src/contexts/chatContext/ChatContext.tsx +14 -49
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +12 -54
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -7
- package/src/contexts/messageContext/MessageContext.tsx +15 -48
- package/src/contexts/messageInputContext/MessageInputContext.tsx +61 -112
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +5 -20
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +7 -31
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +24 -71
- package/src/contexts/messagesContext/MessagesContext.tsx +60 -99
- package/src/contexts/overlayContext/OverlayContext.tsx +18 -26
- package/src/contexts/overlayContext/OverlayProvider.tsx +7 -22
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +13 -53
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +39 -40
- package/src/contexts/threadContext/ThreadContext.tsx +13 -46
- package/src/contexts/translationContext/TranslationContext.tsx +12 -7
- package/src/contexts/typingContext/TypingContext.tsx +11 -44
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/init.ts +5 -0
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/__tests__/getResizedImageUrl.test.js +57 -0
- package/src/utils/getResizedImageUrl.ts +33 -17
- package/src/utils/utils.ts +63 -128
- package/src/version.json +1 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
- package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
- package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
- package/lib/commonjs/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/BottomSheet.js +0 -25
- package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/module/styleguideComponents/JsDoc.js +0 -87
- package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/module/styleguideComponents/Markdown.js +0 -12
- package/lib/module/styleguideComponents/Markdown.js.map +0 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/Reanimated.js +0 -2
- package/lib/module/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/module/styleguideComponents/Wrapper.js +0 -29
- package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -60
- package/src/styleguideComponents/BottomSheet.tsx +0 -3
- package/src/styleguideComponents/JsDoc.tsx +0 -45
- package/src/styleguideComponents/Markdown.tsx +0 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +0 -45
- package/src/styleguideComponents/PropsRenderer.tsx +0 -141
- package/src/styleguideComponents/Reanimated.tsx +0 -0
- package/src/styleguideComponents/Wrapper.tsx +0 -7
- package/src/styleguideComponents/register-react-native-web.js +0 -13
- package/src/styleguideComponents/resolveAssetSource.js +0 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* global require */
|
|
2
|
-
|
|
3
|
-
const StreamChat = require('stream-chat').StreamChat;
|
|
4
2
|
const Dayjs = require('dayjs');
|
|
3
|
+
const StreamChat = require('stream-chat').StreamChat;
|
|
5
4
|
export const client = new StreamChat('qk4nn7rpcn75');
|
|
6
5
|
|
|
7
6
|
client.connectUser(
|
|
@@ -18,8 +17,8 @@ export const channel = client.channel('messaging', 'general', {
|
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
export const channelContext = {
|
|
21
|
-
client,
|
|
22
20
|
channel,
|
|
21
|
+
client,
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
export const translationContext = {
|
|
@@ -27,13 +26,13 @@ export const translationContext = {
|
|
|
27
26
|
tDateTimeParser: (date) => Dayjs(date),
|
|
28
27
|
};
|
|
29
28
|
export const suggestionsContext = {
|
|
30
|
-
openSuggestions: () => {},
|
|
31
29
|
closeSuggestions: () => {},
|
|
30
|
+
openSuggestions: () => {},
|
|
32
31
|
setInputBoxContainerRef: () => {},
|
|
33
32
|
updateSuggestions: () => {},
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
const filters = { type: 'team'
|
|
35
|
+
const filters = { example: 1, type: 'team' };
|
|
37
36
|
const sort = { last_message_at: -1 };
|
|
38
37
|
|
|
39
38
|
export const channels = client.queryChannels(filters, sort, {
|
|
@@ -41,11 +40,14 @@ export const channels = client.queryChannels(filters, sort, {
|
|
|
41
40
|
});
|
|
42
41
|
|
|
43
42
|
export const message = {
|
|
43
|
+
__html:
|
|
44
|
+
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
44
45
|
attachments: [],
|
|
45
46
|
command: '',
|
|
46
47
|
created_at: '2019-01-25T00:18:59.675Z',
|
|
47
48
|
html:
|
|
48
49
|
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
50
|
+
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
49
51
|
own_reactions: [
|
|
50
52
|
{
|
|
51
53
|
created_at: '2019-01-25T16:24:00.173967Z',
|
|
@@ -111,8 +113,8 @@ export const message = {
|
|
|
111
113
|
},
|
|
112
114
|
],
|
|
113
115
|
reply_count: 0,
|
|
116
|
+
status: 'received',
|
|
114
117
|
text: 'Hey this is getstream message',
|
|
115
|
-
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
116
118
|
type: 'regular',
|
|
117
119
|
updated_at: '2019-01-25T16:24:00.181Z',
|
|
118
120
|
user: {
|
|
@@ -125,12 +127,11 @@ export const message = {
|
|
|
125
127
|
role: 'user',
|
|
126
128
|
updated_at: '2019-01-25T16:23:47.052538Z',
|
|
127
129
|
},
|
|
128
|
-
__html:
|
|
129
|
-
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
130
|
-
status: 'received',
|
|
131
130
|
};
|
|
132
131
|
|
|
133
132
|
export const messageWithImages = {
|
|
133
|
+
__html:
|
|
134
|
+
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
134
135
|
attachments: [
|
|
135
136
|
{
|
|
136
137
|
image_url:
|
|
@@ -164,6 +165,7 @@ export const messageWithImages = {
|
|
|
164
165
|
command: '',
|
|
165
166
|
created_at: '2019-01-25T00:18:59.675Z',
|
|
166
167
|
html: '',
|
|
168
|
+
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
167
169
|
own_reactions: [
|
|
168
170
|
{
|
|
169
171
|
created_at: '2019-01-25T16:24:00.173967Z',
|
|
@@ -229,8 +231,8 @@ export const messageWithImages = {
|
|
|
229
231
|
},
|
|
230
232
|
],
|
|
231
233
|
reply_count: 0,
|
|
234
|
+
status: 'received',
|
|
232
235
|
text: 'This message contains images',
|
|
233
|
-
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
234
236
|
type: 'regular',
|
|
235
237
|
updated_at: '2019-01-25T16:24:00.181Z',
|
|
236
238
|
user: {
|
|
@@ -243,12 +245,12 @@ export const messageWithImages = {
|
|
|
243
245
|
role: 'user',
|
|
244
246
|
updated_at: '2019-01-25T16:23:47.052538Z',
|
|
245
247
|
},
|
|
246
|
-
|
|
247
|
-
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
248
|
-
status: 'received',
|
|
248
|
+
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
export const messageWithUrlPreview = {
|
|
252
|
+
__html:
|
|
253
|
+
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
252
254
|
attachments: [
|
|
253
255
|
{
|
|
254
256
|
image_url:
|
|
@@ -267,6 +269,7 @@ export const messageWithUrlPreview = {
|
|
|
267
269
|
created_at: '2019-01-25T00:18:59.675Z',
|
|
268
270
|
html:
|
|
269
271
|
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
272
|
+
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
270
273
|
own_reactions: [
|
|
271
274
|
{
|
|
272
275
|
created_at: '2019-01-25T16:24:00.173967Z',
|
|
@@ -332,8 +335,8 @@ export const messageWithUrlPreview = {
|
|
|
332
335
|
},
|
|
333
336
|
],
|
|
334
337
|
reply_count: 0,
|
|
338
|
+
status: 'received',
|
|
335
339
|
text: 'https://unsplash.com/photos/lxuB4abGzXc',
|
|
336
|
-
id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
|
|
337
340
|
type: 'regular',
|
|
338
341
|
updated_at: '2019-01-25T16:24:00.181Z',
|
|
339
342
|
user: {
|
|
@@ -346,12 +349,11 @@ export const messageWithUrlPreview = {
|
|
|
346
349
|
role: 'user',
|
|
347
350
|
updated_at: '2019-01-25T16:23:47.052538Z',
|
|
348
351
|
},
|
|
349
|
-
__html:
|
|
350
|
-
'<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
|
|
351
|
-
status: 'received',
|
|
352
352
|
};
|
|
353
353
|
|
|
354
354
|
export const thread = {
|
|
355
|
+
__html:
|
|
356
|
+
'<p>this place looks amazing: <a href="https://unsplash.com/photos/f3hDGOHptrM" rel="nofollow">https://unsplash.com/photos/f3hDGOHptrM</a></p>\n',
|
|
355
357
|
attachments: [
|
|
356
358
|
{
|
|
357
359
|
image_url:
|
|
@@ -370,12 +372,13 @@ export const thread = {
|
|
|
370
372
|
created_at: '2019-01-25T21:25:45.306Z',
|
|
371
373
|
html:
|
|
372
374
|
'<p>this place looks amazing: <a href="https://unsplash.com/photos/f3hDGOHptrM" rel="nofollow">https://unsplash.com/photos/f3hDGOHptrM</a></p>\n',
|
|
375
|
+
id: 'thierry-ec4eac2b-1278-4f49-8b20-2ebcd76dace5',
|
|
373
376
|
own_reactions: [],
|
|
374
377
|
reaction_counts: null,
|
|
375
378
|
reactions: [],
|
|
376
379
|
reply_count: 2,
|
|
380
|
+
status: 'received',
|
|
377
381
|
text: 'this place looks amazing: https://unsplash.com/photos/f3hDGOHptrM',
|
|
378
|
-
id: 'thierry-ec4eac2b-1278-4f49-8b20-2ebcd76dace5',
|
|
379
382
|
type: 'regular',
|
|
380
383
|
updated_at: '2019-01-25T21:25:45.306Z',
|
|
381
384
|
user: {
|
|
@@ -385,24 +388,24 @@ export const thread = {
|
|
|
385
388
|
role: 'user',
|
|
386
389
|
updated_at: '2019-01-25T21:27:39.606466Z',
|
|
387
390
|
},
|
|
388
|
-
|
|
389
|
-
'<p>this place looks amazing: <a href="https://unsplash.com/photos/f3hDGOHptrM" rel="nofollow">https://unsplash.com/photos/f3hDGOHptrM</a></p>\n',
|
|
390
|
-
status: 'received',
|
|
391
|
+
|
|
391
392
|
};
|
|
392
393
|
|
|
393
394
|
export const threadMessages = [
|
|
394
395
|
{
|
|
396
|
+
__html: '<p>whow, where is that?</p>\n',
|
|
395
397
|
attachments: [],
|
|
396
398
|
command: '',
|
|
397
399
|
created_at: new Date('2019-01-25T21:26:06.346Z'),
|
|
398
400
|
html: '<p>whow, where is that?</p>\n',
|
|
401
|
+
id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
|
|
399
402
|
own_reactions: [],
|
|
400
403
|
parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
|
|
401
404
|
reaction_counts: null,
|
|
402
405
|
reactions: [],
|
|
403
406
|
reply_count: 0,
|
|
407
|
+
status: 'received',
|
|
404
408
|
text: 'whow, where is that?',
|
|
405
|
-
id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
|
|
406
409
|
type: 'reply',
|
|
407
410
|
updated_at: '2019-01-25T21:26:06.346Z',
|
|
408
411
|
user: {
|
|
@@ -415,21 +418,21 @@ export const threadMessages = [
|
|
|
415
418
|
role: 'user',
|
|
416
419
|
updated_at: '2019-01-25T21:27:39.606466Z',
|
|
417
420
|
},
|
|
418
|
-
__html: '<p>whow, where is that?</p>\n',
|
|
419
|
-
status: 'received',
|
|
420
421
|
},
|
|
421
422
|
{
|
|
423
|
+
__html: '<p>it’s soo green, amazing</p>\n',
|
|
422
424
|
attachments: [],
|
|
423
425
|
command: '',
|
|
424
426
|
created_at: new Date('2019-01-25T21:26:11.863Z'),
|
|
425
427
|
html: '<p>it’s soo green, amazing</p>\n',
|
|
428
|
+
id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
|
|
426
429
|
own_reactions: [],
|
|
427
430
|
parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
|
|
428
431
|
reaction_counts: null,
|
|
429
432
|
reactions: [],
|
|
430
433
|
reply_count: 0,
|
|
434
|
+
status: 'received',
|
|
431
435
|
text: "it's soo green, amazing",
|
|
432
|
-
id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
|
|
433
436
|
type: 'reply',
|
|
434
437
|
updated_at: '2019-01-25T21:26:11.863Z',
|
|
435
438
|
user: {
|
|
@@ -442,24 +445,24 @@ export const threadMessages = [
|
|
|
442
445
|
role: 'user',
|
|
443
446
|
updated_at: '2019-01-25T21:27:39.606466Z',
|
|
444
447
|
},
|
|
445
|
-
__html: '<p>it’s soo green, amazing</p>\n',
|
|
446
|
-
status: 'received',
|
|
447
448
|
},
|
|
448
449
|
];
|
|
449
450
|
|
|
450
451
|
export const messages = [
|
|
451
452
|
{
|
|
453
|
+
__html: '<p>whow, where is that?</p>\n',
|
|
452
454
|
attachments: [],
|
|
453
455
|
command: '',
|
|
454
456
|
created_at: new Date('2019-01-25T21:26:06.346Z'),
|
|
455
457
|
html: '<p>whow, where is that?</p>\n',
|
|
458
|
+
id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
|
|
456
459
|
own_reactions: [],
|
|
457
460
|
parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
|
|
458
461
|
reaction_counts: null,
|
|
459
462
|
reactions: [],
|
|
460
463
|
reply_count: 0,
|
|
464
|
+
status: 'received',
|
|
461
465
|
text: 'whow, where is that?',
|
|
462
|
-
id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
|
|
463
466
|
type: 'reply',
|
|
464
467
|
updated_at: '2019-01-25T21:26:06.346Z',
|
|
465
468
|
user: {
|
|
@@ -472,21 +475,21 @@ export const messages = [
|
|
|
472
475
|
role: 'user',
|
|
473
476
|
updated_at: '2019-01-25T21:27:39.606466Z',
|
|
474
477
|
},
|
|
475
|
-
__html: '<p>whow, where is that?</p>\n',
|
|
476
|
-
status: 'received',
|
|
477
478
|
},
|
|
478
479
|
{
|
|
480
|
+
__html: '<p>it’s soo green, amazing</p>\n',
|
|
479
481
|
attachments: [],
|
|
480
482
|
command: '',
|
|
481
483
|
created_at: new Date('2019-01-25T21:26:11.863Z'),
|
|
482
484
|
html: '<p>it’s soo green, amazing</p>\n',
|
|
485
|
+
id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
|
|
483
486
|
own_reactions: [],
|
|
484
487
|
parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
|
|
485
488
|
reaction_counts: null,
|
|
486
489
|
reactions: [],
|
|
487
490
|
reply_count: 0,
|
|
491
|
+
status: 'received',
|
|
488
492
|
text: "it's soo green, amazing",
|
|
489
|
-
id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
|
|
490
493
|
type: 'reply',
|
|
491
494
|
updated_at: '2019-01-25T21:26:11.863Z',
|
|
492
495
|
user: {
|
|
@@ -499,8 +502,6 @@ export const messages = [
|
|
|
499
502
|
role: 'user',
|
|
500
503
|
updated_at: '2019-01-25T21:27:39.606466Z',
|
|
501
504
|
},
|
|
502
|
-
__html: '<p>it’s soo green, amazing</p>\n',
|
|
503
|
-
status: 'received',
|
|
504
505
|
},
|
|
505
506
|
];
|
|
506
507
|
|
|
@@ -516,12 +517,12 @@ export const users = [
|
|
|
516
517
|
];
|
|
517
518
|
|
|
518
519
|
export const MessageMock = {
|
|
519
|
-
handleFlag: console.log,
|
|
520
|
-
handleMute: console.log,
|
|
521
|
-
handleEdit: console.log,
|
|
522
|
-
handleDelete: console.log,
|
|
523
520
|
canDeleteMessage: () => true,
|
|
524
521
|
canEditMessage: () => true,
|
|
522
|
+
handleDelete: console.log,
|
|
523
|
+
handleEdit: console.log,
|
|
524
|
+
handleFlag: console.log,
|
|
525
|
+
handleMute: console.log,
|
|
525
526
|
};
|
|
526
527
|
|
|
527
528
|
// Based on: https://javascript.info/promise-basics#example-loadscript
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import type { Asset } from '../../native';
|
|
4
|
-
import type {
|
|
4
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
5
5
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
6
6
|
|
|
7
7
|
export type AttachmentPickerIconProps = {
|
|
@@ -117,18 +117,20 @@ export const AttachmentPickerProvider = ({
|
|
|
117
117
|
export const useAttachmentPickerContext = () =>
|
|
118
118
|
useContext(AttachmentPickerContext) as unknown as AttachmentPickerContextValue;
|
|
119
119
|
|
|
120
|
-
export const withAttachmentPickerContext = <
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
export const withAttachmentPickerContext = <
|
|
121
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
122
|
+
>(
|
|
123
|
+
Component: React.ComponentType<StreamChatGenerics>,
|
|
124
|
+
): React.FC<Omit<StreamChatGenerics, keyof AttachmentPickerContextValue>> => {
|
|
123
125
|
const WithAttachmentPickerContextComponent = (
|
|
124
|
-
props: Omit<
|
|
126
|
+
props: Omit<StreamChatGenerics, keyof AttachmentPickerContextValue>,
|
|
125
127
|
) => {
|
|
126
128
|
const attachmentPickerContext = useAttachmentPickerContext();
|
|
127
129
|
|
|
128
|
-
return <Component {...(props as
|
|
130
|
+
return <Component {...(props as StreamChatGenerics)} {...attachmentPickerContext} />;
|
|
129
131
|
};
|
|
130
132
|
WithAttachmentPickerContextComponent.displayName = `WithAttachmentPickerContext${getDisplayName(
|
|
131
|
-
Component,
|
|
133
|
+
Component as React.ComponentType,
|
|
132
134
|
)}`;
|
|
133
135
|
return WithAttachmentPickerContextComponent;
|
|
134
136
|
};
|
|
@@ -4,26 +4,11 @@ import type { Channel, ChannelState } from 'stream-chat';
|
|
|
4
4
|
|
|
5
5
|
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
|
|
6
6
|
import type { LoadingProps } from '../../components/Indicators/LoadingIndicator';
|
|
7
|
-
import type {
|
|
8
|
-
DefaultAttachmentType,
|
|
9
|
-
DefaultChannelType,
|
|
10
|
-
DefaultCommandType,
|
|
11
|
-
DefaultEventType,
|
|
12
|
-
DefaultMessageType,
|
|
13
|
-
DefaultReactionType,
|
|
14
|
-
DefaultUserType,
|
|
15
|
-
UnknownType,
|
|
16
|
-
} from '../../types/types';
|
|
7
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
17
8
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
18
9
|
|
|
19
10
|
export type ChannelContextValue<
|
|
20
|
-
|
|
21
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
22
|
-
Co extends string = DefaultCommandType,
|
|
23
|
-
Ev extends UnknownType = DefaultEventType,
|
|
24
|
-
Me extends UnknownType = DefaultMessageType,
|
|
25
|
-
Re extends UnknownType = DefaultReactionType,
|
|
26
|
-
Us extends UnknownType = DefaultUserType,
|
|
11
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
27
12
|
> = {
|
|
28
13
|
/**
|
|
29
14
|
* Instance of channel object from stream-chat package.
|
|
@@ -47,7 +32,7 @@ export type ChannelContextValue<
|
|
|
47
32
|
*
|
|
48
33
|
* @overrideType Channel
|
|
49
34
|
*/
|
|
50
|
-
channel: Channel<
|
|
35
|
+
channel: Channel<StreamChatGenerics>;
|
|
51
36
|
/**
|
|
52
37
|
* Custom UI component to display empty state when channel has no messages.
|
|
53
38
|
*
|
|
@@ -121,12 +106,12 @@ export type ChannelContextValue<
|
|
|
121
106
|
* }
|
|
122
107
|
* ```
|
|
123
108
|
*/
|
|
124
|
-
members: ChannelState<
|
|
109
|
+
members: ChannelState<StreamChatGenerics>['members'];
|
|
125
110
|
/**
|
|
126
111
|
* Custom network down indicator to override the Stream default
|
|
127
112
|
*/
|
|
128
113
|
NetworkDownIndicator: React.ComponentType;
|
|
129
|
-
read: ChannelState<
|
|
114
|
+
read: ChannelState<StreamChatGenerics>['read'];
|
|
130
115
|
reloadChannel: () => Promise<void>;
|
|
131
116
|
/**
|
|
132
117
|
* When true, messagelist will be scrolled to first unread message, when opened.
|
|
@@ -157,7 +142,7 @@ export type ChannelContextValue<
|
|
|
157
142
|
* }
|
|
158
143
|
* ```
|
|
159
144
|
*/
|
|
160
|
-
watchers: ChannelState<
|
|
145
|
+
watchers: ChannelState<StreamChatGenerics>['watchers'];
|
|
161
146
|
disabled?: boolean;
|
|
162
147
|
enableMessageGroupingByUser?: boolean;
|
|
163
148
|
isChannelActive?: boolean;
|
|
@@ -179,24 +164,18 @@ export type ChannelContextValue<
|
|
|
179
164
|
*/
|
|
180
165
|
targetedMessage?: string;
|
|
181
166
|
threadList?: boolean;
|
|
182
|
-
watcherCount?: ChannelState<
|
|
167
|
+
watcherCount?: ChannelState<StreamChatGenerics>['watcher_count'];
|
|
183
168
|
};
|
|
184
169
|
|
|
185
170
|
export const ChannelContext = React.createContext({} as ChannelContextValue);
|
|
186
171
|
|
|
187
172
|
export const ChannelProvider = <
|
|
188
|
-
|
|
189
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
190
|
-
Co extends string = DefaultCommandType,
|
|
191
|
-
Ev extends UnknownType = DefaultEventType,
|
|
192
|
-
Me extends UnknownType = DefaultMessageType,
|
|
193
|
-
Re extends UnknownType = DefaultReactionType,
|
|
194
|
-
Us extends UnknownType = DefaultUserType,
|
|
173
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
195
174
|
>({
|
|
196
175
|
children,
|
|
197
176
|
value,
|
|
198
177
|
}: PropsWithChildren<{
|
|
199
|
-
value: ChannelContextValue<
|
|
178
|
+
value: ChannelContextValue<StreamChatGenerics>;
|
|
200
179
|
}>) => (
|
|
201
180
|
<ChannelContext.Provider value={value as unknown as ChannelContextValue}>
|
|
202
181
|
{children}
|
|
@@ -204,14 +183,8 @@ export const ChannelProvider = <
|
|
|
204
183
|
);
|
|
205
184
|
|
|
206
185
|
export const useChannelContext = <
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
Co extends string = DefaultCommandType,
|
|
210
|
-
Ev extends UnknownType = DefaultEventType,
|
|
211
|
-
Me extends UnknownType = DefaultMessageType,
|
|
212
|
-
Re extends UnknownType = DefaultReactionType,
|
|
213
|
-
Us extends UnknownType = DefaultUserType,
|
|
214
|
-
>() => useContext(ChannelContext) as unknown as ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
186
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
187
|
+
>() => useContext(ChannelContext) as unknown as ChannelContextValue<StreamChatGenerics>;
|
|
215
188
|
|
|
216
189
|
/**
|
|
217
190
|
* Typescript currently does not support partial inference so if ChatContext
|
|
@@ -220,20 +193,14 @@ export const useChannelContext = <
|
|
|
220
193
|
*/
|
|
221
194
|
export const withChannelContext = <
|
|
222
195
|
P extends UnknownType,
|
|
223
|
-
|
|
224
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
225
|
-
Co extends string = DefaultCommandType,
|
|
226
|
-
Ev extends UnknownType = DefaultEventType,
|
|
227
|
-
Me extends UnknownType = DefaultMessageType,
|
|
228
|
-
Re extends UnknownType = DefaultReactionType,
|
|
229
|
-
Us extends UnknownType = DefaultUserType,
|
|
196
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
230
197
|
>(
|
|
231
198
|
Component: React.ComponentType<P>,
|
|
232
|
-
): React.FC<Omit<P, keyof ChannelContextValue<
|
|
199
|
+
): React.FC<Omit<P, keyof ChannelContextValue<StreamChatGenerics>>> => {
|
|
233
200
|
const WithChannelContextComponent = (
|
|
234
|
-
props: Omit<P, keyof ChannelContextValue<
|
|
201
|
+
props: Omit<P, keyof ChannelContextValue<StreamChatGenerics>>,
|
|
235
202
|
) => {
|
|
236
|
-
const channelContext = useChannelContext<
|
|
203
|
+
const channelContext = useChannelContext<StreamChatGenerics>();
|
|
237
204
|
|
|
238
205
|
return <Component {...(props as P)} {...channelContext} />;
|
|
239
206
|
};
|
|
@@ -18,26 +18,11 @@ import type { ChannelPreviewUnreadCountProps } from '../../components/ChannelPre
|
|
|
18
18
|
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
|
|
19
19
|
import type { LoadingErrorProps } from '../../components/Indicators/LoadingErrorIndicator';
|
|
20
20
|
import type { LoadingProps } from '../../components/Indicators/LoadingIndicator';
|
|
21
|
-
import type {
|
|
22
|
-
DefaultAttachmentType,
|
|
23
|
-
DefaultChannelType,
|
|
24
|
-
DefaultCommandType,
|
|
25
|
-
DefaultEventType,
|
|
26
|
-
DefaultMessageType,
|
|
27
|
-
DefaultReactionType,
|
|
28
|
-
DefaultUserType,
|
|
29
|
-
UnknownType,
|
|
30
|
-
} from '../../types/types';
|
|
21
|
+
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
31
22
|
import { getDisplayName } from '../utils/getDisplayName';
|
|
32
23
|
|
|
33
24
|
export type ChannelsContextValue<
|
|
34
|
-
|
|
35
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
36
|
-
Co extends string = DefaultCommandType,
|
|
37
|
-
Ev extends UnknownType = DefaultEventType,
|
|
38
|
-
Me extends UnknownType = DefaultMessageType,
|
|
39
|
-
Re extends UnknownType = DefaultReactionType,
|
|
40
|
-
Us extends UnknownType = DefaultUserType,
|
|
25
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
41
26
|
> = {
|
|
42
27
|
/**
|
|
43
28
|
* Besides the existing default behavior of the ChannelListMessenger component, you can attach
|
|
@@ -56,11 +41,11 @@ export type ChannelsContextValue<
|
|
|
56
41
|
*
|
|
57
42
|
* **Note:** Don't use `additionalFlatListProps` to access the FlatList ref, use `setFlatListRef`
|
|
58
43
|
*/
|
|
59
|
-
additionalFlatListProps: Partial<FlatListProps<Channel<
|
|
44
|
+
additionalFlatListProps: Partial<FlatListProps<Channel<StreamChatGenerics>>>;
|
|
60
45
|
/**
|
|
61
46
|
* Channels can be either an array of channels or a promise which resolves to an array of channels
|
|
62
47
|
*/
|
|
63
|
-
channels: Channel<
|
|
48
|
+
channels: Channel<StreamChatGenerics>[];
|
|
64
49
|
/**
|
|
65
50
|
* Custom indicator to use when channel list is empty
|
|
66
51
|
*
|
|
@@ -134,7 +119,7 @@ export type ChannelsContextValue<
|
|
|
134
119
|
*
|
|
135
120
|
* Default: [ChannelPreviewMessenger](https://getstream.github.io/stream-chat-react-native/v3/#channelpreviewmessenger)
|
|
136
121
|
*/
|
|
137
|
-
Preview: React.ComponentType<ChannelPreviewMessengerProps<
|
|
122
|
+
Preview: React.ComponentType<ChannelPreviewMessengerProps<StreamChatGenerics>>;
|
|
138
123
|
/**
|
|
139
124
|
* Triggered when the channel list is refreshing, displays a loading spinner at the top of the list
|
|
140
125
|
*/
|
|
@@ -153,7 +138,7 @@ export type ChannelsContextValue<
|
|
|
153
138
|
// *
|
|
154
139
|
// * @param channel A channel object
|
|
155
140
|
// */
|
|
156
|
-
// setActiveChannel?: (channel: Channel<
|
|
141
|
+
// setActiveChannel?: (channel: Channel<StreamChatGenerics>) => void;
|
|
157
142
|
/**
|
|
158
143
|
* Function to gain access to the inner FlatList ref
|
|
159
144
|
*
|
|
@@ -166,7 +151,7 @@ export type ChannelsContextValue<
|
|
|
166
151
|
* }}
|
|
167
152
|
* ```
|
|
168
153
|
*/
|
|
169
|
-
setFlatListRef: (ref: FlatList<Channel<
|
|
154
|
+
setFlatListRef: (ref: FlatList<Channel<StreamChatGenerics>> | null) => void;
|
|
170
155
|
/**
|
|
171
156
|
* Custom UI component to display loading channel skeletons
|
|
172
157
|
*
|
|
@@ -183,64 +168,54 @@ export type ChannelsContextValue<
|
|
|
183
168
|
*
|
|
184
169
|
* @param channel A channel object
|
|
185
170
|
*/
|
|
186
|
-
onSelect?: (channel: Channel<
|
|
171
|
+
onSelect?: (channel: Channel<StreamChatGenerics>) => void;
|
|
187
172
|
/**
|
|
188
173
|
* Custom UI component to render preview avatar.
|
|
189
174
|
*
|
|
190
175
|
* **Default** [ChannelAvatar](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelAvatar.tsx)
|
|
191
176
|
*/
|
|
192
|
-
PreviewAvatar?: React.ComponentType<ChannelAvatarProps<
|
|
177
|
+
PreviewAvatar?: React.ComponentType<ChannelAvatarProps<StreamChatGenerics>>;
|
|
193
178
|
/**
|
|
194
179
|
* Custom UI component to render preview of latest message on channel.
|
|
195
180
|
*
|
|
196
181
|
* **Default** [ChannelPreviewMessage](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMessage.tsx)
|
|
197
182
|
*/
|
|
198
|
-
PreviewMessage?: React.ComponentType<ChannelPreviewMessageProps<
|
|
183
|
+
PreviewMessage?: React.ComponentType<ChannelPreviewMessageProps<StreamChatGenerics>>;
|
|
199
184
|
/**
|
|
200
185
|
* Custom UI component to render muted status.
|
|
201
186
|
*
|
|
202
187
|
* **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
|
|
203
188
|
*/
|
|
204
|
-
PreviewMutedStatus?: React.ComponentType<
|
|
205
|
-
ChannelPreviewMutedStatusProps<At, Ch, Co, Ev, Me, Re, Us>
|
|
206
|
-
>;
|
|
189
|
+
PreviewMutedStatus?: React.ComponentType<ChannelPreviewMutedStatusProps<StreamChatGenerics>>;
|
|
207
190
|
/**
|
|
208
191
|
* Custom UI component to render preview avatar.
|
|
209
192
|
*
|
|
210
193
|
* **Default** [ChannelPreviewStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewStatus.tsx)
|
|
211
194
|
*/
|
|
212
|
-
PreviewStatus?: React.ComponentType<ChannelPreviewStatusProps<
|
|
195
|
+
PreviewStatus?: React.ComponentType<ChannelPreviewStatusProps<StreamChatGenerics>>;
|
|
213
196
|
/**
|
|
214
197
|
* Custom UI component to render preview avatar.
|
|
215
198
|
*
|
|
216
199
|
* **Default** [ChannelPreviewTitle](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewTitle.tsx)
|
|
217
200
|
*/
|
|
218
|
-
PreviewTitle?: React.ComponentType<ChannelPreviewTitleProps<
|
|
201
|
+
PreviewTitle?: React.ComponentType<ChannelPreviewTitleProps<StreamChatGenerics>>;
|
|
219
202
|
/**
|
|
220
203
|
* Custom UI component to render preview avatar.
|
|
221
204
|
*
|
|
222
205
|
* **Default** [ChannelPreviewUnreadCount](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx)
|
|
223
206
|
*/
|
|
224
|
-
PreviewUnreadCount?: React.ComponentType<
|
|
225
|
-
ChannelPreviewUnreadCountProps<At, Ch, Co, Ev, Me, Re, Us>
|
|
226
|
-
>;
|
|
207
|
+
PreviewUnreadCount?: React.ComponentType<ChannelPreviewUnreadCountProps<StreamChatGenerics>>;
|
|
227
208
|
};
|
|
228
209
|
|
|
229
210
|
export const ChannelsContext = React.createContext({} as ChannelsContextValue);
|
|
230
211
|
|
|
231
212
|
export const ChannelsProvider = <
|
|
232
|
-
|
|
233
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
234
|
-
Co extends string = DefaultCommandType,
|
|
235
|
-
Ev extends UnknownType = DefaultEventType,
|
|
236
|
-
Me extends UnknownType = DefaultMessageType,
|
|
237
|
-
Re extends UnknownType = DefaultReactionType,
|
|
238
|
-
Us extends UnknownType = DefaultUserType,
|
|
213
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
239
214
|
>({
|
|
240
215
|
children,
|
|
241
216
|
value,
|
|
242
217
|
}: PropsWithChildren<{
|
|
243
|
-
value: ChannelsContextValue<
|
|
218
|
+
value: ChannelsContextValue<StreamChatGenerics>;
|
|
244
219
|
}>) => (
|
|
245
220
|
<ChannelsContext.Provider value={value as unknown as ChannelsContextValue}>
|
|
246
221
|
{children}
|
|
@@ -248,14 +223,8 @@ export const ChannelsProvider = <
|
|
|
248
223
|
);
|
|
249
224
|
|
|
250
225
|
export const useChannelsContext = <
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Co extends string = DefaultCommandType,
|
|
254
|
-
Ev extends UnknownType = DefaultEventType,
|
|
255
|
-
Me extends UnknownType = DefaultMessageType,
|
|
256
|
-
Re extends UnknownType = DefaultReactionType,
|
|
257
|
-
Us extends UnknownType = DefaultUserType,
|
|
258
|
-
>() => useContext(ChannelsContext) as unknown as ChannelsContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
226
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
227
|
+
>() => useContext(ChannelsContext) as unknown as ChannelsContextValue<StreamChatGenerics>;
|
|
259
228
|
|
|
260
229
|
/**
|
|
261
230
|
* Typescript currently does not support partial inference so if ChatContext
|
|
@@ -264,20 +233,14 @@ export const useChannelsContext = <
|
|
|
264
233
|
*/
|
|
265
234
|
export const withChannelsContext = <
|
|
266
235
|
P extends UnknownType,
|
|
267
|
-
|
|
268
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
269
|
-
Co extends string = DefaultCommandType,
|
|
270
|
-
Ev extends UnknownType = DefaultEventType,
|
|
271
|
-
Me extends UnknownType = DefaultMessageType,
|
|
272
|
-
Re extends UnknownType = DefaultReactionType,
|
|
273
|
-
Us extends UnknownType = DefaultUserType,
|
|
236
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
274
237
|
>(
|
|
275
238
|
Component: React.ComponentType<P>,
|
|
276
|
-
): React.FC<Omit<P, keyof ChannelsContextValue<
|
|
239
|
+
): React.FC<Omit<P, keyof ChannelsContextValue<StreamChatGenerics>>> => {
|
|
277
240
|
const WithChannelsContextComponent = (
|
|
278
|
-
props: Omit<P, keyof ChannelsContextValue<
|
|
241
|
+
props: Omit<P, keyof ChannelsContextValue<StreamChatGenerics>>,
|
|
279
242
|
) => {
|
|
280
|
-
const channelsContext = useChannelsContext<
|
|
243
|
+
const channelsContext = useChannelsContext<StreamChatGenerics>();
|
|
281
244
|
|
|
282
245
|
return <Component {...(props as P)} {...channelsContext} />;
|
|
283
246
|
};
|