easemob-chat-uikit 1.0.0-beta
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/ChatUI.esm.js +33277 -0
- package/ChatUI.iife.js +33298 -0
- package/ChatUI.umd.js +33299 -0
- package/README.md +484 -0
- package/button/style/mixin.scss +224 -0
- package/button/style/style.scss +28 -0
- package/chat.png +0 -0
- package/manifest.json +25 -0
- package/package.json +29 -0
- package/robots.txt +3 -0
- package/style/color/color.scss +75 -0
- package/style/core/base.scss +10 -0
- package/style/core/index.scss +3 -0
- package/style/core/motion/fade.scss +35 -0
- package/style/core/motion/zoom.scss +179 -0
- package/style/core/motion.scss +17 -0
- package/style/index.scss +3 -0
- package/style/mixin/index.scss +1 -0
- package/style/mixin/motion.scss +31 -0
- package/style/themes/dark.scss +93 -0
- package/style/themes/default.scss +286 -0
- package/style.css +16102 -0
- package/style.scss +2 -0
- package/types/ChatUI.d.ts +2 -0
- package/types/module/audioMessage/AudioMessage.d.ts +12 -0
- package/types/module/audioMessage/AudioPlayer.d.ts +12 -0
- package/types/module/audioMessage/index.d.ts +3 -0
- package/types/module/baseMessage/BaseMessage.d.ts +18 -0
- package/types/module/baseMessage/index.d.ts +3 -0
- package/types/module/button/Button.d.ts +19 -0
- package/types/module/button/index.d.ts +2 -0
- package/types/module/chat/Chat.d.ts +25 -0
- package/types/module/chat/MessageList.d.ts +10 -0
- package/types/module/chat/index.d.ts +3 -0
- package/types/module/contactList/ContactGroup.d.ts +12 -0
- package/types/module/contactList/ContactItem.d.ts +15 -0
- package/types/module/contactList/ContactList.d.ts +22 -0
- package/types/module/contactList/index.d.ts +3 -0
- package/types/module/conversation/ConversationItem.d.ts +17 -0
- package/types/module/conversation/ConversationList.d.ts +34 -0
- package/types/module/conversation/index.d.ts +3 -0
- package/types/module/empty/Empty.d.ts +9 -0
- package/types/module/empty/index.d.ts +3 -0
- package/types/module/fileMessage/FileMessage.d.ts +13 -0
- package/types/module/fileMessage/index.d.ts +2 -0
- package/types/module/header/Header.d.ts +22 -0
- package/types/module/header/index.d.ts +3 -0
- package/types/module/hooks/chat.d.ts +2 -0
- package/types/module/hooks/dom.d.ts +9 -0
- package/types/module/hooks/useAddress.d.ts +14 -0
- package/types/module/hooks/useClient.d.ts +2 -0
- package/types/module/hooks/useConversation.d.ts +3 -0
- package/types/module/hooks/useHistoryMsg.d.ts +6 -0
- package/types/module/imageMessage/ImageMessage.d.ts +18 -0
- package/types/module/imageMessage/index.d.ts +4 -0
- package/types/module/index.d.ts +22 -0
- package/types/module/messageEditor/MessageEditor.d.ts +17 -0
- package/types/module/messageEditor/emoji/Emoji.d.ts +14 -0
- package/types/module/messageEditor/emoji/emojiConfig.d.ts +54 -0
- package/types/module/messageEditor/emoji/index.d.ts +3 -0
- package/types/module/messageEditor/index.d.ts +3 -0
- package/types/module/messageEditor/moreAction/MoreAction.d.ts +13 -0
- package/types/module/messageEditor/moreAction/index.d.ts +2 -0
- package/types/module/messageEditor/recorder/Recorder.d.ts +11 -0
- package/types/module/messageEditor/recorder/index.d.ts +2 -0
- package/types/module/messageEditor/recorder/recorderFun.d.ts +9 -0
- package/types/module/messageEditor/textarea/Textarea.d.ts +9 -0
- package/types/module/messageEditor/textarea/index.d.ts +2 -0
- package/types/module/messageEditor/textarea/util.d.ts +1 -0
- package/types/module/messageStatus/MessageStatus.d.ts +9 -0
- package/types/module/noticeMessage/NoticeMessage.d.ts +13 -0
- package/types/module/noticeMessage/index.d.ts +3 -0
- package/types/module/react-app-env.d.ts +62 -0
- package/types/module/store/AddressStore.d.ts +13 -0
- package/types/module/store/ConversationStore.d.ts +35 -0
- package/types/module/store/MessageStore.d.ts +28 -0
- package/types/module/store/Provider.d.ts +22 -0
- package/types/module/store/agoraChatConfig.d.ts +3 -0
- package/types/module/store/index.d.ts +24 -0
- package/types/module/store/rootContext.d.ts +15 -0
- package/types/module/textMessage/TextMessage.d.ts +28 -0
- package/types/module/textMessage/index.d.ts +2 -0
- package/types/module/types/messageType.d.ts +164 -0
- package/types/module/utils/download.d.ts +2 -0
- package/types/module/utils/index.d.ts +6 -0
- package/types/module/videoMessage/VideoMessage.d.ts +10 -0
- package/types/module/videoMessage/index.d.ts +3 -0
- package/types/src/_utils/motion.d.ts +2 -0
- package/types/src/_utils/placements.d.ts +17 -0
- package/types/src/_utils/reactNode.d.ts +8 -0
- package/types/src/_utils/ref.d.ts +3 -0
- package/types/src/_utils/styleChecker.d.ts +2 -0
- package/types/src/_utils/type.d.ts +1 -0
- package/types/src/_utils/warning.d.ts +5 -0
- package/types/src/avatar/Avatar.d.ts +20 -0
- package/types/src/avatar/Group.d.ts +11 -0
- package/types/src/avatar/index.d.ts +2 -0
- package/types/src/badge/Badge.d.ts +21 -0
- package/types/src/badge/ScrollNumber.d.ts +18 -0
- package/types/src/badge/SingleNumber.d.ts +13 -0
- package/types/src/badge/index.d.ts +2 -0
- package/types/src/button/Button.d.ts +19 -0
- package/types/src/button/index.d.ts +2 -0
- package/types/src/checkbox/Checkbox.d.ts +11 -0
- package/types/src/checkbox/index.d.ts +2 -0
- package/types/src/config/index.d.ts +8 -0
- package/types/src/dropdown/Dropdown.d.ts +9 -0
- package/types/src/dropdown/MenuItem.d.ts +9 -0
- package/types/src/dropdown/MenuWrap.d.ts +9 -0
- package/types/src/dropdown/index.d.ts +2 -0
- package/types/src/entry.d.ts +13 -0
- package/types/src/icon/Icon.d.ts +14 -0
- package/types/src/icon/const.d.ts +27 -0
- package/types/src/icon/index.d.ts +3 -0
- package/types/src/input/Input.d.ts +2 -0
- package/types/src/input/Search.d.ts +11 -0
- package/types/src/list/List.d.ts +23 -0
- package/types/src/list/index.d.ts +2 -0
- package/types/src/modal/Content.d.ts +36 -0
- package/types/src/modal/Dialog.d.ts +43 -0
- package/types/src/modal/Mast.d.ts +9 -0
- package/types/src/modal/MemoChildren.d.ts +7 -0
- package/types/src/modal/Modal.d.ts +57 -0
- package/types/src/modal/index.d.ts +2 -0
- package/types/src/modal/util.d.ts +5 -0
- package/types/src/popover/Popover.d.ts +7 -0
- package/types/src/popover/index.d.ts +2 -0
- package/types/src/svg.d.ts +6 -0
- package/types/src/switch/Switch.d.ts +9 -0
- package/types/src/switch/index.d.ts +2 -0
- package/types/src/tooltip/Tooltip.d.ts +49 -0
- package/uikit.png +0 -0
package/style.scss
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseMessageProps } from '../baseMessage';
|
|
3
|
+
import type { AudioMessageType } from '../types/messageType';
|
|
4
|
+
export interface AudioMessageProps extends BaseMessageProps {
|
|
5
|
+
audioMessage: AudioMessageType;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
type?: 'primary' | 'secondly';
|
|
10
|
+
}
|
|
11
|
+
declare const AudioMessage: (props: AudioMessageProps) => JSX.Element;
|
|
12
|
+
export { AudioMessage };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface AudioPlayerProps {
|
|
3
|
+
}
|
|
4
|
+
export interface AudioPlayerProps {
|
|
5
|
+
play?: boolean;
|
|
6
|
+
reverse?: boolean;
|
|
7
|
+
size?: string | number;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const AudioPlayer: (props: AudioPlayerProps) => JSX.Element;
|
|
12
|
+
export { AudioPlayer };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { MessageStatusProps } from '../messageStatus/MessageStatus';
|
|
3
|
+
export interface BaseMessageProps {
|
|
4
|
+
bubbleType?: 'primary' | 'secondly' | 'none';
|
|
5
|
+
status?: MessageStatusProps['status'];
|
|
6
|
+
avatar?: ReactNode;
|
|
7
|
+
direction?: 'ltr' | 'rtl';
|
|
8
|
+
prefix?: string;
|
|
9
|
+
shape?: 'ground' | 'square';
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
nickName?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
time?: number;
|
|
16
|
+
}
|
|
17
|
+
declare const BaseMessage: (props: BaseMessageProps) => JSX.Element;
|
|
18
|
+
export { BaseMessage };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const buttonShapes: ["circle", "round", "default"];
|
|
3
|
+
export declare type ButtonShape = typeof buttonShapes[number];
|
|
4
|
+
declare const buttonSizes: ["small", "medium", "large"];
|
|
5
|
+
export declare type buttonSize = typeof buttonSizes[number];
|
|
6
|
+
declare const buttonTypes: ["primary", "default", "ghost", "text"];
|
|
7
|
+
export declare type ButtonType = typeof buttonTypes[number];
|
|
8
|
+
export interface ButtonProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
type?: ButtonType;
|
|
12
|
+
shape?: ButtonShape;
|
|
13
|
+
size?: buttonSize;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
17
|
+
}
|
|
18
|
+
export declare const Button: ({ className, type, size, shape, disabled, icon, children, onClick, }: ButtonProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { HeaderProps } from '../header';
|
|
3
|
+
import { MessageEditorProps } from '../messageEditor';
|
|
4
|
+
import { MsgListProps } from './MessageList';
|
|
5
|
+
export interface ChatProps {
|
|
6
|
+
prefix?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
renderHeader?: (cvs: {
|
|
9
|
+
chatType: 'singleChat' | 'groupChat';
|
|
10
|
+
conversationId: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
unreadCount?: number;
|
|
13
|
+
}) => ReactNode;
|
|
14
|
+
renderMessageList?: () => ReactNode;
|
|
15
|
+
renderMessageEditor?: () => ReactNode;
|
|
16
|
+
renderEmpty?: () => ReactNode;
|
|
17
|
+
headerProps?: {
|
|
18
|
+
onAvatarClick?: () => void;
|
|
19
|
+
moreAction?: HeaderProps['moreAction'];
|
|
20
|
+
};
|
|
21
|
+
messageListProps?: MsgListProps;
|
|
22
|
+
messageEditorProps?: MessageEditorProps;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: React.FunctionComponent<ChatProps>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { AgoraChat } from 'agora-chat';
|
|
3
|
+
export interface MsgListProps {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
renderMessage?: (message: AgoraChat.MessageBody) => JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
declare let MessageList: FC<MsgListProps>;
|
|
10
|
+
export { MessageList };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface ContactGroupProps {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
itemCount?: number;
|
|
7
|
+
itemHeight?: number;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onclickTitle?: (data: any) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ContactGroup: FC<ContactGroupProps>;
|
|
12
|
+
export { ContactGroup };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
export interface ContactItemProps {
|
|
3
|
+
contactId: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
avatarShape?: 'circle' | 'square';
|
|
7
|
+
avatarSize?: number;
|
|
8
|
+
focus?: boolean;
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, contactId: string) => void;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const ContactItem: FC<ContactItemProps>;
|
|
15
|
+
export { ContactItem };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
export interface ContactListProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
prefix?: string;
|
|
5
|
+
data?: {
|
|
6
|
+
group?: Array<{
|
|
7
|
+
groupId: string;
|
|
8
|
+
groupName: string;
|
|
9
|
+
}>;
|
|
10
|
+
chatroom?: Array<{
|
|
11
|
+
chatroomId: string;
|
|
12
|
+
chatroomName: string;
|
|
13
|
+
}>;
|
|
14
|
+
contact?: Array<{
|
|
15
|
+
userId: string;
|
|
16
|
+
nickname: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
onSearch?: (e: React.ChangeEvent<HTMLInputElement>) => boolean;
|
|
20
|
+
}
|
|
21
|
+
declare let ContactList: FC<ContactListProps>;
|
|
22
|
+
export { ContactList };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import type { ConversationData } from './ConversationList';
|
|
3
|
+
export interface ConversationItemProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
nickname?: string;
|
|
7
|
+
avatarShape?: 'circle' | 'square';
|
|
8
|
+
avatarSize?: number;
|
|
9
|
+
avatar?: ReactNode;
|
|
10
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
badgeColor?: string;
|
|
13
|
+
isActive?: boolean;
|
|
14
|
+
data: ConversationData[0];
|
|
15
|
+
}
|
|
16
|
+
declare const ConversationItem: FC<ConversationItemProps>;
|
|
17
|
+
export { ConversationItem };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConversationItemProps } from './ConversationItem';
|
|
3
|
+
import { HeaderProps } from '../header';
|
|
4
|
+
export declare type ConversationData = Array<{
|
|
5
|
+
chatType: 'singleChat' | 'groupChat';
|
|
6
|
+
conversationId: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
unreadCount: number;
|
|
9
|
+
lastMessage: {
|
|
10
|
+
type: 'txt' | 'img' | 'audio' | 'video' | 'file' | 'custom';
|
|
11
|
+
msg?: string;
|
|
12
|
+
time: number;
|
|
13
|
+
chatType: 'singleChat' | 'groupChat';
|
|
14
|
+
from: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
export declare type ServerCvs = Array<{
|
|
18
|
+
channel_id: string;
|
|
19
|
+
lastMessage: any;
|
|
20
|
+
unread_num: number;
|
|
21
|
+
}>;
|
|
22
|
+
export interface ConversationListProps {
|
|
23
|
+
prefix?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
onItemClick?: (data: ConversationData[0]) => void;
|
|
26
|
+
onSearch?: (e: React.ChangeEvent<HTMLInputElement>) => boolean;
|
|
27
|
+
renderHeader?: () => React.ReactNode;
|
|
28
|
+
renderSearch?: () => React.ReactNode;
|
|
29
|
+
renderItem?: (cvs: ConversationData[0], index: number) => React.ReactNode;
|
|
30
|
+
headerProps?: HeaderProps;
|
|
31
|
+
itemProps?: ConversationItemProps;
|
|
32
|
+
}
|
|
33
|
+
declare const ConversationList: React.FunctionComponent<ConversationListProps>;
|
|
34
|
+
export { ConversationList };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseMessageProps } from '../baseMessage';
|
|
3
|
+
import { IconProps } from '../../src/icon';
|
|
4
|
+
import type { FileMessageType } from '../types/messageType';
|
|
5
|
+
export interface FileMessageProps extends BaseMessageProps {
|
|
6
|
+
fileMessage: FileMessageType;
|
|
7
|
+
iconType?: IconProps['type'];
|
|
8
|
+
prefix?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
type?: 'primary' | 'secondly';
|
|
11
|
+
}
|
|
12
|
+
declare const FileMessage: (props: FileMessageProps) => JSX.Element;
|
|
13
|
+
export { FileMessage };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
export interface HeaderProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
prefix?: string;
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
avatar?: ReactNode;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
back?: boolean;
|
|
9
|
+
renderContent?: () => React.ReactElement;
|
|
10
|
+
onIconClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
11
|
+
moreAction?: {
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
actions: Array<{
|
|
15
|
+
content: ReactNode;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
onAvatarClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const Header: FC<HeaderProps>;
|
|
22
|
+
export { Header };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AgoraChat } from 'agora-chat';
|
|
2
|
+
declare const useContacts: () => {
|
|
3
|
+
userId: string;
|
|
4
|
+
nickname: string;
|
|
5
|
+
}[];
|
|
6
|
+
export interface GroupData {
|
|
7
|
+
groupid: string;
|
|
8
|
+
groupname: string;
|
|
9
|
+
}
|
|
10
|
+
declare const useUserInfo: (userIds?: string[]) => {
|
|
11
|
+
[key: string]: AgoraChat.UpdateOwnUserInfoParams;
|
|
12
|
+
} | undefined;
|
|
13
|
+
declare const useGroups: () => GroupData[];
|
|
14
|
+
export { useContacts, useGroups, useUserInfo };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseMessageProps } from '../baseMessage';
|
|
3
|
+
import type { ImageMessageType } from '../types/messageType';
|
|
4
|
+
export interface ImageMessageProps extends BaseMessageProps {
|
|
5
|
+
imageMessage: ImageMessageType;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
onClickImage?: (url: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ImagePreviewProps {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
previewImageUrl: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const ImagePreview: (props: ImagePreviewProps) => JSX.Element;
|
|
17
|
+
declare const _default: React.MemoExoticComponent<(props: ImageMessageProps) => JSX.Element>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import AudioMessage from './audioMessage';
|
|
2
|
+
import BaseMessage from './baseMessage';
|
|
3
|
+
import FileMessage from './fileMessage';
|
|
4
|
+
import ImageMessage from './imageMessage';
|
|
5
|
+
import NoticeMessage from './noticeMessage';
|
|
6
|
+
import TextMessage from './textMessage';
|
|
7
|
+
import VideoMessage from './videoMessage';
|
|
8
|
+
import MessageStatus from './messageStatus/MessageStatus';
|
|
9
|
+
import Chat from './chat';
|
|
10
|
+
import { ContactList } from './contactList';
|
|
11
|
+
import { ConversationList } from './conversation';
|
|
12
|
+
import MessageEditor from './messageEditor';
|
|
13
|
+
import Header from './header';
|
|
14
|
+
import Empty from './empty';
|
|
15
|
+
import rootStore from './store/index';
|
|
16
|
+
import { RootContext, RootProvider, RootConsumer } from './store/rootContext';
|
|
17
|
+
import Provider from './store/Provider';
|
|
18
|
+
import { useClient } from './hooks/useClient';
|
|
19
|
+
import { useConversation } from './hooks/useConversation';
|
|
20
|
+
import { useHistoryMessages } from './hooks/useHistoryMsg';
|
|
21
|
+
import Button from './button';
|
|
22
|
+
export { AudioMessage, BaseMessage, FileMessage, ImageMessage, NoticeMessage, TextMessage, VideoMessage, MessageStatus, Chat, ContactList, ConversationList, MessageEditor, Header, Empty, rootStore, RootContext, RootProvider, RootConsumer, Provider, useClient, useConversation, useHistoryMessages, Button, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface MessageEditorProps {
|
|
3
|
+
actions?: {
|
|
4
|
+
name: string;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
onClick: (name: string) => void;
|
|
8
|
+
}[];
|
|
9
|
+
onSend?: (message: any) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
showSendButton?: boolean;
|
|
12
|
+
sendButtonIcon?: ReactNode;
|
|
13
|
+
row?: number;
|
|
14
|
+
placeHolder?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const MessageEditor: (props: MessageEditorProps) => JSX.Element;
|
|
17
|
+
export { MessageEditor };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { emoji } from './emojiConfig';
|
|
3
|
+
export interface EmojiProps {
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
onSelected?: (emojiString: keyof typeof emoji.map) => void;
|
|
6
|
+
trigger?: 'click' | 'hover';
|
|
7
|
+
config?: {
|
|
8
|
+
map: any;
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
11
|
+
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const Emoji: (props: EmojiProps) => JSX.Element;
|
|
14
|
+
export { Emoji };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const emoji: {
|
|
2
|
+
path: string;
|
|
3
|
+
map: {
|
|
4
|
+
'[):]': string;
|
|
5
|
+
'[:D]': string;
|
|
6
|
+
'[;)]': string;
|
|
7
|
+
'[:-o]': string;
|
|
8
|
+
'[:p]': string;
|
|
9
|
+
'[(H)]': string;
|
|
10
|
+
'[:@]': string;
|
|
11
|
+
'[:s]': string;
|
|
12
|
+
'[:$]': string;
|
|
13
|
+
'[:(]': string;
|
|
14
|
+
"[:'(]": string;
|
|
15
|
+
'[:|]': string;
|
|
16
|
+
'[(a)]': string;
|
|
17
|
+
'[8o|]': string;
|
|
18
|
+
'[8-|]': string;
|
|
19
|
+
'[+o(]': string;
|
|
20
|
+
'[<o)]': string;
|
|
21
|
+
'[|-)]': string;
|
|
22
|
+
'[*-)]': string;
|
|
23
|
+
'[:-#]': string;
|
|
24
|
+
'[:-*]': string;
|
|
25
|
+
'[^o)]': string;
|
|
26
|
+
'[8-)]': string;
|
|
27
|
+
'[(|)]': string;
|
|
28
|
+
'[(u)]': string;
|
|
29
|
+
'[(S)]': string;
|
|
30
|
+
'[(*)]': string;
|
|
31
|
+
'[(#)]': string;
|
|
32
|
+
'[(R)]': string;
|
|
33
|
+
'[({)]': string;
|
|
34
|
+
'[(})]': string;
|
|
35
|
+
'[(k)]': string;
|
|
36
|
+
'[(F)]': string;
|
|
37
|
+
'[(W)]': string;
|
|
38
|
+
'[(D)]': string;
|
|
39
|
+
'[(E)]': string;
|
|
40
|
+
'[(T)]': string;
|
|
41
|
+
'[(G)]': string;
|
|
42
|
+
'[(Y)]': string;
|
|
43
|
+
'[(I)]': string;
|
|
44
|
+
'[(J)]': string;
|
|
45
|
+
'[(K)]': string;
|
|
46
|
+
'[(L)]': string;
|
|
47
|
+
'[(M)]': string;
|
|
48
|
+
'[(N)]': string;
|
|
49
|
+
'[(O)]': string;
|
|
50
|
+
'[(P)]': string;
|
|
51
|
+
'[(U)]': string;
|
|
52
|
+
'[(Z)]': string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface MoreActionProps {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
customActions?: Array<{
|
|
6
|
+
title: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
icon: ReactNode;
|
|
9
|
+
}>;
|
|
10
|
+
defaultActions?: [{}];
|
|
11
|
+
}
|
|
12
|
+
declare let MoreAction: (props: MoreActionProps) => JSX.Element;
|
|
13
|
+
export { MoreAction };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgoraChat } from 'agora-chat';
|
|
3
|
+
export interface RecorderProps {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
cancelBtnShape?: 'circle' | 'square';
|
|
6
|
+
onShow?: () => void;
|
|
7
|
+
onHide?: () => void;
|
|
8
|
+
onSend?: (message: AgoraChat.MessageBody) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Recorder: React.FC<RecorderProps>;
|
|
11
|
+
export { Recorder };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const HZRecorder: {
|
|
2
|
+
(this: any, stream: any, config: {
|
|
3
|
+
sampleBits: number;
|
|
4
|
+
sampleRate: number;
|
|
5
|
+
}): void;
|
|
6
|
+
setErrorInfoText(errorMessage: any): void;
|
|
7
|
+
get(callback: (arg0: any, arg1: MediaStream) => void, config?: object): void;
|
|
8
|
+
};
|
|
9
|
+
export default HZRecorder;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TextareaProps {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
hasSendButton?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare let Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<any>>;
|
|
9
|
+
export { Textarea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertToMessage: (e: any) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MessageStatusProps {
|
|
3
|
+
status: 'received' | 'read' | 'unread' | 'sent' | 'failed' | 'sending' | 'default';
|
|
4
|
+
type?: 'icon' | 'text';
|
|
5
|
+
prefixCls?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const MessageStatus: (props: MessageStatusProps) => JSX.Element;
|
|
9
|
+
export default MessageStatus;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface NoticeMessageProps {
|
|
3
|
+
noticeMessage: {
|
|
4
|
+
from: string;
|
|
5
|
+
to: string;
|
|
6
|
+
id: string;
|
|
7
|
+
chatType: 'singleChat' | 'groupChat' | 'chatRoom';
|
|
8
|
+
time: number;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const NoticeMessage: (props: NoticeMessageProps) => JSX.Element;
|
|
13
|
+
export { NoticeMessage };
|