@vaadin/message-input 24.0.0-alpha1 → 24.0.0-alpha10

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": "@vaadin/message-input",
3
- "version": "24.0.0-alpha1",
3
+ "version": "24.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,12 +36,12 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "24.0.0-alpha1",
40
- "@vaadin/component-base": "24.0.0-alpha1",
41
- "@vaadin/text-area": "24.0.0-alpha1",
42
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
43
- "@vaadin/vaadin-material-styles": "24.0.0-alpha1",
44
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha1"
39
+ "@vaadin/button": "24.0.0-alpha10",
40
+ "@vaadin/component-base": "24.0.0-alpha10",
41
+ "@vaadin/text-area": "24.0.0-alpha10",
42
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
43
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha10",
44
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha10"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
55
+ "gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/button/src/vaadin-button.js';
@@ -138,11 +138,8 @@ class MessageInput extends ElementMixin(ThemableMixin(ControllerMixin(PolymerEle
138
138
  ready() {
139
139
  super.ready();
140
140
 
141
- this._buttonController = new SlotController(
142
- this,
143
- 'button',
144
- () => document.createElement('vaadin-button'),
145
- (_, btn) => {
141
+ this._buttonController = new SlotController(this, 'button', 'vaadin-button', {
142
+ initializer: (btn) => {
146
143
  btn.setAttribute('theme', 'primary contained');
147
144
 
148
145
  btn.addEventListener('click', () => {
@@ -151,14 +148,11 @@ class MessageInput extends ElementMixin(ThemableMixin(ControllerMixin(PolymerEle
151
148
 
152
149
  this._button = btn;
153
150
  },
154
- );
151
+ });
155
152
  this.addController(this._buttonController);
156
153
 
157
- this._textAreaController = new SlotController(
158
- this,
159
- 'textarea',
160
- () => document.createElement('vaadin-text-area'),
161
- (_, textarea) => {
154
+ this._textAreaController = new SlotController(this, 'textarea', 'vaadin-text-area', {
155
+ initializer: (textarea) => {
162
156
  textarea.addEventListener('value-changed', (event) => {
163
157
  this.value = event.detail.value;
164
158
  });
@@ -180,7 +174,7 @@ class MessageInput extends ElementMixin(ThemableMixin(ControllerMixin(PolymerEle
180
174
 
181
175
  this._textArea = textarea;
182
176
  },
183
- );
177
+ });
184
178
  this.addController(this._textAreaController);
185
179
 
186
180
  this._tooltipController = new TooltipController(this);
@@ -225,6 +219,12 @@ class MessageInput extends ElementMixin(ThemableMixin(ControllerMixin(PolymerEle
225
219
  }
226
220
  this._textArea.focus();
227
221
  }
222
+
223
+ /**
224
+ * Fired when a new message is submitted with `<vaadin-message-input>`, either
225
+ * by clicking the "send" button, or pressing the Enter key.
226
+ * @event submit
227
+ */
228
228
  }
229
229
 
230
230
  customElements.define(MessageInput.is, MessageInput);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "24.0.0-alpha1",
4
+ "version": "24.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -74,7 +74,12 @@
74
74
  }
75
75
  }
76
76
  ],
77
- "events": []
77
+ "events": [
78
+ {
79
+ "name": "submit",
80
+ "description": "Fired when a new message is submitted with `<vaadin-message-input>`, either\nby clicking the \"send\" button, or pressing the Enter key."
81
+ }
82
+ ]
78
83
  }
79
84
  }
80
85
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "24.0.0-alpha1",
4
+ "version": "24.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -39,6 +39,13 @@
39
39
  "value": {
40
40
  "kind": "expression"
41
41
  }
42
+ },
43
+ {
44
+ "name": "@submit",
45
+ "description": "Fired when a new message is submitted with `<vaadin-message-input>`, either\nby clicking the \"send\" button, or pressing the Enter key.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
42
49
  }
43
50
  ]
44
51
  }