@bcc-code/vue-bcc-chat-ui 5.6.5 → 5.7.1

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": "5.6.5",
5
+ "version": "5.7.1",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "files": [
@@ -32,6 +32,7 @@ const props = defineProps({
32
32
  required: false,
33
33
  },
34
34
  loadMessageId: { type: String, required: false, default: "" },
35
+ displayNoMessagesText: { type: Boolean, required: false, default: true },
35
36
  });
36
37
 
37
38
  const componentId = ref(
@@ -42,7 +43,7 @@ const chatGroupNotFound = ref(false);
42
43
 
43
44
  const isChatMessagesEmpty = ref(false);
44
45
 
45
- const emit = defineEmits(['groupMembersFetched']);
46
+ const emit = defineEmits(['groupMembersFetched', 'chatEmpty']);
46
47
  const groupMembers = ref<ParticipantInfo[]>();
47
48
 
48
49
  const chatInstance: Ref<ChatInstance> = ref({
@@ -136,6 +137,7 @@ watch([loggedIn, chat.onlineStatus, () => props.chatUid, chat.initialized, () =>
136
137
  affix: 'prepend'
137
138
  }).total === 0) {
138
139
  isChatMessagesEmpty.value = true;
140
+ emit('chatEmpty');
139
141
  } else {
140
142
  isChatMessagesEmpty.value = false;
141
143
  }
@@ -294,8 +296,8 @@ function closeScheduledMessage() {
294
296
  <div v-else class="bcc-chat-message-list-offline">
295
297
  <span>Loading...</span>
296
298
  </div>
297
- <div v-if="isChatMessagesEmpty && chatGroup" class="bcc-chat-message-list-offline pointer-events-none">
298
- <span>No messages have been sent yet</span>
299
+ <div v-if="isChatMessagesEmpty && chatGroup && displayNoMessagesText" class="bcc-chat-message-list-offline pointer-events-none">
300
+ <span>No messages have been sent yet</span>
299
301
  </div>
300
302
  </div>
301
303
  </template>