@medipha/chat 1.0.22 → 1.0.24
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/dist/features/composer/conversation-composer.d.ts +4 -0
- package/dist/features/composer/editor/reset-editor-content.d.ts +10 -0
- package/dist/features/create-conversation/tabs/create-group-tab.d.ts +3 -1
- package/dist/features/create-conversation/tabs/direct-chat-tab.d.ts +3 -1
- package/dist/features/create-conversation/tabs/selected-members-modal.d.ts +2 -1
- package/dist/features/message-list/bubble/message-actions/message-actions-menu.d.ts +7 -1
- package/dist/index.cjs +760 -47
- package/dist/index.js +12866 -34883
- package/dist/pages/Setting/members/add-member-modal.d.ts +3 -1
- package/dist/pages/Setting/members/confirm-remove-members-dialog.d.ts +13 -0
- package/dist/pages/Setting/members/settings-modal.d.ts +7 -11
- package/dist/pages/conversation/conversation-detail/conversation-detail.d.ts +1 -0
- package/dist/pages/sidebar/hooks/use-conversations.d.ts +1 -0
- package/dist/pages/sidebar/sidbar-conversation-list/sidbar-conversation-list.d.ts +2 -1
- package/dist/store/conversationsStore.d.ts +7 -0
- package/dist/styles.css +1 -1
- package/dist/utils/chat.d.ts +6 -0
- package/dist/utils/normalize-search.d.ts +6 -0
- package/package.json +6 -3
|
@@ -23,6 +23,10 @@ export interface ConversationComposerHandle {
|
|
|
23
23
|
/** Returns the caret to the editor — used after staging an attachment, where focus
|
|
24
24
|
* otherwise stays on the attach button (or the file dialog that just closed). */
|
|
25
25
|
focus: () => void;
|
|
26
|
+
/** Inserts an @mention of this user at the very start of the draft, then a trailing
|
|
27
|
+
* space — used when starting a reply, so the reply reads like Zalo's own
|
|
28
|
+
* "@[tên] <đang gõ>" instead of relying on the quoted-message banner alone. */
|
|
29
|
+
insertMentionAtStart: (userId: string, fallbackName: string) => void;
|
|
26
30
|
}
|
|
27
31
|
/** Rich-text composer that emits backend message content, with real @mentions. */
|
|
28
32
|
export declare const ConversationComposer: import('react').ForwardRefExoticComponent<ConversationComposerProps & import('react').RefAttributes<ConversationComposerHandle>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
/**
|
|
3
|
+
* Empties the composer back to a single blank paragraph.
|
|
4
|
+
*
|
|
5
|
+
* `clearContent()` on its own leaves the wrapping block behind when the document is a
|
|
6
|
+
* bullet/numbered list — you end up with an empty list item still showing its marker next
|
|
7
|
+
* to the placeholder. `clearNodes()` over the whole selection lifts those wrappers away
|
|
8
|
+
* first, so what's left to clear is plain paragraphs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resetEditorContent(editor: Editor | null | undefined): void;
|
|
@@ -7,8 +7,10 @@ interface CreateGroupTabProps {
|
|
|
7
7
|
error: string;
|
|
8
8
|
onSubmit: (title: string, memberIds: string[], isVerified: boolean) => void;
|
|
9
9
|
onInvalidTitle: () => void;
|
|
10
|
+
/** Opens the account-info modal for a user instead of toggling their selection. */
|
|
11
|
+
onOpenProfile: (userId: string) => void;
|
|
10
12
|
}
|
|
11
13
|
/** "Nhóm" tab — check off members, submit to create the group (title input lives in the
|
|
12
14
|
* parent panel, above the department/branch filters). */
|
|
13
|
-
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, onInvalidTitle, }: CreateGroupTabProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, onInvalidTitle, onOpenProfile, }: CreateGroupTabProps): import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
export {};
|
|
@@ -6,7 +6,9 @@ interface DirectChatTabProps {
|
|
|
6
6
|
isLoadingUsers: boolean;
|
|
7
7
|
error: string;
|
|
8
8
|
onSelectUser: (user: ChatUser) => void;
|
|
9
|
+
/** Opens the account-info modal for a user instead of starting a chat with them. */
|
|
10
|
+
onOpenProfile: (userId: string) => void;
|
|
9
11
|
}
|
|
10
12
|
/** "Trò chuyện" tab — pick a user to start (or reuse) a direct conversation with. */
|
|
11
|
-
export declare function DirectChatTab({ users, isCreating, isLoadingUsers, error, onSelectUser, }: DirectChatTabProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function DirectChatTab({ users, isCreating, isLoadingUsers, error, onSelectUser, onOpenProfile, }: DirectChatTabProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -3,9 +3,10 @@ interface SelectedMembersModalProps {
|
|
|
3
3
|
users: ChatUser[];
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
onRemove: (user: ChatUser) => void;
|
|
6
|
+
onOpenProfile: (userId: string) => void;
|
|
6
7
|
}
|
|
7
8
|
/** Read-only-ish review of who's picked so far for the new group, opened from the
|
|
8
9
|
* "Đã chọn N thành viên" count — each row can also be unchecked without hunting it
|
|
9
10
|
* back down in the (possibly filtered/paginated) main list. */
|
|
10
|
-
export declare function SelectedMembersModal({ users, onClose, onRemove }: SelectedMembersModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function SelectedMembersModal({ users, onClose, onRemove, onOpenProfile }: SelectedMembersModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -3,8 +3,14 @@ interface MessageActionsMenuProps {
|
|
|
3
3
|
removeLabel: string;
|
|
4
4
|
isRemoving: boolean;
|
|
5
5
|
canManagePins: boolean;
|
|
6
|
+
/** "Xem chi tiết" (delivery/read receipts) only means anything for a message the current
|
|
7
|
+
* user themself sent — someone else's message shows the same receipts to everyone. */
|
|
8
|
+
canViewDetails: boolean;
|
|
6
9
|
/** Whether the message has copyable text — false for image/file-only messages. */
|
|
7
10
|
canCopy: boolean;
|
|
11
|
+
/** False for a multi-image message — its reply-quote can't point at any one photo, so
|
|
12
|
+
* there's nothing specific for a reply to reference. */
|
|
13
|
+
canReply: boolean;
|
|
8
14
|
canForward: boolean;
|
|
9
15
|
isPinned: boolean;
|
|
10
16
|
isMenuOpen: boolean;
|
|
@@ -23,5 +29,5 @@ interface MessageActionsMenuProps {
|
|
|
23
29
|
onRemove: () => void;
|
|
24
30
|
}
|
|
25
31
|
/** Reply/forward buttons plus the "..." options menu (copy / pin / details / recall). */
|
|
26
|
-
export declare function MessageActionsMenu({ canRemove, removeLabel, isRemoving, canManagePins, canCopy, canForward, isPinned, isMenuOpen, menuPosition, onReply, onForward, onOpenMenu, onCloseMenu, onCopyMessage, onTogglePin, onViewDetails, onRemove, }: MessageActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function MessageActionsMenu({ canRemove, removeLabel, isRemoving, canManagePins, canViewDetails, canCopy, canReply, canForward, isPinned, isMenuOpen, menuPosition, onReply, onForward, onOpenMenu, onCloseMenu, onCopyMessage, onTogglePin, onViewDetails, onRemove, }: MessageActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
27
33
|
export {};
|