stream-chat-react-native-core 4.3.0 → 4.3.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/Giphy.js +26 -22
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +21 -20
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +4 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.md +2 -2
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.md +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.md +2 -2
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.md +2 -2
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.md +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.md +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.md +2 -2
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -2
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +2 -2
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.md +2 -2
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Giphy.js +26 -22
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +21 -20
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +4 -4
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.md +2 -2
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.md +2 -2
- package/lib/module/contexts/chatContext/ChatContext.md +2 -2
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.md +2 -2
- package/lib/module/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.md +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.md +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.md +2 -2
- package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -2
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +2 -2
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/lib/module/contexts/typingContext/TypingContext.md +2 -2
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +4 -4
- package/lib/typescript/components/Channel/Channel.d.ts +2 -2
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +1 -7
- package/lib/typescript/components/Message/Message.d.ts +2 -2
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +3 -3
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +2 -2
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +6 -6
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +6 -6
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +3 -3
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +20 -20
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Attachment/Giphy.tsx +4 -0
- package/src/components/Attachment/__tests__/Attachment.test.js +0 -61
- package/src/components/Attachment/__tests__/Giphy.test.js +290 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -4
- package/src/components/Channel/Channel.tsx +2 -2
- package/src/components/Channel/__tests__/isAttachmentEqualHandler.test.js +1 -1
- package/src/components/Chat/Chat.tsx +1 -1
- package/src/components/ImageGallery/ImageGallery.tsx +9 -8
- package/src/components/Message/Message.tsx +2 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +16 -17
- package/src/components/Message/MessageSimple/MessageSimple.tsx +11 -12
- package/src/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +3 -3
- package/src/contexts/channelContext/ChannelContext.md +2 -2
- package/src/contexts/channelContext/ChannelContext.tsx +2 -2
- package/src/contexts/channelsContext/ChannelsContext.md +2 -2
- package/src/contexts/channelsContext/ChannelsContext.tsx +6 -6
- package/src/contexts/chatContext/ChatContext.md +2 -2
- package/src/contexts/imageGalleryContext/ImageGalleryContext.md +2 -2
- package/src/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/src/contexts/messageContext/MessageContext.md +1 -1
- package/src/contexts/messageContext/MessageContext.tsx +2 -2
- package/src/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/src/contexts/messageInputContext/MessageInputContext.tsx +6 -6
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +3 -3
- package/src/contexts/messagesContext/MessagesContext.md +1 -1
- package/src/contexts/messagesContext/MessagesContext.tsx +20 -20
- package/src/contexts/overlayContext/OverlayContext.md +2 -2
- package/src/contexts/overlayContext/OverlayContext.tsx +1 -1
- package/src/contexts/overlayContext/OverlayProvider.tsx +1 -1
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +2 -2
- package/src/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/src/contexts/typingContext/TypingContext.md +2 -2
- package/src/version.json +1 -1
|
@@ -132,25 +132,25 @@ export type AttachmentPickerProps = {
|
|
|
132
132
|
/**
|
|
133
133
|
* Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/1.png) of attachment picker.
|
|
134
134
|
*
|
|
135
|
-
* **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)
|
|
135
|
+
* **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)
|
|
136
136
|
*/
|
|
137
137
|
AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;
|
|
138
138
|
/**
|
|
139
139
|
* Custom UI component to render error component while opening attachment picker.
|
|
140
140
|
*
|
|
141
|
-
* **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)
|
|
141
|
+
* **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)
|
|
142
142
|
*/
|
|
143
143
|
AttachmentPickerError: React.ComponentType<AttachmentPickerErrorProps>;
|
|
144
144
|
/**
|
|
145
145
|
* Custom UI component to render error image for attachment picker
|
|
146
146
|
*
|
|
147
|
-
* **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)
|
|
147
|
+
* **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)
|
|
148
148
|
*/
|
|
149
149
|
AttachmentPickerErrorImage: React.ComponentType;
|
|
150
150
|
/**
|
|
151
151
|
* Custom UI component to render overlay component, that shows up on top of [selected image](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/1.png) (with tick mark)
|
|
152
152
|
*
|
|
153
|
-
* **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)
|
|
153
|
+
* **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)
|
|
154
154
|
*/
|
|
155
155
|
ImageOverlaySelectedComponent: React.ComponentType;
|
|
156
156
|
attachmentPickerBottomSheetHandleHeight?: number;
|
|
@@ -304,7 +304,7 @@ export type ChannelPropsWithContext<
|
|
|
304
304
|
/**
|
|
305
305
|
* When true, disables the KeyboardCompatibleView wrapper
|
|
306
306
|
*
|
|
307
|
-
* Channel internally uses the [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx)
|
|
307
|
+
* Channel internally uses the [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx)
|
|
308
308
|
* component to adjust the height of Channel when the keyboard is opened or dismissed. This prop provides the ability to disable this functionality in case you
|
|
309
309
|
* want to use [KeyboardAvoidingView](https://facebook.github.io/react-native/docs/keyboardavoidingview) or handle dismissal yourself.
|
|
310
310
|
* KeyboardAvoidingView works well when your component occupies 100% of screen height, otherwise it may raise some issues.
|
|
@@ -345,7 +345,7 @@ export type ChannelPropsWithContext<
|
|
|
345
345
|
keyboardBehavior?: KeyboardAvoidingViewProps['behavior'];
|
|
346
346
|
/**
|
|
347
347
|
* Custom wrapper component that handles height adjustment of Channel component when keyboard is opened or dismissed
|
|
348
|
-
* Default component (accepts the same props): [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx)
|
|
348
|
+
* Default component (accepts the same props): [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx)
|
|
349
349
|
*
|
|
350
350
|
* **Example:**
|
|
351
351
|
*
|
|
@@ -18,7 +18,7 @@ import { Channel } from '../../Channel/Channel';
|
|
|
18
18
|
import { Chat } from '../../Chat/Chat';
|
|
19
19
|
import { MessageList } from '../../MessageList/MessageList';
|
|
20
20
|
|
|
21
|
-
describe('
|
|
21
|
+
describe('isAttachmentEqualHandler', () => {
|
|
22
22
|
let channel;
|
|
23
23
|
let chatClient;
|
|
24
24
|
|
|
@@ -90,7 +90,7 @@ export type ChatProps<
|
|
|
90
90
|
*/
|
|
91
91
|
i18nInstance?: Streami18n;
|
|
92
92
|
/**
|
|
93
|
-
* You can pass the theme object to customize the styles of Chat components. You can check the default theme in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/themeContext/utils/theme.ts)
|
|
93
|
+
* You can pass the theme object to customize the styles of Chat components. You can check the default theme in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/themeContext/utils/theme.ts)
|
|
94
94
|
*
|
|
95
95
|
* Please check section about [themes in cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#theme) for details.
|
|
96
96
|
*
|
|
@@ -127,13 +127,13 @@ export type ImageGalleryCustomComponents<
|
|
|
127
127
|
type Props<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> =
|
|
128
128
|
ImageGalleryCustomComponents<StreamChatGenerics> & {
|
|
129
129
|
overlayOpacity: Animated.SharedValue<number>;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
} & Pick<
|
|
131
|
+
OverlayProviderProps<StreamChatGenerics>,
|
|
132
|
+
| 'giphyVersion'
|
|
133
|
+
| 'imageGalleryGridSnapPoints'
|
|
134
|
+
| 'imageGalleryGridHandleHeight'
|
|
135
|
+
| 'numberOfImageGalleryGridColumns'
|
|
136
|
+
>;
|
|
137
137
|
|
|
138
138
|
export const ImageGallery = <
|
|
139
139
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
@@ -141,7 +141,7 @@ export const ImageGallery = <
|
|
|
141
141
|
props: Props<StreamChatGenerics>,
|
|
142
142
|
) => {
|
|
143
143
|
const {
|
|
144
|
-
giphyVersion,
|
|
144
|
+
giphyVersion = 'fixed_height',
|
|
145
145
|
imageGalleryCustomComponents,
|
|
146
146
|
imageGalleryGridHandleHeight,
|
|
147
147
|
imageGalleryGridSnapPoints,
|
|
@@ -308,6 +308,7 @@ export const ImageGallery = <
|
|
|
308
308
|
* Photos array created from all currently available
|
|
309
309
|
* photo attachments
|
|
310
310
|
*/
|
|
311
|
+
|
|
311
312
|
const photos = images.reduce((acc: Photo<StreamChatGenerics>[], cur) => {
|
|
312
313
|
const attachmentImages =
|
|
313
314
|
cur.attachments?.filter(
|
|
@@ -147,7 +147,7 @@ export type MessagePropsWithContext<
|
|
|
147
147
|
* You can call methods available on the Message
|
|
148
148
|
* component such as handleEdit, handleDelete, handleAction etc.
|
|
149
149
|
*
|
|
150
|
-
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/Message.tsx)
|
|
150
|
+
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/Message.tsx)
|
|
151
151
|
*
|
|
152
152
|
* By default, we show the overlay with all the message actions on long press.
|
|
153
153
|
*
|
|
@@ -160,7 +160,7 @@ export type MessagePropsWithContext<
|
|
|
160
160
|
* You can call methods available on the Message
|
|
161
161
|
* component such as handleEdit, handleDelete, handleAction etc.
|
|
162
162
|
*
|
|
163
|
-
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/Message.tsx)
|
|
163
|
+
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/Message.tsx)
|
|
164
164
|
*
|
|
165
165
|
* By default, we will dismiss the keyboard on press.
|
|
166
166
|
*
|
|
@@ -445,23 +445,22 @@ const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = Default
|
|
|
445
445
|
const prevMessageAttachments = prevMessage.attachments;
|
|
446
446
|
const nextMessageAttachments = nextMessage.attachments;
|
|
447
447
|
const attachmentsEqual =
|
|
448
|
-
Array.isArray(prevMessageAttachments) &&
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
});
|
|
448
|
+
Array.isArray(prevMessageAttachments) && Array.isArray(nextMessageAttachments)
|
|
449
|
+
? prevMessageAttachments.length === nextMessageAttachments.length &&
|
|
450
|
+
prevMessageAttachments.every((attachment, index) => {
|
|
451
|
+
const attachmentKeysEqual =
|
|
452
|
+
attachment.image_url === nextMessageAttachments[index].image_url &&
|
|
453
|
+
attachment.og_scrape_url === nextMessageAttachments[index].og_scrape_url &&
|
|
454
|
+
attachment.thumb_url === nextMessageAttachments[index].thumb_url;
|
|
455
|
+
|
|
456
|
+
if (isAttachmentEqual)
|
|
457
|
+
return (
|
|
458
|
+
attachmentKeysEqual && !!isAttachmentEqual(attachment, nextMessageAttachments[index])
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
return attachmentKeysEqual;
|
|
462
|
+
})
|
|
463
|
+
: prevMessageAttachments === nextMessageAttachments;
|
|
465
464
|
if (!attachmentsEqual) return false;
|
|
466
465
|
|
|
467
466
|
const latestReactionsEqual =
|
|
@@ -147,18 +147,17 @@ const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = Default
|
|
|
147
147
|
const prevMessageAttachments = prevMessage.attachments;
|
|
148
148
|
const nextMessageAttachments = nextMessage.attachments;
|
|
149
149
|
const attachmentsEqual =
|
|
150
|
-
Array.isArray(prevMessageAttachments) &&
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
150
|
+
Array.isArray(prevMessageAttachments) && Array.isArray(nextMessageAttachments)
|
|
151
|
+
? prevMessageAttachments.length === nextMessageAttachments.length &&
|
|
152
|
+
prevMessageAttachments.every((attachment, index) => {
|
|
153
|
+
const attachmentKeysEqual =
|
|
154
|
+
attachment.image_url === nextMessageAttachments[index].image_url &&
|
|
155
|
+
attachment.og_scrape_url === nextMessageAttachments[index].og_scrape_url &&
|
|
156
|
+
attachment.thumb_url === nextMessageAttachments[index].thumb_url;
|
|
157
|
+
|
|
158
|
+
return attachmentKeysEqual;
|
|
159
|
+
})
|
|
160
|
+
: prevMessageAttachments === nextMessageAttachments;
|
|
162
161
|
if (!attachmentsEqual) return false;
|
|
163
162
|
|
|
164
163
|
const latestReactionsEqual =
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[src/components/Message/MessageSimple/utils/renderText.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/MessageSimple/utils/renderText.ts)
|
|
1
|
+
[src/components/Message/MessageSimple/utils/renderText.ts](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/MessageSimple/utils/renderText.ts)
|
|
2
2
|
|
|
3
3
|
Function that handles markdown and parsing for the text of message.
|
|
4
4
|
|
|
@@ -21,20 +21,20 @@ export type AttachmentPickerContextValue = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Custom UI component for [camera selector icon](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/1.png)
|
|
23
23
|
*
|
|
24
|
-
* **Default: ** [CameraSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/CameraSelectorIcon.tsx)
|
|
24
|
+
* **Default: ** [CameraSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/CameraSelectorIcon.tsx)
|
|
25
25
|
*/
|
|
26
26
|
CameraSelectorIcon: React.ComponentType<AttachmentPickerIconProps>;
|
|
27
27
|
closePicker: () => void;
|
|
28
28
|
/**
|
|
29
29
|
* Custom UI component for [file selector icon](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/1.png)
|
|
30
30
|
*
|
|
31
|
-
* **Default: ** [FileSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/FileSelectorIcon.tsx)
|
|
31
|
+
* **Default: ** [FileSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/FileSelectorIcon.tsx)
|
|
32
32
|
*/
|
|
33
33
|
FileSelectorIcon: React.ComponentType<AttachmentPickerIconProps>;
|
|
34
34
|
/**
|
|
35
35
|
* Custom UI component for [image selector icon](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/1.png)
|
|
36
36
|
*
|
|
37
|
-
* **Default: ** [ImageSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/AttachmentPicker/components/ImageSelectorIcon.tsx)
|
|
37
|
+
* **Default: ** [ImageSelectorIcon](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/AttachmentPicker/components/ImageSelectorIcon.tsx)
|
|
38
38
|
*/
|
|
39
39
|
ImageSelectorIcon: React.ComponentType<AttachmentPickerIconProps>;
|
|
40
40
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `ChannelContextValue` in [ChannelContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/channelContext/ChannelContext.md), for consumable values.
|
|
1
|
+
Please check the `ChannelContextValue` in [ChannelContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/channelContext/ChannelContext.md), for consumable values.
|
|
2
2
|
Provider for this context exists in `Channel` component. And so, any child component of Channel
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -34,4 +34,4 @@ class SomeChildComponent extends React.Component {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export withChannelContext(SomeChildComponent);
|
|
37
|
-
```
|
|
37
|
+
```
|
|
@@ -36,7 +36,7 @@ export type ChannelContextValue<
|
|
|
36
36
|
/**
|
|
37
37
|
* Custom UI component to display empty state when channel has no messages.
|
|
38
38
|
*
|
|
39
|
-
* **Default** [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Indicators/EmptyStateIndicator.tsx)
|
|
39
|
+
* **Default** [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Indicators/EmptyStateIndicator.tsx)
|
|
40
40
|
*/
|
|
41
41
|
EmptyStateIndicator: React.ComponentType<EmptyStateProps>;
|
|
42
42
|
/**
|
|
@@ -155,7 +155,7 @@ export type ChannelContextValue<
|
|
|
155
155
|
/**
|
|
156
156
|
* Custom UI component for sticky header of channel.
|
|
157
157
|
*
|
|
158
|
-
* **Default** [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageList/DateHeader.tsx)
|
|
158
|
+
* **Default** [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageList/DateHeader.tsx)
|
|
159
159
|
*/
|
|
160
160
|
StickyHeader?: React.ComponentType<{ dateString: string }>;
|
|
161
161
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `ChannelsContextValue` in [ChannelsContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/channelsContext/ChannelsContext.md), for consumable values.
|
|
1
|
+
Please check the `ChannelsContextValue` in [ChannelsContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/channelsContext/ChannelsContext.md), for consumable values.
|
|
2
2
|
Provider for this context exists in `ChannelList` component. And so, any child component of ChannelList
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -35,4 +35,4 @@ class SomeChildComponent extends React.Component {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export withChannelsContext(SomeChildComponent);
|
|
38
|
-
```
|
|
38
|
+
```
|
|
@@ -172,37 +172,37 @@ export type ChannelsContextValue<
|
|
|
172
172
|
/**
|
|
173
173
|
* Custom UI component to render preview avatar.
|
|
174
174
|
*
|
|
175
|
-
* **Default** [ChannelAvatar](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelAvatar.tsx)
|
|
175
|
+
* **Default** [ChannelAvatar](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelAvatar.tsx)
|
|
176
176
|
*/
|
|
177
177
|
PreviewAvatar?: React.ComponentType<ChannelAvatarProps<StreamChatGenerics>>;
|
|
178
178
|
/**
|
|
179
179
|
* Custom UI component to render preview of latest message on channel.
|
|
180
180
|
*
|
|
181
|
-
* **Default** [ChannelPreviewMessage](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMessage.tsx)
|
|
181
|
+
* **Default** [ChannelPreviewMessage](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreviewMessage.tsx)
|
|
182
182
|
*/
|
|
183
183
|
PreviewMessage?: React.ComponentType<ChannelPreviewMessageProps<StreamChatGenerics>>;
|
|
184
184
|
/**
|
|
185
185
|
* Custom UI component to render muted status.
|
|
186
186
|
*
|
|
187
|
-
* **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
|
|
187
|
+
* **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
|
|
188
188
|
*/
|
|
189
189
|
PreviewMutedStatus?: React.ComponentType<ChannelPreviewMutedStatusProps<StreamChatGenerics>>;
|
|
190
190
|
/**
|
|
191
191
|
* Custom UI component to render preview avatar.
|
|
192
192
|
*
|
|
193
|
-
* **Default** [ChannelPreviewStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewStatus.tsx)
|
|
193
|
+
* **Default** [ChannelPreviewStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreviewStatus.tsx)
|
|
194
194
|
*/
|
|
195
195
|
PreviewStatus?: React.ComponentType<ChannelPreviewStatusProps<StreamChatGenerics>>;
|
|
196
196
|
/**
|
|
197
197
|
* Custom UI component to render preview avatar.
|
|
198
198
|
*
|
|
199
|
-
* **Default** [ChannelPreviewTitle](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewTitle.tsx)
|
|
199
|
+
* **Default** [ChannelPreviewTitle](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreviewTitle.tsx)
|
|
200
200
|
*/
|
|
201
201
|
PreviewTitle?: React.ComponentType<ChannelPreviewTitleProps<StreamChatGenerics>>;
|
|
202
202
|
/**
|
|
203
203
|
* Custom UI component to render preview avatar.
|
|
204
204
|
*
|
|
205
|
-
* **Default** [ChannelPreviewUnreadCount](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx)
|
|
205
|
+
* **Default** [ChannelPreviewUnreadCount](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx)
|
|
206
206
|
*/
|
|
207
207
|
PreviewUnreadCount?: React.ComponentType<ChannelPreviewUnreadCountProps<StreamChatGenerics>>;
|
|
208
208
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `ChatContextValue` in [ChatContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/chatContext/ChatContext.tsx), for consumable values.
|
|
1
|
+
Please check the `ChatContextValue` in [ChatContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/chatContext/ChatContext.tsx), for consumable values.
|
|
2
2
|
Provider for this context exists in `Chat` component. And so, any child component of Chat
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -34,4 +34,4 @@ class SomeChildComponent extends React.Component {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export withChatContext(SomeChildComponent);
|
|
37
|
-
```
|
|
37
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `ImageGalleryContextValue` in [ImageGalleryContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/imageGalleryContext/ImageGalleryContext.tsx), for consumable values.
|
|
1
|
+
Please check the `ImageGalleryContextValue` in [ImageGalleryContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx), for consumable values.
|
|
2
2
|
Provider for this context exists in `OverlayProvider` component. And so, any child component of OverlayProvider
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -35,4 +35,4 @@ class SomeChildComponent extends React.Component {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export withImageGalleryContext(SomeChildComponent);
|
|
38
|
-
```
|
|
38
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
When user focuses on input box, keyboard opens up on mobile devices. When keyboard opens, it is necessary to update the position of input box and height of content on screen
|
|
2
|
-
so that it doesn't get hidden behind keyboard. This is handled by [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx) which
|
|
2
|
+
so that it doesn't get hidden behind keyboard. This is handled by [KeyboardCompatibleView](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx) which
|
|
3
3
|
is a HOC. It creates a context which contain following function.
|
|
4
4
|
|
|
5
5
|
- **dismissKeyboard** Dismisses the keyboard and adjusts the height of content on screen.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `MessageContextValue` in [MessageContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/messageContext/MessageContext.tsx), for consumable values.
|
|
1
|
+
Please check the `MessageContextValue` in [MessageContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/messageContext/MessageContext.tsx), for consumable values.
|
|
2
2
|
Provider for this context exists in `Message` component. And so, any child component of `Message`
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -58,7 +58,7 @@ export type MessageContextValue<
|
|
|
58
58
|
* You can call methods available on the Message
|
|
59
59
|
* component such as handleEdit, handleDelete, handleAction etc.
|
|
60
60
|
*
|
|
61
|
-
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/Message.tsx)
|
|
61
|
+
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/Message.tsx)
|
|
62
62
|
*
|
|
63
63
|
* By default, we show the overlay with all the message actions on long press.
|
|
64
64
|
*
|
|
@@ -73,7 +73,7 @@ export type MessageContextValue<
|
|
|
73
73
|
* You can call methods available on the Message
|
|
74
74
|
* component such as handleEdit, handleDelete, handleAction etc.
|
|
75
75
|
*
|
|
76
|
-
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/Message.tsx)
|
|
76
|
+
* Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/Message/Message.tsx)
|
|
77
77
|
*
|
|
78
78
|
* By default, we will dismiss the keyboard on press.
|
|
79
79
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `MessageInputContextValue` in [MessageInputContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/messageInputContext/MessageInputContext.tsx), for consumable values.
|
|
1
|
+
Please check the `MessageInputContextValue` in [MessageInputContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/messageInputContext/MessageInputContext.tsx), for consumable values.
|
|
2
2
|
Provider for this context exists in `Channel` component. And so, any child component of `Channel`
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|
|
@@ -237,7 +237,7 @@ export type InputMessageInputContextValue<
|
|
|
237
237
|
* being allowed to send another message. This component is displayed in place of the
|
|
238
238
|
* send button for the MessageInput component.
|
|
239
239
|
*
|
|
240
|
-
* **default** [CooldownTimer](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/CooldownTimer.tsx)
|
|
240
|
+
* **default** [CooldownTimer](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/CooldownTimer.tsx)
|
|
241
241
|
*/
|
|
242
242
|
CooldownTimer: React.ComponentType<CooldownTimerProps>;
|
|
243
243
|
editing: boolean | MessageType<StreamChatGenerics>;
|
|
@@ -245,7 +245,7 @@ export type InputMessageInputContextValue<
|
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
247
|
* Custom UI component for FileUploadPreview.
|
|
248
|
-
* Defaults to and accepts same props as: https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/FileUploadPreview.tsx
|
|
248
|
+
* Defaults to and accepts same props as: https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/FileUploadPreview.tsx
|
|
249
249
|
*/
|
|
250
250
|
FileUploadPreview: React.ComponentType<FileUploadPreviewProps<StreamChatGenerics>>;
|
|
251
251
|
|
|
@@ -257,7 +257,7 @@ export type InputMessageInputContextValue<
|
|
|
257
257
|
hasImagePicker: boolean;
|
|
258
258
|
/**
|
|
259
259
|
* Custom UI component for ImageUploadPreview.
|
|
260
|
-
* Defaults to and accepts same props as: https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/ImageUploadPreview.tsx
|
|
260
|
+
* Defaults to and accepts same props as: https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/ImageUploadPreview.tsx
|
|
261
261
|
*/
|
|
262
262
|
ImageUploadPreview: React.ComponentType<ImageUploadPreviewProps<StreamChatGenerics>>;
|
|
263
263
|
InputEditingStateHeader: React.ComponentType<InputEditingStateHeaderProps<StreamChatGenerics>>;
|
|
@@ -293,7 +293,7 @@ export type InputMessageInputContextValue<
|
|
|
293
293
|
/**
|
|
294
294
|
* Custom UI component to render upload progress indicator on attachment preview.
|
|
295
295
|
*
|
|
296
|
-
* **Default** [UploadProgressIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/UploadProgressIndicator.tsx)
|
|
296
|
+
* **Default** [UploadProgressIndicator](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/UploadProgressIndicator.tsx)
|
|
297
297
|
*/
|
|
298
298
|
UploadProgressIndicator: React.ComponentType<UploadProgressIndicatorProps>;
|
|
299
299
|
/**
|
|
@@ -354,7 +354,7 @@ export type InputMessageInputContextValue<
|
|
|
354
354
|
initialValue?: string;
|
|
355
355
|
/**
|
|
356
356
|
* Custom UI component for AutoCompleteInput.
|
|
357
|
-
* Has access to all of [MessageInputContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/messageInputContext/MessageInputContext.tsx)
|
|
357
|
+
* Has access to all of [MessageInputContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/messageInputContext/MessageInputContext.tsx)
|
|
358
358
|
*/
|
|
359
359
|
Input?: React.ComponentType<
|
|
360
360
|
Omit<MessageInputProps<StreamChatGenerics>, 'Input'> &
|
|
@@ -364,7 +364,7 @@ export type InputMessageInputContextValue<
|
|
|
364
364
|
>;
|
|
365
365
|
/**
|
|
366
366
|
* Custom UI component to override buttons on left side of input box
|
|
367
|
-
* Defaults to [InputButtons](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/InputButtons.tsx),
|
|
367
|
+
* Defaults to [InputButtons](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageInput/InputButtons.tsx),
|
|
368
368
|
* which contain following components/buttons:
|
|
369
369
|
*
|
|
370
370
|
* - AttachButton
|
|
@@ -48,20 +48,20 @@ export type MessageOverlayContextValue<
|
|
|
48
48
|
/**
|
|
49
49
|
* Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/2.png) in overlay.
|
|
50
50
|
*
|
|
51
|
-
* **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/MessageActions.tsx)
|
|
51
|
+
* **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/MessageActions.tsx)
|
|
52
52
|
*/
|
|
53
53
|
MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;
|
|
54
54
|
MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;
|
|
55
55
|
/**
|
|
56
56
|
* Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/2.png) in overlay (which shows up on long press on message).
|
|
57
57
|
*
|
|
58
|
-
* **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/OverlayReactionList.tsx)
|
|
58
|
+
* **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/OverlayReactionList.tsx)
|
|
59
59
|
*/
|
|
60
60
|
OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;
|
|
61
61
|
/**
|
|
62
62
|
* Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/master/screenshots/docs/2.png), in overlay (which shows up on long press on message).
|
|
63
63
|
*
|
|
64
|
-
* **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageOverlay/OverlayReactions.tsx)
|
|
64
|
+
* **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/components/MessageOverlay/OverlayReactions.tsx)
|
|
65
65
|
*/
|
|
66
66
|
OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;
|
|
67
67
|
OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Please check the `MessagesContextValue` in [MessagesContext](https://github.com/GetStream/stream-chat-react-native/blob/master/src/contexts/messageContext/MessageContext.tsx), for consumable values.
|
|
1
|
+
Please check the `MessagesContextValue` in [MessagesContext](https://github.com/GetStream/stream-chat-react-native/blob/master/package/src/contexts/messageContext/MessageContext.tsx), for consumable values.
|
|
2
2
|
Provider for this context exists in `Channel` component. And so, any child component of Channel
|
|
3
3
|
can get access to context as following:
|
|
4
4
|
|