easemob-chat-uikit 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChatUI.esm.js +31083 -30657
- package/ChatUI.js +98 -98
- package/ChatUI.umd.js +90 -90
- package/package.json +1 -1
- package/style/blocklist/style/style.scss +2 -2
- package/style/contactList/style/detail.scss +1 -0
- package/style/conversation/style/item.scss +6 -2
- package/style/groupDetail/style/style.scss +6 -0
- package/style/input/style/search.scss +3 -0
- package/style/reaction/style/style.scss +1 -1
- package/style/textMessage/style/style.scss +9 -0
- package/style/userItem/style/style.scss +3 -0
- package/style/userSelect/style/style.scss +3 -0
- package/style.css +1 -1
- package/types/module/contactList/ContactDetail.d.ts +2 -0
- package/types/module/empty/Empty.d.ts +2 -0
- package/types/module/groupDetail/GroupDetail.d.ts +1 -0
- package/types/module/hooks/useScreen.d.ts +25 -0
- package/types/module/index.d.ts +2 -1
- package/types/module/messageInput/emoji/Emoji.d.ts +5 -1
- package/types/module/reaction/EmojiKeyboard.d.ts +5 -1
- package/types/module/reaction/index.d.ts +1 -0
- package/types/module/thread/ThreadListExpandableIcon.d.ts +8 -3
|
@@ -18,6 +18,8 @@ export interface ContactDetailProps {
|
|
|
18
18
|
onAudioCall?: () => void | boolean;
|
|
19
19
|
onVideoCall?: () => void | boolean;
|
|
20
20
|
renderEmpty?: () => React.ReactNode;
|
|
21
|
+
back?: boolean;
|
|
22
|
+
onClickBack?: () => void;
|
|
21
23
|
}
|
|
22
24
|
export declare const ContactDetail: React.FC<ContactDetailProps>;
|
|
23
25
|
declare const _default: React.FunctionComponent<ContactDetailProps>;
|
|
@@ -13,6 +13,7 @@ export interface GroupDetailProps {
|
|
|
13
13
|
onLeaveGroup?: () => void;
|
|
14
14
|
onDestroyGroup?: () => void;
|
|
15
15
|
onGroupMemberVisibleChange?: (visible: boolean) => void;
|
|
16
|
+
onBack?: () => void;
|
|
16
17
|
}
|
|
17
18
|
declare const _default: React.FunctionComponent<GroupDetailProps>;
|
|
18
19
|
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type Orientation = 'portrait' | 'landscape';
|
|
2
|
+
export type BreakpointKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export interface Breakpoints {
|
|
4
|
+
xs: number;
|
|
5
|
+
sm: number;
|
|
6
|
+
md: number;
|
|
7
|
+
lg: number;
|
|
8
|
+
xl: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ScreenInfo {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
vw: number;
|
|
14
|
+
vh: number;
|
|
15
|
+
devicePixelRatio: number;
|
|
16
|
+
orientation: Orientation;
|
|
17
|
+
breakpoint: BreakpointKey;
|
|
18
|
+
isMobile: boolean;
|
|
19
|
+
isTablet: boolean;
|
|
20
|
+
isDesktop: boolean;
|
|
21
|
+
isTouchDevice: boolean;
|
|
22
|
+
prefersReducedMotion: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function useScreen(customBreakpoints?: Partial<Breakpoints>): ScreenInfo;
|
|
25
|
+
export declare function useIsMobile(customBreakpoints?: Partial<Breakpoints>): boolean;
|
package/types/module/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { useChatContext } from './hooks/useChatContext';
|
|
|
34
34
|
import { useAddressContext } from './hooks/useAddressContext';
|
|
35
35
|
import { useThreadContext } from './hooks/useThreadContext';
|
|
36
36
|
import { useSDK } from './hooks/useSDK';
|
|
37
|
+
import { useIsMobile, useScreen } from './hooks/useScreen';
|
|
37
38
|
import Thread, { ThreadProps } from './thread';
|
|
38
39
|
import UserProfile, { UserProfileProps } from './userProfile';
|
|
39
40
|
import { Blocklist, BlocklistProps } from './blocklist';
|
|
@@ -45,4 +46,4 @@ import { CallKitProps, CallInfo, CallErrorCode, CallError } from './callkit';
|
|
|
45
46
|
import { CallKitRef } from './callkit/types/index';
|
|
46
47
|
export type { AudioMessageProps, BaseMessageProps, FileMessageProps, ImageMessageProps, ImagePreviewProps, NoticeMessageProps, TextMessageProps, VideoMessageProps, MessageStatusProps, CombinedMessageProps, PinnedMessageProps, RepliedMsgProps, UnsentRepliedMsgProps, ChatProps, MsgListProps, ConversationItemProps, ConversationListProps, ConversationData, MessageInputProps, MoreActionProps, RecorderProps, EmojiProps, SelectedControlsProps, SuggestListProps, TextareaProps, HeaderProps, EmptyProps, RecalledMessageProps, RootStore, InitConfig, MessageStore, Message, SelectedMessage, Typing, ConversationStore, AT_TYPE, Conversation, CurrentConversation, ById, AddressStore, MemberRole, MemberItem, GroupItem, AppUserInfo, ThreadStore, ThreadData, CurrentThread, ProviderProps, ContextProps, ThreadProps, UserProfileProps, BlocklistProps, ContactListProps, ContactDetailProps, GroupDetailProps, GroupMemberProps, UserCardMessageProps, UserSelectProps, CallKitProps, CallKitRef, CallInfo, CallErrorCode, CallError, };
|
|
47
48
|
declare const UIKitProvider: import("react").NamedExoticComponent<ProviderProps>;
|
|
48
|
-
export { AudioMessage, BaseMessage, FileMessage, ImageMessage, NoticeMessage, TextMessage, VideoMessage, CombinedMessage, PinnedMessage, RepliedMsg, UnsentRepliedMsg, MessageStatus, Chat, MessageList, ContactList, ConversationList, ConversationItem, MessageInput, Header, Empty, RecalledMessage, rootStore, RootContext, RootProvider, RootConsumer, Provider, UIKitProvider, Thread, UserProfile, Blocklist, useClient, useConversations, usePinnedMessage, useHistoryMessages, useSDK, useConversationContext, useChatContext, useAddressContext, useThreadContext, useChatroomContext, Chatroom, ChatroomMember, ChatroomMessage, ContactItem, ContactDetail, GroupDetail, GroupMember, UserCardMessage, UserSelect, CallKit, };
|
|
49
|
+
export { AudioMessage, BaseMessage, FileMessage, ImageMessage, NoticeMessage, TextMessage, VideoMessage, CombinedMessage, PinnedMessage, RepliedMsg, UnsentRepliedMsg, MessageStatus, Chat, MessageList, ContactList, ConversationList, ConversationItem, MessageInput, Header, Empty, RecalledMessage, rootStore, RootContext, RootProvider, RootConsumer, Provider, UIKitProvider, Thread, UserProfile, Blocklist, useClient, useConversations, usePinnedMessage, useHistoryMessages, useSDK, useIsMobile, useScreen, useConversationContext, useChatContext, useAddressContext, useThreadContext, useChatroomContext, Chatroom, ChatroomMember, ChatroomMessage, ContactItem, ContactDetail, GroupDetail, GroupMember, UserCardMessage, UserSelect, CallKit, };
|
|
@@ -26,5 +26,9 @@ export interface EmojiProps {
|
|
|
26
26
|
closeAfterClick?: boolean;
|
|
27
27
|
onOpenChange?: (open: boolean) => void;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
export interface EmojiRef {
|
|
30
|
+
open?: () => void;
|
|
31
|
+
close?: () => void;
|
|
32
|
+
}
|
|
33
|
+
declare const Emoji: React.ForwardRefExoticComponent<EmojiProps & React.RefAttributes<EmojiRef>>;
|
|
30
34
|
export { Emoji };
|
|
@@ -10,5 +10,9 @@ export interface EmojiKeyBoardProps {
|
|
|
10
10
|
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => void;
|
|
11
11
|
onOpenChange?: (open: boolean) => void;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
export interface EmojiKeyBoardRef {
|
|
14
|
+
open?: () => void;
|
|
15
|
+
close?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const EmojiKeyBoard: React.ForwardRefExoticComponent<EmojiKeyBoardProps & React.RefAttributes<EmojiKeyBoardRef>>;
|
|
14
18
|
export { EmojiKeyBoard };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EmojiKeyBoard } from './EmojiKeyboard';
|
|
2
2
|
import { ReactionMessage } from './ReactionMessage';
|
|
3
3
|
export type { ReactionData, ReactionMessageProps } from './ReactionMessage';
|
|
4
|
+
export type { EmojiKeyBoardRef } from './EmojiKeyboard';
|
|
4
5
|
export { EmojiKeyBoard, ReactionMessage };
|
|
@@ -5,8 +5,13 @@ export interface ThreadListExpandableIconProps {
|
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
onClose?: () => void;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
|
+
iconWidth?: string | number;
|
|
9
|
+
iconHeight?: string | number;
|
|
10
|
+
onClickItem?: () => void;
|
|
8
11
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export interface ThreadListExpandableIconRef {
|
|
13
|
+
open: () => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ThreadListExpandableIconProps & React.RefAttributes<ThreadListExpandableIconRef>, "ref"> & React.RefAttributes<ThreadListExpandableIconRef>>>;
|
|
12
17
|
export default _default;
|