stream-chat-react-native-core 4.0.0-beta.2 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Attachment.js +2 -2
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +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/FileIcon.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +97 -106
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +27 -27
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +16 -16
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +11 -11
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +13 -7
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +10 -4
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +64 -64
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +6 -6
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +4 -4
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +2 -2
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +17 -17
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +83 -70
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +48 -20
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.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.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +89 -56
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +7 -7
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +9 -9
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +13 -9
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +19 -19
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +2 -2
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -7
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +14 -25
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +16 -3
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +18 -14
- 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/CooldownTimer.js +2 -2
- package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +2 -2
- 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 +3 -3
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +40 -40
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +2 -2
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +3 -3
- 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/MessageInput/hooks/useCountdown.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +2 -2
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js +7 -7
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +2 -2
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +7 -7
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +38 -32
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +11 -11
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +31 -34
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +25 -19
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +6 -6
- 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 +1 -1
- package/lib/commonjs/components/index.js +26 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -2
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +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 +2 -2
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +18 -14
- 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 +10 -3
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.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 +33 -31
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +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 +3 -3
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +2 -2
- package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +13 -5
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/commonjs/emoji-data/index.js +2 -2
- package/lib/commonjs/emoji-data/index.js.map +1 -1
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +1 -1
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/mock-builders/api/error.js +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/attachment.js +1 -3
- package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/channel.js +101 -51
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/user.js +32 -33
- package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
- package/lib/commonjs/mock-builders/mock.js +1 -1
- package/lib/commonjs/native.js +1 -1
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +7 -7
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +4 -4
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +1 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +7 -7
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +25 -25
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +1 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js +1 -1
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +1 -1
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +26 -0
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/commonjs/utils/utils.js +9 -3
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +2 -2
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +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/FileIcon.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +97 -106
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +27 -27
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +16 -16
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +11 -11
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +13 -7
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +10 -4
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +64 -64
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +6 -6
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +4 -4
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +2 -2
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +17 -17
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +83 -70
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +48 -20
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.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.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +89 -56
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +7 -7
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +9 -9
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +13 -9
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +19 -19
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +11 -11
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +2 -2
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -7
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +14 -25
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +16 -3
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +18 -14
- 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/CooldownTimer.js +2 -2
- package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +2 -2
- 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 +3 -3
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +40 -40
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +2 -2
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +3 -3
- 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/MessageInput/hooks/useCountdown.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +2 -2
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +5 -5
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js +7 -7
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js +2 -2
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +3 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +2 -2
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +7 -7
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +38 -32
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +11 -11
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +31 -34
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +25 -19
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +6 -6
- 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 +1 -1
- package/lib/module/components/index.js +26 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -2
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +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 +2 -2
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -2
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +18 -14
- 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 +10 -3
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
- package/lib/module/contexts/messagesContext/MessagesContext.js.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 +33 -31
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +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 +3 -3
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +2 -2
- package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +13 -5
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -2
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/module/emoji-data/index.js +2 -2
- package/lib/module/emoji-data/index.js.map +1 -1
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/icons/utils/base.js +1 -1
- package/lib/module/index.js +6 -6
- package/lib/module/mock-builders/api/error.js +1 -1
- package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/module/mock-builders/generator/attachment.js +1 -3
- package/lib/module/mock-builders/generator/attachment.js.map +1 -1
- package/lib/module/mock-builders/generator/channel.js +101 -51
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/mock-builders/generator/user.js +32 -33
- package/lib/module/mock-builders/generator/user.js.map +1 -1
- package/lib/module/mock-builders/mock.js +1 -1
- package/lib/module/native.js +1 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +7 -7
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/JsDoc.js +4 -4
- package/lib/module/styleguideComponents/JsDoc.js.map +1 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +7 -7
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +25 -25
- package/lib/module/styleguideComponents/PropsRenderer.js.map +1 -1
- package/lib/module/styleguideComponents/Wrapper.js +1 -1
- package/lib/module/styleguideComponents/Wrapper.js.map +1 -1
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +26 -0
- package/lib/module/utils/getResizedImageUrl.js.map +1 -0
- package/lib/module/utils/getUrlOfImageAttachment.js +9 -0
- package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -0
- package/lib/module/utils/utils.js +9 -3
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -4
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +7 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +10 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +137 -0
- package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +23 -0
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +9 -0
- package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +22 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +2 -3
- package/lib/typescript/components/Channel/Channel.d.ts +4 -4
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +1 -1
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +4 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +3 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +2 -2
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -2
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.d.ts +7 -0
- package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.test.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
- package/lib/typescript/components/Message/utils/messageActions.d.ts +2 -2
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +1 -1
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +1 -1
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -1
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +1 -1
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +1 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
- package/lib/typescript/components/Reply/Reply.d.ts +1 -1
- package/lib/typescript/components/Thread/Thread.d.ts +2 -2
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +13 -5
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +6 -4
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +6 -4
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +12 -0
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +1 -0
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +10 -10
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +5 -5
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +2 -2
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +11 -3
- package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
- package/lib/typescript/utils/Streami18n.d.ts +2 -2
- package/lib/typescript/utils/getResizedImageUrl.d.ts +19 -0
- package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
- package/lib/typescript/utils/utils.d.ts +6 -1
- package/package.json +9 -13
- package/src/components/Attachment/Attachment.tsx +3 -3
- package/src/components/Attachment/AttachmentActions.tsx +2 -2
- package/src/components/Attachment/Card.tsx +3 -4
- package/src/components/Attachment/FileAttachment.tsx +3 -4
- package/src/components/Attachment/FileIcon.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +160 -184
- package/src/components/Attachment/Giphy.tsx +3 -4
- package/src/components/Attachment/__tests__/Attachment.test.js +11 -10
- package/src/components/Attachment/__tests__/Gallery.test.js +233 -0
- package/src/components/Attachment/__tests__/buildGallery.test.js +131 -0
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +75 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +95 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +64 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +46 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +186 -0
- package/src/components/Attachment/utils/buildGallery/types.ts +27 -0
- package/src/components/Attachment/utils/getAspectRatio.ts +21 -0
- package/src/components/Attachment/utils/getGalleryImageBorderRadius.ts +71 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +4 -3
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +1 -1
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +2 -2
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +7 -5
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +5 -6
- package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +6 -8
- package/src/components/Avatar/Avatar.tsx +7 -10
- package/src/components/Avatar/GroupAvatar.tsx +7 -2
- package/src/components/Avatar/__tests__/Avatar.test.js +2 -2
- package/src/components/Channel/Channel.tsx +75 -68
- package/src/components/Channel/__tests__/Channel.test.js +10 -10
- package/src/components/Channel/__tests__/ownCapabilities.test.js +8 -8
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +2 -1
- package/src/components/ChannelList/ChannelList.tsx +8 -9
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +1 -2
- package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
- package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +2 -2
- package/src/components/ChannelList/ChannelListMessenger.tsx +3 -4
- package/src/components/ChannelList/__tests__/ChannelList.test.js +73 -13
- package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +11 -12
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +3 -3
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +3 -3
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +2 -3
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +4 -4
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +2 -2
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +2 -2
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +1 -2
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +78 -48
- package/src/components/ChannelPreview/ChannelAvatar.tsx +3 -5
- package/src/components/ChannelPreview/ChannelPreview.tsx +3 -3
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +2 -2
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +23 -10
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +71 -0
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +4 -3
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +2 -2
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +2 -1
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +8 -9
- package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +8 -9
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +2 -2
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +3 -4
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +2 -2
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +2 -2
- package/src/components/Chat/Chat.tsx +6 -6
- package/src/components/Chat/__tests__/Chat.test.js +5 -5
- package/src/components/Chat/hooks/useIsOnline.ts +4 -3
- package/src/components/ImageGallery/ImageGallery.tsx +82 -49
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -5
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +1 -2
- package/src/components/ImageGallery/components/ImageGrid.tsx +4 -5
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
- package/src/components/Indicators/LoadingIndicator.tsx +1 -2
- package/src/components/Message/Message.tsx +20 -20
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +2 -3
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +3 -4
- package/src/components/Message/MessageSimple/MessageFooter.tsx +6 -7
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +2 -2
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +2 -3
- package/src/components/Message/MessageSimple/MessageStatus.tsx +9 -5
- package/src/components/Message/MessageSimple/__tests__/Message.test.js +9 -9
- package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +9 -26
- package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +4 -5
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -1
- package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +100 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +95 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +11 -23
- package/src/components/Message/hooks/useCreateMessageContext.ts +1 -2
- package/src/components/Message/hooks/useMessageActionHandlers.ts +13 -4
- package/src/components/Message/hooks/useMessageActions.tsx +14 -9
- package/src/components/Message/utils/messageActions.ts +2 -2
- package/src/components/Message/utils/removeReservedFields.ts +1 -1
- package/src/components/MessageInput/AttachButton.tsx +1 -2
- package/src/components/MessageInput/CommandsButton.tsx +1 -2
- package/src/components/MessageInput/CooldownTimer.tsx +1 -0
- package/src/components/MessageInput/FileUploadPreview.tsx +3 -3
- package/src/components/MessageInput/ImageUploadPreview.tsx +1 -2
- package/src/components/MessageInput/InputButtons.tsx +1 -1
- package/src/components/MessageInput/MessageInput.tsx +5 -6
- package/src/components/MessageInput/MoreOptionsButton.tsx +1 -2
- package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +1 -1
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +1 -1
- package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +15 -17
- package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +3 -3
- package/src/components/MessageInput/__tests__/MessageInput.test.js +8 -8
- package/src/components/MessageInput/__tests__/SendButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +2 -2
- package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +1604 -4172
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +1 -643
- package/src/components/MessageInput/hooks/useCooldown.ts +2 -0
- package/src/components/MessageInput/hooks/useCountdown.ts +1 -0
- package/src/components/MessageList/MessageList.tsx +3 -3
- package/src/components/MessageList/MessageSystem.tsx +2 -2
- package/src/components/MessageList/TypingIndicator.tsx +1 -2
- package/src/components/MessageList/__tests__/MessageList.test.js +17 -17
- package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
- package/src/components/MessageList/__tests__/TypingIndicator.test.js +5 -6
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +1 -1
- package/src/components/MessageList/hooks/useMessageList.ts +5 -7
- package/src/components/MessageList/hooks/useTypingString.ts +1 -2
- package/src/components/MessageList/utils/getGroupStyles.ts +1 -2
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +6 -1
- package/src/components/MessageOverlay/MessageActionList.tsx +3 -3
- package/src/components/MessageOverlay/MessageActionListItem.tsx +3 -1
- package/src/components/MessageOverlay/MessageOverlay.tsx +20 -16
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +1 -0
- package/src/components/MessageOverlay/OverlayReactionList.tsx +2 -4
- package/src/components/MessageOverlay/OverlayReactions.tsx +27 -8
- package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +1 -0
- package/src/components/Reply/Reply.tsx +25 -15
- package/src/components/Thread/Thread.tsx +5 -6
- package/src/components/Thread/__tests__/Thread.test.js +12 -14
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +13 -13
- package/src/components/Thread/components/ThreadFooterComponent.tsx +1 -2
- package/src/components/index.ts +2 -0
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +1 -2
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -2
- package/src/contexts/channelContext/ChannelContext.tsx +1 -2
- package/src/contexts/channelsContext/ChannelsContext.tsx +18 -7
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +7 -8
- package/src/contexts/channelsStateContext/useChannelState.ts +1 -0
- package/src/contexts/chatContext/ChatContext.tsx +1 -2
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +1 -2
- package/src/contexts/keyboardContext/KeyboardContext.tsx +1 -2
- package/src/contexts/messageContext/MessageContext.tsx +1 -2
- package/src/contexts/messageInputContext/MessageInputContext.tsx +27 -24
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -4
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -10
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +10 -19
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +46 -0
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +13 -13
- package/src/contexts/overlayContext/OverlayContext.tsx +10 -8
- package/src/contexts/overlayContext/OverlayProvider.tsx +30 -25
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +1 -2
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +4 -3
- package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +1 -0
- package/src/contexts/themeContext/ThemeContext.tsx +1 -0
- package/src/contexts/themeContext/utils/theme.ts +23 -8
- package/src/contexts/threadContext/ThreadContext.tsx +1 -2
- package/src/contexts/translationContext/TranslationContext.tsx +2 -2
- package/src/contexts/typingContext/TypingContext.tsx +1 -2
- package/src/contexts/utils/getDisplayName.ts +1 -0
- package/src/emoji-data/index.js +1 -1
- package/src/hooks/useStreami18n.ts +1 -1
- package/src/mock-builders/api/sendMessage.js +1 -0
- package/src/mock-builders/generator/attachment.js +0 -2
- package/src/mock-builders/generator/channel.js +101 -64
- package/src/mock-builders/generator/user.js +33 -26
- package/src/native.ts +1 -0
- package/src/styleguideComponents/ArgumentsRenderer.tsx +2 -1
- package/src/styleguideComponents/JsDoc.tsx +3 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +2 -1
- package/src/styleguideComponents/PropsRenderer.tsx +7 -4
- package/src/styleguideComponents/Wrapper.tsx +1 -0
- package/src/utils/Streami18n.ts +3 -3
- package/src/utils/__tests__/Streami18n.test.js +1 -2
- package/src/utils/getResizedImageUrl.ts +43 -0
- package/src/utils/getUrlOfImageAttachment.ts +10 -0
- package/src/utils/utils.ts +9 -4
- package/src/version.json +1 -1
|
@@ -2,10 +2,6 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { ThreadFooterComponent } from './components/ThreadFooterComponent';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
MessageInput as DefaultMessageInput,
|
|
7
|
-
MessageInputProps,
|
|
8
|
-
} from '../MessageInput/MessageInput';
|
|
9
5
|
import { useChannelContext } from '../../contexts/channelContext/ChannelContext';
|
|
10
6
|
import { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';
|
|
11
7
|
import {
|
|
@@ -14,8 +10,6 @@ import {
|
|
|
14
10
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
15
11
|
import { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';
|
|
16
12
|
|
|
17
|
-
import type { MessageListProps } from '../MessageList/MessageList';
|
|
18
|
-
|
|
19
13
|
import type {
|
|
20
14
|
DefaultAttachmentType,
|
|
21
15
|
DefaultChannelType,
|
|
@@ -26,6 +20,11 @@ import type {
|
|
|
26
20
|
DefaultUserType,
|
|
27
21
|
UnknownType,
|
|
28
22
|
} from '../../types/types';
|
|
23
|
+
import {
|
|
24
|
+
MessageInput as DefaultMessageInput,
|
|
25
|
+
MessageInputProps,
|
|
26
|
+
} from '../MessageInput/MessageInput';
|
|
27
|
+
import type { MessageListProps } from '../MessageList/MessageList';
|
|
29
28
|
|
|
30
29
|
type ThreadPropsWithContext<
|
|
31
30
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import { act, cleanup, render, waitFor } from '@testing-library/react-native';
|
|
3
4
|
import { v5 as uuidv5 } from 'uuid';
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { Channel } from '../../Channel/Channel';
|
|
8
|
-
import { Chat } from '../../Chat/Chat';
|
|
9
|
-
|
|
6
|
+
import { AttachmentPickerProvider } from '../../../contexts/attachmentPickerContext/AttachmentPickerContext';
|
|
10
7
|
import { ChannelContext } from '../../../contexts/channelContext/ChannelContext';
|
|
11
|
-
import {
|
|
12
|
-
|
|
8
|
+
import { ChannelsStateProvider } from '../../../contexts/channelsStateContext/ChannelsStateContext';
|
|
9
|
+
import { ImageGalleryProvider } from '../../../contexts/imageGalleryContext/ImageGalleryContext';
|
|
10
|
+
import { OverlayProvider } from '../../../contexts/overlayContext/OverlayProvider';
|
|
13
11
|
import { getOrCreateChannelApi } from '../../../mock-builders/api/getOrCreateChannel';
|
|
14
12
|
import { useMockedApis } from '../../../mock-builders/api/useMockedApis';
|
|
15
|
-
import {
|
|
13
|
+
import { generateChannelResponse } from '../../../mock-builders/generator/channel';
|
|
16
14
|
import { generateMember } from '../../../mock-builders/generator/member';
|
|
17
15
|
import { generateMessage, generateStaticMessage } from '../../../mock-builders/generator/message';
|
|
18
16
|
import { generateStaticUser } from '../../../mock-builders/generator/user';
|
|
19
17
|
import { getTestClientWithUser } from '../../../mock-builders/mock';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
18
|
+
import { Streami18n } from '../../../utils/Streami18n';
|
|
19
|
+
import { Channel } from '../../Channel/Channel';
|
|
20
|
+
import { Chat } from '../../Chat/Chat';
|
|
21
|
+
import { Thread } from '../Thread';
|
|
24
22
|
|
|
25
23
|
const StreamReactNativeNamespace = '9b244ee4-7d69-4d7b-ae23-cf89e9f7b035';
|
|
26
24
|
|
|
@@ -37,7 +35,7 @@ describe('Thread', () => {
|
|
|
37
35
|
generateMessage({ parent_id }),
|
|
38
36
|
];
|
|
39
37
|
|
|
40
|
-
const mockedChannel =
|
|
38
|
+
const mockedChannel = generateChannelResponse({
|
|
41
39
|
messages: [thread, thread2],
|
|
42
40
|
});
|
|
43
41
|
|
|
@@ -77,7 +75,7 @@ describe('Thread', () => {
|
|
|
77
75
|
generateStaticMessage('Message6', { parent_id, user: user1 }, '2020-05-05T14:50:00.000Z'),
|
|
78
76
|
];
|
|
79
77
|
|
|
80
|
-
const mockedChannel =
|
|
78
|
+
const mockedChannel = generateChannelResponse({
|
|
81
79
|
channel: {
|
|
82
80
|
id: uuidv5('Channel', StreamReactNativeNamespace),
|
|
83
81
|
},
|
|
@@ -68,9 +68,9 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
68
68
|
"user": Object {
|
|
69
69
|
"banned": false,
|
|
70
70
|
"created_at": "2020-04-27T13:39:49.331742Z",
|
|
71
|
-
"id": "
|
|
72
|
-
"image": "https://i.imgur.com/
|
|
73
|
-
"name": "
|
|
71
|
+
"id": "arthur",
|
|
72
|
+
"image": "https://i.imgur.com/LuuGvh0.png",
|
|
73
|
+
"name": "Arthur",
|
|
74
74
|
"online": false,
|
|
75
75
|
"role": "user",
|
|
76
76
|
"updated_at": "2020-04-27T13:39:49.332087Z",
|
|
@@ -96,9 +96,9 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
96
96
|
"user": Object {
|
|
97
97
|
"banned": false,
|
|
98
98
|
"created_at": "2020-04-27T13:39:49.331742Z",
|
|
99
|
-
"id": "
|
|
100
|
-
"image": "https://i.imgur.com/
|
|
101
|
-
"name": "
|
|
99
|
+
"id": "finn",
|
|
100
|
+
"image": "https://i.imgur.com/spueyAP.png",
|
|
101
|
+
"name": "Finn",
|
|
102
102
|
"online": false,
|
|
103
103
|
"role": "user",
|
|
104
104
|
"updated_at": "2020-04-27T13:39:49.332087Z",
|
|
@@ -124,9 +124,9 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
124
124
|
"user": Object {
|
|
125
125
|
"banned": false,
|
|
126
126
|
"created_at": "2020-04-27T13:39:49.331742Z",
|
|
127
|
-
"id": "
|
|
128
|
-
"image": "https://i.imgur.com/
|
|
129
|
-
"name": "
|
|
127
|
+
"id": "arthur",
|
|
128
|
+
"image": "https://i.imgur.com/LuuGvh0.png",
|
|
129
|
+
"name": "Arthur",
|
|
130
130
|
"online": false,
|
|
131
131
|
"role": "user",
|
|
132
132
|
"updated_at": "2020-04-27T13:39:49.332087Z",
|
|
@@ -314,7 +314,7 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
314
314
|
onError={[Function]}
|
|
315
315
|
source={
|
|
316
316
|
Object {
|
|
317
|
-
"uri": "https://i.imgur.com/
|
|
317
|
+
"uri": "https://i.imgur.com/LuuGvh0.png",
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
style={
|
|
@@ -561,7 +561,7 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
561
561
|
onError={[Function]}
|
|
562
562
|
source={
|
|
563
563
|
Object {
|
|
564
|
-
"uri": "https://i.imgur.com/
|
|
564
|
+
"uri": "https://i.imgur.com/spueyAP.png",
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
style={
|
|
@@ -808,7 +808,7 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
808
808
|
onError={[Function]}
|
|
809
809
|
source={
|
|
810
810
|
Object {
|
|
811
|
-
"uri": "https://i.imgur.com/
|
|
811
|
+
"uri": "https://i.imgur.com/LuuGvh0.png",
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
style={
|
|
@@ -1098,7 +1098,7 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
1098
1098
|
onError={[Function]}
|
|
1099
1099
|
source={
|
|
1100
1100
|
Object {
|
|
1101
|
-
"uri": "https://i.imgur.com/
|
|
1101
|
+
"uri": "https://i.imgur.com/spueyAP.png",
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
style={
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
useThreadContext,
|
|
13
13
|
} from '../../../contexts/threadContext/ThreadContext';
|
|
14
14
|
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
|
|
15
|
-
import { vw } from '../../../utils/utils';
|
|
16
|
-
|
|
17
15
|
import type {
|
|
18
16
|
DefaultAttachmentType,
|
|
19
17
|
DefaultChannelType,
|
|
@@ -24,6 +22,7 @@ import type {
|
|
|
24
22
|
DefaultUserType,
|
|
25
23
|
UnknownType,
|
|
26
24
|
} from '../../../types/types';
|
|
25
|
+
import { vw } from '../../../utils/utils';
|
|
27
26
|
|
|
28
27
|
const styles = StyleSheet.create({
|
|
29
28
|
absolute: { position: 'absolute' },
|
package/src/components/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './Attachment/FileAttachmentGroup';
|
|
|
6
6
|
export * from './Attachment/FileIcon';
|
|
7
7
|
export * from './Attachment/Gallery';
|
|
8
8
|
export * from './Attachment/Giphy';
|
|
9
|
+
export * from './Attachment/utils/buildGallery/buildGallery';
|
|
9
10
|
|
|
10
11
|
export * from './AttachmentPicker/AttachmentPicker';
|
|
11
12
|
export * from './AttachmentPicker/components/AttachmentPickerBottomSheetHandle';
|
|
@@ -143,6 +144,7 @@ export * from './MessageOverlay/MessageActionListItem';
|
|
|
143
144
|
export * from './MessageOverlay/MessageOverlay';
|
|
144
145
|
export * from './MessageOverlay/OverlayBackdrop';
|
|
145
146
|
export * from './MessageOverlay/OverlayReactions';
|
|
147
|
+
export * from './MessageOverlay/OverlayReactionsAvatar';
|
|
146
148
|
export * from './MessageOverlay/OverlayReactionList';
|
|
147
149
|
|
|
148
150
|
export * from './Reply/Reply';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { UnknownType } from '../../types/types';
|
|
4
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
6
5
|
|
|
7
6
|
type ActiveChannels = React.MutableRefObject<string[]>;
|
|
8
7
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { Asset } from '../../native';
|
|
6
4
|
import type { UnknownType } from '../../types/types';
|
|
5
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
7
6
|
|
|
8
7
|
export type AttachmentPickerIconProps = {
|
|
9
8
|
numberOfImageUploads: number;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { Channel, ChannelState } from 'stream-chat';
|
|
6
4
|
|
|
7
5
|
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
|
|
@@ -16,6 +14,7 @@ import type {
|
|
|
16
14
|
DefaultUserType,
|
|
17
15
|
UnknownType,
|
|
18
16
|
} from '../../types/types';
|
|
17
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
19
18
|
|
|
20
19
|
export type ChannelContextValue<
|
|
21
20
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { FlatListProps } from 'react-native';
|
|
6
4
|
import type { FlatList } from 'react-native-gesture-handler';
|
|
5
|
+
|
|
6
|
+
import type { ChannelPreviewMutedStatusProps } from 'src/components/ChannelPreview/ChannelPreviewMutedStatus';
|
|
7
|
+
|
|
7
8
|
import type { Channel } from 'stream-chat';
|
|
8
9
|
|
|
9
10
|
import type { HeaderErrorProps } from '../../components/ChannelList/ChannelListHeaderErrorIndicator';
|
|
11
|
+
import type { QueryChannels } from '../../components/ChannelList/hooks/usePaginatedChannels';
|
|
10
12
|
import type { ChannelAvatarProps } from '../../components/ChannelPreview/ChannelAvatar';
|
|
11
13
|
import type { ChannelPreviewMessageProps } from '../../components/ChannelPreview/ChannelPreviewMessage';
|
|
12
14
|
import type { ChannelPreviewMessengerProps } from '../../components/ChannelPreview/ChannelPreviewMessenger';
|
|
@@ -26,6 +28,7 @@ import type {
|
|
|
26
28
|
DefaultUserType,
|
|
27
29
|
UnknownType,
|
|
28
30
|
} from '../../types/types';
|
|
31
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
29
32
|
|
|
30
33
|
export type ChannelsContextValue<
|
|
31
34
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -64,10 +67,6 @@ export type ChannelsContextValue<
|
|
|
64
67
|
* Default: [EmptyStateIndicator](https://getstream.github.io/stream-chat-react-native/v3/#emptystateindicator)
|
|
65
68
|
* */
|
|
66
69
|
EmptyStateIndicator: React.ComponentType<EmptyStateProps>;
|
|
67
|
-
/**
|
|
68
|
-
* Error in channels query, if any
|
|
69
|
-
*/
|
|
70
|
-
error: boolean | Error;
|
|
71
70
|
/**
|
|
72
71
|
* Custom loading indicator to display at bottom of the list, while loading further pages
|
|
73
72
|
*
|
|
@@ -121,7 +120,7 @@ export type ChannelsContextValue<
|
|
|
121
120
|
/**
|
|
122
121
|
* Loads the next page of `channels`, which is present as a required prop
|
|
123
122
|
*/
|
|
124
|
-
loadNextPage:
|
|
123
|
+
loadNextPage: QueryChannels | undefined;
|
|
125
124
|
/**
|
|
126
125
|
* Max number to display within notification badge. Default: 255 and it cannot be higher than that for now due to backend limitations
|
|
127
126
|
*/
|
|
@@ -174,6 +173,10 @@ export type ChannelsContextValue<
|
|
|
174
173
|
* Default: [Skeleton](https://getstream.github.io/stream-chat-react-native/v3/#skeleton)
|
|
175
174
|
*/
|
|
176
175
|
Skeleton: React.ComponentType;
|
|
176
|
+
/**
|
|
177
|
+
* Error in channels query, if any
|
|
178
|
+
*/
|
|
179
|
+
error?: Error;
|
|
177
180
|
ListHeaderComponent?: React.ComponentType;
|
|
178
181
|
/**
|
|
179
182
|
* Function to set the currently active channel, acts as a bridge between ChannelList and Channel components
|
|
@@ -193,6 +196,14 @@ export type ChannelsContextValue<
|
|
|
193
196
|
* **Default** [ChannelPreviewMessage](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMessage.tsx)
|
|
194
197
|
*/
|
|
195
198
|
PreviewMessage?: React.ComponentType<ChannelPreviewMessageProps<At, Ch, Co, Ev, Me, Re, Us>>;
|
|
199
|
+
/**
|
|
200
|
+
* Custom UI component to render muted status.
|
|
201
|
+
*
|
|
202
|
+
* **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
|
|
203
|
+
*/
|
|
204
|
+
PreviewMutedStatus?: React.ComponentType<
|
|
205
|
+
ChannelPreviewMutedStatusProps<At, Ch, Co, Ev, Me, Re, Us>
|
|
206
|
+
>;
|
|
196
207
|
/**
|
|
197
208
|
* Custom UI component to render preview avatar.
|
|
198
209
|
*
|
|
@@ -8,14 +8,6 @@ import React, {
|
|
|
8
8
|
useRef,
|
|
9
9
|
} from 'react';
|
|
10
10
|
|
|
11
|
-
import { ActiveChannelsProvider } from '../activeChannelsRefContext/ActiveChannelsRefContext';
|
|
12
|
-
|
|
13
|
-
import type { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
14
|
-
import type { PaginatedMessageListContextValue } from '../paginatedMessageListContext/PaginatedMessageListContext';
|
|
15
|
-
import type { ThreadContextValue } from '../threadContext/ThreadContext';
|
|
16
|
-
import type { TypingContextValue } from '../typingContext/TypingContext';
|
|
17
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
18
|
-
|
|
19
11
|
import type {
|
|
20
12
|
DefaultAttachmentType,
|
|
21
13
|
DefaultChannelType,
|
|
@@ -26,6 +18,13 @@ import type {
|
|
|
26
18
|
DefaultUserType,
|
|
27
19
|
UnknownType,
|
|
28
20
|
} from '../../types/types';
|
|
21
|
+
import { ActiveChannelsProvider } from '../activeChannelsRefContext/ActiveChannelsRefContext';
|
|
22
|
+
|
|
23
|
+
import type { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
24
|
+
import type { PaginatedMessageListContextValue } from '../paginatedMessageListContext/PaginatedMessageListContext';
|
|
25
|
+
import type { ThreadContextValue } from '../threadContext/ThreadContext';
|
|
26
|
+
import type { TypingContextValue } from '../typingContext/TypingContext';
|
|
27
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
29
28
|
|
|
30
29
|
export type ChannelState<
|
|
31
30
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { Channel, Mute, StreamChat } from 'stream-chat';
|
|
6
4
|
|
|
7
5
|
import type {
|
|
@@ -14,6 +12,7 @@ import type {
|
|
|
14
12
|
DefaultUserType,
|
|
15
13
|
UnknownType,
|
|
16
14
|
} from '../../types/types';
|
|
15
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
17
16
|
|
|
18
17
|
export type ChatContextValue<
|
|
19
18
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
6
4
|
import type {
|
|
7
5
|
DefaultAttachmentType,
|
|
@@ -13,6 +11,7 @@ import type {
|
|
|
13
11
|
DefaultUserType,
|
|
14
12
|
UnknownType,
|
|
15
13
|
} from '../../types/types';
|
|
14
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
16
15
|
|
|
17
16
|
export type ImageGalleryContextValue<
|
|
18
17
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { Keyboard } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
5
|
-
|
|
6
4
|
import type { UnknownType } from '../../types/types';
|
|
5
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
7
6
|
|
|
8
7
|
export type KeyboardContextValue = {
|
|
9
8
|
dismissKeyboard: () => void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
4
|
-
|
|
5
3
|
import type { Attachment } from 'stream-chat';
|
|
6
4
|
|
|
7
5
|
import type { ActionHandler } from '../../components/Attachment/Attachment';
|
|
@@ -19,6 +17,7 @@ import type {
|
|
|
19
17
|
DefaultUserType,
|
|
20
18
|
UnknownType,
|
|
21
19
|
} from '../../types/types';
|
|
20
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
22
21
|
|
|
23
22
|
export type Alignment = 'right' | 'left';
|
|
24
23
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Alert, Keyboard } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { TextInput, TextInputProps } from 'react-native';
|
|
5
|
+
|
|
3
6
|
import uniq from 'lodash/uniq';
|
|
7
|
+
import { lookup } from 'mime-types';
|
|
4
8
|
import {
|
|
5
9
|
Attachment,
|
|
6
10
|
logChatPromiseExecution,
|
|
@@ -16,34 +20,11 @@ import {
|
|
|
16
20
|
import { useCreateMessageInputContext } from './hooks/useCreateMessageInputContext';
|
|
17
21
|
import { isEditingBoolean, useMessageDetailsForState } from './hooks/useMessageDetailsForState';
|
|
18
22
|
|
|
19
|
-
import { useAttachmentPickerContext } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
20
|
-
import { useChatContext } from '../chatContext/ChatContext';
|
|
21
|
-
import { ChannelContextValue, useChannelContext } from '../channelContext/ChannelContext';
|
|
22
|
-
import { useThreadContext } from '../threadContext/ThreadContext';
|
|
23
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
24
|
-
import { useCooldown } from '../../components/MessageInput/hooks/useCooldown';
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
ACITriggerSettings,
|
|
28
|
-
ACITriggerSettingsParams,
|
|
29
|
-
FileState,
|
|
30
|
-
generateRandomId,
|
|
31
|
-
TriggerSettings,
|
|
32
|
-
urlRegex,
|
|
33
|
-
} from '../../utils/utils';
|
|
34
|
-
|
|
35
|
-
import { Asset, compressImage, getLocalAssetUri, pickDocument } from '../../native';
|
|
36
|
-
|
|
37
|
-
import { useOwnCapabilitiesContext } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
38
|
-
import { useTranslationContext } from '../translationContext/TranslationContext';
|
|
39
|
-
|
|
40
|
-
import type { TextInput, TextInputProps } from 'react-native';
|
|
41
|
-
import { lookup } from 'mime-types';
|
|
42
|
-
|
|
43
23
|
import type { AttachButtonProps } from '../../components/MessageInput/AttachButton';
|
|
44
24
|
import type { CommandsButtonProps } from '../../components/MessageInput/CommandsButton';
|
|
45
25
|
import type { CooldownTimerProps } from '../../components/MessageInput/CooldownTimer';
|
|
46
26
|
import type { FileUploadPreviewProps } from '../../components/MessageInput/FileUploadPreview';
|
|
27
|
+
import { useCooldown } from '../../components/MessageInput/hooks/useCooldown';
|
|
47
28
|
import type { ImageUploadPreviewProps } from '../../components/MessageInput/ImageUploadPreview';
|
|
48
29
|
import type { InputButtonsProps } from '../../components/MessageInput/InputButtons';
|
|
49
30
|
import type { MessageInputProps } from '../../components/MessageInput/MessageInput';
|
|
@@ -51,6 +32,7 @@ import type { MoreOptionsButtonProps } from '../../components/MessageInput/MoreO
|
|
|
51
32
|
import type { SendButtonProps } from '../../components/MessageInput/SendButton';
|
|
52
33
|
import type { UploadProgressIndicatorProps } from '../../components/MessageInput/UploadProgressIndicator';
|
|
53
34
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
35
|
+
import { Asset, compressImage, getLocalAssetUri, pickDocument } from '../../native';
|
|
54
36
|
import type {
|
|
55
37
|
DefaultAttachmentType,
|
|
56
38
|
DefaultChannelType,
|
|
@@ -61,6 +43,21 @@ import type {
|
|
|
61
43
|
DefaultUserType,
|
|
62
44
|
UnknownType,
|
|
63
45
|
} from '../../types/types';
|
|
46
|
+
import {
|
|
47
|
+
ACITriggerSettings,
|
|
48
|
+
ACITriggerSettingsParams,
|
|
49
|
+
FileState,
|
|
50
|
+
generateRandomId,
|
|
51
|
+
TriggerSettings,
|
|
52
|
+
urlRegex,
|
|
53
|
+
} from '../../utils/utils';
|
|
54
|
+
import { useAttachmentPickerContext } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
55
|
+
import { ChannelContextValue, useChannelContext } from '../channelContext/ChannelContext';
|
|
56
|
+
import { useChatContext } from '../chatContext/ChatContext';
|
|
57
|
+
import { useOwnCapabilitiesContext } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
58
|
+
import { useThreadContext } from '../threadContext/ThreadContext';
|
|
59
|
+
import { useTranslationContext } from '../translationContext/TranslationContext';
|
|
60
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
64
61
|
|
|
65
62
|
export type FileUpload = {
|
|
66
63
|
file: {
|
|
@@ -80,7 +77,9 @@ export type ImageUpload = {
|
|
|
80
77
|
};
|
|
81
78
|
id: string;
|
|
82
79
|
state: string;
|
|
80
|
+
height?: number;
|
|
83
81
|
url?: string;
|
|
82
|
+
width?: number;
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
export type MentionAllAppUsersQuery<Us extends DefaultUserType> = {
|
|
@@ -670,6 +669,8 @@ export const MessageInputProvider = <
|
|
|
670
669
|
attachments.push({
|
|
671
670
|
fallback: image.file.name,
|
|
672
671
|
image_url: image.url,
|
|
672
|
+
original_height: image.height,
|
|
673
|
+
original_width: image.width,
|
|
673
674
|
type: 'image',
|
|
674
675
|
} as Attachment<At>);
|
|
675
676
|
}
|
|
@@ -983,8 +984,10 @@ export const MessageInputProvider = <
|
|
|
983
984
|
if (imageUpload.id === id) {
|
|
984
985
|
return {
|
|
985
986
|
...imageUpload,
|
|
987
|
+
height: file.height,
|
|
986
988
|
state: FileState.UPLOADED,
|
|
987
989
|
url: response.file,
|
|
990
|
+
width: file.width,
|
|
988
991
|
};
|
|
989
992
|
}
|
|
990
993
|
return imageUpload;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { MessageInputContextValue } from '../MessageInputContext';
|
|
4
|
-
|
|
5
|
-
import type { ThreadContextValue } from '../../threadContext/ThreadContext';
|
|
6
|
-
|
|
7
3
|
import type {
|
|
8
4
|
DefaultAttachmentType,
|
|
9
5
|
DefaultChannelType,
|
|
@@ -14,6 +10,8 @@ import type {
|
|
|
14
10
|
DefaultUserType,
|
|
15
11
|
UnknownType,
|
|
16
12
|
} from '../../../types/types';
|
|
13
|
+
import type { ThreadContextValue } from '../../threadContext/ThreadContext';
|
|
14
|
+
import type { MessageInputContextValue } from '../MessageInputContext';
|
|
17
15
|
|
|
18
16
|
export const useCreateMessageInputContext = <
|
|
19
17
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { generateRandomId } from '../../../utils/utils';
|
|
4
|
-
|
|
5
|
-
import type { FileUpload, ImageUpload, MessageInputContextValue } from '../MessageInputContext';
|
|
6
|
-
|
|
7
3
|
import type {
|
|
8
4
|
DefaultAttachmentType,
|
|
9
5
|
DefaultChannelType,
|
|
@@ -14,6 +10,9 @@ import type {
|
|
|
14
10
|
DefaultUserType,
|
|
15
11
|
UnknownType,
|
|
16
12
|
} from '../../../types/types';
|
|
13
|
+
import { generateRandomId } from '../../../utils/utils';
|
|
14
|
+
|
|
15
|
+
import type { FileUpload, ImageUpload, MessageInputContextValue } from '../MessageInputContext';
|
|
17
16
|
|
|
18
17
|
export const isEditingBoolean = <
|
|
19
18
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -41,12 +40,7 @@ export const useMessageDetailsForState = <
|
|
|
41
40
|
) => {
|
|
42
41
|
const [fileUploads, setFileUploads] = useState<FileUpload[]>([]);
|
|
43
42
|
const [imageUploads, setImageUploads] = useState<ImageUpload[]>([]);
|
|
44
|
-
const [mentionedUsers, setMentionedUsers] = useState(
|
|
45
|
-
(!isEditingBoolean<At, Ch, Co, Ev, Me, Re, Us>(message) &&
|
|
46
|
-
Array.isArray(message?.mentioned_users) &&
|
|
47
|
-
message.mentioned_users.map((user) => user.id)) ||
|
|
48
|
-
[],
|
|
49
|
-
);
|
|
43
|
+
const [mentionedUsers, setMentionedUsers] = useState<string[]>([]);
|
|
50
44
|
const [numberOfUploads, setNumberOfUploads] = useState(0);
|
|
51
45
|
const [showMoreOptions, setShowMoreOptions] = useState(true);
|
|
52
46
|
const initialTextValue = initialValue || '';
|
|
@@ -60,6 +54,17 @@ export const useMessageDetailsForState = <
|
|
|
60
54
|
|
|
61
55
|
const messageValue =
|
|
62
56
|
typeof message === 'boolean' ? '' : `${message.id}${message.text}${message.updated_at}`;
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (
|
|
60
|
+
!isEditingBoolean<At, Ch, Co, Ev, Me, Re, Us>(message) &&
|
|
61
|
+
Array.isArray(message?.mentioned_users)
|
|
62
|
+
) {
|
|
63
|
+
const mentionedUsers = message.mentioned_users.map((user) => user.id);
|
|
64
|
+
setMentionedUsers(mentionedUsers);
|
|
65
|
+
}
|
|
66
|
+
}, [messageValue]);
|
|
67
|
+
|
|
63
68
|
useEffect(() => {
|
|
64
69
|
if (message && !isEditingBoolean<At, Ch, Co, Ev, Me, Re, Us>(message)) {
|
|
65
70
|
setText(message?.text || '');
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import React, { PropsWithChildren, useContext
|
|
2
|
-
|
|
3
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
1
|
+
import React, { PropsWithChildren, useContext } from 'react';
|
|
4
2
|
|
|
5
3
|
import type { Attachment } from 'stream-chat';
|
|
6
4
|
|
|
7
|
-
import
|
|
8
|
-
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
|
|
9
|
-
import type { MessagesContextValue } from '../messagesContext/MessagesContext';
|
|
5
|
+
import { useResettableState } from './hooks/useResettableState';
|
|
10
6
|
|
|
11
7
|
import type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
8
|
+
import type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';
|
|
12
9
|
import type {
|
|
13
10
|
MessageActionListItemProps,
|
|
14
11
|
MessageActionType,
|
|
15
12
|
} from '../../components/MessageOverlay/MessageActionListItem';
|
|
16
|
-
import type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';
|
|
17
13
|
import type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';
|
|
18
14
|
import type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';
|
|
15
|
+
import type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';
|
|
19
16
|
import type {
|
|
20
17
|
DefaultAttachmentType,
|
|
21
18
|
DefaultChannelType,
|
|
@@ -27,6 +24,10 @@ import type {
|
|
|
27
24
|
UnknownType,
|
|
28
25
|
} from '../../types/types';
|
|
29
26
|
import type { ReactionData } from '../../utils/utils';
|
|
27
|
+
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
|
|
28
|
+
import type { MessagesContextValue } from '../messagesContext/MessagesContext';
|
|
29
|
+
import type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
30
|
+
import { getDisplayName } from '../utils/getDisplayName';
|
|
30
31
|
|
|
31
32
|
export type MessageOverlayData<
|
|
32
33
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -84,6 +85,7 @@ export type MessageOverlayContextValue<
|
|
|
84
85
|
* **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/OverlayReactions.tsx)
|
|
85
86
|
*/
|
|
86
87
|
OverlayReactions: React.ComponentType<OverlayReactionsProps>;
|
|
88
|
+
OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;
|
|
87
89
|
reset: () => void;
|
|
88
90
|
setData: React.Dispatch<React.SetStateAction<MessageOverlayData<At, Ch, Co, Ev, Me, Re, Us>>>;
|
|
89
91
|
data?: MessageOverlayData<At, Ch, Co, Ev, Me, Re, Us>;
|
|
@@ -105,18 +107,7 @@ export const MessageOverlayProvider = <
|
|
|
105
107
|
}: PropsWithChildren<{
|
|
106
108
|
value?: MessageOverlayContextValue<At, Ch, Co, Ev, Me, Re, Us>;
|
|
107
109
|
}>) => {
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
const reset = () => {
|
|
111
|
-
// TODO: Add the isMounted check here.
|
|
112
|
-
setData(value?.data);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const messageOverlayContext = {
|
|
116
|
-
data,
|
|
117
|
-
reset,
|
|
118
|
-
setData,
|
|
119
|
-
};
|
|
110
|
+
const messageOverlayContext = useResettableState(value);
|
|
120
111
|
return (
|
|
121
112
|
<MessageOverlayContext.Provider value={messageOverlayContext as MessageOverlayContextValue}>
|
|
122
113
|
{children}
|