@webitel/ui-chats 0.0.15 → 0.0.16

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.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Reusable Webitel Frontend Code for Chats UI",
5
5
  "workspaces": [
6
6
  "../../",
@@ -1,14 +1,15 @@
1
1
  <template>
2
- <wt-textarea
3
- ref="chatTextFieldInput"
4
- v-model="textModel"
5
- :size="size"
6
- autoresize
7
- />
2
+ <wt-textarea
3
+ ref="chatTextFieldInput"
4
+ :model-value="textModel"
5
+ :size="size"
6
+ autoresize
7
+ @update:model-value="send"
8
+ />
8
9
  </template>
9
10
 
10
11
  <script setup lang="ts">
11
- import type { WtTextarea } from "@webitel/ui-sdk/components";
12
+ import { WtTextarea } from "@webitel/ui-sdk/components";
12
13
  import { ComponentSize } from "@webitel/ui-sdk/enums";
13
14
  import insertTextAtCursor from "insert-text-at-cursor";
14
15
  import type { Emitter } from "mitt";
@@ -33,6 +34,10 @@ const textareaEl = computed(() =>
33
34
  chatTextFieldInputRef.value?.$el.querySelector("textarea"),
34
35
  );
35
36
 
37
+ function send(text: string) {
38
+ textModel.value = text;
39
+ }
40
+
36
41
  function focus() {
37
42
  textareaEl.value!.focus();
38
43
  }
@@ -42,3 +47,4 @@ function insertAtCursor(text: string) {
42
47
  insertTextAtCursor(textareaEl.value!, text);
43
48
  }
44
49
  </script>
50
+
@@ -132,5 +132,6 @@ function sendFile(files: File[]) {
132
132
  display: flex;
133
133
  flex-direction: column;
134
134
  height: 100%;
135
+ width: 100%;
135
136
  }
136
137
  </style>