@webitel/ui-chats 0.1.21 → 0.1.23

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.
Files changed (57) hide show
  1. package/package.json +8 -3
  2. package/src/index.ts +1 -0
  3. package/src/locale/en/en.ts +4 -3
  4. package/src/locale/es/es.ts +4 -3
  5. package/src/locale/index.ts +3 -3
  6. package/src/locale/kz/kz.ts +4 -3
  7. package/src/locale/pl/pl.ts +4 -3
  8. package/src/locale/ro/ro.ts +4 -3
  9. package/src/locale/ru/ru.ts +4 -3
  10. package/src/locale/uk/uk.ts +4 -3
  11. package/src/locale/uz/uz.ts +4 -3
  12. package/src/locale/vi/vi.ts +4 -3
  13. package/src/ui/chat-footer/components/chat-footer-wrapper.vue +1 -1
  14. package/src/ui/chat-footer/modules/user-input/components/actions/emoji-picker-action.vue +7 -7
  15. package/src/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue +7 -7
  16. package/src/ui/chat-footer/modules/user-input/components/chat-text-field.vue +20 -16
  17. package/src/ui/chat-footer/modules/user-input/enums/ChatAction.enum.ts +6 -6
  18. package/src/ui/index.ts +2 -2
  19. package/src/ui/messaging/components/chat-date-divider.vue +8 -8
  20. package/src/ui/messaging/components/chat-observer.vue +1 -1
  21. package/src/ui/messaging/components/scroll-to-bottom-btn.vue +1 -1
  22. package/src/ui/messaging/components/the-messages-container.vue +37 -37
  23. package/src/ui/messaging/composables/useChatScroll.ts +7 -7
  24. package/src/ui/messaging/composables/useDropzoneHandlers.ts +1 -1
  25. package/src/ui/messaging/modules/message/components/chat-message.vue +12 -7
  26. package/src/ui/messaging/modules/message/components/details/chat-message-blocked-error.vue +1 -1
  27. package/src/ui/messaging/modules/message/components/details/chat-message-document.vue +6 -6
  28. package/src/ui/messaging/modules/message/components/details/chat-message-player.vue +2 -2
  29. package/src/ui/messaging/modules/message/components/details/chat-message-size-exceeded-error.vue +50 -0
  30. package/src/ui/messaging/modules/message/components/details/chat-message-text.vue +10 -10
  31. package/src/ui/messaging/modules/message/components/details/chat-message-time.vue +8 -8
  32. package/src/ui/messaging/modules/message/composables/useChatMessage.ts +4 -4
  33. package/src/ui/messaging/modules/message/enums/MessageAction.enum.ts +2 -2
  34. package/src/ui/the-chat-container.vue +2 -2
  35. package/src/ui/utils/ResultCallbacks.types.ts +1 -1
  36. package/src/ui/utils/emitter.ts +2 -2
  37. package/types/locale/en/en.d.ts +2 -1
  38. package/types/locale/es/es.d.ts +2 -1
  39. package/types/locale/index.d.ts +21 -12
  40. package/types/locale/kz/kz.d.ts +2 -1
  41. package/types/locale/pl/pl.d.ts +2 -1
  42. package/types/locale/ro/ro.d.ts +2 -1
  43. package/types/locale/ru/ru.d.ts +2 -1
  44. package/types/locale/uk/uk.d.ts +2 -1
  45. package/types/locale/uz/uz.d.ts +2 -1
  46. package/types/locale/vi/vi.d.ts +2 -1
  47. package/types/ui/chat-footer/components/chat-footer-wrapper.vue.d.ts +1 -1
  48. package/types/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue.d.ts +1 -1
  49. package/types/ui/chat-footer/modules/user-input/components/chat-text-field.vue.d.ts +2 -2
  50. package/types/ui/messaging/components/the-messages-container.vue.d.ts +1 -1
  51. package/types/ui/messaging/composables/useChatScroll.d.ts +2 -2
  52. package/types/ui/messaging/composables/useDropzoneHandlers.d.ts +1 -1
  53. package/types/ui/messaging/modules/message/components/chat-message.vue.d.ts +2 -2
  54. package/types/ui/messaging/modules/message/components/details/chat-message-document.vue.d.ts +1 -1
  55. package/types/ui/messaging/modules/message/components/details/chat-message-size-exceeded-error.vue.d.ts +8 -0
  56. package/types/ui/messaging/modules/message/composables/useChatMessage.d.ts +2 -2
  57. package/types/ui/utils/emitter.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-chats",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Reusable Webitel Frontend Code for Chats UI",
5
5
  "workspaces": [
6
6
  "../../",
@@ -12,7 +12,12 @@
12
12
  "make-all": "npm version patch --git-tag-version false && (npm run lint:biome || true) && (npm run build:types || true) && npm run utils:publish",
13
13
  "build": "(npm run build:types || true)",
14
14
  "build:types": "vue-tsc -p ./tsconfig.build.json",
15
- "lint:biome": "biome check --write",
15
+ "biome:ci:gh": "biome ci ./src --reporter=github",
16
+ "test:unit": "node -e \"process.exit(0)\"",
17
+ "lint": "biome ci ./src",
18
+ "test": "npm run test:unit",
19
+ "ci:check": "npm run biome:ci:gh && npm run test:unit",
20
+ "lint:biome": "biome check --write ./src",
16
21
  "utils:publish": "npm publish --access public --tag ${NPM_TAG:-latest}"
17
22
  },
18
23
  "dependencies": {
@@ -20,7 +25,7 @@
20
25
  "insert-text-at-cursor": "^0.3.0"
21
26
  },
22
27
  "devDependencies": {
23
- "@biomejs/biome": "2.3.8",
28
+ "@biomejs/biome": "2.4.10",
24
29
  "@types/node": "^24.10.0",
25
30
  "@vitejs/plugin-vue": "^6.0.1",
26
31
  "@vue/tsconfig": "^0.8.1",
package/src/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  import './css/main.css';
2
+
2
3
  export { setConfig } from './config/config';
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "File quarantined or blocked",
6
- textAreaPlaceholder: "Write a message...",
5
+ chatsFileBlocked: 'File quarantined or blocked',
6
+ chatsIncorrectFileSize: 'Incorrect file size',
7
+ textAreaPlaceholder: 'Write a message...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Archivo en cuarentena o bloqueado",
6
- textAreaPlaceholder: "Escribe un mensaje...",
5
+ chatsFileBlocked: 'Archivo en cuarentena o bloqueado',
6
+ chatsIncorrectFileSize: 'Tamaño de archivo incorrecto',
7
+ textAreaPlaceholder: 'Escribe un mensaje...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,10 +1,10 @@
1
1
  import en from './en/en';
2
- import uk from './uk/uk';
3
- import ru from './ru/ru';
4
2
  import es from './es/es';
5
3
  import kz from './kz/kz';
6
4
  import pl from './pl/pl';
7
5
  import ro from './ro/ro';
6
+ import ru from './ru/ru';
7
+ import uk from './uk/uk';
8
8
  import uz from './uz/uz';
9
9
  import vi from './vi/vi';
10
10
 
@@ -20,4 +20,4 @@ export const messages = {
20
20
  vi,
21
21
  };
22
22
 
23
- export { en, uk, ru, es, kz, pl, ro, uz, vi };
23
+ export { en, es, kz, pl, ro, ru, uk, uz, vi };
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Файл карантинде немесе бұғатталған",
6
- textAreaPlaceholder: "Хабарлама жаз...",
5
+ chatsFileBlocked: 'Файл карантинде немесе бұғатталған',
6
+ chatsIncorrectFileSize: 'Файл өлшемі қате',
7
+ textAreaPlaceholder: 'Хабарлама жаз...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Plik w kwarantannie lub zablokowany",
6
- textAreaPlaceholder: "Napisz wiadomość...",
5
+ chatsFileBlocked: 'Plik w kwarantannie lub zablokowany',
6
+ chatsIncorrectFileSize: 'Nieprawidłowy rozmiar pliku',
7
+ textAreaPlaceholder: 'Napisz wiadomość...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Fişier în carantină sau blocat",
6
- textAreaPlaceholder: "Scrie un mesaj...",
5
+ chatsFileBlocked: 'Fişier în carantină sau blocat',
6
+ chatsIncorrectFileSize: 'Dimensiune fișier incorectă',
7
+ textAreaPlaceholder: 'Scrie un mesaj...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Файл в карантине или заблокирован",
6
- textAreaPlaceholder: "Напишите сообщение...",
5
+ chatsFileBlocked: 'Файл в карантине или заблокирован',
6
+ chatsIncorrectFileSize: 'Неверный размер файла',
7
+ textAreaPlaceholder: 'Напишите сообщение...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Файл в карантині чи заблокований",
6
- textAreaPlaceholder: "Напишіть повідомлення...",
5
+ chatsFileBlocked: 'Файл в карантині чи заблокований',
6
+ chatsIncorrectFileSize: 'Неправильний розмір файлу',
7
+ textAreaPlaceholder: 'Напишіть повідомлення...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Fayl karantinda yoki bloklangan",
6
- textAreaPlaceholder: "Xabar yozing...",
5
+ chatsFileBlocked: 'Fayl karantinda yoki bloklangan',
6
+ chatsIncorrectFileSize: "Fayl hajmi noto'g'ri",
7
+ textAreaPlaceholder: 'Xabar yozing...',
7
8
  },
8
9
  },
9
10
  },
@@ -1,9 +1,10 @@
1
1
  export default {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
- chatsFileBlocked: "Tệp bị cách ly hoặc bị chặn",
6
- textAreaPlaceholder: "Viết tin nhắn...",
5
+ chatsFileBlocked: 'Tệp bị cách ly hoặc bị chặn',
6
+ chatsIncorrectFileSize: 'Kích thước tệp không hợp lệ',
7
+ textAreaPlaceholder: 'Viết tin nhắn...',
7
8
  },
8
9
  },
9
10
  },
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script setup lang="ts">
8
8
  const slots = defineSlots<{
9
- default: () => any;
9
+ default: () => unknown;
10
10
  }>();
11
11
  </script>
12
12
 
@@ -7,15 +7,15 @@
7
7
  </template>
8
8
 
9
9
  <script setup lang="ts">
10
- import { WtChatEmoji } from "@webitel/ui-sdk/components";
11
- import { ComponentSize } from "@webitel/ui-sdk/enums";
12
- import type { Emitter } from "mitt";
13
- import { inject } from "vue";
10
+ import { WtChatEmoji } from '@webitel/ui-sdk/components';
11
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
12
+ import type { Emitter } from 'mitt';
13
+ import { inject } from 'vue';
14
14
 
15
- import type { UiChatsEmitterEvents } from "../../../../../utils/emitter";
15
+ import type { UiChatsEmitterEvents } from '../../../../../utils/emitter';
16
16
 
17
- const size = inject<ComponentSize>("size");
18
- const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>("uiChatsEmitter");
17
+ const size = inject<ComponentSize>('size');
18
+ const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>('uiChatsEmitter');
19
19
  </script>
20
20
 
21
21
  <style lang="scss" scoped>
@@ -17,15 +17,15 @@
17
17
  </template>
18
18
 
19
19
  <script setup lang="ts">
20
- import { ComponentSize } from "@webitel/ui-sdk/enums";
21
- import { computed, inject } from "vue";
20
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
21
+ import { computed, inject } from 'vue';
22
22
 
23
- import { ChatAction, type SharedActionSlots } from "../enums/ChatAction.enum";
24
- import AttachFilesAction from "./actions/attach-files-action.vue";
25
- import EmojiPickerAction from "./actions/emoji-picker-action.vue";
26
- import SendMessageAction from "./actions/send-message-action.vue";
23
+ import { ChatAction, type SharedActionSlots } from '../enums/ChatAction.enum';
24
+ import AttachFilesAction from './actions/attach-files-action.vue';
25
+ import EmojiPickerAction from './actions/emoji-picker-action.vue';
26
+ import SendMessageAction from './actions/send-message-action.vue';
27
27
 
28
- const size = inject<ComponentSize>("size");
28
+ const size = inject<ComponentSize>('size');
29
29
 
30
30
  const props = defineProps<{
31
31
  actions: ChatAction[];
@@ -12,36 +12,38 @@
12
12
  </template>
13
13
 
14
14
  <script setup lang="ts">
15
- import { WtTextarea } from "@webitel/ui-sdk/components";
16
- import { ComponentSize } from "@webitel/ui-sdk/enums";
17
- import insertTextAtCursor from "insert-text-at-cursor";
18
- import type { Emitter } from "mitt";
19
- import { computed, inject, type MaybeRef, useTemplateRef } from "vue";
20
- import { useI18n } from "vue-i18n";
15
+ import { WtTextarea } from '@webitel/ui-sdk/components';
16
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
17
+ import insertTextAtCursor from 'insert-text-at-cursor';
18
+ import type { Emitter } from 'mitt';
19
+ import { computed, inject, type MaybeRef, useTemplateRef } from 'vue';
20
+ import { useI18n } from 'vue-i18n';
21
21
 
22
- import type { UiChatsEmitterEvents } from "../../../../utils/emitter";
22
+ import type { UiChatsEmitterEvents } from '../../../../utils/emitter';
23
23
 
24
24
  const { t } = useI18n();
25
25
 
26
- const textModel = defineModel<MaybeRef<string>>("text", {
26
+ const textModel = defineModel<MaybeRef<string>>('text', {
27
27
  required: true,
28
28
  });
29
29
 
30
- const size = inject<ComponentSize>("size");
31
- const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>("uiChatsEmitter");
30
+ const size = inject<ComponentSize>('size');
31
+ const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>('uiChatsEmitter');
32
32
 
33
- uiChatsEmitter!.on("insertAtCursor", ({ text }) => insertAtCursor(text));
34
- uiChatsEmitter!.on("focusOnTextField", focus);
33
+ if (uiChatsEmitter) {
34
+ uiChatsEmitter.on('insertAtCursor', ({ text }) => insertAtCursor(text));
35
+ uiChatsEmitter.on('focusOnTextField', focus);
36
+ }
35
37
 
36
38
  const emit = defineEmits<{
37
39
  enter: [];
38
40
  }>();
39
41
 
40
42
  const chatTextFieldInputRef =
41
- useTemplateRef<typeof WtTextarea>("chatTextFieldInput");
43
+ useTemplateRef<typeof WtTextarea>('chatTextFieldInput');
42
44
 
43
45
  const textareaEl = computed(() =>
44
- chatTextFieldInputRef.value?.$el.querySelector("textarea"),
46
+ chatTextFieldInputRef.value?.$el.querySelector('textarea'),
45
47
  );
46
48
 
47
49
  function send(text: string) {
@@ -49,12 +51,14 @@ function send(text: string) {
49
51
  }
50
52
 
51
53
  function focus() {
52
- textareaEl.value!.focus();
54
+ textareaEl.value?.focus();
53
55
  }
54
56
 
55
57
  function insertAtCursor(text: string) {
56
58
  focus();
57
- insertTextAtCursor(textareaEl.value!, text);
59
+ const textarea = textareaEl.value;
60
+ if (!textarea) return;
61
+ insertTextAtCursor(textarea, text);
58
62
  }
59
63
  </script>
60
64
 
@@ -1,13 +1,13 @@
1
1
  export const ChatAction = {
2
- SendMessage: "sendMessage",
3
- AttachFiles: "attachFiles",
4
- EmojiPicker: "emojiPicker",
5
- QuickReplies: "quickReplies",
6
- LoadNextMessages: "loadNextMessages",
2
+ SendMessage: 'sendMessage',
3
+ AttachFiles: 'attachFiles',
4
+ EmojiPicker: 'emojiPicker',
5
+ QuickReplies: 'quickReplies',
6
+ LoadNextMessages: 'loadNextMessages',
7
7
  } as const;
8
8
 
9
9
  export type ChatAction = (typeof ChatAction)[keyof typeof ChatAction];
10
10
 
11
11
  export type SharedActionSlots = {
12
- [key in `action:${ChatAction}`]?: () => any;
12
+ [key in `action:${ChatAction}`]?: () => unknown;
13
13
  };
package/src/ui/index.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { ChatAction } from './chat-footer/modules/user-input/enums/ChatAction.enum';
2
+ export { useChatMessageFile } from './messaging/modules/message/composables/useChatMessageFile';
2
3
  export { MessageAction } from './messaging/modules/message/enums/MessageAction.enum';
3
4
  export type {
4
- ChatMessageType,
5
5
  ChatMessageFile,
6
+ ChatMessageType,
6
7
  } from './messaging/types/ChatMessage.types';
7
8
  export { default as ChatContainer } from './the-chat-container.vue';
8
- export { useChatMessageFile } from './messaging/modules/message/composables/useChatMessageFile';
@@ -8,22 +8,22 @@
8
8
  setup
9
9
  lang="ts"
10
10
  >
11
- import { FormatDateMode } from "@webitel/ui-sdk/enums";
12
- import { formatDate } from "@webitel/ui-sdk/utils";
13
- import { computed } from "vue";
14
- import { useI18n } from "vue-i18n";
11
+ import { FormatDateMode } from '@webitel/ui-sdk/enums';
12
+ import { formatDate } from '@webitel/ui-sdk/utils';
13
+ import { computed } from 'vue';
14
+ import { useI18n } from 'vue-i18n';
15
15
 
16
16
  const props = defineProps<{
17
- date: number | string;
17
+ date: number | string;
18
18
  }>();
19
19
 
20
20
  const { t } = useI18n();
21
21
 
22
22
  const formattedDate = computed<Date>(() => {
23
- const chatDate = formatDate(+props.date, FormatDateMode.DATE);
24
- const today = formatDate(Date.now(), FormatDateMode.DATE);
23
+ const chatDate = formatDate(+props.date, FormatDateMode.DATE);
24
+ const today = formatDate(Date.now(), FormatDateMode.DATE);
25
25
 
26
- return chatDate === today ? t("reusable.today") : chatDate;
26
+ return chatDate === today ? t('reusable.today') : chatDate;
27
27
  });
28
28
  </script>
29
29
 
@@ -9,7 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script setup lang="ts">
12
- import { ChatAction } from "../../chat-footer/modules/user-input/enums/ChatAction.enum";
12
+ import { ChatAction } from '../../chat-footer/modules/user-input/enums/ChatAction.enum';
13
13
 
14
14
  const props = withDefaults(
15
15
  defineProps<{
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script setup lang="ts">
20
- import { defineEmits } from "vue";
20
+ import { defineEmits } from 'vue';
21
21
 
22
22
  const props = withDefaults(
23
23
  defineProps<{
@@ -43,7 +43,7 @@
43
43
  setup
44
44
  lang="ts"
45
45
  >
46
- import type { Emitter } from "mitt";
46
+ import type { Emitter } from 'mitt';
47
47
  import {
48
48
  computed,
49
49
  defineProps,
@@ -51,68 +51,68 @@ import {
51
51
  nextTick,
52
52
  onMounted,
53
53
  useTemplateRef,
54
- } from "vue";
54
+ } from 'vue';
55
55
 
56
- import { ChatAction } from "../../chat-footer/modules/user-input/enums/ChatAction.enum";
57
- import type { UiChatsEmitterEvents } from "../../utils/emitter";
58
- import { useChatScroll } from "../composables/useChatScroll";
59
- import ChatMessage from "../modules/message/components/chat-message.vue";
60
- import { useChatMessages } from "../modules/message/composables/useChatMessage";
61
- import { MessageAction } from "../modules/message/enums/MessageAction.enum";
62
- import type { ChatMessageType } from "../types/ChatMessage.types";
63
- import ChatDateDivider from "./chat-date-divider.vue";
64
- import ChatObserver from "./chat-observer.vue";
65
- import ScrollToBottomBtn from "./scroll-to-bottom-btn.vue";
56
+ import { ChatAction } from '../../chat-footer/modules/user-input/enums/ChatAction.enum';
57
+ import type { UiChatsEmitterEvents } from '../../utils/emitter';
58
+ import { useChatScroll } from '../composables/useChatScroll';
59
+ import ChatMessage from '../modules/message/components/chat-message.vue';
60
+ import { useChatMessages } from '../modules/message/composables/useChatMessage';
61
+ import { MessageAction } from '../modules/message/enums/MessageAction.enum';
62
+ import type { ChatMessageType } from '../types/ChatMessage.types';
63
+ import ChatDateDivider from './chat-date-divider.vue';
64
+ import ChatObserver from './chat-observer.vue';
65
+ import ScrollToBottomBtn from './scroll-to-bottom-btn.vue';
66
66
 
67
- const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>("uiChatsEmitter");
67
+ const uiChatsEmitter = inject<Emitter<UiChatsEmitterEvents>>('uiChatsEmitter');
68
68
 
69
69
  const props = withDefaults(
70
- defineProps<{
71
- messages: ChatMessageType[];
72
- next?: boolean;
73
- isLoading?: boolean;
74
- withoutAvatars?: boolean;
75
- }>(),
76
- {
77
- next: false,
78
- isLoading: false,
79
- withoutAvatars: false,
80
- },
70
+ defineProps<{
71
+ messages: ChatMessageType[];
72
+ next?: boolean;
73
+ isLoading?: boolean;
74
+ withoutAvatars?: boolean;
75
+ }>(),
76
+ {
77
+ next: false,
78
+ isLoading: false,
79
+ withoutAvatars: false,
80
+ },
81
81
  );
82
82
 
83
83
  const emit = defineEmits<(e: typeof ChatAction.LoadNextMessages) => void>();
84
84
 
85
- const messagesContainer = useTemplateRef("messages-container");
85
+ const messagesContainer = useTemplateRef('messages-container');
86
86
 
87
87
  const { showAvatar, showChatDate } = useChatMessages(
88
88
  computed(() => props.messages),
89
89
  ); // props values reactivity https://stackoverflow.com/questions/72408463/use-props-in-composables-vue3 @author ye.pohranichna
90
90
 
91
91
  const {
92
- showScrollToBottomBtn,
93
- newUnseenMessagesCount,
94
- scrollToBottom,
95
- handleChatScroll,
96
- handleChatResize,
92
+ showScrollToBottomBtn,
93
+ newUnseenMessagesCount,
94
+ scrollToBottom,
95
+ handleChatScroll,
96
+ handleChatResize,
97
97
  } = useChatScroll(
98
98
  messagesContainer,
99
99
  computed(() => props.messages), // props values reactivity https://stackoverflow.com/questions/72408463/use-props-in-composables-vue3 @author ye.pohranichna
100
100
  );
101
101
 
102
102
  function focusOnInput() {
103
- uiChatsEmitter?.on("focusOnTextField", focus);
103
+ uiChatsEmitter?.on('focusOnTextField', focus);
104
104
  }
105
105
 
106
106
  function clickOnImage(message: ChatMessageType) {
107
- uiChatsEmitter!.emit("clickChatMessageImage", message);
107
+ uiChatsEmitter?.emit('clickChatMessageImage', message);
108
108
  }
109
109
 
110
110
  onMounted(async () => {
111
- /* TODO: add loader on all chat(in the-chat-container?) and remove timeout after that */
112
- await nextTick();
113
- setTimeout(() => {
114
- scrollToBottom();
115
- }, 500);
111
+ /* TODO: add loader on all chat(in the-chat-container?) and remove timeout after that */
112
+ await nextTick();
113
+ setTimeout(() => {
114
+ scrollToBottom();
115
+ }, 500);
116
116
  });
117
117
  </script>
118
118
 
@@ -1,7 +1,7 @@
1
- import { useScroll } from "@vueuse/core";
2
- import { type ComputedRef, computed, type Ref, ref, watch } from "vue";
1
+ import { useScroll } from '@vueuse/core';
2
+ import { type ComputedRef, computed, type Ref, ref, watch } from 'vue';
3
3
 
4
- import type { ChatMessageType } from "../types/ChatMessage.types";
4
+ import type { ChatMessageType } from '../types/ChatMessage.types';
5
5
 
6
6
  export const useChatScroll = (
7
7
  element: Ref<HTMLElement | null> = null,
@@ -64,16 +64,16 @@ export const useChatScroll = (
64
64
 
65
65
  const handleBtnAfterNewMessage = () => {
66
66
  if (arrivedState.bottom || isLastMessageIsMy.value) {
67
- scrollToBottom("smooth");
67
+ scrollToBottom('smooth');
68
68
  } else {
69
69
  newUnseenMessagesCount.value += 1;
70
70
  }
71
71
  };
72
72
 
73
- const scrollToBottom = (behavior: ScrollBehavior = "instant") => {
73
+ const scrollToBottom = (behavior: ScrollBehavior = 'instant') => {
74
74
  element?.value.scrollTo({
75
75
  top: element?.value.scrollHeight,
76
- behavior: behavior === "instant" ? "auto" : behavior,
76
+ behavior: behavior === 'instant' ? 'auto' : behavior,
77
77
  });
78
78
 
79
79
  newUnseenMessagesCount.value = 0;
@@ -87,7 +87,7 @@ export const useChatScroll = (
87
87
  if (newMessageReceived) handleBtnAfterNewMessage();
88
88
  },
89
89
  {
90
- flush: "post",
90
+ flush: 'post',
91
91
  },
92
92
  );
93
93
 
@@ -1,4 +1,4 @@
1
- import { Ref, ref } from "vue";
1
+ import { type Ref, ref } from 'vue';
2
2
 
3
3
  interface UseDropzoneHandlers {
4
4
  isDropzoneVisible: Ref<boolean>;
@@ -15,14 +15,18 @@
15
15
  >
16
16
  <wt-avatar
17
17
  v-if="props.showAvatar"
18
- :username="getClientUsername"
19
- :size="size"
20
- :src="ComponentSize.SM || size"
18
+ :username="username"
19
+ :size="ComponentSize.SM || size"
21
20
  :bot="isBot"
22
21
  />
23
22
  </div>
24
23
  <!-- click.stop prevents focus on textarea and allows to select the message-new text -->
25
24
  <message-blocked-error v-if="message.file?.malware" @click.stop />
25
+ <message-size-exceeded-error
26
+ v-else-if="isFileSizeExceeded"
27
+ :self-side="isSelfSide"
28
+ @click.stop
29
+ />
26
30
  <div v-else @click.stop>
27
31
  <message-player
28
32
  v-if="media"
@@ -66,6 +70,7 @@ import MessageBlockedError from './details/chat-message-blocked-error.vue';
66
70
  import MessageDocument from './details/chat-message-document.vue';
67
71
  import MessageImage from './details/chat-message-image.vue';
68
72
  import MessagePlayer from './details/chat-message-player.vue';
73
+ import MessageSizeExceededError from './details/chat-message-size-exceeded-error.vue';
69
74
  import MessageText from './details/chat-message-text.vue';
70
75
  import MessageTime from './details/chat-message-time.vue';
71
76
 
@@ -92,15 +97,15 @@ const size = inject<ComponentSize>('size');
92
97
 
93
98
  const { image, media, document } = useChatMessageFile(props.message.file);
94
99
 
100
+ const isFileSizeExceeded = computed<boolean>(
101
+ () => !!props.message.file && !props.message.file?.size,
102
+ );
103
+
95
104
  const isSelfSide = computed<boolean>(
96
105
  () => props.message.member?.self || props.message.member?.type === 'webitel',
97
106
  );
98
107
  const isBot = computed<boolean>(() => props.message.member?.type === 'bot');
99
108
 
100
- const getClientUsername = computed<string>(() => {
101
- return !isSelfSide.value ? props.username : ''; // need to show username avatar only for client
102
- });
103
-
104
109
  function handlePlayerInitialize(player) {
105
110
  emit(MessageAction.InitializedPlayer, {
106
111
  player,
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  </template>
12
12
  <script setup>
13
- import { useI18n } from "vue-i18n";
13
+ import { useI18n } from 'vue-i18n';
14
14
 
15
15
  const { t } = useI18n();
16
16
  </script>
@@ -19,10 +19,10 @@
19
19
  </template>
20
20
 
21
21
  <script setup lang="ts">
22
- import { prettifyFileSize } from "@webitel/ui-sdk/scripts";
23
- import { computed, defineProps } from "vue";
22
+ import { prettifyFileSize } from '@webitel/ui-sdk/scripts';
23
+ import { computed, defineProps } from 'vue';
24
24
 
25
- import type { ChatMessageFile } from "../../../../types/ChatMessage.types";
25
+ import type { ChatMessageFile } from '../../../../types/ChatMessage.types';
26
26
 
27
27
  const props = withDefaults(
28
28
  defineProps<{
@@ -34,15 +34,15 @@ const props = withDefaults(
34
34
  },
35
35
  );
36
36
  const documentSize = computed(() => {
37
- if (!props.file) return "";
37
+ if (!props.file) return '';
38
38
  return prettifyFileSize(props.file.size);
39
39
  });
40
40
 
41
41
  function downloadDocument() {
42
42
  if (!props.file) return;
43
- const a = document.createElement("a");
43
+ const a = document.createElement('a');
44
44
  a.href = props.file.url;
45
- a.target = "_blank";
45
+ a.target = '_blank';
46
46
  a.download = props.file.name;
47
47
  a.click();
48
48
  }
@@ -26,9 +26,9 @@
26
26
  </template>
27
27
 
28
28
  <script setup lang="ts">
29
- import { computed, defineEmits, defineProps } from 'vue';
30
- import { WtVidstackPlayer, WtPlayer } from '@webitel/ui-sdk/components';
29
+ import { WtPlayer, WtVidstackPlayer } from '@webitel/ui-sdk/components';
31
30
  import { ComponentSize } from '@webitel/ui-sdk/enums';
31
+ import { computed, defineEmits, defineProps } from 'vue';
32
32
 
33
33
  import type { ChatMessageFile } from '../../../../types/ChatMessage.types';
34
34
 
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div
3
+ class="chat-message-size-exceeded-error typo-body-1"
4
+ :class="{
5
+ 'chat-message-size-exceeded-error--right': selfSide,
6
+ }"
7
+ >
8
+ <wt-icon
9
+ icon="violation"
10
+ color="error"
11
+ />
12
+ <p>
13
+ {{ t('@webitel/ui-chats.ui.messaging.chatsIncorrectFileSize') }}
14
+ </p>
15
+ </div>
16
+ </template>
17
+
18
+ <script setup lang="ts">
19
+ import { useI18n } from 'vue-i18n';
20
+
21
+ const { t } = useI18n();
22
+
23
+ interface IChatMessageSizeExceededErrorProps {
24
+ selfSide?: boolean;
25
+ }
26
+
27
+ const props = withDefaults(defineProps<IChatMessageSizeExceededErrorProps>(), {
28
+ selfSide: false,
29
+ });
30
+ </script>
31
+
32
+ <style scoped lang="scss">
33
+ .chat-message-size-exceeded-error {
34
+ background: var(--primary-light-color);
35
+ border-radius: var(--spacing-xs);
36
+ padding: var(--spacing-xs);
37
+ display: flex;
38
+ flex-direction: column;
39
+ align-items: center;
40
+ gap: var(--spacing-xs);
41
+ white-space: pre-line;
42
+ text-align: center;
43
+
44
+ &--right {
45
+ background: var(--secondary-light-color);
46
+ color: var(--secondary-on-color);
47
+ place-self: flex-end;
48
+ }
49
+ }
50
+ </style>
@@ -9,21 +9,21 @@
9
9
  setup
10
10
  lang="ts"
11
11
  >
12
- import Autolinker from "autolinker";
13
- import { computed, defineProps } from "vue";
12
+ import Autolinker from 'autolinker';
13
+ import { computed, defineProps } from 'vue';
14
14
 
15
15
  const props = defineProps<{
16
- text: string;
16
+ text: string;
17
17
  }>();
18
18
 
19
19
  const text = computed(() => {
20
- // ATTENTION: not all libs are suitable for this case, because we want to preserve "<" signs
21
- // https://my.webitel.com/browse/DEV-2848
22
- return Autolinker.link(props.text, {
23
- newWindow: true,
24
- sanitizeHtml: true, // DONT FORGET TO SANITIZE, OR USE DOM PURIFY
25
- className: "chat-message-new-text__link",
26
- });
20
+ // ATTENTION: not all libs are suitable for this case, because we want to preserve "<" signs
21
+ // https://my.webitel.com/browse/DEV-2848
22
+ return Autolinker.link(props.text, {
23
+ newWindow: true,
24
+ sanitizeHtml: true, // DONT FORGET TO SANITIZE, OR USE DOM PURIFY
25
+ className: 'chat-message-new-text__link',
26
+ });
27
27
  });
28
28
  </script>
29
29
 
@@ -11,16 +11,16 @@
11
11
  setup
12
12
  lang="ts"
13
13
  >
14
- import { prettifyTime } from "@webitel/ui-sdk/scripts";
15
- import { computed, defineProps } from "vue";
14
+ import { prettifyTime } from '@webitel/ui-sdk/scripts';
15
+ import { computed, defineProps } from 'vue';
16
16
 
17
17
  const props = withDefaults(
18
- defineProps<{
19
- date?: string | number; // timestamp
20
- }>(),
21
- {
22
- date: "",
23
- },
18
+ defineProps<{
19
+ date?: string | number; // timestamp
20
+ }>(),
21
+ {
22
+ date: '',
23
+ },
24
24
  );
25
25
 
26
26
  const time = computed(() => prettifyTime(props.date));
@@ -1,8 +1,8 @@
1
- import { FormatDateMode } from "@webitel/ui-sdk/enums";
2
- import { formatDate } from "@webitel/ui-sdk/utils";
3
- import { type ComputedRef, type Ref } from "vue";
1
+ import { FormatDateMode } from '@webitel/ui-sdk/enums';
2
+ import { formatDate } from '@webitel/ui-sdk/utils';
3
+ import type { ComputedRef, Ref } from 'vue';
4
4
 
5
- import type { ChatMessageType } from "../../../types/ChatMessage.types";
5
+ import type { ChatMessageType } from '../../../types/ChatMessage.types';
6
6
 
7
7
  interface GetMessageResult {
8
8
  prevMessage?: ChatMessageType;
@@ -1,6 +1,6 @@
1
1
  export const MessageAction = {
2
- ClickOnImage: "clickOnImage",
3
- InitializedPlayer: "initializedPlayer",
2
+ ClickOnImage: 'clickOnImage',
3
+ InitializedPlayer: 'initializedPlayer',
4
4
  } as const;
5
5
 
6
6
  export type MessageAction = (typeof MessageAction)[keyof typeof MessageAction];
@@ -106,8 +106,8 @@ const emit = defineEmits<{
106
106
 
107
107
  const slots = defineSlots<
108
108
  {
109
- main: () => any;
110
- footer: () => any;
109
+ main: () => unknown;
110
+ footer: () => unknown;
111
111
  } & SharedActionSlots
112
112
  >();
113
113
 
@@ -1 +1 @@
1
- export { ResultCallbacks } from "@webitel/ui-sdk/src/types";
1
+ export { ResultCallbacks } from '@webitel/ui-sdk/src/types';
@@ -1,6 +1,6 @@
1
- import mitt from "mitt";
1
+ import mitt from 'mitt';
2
2
 
3
- import { ChatMessageType } from "../../../types/ui";
3
+ import type { ChatMessageType } from '../../../types/ui';
4
4
 
5
5
  export type UiChatsEmitterEvents = {
6
6
  insertAtCursor: {
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,102 +1,111 @@
1
1
  import en from './en/en';
2
- import uk from './uk/uk';
3
- import ru from './ru/ru';
4
2
  import es from './es/es';
5
3
  import kz from './kz/kz';
6
4
  import pl from './pl/pl';
7
5
  import ro from './ro/ro';
6
+ import ru from './ru/ru';
7
+ import uk from './uk/uk';
8
8
  import uz from './uz/uz';
9
9
  import vi from './vi/vi';
10
10
  export declare const messages: {
11
11
  en: {
12
- "@webitel/ui-chats": {
12
+ '@webitel/ui-chats': {
13
13
  ui: {
14
14
  messaging: {
15
15
  chatsFileBlocked: string;
16
+ chatsIncorrectFileSize: string;
16
17
  textAreaPlaceholder: string;
17
18
  };
18
19
  };
19
20
  };
20
21
  };
21
22
  uk: {
22
- "@webitel/ui-chats": {
23
+ '@webitel/ui-chats': {
23
24
  ui: {
24
25
  messaging: {
25
26
  chatsFileBlocked: string;
27
+ chatsIncorrectFileSize: string;
26
28
  textAreaPlaceholder: string;
27
29
  };
28
30
  };
29
31
  };
30
32
  };
31
33
  ru: {
32
- "@webitel/ui-chats": {
34
+ '@webitel/ui-chats': {
33
35
  ui: {
34
36
  messaging: {
35
37
  chatsFileBlocked: string;
38
+ chatsIncorrectFileSize: string;
36
39
  textAreaPlaceholder: string;
37
40
  };
38
41
  };
39
42
  };
40
43
  };
41
44
  es: {
42
- "@webitel/ui-chats": {
45
+ '@webitel/ui-chats': {
43
46
  ui: {
44
47
  messaging: {
45
48
  chatsFileBlocked: string;
49
+ chatsIncorrectFileSize: string;
46
50
  textAreaPlaceholder: string;
47
51
  };
48
52
  };
49
53
  };
50
54
  };
51
55
  kz: {
52
- "@webitel/ui-chats": {
56
+ '@webitel/ui-chats': {
53
57
  ui: {
54
58
  messaging: {
55
59
  chatsFileBlocked: string;
60
+ chatsIncorrectFileSize: string;
56
61
  textAreaPlaceholder: string;
57
62
  };
58
63
  };
59
64
  };
60
65
  };
61
66
  pl: {
62
- "@webitel/ui-chats": {
67
+ '@webitel/ui-chats': {
63
68
  ui: {
64
69
  messaging: {
65
70
  chatsFileBlocked: string;
71
+ chatsIncorrectFileSize: string;
66
72
  textAreaPlaceholder: string;
67
73
  };
68
74
  };
69
75
  };
70
76
  };
71
77
  ro: {
72
- "@webitel/ui-chats": {
78
+ '@webitel/ui-chats': {
73
79
  ui: {
74
80
  messaging: {
75
81
  chatsFileBlocked: string;
82
+ chatsIncorrectFileSize: string;
76
83
  textAreaPlaceholder: string;
77
84
  };
78
85
  };
79
86
  };
80
87
  };
81
88
  uz: {
82
- "@webitel/ui-chats": {
89
+ '@webitel/ui-chats': {
83
90
  ui: {
84
91
  messaging: {
85
92
  chatsFileBlocked: string;
93
+ chatsIncorrectFileSize: string;
86
94
  textAreaPlaceholder: string;
87
95
  };
88
96
  };
89
97
  };
90
98
  };
91
99
  vi: {
92
- "@webitel/ui-chats": {
100
+ '@webitel/ui-chats': {
93
101
  ui: {
94
102
  messaging: {
95
103
  chatsFileBlocked: string;
104
+ chatsIncorrectFileSize: string;
96
105
  textAreaPlaceholder: string;
97
106
  };
98
107
  };
99
108
  };
100
109
  };
101
110
  };
102
- export { en, uk, ru, es, kz, pl, ro, uz, vi };
111
+ export { en, es, kz, pl, ro, ru, uk, uz, vi };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,8 +1,9 @@
1
1
  declare const _default: {
2
- "@webitel/ui-chats": {
2
+ '@webitel/ui-chats': {
3
3
  ui: {
4
4
  messaging: {
5
5
  chatsFileBlocked: string;
6
+ chatsIncorrectFileSize: string;
6
7
  textAreaPlaceholder: string;
7
8
  };
8
9
  };
@@ -1,5 +1,5 @@
1
1
  type __VLS_Slots = {
2
- default: () => any;
2
+ default: () => unknown;
3
3
  };
4
4
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
5
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import { ChatAction, type SharedActionSlots } from "../enums/ChatAction.enum";
1
+ import { ChatAction, type SharedActionSlots } from '../enums/ChatAction.enum';
2
2
  type __VLS_Props = {
3
3
  actions: ChatAction[];
4
4
  };
@@ -1,6 +1,6 @@
1
- import { type MaybeRef } from "vue";
1
+ import { type MaybeRef } from 'vue';
2
2
  type __VLS_ModelProps = {
3
- "text": MaybeRef<string>;
3
+ 'text': MaybeRef<string>;
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  enter: () => any;
@@ -1,4 +1,4 @@
1
- import type { ChatMessageType } from "../types/ChatMessage.types";
1
+ import type { ChatMessageType } from '../types/ChatMessage.types';
2
2
  type __VLS_Props = {
3
3
  messages: ChatMessageType[];
4
4
  next?: boolean;
@@ -1,5 +1,5 @@
1
- import { type ComputedRef, type Ref } from "vue";
2
- import type { ChatMessageType } from "../types/ChatMessage.types";
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { ChatMessageType } from '../types/ChatMessage.types';
3
3
  export declare const useChatScroll: (element: Ref<HTMLElement | null>, messages: Ref<ChatMessageType[]> | ComputedRef<ChatMessageType[]>) => {
4
4
  showScrollToBottomBtn: Ref<boolean, boolean>;
5
5
  newUnseenMessagesCount: Ref<number, number>;
@@ -1,4 +1,4 @@
1
- import { Ref } from "vue";
1
+ import { type Ref } from 'vue';
2
2
  interface UseDropzoneHandlers {
3
3
  isDropzoneVisible: Ref<boolean>;
4
4
  handleDragEnter: () => void;
@@ -5,11 +5,11 @@ type __VLS_Props = {
5
5
  withoutAvatars?: boolean;
6
6
  username?: string;
7
7
  };
8
- declare var __VLS_1: {}, __VLS_45: {};
8
+ declare var __VLS_1: {}, __VLS_52: {};
9
9
  type __VLS_Slots = {} & {
10
10
  'before-message'?: (props: typeof __VLS_1) => any;
11
11
  } & {
12
- 'after-message'?: (props: typeof __VLS_45) => any;
12
+ 'after-message'?: (props: typeof __VLS_52) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
15
  clickOnImage: () => any;
@@ -1,4 +1,4 @@
1
- import type { ChatMessageFile } from "../../../../types/ChatMessage.types";
1
+ import type { ChatMessageFile } from '../../../../types/ChatMessage.types';
2
2
  type __VLS_Props = {
3
3
  file: ChatMessageFile;
4
4
  selfSide?: boolean;
@@ -0,0 +1,8 @@
1
+ interface IChatMessageSizeExceededErrorProps {
2
+ selfSide?: boolean;
3
+ }
4
+ declare const __VLS_export: import("vue").DefineComponent<IChatMessageSizeExceededErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IChatMessageSizeExceededErrorProps> & Readonly<{}>, {
5
+ selfSide: boolean;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -1,5 +1,5 @@
1
- import { type ComputedRef, type Ref } from "vue";
2
- import type { ChatMessageType } from "../../../types/ChatMessage.types";
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type { ChatMessageType } from '../../../types/ChatMessage.types';
3
3
  interface GetMessageResult {
4
4
  prevMessage?: ChatMessageType;
5
5
  message?: ChatMessageType;
@@ -1,4 +1,4 @@
1
- import { ChatMessageType } from "../../../types/ui";
1
+ import type { ChatMessageType } from '../../../types/ui';
2
2
  export type UiChatsEmitterEvents = {
3
3
  insertAtCursor: {
4
4
  text: string;