@vaadin/message-input 22.0.0-alpha6 → 22.0.0-beta1
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,10 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/message-input",
|
|
3
|
-
"version": "22.0.0-
|
|
3
|
+
"version": "22.0.0-beta1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
4
7
|
"description": "vaadin-message-input",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/vaadin/web-components.git",
|
|
12
|
+
"directory": "packages/message-input"
|
|
13
|
+
},
|
|
14
|
+
"author": "Vaadin Ltd",
|
|
15
|
+
"homepage": "https://vaadin.com/components",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/vaadin/web-components/issues"
|
|
18
|
+
},
|
|
5
19
|
"main": "vaadin-message-input.js",
|
|
6
20
|
"module": "vaadin-message-input.js",
|
|
7
|
-
"
|
|
21
|
+
"files": [
|
|
22
|
+
"src",
|
|
23
|
+
"theme",
|
|
24
|
+
"vaadin-*.d.ts",
|
|
25
|
+
"vaadin-*.js"
|
|
26
|
+
],
|
|
8
27
|
"keywords": [
|
|
9
28
|
"Vaadin",
|
|
10
29
|
"message-input",
|
|
@@ -12,36 +31,19 @@
|
|
|
12
31
|
"web-component",
|
|
13
32
|
"polymer"
|
|
14
33
|
],
|
|
15
|
-
"author": "Vaadin Ltd",
|
|
16
|
-
"license": "Apache-2.0",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/vaadin/web-components/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://vaadin.com/components",
|
|
21
|
-
"files": [
|
|
22
|
-
"vaadin-*.d.ts",
|
|
23
|
-
"vaadin-*.js",
|
|
24
|
-
"src",
|
|
25
|
-
"theme"
|
|
26
|
-
],
|
|
27
34
|
"dependencies": {
|
|
28
35
|
"@polymer/polymer": "^3.0.0",
|
|
29
|
-
"@vaadin/
|
|
30
|
-
"@vaadin/
|
|
31
|
-
"@vaadin/text-area": "
|
|
32
|
-
"@vaadin/vaadin-
|
|
33
|
-
"@vaadin/vaadin-
|
|
34
|
-
"@vaadin/vaadin-
|
|
35
|
-
"@vaadin/vaadin-text-field": "^22.0.0-alpha6",
|
|
36
|
-
"@vaadin/vaadin-themable-mixin": "^22.0.0-alpha6"
|
|
36
|
+
"@vaadin/button": "22.0.0-beta1",
|
|
37
|
+
"@vaadin/component-base": "22.0.0-beta1",
|
|
38
|
+
"@vaadin/text-area": "22.0.0-beta1",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "22.0.0-beta1",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "22.0.0-beta1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "22.0.0-beta1"
|
|
37
42
|
},
|
|
38
43
|
"devDependencies": {
|
|
39
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
40
45
|
"@vaadin/testing-helpers": "^0.3.0",
|
|
41
46
|
"sinon": "^9.2.4"
|
|
42
47
|
},
|
|
43
|
-
"
|
|
44
|
-
"access": "public"
|
|
45
|
-
},
|
|
46
|
-
"gitHead": "4b136b1c7da8942960e7255f40c27859125b3a45"
|
|
48
|
+
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
|
|
47
49
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
1
6
|
import { Button } from '@vaadin/button/src/vaadin-button.js';
|
|
2
7
|
|
|
3
8
|
/**
|
|
@@ -6,10 +11,10 @@ import { Button } from '@vaadin/button/src/vaadin-button.js';
|
|
|
6
11
|
* @extends Button
|
|
7
12
|
* @protected
|
|
8
13
|
*/
|
|
9
|
-
declare class
|
|
14
|
+
declare class MessageInputButton extends Button {}
|
|
10
15
|
|
|
11
16
|
declare global {
|
|
12
17
|
interface HTMLElementTagNameMap {
|
|
13
|
-
'vaadin-message-input-button':
|
|
18
|
+
'vaadin-message-input-button': MessageInputButton;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
1
7
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
2
8
|
|
|
3
|
-
import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
|
|
4
|
-
|
|
5
9
|
export interface MessageInputI18n {
|
|
6
10
|
send: string;
|
|
7
11
|
message: string;
|
|
@@ -13,11 +17,11 @@ export interface MessageInputI18n {
|
|
|
13
17
|
*/
|
|
14
18
|
export type MessageInputSubmitEvent = CustomEvent<{ value: string }>;
|
|
15
19
|
|
|
16
|
-
export interface
|
|
20
|
+
export interface MessageInputCustomEventMap {
|
|
17
21
|
submit: MessageInputSubmitEvent;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
export type MessageInputEventMap = HTMLElementEventMap &
|
|
24
|
+
export type MessageInputEventMap = HTMLElementEventMap & MessageInputCustomEventMap;
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
27
|
* `<vaadin-message-input>` is a Web Component for sending messages.
|
|
@@ -31,7 +35,7 @@ export type MessageInputEventMap = HTMLElementEventMap & MessageInputElementEven
|
|
|
31
35
|
* <vaadin-message-input></vaadin-message-input>
|
|
32
36
|
* ```
|
|
33
37
|
*/
|
|
34
|
-
declare class
|
|
38
|
+
declare class MessageInput extends ThemableMixin(ElementMixin(HTMLElement)) {
|
|
35
39
|
/**
|
|
36
40
|
* Current content of the text input field
|
|
37
41
|
*/
|
|
@@ -63,21 +67,21 @@ declare class MessageInputElement extends ThemableMixin(ElementMixin(HTMLElement
|
|
|
63
67
|
|
|
64
68
|
addEventListener<K extends keyof MessageInputEventMap>(
|
|
65
69
|
type: K,
|
|
66
|
-
listener: (this:
|
|
70
|
+
listener: (this: MessageInput, ev: MessageInputEventMap[K]) => void,
|
|
67
71
|
options?: boolean | AddEventListenerOptions
|
|
68
72
|
): void;
|
|
69
73
|
|
|
70
74
|
removeEventListener<K extends keyof MessageInputEventMap>(
|
|
71
75
|
type: K,
|
|
72
|
-
listener: (this:
|
|
76
|
+
listener: (this: MessageInput, ev: MessageInputEventMap[K]) => void,
|
|
73
77
|
options?: boolean | EventListenerOptions
|
|
74
78
|
): void;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
declare global {
|
|
78
82
|
interface HTMLElementTagNameMap {
|
|
79
|
-
'vaadin-message-input':
|
|
83
|
+
'vaadin-message-input': MessageInput;
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
export {
|
|
87
|
+
export { MessageInput };
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
|
|
7
|
+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
|
-
import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
|
|
9
9
|
import './vaadin-message-input-text-area.js';
|
|
10
10
|
import './vaadin-message-input-button.js';
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* `<vaadin-message-input>` is a Web Component for sending messages.
|
|
13
14
|
* It consists of a text area that grows on along with the content, and a send button to send message.
|
|
@@ -32,7 +33,7 @@ import './vaadin-message-input-button.js';
|
|
|
32
33
|
* @mixes ThemableMixin
|
|
33
34
|
* @mixes ElementMixin
|
|
34
35
|
*/
|
|
35
|
-
class
|
|
36
|
+
class MessageInput extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
36
37
|
static get properties() {
|
|
37
38
|
return {
|
|
38
39
|
/**
|
|
@@ -41,6 +42,7 @@ class MessageInputElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
41
42
|
value: {
|
|
42
43
|
type: String
|
|
43
44
|
},
|
|
45
|
+
|
|
44
46
|
/**
|
|
45
47
|
*
|
|
46
48
|
* The object used to localize this component.
|
|
@@ -126,6 +128,6 @@ class MessageInputElement extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
customElements.define(
|
|
131
|
+
customElements.define(MessageInput.is, MessageInput);
|
|
130
132
|
|
|
131
|
-
export {
|
|
133
|
+
export { MessageInput };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '../../vaadin-message-input.js';
|
|
2
|
-
|
|
3
|
-
import { MessageInputSubmitEvent } from '../../vaadin-message-input.js';
|
|
4
|
-
|
|
5
|
-
const assertType = <TExpected>(actual: TExpected) => actual;
|
|
6
|
-
|
|
7
|
-
const input = document.createElement('vaadin-message-input');
|
|
8
|
-
|
|
9
|
-
input.addEventListener('submit', (event) => {
|
|
10
|
-
assertType<MessageInputSubmitEvent>(event);
|
|
11
|
-
assertType<string>(event.detail.value);
|
|
12
|
-
});
|