@bcc-code/vue-bcc-chat-ui 5.2.0 → 5.2.3

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.2.0",
5
+ "version": "5.2.3",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "files": [
@@ -17,13 +17,12 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "exports": {
19
19
  ".": {
20
- "types": "./dist/index.d.ts",
21
20
  "import": "./dist/vue-bcc-chat-ui.js",
22
21
  "require": "./dist/vue-bcc-chat-ui.js"
23
22
  },
24
23
  "./style.css": {
25
- "import": "./dist/style.css",
26
- "require": "./dist/style.css"
24
+ "import": "./dist/vue-bcc-chat-ui.css",
25
+ "require": "./dist/vue-bcc-chat-ui.css"
27
26
  }
28
27
  },
29
28
  "publishConfig": {
@@ -54,7 +53,7 @@
54
53
  "@bcc-code/design-library-vue": "^2.11.3",
55
54
  "@bcc-code/icons-vue": "^1.4.0",
56
55
  "@cometchat/chat-sdk-javascript": "4.0.10",
57
- "@cometchat/chat-uikit-vue": "4.3.22",
56
+ "@cometchat/chat-uikit-vue": "4.3.21",
58
57
  "@cometchat/uikit-elements": "4.3.20",
59
58
  "@cometchat/uikit-resources": "4.3.16",
60
59
  "@cometchat/uikit-shared": "4.3.22",
@@ -1,17 +1,17 @@
1
1
  <script setup lang="ts">
2
+ import { CloseIcon } from "@cometchat/chat-uikit-vue";
2
3
  import {
3
4
  CometChatMessageEvents,
4
5
  CometChatTheme,
5
6
  MessageStatus,
6
7
  } from "@cometchat/uikit-resources";
7
- import { CloseIcon } from "@cometchat/chat-uikit-vue";
8
8
  import {
9
9
  getCurrentInstance,
10
- ref,
11
10
  inject,
12
- Ref,
13
11
  onBeforeUnmount,
14
12
  onMounted,
13
+ ref,
14
+ Ref,
15
15
  } from "vue";
16
16
  import { ChatInstance } from "../chat/types";
17
17
  import BccAttachmentPreview from "./BccAttachmentPreview.vue";
@@ -24,7 +24,9 @@ const props = defineProps({
24
24
 
25
25
  const chatInstance = inject<Ref<ChatInstance>>("chatInstance");
26
26
  const vueInstance: any = getCurrentInstance();
27
- const msgComposerData = vueInstance?.parent?.type?.name === "CometChatMessageComposer" && vueInstance?.parent?.setupState;
27
+ const msgComposerData =
28
+ vueInstance?.parent?.type?.name === "CometChatMessageComposer" &&
29
+ vueInstance?.parent?.setupState;
28
30
 
29
31
  const { theme } = inject("theme", { theme: ref(new CometChatTheme({})) });
30
32
 
@@ -53,7 +55,7 @@ const onMessageSend = CometChatMessageEvents.ccMessageSent.subscribe(
53
55
 
54
56
  onMounted(() => {
55
57
  if (msgComposerData) {
56
- msgComposerData.inputRef.querySelector(".messageinput-input").focus()
58
+ msgComposerData.inputRef.querySelector(".messageinput-input").focus();
57
59
  if (msgComposerData.messageToBeEdited) {
58
60
  msgComposerData.showPreview = false; // This is only used for edit message preview
59
61
  msgComposerData.messageToBeEdited = null;
@@ -134,7 +134,7 @@ const openPopup = () => {
134
134
  }
135
135
 
136
136
  const onMouseDown = (event: Event) => {
137
- const userInput = document.querySelector(".messageinput-input")?.innerText;
137
+ const userInput = document.querySelector<HTMLElement>(".messageinput-input")?.innerText;
138
138
  event.preventDefault();
139
139
  event.stopPropagation();
140
140
  if (userInput) {
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { UpdateIcon } from '@bcc-code/icons-vue';
3
- import { inject, Ref } from 'vue';
4
- import { ChatInstance } from '../chat/types';
5
3
  import { CometChatUIKitLoginListener } from '@cometchat/uikit-shared';
4
+ import { inject, Ref } from 'vue';
6
5
  import chat from '../chat';
7
- import { getCurrentEnvironment } from '../chat/environment';
8
6
  import { getAccessToken } from '../chat/accessToken';
7
+ import { getCurrentEnvironment } from '../chat/environment';
8
+ import { ChatInstance } from '../chat/types';
9
9
 
10
10
  const chatInstance = inject<Ref<ChatInstance>>("chatInstance");
11
11
 
@@ -39,7 +39,7 @@ async function redirectToScheduledMessagesChat() {
39
39
  chatInstance.value.captionedAttachment = null
40
40
  chatInstance.value.replyToMessage = null
41
41
  chatInstance.value.showScheduledMessagesChat = true
42
- chatInstance.value.userInput = document.querySelector(".messageinput-input")?.innerText;
42
+ chatInstance.value.userInput = document.querySelector<HTMLElement>(".messageinput-input")?.innerText ?? null;
43
43
  }
44
44
  }
45
45
  }
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { localize } from "@cometchat/uikit-resources";
3
2
  import { SendIcon } from "@cometchat/chat-uikit-vue";
3
+ import { localize } from "@cometchat/uikit-resources";
4
4
  import { getCurrentInstance, inject, onBeforeUnmount, onMounted, Ref, ref, watchEffect } from "vue";
5
- import { ChatInstance } from '../chat/types';
6
5
  import { rescheduleMessage, sendScheduledMessage } from '../chat/scheduledMessage';
6
+ import { ChatInstance } from '../chat/types';
7
7
  import BccScheduledMessageModal from './BccScheduledMessageModal.vue';
8
8
 
9
9
  const props = defineProps({
@@ -65,7 +65,7 @@ watchEffect(async () => {
65
65
 
66
66
 
67
67
  function openModal() {
68
- const userInput = document.querySelector(".messageinput-input")?.innerText;
68
+ const userInput = document.querySelector<HTMLElement>(".messageinput-input")?.innerText;
69
69
  if ((userInput && userInput !== "") || msgComposerProps.headerView !== undefined) {
70
70
  showModal.value = true;
71
71
  }