@bcc-code/vue-bcc-chat-ui 1.1.6 → 1.2.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/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": "1.1.6",
5
+ "version": "1.2.0",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "files": [
@@ -8,7 +8,7 @@ import {
8
8
  ImageBubbleStyle,
9
9
  MessageBubbleAlignment,
10
10
  } from "@cometchat/chat-uikit-vue";
11
- import { MessageListConfiguration } from "@cometchat/uikit-shared";
11
+ import { MessageListConfiguration, MessageComposerConfiguration } from "@cometchat/uikit-shared";
12
12
  import { Group } from '@cometchat/chat-sdk-javascript';
13
13
  import { watch, Ref } from 'vue';
14
14
  //import { ThreadedMessagesStyle } from '@cometchat/uikit-shared';
@@ -31,6 +31,13 @@ watch(chat.connection.connected, async () => {
31
31
  }
32
32
  });
33
33
 
34
+ watch(() => props.chatUid, async () => {
35
+ console.log(props.chatUid + ' Changed');
36
+ if (chat.connection.connected.value) {
37
+ await loadData();
38
+ }
39
+ });
40
+
34
41
  onUnmounted(async () => {
35
42
  await disconnect();
36
43
  });
@@ -56,6 +63,11 @@ const loadData = async () => {
56
63
  };
57
64
 
58
65
  const messageListConfiguration:Ref<any> = ref(null);
66
+ const messageComposerConfiguration:Ref<any> = ref(new MessageComposerConfiguration({
67
+ hideLiveReaction: true,
68
+ hideVoiceRecording: true
69
+ }));
70
+
59
71
  let templatesInitialized = false;
60
72
  const initTemplates = () => {
61
73
  if (templatesInitialized) {
@@ -91,6 +103,7 @@ const initTemplates = () => {
91
103
  };
92
104
 
93
105
  messageListConfiguration.value = new MessageListConfiguration({
106
+
94
107
  templates: definedTemplates,
95
108
  });
96
109
  }
@@ -99,7 +112,7 @@ const initTemplates = () => {
99
112
 
100
113
  <template>
101
114
  <div v-if="chatGroup" class="bcc-chat-message-list">
102
- <CometChatMessages v-if="chatGroup" :hideMessageHeader="true" :messageListConfiguration="messageListConfiguration" :hideMessageComposer="false" :hideDetails="true" :group="chatGroup"></CometChatMessages>
115
+ <CometChatMessages v-if="chatGroup" :hideMessageHeader="true" :messageComposerConfiguration="messageComposerConfiguration" :messageListConfiguration="messageListConfiguration" :hideMessageComposer="false" :hideDetails="true" :group="chatGroup"></CometChatMessages>
103
116
  </div>
104
117
  </template>
105
118