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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { render, waitFor } from '@testing-library/react-native';
|
|
5
|
+
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { ASTNode, SingleASTNode } from 'simple-markdown';
|
|
8
|
+
|
|
9
|
+
import { ListOutput, ListOutputProps } from './renderText';
|
|
10
|
+
|
|
11
|
+
describe('list', () => {
|
|
12
|
+
const createNode = ({
|
|
13
|
+
amount,
|
|
14
|
+
ordered = false,
|
|
15
|
+
start = 1,
|
|
16
|
+
}: {
|
|
17
|
+
amount: number;
|
|
18
|
+
ordered?: boolean;
|
|
19
|
+
start?: number;
|
|
20
|
+
}): SingleASTNode => ({
|
|
21
|
+
items: Array.from(Array(amount).keys()),
|
|
22
|
+
ordered,
|
|
23
|
+
start,
|
|
24
|
+
type: 'text',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const mockOutput = (node: ASTNode) => <Text>{node}</Text>;
|
|
28
|
+
const MockText = ({ node, output, state }: ListOutputProps) => (
|
|
29
|
+
<>
|
|
30
|
+
<ListOutput node={node} output={output} state={state} styles={{}} />
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
it('renders numbered items', async () => {
|
|
35
|
+
const node = createNode({ amount: 3, ordered: true, start: 1 });
|
|
36
|
+
const { getByText } = render(<MockText node={node} output={mockOutput} state={{}} />);
|
|
37
|
+
|
|
38
|
+
await waitFor(() => expect(getByText('1. ')).toBeTruthy());
|
|
39
|
+
await waitFor(() => expect(getByText('2. ')).toBeTruthy());
|
|
40
|
+
await waitFor(() => expect(getByText('3. ')).toBeTruthy());
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('renders numbered items from a start index', async () => {
|
|
44
|
+
const node = createNode({ amount: 3, ordered: true, start: 3 });
|
|
45
|
+
const { getByText } = render(<MockText node={node} output={mockOutput} state={{}} />);
|
|
46
|
+
|
|
47
|
+
await waitFor(() => expect(getByText('3. ')).toBeTruthy());
|
|
48
|
+
await waitFor(() => expect(getByText('4. ')).toBeTruthy());
|
|
49
|
+
await waitFor(() => expect(getByText('5. ')).toBeTruthy());
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('does not throw an error if an item is empty', async () => {
|
|
53
|
+
const node = {
|
|
54
|
+
...createNode({ amount: 3, ordered: true }),
|
|
55
|
+
items: ['Not empty', null, 'Not empty'],
|
|
56
|
+
};
|
|
57
|
+
const { getByText } = render(<MockText node={node} output={mockOutput} state={{}} />);
|
|
58
|
+
|
|
59
|
+
await waitFor(() => expect(getByText('1. ')).toBeTruthy());
|
|
60
|
+
await waitFor(() => expect(getByText('2. ')).toBeTruthy());
|
|
61
|
+
await waitFor(() => expect(getByText('3. ')).toBeTruthy());
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('renders an unordered list', async () => {
|
|
65
|
+
const node = createNode({ amount: 3 });
|
|
66
|
+
const { getAllByText } = render(<MockText node={node} output={mockOutput} state={{}} />);
|
|
67
|
+
|
|
68
|
+
await waitFor(() => expect(getAllByText('\u2022 ')).toHaveLength(3));
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GestureResponderEvent, Linking, Text, View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import truncate from 'lodash/truncate';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { GestureResponderEvent, Linking, Text, TextProps, View, ViewProps } from 'react-native';
|
|
3
|
+
|
|
5
4
|
// @ts-expect-error
|
|
6
5
|
import Markdown from 'react-native-markdown-package';
|
|
6
|
+
|
|
7
|
+
import truncate from 'lodash/truncate';
|
|
7
8
|
import {
|
|
8
9
|
DefaultRules,
|
|
9
10
|
defaultRules,
|
|
@@ -11,11 +12,15 @@ import {
|
|
|
11
12
|
ParseFunction,
|
|
12
13
|
parseInline,
|
|
13
14
|
ReactNodeOutput,
|
|
15
|
+
ReactOutput,
|
|
14
16
|
SingleASTNode,
|
|
17
|
+
State,
|
|
15
18
|
} from 'simple-markdown';
|
|
16
19
|
|
|
17
|
-
import
|
|
20
|
+
import { parseLinksFromText } from './parseLinks';
|
|
18
21
|
|
|
22
|
+
import type { MessageContextValue } from '../../../../contexts/messageContext/MessageContext';
|
|
23
|
+
import type { Colors, MarkdownStyle } from '../../../../contexts/themeContext/utils/theme';
|
|
19
24
|
import type {
|
|
20
25
|
DefaultAttachmentType,
|
|
21
26
|
DefaultChannelType,
|
|
@@ -26,8 +31,7 @@ import type {
|
|
|
26
31
|
DefaultUserType,
|
|
27
32
|
UnknownType,
|
|
28
33
|
} from '../../../../types/types';
|
|
29
|
-
import type {
|
|
30
|
-
import type { Colors, MarkdownStyle } from '../../../../contexts/themeContext/utils/theme';
|
|
34
|
+
import type { MessageType } from '../../../MessageList/hooks/useMessageList';
|
|
31
35
|
|
|
32
36
|
const defaultMarkdownStyles: MarkdownStyle = {
|
|
33
37
|
inlineCode: {
|
|
@@ -51,7 +55,6 @@ const defaultMarkdownStyles: MarkdownStyle = {
|
|
|
51
55
|
mentions: {
|
|
52
56
|
fontWeight: '700',
|
|
53
57
|
},
|
|
54
|
-
// unfortunately marginVertical doesn't override the defaults for these within the 3rd party lib
|
|
55
58
|
paragraph: {
|
|
56
59
|
marginBottom: 8,
|
|
57
60
|
marginTop: 8,
|
|
@@ -125,16 +128,14 @@ export const renderText = <
|
|
|
125
128
|
if (!text) return null;
|
|
126
129
|
|
|
127
130
|
let newText = text.trim();
|
|
128
|
-
const urls =
|
|
129
|
-
list: true,
|
|
130
|
-
});
|
|
131
|
+
const urls = parseLinksFromText(newText);
|
|
131
132
|
|
|
132
133
|
for (const urlInfo of urls) {
|
|
133
|
-
const displayLink = truncate(urlInfo.encoded
|
|
134
|
+
const displayLink = truncate(urlInfo.encoded, {
|
|
134
135
|
length: 200,
|
|
135
136
|
omission: '...',
|
|
136
137
|
});
|
|
137
|
-
const markdown = `[${displayLink}](${urlInfo.
|
|
138
|
+
const markdown = `[${displayLink}](${urlInfo.scheme}${urlInfo.encoded})`;
|
|
138
139
|
newText = newText.replace(urlInfo.raw, markdown);
|
|
139
140
|
}
|
|
140
141
|
|
|
@@ -172,7 +173,7 @@ export const renderText = <
|
|
|
172
173
|
? onLinkParams(url)
|
|
173
174
|
: Linking.canOpenURL(url).then((canOpenUrl) => canOpenUrl && Linking.openURL(url));
|
|
174
175
|
|
|
175
|
-
const
|
|
176
|
+
const link: ReactNodeOutput = (node, output, { ...state }) => {
|
|
176
177
|
const onPress = (event: GestureResponderEvent) => {
|
|
177
178
|
if (!preventPress && onPressParam) {
|
|
178
179
|
onPressParam({
|
|
@@ -250,56 +251,24 @@ export const renderText = <
|
|
|
250
251
|
);
|
|
251
252
|
};
|
|
252
253
|
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
* This custom rule overrides this behavior both for top level lists and sublists,
|
|
263
|
-
* in order to start the numbering from the number of the first list item provided.
|
|
264
|
-
* */
|
|
265
|
-
const customListAtLevel =
|
|
266
|
-
(level: keyof typeof listLevels): ReactNodeOutput =>
|
|
267
|
-
(node, output, { ...state }) => {
|
|
268
|
-
const items = node.items.map((item: Array<SingleASTNode>, index: number) => {
|
|
269
|
-
const withinList = item.length > 1 && item[1].type === 'list';
|
|
270
|
-
const content = output(item, { ...state, withinList });
|
|
271
|
-
|
|
272
|
-
const isTopLevelText =
|
|
273
|
-
['text', 'paragraph', 'strong'].includes(item[0].type) && withinList === false;
|
|
274
|
-
|
|
275
|
-
return (
|
|
276
|
-
<View key={index} style={styles.listRow}>
|
|
277
|
-
<Text style={styles.listItemNumber}>
|
|
278
|
-
{node.ordered ? `${node.start + index}. ` : `\u2022`}
|
|
279
|
-
</Text>
|
|
280
|
-
<Text style={[styles.listItemText, isTopLevelText && { marginBottom: 0 }]}>
|
|
281
|
-
{content}
|
|
282
|
-
</Text>
|
|
283
|
-
</View>
|
|
284
|
-
);
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
const isSublist = level === 'sub';
|
|
288
|
-
return (
|
|
289
|
-
<View key={state.key} style={[isSublist ? styles.list : styles.sublist]}>
|
|
290
|
-
{items}
|
|
291
|
-
</View>
|
|
292
|
-
);
|
|
293
|
-
};
|
|
254
|
+
const list: ReactNodeOutput = (node, output, state) => (
|
|
255
|
+
<ListOutput
|
|
256
|
+
key={`list-${state.key}`}
|
|
257
|
+
node={node}
|
|
258
|
+
output={output}
|
|
259
|
+
state={state}
|
|
260
|
+
styles={styles}
|
|
261
|
+
/>
|
|
262
|
+
);
|
|
294
263
|
|
|
295
264
|
const customRules = {
|
|
296
|
-
link: {
|
|
297
|
-
list: { react:
|
|
265
|
+
link: { link },
|
|
266
|
+
list: { react: list },
|
|
298
267
|
// Truncate long text content in the message overlay
|
|
299
268
|
paragraph: messageTextNumberOfLines ? { react: paragraphText } : {},
|
|
300
269
|
// we have no react rendering support for reflinks
|
|
301
270
|
reflink: { match: () => null },
|
|
302
|
-
sublist: { react:
|
|
271
|
+
sublist: { react: list },
|
|
303
272
|
...(mentionedUsers
|
|
304
273
|
? {
|
|
305
274
|
mentions: {
|
|
@@ -328,3 +297,69 @@ export const renderText = <
|
|
|
328
297
|
</Markdown>
|
|
329
298
|
);
|
|
330
299
|
};
|
|
300
|
+
|
|
301
|
+
export interface ListOutputProps {
|
|
302
|
+
node: SingleASTNode;
|
|
303
|
+
output: ReactOutput;
|
|
304
|
+
state: State;
|
|
305
|
+
styles?: Partial<MarkdownStyle>;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* For lists and sublists, the default behavior of the markdown library we use is
|
|
310
|
+
* to always renumber any list, so all ordered lists start from 1.
|
|
311
|
+
*
|
|
312
|
+
* This custom rule overrides this behavior both for top level lists and sublists,
|
|
313
|
+
* in order to start the numbering from the number of the first list item provided.
|
|
314
|
+
*/
|
|
315
|
+
export const ListOutput = ({ node, output, state, styles }: ListOutputProps) => {
|
|
316
|
+
let isSublist = state.withinList;
|
|
317
|
+
const parentTypes = ['text', 'paragraph', 'strong'];
|
|
318
|
+
|
|
319
|
+
return (
|
|
320
|
+
<View key={state.key} style={isSublist ? styles?.sublist : styles?.list}>
|
|
321
|
+
{node.items.map((item: SingleASTNode, index: number) => {
|
|
322
|
+
const indexAfterStart = node.start + index;
|
|
323
|
+
|
|
324
|
+
if (item === null) {
|
|
325
|
+
return (
|
|
326
|
+
<ListRow key={index} style={styles?.listRow} testID='list-item'>
|
|
327
|
+
<Bullet index={node.ordered && indexAfterStart} />
|
|
328
|
+
</ListRow>
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
isSublist = item.length > 1 && item[1].type === 'list';
|
|
333
|
+
const isSublistWithinText = parentTypes.includes((item[0] ?? {}).type) && isSublist;
|
|
334
|
+
const style = isSublistWithinText ? { marginBottom: 0 } : {};
|
|
335
|
+
|
|
336
|
+
return (
|
|
337
|
+
<ListRow key={index} style={styles?.listRow} testID='list-item'>
|
|
338
|
+
<Bullet index={node.ordered && indexAfterStart} />
|
|
339
|
+
<ListItem key={1} style={[styles?.listItemText, style]}>
|
|
340
|
+
{output(item, state)}
|
|
341
|
+
</ListItem>
|
|
342
|
+
</ListRow>
|
|
343
|
+
);
|
|
344
|
+
})}
|
|
345
|
+
</View>
|
|
346
|
+
);
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
interface BulletProps extends TextProps {
|
|
350
|
+
index?: number;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const Bullet = ({ index, style }: BulletProps) => (
|
|
354
|
+
<Text key={0} style={[style, defaultMarkdownStyles.listItemNumber]}>
|
|
355
|
+
{index ? `${index}. ` : '\u2022 '}
|
|
356
|
+
</Text>
|
|
357
|
+
);
|
|
358
|
+
|
|
359
|
+
const ListRow = (props: PropsWithChildren<ViewProps>) => (
|
|
360
|
+
<Text style={[props.style, defaultMarkdownStyles.listRow]}>{props.children}</Text>
|
|
361
|
+
);
|
|
362
|
+
|
|
363
|
+
const ListItem = ({ children, style }: PropsWithChildren<TextProps>) => (
|
|
364
|
+
<Text style={style}>{children}</Text>
|
|
365
|
+
);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { isMessageWithStylesReadByAndDateSeparator } from '../../MessageList/hooks/useMessageList';
|
|
4
|
-
|
|
5
3
|
import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
|
|
6
4
|
import type {
|
|
7
5
|
DefaultAttachmentType,
|
|
@@ -13,6 +11,7 @@ import type {
|
|
|
13
11
|
DefaultUserType,
|
|
14
12
|
UnknownType,
|
|
15
13
|
} from '../../../types/types';
|
|
14
|
+
import { isMessageWithStylesReadByAndDateSeparator } from '../../MessageList/hooks/useMessageList';
|
|
16
15
|
|
|
17
16
|
export const useCreateMessageContext = <
|
|
18
17
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -2,9 +2,11 @@ import type { MessageResponse, Reaction } from 'stream-chat';
|
|
|
2
2
|
|
|
3
3
|
import type { ChannelContextValue } from '../../../contexts/channelContext/ChannelContext';
|
|
4
4
|
import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext';
|
|
5
|
-
import type {
|
|
5
|
+
import type {
|
|
6
|
+
MessageContextValue,
|
|
7
|
+
Reactions,
|
|
8
|
+
} from '../../../contexts/messageContext/MessageContext';
|
|
6
9
|
import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
|
|
7
|
-
import type { Reactions } from '../../../contexts/messageContext/MessageContext';
|
|
8
10
|
|
|
9
11
|
import type {
|
|
10
12
|
DefaultAttachmentType,
|
|
@@ -16,6 +18,7 @@ import type {
|
|
|
16
18
|
DefaultUserType,
|
|
17
19
|
UnknownType,
|
|
18
20
|
} from '../../../types/types';
|
|
21
|
+
import { MessageStatusTypes } from '../../../utils/utils';
|
|
19
22
|
|
|
20
23
|
export const useMessageActionHandlers = <
|
|
21
24
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -30,6 +33,7 @@ export const useMessageActionHandlers = <
|
|
|
30
33
|
client,
|
|
31
34
|
enforceUniqueReaction,
|
|
32
35
|
message,
|
|
36
|
+
removeMessage,
|
|
33
37
|
retrySendMessage,
|
|
34
38
|
setEditingState,
|
|
35
39
|
setQuotedMessageState,
|
|
@@ -37,6 +41,7 @@ export const useMessageActionHandlers = <
|
|
|
37
41
|
updateMessage,
|
|
38
42
|
}: Pick<
|
|
39
43
|
MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>,
|
|
44
|
+
| 'removeMessage'
|
|
40
45
|
| 'retrySendMessage'
|
|
41
46
|
| 'setEditingState'
|
|
42
47
|
| 'setQuotedMessageState'
|
|
@@ -58,8 +63,12 @@ export const useMessageActionHandlers = <
|
|
|
58
63
|
);
|
|
59
64
|
|
|
60
65
|
const handleDeleteMessage = async () => {
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
if (message.status === MessageStatusTypes.FAILED) {
|
|
67
|
+
removeMessage(message);
|
|
68
|
+
} else {
|
|
69
|
+
const data = await client.deleteMessage(message.id);
|
|
70
|
+
updateMessage(data.message);
|
|
71
|
+
}
|
|
63
72
|
};
|
|
64
73
|
|
|
65
74
|
const handleToggleMuteUser = async () => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Alert, Clipboard } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import { useMessageActionHandlers } from './useMessageActionHandlers';
|
|
5
|
+
|
|
4
6
|
import type { ChannelContextValue } from '../../../contexts/channelContext/ChannelContext';
|
|
5
7
|
import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext';
|
|
6
|
-
import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
|
|
7
8
|
import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
|
|
8
9
|
import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
|
|
9
|
-
import {
|
|
10
|
+
import type { OverlayContextValue } from '../../../contexts/overlayContext/OverlayContext';
|
|
10
11
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
11
|
-
import type {
|
|
12
|
+
import type { ThreadContextValue } from '../../../contexts/threadContext/ThreadContext';
|
|
13
|
+
import type { TranslationContextValue } from '../../../contexts/translationContext/TranslationContext';
|
|
12
14
|
import {
|
|
13
15
|
Copy,
|
|
14
16
|
CurveLineLeftUp,
|
|
@@ -22,10 +24,6 @@ import {
|
|
|
22
24
|
Unpin,
|
|
23
25
|
UserDelete,
|
|
24
26
|
} from '../../../icons';
|
|
25
|
-
import type { OverlayContextValue } from '../../../contexts/overlayContext/OverlayContext';
|
|
26
|
-
import type { ThreadContextValue } from '../../../contexts/threadContext/ThreadContext';
|
|
27
|
-
import type { TranslationContextValue } from '../../../contexts/translationContext/TranslationContext';
|
|
28
|
-
|
|
29
27
|
import type {
|
|
30
28
|
DefaultAttachmentType,
|
|
31
29
|
DefaultChannelType,
|
|
@@ -36,7 +34,11 @@ import type {
|
|
|
36
34
|
DefaultUserType,
|
|
37
35
|
UnknownType,
|
|
38
36
|
} from '../../../types/types';
|
|
39
|
-
import {
|
|
37
|
+
import { MessageStatusTypes } from '../../../utils/utils';
|
|
38
|
+
|
|
39
|
+
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
40
|
+
import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
|
|
41
|
+
import { removeReservedFields } from '../utils/removeReservedFields';
|
|
40
42
|
|
|
41
43
|
export const useMessageActions = <
|
|
42
44
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -64,6 +66,7 @@ export const useMessageActions = <
|
|
|
64
66
|
message,
|
|
65
67
|
onThreadSelect,
|
|
66
68
|
openThread,
|
|
69
|
+
removeMessage,
|
|
67
70
|
retrySendMessage,
|
|
68
71
|
selectReaction,
|
|
69
72
|
setEditingState,
|
|
@@ -85,6 +88,7 @@ export const useMessageActions = <
|
|
|
85
88
|
| 'handleRetry'
|
|
86
89
|
| 'handleReaction'
|
|
87
90
|
| 'handleThreadReply'
|
|
91
|
+
| 'removeMessage'
|
|
88
92
|
| 'retrySendMessage'
|
|
89
93
|
| 'setEditingState'
|
|
90
94
|
| 'setQuotedMessageState'
|
|
@@ -119,6 +123,7 @@ export const useMessageActions = <
|
|
|
119
123
|
client,
|
|
120
124
|
enforceUniqueReaction,
|
|
121
125
|
message,
|
|
126
|
+
removeMessage,
|
|
122
127
|
retrySendMessage,
|
|
123
128
|
setEditingState,
|
|
124
129
|
setQuotedMessageState,
|
|
@@ -126,7 +131,7 @@ export const useMessageActions = <
|
|
|
126
131
|
updateMessage,
|
|
127
132
|
});
|
|
128
133
|
|
|
129
|
-
const error = message.type === 'error' || message.status ===
|
|
134
|
+
const error = message.type === 'error' || message.status === MessageStatusTypes.FAILED;
|
|
130
135
|
|
|
131
136
|
const onOpenThread = () => {
|
|
132
137
|
if (onThreadSelect) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
|
|
2
|
-
import type { OwnCapabilitiesContextValue } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
3
1
|
import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
|
|
2
|
+
import type { OwnCapabilitiesContextValue } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
4
3
|
import type {
|
|
5
4
|
DefaultAttachmentType,
|
|
6
5
|
DefaultChannelType,
|
|
@@ -11,6 +10,7 @@ import type {
|
|
|
11
10
|
DefaultUserType,
|
|
12
11
|
UnknownType,
|
|
13
12
|
} from '../../../types/types';
|
|
13
|
+
import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
|
|
14
14
|
|
|
15
15
|
export type MessageActionsParams<
|
|
16
16
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
2
1
|
import type {
|
|
3
2
|
DefaultAttachmentType,
|
|
4
3
|
DefaultChannelType,
|
|
@@ -9,6 +8,7 @@ import type {
|
|
|
9
8
|
DefaultUserType,
|
|
10
9
|
UnknownType,
|
|
11
10
|
} from '../../../types/types';
|
|
11
|
+
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
12
12
|
|
|
13
13
|
export const removeReservedFields = <
|
|
14
14
|
At extends UnknownType = DefaultAttachmentType,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { GestureResponderEvent } from 'react-native';
|
|
2
3
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
3
4
|
|
|
4
5
|
import { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';
|
|
@@ -9,8 +10,6 @@ import {
|
|
|
9
10
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
10
11
|
import { Attach } from '../../icons/Attach';
|
|
11
12
|
|
|
12
|
-
import type { GestureResponderEvent } from 'react-native';
|
|
13
|
-
|
|
14
13
|
import type {
|
|
15
14
|
DefaultAttachmentType,
|
|
16
15
|
DefaultChannelType,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { GestureResponderEvent } from 'react-native';
|
|
2
3
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
3
4
|
|
|
4
5
|
import {
|
|
@@ -13,8 +14,6 @@ import {
|
|
|
13
14
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
14
15
|
import { Lightning } from '../../icons/Lightning';
|
|
15
16
|
|
|
16
|
-
import type { GestureResponderEvent } from 'react-native';
|
|
17
|
-
|
|
18
17
|
import type {
|
|
19
18
|
DefaultAttachmentType,
|
|
20
19
|
DefaultChannelType,
|
|
@@ -3,7 +3,6 @@ import { FlatList, StyleSheet, Text, TouchableOpacity, View } from 'react-native
|
|
|
3
3
|
|
|
4
4
|
import { UploadProgressIndicator } from './UploadProgressIndicator';
|
|
5
5
|
|
|
6
|
-
import { getFileSizeDisplayText } from '../Attachment/FileAttachment';
|
|
7
6
|
import {
|
|
8
7
|
FileUpload,
|
|
9
8
|
MessageInputContextValue,
|
|
@@ -15,8 +14,6 @@ import {
|
|
|
15
14
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
16
15
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
17
16
|
import { Close } from '../../icons/Close';
|
|
18
|
-
import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
|
|
19
|
-
|
|
20
17
|
import type {
|
|
21
18
|
DefaultAttachmentType,
|
|
22
19
|
DefaultChannelType,
|
|
@@ -27,6 +24,9 @@ import type {
|
|
|
27
24
|
DefaultUserType,
|
|
28
25
|
UnknownType,
|
|
29
26
|
} from '../../types/types';
|
|
27
|
+
import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
|
|
28
|
+
|
|
29
|
+
import { getFileSizeDisplayText } from '../Attachment/FileAttachment';
|
|
30
30
|
|
|
31
31
|
const FILE_PREVIEW_HEIGHT = 60;
|
|
32
32
|
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
} from '../../contexts/messageInputContext/MessageInputContext';
|
|
11
11
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
12
12
|
import { Close } from '../../icons/Close';
|
|
13
|
-
import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
|
|
14
|
-
|
|
15
13
|
import type {
|
|
16
14
|
DefaultAttachmentType,
|
|
17
15
|
DefaultChannelType,
|
|
@@ -22,6 +20,7 @@ import type {
|
|
|
22
20
|
DefaultUserType,
|
|
23
21
|
UnknownType,
|
|
24
22
|
} from '../../types/types';
|
|
23
|
+
import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
|
|
25
24
|
|
|
26
25
|
const IMAGE_PREVIEW_SIZE = 100;
|
|
27
26
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
5
4
|
import {
|
|
6
5
|
MessageInputContextValue,
|
|
7
6
|
useMessageInputContext,
|
|
8
7
|
} from '../../contexts/messageInputContext/MessageInputContext';
|
|
8
|
+
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
9
9
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
10
10
|
|
|
11
11
|
import type {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import type { UserResponse } from 'stream-chat';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
|
|
6
|
+
import { useCountdown } from './hooks/useCountdown';
|
|
8
7
|
|
|
9
8
|
import { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';
|
|
10
|
-
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
11
9
|
import {
|
|
12
10
|
ChannelContextValue,
|
|
13
11
|
useChannelContext,
|
|
@@ -20,6 +18,7 @@ import {
|
|
|
20
18
|
MessagesContextValue,
|
|
21
19
|
useMessagesContext,
|
|
22
20
|
} from '../../contexts/messagesContext/MessagesContext';
|
|
21
|
+
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
23
22
|
import {
|
|
24
23
|
SuggestionsContextValue,
|
|
25
24
|
useSuggestionsContext,
|
|
@@ -32,8 +31,6 @@ import {
|
|
|
32
31
|
} from '../../contexts/translationContext/TranslationContext';
|
|
33
32
|
import { CircleClose, CurveLineLeftUp, Edit, Lightning } from '../../icons';
|
|
34
33
|
|
|
35
|
-
import type { UserResponse } from 'stream-chat';
|
|
36
|
-
|
|
37
34
|
import type { Asset } from '../../native';
|
|
38
35
|
import type {
|
|
39
36
|
DefaultAttachmentType,
|
|
@@ -45,6 +42,8 @@ import type {
|
|
|
45
42
|
DefaultUserType,
|
|
46
43
|
UnknownType,
|
|
47
44
|
} from '../../types/types';
|
|
45
|
+
import { AttachmentSelectionBar } from '../AttachmentPicker/components/AttachmentSelectionBar';
|
|
46
|
+
import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
|
|
48
47
|
|
|
49
48
|
const styles = StyleSheet.create({
|
|
50
49
|
attachmentSeparator: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { GestureResponderEvent } from 'react-native';
|
|
2
3
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
3
4
|
|
|
4
5
|
import {
|
|
@@ -8,8 +9,6 @@ import {
|
|
|
8
9
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
9
10
|
import { CircleRight } from '../../icons/CircleRight';
|
|
10
11
|
|
|
11
|
-
import type { GestureResponderEvent } from 'react-native';
|
|
12
|
-
|
|
13
12
|
import type {
|
|
14
13
|
DefaultAttachmentType,
|
|
15
14
|
DefaultChannelType,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
5
4
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
5
|
+
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
6
6
|
|
|
7
7
|
const styles = StyleSheet.create({
|
|
8
8
|
container: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { Check } from '../../icons';
|
|
5
4
|
import {
|
|
6
5
|
MessageInputContextValue,
|
|
7
6
|
useMessageInputContext,
|
|
@@ -12,6 +11,7 @@ import {
|
|
|
12
11
|
TranslationContextValue,
|
|
13
12
|
useTranslationContext,
|
|
14
13
|
} from '../../contexts/translationContext/TranslationContext';
|
|
14
|
+
import { Check } from '../../icons';
|
|
15
15
|
|
|
16
16
|
import type {
|
|
17
17
|
DefaultAttachmentType,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { fireEvent, render, waitFor } from '@testing-library/react-native';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { fireEvent, render, waitFor } from '@testing-library/react-native';
|
|
5
4
|
|
|
6
5
|
import { ThemeProvider } from '../../../contexts/themeContext/ThemeContext';
|
|
6
|
+
import { AttachButton } from '../AttachButton';
|
|
7
7
|
|
|
8
8
|
describe('AttachButton', () => {
|
|
9
9
|
it('should render an enabled AttachButton', async () => {
|