stream-chat-react-native-core 4.0.0-beta.3 → 4.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js +10 -10
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +4 -4
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +15 -15
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +8 -8
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +112 -148
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +13 -13
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +2 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +8 -4
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +28 -11
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +6 -6
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +20 -16
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +51 -51
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +145 -64
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +6 -6
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +34 -34
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +5 -5
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +26 -26
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +6 -6
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +8 -8
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +4 -4
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/data.js +44 -44
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +7 -6
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/icons/index.js +0 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +8 -5
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +10 -10
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +4 -4
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +15 -15
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +8 -8
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -4
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +8 -8
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +112 -148
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +13 -13
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +2 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +14 -14
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +8 -4
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +19 -19
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +28 -11
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Message/Message.js +6 -6
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +18 -18
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +20 -16
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +10 -10
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +3 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +51 -51
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +145 -64
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +11 -11
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +3 -3
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +3 -3
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +11 -11
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +6 -6
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +34 -34
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +5 -5
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +26 -26
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +6 -6
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +3 -3
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +2 -2
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +3 -3
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +6 -6
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +26 -25
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +13 -13
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +8 -8
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +4 -4
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/data.js +44 -44
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +12 -12
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +2 -2
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +7 -6
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -2
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/icons/index.js +0 -26
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/init.js +13 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +8 -5
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +4 -4
- package/lib/typescript/components/Attachment/Card.d.ts +4 -4
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +5 -5
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +5 -5
- package/lib/typescript/components/Attachment/Giphy.d.ts +6 -6
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +3 -3
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +2 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +3 -2
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +4 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +5 -5
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +9 -9
- package/lib/typescript/components/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +7 -7
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +14 -14
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -7
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +5 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +9 -9
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
- package/lib/typescript/components/Message/Message.d.ts +11 -11
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +19 -5
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
- package/lib/typescript/components/Message/utils/messageActions.d.ts +5 -5
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +7 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +4 -4
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +5 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +4 -3
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +4 -4
- package/lib/typescript/components/Thread/Thread.d.ts +7 -7
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +12 -12
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +18 -18
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +33 -33
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +21 -21
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +57 -57
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +4 -4
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +20 -20
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +6 -5
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/icons/{Left.d.ts → UserAdmin.d.ts} +1 -1
- package/lib/typescript/icons/index.d.ts +0 -2
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +4 -4
- package/lib/typescript/utils/getResizedImageUrl.d.ts +2 -1
- package/lib/typescript/utils/utils.d.ts +21 -21
- package/package.json +3 -5
- package/src/components/Attachment/Attachment.tsx +15 -56
- package/src/components/Attachment/AttachmentActions.tsx +15 -55
- package/src/components/Attachment/Card.tsx +15 -48
- package/src/components/Attachment/FileAttachment.tsx +14 -48
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/Gallery.tsx +18 -59
- package/src/components/Attachment/Giphy.tsx +82 -125
- package/src/components/Attachment/__tests__/buildGallery.test.js +4 -4
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +6 -10
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -5
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +5 -3
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -3
- package/src/components/Attachment/utils/getAspectRatio.ts +4 -4
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +21 -61
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +5 -3
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +12 -19
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +14 -21
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +21 -24
- package/src/components/Avatar/Avatar.tsx +1 -1
- package/src/components/Channel/Channel.tsx +174 -257
- package/src/components/Channel/hooks/useCreateChannelContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +52 -68
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +3 -18
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +28 -49
- package/src/components/ChannelList/ChannelListMessenger.tsx +19 -70
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +14 -36
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +3 -18
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +11 -33
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +13 -35
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +9 -31
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +4 -19
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +11 -29
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreview.tsx +18 -51
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +11 -21
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +13 -46
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +6 -27
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -26
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -26
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +7 -28
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +6 -27
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +7 -28
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +27 -78
- package/src/components/Chat/Chat.tsx +15 -40
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +4 -19
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +30 -40
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +19 -11
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +42 -20
- package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -0
- package/src/components/Message/Message.tsx +40 -93
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageContent.tsx +18 -61
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +17 -58
- package/src/components/Message/MessageSimple/MessageFooter.tsx +23 -65
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageReplies.tsx +15 -56
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +5 -26
- package/src/components/Message/MessageSimple/MessageSimple.tsx +16 -57
- package/src/components/Message/MessageSimple/MessageStatus.tsx +13 -54
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +19 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +47 -88
- package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +89 -74
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -19
- package/src/components/Message/hooks/useMessageActionHandlers.ts +8 -23
- package/src/components/Message/hooks/useMessageActions.tsx +8 -23
- package/src/components/Message/utils/messageActions.ts +7 -34
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +13 -54
- package/src/components/MessageInput/CommandsButton.tsx +15 -56
- package/src/components/MessageInput/FileUploadPreview.tsx +15 -57
- package/src/components/MessageInput/ImageUploadPreview.tsx +13 -55
- package/src/components/MessageInput/InputButtons.tsx +13 -54
- package/src/components/MessageInput/MessageInput.tsx +25 -66
- package/src/components/MessageInput/MoreOptionsButton.tsx +13 -54
- package/src/components/MessageInput/SendButton.tsx +13 -54
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +4 -19
- package/src/components/MessageInput/hooks/useCooldown.ts +5 -19
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +34 -76
- package/src/components/MessageList/MessageSystem.tsx +5 -26
- package/src/components/MessageList/TypingIndicator.tsx +3 -18
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/hooks/useMessageList.ts +19 -52
- package/src/components/MessageList/hooks/useTypingString.ts +5 -20
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +6 -27
- package/src/components/MessageList/utils/getGroupStyles.ts +6 -27
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -18
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +15 -56
- package/src/components/MessageOverlay/MessageActionListItem.tsx +20 -9
- package/src/components/MessageOverlay/MessageOverlay.tsx +38 -81
- package/src/components/MessageOverlay/OverlayReactionList.tsx +21 -74
- package/src/components/MessageOverlay/OverlayReactions.tsx +3 -18
- package/src/components/Reply/Reply.tsx +22 -69
- package/src/components/Thread/Thread.tsx +20 -53
- package/src/components/Thread/components/ThreadFooterComponent.tsx +12 -47
- package/src/components/docs/data.js +38 -37
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +9 -7
- package/src/contexts/channelContext/ChannelContext.tsx +15 -48
- package/src/contexts/channelsContext/ChannelsContext.tsx +22 -59
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +38 -115
- package/src/contexts/channelsStateContext/useChannelState.ts +27 -60
- package/src/contexts/chatContext/ChatContext.tsx +14 -49
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +12 -54
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -7
- package/src/contexts/messageContext/MessageContext.tsx +15 -48
- package/src/contexts/messageInputContext/MessageInputContext.tsx +61 -110
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +5 -20
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +7 -31
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +24 -71
- package/src/contexts/messagesContext/MessagesContext.tsx +60 -99
- package/src/contexts/overlayContext/OverlayContext.tsx +18 -26
- package/src/contexts/overlayContext/OverlayProvider.tsx +7 -22
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +13 -53
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +39 -40
- package/src/contexts/themeContext/utils/theme.ts +13 -11
- package/src/contexts/threadContext/ThreadContext.tsx +13 -46
- package/src/contexts/translationContext/TranslationContext.tsx +12 -7
- package/src/contexts/typingContext/TypingContext.tsx +11 -44
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/icons/index.ts +0 -2
- package/src/init.ts +5 -0
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/__tests__/getResizedImageUrl.test.js +56 -0
- package/src/utils/getResizedImageUrl.ts +15 -13
- package/src/utils/utils.ts +63 -128
- package/src/version.json +1 -1
- package/lib/commonjs/icons/Left.js +0 -38
- package/lib/commonjs/icons/Left.js.map +0 -1
- package/lib/commonjs/icons/Right.js +0 -38
- package/lib/commonjs/icons/Right.js.map +0 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
- package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
- package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
- package/lib/commonjs/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/module/icons/Left.js +0 -38
- package/lib/module/icons/Left.js.map +0 -1
- package/lib/module/icons/Right.js +0 -38
- package/lib/module/icons/Right.js.map +0 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/BottomSheet.js +0 -25
- package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/module/styleguideComponents/JsDoc.js +0 -87
- package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/module/styleguideComponents/Markdown.js +0 -12
- package/lib/module/styleguideComponents/Markdown.js.map +0 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/Reanimated.js +0 -2
- package/lib/module/styleguideComponents/Reanimated.js.map +0 -1
- package/lib/module/styleguideComponents/Wrapper.js +0 -29
- package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/typescript/icons/Right.d.ts +0 -3
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
- package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -60
- package/src/styleguideComponents/BottomSheet.tsx +0 -3
- package/src/styleguideComponents/JsDoc.tsx +0 -45
- package/src/styleguideComponents/Markdown.tsx +0 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +0 -45
- package/src/styleguideComponents/PropsRenderer.tsx +0 -141
- package/src/styleguideComponents/Reanimated.tsx +0 -0
- package/src/styleguideComponents/Wrapper.tsx +0 -7
- package/src/styleguideComponents/register-react-native-web.js +0 -13
- package/src/styleguideComponents/resolveAssetSource.js +0 -2
|
@@ -18,16 +18,7 @@ import {
|
|
|
18
18
|
useChannelsContext,
|
|
19
19
|
} from '../../contexts/channelsContext/ChannelsContext';
|
|
20
20
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
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 } from '../../types/types';
|
|
31
22
|
import { vw } from '../../utils/utils';
|
|
32
23
|
|
|
33
24
|
const styles = StyleSheet.create({
|
|
@@ -56,16 +47,10 @@ const styles = StyleSheet.create({
|
|
|
56
47
|
const maxWidth = vw(80) - 16 - 40;
|
|
57
48
|
|
|
58
49
|
export type ChannelPreviewMessengerPropsWithContext<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Co extends string = DefaultCommandType,
|
|
62
|
-
Ev extends UnknownType = DefaultEventType,
|
|
63
|
-
Me extends UnknownType = DefaultMessageType,
|
|
64
|
-
Re extends UnknownType = DefaultReactionType,
|
|
65
|
-
Us extends UnknownType = DefaultUserType,
|
|
66
|
-
> = Pick<ChannelPreviewProps<At, Ch, Co, Ev, Me, Re, Us>, 'channel'> &
|
|
50
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
51
|
+
> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> &
|
|
67
52
|
Pick<
|
|
68
|
-
ChannelsContextValue<
|
|
53
|
+
ChannelsContextValue<StreamChatGenerics>,
|
|
69
54
|
| 'maxUnreadCount'
|
|
70
55
|
| 'onSelect'
|
|
71
56
|
| 'PreviewAvatar'
|
|
@@ -94,7 +79,7 @@ export type ChannelPreviewMessengerPropsWithContext<
|
|
|
94
79
|
*
|
|
95
80
|
* @overrideType object
|
|
96
81
|
*/
|
|
97
|
-
latestMessagePreview: LatestMessagePreview<
|
|
82
|
+
latestMessagePreview: LatestMessagePreview<StreamChatGenerics>;
|
|
98
83
|
/**
|
|
99
84
|
* Formatter function for date of latest message.
|
|
100
85
|
* @param date Message date
|
|
@@ -110,15 +95,9 @@ export type ChannelPreviewMessengerPropsWithContext<
|
|
|
110
95
|
};
|
|
111
96
|
|
|
112
97
|
const ChannelPreviewMessengerWithContext = <
|
|
113
|
-
|
|
114
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
115
|
-
Co extends string = DefaultCommandType,
|
|
116
|
-
Ev extends UnknownType = DefaultEventType,
|
|
117
|
-
Me extends UnknownType = DefaultMessageType,
|
|
118
|
-
Re extends UnknownType = DefaultReactionType,
|
|
119
|
-
Us extends UnknownType = DefaultUserType,
|
|
98
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
120
99
|
>(
|
|
121
|
-
props: ChannelPreviewMessengerPropsWithContext<
|
|
100
|
+
props: ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,
|
|
122
101
|
) => {
|
|
123
102
|
const {
|
|
124
103
|
channel,
|
|
@@ -189,21 +168,15 @@ const ChannelPreviewMessengerWithContext = <
|
|
|
189
168
|
};
|
|
190
169
|
|
|
191
170
|
export type ChannelPreviewMessengerProps<
|
|
192
|
-
|
|
193
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
194
|
-
Co extends string = DefaultCommandType,
|
|
195
|
-
Ev extends UnknownType = DefaultEventType,
|
|
196
|
-
Me extends UnknownType = DefaultMessageType,
|
|
197
|
-
Re extends UnknownType = DefaultReactionType,
|
|
198
|
-
Us extends UnknownType = DefaultUserType,
|
|
171
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
199
172
|
> = Partial<
|
|
200
173
|
Omit<
|
|
201
|
-
ChannelPreviewMessengerPropsWithContext<
|
|
174
|
+
ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,
|
|
202
175
|
'channel' | 'latestMessagePreview'
|
|
203
176
|
>
|
|
204
177
|
> &
|
|
205
178
|
Pick<
|
|
206
|
-
ChannelPreviewMessengerPropsWithContext<
|
|
179
|
+
ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,
|
|
207
180
|
'channel' | 'latestMessagePreview'
|
|
208
181
|
>;
|
|
209
182
|
|
|
@@ -216,15 +189,9 @@ const MemoizedChannelPreviewMessengerWithContext = React.memo(
|
|
|
216
189
|
* from the ChannelPreview component.
|
|
217
190
|
*/
|
|
218
191
|
export const ChannelPreviewMessenger = <
|
|
219
|
-
|
|
220
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
221
|
-
Co extends string = DefaultCommandType,
|
|
222
|
-
Ev extends UnknownType = DefaultEventType,
|
|
223
|
-
Me extends UnknownType = DefaultMessageType,
|
|
224
|
-
Re extends UnknownType = DefaultReactionType,
|
|
225
|
-
Us extends UnknownType = DefaultUserType,
|
|
192
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
226
193
|
>(
|
|
227
|
-
props: ChannelPreviewMessengerProps<
|
|
194
|
+
props: ChannelPreviewMessengerProps<StreamChatGenerics>,
|
|
228
195
|
) => {
|
|
229
196
|
const {
|
|
230
197
|
maxUnreadCount,
|
|
@@ -235,7 +202,7 @@ export const ChannelPreviewMessenger = <
|
|
|
235
202
|
PreviewStatus,
|
|
236
203
|
PreviewTitle,
|
|
237
204
|
PreviewUnreadCount,
|
|
238
|
-
} = useChannelsContext<
|
|
205
|
+
} = useChannelsContext<StreamChatGenerics>();
|
|
239
206
|
return (
|
|
240
207
|
<MemoizedChannelPreviewMessengerWithContext
|
|
241
208
|
{...{
|
|
@@ -6,16 +6,7 @@ import type { ChannelPreviewProps } from './ChannelPreview';
|
|
|
6
6
|
|
|
7
7
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
8
8
|
import { Mute } from '../../icons';
|
|
9
|
-
import type {
|
|
10
|
-
DefaultAttachmentType,
|
|
11
|
-
DefaultChannelType,
|
|
12
|
-
DefaultCommandType,
|
|
13
|
-
DefaultEventType,
|
|
14
|
-
DefaultMessageType,
|
|
15
|
-
DefaultReactionType,
|
|
16
|
-
DefaultUserType,
|
|
17
|
-
UnknownType,
|
|
18
|
-
} from '../../types/types';
|
|
9
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
19
10
|
|
|
20
11
|
const styles = StyleSheet.create({
|
|
21
12
|
iconStyle: {
|
|
@@ -24,14 +15,8 @@ const styles = StyleSheet.create({
|
|
|
24
15
|
});
|
|
25
16
|
|
|
26
17
|
export type ChannelPreviewMutedStatusProps<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Co extends string = DefaultCommandType,
|
|
30
|
-
Ev extends UnknownType = DefaultEventType,
|
|
31
|
-
Me extends UnknownType = DefaultMessageType,
|
|
32
|
-
Re extends UnknownType = DefaultReactionType,
|
|
33
|
-
Us extends UnknownType = DefaultUserType,
|
|
34
|
-
> = Pick<ChannelPreviewProps<At, Ch, Co, Ev, Me, Re, Us>, 'channel'> & {
|
|
18
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
19
|
+
> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {
|
|
35
20
|
muted: boolean;
|
|
36
21
|
};
|
|
37
22
|
|
|
@@ -39,15 +24,9 @@ export type ChannelPreviewMutedStatusProps<
|
|
|
39
24
|
* This UI component displays an avatar for a particular channel.
|
|
40
25
|
*/
|
|
41
26
|
export const ChannelPreviewMutedStatus = <
|
|
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
|
-
props: ChannelPreviewMutedStatusProps<
|
|
29
|
+
props: ChannelPreviewMutedStatusProps<StreamChatGenerics>,
|
|
51
30
|
) => {
|
|
52
31
|
const { muted } = props;
|
|
53
32
|
|
|
@@ -8,16 +8,7 @@ import type { ChannelPreviewMessengerPropsWithContext } from './ChannelPreviewMe
|
|
|
8
8
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
9
9
|
import { Check, CheckAll } from '../../icons';
|
|
10
10
|
|
|
11
|
-
import type {
|
|
12
|
-
DefaultAttachmentType,
|
|
13
|
-
DefaultChannelType,
|
|
14
|
-
DefaultCommandType,
|
|
15
|
-
DefaultEventType,
|
|
16
|
-
DefaultMessageType,
|
|
17
|
-
DefaultReactionType,
|
|
18
|
-
DefaultUserType,
|
|
19
|
-
UnknownType,
|
|
20
|
-
} from '../../types/types';
|
|
11
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
21
12
|
|
|
22
13
|
const styles = StyleSheet.create({
|
|
23
14
|
date: {
|
|
@@ -31,29 +22,17 @@ const styles = StyleSheet.create({
|
|
|
31
22
|
});
|
|
32
23
|
|
|
33
24
|
export type ChannelPreviewStatusProps<
|
|
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
|
> = Pick<
|
|
42
|
-
ChannelPreviewMessengerPropsWithContext<
|
|
27
|
+
ChannelPreviewMessengerPropsWithContext<StreamChatGenerics>,
|
|
43
28
|
'latestMessagePreview' | 'formatLatestMessageDate'
|
|
44
29
|
> &
|
|
45
|
-
Pick<ChannelPreviewProps<
|
|
30
|
+
Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'>;
|
|
46
31
|
|
|
47
32
|
export const ChannelPreviewStatus = <
|
|
48
|
-
|
|
49
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
50
|
-
Co extends string = DefaultCommandType,
|
|
51
|
-
Ev extends UnknownType = DefaultEventType,
|
|
52
|
-
Me extends UnknownType = DefaultMessageType,
|
|
53
|
-
Re extends UnknownType = DefaultReactionType,
|
|
54
|
-
Us extends UnknownType = DefaultUserType,
|
|
33
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
55
34
|
>(
|
|
56
|
-
props: ChannelPreviewStatusProps<
|
|
35
|
+
props: ChannelPreviewStatusProps<StreamChatGenerics>,
|
|
57
36
|
) => {
|
|
58
37
|
const { formatLatestMessageDate, latestMessagePreview } = props;
|
|
59
38
|
const {
|
|
@@ -5,43 +5,22 @@ import type { ChannelPreviewProps } from './ChannelPreview';
|
|
|
5
5
|
|
|
6
6
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
7
7
|
|
|
8
|
-
import type {
|
|
9
|
-
DefaultAttachmentType,
|
|
10
|
-
DefaultChannelType,
|
|
11
|
-
DefaultCommandType,
|
|
12
|
-
DefaultEventType,
|
|
13
|
-
DefaultMessageType,
|
|
14
|
-
DefaultReactionType,
|
|
15
|
-
DefaultUserType,
|
|
16
|
-
UnknownType,
|
|
17
|
-
} from '../../types/types';
|
|
8
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
18
9
|
|
|
19
10
|
const styles = StyleSheet.create({
|
|
20
11
|
title: { fontSize: 14, fontWeight: '700' },
|
|
21
12
|
});
|
|
22
13
|
|
|
23
14
|
export type ChannelPreviewTitleProps<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Co extends string = DefaultCommandType,
|
|
27
|
-
Ev extends UnknownType = DefaultEventType,
|
|
28
|
-
Me extends UnknownType = DefaultMessageType,
|
|
29
|
-
Re extends UnknownType = DefaultReactionType,
|
|
30
|
-
Us extends UnknownType = DefaultUserType,
|
|
31
|
-
> = Pick<ChannelPreviewProps<At, Ch, Co, Ev, Me, Re, Us>, 'channel'> & {
|
|
15
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
16
|
+
> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {
|
|
32
17
|
displayName: string;
|
|
33
18
|
};
|
|
34
19
|
|
|
35
20
|
export const ChannelPreviewTitle = <
|
|
36
|
-
|
|
37
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
38
|
-
Co extends string = DefaultCommandType,
|
|
39
|
-
Ev extends UnknownType = DefaultEventType,
|
|
40
|
-
Me extends UnknownType = DefaultMessageType,
|
|
41
|
-
Re extends UnknownType = DefaultReactionType,
|
|
42
|
-
Us extends UnknownType = DefaultUserType,
|
|
21
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
43
22
|
>(
|
|
44
|
-
props: ChannelPreviewTitleProps<
|
|
23
|
+
props: ChannelPreviewTitleProps<StreamChatGenerics>,
|
|
45
24
|
) => {
|
|
46
25
|
const { displayName } = props;
|
|
47
26
|
const {
|
|
@@ -5,16 +5,7 @@ import type { ChannelPreviewProps } from './ChannelPreview';
|
|
|
5
5
|
|
|
6
6
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
7
7
|
|
|
8
|
-
import type {
|
|
9
|
-
DefaultAttachmentType,
|
|
10
|
-
DefaultChannelType,
|
|
11
|
-
DefaultCommandType,
|
|
12
|
-
DefaultEventType,
|
|
13
|
-
DefaultMessageType,
|
|
14
|
-
DefaultReactionType,
|
|
15
|
-
DefaultUserType,
|
|
16
|
-
UnknownType,
|
|
17
|
-
} from '../../types/types';
|
|
8
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
18
9
|
|
|
19
10
|
const styles = StyleSheet.create({
|
|
20
11
|
unreadContainer: {
|
|
@@ -33,28 +24,16 @@ const styles = StyleSheet.create({
|
|
|
33
24
|
});
|
|
34
25
|
|
|
35
26
|
export type ChannelPreviewUnreadCountProps<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Co extends string = DefaultCommandType,
|
|
39
|
-
Ev extends UnknownType = DefaultEventType,
|
|
40
|
-
Me extends UnknownType = DefaultMessageType,
|
|
41
|
-
Re extends UnknownType = DefaultReactionType,
|
|
42
|
-
Us extends UnknownType = DefaultUserType,
|
|
43
|
-
> = Pick<ChannelPreviewProps<At, Ch, Co, Ev, Me, Re, Us>, 'channel'> & {
|
|
27
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
28
|
+
> = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {
|
|
44
29
|
maxUnreadCount: number;
|
|
45
30
|
unread?: number;
|
|
46
31
|
};
|
|
47
32
|
|
|
48
33
|
export const ChannelPreviewUnreadCount = <
|
|
49
|
-
|
|
50
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
51
|
-
Co extends string = DefaultCommandType,
|
|
52
|
-
Ev extends UnknownType = DefaultEventType,
|
|
53
|
-
Me extends UnknownType = DefaultMessageType,
|
|
54
|
-
Re extends UnknownType = DefaultReactionType,
|
|
55
|
-
Us extends UnknownType = DefaultUserType,
|
|
34
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
56
35
|
>(
|
|
57
|
-
props: ChannelPreviewUnreadCountProps<
|
|
36
|
+
props: ChannelPreviewUnreadCountProps<StreamChatGenerics>,
|
|
58
37
|
) => {
|
|
59
38
|
const { maxUnreadCount, unread } = props;
|
|
60
39
|
const {
|
|
@@ -4,28 +4,13 @@ import type { Channel, StreamChat } from 'stream-chat';
|
|
|
4
4
|
|
|
5
5
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
6
6
|
|
|
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 } from '../../../types/types';
|
|
17
8
|
|
|
18
9
|
export const getChannelPreviewDisplayAvatar = <
|
|
19
|
-
|
|
20
|
-
Ch extends DefaultChannelType = DefaultChannelType,
|
|
21
|
-
Co extends string = DefaultCommandType,
|
|
22
|
-
Ev extends DefaultEventType = DefaultEventType,
|
|
23
|
-
Me extends DefaultMessageType = DefaultMessageType,
|
|
24
|
-
Re extends DefaultReactionType = DefaultReactionType,
|
|
25
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
10
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
26
11
|
>(
|
|
27
|
-
channel: Channel<
|
|
28
|
-
client: StreamChat<
|
|
12
|
+
channel: Channel<StreamChatGenerics>,
|
|
13
|
+
client: StreamChat<StreamChatGenerics>,
|
|
29
14
|
) => {
|
|
30
15
|
const currentUserId = client?.user?.id;
|
|
31
16
|
const channelId = channel?.id;
|
|
@@ -70,17 +55,11 @@ export const getChannelPreviewDisplayAvatar = <
|
|
|
70
55
|
* @returns {object} e.g., { image: 'http://dummyurl.com/test.png', name: 'Uhtred Bebbanburg' }
|
|
71
56
|
*/
|
|
72
57
|
export const useChannelPreviewDisplayAvatar = <
|
|
73
|
-
|
|
74
|
-
Ch extends DefaultChannelType = DefaultChannelType,
|
|
75
|
-
Co extends string = DefaultCommandType,
|
|
76
|
-
Ev extends UnknownType = DefaultEventType,
|
|
77
|
-
Me extends UnknownType = DefaultMessageType,
|
|
78
|
-
Re extends UnknownType = DefaultReactionType,
|
|
79
|
-
Us extends UnknownType = DefaultUserType,
|
|
58
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
80
59
|
>(
|
|
81
|
-
channel: Channel<
|
|
60
|
+
channel: Channel<StreamChatGenerics>,
|
|
82
61
|
) => {
|
|
83
|
-
const { client } = useChatContext<
|
|
62
|
+
const { client } = useChatContext<StreamChatGenerics>();
|
|
84
63
|
|
|
85
64
|
const channelData = channel?.data;
|
|
86
65
|
const image = channelData?.image;
|
|
@@ -4,28 +4,13 @@ import type { Channel } from 'stream-chat';
|
|
|
4
4
|
|
|
5
5
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
6
6
|
|
|
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 } from '../../../types/types';
|
|
17
8
|
import { vw } from '../../../utils/utils';
|
|
18
9
|
|
|
19
10
|
const maxCharacterLengthDefault = (vw(100) - 16) / 6;
|
|
20
11
|
|
|
21
12
|
export const getChannelPreviewDisplayName = <
|
|
22
|
-
|
|
23
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
24
|
-
Co extends string = DefaultCommandType,
|
|
25
|
-
Ev extends UnknownType = DefaultEventType,
|
|
26
|
-
Me extends UnknownType = DefaultMessageType,
|
|
27
|
-
Re extends UnknownType = DefaultReactionType,
|
|
28
|
-
Us extends UnknownType = DefaultUserType,
|
|
13
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
29
14
|
>({
|
|
30
15
|
channelName,
|
|
31
16
|
currentUserId,
|
|
@@ -35,7 +20,7 @@ export const getChannelPreviewDisplayName = <
|
|
|
35
20
|
maxCharacterLength: number;
|
|
36
21
|
channelName?: string;
|
|
37
22
|
currentUserId?: string;
|
|
38
|
-
members?: Channel<
|
|
23
|
+
members?: Channel<StreamChatGenerics>['state']['members'];
|
|
39
24
|
}) => {
|
|
40
25
|
if (channelName) return channelName;
|
|
41
26
|
|
|
@@ -64,18 +49,12 @@ export const getChannelPreviewDisplayName = <
|
|
|
64
49
|
};
|
|
65
50
|
|
|
66
51
|
export const useChannelPreviewDisplayName = <
|
|
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,
|
|
52
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
74
53
|
>(
|
|
75
|
-
channel?: Channel<
|
|
54
|
+
channel?: Channel<StreamChatGenerics>,
|
|
76
55
|
characterLength?: number,
|
|
77
56
|
) => {
|
|
78
|
-
const { client } = useChatContext<
|
|
57
|
+
const { client } = useChatContext<StreamChatGenerics>();
|
|
79
58
|
|
|
80
59
|
const currentUserId = client.userID;
|
|
81
60
|
const members = channel?.state.members;
|
|
@@ -4,28 +4,13 @@ import type { Channel, StreamChat } from 'stream-chat';
|
|
|
4
4
|
|
|
5
5
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
6
6
|
|
|
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 } from '../../../types/types';
|
|
17
8
|
|
|
18
9
|
const getChannelPreviewDisplayPresence = <
|
|
19
|
-
|
|
20
|
-
Ch extends DefaultChannelType = DefaultChannelType,
|
|
21
|
-
Co extends string = DefaultCommandType,
|
|
22
|
-
Ev extends DefaultEventType = DefaultEventType,
|
|
23
|
-
Me extends DefaultMessageType = DefaultMessageType,
|
|
24
|
-
Re extends DefaultReactionType = DefaultReactionType,
|
|
25
|
-
Us extends DefaultUserType = DefaultUserType,
|
|
10
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
26
11
|
>(
|
|
27
|
-
channel: Channel<
|
|
28
|
-
client: StreamChat<
|
|
12
|
+
channel: Channel<StreamChatGenerics>,
|
|
13
|
+
client: StreamChat<StreamChatGenerics>,
|
|
29
14
|
) => {
|
|
30
15
|
const currentUserId = client.userID;
|
|
31
16
|
|
|
@@ -47,17 +32,11 @@ const getChannelPreviewDisplayPresence = <
|
|
|
47
32
|
* @returns {boolean} e.g., true
|
|
48
33
|
*/
|
|
49
34
|
export const useChannelPreviewDisplayPresence = <
|
|
50
|
-
|
|
51
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
52
|
-
Co extends string = DefaultCommandType,
|
|
53
|
-
Ev extends UnknownType = DefaultEventType,
|
|
54
|
-
Me extends UnknownType = DefaultMessageType,
|
|
55
|
-
Re extends UnknownType = DefaultReactionType,
|
|
56
|
-
Us extends UnknownType = DefaultUserType,
|
|
35
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
57
36
|
>(
|
|
58
|
-
channel: Channel<
|
|
37
|
+
channel: Channel<StreamChatGenerics>,
|
|
59
38
|
) => {
|
|
60
|
-
const { client } = useChatContext<
|
|
39
|
+
const { client } = useChatContext<StreamChatGenerics>();
|
|
61
40
|
|
|
62
41
|
const currentUserId = client.userID;
|
|
63
42
|
const members = Object.values(channel.state.members).filter(
|
|
@@ -9,40 +9,19 @@ import {
|
|
|
9
9
|
useTranslationContext,
|
|
10
10
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
11
11
|
|
|
12
|
-
import type {
|
|
13
|
-
DefaultAttachmentType,
|
|
14
|
-
DefaultChannelType,
|
|
15
|
-
DefaultCommandType,
|
|
16
|
-
DefaultEventType,
|
|
17
|
-
DefaultMessageType,
|
|
18
|
-
DefaultReactionType,
|
|
19
|
-
DefaultUserType,
|
|
20
|
-
UnknownType,
|
|
21
|
-
} from '../../../types/types';
|
|
12
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
22
13
|
|
|
23
14
|
type LatestMessage<
|
|
24
|
-
|
|
25
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
26
|
-
Co extends string = DefaultCommandType,
|
|
27
|
-
Ev extends UnknownType = DefaultEventType,
|
|
28
|
-
Me extends UnknownType = DefaultMessageType,
|
|
29
|
-
Re extends UnknownType = DefaultReactionType,
|
|
30
|
-
Us extends UnknownType = DefaultUserType,
|
|
15
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
31
16
|
> =
|
|
32
|
-
| ReturnType<ChannelState<
|
|
33
|
-
| MessageResponse<
|
|
17
|
+
| ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>
|
|
18
|
+
| MessageResponse<StreamChatGenerics>;
|
|
34
19
|
|
|
35
20
|
export type LatestMessagePreview<
|
|
36
|
-
|
|
37
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
38
|
-
Co extends string = DefaultCommandType,
|
|
39
|
-
Ev extends UnknownType = DefaultEventType,
|
|
40
|
-
Me extends UnknownType = DefaultMessageType,
|
|
41
|
-
Re extends UnknownType = DefaultReactionType,
|
|
42
|
-
Us extends UnknownType = DefaultUserType,
|
|
21
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
43
22
|
> = {
|
|
44
23
|
created_at: string | number | Date;
|
|
45
|
-
messageObject: LatestMessage<
|
|
24
|
+
messageObject: LatestMessage<StreamChatGenerics> | undefined;
|
|
46
25
|
previews: {
|
|
47
26
|
bold: boolean;
|
|
48
27
|
text: string;
|
|
@@ -51,17 +30,11 @@ export type LatestMessagePreview<
|
|
|
51
30
|
};
|
|
52
31
|
|
|
53
32
|
const getLatestMessageDisplayText = <
|
|
54
|
-
|
|
55
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
56
|
-
Co extends string = DefaultCommandType,
|
|
57
|
-
Ev extends UnknownType = DefaultEventType,
|
|
58
|
-
Me extends UnknownType = DefaultMessageType,
|
|
59
|
-
Re extends UnknownType = DefaultReactionType,
|
|
60
|
-
Us extends UnknownType = DefaultUserType,
|
|
33
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
61
34
|
>(
|
|
62
|
-
channel: Channel<
|
|
63
|
-
client: StreamChat<
|
|
64
|
-
message: LatestMessage<
|
|
35
|
+
channel: Channel<StreamChatGenerics>,
|
|
36
|
+
client: StreamChat<StreamChatGenerics>,
|
|
37
|
+
message: LatestMessage<StreamChatGenerics> | undefined,
|
|
65
38
|
t: (key: string) => string,
|
|
66
39
|
) => {
|
|
67
40
|
if (!message) return [{ bold: false, text: t('Nothing yet...') }];
|
|
@@ -127,15 +100,9 @@ const getLatestMessageDisplayText = <
|
|
|
127
100
|
};
|
|
128
101
|
|
|
129
102
|
const getLatestMessageDisplayDate = <
|
|
130
|
-
|
|
131
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
132
|
-
Co extends string = DefaultCommandType,
|
|
133
|
-
Ev extends UnknownType = DefaultEventType,
|
|
134
|
-
Me extends UnknownType = DefaultMessageType,
|
|
135
|
-
Re extends UnknownType = DefaultReactionType,
|
|
136
|
-
Us extends UnknownType = DefaultUserType,
|
|
103
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
137
104
|
>(
|
|
138
|
-
message: LatestMessage<
|
|
105
|
+
message: LatestMessage<StreamChatGenerics> | undefined,
|
|
139
106
|
tDateTimeParser: TDateTimeParser,
|
|
140
107
|
) => {
|
|
141
108
|
const parserOutput = tDateTimeParser(message?.created_at);
|
|
@@ -155,17 +122,11 @@ const getLatestMessageDisplayDate = <
|
|
|
155
122
|
* 2 = someone has read latest message which is the current user's message
|
|
156
123
|
*/
|
|
157
124
|
const getLatestMessageReadStatus = <
|
|
158
|
-
|
|
159
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
160
|
-
Co extends string = DefaultCommandType,
|
|
161
|
-
Ev extends UnknownType = DefaultEventType,
|
|
162
|
-
Me extends UnknownType = DefaultMessageType,
|
|
163
|
-
Re extends UnknownType = DefaultReactionType,
|
|
164
|
-
Us extends UnknownType = DefaultUserType,
|
|
125
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
165
126
|
>(
|
|
166
|
-
channel: Channel<
|
|
167
|
-
client: StreamChat<
|
|
168
|
-
message: LatestMessage<
|
|
127
|
+
channel: Channel<StreamChatGenerics>,
|
|
128
|
+
client: StreamChat<StreamChatGenerics>,
|
|
129
|
+
message: LatestMessage<StreamChatGenerics> | undefined,
|
|
169
130
|
readEvents: boolean,
|
|
170
131
|
) => {
|
|
171
132
|
const currentUserId = client.userID;
|
|
@@ -190,22 +151,16 @@ const getLatestMessageReadStatus = <
|
|
|
190
151
|
};
|
|
191
152
|
|
|
192
153
|
const getLatestMessagePreview = <
|
|
193
|
-
|
|
194
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
195
|
-
Co extends string = DefaultCommandType,
|
|
196
|
-
Ev extends UnknownType = DefaultEventType,
|
|
197
|
-
Me extends UnknownType = DefaultMessageType,
|
|
198
|
-
Re extends UnknownType = DefaultReactionType,
|
|
199
|
-
Us extends UnknownType = DefaultUserType,
|
|
154
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
200
155
|
>(params: {
|
|
201
|
-
channel: Channel<
|
|
202
|
-
client: StreamChat<
|
|
156
|
+
channel: Channel<StreamChatGenerics>;
|
|
157
|
+
client: StreamChat<StreamChatGenerics>;
|
|
203
158
|
readEvents: boolean;
|
|
204
159
|
t: (key: string) => string;
|
|
205
160
|
tDateTimeParser: TDateTimeParser;
|
|
206
161
|
lastMessage?:
|
|
207
|
-
| ReturnType<ChannelState<
|
|
208
|
-
| MessageResponse<
|
|
162
|
+
| ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>
|
|
163
|
+
| MessageResponse<StreamChatGenerics>;
|
|
209
164
|
}) => {
|
|
210
165
|
const { channel, client, lastMessage, readEvents, t, tDateTimeParser } = params;
|
|
211
166
|
|
|
@@ -242,21 +197,15 @@ const getLatestMessagePreview = <
|
|
|
242
197
|
* @returns {object} latest message preview e.g.. { text: 'this was last message ...', created_at: '11/12/2020', messageObject: { originalMessageObject } }
|
|
243
198
|
*/
|
|
244
199
|
export const useLatestMessagePreview = <
|
|
245
|
-
|
|
246
|
-
Ch extends UnknownType = DefaultChannelType,
|
|
247
|
-
Co extends string = DefaultCommandType,
|
|
248
|
-
Ev extends UnknownType = DefaultEventType,
|
|
249
|
-
Me extends UnknownType = DefaultMessageType,
|
|
250
|
-
Re extends UnknownType = DefaultReactionType,
|
|
251
|
-
Us extends UnknownType = DefaultUserType,
|
|
200
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
252
201
|
>(
|
|
253
|
-
channel: Channel<
|
|
202
|
+
channel: Channel<StreamChatGenerics>,
|
|
254
203
|
forceUpdate: number,
|
|
255
204
|
lastMessage?:
|
|
256
|
-
| ReturnType<ChannelState<
|
|
257
|
-
| MessageResponse<
|
|
205
|
+
| ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>
|
|
206
|
+
| MessageResponse<StreamChatGenerics>,
|
|
258
207
|
) => {
|
|
259
|
-
const { client } = useChatContext<
|
|
208
|
+
const { client } = useChatContext<StreamChatGenerics>();
|
|
260
209
|
const { t, tDateTimeParser } = useTranslationContext();
|
|
261
210
|
|
|
262
211
|
const channelConfigExists = typeof channel?.getConfig === 'function';
|
|
@@ -270,7 +219,7 @@ export const useLatestMessagePreview = <
|
|
|
270
219
|
|
|
271
220
|
const [readEvents, setReadEvents] = useState(true);
|
|
272
221
|
const [latestMessagePreview, setLatestMessagePreview] = useState<
|
|
273
|
-
LatestMessagePreview<
|
|
222
|
+
LatestMessagePreview<StreamChatGenerics>
|
|
274
223
|
>({
|
|
275
224
|
created_at: '',
|
|
276
225
|
messageObject: undefined,
|