@medipha/chat 1.0.27 → 1.0.29
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/attachment-file-helpers.d.ts +6 -0
- package/dist/features/composer/conversation-composer.d.ts +3 -10
- package/dist/features/composer/editor/mention-suggestion-list.d.ts +2 -1
- package/dist/index.cjs +47 -46
- package/dist/index.js +11576 -11247
- package/dist/pages/Setting/group-manage/group-manage-modal.d.ts +18 -0
- package/dist/pages/conversation/conversation-footer/conversation-footer.d.ts +6 -1
- package/dist/shared/components/chat-unavailable.d.ts +6 -0
- package/dist/shared/components/conversation-avatar.d.ts +0 -3
- package/dist/shared/components/work-status-badge.d.ts +9 -0
- package/dist/store/authStore.d.ts +3 -0
- package/dist/styles.css +1 -1
- package/dist/utils/chat.d.ts +13 -1
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Conversation } from '../../../utils/chat';
|
|
2
|
+
interface GroupManageModalProps {
|
|
3
|
+
conversation: Conversation | null;
|
|
4
|
+
conversationId: string | undefined;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConversationUpdated: (update: Partial<Conversation>) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Owner-only group permissions, laid out as the two-pane settings dialog: a left rail of
|
|
10
|
+
* setting groups and the selected group's controls on the right. Only one rail item today
|
|
11
|
+
* — it exists so the second group of settings is a new item, not a second dialog.
|
|
12
|
+
*
|
|
13
|
+
* The switch reads "members may send", the inverse of the stored OWNER_ONLY. Phrasing it
|
|
14
|
+
* as the restriction would make the "on" position mean "locked", backwards from every
|
|
15
|
+
* other toggle in the app.
|
|
16
|
+
*/
|
|
17
|
+
export declare function GroupManageModal({ conversation, conversationId, onClose, onConversationUpdated, }: GroupManageModalProps): import('react').ReactPortal;
|
|
18
|
+
export {};
|
|
@@ -20,8 +20,13 @@ interface ConversationFooterProps {
|
|
|
20
20
|
canMentionAll: boolean;
|
|
21
21
|
isGroup: boolean;
|
|
22
22
|
disabled: boolean;
|
|
23
|
+
/** Shown in place of the composer when a group setting is what disabled it, so the
|
|
24
|
+
* member sees why rather than an inert input. */
|
|
25
|
+
lockedReason?: string;
|
|
23
26
|
pendingAttachmentsState: PendingAttachmentsForFooter;
|
|
24
27
|
replyTargetState: ReplyTargetForFooter;
|
|
28
|
+
replySenderName: string;
|
|
29
|
+
replySenderAvatarUrl: string | null;
|
|
25
30
|
emitOutgoingMessage: (message: ChatMessage) => void;
|
|
26
31
|
markMessageFailed: (message: ChatMessage, failureStage: 'upload' | 'send') => void;
|
|
27
32
|
mergeOutgoingMessage: (message: ChatMessage) => void;
|
|
@@ -38,5 +43,5 @@ interface ConversationFooterProps {
|
|
|
38
43
|
/** The message composer itself — toolbar + input — plus its two hidden file inputs. Owns
|
|
39
44
|
* turning a submitted draft (text and/or staged attachments) into outgoing messages,
|
|
40
45
|
* including uploading any staged files before they're sent. */
|
|
41
|
-
export declare function ConversationFooter({ conversationId, currentUserId, conversationTitle, mentionMembers, canMentionAll, isGroup, disabled, pendingAttachmentsState, replyTargetState, emitOutgoingMessage, markMessageFailed, mergeOutgoingMessage, stickToLatest, onComposerError, onAttach, onAttachImages, onTypingStart, onTypingStop, uploadInputRef, imageUploadInputRef, acceptAttribute, }: ConversationFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function ConversationFooter({ conversationId, currentUserId, conversationTitle, mentionMembers, canMentionAll, isGroup, disabled, lockedReason, pendingAttachmentsState, replyTargetState, replySenderName, replySenderAvatarUrl, emitOutgoingMessage, markMessageFailed, mergeOutgoingMessage, stickToLatest, onComposerError, onAttach, onAttachImages, onTypingStart, onTypingStop, uploadInputRef, imageUploadInputRef, acceptAttribute, }: ConversationFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
42
47
|
export {};
|
|
@@ -12,8 +12,5 @@ interface ConversationAvatarProps {
|
|
|
12
12
|
currentUserId?: string | null;
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
/** Conversation avatar: photo (group or direct) → direct-chat partner photo → initials.
|
|
16
|
-
* Groups without their own photo render a 2×2 composite of 3 member avatars (excluding
|
|
17
|
-
* self) plus a circle with the total member count, once there are 4+ members. */
|
|
18
15
|
export declare function ConversationAvatar({ avatarUrl, name, isGroup, members, memberCount, currentUserId, className, }: ConversationAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
19
16
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface WorkStatusBadgeProps {
|
|
2
|
+
/** Raw `workStatusName` from the ERP directory; blank or missing renders nothing. */
|
|
3
|
+
status?: string | null;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/** The ERP work-status pill ("NV chính thức", "Nghỉ việc", ...). Colors come from
|
|
7
|
+
* getWorkStatusColor, so every place showing a status stays in sync. */
|
|
8
|
+
export declare function WorkStatusBadge({ status, className }: WorkStatusBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -3,12 +3,15 @@ export interface AuthUser {
|
|
|
3
3
|
userId?: string;
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
}
|
|
6
|
+
export type AccountStatus = 'pending' | 'ready' | 'missing';
|
|
6
7
|
interface AuthState {
|
|
7
8
|
user: AuthUser | null;
|
|
8
9
|
userId: string | null;
|
|
10
|
+
accountStatus: AccountStatus;
|
|
9
11
|
hasHydrated: boolean;
|
|
10
12
|
setUser: (user: AuthUser | null) => void;
|
|
11
13
|
setUserId: (userId: string | null) => void;
|
|
14
|
+
setAccountStatus: (accountStatus: AccountStatus) => void;
|
|
12
15
|
setHasHydrated: (hasHydrated: boolean) => void;
|
|
13
16
|
logout: () => void;
|
|
14
17
|
}
|