@webitel/ui-chats 26.8.1 → 26.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-chats",
3
- "version": "26.8.1",
3
+ "version": "26.8.2",
4
4
  "description": "Reusable Webitel Frontend Code for Chats UI",
5
5
  "workspaces": [
6
6
  "../../",
@@ -5,6 +5,7 @@
5
5
  :model-value="textModel"
6
6
  :placeholder="t('@webitel/ui-chats.ui.messaging.textAreaPlaceholder')"
7
7
  :size="size"
8
+ :submit-on-enter="props.submitOnEnter"
8
9
  autoresize
9
10
  @update:model-value="send"
10
11
  @enter="emit('enter')"
@@ -35,6 +36,15 @@ if (uiChatsEmitter) {
35
36
  uiChatsEmitter.on('focusOnTextField', focus);
36
37
  }
37
38
 
39
+ const props = withDefaults(
40
+ defineProps<{
41
+ submitOnEnter?: boolean;
42
+ }>(),
43
+ {
44
+ submitOnEnter: true,
45
+ },
46
+ );
47
+
38
48
  const emit = defineEmits<{
39
49
  enter: [];
40
50
  }>();
@@ -28,6 +28,7 @@
28
28
  <template #default>
29
29
  <chat-text-field
30
30
  v-model:text="draft"
31
+ :submit-on-enter="props.submitOnEnter"
31
32
  @enter="sendMessage"
32
33
  />
33
34
  <chat-input-actions-bar
@@ -87,6 +88,7 @@ const props = withDefaults(
87
88
  contact?: WebitelContactsContact;
88
89
  chatId?: string;
89
90
  isChatClosed?: boolean;
91
+ submitOnEnter?: boolean;
90
92
  }>(),
91
93
  {
92
94
  size: ComponentSize.MD,
@@ -97,6 +99,7 @@ const props = withDefaults(
97
99
  readonly: false,
98
100
  chatId: '',
99
101
  isChatClosed: false,
102
+ submitOnEnter: true,
100
103
  },
101
104
  );
102
105