@bcc-code/vue-bcc-chat-ui 3.11.0 → 3.12.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/App.vue.d.ts +2 -0
- package/dist/chat/bccuiExtension.d.ts +0 -1
- package/dist/chat/cometChatPatches.d.ts +0 -1
- package/dist/chat/data.d.ts +1 -2
- package/dist/chat/environment.d.ts +0 -1
- package/dist/chat/index.d.ts +1 -2
- package/dist/chat/replyExtension.d.ts +0 -1
- package/dist/chat/replyStyle.d.ts +0 -1
- package/dist/chat/theme.d.ts +0 -1
- package/dist/chat/translations.d.ts +0 -1
- package/dist/chat/types.d.ts +0 -1
- package/dist/chat/uiKit.d.ts +3 -3
- package/dist/components/BccChatMessageBubble.vue.d.ts +3 -4
- package/dist/components/BccImageBubble.vue.d.ts +0 -1
- package/dist/components/BccReplyBox.vue.d.ts +0 -1
- package/dist/components/BccReplyPreview.vue.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/offline/cometChatAPIInterceptor.d.ts +0 -1
- package/dist/offline/cometChatWSInterceptor.d.ts +0 -1
- package/dist/offline/connectivity.d.ts +0 -1
- package/dist/offline/offlineStoreLocalStorage.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +26356 -26075
- package/package.json +14 -13
- package/src/components/BccChatMessageList.vue +24 -16
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.12.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
8
|
"files": [
|
|
@@ -34,22 +34,23 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/dompurify": "^3.0.5",
|
|
37
|
-
"@types/markdown-it": "^14.1.
|
|
37
|
+
"@types/markdown-it": "^14.1.2",
|
|
38
38
|
"@types/node": "^20.14.9",
|
|
39
|
-
"@vitejs/plugin-vue": "^5.
|
|
39
|
+
"@vitejs/plugin-vue": "^5.1.3",
|
|
40
40
|
"path": "^0.12.7",
|
|
41
|
-
"sass": "^1.77.
|
|
42
|
-
"typescript": "^5.5.
|
|
43
|
-
"vite": "^5.
|
|
44
|
-
"vite-plugin-dts": "^
|
|
45
|
-
"vue": "^3.4.
|
|
41
|
+
"sass": "^1.77.8",
|
|
42
|
+
"typescript": "^5.5.4",
|
|
43
|
+
"vite": "^5.4.2",
|
|
44
|
+
"vite-plugin-dts": "^4.1.0",
|
|
45
|
+
"vue": "^3.4.38"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@cometchat/chat-sdk-javascript": "4.0.
|
|
49
|
-
"@cometchat/chat-uikit-vue": "4.3.
|
|
50
|
-
"@cometchat/uikit-
|
|
51
|
-
"@cometchat/uikit-
|
|
52
|
-
"
|
|
48
|
+
"@cometchat/chat-sdk-javascript": "4.0.10",
|
|
49
|
+
"@cometchat/chat-uikit-vue": "4.3.16",
|
|
50
|
+
"@cometchat/uikit-elements": "4.3.15",
|
|
51
|
+
"@cometchat/uikit-resources": "4.3.11",
|
|
52
|
+
"@cometchat/uikit-shared": "4.3.17",
|
|
53
|
+
"dompurify": "^3.1.6",
|
|
53
54
|
"jwt-decode": "^4.0.0",
|
|
54
55
|
"markdown-it": "^14.1.0",
|
|
55
56
|
"panzoom": "^9.4.3"
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
provide,
|
|
9
9
|
ref,
|
|
10
10
|
watch,
|
|
11
|
-
watchEffect,
|
|
11
|
+
watchEffect,
|
|
12
12
|
} from "vue";
|
|
13
13
|
import chat from "../chat";
|
|
14
14
|
import { connect, disconnect } from "../chat/connection";
|
|
@@ -40,8 +40,8 @@ const chatInstance: Ref<ChatInstance> = ref({
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
const messageComposerConfiguration = getMessageComposerConfiguration();
|
|
43
|
-
const messageListConfiguration = getMessageListConfiguration(chatInstance);
|
|
44
|
-
const threadedMessagesConfiguration = getThreadedMessagesConfiguration();
|
|
43
|
+
const messageListConfiguration = getMessageListConfiguration(chatInstance, chatGroup);
|
|
44
|
+
const threadedMessagesConfiguration = getThreadedMessagesConfiguration(chatGroup);
|
|
45
45
|
|
|
46
46
|
provide("chatInstance", chatInstance);
|
|
47
47
|
|
|
@@ -79,10 +79,10 @@ watchEffect(() => {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
watch([loggedIn, ()=> props.chatUid, chat.initialized], async ([_loggedIn, _chatUid, _initialized]) => {
|
|
82
|
+
watch([loggedIn, () => props.chatUid, chat.initialized], async ([_loggedIn, _chatUid, _initialized]) => {
|
|
83
83
|
if (_loggedIn && _chatUid && _initialized) {
|
|
84
84
|
chatGroup.value = (await chat.getGroup(props.chatUid)) ?? undefined;
|
|
85
|
-
await chat.clearGroupChatCount(props.chatUid);
|
|
85
|
+
await chat.clearGroupChatCount(props.chatUid);
|
|
86
86
|
} else if (chatGroup.value) {
|
|
87
87
|
chatGroup.value = undefined;
|
|
88
88
|
}
|
|
@@ -101,7 +101,7 @@ onMounted(() => {
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
selector: ".cc__preview__subtitle",
|
|
104
|
-
style: {
|
|
104
|
+
style: {
|
|
105
105
|
"overflow": "hidden",
|
|
106
106
|
"display": "-webkit-box",
|
|
107
107
|
"-webkit-box-orient": "vertical",
|
|
@@ -121,6 +121,14 @@ onUnmounted(async () => {
|
|
|
121
121
|
await disconnect(componentId.value);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
+
function isChannel(): boolean {
|
|
125
|
+
return chatGroup.value?.getMetadata()?.isChannel;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function isParticipant(): boolean {
|
|
129
|
+
return chatGroup.value?.getScope() == "participant";
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
</script>
|
|
125
133
|
|
|
126
134
|
<template>
|
|
@@ -134,18 +142,14 @@ onUnmounted(async () => {
|
|
|
134
142
|
<div>CometChat: {{cometChatStatus}} <button @click="getCometChatStatus()">[refresh]</button></div>
|
|
135
143
|
</div> -->
|
|
136
144
|
<div v-if="chatGroup" class="bcc-chat-message-list">
|
|
137
|
-
<CometChatMessages
|
|
138
|
-
:hideMessageHeader="true"
|
|
139
|
-
:disableSoundForMessages="true"
|
|
145
|
+
<CometChatMessages :hideMessageHeader="true" :disableSoundForMessages="true"
|
|
140
146
|
:messageComposerConfiguration="messageComposerConfiguration"
|
|
141
147
|
:messageListConfiguration="messageListConfiguration"
|
|
142
148
|
:threadedMessagesConfiguration="threadedMessagesConfiguration"
|
|
143
|
-
:hideMessageComposer="
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<div v-if="chat.onlineStatus.value === 'offline' || !chat.connected.value" class="bcc-chat-message-composer-offline">
|
|
149
|
+
:hideMessageComposer="isParticipant() && isChannel()" :hideDetails="true" :group="chatGroup" />
|
|
150
|
+
|
|
151
|
+
<div v-if="chat.onlineStatus.value === 'offline' || !chat.connected.value"
|
|
152
|
+
class="bcc-chat-message-composer-offline">
|
|
149
153
|
<span v-if="chat.onlineStatus.value === 'offline'">Waiting for network...</span>
|
|
150
154
|
<span v-else>Connecting...</span>
|
|
151
155
|
</div>
|
|
@@ -229,11 +233,13 @@ accent900: text in avatar
|
|
|
229
233
|
|
|
230
234
|
/* 1. Wrapper for Messages component */
|
|
231
235
|
.cc-messages-wrapper {
|
|
236
|
+
|
|
232
237
|
/* 1.1 Messages component */
|
|
233
238
|
.cc-messages-wrapper__messages {
|
|
239
|
+
|
|
234
240
|
/* 1.1.1 Wrapper for Messages List */
|
|
235
241
|
.cc-messages-wrapper__messages-list {
|
|
236
|
-
height:
|
|
242
|
+
height: 100%;
|
|
237
243
|
}
|
|
238
244
|
|
|
239
245
|
/* 1.1.2 Wrapper for Messages Composer */
|
|
@@ -254,10 +260,12 @@ accent900: text in avatar
|
|
|
254
260
|
|
|
255
261
|
.cc-messagebubble-wrapper__messageoptions {
|
|
256
262
|
border-radius: 8px;
|
|
263
|
+
|
|
257
264
|
.cc-context-menu__top-menu {
|
|
258
265
|
border: 1px var(--cc__secondary) solid !important;
|
|
259
266
|
}
|
|
260
267
|
}
|
|
268
|
+
|
|
261
269
|
/* 2. Message for Messages Composer when offline */
|
|
262
270
|
.bcc-chat-message-composer-offline {
|
|
263
271
|
position: relative;
|