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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Pressable, StyleProp, StyleSheet, Text, TextStyle, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
5
|
+
|
|
6
|
+
export type ActionType =
|
|
7
|
+
| 'banUser'
|
|
8
|
+
| 'blockUser'
|
|
9
|
+
| 'copyMessage'
|
|
10
|
+
| 'deleteMessage'
|
|
11
|
+
| 'editMessage'
|
|
12
|
+
| 'flagMessage'
|
|
13
|
+
| 'muteUser'
|
|
14
|
+
| 'pinMessage'
|
|
15
|
+
| 'selectReaction'
|
|
16
|
+
| 'reply'
|
|
17
|
+
| 'retry'
|
|
18
|
+
| 'quotedReply'
|
|
19
|
+
| 'threadReply'
|
|
20
|
+
| 'unpinMessage';
|
|
21
|
+
|
|
22
|
+
export type MessageActionType = {
|
|
23
|
+
/**
|
|
24
|
+
* Callback when user presses the action button.
|
|
25
|
+
*/
|
|
26
|
+
action: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Type of the action performed.
|
|
29
|
+
* Eg: 'banUser', 'blockUser', 'copyMessage', 'deleteMessage', 'editMessage', 'flagMessage', 'muteUser', 'pinMessage', 'selectReaction', 'reply', 'retry', 'quotedReply', 'threadReply', 'unpinMessage'
|
|
30
|
+
*/
|
|
31
|
+
actionType: ActionType | string;
|
|
32
|
+
/**
|
|
33
|
+
* Title for action button.
|
|
34
|
+
*/
|
|
35
|
+
title: string;
|
|
36
|
+
/**
|
|
37
|
+
* Element to render as icon for action button.
|
|
38
|
+
*/
|
|
39
|
+
icon?: React.ReactElement;
|
|
40
|
+
/**
|
|
41
|
+
* Styles for underlying Text component of action title.
|
|
42
|
+
*/
|
|
43
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* MessageActionListItem - A high-level component that implements all the logic required for a `MessageAction` in a `MessageActionList`
|
|
48
|
+
*/
|
|
49
|
+
export type MessageActionListItemProps = MessageActionType;
|
|
50
|
+
|
|
51
|
+
export const MessageActionListItem = (props: MessageActionListItemProps) => {
|
|
52
|
+
const { action, actionType, icon, title, titleStyle } = props;
|
|
53
|
+
|
|
54
|
+
const {
|
|
55
|
+
theme: {
|
|
56
|
+
colors: { black },
|
|
57
|
+
messageMenu: {
|
|
58
|
+
actionListItem: { container, icon: iconTheme, title: titleTheme },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
} = useTheme();
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Pressable onPress={action} style={({ pressed }) => [{ opacity: pressed ? 0.5 : 1 }]}>
|
|
65
|
+
<View
|
|
66
|
+
accessibilityLabel={`${actionType} action list item`}
|
|
67
|
+
style={[styles.container, container]}
|
|
68
|
+
>
|
|
69
|
+
<View style={iconTheme}>{icon}</View>
|
|
70
|
+
<Text style={[styles.titleStyle, { color: black }, titleStyle, titleTheme]}>{title}</Text>
|
|
71
|
+
</View>
|
|
72
|
+
</Pressable>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
justifyContent: 'flex-start',
|
|
81
|
+
paddingVertical: 8,
|
|
82
|
+
},
|
|
83
|
+
titleStyle: {
|
|
84
|
+
paddingLeft: 16,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useWindowDimensions } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { MessageActionType } from './MessageActionListItem';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
MessageContextValue,
|
|
9
|
+
useMessageContext,
|
|
10
|
+
} from '../../contexts/messageContext/MessageContext';
|
|
11
|
+
import {
|
|
12
|
+
MessagesContextValue,
|
|
13
|
+
useMessagesContext,
|
|
14
|
+
} from '../../contexts/messagesContext/MessagesContext';
|
|
15
|
+
import { DefaultStreamChatGenerics } from '../../types/types';
|
|
16
|
+
import { BottomSheetModal } from '../UIComponents/BottomSheetModal';
|
|
17
|
+
|
|
18
|
+
export type MessageMenuProps<
|
|
19
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
20
|
+
> = Partial<
|
|
21
|
+
Pick<
|
|
22
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
23
|
+
| 'MessageActionList'
|
|
24
|
+
| 'MessageActionListItem'
|
|
25
|
+
| 'MessageReactionPicker'
|
|
26
|
+
| 'MessageUserReactions'
|
|
27
|
+
| 'MessageUserReactionsAvatar'
|
|
28
|
+
| 'MessageUserReactionsItem'
|
|
29
|
+
>
|
|
30
|
+
> &
|
|
31
|
+
Partial<Pick<MessageContextValue<StreamChatGenerics>, 'message'>> & {
|
|
32
|
+
/**
|
|
33
|
+
* Function to close the message actions bottom sheet
|
|
34
|
+
* @returns void
|
|
35
|
+
*/
|
|
36
|
+
dismissOverlay: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* An array of message actions to render
|
|
39
|
+
*/
|
|
40
|
+
messageActions: MessageActionType[];
|
|
41
|
+
/**
|
|
42
|
+
* Boolean to determine if there are message actions
|
|
43
|
+
*/
|
|
44
|
+
showMessageReactions: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Boolean to determine if the overlay is visible.
|
|
47
|
+
*/
|
|
48
|
+
visible: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Function to handle reaction on press
|
|
51
|
+
* @param reactionType
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
handleReaction?: (reactionType: string) => Promise<void>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const MessageMenu = <
|
|
58
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
59
|
+
>(
|
|
60
|
+
props: MessageMenuProps<StreamChatGenerics>,
|
|
61
|
+
) => {
|
|
62
|
+
const {
|
|
63
|
+
dismissOverlay,
|
|
64
|
+
handleReaction,
|
|
65
|
+
message: propMessage,
|
|
66
|
+
MessageActionList: propMessageActionList,
|
|
67
|
+
MessageActionListItem: propMessageActionListItem,
|
|
68
|
+
messageActions,
|
|
69
|
+
MessageReactionPicker: propMessageReactionPicker,
|
|
70
|
+
MessageUserReactions: propMessageUserReactions,
|
|
71
|
+
MessageUserReactionsAvatar: propMessageUserReactionsAvatar,
|
|
72
|
+
MessageUserReactionsItem: propMessageUserReactionsItem,
|
|
73
|
+
showMessageReactions,
|
|
74
|
+
visible,
|
|
75
|
+
} = props;
|
|
76
|
+
const { height } = useWindowDimensions();
|
|
77
|
+
const {
|
|
78
|
+
MessageActionList: contextMessageActionList,
|
|
79
|
+
MessageActionListItem: contextMessageActionListItem,
|
|
80
|
+
MessageReactionPicker: contextMessageReactionPicker,
|
|
81
|
+
MessageUserReactions: contextMessageUserReactions,
|
|
82
|
+
MessageUserReactionsAvatar: contextMessageUserReactionsAvatar,
|
|
83
|
+
MessageUserReactionsItem: contextMessageUserReactionsItem,
|
|
84
|
+
} = useMessagesContext<StreamChatGenerics>();
|
|
85
|
+
const { message: contextMessage } = useMessageContext<StreamChatGenerics>();
|
|
86
|
+
const MessageActionList = propMessageActionList ?? contextMessageActionList;
|
|
87
|
+
const MessageActionListItem = propMessageActionListItem ?? contextMessageActionListItem;
|
|
88
|
+
const MessageReactionPicker = propMessageReactionPicker ?? contextMessageReactionPicker;
|
|
89
|
+
const MessageUserReactions = propMessageUserReactions ?? contextMessageUserReactions;
|
|
90
|
+
const MessageUserReactionsAvatar =
|
|
91
|
+
propMessageUserReactionsAvatar ?? contextMessageUserReactionsAvatar;
|
|
92
|
+
const MessageUserReactionsItem = propMessageUserReactionsItem ?? contextMessageUserReactionsItem;
|
|
93
|
+
const message = propMessage ?? contextMessage;
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<BottomSheetModal
|
|
97
|
+
height={messageActions.length === 0 && !showMessageReactions ? height / 5 : height / 2}
|
|
98
|
+
onClose={dismissOverlay}
|
|
99
|
+
visible={visible}
|
|
100
|
+
>
|
|
101
|
+
{showMessageReactions ? (
|
|
102
|
+
<MessageUserReactions
|
|
103
|
+
message={message}
|
|
104
|
+
MessageUserReactionsAvatar={MessageUserReactionsAvatar}
|
|
105
|
+
MessageUserReactionsItem={MessageUserReactionsItem}
|
|
106
|
+
/>
|
|
107
|
+
) : (
|
|
108
|
+
<>
|
|
109
|
+
<MessageReactionPicker
|
|
110
|
+
dismissOverlay={dismissOverlay}
|
|
111
|
+
handleReaction={handleReaction}
|
|
112
|
+
ownReactionTypes={message?.own_reactions?.map((reaction) => reaction.type) || []}
|
|
113
|
+
/>
|
|
114
|
+
<MessageActionList
|
|
115
|
+
dismissOverlay={dismissOverlay}
|
|
116
|
+
MessageActionListItem={MessageActionListItem}
|
|
117
|
+
messageActions={messageActions}
|
|
118
|
+
/>
|
|
119
|
+
</>
|
|
120
|
+
)}
|
|
121
|
+
</BottomSheetModal>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatList, StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ReactionButton } from './ReactionButton';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
MessagesContextValue,
|
|
8
|
+
useMessagesContext,
|
|
9
|
+
} from '../../contexts/messagesContext/MessagesContext';
|
|
10
|
+
|
|
11
|
+
import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
|
|
12
|
+
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
13
|
+
import { triggerHaptic } from '../../native';
|
|
14
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
15
|
+
import { ReactionData } from '../../utils/utils';
|
|
16
|
+
|
|
17
|
+
export type MessageReactionPickerProps<
|
|
18
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
19
|
+
> = Pick<MessagesContextValue<StreamChatGenerics>, 'supportedReactions'> & {
|
|
20
|
+
/**
|
|
21
|
+
* Function to dismiss the action bottom sheet.
|
|
22
|
+
* @returns void
|
|
23
|
+
*/
|
|
24
|
+
dismissOverlay: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* An array of reaction types that the current user has reacted with
|
|
27
|
+
*/
|
|
28
|
+
ownReactionTypes: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Function to handle reaction on press
|
|
31
|
+
* @param reactionType
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
handleReaction?: (reactionType: string) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ReactionPickerItemType = ReactionData & {
|
|
38
|
+
onSelectReaction: (type: string) => void;
|
|
39
|
+
ownReactionTypes: string[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const renderItem = ({ index, item }: { index: number; item: ReactionPickerItemType }) => (
|
|
43
|
+
<ReactionButton
|
|
44
|
+
Icon={item.Icon}
|
|
45
|
+
key={`${item.type}_${index}`}
|
|
46
|
+
onPress={item.onSelectReaction}
|
|
47
|
+
selected={item.ownReactionTypes.includes(item.type)}
|
|
48
|
+
type={item.type}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* MessageReactionPicker - A high level component which implements all the logic required for a message overlay reaction list
|
|
54
|
+
*/
|
|
55
|
+
export const MessageReactionPicker = <
|
|
56
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
57
|
+
>(
|
|
58
|
+
props: MessageReactionPickerProps<StreamChatGenerics>,
|
|
59
|
+
) => {
|
|
60
|
+
const {
|
|
61
|
+
dismissOverlay,
|
|
62
|
+
handleReaction,
|
|
63
|
+
ownReactionTypes,
|
|
64
|
+
supportedReactions: propSupportedReactions,
|
|
65
|
+
} = props;
|
|
66
|
+
const { supportedReactions: contextSupportedReactions } = useMessagesContext();
|
|
67
|
+
const {
|
|
68
|
+
theme: {
|
|
69
|
+
messageMenu: {
|
|
70
|
+
reactionPicker: { container, contentContainer },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
} = useTheme();
|
|
74
|
+
const own_capabilities = useOwnCapabilitiesContext();
|
|
75
|
+
|
|
76
|
+
const supportedReactions = propSupportedReactions || contextSupportedReactions;
|
|
77
|
+
|
|
78
|
+
const onSelectReaction = (type: string) => {
|
|
79
|
+
triggerHaptic('impactLight');
|
|
80
|
+
if (handleReaction) {
|
|
81
|
+
handleReaction(type);
|
|
82
|
+
}
|
|
83
|
+
dismissOverlay();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
if (!own_capabilities.sendReaction) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const reactions: ReactionPickerItemType[] =
|
|
91
|
+
supportedReactions?.map((reaction) => ({
|
|
92
|
+
...reaction,
|
|
93
|
+
onSelectReaction,
|
|
94
|
+
ownReactionTypes,
|
|
95
|
+
})) ?? [];
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<View
|
|
99
|
+
accessibilityLabel='Reaction Selector on long pressing message'
|
|
100
|
+
style={[styles.container, container]}
|
|
101
|
+
>
|
|
102
|
+
<FlatList
|
|
103
|
+
contentContainerStyle={[styles.contentContainer, contentContainer]}
|
|
104
|
+
data={reactions}
|
|
105
|
+
horizontal
|
|
106
|
+
keyExtractor={(item) => item.type}
|
|
107
|
+
renderItem={renderItem}
|
|
108
|
+
/>
|
|
109
|
+
</View>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const styles = StyleSheet.create({
|
|
114
|
+
container: {
|
|
115
|
+
alignSelf: 'stretch',
|
|
116
|
+
},
|
|
117
|
+
contentContainer: {
|
|
118
|
+
flexGrow: 1,
|
|
119
|
+
justifyContent: 'space-around',
|
|
120
|
+
marginVertical: 8,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { FlatList, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ReactionSortBase } from 'stream-chat';
|
|
5
|
+
|
|
6
|
+
import { useFetchReactions } from './hooks/useFetchReactions';
|
|
7
|
+
import { ReactionButton } from './ReactionButton';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
MessagesContextValue,
|
|
11
|
+
useMessagesContext,
|
|
12
|
+
} from '../../contexts/messagesContext/MessagesContext';
|
|
13
|
+
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
14
|
+
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
15
|
+
import { DefaultStreamChatGenerics, Reaction } from '../../types/types';
|
|
16
|
+
import { ReactionData } from '../../utils/utils';
|
|
17
|
+
import { MessageType } from '../MessageList/hooks/useMessageList';
|
|
18
|
+
|
|
19
|
+
export type MessageUserReactionsProps<
|
|
20
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
21
|
+
> = Partial<
|
|
22
|
+
Pick<
|
|
23
|
+
MessagesContextValue<StreamChatGenerics>,
|
|
24
|
+
'MessageUserReactionsAvatar' | 'MessageUserReactionsItem' | 'supportedReactions'
|
|
25
|
+
>
|
|
26
|
+
> & {
|
|
27
|
+
/**
|
|
28
|
+
* The message object
|
|
29
|
+
*/
|
|
30
|
+
message?: MessageType<StreamChatGenerics>;
|
|
31
|
+
/**
|
|
32
|
+
* An array of reactions
|
|
33
|
+
*/
|
|
34
|
+
reactions?: Reaction[];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const sort: ReactionSortBase = {
|
|
38
|
+
created_at: -1,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type ReactionSelectorItemType = ReactionData & {
|
|
42
|
+
onSelectReaction: (type: string) => void;
|
|
43
|
+
selectedReaction?: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const renderSelectorItem = ({ index, item }: { index: number; item: ReactionSelectorItemType }) => (
|
|
47
|
+
<ReactionButton
|
|
48
|
+
Icon={item.Icon}
|
|
49
|
+
key={`${item.type}_${index}`}
|
|
50
|
+
onPress={item.onSelectReaction}
|
|
51
|
+
selected={item.selectedReaction === item.type}
|
|
52
|
+
type={item.type}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export const MessageUserReactions = (props: MessageUserReactionsProps) => {
|
|
57
|
+
const {
|
|
58
|
+
message,
|
|
59
|
+
MessageUserReactionsAvatar: propMessageUserReactionsAvatar,
|
|
60
|
+
MessageUserReactionsItem: propMessageUserReactionsItem,
|
|
61
|
+
reactions: propReactions,
|
|
62
|
+
supportedReactions: propSupportedReactions,
|
|
63
|
+
} = props;
|
|
64
|
+
const reactionTypes = Object.keys(message?.reaction_groups ?? {});
|
|
65
|
+
const [selectedReaction, setSelectedReaction] = React.useState<string | undefined>(
|
|
66
|
+
reactionTypes[0],
|
|
67
|
+
);
|
|
68
|
+
const {
|
|
69
|
+
MessageUserReactionsAvatar: contextMessageUserReactionsAvatar,
|
|
70
|
+
MessageUserReactionsItem: contextMessageUserReactionsItem,
|
|
71
|
+
supportedReactions: contextSupportedReactions,
|
|
72
|
+
} = useMessagesContext();
|
|
73
|
+
const supportedReactions = propSupportedReactions ?? contextSupportedReactions;
|
|
74
|
+
const MessageUserReactionsAvatar =
|
|
75
|
+
propMessageUserReactionsAvatar ?? contextMessageUserReactionsAvatar;
|
|
76
|
+
const MessageUserReactionsItem = propMessageUserReactionsItem ?? contextMessageUserReactionsItem;
|
|
77
|
+
|
|
78
|
+
const onSelectReaction = (reactionType: string) => {
|
|
79
|
+
setSelectedReaction(reactionType);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const messageReactions = useMemo(
|
|
83
|
+
() =>
|
|
84
|
+
reactionTypes.reduce<ReactionData[]>((acc, reaction) => {
|
|
85
|
+
const reactionData = supportedReactions?.find(
|
|
86
|
+
(supportedReaction) => supportedReaction.type === reaction,
|
|
87
|
+
);
|
|
88
|
+
if (reactionData) {
|
|
89
|
+
acc.push(reactionData);
|
|
90
|
+
}
|
|
91
|
+
return acc;
|
|
92
|
+
}, []),
|
|
93
|
+
[reactionTypes, supportedReactions],
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const {
|
|
97
|
+
loading,
|
|
98
|
+
loadNextPage,
|
|
99
|
+
reactions: fetchedReactions,
|
|
100
|
+
} = useFetchReactions({
|
|
101
|
+
messageId: message?.id,
|
|
102
|
+
reactionType: selectedReaction,
|
|
103
|
+
sort,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const {
|
|
107
|
+
theme: {
|
|
108
|
+
messageMenu: {
|
|
109
|
+
userReactions: {
|
|
110
|
+
container,
|
|
111
|
+
contentContainer,
|
|
112
|
+
flatlistColumnContainer,
|
|
113
|
+
flatlistContainer,
|
|
114
|
+
reactionSelectorContainer,
|
|
115
|
+
reactionsText,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
} = useTheme();
|
|
120
|
+
const { t } = useTranslationContext();
|
|
121
|
+
|
|
122
|
+
const reactions = useMemo(
|
|
123
|
+
() =>
|
|
124
|
+
propReactions ||
|
|
125
|
+
(fetchedReactions.map((reaction) => ({
|
|
126
|
+
id: reaction.user?.id,
|
|
127
|
+
image: reaction.user?.image,
|
|
128
|
+
name: reaction.user?.name,
|
|
129
|
+
type: reaction.type,
|
|
130
|
+
})) as Reaction[]),
|
|
131
|
+
[propReactions, fetchedReactions],
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const renderItem = ({ item }: { item: Reaction }) => (
|
|
135
|
+
<MessageUserReactionsItem
|
|
136
|
+
MessageUserReactionsAvatar={MessageUserReactionsAvatar}
|
|
137
|
+
reaction={item}
|
|
138
|
+
supportedReactions={supportedReactions ?? []}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
const renderHeader = () => (
|
|
143
|
+
<Text style={[styles.reactionsText, reactionsText]}>{t<string>('Message Reactions')}</Text>
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const selectorReactions: ReactionSelectorItemType[] = messageReactions.map((reaction) => ({
|
|
147
|
+
...reaction,
|
|
148
|
+
onSelectReaction,
|
|
149
|
+
selectedReaction,
|
|
150
|
+
}));
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<View
|
|
154
|
+
accessibilityLabel='User Reactions on long press message'
|
|
155
|
+
style={[styles.container, container]}
|
|
156
|
+
>
|
|
157
|
+
<View style={[styles.reactionSelectorContainer, reactionSelectorContainer]}>
|
|
158
|
+
<FlatList
|
|
159
|
+
contentContainerStyle={[styles.contentContainer, contentContainer]}
|
|
160
|
+
data={selectorReactions}
|
|
161
|
+
horizontal
|
|
162
|
+
keyExtractor={(item) => item.type}
|
|
163
|
+
renderItem={renderSelectorItem}
|
|
164
|
+
/>
|
|
165
|
+
</View>
|
|
166
|
+
|
|
167
|
+
{!loading ? (
|
|
168
|
+
<FlatList
|
|
169
|
+
accessibilityLabel='reaction-flat-list'
|
|
170
|
+
columnWrapperStyle={[styles.flatListColumnContainer, flatlistColumnContainer]}
|
|
171
|
+
contentContainerStyle={[styles.flatListContainer, flatlistContainer]}
|
|
172
|
+
data={reactions}
|
|
173
|
+
keyExtractor={(item) => item.id}
|
|
174
|
+
ListHeaderComponent={renderHeader}
|
|
175
|
+
numColumns={4}
|
|
176
|
+
onEndReached={loadNextPage}
|
|
177
|
+
renderItem={renderItem}
|
|
178
|
+
/>
|
|
179
|
+
) : null}
|
|
180
|
+
</View>
|
|
181
|
+
);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const styles = StyleSheet.create({
|
|
185
|
+
container: {
|
|
186
|
+
flex: 1,
|
|
187
|
+
},
|
|
188
|
+
contentContainer: {
|
|
189
|
+
flexGrow: 1,
|
|
190
|
+
justifyContent: 'space-around',
|
|
191
|
+
marginVertical: 16,
|
|
192
|
+
},
|
|
193
|
+
flatListColumnContainer: {
|
|
194
|
+
justifyContent: 'space-evenly',
|
|
195
|
+
},
|
|
196
|
+
flatListContainer: {
|
|
197
|
+
justifyContent: 'center',
|
|
198
|
+
},
|
|
199
|
+
reactionSelectorContainer: {
|
|
200
|
+
flexDirection: 'row',
|
|
201
|
+
justifyContent: 'space-evenly',
|
|
202
|
+
},
|
|
203
|
+
reactionsText: {
|
|
204
|
+
fontSize: 16,
|
|
205
|
+
fontWeight: 'bold',
|
|
206
|
+
marginVertical: 16,
|
|
207
|
+
textAlign: 'center',
|
|
208
|
+
},
|
|
209
|
+
});
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import type { Reaction } from './OverlayReactions';
|
|
4
|
-
|
|
5
3
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
4
|
+
import { Reaction } from '../../types/types';
|
|
6
5
|
import { Avatar, AvatarProps } from '../Avatar/Avatar';
|
|
7
6
|
|
|
8
|
-
export type
|
|
7
|
+
export type MessageUserReactionsAvatarProps = {
|
|
8
|
+
/**
|
|
9
|
+
* The reaction object
|
|
10
|
+
*/
|
|
9
11
|
reaction: Reaction;
|
|
10
12
|
} & Partial<Pick<AvatarProps, 'size'>>;
|
|
11
13
|
|
|
12
|
-
export const
|
|
14
|
+
export const MessageUserReactionsAvatar = (props: MessageUserReactionsAvatarProps) => {
|
|
13
15
|
const {
|
|
14
16
|
reaction: { image, name },
|
|
15
17
|
size,
|
|
@@ -23,5 +25,3 @@ export const OverlayReactionsAvatar = (props: OverlayReactionsAvatarProps) => {
|
|
|
23
25
|
|
|
24
26
|
return <Avatar image={image} name={name} size={size || BASE_AVATAR_SIZE} />;
|
|
25
27
|
};
|
|
26
|
-
|
|
27
|
-
OverlayReactionsAvatar.displayName = 'OverlayReactionsAvatar{overlay{reactionsAvatar}}';
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { useChatContext } from '../../contexts/chatContext/ChatContext';
|
|
6
|
+
import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
|
|
7
|
+
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
8
|
+
import { Unknown } from '../../icons';
|
|
9
|
+
|
|
10
|
+
import type { DefaultStreamChatGenerics, Reaction } from '../../types/types';
|
|
11
|
+
import { ReactionData } from '../../utils/utils';
|
|
12
|
+
|
|
13
|
+
export type MessageUserReactionsItemProps<
|
|
14
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
15
|
+
> = Pick<MessagesContextValue<StreamChatGenerics>, 'MessageUserReactionsAvatar'> & {
|
|
16
|
+
/**
|
|
17
|
+
* The reaction object
|
|
18
|
+
*/
|
|
19
|
+
reaction: Reaction;
|
|
20
|
+
/**
|
|
21
|
+
* An array of supported reactions
|
|
22
|
+
*/
|
|
23
|
+
supportedReactions: ReactionData[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const MessageUserReactionsItem = <
|
|
27
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
28
|
+
>({
|
|
29
|
+
MessageUserReactionsAvatar,
|
|
30
|
+
reaction,
|
|
31
|
+
supportedReactions,
|
|
32
|
+
}: MessageUserReactionsItemProps<StreamChatGenerics>) => {
|
|
33
|
+
const { id, name, type } = reaction;
|
|
34
|
+
const {
|
|
35
|
+
theme: {
|
|
36
|
+
colors: { accent_blue, black, grey, grey_gainsboro, white },
|
|
37
|
+
messageMenu: {
|
|
38
|
+
userReactions: {
|
|
39
|
+
avatarContainer,
|
|
40
|
+
avatarName,
|
|
41
|
+
avatarSize,
|
|
42
|
+
radius,
|
|
43
|
+
reactionBubbleBackground,
|
|
44
|
+
reactionBubbleBorderRadius,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
} = useTheme();
|
|
49
|
+
const { client } = useChatContext();
|
|
50
|
+
const alignment = client.userID && client.userID === id ? 'left' : 'right';
|
|
51
|
+
const x = avatarSize / 2 - (avatarSize / (radius * 4)) * (alignment === 'left' ? 1 : -1);
|
|
52
|
+
const y = avatarSize - radius;
|
|
53
|
+
|
|
54
|
+
const left =
|
|
55
|
+
alignment === 'left'
|
|
56
|
+
? x -
|
|
57
|
+
(Number(reactionBubbleBackground.width || 0) || styles.reactionBubbleBackground.width) +
|
|
58
|
+
radius
|
|
59
|
+
: x - radius;
|
|
60
|
+
const top =
|
|
61
|
+
y -
|
|
62
|
+
radius -
|
|
63
|
+
(Number(reactionBubbleBackground.height || 0) || styles.reactionBubbleBackground.height);
|
|
64
|
+
|
|
65
|
+
const Icon = supportedReactions.find((reaction) => reaction.type === type)?.Icon ?? Unknown;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<View
|
|
69
|
+
accessibilityLabel='Individual User Reaction on long press message'
|
|
70
|
+
style={[styles.avatarContainer, avatarContainer]}
|
|
71
|
+
>
|
|
72
|
+
<View style={styles.avatarInnerContainer}>
|
|
73
|
+
<MessageUserReactionsAvatar reaction={reaction} size={avatarSize} />
|
|
74
|
+
<View
|
|
75
|
+
style={[
|
|
76
|
+
styles.reactionBubbleBackground,
|
|
77
|
+
{
|
|
78
|
+
backgroundColor: grey_gainsboro,
|
|
79
|
+
borderColor: alignment === 'left' ? white : grey_gainsboro,
|
|
80
|
+
borderWidth: radius / 2,
|
|
81
|
+
left,
|
|
82
|
+
top,
|
|
83
|
+
},
|
|
84
|
+
reactionBubbleBackground,
|
|
85
|
+
]}
|
|
86
|
+
>
|
|
87
|
+
<Icon
|
|
88
|
+
height={reactionBubbleBorderRadius / 2}
|
|
89
|
+
pathFill={alignment === 'left' ? accent_blue : grey}
|
|
90
|
+
width={reactionBubbleBorderRadius / 2}
|
|
91
|
+
/>
|
|
92
|
+
</View>
|
|
93
|
+
</View>
|
|
94
|
+
<View style={styles.avatarNameContainer}>
|
|
95
|
+
<Text numberOfLines={2} style={[styles.avatarName, { color: black }, avatarName]}>
|
|
96
|
+
{name}
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
</View>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const styles = StyleSheet.create({
|
|
104
|
+
avatarContainer: {
|
|
105
|
+
marginBottom: 8,
|
|
106
|
+
},
|
|
107
|
+
avatarInnerContainer: {
|
|
108
|
+
alignSelf: 'center',
|
|
109
|
+
},
|
|
110
|
+
avatarName: {
|
|
111
|
+
flex: 1,
|
|
112
|
+
fontSize: 12,
|
|
113
|
+
fontWeight: '700',
|
|
114
|
+
paddingTop: 6,
|
|
115
|
+
textAlign: 'center',
|
|
116
|
+
},
|
|
117
|
+
avatarNameContainer: {
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
flexDirection: 'row',
|
|
120
|
+
flexGrow: 1,
|
|
121
|
+
},
|
|
122
|
+
reactionBubbleBackground: {
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
borderRadius: 24,
|
|
125
|
+
height: 24,
|
|
126
|
+
justifyContent: 'center',
|
|
127
|
+
position: 'absolute',
|
|
128
|
+
width: 24,
|
|
129
|
+
},
|
|
130
|
+
});
|