@medipha/chat 1.0.23 → 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/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 +12857 -34886
- 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
|
@@ -4,8 +4,10 @@ interface AddMemberModalProps {
|
|
|
4
4
|
memberUserIds: Set<string>;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
onConfirm: (userIds: string[]) => Promise<void>;
|
|
7
|
+
/** Opens the account-info modal for a user instead of toggling their selection. */
|
|
8
|
+
onOpenProfile: (userId: string) => void;
|
|
7
9
|
}
|
|
8
10
|
/** "Thêm thành viên" — branch/department filters + search + checkbox multi-select grouped
|
|
9
11
|
* alphabetically, each row showing the avatar, employee code, and job title. */
|
|
10
|
-
export declare function AddMemberModal({ currentUserId, memberUserIds, onClose, onConfirm, }: AddMemberModalProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function AddMemberModal({ currentUserId, memberUserIds, onClose, onConfirm, onOpenProfile, }: AddMemberModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface ConfirmRemoveMembersDialogProps {
|
|
2
|
+
/** Display names of everyone about to be removed — one name for a row's delete button,
|
|
3
|
+
* several for the tick-selection footer. */
|
|
4
|
+
names: string[];
|
|
5
|
+
isBusy?: boolean;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** Confirmation step in front of every member removal: the action is irreversible for the
|
|
10
|
+
* person removed (they lose the conversation), and the delete controls sit right next to
|
|
11
|
+
* the rows themselves, so a mis-click is easy. */
|
|
12
|
+
export declare function ConfirmRemoveMembersDialog({ names, isBusy, onCancel, onConfirm, }: ConfirmRemoveMembersDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -7,24 +7,20 @@ interface SettingsModalProps {
|
|
|
7
7
|
/** Widens the dialog for dense user lists (add-member / members list). */
|
|
8
8
|
medium?: boolean;
|
|
9
9
|
}
|
|
10
|
-
/** Shared dialog shell (backdrop + header + close button) for every settings modal.
|
|
11
|
-
* Portals to document.body — without this, a modal opened from inside another modal
|
|
12
|
-
* (e.g. the "Đã chọn" review opened from within the wide create-group modal) would
|
|
13
|
-
* stay a DOM descendant of it, and that ancestor's descendant CSS rules (its 2-column
|
|
14
|
-
* grid, width caps, etc.) would leak in and mangle this modal's own layout.
|
|
15
|
-
* The portaled tree is wrapped in its own `.med-chat-root` because `document.body` is
|
|
16
|
-
* outside the module's scoped root — without it, every `.med-chat-root .chat-modal-*`
|
|
17
|
-
* rule (mask, centering, compact user rows) would silently not apply. The `--portal`
|
|
18
|
-
* modifier renders the wrapper as `display: contents`, so it scopes the styles without
|
|
19
|
-
* adding a 100%-height box after `#root` (which would stretch the page and add a Y scroll). */
|
|
20
10
|
export declare function SettingsModal({ title, children, onClose, medium }: SettingsModalProps): import('react').ReactPortal;
|
|
21
11
|
interface UserIdentityProps {
|
|
22
12
|
user: ChatUser;
|
|
23
13
|
subtitle?: string;
|
|
14
|
+
/** The row's own userId. Member rows carry the id on the member, not on its `user`
|
|
15
|
+
* sub-object (which is display-only), so without this the avatar/name would never
|
|
16
|
+
* become clickable in the member lists. */
|
|
17
|
+
userId?: string | null;
|
|
18
|
+
onOpenProfile?: (userId: string) => void;
|
|
19
|
+
isOnline?: boolean;
|
|
24
20
|
}
|
|
25
21
|
/** Avatar (real photo when available, else initials) + name (+ optional subtitle below,
|
|
26
22
|
* e.g. "Trưởng nhóm" or a job title) shown in every member row. */
|
|
27
|
-
export declare function UserIdentity({ user, subtitle }: UserIdentityProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function UserIdentity({ user, subtitle, userId: userIdProp, onOpenProfile, isOnline, }: UserIdentityProps): import("react/jsx-runtime").JSX.Element;
|
|
28
24
|
interface RenameGroupDialogProps {
|
|
29
25
|
initialTitle: string;
|
|
30
26
|
isSaving: boolean;
|
|
@@ -7,7 +7,8 @@ interface SidbarConversationListProps {
|
|
|
7
7
|
activeConversationId: string | undefined;
|
|
8
8
|
buildConversationPath: (targetId: string) => string;
|
|
9
9
|
onTogglePin: (conversationId: string, nextPinned: boolean) => void;
|
|
10
|
+
onClearConversation: (conversationId: string) => Promise<boolean>;
|
|
10
11
|
}
|
|
11
12
|
/** The scrollable list of conversation rows — already-filtered input in, Link rows out. */
|
|
12
|
-
export declare function SidbarConversationList({ conversations, isLoading, error, currentUserId, activeConversationId, buildConversationPath, onTogglePin, }: SidbarConversationListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function SidbarConversationList({ conversations, isLoading, error, currentUserId, activeConversationId, buildConversationPath, onTogglePin, onClearConversation, }: SidbarConversationListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -3,6 +3,11 @@ interface ConversationsState {
|
|
|
3
3
|
conversations: Conversation[];
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
error: string;
|
|
6
|
+
/** Bumped per conversation whenever this user clears it. An open message window reloads
|
|
7
|
+
* only when its conversationId changes, so clearing the conversation currently on screen
|
|
8
|
+
* would otherwise leave the already-fetched history sitting there — the server hides it
|
|
9
|
+
* from the next fetch, but nothing asks for one. Watching this token is that trigger. */
|
|
10
|
+
historyClearedTokenByConversation: Record<string, number>;
|
|
6
11
|
setConversations: (conversations: Conversation[]) => void;
|
|
7
12
|
setLoading: (isLoading: boolean) => void;
|
|
8
13
|
setError: (error: string) => void;
|
|
@@ -19,6 +24,8 @@ interface ConversationsState {
|
|
|
19
24
|
* first the store has heard of it (e.g. a deep link opened before the list loaded). */
|
|
20
25
|
setFullConversation: (conversation: Conversation) => void;
|
|
21
26
|
removeConversation: (conversationId: string) => void;
|
|
27
|
+
/** Per-user "delete": keeps the row, drops its preview and unread badge. */
|
|
28
|
+
clearConversationPreview: (conversationId: string) => void;
|
|
22
29
|
applyIncomingMessage: (incoming: unknown, currentUserId: string | null) => void;
|
|
23
30
|
applyReadMarker: (payload: unknown) => void;
|
|
24
31
|
applyUnreadCount: (payload: unknown) => void;
|