stream-chat-react-native-core 5.0.0-offline-support.14 → 5.1.0-beta.1
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 +17 -8
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +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 +20 -18
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +11 -11
- package/lib/commonjs/components/Attachment/Giphy.js.map +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/Attachment/utils/getGiphyMimeType.js +15 -0
- package/lib/commonjs/components/Attachment/utils/getGiphyMimeType.js.map +1 -0
- 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/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 +2 -2
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +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/listeners/useNewMessage.js +16 -4
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +1 -1
- 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 +11 -7
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +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 +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +39 -31
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +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 +3 -3
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +6 -0
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/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 +7 -7
- 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 +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 +8 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +2 -2
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +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 +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +50 -32
- 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 +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +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 +6 -6
- package/lib/commonjs/components/MessageList/MessageList.js.map +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/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 +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +14 -15
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.md +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 +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 +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/themeContext/utils/theme.js +1 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +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/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/index.js +13 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +1 -13
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/event/messageNew.js +2 -0
- package/lib/commonjs/mock-builders/event/messageNew.js.map +1 -1
- package/lib/commonjs/store/QuickSqliteClient.js +7 -3
- package/lib/commonjs/store/QuickSqliteClient.js.map +1 -1
- package/lib/commonjs/store/apis/index.js +264 -0
- package/lib/commonjs/store/apis/index.js.map +1 -0
- package/lib/commonjs/test-utils/BetterSqlite.js +54 -0
- package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -0
- 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 +17 -8
- package/lib/module/components/Attachment/FileAttachment.js.map +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 +20 -18
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +1 -1
- package/lib/module/components/Attachment/Giphy.js +11 -11
- package/lib/module/components/Attachment/Giphy.js.map +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/Attachment/utils/getGiphyMimeType.js +15 -0
- package/lib/module/components/Attachment/utils/getGiphyMimeType.js.map +1 -0
- 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/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 +2 -2
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +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/listeners/useNewMessage.js +16 -4
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +1 -1
- 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 +11 -7
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +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 +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +39 -31
- package/lib/module/components/ImageGallery/ImageGallery.js.map +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 +3 -3
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +1 -1
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +6 -0
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +1 -1
- package/lib/module/components/Indicators/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 +7 -7
- 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 +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 +8 -4
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +2 -2
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +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 +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +50 -32
- 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 +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +1 -1
- package/lib/module/components/MessageInput/SendButton.js +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 +6 -6
- package/lib/module/components/MessageList/MessageList.js.map +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/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 +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +14 -15
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.md +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 +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 +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/themeContext/utils/theme.js +1 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +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/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/index.js +13 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock-builders/DB/mock.js +1 -13
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/mock-builders/event/messageNew.js +2 -0
- package/lib/module/mock-builders/event/messageNew.js.map +1 -1
- package/lib/module/store/QuickSqliteClient.js +7 -3
- package/lib/module/store/QuickSqliteClient.js.map +1 -1
- package/lib/module/store/apis/index.js +264 -0
- package/lib/module/store/apis/index.js.map +1 -0
- package/lib/module/test-utils/BetterSqlite.js +54 -0
- package/lib/module/test-utils/BetterSqlite.js.map +1 -0
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/getGiphyMimeType.d.ts +6 -0
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +2 -1
- package/lib/typescript/components/Message/Message.d.ts +9 -3
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +9 -10
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/store/QuickSqliteClient.d.ts +4 -0
- package/lib/typescript/store/apis/index.d.ts +20 -0
- package/lib/typescript/{__tests__/utils → test-utils}/BetterSqlite.d.ts +1 -1
- package/package.json +5 -4
- package/src/__tests__/offline-feature.test.js +1 -2
- package/src/components/Attachment/FileAttachment.tsx +3 -0
- package/src/components/Attachment/Gallery.tsx +20 -17
- package/src/components/Attachment/Giphy.tsx +8 -8
- package/src/components/Attachment/utils/getGiphyMimeType.ts +13 -0
- package/src/components/Channel/Channel.tsx +1 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +28 -0
- package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +18 -5
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +1 -1
- package/src/components/ChannelPreview/ChannelPreview.tsx +6 -3
- package/src/components/ImageGallery/ImageGallery.tsx +32 -19
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +6 -6
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +3 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryGrid.test.tsx +3 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +3 -3
- package/src/components/ImageGallery/components/ImageGrid.tsx +3 -3
- package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +16 -0
- package/src/components/Message/Message.tsx +9 -1
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +22 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -0
- package/src/components/Message/MessageSimple/utils/renderText.tsx +1 -1
- package/src/components/MessageInput/ImageUploadPreview.tsx +35 -9
- package/src/components/MessageList/MessageList.tsx +6 -6
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +4 -0
- package/src/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +19 -14
- package/src/contexts/themeContext/utils/theme.ts +2 -0
- package/src/index.ts +3 -0
- package/src/mock-builders/DB/mock.ts +4 -9
- package/src/mock-builders/event/messageNew.js +2 -0
- package/src/store/QuickSqliteClient.ts +11 -7
- package/src/store/apis/index.ts +20 -0
- package/src/{__tests__/utils → test-utils}/BetterSqlite.js +1 -1
- package/src/version.json +1 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
|
|
5
|
+
var _deleteChannel = require("./deleteChannel");
|
|
6
|
+
|
|
7
|
+
Object.keys(_deleteChannel).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _deleteChannel[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _deleteChannel[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
var _deleteMember = require("./deleteMember");
|
|
19
|
+
|
|
20
|
+
Object.keys(_deleteMember).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (key in exports && exports[key] === _deleteMember[key]) return;
|
|
23
|
+
Object.defineProperty(exports, key, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function get() {
|
|
26
|
+
return _deleteMember[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _deleteMessagesForChannel = require("./deleteMessagesForChannel");
|
|
32
|
+
|
|
33
|
+
Object.keys(_deleteMessagesForChannel).forEach(function (key) {
|
|
34
|
+
if (key === "default" || key === "__esModule") return;
|
|
35
|
+
if (key in exports && exports[key] === _deleteMessagesForChannel[key]) return;
|
|
36
|
+
Object.defineProperty(exports, key, {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _deleteMessagesForChannel[key];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
var _deleteReactions = require("./deleteReactions");
|
|
45
|
+
|
|
46
|
+
Object.keys(_deleteReactions).forEach(function (key) {
|
|
47
|
+
if (key === "default" || key === "__esModule") return;
|
|
48
|
+
if (key in exports && exports[key] === _deleteReactions[key]) return;
|
|
49
|
+
Object.defineProperty(exports, key, {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function get() {
|
|
52
|
+
return _deleteReactions[key];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var _getAllChannelIds = require("./getAllChannelIds");
|
|
58
|
+
|
|
59
|
+
Object.keys(_getAllChannelIds).forEach(function (key) {
|
|
60
|
+
if (key === "default" || key === "__esModule") return;
|
|
61
|
+
if (key in exports && exports[key] === _getAllChannelIds[key]) return;
|
|
62
|
+
Object.defineProperty(exports, key, {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _getAllChannelIds[key];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var _getChannelMessages = require("./getChannelMessages");
|
|
71
|
+
|
|
72
|
+
Object.keys(_getChannelMessages).forEach(function (key) {
|
|
73
|
+
if (key === "default" || key === "__esModule") return;
|
|
74
|
+
if (key in exports && exports[key] === _getChannelMessages[key]) return;
|
|
75
|
+
Object.defineProperty(exports, key, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function get() {
|
|
78
|
+
return _getChannelMessages[key];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
var _getChannels = require("./getChannels");
|
|
84
|
+
|
|
85
|
+
Object.keys(_getChannels).forEach(function (key) {
|
|
86
|
+
if (key === "default" || key === "__esModule") return;
|
|
87
|
+
if (key in exports && exports[key] === _getChannels[key]) return;
|
|
88
|
+
Object.defineProperty(exports, key, {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function get() {
|
|
91
|
+
return _getChannels[key];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
var _getChannelsForFilterSort = require("./getChannelsForFilterSort");
|
|
97
|
+
|
|
98
|
+
Object.keys(_getChannelsForFilterSort).forEach(function (key) {
|
|
99
|
+
if (key === "default" || key === "__esModule") return;
|
|
100
|
+
if (key in exports && exports[key] === _getChannelsForFilterSort[key]) return;
|
|
101
|
+
Object.defineProperty(exports, key, {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function get() {
|
|
104
|
+
return _getChannelsForFilterSort[key];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
var _getLastSyncedAt = require("./getLastSyncedAt");
|
|
110
|
+
|
|
111
|
+
Object.keys(_getLastSyncedAt).forEach(function (key) {
|
|
112
|
+
if (key === "default" || key === "__esModule") return;
|
|
113
|
+
if (key in exports && exports[key] === _getLastSyncedAt[key]) return;
|
|
114
|
+
Object.defineProperty(exports, key, {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _getLastSyncedAt[key];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
var _getMembers = require("./getMembers");
|
|
123
|
+
|
|
124
|
+
Object.keys(_getMembers).forEach(function (key) {
|
|
125
|
+
if (key === "default" || key === "__esModule") return;
|
|
126
|
+
if (key in exports && exports[key] === _getMembers[key]) return;
|
|
127
|
+
Object.defineProperty(exports, key, {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function get() {
|
|
130
|
+
return _getMembers[key];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
var _getReads = require("./getReads");
|
|
136
|
+
|
|
137
|
+
Object.keys(_getReads).forEach(function (key) {
|
|
138
|
+
if (key === "default" || key === "__esModule") return;
|
|
139
|
+
if (key in exports && exports[key] === _getReads[key]) return;
|
|
140
|
+
Object.defineProperty(exports, key, {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function get() {
|
|
143
|
+
return _getReads[key];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
var _updateMessage = require("./updateMessage");
|
|
149
|
+
|
|
150
|
+
Object.keys(_updateMessage).forEach(function (key) {
|
|
151
|
+
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _updateMessage[key]) return;
|
|
153
|
+
Object.defineProperty(exports, key, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function get() {
|
|
156
|
+
return _updateMessage[key];
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
var _updateReaction = require("./updateReaction");
|
|
162
|
+
|
|
163
|
+
Object.keys(_updateReaction).forEach(function (key) {
|
|
164
|
+
if (key === "default" || key === "__esModule") return;
|
|
165
|
+
if (key in exports && exports[key] === _updateReaction[key]) return;
|
|
166
|
+
Object.defineProperty(exports, key, {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function get() {
|
|
169
|
+
return _updateReaction[key];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
var _upsertChannelData = require("./upsertChannelData");
|
|
175
|
+
|
|
176
|
+
Object.keys(_upsertChannelData).forEach(function (key) {
|
|
177
|
+
if (key === "default" || key === "__esModule") return;
|
|
178
|
+
if (key in exports && exports[key] === _upsertChannelData[key]) return;
|
|
179
|
+
Object.defineProperty(exports, key, {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: function get() {
|
|
182
|
+
return _upsertChannelData[key];
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
var _upsertChannels = require("./upsertChannels");
|
|
188
|
+
|
|
189
|
+
Object.keys(_upsertChannels).forEach(function (key) {
|
|
190
|
+
if (key === "default" || key === "__esModule") return;
|
|
191
|
+
if (key in exports && exports[key] === _upsertChannels[key]) return;
|
|
192
|
+
Object.defineProperty(exports, key, {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function get() {
|
|
195
|
+
return _upsertChannels[key];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var _upsertCidsForQuery = require("./upsertCidsForQuery");
|
|
201
|
+
|
|
202
|
+
Object.keys(_upsertCidsForQuery).forEach(function (key) {
|
|
203
|
+
if (key === "default" || key === "__esModule") return;
|
|
204
|
+
if (key in exports && exports[key] === _upsertCidsForQuery[key]) return;
|
|
205
|
+
Object.defineProperty(exports, key, {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function get() {
|
|
208
|
+
return _upsertCidsForQuery[key];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
var _upsertLastSyncedAt = require("./upsertLastSyncedAt");
|
|
214
|
+
|
|
215
|
+
Object.keys(_upsertLastSyncedAt).forEach(function (key) {
|
|
216
|
+
if (key === "default" || key === "__esModule") return;
|
|
217
|
+
if (key in exports && exports[key] === _upsertLastSyncedAt[key]) return;
|
|
218
|
+
Object.defineProperty(exports, key, {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function get() {
|
|
221
|
+
return _upsertLastSyncedAt[key];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
var _upsertMembers = require("./upsertMembers");
|
|
227
|
+
|
|
228
|
+
Object.keys(_upsertMembers).forEach(function (key) {
|
|
229
|
+
if (key === "default" || key === "__esModule") return;
|
|
230
|
+
if (key in exports && exports[key] === _upsertMembers[key]) return;
|
|
231
|
+
Object.defineProperty(exports, key, {
|
|
232
|
+
enumerable: true,
|
|
233
|
+
get: function get() {
|
|
234
|
+
return _upsertMembers[key];
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
var _upsertMessages = require("./upsertMessages");
|
|
240
|
+
|
|
241
|
+
Object.keys(_upsertMessages).forEach(function (key) {
|
|
242
|
+
if (key === "default" || key === "__esModule") return;
|
|
243
|
+
if (key in exports && exports[key] === _upsertMessages[key]) return;
|
|
244
|
+
Object.defineProperty(exports, key, {
|
|
245
|
+
enumerable: true,
|
|
246
|
+
get: function get() {
|
|
247
|
+
return _upsertMessages[key];
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
var _upsertReads = require("./upsertReads");
|
|
253
|
+
|
|
254
|
+
Object.keys(_upsertReads).forEach(function (key) {
|
|
255
|
+
if (key === "default" || key === "__esModule") return;
|
|
256
|
+
if (key in exports && exports[key] === _upsertReads[key]) return;
|
|
257
|
+
Object.defineProperty(exports, key, {
|
|
258
|
+
enumerable: true,
|
|
259
|
+
get: function get() {
|
|
260
|
+
return _upsertReads[key];
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './deleteChannel';\nexport * from './deleteMember';\nexport * from './deleteMessagesForChannel';\nexport * from './deleteReactions';\nexport * from './getAllChannelIds';\nexport * from './getChannelMessages';\nexport * from './getChannels';\nexport * from './getChannelsForFilterSort';\nexport * from './getLastSyncedAt';\nexport * from './getMembers';\nexport * from './getReads';\nexport * from './updateMessage';\nexport * from './updateReaction';\nexport * from './upsertChannelData';\nexport * from './upsertChannels';\nexport * from './upsertCidsForQuery';\nexport * from './upsertLastSyncedAt';\nexport * from './upsertMembers';\nexport * from './upsertMessages';\nexport * from './upsertReads';\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BetterSqlite = void 0;
|
|
7
|
+
|
|
8
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _betterSqlite = _interopRequireDefault(require("better-sqlite3"));
|
|
13
|
+
|
|
14
|
+
var _schema = require("../store/schema");
|
|
15
|
+
|
|
16
|
+
var BetterSqlite = (0, _createClass2["default"])(function BetterSqlite() {
|
|
17
|
+
(0, _classCallCheck2["default"])(this, BetterSqlite);
|
|
18
|
+
this.db = null;
|
|
19
|
+
});
|
|
20
|
+
exports.BetterSqlite = BetterSqlite;
|
|
21
|
+
|
|
22
|
+
BetterSqlite.openDB = function () {
|
|
23
|
+
BetterSqlite.db = new _betterSqlite["default"]('foobar.db');
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
BetterSqlite.closeDB = function () {
|
|
27
|
+
BetterSqlite.db.close();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
BetterSqlite.getTables = function () {
|
|
31
|
+
BetterSqlite.openDB();
|
|
32
|
+
var tablesInDb = BetterSqlite.db.pragma("table_list;");
|
|
33
|
+
BetterSqlite.closeDB();
|
|
34
|
+
return tablesInDb;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
BetterSqlite.dropAllTables = function () {
|
|
38
|
+
BetterSqlite.openDB();
|
|
39
|
+
var tableNames = Object.keys(_schema.tables);
|
|
40
|
+
tableNames.forEach(function (name) {
|
|
41
|
+
var stmt = BetterSqlite.db.prepare("DROP TABLE IF EXISTS " + name);
|
|
42
|
+
stmt.run();
|
|
43
|
+
});
|
|
44
|
+
BetterSqlite.closeDB();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
BetterSqlite.selectFromTable = function (table) {
|
|
48
|
+
BetterSqlite.openDB();
|
|
49
|
+
var stmt = BetterSqlite.db.prepare("SELECT * FROM " + table);
|
|
50
|
+
var result = stmt.all();
|
|
51
|
+
BetterSqlite.closeDB();
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=BetterSqlite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["BetterSqlite.js"],"names":["BetterSqlite","db","openDB","Database","closeDB","close","getTables","tablesInDb","pragma","dropAllTables","tableNames","Object","keys","tables","forEach","name","stmt","prepare","run","selectFromTable","table","result","all"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;IAEaA,Y;;OACXC,E,GAAK,I;;;;AADMD,Y,CAGJE,M,GAAS,YAAM;AAHXF,EAAAA,YAIT,CAAKC,EAAL,GAAU,IAAIE,wBAAJ,CAAa,WAAb,CAAV;AACD,C;;AALUH,Y,CAOJI,O,GAAU,YAAM;AAPZJ,EAAAA,YAQT,CAAKC,EAAL,CAAQI,KAAR;AACD,C;;AATUL,Y,CAWJM,S,GAAY,YAAM;AAXdN,EAAAA,YAYT,CAAKE,MAAL;AACA,MAAMK,UAAU,GAbPP,YAaU,CAAKC,EAAL,CAAQO,MAAR,eAAnB;AAbSR,EAAAA,YAcT,CAAKI,OAAL;AAEA,SAAOG,UAAP;AACD,C;;AAjBUP,Y,CAmBJS,a,GAAgB,YAAM;AAnBlBT,EAAAA,YAoBT,CAAKE,MAAL;AACA,MAAMQ,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYC,cAAZ,CAAnB;AAEAH,EAAAA,UAAU,CAACI,OAAX,CAAmB,UAACC,IAAD,EAAU;AAC3B,QAAMC,IAAI,GAxBHhB,YAwBM,CAAKC,EAAL,CAAQgB,OAAR,2BAAwCF,IAAxC,CAAb;AACAC,IAAAA,IAAI,CAACE,GAAL;AACD,GAHD;AAvBSlB,EAAAA,YA4BT,CAAKI,OAAL;AACD,C;;AA7BUJ,Y,CA+BJmB,e,GAAkB,UAACC,KAAD,EAAW;AA/BzBpB,EAAAA,YAgCT,CAAKE,MAAL;AACA,MAAMc,IAAI,GAjCDhB,YAiCI,CAAKC,EAAL,CAAQgB,OAAR,oBAAiCG,KAAjC,CAAb;AACA,MAAMC,MAAM,GAAGL,IAAI,CAACM,GAAL,EAAf;AAlCStB,EAAAA,YAmCT,CAAKI,OAAL;AAEA,SAAOiB,MAAP;AACD,C","sourcesContent":["import Database from 'better-sqlite3';\n\nimport { tables } from '../store/schema';\n\nexport class BetterSqlite {\n db = null;\n\n static openDB = () => {\n this.db = new Database('foobar.db');\n };\n\n static closeDB = () => {\n this.db.close();\n };\n\n static getTables = () => {\n this.openDB();\n const tablesInDb = this.db.pragma(`table_list;`);\n this.closeDB();\n\n return tablesInDb;\n };\n\n static dropAllTables = () => {\n this.openDB();\n const tableNames = Object.keys(tables);\n\n tableNames.forEach((name) => {\n const stmt = this.db.prepare(`DROP TABLE IF EXISTS ${name}`);\n stmt.run();\n });\n\n this.closeDB();\n };\n\n static selectFromTable = (table) => {\n this.openDB();\n const stmt = this.db.prepare(`SELECT * FROM ${table}`);\n const result = stmt.all();\n this.closeDB();\n\n return result;\n };\n}\n"]}
|
|
@@ -24,7 +24,7 @@ var _MessagesContext = require("../../contexts/messagesContext/MessagesContext")
|
|
|
24
24
|
var _native = require("../../native");
|
|
25
25
|
|
|
26
26
|
var _this = this,
|
|
27
|
-
_jsxFileName = "/
|
|
27
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/Attachment.tsx";
|
|
28
28
|
|
|
29
29
|
var AttachmentWithContext = function AttachmentWithContext(props) {
|
|
30
30
|
var _attachment$actions;
|
|
@@ -21,7 +21,7 @@ var _excluded = ["defaultBackgroundColor", "defaultBorderColor", "primaryBackgro
|
|
|
21
21
|
_excluded2 = ["defaultColor", "primaryColor"];
|
|
22
22
|
|
|
23
23
|
var _this = this,
|
|
24
|
-
_jsxFileName = "/
|
|
24
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/AttachmentActions.tsx";
|
|
25
25
|
|
|
26
26
|
var styles = _reactNative.StyleSheet.create({
|
|
27
27
|
actionButton: {
|
|
@@ -30,7 +30,7 @@ var _native = require("../../native");
|
|
|
30
30
|
var _ProgressControl = require("../ProgressControl/ProgressControl");
|
|
31
31
|
|
|
32
32
|
var _this = this,
|
|
33
|
-
_jsxFileName = "/
|
|
33
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/AudioAttachment.tsx";
|
|
34
34
|
|
|
35
35
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
36
|
|
|
@@ -28,7 +28,7 @@ var _utils = require("../../utils/utils");
|
|
|
28
28
|
var _excluded = ["description", "title"];
|
|
29
29
|
|
|
30
30
|
var _this = this,
|
|
31
|
-
_jsxFileName = "/
|
|
31
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/Card.tsx";
|
|
32
32
|
|
|
33
33
|
var styles = _reactNative.StyleSheet.create({
|
|
34
34
|
authorName: {
|
|
@@ -26,7 +26,7 @@ var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
|
26
26
|
var _utils = require("../../utils/utils");
|
|
27
27
|
|
|
28
28
|
var _this = this,
|
|
29
|
-
_jsxFileName = "/
|
|
29
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/FileAttachment.tsx";
|
|
30
30
|
|
|
31
31
|
var styles = _reactNative.StyleSheet.create({
|
|
32
32
|
container: {
|
|
@@ -84,6 +84,9 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
84
84
|
onLongPress: function onLongPress(event) {
|
|
85
85
|
if (_onLongPress) {
|
|
86
86
|
_onLongPress({
|
|
87
|
+
additionalInfo: {
|
|
88
|
+
attachment: attachment
|
|
89
|
+
},
|
|
87
90
|
emitter: 'fileAttachment',
|
|
88
91
|
event: event
|
|
89
92
|
});
|
|
@@ -92,6 +95,9 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
92
95
|
onPress: function onPress(event) {
|
|
93
96
|
if (_onPress) {
|
|
94
97
|
_onPress({
|
|
98
|
+
additionalInfo: {
|
|
99
|
+
attachment: attachment
|
|
100
|
+
},
|
|
95
101
|
defaultHandler: defaultOnPress,
|
|
96
102
|
emitter: 'fileAttachment',
|
|
97
103
|
event: event
|
|
@@ -101,6 +107,9 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
101
107
|
onPressIn: function onPressIn(event) {
|
|
102
108
|
if (_onPressIn) {
|
|
103
109
|
_onPressIn({
|
|
110
|
+
additionalInfo: {
|
|
111
|
+
attachment: attachment
|
|
112
|
+
},
|
|
104
113
|
defaultHandler: defaultOnPress,
|
|
105
114
|
emitter: 'fileAttachment',
|
|
106
115
|
event: event
|
|
@@ -122,7 +131,7 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
122
131
|
__self: _this,
|
|
123
132
|
__source: {
|
|
124
133
|
fileName: _jsxFileName,
|
|
125
|
-
lineNumber:
|
|
134
|
+
lineNumber: 135,
|
|
126
135
|
columnNumber: 7
|
|
127
136
|
}
|
|
128
137
|
}, _react["default"].createElement(FileAttachmentIcon, {
|
|
@@ -131,7 +140,7 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
131
140
|
__self: _this,
|
|
132
141
|
__source: {
|
|
133
142
|
fileName: _jsxFileName,
|
|
134
|
-
lineNumber:
|
|
143
|
+
lineNumber: 136,
|
|
135
144
|
columnNumber: 9
|
|
136
145
|
}
|
|
137
146
|
}), _react["default"].createElement(_reactNative.View, {
|
|
@@ -139,7 +148,7 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
139
148
|
__self: _this,
|
|
140
149
|
__source: {
|
|
141
150
|
fileName: _jsxFileName,
|
|
142
|
-
lineNumber:
|
|
151
|
+
lineNumber: 137,
|
|
143
152
|
columnNumber: 9
|
|
144
153
|
}
|
|
145
154
|
}, _react["default"].createElement(_reactNative.Text, {
|
|
@@ -150,7 +159,7 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
150
159
|
__self: _this,
|
|
151
160
|
__source: {
|
|
152
161
|
fileName: _jsxFileName,
|
|
153
|
-
lineNumber:
|
|
162
|
+
lineNumber: 138,
|
|
154
163
|
columnNumber: 11
|
|
155
164
|
}
|
|
156
165
|
}, attachment.title), _react["default"].createElement(_reactNative.Text, {
|
|
@@ -160,14 +169,14 @@ var FileAttachmentWithContext = function FileAttachmentWithContext(props) {
|
|
|
160
169
|
__self: _this,
|
|
161
170
|
__source: {
|
|
162
171
|
fileName: _jsxFileName,
|
|
163
|
-
lineNumber:
|
|
172
|
+
lineNumber: 141,
|
|
164
173
|
columnNumber: 11
|
|
165
174
|
}
|
|
166
175
|
}, getFileSizeDisplayText(attachment.file_size)))), (_attachment$actions = attachment.actions) != null && _attachment$actions.length ? _react["default"].createElement(AttachmentActions, (0, _extends2["default"])({}, attachment, {
|
|
167
176
|
__self: _this,
|
|
168
177
|
__source: {
|
|
169
178
|
fileName: _jsxFileName,
|
|
170
|
-
lineNumber:
|
|
179
|
+
lineNumber: 146,
|
|
171
180
|
columnNumber: 37
|
|
172
181
|
}
|
|
173
182
|
})) : null);
|
|
@@ -199,7 +208,7 @@ var FileAttachment = function FileAttachment(props) {
|
|
|
199
208
|
__self: _this,
|
|
200
209
|
__source: {
|
|
201
210
|
fileName: _jsxFileName,
|
|
202
|
-
lineNumber:
|
|
211
|
+
lineNumber: 169,
|
|
203
212
|
columnNumber: 5
|
|
204
213
|
}
|
|
205
214
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FileAttachment.tsx"],"names":["styles","StyleSheet","create","container","alignItems","borderRadius","flexDirection","padding","details","maxWidth","paddingLeft","size","fontSize","title","fontWeight","FileAttachmentWithContext","props","additionalTouchableProps","attachment","attachmentSize","AttachmentActions","FileAttachmentIcon","onLongPress","onPress","onPressIn","preventPress","stylesProp","theme","colors","black","grey","white","messageSimple","file","fileSize","defaultOnPress","asset_url","event","emitter","defaultHandler","backgroundColor","mime_type","color","getFileSizeDisplayText","file_size","actions","length","FileAttachment","AttachmentActionsDefault","FileIconDefault","parseFloat","Math","floor","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AAYA;;AAEA;;AACA;;AACA;;AAIA;;AAIA;;AAEA;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,YAAY,EAAE,EAFL;AAGTC,IAAAA,aAAa,EAAE,KAHN;AAITC,IAAAA,OAAO,EAAE;AAJA,GADoB;AAO/BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAE,eAAG,EAAH,CADH;AAEPC,IAAAA,WAAW,EAAE;AAFN,GAPsB;AAW/BC,EAAAA,IAAI,EAAE;AACJC,IAAAA,QAAQ,EAAE;AADN,GAXyB;AAc/BC,EAAAA,KAAK,EAAE;AACLD,IAAAA,QAAQ,EAAE,EADL;AAELE,IAAAA,UAAU,EAAE;AAFP;AAdwB,CAAlB,CAAf;;AAyCA,IAAMC,yBAAyB,GAAG,SAA5BA,yBAA4B,CAGhCC,KAHgC,EAI7B;AAAA;;AACH,MACEC,wBADF,GAWID,KAXJ,CACEC,wBADF;AAAA,MAEEC,UAFF,GAWIF,KAXJ,CAEEE,UAFF;AAAA,MAGEC,cAHF,GAWIH,KAXJ,CAGEG,cAHF;AAAA,MAIEC,iBAJF,GAWIJ,KAXJ,CAIEI,iBAJF;AAAA,MAKEC,kBALF,GAWIL,KAXJ,CAKEK,kBALF;AAAA,MAMEC,YANF,GAWIN,KAXJ,CAMEM,WANF;AAAA,MAOEC,QAPF,GAWIP,KAXJ,CAOEO,OAPF;AAAA,MAQEC,UARF,GAWIR,KAXJ,CAQEQ,SARF;AAAA,MASEC,YATF,GAWIT,KAXJ,CASES,YATF;AAAA,sBAW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SAAUwC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACC,KAAL,CAAWzC,IAAI,GAAG,KAAlB,IAA2B,GAAtC,CAAV;AACD,CAXM;;;AAaPoC,cAAc,CAACM,WAAf,GAA6B,qCAA7B","sourcesContent":["import React from 'react';\nimport {\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n TouchableOpacity,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { openUrlSafely } from './utils/openUrlSafely';\n\nimport { AttachmentActions as AttachmentActionsDefault } from '../../components/Attachment/AttachmentActions';\nimport { FileIcon as FileIconDefault } from '../../components/Attachment/FileIcon';\nimport {\n MessageContextValue,\n useMessageContext,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { vw } from '../../utils/utils';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n borderRadius: 12,\n flexDirection: 'row',\n padding: 8,\n },\n details: {\n maxWidth: vw(60),\n paddingLeft: 16,\n },\n size: {\n fontSize: 12,\n },\n title: {\n fontSize: 14,\n fontWeight: '700',\n },\n});\n\nexport type FileAttachmentPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n MessageContextValue<StreamChatGenerics>,\n 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'\n> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'AttachmentActions' | 'FileAttachmentIcon'\n > & {\n /** The attachment to render */\n attachment: Attachment<StreamChatGenerics>;\n attachmentSize?: number;\n styles?: Partial<{\n container: StyleProp<ViewStyle>;\n details: StyleProp<ViewStyle>;\n size: StyleProp<TextStyle>;\n title: StyleProp<TextStyle>;\n }>;\n };\n\nconst FileAttachmentWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: FileAttachmentPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n additionalTouchableProps,\n attachment,\n attachmentSize,\n AttachmentActions,\n FileAttachmentIcon,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n styles: stylesProp = {},\n } = props;\n\n const {\n theme: {\n colors: { black, grey, white },\n messageSimple: {\n file: { container, details, fileSize, title },\n },\n },\n } = useTheme();\n\n const defaultOnPress = () => openUrlSafely(attachment.asset_url);\n\n return (\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n defaultHandler: defaultOnPress,\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n defaultHandler: defaultOnPress,\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n testID='file-attachment'\n {...additionalTouchableProps}\n >\n <View style={[styles.container, { backgroundColor: white }, container, stylesProp.container]}>\n <FileAttachmentIcon mimeType={attachment.mime_type} size={attachmentSize} />\n <View style={[styles.details, details, stylesProp.details]}>\n <Text numberOfLines={2} style={[styles.title, { color: black }, title, stylesProp.title]}>\n {attachment.title}\n </Text>\n <Text style={[styles.size, { color: grey }, fileSize, stylesProp.size]}>\n {getFileSizeDisplayText(attachment.file_size)}\n </Text>\n </View>\n </View>\n {attachment.actions?.length ? <AttachmentActions {...attachment} /> : null}\n </TouchableOpacity>\n );\n};\n\nexport type FileAttachmentProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>> &\n Pick<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>;\n\nexport const FileAttachment = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: FileAttachmentProps<StreamChatGenerics>,\n) => {\n const { onLongPress, onPress, onPressIn, preventPress } = useMessageContext<StreamChatGenerics>();\n const {\n additionalTouchableProps,\n AttachmentActions = AttachmentActionsDefault,\n FileAttachmentIcon = FileIconDefault,\n } = useMessagesContext<StreamChatGenerics>();\n\n return (\n <FileAttachmentWithContext\n {...{\n additionalTouchableProps,\n AttachmentActions,\n FileAttachmentIcon,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n }}\n {...props}\n />\n );\n};\n\nexport const getFileSizeDisplayText = (size?: number | string) => {\n if (!size) return;\n if (typeof size === 'string') {\n size = parseFloat(size);\n }\n\n if (size < 1000 * 1000) {\n return `${Math.floor(Math.floor(size / 10) / 100)} KB`;\n }\n\n return `${Math.floor(Math.floor(size / 10000) / 100)} MB`;\n};\n\nFileAttachment.displayName = 'FileAttachment{messageSimple{file}}';\n"]}
|
|
1
|
+
{"version":3,"sources":["FileAttachment.tsx"],"names":["styles","StyleSheet","create","container","alignItems","borderRadius","flexDirection","padding","details","maxWidth","paddingLeft","size","fontSize","title","fontWeight","FileAttachmentWithContext","props","additionalTouchableProps","attachment","attachmentSize","AttachmentActions","FileAttachmentIcon","onLongPress","onPress","onPressIn","preventPress","stylesProp","theme","colors","black","grey","white","messageSimple","file","fileSize","defaultOnPress","asset_url","event","additionalInfo","emitter","defaultHandler","backgroundColor","mime_type","color","getFileSizeDisplayText","file_size","actions","length","FileAttachment","AttachmentActionsDefault","FileIconDefault","parseFloat","Math","floor","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AAYA;;AAEA;;AACA;;AACA;;AAIA;;AAIA;;AAEA;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,QADH;AAETC,IAAAA,YAAY,EAAE,EAFL;AAGTC,IAAAA,aAAa,EAAE,KAHN;AAITC,IAAAA,OAAO,EAAE;AAJA,GADoB;A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le,\n} from 'react-native';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { openUrlSafely } from './utils/openUrlSafely';\n\nimport { AttachmentActions as AttachmentActionsDefault } from '../../components/Attachment/AttachmentActions';\nimport { FileIcon as FileIconDefault } from '../../components/Attachment/FileIcon';\nimport {\n MessageContextValue,\n useMessageContext,\n} from '../../contexts/messageContext/MessageContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { vw } from '../../utils/utils';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n borderRadius: 12,\n flexDirection: 'row',\n padding: 8,\n },\n details: {\n maxWidth: vw(60),\n paddingLeft: 16,\n },\n size: {\n fontSize: 12,\n },\n title: {\n fontSize: 14,\n fontWeight: '700',\n },\n});\n\nexport type FileAttachmentPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<\n MessageContextValue<StreamChatGenerics>,\n 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'\n> &\n Pick<\n MessagesContextValue<StreamChatGenerics>,\n 'additionalTouchableProps' | 'AttachmentActions' | 'FileAttachmentIcon'\n > & {\n /** The attachment to render */\n attachment: Attachment<StreamChatGenerics>;\n attachmentSize?: number;\n styles?: Partial<{\n container: StyleProp<ViewStyle>;\n details: StyleProp<ViewStyle>;\n size: StyleProp<TextStyle>;\n title: StyleProp<TextStyle>;\n }>;\n };\n\nconst FileAttachmentWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: FileAttachmentPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n additionalTouchableProps,\n attachment,\n attachmentSize,\n AttachmentActions,\n FileAttachmentIcon,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n styles: stylesProp = {},\n } = props;\n\n const {\n theme: {\n colors: { black, grey, white },\n messageSimple: {\n file: { container, details, fileSize, title },\n },\n },\n } = useTheme();\n\n const defaultOnPress = () => openUrlSafely(attachment.asset_url);\n\n return (\n <TouchableOpacity\n disabled={preventPress}\n onLongPress={(event) => {\n if (onLongPress) {\n onLongPress({\n additionalInfo: { attachment },\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n onPress={(event) => {\n if (onPress) {\n onPress({\n additionalInfo: { attachment },\n defaultHandler: defaultOnPress,\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n onPressIn={(event) => {\n if (onPressIn) {\n onPressIn({\n additionalInfo: { attachment },\n defaultHandler: defaultOnPress,\n emitter: 'fileAttachment',\n event,\n });\n }\n }}\n testID='file-attachment'\n {...additionalTouchableProps}\n >\n <View style={[styles.container, { backgroundColor: white }, container, stylesProp.container]}>\n <FileAttachmentIcon mimeType={attachment.mime_type} size={attachmentSize} />\n <View style={[styles.details, details, stylesProp.details]}>\n <Text numberOfLines={2} style={[styles.title, { color: black }, title, stylesProp.title]}>\n {attachment.title}\n </Text>\n <Text style={[styles.size, { color: grey }, fileSize, stylesProp.size]}>\n {getFileSizeDisplayText(attachment.file_size)}\n </Text>\n </View>\n </View>\n {attachment.actions?.length ? <AttachmentActions {...attachment} /> : null}\n </TouchableOpacity>\n );\n};\n\nexport type FileAttachmentProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<Omit<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>> &\n Pick<FileAttachmentPropsWithContext<StreamChatGenerics>, 'attachment'>;\n\nexport const FileAttachment = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: FileAttachmentProps<StreamChatGenerics>,\n) => {\n const { onLongPress, onPress, onPressIn, preventPress } = useMessageContext<StreamChatGenerics>();\n const {\n additionalTouchableProps,\n AttachmentActions = AttachmentActionsDefault,\n FileAttachmentIcon = FileIconDefault,\n } = useMessagesContext<StreamChatGenerics>();\n\n return (\n <FileAttachmentWithContext\n {...{\n additionalTouchableProps,\n AttachmentActions,\n FileAttachmentIcon,\n onLongPress,\n onPress,\n onPressIn,\n preventPress,\n }}\n {...props}\n />\n );\n};\n\nexport const getFileSizeDisplayText = (size?: number | string) => {\n if (!size) return;\n if (typeof size === 'string') {\n size = parseFloat(size);\n }\n\n if (size < 1000 * 1000) {\n return `${Math.floor(Math.floor(size / 10) / 100)} KB`;\n }\n\n return `${Math.floor(Math.floor(size / 10000) / 100)} MB`;\n};\n\nFileAttachment.displayName = 'FileAttachment{messageSimple{file}}';\n"]}
|
|
@@ -26,7 +26,7 @@ var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
|
26
26
|
var _native = require("../../native");
|
|
27
27
|
|
|
28
28
|
var _this = this,
|
|
29
|
-
_jsxFileName = "/
|
|
29
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/FileAttachmentGroup.tsx";
|
|
30
30
|
|
|
31
31
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
32
32
|
|
|
@@ -52,7 +52,7 @@ var _XLSX = require("../../icons/XLSX");
|
|
|
52
52
|
var _ZIP = require("../../icons/ZIP");
|
|
53
53
|
|
|
54
54
|
var _this = this,
|
|
55
|
-
_jsxFileName = "/
|
|
55
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Attachment/FileIcon.tsx";
|
|
56
56
|
|
|
57
57
|
var audioFileTypes = ['audio/1d-interleaved-parityfec', 'audio/32kadpcm', 'audio/3gpp', 'audio/3gpp2', 'audio/aac', 'audio/ac3', 'audio/AMR', 'audio/AMR-WB', 'audio/amr-wb+', 'audio/aptx', 'audio/asc', 'audio/ATRAC-ADVANCED-LOSSLESS', 'audio/ATRAC-X', 'audio/ATRAC3', 'audio/basic', 'audio/BV16', 'audio/BV32', 'audio/clearmode', 'audio/CN', 'audio/DAT12', 'audio/dls', 'audio/dsr-es201108', 'audio/dsr-es202050', 'audio/dsr-es202211', 'audio/dsr-es202212', 'audio/DV', 'audio/DVI4', 'audio/eac3', 'audio/encaprtp', 'audio/EVRC', 'audio/EVRC-QCP', 'audio/EVRC0', 'audio/EVRC1', 'audio/EVRCB', 'audio/EVRCB0', 'audio/EVRCB1', 'audio/EVRCNW', 'audio/EVRCNW0', 'audio/EVRCNW1', 'audio/EVRCWB', 'audio/EVRCWB0', 'audio/EVRCWB1', 'audio/EVS', 'audio/example', 'audio/flexfec', 'audio/fwdred', 'audio/G711-0', 'audio/G719', 'audio/G7221', 'audio/G722', 'audio/G723', 'audio/G726-16', 'audio/G726-24', 'audio/G726-32', 'audio/G726-40', 'audio/G728', 'audio/G729', 'audio/G7291', 'audio/G729D', 'audio/G729E', 'audio/GSM', 'audio/GSM-EFR', 'audio/GSM-HR-08', 'audio/iLBC', 'audio/ip-mr_v2.5', 'audio/L8', 'audio/L16', 'audio/L20', 'audio/L24', 'audio/LPC', 'audio/MELP', 'audio/MELP600', 'audio/MELP1200', 'audio/MELP2400', 'audio/mhas', 'audio/mobile-xmf', 'audio/MPA', 'audio/mp4', 'audio/MP4A-LATM', 'audio/mpa-robust', 'audio/mpeg', 'audio/mpeg4-generic', 'audio/ogg', 'audio/opus', 'audio/parityfec', 'audio/PCMA', 'audio/PCMA-WB', 'audio/PCMU', 'audio/PCMU-WB', 'audio/prs.sid', 'audio/raptorfec', 'audio/RED', 'audio/rtp-enc-aescm128', 'audio/rtploopback', 'audio/rtp-midi', 'audio/rtx', 'audio/SMV', 'audio/SMV0', 'audio/SMV-QCP', 'audio/sofa', 'audio/sp-midi', 'audio/speex', 'audio/t140c', 'audio/t38', 'audio/telephone-event', 'audio/TETRA_ACELP', 'audio/TETRA_ACELP_BB', 'audio/tone', 'audio/TSVCIS', 'audio/UEMCLIP', 'audio/ulpfec', 'audio/usac', 'audio/VDVI', 'audio/VMR-WB', 'audio/vnd.3gpp.iufp', 'audio/vnd.4SB', 'audio/vnd.audiokoz', 'audio/vnd.CELP', 'audio/vnd.cisco.nse', 'audio/vnd.cmles.radio-events', 'audio/vnd.cns.anp1', 'audio/vnd.cns.inf1', 'audio/vnd.dece.audio', 'audio/vnd.digital-winds', 'audio/vnd.dlna.adts', 'audio/vnd.dolby.heaac.1', 'audio/vnd.dolby.heaac.2', 'audio/vnd.dolby.mlp', 'audio/vnd.dolby.mps', 'audio/vnd.dolby.pl2', 'audio/vnd.dolby.pl2x', 'audio/vnd.dolby.pl2z', 'audio/vnd.dolby.pulse.1', 'audio/vnd.dra', 'audio/vnd.dts', 'audio/vnd.dts.hd', 'audio/vnd.dts.uhd', 'audio/vnd.dvb.file', 'audio/vnd.everad.plj', 'audio/vnd.hns.audio', 'audio/vnd.lucent.voice', 'audio/vnd.ms-playready.media.pya', 'audio/vnd.nokia.mobile-xmf', 'audio/vnd.nortel.vbk', 'audio/vnd.nuera.ecelp4800', 'audio/vnd.nuera.ecelp7470', 'audio/vnd.nuera.ecelp9600', 'audio/vnd.octel.sbc', 'audio/vnd.presonus.multitrack', 'audio/vnd.qcelp', 'audio/vnd.rhetorex.32kadpcm', 'audio/vnd.rip', 'audio/vnd.sealedmedia.softseal.mpeg', 'audio/vnd.vmx.cvsd', 'audio/vorbis', 'audio/vorbis-config'];
|
|
58
58
|
var docMimeTypes = ['application/msword', 'application/msword-template', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.text-template', 'application/vnd.oasis.opendocument.text-flat-xml'];
|