@webitel/ui-chats 0.1.38 → 0.1.40

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-chats",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Reusable Webitel Frontend Code for Chats UI",
5
5
  "workspaces": [
6
6
  "../../",
package/src/css/main.css CHANGED
@@ -6,5 +6,5 @@
6
6
  --chat-video-player-width: 256px;
7
7
  --chat-message-timestamp-spacer-width: 2rem;
8
8
  --chat-message-timestamp-spacer-height: 1.5rem;
9
- --chat-message-timestamp-bottom-offset: 1.33rem;
9
+ --chat-message-timestamp-bottom-offset: 0.75rem;
10
10
  }
@@ -22,6 +22,7 @@
22
22
  :agent-name="props.agentName"
23
23
  :show-avatar="showAvatar(index)"
24
24
  :without-avatars="props.withoutAvatars"
25
+ :username="props.contact?.name"
25
26
  @[MessageAction.ClickOnImage]="clickOnImage(message)"
26
27
  >
27
28
  <template #before-message>
@@ -44,6 +45,7 @@
44
45
  setup
45
46
  lang="ts"
46
47
  >
48
+ import { WebitelContactsContact } from '@webitel/api-services/gen/models';
47
49
  import type { Emitter } from 'mitt';
48
50
  import {
49
51
  computed,
@@ -53,7 +55,6 @@ import {
53
55
  onMounted,
54
56
  useTemplateRef,
55
57
  } from 'vue';
56
-
57
58
  import { ChatAction } from '../../chat-footer/modules/user-input/enums/ChatAction.enum';
58
59
  import type { UiChatsEmitterEvents } from '../../utils/emitter';
59
60
  import { useChatScroll } from '../composables/useChatScroll';
@@ -74,6 +75,7 @@ const props = withDefaults(
74
75
  isLoading?: boolean;
75
76
  withoutAvatars?: boolean;
76
77
  agentName?: string;
78
+ contact?: WebitelContactsContact;
77
79
  }>(),
78
80
  {
79
81
  next: false,
@@ -17,6 +17,7 @@
17
17
  :is-loading="props.isNextMessagesLoading"
18
18
  :without-avatars="props.withoutAvatars"
19
19
  :agent-name="props.agentName"
20
+ :contact="props.contact"
20
21
  @[ChatAction.LoadNextMessages]="emit(ChatAction.LoadNextMessages)"
21
22
  />
22
23
  </slot>
@@ -50,9 +51,9 @@
50
51
  </template>
51
52
 
52
53
  <script setup lang="ts">
54
+ import { WebitelContactsContact } from '@webitel/api-services/gen/models';
53
55
  import { ComponentSize } from '@webitel/ui-sdk/enums';
54
56
  import { computed, provide, ref } from 'vue';
55
-
56
57
  import ChatFooterWrapper from './chat-footer/components/chat-footer-wrapper.vue';
57
58
  import ChatInputActionsBar from './chat-footer/modules/user-input/components/chat-input-actions-bar.vue';
58
59
  import ChatTextField from './chat-footer/modules/user-input/components/chat-text-field.vue';
@@ -81,6 +82,7 @@ const props = withDefaults(
81
82
  withoutAvatars?: boolean;
82
83
  readonly?: boolean; // hide chat footer with textarea and action-buttons
83
84
  agentName?: string;
85
+ contact?: WebitelContactsContact;
84
86
  }>(),
85
87
  {
86
88
  size: ComponentSize.MD,
@@ -1,3 +1,4 @@
1
+ import { WebitelContactsContact } from '@webitel/api-services/gen/models';
1
2
  import type { ChatMessageType } from '../types/ChatMessage.types';
2
3
  type __VLS_Props = {
3
4
  messages: ChatMessageType[];
@@ -5,6 +6,7 @@ type __VLS_Props = {
5
6
  isLoading?: boolean;
6
7
  withoutAvatars?: boolean;
7
8
  agentName?: string;
9
+ contact?: WebitelContactsContact;
8
10
  };
9
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
12
  loadNextMessages: () => any;