@bcc-code/vue-bcc-chat-ui 4.7.0 → 5.0.0
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/chat/data.d.ts +3 -1
- package/dist/chat/index.d.ts +4 -0
- package/dist/chat/types.d.ts +5 -0
- package/dist/components/BccChatMessageBubble.vue.d.ts +11 -0
- package/dist/components/BccChatMessageList.vue.d.ts +11 -0
- package/dist/offline/offlineStoreLocalStorage.d.ts +3 -0
- package/dist/offline/types.d.ts +5 -2
- package/dist/vue-bcc-chat-ui.js +20879 -19783
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +2 -1
- package/src/components/BccChatMessageBubble.vue +6 -1
- package/src/components/BccChatMessageList.vue +16 -3
package/dist/chat/data.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Group, BaseMessage } from '@cometchat/chat-sdk-javascript';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
import { ParticipantInfo, UserChatInfo } from './types';
|
|
3
|
+
import { ParticipantInfo, SearchedItems, UserChatInfo } from './types';
|
|
4
4
|
export declare function getGroup(groupUid: string): Promise<Group | null | undefined>;
|
|
5
5
|
export declare function clearGroupChatCount(groupUid: string): Promise<void>;
|
|
6
6
|
export declare function getGroupOnlineCount(groupUid: string): Promise<number>;
|
|
7
7
|
export declare function getGroupMembersInfo(groupUid: string): Promise<ParticipantInfo[]>;
|
|
8
8
|
export declare const userChats: Ref<UserChatInfo[]>;
|
|
9
9
|
export declare function getUserChats(): Promise<UserChatInfo[]>;
|
|
10
|
+
export declare function searchChat(searchQuery: string, limit?: number): SearchedItems | undefined;
|
|
11
|
+
export declare function scrollToMessage(messageId: string): void;
|
|
10
12
|
export declare function getSenderDisplayName(message: BaseMessage | undefined, group?: Ref<Group | undefined>): any;
|
|
11
13
|
export declare function getMessageTextPreview(message?: BaseMessage, showEmoji?: boolean, showAttachmentName?: boolean): string;
|
|
12
14
|
export declare function proxyImage(imageUrl: string): string;
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare function updateGetGroupMessages(groupMessageGetter: ((guid: string, quer
|
|
|
5
5
|
declare const _default: {
|
|
6
6
|
setLanguage: (lang: import('./types').Language) => void;
|
|
7
7
|
getGroupMessages: Ref<((guid: string, query: string) => Promise<any>) | undefined, ((guid: string, query: string) => Promise<any>) | undefined>;
|
|
8
|
+
loadMessageId: Ref<string | undefined, string | undefined>;
|
|
9
|
+
scrollToMessageId: Ref<string | undefined, string | undefined>;
|
|
8
10
|
onlineMode: import('vue').WritableComputedRef<import('../offline/types').OnlineStatus, import('../offline/types').OnlineStatus>;
|
|
9
11
|
onlineStatus: import('vue').ComputedRef<import('../offline/types').OnlineStatus>;
|
|
10
12
|
theme: Ref<{
|
|
@@ -428,6 +430,8 @@ declare const _default: {
|
|
|
428
430
|
getGroupOnlineCount(groupUid: string): Promise<number>;
|
|
429
431
|
getGroupMembersInfo(groupUid: string): Promise<import('./types').ParticipantInfo[]>;
|
|
430
432
|
getUserChats(): Promise<import('./types').UserChatInfo[]>;
|
|
433
|
+
searchChat(searchQuery: string, limit?: number): import('./types').SearchedItems | undefined;
|
|
434
|
+
scrollToMessage(messageId: string): void;
|
|
431
435
|
getSenderDisplayName(message: import('@cometchat/chat-sdk-javascript').BaseMessage | undefined, group?: Ref<import('@cometchat/chat-sdk-javascript').Group | undefined>): any;
|
|
432
436
|
getMessageTextPreview(message?: import('@cometchat/chat-sdk-javascript').BaseMessage, showEmoji?: boolean, showAttachmentName?: boolean): string;
|
|
433
437
|
proxyImage(imageUrl: string): string;
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseMessage, Group, MessageReceipt } from '@cometchat/chat-sdk-javascript';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
+
import { Message, Conversation } from '../offline/types';
|
|
3
4
|
export interface ChatInstallOptions {
|
|
4
5
|
environment: Environment;
|
|
5
6
|
language?: Language;
|
|
@@ -88,3 +89,7 @@ export declare enum LogSeverity {
|
|
|
88
89
|
WARN = "Warn",
|
|
89
90
|
ERROR = "Error"
|
|
90
91
|
}
|
|
92
|
+
export interface SearchedItems {
|
|
93
|
+
conversations: Conversation[];
|
|
94
|
+
messages: Message[];
|
|
95
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { MediaMessage, User } from '@cometchat/chat-sdk-javascript';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
id: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: false;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
3
8
|
text: {
|
|
4
9
|
type: StringConstructor;
|
|
5
10
|
required: true;
|
|
@@ -42,6 +47,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
42
47
|
default: null;
|
|
43
48
|
};
|
|
44
49
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
+
id: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
required: false;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
45
55
|
text: {
|
|
46
56
|
type: StringConstructor;
|
|
47
57
|
required: true;
|
|
@@ -84,6 +94,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
84
94
|
default: null;
|
|
85
95
|
};
|
|
86
96
|
}>> & Readonly<{}>, {
|
|
97
|
+
id: string;
|
|
87
98
|
message: MediaMessage;
|
|
88
99
|
src: string;
|
|
89
100
|
placeholderImage: string;
|
|
@@ -17,6 +17,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
17
17
|
type: PropType<(guid: string, query: string) => Promise<any>>;
|
|
18
18
|
required: false;
|
|
19
19
|
};
|
|
20
|
+
loadMessageId: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
required: false;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
20
25
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
26
|
groupMembersFetched: (...args: any[]) => void;
|
|
22
27
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -37,9 +42,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
37
42
|
type: PropType<(guid: string, query: string) => Promise<any>>;
|
|
38
43
|
required: false;
|
|
39
44
|
};
|
|
45
|
+
loadMessageId: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: false;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
40
50
|
}>> & Readonly<{
|
|
41
51
|
onGroupMembersFetched?: ((...args: any[]) => any) | undefined;
|
|
42
52
|
}>, {
|
|
43
53
|
hideDeletedMessages: boolean;
|
|
54
|
+
loadMessageId: string;
|
|
44
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
45
56
|
export default _default;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Conversation, ConversationPaginationMeta, Group, Message, MessagePaginationMeta, OfflineStore, PaginatedResponse } from './types';
|
|
2
|
+
import { default as Fuse } from 'fuse.js';
|
|
2
3
|
export declare class OfflineStoreLocalStorage implements OfflineStore {
|
|
3
4
|
#private;
|
|
4
5
|
storePrefix: string;
|
|
6
|
+
fuseConversations: Fuse<Conversation>;
|
|
7
|
+
fuseMessages: Fuse<Message>;
|
|
5
8
|
constructor(storePrefix?: string);
|
|
6
9
|
getGroupMessages(groupId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
|
7
10
|
getThreadMessages(parentId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
package/dist/offline/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as Fuse } from 'fuse.js';
|
|
2
2
|
export type ReqType = {
|
|
3
3
|
url: URL;
|
|
4
4
|
query: Record<string, any>;
|
|
@@ -21,17 +21,18 @@ export interface Message {
|
|
|
21
21
|
receiver: string;
|
|
22
22
|
receiverType: string;
|
|
23
23
|
sentAt: number;
|
|
24
|
-
category: MessageCategory;
|
|
25
24
|
type: string;
|
|
26
25
|
parentId?: string;
|
|
27
26
|
data?: any;
|
|
28
27
|
}
|
|
29
28
|
export interface Conversation {
|
|
30
29
|
conversationId: string;
|
|
30
|
+
conversationWith: Group;
|
|
31
31
|
updatedAt: number;
|
|
32
32
|
}
|
|
33
33
|
export interface Group {
|
|
34
34
|
guid: string;
|
|
35
|
+
name: string;
|
|
35
36
|
hasJoined: boolean | undefined;
|
|
36
37
|
}
|
|
37
38
|
export interface PaginatedResponse<T> {
|
|
@@ -39,6 +40,8 @@ export interface PaginatedResponse<T> {
|
|
|
39
40
|
total: number;
|
|
40
41
|
}
|
|
41
42
|
export interface OfflineStore {
|
|
43
|
+
fuseConversations: Fuse<Conversation>;
|
|
44
|
+
fuseMessages: Fuse<Message>;
|
|
42
45
|
getGroupMessages(groupId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
|
43
46
|
getThreadMessages(parentId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
|
|
44
47
|
getMessage(messageId: string): {
|