stream-chat-react-native-core 5.39.5 → 5.40.0-rc.2
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 +0 -1
- package/lib/commonjs/components/Attachment/Attachment.js +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +6 -6
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +5 -5
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +29 -22
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +8 -8
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +7 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +3 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +3 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +4 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +2 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +2 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +3 -3
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +4 -0
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +4 -0
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +298 -429
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +0 -2
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +26 -10
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +0 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +8 -18
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +2 -9
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +3 -3
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +16 -13
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +58 -96
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +92 -90
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +39 -39
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +221 -221
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +123 -173
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +40 -144
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +0 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +20 -34
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +180 -44
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +234 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js +195 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +4 -16
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +36 -72
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageData.js +38 -0
- package/lib/commonjs/components/Message/hooks/useMessageData.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js +4 -6
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +1 -2
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +1 -2
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +42 -60
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -3
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageActionList.js +35 -0
- package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +60 -0
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageMenu.js +70 -0
- package/lib/commonjs/components/MessageMenu/MessageMenu.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js +81 -0
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +171 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -0
- package/lib/commonjs/components/{MessageOverlay/OverlayReactionsAvatar.js → MessageMenu/MessageUserReactionsAvatar.js} +5 -6
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +110 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/ReactionButton.js +59 -0
- package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +1 -0
- package/lib/commonjs/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.js +2 -0
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +1 -0
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +21 -28
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js +22 -27
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +6 -2
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +152 -0
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -0
- package/lib/commonjs/components/{ImageBackground.js → UIComponents/ImageBackground.js} +1 -1
- package/lib/commonjs/components/UIComponents/ImageBackground.js.map +1 -0
- package/lib/{module/components/Spinner → commonjs/components/UIComponents}/Spinner.js +1 -1
- package/lib/commonjs/components/UIComponents/Spinner.js.map +1 -0
- package/lib/commonjs/components/UIComponents/index.js +37 -0
- package/lib/commonjs/components/UIComponents/index.js.map +1 -0
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +56 -45
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -13
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -11
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +1 -11
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +1 -11
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +1 -11
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/chatConfigContext/ChatConfigContext.js +33 -0
- package/lib/commonjs/contexts/chatConfigContext/ChatConfigContext.js.map +1 -0
- package/lib/commonjs/contexts/chatContext/ChatContext.js +1 -11
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -11
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/index.js +11 -11
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -11
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +1 -11
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +4 -14
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +1 -11
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -14
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +18 -54
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -11
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +1 -11
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +68 -50
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +1 -11
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -11
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +1 -11
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +1 -4
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/icons/PinHeader.js +17 -6
- package/lib/commonjs/icons/PinHeader.js.map +1 -1
- package/lib/commonjs/index.js +4 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +79 -82
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/native.js +36 -25
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/store/SqliteClient.js +179 -0
- package/lib/commonjs/store/SqliteClient.js.map +1 -0
- package/lib/commonjs/store/apis/addPendingTask.js +5 -5
- package/lib/commonjs/store/apis/addPendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteChannel.js +3 -3
- package/lib/commonjs/store/apis/deleteChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMember.js +3 -3
- package/lib/commonjs/store/apis/deleteMember.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessage.js +3 -3
- package/lib/commonjs/store/apis/deleteMessage.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js +3 -3
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deletePendingTask.js +3 -3
- package/lib/commonjs/store/apis/deletePendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReaction.js +3 -3
- package/lib/commonjs/store/apis/deleteReaction.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReactions.js +2 -2
- package/lib/commonjs/store/apis/deleteReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getAllChannelIds.js +2 -2
- package/lib/commonjs/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/commonjs/store/apis/getAppSettings.js +3 -3
- package/lib/commonjs/store/apis/getAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelMessages.js +2 -2
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +2 -2
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +2 -2
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getLastSyncedAt.js +3 -3
- package/lib/commonjs/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/commonjs/store/apis/getMembers.js +2 -2
- package/lib/commonjs/store/apis/getMembers.js.map +1 -1
- package/lib/commonjs/store/apis/getPendingTasks.js +3 -3
- package/lib/commonjs/store/apis/getPendingTasks.js.map +1 -1
- package/lib/commonjs/store/apis/getReactions.js +2 -2
- package/lib/commonjs/store/apis/getReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js +6 -3
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getReads.js +2 -2
- package/lib/commonjs/store/apis/getReads.js.map +1 -1
- package/lib/commonjs/store/apis/insertReaction.js +3 -3
- package/lib/commonjs/store/apis/insertReaction.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +3 -3
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js +3 -3
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js +3 -3
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/updateMessage.js +4 -4
- package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updateReaction.js +3 -3
- package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
- package/lib/commonjs/store/apis/upsertAppSettings.js +3 -3
- package/lib/commonjs/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelData.js +3 -3
- package/lib/commonjs/store/apis/upsertChannelData.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js +2 -2
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannels.js +3 -3
- package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
- package/lib/commonjs/store/apis/upsertCidsForQuery.js +3 -3
- package/lib/commonjs/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMembers.js +3 -3
- package/lib/commonjs/store/apis/upsertMembers.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMessages.js +3 -3
- package/lib/commonjs/store/apis/upsertMessages.js.map +1 -1
- package/lib/commonjs/store/apis/upsertReads.js +3 -3
- package/lib/commonjs/store/apis/upsertReads.js.map +1 -1
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js +3 -3
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/commonjs/utils/DBSyncManager.js +4 -4
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +5 -3
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +1 -1
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +6 -6
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +5 -5
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +29 -22
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +8 -8
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +7 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +3 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +3 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +4 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +2 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +2 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +3 -3
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +4 -0
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +4 -0
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +298 -429
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +0 -2
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +26 -10
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +0 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +8 -18
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +2 -9
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +3 -3
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +16 -13
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +58 -96
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +92 -90
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +39 -39
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +221 -221
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +123 -173
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +40 -144
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +0 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +20 -34
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +180 -44
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +234 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js +195 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +4 -16
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +36 -72
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageData.js +38 -0
- package/lib/module/components/Message/hooks/useMessageData.js.map +1 -0
- package/lib/module/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js +4 -6
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +1 -2
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +1 -2
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js +42 -60
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -3
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageActionList.js +35 -0
- package/lib/module/components/MessageMenu/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageActionListItem.js +60 -0
- package/lib/module/components/MessageMenu/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageMenu.js +70 -0
- package/lib/module/components/MessageMenu/MessageMenu.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageReactionPicker.js +81 -0
- package/lib/module/components/MessageMenu/MessageReactionPicker.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageUserReactions.js +171 -0
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -0
- package/lib/module/components/{MessageOverlay/OverlayReactionsAvatar.js → MessageMenu/MessageUserReactionsAvatar.js} +5 -6
- package/lib/module/components/MessageMenu/MessageUserReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +110 -0
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -0
- package/lib/module/components/MessageMenu/ReactionButton.js +59 -0
- package/lib/module/components/MessageMenu/ReactionButton.js.map +1 -0
- package/lib/module/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.js +2 -0
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +1 -0
- package/lib/module/components/ProgressControl/ProgressControl.js +21 -28
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/ProgressControl/WaveProgressBar.js +22 -27
- package/lib/module/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +6 -2
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +152 -0
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -0
- package/lib/module/components/{ImageBackground.js → UIComponents/ImageBackground.js} +1 -1
- package/lib/module/components/UIComponents/ImageBackground.js.map +1 -0
- package/lib/{commonjs/components/Spinner → module/components/UIComponents}/Spinner.js +1 -1
- package/lib/module/components/UIComponents/Spinner.js.map +1 -0
- package/lib/module/components/UIComponents/index.js +37 -0
- package/lib/module/components/UIComponents/index.js.map +1 -0
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +56 -45
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -13
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -11
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +1 -11
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +1 -11
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +1 -11
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/chatConfigContext/ChatConfigContext.js +33 -0
- package/lib/module/contexts/chatConfigContext/ChatConfigContext.js.map +1 -0
- package/lib/module/contexts/chatContext/ChatContext.js +1 -11
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -11
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/index.js +11 -11
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -11
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +1 -11
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +4 -14
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +1 -11
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -14
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +18 -54
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -11
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +1 -11
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +68 -50
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +1 -11
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +1 -11
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +1 -11
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +1 -4
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/icons/PinHeader.js +17 -6
- package/lib/module/icons/PinHeader.js.map +1 -1
- package/lib/module/index.js +4 -23
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock-builders/DB/mock.js +79 -82
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/native.js +36 -25
- package/lib/module/native.js.map +1 -1
- package/lib/module/store/SqliteClient.js +179 -0
- package/lib/module/store/SqliteClient.js.map +1 -0
- package/lib/module/store/apis/addPendingTask.js +5 -5
- package/lib/module/store/apis/addPendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteChannel.js +3 -3
- package/lib/module/store/apis/deleteChannel.js.map +1 -1
- package/lib/module/store/apis/deleteMember.js +3 -3
- package/lib/module/store/apis/deleteMember.js.map +1 -1
- package/lib/module/store/apis/deleteMessage.js +3 -3
- package/lib/module/store/apis/deleteMessage.js.map +1 -1
- package/lib/module/store/apis/deleteMessagesForChannel.js +3 -3
- package/lib/module/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/module/store/apis/deletePendingTask.js +3 -3
- package/lib/module/store/apis/deletePendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteReaction.js +3 -3
- package/lib/module/store/apis/deleteReaction.js.map +1 -1
- package/lib/module/store/apis/deleteReactions.js +2 -2
- package/lib/module/store/apis/deleteReactions.js.map +1 -1
- package/lib/module/store/apis/getAllChannelIds.js +2 -2
- package/lib/module/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/module/store/apis/getAppSettings.js +3 -3
- package/lib/module/store/apis/getAppSettings.js.map +1 -1
- package/lib/module/store/apis/getChannelMessages.js +2 -2
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +2 -2
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +2 -2
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/getLastSyncedAt.js +3 -3
- package/lib/module/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/module/store/apis/getMembers.js +2 -2
- package/lib/module/store/apis/getMembers.js.map +1 -1
- package/lib/module/store/apis/getPendingTasks.js +3 -3
- package/lib/module/store/apis/getPendingTasks.js.map +1 -1
- package/lib/module/store/apis/getReactions.js +2 -2
- package/lib/module/store/apis/getReactions.js.map +1 -1
- package/lib/module/store/apis/getReactionsforFilterSort.js +6 -3
- package/lib/module/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/module/store/apis/getReads.js +2 -2
- package/lib/module/store/apis/getReads.js.map +1 -1
- package/lib/module/store/apis/insertReaction.js +3 -3
- package/lib/module/store/apis/insertReaction.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +3 -3
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannels.js +3 -3
- package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMembersForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMessagesForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectReactionsForMessages.js +3 -3
- package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/module/store/apis/queries/selectReadsForChannels.js +3 -3
- package/lib/module/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/module/store/apis/updateMessage.js +4 -4
- package/lib/module/store/apis/updateMessage.js.map +1 -1
- package/lib/module/store/apis/updateReaction.js +3 -3
- package/lib/module/store/apis/updateReaction.js.map +1 -1
- package/lib/module/store/apis/upsertAppSettings.js +3 -3
- package/lib/module/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/module/store/apis/upsertChannelData.js +3 -3
- package/lib/module/store/apis/upsertChannelData.js.map +1 -1
- package/lib/module/store/apis/upsertChannelDataFromChannel.js +2 -2
- package/lib/module/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/module/store/apis/upsertChannels.js +3 -3
- package/lib/module/store/apis/upsertChannels.js.map +1 -1
- package/lib/module/store/apis/upsertCidsForQuery.js +3 -3
- package/lib/module/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/module/store/apis/upsertMembers.js +3 -3
- package/lib/module/store/apis/upsertMembers.js.map +1 -1
- package/lib/module/store/apis/upsertMessages.js +3 -3
- package/lib/module/store/apis/upsertMessages.js.map +1 -1
- package/lib/module/store/apis/upsertReads.js +3 -3
- package/lib/module/store/apis/upsertReads.js.map +1 -1
- package/lib/module/store/apis/upsertUserSyncStatus.js +3 -3
- package/lib/module/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/module/utils/DBSyncManager.js +4 -4
- package/lib/module/utils/DBSyncManager.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +5 -3
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +2 -2
- package/lib/typescript/components/Attachment/Card.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +4 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts +2 -2
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/GroupAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +0 -12
- package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +1 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +4 -5
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +4 -40
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +11 -5
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +2 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +1 -2
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts +12 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts.map +1 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts +20 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts.map +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +5 -6
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts +12 -0
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts.map +1 -0
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts +11 -3
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts.map +1 -1
- package/lib/typescript/components/Message/utils/messageActions.d.ts +6 -14
- package/lib/typescript/components/Message/utils/messageActions.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts +16 -0
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +1 -0
- package/lib/typescript/components/{MessageOverlay → MessageMenu}/MessageActionListItem.d.ts +2 -8
- package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts +32 -0
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts +30 -0
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts +21 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts +11 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts +16 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts +25 -0
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +1 -0
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +21 -0
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/ImageBackground.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/index.d.ts +4 -0
- package/lib/typescript/components/UIComponents/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +11 -10
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +0 -11
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts.map +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +1 -11
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +1 -25
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +1 -11
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +1 -11
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts +16 -0
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts.map +1 -0
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +1 -15
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +0 -10
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
- package/lib/typescript/contexts/index.d.ts +1 -1
- package/lib/typescript/contexts/index.d.ts.map +1 -1
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +0 -11
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +21 -56
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +77 -37
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +2 -27
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +1 -11
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +1 -11
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +61 -44
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +1 -11
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts.map +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +0 -11
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +1 -11
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts.map +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts.map +1 -1
- package/lib/typescript/icons/PinHeader.d.ts +5 -1
- package/lib/typescript/icons/PinHeader.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/native.d.ts +9 -11
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/store/{QuickSqliteClient.d.ts → SqliteClient.d.ts} +6 -5
- package/lib/typescript/store/SqliteClient.d.ts.map +1 -0
- package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +6 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/getResizedImageUrl.d.ts +3 -2
- package/lib/typescript/utils/getResizedImageUrl.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/__tests__/offline-support/offline-feature.js +5 -5
- package/src/__tests__/offline-support/optimistic-update.js +4 -4
- package/src/components/Attachment/Attachment.tsx +2 -2
- package/src/components/Attachment/Card.tsx +10 -10
- package/src/components/Attachment/FileAttachment.tsx +8 -16
- package/src/components/Attachment/FileAttachmentGroup.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +20 -17
- package/src/components/Attachment/Giphy.tsx +14 -14
- package/src/components/Attachment/__tests__/Attachment.test.js +4 -2
- package/src/components/Attachment/__tests__/Gallery.test.js +0 -2
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +10 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +4 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +6 -1
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +13 -6
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -1
- package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx +2 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +1 -1
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +1 -1
- package/src/components/Avatar/Avatar.tsx +3 -0
- package/src/components/Avatar/GroupAvatar.tsx +4 -0
- package/src/components/Channel/Channel.tsx +56 -132
- package/src/components/Channel/__tests__/ownCapabilities.test.js +57 -57
- package/src/components/Channel/hooks/useCreateChannelContext.ts +0 -2
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -6
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +26 -10
- package/src/components/ChannelList/ChannelList.tsx +0 -17
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +1 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +5 -5
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +2 -11
- package/src/components/Chat/Chat.tsx +3 -9
- package/src/components/Chat/__tests__/Chat.test.js +184 -179
- package/src/components/Chat/hooks/handleEventToSyncDB.ts +3 -3
- package/src/components/Chat/hooks/useCreateChatContext.ts +0 -2
- package/src/components/Chat/hooks/useIsOnline.ts +13 -10
- package/src/components/ImageGallery/ImageGallery.tsx +71 -121
- package/src/components/ImageGallery/__tests__/AnimatedVideoGallery.test.tsx +0 -11
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +3 -4
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +3 -5
- package/src/components/ImageGallery/__tests__/ImageGalleryGrid.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryGridHandle.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +3 -5
- package/src/components/ImageGallery/__tests__/ImageGalleryOverlay.test.tsx +0 -3
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +5 -5
- package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +9 -9
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +97 -86
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +46 -44
- package/src/components/ImageGallery/components/ImageGalleryOverlay.tsx +2 -1
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +3 -4
- package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +481 -466
- package/src/components/Indicators/LoadingIndicator.tsx +1 -1
- package/src/components/Message/Message.tsx +112 -202
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -0
- package/src/components/Message/MessageSimple/MessageContent.tsx +28 -155
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +1 -1
- package/src/components/Message/MessageSimple/MessageFooter.tsx +1 -1
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +21 -66
- package/src/components/Message/MessageSimple/MessageSimple.tsx +247 -55
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +3 -4
- package/src/components/Message/MessageSimple/ReactionList/ReactionListBottom.tsx +295 -0
- package/src/components/Message/MessageSimple/ReactionList/ReactionListTop.tsx +271 -0
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +1 -2
- package/src/components/Message/MessageSimple/__tests__/MessageSimple.test.js +208 -0
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.tsx +3 -3
- package/src/components/Message/MessageSimple/__tests__/ReactionListBottom.test.js +166 -0
- package/src/components/Message/MessageSimple/__tests__/ReactionListTop.test.js +92 -0
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +23 -19
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -16
- package/src/components/Message/hooks/useMessageActions.tsx +48 -68
- package/src/components/Message/hooks/useMessageData.ts +59 -0
- package/src/components/Message/hooks/useProcessReactions.ts +17 -10
- package/src/components/Message/utils/messageActions.ts +10 -20
- package/src/components/MessageInput/FileUploadPreview.tsx +2 -2
- package/src/components/MessageInput/MessageInput.tsx +0 -1
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +1 -4
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +1 -4
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +3 -5
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +7 -1
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.tsx +0 -1
- package/src/components/MessageInput/hooks/useAudioController.tsx +0 -3
- package/src/components/MessageList/MessageList.tsx +1 -1
- package/src/components/MessageList/__tests__/MessageList.test.js +0 -21
- package/src/components/MessageMenu/MessageActionList.tsx +49 -0
- package/src/components/MessageMenu/MessageActionListItem.tsx +86 -0
- package/src/components/MessageMenu/MessageMenu.tsx +123 -0
- package/src/components/MessageMenu/MessageReactionPicker.tsx +122 -0
- package/src/components/MessageMenu/MessageUserReactions.tsx +209 -0
- package/src/components/{MessageOverlay/OverlayReactionsAvatar.tsx → MessageMenu/MessageUserReactionsAvatar.tsx} +6 -6
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +130 -0
- package/src/components/MessageMenu/ReactionButton.tsx +72 -0
- package/src/components/MessageMenu/__tests__/MessageActionList.test.tsx +48 -0
- package/src/components/MessageMenu/__tests__/MessageActionListItem.test.tsx +48 -0
- package/src/components/MessageMenu/__tests__/MessageReactionPicker.test.tsx +101 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +186 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactionsAvatar.test.tsx +35 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactionsItem.test.tsx +81 -0
- package/src/components/MessageMenu/__tests__/ReactionButton.test.tsx +77 -0
- package/src/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.ts +2 -0
- package/src/components/ProgressControl/ProgressControl.tsx +28 -38
- package/src/components/ProgressControl/WaveProgressBar.tsx +29 -37
- package/src/components/Reply/Reply.tsx +5 -2
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +908 -801
- package/src/components/UIComponents/BottomSheetModal.tsx +170 -0
- package/src/components/UIComponents/index.ts +3 -0
- package/src/components/docs/data.js +13 -27
- package/src/components/index.ts +11 -10
- package/src/contexts/__tests__/index.test.tsx +0 -5
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +0 -27
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -29
- package/src/contexts/channelContext/ChannelContext.tsx +2 -46
- package/src/contexts/channelsContext/ChannelsContext.tsx +1 -28
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +1 -30
- package/src/contexts/chatConfigContext/ChatConfigContext.tsx +33 -0
- package/src/contexts/chatContext/ChatContext.tsx +1 -30
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +0 -29
- package/src/contexts/index.ts +1 -1
- package/src/contexts/keyboardContext/KeyboardContext.tsx +0 -30
- package/src/contexts/messageContext/MessageContext.tsx +22 -75
- package/src/contexts/messageInputContext/MessageInputContext.tsx +11 -37
- package/src/contexts/messageInputContext/__tests__/isValidMessage.test.tsx +2 -3
- package/src/contexts/messageInputContext/__tests__/uploadFile.test.tsx +1 -2
- package/src/contexts/messageInputContext/__tests__/uploadImage.test.tsx +1 -2
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +1 -5
- package/src/contexts/messagesContext/MessagesContext.tsx +83 -56
- package/src/contexts/overlayContext/OverlayContext.tsx +2 -55
- package/src/contexts/overlayContext/OverlayProvider.tsx +23 -64
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +1 -30
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +1 -30
- package/src/contexts/themeContext/utils/theme.ts +126 -93
- package/src/contexts/threadContext/ThreadContext.tsx +1 -28
- package/src/contexts/translationContext/TranslationContext.tsx +0 -29
- package/src/contexts/typingContext/TypingContext.tsx +1 -28
- package/src/hooks/__tests__/useTranslatedMessage.test.tsx +3 -9
- package/src/hooks/useTranslatedMessage.ts +1 -4
- package/src/icons/PinHeader.tsx +13 -7
- package/src/index.ts +2 -3
- package/src/mock-builders/DB/mock.ts +82 -84
- package/src/native.ts +15 -26
- package/src/store/{QuickSqliteClient.ts → SqliteClient.ts} +74 -54
- package/src/store/apis/addPendingTask.ts +5 -5
- package/src/store/apis/deleteChannel.ts +3 -3
- package/src/store/apis/deleteMember.ts +3 -3
- package/src/store/apis/deleteMessage.ts +3 -3
- package/src/store/apis/deleteMessagesForChannel.ts +3 -3
- package/src/store/apis/deletePendingTask.ts +3 -3
- package/src/store/apis/deleteReaction.ts +3 -3
- package/src/store/apis/deleteReactions.ts +2 -2
- package/src/store/apis/getAllChannelIds.ts +2 -2
- package/src/store/apis/getAppSettings.ts +3 -3
- package/src/store/apis/getChannelMessages.ts +2 -2
- package/src/store/apis/getChannels.ts +2 -2
- package/src/store/apis/getChannelsForFilterSort.ts +2 -2
- package/src/store/apis/getLastSyncedAt.ts +3 -3
- package/src/store/apis/getMembers.ts +2 -2
- package/src/store/apis/getPendingTasks.ts +3 -3
- package/src/store/apis/getReactions.ts +2 -2
- package/src/store/apis/getReactionsforFilterSort.ts +5 -3
- package/src/store/apis/getReads.ts +2 -2
- package/src/store/apis/insertReaction.ts +3 -3
- package/src/store/apis/queries/selectChannelIdsForFilterSort.ts +3 -3
- package/src/store/apis/queries/selectChannels.ts +3 -3
- package/src/store/apis/queries/selectMembersForChannels.ts +3 -3
- package/src/store/apis/queries/selectMessagesForChannels.ts +4 -4
- package/src/store/apis/queries/selectReactionsForMessages.ts +3 -3
- package/src/store/apis/queries/selectReadsForChannels.ts +4 -4
- package/src/store/apis/updateMessage.ts +4 -4
- package/src/store/apis/updateReaction.ts +3 -3
- package/src/store/apis/upsertAppSettings.ts +3 -3
- package/src/store/apis/upsertChannelData.ts +3 -3
- package/src/store/apis/upsertChannelDataFromChannel.ts +2 -2
- package/src/store/apis/upsertChannels.ts +3 -3
- package/src/store/apis/upsertCidsForQuery.ts +3 -3
- package/src/store/apis/upsertMembers.ts +3 -3
- package/src/store/apis/upsertMessages.ts +3 -3
- package/src/store/apis/upsertReads.ts +3 -3
- package/src/store/apis/upsertUserSyncStatus.ts +3 -3
- package/src/types/types.ts +7 -0
- package/src/utils/DBSyncManager.ts +4 -4
- package/src/utils/__tests__/getResizedImageUrl.test.ts +1 -2
- package/src/utils/getResizedImageUrl.ts +7 -5
- package/src/version.json +1 -1
- package/lib/commonjs/components/ImageBackground.js.map +0 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +0 -305
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +0 -112
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +0 -87
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +0 -442
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +0 -24
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +0 -305
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +0 -188
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js +0 -166
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +0 -34
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +0 -1
- package/lib/commonjs/components/Spinner/Spinner.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +0 -45
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +0 -27
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +0 -67
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +0 -1
- package/lib/commonjs/store/QuickSqliteClient.js +0 -158
- package/lib/commonjs/store/QuickSqliteClient.js.map +0 -1
- package/lib/commonjs/utils/StreamChatRN.js +0 -25
- package/lib/commonjs/utils/StreamChatRN.js.map +0 -1
- package/lib/module/components/ImageBackground.js.map +0 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +0 -305
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +0 -112
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +0 -87
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +0 -442
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +0 -24
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +0 -305
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +0 -188
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js +0 -166
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js.map +0 -1
- package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js.map +0 -1
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +0 -34
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +0 -1
- package/lib/module/components/Spinner/Spinner.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +0 -45
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +0 -27
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +0 -67
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +0 -1
- package/lib/module/store/QuickSqliteClient.js +0 -158
- package/lib/module/store/QuickSqliteClient.js.map +0 -1
- package/lib/module/utils/StreamChatRN.js +0 -25
- package/lib/module/utils/StreamChatRN.js.map +0 -1
- package/lib/typescript/components/ImageBackground.d.ts.map +0 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +0 -32
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +0 -14
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +0 -15
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +0 -8
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +0 -36
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +0 -29
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts.map +0 -1
- package/lib/typescript/components/Spinner/Spinner.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +0 -79
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +0 -13
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +0 -2
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts.map +0 -1
- package/lib/typescript/store/QuickSqliteClient.d.ts.map +0 -1
- package/lib/typescript/utils/StreamChatRN.d.ts +0 -23
- package/lib/typescript/utils/StreamChatRN.d.ts.map +0 -1
- package/src/components/Message/MessageSimple/ReactionList.tsx +0 -398
- package/src/components/MessageOverlay/MessageActionList.tsx +0 -171
- package/src/components/MessageOverlay/MessageActionListItem.tsx +0 -144
- package/src/components/MessageOverlay/MessageOverlay.tsx +0 -627
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +0 -18
- package/src/components/MessageOverlay/OverlayReactionList.tsx +0 -447
- package/src/components/MessageOverlay/OverlayReactions.tsx +0 -250
- package/src/components/MessageOverlay/OverlayReactionsItem.tsx +0 -188
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +0 -44
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +0 -147
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +0 -48
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +0 -22
- package/src/utils/StreamChatRN.ts +0 -27
- /package/lib/typescript/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.d.ts +0 -0
- /package/lib/typescript/components/{ImageBackground.d.ts → UIComponents/ImageBackground.d.ts} +0 -0
- /package/lib/typescript/components/{Spinner → UIComponents}/Spinner.d.ts +0 -0
- /package/src/components/{ImageBackground.tsx → UIComponents/ImageBackground.tsx} +0 -0
- /package/src/components/{Spinner → UIComponents}/Spinner.tsx +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { PressableProps } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import type { Attachment, ChannelState, MessageResponse } from 'stream-chat';
|
|
6
6
|
|
|
@@ -17,8 +17,8 @@ import type { ImageLoadingFailedIndicatorProps } from '../../components/Attachme
|
|
|
17
17
|
import type { ImageLoadingIndicatorProps } from '../../components/Attachment/ImageLoadingIndicator';
|
|
18
18
|
import type { VideoThumbnailProps } from '../../components/Attachment/VideoThumbnail';
|
|
19
19
|
import type {
|
|
20
|
+
MessagePressableHandlerPayload,
|
|
20
21
|
MessageProps,
|
|
21
|
-
MessageTouchableHandlerPayload,
|
|
22
22
|
} from '../../components/Message/Message';
|
|
23
23
|
import type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';
|
|
24
24
|
import type { MessageBounceProps } from '../../components/Message/MessageSimple/MessageBounce';
|
|
@@ -34,7 +34,8 @@ import type { MessageSimpleProps } from '../../components/Message/MessageSimple/
|
|
|
34
34
|
import type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';
|
|
35
35
|
import type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';
|
|
36
36
|
import { MessageTimestampProps } from '../../components/Message/MessageSimple/MessageTimestamp';
|
|
37
|
-
import
|
|
37
|
+
import { ReactionListBottomProps } from '../../components/Message/MessageSimple/ReactionList/ReactionListBottom';
|
|
38
|
+
import type { ReactionListTopProps } from '../../components/Message/MessageSimple/ReactionList/ReactionListTop';
|
|
38
39
|
import type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';
|
|
39
40
|
import type { MessageActionsParams } from '../../components/Message/utils/messageActions';
|
|
40
41
|
import type { DateHeaderProps } from '../../components/MessageList/DateHeader';
|
|
@@ -45,11 +46,19 @@ import type { MessageSystemProps } from '../../components/MessageList/MessageSys
|
|
|
45
46
|
import type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';
|
|
46
47
|
import { TypingIndicatorContainerProps } from '../../components/MessageList/TypingIndicatorContainer';
|
|
47
48
|
import type { getGroupStyles } from '../../components/MessageList/utils/getGroupStyles';
|
|
48
|
-
import
|
|
49
|
-
import type {
|
|
49
|
+
import { MessageActionListProps } from '../../components/MessageMenu/MessageActionList';
|
|
50
|
+
import type {
|
|
51
|
+
MessageActionListItemProps,
|
|
52
|
+
MessageActionType,
|
|
53
|
+
} from '../../components/MessageMenu/MessageActionListItem';
|
|
54
|
+
import { MessageMenuProps } from '../../components/MessageMenu/MessageMenu';
|
|
55
|
+
import type { MessageReactionPickerProps } from '../../components/MessageMenu/MessageReactionPicker';
|
|
56
|
+
import { MessageUserReactionsProps } from '../../components/MessageMenu/MessageUserReactions';
|
|
57
|
+
import { MessageUserReactionsAvatarProps } from '../../components/MessageMenu/MessageUserReactionsAvatar';
|
|
58
|
+
import { MessageUserReactionsItemProps } from '../../components/MessageMenu/MessageUserReactionsItem';
|
|
50
59
|
import type { ReplyProps } from '../../components/Reply/Reply';
|
|
51
|
-
import
|
|
52
|
-
import type { DefaultStreamChatGenerics
|
|
60
|
+
import { FlatList } from '../../native';
|
|
61
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
53
62
|
import type { ReactionData } from '../../utils/utils';
|
|
54
63
|
import type { Alignment } from '../messageContext/MessageContext';
|
|
55
64
|
import type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';
|
|
@@ -57,7 +66,6 @@ import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
|
57
66
|
import type { Theme } from '../themeContext/utils/theme';
|
|
58
67
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
59
68
|
|
|
60
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
61
69
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
62
70
|
|
|
63
71
|
export type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';
|
|
@@ -111,7 +119,7 @@ export type MessagesContextValue<
|
|
|
111
119
|
* Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx
|
|
112
120
|
*/
|
|
113
121
|
FileAttachmentIcon: React.ComponentType<FileIconProps>;
|
|
114
|
-
FlatList: typeof FlatList;
|
|
122
|
+
FlatList: typeof FlatList | undefined;
|
|
115
123
|
/**
|
|
116
124
|
* UI component to display image attachments
|
|
117
125
|
* Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)
|
|
@@ -153,6 +161,18 @@ export type MessagesContextValue<
|
|
|
153
161
|
InlineUnreadIndicator: React.ComponentType;
|
|
154
162
|
|
|
155
163
|
Message: React.ComponentType<MessageProps<StreamChatGenerics>>;
|
|
164
|
+
/**
|
|
165
|
+
* Custom UI component for rendering Message actions in message menu.
|
|
166
|
+
*
|
|
167
|
+
* **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageMenu/MessageActionList.tsx)
|
|
168
|
+
*/
|
|
169
|
+
MessageActionList: React.ComponentType<MessageActionListProps>;
|
|
170
|
+
/**
|
|
171
|
+
* Custom UI component for rendering Message action item in message menu.
|
|
172
|
+
*
|
|
173
|
+
* **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageMenu/MessageActionList.tsx)
|
|
174
|
+
*/
|
|
175
|
+
MessageActionListItem: React.ComponentType<MessageActionListItemProps>;
|
|
156
176
|
/**
|
|
157
177
|
* UI component for MessageAvatar
|
|
158
178
|
* Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)
|
|
@@ -188,11 +208,18 @@ export type MessagesContextValue<
|
|
|
188
208
|
*/
|
|
189
209
|
MessageFooter: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;
|
|
190
210
|
MessageList: React.ComponentType<MessageListProps<StreamChatGenerics>>;
|
|
211
|
+
/**
|
|
212
|
+
* UI component for MessageMenu
|
|
213
|
+
*/
|
|
214
|
+
MessageMenu: React.ComponentType<MessageMenuProps<StreamChatGenerics>>;
|
|
191
215
|
/**
|
|
192
216
|
* Custom message pinned component
|
|
193
217
|
*/
|
|
194
218
|
MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;
|
|
195
|
-
|
|
219
|
+
/**
|
|
220
|
+
* UI component for MessageReactionPicker
|
|
221
|
+
*/
|
|
222
|
+
MessageReactionPicker: React.ComponentType<MessageReactionPickerProps<StreamChatGenerics>>;
|
|
196
223
|
/**
|
|
197
224
|
* UI component for MessageReplies
|
|
198
225
|
* Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)
|
|
@@ -224,14 +251,24 @@ export type MessagesContextValue<
|
|
|
224
251
|
*/
|
|
225
252
|
MessageTimestamp: React.ComponentType<MessageTimestampProps>;
|
|
226
253
|
/**
|
|
227
|
-
* UI component for
|
|
254
|
+
* Custom UI component for rendering user reactions, in message menu.
|
|
255
|
+
*
|
|
256
|
+
* **Default** [MessageUserReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageMenu/MessageUserReactions.tsx)
|
|
228
257
|
*/
|
|
229
|
-
|
|
258
|
+
MessageUserReactions: React.ComponentType<MessageUserReactionsProps<StreamChatGenerics>>;
|
|
230
259
|
/**
|
|
231
|
-
* UI component for
|
|
232
|
-
*
|
|
260
|
+
* Custom UI component for rendering user reactions avatar under `MessageUserReactionsItem`, in message menu.
|
|
261
|
+
*
|
|
262
|
+
* **Default** [MessageUserReactionsAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageMenu/MessageUserReactionsAvatar.tsx)
|
|
263
|
+
*/
|
|
264
|
+
MessageUserReactionsAvatar: React.ComponentType<MessageUserReactionsAvatarProps>;
|
|
265
|
+
/**
|
|
266
|
+
* Custom UI component for rendering individual user reactions item under `MessageUserReactions`, in message menu.
|
|
267
|
+
*
|
|
268
|
+
* **Default** [MessageUserReactionsItem](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageMenu/MessageUserReactionsItem.tsx)
|
|
233
269
|
*/
|
|
234
|
-
|
|
270
|
+
MessageUserReactionsItem: React.ComponentType<MessageUserReactionsItemProps>;
|
|
271
|
+
|
|
235
272
|
removeMessage: (message: { id: string; parent_id?: string }) => void;
|
|
236
273
|
/**
|
|
237
274
|
* UI component for Reply
|
|
@@ -249,8 +286,7 @@ export type MessagesContextValue<
|
|
|
249
286
|
ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;
|
|
250
287
|
sendReaction: (type: string, messageId: string) => Promise<void>;
|
|
251
288
|
setEditingState: (message?: MessageType<StreamChatGenerics>) => void;
|
|
252
|
-
setQuotedMessageState: (message
|
|
253
|
-
supportedReactions: ReactionData[];
|
|
289
|
+
setQuotedMessageState: (message?: MessageType<StreamChatGenerics>) => void;
|
|
254
290
|
/**
|
|
255
291
|
* UI component for TypingIndicator
|
|
256
292
|
* Defaults to: [TypingIndicator](https://getstream.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)
|
|
@@ -276,12 +312,12 @@ export type MessagesContextValue<
|
|
|
276
312
|
UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;
|
|
277
313
|
VideoThumbnail: React.ComponentType<VideoThumbnailProps>;
|
|
278
314
|
/**
|
|
279
|
-
* Provide any additional props for `
|
|
280
|
-
* Please check docs for
|
|
315
|
+
* Provide any additional props for `Pressable` which wraps inner MessageContent component here.
|
|
316
|
+
* Please check docs for Pressable for supported props - https://reactnative.dev/docs/pressable#props
|
|
281
317
|
*
|
|
282
318
|
* @overrideType Object
|
|
283
319
|
*/
|
|
284
|
-
|
|
320
|
+
additionalPressableProps?: Omit<PressableProps, 'style'>;
|
|
285
321
|
/**
|
|
286
322
|
* Custom UI component to override default cover (between Header and Footer) of Card component.
|
|
287
323
|
* Accepts the same props as Card component.
|
|
@@ -321,12 +357,6 @@ export type MessagesContextValue<
|
|
|
321
357
|
* @param message
|
|
322
358
|
*/
|
|
323
359
|
handleBan?: (message: MessageType<StreamChatGenerics>) => Promise<void>;
|
|
324
|
-
/**
|
|
325
|
-
* @deprecated
|
|
326
|
-
* Handler to access when a block user action is invoked.
|
|
327
|
-
* @param message
|
|
328
|
-
*/
|
|
329
|
-
handleBlock?: (message: MessageType<StreamChatGenerics>) => Promise<void>;
|
|
330
360
|
/** Handler to access when a copy message action is invoked */
|
|
331
361
|
handleCopy?: (message: MessageType<StreamChatGenerics>) => Promise<void>;
|
|
332
362
|
/** Handler to access when a delete message action is invoked */
|
|
@@ -416,7 +446,10 @@ export type MessagesContextValue<
|
|
|
416
446
|
MessageHeader?: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;
|
|
417
447
|
/** Custom UI component for message text */
|
|
418
448
|
MessageText?: React.ComponentType<MessageTextProps<StreamChatGenerics>>;
|
|
419
|
-
|
|
449
|
+
/**
|
|
450
|
+
* The number of lines of the message text to be displayed
|
|
451
|
+
*/
|
|
452
|
+
messageTextNumberOfLines?: number;
|
|
420
453
|
/**
|
|
421
454
|
* Theme provided only to messages that are the current users
|
|
422
455
|
*/
|
|
@@ -447,7 +480,7 @@ export type MessagesContextValue<
|
|
|
447
480
|
* />
|
|
448
481
|
* ```
|
|
449
482
|
*/
|
|
450
|
-
onLongPressMessage?: (payload:
|
|
483
|
+
onLongPressMessage?: (payload: MessagePressableHandlerPayload<StreamChatGenerics>) => void;
|
|
451
484
|
/**
|
|
452
485
|
* Add onPressIn handler for attachments. You have access to payload of that handler as param:
|
|
453
486
|
*
|
|
@@ -474,7 +507,7 @@ export type MessagesContextValue<
|
|
|
474
507
|
* />
|
|
475
508
|
* ```
|
|
476
509
|
*/
|
|
477
|
-
onPressInMessage?: (payload:
|
|
510
|
+
onPressInMessage?: (payload: MessagePressableHandlerPayload<StreamChatGenerics>) => void;
|
|
478
511
|
/**
|
|
479
512
|
* Override onPress handler for message. You have access to payload of that handler as param:
|
|
480
513
|
*
|
|
@@ -501,7 +534,23 @@ export type MessagesContextValue<
|
|
|
501
534
|
* />
|
|
502
535
|
* ```
|
|
503
536
|
*/
|
|
504
|
-
onPressMessage?: (payload:
|
|
537
|
+
onPressMessage?: (payload: MessagePressableHandlerPayload<StreamChatGenerics>) => void;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* UI component for ReactionListTop
|
|
541
|
+
* Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)
|
|
542
|
+
*/
|
|
543
|
+
ReactionListBottom?: React.ComponentType<ReactionListBottomProps<StreamChatGenerics>>;
|
|
544
|
+
/**
|
|
545
|
+
* The position of the reaction list in the message
|
|
546
|
+
*/
|
|
547
|
+
reactionListPosition?: 'top' | 'bottom';
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* UI component for ReactionListTop
|
|
551
|
+
* Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)
|
|
552
|
+
*/
|
|
553
|
+
ReactionListTop?: React.ComponentType<ReactionListTopProps<StreamChatGenerics>>;
|
|
505
554
|
|
|
506
555
|
/**
|
|
507
556
|
* Full override of the reaction function on Message and Message Overlay
|
|
@@ -516,6 +565,10 @@ export type MessagesContextValue<
|
|
|
516
565
|
* Boolean to enable/disable the message underlay background when there are unread messages in the Message List.
|
|
517
566
|
*/
|
|
518
567
|
shouldShowUnreadUnderlay?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* The supported reactions that the user can use to react to messages.
|
|
570
|
+
*/
|
|
571
|
+
supportedReactions?: ReactionData[];
|
|
519
572
|
|
|
520
573
|
targetedMessage?: string;
|
|
521
574
|
};
|
|
@@ -552,29 +605,3 @@ export const useMessagesContext = <
|
|
|
552
605
|
|
|
553
606
|
return contextValue;
|
|
554
607
|
};
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* @deprecated
|
|
558
|
-
*
|
|
559
|
-
* This will be removed in the next major version.
|
|
560
|
-
*
|
|
561
|
-
* Typescript currently does not support partial inference so if ChatContext
|
|
562
|
-
* typing is desired while using the HOC withMessagesContext the Props for the
|
|
563
|
-
* wrapped component must be provided as the first generic.
|
|
564
|
-
*/
|
|
565
|
-
export const withMessagesContext = <
|
|
566
|
-
P extends UnknownType,
|
|
567
|
-
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
568
|
-
>(
|
|
569
|
-
Component: React.ComponentType<P>,
|
|
570
|
-
): React.ComponentType<Omit<P, keyof MessagesContextValue<StreamChatGenerics>>> => {
|
|
571
|
-
const WithMessagesContextComponent = (
|
|
572
|
-
props: Omit<P, keyof MessagesContextValue<StreamChatGenerics>>,
|
|
573
|
-
) => {
|
|
574
|
-
const messagesContext = useMessagesContext<StreamChatGenerics>();
|
|
575
|
-
|
|
576
|
-
return <Component {...(props as P)} {...messagesContext} />;
|
|
577
|
-
};
|
|
578
|
-
WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;
|
|
579
|
-
return WithMessagesContextComponent;
|
|
580
|
-
};
|
|
@@ -6,19 +6,16 @@ import type { Attachment } from 'stream-chat';
|
|
|
6
6
|
import type { AttachmentPickerProps } from '../../components/AttachmentPicker/AttachmentPicker';
|
|
7
7
|
import type { ImageGalleryCustomComponents } from '../../components/ImageGallery/ImageGallery';
|
|
8
8
|
|
|
9
|
-
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
10
9
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
11
10
|
import type { Streami18n } from '../../utils/i18n/Streami18n';
|
|
12
11
|
import type { AttachmentPickerContextValue } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
13
|
-
import type { MessageOverlayContextValue } from '../messageOverlayContext/MessageOverlayContext';
|
|
14
12
|
import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
15
13
|
import type { Theme } from '../themeContext/utils/theme';
|
|
16
14
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
17
15
|
|
|
18
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
19
16
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
20
17
|
|
|
21
|
-
export type Overlay = 'alert' | 'gallery' | '
|
|
18
|
+
export type Overlay = 'alert' | 'gallery' | 'none';
|
|
22
19
|
|
|
23
20
|
export type OverlayContextValue = {
|
|
24
21
|
overlay: Overlay;
|
|
@@ -48,40 +45,17 @@ export type OverlayProviderProps<
|
|
|
48
45
|
| 'topInset'
|
|
49
46
|
>
|
|
50
47
|
> &
|
|
51
|
-
ImageGalleryCustomComponents<StreamChatGenerics> &
|
|
52
|
-
Partial<
|
|
53
|
-
Pick<
|
|
54
|
-
MessageOverlayContextValue<StreamChatGenerics>,
|
|
55
|
-
| 'MessageActionList'
|
|
56
|
-
| 'MessageActionListItem'
|
|
57
|
-
| 'OverlayReactionList'
|
|
58
|
-
| 'OverlayReactions'
|
|
59
|
-
| 'OverlayReactionsAvatar'
|
|
60
|
-
>
|
|
61
|
-
> & {
|
|
48
|
+
ImageGalleryCustomComponents<StreamChatGenerics> & {
|
|
62
49
|
autoPlayVideo?: boolean;
|
|
63
50
|
/**
|
|
64
51
|
* The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default
|
|
65
52
|
* */
|
|
66
53
|
closePicker?: (ref: React.RefObject<BottomSheetMethods>) => void;
|
|
67
|
-
error?: boolean | Error;
|
|
68
54
|
giphyVersion?: keyof NonNullable<Attachment['giphy']>;
|
|
69
55
|
/** https://github.com/GetStream/stream-chat-react-native/wiki/Internationalization-(i18n) */
|
|
70
56
|
i18nInstance?: Streami18n;
|
|
71
57
|
imageGalleryGridHandleHeight?: number;
|
|
72
58
|
imageGalleryGridSnapPoints?: [string | number, string | number];
|
|
73
|
-
isMyMessage?: boolean;
|
|
74
|
-
isThreadMessage?: boolean;
|
|
75
|
-
message?: MessageType<StreamChatGenerics>;
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated use the following instead:
|
|
78
|
-
* messageActions={(params) => {
|
|
79
|
-
* const actions = messageActions({ ...params, isMessageActionsVisible: false });
|
|
80
|
-
* return actions;
|
|
81
|
-
* }}
|
|
82
|
-
*/
|
|
83
|
-
messageReactions?: boolean;
|
|
84
|
-
messageTextNumberOfLines?: number;
|
|
85
59
|
numberOfImageGalleryGridColumns?: number;
|
|
86
60
|
openPicker?: (ref: React.RefObject<BottomSheetMethods>) => void;
|
|
87
61
|
value?: Partial<OverlayContextValue>;
|
|
@@ -98,30 +72,3 @@ export const useOverlayContext = () => {
|
|
|
98
72
|
|
|
99
73
|
return contextValue;
|
|
100
74
|
};
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated
|
|
104
|
-
*
|
|
105
|
-
* This will be removed in the next major version.
|
|
106
|
-
*
|
|
107
|
-
* Typescript currently does not support partial inference so if ChatContext
|
|
108
|
-
* typing is desired while using the HOC withOverlayContext the Props for the
|
|
109
|
-
* wrapped component must be provided as the first generic.
|
|
110
|
-
*/
|
|
111
|
-
export const withOverlayContext = <
|
|
112
|
-
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
113
|
-
>(
|
|
114
|
-
Component: React.ComponentType<StreamChatGenerics>,
|
|
115
|
-
): React.ComponentType<Omit<StreamChatGenerics, keyof OverlayContextValue>> => {
|
|
116
|
-
const WithOverlayContextComponent = (
|
|
117
|
-
props: Omit<StreamChatGenerics, keyof OverlayContextValue>,
|
|
118
|
-
) => {
|
|
119
|
-
const overlayContext = useOverlayContext();
|
|
120
|
-
|
|
121
|
-
return <Component {...(props as StreamChatGenerics)} {...overlayContext} />;
|
|
122
|
-
};
|
|
123
|
-
WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(
|
|
124
|
-
Component as React.ComponentType,
|
|
125
|
-
)}`;
|
|
126
|
-
return WithOverlayContextComponent;
|
|
127
|
-
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BackHandler
|
|
3
|
+
import { BackHandler } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
cancelAnimation,
|
|
7
|
-
useAnimatedStyle,
|
|
8
|
-
useSharedValue,
|
|
9
|
-
withTiming,
|
|
10
|
-
} from 'react-native-reanimated';
|
|
5
|
+
import { cancelAnimation, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
11
6
|
|
|
12
7
|
import type BottomSheet from '@gorhom/bottom-sheet';
|
|
13
8
|
|
|
@@ -25,8 +20,6 @@ import { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/At
|
|
|
25
20
|
import { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';
|
|
26
21
|
import { ImageSelectorIcon as DefaultImageSelectorIcon } from '../../components/AttachmentPicker/components/ImageSelectorIcon';
|
|
27
22
|
import { ImageGallery } from '../../components/ImageGallery/ImageGallery';
|
|
28
|
-
import { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';
|
|
29
|
-
import { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';
|
|
30
23
|
import { useStreami18n } from '../../hooks/useStreami18n';
|
|
31
24
|
|
|
32
25
|
import { useViewport } from '../../hooks/useViewport';
|
|
@@ -34,7 +27,6 @@ import { isImageMediaLibraryAvailable } from '../../native';
|
|
|
34
27
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
35
28
|
import { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
36
29
|
import { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';
|
|
37
|
-
import { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';
|
|
38
30
|
import { ThemeProvider } from '../themeContext/ThemeContext';
|
|
39
31
|
import {
|
|
40
32
|
DEFAULT_USER_LANGUAGE,
|
|
@@ -107,9 +99,6 @@ export const OverlayProvider = <
|
|
|
107
99
|
imageGalleryGridSnapPoints,
|
|
108
100
|
ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,
|
|
109
101
|
ImageSelectorIcon = DefaultImageSelectorIcon,
|
|
110
|
-
MessageActionList,
|
|
111
|
-
MessageActionListItem,
|
|
112
|
-
messageTextNumberOfLines,
|
|
113
102
|
numberOfAttachmentImagesToLoadPerCall,
|
|
114
103
|
numberOfAttachmentPickerImageColumns,
|
|
115
104
|
numberOfImageGalleryGridColumns,
|
|
@@ -123,9 +112,6 @@ export const OverlayProvider = <
|
|
|
123
112
|
console.warn('bottom and top insets must be set for the image picker to work correctly');
|
|
124
113
|
}
|
|
125
114
|
},
|
|
126
|
-
OverlayReactionList,
|
|
127
|
-
OverlayReactions,
|
|
128
|
-
OverlayReactionsAvatar,
|
|
129
115
|
topInset,
|
|
130
116
|
value,
|
|
131
117
|
} = props;
|
|
@@ -150,7 +136,6 @@ export const OverlayProvider = <
|
|
|
150
136
|
const [overlay, setOverlay] = useState(value?.overlay || 'none');
|
|
151
137
|
|
|
152
138
|
const overlayOpacity = useSharedValue(0);
|
|
153
|
-
const { height, width } = Dimensions.get('screen');
|
|
154
139
|
|
|
155
140
|
// Setup translators
|
|
156
141
|
const translators = useStreami18n(i18nInstance);
|
|
@@ -206,13 +191,6 @@ export const OverlayProvider = <
|
|
|
206
191
|
topInset,
|
|
207
192
|
};
|
|
208
193
|
|
|
209
|
-
const overlayStyle = useAnimatedStyle<ViewStyle>(
|
|
210
|
-
() => ({
|
|
211
|
-
opacity: overlayOpacity.value,
|
|
212
|
-
}),
|
|
213
|
-
[],
|
|
214
|
-
);
|
|
215
|
-
|
|
216
194
|
const overlayContext = {
|
|
217
195
|
overlay,
|
|
218
196
|
setOverlay,
|
|
@@ -222,46 +200,27 @@ export const OverlayProvider = <
|
|
|
222
200
|
return (
|
|
223
201
|
<TranslationProvider value={{ ...translators, userLanguage: DEFAULT_USER_LANGUAGE }}>
|
|
224
202
|
<OverlayContext.Provider value={overlayContext}>
|
|
225
|
-
<
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
)}
|
|
247
|
-
{overlay === 'gallery' && (
|
|
248
|
-
<ImageGallery<StreamChatGenerics>
|
|
249
|
-
autoPlayVideo={autoPlayVideo}
|
|
250
|
-
giphyVersion={giphyVersion}
|
|
251
|
-
imageGalleryCustomComponents={imageGalleryCustomComponents}
|
|
252
|
-
imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}
|
|
253
|
-
imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}
|
|
254
|
-
numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}
|
|
255
|
-
overlayOpacity={overlayOpacity}
|
|
256
|
-
/>
|
|
257
|
-
)}
|
|
258
|
-
{isImageMediaLibraryAvailable() ? (
|
|
259
|
-
<AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />
|
|
260
|
-
) : null}
|
|
261
|
-
</ThemeProvider>
|
|
262
|
-
</ImageGalleryProvider>
|
|
263
|
-
</AttachmentPickerProvider>
|
|
264
|
-
</MessageOverlayProvider>
|
|
203
|
+
<AttachmentPickerProvider value={attachmentPickerContext}>
|
|
204
|
+
<ImageGalleryProvider>
|
|
205
|
+
{children}
|
|
206
|
+
<ThemeProvider style={overlayContext.style}>
|
|
207
|
+
{overlay === 'gallery' && (
|
|
208
|
+
<ImageGallery<StreamChatGenerics>
|
|
209
|
+
autoPlayVideo={autoPlayVideo}
|
|
210
|
+
giphyVersion={giphyVersion}
|
|
211
|
+
imageGalleryCustomComponents={imageGalleryCustomComponents}
|
|
212
|
+
imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}
|
|
213
|
+
imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}
|
|
214
|
+
numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}
|
|
215
|
+
overlayOpacity={overlayOpacity}
|
|
216
|
+
/>
|
|
217
|
+
)}
|
|
218
|
+
{isImageMediaLibraryAvailable() ? (
|
|
219
|
+
<AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />
|
|
220
|
+
) : null}
|
|
221
|
+
</ThemeProvider>
|
|
222
|
+
</ImageGalleryProvider>
|
|
223
|
+
</AttachmentPickerProvider>
|
|
265
224
|
</OverlayContext.Provider>
|
|
266
225
|
</TranslationProvider>
|
|
267
226
|
);
|
|
@@ -2,10 +2,9 @@ import React, { PropsWithChildren, useContext } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { ChannelState } from 'stream-chat';
|
|
4
4
|
|
|
5
|
-
import type { DefaultStreamChatGenerics
|
|
5
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
6
6
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
7
7
|
|
|
8
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
9
8
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
10
9
|
|
|
11
10
|
export type PaginatedMessageListContextValue<
|
|
@@ -83,31 +82,3 @@ export const usePaginatedMessageListContext = <
|
|
|
83
82
|
|
|
84
83
|
return contextValue;
|
|
85
84
|
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated
|
|
89
|
-
*
|
|
90
|
-
* This will be removed in the next major version.
|
|
91
|
-
*
|
|
92
|
-
* Typescript currently does not support partial inference so if ChatContext
|
|
93
|
-
* typing is desired while using the HOC withPaginatedMessageListContext the Props for the
|
|
94
|
-
* wrapped component must be provided as the first generic.
|
|
95
|
-
*/
|
|
96
|
-
export const withPaginatedMessageListContext = <
|
|
97
|
-
P extends UnknownType,
|
|
98
|
-
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
99
|
-
>(
|
|
100
|
-
Component: React.ComponentType<P>,
|
|
101
|
-
): React.ComponentType<Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>> => {
|
|
102
|
-
const WithPaginatedMessageListContextComponent = (
|
|
103
|
-
props: Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>,
|
|
104
|
-
) => {
|
|
105
|
-
const paginatedMessageListContext = usePaginatedMessageListContext<StreamChatGenerics>();
|
|
106
|
-
|
|
107
|
-
return <Component {...(props as P)} {...paginatedMessageListContext} />;
|
|
108
|
-
};
|
|
109
|
-
WithPaginatedMessageListContextComponent.displayName = `WithPaginatedMessageListContext${getDisplayName(
|
|
110
|
-
Component,
|
|
111
|
-
)}`;
|
|
112
|
-
return WithPaginatedMessageListContextComponent;
|
|
113
|
-
};
|
|
@@ -6,10 +6,9 @@ import type { AutoCompleteSuggestionHeaderProps } from '../../components/AutoCom
|
|
|
6
6
|
import type { AutoCompleteSuggestionItemProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionItem';
|
|
7
7
|
import type { AutoCompleteSuggestionListProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionList';
|
|
8
8
|
import type { Emoji } from '../../emoji-data';
|
|
9
|
-
import type { DefaultStreamChatGenerics
|
|
9
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
10
10
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
11
11
|
|
|
12
|
-
import { getDisplayName } from '../utils/getDisplayName';
|
|
13
12
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
14
13
|
|
|
15
14
|
export type SuggestionComponentType = 'command' | 'emoji' | 'mention';
|
|
@@ -148,31 +147,3 @@ export const useSuggestionsContext = <
|
|
|
148
147
|
|
|
149
148
|
return contextValue;
|
|
150
149
|
};
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @deprecated
|
|
154
|
-
*
|
|
155
|
-
* This will be removed in the next major version.
|
|
156
|
-
*
|
|
157
|
-
* Typescript currently does not support partial inference so if ChatContext
|
|
158
|
-
* typing is desired while using the HOC withSuggestionsContext the Props for the
|
|
159
|
-
* wrapped component must be provided as the first generic.
|
|
160
|
-
*/
|
|
161
|
-
export const withSuggestionsContext = <
|
|
162
|
-
P extends UnknownType,
|
|
163
|
-
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
164
|
-
>(
|
|
165
|
-
Component: React.ComponentType<P>,
|
|
166
|
-
): React.ComponentType<Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>> => {
|
|
167
|
-
const WithSuggestionsContextComponent = (
|
|
168
|
-
props: Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>,
|
|
169
|
-
) => {
|
|
170
|
-
const suggestionsContext = useSuggestionsContext<StreamChatGenerics>();
|
|
171
|
-
|
|
172
|
-
return <Component {...(props as P)} {...suggestionsContext} />;
|
|
173
|
-
};
|
|
174
|
-
WithSuggestionsContextComponent.displayName = `WithSuggestionsContext${getDisplayName(
|
|
175
|
-
Component,
|
|
176
|
-
)}`;
|
|
177
|
-
return WithSuggestionsContextComponent;
|
|
178
|
-
};
|