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.
@@ -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>;
@@ -5,6 +5,8 @@ export interface EmptyProps {
5
5
  prefix?: string;
6
6
  text?: ReactNode;
7
7
  icon?: ReactNode;
8
+ onClickBack?: () => void;
9
+ back?: boolean;
8
10
  }
9
11
  declare const Empty: FC<EmptyProps>;
10
12
  export { Empty };
@@ -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;
@@ -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
- declare const Emoji: (props: EmojiProps) => import("react/jsx-runtime").JSX.Element;
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
- declare const EmojiKeyBoard: (props: EmojiKeyBoardProps) => import("react/jsx-runtime").JSX.Element;
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
- declare const _default: ((props: ThreadListExpandableIconProps) => import("react/jsx-runtime").JSX.Element) & {
10
- displayName: string;
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;