stream-chat-react-native-core 5.5.1-beta.1 → 5.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Attachment/Attachment.js +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +1 -1
- package/lib/commonjs/components/Attachment/AudioAttachment.js +1 -1
- package/lib/commonjs/components/Attachment/Card.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +20 -4
- package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js +1 -1
- package/lib/commonjs/components/Attachment/VideoThumbnail.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +1 -1
- package/lib/commonjs/components/Channel/Channel.js +537 -155
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +6 -0
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +5 -16
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +112 -42
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
- package/lib/commonjs/components/Chat/Chat.js +17 -21
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -4
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/ImageBackground.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/commonjs/components/Message/Message.js +22 -11
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +15 -13
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +9 -30
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +20 -18
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +1 -1
- package/lib/commonjs/components/MessageInput/CooldownTimer.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +32 -22
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +52 -20
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +40 -28
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +2 -2
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +1 -1
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js +1 -1
- package/lib/commonjs/components/MessageList/DateHeader.js +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +1 -1
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +1 -1
- package/lib/commonjs/components/RTLComponents/WritingDirectionAwareText.js +1 -1
- package/lib/commonjs/components/Reply/Reply.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/Thread/Thread.js +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +1 -1
- package/lib/commonjs/components/index.js +0 -13
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +3 -3
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/debugContext/DebugContext.js +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +23 -14
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +3 -3
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/icons/ArrowRight.js +1 -1
- package/lib/commonjs/icons/AtMentions.js +1 -1
- package/lib/commonjs/icons/Attach.js +1 -1
- package/lib/commonjs/icons/Audio.js +1 -1
- package/lib/commonjs/icons/CSV.js +1 -1
- package/lib/commonjs/icons/Camera.js +1 -1
- package/lib/commonjs/icons/Check.js +1 -1
- package/lib/commonjs/icons/CheckAll.js +1 -1
- package/lib/commonjs/icons/CheckSend.js +1 -1
- package/lib/commonjs/icons/CircleClose.js +1 -1
- package/lib/commonjs/icons/CirclePlus.js +1 -1
- package/lib/commonjs/icons/CircleRight.js +1 -1
- package/lib/commonjs/icons/Close.js +1 -1
- package/lib/commonjs/icons/Copy.js +1 -1
- package/lib/commonjs/icons/CurveLineLeftUp.js +1 -1
- package/lib/commonjs/icons/DOC.js +1 -1
- package/lib/commonjs/icons/DOCX.js +1 -1
- package/lib/commonjs/icons/Delete.js +1 -1
- package/lib/commonjs/icons/Down.js +1 -1
- package/lib/commonjs/icons/DownloadArrow.js +1 -1
- package/lib/commonjs/icons/DownloadCloud.js +1 -1
- package/lib/commonjs/icons/Edit.js +1 -1
- package/lib/commonjs/icons/Error.js +1 -1
- package/lib/commonjs/icons/Eye.js +1 -1
- package/lib/commonjs/icons/Flag.js +1 -1
- package/lib/commonjs/icons/Folder.js +1 -1
- package/lib/commonjs/icons/GenericFile.js +1 -1
- package/lib/commonjs/icons/GiphyIcon.js +1 -1
- package/lib/commonjs/icons/Grid.js +1 -1
- package/lib/commonjs/icons/Group.js +1 -1
- package/lib/commonjs/icons/HTML.js +1 -1
- package/lib/commonjs/icons/Imgur.js +1 -1
- package/lib/commonjs/icons/LOLReaction.js +1 -1
- package/lib/commonjs/icons/Lightning.js +1 -1
- package/lib/commonjs/icons/Link.js +1 -1
- package/lib/commonjs/icons/Loading.js +1 -1
- package/lib/commonjs/icons/Logo.js +1 -1
- package/lib/commonjs/icons/LoveReaction.js +1 -1
- package/lib/commonjs/icons/MD.js +1 -1
- package/lib/commonjs/icons/MailOpen.js +1 -1
- package/lib/commonjs/icons/MenuPointHorizontal.js +1 -1
- package/lib/commonjs/icons/MenuPointVertical.js +1 -1
- package/lib/commonjs/icons/MessageFlag.js +1 -1
- package/lib/commonjs/icons/MessageIcon.js +1 -1
- package/lib/commonjs/icons/Mute.js +1 -1
- package/lib/commonjs/icons/Notification.js +1 -1
- package/lib/commonjs/icons/ODT.js +1 -1
- package/lib/commonjs/icons/PDF.js +1 -1
- package/lib/commonjs/icons/PPT.js +1 -1
- package/lib/commonjs/icons/PPTX.js +1 -1
- package/lib/commonjs/icons/Pause.js +1 -1
- package/lib/commonjs/icons/Picture.js +1 -1
- package/lib/commonjs/icons/Pin.js +1 -1
- package/lib/commonjs/icons/PinHeader.js +1 -1
- package/lib/commonjs/icons/Play.js +1 -1
- package/lib/commonjs/icons/RAR.js +1 -1
- package/lib/commonjs/icons/RTF.js +1 -1
- package/lib/commonjs/icons/Recorder.js +1 -1
- package/lib/commonjs/icons/Refresh.js +1 -1
- package/lib/commonjs/icons/SEVEN_Z.js +1 -1
- package/lib/commonjs/icons/Search.js +1 -1
- package/lib/commonjs/icons/SendRight.js +1 -1
- package/lib/commonjs/icons/SendUp.js +1 -1
- package/lib/commonjs/icons/Share.js +1 -1
- package/lib/commonjs/icons/ShareRightArrow.js +1 -1
- package/lib/commonjs/icons/Smile.js +1 -1
- package/lib/commonjs/icons/Sound.js +1 -1
- package/lib/commonjs/icons/TAR.js +1 -1
- package/lib/commonjs/icons/TXT.js +1 -1
- package/lib/commonjs/icons/ThreadReply.js +1 -1
- package/lib/commonjs/icons/ThumbsDownReaction.js +1 -1
- package/lib/commonjs/icons/ThumbsUpReaction.js +1 -1
- package/lib/commonjs/icons/Time.js +1 -1
- package/lib/commonjs/icons/Unknown.js +1 -1
- package/lib/commonjs/icons/Unpin.js +1 -1
- package/lib/commonjs/icons/User.js +1 -1
- package/lib/commonjs/icons/UserAdd.js +1 -1
- package/lib/commonjs/icons/UserAdmin.js +1 -1
- package/lib/commonjs/icons/UserDelete.js +1 -1
- package/lib/commonjs/icons/UserMinus.js +1 -1
- package/lib/commonjs/icons/Video.js +1 -1
- package/lib/commonjs/icons/Warning.js +1 -1
- package/lib/commonjs/icons/WutReaction.js +1 -1
- package/lib/commonjs/icons/XLS.js +1 -1
- package/lib/commonjs/icons/XLSX.js +1 -1
- package/lib/commonjs/icons/ZIP.js +1 -1
- package/lib/commonjs/icons/utils/base.js +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +2 -2
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/api/deleteMessage.js +20 -0
- package/lib/commonjs/mock-builders/api/deleteMessage.js.map +1 -0
- package/lib/commonjs/mock-builders/api/deleteReaction.js +21 -0
- package/lib/commonjs/mock-builders/api/deleteReaction.js.map +1 -0
- package/lib/commonjs/mock-builders/api/sendReaction.js +21 -0
- package/lib/commonjs/mock-builders/api/sendReaction.js.map +1 -0
- package/lib/commonjs/mock-builders/event/connectionChanged.js +2 -0
- package/lib/commonjs/mock-builders/event/connectionChanged.js.map +1 -1
- package/lib/commonjs/store/QuickSqliteClient.js +40 -51
- package/lib/commonjs/store/QuickSqliteClient.js.map +1 -1
- package/lib/commonjs/store/apis/addPendingTask.js +37 -0
- package/lib/commonjs/store/apis/addPendingTask.js.map +1 -0
- package/lib/commonjs/store/apis/deleteMessage.js +26 -0
- package/lib/commonjs/store/apis/deleteMessage.js.map +1 -0
- package/lib/commonjs/store/apis/deletePendingTask.js +22 -0
- package/lib/commonjs/store/apis/deletePendingTask.js.map +1 -0
- package/lib/commonjs/store/apis/deleteReaction.js +30 -0
- package/lib/commonjs/store/apis/deleteReaction.js.map +1 -0
- package/lib/commonjs/store/apis/getChannelMessages.js +3 -3
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +1 -1
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getPendingTasks.js +26 -0
- package/lib/commonjs/store/apis/getPendingTasks.js.map +1 -0
- package/lib/commonjs/store/apis/index.js +13 -0
- package/lib/commonjs/store/apis/index.js.map +1 -1
- package/lib/commonjs/store/apis/insertReaction.js +28 -0
- package/lib/commonjs/store/apis/insertReaction.js.map +1 -0
- package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
- package/lib/commonjs/store/mappers/mapDateTimeToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapMessageToStorable.js +3 -1
- package/lib/commonjs/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToTask.js +23 -0
- package/lib/commonjs/store/mappers/mapStorableToTask.js.map +1 -0
- package/lib/commonjs/store/mappers/mapTaskToStorable.js +18 -0
- package/lib/commonjs/store/mappers/mapTaskToStorable.js.map +1 -0
- package/lib/commonjs/store/schema.js +11 -0
- package/lib/commonjs/store/schema.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/appendOrderByClause.js +24 -0
- package/lib/commonjs/store/sqlite-utils/appendOrderByClause.js.map +1 -0
- package/lib/commonjs/store/sqlite-utils/createCreateTableQuery.js +1 -1
- package/lib/commonjs/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createSelectQuery.js +8 -1
- package/lib/commonjs/store/sqlite-utils/createSelectQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createUpdateQuery.js +2 -2
- package/lib/commonjs/store/sqlite-utils/createUpdateQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createUpsertQuery.js +1 -1
- package/lib/commonjs/store/sqlite-utils/createUpsertQuery.js.map +1 -1
- package/lib/commonjs/utils/DBSyncManager.js +436 -0
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -0
- package/lib/commonjs/utils/addReactionToLocalState.js +92 -0
- package/lib/commonjs/utils/addReactionToLocalState.js.map +1 -0
- package/lib/commonjs/utils/pendingTaskUtils.js +302 -0
- package/lib/commonjs/utils/pendingTaskUtils.js.map +1 -0
- package/lib/commonjs/utils/removeReactionFromLocalState.js +39 -0
- package/lib/commonjs/utils/removeReactionFromLocalState.js.map +1 -0
- package/lib/commonjs/utils/utils.js +9 -3
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +1 -1
- package/lib/module/components/Attachment/AudioAttachment.js +1 -1
- package/lib/module/components/Attachment/Card.js +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/module/components/Attachment/FileIcon.js +1 -1
- package/lib/module/components/Attachment/Gallery.js +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +20 -4
- package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +1 -1
- package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js +1 -1
- package/lib/module/components/Attachment/ImageLoadingIndicator.js +1 -1
- package/lib/module/components/Attachment/VideoThumbnail.js +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +1 -1
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +1 -1
- package/lib/module/components/Channel/Channel.js +537 -155
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +6 -0
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +5 -16
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +112 -42
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +1 -1
- package/lib/module/components/Chat/Chat.js +17 -21
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -4
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/ImageBackground.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +1 -1
- package/lib/module/components/Message/Message.js +22 -11
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +15 -13
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +9 -30
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +20 -18
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +1 -1
- package/lib/module/components/MessageInput/CooldownTimer.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +32 -22
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +52 -20
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +40 -28
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/module/components/MessageInput/SendButton.js +2 -2
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +1 -1
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js +1 -1
- package/lib/module/components/MessageInput/components/InputGiphySearch.js +1 -1
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js +1 -1
- package/lib/module/components/MessageList/DateHeader.js +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +1 -1
- package/lib/module/components/MessageList/NetworkDownIndicator.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js +1 -1
- package/lib/module/components/RTLComponents/WritingDirectionAwareText.js +1 -1
- package/lib/module/components/Reply/Reply.js +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/Thread/Thread.js +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +1 -1
- package/lib/module/components/index.js +0 -13
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +3 -3
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/debugContext/DebugContext.js +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +23 -14
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +3 -3
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +1 -1
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/icons/ArrowRight.js +1 -1
- package/lib/module/icons/AtMentions.js +1 -1
- package/lib/module/icons/Attach.js +1 -1
- package/lib/module/icons/Audio.js +1 -1
- package/lib/module/icons/CSV.js +1 -1
- package/lib/module/icons/Camera.js +1 -1
- package/lib/module/icons/Check.js +1 -1
- package/lib/module/icons/CheckAll.js +1 -1
- package/lib/module/icons/CheckSend.js +1 -1
- package/lib/module/icons/CircleClose.js +1 -1
- package/lib/module/icons/CirclePlus.js +1 -1
- package/lib/module/icons/CircleRight.js +1 -1
- package/lib/module/icons/Close.js +1 -1
- package/lib/module/icons/Copy.js +1 -1
- package/lib/module/icons/CurveLineLeftUp.js +1 -1
- package/lib/module/icons/DOC.js +1 -1
- package/lib/module/icons/DOCX.js +1 -1
- package/lib/module/icons/Delete.js +1 -1
- package/lib/module/icons/Down.js +1 -1
- package/lib/module/icons/DownloadArrow.js +1 -1
- package/lib/module/icons/DownloadCloud.js +1 -1
- package/lib/module/icons/Edit.js +1 -1
- package/lib/module/icons/Error.js +1 -1
- package/lib/module/icons/Eye.js +1 -1
- package/lib/module/icons/Flag.js +1 -1
- package/lib/module/icons/Folder.js +1 -1
- package/lib/module/icons/GenericFile.js +1 -1
- package/lib/module/icons/GiphyIcon.js +1 -1
- package/lib/module/icons/Grid.js +1 -1
- package/lib/module/icons/Group.js +1 -1
- package/lib/module/icons/HTML.js +1 -1
- package/lib/module/icons/Imgur.js +1 -1
- package/lib/module/icons/LOLReaction.js +1 -1
- package/lib/module/icons/Lightning.js +1 -1
- package/lib/module/icons/Link.js +1 -1
- package/lib/module/icons/Loading.js +1 -1
- package/lib/module/icons/Logo.js +1 -1
- package/lib/module/icons/LoveReaction.js +1 -1
- package/lib/module/icons/MD.js +1 -1
- package/lib/module/icons/MailOpen.js +1 -1
- package/lib/module/icons/MenuPointHorizontal.js +1 -1
- package/lib/module/icons/MenuPointVertical.js +1 -1
- package/lib/module/icons/MessageFlag.js +1 -1
- package/lib/module/icons/MessageIcon.js +1 -1
- package/lib/module/icons/Mute.js +1 -1
- package/lib/module/icons/Notification.js +1 -1
- package/lib/module/icons/ODT.js +1 -1
- package/lib/module/icons/PDF.js +1 -1
- package/lib/module/icons/PPT.js +1 -1
- package/lib/module/icons/PPTX.js +1 -1
- package/lib/module/icons/Pause.js +1 -1
- package/lib/module/icons/Picture.js +1 -1
- package/lib/module/icons/Pin.js +1 -1
- package/lib/module/icons/PinHeader.js +1 -1
- package/lib/module/icons/Play.js +1 -1
- package/lib/module/icons/RAR.js +1 -1
- package/lib/module/icons/RTF.js +1 -1
- package/lib/module/icons/Recorder.js +1 -1
- package/lib/module/icons/Refresh.js +1 -1
- package/lib/module/icons/SEVEN_Z.js +1 -1
- package/lib/module/icons/Search.js +1 -1
- package/lib/module/icons/SendRight.js +1 -1
- package/lib/module/icons/SendUp.js +1 -1
- package/lib/module/icons/Share.js +1 -1
- package/lib/module/icons/ShareRightArrow.js +1 -1
- package/lib/module/icons/Smile.js +1 -1
- package/lib/module/icons/Sound.js +1 -1
- package/lib/module/icons/TAR.js +1 -1
- package/lib/module/icons/TXT.js +1 -1
- package/lib/module/icons/ThreadReply.js +1 -1
- package/lib/module/icons/ThumbsDownReaction.js +1 -1
- package/lib/module/icons/ThumbsUpReaction.js +1 -1
- package/lib/module/icons/Time.js +1 -1
- package/lib/module/icons/Unknown.js +1 -1
- package/lib/module/icons/Unpin.js +1 -1
- package/lib/module/icons/User.js +1 -1
- package/lib/module/icons/UserAdd.js +1 -1
- package/lib/module/icons/UserAdmin.js +1 -1
- package/lib/module/icons/UserDelete.js +1 -1
- package/lib/module/icons/UserMinus.js +1 -1
- package/lib/module/icons/Video.js +1 -1
- package/lib/module/icons/Warning.js +1 -1
- package/lib/module/icons/WutReaction.js +1 -1
- package/lib/module/icons/XLS.js +1 -1
- package/lib/module/icons/XLSX.js +1 -1
- package/lib/module/icons/ZIP.js +1 -1
- package/lib/module/icons/utils/base.js +1 -1
- package/lib/module/mock-builders/DB/mock.js +2 -2
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/mock-builders/api/deleteMessage.js +20 -0
- package/lib/module/mock-builders/api/deleteMessage.js.map +1 -0
- package/lib/module/mock-builders/api/deleteReaction.js +21 -0
- package/lib/module/mock-builders/api/deleteReaction.js.map +1 -0
- package/lib/module/mock-builders/api/sendReaction.js +21 -0
- package/lib/module/mock-builders/api/sendReaction.js.map +1 -0
- package/lib/module/mock-builders/event/connectionChanged.js +2 -0
- package/lib/module/mock-builders/event/connectionChanged.js.map +1 -1
- package/lib/module/store/QuickSqliteClient.js +40 -51
- package/lib/module/store/QuickSqliteClient.js.map +1 -1
- package/lib/module/store/apis/addPendingTask.js +37 -0
- package/lib/module/store/apis/addPendingTask.js.map +1 -0
- package/lib/module/store/apis/deleteMessage.js +26 -0
- package/lib/module/store/apis/deleteMessage.js.map +1 -0
- package/lib/module/store/apis/deletePendingTask.js +22 -0
- package/lib/module/store/apis/deletePendingTask.js.map +1 -0
- package/lib/module/store/apis/deleteReaction.js +30 -0
- package/lib/module/store/apis/deleteReaction.js.map +1 -0
- package/lib/module/store/apis/getChannelMessages.js +3 -3
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +1 -1
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getPendingTasks.js +26 -0
- package/lib/module/store/apis/getPendingTasks.js.map +1 -0
- package/lib/module/store/apis/index.js +13 -0
- package/lib/module/store/apis/index.js.map +1 -1
- package/lib/module/store/apis/insertReaction.js +28 -0
- package/lib/module/store/apis/insertReaction.js.map +1 -0
- package/lib/module/store/apis/updateMessage.js.map +1 -1
- package/lib/module/store/apis/updateReaction.js.map +1 -1
- package/lib/module/store/mappers/mapDateTimeToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapMessageToStorable.js +3 -1
- package/lib/module/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToTask.js +23 -0
- package/lib/module/store/mappers/mapStorableToTask.js.map +1 -0
- package/lib/module/store/mappers/mapTaskToStorable.js +18 -0
- package/lib/module/store/mappers/mapTaskToStorable.js.map +1 -0
- package/lib/module/store/schema.js +11 -0
- package/lib/module/store/schema.js.map +1 -1
- package/lib/module/store/sqlite-utils/appendOrderByClause.js +24 -0
- package/lib/module/store/sqlite-utils/appendOrderByClause.js.map +1 -0
- package/lib/module/store/sqlite-utils/createCreateTableQuery.js +1 -1
- package/lib/module/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createSelectQuery.js +8 -1
- package/lib/module/store/sqlite-utils/createSelectQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createUpdateQuery.js +2 -2
- package/lib/module/store/sqlite-utils/createUpdateQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createUpsertQuery.js +1 -1
- package/lib/module/store/sqlite-utils/createUpsertQuery.js.map +1 -1
- package/lib/module/utils/DBSyncManager.js +436 -0
- package/lib/module/utils/DBSyncManager.js.map +1 -0
- package/lib/module/utils/addReactionToLocalState.js +92 -0
- package/lib/module/utils/addReactionToLocalState.js.map +1 -0
- package/lib/module/utils/pendingTaskUtils.js +302 -0
- package/lib/module/utils/pendingTaskUtils.js.map +1 -0
- package/lib/module/utils/removeReactionFromLocalState.js +39 -0
- package/lib/module/utils/removeReactionFromLocalState.js.map +1 -0
- package/lib/module/utils/utils.js +9 -3
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +2 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +1 -1
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +2 -1
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +2 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +2 -1
- package/lib/typescript/components/index.d.ts +0 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +1 -2
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -0
- package/lib/typescript/store/apis/addPendingTask.d.ts +2 -0
- package/lib/typescript/store/apis/deleteMessage.d.ts +4 -0
- package/lib/typescript/store/apis/deletePendingTask.d.ts +3 -0
- package/lib/typescript/store/apis/deleteReaction.d.ts +6 -0
- package/lib/typescript/store/apis/getChannelMessages.d.ts +1 -1
- package/lib/typescript/store/apis/getPendingTasks.d.ts +3 -0
- package/lib/typescript/store/apis/index.d.ts +1 -0
- package/lib/typescript/store/apis/insertReaction.d.ts +6 -0
- package/lib/typescript/store/apis/updateMessage.d.ts +2 -2
- package/lib/typescript/store/apis/updateReaction.d.ts +2 -2
- package/lib/typescript/store/mappers/mapDateTimeToStorable.d.ts +1 -1
- package/lib/typescript/store/mappers/mapMessageToStorable.d.ts +2 -2
- package/lib/typescript/store/mappers/mapStorableToTask.d.ts +2 -0
- package/lib/typescript/store/mappers/mapTaskToStorable.d.ts +34 -0
- package/lib/typescript/store/schema.d.ts +12 -1
- package/lib/typescript/store/sqlite-utils/appendOrderByClause.d.ts +3 -0
- package/lib/typescript/store/sqlite-utils/createSelectQuery.d.ts +1 -1
- package/lib/typescript/store/types.d.ts +25 -0
- package/lib/typescript/types/types.d.ts +3 -1
- package/lib/typescript/utils/DBSyncManager.d.ts +47 -0
- package/lib/typescript/utils/addReactionToLocalState.d.ts +9 -0
- package/lib/typescript/utils/pendingTaskUtils.d.ts +13 -0
- package/lib/typescript/utils/removeReactionFromLocalState.d.ts +8 -0
- package/lib/typescript/utils/utils.d.ts +3 -3
- package/package.json +2 -2
- package/src/__tests__/offline-feature.test.js +19 -2
- package/src/__tests__/optimistic-update.test.js +368 -0
- package/src/components/Attachment/GalleryImage.tsx +14 -2
- package/src/components/Channel/Channel.tsx +270 -62
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +6 -0
- package/src/components/ChannelList/ChannelList.tsx +2 -10
- package/src/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.tsx +0 -1
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +75 -27
- package/src/components/Chat/Chat.tsx +5 -9
- package/src/components/Chat/__tests__/Chat.test.js +1 -1
- package/src/components/Chat/hooks/useCreateChatContext.ts +0 -2
- package/src/components/Message/Message.tsx +18 -2
- package/src/components/Message/MessageSimple/MessageFooter.tsx +2 -1
- package/src/components/Message/hooks/useMessageActionHandlers.ts +10 -21
- package/src/components/Message/hooks/useMessageActions.tsx +9 -4
- package/src/components/MessageInput/FileUploadPreview.tsx +8 -2
- package/src/components/MessageInput/ImageUploadPreview.tsx +37 -8
- package/src/components/MessageInput/MessageInput.tsx +17 -3
- package/src/components/MessageInput/SendButton.tsx +1 -1
- package/src/components/index.ts +0 -1
- package/src/contexts/chatContext/ChatContext.tsx +1 -2
- package/src/contexts/messageInputContext/MessageInputContext.tsx +29 -10
- package/src/contexts/messageInputContext/__tests__/__snapshots__/sendMessage.test.tsx.snap +29 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +4 -1
- package/src/hooks/useTranslatedMessage.ts +1 -1
- package/src/mock-builders/DB/mock.ts +2 -2
- package/src/mock-builders/api/deleteMessage.js +18 -0
- package/src/mock-builders/api/deleteReaction.js +19 -0
- package/src/mock-builders/api/sendReaction.tsx +19 -0
- package/src/mock-builders/event/connectionChanged.js +2 -1
- package/src/store/QuickSqliteClient.ts +39 -37
- package/src/store/apis/addPendingTask.ts +24 -0
- package/src/store/apis/deleteMessage.ts +13 -0
- package/src/store/apis/deletePendingTask.ts +12 -0
- package/src/store/apis/deleteReaction.ts +26 -0
- package/src/store/apis/getChannelMessages.ts +1 -1
- package/src/store/apis/getChannels.ts +2 -2
- package/src/store/apis/getPendingTasks.ts +13 -0
- package/src/store/apis/index.ts +1 -0
- package/src/store/apis/insertReaction.ts +29 -0
- package/src/store/apis/updateMessage.ts +2 -2
- package/src/store/apis/updateReaction.ts +2 -2
- package/src/store/mappers/mapDateTimeToStorable.ts +1 -1
- package/src/store/mappers/mapMessageToStorable.ts +8 -2
- package/src/store/mappers/mapStorableToTask.ts +13 -0
- package/src/store/mappers/mapTaskToStorable.ts +7 -0
- package/src/store/schema.ts +25 -1
- package/src/store/sqlite-utils/appendOrderByClause.ts +24 -0
- package/src/store/sqlite-utils/createCreateTableQuery.ts +2 -2
- package/src/store/sqlite-utils/createSelectQuery.ts +4 -1
- package/src/store/sqlite-utils/createUpdateQuery.ts +3 -2
- package/src/store/sqlite-utils/createUpsertQuery.ts +1 -1
- package/src/store/types.ts +33 -0
- package/src/types/types.ts +4 -1
- package/src/utils/DBSyncManager.ts +222 -0
- package/src/utils/addReactionToLocalState.ts +87 -0
- package/src/utils/pendingTaskUtils.ts +131 -0
- package/src/utils/removeReactionFromLocalState.ts +39 -0
- package/src/utils/utils.ts +12 -4
- package/src/version.json +1 -1
- package/lib/commonjs/components/Chat/hooks/useConnectionRecovered.js +0 -171
- package/lib/commonjs/components/Chat/hooks/useConnectionRecovered.js.map +0 -1
- package/lib/module/components/Chat/hooks/useConnectionRecovered.js +0 -171
- package/lib/module/components/Chat/hooks/useConnectionRecovered.js.map +0 -1
- package/lib/typescript/components/Chat/hooks/useConnectionRecovered.d.ts +0 -10
- package/src/components/Chat/hooks/useConnectionRecovered.ts +0 -92
|
@@ -15,7 +15,7 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
|
15
15
|
import { ReactionData } from '../../utils/utils';
|
|
16
16
|
import { LoadingErrorProps } from '../Indicators/LoadingErrorIndicator';
|
|
17
17
|
export declare const reactionData: ReactionData[];
|
|
18
|
-
export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'AudioAttachment' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'getMessagesGroupStyles' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview' | 'VideoThumbnail'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
|
|
18
|
+
export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client' | 'enableOfflineSupport'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'AudioAttachment' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'getMessagesGroupStyles' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview' | 'VideoThumbnail'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
|
|
19
19
|
shouldSyncChannel: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Additional props passed to keyboard avoiding view
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
|
|
2
2
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
-
export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, AudioAttachment, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, getMessagesGroupStyles, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, ImageLoadingFailedIndicator, ImageLoadingIndicator, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, VideoThumbnail, }: MessagesContextValue<StreamChatGenerics> & {
|
|
3
|
+
export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, AudioAttachment, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, deleteMessage, deleteReaction, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, getMessagesGroupStyles, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, ImageLoadingFailedIndicator, ImageLoadingIndicator, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, sendReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, VideoThumbnail, }: MessagesContextValue<StreamChatGenerics> & {
|
|
4
4
|
/**
|
|
5
5
|
* To ensure we allow re-render, when channel is changed
|
|
6
6
|
*/
|
|
@@ -5,11 +5,12 @@ declare type Parameters<StreamChatGenerics extends DefaultStreamChatGenerics = D
|
|
|
5
5
|
enableOfflineSupport: boolean;
|
|
6
6
|
filters: ChannelFilters<StreamChatGenerics>;
|
|
7
7
|
options: ChannelOptions;
|
|
8
|
+
setForceUpdate: React.Dispatch<React.SetStateAction<number>>;
|
|
8
9
|
sort: ChannelSort<StreamChatGenerics>;
|
|
9
10
|
};
|
|
10
11
|
declare type QueryType = 'queryLocalDB' | 'reload' | 'refresh' | 'loadChannels';
|
|
11
12
|
export declare type QueryChannels = (queryType?: QueryType, retryCount?: number) => Promise<void>;
|
|
12
|
-
export declare const usePaginatedChannels: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ enableOfflineSupport, filters, options, sort, }: Parameters<StreamChatGenerics>) => {
|
|
13
|
+
export declare const usePaginatedChannels: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ enableOfflineSupport, filters, options, setForceUpdate, sort, }: Parameters<StreamChatGenerics>) => {
|
|
13
14
|
channels: Channel<StreamChatGenerics>[] | null;
|
|
14
15
|
error: Error | undefined;
|
|
15
16
|
hasNextPage: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext';
|
|
2
2
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
-
export declare const useCreateChatContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ appSettings, channel, client, connectionRecovering, enableOfflineSupport, ImageComponent, isOnline, mutedUsers, setActiveChannel,
|
|
3
|
+
export declare const useCreateChatContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ appSettings, channel, client, connectionRecovering, enableOfflineSupport, ImageComponent, isOnline, mutedUsers, setActiveChannel, }: ChatContextValue<StreamChatGenerics>) => ChatContextValue<StreamChatGenerics>;
|
|
@@ -52,7 +52,7 @@ export declare type MessageActionHandlers = {
|
|
|
52
52
|
toggleMuteUser: () => Promise<void>;
|
|
53
53
|
toggleReaction: (reactionType: string) => Promise<void>;
|
|
54
54
|
};
|
|
55
|
-
export declare type MessagePropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'enforceUniqueReaction' | 'members'> & Pick<KeyboardContextValue, 'dismissKeyboard'> & Partial<Omit<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'>> & Pick<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'> & Pick<MessagesContextValue<StreamChatGenerics>, 'dismissKeyboardOnMessageTouch' | 'forceAlignMessages' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleQuotedReply' | 'handleReaction' | 'handleRetry' | 'handleThreadReply' | 'isAttachmentEqual' | 'messageActions' | 'messageContentOrder' | 'MessageSimple' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'removeMessage' | 'retrySendMessage' | 'selectReaction' | 'setEditingState' | 'setQuotedMessageState' | 'supportedReactions' | 'updateMessage'> & Pick<MessageOverlayContextValue<StreamChatGenerics>, 'setData'> & Pick<OverlayContextValue, 'setOverlay'> & Pick<ThreadContextValue<StreamChatGenerics>, 'openThread'> & Pick<TranslationContextValue, 't'> & {
|
|
55
|
+
export declare type MessagePropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'enforceUniqueReaction' | 'members'> & Pick<KeyboardContextValue, 'dismissKeyboard'> & Partial<Omit<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'>> & Pick<MessageContextValue<StreamChatGenerics>, 'groupStyles' | 'message'> & Pick<MessagesContextValue<StreamChatGenerics>, 'sendReaction' | 'deleteMessage' | 'dismissKeyboardOnMessageTouch' | 'forceAlignMessages' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleQuotedReply' | 'handleReaction' | 'handleRetry' | 'handleThreadReply' | 'isAttachmentEqual' | 'messageActions' | 'messageContentOrder' | 'MessageSimple' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'removeMessage' | 'deleteReaction' | 'retrySendMessage' | 'selectReaction' | 'setEditingState' | 'setQuotedMessageState' | 'supportedReactions' | 'updateMessage'> & Pick<MessageOverlayContextValue<StreamChatGenerics>, 'setData'> & Pick<OverlayContextValue, 'setOverlay'> & Pick<ThreadContextValue<StreamChatGenerics>, 'openThread'> & Pick<TranslationContextValue, 't'> & {
|
|
56
56
|
chatContext: ChatContextValue<StreamChatGenerics>;
|
|
57
57
|
messagesContext: MessagesContextValue<StreamChatGenerics>;
|
|
58
58
|
/**
|
|
@@ -3,7 +3,7 @@ import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext
|
|
|
3
3
|
import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
|
|
4
4
|
import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
|
|
5
5
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
6
|
-
export declare const useMessageActionHandlers: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, client,
|
|
6
|
+
export declare const useMessageActionHandlers: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, client, deleteMessage, deleteReaction, message, retrySendMessage, sendReaction, setEditingState, setQuotedMessageState, supportedReactions, }: Pick<MessagesContextValue<StreamChatGenerics>, "setQuotedMessageState" | "supportedReactions" | "deleteMessage" | "deleteReaction" | "retrySendMessage" | "sendReaction" | "setEditingState"> & Pick<ChannelContextValue<StreamChatGenerics>, "channel" | "enforceUniqueReaction"> & Pick<ChatContextValue<StreamChatGenerics>, "client"> & Pick<MessageContextValue<StreamChatGenerics>, "message">) => {
|
|
7
7
|
handleDeleteMessage: () => Promise<void>;
|
|
8
8
|
handleEditMessage: () => void;
|
|
9
9
|
handleQuotedReplyMessage: () => void;
|
|
@@ -8,7 +8,7 @@ import type { TranslationContextValue } from '../../../contexts/translationConte
|
|
|
8
8
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
9
9
|
import type { MessageType } from '../../MessageList/hooks/useMessageList';
|
|
10
10
|
import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
|
|
11
|
-
export declare const useMessageActions: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, client, enforceUniqueReaction, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction: handleReactionProp, handleRetry, handleThreadReply, message, onThreadSelect, openThread,
|
|
11
|
+
export declare const useMessageActions: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, client, deleteMessage: deleteMessageFromContext, deleteReaction, enforceUniqueReaction, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction: handleReactionProp, handleRetry, handleThreadReply, message, onThreadSelect, openThread, retrySendMessage, selectReaction, sendReaction, setEditingState, setOverlay, setQuotedMessageState, supportedReactions, t, }: Pick<MessagesContextValue<StreamChatGenerics>, "setQuotedMessageState" | "updateMessage" | "supportedReactions" | "handleReaction" | "deleteMessage" | "deleteReaction" | "removeMessage" | "retrySendMessage" | "sendReaction" | "setEditingState" | "handleBlock" | "handleCopy" | "handleDelete" | "handleEdit" | "handleFlag" | "handleMute" | "handlePinMessage" | "handleQuotedReply" | "handleRetry" | "handleThreadReply" | "selectReaction"> & Pick<ChannelContextValue<StreamChatGenerics>, "channel" | "enforceUniqueReaction"> & Pick<ChatContextValue<StreamChatGenerics>, "client"> & Pick<OverlayContextValue, "setOverlay"> & Pick<ThreadContextValue<StreamChatGenerics>, "openThread"> & Pick<MessageContextValue<StreamChatGenerics>, "message"> & Pick<TranslationContextValue, "t"> & {
|
|
12
12
|
onThreadSelect?: ((message: MessageType<StreamChatGenerics>) => void) | undefined;
|
|
13
13
|
}) => {
|
|
14
14
|
blockUser: MessageActionType;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ChatContextValue } from '../../contexts';
|
|
1
2
|
import { MessageInputContextValue } from '../../contexts/messageInputContext/MessageInputContext';
|
|
2
3
|
import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
|
|
3
4
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
|
-
declare type FileUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'fileUploads' | 'removeFile' | 'uploadFile' | 'setFileUploads'> & Pick<MessagesContextValue<StreamChatGenerics>, 'AudioAttachment' | 'FileAttachmentIcon'>;
|
|
5
|
+
declare type FileUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'fileUploads' | 'removeFile' | 'uploadFile' | 'setFileUploads'> & Pick<MessagesContextValue<StreamChatGenerics>, 'AudioAttachment' | 'FileAttachmentIcon'> & Pick<ChatContextValue<StreamChatGenerics>, 'isOnline' | 'enableOfflineSupport'>;
|
|
5
6
|
export declare type FileUploadPreviewProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<FileUploadPreviewPropsWithContext<StreamChatGenerics>>;
|
|
6
7
|
/**
|
|
7
8
|
* FileUploadPreview
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ChatContextValue } from '../../contexts';
|
|
1
2
|
import { MessageInputContextValue } from '../../contexts/messageInputContext/MessageInputContext';
|
|
2
3
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
|
-
declare type ImageUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'imageUploads' | 'removeImage' | 'uploadImage'>;
|
|
4
|
+
declare type ImageUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'imageUploads' | 'removeImage' | 'uploadImage'> & Pick<ChatContextValue<StreamChatGenerics>, 'isOnline' | 'enableOfflineSupport'>;
|
|
4
5
|
export declare type ImageUploadPreviewProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<ImageUploadPreviewPropsWithContext<StreamChatGenerics>>;
|
|
5
6
|
/**
|
|
6
7
|
* UI Component to preview the images set for upload
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChatContextValue } from '../../contexts';
|
|
1
2
|
import { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';
|
|
2
3
|
import { MessageInputContextValue } from '../../contexts/messageInputContext/MessageInputContext';
|
|
3
4
|
import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
|
|
@@ -5,7 +6,7 @@ import { SuggestionsContextValue } from '../../contexts/suggestionsContext/Sugge
|
|
|
5
6
|
import { ThreadContextValue } from '../../contexts/threadContext/ThreadContext';
|
|
6
7
|
import { TranslationContextValue } from '../../contexts/translationContext/TranslationContext';
|
|
7
8
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
8
|
-
declare type MessageInputPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'disabled' | 'members' | 'watchers'> & Pick<MessageInputContextValue<StreamChatGenerics>, 'additionalTextInputProps' | 'asyncIds' | 'asyncUploads' | 'cooldownEndsAt' | 'CooldownTimer' | 'clearEditingState' | 'clearQuotedMessageState' | 'closeAttachmentPicker' | 'editing' | 'FileUploadPreview' | 'fileUploads' | 'giphyActive' | 'ImageUploadPreview' | 'imageUploads' | 'Input' | 'inputBoxRef' | 'InputButtons' | 'InputEditingStateHeader' | 'InputGiphySearch' | 'InputReplyStateHeader' | 'isValidMessage' | 'maxNumberOfFiles' | 'mentionedUsers' | 'numberOfUploads' | 'quotedMessage' | 'resetInput' | 'SendButton' | 'sending' | 'sendMessageAsync' | 'setShowMoreOptions' | 'setGiphyActive' | 'showMoreOptions' | 'ShowThreadMessageInChannelButton' | 'removeFile' | 'removeImage' | 'uploadNewFile' | 'uploadNewImage'> & Pick<MessagesContextValue<StreamChatGenerics>, 'Reply'> & Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList' | 'suggestions' | 'triggerType'> & Pick<ThreadContextValue<StreamChatGenerics>, 'thread'> & Pick<TranslationContextValue, 't'> & {
|
|
9
|
+
declare type MessageInputPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChatContextValue<StreamChatGenerics>, 'isOnline'> & Pick<ChannelContextValue<StreamChatGenerics>, 'disabled' | 'members' | 'watchers'> & Pick<MessageInputContextValue<StreamChatGenerics>, 'additionalTextInputProps' | 'asyncIds' | 'asyncUploads' | 'cooldownEndsAt' | 'CooldownTimer' | 'clearEditingState' | 'clearQuotedMessageState' | 'closeAttachmentPicker' | 'editing' | 'FileUploadPreview' | 'fileUploads' | 'giphyActive' | 'ImageUploadPreview' | 'imageUploads' | 'Input' | 'inputBoxRef' | 'InputButtons' | 'InputEditingStateHeader' | 'InputGiphySearch' | 'InputReplyStateHeader' | 'isValidMessage' | 'maxNumberOfFiles' | 'mentionedUsers' | 'numberOfUploads' | 'quotedMessage' | 'resetInput' | 'SendButton' | 'sending' | 'sendMessageAsync' | 'setShowMoreOptions' | 'setGiphyActive' | 'showMoreOptions' | 'ShowThreadMessageInChannelButton' | 'removeFile' | 'removeImage' | 'uploadNewFile' | 'uploadNewImage'> & Pick<MessagesContextValue<StreamChatGenerics>, 'Reply'> & Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList' | 'suggestions' | 'triggerType'> & Pick<ThreadContextValue<StreamChatGenerics>, 'thread'> & Pick<TranslationContextValue, 't'> & {
|
|
9
10
|
threadList?: boolean;
|
|
10
11
|
};
|
|
11
12
|
export declare type MessageInputProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<MessageInputPropsWithContext<StreamChatGenerics>>;
|
|
@@ -65,7 +65,6 @@ export * from './Chat/Chat';
|
|
|
65
65
|
export * from './Chat/hooks/useCreateChatContext';
|
|
66
66
|
export * from './Chat/hooks/useIsOnline';
|
|
67
67
|
export * from './Chat/hooks/useMutedUsers';
|
|
68
|
-
export * from './Chat/hooks/useConnectionRecovered';
|
|
69
68
|
export * from './Chat/hooks/useSyncDatabase';
|
|
70
69
|
export * from './ImageGallery/ImageGallery';
|
|
71
70
|
export * from './ImageGallery/components/AnimatedGalleryImage';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { ImageProps } from 'react-native';
|
|
3
|
-
import type { AppSettingsAPIResponse, Channel,
|
|
3
|
+
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
|
|
4
4
|
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
5
5
|
export declare type ChatContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
6
6
|
/**
|
|
@@ -35,7 +35,6 @@ export declare type ChatContextValue<StreamChatGenerics extends DefaultStreamCha
|
|
|
35
35
|
* @overrideType Function
|
|
36
36
|
*/
|
|
37
37
|
setActiveChannel: (newChannel?: Channel<StreamChatGenerics>) => void;
|
|
38
|
-
subscribeConnectionRecoveredCallback: (callback: EventHandler<StreamChatGenerics>) => () => void;
|
|
39
38
|
/**
|
|
40
39
|
* Instance of channel object from stream-chat package.
|
|
41
40
|
*
|
|
@@ -100,4 +100,4 @@ export declare const useMessageContext: <StreamChatGenerics extends DefaultStrea
|
|
|
100
100
|
* typing is desired while using the HOC withMessageContextContext the Props for the
|
|
101
101
|
* wrapped component must be provided as the first generic.
|
|
102
102
|
*/
|
|
103
|
-
export declare const withMessageContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "disabled" | "onPress" | "onPressIn" | "onLongPress" | "channel" | "members" | "threadList" | "reactions" | "images" | "message" | "handleAction" | "alignment" | "
|
|
103
|
+
export declare const withMessageContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "disabled" | "onPress" | "onPressIn" | "onLongPress" | "channel" | "members" | "threadList" | "reactions" | "images" | "message" | "handleAction" | "alignment" | "files" | "groupStyles" | "onlyEmojis" | "otherAttachments" | "videos" | "isMyMessage" | "actionsEnabled" | "handleDeleteMessage" | "handleEditMessage" | "handleQuotedReplyMessage" | "handleResendMessage" | "handleToggleBanUser" | "handleToggleMuteUser" | "handleToggleReaction" | "hasReactions" | "lastGroupMessage" | "messageContentOrder" | "onOpenThread" | "showMessageOverlay" | "showMessageStatus" | "goToMessage" | "lastReceivedId" | "preventPress" | "showAvatar">>;
|
|
@@ -70,6 +70,8 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
70
70
|
* Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)
|
|
71
71
|
**/
|
|
72
72
|
DateHeader: React.ComponentType<DateHeaderProps>;
|
|
73
|
+
deleteMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;
|
|
74
|
+
deleteReaction: (type: string, messageId: string) => Promise<void>;
|
|
73
75
|
/** Should keyboard be dismissed when messaged is touched */
|
|
74
76
|
dismissKeyboardOnMessageTouch: boolean;
|
|
75
77
|
enableMessageGroupingByUser: boolean;
|
|
@@ -204,6 +206,7 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
204
206
|
* Defaults to: [ScrollToBottomButton](https://getstream.io/chat/docs/sdk/reactnative/ui-components/scroll-to-bottom-button/)
|
|
205
207
|
*/
|
|
206
208
|
ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;
|
|
209
|
+
sendReaction: (type: string, messageId: string) => Promise<void>;
|
|
207
210
|
setEditingState: (message: MessageType<StreamChatGenerics>) => void;
|
|
208
211
|
setQuotedMessageState: (message: MessageType<StreamChatGenerics>) => void;
|
|
209
212
|
supportedReactions: ReactionData[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MessageResponse } from 'stream-chat';
|
|
2
2
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const getChannelMessages: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channelIds, currentUserId, }: {
|
|
4
4
|
channelIds: string[];
|
|
5
5
|
currentUserId: string;
|
|
6
6
|
}) => Record<string, MessageResponse<StreamChatGenerics>[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MessageResponse } from 'stream-chat';
|
|
1
|
+
import type { FormatMessageResponse, MessageResponse } from 'stream-chat';
|
|
2
2
|
import type { PreparedQueries } from '../types';
|
|
3
3
|
export declare const updateMessage: ({ flush, message, }: {
|
|
4
|
-
message: MessageResponse;
|
|
4
|
+
message: MessageResponse | FormatMessageResponse;
|
|
5
5
|
flush?: boolean | undefined;
|
|
6
6
|
}) => PreparedQueries[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { MessageResponse, ReactionResponse } from 'stream-chat';
|
|
1
|
+
import type { FormatMessageResponse, MessageResponse, ReactionResponse } from 'stream-chat';
|
|
2
2
|
import type { PreparedQueries } from '../types';
|
|
3
3
|
export declare const updateReaction: ({ flush, message, reaction, }: {
|
|
4
|
-
message: MessageResponse;
|
|
4
|
+
message: MessageResponse | FormatMessageResponse;
|
|
5
5
|
reaction: ReactionResponse;
|
|
6
6
|
flush?: boolean | undefined;
|
|
7
7
|
}) => PreparedQueries[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mapDateTimeToStorable: (datetime?: string | undefined) => string;
|
|
1
|
+
export declare const mapDateTimeToStorable: (datetime?: string | Date | undefined) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { MessageResponse } from 'stream-chat';
|
|
1
|
+
import type { FormatMessageResponse, MessageResponse } from 'stream-chat';
|
|
2
2
|
import type { TableRow } from '../types';
|
|
3
|
-
export declare const mapMessageToStorable: (message: MessageResponse) => TableRow<'messages'>;
|
|
3
|
+
export declare const mapMessageToStorable: (message: MessageResponse | FormatMessageResponse) => TableRow<'messages'>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PendingTask } from '../types';
|
|
2
|
+
export declare const mapTaskToStorable: (task: PendingTask) => {
|
|
3
|
+
createdAt: string;
|
|
4
|
+
payload: string;
|
|
5
|
+
channelId: string;
|
|
6
|
+
channelType: string;
|
|
7
|
+
messageId: string;
|
|
8
|
+
id?: number | undefined;
|
|
9
|
+
type: "send-reaction";
|
|
10
|
+
} | {
|
|
11
|
+
createdAt: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
channelId: string;
|
|
14
|
+
channelType: string;
|
|
15
|
+
messageId: string;
|
|
16
|
+
id?: number | undefined;
|
|
17
|
+
type: "send-message";
|
|
18
|
+
} | {
|
|
19
|
+
createdAt: string;
|
|
20
|
+
payload: string;
|
|
21
|
+
channelId: string;
|
|
22
|
+
channelType: string;
|
|
23
|
+
messageId: string;
|
|
24
|
+
id?: number | undefined;
|
|
25
|
+
type: "delete-message";
|
|
26
|
+
} | {
|
|
27
|
+
createdAt: string;
|
|
28
|
+
payload: string;
|
|
29
|
+
channelId: string;
|
|
30
|
+
channelType: string;
|
|
31
|
+
messageId: string;
|
|
32
|
+
id?: number | undefined;
|
|
33
|
+
type: "delete-reaction";
|
|
34
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { MessageLabel, Role } from 'stream-chat';
|
|
2
|
+
import type { PendingTaskTypes } from './types';
|
|
3
|
+
import type { ValueOf } from '../types/types';
|
|
2
4
|
declare type Tables = {
|
|
3
5
|
[P in keyof Schema]: {
|
|
4
6
|
columns: {
|
|
5
7
|
[K in keyof Schema[P]]: string;
|
|
6
8
|
};
|
|
7
|
-
primaryKey: Array<keyof Schema[P]>;
|
|
8
9
|
foreignKeys?: Array<{
|
|
9
10
|
column: `${Exclude<keyof Schema[P], symbol>}`;
|
|
10
11
|
referenceTable: `${keyof Schema}`;
|
|
@@ -16,6 +17,7 @@ declare type Tables = {
|
|
|
16
17
|
name: string;
|
|
17
18
|
unique: boolean;
|
|
18
19
|
}>;
|
|
20
|
+
primaryKey?: Array<keyof Schema[P]>;
|
|
19
21
|
};
|
|
20
22
|
};
|
|
21
23
|
export declare const tables: Tables;
|
|
@@ -77,6 +79,15 @@ export declare type Schema = {
|
|
|
77
79
|
text?: string;
|
|
78
80
|
userId?: string;
|
|
79
81
|
};
|
|
82
|
+
pendingTasks: {
|
|
83
|
+
channelId: string;
|
|
84
|
+
channelType: string;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
id: number;
|
|
87
|
+
messageId: string;
|
|
88
|
+
payload: string;
|
|
89
|
+
type: ValueOf<PendingTaskTypes>;
|
|
90
|
+
};
|
|
80
91
|
reactions: {
|
|
81
92
|
createdAt: string;
|
|
82
93
|
messageId: string;
|
|
@@ -10,4 +10,4 @@ import type { PreparedQueries, TableColumnNames, TableColumnValue } from '../typ
|
|
|
10
10
|
* All the conditions will be joined with AND in final query.
|
|
11
11
|
* @returns {string} Final select query
|
|
12
12
|
*/
|
|
13
|
-
export declare const createSelectQuery: <T extends keyof Schema>(table: T, fields?: "*"[] | (keyof Schema[T])[], whereCondition?: Partial<{ [k in keyof Schema[T]]: TableColumnValue | TableColumnValue[]; }> | undefined) => PreparedQueries;
|
|
13
|
+
export declare const createSelectQuery: <T extends keyof Schema>(table: T, fields?: "*"[] | (keyof Schema[T])[], whereCondition?: Partial<{ [k in keyof Schema[T]]: TableColumnValue | TableColumnValue[]; }> | undefined, orderBy?: Partial<{ [k_1 in keyof Schema[T]]: 1 | -1; }> | undefined) => PreparedQueries;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Channel, StreamChat } from 'stream-chat';
|
|
1
2
|
import type { Schema } from './schema';
|
|
2
3
|
export declare type Table = keyof Schema;
|
|
3
4
|
export declare type TableRow<T extends Table> = Schema[T];
|
|
@@ -7,3 +8,27 @@ export declare type TableRowJoinedUser<T extends Table> = Schema[T] & {
|
|
|
7
8
|
export declare type TableColumnNames<T extends Table> = keyof Schema[T];
|
|
8
9
|
export declare type TableColumnValue = string | boolean | number | undefined;
|
|
9
10
|
export declare type PreparedQueries = [string] | [string, Array<any>];
|
|
11
|
+
export declare type PendingTaskTypes = {
|
|
12
|
+
deleteMessage: 'delete-message';
|
|
13
|
+
deleteReaction: 'delete-reaction';
|
|
14
|
+
sendMessage: 'send-message';
|
|
15
|
+
sendReaction: 'send-reaction';
|
|
16
|
+
};
|
|
17
|
+
export declare type PendingTask = {
|
|
18
|
+
channelId: string;
|
|
19
|
+
channelType: string;
|
|
20
|
+
messageId: string;
|
|
21
|
+
id?: number;
|
|
22
|
+
} & ({
|
|
23
|
+
payload: Parameters<Channel['sendReaction']>;
|
|
24
|
+
type: PendingTaskTypes['sendReaction'];
|
|
25
|
+
} | {
|
|
26
|
+
payload: Parameters<Channel['sendMessage']>;
|
|
27
|
+
type: PendingTaskTypes['sendMessage'];
|
|
28
|
+
} | {
|
|
29
|
+
payload: Parameters<StreamChat['deleteMessage']>;
|
|
30
|
+
type: PendingTaskTypes['deleteMessage'];
|
|
31
|
+
} | {
|
|
32
|
+
payload: Parameters<Channel['deleteReaction']>;
|
|
33
|
+
type: PendingTaskTypes['deleteReaction'];
|
|
34
|
+
});
|
|
@@ -22,6 +22,7 @@ export declare type File = {
|
|
|
22
22
|
export declare type DefaultAttachmentType = UnknownType & {
|
|
23
23
|
file_size?: number | string;
|
|
24
24
|
mime_type?: string;
|
|
25
|
+
originalFile?: File;
|
|
25
26
|
};
|
|
26
27
|
interface DefaultUserType extends UnknownType {
|
|
27
28
|
image?: string;
|
|
@@ -31,7 +32,7 @@ interface DefaultChannelType extends UnknownType {
|
|
|
31
32
|
image?: string;
|
|
32
33
|
}
|
|
33
34
|
export interface DefaultStreamChatGenerics extends ExtendableGenerics {
|
|
34
|
-
attachmentType:
|
|
35
|
+
attachmentType: DefaultAttachmentType;
|
|
35
36
|
channelType: DefaultChannelType;
|
|
36
37
|
commandType: LiteralStringForUnion;
|
|
37
38
|
eventType: UnknownType;
|
|
@@ -40,4 +41,5 @@ export interface DefaultStreamChatGenerics extends ExtendableGenerics {
|
|
|
40
41
|
userType: DefaultUserType;
|
|
41
42
|
}
|
|
42
43
|
export declare type UnknownType = Record<string, unknown>;
|
|
44
|
+
export declare type ValueOf<T> = T[keyof T];
|
|
43
45
|
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StreamChat } from 'stream-chat';
|
|
2
|
+
import type { PendingTask } from '../store/types';
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../types/types';
|
|
4
|
+
export declare class DBSyncManager {
|
|
5
|
+
static syncStatus: boolean;
|
|
6
|
+
static listeners: Array<(status: boolean) => void>;
|
|
7
|
+
static client: StreamChat | null;
|
|
8
|
+
/**
|
|
9
|
+
* Returns weather channel states in local DB are synced with backend or not.
|
|
10
|
+
* @returns boolean
|
|
11
|
+
*/
|
|
12
|
+
static getSyncStatus: () => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Initializes the DBSyncManager. This function should be called only once
|
|
15
|
+
* throughout the lifetime of SDK.
|
|
16
|
+
*
|
|
17
|
+
* @param client
|
|
18
|
+
*/
|
|
19
|
+
static init: (client: StreamChat) => Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribes a listener for sync status change.
|
|
22
|
+
*
|
|
23
|
+
* @param listener {function}
|
|
24
|
+
* @returns {function} to unsubscribe the listener.
|
|
25
|
+
*/
|
|
26
|
+
static onSyncStatusChange: (listener: (status: boolean) => void) => {
|
|
27
|
+
unsubscribe: () => void;
|
|
28
|
+
};
|
|
29
|
+
static sync: () => Promise<void>;
|
|
30
|
+
static syncAndExecutePendingTasks: () => Promise<void>;
|
|
31
|
+
static queueTask: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, task, }: {
|
|
32
|
+
client: StreamChat<StreamChatGenerics>;
|
|
33
|
+
task: PendingTask;
|
|
34
|
+
}) => Promise<(import("stream-chat").APIResponse & {
|
|
35
|
+
message: import("stream-chat").MessageResponse<StreamChatGenerics>;
|
|
36
|
+
}) | undefined>;
|
|
37
|
+
static executeTask: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, task, }: {
|
|
38
|
+
client: StreamChat<StreamChatGenerics>;
|
|
39
|
+
task: PendingTask;
|
|
40
|
+
}) => Promise<import("stream-chat").APIResponse & {
|
|
41
|
+
message: import("stream-chat").MessageResponse<StreamChatGenerics>;
|
|
42
|
+
}>;
|
|
43
|
+
static executePendingTasks: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(client: StreamChat<StreamChatGenerics>) => Promise<void>;
|
|
44
|
+
dropPendingTasks: (conditions: {
|
|
45
|
+
messageId: string;
|
|
46
|
+
}) => void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Channel, UserResponse } from 'stream-chat';
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../types/types';
|
|
3
|
+
export declare const addReactionToLocalState: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, enforceUniqueReaction, messageId, reactionType, user, }: {
|
|
4
|
+
channel: Channel<StreamChatGenerics>;
|
|
5
|
+
enforceUniqueReaction: boolean;
|
|
6
|
+
messageId: string;
|
|
7
|
+
reactionType: string;
|
|
8
|
+
user: UserResponse<StreamChatGenerics>;
|
|
9
|
+
}) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StreamChat } from 'stream-chat';
|
|
2
|
+
import type { PendingTask } from '../store/types';
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../types/types';
|
|
4
|
+
export declare const queueTask: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, task, }: {
|
|
5
|
+
client: StreamChat<StreamChatGenerics>;
|
|
6
|
+
task: PendingTask;
|
|
7
|
+
}) => Promise<(import("stream-chat").APIResponse & {
|
|
8
|
+
message: import("stream-chat").MessageResponse<StreamChatGenerics>;
|
|
9
|
+
}) | undefined>;
|
|
10
|
+
export declare const executePendingTasks: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(client: StreamChat<StreamChatGenerics>) => Promise<void>;
|
|
11
|
+
export declare const dropPendingTasks: (conditions: {
|
|
12
|
+
messageId: string;
|
|
13
|
+
}) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Channel, UserResponse } from 'stream-chat';
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../types/types';
|
|
3
|
+
export declare const removeReactionFromLocalState: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, messageId, reactionType, user, }: {
|
|
4
|
+
channel: Channel<StreamChatGenerics>;
|
|
5
|
+
messageId: string;
|
|
6
|
+
reactionType: string;
|
|
7
|
+
user: UserResponse<StreamChatGenerics>;
|
|
8
|
+
}) => void;
|
|
@@ -5,7 +5,7 @@ import type { MentionAllAppUsersQuery } from '../contexts/messageInputContext/Me
|
|
|
5
5
|
import type { SuggestionCommand, SuggestionComponentType, SuggestionUser } from '../contexts/suggestionsContext/SuggestionsContext';
|
|
6
6
|
import { Emoji } from '../emoji-data/compiled';
|
|
7
7
|
import type { IconProps } from '../icons/utils/base';
|
|
8
|
-
import type { DefaultStreamChatGenerics } from '../types/types';
|
|
8
|
+
import type { DefaultStreamChatGenerics, ValueOf } from '../types/types';
|
|
9
9
|
export declare type ReactionData = {
|
|
10
10
|
Icon: React.FC<IconProps>;
|
|
11
11
|
type: string;
|
|
@@ -29,9 +29,8 @@ export declare const MessageStatusTypes: {
|
|
|
29
29
|
SENDING: string;
|
|
30
30
|
};
|
|
31
31
|
export declare type FileStateValue = typeof FileState[keyof typeof FileState];
|
|
32
|
-
declare type ValueOf<T> = T[keyof T];
|
|
33
32
|
declare type Progress = ValueOf<typeof ProgressIndicatorTypes>;
|
|
34
|
-
export declare const getIndicatorTypeForFileState: (fileState: FileStateValue) => Progress | null;
|
|
33
|
+
export declare const getIndicatorTypeForFileState: (fileState: FileStateValue, isOnline: boolean, enableOfflineSupport: boolean) => Progress | null;
|
|
35
34
|
export declare const queryMembersDebounced: DebouncedFunc<(<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>, query: SuggestionUser<StreamChatGenerics>["name"], onReady?: ((users: SuggestionUser<StreamChatGenerics>[]) => void) | undefined, options?: {
|
|
36
35
|
limit?: number;
|
|
37
36
|
}) => Promise<void>)>;
|
|
@@ -105,6 +104,7 @@ export declare type QueryMembersFunction<StreamChatGenerics extends DefaultStrea
|
|
|
105
104
|
export declare const ACITriggerSettings: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel, client, onMentionSelectItem, }: ACITriggerSettingsParams<StreamChatGenerics>) => TriggerSettings<StreamChatGenerics>;
|
|
106
105
|
export declare const makeImageCompatibleUrl: (url: string) => string;
|
|
107
106
|
export declare const getUrlWithoutParams: (url?: string | undefined) => string | undefined;
|
|
107
|
+
export declare const isLocalUrl: (url: string) => boolean;
|
|
108
108
|
export declare const vw: (percentageWidth: number, rounded?: boolean) => number;
|
|
109
109
|
export declare const vh: (percentageHeight: number, rounded?: boolean) => number;
|
|
110
110
|
export declare const generateRandomId: (a?: string) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.0-beta.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"react-native": "0.67.3",
|
|
137
137
|
"react-native-builder-bob": "0.18.1",
|
|
138
138
|
"react-native-gesture-handler": "2.3.1",
|
|
139
|
-
"react-native-quick-sqlite": "
|
|
139
|
+
"react-native-quick-sqlite": "5.1.0",
|
|
140
140
|
"react-native-reanimated": "2.7.0",
|
|
141
141
|
"react-native-svg": "12.1.1",
|
|
142
142
|
"react-native-typescript-transformer": "1.2.13",
|