easemob-chat-uikit 1.1.0 → 1.2.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/ChatUI.esm.js +21502 -20645
- package/ChatUI.js +21502 -20645
- package/ChatUI.umd.js +21502 -20645
- package/README.md +0 -3
- package/package.json +1 -1
- package/style/avatar/style/style.scss +1 -1
- package/style/badge/style/style.scss +7 -3
- package/style/baseMessage/style/style.scss +51 -7
- package/style/button/style/mixin.scss +32 -3
- package/style/button/style/style.scss +15 -5
- package/style/checkbox/style/style.scss +1 -1
- package/style/contactList/style/detail.scss +9 -4
- package/style/contactList/style/group.scss +1 -1
- package/style/contactList/style/list.scss +7 -2
- package/style/conversation/style/item.scss +14 -3
- package/style/header/style/style.scss +4 -0
- package/style/icon/style/style.scss +6 -2
- package/style/imageMessage/style/style.scss +2 -1
- package/style/messageStatus/style/style.scss +3 -1
- package/style/modal/style/style.scss +8 -2
- package/style/scrollList/style/style.scss +6 -1
- package/style/style/color/color.scss +1 -0
- package/style/style/index.scss +1 -0
- package/style/style/text/index.scss +69 -0
- package/style/style/themes/default.scss +6 -4
- package/style/thread/style/panel.scss +6 -2
- package/style/thread/style/style.scss +9 -0
- package/style/userCardMessage/style/style.scss +4 -2
- package/style/userSelect/style/style.scss +5 -1
- package/style/videoMessage/style/style.scss +3 -0
- package/style.css +2885 -1234
- package/types/component/entry.d.ts +2 -2
- package/types/component/icon/const.d.ts +17 -1
- package/types/component/input/Input.d.ts +4 -2
- package/types/component/input/Search.d.ts +1 -0
- package/types/component/scrollList/ScrollList.d.ts +1 -1
- package/types/component/userItem/UserItem.d.ts +1 -0
- package/types/eventHandler/index.d.ts +60 -16
- package/types/module/baseMessage/BaseMessage.d.ts +4 -1
- package/types/module/chat/Chat.d.ts +34 -7
- package/types/module/chat/MessageList.d.ts +1 -0
- package/types/module/chatroom/Chatroom.d.ts +1 -0
- package/types/module/contactList/ContactDetail.d.ts +2 -0
- package/types/module/contactList/ContactList.d.ts +3 -0
- package/types/module/header/Header.d.ts +4 -2
- package/types/module/hooks/chat.d.ts +2 -1
- package/types/module/hooks/useChatroomMember.d.ts +2 -1
- package/types/module/hooks/useConversation.d.ts +2 -1
- package/types/module/messageInput/emoji/Emoji.d.ts +2 -0
- package/types/module/reaction/EmojiKeyboard.d.ts +1 -0
- package/types/module/store/AddressStore.d.ts +4 -0
- package/types/module/store/Provider.d.ts +6 -1
- package/types/module/store/rootContext.d.ts +1 -1
- package/types/module/textMessage/TextMessage.d.ts +3 -2
- package/types/module/thread/Thread.d.ts +0 -7
- package/types/module/userSelect/UserSelect.d.ts +3 -0
- package/types/module/utils/color.d.ts +3 -1
|
@@ -9,10 +9,10 @@ import List, { ListProps } from './list';
|
|
|
9
9
|
import Modal, { ModalProps } from './modal';
|
|
10
10
|
import Popover, { PopoverProps } from './popover';
|
|
11
11
|
import Switch, { SwitchProps } from './switch';
|
|
12
|
-
import Tooltip from '
|
|
12
|
+
import Tooltip, { TooltipProps } from './tooltip';
|
|
13
13
|
import ScrollList, { ScrollListProps } from './scrollList';
|
|
14
14
|
import Broadcast, { BroadcastProps } from './broadcast';
|
|
15
15
|
import Collapse, { CollapseProps } from './collapse';
|
|
16
16
|
import UserItem, { UserItemProps } from './userItem';
|
|
17
|
-
export type { AvatarProps, ButtonProps, ButtonShape, ButtonSize, ButtonType, InputProps, BadgeProps, CheckboxProps, DropdownProps, IconProps, ICON_TYPES, ListProps, ModalProps, PopoverProps, SwitchProps, ScrollListProps, BroadcastProps, CollapseProps, UserItemProps, };
|
|
17
|
+
export type { AvatarProps, ButtonProps, ButtonShape, ButtonSize, ButtonType, InputProps, BadgeProps, CheckboxProps, DropdownProps, IconProps, ICON_TYPES, ListProps, ModalProps, PopoverProps, SwitchProps, ScrollListProps, BroadcastProps, CollapseProps, UserItemProps, TooltipProps, };
|
|
18
18
|
export { Avatar, Button, Input, Badge, Checkbox, Dropdown, Icon, List, Modal, Popover, Switch, Tooltip, ScrollList, Broadcast, Collapse, UserItem, };
|
|
@@ -29,6 +29,7 @@ declare enum ICON_TYPES {
|
|
|
29
29
|
CLOSE_THIN = "CLOSE_THIN",
|
|
30
30
|
IMG = "IMG",
|
|
31
31
|
ARROW_TURN_LEFT = "ARROW_TURN_LEFT",
|
|
32
|
+
ARROW_TURN_RIGHT = "ARROW_TURN_RIGHT",
|
|
32
33
|
ARROW_UP_THICK = "ARROW_UP_THICK",
|
|
33
34
|
ARROW_DOWN_THICK = "ARROW_DOWN_THICK",
|
|
34
35
|
LINE_ARROW = "LINE_ARROW",
|
|
@@ -44,6 +45,7 @@ declare enum ICON_TYPES {
|
|
|
44
45
|
PERSON_DOUBLE_FILL = "PERSON_DOUBLE_FILL",
|
|
45
46
|
PERSON_SINGLE_FILL = "PERSON_SINGLE_FILL",
|
|
46
47
|
PERSON_ADD = "PERSON_ADD",
|
|
48
|
+
PERSON_ADD_FILL = "PERSON_ADD_FILL",
|
|
47
49
|
PERSON_MINUS = "PERSON_MINUS",
|
|
48
50
|
THREAD = "THREAD",
|
|
49
51
|
ENVELOPE = "ENVELOPE",
|
|
@@ -74,6 +76,20 @@ declare enum ICON_TYPES {
|
|
|
74
76
|
SPEAKER_N_VERTICAL_BAR = "SPEAKER_N_VERTICAL_BAR",
|
|
75
77
|
ROUND_ARROW_THICK = "ROUND_ARROW_THICK",
|
|
76
78
|
TRIANGLE_IN_RECTANGLE = "TRIANGLE_IN_RECTANGLE",
|
|
77
|
-
FOLDER = "FOLDER"
|
|
79
|
+
FOLDER = "FOLDER",
|
|
80
|
+
GLOBE = "GLOBE",
|
|
81
|
+
CANDLE_IN_CIRCLE_FILL = "CANDLE_IN_CIRCLE_FILL",
|
|
82
|
+
EXCLAMATION_MARK_IN_CIRCLE_FILL = "EXCLAMATION_MARK_IN_CIRCLE_FILL",
|
|
83
|
+
CHECK_IN_CIRCLE_FILL = "CHECK_IN_CIRCLE_FILL",
|
|
84
|
+
HAMBURGER = "HAMBURGER",
|
|
85
|
+
PERSON_MINUS_FILL = "PERSON_MINUS_FILL",
|
|
86
|
+
GEAR = "GEAR",
|
|
87
|
+
PHONE_PICK = "PHONE_PICK",
|
|
88
|
+
VIDEO_CAMERA = "VIDEO_CAMERA",
|
|
89
|
+
PLUS_IN_CIRCLE = "PLUS_IN_CIRCLE",
|
|
90
|
+
PLUS_IN_CIRCLE_FILL = "PLUS_IN_CIRCLE_FILL",
|
|
91
|
+
CHECK = "CHECK",
|
|
92
|
+
CHECK2 = "CHECK2",
|
|
93
|
+
CANDLE_IN_CIRCLE = "CANDLE_IN_CIRCLE"
|
|
78
94
|
}
|
|
79
95
|
export { ICON_TYPES };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
3
|
prefix?: string;
|
|
4
4
|
className?: string;
|
|
@@ -16,6 +16,8 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
16
16
|
suffix?: ReactNode;
|
|
17
17
|
prefixIcon?: ReactNode;
|
|
18
18
|
suffixIcon?: ReactNode;
|
|
19
|
+
onFocus?: () => void;
|
|
20
|
+
onBlur?: () => void;
|
|
19
21
|
}
|
|
20
|
-
declare const Input:
|
|
22
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
23
|
export default Input;
|
|
@@ -13,5 +13,5 @@ export interface ScrollListProps<T> {
|
|
|
13
13
|
loading: boolean;
|
|
14
14
|
onScroll?: (e: Event) => void;
|
|
15
15
|
}
|
|
16
|
-
declare let ScrollList: <T>() => React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<ScrollListProps<T> & React.RefAttributes<any>, "key" | keyof ScrollListProps<T>> & React.RefAttributes<any
|
|
16
|
+
declare let ScrollList: <T>() => React.MemoExoticComponent<React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<ScrollListProps<T> & React.RefAttributes<any>, "key" | keyof ScrollListProps<T>> & React.RefAttributes<any>>>>;
|
|
17
17
|
export { ScrollList };
|
|
@@ -1,23 +1,67 @@
|
|
|
1
1
|
import { ChatSDK } from '../module/SDK';
|
|
2
|
-
export declare type EventName =
|
|
2
|
+
export declare type EventName =
|
|
3
|
+
| 'joinChatRoom'
|
|
4
|
+
| 'leaveChatRoom'
|
|
5
|
+
| 'reportMessage'
|
|
6
|
+
| 'getChatRoomDetails'
|
|
7
|
+
| 'sendMessage'
|
|
8
|
+
| 'fetchUserInfoById'
|
|
9
|
+
| 'translateMessage'
|
|
10
|
+
| 'recallMessage'
|
|
11
|
+
| 'deleteConversation'
|
|
12
|
+
| 'modifyMessage'
|
|
13
|
+
| 'createChatThread'
|
|
14
|
+
| 'destroyChatThread'
|
|
15
|
+
| 'leaveChatThread'
|
|
16
|
+
| 'setGroupMemberAttributes'
|
|
17
|
+
| 'muteChatRoomMember'
|
|
18
|
+
| 'getChatRoomMutelist'
|
|
19
|
+
| 'unmuteChatRoomMember'
|
|
20
|
+
| 'removeChatRoomMember'
|
|
21
|
+
| 'getSilentModeForConversations'
|
|
22
|
+
| 'setSilentModeForConversation'
|
|
23
|
+
| 'clearRemindTypeForConversation'
|
|
24
|
+
| 'getGroupInfo'
|
|
25
|
+
| 'modifyGroup'
|
|
26
|
+
| 'destroyGroup'
|
|
27
|
+
| 'leaveGroup'
|
|
28
|
+
| 'createGroup'
|
|
29
|
+
| 'inviteToGroup'
|
|
30
|
+
| 'removeGroupMembers'
|
|
31
|
+
| 'changeGroupOwner'
|
|
32
|
+
| 'pinConversation'
|
|
33
|
+
| 'getServerPinnedConversations'
|
|
34
|
+
| 'removeHistoryMessages'
|
|
35
|
+
| 'addReaction'
|
|
36
|
+
| 'deleteReaction'
|
|
37
|
+
| 'getReactionDetail'
|
|
38
|
+
| 'joinChatThread'
|
|
39
|
+
| 'getChatThreads'
|
|
40
|
+
| 'getChatThreadLastMessage'
|
|
41
|
+
| 'getAllContacts'
|
|
42
|
+
| 'getJoinedGroups'
|
|
43
|
+
| 'open'
|
|
44
|
+
| 'setContactRemark'
|
|
45
|
+
| 'addContact'
|
|
46
|
+
| 'deleteContact';
|
|
3
47
|
export declare type EventHandlerData = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
48
|
+
[key in EventName]?: {
|
|
49
|
+
success?: () => void;
|
|
50
|
+
error?: (err: ChatSDK.ErrorEvent) => void;
|
|
51
|
+
};
|
|
8
52
|
} & {
|
|
9
|
-
|
|
53
|
+
onError: (err: ChatSDK.ErrorEvent) => void;
|
|
10
54
|
};
|
|
11
55
|
export declare class EventHandler {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
56
|
+
handlerData: {
|
|
57
|
+
[key: string]: EventHandlerData;
|
|
58
|
+
};
|
|
59
|
+
private static instance;
|
|
60
|
+
static getInstance(): EventHandler;
|
|
61
|
+
constructor();
|
|
62
|
+
addEventHandler(eventHandlerId: string, eventHandler: EventHandlerData): void;
|
|
63
|
+
removeEventHandler(eventHandlerId: string): void;
|
|
64
|
+
dispatchSuccess(eventName: EventName): void;
|
|
65
|
+
dispatchError(eventName: EventName, error: ChatSDK.ErrorEvent): void;
|
|
22
66
|
}
|
|
23
67
|
export declare const eventHandler: EventHandler;
|
|
@@ -6,6 +6,7 @@ interface CustomAction {
|
|
|
6
6
|
visible: boolean;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
actions?: {
|
|
9
|
+
visible?: boolean;
|
|
9
10
|
icon?: ReactNode;
|
|
10
11
|
content?: string;
|
|
11
12
|
onClick?: (message: BaseMessageType) => void;
|
|
@@ -44,11 +45,13 @@ export interface BaseMessageProps {
|
|
|
44
45
|
onAddReactionEmoji?: (emojiString: string) => void;
|
|
45
46
|
onDeleteReactionEmoji?: (emojiString: string) => void;
|
|
46
47
|
onShowReactionUserList?: (emojiString: string) => void;
|
|
47
|
-
onRecallMessage?: () => void;
|
|
48
|
+
onRecallMessage?: (message: BaseMessageType) => void;
|
|
48
49
|
onTranslateMessage?: () => void;
|
|
49
50
|
onModifyMessage?: () => void;
|
|
50
51
|
onSelectMessage?: () => void;
|
|
51
52
|
onResendMessage?: () => void;
|
|
53
|
+
onForwardMessage?: (message: BaseMessageType) => void;
|
|
54
|
+
onReportMessage?: (message: BaseMessageType) => void;
|
|
52
55
|
onMessageCheckChange?: (checked: boolean) => void;
|
|
53
56
|
renderUserProfile?: (props: renderUserProfileProps) => React.ReactNode;
|
|
54
57
|
onCreateThread?: () => void;
|
|
@@ -3,6 +3,23 @@ import { HeaderProps } from '../header';
|
|
|
3
3
|
import { MessageInputProps } from '../messageInput';
|
|
4
4
|
import { MsgListProps } from './MessageList';
|
|
5
5
|
import { CurrentConversation } from 'module/store/ConversationStore';
|
|
6
|
+
export interface RtcRoomInfo {
|
|
7
|
+
callId: string;
|
|
8
|
+
calleeDevId?: string;
|
|
9
|
+
calleeIMName: string;
|
|
10
|
+
callerDevId?: string;
|
|
11
|
+
callerIMName: string;
|
|
12
|
+
channel: string;
|
|
13
|
+
confrName: string;
|
|
14
|
+
groupId: string;
|
|
15
|
+
groupName: string;
|
|
16
|
+
token?: string;
|
|
17
|
+
type: number;
|
|
18
|
+
joinedMembers: {
|
|
19
|
+
agoraUid: number;
|
|
20
|
+
imUserId: string;
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
6
23
|
export interface ChatProps {
|
|
7
24
|
prefix?: string;
|
|
8
25
|
className?: string;
|
|
@@ -31,12 +48,8 @@ export interface ChatProps {
|
|
|
31
48
|
id: string;
|
|
32
49
|
avatarurl?: string;
|
|
33
50
|
}]>;
|
|
34
|
-
onAddPerson?: (data: {
|
|
35
|
-
|
|
36
|
-
}) => Promise<[{
|
|
37
|
-
member: string;
|
|
38
|
-
} | {
|
|
39
|
-
owner: string;
|
|
51
|
+
onAddPerson?: (data: RtcRoomInfo) => Promise<[{
|
|
52
|
+
id: string;
|
|
40
53
|
}]>;
|
|
41
54
|
getIdMap?: (data: {
|
|
42
55
|
userId: string;
|
|
@@ -55,7 +68,21 @@ export interface ChatProps {
|
|
|
55
68
|
agoraUid: string | number;
|
|
56
69
|
accessToken: string;
|
|
57
70
|
}>;
|
|
71
|
+
groupAvatar?: string;
|
|
72
|
+
onRing?: (data: {
|
|
73
|
+
channel: string;
|
|
74
|
+
}) => void;
|
|
58
75
|
};
|
|
76
|
+
onOpenThread?: (data: {
|
|
77
|
+
id: string;
|
|
78
|
+
}) => void;
|
|
79
|
+
onOpenThreadList?: () => void;
|
|
80
|
+
onVideoCall?: (data: {
|
|
81
|
+
channel: string;
|
|
82
|
+
}) => void;
|
|
83
|
+
onAudioCall?: (data: {
|
|
84
|
+
channel: string;
|
|
85
|
+
}) => void;
|
|
59
86
|
}
|
|
60
|
-
declare const _default: React.
|
|
87
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<ChatProps & React.RefAttributes<unknown>, "key" | keyof ChatProps> & React.RefAttributes<unknown>>>;
|
|
61
88
|
export default _default;
|
|
@@ -13,6 +13,7 @@ export interface MsgListProps {
|
|
|
13
13
|
renderUserProfile?: (props: renderUserProfileProps) => React.ReactNode;
|
|
14
14
|
conversation?: CurrentConversation;
|
|
15
15
|
messageProps?: BaseMessageProps;
|
|
16
|
+
onOpenThreadPanel?: (threadId: string) => void;
|
|
16
17
|
}
|
|
17
18
|
declare let MessageList: FC<MsgListProps>;
|
|
18
19
|
export { MessageList };
|
|
@@ -4,6 +4,7 @@ import { MessageInputProps } from '../messageInput';
|
|
|
4
4
|
import { MsgListProps } from '../chat/MessageList';
|
|
5
5
|
import { BroadcastProps } from '../../component/broadcast';
|
|
6
6
|
import { ChatroomInfo } from '../store/AddressStore';
|
|
7
|
+
export declare let reportType: Record<string, string>;
|
|
7
8
|
export interface ChatroomProps {
|
|
8
9
|
prefix?: string;
|
|
9
10
|
className?: string;
|
|
@@ -15,6 +15,8 @@ export interface ContactDetailProps {
|
|
|
15
15
|
};
|
|
16
16
|
onUserIdCopied?: (id: string) => void;
|
|
17
17
|
onMessageBtnClick?: () => void | boolean;
|
|
18
|
+
onAudioCall?: () => void | boolean;
|
|
19
|
+
onVideoCall?: () => void | boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare const ContactDetail: React.FC<ContactDetailProps>;
|
|
20
22
|
declare const _default: React.FunctionComponent<ContactDetailProps>;
|
|
@@ -34,6 +34,9 @@ export interface ContactListProps {
|
|
|
34
34
|
type: 'contact' | 'group';
|
|
35
35
|
name?: string;
|
|
36
36
|
}[];
|
|
37
|
+
searchStyle?: React.CSSProperties;
|
|
38
|
+
searchInputStyle?: React.CSSProperties;
|
|
39
|
+
searchPlaceholder?: string;
|
|
37
40
|
}
|
|
38
41
|
declare let ContactList: FC<ContactListProps>;
|
|
39
42
|
export { ContactList };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import { TooltipProps } from '../../component/tooltip/Tooltip';
|
|
2
3
|
export interface HeaderProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
style?: React.CSSProperties;
|
|
@@ -13,7 +14,7 @@ export interface HeaderProps {
|
|
|
13
14
|
close?: boolean;
|
|
14
15
|
suffixIcon?: ReactNode;
|
|
15
16
|
renderContent?: () => React.ReactElement;
|
|
16
|
-
|
|
17
|
+
onClickEllipsis?: () => void;
|
|
17
18
|
moreAction?: {
|
|
18
19
|
visible?: boolean;
|
|
19
20
|
icon?: ReactNode;
|
|
@@ -23,8 +24,9 @@ export interface HeaderProps {
|
|
|
23
24
|
content: ReactNode;
|
|
24
25
|
onClick?: () => void;
|
|
25
26
|
}>;
|
|
27
|
+
tooltipProps?: TooltipProps;
|
|
26
28
|
};
|
|
27
|
-
|
|
29
|
+
onClickAvatar?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
28
30
|
onClickClose?: () => void;
|
|
29
31
|
onClickBack?: () => void;
|
|
30
32
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { TooltipProps } from '../../../component/tooltip/Tooltip';
|
|
2
3
|
export interface EmojiConfig {
|
|
3
4
|
path: string;
|
|
4
5
|
map: {
|
|
@@ -21,6 +22,7 @@ export interface EmojiProps {
|
|
|
21
22
|
selectedList?: string[];
|
|
22
23
|
onDelete?: (emojiString: string) => void;
|
|
23
24
|
emojiConfig?: EmojiConfig;
|
|
25
|
+
placement?: TooltipProps['placement'];
|
|
24
26
|
}
|
|
25
27
|
declare const Emoji: (props: EmojiProps) => JSX.Element;
|
|
26
28
|
export { Emoji };
|
|
@@ -6,6 +6,7 @@ export interface EmojiKeyBoardProps {
|
|
|
6
6
|
onDelete?: (emoji: string) => void;
|
|
7
7
|
selectedList?: string[];
|
|
8
8
|
reactionConfig?: EmojiProps['emojiConfig'];
|
|
9
|
+
placement?: EmojiProps['placement'];
|
|
9
10
|
}
|
|
10
11
|
declare const EmojiKeyBoard: (props: EmojiKeyBoardProps) => JSX.Element;
|
|
11
12
|
export { EmojiKeyBoard };
|
|
@@ -24,6 +24,7 @@ export interface GroupItem extends ChatSDK.BaseGroupInfo {
|
|
|
24
24
|
silent?: boolean;
|
|
25
25
|
initial?: string;
|
|
26
26
|
name?: string;
|
|
27
|
+
avatarUrl?: string;
|
|
27
28
|
}
|
|
28
29
|
export declare type AppUserInfo = Partial<Record<ChatSDK.ConfigurableKey, any>> & {
|
|
29
30
|
userId: string;
|
|
@@ -54,9 +55,12 @@ declare class AddressStore {
|
|
|
54
55
|
constructor();
|
|
55
56
|
setAppUserInfo: (appUsersInfo: Record<string, AppUserInfo>) => void;
|
|
56
57
|
setContacts(contacts: any): void;
|
|
58
|
+
setContactRemark(userId: string, remark: string): void;
|
|
59
|
+
deleteContact(userId: string): void;
|
|
57
60
|
deleteContactFromContactList(userId: string): void;
|
|
58
61
|
addContactToContactList(userId: string): void;
|
|
59
62
|
setGroups(groups: GroupItem[]): void;
|
|
63
|
+
updateGroupAvatar(groupId: string, avatar: string): void;
|
|
60
64
|
updateGroupName(groupId: string, groupName: string): void;
|
|
61
65
|
setHasGroupsNext(hasNext: boolean): void;
|
|
62
66
|
setGroupMembers(groupId: string, membersList: ChatSDK.GroupMember[]): void;
|
|
@@ -7,6 +7,11 @@ export interface ProviderProps {
|
|
|
7
7
|
password?: string;
|
|
8
8
|
translationTargetLanguage?: string;
|
|
9
9
|
useUserInfo?: boolean;
|
|
10
|
+
msyncUrl?: string;
|
|
11
|
+
restUrl?: string;
|
|
12
|
+
isHttpDNS?: boolean;
|
|
13
|
+
useReplacedMessageContents?: boolean;
|
|
14
|
+
deviceId?: string;
|
|
10
15
|
};
|
|
11
16
|
local?: {
|
|
12
17
|
fallbackLng?: string;
|
|
@@ -69,7 +74,7 @@ export interface ProviderProps {
|
|
|
69
74
|
};
|
|
70
75
|
};
|
|
71
76
|
theme?: {
|
|
72
|
-
primaryColor?: string;
|
|
77
|
+
primaryColor?: string | number;
|
|
73
78
|
mode?: 'light' | 'dark';
|
|
74
79
|
avatarShape?: 'circle' | 'square';
|
|
75
80
|
bubbleShape?: 'ground' | 'square';
|
|
@@ -17,9 +17,10 @@ export interface TextMessageProps extends BaseMessageProps {
|
|
|
17
17
|
targetLanguage?: string;
|
|
18
18
|
showTranslation?: boolean;
|
|
19
19
|
onlyContent?: boolean;
|
|
20
|
+
onOpenThreadPanel?: (threadId: string) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const renderTxt: (txt: string | undefined | null, parseUrl?: boolean) => React.ReactNode[];
|
|
22
|
-
declare const _default: ((props: TextMessageProps) => JSX.Element | null) & {
|
|
23
|
+
declare const _default: React.MemoExoticComponent<((props: TextMessageProps) => JSX.Element | null) & {
|
|
23
24
|
displayName: string;
|
|
24
|
-
}
|
|
25
|
+
}>;
|
|
25
26
|
export default _default;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
/** create Thread component, 实现和Chat组件一样的功能,一样的样式*/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ChatSDK } from '../../SDK';
|
|
4
3
|
import { MessageInputProps } from '../messageInput';
|
|
5
4
|
import { MsgListProps } from '../chat/MessageList';
|
|
6
5
|
export interface ThreadProps {
|
|
7
6
|
prefix?: string;
|
|
8
7
|
className?: string;
|
|
9
8
|
style?: React.CSSProperties;
|
|
10
|
-
shape?: 'ground' | 'square';
|
|
11
|
-
direction?: 'ltr' | 'rtl';
|
|
12
|
-
message: ChatSDK.MessageBody;
|
|
13
9
|
messageListProps?: MsgListProps;
|
|
14
10
|
createThread?: boolean;
|
|
15
|
-
groupID: string;
|
|
16
|
-
threadID?: string;
|
|
17
|
-
originalMsg: ChatSDK.MessageBody;
|
|
18
11
|
messageInputProps?: MessageInputProps;
|
|
19
12
|
}
|
|
20
13
|
declare const _default: ((props: ThreadProps) => JSX.Element) & {
|
|
@@ -12,6 +12,9 @@ export interface UserSelectProps extends ModalProps {
|
|
|
12
12
|
selectedPanelFooter?: React.ReactNode;
|
|
13
13
|
users?: UserSelectInfo[];
|
|
14
14
|
checkedUsers?: UserSelectInfo[];
|
|
15
|
+
disableUserIds?: string[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
searchPlaceholder?: string;
|
|
15
18
|
}
|
|
16
19
|
export interface UserSelectInfo {
|
|
17
20
|
avatarUrl?: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
declare function hexToHsla(hex: string): string | null;
|
|
2
2
|
declare function generateColors(baseColor: string, lights?: number[]): string[];
|
|
3
|
-
|
|
3
|
+
declare const isHueValue: (value: number) => boolean;
|
|
4
|
+
declare const isHexColor: (value: string) => boolean;
|
|
5
|
+
export { hexToHsla, generateColors, isHueValue, isHexColor };
|