@webitel/ui-chats 0.0.2

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 (59) hide show
  1. package/README.md +3 -0
  2. package/package.json +63 -0
  3. package/src/assets/icons/bot.svg +6 -0
  4. package/src/index.ts +0 -0
  5. package/src/locale/en/en.ts +9 -0
  6. package/src/ui/chat-container.vue +102 -0
  7. package/src/ui/chat-footer/components/chat-footer-wrapper.vue +21 -0
  8. package/src/ui/chat-footer/modules/user-input/components/actions/attach-files-action.vue +40 -0
  9. package/src/ui/chat-footer/modules/user-input/components/actions/emoji-picker-action.vue +19 -0
  10. package/src/ui/chat-footer/modules/user-input/components/actions/send-message-action.vue +23 -0
  11. package/src/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue +77 -0
  12. package/src/ui/chat-footer/modules/user-input/components/chat-text-field.vue +39 -0
  13. package/src/ui/chat-footer/modules/user-input/types/ChatAction.types.ts +12 -0
  14. package/src/ui/index.ts +2 -0
  15. package/src/ui/messaging/components/chat-messages-container.vue +19 -0
  16. package/src/ui/messaging/modules/message/components/chat-message.vue +155 -0
  17. package/src/ui/messaging/modules/message/components/details/chat-message-avatar.vue +44 -0
  18. package/src/ui/messaging/modules/message/components/details/chat-message-blocked-error.vue +38 -0
  19. package/src/ui/messaging/modules/message/components/details/chat-message-document.vue +93 -0
  20. package/src/ui/messaging/modules/message/components/details/chat-message-image.vue +40 -0
  21. package/src/ui/messaging/modules/message/components/details/chat-message-player.vue +55 -0
  22. package/src/ui/messaging/modules/message/components/details/chat-message-text.vue +46 -0
  23. package/src/ui/messaging/modules/message/components/details/chat-message-time.vue +37 -0
  24. package/src/ui/messaging/modules/message/composables/useChatMessageFile.ts +38 -0
  25. package/src/ui/messaging/types/ChatMessage.types.ts +12 -0
  26. package/src/ui/utils/ResultCallbacks.types.ts +1 -0
  27. package/src/ui/utils/emitter.ts +12 -0
  28. package/types/index.d.ts +1 -0
  29. package/types/locale/en/en.d.ts +10 -0
  30. package/types/ui/chat-container.vue.d.ts +31 -0
  31. package/types/ui/chat-footer/components/chat-footer-wrapper.vue.d.ts +12 -0
  32. package/types/ui/chat-footer/modules/user-input/components/actions/attach-files-action.vue.d.ts +7 -0
  33. package/types/ui/chat-footer/modules/user-input/components/actions/emoji-picker-action.vue.d.ts +3 -0
  34. package/types/ui/chat-footer/modules/user-input/components/actions/send-message-action.vue.d.ts +7 -0
  35. package/types/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue.d.ts +21 -0
  36. package/types/ui/chat-footer/modules/user-input/components/chat-text-field.vue.d.ts +11 -0
  37. package/types/ui/chat-footer/modules/user-input/types/ChatAction.types.d.ts +10 -0
  38. package/types/ui/chat-input/components/actions/attach-files-action.vue.d.ts +7 -0
  39. package/types/ui/chat-input/components/actions/emoji-picker-action.vue.d.ts +3 -0
  40. package/types/ui/chat-input/components/actions/send-message-action.vue.d.ts +7 -0
  41. package/types/ui/chat-input/components/chat-input-actions-bar.vue.d.ts +21 -0
  42. package/types/ui/chat-input/components/chat-input-actions-wrapper.vue.d.ts +13 -0
  43. package/types/ui/chat-input/components/chat-input.vue.d.ts +20 -0
  44. package/types/ui/chat-input/components/chat-text-field.vue.d.ts +10 -0
  45. package/types/ui/chat-input/enums/ChatAction.enum.d.ts +6 -0
  46. package/types/ui/index.d.ts +2 -0
  47. package/types/ui/messaging/components/chat-messages-container.vue.d.ts +7 -0
  48. package/types/ui/messaging/modules/message/components/chat-message.vue.d.ts +29 -0
  49. package/types/ui/messaging/modules/message/components/details/chat-message-avatar.vue.d.ts +10 -0
  50. package/types/ui/messaging/modules/message/components/details/chat-message-blocked-error.vue.d.ts +3 -0
  51. package/types/ui/messaging/modules/message/components/details/chat-message-document.vue.d.ts +10 -0
  52. package/types/ui/messaging/modules/message/components/details/chat-message-image.vue.d.ts +11 -0
  53. package/types/ui/messaging/modules/message/components/details/chat-message-player.vue.d.ts +14 -0
  54. package/types/ui/messaging/modules/message/components/details/chat-message-text.vue.d.ts +6 -0
  55. package/types/ui/messaging/modules/message/components/details/chat-message-time.vue.d.ts +8 -0
  56. package/types/ui/messaging/modules/message/composables/useChatMessageFile.d.ts +21 -0
  57. package/types/ui/messaging/types/ChatMessage.types.d.ts +11 -0
  58. package/types/ui/utils/ResultCallbacks.types.d.ts +1 -0
  59. package/types/ui/utils/emitter.d.ts +7 -0
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="chat-message-blocked-error">
3
+ <wt-icon
4
+ icon="protection-error"
5
+ color="error"
6
+ />
7
+ <!-- TODO: move chat locales from cc-workspaces to this pkg -->
8
+ <p>
9
+ <!-- {{ t('workspaceSec.chat.chatsFileBlocked') }} -->
10
+ {{ t('@webitel/ui-chats.ui.messaging.chatsFileBlocked') }}
11
+ </p>
12
+ </div>
13
+ </template>
14
+ <script setup>
15
+ import { useI18n } from 'vue-i18n';
16
+
17
+ const { t } = useI18n();
18
+ </script>
19
+
20
+ <style scoped lang="scss">
21
+ .chat-message-blocked-error {
22
+ @extend %typo-body-1;
23
+ background: var(--p-error-highlight-color);
24
+ border-radius: var(--spacing-xs);
25
+ padding: var(--spacing-xs);
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ gap: var(--spacing-xs);
30
+ white-space: pre-line;
31
+ text-align: center;
32
+
33
+ //width limit for blocking error message
34
+ max-width: 132px;
35
+ }
36
+ </style>
37
+ <script setup lang="ts">
38
+ </script>
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <div
3
+ class="chat-message-document"
4
+ :class="{ 'chat-message-document--right': props.selfSide }"
5
+ @click="downloadDocument"
6
+ >
7
+ <div class="chat-message-document__icon-wrapper">
8
+ <wt-icon class="chat-message-document__icon" icon="attach" />
9
+ </div>
10
+ <div class="chat-message-document__info-wrapper">
11
+ <a class="chat-message-document__name" :title="props.file.name">
12
+ {{ props.file.name }}
13
+ </a>
14
+ <div class="chat-message-document__size">
15
+ {{ documentSize }}
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup lang="ts">
22
+ import { prettifyFileSize } from '@webitel/ui-sdk/scripts';
23
+ import { computed, defineProps } from 'vue';
24
+
25
+ import { ChatMessageFile } from '../../../../types/ChatMessage.types';
26
+
27
+ const props = withDefaults(defineProps<{
28
+ file: ChatMessageFile;
29
+ selfSide?: boolean;
30
+ }>(),{
31
+ selfSide: false,
32
+ });
33
+ const documentSize = computed(() => {
34
+ if (!props.file) return '';
35
+ return prettifyFileSize(props.file.size);
36
+ });
37
+
38
+ function downloadDocument() {
39
+ if (!props.file) return;
40
+ const a = document.createElement('a');
41
+ a.href = props.file.url;
42
+ a.target = '_blank';
43
+ a.download = props.file.name;
44
+ a.click();
45
+ }
46
+ </script>
47
+
48
+ <style lang="scss" scoped>
49
+ .chat-message-document {
50
+ display: flex;
51
+ align-items: flex-start;
52
+ cursor: pointer;
53
+ padding: var(--spacing-xs);
54
+ background: var(--primary-light-color);
55
+ border-radius: var(--border-radius);
56
+
57
+ &__icon-wrapper {
58
+ display: flex;
59
+ justify-content: center;
60
+ margin-right: var(--spacing-xs);
61
+ padding: var(--spacing-2xs);
62
+ }
63
+
64
+ &__info-wrapper {
65
+ display: flex;
66
+ flex-direction: column;
67
+ justify-content: space-between;
68
+ min-width: 0;
69
+ }
70
+
71
+ &__name {
72
+ @extend %typo-subtitle-2;
73
+ cursor: pointer;
74
+ overflow-wrap: break-word;
75
+ color: var(--text-main-color);
76
+ }
77
+
78
+ &__size {
79
+ @extend %typo-caption;
80
+ color: var(--text-main-color);
81
+ }
82
+
83
+ &--right {
84
+ flex-direction: row-reverse;
85
+ background: var(--secondary-light-color);
86
+
87
+ .chat-message-new-document__icon-wrapper {
88
+ margin-right: 0;
89
+ margin-left: var(--spacing-xs);
90
+ }
91
+ }
92
+ }
93
+ </style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <div class="chat-message-image" @click="emit('open', props.file)">
3
+ <img
4
+ class="chat-message-image__img"
5
+ :src="props.file.url"
6
+ :alt="props.file.name"
7
+ draggable="false"
8
+ >
9
+ </div>
10
+ </template>
11
+
12
+
13
+ <script setup lang="ts">
14
+
15
+ import { defineEmits, defineProps } from 'vue';
16
+
17
+ import { ChatMessageFile } from '../../../../types/ChatMessage.types';
18
+
19
+ const props = defineProps<{
20
+ file: ChatMessageFile,
21
+ }>();
22
+ const emit = defineEmits<{
23
+ open: [ChatMessageFile],
24
+ }>();
25
+
26
+ </script>
27
+
28
+
29
+ <style lang="scss" scoped>
30
+ .chat-message-image {
31
+ cursor: pointer;
32
+
33
+ &__img {
34
+ @extend %typo-body-1;
35
+ max-height: var(--chat-file-max-height);
36
+ max-width: var(--chat-file-max-width);
37
+ width: 100%;
38
+ }
39
+ }
40
+ </style>
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div
3
+ class="chat-message-player"
4
+ @click="emit('open', props.file)"
5
+ >
6
+ <wt-player
7
+ :src="mediaUrl"
8
+ :mime="props.type"
9
+ :autoplay="false"
10
+ :hide-duration="type.includes('video')"
11
+ reset-on-end
12
+ reset-volume
13
+ @initialized="handlePlayerInitialize"
14
+ />
15
+ </div>
16
+ </template>
17
+
18
+ <script setup lang="ts">
19
+
20
+ import { computed, defineEmits, defineProps } from 'vue';
21
+
22
+ import { ChatMessageFile } from '../../../../types/ChatMessage.types';
23
+
24
+ const props = defineProps<{
25
+ file: ChatMessageFile,
26
+ type: string,
27
+ }>();
28
+ const emit = defineEmits<{
29
+ open: [ChatMessageFile],
30
+ initialized: [object],
31
+ }>();
32
+
33
+ const mediaUrl = computed(() => props.file.streamUrl || props.file.url);
34
+
35
+ function handlePlayerInitialize(player) {
36
+ emit('initialized', player);
37
+ };
38
+
39
+ </script>
40
+
41
+ <style lang="scss" scoped>
42
+ .chat-message-player {
43
+ .wt-player :deep(.plyr) {
44
+ .wt-player__close-icon,
45
+ .plyr__volume {
46
+ display: none;
47
+ }
48
+
49
+ &.plyr--video {
50
+ max-height: var(--chat-file-max-height);
51
+ max-width: var(--chat-file-max-width);
52
+ }
53
+ }
54
+ }
55
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <p
3
+ class="chat-message-text"
4
+ v-html="text"
5
+ />
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import Autolinker from 'autolinker';
10
+ import {computed, defineProps} from 'vue';
11
+
12
+ const props = defineProps<{
13
+ text: string;
14
+ }>();
15
+
16
+ const text = computed(() => {
17
+ // ATTENTION: not all libs are suitable for this case, because we want to preserve "<" signs
18
+ // https://my.webitel.com/browse/DEV-2848
19
+ return Autolinker.link(props.text, {
20
+ newWindow: true,
21
+ sanitizeHtml: true, // DONT FORGET TO SANITIZE, OR USE DOM PURIFY
22
+ className: 'chat-message-new-text__link',
23
+ });
24
+ })
25
+ </script>
26
+
27
+ <style lang="scss" scoped>
28
+
29
+ .chat-message-text {
30
+ @extend %typo-body-1;
31
+ overflow-wrap: anywhere;
32
+ white-space: pre-line; // read \n as "new line"
33
+ padding: var(--spacing-xs);
34
+ border-radius: var(--border-radius);
35
+ background: var(--primary-light-color);
36
+ color: var(--primary-on-color);
37
+ place-self: flex-start;
38
+
39
+ // reset links inside text
40
+ :deep(.chat-message-text__link) {
41
+ color: revert;
42
+ text-decoration: revert;
43
+ }
44
+ }
45
+
46
+ </style>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <aside class="chat-message-time">
3
+ <div class="chat-message-time__sent-at">
4
+ {{ time }}
5
+ </div>
6
+ </aside>
7
+ </template>
8
+
9
+
10
+ <script setup lang="ts">
11
+ import { prettifyTime } from '@webitel/ui-sdk/scripts';
12
+ import { computed, defineProps } from 'vue';
13
+
14
+
15
+ const props = withDefaults(defineProps<{
16
+ date?: string | number // timestamp
17
+ }>(), {
18
+ date: '',
19
+ });
20
+
21
+ const time = computed(() => prettifyTime(props.date));
22
+ </script>
23
+
24
+ <style lang="scss" scoped>
25
+ .chat-message-time {
26
+ display: flex;
27
+ flex-direction: column;
28
+ justify-content: space-between;
29
+ align-items: flex-end;
30
+
31
+ &__sent-at {
32
+ @extend %typo-caption;
33
+ color: var(--text-main-color);
34
+ white-space: nowrap;
35
+ }
36
+ }
37
+ </style>
@@ -0,0 +1,38 @@
1
+ import { computed, type Ref, toRef } from 'vue';
2
+
3
+ import { ChatMessageFile } from '../../../types/ChatMessage.types';
4
+
5
+ export function useChatMessageFile(
6
+ file: ChatMessageFile | Ref<ChatMessageFile>,
7
+ ) {
8
+ const fileRef = toRef(file);
9
+
10
+ const type = computed(() => {
11
+ return fileRef.value?.mime;
12
+ });
13
+
14
+ const image = computed(() => {
15
+ const isImage = type.value?.includes('image');
16
+ const isHEIC = type.value?.includes('heic');
17
+
18
+ if (isHEIC) return null;
19
+
20
+ return isImage && fileRef.value; //https://webitel.atlassian.net/browse/WTEL-6268
21
+ });
22
+
23
+ const media = computed(() => {
24
+ const isMedia =
25
+ type.value?.includes('audio') || type.value?.includes('video');
26
+ return isMedia && fileRef.value;
27
+ });
28
+
29
+ const document = computed(() => {
30
+ return !media.value && !image.value && fileRef.value;
31
+ });
32
+
33
+ return {
34
+ image,
35
+ media,
36
+ document,
37
+ };
38
+ }
@@ -0,0 +1,12 @@
1
+ export type ChatMessageType = {
2
+ id: string;
3
+ };
4
+
5
+ export type ChatMessageFile = {
6
+ id?: string;
7
+ name?: string;
8
+ size?: string;
9
+ mime?: string;
10
+ url?: string;
11
+ streamUrl?: string;
12
+ };
@@ -0,0 +1 @@
1
+ export { ResultCallbacks } from '@webitel/ui-sdk/src/types';
@@ -0,0 +1,12 @@
1
+ import mitt from "mitt";
2
+
3
+ export type UiChatsEmitterEvents = {
4
+ insertAtCursor: { text: string };
5
+ focusOnTextField: undefined;
6
+ };
7
+
8
+ export const createUiChatsEmitter = () => {
9
+ const uiChatsEmitter = mitt<UiChatsEmitterEvents>();
10
+
11
+ return uiChatsEmitter;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ '@webitel/ui-chats': {
3
+ ui: {
4
+ messaging: {
5
+ chatsFileBlocked: string;
6
+ };
7
+ };
8
+ };
9
+ };
10
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
2
+ import { ResultCallbacks } from './utils/ResultCallbacks.types';
3
+ import { ChatMessageType } from './messaging/types/ChatMessage.types';
4
+ import { ChatAction, SharedActionSlots } from './chat-footer/modules/user-input/types/ChatAction.types';
5
+ type __VLS_Props = {
6
+ messages: ChatMessageType[];
7
+ chatActions?: ChatAction[];
8
+ size?: ComponentSize;
9
+ };
10
+ type __VLS_Slots = {
11
+ main: () => any;
12
+ footer: () => any;
13
+ } & SharedActionSlots;
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
+ "action:sendMessage": (text: string, options: ResultCallbacks) => any;
16
+ "action:attachFiles": (files: File[], options: ResultCallbacks) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ "onAction:sendMessage"?: (text: string, options: ResultCallbacks) => any;
19
+ "onAction:attachFiles"?: (files: File[], options: ResultCallbacks) => any;
20
+ }>, {
21
+ size: ComponentSize;
22
+ chatActions: ChatAction[];
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,12 @@
1
+ type __VLS_Slots = {
2
+ default: () => any;
3
+ };
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
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
+ attachFiles: (files: File[]) => any;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onAttachFiles?: (files: File[]) => any;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
+ sendMessage: () => any;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onSendMessage?: () => any;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import { ChatAction } from '../types/ChatAction.types';
2
+ import { SharedActionSlots } from '../types/ChatAction.types';
3
+ type __VLS_Props = {
4
+ actions: ChatAction[];
5
+ };
6
+ type __VLS_Slots = SharedActionSlots;
7
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ sendMessage: () => any;
9
+ attachFiles: (files: File[]) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onSendMessage?: () => any;
12
+ onAttachFiles?: (files: File[]) => any;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,11 @@
1
+ import { MaybeRef } from 'vue';
2
+ type __VLS_ModelProps = {
3
+ 'text': MaybeRef<string>;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:text": (value: MaybeRef<string>) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
8
+ "onUpdate:text"?: (value: MaybeRef<string>) => any;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export declare const ChatAction: {
2
+ readonly SendMessage: "sendMessage";
3
+ readonly AttachFiles: "attachFiles";
4
+ readonly EmojiPicker: "emojiPicker";
5
+ readonly QuickReplies: "quickReplies";
6
+ };
7
+ export type ChatAction = (typeof ChatAction)[keyof typeof ChatAction];
8
+ export type SharedActionSlots = {
9
+ [key in `action:${ChatAction}`]?: () => any;
10
+ };
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ attachFiles: (files: File[]) => any;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onAttachFiles?: (files: File[]) => any;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ click: () => any;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onClick?: () => any;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
2
+ import { ChatAction } from '../enums/ChatAction.enum';
3
+ type __VLS_Props = {
4
+ actions: ChatAction[];
5
+ size: ComponentSize;
6
+ };
7
+ declare var __VLS_2: "sendMessage" | "attachFiles" | "emojiPicker", __VLS_3: {
8
+ key: "sendMessage" | "attachFiles" | "emojiPicker";
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ actions?: (props: typeof __VLS_1) => any;
4
+ };
5
+ 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>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,20 @@
1
+ type __VLS_ModelProps = {
2
+ 'draft': string;
3
+ };
4
+ declare var __VLS_10: {};
5
+ type __VLS_Slots = {} & {
6
+ actions?: (props: typeof __VLS_10) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:draft": (value: string) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
11
+ "onUpdate:draft"?: (value: string) => any;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_ModelProps = {
2
+ 'text': string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:text": (value: string) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
+ "onUpdate:text"?: (value: string) => any;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export declare const ChatAction: {
2
+ readonly SendMessage: "sendMessage";
3
+ readonly AttachFiles: "attachFiles";
4
+ readonly EmojiPicker: "emojiPicker";
5
+ };
6
+ export type ChatAction = (typeof ChatAction)[keyof typeof ChatAction];
@@ -0,0 +1,2 @@
1
+ export { default as ChatContainerComponent } from './chat-container.vue';
2
+ export { ChatAction } from './chat-footer/modules/user-input/types/ChatAction.types';
@@ -0,0 +1,7 @@
1
+ import { ChatMessageType } from '../types/ChatMessage.types';
2
+ type __VLS_Props = {
3
+ messages: ChatMessageType[];
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ message: object;
3
+ showAvatar?: boolean;
4
+ username?: string;
5
+ };
6
+ declare var __VLS_1: {}, __VLS_44: {};
7
+ type __VLS_Slots = {} & {
8
+ 'before-message'?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ 'after-message'?: (props: typeof __VLS_44) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "open-image": () => any;
14
+ "initialized-player": (args_0: object) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onOpen-image"?: () => any;
17
+ "onInitialized-player"?: (args_0: object) => any;
18
+ }>, {
19
+ username: string;
20
+ showAvatar: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };