@medipha/chat 1.0.15 → 1.0.17
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 +1 -1
- package/dist/features/composer/conversation-composer.d.ts +8 -1
- package/dist/features/create-conversation/tabs/create-group-tab.d.ts +2 -1
- package/dist/features/message-list/bubble/use-reaction-name-preview.d.ts +21 -0
- package/dist/index.cjs +46 -46
- package/dist/index.js +9025 -8621
- package/dist/pages/Setting/archive/archive-helpers.d.ts +3 -1
- package/dist/shared/components/multi-select-filter-pill.d.ts +16 -0
- package/dist/shared/hooks/use-debounced-value.d.ts +6 -0
- package/dist/shared/hooks/use-topmost-escape.d.ts +8 -0
- package/dist/styles.css +1 -1
- package/dist/utils/work-status.d.ts +9 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PendingAttachment } from './pending-attachment';
|
|
2
|
-
export declare const ACCEPT_ATTRIBUTE = ".jpg,.jpeg,.png,.webp,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt";
|
|
2
|
+
export declare const ACCEPT_ATTRIBUTE = ".jpg,.jpeg,.png,.webp,.gif,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.zip,.rar,.mp4,.mp3";
|
|
3
3
|
export declare const ACCEPTED_FILE_EXTENSIONS: Set<string>;
|
|
4
4
|
export declare const getFileExtension: (file: File) => string;
|
|
5
5
|
export declare const isImageFile: (file: File) => boolean;
|
|
@@ -12,9 +12,16 @@ interface ConversationComposerProps {
|
|
|
12
12
|
onError?: (message: string) => void;
|
|
13
13
|
onAttach?: () => void;
|
|
14
14
|
onAttachImages?: () => void;
|
|
15
|
+
/** Stages pasted image file(s) exactly like the attach-image button/drop would. */
|
|
16
|
+
onPasteFiles?: (files: File[]) => void;
|
|
15
17
|
onTypingStart?: () => void;
|
|
16
18
|
onTypingStop?: () => void;
|
|
17
19
|
}
|
|
20
|
+
export interface ConversationComposerHandle {
|
|
21
|
+
/** Returns the caret to the editor — used after staging an attachment, where focus
|
|
22
|
+
* otherwise stays on the attach button (or the file dialog that just closed). */
|
|
23
|
+
focus: () => void;
|
|
24
|
+
}
|
|
18
25
|
/** Rich-text composer that emits backend message content, with real @mentions. */
|
|
19
|
-
export declare
|
|
26
|
+
export declare const ConversationComposer: import('react').ForwardRefExoticComponent<ConversationComposerProps & import('react').RefAttributes<ConversationComposerHandle>>;
|
|
20
27
|
export {};
|
|
@@ -6,8 +6,9 @@ interface CreateGroupTabProps {
|
|
|
6
6
|
isLoadingUsers: boolean;
|
|
7
7
|
error: string;
|
|
8
8
|
onSubmit: (title: string, memberIds: string[], isVerified: boolean) => void;
|
|
9
|
+
onInvalidTitle: () => void;
|
|
9
10
|
}
|
|
10
11
|
/** "Nhóm" tab — check off members, submit to create the group (title input lives in the
|
|
11
12
|
* parent panel, above the department/branch filters). */
|
|
12
|
-
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, }: CreateGroupTabProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, onInvalidTitle, }: CreateGroupTabProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** How many reactor names the hover tooltip shows before collapsing the rest into
|
|
2
|
+
* "và N người khác" — matches BADGE_ICON_LIMIT in message-reactions.tsx so the tooltip
|
|
3
|
+
* reads as an expansion of the same overlapping icons the badge already shows. */
|
|
4
|
+
export declare const REACTION_NAME_PREVIEW_LIMIT = 3;
|
|
5
|
+
interface ReactionNamePreview {
|
|
6
|
+
names: string[];
|
|
7
|
+
totalCount: number;
|
|
8
|
+
}
|
|
9
|
+
/** Lazily loads just enough reactor names to fill the aggregate reaction badge's hover
|
|
10
|
+
* tooltip. There can be hundreds of messages in a timeline, so this only fetches when a
|
|
11
|
+
* given badge is actually hovered (call `load()` from the hover handler) — never eagerly
|
|
12
|
+
* for messages nobody looks at — and caches the result per message so re-hovering the
|
|
13
|
+
* same badge doesn't refetch. `requestRef` mirrors the stale-response guard already used
|
|
14
|
+
* in use-reaction-modal.ts: if `load()` is called again for this message before the first
|
|
15
|
+
* call resolves, the earlier response is ignored when it lands. */
|
|
16
|
+
export declare function useReactionNamePreview(messageId: string | null): {
|
|
17
|
+
preview: ReactionNamePreview | null;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
load: () => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|