stream-chat-react-native-core 4.0.0-beta.1 → 4.0.0-beta.5
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 +112 -148
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +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 +28 -11
- 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 +20 -16
- 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/ReactionList.js +46 -46
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +151 -72
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +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 +20 -11
- 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/index.js +0 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +1 -1
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/mock-builders/api/error.js +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js.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 +112 -148
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
- package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +9 -8
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +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 +28 -11
- 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 +20 -16
- 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/ReactionList.js +46 -46
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +151 -72
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +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 +20 -11
- 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/index.js +0 -26
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/utils/base.js +1 -1
- package/lib/module/index.js +6 -6
- package/lib/module/mock-builders/api/error.js +1 -1
- package/lib/module/mock-builders/api/sendMessage.js.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/Avatar/Avatar.d.ts +1 -1
- 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/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
- 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 +17 -3
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- 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 +17 -8
- package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
- package/lib/typescript/icons/index.d.ts +0 -2
- 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 +67 -70
- 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 +8 -11
- 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 +24 -11
- package/src/components/ImageGallery/components/ImageGrid.tsx +4 -5
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -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 +11 -12
- 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/ReactionList.tsx +31 -31
- 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.test.tsx +70 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +93 -58
- 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 +36 -19
- 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/icons/index.ts +0 -2
- 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
- package/lib/commonjs/icons/Left.js +0 -38
- package/lib/commonjs/icons/Left.js.map +0 -1
- package/lib/commonjs/icons/Right.js +0 -38
- package/lib/commonjs/icons/Right.js.map +0 -1
- package/lib/module/icons/Left.js +0 -38
- package/lib/module/icons/Left.js.map +0 -1
- package/lib/module/icons/Right.js +0 -38
- package/lib/module/icons/Right.js.map +0 -1
- package/lib/typescript/icons/Left.d.ts +0 -3
- package/lib/typescript/icons/Right.d.ts +0 -3
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useEffect, useState } from 'react';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
+
|
|
3
4
|
import Dayjs from 'dayjs';
|
|
4
5
|
|
|
6
|
+
import type { Channel } from 'stream-chat';
|
|
7
|
+
|
|
5
8
|
import { useCreateChatContext } from './hooks/useCreateChatContext';
|
|
6
9
|
import { useIsOnline } from './hooks/useIsOnline';
|
|
7
10
|
import { useMutedUsers } from './hooks/useMutedUsers';
|
|
@@ -9,6 +12,7 @@ import { useMutedUsers } from './hooks/useMutedUsers';
|
|
|
9
12
|
import { ChatContextValue, ChatProvider } from '../../contexts/chatContext/ChatContext';
|
|
10
13
|
import { useOverlayContext } from '../../contexts/overlayContext/OverlayContext';
|
|
11
14
|
import { DeepPartial, ThemeProvider } from '../../contexts/themeContext/ThemeContext';
|
|
15
|
+
import type { Theme } from '../../contexts/themeContext/utils/theme';
|
|
12
16
|
import {
|
|
13
17
|
TranslationContextValue,
|
|
14
18
|
TranslationProvider,
|
|
@@ -16,12 +20,6 @@ import {
|
|
|
16
20
|
import { useStreami18n } from '../../hooks/useStreami18n';
|
|
17
21
|
|
|
18
22
|
import { SDK } from '../../native';
|
|
19
|
-
import { version } from '../../version.json';
|
|
20
|
-
|
|
21
|
-
import type { Channel } from 'stream-chat';
|
|
22
|
-
|
|
23
|
-
import type { Theme } from '../../contexts/themeContext/utils/theme';
|
|
24
|
-
import type { Streami18n } from '../../utils/Streami18n';
|
|
25
23
|
import type {
|
|
26
24
|
DefaultAttachmentType,
|
|
27
25
|
DefaultChannelType,
|
|
@@ -32,6 +30,8 @@ import type {
|
|
|
32
30
|
DefaultUserType,
|
|
33
31
|
UnknownType,
|
|
34
32
|
} from '../../types/types';
|
|
33
|
+
import type { Streami18n } from '../../utils/Streami18n';
|
|
34
|
+
import { version } from '../../version.json';
|
|
35
35
|
|
|
36
36
|
export type ChatProps<
|
|
37
37
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { act, cleanup, render, waitFor } from '@testing-library/react-native';
|
|
4
|
-
|
|
5
|
-
import { Chat } from '../Chat';
|
|
6
3
|
|
|
7
|
-
import {
|
|
4
|
+
import { act, cleanup, render, waitFor } from '@testing-library/react-native';
|
|
8
5
|
|
|
6
|
+
import { setNetInfoFetchMock } from '../../../../jest-setup';
|
|
9
7
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
8
|
+
|
|
10
9
|
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
|
|
11
10
|
import dispatchConnectionChangedEvent from '../../../mock-builders/event/connectionChanged';
|
|
12
11
|
import dispatchConnectionRecoveredEvent from '../../../mock-builders/event/connectionRecovered';
|
|
13
12
|
import { getTestClient } from '../../../mock-builders/mock';
|
|
14
|
-
import {
|
|
13
|
+
import { Streami18n } from '../../../utils/Streami18n';
|
|
14
|
+
import { Chat } from '../Chat';
|
|
15
15
|
|
|
16
16
|
const ChatContextConsumer = ({ fn }) => {
|
|
17
17
|
fn(useChatContext());
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
+
import type { NetInfoSubscription } from '@react-native-community/netinfo';
|
|
4
|
+
|
|
5
|
+
import type { StreamChat, Event as StreamEvent } from 'stream-chat';
|
|
6
|
+
|
|
3
7
|
import { useAppStateListener } from '../../../hooks/useAppStateListener';
|
|
4
8
|
import { useIsMountedRef } from '../../../hooks/useIsMountedRef';
|
|
5
9
|
import { NetInfo } from '../../../native';
|
|
6
10
|
|
|
7
|
-
import type { NetInfoSubscription } from '@react-native-community/netinfo';
|
|
8
|
-
import type { StreamChat, Event as StreamEvent } from 'stream-chat';
|
|
9
|
-
|
|
10
11
|
import type {
|
|
11
12
|
DefaultAttachmentType,
|
|
12
13
|
DefaultChannelType,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
StyleSheet,
|
|
10
10
|
ViewStyle,
|
|
11
11
|
} from 'react-native';
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
import {
|
|
14
14
|
PanGestureHandler,
|
|
15
15
|
PanGestureHandlerGestureEvent,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
TapGestureHandler,
|
|
19
19
|
TapGestureHandlerGestureEvent,
|
|
20
20
|
} from 'react-native-gesture-handler';
|
|
21
|
+
|
|
21
22
|
import Animated, {
|
|
22
23
|
cancelAnimation,
|
|
23
24
|
Easing,
|
|
@@ -32,6 +33,10 @@ import Animated, {
|
|
|
32
33
|
withTiming,
|
|
33
34
|
} from 'react-native-reanimated';
|
|
34
35
|
|
|
36
|
+
import { BottomSheetModal, BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
37
|
+
|
|
38
|
+
import type { UserResponse } from 'stream-chat';
|
|
39
|
+
|
|
35
40
|
import { AnimatedGalleryImage } from './components/AnimatedGalleryImage';
|
|
36
41
|
import {
|
|
37
42
|
ImageGalleryFooter,
|
|
@@ -52,9 +57,6 @@ import { useImageGalleryContext } from '../../contexts/imageGalleryContext/Image
|
|
|
52
57
|
import { useOverlayContext } from '../../contexts/overlayContext/OverlayContext';
|
|
53
58
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
54
59
|
import { triggerHaptic } from '../../native';
|
|
55
|
-
import { vh, vw } from '../../utils/utils';
|
|
56
|
-
|
|
57
|
-
import type { UserResponse } from 'stream-chat';
|
|
58
60
|
import type {
|
|
59
61
|
DefaultAttachmentType,
|
|
60
62
|
DefaultChannelType,
|
|
@@ -65,6 +67,9 @@ import type {
|
|
|
65
67
|
DefaultUserType,
|
|
66
68
|
UnknownType,
|
|
67
69
|
} from '../../types/types';
|
|
70
|
+
import { getResizedImageUrl } from '../../utils/getResizedImageUrl';
|
|
71
|
+
import { getUrlOfImageAttachment } from '../../utils/getUrlOfImageAttachment';
|
|
72
|
+
import { vh, vw } from '../../utils/utils';
|
|
68
73
|
|
|
69
74
|
const isAndroid = Platform.OS === 'android';
|
|
70
75
|
const fullScreenHeight = Dimensions.get('screen').height;
|
|
@@ -160,6 +165,7 @@ export const ImageGallery = <
|
|
|
160
165
|
imageGallery: { backgroundColor },
|
|
161
166
|
},
|
|
162
167
|
} = useTheme();
|
|
168
|
+
const [gridPhotos, setGridPhotos] = useState<Photo<Us>[]>([]);
|
|
163
169
|
const { overlay, setOverlay, translucentStatusBar } = useOverlayContext();
|
|
164
170
|
const { image, images, setImage } = useImageGalleryContext<At, Ch, Co, Ev, Me, Re, Us>();
|
|
165
171
|
|
|
@@ -180,15 +186,15 @@ export const ImageGallery = <
|
|
|
180
186
|
: vh(100);
|
|
181
187
|
const halfScreenHeight = screenHeight / 2;
|
|
182
188
|
const quarterScreenHeight = screenHeight / 4;
|
|
183
|
-
const snapPoints = React.useMemo(() => [
|
|
189
|
+
const snapPoints = React.useMemo(() => [(screenHeight * 9) / 10], []);
|
|
184
190
|
|
|
185
191
|
/**
|
|
186
|
-
*
|
|
192
|
+
* BottomSheetModal ref
|
|
187
193
|
*/
|
|
188
|
-
const
|
|
194
|
+
const bottomSheetModalRef = useRef<BottomSheetModal>(null);
|
|
189
195
|
|
|
190
196
|
/**
|
|
191
|
-
*
|
|
197
|
+
* BottomSheetModal state
|
|
192
198
|
*/
|
|
193
199
|
const [currentBottomSheetIndex, setCurrentBottomSheetIndex] = useState(0);
|
|
194
200
|
const animatedBottomSheetIndex = useSharedValue(0);
|
|
@@ -344,20 +350,30 @@ export const ImageGallery = <
|
|
|
344
350
|
attachment.type === 'image' &&
|
|
345
351
|
!attachment.title_link &&
|
|
346
352
|
!attachment.og_scrape_url &&
|
|
347
|
-
(attachment
|
|
353
|
+
getUrlOfImageAttachment(attachment),
|
|
348
354
|
) || [];
|
|
349
355
|
|
|
350
|
-
const attachmentPhotos = attachmentImages.map((
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
356
|
+
const attachmentPhotos = attachmentImages.map((a) => {
|
|
357
|
+
const imageUrl = getUrlOfImageAttachment(a) as string;
|
|
358
|
+
|
|
359
|
+
return {
|
|
360
|
+
channelId: cur.cid,
|
|
361
|
+
created_at: cur.created_at,
|
|
362
|
+
id: `photoId-${cur.id}-${imageUrl}`,
|
|
363
|
+
messageId: cur.id,
|
|
364
|
+
original_height: a.original_height,
|
|
365
|
+
original_width: a.original_width,
|
|
366
|
+
uri: getResizedImageUrl({
|
|
367
|
+
height: screenHeight,
|
|
368
|
+
url: imageUrl,
|
|
369
|
+
width: screenWidth,
|
|
370
|
+
}),
|
|
371
|
+
user: cur.user,
|
|
372
|
+
user_id: cur.user_id,
|
|
373
|
+
};
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
return [...acc, ...attachmentPhotos] as Photo<Us>[];
|
|
361
377
|
}, []);
|
|
362
378
|
|
|
363
379
|
/**
|
|
@@ -398,8 +414,15 @@ export const ImageGallery = <
|
|
|
398
414
|
const uriForCurrentImage = photos[selectedIndex]?.uri;
|
|
399
415
|
useEffect(() => {
|
|
400
416
|
setCurrentImageHeight(screenHeight);
|
|
401
|
-
|
|
402
|
-
|
|
417
|
+
const photo = photos[index.value];
|
|
418
|
+
const height = photo?.original_height;
|
|
419
|
+
const width = photo?.original_width;
|
|
420
|
+
|
|
421
|
+
if (height && width) {
|
|
422
|
+
const imageHeight = Math.floor(height * (screenWidth / width));
|
|
423
|
+
setCurrentImageHeight(imageHeight > screenHeight ? screenHeight : imageHeight);
|
|
424
|
+
} else if (photo?.uri) {
|
|
425
|
+
Image.getSize(photo.uri, (width, height) => {
|
|
403
426
|
const imageHeight = Math.floor(height * (screenWidth / width));
|
|
404
427
|
setCurrentImageHeight(imageHeight > screenHeight ? screenHeight : imageHeight);
|
|
405
428
|
});
|
|
@@ -1038,16 +1061,22 @@ export const ImageGallery = <
|
|
|
1038
1061
|
);
|
|
1039
1062
|
|
|
1040
1063
|
/**
|
|
1041
|
-
* Functions
|
|
1064
|
+
* Functions toclose BottomSheetModal with image grid
|
|
1042
1065
|
*/
|
|
1043
1066
|
const closeGridView = () => {
|
|
1044
|
-
if (
|
|
1045
|
-
|
|
1067
|
+
if (bottomSheetModalRef.current?.close) {
|
|
1068
|
+
bottomSheetModalRef.current.close();
|
|
1069
|
+
setGridPhotos([]);
|
|
1046
1070
|
}
|
|
1047
1071
|
};
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Function to open BottomSheetModal with image grid
|
|
1075
|
+
*/
|
|
1048
1076
|
const openGridView = () => {
|
|
1049
|
-
if (
|
|
1050
|
-
|
|
1077
|
+
if (bottomSheetModalRef.current?.present) {
|
|
1078
|
+
bottomSheetModalRef.current.present();
|
|
1079
|
+
setGridPhotos(photos);
|
|
1051
1080
|
}
|
|
1052
1081
|
};
|
|
1053
1082
|
|
|
@@ -1153,30 +1182,32 @@ export const ImageGallery = <
|
|
|
1153
1182
|
closeGridView={closeGridView}
|
|
1154
1183
|
currentBottomSheetIndex={currentBottomSheetIndex}
|
|
1155
1184
|
/>
|
|
1156
|
-
<
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1185
|
+
<BottomSheetModalProvider>
|
|
1186
|
+
<BottomSheetModal
|
|
1187
|
+
animatedIndex={animatedBottomSheetIndex}
|
|
1188
|
+
enablePanDownToClose={true}
|
|
1189
|
+
handleComponent={() => (
|
|
1190
|
+
<ImageGridHandle
|
|
1191
|
+
closeGridView={closeGridView}
|
|
1192
|
+
{...imageGalleryCustomComponents?.gridHandle}
|
|
1193
|
+
/>
|
|
1194
|
+
)}
|
|
1195
|
+
handleHeight={imageGalleryGridHandleHeight ?? 40}
|
|
1196
|
+
index={0}
|
|
1197
|
+
onChange={(index: number) => setCurrentBottomSheetIndex(index)}
|
|
1198
|
+
ref={bottomSheetModalRef}
|
|
1199
|
+
snapPoints={imageGalleryGridSnapPoints || snapPoints}
|
|
1200
|
+
>
|
|
1201
|
+
<ImageGrid
|
|
1161
1202
|
closeGridView={closeGridView}
|
|
1162
|
-
{
|
|
1203
|
+
numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}
|
|
1204
|
+
photos={gridPhotos}
|
|
1205
|
+
resetVisibleValues={resetVisibleValues}
|
|
1206
|
+
setImage={setImage}
|
|
1207
|
+
{...imageGalleryCustomComponents?.grid}
|
|
1163
1208
|
/>
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
index={0}
|
|
1167
|
-
onChange={(index: number) => setCurrentBottomSheetIndex(index)}
|
|
1168
|
-
ref={bottomSheetRef}
|
|
1169
|
-
snapPoints={imageGalleryGridSnapPoints || snapPoints}
|
|
1170
|
-
>
|
|
1171
|
-
<ImageGrid
|
|
1172
|
-
closeGridView={closeGridView}
|
|
1173
|
-
numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}
|
|
1174
|
-
photos={photos}
|
|
1175
|
-
resetVisibleValues={resetVisibleValues}
|
|
1176
|
-
setImage={setImage}
|
|
1177
|
-
{...imageGalleryCustomComponents?.grid}
|
|
1178
|
-
/>
|
|
1179
|
-
</BottomSheet>
|
|
1209
|
+
</BottomSheetModal>
|
|
1210
|
+
</BottomSheetModalProvider>
|
|
1180
1211
|
</Animated.View>
|
|
1181
1212
|
);
|
|
1182
1213
|
};
|
|
@@ -1202,6 +1233,8 @@ export type Photo<Us extends UnknownType = DefaultUserType> = {
|
|
|
1202
1233
|
channelId?: string;
|
|
1203
1234
|
created_at?: string | Date;
|
|
1204
1235
|
messageId?: string;
|
|
1236
|
+
original_height?: number;
|
|
1237
|
+
original_width?: number;
|
|
1205
1238
|
user?: UserResponse<Us> | null;
|
|
1206
1239
|
user_id?: string;
|
|
1207
1240
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
+
import type { ImageStyle, StyleProp } from 'react-native';
|
|
3
4
|
import Animated, { useAnimatedStyle } from 'react-native-reanimated';
|
|
4
5
|
|
|
5
6
|
import { vw } from '../../../utils/utils';
|
|
6
7
|
|
|
7
|
-
import type { ImageStyle, StyleProp } from 'react-native';
|
|
8
|
-
|
|
9
8
|
const screenWidth = vw(100);
|
|
10
9
|
const halfScreenWidth = vw(50);
|
|
11
10
|
const oneEight = 1 / 8;
|
|
@@ -7,9 +7,8 @@ import { useTranslationContext } from '../../../contexts/translationContext/Tran
|
|
|
7
7
|
import { Grid as GridIconDefault, Share as ShareIconDefault } from '../../../icons';
|
|
8
8
|
import { deleteFile, saveFile, shareImage } from '../../../native';
|
|
9
9
|
|
|
10
|
-
import type { Photo } from '../ImageGallery';
|
|
11
|
-
|
|
12
10
|
import type { DefaultUserType, UnknownType } from '../../../types/types';
|
|
11
|
+
import type { Photo } from '../ImageGallery';
|
|
13
12
|
|
|
14
13
|
const ReanimatedSafeAreaView = Animated.createAnimatedComponent
|
|
15
14
|
? Animated.createAnimatedComponent(SafeAreaView)
|
|
@@ -126,9 +125,7 @@ export const ImageGalleryFooter = <Us extends UnknownType = DefaultUserType>(pro
|
|
|
126
125
|
setShareMenuOpen(true);
|
|
127
126
|
try {
|
|
128
127
|
const localImage = await saveFile({
|
|
129
|
-
fileName: `${photo.user?.
|
|
130
|
-
photo.messageId
|
|
131
|
-
}-${selectedIndex}.jpg`,
|
|
128
|
+
fileName: `${photo.user?.id || 'ChatPhoto'}-${photo.messageId}-${selectedIndex}.jpg`,
|
|
132
129
|
fromUrl: photo.uri,
|
|
133
130
|
});
|
|
134
131
|
await shareImage({ type: 'image/jpeg', url: localImage });
|
|
@@ -15,13 +15,13 @@ import { useOverlayContext } from '../../../contexts/overlayContext/OverlayConte
|
|
|
15
15
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
16
16
|
import {
|
|
17
17
|
isDayOrMoment,
|
|
18
|
+
TDateTimeParserOutput,
|
|
18
19
|
useTranslationContext,
|
|
19
20
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
20
21
|
import { Close } from '../../../icons';
|
|
21
22
|
|
|
22
|
-
import type { Photo } from '../ImageGallery';
|
|
23
|
-
|
|
24
23
|
import type { DefaultUserType, UnknownType } from '../../../types/types';
|
|
24
|
+
import type { Photo } from '../ImageGallery';
|
|
25
25
|
|
|
26
26
|
const ReanimatedSafeAreaView = Animated.createAnimatedComponent
|
|
27
27
|
? Animated.createAnimatedComponent(SafeAreaView)
|
|
@@ -105,16 +105,29 @@ export const ImageGalleryHeader = <Us extends UnknownType = DefaultUserType>(pro
|
|
|
105
105
|
const parsedDate = photo ? tDateTimeParser(photo?.created_at) : null;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
* .calendar
|
|
109
|
-
*
|
|
110
|
-
*
|
|
108
|
+
* .calendar and .fromNow can be initialized after the first render,
|
|
109
|
+
* and attempting to access them at that time will cause an error
|
|
110
|
+
* to be thrown.
|
|
111
|
+
*
|
|
112
|
+
* This falls back to null if neither exist.
|
|
111
113
|
*/
|
|
112
|
-
const date
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
const getDateObject = (date: TDateTimeParserOutput | null) => {
|
|
115
|
+
if (date === null || !isDayOrMoment(date)) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (date.calendar) {
|
|
120
|
+
return date.calendar();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (date.fromNow) {
|
|
124
|
+
return date.fromNow();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const date = getDateObject(parsedDate);
|
|
118
131
|
|
|
119
132
|
const headerStyle = useAnimatedStyle<ViewStyle>(() => ({
|
|
120
133
|
opacity: opacity.value,
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ImageBackground, StyleSheet } from 'react-native';
|
|
3
|
-
import { BottomSheetFlatList, TouchableOpacity } from '@gorhom/bottom-sheet';
|
|
4
3
|
|
|
5
|
-
import {
|
|
4
|
+
import { BottomSheetFlatList, TouchableOpacity } from '@gorhom/bottom-sheet';
|
|
6
5
|
|
|
7
6
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
7
|
+
import type { DefaultUserType, UnknownType } from '../../../types/types';
|
|
8
8
|
import { vw } from '../../../utils/utils';
|
|
9
|
+
import { Avatar } from '../../Avatar/Avatar';
|
|
9
10
|
|
|
10
11
|
import type { Photo } from '../ImageGallery';
|
|
11
12
|
|
|
12
|
-
import type { DefaultUserType, UnknownType } from '../../../types/types';
|
|
13
|
-
|
|
14
13
|
const styles = StyleSheet.create({
|
|
15
14
|
avatarImage: {
|
|
16
15
|
borderRadius: 22,
|
|
@@ -161,7 +160,7 @@ export const ImageGrid = <Us extends UnknownType = DefaultUserType>(props: Props
|
|
|
161
160
|
{ backgroundColor: white },
|
|
162
161
|
contentContainer,
|
|
163
162
|
]}
|
|
164
|
-
data={imageGridItems}
|
|
163
|
+
data={imageGridItems as GridImageItem<UnknownType>[]}
|
|
165
164
|
keyExtractor={(item, index) => `${item.uri}-${index}`}
|
|
166
165
|
numColumns={numberOfImageGalleryGridColumns || 3}
|
|
167
166
|
renderItem={renderItem}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type Animated from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
import { render } from '@testing-library/react-native';
|
|
6
|
+
|
|
7
|
+
import { ThemeProvider } from '../../../../contexts/themeContext/ThemeContext';
|
|
8
|
+
import { ImageGalleryHeader } from '../ImageGalleryHeader';
|
|
9
|
+
|
|
10
|
+
it('doesnt fail if fromNow is not available on first render', () => {
|
|
11
|
+
try {
|
|
12
|
+
const { getAllByText } = render(
|
|
13
|
+
<ThemeProvider>
|
|
14
|
+
<ImageGalleryHeader
|
|
15
|
+
opacity={1 as unknown as Animated.SharedValue<number>}
|
|
16
|
+
photo={{
|
|
17
|
+
id: 'id',
|
|
18
|
+
uri: 'file:///bogus/uri/to/photo.jpg',
|
|
19
|
+
}}
|
|
20
|
+
visible={1 as unknown as Animated.SharedValue<number>}
|
|
21
|
+
/>
|
|
22
|
+
</ThemeProvider>,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
expect(getAllByText('Unknown User')).toBeTruthy();
|
|
26
|
+
} catch (error: unknown) {
|
|
27
|
+
if (error instanceof Error) {
|
|
28
|
+
throw new Error(`Error encountered on first render of ImageGalleryHeader: ${error.message}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { Spinner } from '../Spinner/Spinner';
|
|
5
|
-
|
|
6
4
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
7
5
|
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
6
|
+
import { Spinner } from '../Spinner/Spinner';
|
|
8
7
|
|
|
9
8
|
const styles = StyleSheet.create({
|
|
10
9
|
container: {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GestureResponderEvent, Keyboard, StyleProp, View, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import type { Attachment } from 'stream-chat';
|
|
5
|
+
|
|
4
6
|
import { useCreateMessageContext } from './hooks/useCreateMessageContext';
|
|
7
|
+
import { useMessageActionHandlers } from './hooks/useMessageActionHandlers';
|
|
8
|
+
import { useMessageActions } from './hooks/useMessageActions';
|
|
5
9
|
import { messageActions as defaultMessageActions } from './utils/messageActions';
|
|
6
10
|
|
|
7
|
-
import {
|
|
8
|
-
isMessageWithStylesReadByAndDateSeparator,
|
|
9
|
-
MessageType,
|
|
10
|
-
} from '../MessageList/hooks/useMessageList';
|
|
11
|
-
|
|
12
|
-
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
13
11
|
import {
|
|
14
12
|
ChannelContextValue,
|
|
15
13
|
useChannelContext,
|
|
@@ -28,7 +26,6 @@ import {
|
|
|
28
26
|
MessageOverlayContextValue,
|
|
29
27
|
useMessageOverlayContext,
|
|
30
28
|
} from '../../contexts/messageOverlayContext/MessageOverlayContext';
|
|
31
|
-
import type { MessageActionListItemProps } from '../MessageOverlay/MessageActionListItem';
|
|
32
29
|
import {
|
|
33
30
|
MessagesContextValue,
|
|
34
31
|
useMessagesContext,
|
|
@@ -37,6 +34,7 @@ import {
|
|
|
37
34
|
OverlayContextValue,
|
|
38
35
|
useOverlayContext,
|
|
39
36
|
} from '../../contexts/overlayContext/OverlayContext';
|
|
37
|
+
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
40
38
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
41
39
|
import { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';
|
|
42
40
|
import {
|
|
@@ -45,10 +43,6 @@ import {
|
|
|
45
43
|
} from '../../contexts/translationContext/TranslationContext';
|
|
46
44
|
|
|
47
45
|
import { triggerHaptic } from '../../native';
|
|
48
|
-
import { emojiRegex } from '../../utils/utils';
|
|
49
|
-
|
|
50
|
-
import type { Attachment } from 'stream-chat';
|
|
51
|
-
|
|
52
46
|
import type {
|
|
53
47
|
DefaultAttachmentType,
|
|
54
48
|
DefaultChannelType,
|
|
@@ -59,8 +53,13 @@ import type {
|
|
|
59
53
|
DefaultUserType,
|
|
60
54
|
UnknownType,
|
|
61
55
|
} from '../../types/types';
|
|
62
|
-
import {
|
|
63
|
-
|
|
56
|
+
import { emojiRegex, MessageStatusTypes } from '../../utils/utils';
|
|
57
|
+
|
|
58
|
+
import {
|
|
59
|
+
isMessageWithStylesReadByAndDateSeparator,
|
|
60
|
+
MessageType,
|
|
61
|
+
} from '../MessageList/hooks/useMessageList';
|
|
62
|
+
import type { MessageActionListItemProps } from '../MessageOverlay/MessageActionListItem';
|
|
64
63
|
|
|
65
64
|
export type TouchableHandlerPayload = {
|
|
66
65
|
defaultHandler?: () => void;
|
|
@@ -288,7 +287,8 @@ const MessageWithContext = <
|
|
|
288
287
|
},
|
|
289
288
|
} = useTheme();
|
|
290
289
|
|
|
291
|
-
const actionsEnabled =
|
|
290
|
+
const actionsEnabled =
|
|
291
|
+
message.type === 'regular' && message.status === MessageStatusTypes.RECEIVED;
|
|
292
292
|
|
|
293
293
|
const isMyMessage = client && message && client.userID === message.user?.id;
|
|
294
294
|
|
|
@@ -312,7 +312,9 @@ const MessageWithContext = <
|
|
|
312
312
|
goToMessage(quotedMessage.id);
|
|
313
313
|
};
|
|
314
314
|
|
|
315
|
-
const
|
|
315
|
+
const errorOrFailed = message.type === 'error' || message.status === MessageStatusTypes.FAILED;
|
|
316
|
+
|
|
317
|
+
const onPress = (error = errorOrFailed) => {
|
|
316
318
|
if (dismissKeyboardOnMessageTouch) {
|
|
317
319
|
Keyboard.dismiss();
|
|
318
320
|
}
|
|
@@ -454,6 +456,7 @@ const MessageWithContext = <
|
|
|
454
456
|
client,
|
|
455
457
|
enforceUniqueReaction,
|
|
456
458
|
message,
|
|
459
|
+
removeMessage,
|
|
457
460
|
retrySendMessage,
|
|
458
461
|
setEditingState,
|
|
459
462
|
setQuotedMessageState,
|
|
@@ -492,6 +495,7 @@ const MessageWithContext = <
|
|
|
492
495
|
message,
|
|
493
496
|
onThreadSelect,
|
|
494
497
|
openThread,
|
|
498
|
+
removeMessage,
|
|
495
499
|
retrySendMessage,
|
|
496
500
|
selectReaction,
|
|
497
501
|
setEditingState,
|
|
@@ -501,11 +505,7 @@ const MessageWithContext = <
|
|
|
501
505
|
t,
|
|
502
506
|
updateMessage,
|
|
503
507
|
});
|
|
504
|
-
|
|
505
|
-
const showMessageOverlay = async (
|
|
506
|
-
messageReactions = false,
|
|
507
|
-
error = message.type === 'error' || message.status === 'failed',
|
|
508
|
-
) => {
|
|
508
|
+
const showMessageOverlay = async (messageReactions = false, error = errorOrFailed) => {
|
|
509
509
|
await dismissKeyboard();
|
|
510
510
|
|
|
511
511
|
const isThreadMessage = threadList || !!message.parent_id;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { Avatar, AvatarProps } from '../../Avatar/Avatar';
|
|
5
|
-
|
|
6
4
|
import {
|
|
7
5
|
MessageContextValue,
|
|
8
6
|
useMessageContext,
|
|
@@ -19,6 +17,7 @@ import type {
|
|
|
19
17
|
DefaultUserType,
|
|
20
18
|
UnknownType,
|
|
21
19
|
} from '../../../types/types';
|
|
20
|
+
import { Avatar, AvatarProps } from '../../Avatar/Avatar';
|
|
22
21
|
|
|
23
22
|
export type MessageAvatarPropsWithContext<
|
|
24
23
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -20,8 +20,6 @@ import {
|
|
|
20
20
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
21
21
|
|
|
22
22
|
import { Error } from '../../../icons';
|
|
23
|
-
import { vw } from '../../../utils/utils';
|
|
24
|
-
|
|
25
23
|
import type {
|
|
26
24
|
DefaultAttachmentType,
|
|
27
25
|
DefaultChannelType,
|
|
@@ -32,6 +30,7 @@ import type {
|
|
|
32
30
|
DefaultUserType,
|
|
33
31
|
UnknownType,
|
|
34
32
|
} from '../../../types/types';
|
|
33
|
+
import { MessageStatusTypes, vw } from '../../../utils/utils';
|
|
35
34
|
|
|
36
35
|
const styles = StyleSheet.create({
|
|
37
36
|
containerInner: {
|
|
@@ -201,7 +200,7 @@ const MessageContentWithContext = <
|
|
|
201
200
|
setMessageContentWidth(width);
|
|
202
201
|
};
|
|
203
202
|
|
|
204
|
-
const error = message.type === 'error' || message.status ===
|
|
203
|
+
const error = message.type === 'error' || message.status === MessageStatusTypes.FAILED;
|
|
205
204
|
|
|
206
205
|
const groupStyle = `${alignment}_${groupStyles?.[0]?.toLowerCase?.()}`;
|
|
207
206
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayoutChangeEvent, StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
3
4
|
import merge from 'lodash/merge';
|
|
4
5
|
|
|
6
|
+
import type { MessageFooterProps } from './MessageFooter';
|
|
5
7
|
import { MessageTextContainer } from './MessageTextContainer';
|
|
6
8
|
|
|
7
9
|
import {
|
|
@@ -19,10 +21,6 @@ import {
|
|
|
19
21
|
useTranslationContext,
|
|
20
22
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
21
23
|
|
|
22
|
-
import type { MessageFooterProps } from './MessageFooter';
|
|
23
|
-
|
|
24
|
-
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
25
|
-
|
|
26
24
|
import type {
|
|
27
25
|
DefaultAttachmentType,
|
|
28
26
|
DefaultChannelType,
|
|
@@ -33,6 +31,7 @@ import type {
|
|
|
33
31
|
DefaultUserType,
|
|
34
32
|
UnknownType,
|
|
35
33
|
} from '../../../types/types';
|
|
34
|
+
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
36
35
|
|
|
37
36
|
const styles = StyleSheet.create({
|
|
38
37
|
containerInner: {
|