@medipha/chat 1.0.65 → 1.0.67

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.
@@ -3,12 +3,20 @@ export interface WidgetFocusRequest {
3
3
  conversationId: string;
4
4
  nonce: number;
5
5
  }
6
+ /** Asks the widget to show a colleague's "Thông tin tài khoản" dialog (with its "Nhắn tin" button). */
7
+ export interface WidgetProfileRequest {
8
+ userId: string;
9
+ /** Change it on every request so asking for the same person again opens the dialog again. */
10
+ nonce: number;
11
+ }
6
12
  export interface ChatWidgetProps extends ChatModuleProps {
7
13
  /** Whether the host is currently showing the widget. Keep the widget mounted while this
8
14
  * is false — the conversation list stays warm and onUnreadTotalChange keeps reporting —
9
15
  * but the floating chat window is withheld, since it is portalled out of whatever box
10
16
  * the host hides. Defaults to true. */
11
17
  isOpen?: boolean;
18
+ /** Lets the host (e.g. the newsfeed) open a user's profile dialog inside this widget. */
19
+ openProfileRequest?: WidgetProfileRequest;
12
20
  onActiveConversationChange?: (conversationId: string | undefined) => void;
13
21
  onExpandChange?: (isExpanded: boolean) => void;
14
22
  onOpenFullPage?: (conversationId: string | undefined) => void;
@@ -1,4 +1,4 @@
1
- import { WidgetFocusRequest } from './chat-widget.types';
1
+ import { WidgetFocusRequest, WidgetProfileRequest } from './chat-widget.types';
2
2
  interface WidgetChatShellProps {
3
3
  isWindowVisible: boolean;
4
4
  isExpanded: boolean;
@@ -12,6 +12,7 @@ interface WidgetChatShellProps {
12
12
  onFocusConversation: (conversationId: string) => void;
13
13
  onOpenFullPage?: (conversationId: string | undefined) => void;
14
14
  onRequestClose?: () => void;
15
+ openProfileRequest?: WidgetProfileRequest;
15
16
  }
16
- export declare function WidgetChatShell({ isWindowVisible, isExpanded, openConversationIds, windowCapacity, focusedConversationId, composerFocusRequest, onToggleExpand, onOpenConversation, onCloseConversation, onFocusConversation, onOpenFullPage, onRequestClose, }: WidgetChatShellProps): import('react/jsx-runtime').JSX.Element;
17
+ export declare function WidgetChatShell({ isWindowVisible, isExpanded, openConversationIds, windowCapacity, focusedConversationId, composerFocusRequest, onToggleExpand, onOpenConversation, onCloseConversation, onFocusConversation, onOpenFullPage, onRequestClose, openProfileRequest, }: WidgetChatShellProps): import('react/jsx-runtime').JSX.Element;
17
18
  export {};
@@ -1,7 +1,9 @@
1
1
  import { Conversation } from '../../../utils/chat';
2
+ export type GroupManageSection = 'message-permission' | 'member-approval' | 'auto-delete' | 'invite-link';
2
3
  interface GroupManageModalProps {
3
4
  conversation: Conversation | null;
4
5
  conversationId: string | undefined;
6
+ initialSection?: GroupManageSection;
5
7
  onClose: () => void;
6
8
  onConversationUpdated: (update: Partial<Conversation>) => void;
7
9
  }
@@ -14,5 +16,5 @@ interface GroupManageModalProps {
14
16
  * as the restriction would make the "on" position mean "locked", backwards from every
15
17
  * other toggle in the app.
16
18
  */
17
- export declare function GroupManageModal({ conversation, conversationId, onClose, onConversationUpdated, }: GroupManageModalProps): import('react').ReactPortal;
19
+ export declare function GroupManageModal({ conversation, conversationId, initialSection, onClose, onConversationUpdated, }: GroupManageModalProps): import('react').ReactPortal;
18
20
  export {};