@bcc-code/vue-bcc-chat-ui 3.10.0 → 3.11.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/README.md +2 -2
- package/dist/chat/data.d.ts +1 -0
- package/dist/chat/index.d.ts +23 -21
- package/dist/chat/login.d.ts +2 -0
- package/dist/chat/theme.d.ts +20 -20
- package/dist/components/BccChatMessageList.vue.d.ts +8 -0
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +27050 -27523
- package/package.json +12 -11
- package/src/components/BccChatMessageList.vue +20 -5
- package/src/components/BccReplyPreview.vue +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@bcc-code/vue-bcc-chat-ui",
|
|
3
3
|
"author": "bcc-code",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.11.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
8
|
"files": [
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
20
|
"import": "./dist/vue-bcc-chat-ui.js",
|
|
21
|
-
"require": "./dist/vue-bcc-chat-ui.js"
|
|
21
|
+
"require": "./dist/vue-bcc-chat-ui.js",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
22
23
|
},
|
|
23
24
|
"./style.css": {
|
|
24
25
|
"import": "./dist/style.css",
|
|
@@ -34,20 +35,20 @@
|
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@types/dompurify": "^3.0.5",
|
|
36
37
|
"@types/markdown-it": "^14.1.1",
|
|
37
|
-
"@types/node": "^20.
|
|
38
|
+
"@types/node": "^20.14.9",
|
|
38
39
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
39
40
|
"path": "^0.12.7",
|
|
40
|
-
"sass": "^1.77.
|
|
41
|
-
"typescript": "^5.
|
|
42
|
-
"vite": "^5.2
|
|
41
|
+
"sass": "^1.77.6",
|
|
42
|
+
"typescript": "^5.5.2",
|
|
43
|
+
"vite": "^5.3.2",
|
|
43
44
|
"vite-plugin-dts": "^3.9.1",
|
|
44
|
-
"vue": "^3.4.
|
|
45
|
+
"vue": "^3.4.31"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@cometchat/chat-sdk-javascript": "4.0.
|
|
48
|
-
"@cometchat/chat-uikit-vue": "4.3.
|
|
49
|
-
"@cometchat/uikit-resources": "4.3.
|
|
50
|
-
"@cometchat/uikit-shared": "4.3.
|
|
48
|
+
"@cometchat/chat-sdk-javascript": "4.0.7",
|
|
49
|
+
"@cometchat/chat-uikit-vue": "4.3.11",
|
|
50
|
+
"@cometchat/uikit-resources": "4.3.9",
|
|
51
|
+
"@cometchat/uikit-shared": "4.3.12",
|
|
51
52
|
"dompurify": "^3.1.5",
|
|
52
53
|
"jwt-decode": "^4.0.0",
|
|
53
54
|
"markdown-it": "^14.1.0",
|
|
@@ -26,6 +26,7 @@ import { CometChatMessageEvents, MessageStatus } from "@cometchat/uikit-resource
|
|
|
26
26
|
|
|
27
27
|
const props = defineProps({
|
|
28
28
|
chatUid: { type: String, required: true },
|
|
29
|
+
senderDisplayName: { type: String, required: false}
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
const componentId = ref(
|
|
@@ -43,11 +44,25 @@ const messageListConfiguration = getMessageListConfiguration(chatInstance);
|
|
|
43
44
|
const threadedMessagesConfiguration = getThreadedMessagesConfiguration();
|
|
44
45
|
|
|
45
46
|
provide("chatInstance", chatInstance);
|
|
47
|
+
|
|
46
48
|
const onMessageSend = CometChatMessageEvents.ccMessageSent.subscribe(({ message, status }) => {
|
|
47
|
-
if (status === MessageStatus.inprogress
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (status === MessageStatus.inprogress) {
|
|
50
|
+
let metadata: any = {};
|
|
51
|
+
let scope: string | undefined = chatGroup.value?.getScope()
|
|
52
|
+
|
|
53
|
+
if (chatInstance.value.replyToMessage) {
|
|
54
|
+
metadata.replyToMessageId = chatInstance.value.replyToMessage?.getId()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (props.senderDisplayName && (scope == "moderator" || scope == "admin")) {
|
|
58
|
+
metadata.senderDisplayName = props.senderDisplayName
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (Object.keys(metadata).length === 0) {
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
(message as any).setMetadata(metadata);
|
|
51
66
|
}
|
|
52
67
|
});
|
|
53
68
|
|
|
@@ -129,7 +144,7 @@ onUnmounted(async () => {
|
|
|
129
144
|
:hideDetails="true"
|
|
130
145
|
:group="chatGroup"
|
|
131
146
|
/>
|
|
132
|
-
|
|
147
|
+
|
|
133
148
|
<div v-if="chat.onlineStatus.value === 'offline' || !chat.connected.value" class="bcc-chat-message-composer-offline">
|
|
134
149
|
<span v-if="chat.onlineStatus.value === 'offline'">Waiting for network...</span>
|
|
135
150
|
<span v-else>Connecting...</span>
|
|
@@ -3,7 +3,7 @@ import { CometChatTheme, CometChatUIKitConstants } from "@cometchat/uikit-resour
|
|
|
3
3
|
import { inject, ref } from "vue";
|
|
4
4
|
import { ReplyPreviewStyle } from "../chat/replyStyle";
|
|
5
5
|
import { BaseMessage, MediaMessage } from "@cometchat/chat-sdk-javascript";
|
|
6
|
-
import { getMessageTextPreview, proxyImage } from "../chat/data";
|
|
6
|
+
import { getMessageTextPreview, proxyImage, getSenderDisplayName } from "../chat/data";
|
|
7
7
|
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
replyToMessage: { type: BaseMessage },
|
|
@@ -62,7 +62,7 @@ function getThumbnailURL() {
|
|
|
62
62
|
</div>
|
|
63
63
|
<div class="bcc__reply_preview__content">
|
|
64
64
|
<p class="bcc__reply_preview__title" :style="titleStyle()">
|
|
65
|
-
{{ props.titlePrefix + ( props
|
|
65
|
+
{{ props.titlePrefix + ( getSenderDisplayName(props.replyToMessage) || "" ) || "Reply to ..." }}
|
|
66
66
|
</p>
|
|
67
67
|
<p class="cc__preview__subtitle" :style="subtitleStyle()">
|
|
68
68
|
{{ getMessageTextPreview(props?.replyToMessage) || "" }}
|