stream-chat-react-native-core 5.0.0-offline-support.12 → 5.0.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/{MessageInput/AudioAttachmentUploadPreview.js → Attachment/AudioAttachment.js} +38 -64
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -0
- package/lib/commonjs/components/Attachment/Card.js +1 -0
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +16 -7
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +132 -12
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +41 -35
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +17 -13
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/VideoThumbnail.js +12 -6
- package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +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/Channel/Channel.js +19 -19
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +0 -2
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +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 +12 -7
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +10 -6
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +38 -30
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +11 -10
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +2 -2
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +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/Message/Message.js +7 -7
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +7 -3
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +38 -44
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +5 -5
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +10 -9
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/index.js +13 -13
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +13 -14
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +0 -2
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +2 -2
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +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/getChannels.js +2 -15
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +37 -0
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -0
- package/lib/commonjs/store/apis/index.js +264 -0
- package/lib/commonjs/store/apis/index.js.map +1 -0
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +1 -1
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannels.js +2 -2
- package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js +1 -2
- package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js.map +1 -1
- 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/{MessageInput/AudioAttachmentUploadPreview.js → Attachment/AudioAttachment.js} +38 -64
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -0
- package/lib/module/components/Attachment/Card.js +1 -0
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +16 -7
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +132 -12
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +41 -35
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +17 -13
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/VideoThumbnail.js +12 -6
- package/lib/module/components/Attachment/VideoThumbnail.js.map +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/Channel/Channel.js +19 -19
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +0 -2
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +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 +12 -7
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +10 -6
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +38 -30
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +11 -10
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +2 -2
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +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/Message/Message.js +7 -7
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +7 -3
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +38 -44
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +5 -5
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +10 -9
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/index.js +13 -13
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +13 -14
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +0 -2
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +2 -2
- package/lib/module/contexts/themeContext/utils/theme.js.map +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/getChannels.js +2 -15
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +37 -0
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -0
- package/lib/module/store/apis/index.js +264 -0
- package/lib/module/store/apis/index.js.map +1 -0
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +1 -1
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannels.js +2 -2
- package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/module/store/sqlite-utils/appendWhereCluase.js +1 -2
- package/lib/module/store/sqlite-utils/appendWhereCluase.js.map +1 -1
- 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/AudioAttachment.d.ts +23 -0
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +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/Channel/Channel.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- 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/MessageInput/FileUploadPreview.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +9 -10
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -4
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -0
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +2 -2
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/store/QuickSqliteClient.d.ts +4 -0
- package/lib/typescript/store/apis/getChannels.d.ts +13 -5
- package/lib/typescript/store/apis/getChannelsForFilterSort.d.ts +17 -0
- package/lib/typescript/store/apis/index.d.ts +20 -0
- package/lib/typescript/store/apis/queries/selectChannelIdsForFilterSort.d.ts +10 -1
- 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/{MessageInput/AudioAttachmentUploadPreview.tsx → Attachment/AudioAttachment.tsx} +82 -131
- package/src/components/Attachment/Card.tsx +1 -0
- package/src/components/Attachment/FileAttachment.tsx +3 -0
- package/src/components/Attachment/FileAttachmentGroup.tsx +119 -9
- package/src/components/Attachment/Gallery.tsx +30 -19
- package/src/components/Attachment/Giphy.tsx +15 -8
- package/src/components/Attachment/VideoThumbnail.tsx +3 -2
- package/src/components/Attachment/utils/getGiphyMimeType.ts +13 -0
- package/src/components/Channel/Channel.tsx +5 -4
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +0 -2
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
- 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 +19 -10
- 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/ImageGalleryVideoControl.tsx +12 -7
- package/src/components/ImageGallery/components/ImageGrid.tsx +3 -3
- package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +16 -0
- package/src/components/Message/Message.tsx +10 -2
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +22 -2
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +4 -2
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +4 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +1 -1
- package/src/components/Message/MessageSimple/utils/renderText.tsx +1 -1
- package/src/components/MessageInput/FileUploadPreview.tsx +34 -26
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +15 -8
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +15 -8
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +5 -5
- package/src/components/MessageList/MessageList.tsx +6 -6
- package/src/components/MessageOverlay/MessageOverlay.tsx +1 -0
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +4 -0
- package/src/components/index.ts +1 -1
- package/src/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +19 -14
- package/src/contexts/messageInputContext/MessageInputContext.tsx +0 -6
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +0 -2
- package/src/contexts/messagesContext/MessagesContext.tsx +3 -0
- package/src/contexts/themeContext/utils/theme.ts +4 -4
- 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/getChannels.ts +17 -14
- package/src/store/apis/getChannelsForFilterSort.ts +45 -0
- package/src/store/apis/index.ts +20 -0
- package/src/store/apis/queries/selectChannelIdsForFilterSort.ts +12 -2
- package/src/store/apis/queries/selectChannels.ts +9 -3
- package/src/store/sqlite-utils/appendWhereCluase.ts +1 -2
- package/src/{__tests__/utils → test-utils}/BetterSqlite.js +1 -1
- package/src/version.json +1 -1
- package/lib/commonjs/components/MessageInput/AudioAttachmentUploadPreview.js.map +0 -1
- package/lib/module/components/MessageInput/AudioAttachmentUploadPreview.js.map +0 -1
- package/lib/typescript/components/MessageInput/AudioAttachmentUploadPreview.d.ts +0 -26
|
@@ -18,7 +18,7 @@ export declare type GridImageItem<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
18
18
|
export declare type ImageGridType<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ImageGalleryGridImageComponents<StreamChatGenerics> & {
|
|
19
19
|
closeGridView: () => void;
|
|
20
20
|
photos: Photo<StreamChatGenerics>[];
|
|
21
|
-
|
|
21
|
+
setSelectedMessage: React.Dispatch<React.SetStateAction<{
|
|
22
22
|
messageId?: string | undefined;
|
|
23
23
|
url?: string | undefined;
|
|
24
24
|
} | undefined>>;
|
|
@@ -9,7 +9,7 @@ export declare enum IsSwiping {
|
|
|
9
9
|
TRUE = 1,
|
|
10
10
|
FALSE = 2
|
|
11
11
|
}
|
|
12
|
-
export declare const useImageGalleryGestures: ({ currentImageHeight, halfScreenHeight, halfScreenWidth, headerFooterVisible, offsetScale, overlayOpacity, photoLength, scale, screenHeight, screenWidth, setSelectedIndex, translateX, translateY, translationX, }: {
|
|
12
|
+
export declare const useImageGalleryGestures: ({ currentImageHeight, halfScreenHeight, halfScreenWidth, headerFooterVisible, offsetScale, overlayOpacity, photoLength, scale, screenHeight, screenWidth, selectedIndex, setSelectedIndex, translateX, translateY, translationX, }: {
|
|
13
13
|
currentImageHeight: number;
|
|
14
14
|
halfScreenHeight: number;
|
|
15
15
|
halfScreenWidth: number;
|
|
@@ -20,6 +20,7 @@ export declare const useImageGalleryGestures: ({ currentImageHeight, halfScreenH
|
|
|
20
20
|
scale: SharedValue<number>;
|
|
21
21
|
screenHeight: number;
|
|
22
22
|
screenWidth: number;
|
|
23
|
+
selectedIndex: number;
|
|
23
24
|
setSelectedIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
24
25
|
translateX: SharedValue<number>;
|
|
25
26
|
translateY: SharedValue<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import type { UserResponse } from 'stream-chat';
|
|
2
|
+
import type { Attachment, UserResponse } from 'stream-chat';
|
|
3
3
|
import { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';
|
|
4
4
|
import { ChatContextValue } from '../../contexts/chatContext/ChatContext';
|
|
5
5
|
import { KeyboardContextValue } from '../../contexts/keyboardContext/KeyboardContext';
|
|
@@ -24,12 +24,18 @@ export declare type UrlTouchableHandlerPayload = {
|
|
|
24
24
|
url?: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
export declare type FileAttachmentTouchableHandlerPayload<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
28
|
+
emitter: 'fileAttachment';
|
|
29
|
+
additionalInfo?: {
|
|
30
|
+
attachment?: Attachment<StreamChatGenerics>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
27
33
|
export declare type TouchableHandlerPayload = {
|
|
28
34
|
defaultHandler?: () => void;
|
|
29
35
|
event?: GestureResponderEvent;
|
|
30
36
|
} & ({
|
|
31
|
-
emitter?: TouchableEmitter
|
|
32
|
-
} | TextMentionTouchableHandlerPayload | UrlTouchableHandlerPayload);
|
|
37
|
+
emitter?: Exclude<TouchableEmitter, 'textMention' | 'textLink' | 'card' | 'fileAttachment'>;
|
|
38
|
+
} | TextMentionTouchableHandlerPayload | UrlTouchableHandlerPayload | FileAttachmentTouchableHandlerPayload);
|
|
33
39
|
export declare type MessageTouchableHandlerPayload<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = TouchableHandlerPayload & {
|
|
34
40
|
actionHandlers?: MessageActionHandlers;
|
|
35
41
|
additionalInfo?: Record<string, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageInputContextValue } from '../../contexts/messageInputContext/MessageInputContext';
|
|
2
2
|
import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
|
|
3
3
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
|
-
declare type FileUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'fileUploads' | 'removeFile' | 'uploadFile' | 'setFileUploads'
|
|
4
|
+
declare type FileUploadPreviewPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<MessageInputContextValue<StreamChatGenerics>, 'fileUploads' | 'removeFile' | 'uploadFile' | 'setFileUploads'> & Pick<MessagesContextValue<StreamChatGenerics>, 'AudioAttachment' | 'FileAttachmentIcon'>;
|
|
5
5
|
export declare type FileUploadPreviewProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<FileUploadPreviewPropsWithContext<StreamChatGenerics>>;
|
|
6
6
|
/**
|
|
7
7
|
* FileUploadPreview
|
|
@@ -11,7 +11,7 @@ import { PaginatedMessageListContextValue } from '../../contexts/paginatedMessag
|
|
|
11
11
|
import { ThreadContextValue } from '../../contexts/threadContext/ThreadContext';
|
|
12
12
|
import { TranslationContextValue } from '../../contexts/translationContext/TranslationContext';
|
|
13
13
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
14
|
-
declare type MessageListPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<AttachmentPickerContextValue, 'closePicker' | 'selectedPicker' | 'setSelectedPicker'> & Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'EmptyStateIndicator' | 'hideStickyDateHeader' | 'loadChannelAroundMessage' | 'loading' | 'LoadingIndicator' | 'markRead' | 'NetworkDownIndicator' | 'reloadChannel' | 'scrollToFirstUnreadThreshold' | 'setTargetedMessage' | 'StickyHeader' | 'targetedMessage'> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Pick<ImageGalleryContextValue<StreamChatGenerics>, '
|
|
14
|
+
declare type MessageListPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<AttachmentPickerContextValue, 'closePicker' | 'selectedPicker' | 'setSelectedPicker'> & Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'EmptyStateIndicator' | 'hideStickyDateHeader' | 'loadChannelAroundMessage' | 'loading' | 'LoadingIndicator' | 'markRead' | 'NetworkDownIndicator' | 'reloadChannel' | 'scrollToFirstUnreadThreshold' | 'setTargetedMessage' | 'StickyHeader' | 'targetedMessage'> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setMessages'> & Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'hasNoMoreRecentMessagesToLoad' | 'loadMore' | 'loadMoreRecent'> & Pick<OverlayContextValue, 'overlay'> & Pick<MessagesContextValue<StreamChatGenerics>, 'deletedMessagesVisibilityType' | 'DateHeader' | 'disableTypingIndicator' | 'FlatList' | 'initialScrollToFirstUnreadMessage' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'legacyImageViewerSwipeBehaviour' | 'Message' | 'ScrollToBottomButton' | 'MessageSystem' | 'myMessageTheme' | 'TypingIndicator' | 'TypingIndicatorContainer'> & Pick<ThreadContextValue<StreamChatGenerics>, 'loadMoreThread' | 'thread'> & Pick<TranslationContextValue, 't' | 'tDateTimeParser'> & {
|
|
15
15
|
/**
|
|
16
16
|
* Besides existing (default) UX behavior of underlying FlatList of MessageList component, if you want
|
|
17
17
|
* to attach some additional props to underlying FlatList, you can add it to following prop.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './Attachment/Attachment';
|
|
2
2
|
export * from './Attachment/AttachmentActions';
|
|
3
|
+
export * from './Attachment/AudioAttachment';
|
|
3
4
|
export * from './Attachment/Card';
|
|
4
5
|
export * from './Attachment/FileAttachment';
|
|
5
6
|
export * from './Attachment/FileAttachmentGroup';
|
|
@@ -102,7 +103,6 @@ export * from './MessageInput/AttachButton';
|
|
|
102
103
|
export * from './MessageInput/CommandsButton';
|
|
103
104
|
export * from './MessageInput/CooldownTimer';
|
|
104
105
|
export * from './MessageInput/FileUploadPreview';
|
|
105
|
-
export * from './MessageInput/AudioAttachmentUploadPreview';
|
|
106
106
|
export * from './MessageInput/ImageUploadPreview';
|
|
107
107
|
export * from './MessageInput/InputButtons';
|
|
108
108
|
export * from './MessageInput/MessageInput';
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
3
3
|
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
4
|
+
declare type SelectedMessage = {
|
|
5
|
+
messageId?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
};
|
|
4
8
|
export declare type ImageGalleryContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} | undefined>>;
|
|
10
|
-
setImages: React.Dispatch<React.SetStateAction<MessageType<StreamChatGenerics>[]>>;
|
|
11
|
-
image?: {
|
|
12
|
-
messageId?: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
};
|
|
9
|
+
messages: MessageType<StreamChatGenerics>[];
|
|
10
|
+
setMessages: React.Dispatch<React.SetStateAction<MessageType<StreamChatGenerics>[]>>;
|
|
11
|
+
setSelectedMessage: React.Dispatch<React.SetStateAction<SelectedMessage | undefined>>;
|
|
12
|
+
selectedMessage?: SelectedMessage;
|
|
15
13
|
};
|
|
16
14
|
export declare const ImageGalleryContext: React.Context<ImageGalleryContextValue<DefaultStreamChatGenerics>>;
|
|
17
15
|
export declare const ImageGalleryProvider: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ children, }: PropsWithChildren<UnknownType>) => JSX.Element;
|
|
18
16
|
export declare const useImageGalleryContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>() => ImageGalleryContextValue<StreamChatGenerics>;
|
|
19
17
|
export declare const withImageGalleryContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, keyof ImageGalleryContextValue<StreamChatGenerics>>>;
|
|
18
|
+
export {};
|
|
@@ -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" | "
|
|
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" | "actionsEnabled" | "files" | "groupStyles" | "handleDeleteMessage" | "handleEditMessage" | "handleQuotedReplyMessage" | "handleResendMessage" | "handleToggleBanUser" | "handleToggleMuteUser" | "handleToggleReaction" | "hasReactions" | "isMyMessage" | "lastGroupMessage" | "messageContentOrder" | "onlyEmojis" | "onOpenThread" | "otherAttachments" | "showMessageOverlay" | "showMessageStatus" | "videos" | "goToMessage" | "lastReceivedId" | "preventPress" | "showAvatar">>;
|
|
@@ -2,7 +2,6 @@ import React, { PropsWithChildren } from 'react';
|
|
|
2
2
|
import type { TextInput, TextInputProps } from 'react-native';
|
|
3
3
|
import { Attachment, SendFileAPIResponse, StreamChat, Message as StreamMessage, UserFilters, UserOptions, UserResponse, UserSort } from 'stream-chat';
|
|
4
4
|
import type { AttachButtonProps } from '../../components/MessageInput/AttachButton';
|
|
5
|
-
import type { AudioAttachmentUploadPreviewProps } from '../../components/MessageInput/AudioAttachmentUploadPreview';
|
|
6
5
|
import type { CommandsButtonProps } from '../../components/MessageInput/CommandsButton';
|
|
7
6
|
import type { InputEditingStateHeaderProps } from '../../components/MessageInput/components/InputEditingStateHeader';
|
|
8
7
|
import type { InputGiphySearchProps } from '../../components/MessageInput/components/InputGiphySearch';
|
|
@@ -176,8 +175,6 @@ export declare type InputMessageInputContextValue<StreamChatGenerics extends Def
|
|
|
176
175
|
* Defaults to and accepts same props as: [AttachButton](https://getstream.io/chat/docs/sdk/reactnative/ui-components/attach-button/)
|
|
177
176
|
*/
|
|
178
177
|
AttachButton: React.ComponentType<AttachButtonProps<StreamChatGenerics>>;
|
|
179
|
-
/** Custom UI component for AudioAttachmentUploadPreview. */
|
|
180
|
-
AudioAttachmentUploadPreview: React.ComponentType<AudioAttachmentUploadPreviewProps<StreamChatGenerics>>;
|
|
181
178
|
clearEditingState: () => void;
|
|
182
179
|
clearQuotedMessageState: () => void;
|
|
183
180
|
/**
|
|
@@ -347,4 +344,4 @@ export declare const useMessageInputContext: <StreamChatGenerics extends Default
|
|
|
347
344
|
* typing is desired while using the HOC withMessageInputContext the Props for the
|
|
348
345
|
* wrapped component must be provided as the first generic.
|
|
349
346
|
*/
|
|
350
|
-
export declare const withMessageInputContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "AttachButton" | "
|
|
347
|
+
export declare const withMessageInputContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "AttachButton" | "clearEditingState" | "clearQuotedMessageState" | "CommandsButton" | "CooldownTimer" | "editing" | "editMessage" | "FileUploadPreview" | "hasCommands" | "hasFilePicker" | "hasImagePicker" | "ImageUploadPreview" | "InputEditingStateHeader" | "InputGiphySearch" | "InputReplyStateHeader" | "maxNumberOfFiles" | "MoreOptionsButton" | "numberOfLines" | "quotedMessage" | "SendButton" | "sendImageAsync" | "setQuotedMessageState" | "ShowThreadMessageInChannelButton" | "UploadProgressIndicator" | "additionalTextInputProps" | "autoCompleteSuggestionsLimit" | "autoCompleteTriggerSettings" | "compressImageQuality" | "doDocUploadRequest" | "doImageUploadRequest" | "initialValue" | "Input" | "InputButtons" | "maxMessageLength" | "mentionAllAppUsersEnabled" | "mentionAllAppUsersQuery" | "onChangeText" | "SendMessageDisallowedIndicator" | "setInputRef" | keyof LocalMessageInputContext<StreamChatGenerics>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
2
2
|
import type { ThreadContextValue } from '../../threadContext/ThreadContext';
|
|
3
3
|
import type { MessageInputContextValue } from '../MessageInputContext';
|
|
4
|
-
export declare const useCreateMessageInputContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTextInputProps, appendText, asyncIds, asyncUploads, AttachButton,
|
|
4
|
+
export declare const useCreateMessageInputContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTextInputProps, appendText, asyncIds, asyncUploads, AttachButton, autoCompleteSuggestionsLimit, clearEditingState, clearQuotedMessageState, closeAttachmentPicker, CommandsButton, compressImageQuality, cooldownEndsAt, CooldownTimer, doDocUploadRequest, doImageUploadRequest, editing, editMessage, FileUploadPreview, fileUploads, giphyActive, hasCommands, hasFilePicker, hasImagePicker, ImageUploadPreview, imageUploads, initialValue, Input, inputBoxRef, InputButtons, InputEditingStateHeader, InputGiphySearch, InputReplyStateHeader, isValidMessage, maxMessageLength, maxNumberOfFiles, mentionAllAppUsersEnabled, mentionAllAppUsersQuery, mentionedUsers, MoreOptionsButton, numberOfLines, numberOfUploads, onChange, onChangeText, onSelectItem, openAttachmentPicker, openCommandsPicker, openFilePicker, openMentionsPicker, pickFile, quotedMessage, removeFile, removeImage, resetInput, selectedPicker, SendButton, sendImageAsync, sending, sendMessage, sendMessageAsync, SendMessageDisallowedIndicator, sendThreadMessageInChannel, setAsyncIds, setAsyncUploads, setFileUploads, setGiphyActive, setImageUploads, setInputBoxRef, setInputRef, setMentionedUsers, setNumberOfUploads, setQuotedMessageState, setSendThreadMessageInChannel, setShowMoreOptions, setText, showMoreOptions, ShowThreadMessageInChannelButton, text, thread, toggleAttachmentPicker, triggerSettings, updateMessage, uploadFile, uploadImage, uploadNewFile, uploadNewImage, UploadProgressIndicator, }: import("../MessageInputContext").LocalMessageInputContext<StreamChatGenerics> & Omit<import("../MessageInputContext").InputMessageInputContextValue<StreamChatGenerics>, "sendMessage"> & Pick<ThreadContextValue<StreamChatGenerics>, "thread">) => MessageInputContextValue<StreamChatGenerics>;
|
|
@@ -6,6 +6,7 @@ import type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSim
|
|
|
6
6
|
import type { Attachment, ChannelState, MessageResponse } from 'stream-chat';
|
|
7
7
|
import type { AttachmentProps } from '../../components/Attachment/Attachment';
|
|
8
8
|
import type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';
|
|
9
|
+
import type { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';
|
|
9
10
|
import type { CardProps } from '../../components/Attachment/Card';
|
|
10
11
|
import type { FileAttachmentProps } from '../../components/Attachment/FileAttachment';
|
|
11
12
|
import type { FileAttachmentGroupProps } from '../../components/Attachment/FileAttachmentGroup';
|
|
@@ -55,6 +56,8 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
55
56
|
* Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)
|
|
56
57
|
*/
|
|
57
58
|
AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;
|
|
59
|
+
/** Custom UI component for AudioAttachment. */
|
|
60
|
+
AudioAttachment: React.ComponentType<AudioAttachmentProps>;
|
|
58
61
|
/**
|
|
59
62
|
* UI component to display generic media type e.g. giphy, url preview etc
|
|
60
63
|
* Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)
|
|
@@ -243,12 +243,12 @@ export declare type Theme = {
|
|
|
243
243
|
editingBoxHeaderTitle: TextStyle;
|
|
244
244
|
};
|
|
245
245
|
fileUploadPreview: {
|
|
246
|
-
|
|
247
|
-
audioAttachmentUploadPreview: {
|
|
246
|
+
audioAttachment: {
|
|
248
247
|
progressControlView: ViewStyle;
|
|
249
248
|
progressDurationText: TextStyle;
|
|
250
249
|
roundedView: ViewStyle;
|
|
251
250
|
};
|
|
251
|
+
audioAttachmentFileContainer: ViewStyle;
|
|
252
252
|
dismiss: ViewStyle;
|
|
253
253
|
fileContainer: ViewStyle;
|
|
254
254
|
fileContentContainer: ViewStyle;
|
|
@@ -17,3 +17,5 @@ export { default as trTranslations } from './i18n/tr.json';
|
|
|
17
17
|
export { default as heTranslations } from './i18n/he.json';
|
|
18
18
|
export { QuickSqliteClient } from './store/QuickSqliteClient';
|
|
19
19
|
export { version } from './version.json';
|
|
20
|
+
import * as OfflineStoreApis from './store/apis';
|
|
21
|
+
export { OfflineStoreApis };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { PreparedQueries } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* QuickSqliteClient takes care of any direct interaction with sqlite.
|
|
4
|
+
* This way usage react-native-quick-sqlite package is scoped to a single class/file.
|
|
5
|
+
*/
|
|
2
6
|
export declare class QuickSqliteClient {
|
|
3
7
|
static dbVersion: number;
|
|
4
8
|
static dbName: string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { ChannelAPIResponse } from 'stream-chat';
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the list of channels with state enriched for given channel ids.
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} param
|
|
7
|
+
* @param {Array} param.channelIds List of channel ids to fetch.
|
|
8
|
+
* @param {Array} param.currentUserId Id of the current logged in user.
|
|
9
|
+
*
|
|
10
|
+
* @returns {Array} Channels with enriched state.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getChannels: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channelIds, currentUserId, }: {
|
|
13
|
+
channelIds: string[];
|
|
4
14
|
currentUserId: string;
|
|
5
|
-
filters?: ChannelFilters<StreamChatGenerics> | undefined;
|
|
6
|
-
sort?: ChannelSort<StreamChatGenerics> | undefined;
|
|
7
15
|
}) => Omit<ChannelAPIResponse<StreamChatGenerics>, "duration">[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DefaultStreamChatGenerics } from 'src/types/types';
|
|
2
|
+
import type { ChannelAPIResponse, ChannelFilters, ChannelSort } from 'stream-chat';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the channels from database for given filter and sort query.
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} param
|
|
7
|
+
* @param {string} param.currentUserId Id of current logged in user
|
|
8
|
+
* @param {Object} param.filters Filters for channels https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=su#query-parameters
|
|
9
|
+
* @param {Object} param.sort Sort for channels https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=su#query-parameters
|
|
10
|
+
*
|
|
11
|
+
* @returns Array of channels corresponding to filters & sort. Returns null if filters + sort query doesn't exist in "channelQueries" table.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getChannelsForFilterSort: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ currentUserId, filters, sort, }: {
|
|
14
|
+
currentUserId: string;
|
|
15
|
+
filters?: ChannelFilters<StreamChatGenerics> | undefined;
|
|
16
|
+
sort?: ChannelSort<StreamChatGenerics> | undefined;
|
|
17
|
+
}) => Omit<ChannelAPIResponse<StreamChatGenerics>, "duration">[] | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './deleteChannel';
|
|
2
|
+
export * from './deleteMember';
|
|
3
|
+
export * from './deleteMessagesForChannel';
|
|
4
|
+
export * from './deleteReactions';
|
|
5
|
+
export * from './getAllChannelIds';
|
|
6
|
+
export * from './getChannelMessages';
|
|
7
|
+
export * from './getChannels';
|
|
8
|
+
export * from './getChannelsForFilterSort';
|
|
9
|
+
export * from './getLastSyncedAt';
|
|
10
|
+
export * from './getMembers';
|
|
11
|
+
export * from './getReads';
|
|
12
|
+
export * from './updateMessage';
|
|
13
|
+
export * from './updateReaction';
|
|
14
|
+
export * from './upsertChannelData';
|
|
15
|
+
export * from './upsertChannels';
|
|
16
|
+
export * from './upsertCidsForQuery';
|
|
17
|
+
export * from './upsertLastSyncedAt';
|
|
18
|
+
export * from './upsertMembers';
|
|
19
|
+
export * from './upsertMessages';
|
|
20
|
+
export * from './upsertReads';
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { ChannelFilters, ChannelSort } from 'stream-chat';
|
|
2
2
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the channel ids from database for given filter and sort query.
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} param
|
|
7
|
+
* @param {Object} param.filters Filters for channels https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=su#query-parameters
|
|
8
|
+
* @param {Object} param.sort Sort for channels https://getstream.io/chat/docs/javascript/query_channels/?language=javascript&q=su#query-parameters
|
|
9
|
+
*
|
|
10
|
+
* @returns Array of channel ids corresponding to filters & sort. Returns null if filters + sort query doesn't exist in "channelQueries" table.
|
|
11
|
+
*/
|
|
3
12
|
export declare const selectChannelIdsForFilterSort: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ filters, sort, }: {
|
|
4
13
|
filters?: ChannelFilters<StreamChatGenerics> | undefined;
|
|
5
14
|
sort?: ChannelSort<StreamChatGenerics> | undefined;
|
|
6
|
-
}) => string[];
|
|
15
|
+
}) => string[] | null;
|
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.0.0
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"mime-types": "^2.1.34",
|
|
79
79
|
"path": "0.12.7",
|
|
80
80
|
"react-art": "^17.0.2",
|
|
81
|
-
"react-native-markdown-package": "1.8.
|
|
81
|
+
"react-native-markdown-package": "1.8.2",
|
|
82
82
|
"react-native-url-polyfill": "^1.3.0",
|
|
83
|
-
"stream-chat": "7.0.0
|
|
83
|
+
"stream-chat": "7.0.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"react-native-svg": "^12.1.0"
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"@babel/preset-env": "7.13.12",
|
|
95
95
|
"@babel/preset-typescript": "7.13.0",
|
|
96
96
|
"@babel/runtime": "^7.12.5",
|
|
97
|
+
"@types/better-sqlite3": "^7.6.0",
|
|
97
98
|
"@react-native-community/eslint-config": "2.0.0",
|
|
98
99
|
"@react-native-community/eslint-plugin": "1.1.0",
|
|
99
100
|
"@react-native-community/netinfo": "6.0.0",
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
"react-native-builder-bob": "0.18.1",
|
|
139
140
|
"react-native-fs": "2.18.0",
|
|
140
141
|
"react-native-gesture-handler": "2.3.1",
|
|
141
|
-
"react-native-quick-sqlite": "^
|
|
142
|
+
"react-native-quick-sqlite": "^4.0.3",
|
|
142
143
|
"react-native-reanimated": "2.7.0",
|
|
143
144
|
"react-native-svg": "12.1.1",
|
|
144
145
|
"react-native-typescript-transformer": "1.2.13",
|
|
@@ -6,8 +6,6 @@ import { act, cleanup, render, waitFor } from '@testing-library/react-native';
|
|
|
6
6
|
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
8
|
|
|
9
|
-
import { BetterSqlite } from './utils/BetterSqlite';
|
|
10
|
-
|
|
11
9
|
import { ChannelList } from '../components/ChannelList/ChannelList';
|
|
12
10
|
import { Chat } from '../components/Chat/Chat';
|
|
13
11
|
import { useChannelsContext } from '../contexts/channelsContext/ChannelsContext';
|
|
@@ -36,6 +34,7 @@ import { generateUser } from '../mock-builders/generator/user';
|
|
|
36
34
|
import { getTestClientWithUser } from '../mock-builders/mock';
|
|
37
35
|
import { convertFilterSortToQuery } from '../store/apis/utils/convertFilterSortToQuery';
|
|
38
36
|
import { tables } from '../store/schema';
|
|
37
|
+
import { BetterSqlite } from '../test-utils/BetterSqlite';
|
|
39
38
|
|
|
40
39
|
/**
|
|
41
40
|
* We are gonna use following custom UI components for preview and list.
|