stream-chat-react-native-core 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -13
- package/lib/commonjs/components/Attachment/Attachment.js +17 -16
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +5 -5
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +19 -16
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +9 -9
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +5 -5
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +124 -122
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +113 -149
- 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/{styleguideComponents/Reanimated.js.map → components/Attachment/utils/buildGallery/types.js.map} +0 -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 +10 -9
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +12 -9
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +25 -49
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/commonjs/components/Avatar/Avatar.js +14 -8
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +11 -9
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +304 -203
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +7 -5
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +13 -31
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +7 -7
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +6 -5
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +7 -8
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +5 -4
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +8 -5
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +18 -18
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +15 -14
- package/lib/commonjs/components/ChannelList/Skeleton.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/useConnectionRecovered.js +3 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.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 +96 -63
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +1 -1
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +3 -3
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +5 -5
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +6 -6
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +50 -21
- 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 +5 -5
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +3 -3
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
- 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 +2 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +9 -5
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +40 -31
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +91 -59
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +3 -3
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +13 -13
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +32 -17
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +8 -8
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +6 -6
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +10 -10
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +21 -13
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/commonjs/components/Message/Message.js +153 -855
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +7 -7
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +42 -40
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +9 -7
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +35 -23
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +27 -11
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +6 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +32 -15
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +29 -25
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +8 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +87 -114
- 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 +208 -27
- 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 +1 -5
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/commonjs/components/Message/utils/messageActions.js +17 -15
- 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 +7 -5
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +4 -4
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CooldownTimer.js +78 -0
- package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +33 -28
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +10 -10
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +18 -23
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +94 -66
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +4 -4
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +9 -7
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +12 -11
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/commonjs/components/MessageList/DateHeader.js +3 -3
- package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +5 -4
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +5 -5
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +101 -62
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +7 -7
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +6 -6
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +3 -3
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js +24 -11
- 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/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +11 -10
- 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/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/{module/components/MessageOverlay/MessageActions.js → commonjs/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +100 -85
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +18 -19
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +32 -35
- 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 +37 -0
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/commonjs/components/Reply/Reply.js +26 -20
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/Thread/Thread.js +15 -6
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +14 -13
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/ListProps.md +1 -1
- package/lib/commonjs/components/docs/data.js +45 -45
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +133 -55
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +3 -3
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +3 -3
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +3 -3
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +3 -3
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +5 -5
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +3 -3
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +3 -3
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +3 -3
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +3 -3
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +3 -3
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +106 -71
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- 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 +6 -20
- 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 +3 -3
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +2 -2
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +50 -50
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +3 -3
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +21 -34
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +3 -3
- package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +48 -20
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +3 -3
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +4 -4
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +3 -3
- 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/compiled.js +0 -315
- package/lib/commonjs/emoji-data/compiled.js.map +1 -1
- package/lib/commonjs/emoji-data/emojiNames.js +0 -105
- package/lib/commonjs/emoji-data/emojiNames.js.map +1 -1
- package/lib/commonjs/emoji-data/emojis.js +0 -175
- package/lib/commonjs/emoji-data/emojis.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/useAppStateListener.js +8 -5
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
- package/lib/commonjs/hooks/useIsMountedRef.js +19 -0
- package/lib/commonjs/hooks/useIsMountedRef.js.map +1 -0
- package/lib/commonjs/hooks/useStreami18n.js +5 -2
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/i18n/en.json +9 -3
- package/lib/commonjs/i18n/fr.json +9 -3
- package/lib/commonjs/i18n/hi.json +9 -3
- package/lib/commonjs/i18n/it.json +9 -3
- package/lib/commonjs/i18n/ja.json +67 -0
- package/lib/commonjs/i18n/ko.json +67 -0
- package/lib/commonjs/i18n/nl.json +9 -3
- package/lib/commonjs/i18n/ru.json +9 -3
- package/lib/commonjs/i18n/tr.json +10 -4
- package/lib/commonjs/icons/ArrowRight.js +1 -1
- package/lib/commonjs/icons/AtMentions.js +1 -1
- package/lib/commonjs/icons/Attach.js +1 -1
- package/lib/commonjs/icons/Audio.js +1 -1
- package/lib/commonjs/icons/CSV.js +1 -1
- package/lib/commonjs/icons/Camera.js +1 -1
- package/lib/commonjs/icons/Check.js +1 -1
- package/lib/commonjs/icons/CheckAll.js +1 -1
- package/lib/commonjs/icons/CheckSend.js +1 -1
- package/lib/commonjs/icons/CircleClose.js +1 -1
- package/lib/commonjs/icons/CirclePlus.js +1 -1
- package/lib/commonjs/icons/CircleRight.js +1 -1
- package/lib/commonjs/icons/Close.js +1 -1
- package/lib/commonjs/icons/Copy.js +1 -1
- package/lib/commonjs/icons/CurveLineLeftUp.js +1 -1
- package/lib/commonjs/icons/DOC.js +1 -1
- package/lib/commonjs/icons/DOCX.js +1 -1
- package/lib/commonjs/icons/Delete.js +1 -1
- package/lib/commonjs/icons/Down.js +1 -1
- package/lib/commonjs/icons/DownloadArrow.js +1 -1
- package/lib/commonjs/icons/DownloadCloud.js +1 -1
- package/lib/commonjs/icons/Edit.js +1 -1
- package/lib/commonjs/icons/Error.js +1 -1
- package/lib/commonjs/icons/Eye.js +1 -1
- package/lib/commonjs/icons/Flag.js +1 -1
- package/lib/commonjs/icons/Folder.js +1 -1
- package/lib/commonjs/icons/GenericFile.js +1 -1
- package/lib/commonjs/icons/GiphyIcon.js +1 -1
- package/lib/commonjs/icons/Grid.js +1 -1
- package/lib/commonjs/icons/Group.js +1 -1
- package/lib/commonjs/icons/HTML.js +1 -1
- package/lib/commonjs/icons/Imgur.js +1 -1
- package/lib/commonjs/icons/LOLReaction.js +1 -1
- package/lib/commonjs/icons/Lightning.js +1 -1
- package/lib/commonjs/icons/Link.js +1 -1
- package/lib/commonjs/icons/Loading.js +1 -1
- package/lib/commonjs/icons/Logo.js +1 -1
- package/lib/commonjs/icons/LoveReaction.js +1 -1
- package/lib/commonjs/icons/MD.js +1 -1
- package/lib/commonjs/icons/MailOpen.js +1 -1
- package/lib/commonjs/icons/MenuPointHorizontal.js +1 -1
- package/lib/commonjs/icons/MenuPointVertical.js +1 -1
- package/lib/commonjs/icons/MessageFlag.js +1 -1
- package/lib/commonjs/icons/MessageIcon.js +1 -1
- package/lib/commonjs/icons/Mute.js +1 -1
- package/lib/commonjs/icons/Notification.js +1 -1
- package/lib/commonjs/icons/ODT.js +1 -1
- package/lib/commonjs/icons/PDF.js +1 -1
- package/lib/commonjs/icons/PPT.js +1 -1
- package/lib/commonjs/icons/PPTX.js +1 -1
- package/lib/commonjs/icons/Picture.js +1 -1
- package/lib/commonjs/icons/Pin.js +42 -0
- package/lib/commonjs/icons/Pin.js.map +1 -0
- package/lib/commonjs/icons/PinHeader.js +38 -0
- package/lib/commonjs/icons/PinHeader.js.map +1 -0
- package/lib/commonjs/icons/RAR.js +1 -1
- package/lib/commonjs/icons/RTF.js +1 -1
- package/lib/commonjs/icons/Refresh.js +1 -1
- package/lib/commonjs/icons/SEVEN_Z.js +1 -1
- package/lib/commonjs/icons/Search.js +1 -1
- package/lib/commonjs/icons/SendRight.js +1 -1
- package/lib/commonjs/icons/SendUp.js +1 -1
- package/lib/commonjs/icons/Share.js +1 -1
- package/lib/commonjs/icons/ShareRightArrow.js +1 -1
- package/lib/commonjs/icons/Smile.js +1 -1
- package/lib/commonjs/icons/Sound.js +1 -1
- package/lib/commonjs/icons/TAR.js +1 -1
- package/lib/commonjs/icons/TXT.js +1 -1
- package/lib/commonjs/icons/ThreadReply.js +1 -1
- package/lib/commonjs/icons/ThumbsDownReaction.js +1 -1
- package/lib/commonjs/icons/ThumbsUpReaction.js +1 -1
- package/lib/commonjs/icons/Time.js +1 -1
- package/lib/commonjs/icons/Unknown.js +1 -1
- package/lib/commonjs/icons/Unpin.js +38 -0
- package/lib/commonjs/icons/Unpin.js.map +1 -0
- package/lib/commonjs/icons/User.js +1 -1
- package/lib/commonjs/icons/UserAdd.js +1 -1
- package/lib/commonjs/icons/UserAdmin.js +62 -0
- package/lib/commonjs/icons/UserAdmin.js.map +1 -0
- package/lib/commonjs/icons/UserDelete.js +1 -1
- package/lib/commonjs/icons/UserMinus.js +1 -1
- package/lib/commonjs/icons/WutReaction.js +1 -1
- package/lib/commonjs/icons/XLS.js +1 -1
- package/lib/commonjs/icons/XLSX.js +1 -1
- package/lib/commonjs/icons/ZIP.js +1 -1
- package/lib/commonjs/icons/index.js +39 -26
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +2 -2
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/mock-builders/api/error.js +1 -1
- package/lib/commonjs/mock-builders/api/queryChannels.js +1 -1
- package/lib/commonjs/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js +4 -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 -50
- 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 +3 -3
- package/lib/commonjs/mock-builders/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/commonjs/native.js +1 -7
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/utils/Streami18n.js +10 -0
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/date.js +13 -0
- package/lib/commonjs/utils/date.js.map +1 -0
- package/lib/commonjs/utils/getResizedImageUrl.js +37 -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 +39 -19
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +17 -16
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +5 -5
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +19 -16
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +9 -9
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +5 -5
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/FileIcon.js +1 -1
- package/lib/module/components/Attachment/FileIcon.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +124 -122
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +113 -149
- 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/{styleguideComponents/Reanimated.js.map → components/Attachment/utils/buildGallery/types.js.map} +0 -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 +10 -9
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +12 -9
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +25 -49
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
- package/lib/module/components/Avatar/Avatar.js +14 -8
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +11 -9
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +304 -203
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +7 -5
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +13 -31
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +7 -7
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +6 -5
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +7 -8
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +5 -4
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +8 -5
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +18 -18
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +15 -14
- package/lib/module/components/ChannelList/Skeleton.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/useConnectionRecovered.js +3 -1
- package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.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 +96 -63
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +1 -1
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +3 -3
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +5 -5
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +6 -6
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +50 -21
- 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 +5 -5
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +3 -3
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
- 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 +2 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +9 -5
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +40 -31
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +91 -59
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +3 -3
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +13 -13
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +32 -17
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +8 -8
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +6 -6
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +10 -10
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +21 -13
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/module/components/Message/Message.js +153 -855
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +7 -7
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +42 -40
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +9 -7
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +35 -23
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +27 -11
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +6 -6
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +32 -15
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +29 -25
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +8 -4
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +87 -114
- 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 +208 -27
- 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 +1 -5
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +307 -0
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
- package/lib/module/components/Message/hooks/useMessageActions.js +563 -0
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -0
- package/lib/module/components/Message/utils/messageActions.js +17 -15
- 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 +7 -5
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +4 -4
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/CooldownTimer.js +78 -0
- package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -0
- package/lib/module/components/MessageInput/FileUploadPreview.js +33 -28
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +10 -10
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +18 -23
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +94 -66
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +4 -4
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +9 -7
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +12 -11
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js +63 -0
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js +57 -0
- package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -0
- package/lib/module/components/MessageList/DateHeader.js +3 -3
- package/lib/module/components/MessageList/DateHeader.js.map +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +5 -4
- package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +5 -5
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +101 -62
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +7 -7
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +8 -6
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +6 -6
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +3 -3
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js +24 -11
- 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/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js +2 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js +11 -10
- 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/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/{commonjs/components/MessageOverlay/MessageActions.js → module/components/MessageOverlay/MessageActionList.js} +33 -85
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +131 -0
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageOverlay/MessageOverlay.js +100 -85
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +38 -0
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +18 -19
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +32 -35
- 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 +37 -0
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
- package/lib/module/components/Reply/Reply.js +26 -20
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/Thread/Thread.js +15 -6
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +14 -13
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/ListProps.md +1 -1
- package/lib/module/components/docs/data.js +45 -45
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +133 -55
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +3 -3
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +3 -3
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +3 -3
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +3 -3
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +5 -5
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +3 -3
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +3 -3
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +3 -3
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +3 -3
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +3 -3
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +106 -71
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
- 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 +6 -20
- 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 +3 -3
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +2 -2
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +50 -50
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +3 -3
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +21 -34
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +3 -3
- package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +48 -20
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +3 -3
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +4 -4
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +3 -3
- 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/compiled.js +0 -315
- package/lib/module/emoji-data/compiled.js.map +1 -1
- package/lib/module/emoji-data/emojiNames.js +0 -105
- package/lib/module/emoji-data/emojiNames.js.map +1 -1
- package/lib/module/emoji-data/emojis.js +0 -175
- package/lib/module/emoji-data/emojis.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/useAppStateListener.js +8 -5
- package/lib/module/hooks/useAppStateListener.js.map +1 -1
- package/lib/module/hooks/useIsMountedRef.js +19 -0
- package/lib/module/hooks/useIsMountedRef.js.map +1 -0
- package/lib/module/hooks/useStreami18n.js +5 -2
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/i18n/en.json +9 -3
- package/lib/module/i18n/fr.json +9 -3
- package/lib/module/i18n/hi.json +9 -3
- package/lib/module/i18n/it.json +9 -3
- package/lib/module/i18n/ja.json +67 -0
- package/lib/module/i18n/ko.json +67 -0
- package/lib/module/i18n/nl.json +9 -3
- package/lib/module/i18n/ru.json +9 -3
- package/lib/module/i18n/tr.json +10 -4
- package/lib/module/icons/ArrowRight.js +1 -1
- package/lib/module/icons/AtMentions.js +1 -1
- package/lib/module/icons/Attach.js +1 -1
- package/lib/module/icons/Audio.js +1 -1
- package/lib/module/icons/CSV.js +1 -1
- package/lib/module/icons/Camera.js +1 -1
- package/lib/module/icons/Check.js +1 -1
- package/lib/module/icons/CheckAll.js +1 -1
- package/lib/module/icons/CheckSend.js +1 -1
- package/lib/module/icons/CircleClose.js +1 -1
- package/lib/module/icons/CirclePlus.js +1 -1
- package/lib/module/icons/CircleRight.js +1 -1
- package/lib/module/icons/Close.js +1 -1
- package/lib/module/icons/Copy.js +1 -1
- package/lib/module/icons/CurveLineLeftUp.js +1 -1
- package/lib/module/icons/DOC.js +1 -1
- package/lib/module/icons/DOCX.js +1 -1
- package/lib/module/icons/Delete.js +1 -1
- package/lib/module/icons/Down.js +1 -1
- package/lib/module/icons/DownloadArrow.js +1 -1
- package/lib/module/icons/DownloadCloud.js +1 -1
- package/lib/module/icons/Edit.js +1 -1
- package/lib/module/icons/Error.js +1 -1
- package/lib/module/icons/Eye.js +1 -1
- package/lib/module/icons/Flag.js +1 -1
- package/lib/module/icons/Folder.js +1 -1
- package/lib/module/icons/GenericFile.js +1 -1
- package/lib/module/icons/GiphyIcon.js +1 -1
- package/lib/module/icons/Grid.js +1 -1
- package/lib/module/icons/Group.js +1 -1
- package/lib/module/icons/HTML.js +1 -1
- package/lib/module/icons/Imgur.js +1 -1
- package/lib/module/icons/LOLReaction.js +1 -1
- package/lib/module/icons/Lightning.js +1 -1
- package/lib/module/icons/Link.js +1 -1
- package/lib/module/icons/Loading.js +1 -1
- package/lib/module/icons/Logo.js +1 -1
- package/lib/module/icons/LoveReaction.js +1 -1
- package/lib/module/icons/MD.js +1 -1
- package/lib/module/icons/MailOpen.js +1 -1
- package/lib/module/icons/MenuPointHorizontal.js +1 -1
- package/lib/module/icons/MenuPointVertical.js +1 -1
- package/lib/module/icons/MessageFlag.js +1 -1
- package/lib/module/icons/MessageIcon.js +1 -1
- package/lib/module/icons/Mute.js +1 -1
- package/lib/module/icons/Notification.js +1 -1
- package/lib/module/icons/ODT.js +1 -1
- package/lib/module/icons/PDF.js +1 -1
- package/lib/module/icons/PPT.js +1 -1
- package/lib/module/icons/PPTX.js +1 -1
- package/lib/module/icons/Picture.js +1 -1
- package/lib/module/icons/Pin.js +42 -0
- package/lib/module/icons/Pin.js.map +1 -0
- package/lib/module/icons/PinHeader.js +38 -0
- package/lib/module/icons/PinHeader.js.map +1 -0
- package/lib/module/icons/RAR.js +1 -1
- package/lib/module/icons/RTF.js +1 -1
- package/lib/module/icons/Refresh.js +1 -1
- package/lib/module/icons/SEVEN_Z.js +1 -1
- package/lib/module/icons/Search.js +1 -1
- package/lib/module/icons/SendRight.js +1 -1
- package/lib/module/icons/SendUp.js +1 -1
- package/lib/module/icons/Share.js +1 -1
- package/lib/module/icons/ShareRightArrow.js +1 -1
- package/lib/module/icons/Smile.js +1 -1
- package/lib/module/icons/Sound.js +1 -1
- package/lib/module/icons/TAR.js +1 -1
- package/lib/module/icons/TXT.js +1 -1
- package/lib/module/icons/ThreadReply.js +1 -1
- package/lib/module/icons/ThumbsDownReaction.js +1 -1
- package/lib/module/icons/ThumbsUpReaction.js +1 -1
- package/lib/module/icons/Time.js +1 -1
- package/lib/module/icons/Unknown.js +1 -1
- package/lib/module/icons/Unpin.js +38 -0
- package/lib/module/icons/Unpin.js.map +1 -0
- package/lib/module/icons/User.js +1 -1
- package/lib/module/icons/UserAdd.js +1 -1
- package/lib/module/icons/UserAdmin.js +62 -0
- package/lib/module/icons/UserAdmin.js.map +1 -0
- package/lib/module/icons/UserDelete.js +1 -1
- package/lib/module/icons/UserMinus.js +1 -1
- package/lib/module/icons/WutReaction.js +1 -1
- package/lib/module/icons/XLS.js +1 -1
- package/lib/module/icons/XLSX.js +1 -1
- package/lib/module/icons/ZIP.js +1 -1
- package/lib/module/icons/index.js +39 -26
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/utils/base.js +2 -2
- package/lib/module/index.js +6 -6
- package/lib/module/init.js +13 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/mock-builders/api/error.js +1 -1
- package/lib/module/mock-builders/api/queryChannels.js +1 -1
- package/lib/module/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/module/mock-builders/api/sendMessage.js +4 -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 -50
- 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 +3 -3
- package/lib/module/mock-builders/mock.js.map +1 -1
- package/lib/module/mock-builders/native/react-native-mock.js +1 -1
- package/lib/module/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/module/native.js +1 -7
- package/lib/module/native.js.map +1 -1
- package/lib/module/utils/Streami18n.js +10 -0
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/date.js +13 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/module/utils/getResizedImageUrl.js +37 -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 +39 -19
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +6 -6
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +5 -5
- package/lib/typescript/components/Attachment/Card.d.ts +7 -5
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +6 -6
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
- package/lib/typescript/components/Attachment/Gallery.d.ts +19 -6
- package/lib/typescript/components/Attachment/Giphy.d.ts +7 -7
- 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/AutoCompleteInput.d.ts +10 -4
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +5 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +8 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +10 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +21 -0
- package/lib/typescript/components/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +13 -16
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -70
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -126
- package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +7 -0
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
- package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
- package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +15 -15
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
- package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
- package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +11 -9
- package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +7 -7
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +6 -6
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +15 -3
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
- package/lib/typescript/components/Chat/Chat.d.ts +3 -3
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
- package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +13 -10
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
- package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
- package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleView.d.ts +2 -1
- package/lib/typescript/components/Message/Message.d.ts +14 -13
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +5 -5
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +6 -6
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +8 -8
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +8 -0
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +7 -6
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +5 -4
- 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 +21 -6
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +15 -0
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +26 -0
- package/lib/typescript/components/Message/utils/messageActions.d.ts +22 -21
- package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +10 -0
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +5 -5
- package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
- package/lib/typescript/components/MessageInput/SendMessageDisallowedIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
- package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +9 -0
- package/lib/typescript/components/MessageInput/hooks/useCountdown.d.ts +8 -0
- package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts +8 -7
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +5 -5
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
- package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +6 -5
- package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
- package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
- package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +5 -5
- package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +12 -0
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +21 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +6 -6
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +6 -0
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -7
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +12 -0
- package/lib/typescript/components/Reply/Reply.d.ts +5 -5
- package/lib/typescript/components/Thread/Thread.d.ts +8 -8
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
- package/lib/typescript/components/index.d.ts +13 -7
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +39 -40
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +30 -22
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -16
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +53 -42
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +3 -3
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +31 -32
- 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 +77 -166
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +15 -8
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
- package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +25 -0
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +29 -28
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +46 -17
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
- package/lib/typescript/contexts/utils/getDisplayName.d.ts +2 -2
- package/lib/typescript/hooks/useIsMountedRef.d.ts +20 -0
- package/lib/typescript/i18n/en.json +9 -3
- package/lib/typescript/i18n/fr.json +9 -3
- package/lib/typescript/i18n/hi.json +9 -3
- package/lib/typescript/i18n/it.json +9 -3
- package/lib/typescript/i18n/ja.json +67 -0
- package/lib/typescript/i18n/ko.json +67 -0
- package/lib/typescript/i18n/nl.json +9 -3
- package/lib/typescript/i18n/ru.json +9 -3
- package/lib/typescript/i18n/tr.json +10 -4
- package/lib/typescript/icons/{Left.d.ts → Pin.d.ts} +1 -1
- package/lib/typescript/icons/PinHeader.d.ts +3 -0
- package/lib/typescript/icons/{Right.d.ts → Unpin.d.ts} +1 -1
- package/lib/typescript/icons/UserAdmin.d.ts +3 -0
- package/lib/typescript/icons/index.d.ts +3 -2
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/native.d.ts +1 -9
- package/lib/typescript/types/types.d.ts +16 -13
- package/lib/typescript/utils/Streami18n.d.ts +17 -9
- package/lib/typescript/utils/date.d.ts +2 -0
- package/lib/typescript/utils/getResizedImageUrl.d.ts +20 -0
- package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
- package/lib/typescript/utils/utils.d.ts +36 -30
- package/package.json +15 -20
- package/src/components/Attachment/Attachment.tsx +20 -61
- package/src/components/Attachment/AttachmentActions.tsx +17 -57
- package/src/components/Attachment/Card.tsx +22 -52
- package/src/components/Attachment/FileAttachment.tsx +16 -51
- package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
- package/src/components/Attachment/FileIcon.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +209 -241
- package/src/components/Attachment/Giphy.tsx +84 -128
- package/src/components/Attachment/__tests__/Attachment.test.js +27 -19
- 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 +77 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +91 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +66 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +48 -0
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +188 -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/AttachmentPicker/components/AttachmentSelectionBar.tsx +15 -3
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +66 -96
- package/src/components/AutoCompleteInput/{CommandsItem.tsx → AutoCompleteSuggestionCommandIcon.tsx} +7 -59
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +102 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +149 -0
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +209 -0
- package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +10 -16
- package/src/components/Avatar/Avatar.tsx +8 -11
- package/src/components/Avatar/GroupAvatar.tsx +7 -21
- package/src/components/Avatar/__tests__/Avatar.test.js +2 -33
- package/src/components/Channel/Channel.tsx +495 -477
- package/src/components/Channel/__tests__/Channel.test.js +63 -100
- package/src/components/Channel/__tests__/ownCapabilities.test.js +376 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +11 -25
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +54 -69
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +17 -49
- package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +39 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
- package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
- package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
- package/src/components/ChannelList/ChannelList.tsx +36 -58
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +2 -3
- package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
- package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +5 -2
- package/src/components/ChannelList/ChannelListLoadingIndicator.tsx +5 -1
- package/src/components/ChannelList/ChannelListMessenger.tsx +22 -74
- package/src/components/ChannelList/Skeleton.tsx +2 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +75 -16
- package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +46 -14
- package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +8 -20
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +13 -36
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +17 -39
- package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +15 -37
- package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +11 -33
- package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +5 -21
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +95 -70
- package/src/components/ChannelList/utils.ts +9 -42
- package/src/components/ChannelPreview/ChannelAvatar.tsx +6 -29
- package/src/components/ChannelPreview/ChannelPreview.tsx +21 -54
- package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +14 -24
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +39 -56
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +50 -0
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +10 -30
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +7 -28
- package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +7 -27
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +16 -22
- package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +23 -14
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +15 -30
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +8 -30
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +9 -30
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +31 -81
- package/src/components/Chat/Chat.tsx +19 -44
- package/src/components/Chat/__tests__/Chat.test.js +12 -47
- package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
- package/src/components/Chat/hooks/useIsOnline.ts +45 -56
- package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
- package/src/components/ImageGallery/ImageGallery.tsx +110 -86
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +20 -15
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +45 -25
- package/src/components/ImageGallery/components/ImageGrid.tsx +47 -33
- package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -0
- package/src/components/Indicators/LoadingErrorIndicator.tsx +1 -1
- package/src/components/Indicators/LoadingIndicator.tsx +1 -2
- package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx +9 -2
- package/src/components/Message/Message.tsx +196 -688
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +14 -56
- package/src/components/Message/MessageSimple/MessageContent.tsx +42 -87
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +24 -63
- package/src/components/Message/MessageSimple/MessageFooter.tsx +60 -84
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +109 -0
- package/src/components/Message/MessageSimple/MessageReplies.tsx +19 -60
- package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +7 -29
- package/src/components/Message/MessageSimple/MessageSimple.tsx +64 -78
- package/src/components/Message/MessageSimple/MessageStatus.tsx +35 -88
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +24 -66
- package/src/components/Message/MessageSimple/ReactionList.tsx +110 -163
- package/src/components/Message/MessageSimple/__tests__/Message.test.js +24 -258
- package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +9 -8
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +63 -46
- package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +53 -0
- package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +13 -9
- package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +11 -47
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +35 -22
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +80 -0
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageReplies.test.js.snap +72 -46
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageStatus.test.js.snap +77 -48
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageTextContainer.test.js.snap +6 -18
- 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 +138 -63
- package/src/components/Message/hooks/useCreateMessageContext.ts +5 -26
- package/src/components/Message/hooks/useMessageActionHandlers.ts +157 -0
- package/src/components/Message/hooks/useMessageActions.tsx +371 -0
- package/src/components/Message/utils/messageActions.ts +53 -54
- package/src/components/Message/utils/removeReservedFields.ts +3 -18
- package/src/components/MessageInput/AttachButton.tsx +15 -57
- package/src/components/MessageInput/CommandsButton.tsx +16 -58
- package/src/components/MessageInput/CooldownTimer.tsx +67 -0
- package/src/components/MessageInput/FileUploadPreview.tsx +86 -118
- package/src/components/MessageInput/ImageUploadPreview.tsx +15 -58
- package/src/components/MessageInput/InputButtons.tsx +17 -64
- package/src/components/MessageInput/MessageInput.tsx +83 -97
- package/src/components/MessageInput/MoreOptionsButton.tsx +14 -56
- package/src/components/MessageInput/SendButton.tsx +14 -55
- package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +47 -0
- package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +6 -21
- package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +193 -97
- package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +35 -35
- package/src/components/MessageInput/__tests__/MessageInput.test.js +29 -17
- 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__/AttachButton.test.js.snap +134 -52
- package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +3955 -1647
- package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +1964 -1464
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +633 -326
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +224 -124
- package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +85 -17
- package/src/components/MessageInput/hooks/useCooldown.ts +48 -0
- package/src/components/MessageInput/hooks/useCountdown.ts +48 -0
- package/src/components/MessageList/DateHeader.tsx +2 -2
- package/src/components/MessageList/InlineDateSeparator.tsx +5 -2
- package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
- package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
- package/src/components/MessageList/MessageList.tsx +181 -159
- package/src/components/MessageList/MessageSystem.tsx +7 -28
- package/src/components/MessageList/ScrollToBottomButton.tsx +6 -1
- package/src/components/MessageList/TypingIndicator.tsx +4 -20
- package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
- package/src/components/MessageList/__tests__/MessageList.test.js +231 -152
- package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +13 -8
- package/src/components/MessageList/__tests__/TypingIndicator.test.js +14 -97
- package/src/components/MessageList/__tests__/__snapshots__/MessageSystem.test.js.snap +9 -4
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +78 -32
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +60 -57
- package/src/components/MessageList/hooks/useMessageList.ts +39 -62
- package/src/components/MessageList/hooks/useTypingString.ts +6 -22
- package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
- package/src/components/MessageList/utils/getDateSeparators.ts +10 -30
- package/src/components/MessageList/utils/getGroupStyles.ts +23 -44
- package/src/components/MessageList/utils/getLastReceivedMessage.ts +9 -19
- package/src/components/MessageList/utils/getReadStates.ts +5 -20
- package/src/components/MessageOverlay/MessageActionList.tsx +170 -0
- package/src/components/MessageOverlay/MessageActionListItem.tsx +124 -0
- package/src/components/MessageOverlay/MessageOverlay.tsx +264 -268
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +18 -0
- package/src/components/MessageOverlay/OverlayReactionList.tsx +24 -82
- package/src/components/MessageOverlay/OverlayReactions.tsx +12 -8
- package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +44 -0
- package/src/components/Reply/Reply.tsx +44 -81
- package/src/components/Thread/Thread.tsx +31 -57
- package/src/components/Thread/__tests__/Thread.test.js +58 -77
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +874 -1011
- package/src/components/Thread/components/ThreadFooterComponent.tsx +13 -49
- package/src/components/docs/ListProps.md +1 -1
- package/src/components/docs/data.js +38 -37
- package/src/components/index.ts +13 -7
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +1 -2
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +10 -9
- package/src/contexts/channelContext/ChannelContext.tsx +43 -79
- package/src/contexts/channelsContext/ChannelsContext.tsx +37 -63
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +39 -117
- package/src/contexts/channelsStateContext/useChannelState.ts +29 -61
- package/src/contexts/chatContext/ChatContext.tsx +15 -51
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +13 -56
- package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -8
- package/src/contexts/messageContext/MessageContext.tsx +16 -57
- package/src/contexts/messageInputContext/MessageInputContext.tsx +146 -157
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +13 -26
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -34
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +41 -97
- 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 +96 -234
- package/src/contexts/overlayContext/OverlayContext.tsx +35 -35
- package/src/contexts/overlayContext/OverlayProvider.tsx +52 -62
- package/src/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.tsx +38 -0
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +14 -55
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +59 -80
- package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +4 -2
- package/src/contexts/themeContext/ThemeContext.tsx +1 -0
- package/src/contexts/themeContext/utils/theme.ts +92 -36
- package/src/contexts/threadContext/ThreadContext.tsx +14 -48
- package/src/contexts/translationContext/TranslationContext.tsx +15 -10
- package/src/contexts/typingContext/TypingContext.tsx +12 -46
- package/src/contexts/utils/getDisplayName.ts +3 -1
- package/src/emoji-data/compiled.ts +1830 -9609
- package/src/emoji-data/emojiNames.ts +0 -140
- package/src/emoji-data/emojis.ts +0 -210
- package/src/emoji-data/index.js +1 -1
- package/src/hooks/useAppStateListener.ts +26 -12
- package/src/hooks/useIsMountedRef.ts +36 -0
- package/src/hooks/useStreami18n.ts +5 -3
- package/src/i18n/en.json +9 -3
- package/src/i18n/fr.json +9 -3
- package/src/i18n/hi.json +9 -3
- package/src/i18n/it.json +9 -3
- package/src/i18n/ja.json +67 -0
- package/src/i18n/ko.json +67 -0
- package/src/i18n/nl.json +9 -3
- package/src/i18n/ru.json +9 -3
- package/src/i18n/tr.json +10 -4
- package/src/icons/Pin.tsx +17 -0
- package/src/icons/PinHeader.tsx +12 -0
- package/src/icons/Unpin.tsx +12 -0
- package/src/icons/UserAdmin.tsx +23 -0
- package/src/icons/index.ts +3 -2
- package/src/init.ts +5 -0
- package/src/mock-builders/api/queryChannels.js +1 -1
- package/src/mock-builders/api/sendMessage.js +3 -1
- package/src/mock-builders/generator/attachment.js +0 -2
- package/src/mock-builders/generator/channel.js +101 -46
- package/src/mock-builders/generator/user.js +33 -26
- package/src/mock-builders/mock.js +2 -2
- package/src/mock-builders/native/react-native-mock.js +1 -1
- package/src/native.ts +2 -13
- package/src/types/types.ts +16 -18
- package/src/utils/Streami18n.ts +12 -6
- package/src/utils/__tests__/Streami18n.test.js +9 -45
- package/src/utils/__tests__/getResizedImageUrl.test.js +57 -0
- package/src/utils/__tests__/utils.test.js +19 -0
- package/src/utils/date.ts +4 -0
- package/src/utils/getResizedImageUrl.ts +59 -0
- package/src/utils/getUrlOfImageAttachment.ts +10 -0
- package/src/utils/utils.ts +97 -142
- package/src/version.json +1 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/commonjs/components/Channel/utils/debounce.js +0 -20
- package/lib/commonjs/components/Channel/utils/debounce.js.map +0 -1
- package/lib/commonjs/components/Channel/utils/throttle.js +0 -20
- package/lib/commonjs/components/Channel/utils/throttle.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActions.js.map +0 -1
- package/lib/commonjs/icons/Left.js +0 -38
- package/lib/commonjs/icons/Left.js.map +0 -1
- package/lib/commonjs/icons/Right.js +0 -38
- package/lib/commonjs/icons/Right.js.map +0 -1
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
- package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
- package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
- package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
- package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
- package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/CommandsHeader.js +0 -78
- package/lib/module/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/CommandsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js +0 -81
- package/lib/module/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/EmojisItem.js +0 -75
- package/lib/module/components/AutoCompleteInput/EmojisItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/MentionsItem.js +0 -125
- package/lib/module/components/AutoCompleteInput/MentionsItem.js.map +0 -1
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js +0 -199
- package/lib/module/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
- package/lib/module/components/Channel/utils/debounce.js +0 -20
- package/lib/module/components/Channel/utils/debounce.js.map +0 -1
- package/lib/module/components/Channel/utils/throttle.js +0 -20
- package/lib/module/components/Channel/utils/throttle.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActions.js.map +0 -1
- package/lib/module/icons/Left.js +0 -38
- package/lib/module/icons/Left.js.map +0 -1
- package/lib/module/icons/Right.js +0 -38
- package/lib/module/icons/Right.js.map +0 -1
- package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
- package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/BottomSheet.js +0 -25
- package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
- package/lib/module/styleguideComponents/JsDoc.js +0 -87
- package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
- package/lib/module/styleguideComponents/Markdown.js +0 -12
- package/lib/module/styleguideComponents/Markdown.js.map +0 -1
- package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
- package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
- package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
- package/lib/module/styleguideComponents/Reanimated.js +0 -2
- package/lib/module/styleguideComponents/Wrapper.js +0 -29
- package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
- package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
- package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
- package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
- package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
- package/lib/typescript/components/AutoCompleteInput/CommandsHeader.d.ts +0 -2
- package/lib/typescript/components/AutoCompleteInput/CommandsItem.d.ts +0 -15
- package/lib/typescript/components/AutoCompleteInput/EmojisHeader.d.ts +0 -5
- package/lib/typescript/components/AutoCompleteInput/EmojisItem.d.ts +0 -12
- package/lib/typescript/components/AutoCompleteInput/MentionsItem.d.ts +0 -16
- package/lib/typescript/components/AutoCompleteInput/SuggestionsList.d.ts +0 -13
- package/lib/typescript/components/Channel/utils/debounce.d.ts +0 -2
- package/lib/typescript/components/Channel/utils/throttle.d.ts +0 -2
- package/lib/typescript/components/MessageOverlay/MessageActions.d.ts +0 -11
- package/src/components/AutoCompleteInput/CommandsHeader.tsx +0 -43
- package/src/components/AutoCompleteInput/EmojisHeader.tsx +0 -45
- package/src/components/AutoCompleteInput/EmojisItem.tsx +0 -52
- package/src/components/AutoCompleteInput/MentionsItem.tsx +0 -74
- package/src/components/AutoCompleteInput/SuggestionsList.tsx +0 -138
- package/src/components/AutoCompleteInput/__tests__/CommandsItem.test.js +0 -29
- package/src/components/AutoCompleteInput/__tests__/MentionsItem.test.js +0 -62
- package/src/components/Channel/utils/debounce.ts +0 -12
- package/src/components/Channel/utils/throttle.ts +0 -12
- package/src/components/MessageList/__tests__/__snapshots__/MessageList.test.js.snap +0 -983
- package/src/components/MessageOverlay/MessageActions.tsx +0 -243
- package/src/icons/Left.tsx +0 -12
- package/src/icons/Right.tsx +0 -12
- package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -59
- package/src/styleguideComponents/BottomSheet.tsx +0 -3
- package/src/styleguideComponents/JsDoc.tsx +0 -43
- package/src/styleguideComponents/Markdown.tsx +0 -1
- package/src/styleguideComponents/PathlineRenderer.tsx +0 -44
- package/src/styleguideComponents/PropsRenderer.tsx +0 -138
- package/src/styleguideComponents/Reanimated.tsx +0 -0
- package/src/styleguideComponents/Wrapper.tsx +0 -6
- package/src/styleguideComponents/register-react-native-web.js +0 -13
- package/src/styleguideComponents/resolveAssetSource.js +0 -2
|
@@ -9,12 +9,10 @@ exports.ReactionList = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
14
|
var _reactNative = require("react-native");
|
|
15
15
|
|
|
16
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
17
|
-
|
|
18
16
|
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
19
17
|
|
|
20
18
|
var _MessageContext = require("../../../contexts/messageContext/MessageContext");
|
|
@@ -26,7 +24,7 @@ var _ThemeContext = require("../../../contexts/themeContext/ThemeContext");
|
|
|
26
24
|
var _Unknown = require("../../../icons/Unknown");
|
|
27
25
|
|
|
28
26
|
var _this = this,
|
|
29
|
-
_jsxFileName = "/
|
|
27
|
+
_jsxFileName = "/Users/vishalnarkhede/projects/stream-chat-react-native/package/src/components/Message/MessageSimple/ReactionList.tsx";
|
|
30
28
|
|
|
31
29
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
32
30
|
|
|
@@ -60,36 +58,11 @@ var Icon = function Icon(_ref) {
|
|
|
60
58
|
var ReactionIcon = ((_supportedReactions$f = supportedReactions.find(function (reaction) {
|
|
61
59
|
return reaction.type === type;
|
|
62
60
|
})) == null ? void 0 : _supportedReactions$f.Icon) || _Unknown.Unknown;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var showReaction = function showReaction() {
|
|
66
|
-
'worklet';
|
|
67
|
-
|
|
68
|
-
scale.value = (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withDelay)(250, (0, _reactNativeReanimated.withTiming)(0.5, {
|
|
69
|
-
duration: 100
|
|
70
|
-
})), (0, _reactNativeReanimated.withTiming)(1.5, {
|
|
71
|
-
duration: 400
|
|
72
|
-
}), (0, _reactNativeReanimated.withTiming)(1, {
|
|
73
|
-
duration: 500
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
(0, _react.useEffect)(function () {
|
|
78
|
-
showReaction();
|
|
79
|
-
}, []);
|
|
80
|
-
var animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(function () {
|
|
81
|
-
return {
|
|
82
|
-
transform: [{
|
|
83
|
-
scale: scale.value
|
|
84
|
-
}]
|
|
85
|
-
};
|
|
86
|
-
}, []);
|
|
87
|
-
return _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
88
|
-
style: animatedStyle,
|
|
61
|
+
return _react["default"].createElement(_reactNative.View, {
|
|
89
62
|
__self: _this,
|
|
90
63
|
__source: {
|
|
91
64
|
fileName: _jsxFileName,
|
|
92
|
-
lineNumber:
|
|
65
|
+
lineNumber: 56,
|
|
93
66
|
columnNumber: 5
|
|
94
67
|
}
|
|
95
68
|
}, _react["default"].createElement(ReactionIcon, {
|
|
@@ -100,7 +73,7 @@ var Icon = function Icon(_ref) {
|
|
|
100
73
|
__self: _this,
|
|
101
74
|
__source: {
|
|
102
75
|
fileName: _jsxFileName,
|
|
103
|
-
lineNumber:
|
|
76
|
+
lineNumber: 57,
|
|
104
77
|
columnNumber: 7
|
|
105
78
|
}
|
|
106
79
|
}));
|
|
@@ -109,6 +82,7 @@ var Icon = function Icon(_ref) {
|
|
|
109
82
|
var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
110
83
|
var alignment = props.alignment,
|
|
111
84
|
propFill = props.fill,
|
|
85
|
+
message = props.message,
|
|
112
86
|
messageContentWidth = props.messageContentWidth,
|
|
113
87
|
_onLongPress = props.onLongPress,
|
|
114
88
|
_onPress = props.onPress,
|
|
@@ -120,7 +94,8 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
120
94
|
showMessageOverlay = props.showMessageOverlay,
|
|
121
95
|
propStroke = props.stroke,
|
|
122
96
|
propStrokeSize = props.strokeSize,
|
|
123
|
-
supportedReactions = props.supportedReactions
|
|
97
|
+
supportedReactions = props.supportedReactions,
|
|
98
|
+
targetedMessage = props.targetedMessage;
|
|
124
99
|
|
|
125
100
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
126
101
|
_useTheme$theme = _useTheme.theme,
|
|
@@ -129,7 +104,9 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
129
104
|
grey = _useTheme$theme$color.grey,
|
|
130
105
|
grey_gainsboro = _useTheme$theme$color.grey_gainsboro,
|
|
131
106
|
grey_whisper = _useTheme$theme$color.grey_whisper,
|
|
107
|
+
targetedMessageBackground = _useTheme$theme$color.targetedMessageBackground,
|
|
132
108
|
white = _useTheme$theme$color.white,
|
|
109
|
+
white_snow = _useTheme$theme$color.white_snow,
|
|
133
110
|
_useTheme$theme$messa = _useTheme$theme.messageSimple,
|
|
134
111
|
_useTheme$theme$messa2 = _useTheme$theme$messa.avatarWrapper,
|
|
135
112
|
leftAlign = _useTheme$theme$messa2.leftAlign,
|
|
@@ -144,7 +121,6 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
144
121
|
themeStrokeSize = _useTheme$theme$messa3.strokeSize,
|
|
145
122
|
screenPadding = _useTheme$theme.screenPadding;
|
|
146
123
|
|
|
147
|
-
var opacity = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
148
124
|
var width = (0, _reactNative.useWindowDimensions)().width;
|
|
149
125
|
var supportedReactionTypes = supportedReactions.map(function (supportedReaction) {
|
|
150
126
|
return supportedReaction.type;
|
|
@@ -153,23 +129,6 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
153
129
|
return supportedReactionTypes.includes(reaction.type);
|
|
154
130
|
});
|
|
155
131
|
|
|
156
|
-
var showReactions = function showReactions(show) {
|
|
157
|
-
'worklet';
|
|
158
|
-
|
|
159
|
-
opacity.value = show ? (0, _reactNativeReanimated.withDelay)(250, (0, _reactNativeReanimated.withTiming)(1, {
|
|
160
|
-
duration: 500
|
|
161
|
-
})) : 0;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
(0, _react.useEffect)(function () {
|
|
165
|
-
showReactions(hasSupportedReactions && messageContentWidth !== 0);
|
|
166
|
-
}, [hasSupportedReactions, messageContentWidth]);
|
|
167
|
-
var animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(function () {
|
|
168
|
-
return {
|
|
169
|
-
opacity: opacity.value
|
|
170
|
-
};
|
|
171
|
-
}, []);
|
|
172
|
-
|
|
173
132
|
if (!hasSupportedReactions || messageContentWidth === 0) {
|
|
174
133
|
return null;
|
|
175
134
|
}
|
|
@@ -178,7 +137,8 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
178
137
|
var fill = propFill || alignmentLeft ? grey_gainsboro : grey_whisper;
|
|
179
138
|
var radius = propRadius || themeRadius;
|
|
180
139
|
var reactionSize = propReactionSize || themeReactionSize;
|
|
181
|
-
var
|
|
140
|
+
var highlighted = message.pinned || targetedMessage === message.id;
|
|
141
|
+
var stroke = propStroke || (highlighted ? targetedMessageBackground : white_snow);
|
|
182
142
|
var strokeSize = propStrokeSize || themeStrokeSize;
|
|
183
143
|
var x1 = alignmentLeft ? messageContentWidth + (Number(leftAlign.marginRight) || 0) + (Number(spacer.width) || 0) - radius * 0.5 : width - screenPadding * 2 - messageContentWidth;
|
|
184
144
|
var x2 = x1 + radius * 2 * (alignmentLeft ? 1 : -1);
|
|
@@ -187,61 +147,31 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
187
147
|
var insideLeftBound = x2 - reactionSize * reactions.length / 2 > screenPadding;
|
|
188
148
|
var insideRightBound = x2 + strokeSize + reactionSize * reactions.length / 2 < width - screenPadding * 2;
|
|
189
149
|
var left = reactions.length === 1 ? x1 + (alignmentLeft ? -radius : radius - reactionSize) : !insideLeftBound ? screenPadding : !insideRightBound ? width - screenPadding * 2 - reactionSize * reactions.length - strokeSize : x2 - reactionSize * reactions.length / 2 - strokeSize;
|
|
190
|
-
return _react["default"].createElement(_reactNative.
|
|
191
|
-
disabled: preventPress,
|
|
192
|
-
onLongPress: function onLongPress(event) {
|
|
193
|
-
if (_onLongPress) {
|
|
194
|
-
_onLongPress({
|
|
195
|
-
emitter: 'reactionList',
|
|
196
|
-
event: event
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
onPress: function onPress(event) {
|
|
201
|
-
if (_onPress) {
|
|
202
|
-
_onPress({
|
|
203
|
-
defaultHandler: function defaultHandler() {
|
|
204
|
-
return showMessageOverlay(true);
|
|
205
|
-
},
|
|
206
|
-
emitter: 'reactionList',
|
|
207
|
-
event: event
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
onPressIn: function onPressIn(event) {
|
|
212
|
-
if (_onPressIn) {
|
|
213
|
-
_onPressIn({
|
|
214
|
-
defaultHandler: function defaultHandler() {
|
|
215
|
-
return showMessageOverlay(true);
|
|
216
|
-
},
|
|
217
|
-
emitter: 'reactionList',
|
|
218
|
-
event: event
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
},
|
|
150
|
+
return _react["default"].createElement(_reactNative.View, {
|
|
222
151
|
style: [styles.container, {
|
|
223
152
|
height: reactionSize + radius * 5,
|
|
224
153
|
width: width
|
|
225
154
|
}, container],
|
|
155
|
+
testID: "reaction-list",
|
|
226
156
|
__self: _this,
|
|
227
157
|
__source: {
|
|
228
158
|
fileName: _jsxFileName,
|
|
229
|
-
lineNumber:
|
|
159
|
+
lineNumber: 180,
|
|
230
160
|
columnNumber: 5
|
|
231
161
|
}
|
|
232
|
-
}, reactions.length ? _react["default"].createElement(
|
|
233
|
-
style: [_reactNative.StyleSheet.absoluteFill
|
|
162
|
+
}, reactions.length ? _react["default"].createElement(_reactNative.View, {
|
|
163
|
+
style: [_reactNative.StyleSheet.absoluteFill],
|
|
234
164
|
__self: _this,
|
|
235
165
|
__source: {
|
|
236
166
|
fileName: _jsxFileName,
|
|
237
|
-
lineNumber:
|
|
167
|
+
lineNumber: 192,
|
|
238
168
|
columnNumber: 9
|
|
239
169
|
}
|
|
240
170
|
}, _react["default"].createElement(_reactNativeSvg["default"], {
|
|
241
171
|
__self: _this,
|
|
242
172
|
__source: {
|
|
243
173
|
fileName: _jsxFileName,
|
|
244
|
-
lineNumber:
|
|
174
|
+
lineNumber: 193,
|
|
245
175
|
columnNumber: 11
|
|
246
176
|
}
|
|
247
177
|
}, _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
@@ -252,7 +182,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
252
182
|
__self: _this,
|
|
253
183
|
__source: {
|
|
254
184
|
fileName: _jsxFileName,
|
|
255
|
-
lineNumber:
|
|
185
|
+
lineNumber: 194,
|
|
256
186
|
columnNumber: 13
|
|
257
187
|
}
|
|
258
188
|
}), _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
@@ -263,7 +193,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
263
193
|
__self: _this,
|
|
264
194
|
__source: {
|
|
265
195
|
fileName: _jsxFileName,
|
|
266
|
-
lineNumber:
|
|
196
|
+
lineNumber: 195,
|
|
267
197
|
columnNumber: 13
|
|
268
198
|
}
|
|
269
199
|
}), _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
@@ -274,7 +204,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
274
204
|
__self: _this,
|
|
275
205
|
__source: {
|
|
276
206
|
fileName: _jsxFileName,
|
|
277
|
-
lineNumber:
|
|
207
|
+
lineNumber: 196,
|
|
278
208
|
columnNumber: 13
|
|
279
209
|
}
|
|
280
210
|
}), _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
@@ -285,34 +215,34 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
285
215
|
__self: _this,
|
|
286
216
|
__source: {
|
|
287
217
|
fileName: _jsxFileName,
|
|
288
|
-
lineNumber:
|
|
218
|
+
lineNumber: 197,
|
|
289
219
|
columnNumber: 13
|
|
290
220
|
}
|
|
291
221
|
}), _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
292
222
|
cx: x1,
|
|
293
223
|
cy: y1,
|
|
294
|
-
fill: alignmentLeft ? fill :
|
|
224
|
+
fill: alignmentLeft ? fill : white,
|
|
295
225
|
r: radius,
|
|
296
226
|
__self: _this,
|
|
297
227
|
__source: {
|
|
298
228
|
fileName: _jsxFileName,
|
|
299
|
-
lineNumber:
|
|
229
|
+
lineNumber: 198,
|
|
300
230
|
columnNumber: 13
|
|
301
231
|
}
|
|
302
232
|
}), _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
303
233
|
cx: x2,
|
|
304
234
|
cy: y2,
|
|
305
|
-
fill: alignmentLeft ? fill :
|
|
235
|
+
fill: alignmentLeft ? fill : white,
|
|
306
236
|
r: radius * 2,
|
|
307
237
|
__self: _this,
|
|
308
238
|
__source: {
|
|
309
239
|
fileName: _jsxFileName,
|
|
310
|
-
lineNumber:
|
|
240
|
+
lineNumber: 199,
|
|
311
241
|
columnNumber: 13
|
|
312
242
|
}
|
|
313
243
|
})), _react["default"].createElement(_reactNative.View, {
|
|
314
244
|
style: [styles.reactionBubbleBackground, {
|
|
315
|
-
backgroundColor: alignmentLeft ? fill :
|
|
245
|
+
backgroundColor: alignmentLeft ? fill : white,
|
|
316
246
|
borderColor: fill,
|
|
317
247
|
borderRadius: reactionSize,
|
|
318
248
|
borderWidth: strokeSize,
|
|
@@ -323,7 +253,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
323
253
|
__self: _this,
|
|
324
254
|
__source: {
|
|
325
255
|
fileName: _jsxFileName,
|
|
326
|
-
lineNumber:
|
|
256
|
+
lineNumber: 201,
|
|
327
257
|
columnNumber: 11
|
|
328
258
|
}
|
|
329
259
|
}), _react["default"].createElement(_reactNative.View, {
|
|
@@ -331,30 +261,61 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
331
261
|
__self: _this,
|
|
332
262
|
__source: {
|
|
333
263
|
fileName: _jsxFileName,
|
|
334
|
-
lineNumber:
|
|
264
|
+
lineNumber: 216,
|
|
335
265
|
columnNumber: 11
|
|
336
266
|
}
|
|
337
267
|
}, _react["default"].createElement(_reactNativeSvg["default"], {
|
|
338
268
|
__self: _this,
|
|
339
269
|
__source: {
|
|
340
270
|
fileName: _jsxFileName,
|
|
341
|
-
lineNumber:
|
|
271
|
+
lineNumber: 217,
|
|
342
272
|
columnNumber: 13
|
|
343
273
|
}
|
|
344
274
|
}, _react["default"].createElement(_reactNativeSvg.Circle, {
|
|
345
275
|
cx: x2,
|
|
346
276
|
cy: y2,
|
|
347
|
-
fill: alignmentLeft ? fill :
|
|
277
|
+
fill: alignmentLeft ? fill : white,
|
|
348
278
|
r: radius * 2,
|
|
349
279
|
__self: _this,
|
|
350
280
|
__source: {
|
|
351
281
|
fileName: _jsxFileName,
|
|
352
|
-
lineNumber:
|
|
282
|
+
lineNumber: 218,
|
|
353
283
|
columnNumber: 15
|
|
354
284
|
}
|
|
355
|
-
}))), _react["default"].createElement(_reactNative.
|
|
285
|
+
}))), _react["default"].createElement(_reactNative.TouchableOpacity, {
|
|
286
|
+
disabled: preventPress,
|
|
287
|
+
onLongPress: function onLongPress(event) {
|
|
288
|
+
if (_onLongPress) {
|
|
289
|
+
_onLongPress({
|
|
290
|
+
emitter: 'reactionList',
|
|
291
|
+
event: event
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
onPress: function onPress(event) {
|
|
296
|
+
if (_onPress) {
|
|
297
|
+
_onPress({
|
|
298
|
+
defaultHandler: function defaultHandler() {
|
|
299
|
+
return showMessageOverlay(true);
|
|
300
|
+
},
|
|
301
|
+
emitter: 'reactionList',
|
|
302
|
+
event: event
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
onPressIn: function onPressIn(event) {
|
|
307
|
+
if (_onPressIn) {
|
|
308
|
+
_onPressIn({
|
|
309
|
+
defaultHandler: function defaultHandler() {
|
|
310
|
+
return showMessageOverlay(true);
|
|
311
|
+
},
|
|
312
|
+
emitter: 'reactionList',
|
|
313
|
+
event: event
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
},
|
|
356
317
|
style: [styles.reactionBubble, {
|
|
357
|
-
backgroundColor: alignmentLeft ? fill :
|
|
318
|
+
backgroundColor: alignmentLeft ? fill : white,
|
|
358
319
|
borderRadius: reactionSize - strokeSize * 2,
|
|
359
320
|
height: reactionSize - strokeSize * 2,
|
|
360
321
|
left: left + strokeSize,
|
|
@@ -364,7 +325,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
364
325
|
__self: _this,
|
|
365
326
|
__source: {
|
|
366
327
|
fileName: _jsxFileName,
|
|
367
|
-
lineNumber:
|
|
328
|
+
lineNumber: 221,
|
|
368
329
|
columnNumber: 11
|
|
369
330
|
}
|
|
370
331
|
}, reactions.map(function (reaction) {
|
|
@@ -378,7 +339,7 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
378
339
|
__self: _this,
|
|
379
340
|
__source: {
|
|
380
341
|
fileName: _jsxFileName,
|
|
381
|
-
lineNumber:
|
|
342
|
+
lineNumber: 263,
|
|
382
343
|
columnNumber: 15
|
|
383
344
|
}
|
|
384
345
|
});
|
|
@@ -386,12 +347,20 @@ var ReactionListWithContext = function ReactionListWithContext(props) {
|
|
|
386
347
|
};
|
|
387
348
|
|
|
388
349
|
var areEqual = function areEqual(prevProps, nextProps) {
|
|
389
|
-
var
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
350
|
+
var prevMessage = prevProps.message,
|
|
351
|
+
prevMessageContentWidth = prevProps.messageContentWidth,
|
|
352
|
+
prevReactions = prevProps.reactions,
|
|
353
|
+
prevTargetedMessage = prevProps.targetedMessage;
|
|
354
|
+
var nextMessage = nextProps.message,
|
|
355
|
+
nextMessageContentWidth = nextProps.messageContentWidth,
|
|
356
|
+
nextReactions = nextProps.reactions,
|
|
357
|
+
nextTargetedMessage = nextProps.targetedMessage;
|
|
393
358
|
var messageContentWidthEqual = prevMessageContentWidth === nextMessageContentWidth;
|
|
394
359
|
if (!messageContentWidthEqual) return false;
|
|
360
|
+
var messagePinnedEqual = prevMessage.pinned === nextMessage.pinned;
|
|
361
|
+
if (!messagePinnedEqual) return false;
|
|
362
|
+
var targetedMessageEqual = prevTargetedMessage === nextTargetedMessage;
|
|
363
|
+
if (!targetedMessageEqual) return false;
|
|
395
364
|
var reactionsEqual = prevReactions.length === nextReactions.length && prevReactions.every(function (latestReaction, index) {
|
|
396
365
|
return nextReactions[index].own === latestReaction.own && nextReactions[index].type === latestReaction.type;
|
|
397
366
|
});
|
|
@@ -404,6 +373,7 @@ var MemoizedReactionList = _react["default"].memo(ReactionListWithContext, areEq
|
|
|
404
373
|
var ReactionList = function ReactionList(props) {
|
|
405
374
|
var _useMessageContext = (0, _MessageContext.useMessageContext)(),
|
|
406
375
|
alignment = _useMessageContext.alignment,
|
|
376
|
+
message = _useMessageContext.message,
|
|
407
377
|
onLongPress = _useMessageContext.onLongPress,
|
|
408
378
|
onPress = _useMessageContext.onPress,
|
|
409
379
|
onPressIn = _useMessageContext.onPressIn,
|
|
@@ -412,22 +382,25 @@ var ReactionList = function ReactionList(props) {
|
|
|
412
382
|
showMessageOverlay = _useMessageContext.showMessageOverlay;
|
|
413
383
|
|
|
414
384
|
var _useMessagesContext = (0, _MessagesContext.useMessagesContext)(),
|
|
415
|
-
supportedReactions = _useMessagesContext.supportedReactions
|
|
385
|
+
supportedReactions = _useMessagesContext.supportedReactions,
|
|
386
|
+
targetedMessage = _useMessagesContext.targetedMessage;
|
|
416
387
|
|
|
417
388
|
return _react["default"].createElement(MemoizedReactionList, (0, _extends2["default"])({
|
|
418
389
|
alignment: alignment,
|
|
390
|
+
message: message,
|
|
419
391
|
onLongPress: onLongPress,
|
|
420
392
|
onPress: onPress,
|
|
421
393
|
onPressIn: onPressIn,
|
|
422
394
|
preventPress: preventPress,
|
|
423
395
|
reactions: reactions,
|
|
424
396
|
showMessageOverlay: showMessageOverlay,
|
|
425
|
-
supportedReactions: supportedReactions
|
|
397
|
+
supportedReactions: supportedReactions,
|
|
398
|
+
targetedMessage: targetedMessage
|
|
426
399
|
}, props, {
|
|
427
400
|
__self: _this,
|
|
428
401
|
__source: {
|
|
429
402
|
fileName: _jsxFileName,
|
|
430
|
-
lineNumber:
|
|
403
|
+
lineNumber: 350,
|
|
431
404
|
columnNumber: 5
|
|
432
405
|
}
|
|
433
406
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReactionList.tsx"],"names":["styles","StyleSheet","create","container","left","position","top","reactionBubble","alignItems","flexDirection","justifyContent","reactionBubbleBackground","Icon","pathFill","size","style","supportedReactions","type","ReactionIcon","find","reaction","Unknown","scale","showReaction","value","duration","animatedStyle","transform","ReactionListWithContext","props","alignment","propFill","fill","messageContentWidth","onLongPress","onPress","onPressIn","preventPress","propRadius","radius","reactions","propReactionSize","reactionSize","showMessageOverlay","propStroke","stroke","propStrokeSize","strokeSize","theme","colors","accent_blue","grey","grey_gainsboro","grey_whisper","white","messageSimple","avatarWrapper","leftAlign","spacer","reactionList","middleIcon","themeRadius","themeReactionSize","themeStrokeSize","screenPadding","opacity","width","supportedReactionTypes","map","supportedReaction","hasSupportedReactions","some","includes","showReactions","show","alignmentLeft","x1","Number","marginRight","x2","y1","y2","insideLeftBound","length","insideRightBound","event","emitter","defaultHandler","height","absoluteFill","backgroundColor","borderColor","borderRadius","borderWidth","own","areEqual","prevProps","nextProps","prevMessageContentWidth","prevReactions","nextMessageContentWidth","nextReactions","messageContentWidthEqual","reactionsEqual","every","latestReaction","index","MemoizedReactionList","React","memo","ReactionList"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAOA;;AAEA;;AAKA;;AACA;;AAEA;;;;;;;;;AAeA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,IAAI,EAAE,CADG;AAETC,I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,MAMEG,SANF,sBAMEA,SANF;AAAA,MAOEG,kBAPF,sBAOEA,kBAPF;;AASA,4BAA+B,0CAA/B;AAAA,MAAQ3B,kBAAR,uBAAQA,kBAAR;;AAEA,SACE,gCAAC,oBAAD;AAEIc,IAAAA,SAAS,EAATA,SAFJ;AAGII,IAAAA,WAAW,EAAXA,WAHJ;AAIIC,IAAAA,OAAO,EAAPA,OAJJ;AAKIC,IAAAA,SAAS,EAATA,SALJ;AAMIC,IAAAA,YAAY,EAAZA,YANJ;AAOIG,IAAAA,SAAS,EAATA,SAPJ;AAQIG,IAAAA,kBAAkB,EAAlBA,kBARJ;AASI3B,IAAAA,kBAAkB,EAAlBA;AATJ,KAWMa,KAXN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAeD,CArCM","sourcesContent":["import React, { useEffect } from 'react';\nimport { StyleSheet, TouchableOpacity, useWindowDimensions, View, ViewStyle } from 'react-native';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport Svg, { Circle } from 'react-native-svg';\n\nimport {\n MessageContextValue,\n Reactions,\n useMessageContext,\n} from '../../../contexts/messageContext/MessageContext';\nimport { useMessagesContext } from '../../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../../contexts/themeContext/ThemeContext';\n\nimport { Unknown } from '../../../icons/Unknown';\n\nimport type { IconProps } from '../../../icons/utils/base';\nimport type {\n DefaultAttachmentType,\n DefaultChannelType,\n DefaultCommandType,\n DefaultEventType,\n DefaultMessageType,\n DefaultReactionType,\n DefaultUserType,\n UnknownType,\n} from '../../../types/types';\nimport type { ReactionData } from '../../../utils/utils';\n\nconst styles = StyleSheet.create({\n container: {\n left: 0,\n position: 'absolute',\n top: 0,\n },\n reactionBubble: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-evenly',\n position: 'absolute',\n },\n reactionBubbleBackground: {\n position: 'absolute',\n },\n});\n\nexport type MessageReactions = {\n reactions: Reactions;\n supportedReactions?: ReactionData[];\n};\n\nconst Icon: React.FC<\n Pick<IconProps, 'pathFill' | 'style'> & {\n size: number;\n supportedReactions: ReactionData[];\n type: string;\n }\n> = ({ pathFill, size, style, supportedReactions, type }) => {\n const ReactionIcon =\n supportedReactions.find((reaction) => reaction.type === type)?.Icon || Unknown;\n\n const scale = useSharedValue(0);\n\n const showReaction = () => {\n 'worklet';\n scale.value = withSequence(\n withDelay(250, withTiming(0.5, { duration: 100 })),\n withTiming(1.5, { duration: 400 }),\n withTiming(1, { duration: 500 }),\n );\n };\n\n useEffect(() => {\n showReaction();\n }, []);\n\n const animatedStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n transform: [\n {\n scale: scale.value,\n },\n ],\n }),\n [],\n );\n\n return (\n <Animated.View style={animatedStyle}>\n <ReactionIcon height={size} pathFill={pathFill} style={style} width={size} />\n </Animated.View>\n );\n};\n\nexport type ReactionListPropsWithContext<\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n> = Pick<\n MessageContextValue<At, Ch, Co, Ev, Me, Re, Us>,\n | 'alignment'\n | 'onLongPress'\n | 'onPress'\n | 'onPressIn'\n | 'preventPress'\n | 'reactions'\n | 'showMessageOverlay'\n> & {\n messageContentWidth: number;\n supportedReactions: ReactionData[];\n fill?: string;\n radius?: number; // not recommended to change this\n reactionSize?: number;\n stroke?: string;\n strokeSize?: number; // not recommended to change this\n};\n\nconst ReactionListWithContext = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n props: ReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,\n) => {\n const {\n alignment,\n fill: propFill,\n messageContentWidth,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n radius: propRadius,\n reactions,\n reactionSize: propReactionSize,\n showMessageOverlay,\n stroke: propStroke,\n strokeSize: propStrokeSize,\n supportedReactions,\n } = props;\n\n const {\n theme: {\n colors: { accent_blue, grey, grey_gainsboro, grey_whisper, white },\n messageSimple: {\n avatarWrapper: { leftAlign, spacer },\n reactionList: {\n container,\n middleIcon,\n radius: themeRadius,\n reactionBubble,\n reactionBubbleBackground,\n reactionSize: themeReactionSize,\n strokeSize: themeStrokeSize,\n },\n },\n screenPadding,\n },\n } = useTheme();\n\n const opacity = useSharedValue(0);\n\n const width = useWindowDimensions().width;\n\n const supportedReactionTypes = supportedReactions.map(\n (supportedReaction) => supportedReaction.type,\n );\n const hasSupportedReactions = reactions.some((reaction) =>\n supportedReactionTypes.includes(reaction.type),\n );\n\n const showReactions = (show: boolean) => {\n 'worklet';\n opacity.value = show ? withDelay(250, withTiming(1, { duration: 500 })) : 0;\n };\n\n useEffect(() => {\n showReactions(hasSupportedReactions && messageContentWidth !== 0);\n }, [hasSupportedReactions, messageContentWidth]);\n\n const animatedStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: opacity.value,\n }),\n [],\n );\n\n if (!hasSupportedReactions || messageContentWidth === 0) {\n return null;\n }\n\n const alignmentLeft = alignment === 'left';\n const fill = propFill || alignmentLeft ? grey_gainsboro : grey_whisper;\n const radius = propRadius || themeRadius;\n const reactionSize = propReactionSize || themeReactionSize;\n const stroke = propStroke || white;\n const strokeSize = propStrokeSize || themeStrokeSize;\n\n const x1 = alignmentLeft\n ? messageContentWidth +\n (Number(leftAlign.marginRight) || 0) +\n (Number(spacer.width) || 0) -\n radius * 0.5\n : width - screenPadding * 2 - messageContentWidth;\n const x2 = x1 + radius * 2 * (alignmentLeft ? 1 : -1);\n const y1 = reactionSize + radius * 2;\n const y2 = reactionSize - radius;\n\n const insideLeftBound = x2 - (reactionSize * reactions.length) / 2 > screenPadding;\n const insideRightBound =\n x2 + strokeSize + (reactionSize * reactions.length) / 2 < width - screenPadding * 2;\n const left =\n reactions.length === 1\n ? x1 + (alignmentLeft ? -radius : radius - reactionSize)\n : !insideLeftBound\n ? screenPadding\n : !insideRightBound\n ? width - screenPadding * 2 - reactionSize * reactions.length - strokeSize\n : x2 - (reactionSize * reactions.length) / 2 - strokeSize;\n\n return (\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n emitter: 'reactionList',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n defaultHandler: () => showMessageOverlay(true),\n emitter: 'reactionList',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n defaultHandler: () => showMessageOverlay(true),\n emitter: 'reactionList',\n event,\n });\n }\n }}\n style={[\n styles.container,\n {\n height: reactionSize + radius * 5,\n width,\n },\n container,\n ]}\n >\n {reactions.length ? (\n <Animated.View style={[StyleSheet.absoluteFill, animatedStyle]}>\n <Svg>\n <Circle cx={x1} cy={y1} fill={stroke} r={radius + strokeSize * 3} />\n <Circle cx={x2} cy={y2} fill={stroke} r={radius * 2 + strokeSize * 3} />\n <Circle cx={x1} cy={y1} fill={fill} r={radius + strokeSize} />\n <Circle cx={x2} cy={y2} fill={fill} r={radius * 2 + strokeSize} />\n <Circle cx={x1} cy={y1} fill={alignmentLeft ? fill : stroke} r={radius} />\n <Circle cx={x2} cy={y2} fill={alignmentLeft ? fill : stroke} r={radius * 2} />\n </Svg>\n <View\n style={[\n styles.reactionBubbleBackground,\n {\n backgroundColor: alignmentLeft ? fill : stroke,\n borderColor: fill,\n borderRadius: reactionSize,\n borderWidth: strokeSize,\n height: reactionSize,\n left,\n width: reactionSize * reactions.length,\n },\n reactionBubbleBackground,\n ]}\n />\n <View style={[StyleSheet.absoluteFill]}>\n <Svg>\n <Circle cx={x2} cy={y2} fill={alignmentLeft ? fill : stroke} r={radius * 2} />\n </Svg>\n </View>\n <View\n style={[\n styles.reactionBubble,\n {\n backgroundColor: alignmentLeft ? fill : stroke,\n borderRadius: reactionSize - strokeSize * 2,\n height: reactionSize - strokeSize * 2,\n left: left + strokeSize,\n top: strokeSize,\n width: reactionSize * reactions.length - strokeSize * 2,\n },\n reactionBubble,\n ]}\n >\n {reactions.map((reaction) => (\n <Icon\n key={reaction.type}\n pathFill={reaction.own ? accent_blue : grey}\n size={reactionSize / 2}\n style={middleIcon}\n supportedReactions={supportedReactions}\n type={reaction.type}\n />\n ))}\n </View>\n </Animated.View>\n ) : null}\n </TouchableOpacity>\n );\n};\n\nconst areEqual = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n prevProps: ReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,\n nextProps: ReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>,\n) => {\n const { messageContentWidth: prevMessageContentWidth, reactions: prevReactions } = prevProps;\n const { messageContentWidth: nextMessageContentWidth, reactions: nextReactions } = nextProps;\n\n const messageContentWidthEqual = prevMessageContentWidth === nextMessageContentWidth;\n if (!messageContentWidthEqual) return false;\n\n const reactionsEqual =\n prevReactions.length === nextReactions.length &&\n prevReactions.every(\n (latestReaction, index) =>\n nextReactions[index].own === latestReaction.own &&\n nextReactions[index].type === latestReaction.type,\n );\n if (!reactionsEqual) return false;\n\n return true;\n};\n\nconst MemoizedReactionList = React.memo(\n ReactionListWithContext,\n areEqual,\n) as typeof ReactionListWithContext;\n\nexport type ReactionListProps<\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n> = Partial<Omit<ReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'messageContentWidth'>> &\n Pick<ReactionListPropsWithContext<At, Ch, Co, Ev, Me, Re, Us>, 'messageContentWidth'>;\n\n/**\n * ReactionList - A high level component which implements all the logic required for a message reaction list\n */\nexport const ReactionList = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n props: ReactionListProps<At, Ch, Co, Ev, Me, Re, Us>,\n) => {\n const {\n alignment,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n reactions,\n showMessageOverlay,\n } = useMessageContext<At, Ch, Co, Ev, Me, Re, Us>();\n const { supportedReactions } = useMessagesContext<At, Ch, Co, Ev, Me, Re, Us>();\n\n return (\n <MemoizedReactionList\n {...{\n alignment,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n reactions,\n showMessageOverlay,\n supportedReactions,\n }}\n {...props}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["ReactionList.tsx"],"names":["styles","StyleSheet","create","container","left","position","top","reactionBubble","alignItems","flexDirection","justifyContent","reactionBubbleBackground","Icon","pathFill","size","style","supportedReactions","type","ReactionIcon","find","reaction","Unknown","ReactionListWithContext","props","alignment","propFill","fill","message","messageContentWidth","onLongPress","onPress","onPressIn","preventPress","propRadius","radius","reactions","propReactionSize","reactionSize","showMessageOverlay","propStroke","stroke","propStrokeSize","strokeSize","targetedMessage","theme","colors","accent_blue","grey","grey_gainsboro","grey_whisper","targetedMessageBackground","white","white_snow","messageSimple","avatarWrapper","leftAlign","spacer","reactionList","middleIcon","themeRadius","themeReactionSize","themeStrokeSize","screenPadding","width","supportedReactionTypes","map","supportedReaction","hasSupportedReactions","some","includes","alignmentLeft","highlighted","pinned","id","x1","Number","marginRight","x2","y1","y2","insideLeftBound","length","insideRightBound","height","absoluteFill","backgroundColor","borderColor","borderRadius","borderWidth","event","emitter","defaultHandler","own","areEqual","prevProps","nextProps","prevMessage","prevMessageContentWidth","prevReactions","prevTargetedMessage","nextMessage","nextMessageContentWidth","nextReactions","nextTargetedMessage","messageContentWidthEqual","messagePinnedEqual","targetedMessageEqual","reactionsEqual","every","latestReaction","index","MemoizedReactionList","React","memo","ReactionList"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AAKA;;AAIA;;AAEA;;;;;;;;;AAMA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,QAAQ,EAAE,UAFD;AAGTC,IAAAA,GAAG,EAAE;AAHI,GADoB;AAM/BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,UAAU,EAAE,QADE;AAEdC,IAAAA,aAAa,EAAE,KAFD;AAGdC,IAAAA,cAAc,EAAE,cAHF;AAIdL,IAAAA,QAAQ,EAAE;AAJI,GANe;AAY/BM,EAAAA,wBAAwB,EAAE;AACxBN,IAAAA,QAAQ,EAAE;AADc;AAZK,CAAlB,CAAf;;AAsBA,IAAMO,IAML,GAAG,SANEA,IAMF,OAAyD;AAAA;;AAAA,MAAtDC,QAAsD,QAAtDA,QAAsD;AAAA,MAA5CC,IAA4C,QAA5CA,IAA4C;AAAA,MAAtCC,KAAsC,QAAtCA,KAAsC;AAAA,MAA/BC,kBAA+B,QAA/BA,kBAA+B;AAAA,MAAXC,IAAW,QAAXA,IAAW;AAC3D,MAAMC,YAAY,GAChB,0BAAAF,kBAAkB,CAACG,IAAnB,CAAwB,UAACC,QAAD;AAAA,WAAcA,QAAQ,CAACH,IAAT,KAAkBA,IAAhC;AAAA,GAAxB,4CAA+DL,IAA/D,K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EA,OAJF;AAAA,MAKEC,SALF,sBAKEA,SALF;AAAA,MAMEC,YANF,sBAMEA,YANF;AAAA,MAOEG,SAPF,sBAOEA,SAPF;AAAA,MAQEG,kBARF,sBAQEA,kBARF;;AAUA,4BAAgD,0CAAhD;AAAA,MAAQtB,kBAAR,uBAAQA,kBAAR;AAAA,MAA4B2B,eAA5B,uBAA4BA,eAA5B;;AAEA,SACE,gCAAC,oBAAD;AAEInB,IAAAA,SAAS,EAATA,SAFJ;AAGIG,IAAAA,OAAO,EAAPA,OAHJ;AAIIE,IAAAA,WAAW,EAAXA,WAJJ;AAKIC,IAAAA,OAAO,EAAPA,OALJ;AAMIC,IAAAA,SAAS,EAATA,SANJ;AAOIC,IAAAA,YAAY,EAAZA,YAPJ;AAQIG,IAAAA,SAAS,EAATA,SARJ;AASIG,IAAAA,kBAAkB,EAAlBA,kBATJ;AAUItB,IAAAA,kBAAkB,EAAlBA,kBAVJ;AAWI2B,IAAAA,eAAe,EAAfA;AAXJ,KAaMpB,KAbN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAiBD,CAlCM","sourcesContent":["import React from 'react';\nimport { StyleSheet, TouchableOpacity, useWindowDimensions, View } from 'react-native';\n\nimport Svg, { Circle } from 'react-native-svg';\n\nimport {\n MessageContextValue,\n Reactions,\n useMessageContext,\n} from '../../../contexts/messageContext/MessageContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../../contexts/themeContext/ThemeContext';\n\nimport { Unknown } from '../../../icons/Unknown';\n\nimport type { IconProps } from '../../../icons/utils/base';\nimport type { DefaultStreamChatGenerics } from '../../../types/types';\nimport type { ReactionData } from '../../../utils/utils';\n\nconst styles = StyleSheet.create({\n container: {\n left: 0,\n position: 'absolute',\n top: 0,\n },\n reactionBubble: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-evenly',\n position: 'absolute',\n },\n reactionBubbleBackground: {\n position: 'absolute',\n },\n});\n\nexport type MessageReactions = {\n reactions: Reactions;\n supportedReactions?: ReactionData[];\n};\n\nconst Icon: React.FC<\n Pick<IconProps, 'pathFill' | 'style'> & {\n size: number;\n supportedReactions: ReactionData[];\n type: string;\n }\n> = ({ pathFill, size, style, supportedReactions, type }) => {\n const ReactionIcon =\n supportedReactions.find((reaction) => reaction.type === type)?.Icon || Unknown;\n\n return (\n <View>\n <ReactionIcon height={size} pathFill={pathFill} style={style} width={size} />\n </View>\n );\n};\n\nexport type ReactionListPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n MessageContextValue<StreamChatGenerics>,\n | 'alignment'\n | 'message'\n | 'onLongPress'\n | 'onPress'\n | 'onPressIn'\n | 'preventPress'\n | 'reactions'\n | 'showMessageOverlay'\n> &\n Pick<MessagesContextValue<StreamChatGenerics>, 'targetedMessage'> & {\n messageContentWidth: number;\n supportedReactions: ReactionData[];\n fill?: string;\n radius?: number; // not recommended to change this\n reactionSize?: number;\n stroke?: string;\n strokeSize?: number; // not recommended to change this\n };\n\nconst ReactionListWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReactionListPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n alignment,\n fill: propFill,\n message,\n messageContentWidth,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n radius: propRadius,\n reactions,\n reactionSize: propReactionSize,\n showMessageOverlay,\n stroke: propStroke,\n strokeSize: propStrokeSize,\n supportedReactions,\n targetedMessage,\n } = props;\n\n const {\n theme: {\n colors: {\n accent_blue,\n grey,\n grey_gainsboro,\n grey_whisper,\n targetedMessageBackground,\n white,\n white_snow,\n },\n messageSimple: {\n avatarWrapper: { leftAlign, spacer },\n reactionList: {\n container,\n middleIcon,\n radius: themeRadius,\n reactionBubble,\n reactionBubbleBackground,\n reactionSize: themeReactionSize,\n strokeSize: themeStrokeSize,\n },\n },\n screenPadding,\n },\n } = useTheme();\n\n const width = useWindowDimensions().width;\n\n const supportedReactionTypes = supportedReactions.map(\n (supportedReaction) => supportedReaction.type,\n );\n const hasSupportedReactions = reactions.some((reaction) =>\n supportedReactionTypes.includes(reaction.type),\n );\n\n if (!hasSupportedReactions || messageContentWidth === 0) {\n return null;\n }\n\n const alignmentLeft = alignment === 'left';\n const fill = propFill || alignmentLeft ? grey_gainsboro : grey_whisper;\n const radius = propRadius || themeRadius;\n const reactionSize = propReactionSize || themeReactionSize;\n const highlighted = message.pinned || targetedMessage === message.id;\n const stroke = propStroke || (highlighted ? targetedMessageBackground : white_snow);\n const strokeSize = propStrokeSize || themeStrokeSize;\n\n const x1 = alignmentLeft\n ? messageContentWidth +\n (Number(leftAlign.marginRight) || 0) +\n (Number(spacer.width) || 0) -\n radius * 0.5\n : width - screenPadding * 2 - messageContentWidth;\n const x2 = x1 + radius * 2 * (alignmentLeft ? 1 : -1);\n const y1 = reactionSize + radius * 2;\n const y2 = reactionSize - radius;\n\n const insideLeftBound = x2 - (reactionSize * reactions.length) / 2 > screenPadding;\n const insideRightBound =\n x2 + strokeSize + (reactionSize * reactions.length) / 2 < width - screenPadding * 2;\n const left =\n reactions.length === 1\n ? x1 + (alignmentLeft ? -radius : radius - reactionSize)\n : !insideLeftBound\n ? screenPadding\n : !insideRightBound\n ? width - screenPadding * 2 - reactionSize * reactions.length - strokeSize\n : x2 - (reactionSize * reactions.length) / 2 - strokeSize;\n\n return (\n <View\n style={[\n styles.container,\n {\n height: reactionSize + radius * 5,\n width,\n },\n container,\n ]}\n testID='reaction-list'\n >\n {reactions.length ? (\n <View style={[StyleSheet.absoluteFill]}>\n <Svg>\n <Circle cx={x1} cy={y1} fill={stroke} r={radius + strokeSize * 3} />\n <Circle cx={x2} cy={y2} fill={stroke} r={radius * 2 + strokeSize * 3} />\n <Circle cx={x1} cy={y1} fill={fill} r={radius + strokeSize} />\n <Circle cx={x2} cy={y2} fill={fill} r={radius * 2 + strokeSize} />\n <Circle cx={x1} cy={y1} fill={alignmentLeft ? fill : white} r={radius} />\n <Circle cx={x2} cy={y2} fill={alignmentLeft ? fill : white} r={radius * 2} />\n </Svg>\n <View\n style={[\n styles.reactionBubbleBackground,\n {\n backgroundColor: alignmentLeft ? fill : white,\n borderColor: fill,\n borderRadius: reactionSize,\n borderWidth: strokeSize,\n height: reactionSize,\n left,\n width: reactionSize * reactions.length,\n },\n reactionBubbleBackground,\n ]}\n />\n <View style={[StyleSheet.absoluteFill]}>\n <Svg>\n <Circle cx={x2} cy={y2} fill={alignmentLeft ? fill : white} r={radius * 2} />\n </Svg>\n </View>\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n emitter: 'reactionList',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n defaultHandler: () => showMessageOverlay(true),\n emitter: 'reactionList',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n defaultHandler: () => showMessageOverlay(true),\n emitter: 'reactionList',\n event,\n });\n }\n }}\n style={[\n styles.reactionBubble,\n {\n backgroundColor: alignmentLeft ? fill : white,\n borderRadius: reactionSize - strokeSize * 2,\n height: reactionSize - strokeSize * 2,\n left: left + strokeSize,\n top: strokeSize,\n width: reactionSize * reactions.length - strokeSize * 2,\n },\n reactionBubble,\n ]}\n >\n {reactions.map((reaction) => (\n <Icon\n key={reaction.type}\n pathFill={reaction.own ? accent_blue : grey}\n size={reactionSize / 2}\n style={middleIcon}\n supportedReactions={supportedReactions}\n type={reaction.type}\n />\n ))}\n </TouchableOpacity>\n </View>\n ) : null}\n </View>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: ReactionListPropsWithContext<StreamChatGenerics>,\n nextProps: ReactionListPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n message: prevMessage,\n messageContentWidth: prevMessageContentWidth,\n reactions: prevReactions,\n targetedMessage: prevTargetedMessage,\n } = prevProps;\n const {\n message: nextMessage,\n messageContentWidth: nextMessageContentWidth,\n reactions: nextReactions,\n targetedMessage: nextTargetedMessage,\n } = nextProps;\n\n const messageContentWidthEqual = prevMessageContentWidth === nextMessageContentWidth;\n if (!messageContentWidthEqual) return false;\n\n const messagePinnedEqual = prevMessage.pinned === nextMessage.pinned;\n\n if (!messagePinnedEqual) return false;\n\n const targetedMessageEqual = prevTargetedMessage === nextTargetedMessage;\n\n if (!targetedMessageEqual) return false;\n\n const reactionsEqual =\n prevReactions.length === nextReactions.length &&\n prevReactions.every(\n (latestReaction, index) =>\n nextReactions[index].own === latestReaction.own &&\n nextReactions[index].type === latestReaction.type,\n );\n if (!reactionsEqual) return false;\n\n return true;\n};\n\nconst MemoizedReactionList = React.memo(\n ReactionListWithContext,\n areEqual,\n) as typeof ReactionListWithContext;\n\nexport type ReactionListProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<ReactionListPropsWithContext<StreamChatGenerics>, 'messageContentWidth'>> &\n Pick<ReactionListPropsWithContext<StreamChatGenerics>, 'messageContentWidth'>;\n\n/**\n * ReactionList - A high level component which implements all the logic required for a message reaction list\n */\nexport const ReactionList = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReactionListProps<StreamChatGenerics>,\n) => {\n const {\n alignment,\n message,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n reactions,\n showMessageOverlay,\n } = useMessageContext<StreamChatGenerics>();\n const { supportedReactions, targetedMessage } = useMessagesContext<StreamChatGenerics>();\n\n return (\n <MemoizedReactionList\n {...{\n alignment,\n message,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n reactions,\n showMessageOverlay,\n supportedReactions,\n targetedMessage,\n }}\n {...props}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseLinksFromText = void 0;
|
|
7
|
+
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
|
|
10
|
+
var emailUserName = '[\\w+\\.~$_-]+';
|
|
11
|
+
var schema = "(\\w{2,15}:\\/\\/)";
|
|
12
|
+
var domain = "((?:\\w+\\.\\w+)+(?:[^:\\/\\s]+))";
|
|
13
|
+
var port = "(:[0-9]{1,5})";
|
|
14
|
+
var path = "((?:\\/)?[^?#\\s]+)";
|
|
15
|
+
var queryString = "(\\?[^#\\s]+)";
|
|
16
|
+
var fragment = "(#[\\w_-]+)";
|
|
17
|
+
var emailPattern = "(mailto:)?((?:" + emailUserName + ")@(?:" + domain + "))";
|
|
18
|
+
var schemePrefixedLinkPattern = schema + "(\\S+)";
|
|
19
|
+
var fqdnLinkPattern = schema + "?" + domain + port + "?" + path + "?" + queryString + "?" + fragment + "?";
|
|
20
|
+
|
|
21
|
+
var removeMarkdownLinksFromText = function removeMarkdownLinksFromText(input) {
|
|
22
|
+
return input.replace(/\[[\w\s]+\]\(.*\)/g, '');
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var parseLinksFromText = function parseLinksFromText(input) {
|
|
26
|
+
var matches;
|
|
27
|
+
var inputWithoutMarkdownLinks = removeMarkdownLinksFromText(input);
|
|
28
|
+
var results = [];
|
|
29
|
+
var emailRegExp = new RegExp(emailPattern, 'gi');
|
|
30
|
+
|
|
31
|
+
while ((matches = emailRegExp.exec(input)) !== null) {
|
|
32
|
+
var _matches = matches,
|
|
33
|
+
_matches2 = (0, _slicedToArray2["default"])(_matches, 3),
|
|
34
|
+
raw = _matches2[0],
|
|
35
|
+
_matches2$ = _matches2[1],
|
|
36
|
+
scheme = _matches2$ === void 0 ? 'mailto:' : _matches2$,
|
|
37
|
+
displayValue = _matches2[2];
|
|
38
|
+
|
|
39
|
+
results.push({
|
|
40
|
+
encoded: encodeURI(displayValue),
|
|
41
|
+
raw: raw,
|
|
42
|
+
scheme: scheme
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var linkRegex = new RegExp(fqdnLinkPattern + "|" + schemePrefixedLinkPattern, 'gi');
|
|
47
|
+
|
|
48
|
+
while ((matches = linkRegex.exec(inputWithoutMarkdownLinks)) !== null) {
|
|
49
|
+
var _matches3 = matches,
|
|
50
|
+
_matches4 = (0, _slicedToArray2["default"])(_matches3, 9),
|
|
51
|
+
_raw = _matches4[0],
|
|
52
|
+
_matches4$ = _matches4[1],
|
|
53
|
+
fqdnScheme = _matches4$ === void 0 ? '' : _matches4$,
|
|
54
|
+
_matches4$2 = _matches4[2],
|
|
55
|
+
fqdnDomainName = _matches4$2 === void 0 ? '' : _matches4$2,
|
|
56
|
+
_matches4$3 = _matches4[3],
|
|
57
|
+
fqdnPort = _matches4$3 === void 0 ? '' : _matches4$3,
|
|
58
|
+
_matches4$4 = _matches4[4],
|
|
59
|
+
fqdnPath = _matches4$4 === void 0 ? '' : _matches4$4,
|
|
60
|
+
_matches4$5 = _matches4[5],
|
|
61
|
+
fqdnQueryStraing = _matches4$5 === void 0 ? '' : _matches4$5,
|
|
62
|
+
_matches4$6 = _matches4[6],
|
|
63
|
+
fqdnFragment = _matches4$6 === void 0 ? '' : _matches4$6,
|
|
64
|
+
_matches4$7 = _matches4[7],
|
|
65
|
+
schemePrefixedScheme = _matches4$7 === void 0 ? '' : _matches4$7,
|
|
66
|
+
_matches4$8 = _matches4[8],
|
|
67
|
+
schemePrefixedPath = _matches4$8 === void 0 ? '' : _matches4$8;
|
|
68
|
+
|
|
69
|
+
if (schemePrefixedScheme !== '') {
|
|
70
|
+
results.push({
|
|
71
|
+
encoded: encodeURI(schemePrefixedPath),
|
|
72
|
+
raw: _raw,
|
|
73
|
+
scheme: schemePrefixedScheme
|
|
74
|
+
});
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
results.push({
|
|
79
|
+
encoded: encodeURI([fqdnDomainName, fqdnPort, fqdnPath, fqdnQueryStraing, fqdnFragment].join('')),
|
|
80
|
+
raw: _raw,
|
|
81
|
+
scheme: fqdnScheme
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return results;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.parseLinksFromText = parseLinksFromText;
|
|
89
|
+
//# sourceMappingURL=parseLinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["parseLinks.ts"],"names":["emailUserName","schema","domain","port","path","queryString","fragment","emailPattern","schemePrefixedLinkPattern","fqdnLinkPattern","removeMarkdownLinksFromText","input","replace","parseLinksFromText","matches","inputWithoutMarkdownLinks","results","emailRegExp","RegExp","exec","raw","scheme","displayValue","push","encoded","encodeURI","linkRegex","fqdnScheme","fqdnDomainName","fqdnPort","fqdnPath","fqdnQueryStraing","fqdnFragment","schemePrefixedScheme","schemePrefixedPath","join"],"mappings":";;;;;;;;;AAQA,IAAMA,aAAa,GAAG,gBAAtB;AACA,IAAMC,MAAM,uBAAZ;AACA,IAAMC,MAAM,sCAAZ;AACA,IAAMC,IAAI,kBAAV;AACA,IAAMC,IAAI,wBAAV;AACA,IAAMC,WAAW,kBAAjB;AACA,IAAMC,QAAQ,gBAAd;AAKA,IAAMC,YAAY,sBAAoBP,aAApB,aAAyCE,MAAzC,OAAlB;AAKA,IAAMM,yBAAyB,GAAMP,MAAN,WAA/B;AAMA,IAAMQ,eAAe,GAAMR,MAAN,SAAgBC,MAAhB,GAAyBC,IAAzB,SAAiCC,IAAjC,SAAyCC,WAAzC,SAAwDC,QAAxD,MAArB;;AAYA,IAAMI,2BAA2B,GAAG,SAA9BA,2BAA8B,CAACC,KAAD;AAAA,SAAmBA,KAAK,CAACC,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAnB;AAAA,CAAp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AACO,IAAR,CAAa;AACXC,QAAAA,OAAO,EAAEC,SAAS,CAACS,kBAAD,CADP;AAEXd,QAAAA,GAAG,EAAHA,IAFW;AAGXC,QAAAA,MAAM,EAAEY;AAHG,OAAb;AAKA;AACD;;AAEDjB,IAAAA,OAAO,CAACO,IAAR,CAAa;AACXC,MAAAA,OAAO,EAAEC,SAAS,CAChB,CAACG,cAAD,EAAiBC,QAAjB,EAA2BC,QAA3B,EAAqCC,gBAArC,EAAuDC,YAAvD,EAAqEG,IAArE,CAA0E,EAA1E,CADgB,CADP;AAIXf,MAAAA,GAAG,EAAHA,IAJW;AAKXC,MAAAA,MAAM,EAAEM;AALG,KAAb;AAOD;;AAED,SAAOX,OAAP;AACD,CAlDM","sourcesContent":["/**\n * 📣 Note: Do not use named capture groups, as\n * it is not yet available in Hermes.\n *\n * These helpers indend to make it easier to skim read\n * the patterns below, but note that some are optional,\n * specified in the patterns these are added to.\n * */\nconst emailUserName = '[\\\\w+\\\\.~$_-]+';\nconst schema = `(\\\\w{2,15}:\\\\/\\\\/)`;\nconst domain = `((?:\\\\w+\\\\.\\\\w+)+(?:[^:\\\\/\\\\s]+))`;\nconst port = `(:[0-9]{1,5})`;\nconst path = `((?:\\\\/)?[^?#\\\\s]+)`;\nconst queryString = `(\\\\?[^#\\\\s]+)`;\nconst fragment = `(#[\\\\w_-]+)`;\n\n/**\n * Match any email address, with and without `mailto:`\n */\nconst emailPattern = `(mailto:)?((?:${emailUserName})@(?:${domain}))`;\n\n/**\n * Match any string starting with something that seems like it's a schema.\n * */\nconst schemePrefixedLinkPattern = `${schema}(\\\\S+)`;\n\n/**\n * Match as much as possible of a fqdn, at least with a domain name formed as\n * something.tld\n */\nconst fqdnLinkPattern = `${schema}?${domain}${port}?${path}?${queryString}?${fragment}?`;\n\ninterface Link {\n encoded: string;\n raw: string;\n scheme: string;\n}\n\n/**\n * This is done separately because of the version of javascript run\n * for expo\n * */\nconst removeMarkdownLinksFromText = (input: string) => input.replace(/\\[[\\w\\s]+\\]\\(.*\\)/g, '');\n\nexport const parseLinksFromText = (input: string): Link[] => {\n let matches;\n\n const inputWithoutMarkdownLinks = removeMarkdownLinksFromText(input);\n\n const results: Link[] = [];\n\n const emailRegExp = new RegExp(emailPattern, 'gi');\n while ((matches = emailRegExp.exec(input)) !== null) {\n const [raw, scheme = 'mailto:', displayValue] = matches;\n results.push({ encoded: encodeURI(displayValue), raw, scheme });\n }\n\n /**\n * The two link patterns are checked with an \"or\" (`|`)\n * to avoid overlapping matches being duplicated in the output.\n * */\n const linkRegex = new RegExp(`${fqdnLinkPattern}|${schemePrefixedLinkPattern}`, 'gi');\n while ((matches = linkRegex.exec(inputWithoutMarkdownLinks)) !== null) {\n const [\n raw,\n fqdnScheme = '',\n fqdnDomainName = '',\n fqdnPort = '',\n fqdnPath = '',\n fqdnQueryStraing = '',\n fqdnFragment = '',\n schemePrefixedScheme = '',\n schemePrefixedPath = '',\n ] = matches;\n\n if (schemePrefixedScheme !== '') {\n results.push({\n encoded: encodeURI(schemePrefixedPath),\n raw,\n scheme: schemePrefixedScheme,\n });\n continue;\n }\n\n results.push({\n encoded: encodeURI(\n [fqdnDomainName, fqdnPort, fqdnPath, fqdnQueryStraing, fqdnFragment].join(''),\n ),\n raw,\n scheme: fqdnScheme,\n });\n }\n\n return results;\n};\n"]}
|