chat 1.0.6 → 3.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/package.json +2 -96
- package/readme.md +1 -201
- package/lib/module/ChatContext/index.js +0 -2
- package/lib/module/ChatContext/index.js.map +0 -1
- package/lib/module/ChatContext/types.js +0 -2
- package/lib/module/ChatContext/types.js.map +0 -1
- package/lib/module/classes/Chat/index.js +0 -2
- package/lib/module/classes/Chat/index.js.map +0 -1
- package/lib/module/classes/Chat/types.js +0 -2
- package/lib/module/classes/Chat/types.js.map +0 -1
- package/lib/module/classes/Inbox/index.js +0 -2
- package/lib/module/classes/Inbox/index.js.map +0 -1
- package/lib/module/classes/Inbox/types.js +0 -2
- package/lib/module/classes/Inbox/types.js.map +0 -1
- package/lib/module/classes/Message/index.js +0 -2
- package/lib/module/classes/Message/index.js.map +0 -1
- package/lib/module/classes/Message/types.js +0 -2
- package/lib/module/classes/Message/types.js.map +0 -1
- package/lib/module/classes/Reaction/index.js +0 -2
- package/lib/module/classes/Reaction/index.js.map +0 -1
- package/lib/module/classes/Reaction/types.js +0 -2
- package/lib/module/classes/Reaction/types.js.map +0 -1
- package/lib/module/classes/Room/index.js +0 -2
- package/lib/module/classes/Room/index.js.map +0 -1
- package/lib/module/classes/Room/types.js +0 -2
- package/lib/module/classes/Room/types.js.map +0 -1
- package/lib/module/classes/index.js +0 -2
- package/lib/module/classes/index.js.map +0 -1
- package/lib/module/components/Avatar/index.js +0 -2
- package/lib/module/components/Avatar/index.js.map +0 -1
- package/lib/module/components/Chat/Bubble/index.js +0 -2
- package/lib/module/components/Chat/Bubble/index.js.map +0 -1
- package/lib/module/components/Chat/Composer/Input/index.js +0 -2
- package/lib/module/components/Chat/Composer/Input/index.js.map +0 -1
- package/lib/module/components/Chat/Composer/Send/index.js +0 -2
- package/lib/module/components/Chat/Composer/Send/index.js.map +0 -1
- package/lib/module/components/Chat/Composer/index.js +0 -2
- package/lib/module/components/Chat/Composer/index.js.map +0 -1
- package/lib/module/components/Chat/Media/Image/index.js +0 -2
- package/lib/module/components/Chat/Media/Image/index.js.map +0 -1
- package/lib/module/components/Chat/Media/index.js +0 -2
- package/lib/module/components/Chat/Media/index.js.map +0 -1
- package/lib/module/components/Chat/Message/Swiper/Action/index.js +0 -2
- package/lib/module/components/Chat/Message/Swiper/Action/index.js.map +0 -1
- package/lib/module/components/Chat/Message/Swiper/index.js +0 -2
- package/lib/module/components/Chat/Message/Swiper/index.js.map +0 -1
- package/lib/module/components/Chat/Message/Touchable/index.js +0 -2
- package/lib/module/components/Chat/Message/Touchable/index.js.map +0 -1
- package/lib/module/components/Chat/Message/index.js +0 -2
- package/lib/module/components/Chat/Message/index.js.map +0 -1
- package/lib/module/components/Chat/SystemMessage/index.js +0 -2
- package/lib/module/components/Chat/SystemMessage/index.js.map +0 -1
- package/lib/module/components/Chat/TypingFooter/index.js +0 -2
- package/lib/module/components/Chat/TypingFooter/index.js.map +0 -1
- package/lib/module/components/Chat/index.js +0 -2
- package/lib/module/components/Chat/index.js.map +0 -1
- package/lib/module/components/Chat/types.js +0 -2
- package/lib/module/components/Chat/types.js.map +0 -1
- package/lib/module/components/Chat-Old/Bubble/index.js +0 -2
- package/lib/module/components/Chat-Old/Bubble/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Composer/Input/index.js +0 -2
- package/lib/module/components/Chat-Old/Composer/Input/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Composer/Send/index.js +0 -2
- package/lib/module/components/Chat-Old/Composer/Send/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Composer/index.js +0 -2
- package/lib/module/components/Chat-Old/Composer/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Message/index.js +0 -2
- package/lib/module/components/Chat-Old/Message/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Swiper/Action/index.js +0 -2
- package/lib/module/components/Chat-Old/Swiper/Action/index.js.map +0 -1
- package/lib/module/components/Chat-Old/Swiper/index.js +0 -2
- package/lib/module/components/Chat-Old/Swiper/index.js.map +0 -1
- package/lib/module/components/Chat-Old/SystemMessage/index.js +0 -2
- package/lib/module/components/Chat-Old/SystemMessage/index.js.map +0 -1
- package/lib/module/components/Chat-Old/index.js +0 -2
- package/lib/module/components/Chat-Old/index.js.map +0 -1
- package/lib/module/components/Chat-Old/types.js +0 -2
- package/lib/module/components/Chat-Old/types.js.map +0 -1
- package/lib/module/components/ChatProvider/index.js +0 -2
- package/lib/module/components/ChatProvider/index.js.map +0 -1
- package/lib/module/components/ChatProvider/types.js +0 -2
- package/lib/module/components/ChatProvider/types.js.map +0 -1
- package/lib/module/components/Inbox/Item/Circle/index.js +0 -2
- package/lib/module/components/Inbox/Item/Circle/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/Circle/types.js +0 -2
- package/lib/module/components/Inbox/Item/Circle/types.js.map +0 -1
- package/lib/module/components/Inbox/Item/Initials/index.js +0 -2
- package/lib/module/components/Inbox/Item/Initials/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/ItemDate/index.js +0 -2
- package/lib/module/components/Inbox/Item/ItemDate/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/Separator/index.js +0 -2
- package/lib/module/components/Inbox/Item/Separator/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/Subtitle/index.js +0 -2
- package/lib/module/components/Inbox/Item/Subtitle/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/Swipeable/index.js +0 -2
- package/lib/module/components/Inbox/Item/Swipeable/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/Title/index.js +0 -2
- package/lib/module/components/Inbox/Item/Title/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/UnreadIndicator/index.js +0 -2
- package/lib/module/components/Inbox/Item/UnreadIndicator/index.js.map +0 -1
- package/lib/module/components/Inbox/Item/index.js +0 -2
- package/lib/module/components/Inbox/Item/index.js.map +0 -1
- package/lib/module/components/Inbox/index.js +0 -2
- package/lib/module/components/Inbox/index.js.map +0 -1
- package/lib/module/components/Inbox/question.md +0 -21
- package/lib/module/components/Inbox/readme.md +0 -21
- package/lib/module/components/Inbox/types.js +0 -2
- package/lib/module/components/Inbox/types.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/Footer/Button/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/Footer/Button/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/Footer/Input/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/Footer/Input/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/Footer/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/Footer/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/Item/Icon/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/Item/Icon/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/Item/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/Item/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Content/index.js +0 -2
- package/lib/module/components/RoomCreator/Content/index.js.map +0 -1
- package/lib/module/components/RoomCreator/Header/index.js +0 -2
- package/lib/module/components/RoomCreator/Header/index.js.map +0 -1
- package/lib/module/components/RoomCreator/index.js +0 -2
- package/lib/module/components/RoomCreator/index.js.map +0 -1
- package/lib/module/components/RoomCreator/types.js +0 -2
- package/lib/module/components/RoomCreator/types.js.map +0 -1
- package/lib/module/components/TypingIndicator/index.js +0 -2
- package/lib/module/components/TypingIndicator/index.js.map +0 -1
- package/lib/module/components/index.js +0 -2
- package/lib/module/components/index.js.map +0 -1
- package/lib/module/helpers/getInitials.js +0 -2
- package/lib/module/helpers/getInitials.js.map +0 -1
- package/lib/module/helpers/sortByAvatar.js +0 -2
- package/lib/module/helpers/sortByAvatar.js.map +0 -1
- package/lib/module/hooks/index.js +0 -2
- package/lib/module/hooks/index.js.map +0 -1
- package/lib/module/hooks/useCreateRoom/index.js +0 -2
- package/lib/module/hooks/useCreateRoom/index.js.map +0 -1
- package/lib/module/hooks/useCreator/index.js +0 -2
- package/lib/module/hooks/useCreator/index.js.map +0 -1
- package/lib/module/hooks/useInbox/index.js +0 -2
- package/lib/module/hooks/useInbox/index.js.map +0 -1
- package/lib/module/hooks/useInbox/types.js +0 -2
- package/lib/module/hooks/useInbox/types.js.map +0 -1
- package/lib/module/hooks/useMessages/index.js +0 -2
- package/lib/module/hooks/useMessages/index.js.map +0 -1
- package/lib/module/hooks/useMessages/types.js +0 -2
- package/lib/module/hooks/useMessages/types.js.map +0 -1
- package/lib/module/hooks/useRoom/index.js +0 -2
- package/lib/module/hooks/useRoom/index.js.map +0 -1
- package/lib/module/hooks/useRoom/types.js +0 -2
- package/lib/module/hooks/useRoom/types.js.map +0 -1
- package/lib/module/hooks/useSend/useSendToGroup/index.js +0 -2
- package/lib/module/hooks/useSend/useSendToGroup/index.js.map +0 -1
- package/lib/module/hooks/useSend/useSendToPeople/index.js +0 -2
- package/lib/module/hooks/useSend/useSendToPeople/index.js.map +0 -1
- package/lib/module/hooks/useTyping/index.js +0 -2
- package/lib/module/hooks/useTyping/index.js.map +0 -1
- package/lib/module/hooks/useTypingOLD/index.js +0 -2
- package/lib/module/hooks/useTypingOLD/index.js.map +0 -1
- package/lib/module/hooks/useTypingOLD/types.js +0 -2
- package/lib/module/hooks/useTypingOLD/types.js.map +0 -1
- package/lib/module/hooks/useViewMessages/index.js +0 -2
- package/lib/module/hooks/useViewMessages/index.js.map +0 -1
- package/lib/module/hooks/useViewMessages/types.js +0 -2
- package/lib/module/hooks/useViewMessages/types.js.map +0 -1
- package/lib/module/hooks/useViewMessagesOld/index.js +0 -2
- package/lib/module/hooks/useViewMessagesOld/index.js.map +0 -1
- package/lib/module/index.js +0 -2
- package/lib/module/index.js.map +0 -1
- package/lib/typescript/ChatContext/index.d.ts +0 -2
- package/lib/typescript/ChatContext/types.d.ts +0 -4
- package/lib/typescript/classes/Chat/index.d.ts +0 -14
- package/lib/typescript/classes/Chat/types.d.ts +0 -21
- package/lib/typescript/classes/Inbox/types.d.ts +0 -2
- package/lib/typescript/classes/Message/index.d.ts +0 -47
- package/lib/typescript/classes/Message/types.d.ts +0 -66
- package/lib/typescript/classes/Reaction/index.d.ts +0 -17
- package/lib/typescript/classes/Reaction/types.d.ts +0 -33
- package/lib/typescript/classes/Room/index.d.ts +0 -42
- package/lib/typescript/classes/Room/types.d.ts +0 -112
- package/lib/typescript/classes/index.d.ts +0 -4
- package/lib/typescript/components/Avatar/index.d.ts +0 -4
- package/lib/typescript/components/Chat/Bubble/index.d.ts +0 -4
- package/lib/typescript/components/Chat/Composer/Input/index.d.ts +0 -7
- package/lib/typescript/components/Chat/Composer/Send/index.d.ts +0 -4
- package/lib/typescript/components/Chat/Composer/index.d.ts +0 -8
- package/lib/typescript/components/Chat/Media/Image/index.d.ts +0 -7
- package/lib/typescript/components/Chat/Media/index.d.ts +0 -4
- package/lib/typescript/components/Chat/Message/Touchable/index.d.ts +0 -4
- package/lib/typescript/components/Chat/Message/index.d.ts +0 -8
- package/lib/typescript/components/Chat/SystemMessage/index.d.ts +0 -4
- package/lib/typescript/components/Chat/TypingFooter/index.d.ts +0 -4
- package/lib/typescript/components/Chat/index.d.ts +0 -8
- package/lib/typescript/components/Chat/types.d.ts +0 -844
- package/lib/typescript/components/ChatProvider/index.d.ts +0 -10
- package/lib/typescript/components/ChatProvider/types.d.ts +0 -7
- package/lib/typescript/components/Inbox/Item/Initials/index.d.ts +0 -4
- package/lib/typescript/components/Inbox/Item/ItemDate/index.d.ts +0 -4
- package/lib/typescript/components/Inbox/Item/Separator/index.d.ts +0 -6
- package/lib/typescript/components/Inbox/Item/Subtitle/index.d.ts +0 -3
- package/lib/typescript/components/Inbox/Item/Swipeable/index.d.ts +0 -4
- package/lib/typescript/components/Inbox/Item/Title/index.d.ts +0 -3
- package/lib/typescript/components/Inbox/Item/UnreadIndicator/index.d.ts +0 -4
- package/lib/typescript/components/Inbox/Item/index.d.ts +0 -6
- package/lib/typescript/components/Inbox/index.d.ts +0 -4
- package/lib/typescript/components/Inbox/types.d.ts +0 -304
- package/lib/typescript/components/RoomCreator/Content/Footer/Button/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/Content/Footer/Input/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/Content/Footer/index.d.ts +0 -3
- package/lib/typescript/components/RoomCreator/Content/Item/Icon/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/Content/Item/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/Content/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/Header/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/index.d.ts +0 -4
- package/lib/typescript/components/RoomCreator/types.d.ts +0 -208
- package/lib/typescript/components/TypingIndicator/index.d.ts +0 -9
- package/lib/typescript/components/index.d.ts +0 -12
- package/lib/typescript/helpers/getInitials.d.ts +0 -1
- package/lib/typescript/hooks/index.d.ts +0 -8
- package/lib/typescript/hooks/useCreator/index.d.ts +0 -27
- package/lib/typescript/hooks/useInbox/index.d.ts +0 -29
- package/lib/typescript/hooks/useInbox/types.d.ts +0 -5
- package/lib/typescript/hooks/useMessages/index.d.ts +0 -24
- package/lib/typescript/hooks/useMessages/types.d.ts +0 -5
- package/lib/typescript/hooks/useRoom/index.d.ts +0 -26
- package/lib/typescript/hooks/useRoom/types.d.ts +0 -5
- package/lib/typescript/hooks/useSend/useSendToGroup/index.d.ts +0 -6
- package/lib/typescript/hooks/useSend/useSendToPeople/index.d.ts +0 -6
- package/lib/typescript/hooks/useTyping/index.d.ts +0 -36
- package/lib/typescript/hooks/useViewMessages/index.d.ts +0 -18
- package/lib/typescript/hooks/useViewMessages/types.d.ts +0 -20
- package/lib/typescript/index.d.ts +0 -11
- package/src/ChatContext/index.tsx +0 -9
- package/src/ChatContext/types.ts +0 -4
- package/src/classes/Chat/index.ts +0 -46
- package/src/classes/Chat/types.ts +0 -23
- package/src/classes/Inbox/index.ts +0 -12
- package/src/classes/Inbox/types.ts +0 -3
- package/src/classes/Message/index.ts +0 -310
- package/src/classes/Message/types.ts +0 -118
- package/src/classes/Reaction/index.ts +0 -108
- package/src/classes/Reaction/types.ts +0 -37
- package/src/classes/Room/index.ts +0 -323
- package/src/classes/Room/types.ts +0 -161
- package/src/classes/index.ts +0 -4
- package/src/components/Avatar/index.tsx +0 -25
- package/src/components/Chat/Bubble/index.tsx +0 -139
- package/src/components/Chat/Composer/Input/index.tsx +0 -45
- package/src/components/Chat/Composer/Send/index.tsx +0 -51
- package/src/components/Chat/Composer/index.tsx +0 -184
- package/src/components/Chat/Media/Image/index.tsx +0 -26
- package/src/components/Chat/Media/index.tsx +0 -11
- package/src/components/Chat/Message/Swiper/Action/index.tsx +0 -7
- package/src/components/Chat/Message/Swiper/index.tsx +0 -32
- package/src/components/Chat/Message/Touchable/index.tsx +0 -60
- package/src/components/Chat/Message/index.tsx +0 -328
- package/src/components/Chat/SystemMessage/index.tsx +0 -44
- package/src/components/Chat/TypingFooter/index.tsx +0 -48
- package/src/components/Chat/index.tsx +0 -592
- package/src/components/Chat/types.ts +0 -911
- package/src/components/Chat-Old/Bubble/index.tsx +0 -58
- package/src/components/Chat-Old/Composer/Input/index.tsx +0 -34
- package/src/components/Chat-Old/Composer/Send/index.tsx +0 -37
- package/src/components/Chat-Old/Composer/index.tsx +0 -131
- package/src/components/Chat-Old/Message/index.tsx +0 -160
- package/src/components/Chat-Old/Swiper/Action/index.tsx +0 -7
- package/src/components/Chat-Old/Swiper/index.tsx +0 -30
- package/src/components/Chat-Old/SystemMessage/index.tsx +0 -44
- package/src/components/Chat-Old/index.tsx +0 -356
- package/src/components/Chat-Old/types.ts +0 -752
- package/src/components/ChatProvider/index.tsx +0 -31
- package/src/components/ChatProvider/types.ts +0 -8
- package/src/components/Inbox/Item/Circle/index.tsx +0 -47
- package/src/components/Inbox/Item/Circle/types.ts +0 -8
- package/src/components/Inbox/Item/Initials/index.tsx +0 -41
- package/src/components/Inbox/Item/ItemDate/index.tsx +0 -26
- package/src/components/Inbox/Item/Separator/index.tsx +0 -13
- package/src/components/Inbox/Item/Subtitle/index.tsx +0 -23
- package/src/components/Inbox/Item/Swipeable/index.tsx +0 -143
- package/src/components/Inbox/Item/Title/index.tsx +0 -23
- package/src/components/Inbox/Item/UnreadIndicator/index.tsx +0 -84
- package/src/components/Inbox/Item/index.tsx +0 -307
- package/src/components/Inbox/index.tsx +0 -315
- package/src/components/Inbox/question.md +0 -21
- package/src/components/Inbox/readme.md +0 -21
- package/src/components/Inbox/types.ts +0 -371
- package/src/components/RoomCreator/Content/Footer/Button/index.tsx +0 -55
- package/src/components/RoomCreator/Content/Footer/Input/index.tsx +0 -27
- package/src/components/RoomCreator/Content/Footer/index.tsx +0 -72
- package/src/components/RoomCreator/Content/Item/Icon/index.tsx +0 -16
- package/src/components/RoomCreator/Content/Item/index.tsx +0 -87
- package/src/components/RoomCreator/Content/index.tsx +0 -75
- package/src/components/RoomCreator/Header/index.tsx +0 -74
- package/src/components/RoomCreator/index.tsx +0 -177
- package/src/components/RoomCreator/types.ts +0 -233
- package/src/components/TypingIndicator/index.tsx +0 -169
- package/src/components/index.ts +0 -18
- package/src/helpers/getInitials.ts +0 -11
- package/src/helpers/sortByAvatar.ts +0 -1
- package/src/hooks/index.ts +0 -8
- package/src/hooks/useCreateRoom/index.ts +0 -34
- package/src/hooks/useCreator/index.ts +0 -33
- package/src/hooks/useInbox/index.ts +0 -76
- package/src/hooks/useInbox/types.ts +0 -6
- package/src/hooks/useMessages/index.ts +0 -109
- package/src/hooks/useMessages/types.ts +0 -6
- package/src/hooks/useRoom/index.ts +0 -82
- package/src/hooks/useRoom/types.ts +0 -6
- package/src/hooks/useSend/useSendToGroup/index.ts +0 -38
- package/src/hooks/useSend/useSendToPeople/index.ts +0 -38
- package/src/hooks/useTyping/index.ts +0 -154
- package/src/hooks/useTypingOLD/index.ts +0 -67
- package/src/hooks/useTypingOLD/types.ts +0 -7
- package/src/hooks/useViewMessages/index.ts +0 -61
- package/src/hooks/useViewMessages/types.ts +0 -22
- package/src/hooks/useViewMessagesOld/index.ts +0 -39
- package/src/index.ts +0 -13
|
@@ -1,844 +0,0 @@
|
|
|
1
|
-
import { TextInputProps, TextStyle, StyleProp, ViewStyle, Animated, Image, ListRenderItemInfo, FlatListProps, FlatList, View, ScrollViewProps, TextInput } from 'react-native';
|
|
2
|
-
import { ComponentType, ReactNode, ReactElement, MutableRefObject } from 'react';
|
|
3
|
-
import { NewMessageModel, MessageMedia } from '../../classes/Message/types';
|
|
4
|
-
import { AvatarProps, InitialsProps } from '../../components/Inbox/types';
|
|
5
|
-
import { TypingIndicatorProps } from '../../components/TypingIndicator';
|
|
6
|
-
/**
|
|
7
|
-
* Component that provides a full-on chat screen. Inspired by GiftedChat and works directly with the chat backend.
|
|
8
|
-
/**
|
|
9
|
-
* Chat props
|
|
10
|
-
* @template MessageModel
|
|
11
|
-
*/
|
|
12
|
-
export interface ChatProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
13
|
-
/**
|
|
14
|
-
* **Required:** Array of messages to be rendered.
|
|
15
|
-
*
|
|
16
|
-
* The default schema looks like this:
|
|
17
|
-
* ```ts
|
|
18
|
-
* interface NewMessageModel {
|
|
19
|
-
* text: string
|
|
20
|
-
* createdAt: Date
|
|
21
|
-
* user: {
|
|
22
|
-
* id: string
|
|
23
|
-
* name: string
|
|
24
|
-
* avatar: string
|
|
25
|
-
* }
|
|
26
|
-
* system?: boolean
|
|
27
|
-
* media?: MessageMedia
|
|
28
|
-
* // Any additional custom parameters are passed through
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* If you want to customize the schema using typescript, you can import and extend the `NewMessageModel`.
|
|
33
|
-
*/
|
|
34
|
-
messages: MessageModel[];
|
|
35
|
-
/**
|
|
36
|
-
* Text input state value.
|
|
37
|
-
* If you use this prop, you must also use the onInputTextChanged prop with it to handle the text state on your own.
|
|
38
|
-
*/
|
|
39
|
-
text?: ComposerProps['text'];
|
|
40
|
-
/**
|
|
41
|
-
* Function called whenever the composer text changes (when a message is sent or someone types).
|
|
42
|
-
* **IMPORTANT**
|
|
43
|
-
* If you use this prop, you must also use the `text` prop with it.
|
|
44
|
-
*/
|
|
45
|
-
onInputTextChanged?: ComposerProps['onInputTextChanged'];
|
|
46
|
-
/**
|
|
47
|
-
* Callback function called whenever a message is sent.
|
|
48
|
-
* @param messages - An array of messages. The reason this is an array is because you might have an image and text, and you might want to send them as separate messages.
|
|
49
|
-
*/
|
|
50
|
-
onSend: (messages: (MessageModel | NewMessageModel)[]) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Props passed to the TextInput component. See [react-native's docs](https://facebook.github.io/react-native/docs/textinput.html)
|
|
53
|
-
*/
|
|
54
|
-
textInputProps?: InputProps['inputProps'];
|
|
55
|
-
/**
|
|
56
|
-
* Optional styles for the view that wraps the entire component.
|
|
57
|
-
* Default: { flex: 1 }
|
|
58
|
-
*
|
|
59
|
-
* If you're new to react native, see the docs for styles [here](https://facebook.github.io/react-native/docs/style)
|
|
60
|
-
*/
|
|
61
|
-
containerStyle?: ViewStyle;
|
|
62
|
-
/**
|
|
63
|
-
* Optional styles for FlatList's contentContainerStyle. [See React Native Docs](https://facebook.github.io/react-native/docs/scrollview.html#contentcontainerstyle)
|
|
64
|
-
*/
|
|
65
|
-
contentContainerStyle?: ViewStyle;
|
|
66
|
-
/**
|
|
67
|
-
* Custom React component that wraps the entire Chat component. By default, it is an Animated.View from react-native-reanimated, nested inside
|
|
68
|
-
*/
|
|
69
|
-
ContainerComponent?: ComponentType;
|
|
70
|
-
/**
|
|
71
|
-
* Disable reanimated's transition API when new messages send, someone starts/stops typing, etc.
|
|
72
|
-
*
|
|
73
|
-
* _Shout-out to Krzysztof Magiera for the awesome react-native-reanimated lib._
|
|
74
|
-
*/
|
|
75
|
-
disableTransitions?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Optional custom transition for the reanimated transitions API. [See docs for transitions](https://github.com/kmagiera/react-native-reanimated#transitions-) (you'll see more in their examples/).
|
|
78
|
-
* Will fire this transition whenever a new message is sent/received, or when someone else starts/stops typing (unless typing indicators are disabled.)
|
|
79
|
-
*
|
|
80
|
-
* **Default:**
|
|
81
|
-
* ```javascript
|
|
82
|
-
* const transitionConfig = (
|
|
83
|
-
* <Transition.Sequence>
|
|
84
|
-
* <Transition.Together>
|
|
85
|
-
* <Transition.Out type="fade" />
|
|
86
|
-
* <Transition.Change interpolation="easeOut" />
|
|
87
|
-
* </Transition.Together>
|
|
88
|
-
* <Transition.In type="fade" />
|
|
89
|
-
* </Transition.Sequence>
|
|
90
|
-
* )
|
|
91
|
-
* ```
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
transitionConfig?: ReactNode;
|
|
96
|
-
/**
|
|
97
|
-
* Default false.
|
|
98
|
-
* If true, disables the reanimated Transition on the initial mount / load of messages
|
|
99
|
-
*/
|
|
100
|
-
disableTransitionOnMount?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* **Important** Be sure to use `useMemo` for this value if you're using react hooks to avoid re-renders.
|
|
103
|
-
* Style prop for the bubble text, based on whether or not the user sent it (`me`) or someone else did (`others`)
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ``` javascript
|
|
107
|
-
* const bubbleTextStyle = useCallback(({ isMe }) => ({ color: isMe ? 'white' : 'green' }), [])
|
|
108
|
-
* return <Messages bubbleTextStyle={bubbleTextStyle} />
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
bubbleTextStyle?: PartialUserOptions<MessageProps['bubbleTextStyle']>;
|
|
112
|
-
/**
|
|
113
|
-
* **Important** Be sure to use `useMemo` for this value if you're using react hooks to avoid re-renders.
|
|
114
|
-
* Style prop for the bubble view, based on whether or not the user sent it (`me`) or someone else did (`others`):
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ``` javascript
|
|
118
|
-
* const bubbleStyle = useCallback(({ isMe }) => ({ backgroundColor: isMe ? 'green' : 'white' }), [])
|
|
119
|
-
* return <Messages bubbleStyle={bubbleStyle} />
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
bubbleStyle?: PartialUserOptions<MessageProps['bubbleStyle']>;
|
|
123
|
-
/**
|
|
124
|
-
* **Important** Be sure to use `useMemo` for this value if you're using react hooks to avoid re-renders.
|
|
125
|
-
* Style prop for the bubble's container view, based on whether or not the user sent it (`me`) or someone else did (`others`).
|
|
126
|
-
*
|
|
127
|
-
* **Note:** The container is not the bubble itself, rather the view that holds the bubble, responsible for choosing which side of the screen it goes on, etc.
|
|
128
|
-
* If you want to edit the bubble directly, see bubbleStyle or bubbleTextStyle props.
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ``` javascript
|
|
132
|
-
* const messageContainerStyle = useCallback(({ isMe }) => ({ justifyContent: isMe ? 'flex-end' : 'flex-start' }), [])
|
|
133
|
-
* return <Messages messageContainerStyle={messageContainerStyle} />
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
messageContainerStyle?: PartialUserOptions<MessageProps['messageContainerStyle']>;
|
|
137
|
-
/**
|
|
138
|
-
* Style prop for the bubble's wrapper view, based on whether or not the user sent it (`me`) or someone else did (`others`).
|
|
139
|
-
*
|
|
140
|
-
* This view is _inside_ of the bubble's container view. It wraps the bubble *and* the avatar. You might use this if you want to switch which side the avatar is on.
|
|
141
|
-
*
|
|
142
|
-
* @remarks
|
|
143
|
-
* - To change which side of the screen a message bubble actually shows up on, see `messageContainerStyle` prop.
|
|
144
|
-
* - To change the background color and other styles of a bubble, see `bubbleStyle` prop.
|
|
145
|
-
* - To update bubble text, see `bubbleTextStyle` prop.
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* ``` javascript
|
|
149
|
-
* // switch "my" avatar to show up on the left instead of the right.
|
|
150
|
-
* const messageWrapperStyle = useCallback(({ isMe }) => ({ flexDirection: isMe ? 'row-reverse' : undefined }), [])
|
|
151
|
-
* return <Messages messageWrapperStyle={messageWrapperStyle} />
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
messageWrapperStyle?: PartialUserOptions<MessageProps['messageWrapperStyle']>;
|
|
155
|
-
/**
|
|
156
|
-
* Boolean that disables the swipe-from-side actions on specific messages. Overrides the `swipeActions` prop.
|
|
157
|
-
*/
|
|
158
|
-
disableSwipeActions?: boolean;
|
|
159
|
-
/**
|
|
160
|
-
* A dictionary { left, right }, each value of which is an array of pre-made actions that let you swipe on a message and do something with it (for instance, reply or react to one).
|
|
161
|
-
* Default: { right: ['reply'] }
|
|
162
|
-
*
|
|
163
|
-
* Options: ['reply', 'react', 'edit', 'delete']
|
|
164
|
-
*
|
|
165
|
-
* if `disableSwipeActions` prop is true, then this prop is ignored.
|
|
166
|
-
*/
|
|
167
|
-
swipeActions?: SwipeableProps['swipeActions'];
|
|
168
|
-
/**
|
|
169
|
-
* Which side the actions swipe from. Defaults to right.
|
|
170
|
-
*
|
|
171
|
-
* For example, the swipe to reply to message will swipe from right if this is right.
|
|
172
|
-
*
|
|
173
|
-
* If you're using react navigation's stack navigator, I'd suggesting leaving this as the default.
|
|
174
|
-
* That said, you could customize react-navigation's gesture distance (see:
|
|
175
|
-
* [react-navigation's docs](https://reactnavigation.org/docs/en/stack-navigator.html#gestureresponsedistance)
|
|
176
|
-
* )
|
|
177
|
-
*/
|
|
178
|
-
/**
|
|
179
|
-
* React node that replaces the default actions when swiping a message.
|
|
180
|
-
*
|
|
181
|
-
* @param props - { action: string, drag: Animated.Value, progress: Animated.AnimatedInterpolation }
|
|
182
|
-
*
|
|
183
|
-
* Perhaps you only want to use a custom icon when replying, for example.
|
|
184
|
-
* @example
|
|
185
|
-
* ```js
|
|
186
|
-
* return (
|
|
187
|
-
* <Messages
|
|
188
|
-
* renderSwipeAction={props => (
|
|
189
|
-
* props.action === 'reply ? <YourCustomAction {} /> : <Messages.SwipeAction {...props} />
|
|
190
|
-
* )}
|
|
191
|
-
* />
|
|
192
|
-
* )
|
|
193
|
-
*
|
|
194
|
-
* ```
|
|
195
|
-
*
|
|
196
|
-
* See related props: `swipeActions`, `disableSwipeActions`, `swipeActionWidth`
|
|
197
|
-
*/
|
|
198
|
-
renderSwipeAction?: SwipeableProps['renderSwipeAction'];
|
|
199
|
-
/**
|
|
200
|
-
* How wide the swipe actions are. Default: 80
|
|
201
|
-
*
|
|
202
|
-
* See related props: `swipeActions`, `disableSwipeActions`, `renderSwipeAction`
|
|
203
|
-
*/
|
|
204
|
-
swipeActionWidth?: SwipeableProps['actionWidth'];
|
|
205
|
-
/**
|
|
206
|
-
* Custom function to render the media that's in a message. It could be a image or video.
|
|
207
|
-
*/
|
|
208
|
-
renderMessageMedia?: MessageProps['renderMedia'];
|
|
209
|
-
messageVerticalMargin?: number;
|
|
210
|
-
/**
|
|
211
|
-
* Function that generates a random ID for messages that are sent. By default, it uses uuid.v4()
|
|
212
|
-
*/
|
|
213
|
-
messageIdGenerator?: () => string;
|
|
214
|
-
/**
|
|
215
|
-
* _Deprecated_ use the `namesOfUsersTyping` prop instead.
|
|
216
|
-
*
|
|
217
|
-
* Boolean to indicate if users are typing. Can be used with the `useMessages` hook.
|
|
218
|
-
* @example
|
|
219
|
-
* ```
|
|
220
|
-
* const [{data}, {usersAreTyping}] = useMessages({ id: 'someRoomId' })
|
|
221
|
-
*
|
|
222
|
-
* return <Messages messages={data} usersAreTyping={usersAreTyping} />
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
/**
|
|
226
|
-
* List of the names of people typing. This can be useful if you want to show text like:
|
|
227
|
-
* "Michael, Jim & Jan are typing..."
|
|
228
|
-
*
|
|
229
|
-
* Can be used with the `useMessages` hook.
|
|
230
|
-
* @example
|
|
231
|
-
* ```
|
|
232
|
-
* // namesOfUsersTyping will not include you if you are typing.
|
|
233
|
-
* const [{data}, {namesOfUsersTyping}] = useMessages({ id: 'someRoomId' })
|
|
234
|
-
*
|
|
235
|
-
* return <Chat messages={data} namesOfUsersTyping={namesOfUsersTyping} />
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
namesOfUsersTyping?: string[];
|
|
239
|
-
/**
|
|
240
|
-
* Function to replace the normal <TypingIndicator /> component.
|
|
241
|
-
*
|
|
242
|
-
* **Note:** This is not a necessary prop to customize the typing indicator. There are many props to customize the typing indicator without rendering a fully new one.
|
|
243
|
-
* See `typingIndicatorProps` and `typingIndicatorContainerStyle`
|
|
244
|
-
*/
|
|
245
|
-
renderTypingIndicator?: (props: TypingProps) => ReactNode;
|
|
246
|
-
extraData?: FlatListProps<MessageModel>['extraData'];
|
|
247
|
-
MessageComponent?: ComponentType;
|
|
248
|
-
user: NewMessageModel['user'];
|
|
249
|
-
hideMyAvatar?: boolean;
|
|
250
|
-
showAvatarForEveryMessage?: boolean;
|
|
251
|
-
renderAvatar?: ((props: AvatarProps) => ReactNode) | null;
|
|
252
|
-
renderMessageFooter?: MessageProps['renderFooter'];
|
|
253
|
-
/**
|
|
254
|
-
* (Optional) Use this to render a custom message component.
|
|
255
|
-
* @param props Receives MessageProps
|
|
256
|
-
*
|
|
257
|
-
* If you're looking to entirely override the message render function in the FlatList component, use the renderItem prop.
|
|
258
|
-
*/
|
|
259
|
-
renderMessage?: null | ((props: MessageProps) => ReactElement);
|
|
260
|
-
/**
|
|
261
|
-
* (Optional) Use this to render a custom bubble component. This will render inside of the messageWrapper. Not the same as renderMessage, which renders the top-level message component.
|
|
262
|
-
* @param props - receives BubbleProps
|
|
263
|
-
*/
|
|
264
|
-
renderBubble?: null | ((props: BubbleProps) => ReactNode);
|
|
265
|
-
/**
|
|
266
|
-
* If you're thinking of using this, there's a good change you're looking for the renderMessageProp
|
|
267
|
-
* (Advanced) You probably shouldn't use this prop unless you want a high level of customization.
|
|
268
|
-
* This overrides the default renderItem function for the FlatList.
|
|
269
|
-
* See React Native's FlatList renderItem docs.
|
|
270
|
-
*/
|
|
271
|
-
renderItem?: (props: ListRenderItemInfo<MessageModel>) => ReactElement;
|
|
272
|
-
/**
|
|
273
|
-
* (Optional) override default FlatList keyExtractor: (item) => item.id
|
|
274
|
-
*/
|
|
275
|
-
keyExtractor?: FlatListProps<MessageModel>['keyExtractor'];
|
|
276
|
-
/**
|
|
277
|
-
* Render component under the TextInput, similar to the way iMessage does.
|
|
278
|
-
* @param props: Same props passed to the Composer
|
|
279
|
-
*/
|
|
280
|
-
renderComposerFooter?: (props: ComposerFooterProps) => ReactNode;
|
|
281
|
-
/**
|
|
282
|
-
* Extend the props for the ListView that renders the messages.
|
|
283
|
-
*/
|
|
284
|
-
flatListProps?: Omit<Omit<FlatListProps<MessageModel>, 'renderItem'>, 'data'>;
|
|
285
|
-
/**
|
|
286
|
-
* Renders at the end of the messages list. Different from renderFooter, which is fixed at the bottom, this moves with the scroll.
|
|
287
|
-
*/
|
|
288
|
-
ListFooterComponent?: FlatListProps<MessageModel>['ListFooterComponent'];
|
|
289
|
-
/**
|
|
290
|
-
* Render React component above the messages.
|
|
291
|
-
* For instance, maybe you want to render "New messages ^" to indicate someone should scroll up
|
|
292
|
-
*/
|
|
293
|
-
renderHeader?: () => ReactNode;
|
|
294
|
-
/**
|
|
295
|
-
* Render React component fixed at the bottom below the messages list. Different from ListFooterComponent prop, which scrolls with messages.
|
|
296
|
-
*/
|
|
297
|
-
renderFooter?: () => ReactNode;
|
|
298
|
-
/**
|
|
299
|
-
* Custom composer component. The "Composer" encapsulates the entire creation bar at the bottom.
|
|
300
|
-
*/
|
|
301
|
-
renderComposer?: (props: ComposerProps) => ReactNode;
|
|
302
|
-
/**
|
|
303
|
-
* Custom TextInput component inside the composer. Different from the renderComposer prop, which renders the entire composer component.
|
|
304
|
-
*/
|
|
305
|
-
renderTextInput?: ComposerProps['renderTextInput'];
|
|
306
|
-
/**
|
|
307
|
-
* Custom send button component. The "Composer" encapsulates the entire creation bar at the bottom.
|
|
308
|
-
*/
|
|
309
|
-
renderSendButton?: ComposerProps['renderSendButton'];
|
|
310
|
-
/**
|
|
311
|
-
* Custom view style for the container holding the send button.
|
|
312
|
-
*/
|
|
313
|
-
sendButtonContainerStyle?: SendButtonProps['containerStyle'];
|
|
314
|
-
/**
|
|
315
|
-
* Function called when message is pressed.
|
|
316
|
-
*/
|
|
317
|
-
onPressMessage?: (message: MessageModel) => void;
|
|
318
|
-
/**
|
|
319
|
-
* Function called when message is double tapped.
|
|
320
|
-
*/
|
|
321
|
-
onDoubleTapMessage?: (message: MessageModel) => void;
|
|
322
|
-
/**
|
|
323
|
-
* Function called when message is long pressed.
|
|
324
|
-
*/
|
|
325
|
-
onLongPressMessage?: (message: MessageModel) => void;
|
|
326
|
-
/**
|
|
327
|
-
* How long the interval should be to detect a long press.
|
|
328
|
-
*
|
|
329
|
-
* *Default: 400ms
|
|
330
|
-
*/
|
|
331
|
-
messageLongPressDelay?: MessageProps['longPressDelay'];
|
|
332
|
-
/**
|
|
333
|
-
* What kind of "press" method should work for clicking a message.
|
|
334
|
-
* Can be "single" or "double".
|
|
335
|
-
*
|
|
336
|
-
* Related: messageDoubleTapDelay prop
|
|
337
|
-
*/
|
|
338
|
-
/**
|
|
339
|
-
* How long the interval should be between taps to detect a double tap.
|
|
340
|
-
* **Important** The `messagePressType` prop must be set to "double" for this to apply.
|
|
341
|
-
*
|
|
342
|
-
* *Default: 200ms*
|
|
343
|
-
*/
|
|
344
|
-
messageDoubleTapDelay?: MessageProps['doubleTapDelay'];
|
|
345
|
-
/**
|
|
346
|
-
* See [react-native docs](https://www.google.com/search?q=image+props+react+native&oq=image+props+react+native&aqs=chrome.0.0l5j69i64.1740j0j7&sourceid=chrome&ie=UTF-8) for image props.
|
|
347
|
-
*/
|
|
348
|
-
imageProps?: MessageProps['imageProps'];
|
|
349
|
-
initialText?: string;
|
|
350
|
-
/**
|
|
351
|
-
* Text that sits in TextInput when it's empty. Defaults to "Type a message..."
|
|
352
|
-
*/
|
|
353
|
-
placeholderText?: InputProps['placeholderText'];
|
|
354
|
-
/**
|
|
355
|
-
* Color for text that sits in TextInput when it's empty.
|
|
356
|
-
*/
|
|
357
|
-
placeholderColor?: InputProps['placeholderColor'];
|
|
358
|
-
/**
|
|
359
|
-
* Boolean to set whether or not the Chat component container should be wrapped with a SafeAreaView.
|
|
360
|
-
* Default: `false`
|
|
361
|
-
*/
|
|
362
|
-
safeArea?: boolean;
|
|
363
|
-
/**
|
|
364
|
-
* Override the composer's local media state.
|
|
365
|
-
* This can be useful if you're using redux or another similar state manager.
|
|
366
|
-
*
|
|
367
|
-
* **Note:** must be used with the `onMediaChanged` prop.
|
|
368
|
-
*/
|
|
369
|
-
media?: MessageMedia[];
|
|
370
|
-
/**
|
|
371
|
-
* Handle the composer's media selection on your own.
|
|
372
|
-
* This can be useful if you're using redux or another similar state manager.
|
|
373
|
-
*
|
|
374
|
-
* **Note:** must be used with the `media` prop.
|
|
375
|
-
*/
|
|
376
|
-
onChangeMedia?: (media: NewMessageModel[]) => void;
|
|
377
|
-
/**
|
|
378
|
-
* funtion that returns a custom component to render composer media
|
|
379
|
-
* @params props - ({ media }) => ReactNode
|
|
380
|
-
* where media is an array of media items
|
|
381
|
-
*
|
|
382
|
-
* @example
|
|
383
|
-
* ```jsx
|
|
384
|
-
* <Messages
|
|
385
|
-
* renderComposerMedia={({ media }) =>
|
|
386
|
-
* media.map(item => item.contentType === 'image' ? <Image uri={{ uri: item.uri } style={{ height: 100, width: 100 }} /> : null)
|
|
387
|
-
* }
|
|
388
|
-
* />
|
|
389
|
-
* ```
|
|
390
|
-
*/
|
|
391
|
-
renderComposerMedia?: (props: {
|
|
392
|
-
media: Omit<MessageMedia, 'url'>;
|
|
393
|
-
}) => ReactNode;
|
|
394
|
-
/**
|
|
395
|
-
* Dictionary to customize the send button mode based on the input text length. Mode be one of these strings: 'icon', 'text', 'hidden'.
|
|
396
|
-
*
|
|
397
|
-
* **Default:**
|
|
398
|
-
|
|
399
|
-
* ```javascript
|
|
400
|
-
* const sendButtonMode = {
|
|
401
|
-
* withText: 'icon',
|
|
402
|
-
* empty: 'hidden'
|
|
403
|
-
* }
|
|
404
|
-
* ```
|
|
405
|
-
*/
|
|
406
|
-
sendButtonMode?: PartialInputOptions<SendButtonMode>;
|
|
407
|
-
/**
|
|
408
|
-
* Default: `false`
|
|
409
|
-
* Set `true` if you don't want the messages to scroll to the end when you send a new message.
|
|
410
|
-
*/
|
|
411
|
-
disableScrollToBottomOnSend?: boolean;
|
|
412
|
-
/**
|
|
413
|
-
* Optional react-native animated value that tracks the position of the scroll.
|
|
414
|
-
*
|
|
415
|
-
*/
|
|
416
|
-
animatedScrollNode?: Animated.Value;
|
|
417
|
-
/**
|
|
418
|
-
* If true, messages will scroll to bottom every time a new message comes in, regardless of who sends it.
|
|
419
|
-
* Default: `false`.
|
|
420
|
-
* If true, this prop overrides `disableScrollToBottomOnSend`.
|
|
421
|
-
*/
|
|
422
|
-
scrollToBottomOnAllNewMessages?: boolean;
|
|
423
|
-
/**
|
|
424
|
-
* Callback function for when messages are viewed
|
|
425
|
-
* @param viewInfo - Dictionary with details about the messages being viewed
|
|
426
|
-
* @param viewInfo.visibleMessages - Array of current messages that are visible
|
|
427
|
-
* @param viewInfo.latestMessageId - If the most recent message in this chat room is visible, then this will return its ID. Otherwise, this will be null.
|
|
428
|
-
*
|
|
429
|
-
* `chat` uses the logic from latestMessageId to clear unread counts. This is helpful if you want to avoid uploading to your backend every single time a message is viewed, and instead only when you view the most recent one (since you can clear out the previous.)
|
|
430
|
-
* @example
|
|
431
|
-
* ```javascript
|
|
432
|
-
* export default ({ id }) => {
|
|
433
|
-
* const [{ data }, { send }] = useMessages({ id })
|
|
434
|
-
* const onViewMessages = useViewMessages({ roomId: id })
|
|
435
|
-
*
|
|
436
|
-
* return <Messages messages={data} onSend={send} onViewMessages={onViewMessages} />
|
|
437
|
-
* }
|
|
438
|
-
* ```
|
|
439
|
-
*/
|
|
440
|
-
onViewMessages?: (viewInfo: {
|
|
441
|
-
visibleMessages: MessageModel[];
|
|
442
|
-
latestMessageId: string | null;
|
|
443
|
-
}) => void;
|
|
444
|
-
/**
|
|
445
|
-
* **🚨** If you're using this prop to track viewed messages, see the `onViewMessages` prop instead.
|
|
446
|
-
*
|
|
447
|
-
* Optional FlatList prop. [See react native docs](https://facebook.github.io/react-native/docs/0.18/flatlist#onviewableitemschanged).
|
|
448
|
-
*/
|
|
449
|
-
onViewableItemsChanged?: FlatList<MessageModel>['props']['onViewableItemsChanged'];
|
|
450
|
-
/**
|
|
451
|
-
* General tint color for the chat, used for the buttons, text, etc.
|
|
452
|
-
*/
|
|
453
|
-
tintColor?: string;
|
|
454
|
-
/**
|
|
455
|
-
* If true, component will implement its own KeyboardAvoidingView component for ios and android.
|
|
456
|
-
*
|
|
457
|
-
* Default: `true`
|
|
458
|
-
*
|
|
459
|
-
* **Note:** If you're using react navigation's stack navigator, this can have bugs. For some reason, the react-navigation's Header component pushes down the view. One solution is to set the stack to `headerTransparent`: `true`. The downside of this is you'll have to set the FlatList's contentContainerStyle to have a top padding to offset the header height. If you're using a bottom tab navigator too, just disable the hiding on keyboard show prop for that navigator.
|
|
460
|
-
*/
|
|
461
|
-
avoidKeyboard?: boolean;
|
|
462
|
-
/**
|
|
463
|
-
* Style the outer container of the composer (not to be confused with `inputContainerStyle`)
|
|
464
|
-
*/
|
|
465
|
-
composerContainerStyle?: StyleProp<ViewStyle>;
|
|
466
|
-
/**
|
|
467
|
-
* Style the container immediately wrapping the TextInput (not to be confused with `composerContainerStyle`)
|
|
468
|
-
*/
|
|
469
|
-
inputContainerStyle?: StyleProp<ViewStyle>;
|
|
470
|
-
/**
|
|
471
|
-
* Directly style the TextInput component.
|
|
472
|
-
*/
|
|
473
|
-
inputStyle?: TextInputProps['style'];
|
|
474
|
-
/**
|
|
475
|
-
* **Note:** For basic system message customizations, see these props instead: `systemMessageTextStyle`, `systemMessageTextStyle`, `systemMessageContainerStyle`, `systemMessageDateStyle`, systemMessageDateToStringFunc
|
|
476
|
-
*
|
|
477
|
-
* This prop is a function that returns a custom system message component. You can also extend the <SystemMessage /> component if you'd like.
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```javascript
|
|
481
|
-
* return <Messages renderSystemMessage={props => (
|
|
482
|
-
* <SystemMessage
|
|
483
|
-
* {...props}
|
|
484
|
-
* // custom props
|
|
485
|
-
* />
|
|
486
|
-
* )} />
|
|
487
|
-
* ```
|
|
488
|
-
*/
|
|
489
|
-
renderSystemMessage?: null | ((props: SystemMessageProps) => ReactElement);
|
|
490
|
-
/**
|
|
491
|
-
* Style the text for a custom message.
|
|
492
|
-
*/
|
|
493
|
-
systemMessageTextStyle?: StyleProp<TextStyle>;
|
|
494
|
-
/**
|
|
495
|
-
* Style the view that wraps a system message and its date.
|
|
496
|
-
*/
|
|
497
|
-
systemMessageContainerStyle?: StyleProp<ViewStyle>;
|
|
498
|
-
/**
|
|
499
|
-
* Style the text for a system message's date.
|
|
500
|
-
*/
|
|
501
|
-
systemMessageDateStyle?: StyleProp<TextStyle>;
|
|
502
|
-
/**
|
|
503
|
-
* System that dates in a date and returns a string to be printed as the date for system messages.
|
|
504
|
-
*
|
|
505
|
-
* By default, uses moment.js. This is the default function:
|
|
506
|
-
* ```javascript
|
|
507
|
-
* import moment from 'moment'
|
|
508
|
-
*
|
|
509
|
-
* date => moment(date).calendar(undefined, {
|
|
510
|
-
* lastDay: '[Yesterday]',
|
|
511
|
-
* sameDay: 'LT',
|
|
512
|
-
* nextDay: '[Tomorrow at] LT',
|
|
513
|
-
* lastWeek: 'dddd',
|
|
514
|
-
* nextWeek: '[Next] dddd',
|
|
515
|
-
* sameElse: 'L'
|
|
516
|
-
* })
|
|
517
|
-
* ```
|
|
518
|
-
*/
|
|
519
|
-
systemMessageDateToStringFunc?: SystemMessageProps['dateToStringFunc'];
|
|
520
|
-
/**
|
|
521
|
-
* Style the text that shows a person's name above their message.
|
|
522
|
-
*/
|
|
523
|
-
nameStyle?: TextStyle;
|
|
524
|
-
/**
|
|
525
|
-
* Boolean to enable name being shown every time someone else sends a message. Default `false`.
|
|
526
|
-
*
|
|
527
|
-
* @remarks
|
|
528
|
-
* To enable name for messages the user sends too, see the `showMyName` prop.
|
|
529
|
-
*/
|
|
530
|
-
showNameForEveryMessage?: boolean;
|
|
531
|
-
/**
|
|
532
|
-
* Boolean to enable name being for the person sending messages. Default `false`
|
|
533
|
-
*/
|
|
534
|
-
showMyName?: boolean;
|
|
535
|
-
/**
|
|
536
|
-
* Custom function to render a date in between messages. Dates are rendered in between messages when messages are sent on a new day.
|
|
537
|
-
*/
|
|
538
|
-
renderDate?: null | ((date: Date) => ReactNode);
|
|
539
|
-
/**
|
|
540
|
-
* See React Native's ScrollView docs. This prop manages whether or not the chat scrollview should persist through taps when keyboard is open.
|
|
541
|
-
*/
|
|
542
|
-
keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps'];
|
|
543
|
-
/**
|
|
544
|
-
* See React Native's ScrollView docs. This prop manages the way the keyboard is closed when someone scrolls
|
|
545
|
-
*/
|
|
546
|
-
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
|
|
547
|
-
/**
|
|
548
|
-
* Ref that gets forwarded to the Messages component. Exposes the following methods:
|
|
549
|
-
*
|
|
550
|
-
* - `focusInput` (for input)
|
|
551
|
-
* - `blurInput` (for input)
|
|
552
|
-
* - `scrollToEnd` Remember that this FlatList is inverted so you should think of 0 as the bottom of the screen. (see: [FlatList docs](https://facebook.github.io/react-native/docs/flatlist.html#scrolltoend))
|
|
553
|
-
* - `scrollToIndex` (see: [FlatList docs](https://facebook.github.io/react-native/docs/flatlist.html#scrolltoindex))
|
|
554
|
-
* - `scrollToItem` (see: [FlatList docs](https://facebook.github.io/react-native/docs/flatlist.html#scrolltoitem))
|
|
555
|
-
* - `scrollToOffset` Remember that this FlatList is inverted so you should think of 0 as the bottom of the screen. (see: [FlatList docs](https://facebook.github.io/react-native/docs/flatlist.html#scrolltooffset))
|
|
556
|
-
*
|
|
557
|
-
*/
|
|
558
|
-
chatRef?: MutableRefObject<ChatRef<MessageModel>>;
|
|
559
|
-
/**
|
|
560
|
-
* size for the avatar/initials component that renders next to messages
|
|
561
|
-
* default: `40`
|
|
562
|
-
*/
|
|
563
|
-
avatarSize?: number;
|
|
564
|
-
/**
|
|
565
|
-
* React Native Image props passed to the avatar. For max customization, see `renderAvatar` prop.
|
|
566
|
-
*/
|
|
567
|
-
avatarImageProps?: AvatarProps['imageProps'];
|
|
568
|
-
/**
|
|
569
|
-
* Background color for the initials component that will show in the absense of an avatar.
|
|
570
|
-
*/
|
|
571
|
-
initialsBackgroundColor?: string;
|
|
572
|
-
/**
|
|
573
|
-
* Text color for the initials component that will show in the absense of an avatar.
|
|
574
|
-
*/
|
|
575
|
-
initialsTextColor?: string;
|
|
576
|
-
/**
|
|
577
|
-
* Custom component to render the Initials component when there isn't an avatar present.
|
|
578
|
-
* Takes one argument (InitialsProps).
|
|
579
|
-
*
|
|
580
|
-
* @example
|
|
581
|
-
* ```javascript
|
|
582
|
-
* return <Messages renderInitials={props => <Initials {...props} />} />
|
|
583
|
-
* ```
|
|
584
|
-
*/
|
|
585
|
-
renderInitials?: (props: InitialsProps) => ReactNode;
|
|
586
|
-
/**
|
|
587
|
-
* **Important** Use React's `useCallback` hook for this value if you're using react hooks to avoid re-renders.
|
|
588
|
-
*
|
|
589
|
-
* Function receives one argument: a dictionary with boolean `isMe` value. If true, then this is the screen for the person sending the message.
|
|
590
|
-
*
|
|
591
|
-
* The return value of this function determines the background color for message bubbles. If an array is returned, it will make a gradient background color.
|
|
592
|
-
* This function can return one of the following: 1) string (solid color background), 2) array of strings (for gradient), 3) function that returns a string, or 4) function that returns an array of strings for a gradient.
|
|
593
|
-
*
|
|
594
|
-
* If a function is returned, it will receive the message as its only argument. This is very useful if you want to have different colors determined by who sent the message, what kind of content it has, etc.
|
|
595
|
-
*
|
|
596
|
-
* @remarks
|
|
597
|
-
* If you return a function, it will receive a dictionary containing the message information, and the message's id as the only argument. It must return an array or string.
|
|
598
|
-
*
|
|
599
|
-
* @example
|
|
600
|
-
* ```js
|
|
601
|
-
* const bubbleBackgroundColor = useCallback(({ isMe }) => {
|
|
602
|
-
* if (isMe) {
|
|
603
|
-
* return 'darkblue' // if you want, you can just return a string for one color
|
|
604
|
-
*
|
|
605
|
-
* // you can also pass an array of colors for a gradient
|
|
606
|
-
* return ['lightgray', 'darkblue']
|
|
607
|
-
* }
|
|
608
|
-
*
|
|
609
|
-
* // instead of a string or array of strings, you could also pass a function:
|
|
610
|
-
* // passing a function that returns a color (or array of colors for a gradient) lets you use message data to determine the colors
|
|
611
|
-
* return message => message.user.id === 'user_1' ? 'lavender' : 'green'
|
|
612
|
-
*
|
|
613
|
-
* // or, if you want a gradient, you could do this:
|
|
614
|
-
* return message => message.user.name === 'Fernando' ? ['darkgreen', 'lightgray'] : ['lavender', 'lightgray']
|
|
615
|
-
*
|
|
616
|
-
* }, [])
|
|
617
|
-
* return <Messages bubbleBackgroundColor={bubbleBackgroundColor} />
|
|
618
|
-
* ```
|
|
619
|
-
*/
|
|
620
|
-
bubbleBackgroundColor?: PartialUserOptions<MessageProps['bubbleBackgroundColor']>;
|
|
621
|
-
/**
|
|
622
|
-
* **Important** Be sure to use `useMemo` for this value if you're using react hooks to avoid re-renders.
|
|
623
|
-
* Edit the bubble's text color based on who sent a message. Takes a dictionary {me, others} where each key optionally takes a color string argument.
|
|
624
|
-
*
|
|
625
|
-
* @example
|
|
626
|
-
* ```js
|
|
627
|
-
* const bubbleTextColor = useCallback(({ isMe }) => ({ color: isMe ? 'white' : 'black' }), [])
|
|
628
|
-
* return <Messages bubbleTextColor={bubbleTextColor} />
|
|
629
|
-
* ```
|
|
630
|
-
*/
|
|
631
|
-
bubbleTextColor?: PartialUserOptions<BubbleProps['textColor']>;
|
|
632
|
-
/**
|
|
633
|
-
* Custom React Component to replace the default React Native image. Perhaps you use fast image or expo image cache here.
|
|
634
|
-
*/
|
|
635
|
-
AvatarImageComponent?: ComponentType;
|
|
636
|
-
/**
|
|
637
|
-
* Pass props to the `<TypingIndicator />` component.
|
|
638
|
-
* If using react hooks, be sure to use `useMemo` for the props you pass to avoid re-render.
|
|
639
|
-
*/
|
|
640
|
-
typingIndicatorProps?: TypingIndicatorProps;
|
|
641
|
-
/**
|
|
642
|
-
* React native `View` props, passed to the view that holds the typing indicator whenever someone is typing.
|
|
643
|
-
*/
|
|
644
|
-
typingIndicatorContainerStyle?: ViewStyle;
|
|
645
|
-
/**
|
|
646
|
-
* Boolean. If `true`, the names of people typing will show up next to the typing indicator.
|
|
647
|
-
* If `false`, names won't show up.
|
|
648
|
-
*
|
|
649
|
-
* Fredrick, Franklin, and Finkleberry are typing...
|
|
650
|
-
*/
|
|
651
|
-
showTypingText?: boolean;
|
|
652
|
-
/**
|
|
653
|
-
* Allow send when you press enter.
|
|
654
|
-
*/
|
|
655
|
-
sendOnKeyboardReturn?: boolean;
|
|
656
|
-
/**
|
|
657
|
-
* Optional function that returns a react element to render the text of a message. Receives the message as props.
|
|
658
|
-
*/
|
|
659
|
-
renderMessageText?: (props: {
|
|
660
|
-
text: string;
|
|
661
|
-
style: StyleProp<TextStyle>;
|
|
662
|
-
}) => ReactNode;
|
|
663
|
-
}
|
|
664
|
-
export interface MessageProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
665
|
-
renderText?: ChatProps['renderMessageText'];
|
|
666
|
-
id: string;
|
|
667
|
-
isMe: boolean;
|
|
668
|
-
text: MessageModel['text'];
|
|
669
|
-
system: MessageModel['system'];
|
|
670
|
-
bubbleTextStyle?: StyleProp<TextStyle>;
|
|
671
|
-
bubbleStyle?: StyleProp<ViewStyle>;
|
|
672
|
-
messageContainerStyle?: StyleProp<ViewStyle>;
|
|
673
|
-
messageWrapperStyle?: StyleProp<ViewStyle>;
|
|
674
|
-
name: MessageModel['user']['name'];
|
|
675
|
-
delivered?: boolean;
|
|
676
|
-
read?: boolean;
|
|
677
|
-
renderFooter?: (props: {
|
|
678
|
-
id: string;
|
|
679
|
-
}) => ReactNode;
|
|
680
|
-
mediaHeight?: MessageMedia['height'];
|
|
681
|
-
mediaWidth?: MessageMedia['width'];
|
|
682
|
-
mediaUrl?: MessageMedia['url'];
|
|
683
|
-
mediaUri?: MessageMedia['uri'];
|
|
684
|
-
mediaContentType?: MessageMedia['contentType'];
|
|
685
|
-
renderMedia?: (props: {
|
|
686
|
-
media: MessageMedia;
|
|
687
|
-
}) => ReactNode;
|
|
688
|
-
onPress?: TouchableProps['onPress'];
|
|
689
|
-
onLongPress?: TouchableProps['onLongPress'];
|
|
690
|
-
onDoubleTap?: TouchableProps['onDoubleTap'];
|
|
691
|
-
doubleTapDelay?: number;
|
|
692
|
-
longPressDelay?: number;
|
|
693
|
-
imageProps?: Image['props'];
|
|
694
|
-
disableSwipeActions?: SwipeableProps['disableSwipeActions'];
|
|
695
|
-
swipeActions?: SwipeableProps['swipeActions'];
|
|
696
|
-
renderSwipeAction?: SwipeableProps['renderSwipeAction'];
|
|
697
|
-
swipeActionWidth?: SwipeableProps['actionWidth'];
|
|
698
|
-
showName?: boolean;
|
|
699
|
-
avatar?: string;
|
|
700
|
-
avatarImageProps?: ChatProps['avatarImageProps'];
|
|
701
|
-
avatarSize?: ChatProps['avatarSize'];
|
|
702
|
-
renderAvatar?: ChatProps['renderAvatar'];
|
|
703
|
-
showAvatar?: boolean;
|
|
704
|
-
initialsBackgroundColor?: ChatProps['initialsBackgroundColor'];
|
|
705
|
-
initialsTextColor?: ChatProps['initialsTextColor'];
|
|
706
|
-
renderInitials?: ChatProps['renderInitials'];
|
|
707
|
-
tintColor?: string;
|
|
708
|
-
nameStyle?: ChatProps['nameStyle'];
|
|
709
|
-
bubbleBackgroundColor?: BubbleBackgroundColor;
|
|
710
|
-
bubbleTextColor?: BubbleProps['textColor'];
|
|
711
|
-
userId?: MessageModel['user']['id'];
|
|
712
|
-
userName?: MessageModel['user']['name'];
|
|
713
|
-
AvatarImageComponent?: ChatProps['AvatarImageComponent'];
|
|
714
|
-
/**
|
|
715
|
-
* boolean to indicate whether or not this message creates a new "bunch", meaning the person sending it is different from the person who sent the previous message.
|
|
716
|
-
* This is useful for adding extra margin between messages sent by different people.
|
|
717
|
-
*/
|
|
718
|
-
createsNewBunch?: boolean;
|
|
719
|
-
createdAt: Date;
|
|
720
|
-
}
|
|
721
|
-
export interface ChatRef<MessageModel extends NewMessageModel = NewMessageModel> extends Partial<FlatList<MessageModel>> {
|
|
722
|
-
focusInput: () => void;
|
|
723
|
-
blurInput: () => void;
|
|
724
|
-
}
|
|
725
|
-
export interface BubbleProps {
|
|
726
|
-
renderText?: ChatProps['renderMessageText'];
|
|
727
|
-
style?: StyleProp<ViewStyle>;
|
|
728
|
-
textStyle?: StyleProp<ViewStyle>;
|
|
729
|
-
isMe?: boolean;
|
|
730
|
-
text?: string;
|
|
731
|
-
bubbleRef?: MutableRefObject<View>;
|
|
732
|
-
backgroundColor?: string[];
|
|
733
|
-
textColor?: string;
|
|
734
|
-
mediaHeight?: MessageProps['mediaHeight'];
|
|
735
|
-
mediaWidth?: MessageProps['mediaWidth'];
|
|
736
|
-
mediaUrl?: MessageProps['mediaUrl'];
|
|
737
|
-
mediaUri?: MessageProps['mediaUri'];
|
|
738
|
-
mediaContentType?: MessageProps['mediaContentType'];
|
|
739
|
-
renderMedia?: MessageProps['renderMedia'];
|
|
740
|
-
}
|
|
741
|
-
declare type BubbleBackgroundColor<MessageModel extends NewMessageModel = NewMessageModel> = string | string[] | ((message: MessageModel) => string | string[]);
|
|
742
|
-
export interface SystemMessageProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
743
|
-
textStyle?: StyleProp<TextStyle>;
|
|
744
|
-
dateStyle?: StyleProp<TextStyle>;
|
|
745
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
746
|
-
text: MessageModel['text'];
|
|
747
|
-
createdAt: MessageModel['createdAt'];
|
|
748
|
-
dateToStringFunc?: (date: Date) => string;
|
|
749
|
-
}
|
|
750
|
-
export interface ComposerProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
751
|
-
renderTextInput?: (props: InputProps) => ReactNode;
|
|
752
|
-
renderSendButton?: (props: SendButtonProps) => ReactNode;
|
|
753
|
-
sendButtonContainerStyle?: SendButtonProps['containerStyle'];
|
|
754
|
-
textInputProps?: InputProps<MessageModel>['inputProps'];
|
|
755
|
-
text?: InputProps<MessageModel>['text'];
|
|
756
|
-
onInputTextChanged?: (text: string) => void;
|
|
757
|
-
placeholderText?: InputProps<MessageModel>['placeholderText'];
|
|
758
|
-
placeholderColor?: InputProps<MessageModel>['placeholderColor'];
|
|
759
|
-
initialText?: string;
|
|
760
|
-
media?: MessageMedia[];
|
|
761
|
-
user: ChatProps<MessageModel>['user'];
|
|
762
|
-
onChangeMedia?: ChatProps<MessageModel>['onChangeMedia'];
|
|
763
|
-
onSend: ChatProps<MessageModel>['onSend'];
|
|
764
|
-
sendButtonMode?: ChatProps['sendButtonMode'];
|
|
765
|
-
tintColor?: string;
|
|
766
|
-
containerStyle?: ChatProps['composerContainerStyle'];
|
|
767
|
-
inputContainerStyle?: ChatProps['inputContainerStyle'];
|
|
768
|
-
inputStyle?: ChatProps['inputStyle'];
|
|
769
|
-
inputRef?: MutableRefObject<TextInput>;
|
|
770
|
-
/**
|
|
771
|
-
* Allow send when you press enter.
|
|
772
|
-
*/
|
|
773
|
-
sendOnKeyboardReturn?: boolean;
|
|
774
|
-
}
|
|
775
|
-
export interface InputProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
776
|
-
text: string;
|
|
777
|
-
onChangeText: ChatProps<MessageModel>['onInputTextChanged'];
|
|
778
|
-
inputProps?: TextInputProps;
|
|
779
|
-
placeholderText?: string;
|
|
780
|
-
placeholderColor?: string;
|
|
781
|
-
tintColor?: string;
|
|
782
|
-
containerStyle?: ChatProps['inputContainerStyle'];
|
|
783
|
-
style?: ChatProps['inputStyle'];
|
|
784
|
-
inputRef?: MutableRefObject<TextInput>;
|
|
785
|
-
/**
|
|
786
|
-
* Allow send when you press enter.
|
|
787
|
-
*/
|
|
788
|
-
sendOnKeyboardReturn?: boolean;
|
|
789
|
-
onSubmitEditing?: TextInputProps['onSubmitEditing'];
|
|
790
|
-
}
|
|
791
|
-
export interface ComposerFooterProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
792
|
-
text: ComposerProps<MessageModel>['text'];
|
|
793
|
-
}
|
|
794
|
-
export interface SendButtonProps<MessageModel extends NewMessageModel = NewMessageModel> {
|
|
795
|
-
text?: string;
|
|
796
|
-
onSend: () => void;
|
|
797
|
-
media?: MessageMedia[];
|
|
798
|
-
user?: MessageModel['user'];
|
|
799
|
-
mode: SendButtonMode;
|
|
800
|
-
containerStyle?: ViewStyle;
|
|
801
|
-
tintColor?: string;
|
|
802
|
-
}
|
|
803
|
-
export declare type SwipeAction = 'reply' | 'edit' | 'delete' | 'react';
|
|
804
|
-
export declare type SendButtonMode = 'icon' | 'text' | 'hidden';
|
|
805
|
-
export declare type UserOptions<OptionType> = (info: {
|
|
806
|
-
isMe: boolean;
|
|
807
|
-
}) => OptionType;
|
|
808
|
-
export interface InputOptions<Option, EmtpyOption = null> {
|
|
809
|
-
withText: EmtpyOption | Option;
|
|
810
|
-
empty: Option;
|
|
811
|
-
}
|
|
812
|
-
export declare type PartialInputOptions<Option> = Partial<InputOptions<Option>>;
|
|
813
|
-
export declare type PartialUserOptions<OptionType> = UserOptions<OptionType>;
|
|
814
|
-
export interface SwipeableProps {
|
|
815
|
-
disableSwipeActions?: boolean;
|
|
816
|
-
swipeActions?: {
|
|
817
|
-
right?: SwipeAction[];
|
|
818
|
-
left?: SwipeAction[];
|
|
819
|
-
};
|
|
820
|
-
renderSwipeAction?: (action: SwipeActionProps) => ReactNode;
|
|
821
|
-
actionWidth?: SwipeActionProps['width'];
|
|
822
|
-
}
|
|
823
|
-
export interface SwipeActionProps {
|
|
824
|
-
progress?: Animated.Value | Animated.AnimatedInterpolation;
|
|
825
|
-
drag?: Animated.AnimatedInterpolation;
|
|
826
|
-
action: SwipeAction;
|
|
827
|
-
width?: number;
|
|
828
|
-
}
|
|
829
|
-
export interface TypingFooterProps extends TypingIndicatorProps, TypingProps {
|
|
830
|
-
containerStyle?: ViewStyle;
|
|
831
|
-
typingText?: string;
|
|
832
|
-
}
|
|
833
|
-
export interface TypingProps {
|
|
834
|
-
numberOfUsersTyping?: number;
|
|
835
|
-
}
|
|
836
|
-
export interface TouchableProps {
|
|
837
|
-
id: string;
|
|
838
|
-
onPress?: (id: string) => void;
|
|
839
|
-
onLongPress?: (id: string) => void;
|
|
840
|
-
onDoubleTap?: (id: string) => void;
|
|
841
|
-
longPressDelay?: ChatProps['messageLongPressDelay'];
|
|
842
|
-
doubleTapDelay?: ChatProps['messageDoubleTapDelay'];
|
|
843
|
-
}
|
|
844
|
-
export {};
|