chat 1.0.8 → 4.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/dist/chunk-ACQNDPTB.js +356 -0
- package/dist/chunk-ACQNDPTB.js.map +1 -0
- package/dist/index.d.ts +1312 -0
- package/dist/index.js +1433 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime-D7zHSnXe.d.ts +349 -0
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx-runtime.js +17 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/package.json +61 -97
- 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 -843
- 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/readme.md +0 -201
- 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 -187
- 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 -596
- package/src/components/Chat/types.ts +0 -913
- 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,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { Fuego } from '@nandorojo/fuego';
|
|
3
|
-
import { ChatProviderProps } from './types';
|
|
4
|
-
import Chat from '../../classes/Chat/index';
|
|
5
|
-
export declare let fuego: Fuego;
|
|
6
|
-
export declare let chat: Chat;
|
|
7
|
-
export declare const setFuego: (f: Fuego) => Fuego;
|
|
8
|
-
export declare const setChat: (c: Chat) => Chat;
|
|
9
|
-
declare const Provider: FunctionComponent<ChatProviderProps>;
|
|
10
|
-
export default Provider;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InboxItemProps } from '../types';
|
|
3
|
-
import { ExistingRoomModel } from '../../../classes/Room/types';
|
|
4
|
-
declare function Item<InboxItem extends ExistingRoomModel = ExistingRoomModel>(props: InboxItemProps<InboxItem>): JSX.Element;
|
|
5
|
-
declare const _default: React.MemoExoticComponent<typeof Item>;
|
|
6
|
-
export default _default;
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { FlatListProps, ViewStyle, Animated, TextStyle, ImageProps, ListRenderItemInfo } from 'react-native';
|
|
2
|
-
import { ReactNode, ComponentType } from 'react';
|
|
3
|
-
import { SwipeableProperties } from 'react-native-gesture-handler/Swipeable';
|
|
4
|
-
import { LinearGradient } from 'expo-linear-gradient';
|
|
5
|
-
import { ExistingRoomModel, RoomMembers, LastMessage } from '../../classes/Room/types';
|
|
6
|
-
export default interface InboxProps<InboxItem extends ExistingRoomModel = ExistingRoomModel> {
|
|
7
|
-
flatListProps?: Omit<Omit<FlatListProps<InboxItem>, 'renderItem'>, 'data'>;
|
|
8
|
-
keyExtractor?: FlatListProps<InboxItem>['keyExtractor'];
|
|
9
|
-
renderItem?: FlatListProps<InboxItem>['renderItem'];
|
|
10
|
-
/**
|
|
11
|
-
* if you want to use your own renderItem function, but include the props we made
|
|
12
|
-
* the alternative is a normal props.renderItem() which gets the raw flatlist data
|
|
13
|
-
*/
|
|
14
|
-
renderItemWithProps?: (props: InboxItemProps<InboxItem>) => ReactNode;
|
|
15
|
-
rooms: Array<InboxItem>;
|
|
16
|
-
renderHeader?: null | ((headerProps: InboxMethodProps<InboxItem>['renderHeader']) => ReactNode);
|
|
17
|
-
renderFooter?: null | ((footerProps: InboxMethodProps<InboxItem>['renderFooter']) => ReactNode);
|
|
18
|
-
ContainerComponent?: ComponentType;
|
|
19
|
-
HeaderComponent?: ComponentType<InboxMethodProps<InboxItem>['renderHeader']>;
|
|
20
|
-
FooterComponent?: ComponentType<InboxMethodProps<InboxItem>['renderFooter']>;
|
|
21
|
-
InboxItemComponent?: ComponentType<InboxItemProps<InboxItem>>;
|
|
22
|
-
containerStyle?: ViewStyle;
|
|
23
|
-
roomNameFunc?: (arg: InboxMethodProps<InboxItem>['roomNameFunc']) => string;
|
|
24
|
-
onPressItem: (id: string, pointerInside?: boolean) => void;
|
|
25
|
-
animatedScrollNode?: Animated.Value;
|
|
26
|
-
extraData?: FlatListProps<InboxItem>['extraData'];
|
|
27
|
-
bigHeader?: boolean;
|
|
28
|
-
headerTitle?: string;
|
|
29
|
-
renderItemTitle?: ((title: string) => ReactNode) | null;
|
|
30
|
-
renderItemDate?: ((date: Date) => ReactNode) | null;
|
|
31
|
-
ItemTitleComponent?: ComponentType<InboxItemTitleProps>;
|
|
32
|
-
titleStyle?: TextStyle;
|
|
33
|
-
titleContainerStyle?: ViewStyle;
|
|
34
|
-
ItemDateComponent?: ComponentType<DateProps>;
|
|
35
|
-
dateToStringFunc?: DateProps['dateToStringFunc'];
|
|
36
|
-
dateStyle?: TextStyle;
|
|
37
|
-
unreadIndicatorColor?: UnreadIndicatorProps['backgroundColor'];
|
|
38
|
-
unreadTextColor?: UnreadIndicatorProps['textColor'];
|
|
39
|
-
showUnreadIndicatorCount?: UnreadIndicatorProps['showCount'];
|
|
40
|
-
showUnreadIndicator?: UnreadIndicatorProps['show'];
|
|
41
|
-
UnreadIndicatorComponent?: ComponentType<UnreadIndicatorProps>;
|
|
42
|
-
renderUnreadIndicator?: ((props: UnreadIndicatorProps) => ReactNode) | null;
|
|
43
|
-
unreadIndicatorStyle?: UnreadIndicatorProps['backgroundStyle'];
|
|
44
|
-
unreadIndicatorTextStyle?: UnreadIndicatorProps['textStyle'];
|
|
45
|
-
unreadIndicatorPostion?: 'left' | 'right' | 'bottom-left' | 'bottom-right' | 'top-right' | 'top-left' | 'center-left' | 'center-right';
|
|
46
|
-
onPressNewRoom?: () => void;
|
|
47
|
-
renderItemSubtitle?: (lastMessageText: string) => ReactNode;
|
|
48
|
-
ItemSubtitleComponent?: ComponentType<InboxItemSubtitleProps>;
|
|
49
|
-
itemSubtitleTextStyle?: InboxItemSubtitleProps['textStyle'];
|
|
50
|
-
renderAvatar?: null | ((props: AvatarProps) => ReactNode);
|
|
51
|
-
renderInitials?: null | ((props: InitialsProps) => ReactNode);
|
|
52
|
-
ItemAvatarComponent?: ComponentType<AvatarProps>;
|
|
53
|
-
ItemInitialsComponent?: ComponentType<InitialsProps>;
|
|
54
|
-
prioritizeAvatarOverInitials?: boolean;
|
|
55
|
-
roomInitialsFunc?: (arg: InboxMethodProps<InboxItem>['roomInitialsFunc']) => string;
|
|
56
|
-
avatarSize?: AvatarProps['size'];
|
|
57
|
-
avatarImageProps?: AvatarProps['imageProps'];
|
|
58
|
-
initialsTextStyle?: InitialsProps['textStyle'];
|
|
59
|
-
initialsContainerStyle?: InitialsProps['containerStyle'];
|
|
60
|
-
fallbackToMultipleAvatarsIfNoGroupAvatar?: boolean;
|
|
61
|
-
fallbackToMultipleAvatarsIfNoGroupName?: boolean;
|
|
62
|
-
disableAvatar?: boolean;
|
|
63
|
-
initialsBackgroundColor?: InitialsProps['backgroundColor'];
|
|
64
|
-
initialsTextColor?: InitialsProps['textColor'];
|
|
65
|
-
onLongPressItem?: (id: string, pointerInside?: boolean) => void;
|
|
66
|
-
swipeableRow?: boolean;
|
|
67
|
-
safeArea?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* An array of items that will show on the right when the user swipes.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```javascript
|
|
73
|
-
* import { Inbox, Room } from 'usechat'
|
|
74
|
-
* import { Animated } from 'react-native'
|
|
75
|
-
* import { Ionicons } from '@expo/vector-icons'
|
|
76
|
-
*
|
|
77
|
-
* return (
|
|
78
|
-
* <Inbox
|
|
79
|
-
* swipeActionWidth={80}
|
|
80
|
-
* swipeRightActions={[
|
|
81
|
-
* {
|
|
82
|
-
* text: 'Delete',
|
|
83
|
-
* backgroundColor: 'red',
|
|
84
|
-
* color: 'white',
|
|
85
|
-
* renderIcon: progress => (
|
|
86
|
-
* <Animated.View
|
|
87
|
-
* style={{
|
|
88
|
-
* transform: [
|
|
89
|
-
* { scale: progress.interpolate({ inputRange: [0, 1.2], outputRange: [0.5, 1.2], extrapolate: 'clamp' }) },
|
|
90
|
-
* ],
|
|
91
|
-
* opacity: progress.interpolate({ inputRange: [0, 1], outputRange: [0, 1] }),
|
|
92
|
-
* }}
|
|
93
|
-
* >
|
|
94
|
-
* <Ionicons style={{ marginTop: 10 }} name="ios-trash" size={30} color="white" />
|
|
95
|
-
* </Animated.View>
|
|
96
|
-
* ),
|
|
97
|
-
* onPress: id => new Room({ id }).leave(),
|
|
98
|
-
* },
|
|
99
|
-
* ]}
|
|
100
|
-
* />
|
|
101
|
-
* )
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
swipeRightActions?: SwipeableProps['leftActions'];
|
|
105
|
-
/**
|
|
106
|
-
* An array of items that will show on the left when the user swipes.
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```javascript
|
|
110
|
-
* import { Inbox, Room } from 'usechat'
|
|
111
|
-
* import { Animated } from 'react-native'
|
|
112
|
-
* import { Ionicons } from '@expo/vector-icons'
|
|
113
|
-
*
|
|
114
|
-
* return (
|
|
115
|
-
* <Inbox
|
|
116
|
-
* swipeActionWidth={80}
|
|
117
|
-
* swipeLeftActions={[
|
|
118
|
-
* {
|
|
119
|
-
* text: 'Delete',
|
|
120
|
-
* backgroundColor: 'red',
|
|
121
|
-
* color: 'white',
|
|
122
|
-
* renderIcon: progress => (
|
|
123
|
-
* <Animated.View
|
|
124
|
-
* style={{
|
|
125
|
-
* transform: [
|
|
126
|
-
* { scale: progress.interpolate({ inputRange: [0, 1.2], outputRange: [0.5, 1.2], extrapolate: 'clamp' }) },
|
|
127
|
-
* ],
|
|
128
|
-
* opacity: progress.interpolate({ inputRange: [0, 1], outputRange: [0, 1] }),
|
|
129
|
-
* }}
|
|
130
|
-
* >
|
|
131
|
-
* <Ionicons style={{ marginTop: 10 }} name="ios-trash" size={30} color="white" />
|
|
132
|
-
* </Animated.View>
|
|
133
|
-
* ),
|
|
134
|
-
* onPress: id => new Room({ id }).leave(),
|
|
135
|
-
* },
|
|
136
|
-
* ]}
|
|
137
|
-
* />
|
|
138
|
-
* )
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
swipeLeftActions?: SwipeableProps['rightActions'];
|
|
142
|
-
renderSwipeAction?: SwipeableProps['renderAction'];
|
|
143
|
-
swipeActionWidth?: SwipeableProps['actionWidth'];
|
|
144
|
-
itemBackgroundColor?: string;
|
|
145
|
-
swipeableRowProps?: SwipeableProps['gestureHandlerProps'];
|
|
146
|
-
enableRoomTransitions?: boolean;
|
|
147
|
-
roomTransitionConfig?: ReactNode;
|
|
148
|
-
showTypingIndicator?: boolean;
|
|
149
|
-
renderTypingIndicator?: () => ReactNode | null;
|
|
150
|
-
membersToTypingStringFunc?: (members: RoomMembers) => string;
|
|
151
|
-
maxNumberOfInitials?: number;
|
|
152
|
-
unreadIndicatorType?: UnreadIndicatorProps['type'];
|
|
153
|
-
unreadIndicatorGradientProps?: UnreadIndicatorProps['gradientProps'];
|
|
154
|
-
unreadIndicatorSize?: UnreadIndicatorProps['size'];
|
|
155
|
-
itemContainerStyle?: ViewStyle;
|
|
156
|
-
renderRightActions?: SwipeableProps['renderRightActions'];
|
|
157
|
-
renderLeftActions?: SwipeableProps['renderLeftActions'];
|
|
158
|
-
actionTextStyle?: SwipeableProps['textStyle'];
|
|
159
|
-
separatorColor?: string;
|
|
160
|
-
separatorSize?: number;
|
|
161
|
-
}
|
|
162
|
-
export interface InboxMethodProps<InboxItem extends ExistingRoomModel = ExistingRoomModel> {
|
|
163
|
-
renderItem: ListRenderItemInfo<InboxItem>;
|
|
164
|
-
renderHeader: {
|
|
165
|
-
scrollY: Animated.Value;
|
|
166
|
-
big?: boolean;
|
|
167
|
-
onPressNewRoom?: InboxProps<InboxItem>['onPressNewRoom'];
|
|
168
|
-
};
|
|
169
|
-
renderFooter: {
|
|
170
|
-
scrollY: Animated.Value;
|
|
171
|
-
};
|
|
172
|
-
roomInitialsFunc: {
|
|
173
|
-
members: RoomMembers;
|
|
174
|
-
name: string;
|
|
175
|
-
maxNumberOfInitials: InboxProps<InboxItem>['maxNumberOfInitials'];
|
|
176
|
-
};
|
|
177
|
-
roomNameFunc: {
|
|
178
|
-
members: RoomMembers;
|
|
179
|
-
name: string;
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
export interface InboxItemProps<InboxItem extends ExistingRoomModel = ExistingRoomModel> {
|
|
183
|
-
onPress?: (pointerInside?: boolean) => ReturnType<InboxProps<InboxItem>['onPressItem']>;
|
|
184
|
-
onLongPress?: (pointerInside?: boolean) => void;
|
|
185
|
-
lastMessageCreatedAt: LastMessage['createdAt'];
|
|
186
|
-
lastMessageText: LastMessage['text'];
|
|
187
|
-
name: string;
|
|
188
|
-
unreadCount: ExistingRoomModel['unreadCount'];
|
|
189
|
-
renderTitle?: InboxProps<InboxItem>['renderItemTitle'];
|
|
190
|
-
TitleComponent?: InboxProps<InboxItem>['ItemTitleComponent'];
|
|
191
|
-
renderDate?: InboxProps<InboxItem>['renderItemDate'];
|
|
192
|
-
titleContainerStyle?: InboxProps<InboxItem>['titleContainerStyle'];
|
|
193
|
-
titleStyle?: InboxProps<InboxItem>['titleStyle'];
|
|
194
|
-
DateComponent?: InboxProps<InboxItem>['ItemDateComponent'];
|
|
195
|
-
unreadTextColor?: InboxProps<InboxItem>['unreadTextColor'];
|
|
196
|
-
unreadIndicatorColor?: InboxProps<InboxItem>['unreadIndicatorColor'];
|
|
197
|
-
showUnreadIndicatorCount?: InboxProps<InboxItem>['showUnreadIndicatorCount'];
|
|
198
|
-
showUnreadIndicator: InboxProps<InboxItem>['showUnreadIndicator'];
|
|
199
|
-
UnreadIndicatorComponent?: InboxProps<InboxItem>['UnreadIndicatorComponent'];
|
|
200
|
-
renderUnreadIndicator?: InboxProps<InboxItem>['renderUnreadIndicator'];
|
|
201
|
-
unreadIndicatorStyle?: InboxProps<InboxItem>['unreadIndicatorStyle'];
|
|
202
|
-
unreadIndicatorTextStyle?: InboxProps<InboxItem>['unreadIndicatorTextStyle'];
|
|
203
|
-
unreadIndicatorPosition?: InboxProps<InboxItem>['unreadIndicatorPostion'];
|
|
204
|
-
dateToStringFunc?: InboxProps<InboxItem>['dateToStringFunc'];
|
|
205
|
-
renderSubtitle?: InboxProps<InboxItem>['renderItemSubtitle'];
|
|
206
|
-
SubtitleComponent?: InboxProps<InboxItem>['ItemSubtitleComponent'];
|
|
207
|
-
subtitleTextStyle?: InboxProps<InboxItem>['itemSubtitleTextStyle'];
|
|
208
|
-
roomInitialsFunc?: InboxProps<InboxItem>['roomInitialsFunc'];
|
|
209
|
-
renderAvatar?: InboxProps<InboxItem>['renderAvatar'];
|
|
210
|
-
renderInitials?: InboxProps<InboxItem>['renderInitials'];
|
|
211
|
-
AvatarComponent?: InboxProps<InboxItem>['ItemAvatarComponent'];
|
|
212
|
-
InitialsComponent?: InboxProps<InboxItem>['ItemInitialsComponent'];
|
|
213
|
-
prioritizeAvatarOverInitials?: InboxProps<InboxItem>['prioritizeAvatarOverInitials'];
|
|
214
|
-
avatar?: string | {
|
|
215
|
-
initials: string;
|
|
216
|
-
avatar: string;
|
|
217
|
-
}[];
|
|
218
|
-
avatarSize?: AvatarProps['size'];
|
|
219
|
-
avatarImageProps?: AvatarProps['imageProps'];
|
|
220
|
-
initials: string;
|
|
221
|
-
initialsTextStyle?: InitialsProps['textStyle'];
|
|
222
|
-
initialsContainerStyle?: InitialsProps['containerStyle'];
|
|
223
|
-
disableAvatar?: InboxProps<InboxItem>['disableAvatar'];
|
|
224
|
-
initialsBackgroundColor?: InitialsProps['backgroundColor'];
|
|
225
|
-
initialsTextColor?: InitialsProps['textColor'];
|
|
226
|
-
swipeRightActions?: SwipeableProps['leftActions'];
|
|
227
|
-
swipeLeftActions?: SwipeableProps['rightActions'];
|
|
228
|
-
renderSwipeAction?: SwipeableProps['renderAction'];
|
|
229
|
-
swipeActionWidth?: SwipeableProps['actionWidth'];
|
|
230
|
-
swipeable?: boolean;
|
|
231
|
-
id: string;
|
|
232
|
-
backgroundColor: InboxProps<InboxItem>['itemBackgroundColor'];
|
|
233
|
-
swipeableRowProps?: SwipeableProps['gestureHandlerProps'];
|
|
234
|
-
unreadIndicatorType?: UnreadIndicatorProps['type'];
|
|
235
|
-
unreadIndicatorGradientProps?: UnreadIndicatorProps['gradientProps'];
|
|
236
|
-
unreadIndicatorSize?: UnreadIndicatorProps['size'];
|
|
237
|
-
containerStyle?: InboxProps<InboxItem>['itemContainerStyle'];
|
|
238
|
-
dateStyle?: InboxProps<InboxItem>['dateStyle'];
|
|
239
|
-
renderRightActions?: SwipeableProps['renderRightActions'];
|
|
240
|
-
renderLeftActions?: SwipeableProps['renderLeftActions'];
|
|
241
|
-
actionTextStyle?: SwipeableProps['textStyle'];
|
|
242
|
-
renderTypingIndicator?: InboxProps<InboxItem>['renderTypingIndicator'];
|
|
243
|
-
showTypingIndicator?: InboxProps<InboxItem>['showTypingIndicator'];
|
|
244
|
-
numberOfPeopleTyping?: number;
|
|
245
|
-
}
|
|
246
|
-
export interface DateProps {
|
|
247
|
-
date: Date;
|
|
248
|
-
dateToStringFunc?: (date: Date) => string;
|
|
249
|
-
style?: TextStyle;
|
|
250
|
-
}
|
|
251
|
-
export interface InboxItemTitleProps {
|
|
252
|
-
title: string;
|
|
253
|
-
style?: TextStyle;
|
|
254
|
-
containerStyle?: ViewStyle;
|
|
255
|
-
}
|
|
256
|
-
export interface InboxItemSubtitleProps {
|
|
257
|
-
lastMessageText: string;
|
|
258
|
-
textStyle?: TextStyle;
|
|
259
|
-
}
|
|
260
|
-
export interface UnreadIndicatorProps {
|
|
261
|
-
backgroundColor?: string;
|
|
262
|
-
textColor?: string;
|
|
263
|
-
showCount?: boolean;
|
|
264
|
-
show?: boolean;
|
|
265
|
-
unreadCount?: number;
|
|
266
|
-
backgroundStyle?: ViewStyle;
|
|
267
|
-
textStyle?: TextStyle;
|
|
268
|
-
position: 'bottom' | 'top' | 'center';
|
|
269
|
-
type: 'gradient' | 'solid';
|
|
270
|
-
gradientProps?: LinearGradient['props'];
|
|
271
|
-
size?: number;
|
|
272
|
-
}
|
|
273
|
-
export interface AvatarProps {
|
|
274
|
-
avatar: ExistingRoomModel['avatar'];
|
|
275
|
-
size: number;
|
|
276
|
-
imageProps?: ImageProps;
|
|
277
|
-
ImageComponent?: ComponentType;
|
|
278
|
-
}
|
|
279
|
-
export interface InitialsProps {
|
|
280
|
-
size: number;
|
|
281
|
-
initials: string;
|
|
282
|
-
textStyle?: TextStyle;
|
|
283
|
-
containerStyle?: ViewStyle;
|
|
284
|
-
textColor?: string;
|
|
285
|
-
backgroundColor?: string;
|
|
286
|
-
}
|
|
287
|
-
export interface SwipeableProps {
|
|
288
|
-
rightActions?: null | SwipeableAction[];
|
|
289
|
-
leftActions?: null | SwipeableAction[];
|
|
290
|
-
id: string;
|
|
291
|
-
actionWidth?: number;
|
|
292
|
-
gestureHandlerProps?: SwipeableProperties;
|
|
293
|
-
textStyle?: TextStyle;
|
|
294
|
-
renderLeftActions?: null | ((actions: SwipeableAction[], progress: Animated.Value | Animated.AnimatedInterpolation, drag: Animated.AnimatedInterpolation) => ReactNode);
|
|
295
|
-
renderRightActions?: null | ((action: SwipeableAction[], progress: Animated.Value | Animated.AnimatedInterpolation, drag: Animated.AnimatedInterpolation) => ReactNode);
|
|
296
|
-
renderAction?: null | ((action: SwipeableAction, index: number, progress: Animated.Value | Animated.AnimatedInterpolation, drag: Animated.AnimatedInterpolation, side: 'left' | 'right') => ReactNode);
|
|
297
|
-
}
|
|
298
|
-
export interface SwipeableAction {
|
|
299
|
-
text: string;
|
|
300
|
-
renderIcon?: (progress?: Animated.Value | Animated.AnimatedInterpolation, drag?: Animated.AnimatedInterpolation) => ReactNode;
|
|
301
|
-
color: string;
|
|
302
|
-
backgroundColor: string;
|
|
303
|
-
onPress?: (inboxItemId: string) => void;
|
|
304
|
-
}
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ComponentType, ReactElement } from 'react';
|
|
2
|
-
import Animated from 'react-native-reanimated';
|
|
3
|
-
import BottomSheet from 'reanimated-bottom-sheet';
|
|
4
|
-
import { NewMessageModel, SendFromFeedRecipients, SendFromFeedRecipientArray } from '../../classes/Message/types';
|
|
5
|
-
import { RoomMembers } from '../../classes/Room/types';
|
|
6
|
-
import { TextStyle, StyleProp, ImageStyle, ViewStyle, TextInputProps } from 'react-native';
|
|
7
|
-
export interface RoomCreatorRef {
|
|
8
|
-
open: () => void;
|
|
9
|
-
close: () => void;
|
|
10
|
-
}
|
|
11
|
-
interface RoomCreatorItem extends User {
|
|
12
|
-
type: Selected[keyof Selected];
|
|
13
|
-
}
|
|
14
|
-
export interface RoomCreatorProps {
|
|
15
|
-
renderHeader?: null | ((props: RoomCreatorHeaderProps) => ReactNode);
|
|
16
|
-
renderContent?: null | ((props: RoomCreatorContentProps) => ReactNode);
|
|
17
|
-
snapPoints?: [string, string] | [number, number];
|
|
18
|
-
callbackNode?: Animated.Value<number>;
|
|
19
|
-
sheetProps?: Omit<BottomSheet['props'], 'snapPoints'>;
|
|
20
|
-
sheetRef?: React.MutableRefObject<BottomSheet>;
|
|
21
|
-
creatorRef?: React.MutableRefObject<RoomCreatorRef>;
|
|
22
|
-
message?: null | NewMessageModel;
|
|
23
|
-
renderFooter?: null | ((props: RoomCreatorFooterProps) => ReactNode);
|
|
24
|
-
disableSendAsGroup?: boolean;
|
|
25
|
-
onSendSeparately?: RoomCreatorFunctions['onSendSeparately'];
|
|
26
|
-
onCreateRoom?: RoomCreatorFunctions['onCreateRoom'];
|
|
27
|
-
onSendAsGroup?: RoomCreatorFunctions['onSendAsGroup'];
|
|
28
|
-
selected?: Selected;
|
|
29
|
-
/**
|
|
30
|
-
* (Optional) Function called when a user is pressed.
|
|
31
|
-
* If used, the internal state manager of pressed items is disabled.
|
|
32
|
-
*
|
|
33
|
-
* **Important** you must use the `selected` too prop if you use this prop.
|
|
34
|
-
*
|
|
35
|
-
* @param id - the ID of the pressed user
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```javascript
|
|
39
|
-
* return <Inbox selected={selected} onSelectItem />
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
onSelectItem?: (id: string) => void;
|
|
43
|
-
users: Array<RoomCreatorItem>;
|
|
44
|
-
onDidClose?: () => void;
|
|
45
|
-
onDidOpen?: () => void;
|
|
46
|
-
text?: string;
|
|
47
|
-
onChangeText?: string;
|
|
48
|
-
disableComposer?: boolean;
|
|
49
|
-
isReadyFunc?: (selected: Selected) => boolean;
|
|
50
|
-
startOpen?: boolean;
|
|
51
|
-
buttons: Buttons;
|
|
52
|
-
renderButton?: (props: RenderButtonProps) => ReactNode | null;
|
|
53
|
-
ButtonComponent?: ComponentType<RenderButtonProps>;
|
|
54
|
-
headerTitle?: string;
|
|
55
|
-
headerTitleStyle?: RoomCreatorHeaderProps['titleStyle'];
|
|
56
|
-
headerSubtitle?: RoomCreatorHeaderProps['subtitle'];
|
|
57
|
-
headerSubtitleStyle?: RoomCreatorHeaderProps['subtitleStyle'];
|
|
58
|
-
headerImage?: RoomCreatorHeaderProps['image'];
|
|
59
|
-
headerImageStyle?: RoomCreatorHeaderProps['imageStyle'];
|
|
60
|
-
renderItem?: null | ((props: RoomCreatorItemProps) => ReactElement);
|
|
61
|
-
selectedIconActiveColor?: string;
|
|
62
|
-
selectedIconInactiveColor?: string;
|
|
63
|
-
renderSelectedIcon?: (iconProps: SelectedIconProps) => ReactNode | null;
|
|
64
|
-
/**
|
|
65
|
-
* Optionally enable text box. Text will be passed to onPress function for all buttons.
|
|
66
|
-
*/
|
|
67
|
-
enableTextInput?: RoomCreatorFooterProps['enableTextInput'];
|
|
68
|
-
inputStyle?: RoomCreatorFooterProps['inputStyle'];
|
|
69
|
-
inputContainerStyle?: RoomCreatorFooterProps['inputContainerStyle'];
|
|
70
|
-
showInputWhenNotReady?: RoomCreatorFooterProps['showInputWhenNotReady'];
|
|
71
|
-
inputProps?: RoomCreatorInputProps['inputProps'];
|
|
72
|
-
headerBackgroundColor?: string;
|
|
73
|
-
headerContainerStyle?: ViewStyle;
|
|
74
|
-
}
|
|
75
|
-
export declare type RoomCreatorFunctions = {
|
|
76
|
-
onSendSeparately: (details: {
|
|
77
|
-
message: NewMessageModel;
|
|
78
|
-
members: SendFromFeedRecipients;
|
|
79
|
-
}) => Promise<void>;
|
|
80
|
-
onCreateRoom: (members: RoomMembers) => void;
|
|
81
|
-
onSendAsGroup: (details: {
|
|
82
|
-
message: NewMessageModel;
|
|
83
|
-
members: SendFromFeedRecipientArray['recipients'];
|
|
84
|
-
}) => Promise<any>;
|
|
85
|
-
};
|
|
86
|
-
export interface RoomCreatorItemProps {
|
|
87
|
-
name: string;
|
|
88
|
-
id: string;
|
|
89
|
-
avatar: string;
|
|
90
|
-
selected: boolean;
|
|
91
|
-
handle?: string;
|
|
92
|
-
toggleSelected: (id: string) => void;
|
|
93
|
-
renderSelectedIcon?: RoomCreatorProps['renderSelectedIcon'];
|
|
94
|
-
selectedIconActiveColor?: RoomCreatorProps['selectedIconActiveColor'];
|
|
95
|
-
selectedIconInactiveColor?: RoomCreatorProps['selectedIconInactiveColor'];
|
|
96
|
-
}
|
|
97
|
-
export interface SelectedIconProps {
|
|
98
|
-
activeColor: string;
|
|
99
|
-
inactiveColor: string;
|
|
100
|
-
active: boolean;
|
|
101
|
-
}
|
|
102
|
-
export interface RoomCreatorContentProps {
|
|
103
|
-
toggleSelected: (id: string) => void;
|
|
104
|
-
selected: Selected;
|
|
105
|
-
renderFooter?: RoomCreatorProps['renderFooter'];
|
|
106
|
-
renderButton?: RoomCreatorProps['renderButton'];
|
|
107
|
-
buttons: RoomCreatorProps['buttons'];
|
|
108
|
-
ButtonComponent?: RoomCreatorProps['ButtonComponent'];
|
|
109
|
-
users: RoomCreatorProps['users'];
|
|
110
|
-
renderItem?: RoomCreatorProps['renderItem'];
|
|
111
|
-
ready: boolean;
|
|
112
|
-
renderSelectedIcon?: RoomCreatorProps['renderSelectedIcon'];
|
|
113
|
-
selectedIconActiveColor?: RoomCreatorProps['selectedIconActiveColor'];
|
|
114
|
-
selectedIconInactiveColor?: RoomCreatorProps['selectedIconInactiveColor'];
|
|
115
|
-
enableTextInput?: RoomCreatorFooterProps['enableTextInput'];
|
|
116
|
-
inputStyle?: RoomCreatorFooterProps['inputStyle'];
|
|
117
|
-
inputContainerStyle?: RoomCreatorFooterProps['inputContainerStyle'];
|
|
118
|
-
showInputWhenNotReady?: RoomCreatorFooterProps['showInputWhenNotReady'];
|
|
119
|
-
inputProps?: RoomCreatorInputProps['inputProps'];
|
|
120
|
-
text: RoomCreatorInputProps['text'];
|
|
121
|
-
onChangeText: RoomCreatorInputProps['onChangeText'];
|
|
122
|
-
}
|
|
123
|
-
export interface RoomCreatorHeaderProps {
|
|
124
|
-
callbackNode: Animated.Value<number>;
|
|
125
|
-
title: string;
|
|
126
|
-
subtitle?: string;
|
|
127
|
-
image?: string;
|
|
128
|
-
imageStyle?: StyleProp<ImageStyle>;
|
|
129
|
-
titleStyle?: StyleProp<TextStyle>;
|
|
130
|
-
subtitleStyle?: StyleProp<TextStyle>;
|
|
131
|
-
backgroundColor?: string;
|
|
132
|
-
containerStyle?: ViewStyle;
|
|
133
|
-
}
|
|
134
|
-
export interface RoomCreatorFooterProps {
|
|
135
|
-
ButtonComponent?: RoomCreatorProps['ButtonComponent'];
|
|
136
|
-
renderButton?: RoomCreatorProps['renderButton'];
|
|
137
|
-
buttons: RoomCreatorProps['buttons'];
|
|
138
|
-
ready: boolean;
|
|
139
|
-
selected: Selected;
|
|
140
|
-
enableTextInput: boolean;
|
|
141
|
-
inputStyle?: RoomCreatorInputProps['inputStyle'];
|
|
142
|
-
inputContainerStyle?: RoomCreatorInputProps['inputContainerStyle'];
|
|
143
|
-
inputProps?: RoomCreatorInputProps['inputProps'];
|
|
144
|
-
showInputWhenNotReady: boolean;
|
|
145
|
-
text: RoomCreatorInputProps['text'];
|
|
146
|
-
onChangeText: RoomCreatorInputProps['onChangeText'];
|
|
147
|
-
}
|
|
148
|
-
export interface RoomCreatorInputProps {
|
|
149
|
-
text: string;
|
|
150
|
-
onChangeText: TextInputProps['onChangeText'];
|
|
151
|
-
inputProps?: TextInputProps;
|
|
152
|
-
inputStyle?: TextInputProps['style'];
|
|
153
|
-
inputContainerStyle?: StyleProp<ViewStyle>;
|
|
154
|
-
}
|
|
155
|
-
export interface Selected {
|
|
156
|
-
[id: string]: 'room' | 'user';
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Buttons will show up at the bottom of the room creator
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* Note that in the example below, you will need to make sure that selected matches the proper schema for members. It is left this way for simplicity.
|
|
163
|
-
* ```javascript
|
|
164
|
-
* <Inbox
|
|
165
|
-
* buttons={[
|
|
166
|
-
* {
|
|
167
|
-
* text: 'Start Chat',
|
|
168
|
-
* onPress: (selected) => new Room({ members: selected }).create()
|
|
169
|
-
* }
|
|
170
|
-
* ]}
|
|
171
|
-
* />
|
|
172
|
-
* ```
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
export interface Button {
|
|
177
|
-
text: string;
|
|
178
|
-
onPress: (config: {
|
|
179
|
-
selected: Selected;
|
|
180
|
-
ready: boolean;
|
|
181
|
-
loading: boolean;
|
|
182
|
-
text: string;
|
|
183
|
-
}) => any | Promise<any>;
|
|
184
|
-
disabledString?: string;
|
|
185
|
-
color?: string;
|
|
186
|
-
textColor?: string;
|
|
187
|
-
disabledColor?: string;
|
|
188
|
-
disabledTextColor?: string;
|
|
189
|
-
ready?: boolean;
|
|
190
|
-
loading?: boolean;
|
|
191
|
-
}
|
|
192
|
-
export interface RenderButtonProps {
|
|
193
|
-
backgroundColor: string;
|
|
194
|
-
text: string;
|
|
195
|
-
textColor: string;
|
|
196
|
-
onPress: () => void;
|
|
197
|
-
ready: boolean;
|
|
198
|
-
index: number;
|
|
199
|
-
loading: boolean;
|
|
200
|
-
}
|
|
201
|
-
export interface User {
|
|
202
|
-
id: string;
|
|
203
|
-
name: string;
|
|
204
|
-
avatar: string;
|
|
205
|
-
handle?: string;
|
|
206
|
-
}
|
|
207
|
-
export declare type Buttons = Button[];
|
|
208
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export default function (props: TypingIndicatorProps): JSX.Element | null;
|
|
3
|
-
export interface TypingIndicatorProps {
|
|
4
|
-
hide?: boolean;
|
|
5
|
-
backgroundColors?: string[];
|
|
6
|
-
dotColors?: string[];
|
|
7
|
-
dotEmptyColors?: string[];
|
|
8
|
-
theme?: 'purple' | 'red' | 'default';
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { default as Inbox } from './Inbox';
|
|
2
|
-
export { default as RoomCreator } from './RoomCreator';
|
|
3
|
-
export { default as CreateRoomList } from './RoomCreator/Content';
|
|
4
|
-
export { default as TypingIndicator } from './TypingIndicator';
|
|
5
|
-
export { default as Messages } from './Chat';
|
|
6
|
-
export { default as Avatar } from './Avatar';
|
|
7
|
-
export { default as ChatProvider, chat, fuego, setChat, setFuego, } from './ChatProvider';
|
|
8
|
-
export { default as Initials } from './Inbox/Item/Initials';
|
|
9
|
-
export { default as Bubble } from './Chat/Bubble';
|
|
10
|
-
export { default as UnreadIndicator } from './Inbox/Item/UnreadIndicator';
|
|
11
|
-
export { default as Composer } from './Chat/Composer';
|
|
12
|
-
export { default as SystemMessage } from './Chat/SystemMessage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getInitials: (name: string | null, maxLength?: number) => string;
|