@medipha/chat 1.0.35 → 1.0.37
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/api/local-transport.d.ts +7 -0
- package/dist/api/member-approval-client.d.ts +8 -0
- package/dist/features/composer/attachment-file-helpers.d.ts +5 -5
- package/dist/features/media-preview/use-image-lightbox.d.ts +5 -6
- package/dist/index.cjs +47 -47
- package/dist/index.js +9915 -9464
- package/dist/pages/Setting/hooks/use-pending-join-requests.d.ts +4 -0
- package/dist/pages/Setting/members/join-requests-modal.d.ts +10 -0
- package/dist/pages/conversation/conversation-header/conversation-header.d.ts +3 -1
- package/dist/shared/components/user-approved-icon.d.ts +5 -0
- package/dist/store/pendingJoinRequestsStore.d.ts +18 -0
- package/dist/styles.css +1 -1
- package/dist/utils/chat-display.d.ts +13 -3
- package/dist/utils/chat.d.ts +20 -1
- package/package.json +1 -1
|
@@ -41,13 +41,22 @@ export declare const getRemovedMessageLabel: (message: {
|
|
|
41
41
|
removedById?: string | null;
|
|
42
42
|
removalType?: MessageRemovalType | null;
|
|
43
43
|
}, currentUserId: string | null, resolveRemoverName: (userId: string) => string) => string;
|
|
44
|
-
|
|
45
|
-
export declare const getReplyPreviewText: (replyTo: {
|
|
44
|
+
type ReplyPreviewTarget = {
|
|
46
45
|
type: string;
|
|
47
46
|
content: MessageContent | null;
|
|
48
47
|
attachmentName?: string | null;
|
|
49
48
|
removedAt?: string | null;
|
|
50
|
-
}
|
|
49
|
+
};
|
|
50
|
+
/** Splits the reply preview into a plain label and the file name worth emphasizing (if
|
|
51
|
+
* any), so JSX callers (the pin notice) can bold just the name while plain-text callers
|
|
52
|
+
* (composer banner, detail dialog) still get the same combined string via
|
|
53
|
+
* `getReplyPreviewText`. */
|
|
54
|
+
export declare const getReplyPreviewParts: (replyTo: ReplyPreviewTarget) => {
|
|
55
|
+
label: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
};
|
|
58
|
+
/** Short label for the quoted message shown above a reply (bubble preview or composer banner). */
|
|
59
|
+
export declare const getReplyPreviewText: (replyTo: ReplyPreviewTarget) => string;
|
|
51
60
|
export declare const MAX_DETAILED_SEEN_MEMBERS = 100;
|
|
52
61
|
/**
|
|
53
62
|
* Truncates a long file name to one line, keeping the extension and the few characters
|
|
@@ -56,3 +65,4 @@ export declare const MAX_DETAILED_SEEN_MEMBERS = 100;
|
|
|
56
65
|
* Result shape when truncated: "<head>...<last 3 chars of the base name><.extension>".
|
|
57
66
|
*/
|
|
58
67
|
export declare function truncateFileName(name: string, maxLength?: number): string;
|
|
68
|
+
export {};
|
package/dist/utils/chat.d.ts
CHANGED
|
@@ -182,11 +182,18 @@ export interface ChatUser {
|
|
|
182
182
|
workStatusName?: string | null;
|
|
183
183
|
[key: string]: unknown;
|
|
184
184
|
}
|
|
185
|
+
export declare const CONVERSATION_MEMBER_STATUS: {
|
|
186
|
+
readonly ACTIVE: "ACTIVE";
|
|
187
|
+
readonly PENDING: "PENDING";
|
|
188
|
+
readonly REJECTED: "REJECTED";
|
|
189
|
+
};
|
|
190
|
+
export type ConversationMemberStatus = (typeof CONVERSATION_MEMBER_STATUS)[keyof typeof CONVERSATION_MEMBER_STATUS];
|
|
185
191
|
export interface ConversationMember {
|
|
186
192
|
id?: string;
|
|
187
193
|
userId?: string;
|
|
188
194
|
role?: string;
|
|
189
|
-
status?:
|
|
195
|
+
status?: ConversationMemberStatus;
|
|
196
|
+
invitedById?: string | null;
|
|
190
197
|
user?: ChatUser;
|
|
191
198
|
lastReadSequence?: string;
|
|
192
199
|
isOnline?: boolean;
|
|
@@ -218,6 +225,7 @@ export interface Conversation {
|
|
|
218
225
|
participants?: ConversationMember[];
|
|
219
226
|
/** Messages the current user has not read yet, computed server-side. */
|
|
220
227
|
unreadCount?: number;
|
|
228
|
+
pendingApprovalCount?: number;
|
|
221
229
|
/** Verified ("tích xanh") group — destructive actions are locked while true. */
|
|
222
230
|
isVerified?: boolean;
|
|
223
231
|
/** GROUP only; null for DIRECT. The server always fills the defaults in, so an absent
|
|
@@ -228,6 +236,17 @@ export interface Conversation {
|
|
|
228
236
|
export type GroupMessagePermission = 'ALL_MEMBERS' | 'OWNER_ONLY';
|
|
229
237
|
export interface GroupSettings {
|
|
230
238
|
messagePermission: GroupMessagePermission;
|
|
239
|
+
requireApprovalForNewMembers: boolean;
|
|
240
|
+
}
|
|
241
|
+
export interface PendingMember {
|
|
242
|
+
userId: string;
|
|
243
|
+
status: 'PENDING' | 'REJECTED';
|
|
244
|
+
requestedAt: string;
|
|
245
|
+
addedBy: {
|
|
246
|
+
userId: string;
|
|
247
|
+
fullName: string;
|
|
248
|
+
};
|
|
249
|
+
user: ChatUser;
|
|
231
250
|
}
|
|
232
251
|
/** Only an explicit OWNER_ONLY locks the composer — a conversation loaded before this
|
|
233
252
|
* feature existed, or one still in flight, must not silently mute its members. */
|