@vaadin/message-input 25.2.0-alpha1 → 25.2.0-alpha11

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": "25.2.0-alpha1",
3
+ "version": "25.2.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,18 +35,18 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/button": "25.2.0-alpha1",
39
- "@vaadin/component-base": "25.2.0-alpha1",
40
- "@vaadin/text-area": "25.2.0-alpha1",
41
- "@vaadin/vaadin-themable-mixin": "25.2.0-alpha1",
38
+ "@vaadin/button": "25.2.0-alpha11",
39
+ "@vaadin/component-base": "25.2.0-alpha11",
40
+ "@vaadin/text-area": "25.2.0-alpha11",
41
+ "@vaadin/vaadin-themable-mixin": "25.2.0-alpha11",
42
42
  "lit": "^3.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@vaadin/aura": "25.2.0-alpha1",
46
- "@vaadin/chai-plugins": "25.2.0-alpha1",
47
- "@vaadin/test-runner-commands": "25.2.0-alpha1",
45
+ "@vaadin/aura": "25.2.0-alpha11",
46
+ "@vaadin/chai-plugins": "25.2.0-alpha11",
47
+ "@vaadin/test-runner-commands": "25.2.0-alpha11",
48
48
  "@vaadin/testing-helpers": "^2.0.0",
49
- "@vaadin/vaadin-lumo-styles": "25.2.0-alpha1",
49
+ "@vaadin/vaadin-lumo-styles": "25.2.0-alpha11",
50
50
  "sinon": "^21.0.2"
51
51
  },
52
52
  "customElements": "custom-elements.json",
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "866f813f89655a351cbd25328eba1fcb317e267d"
57
+ "gitHead": "fdc37e932709f95491a027aeb2090911cb7528c6"
58
58
  }
@@ -18,9 +18,6 @@ import { messageInputButtonStyles } from './styles/vaadin-message-input-button-s
18
18
  *
19
19
  * @customElement vaadin-message-input-button
20
20
  * @extends HTMLElement
21
- * @mixes ButtonMixin
22
- * @mixes DirMixin
23
- * @mixes ThemableMixin
24
21
  * @private
25
22
  */
26
23
  class MessageInputButton extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
@@ -12,12 +12,8 @@ const DEFAULT_I18N = {
12
12
  message: 'Message',
13
13
  };
14
14
 
15
- /**
16
- * @polymerMixin
17
- * @mixes I18nMixin
18
- */
19
15
  export const MessageInputMixin = (superClass) =>
20
- class MessageInputMixinClass extends I18nMixin(DEFAULT_I18N, superClass) {
16
+ class MessageInputMixinClass extends I18nMixin(superClass) {
21
17
  static get properties() {
22
18
  return {
23
19
  /**
@@ -55,11 +51,15 @@ export const MessageInputMixin = (superClass) =>
55
51
 
56
52
  static get observers() {
57
53
  return [
58
- '__buttonPropsChanged(_button, disabled, __effectiveI18n)',
54
+ '__buttonPropsChanged(_button, disabled, __effectiveI18n, value)',
59
55
  '__textAreaPropsChanged(_textArea, disabled, __effectiveI18n, value)',
60
56
  ];
61
57
  }
62
58
 
59
+ static get defaultI18n() {
60
+ return DEFAULT_I18N;
61
+ }
62
+
63
63
  /**
64
64
  * The object used to localize this component. To change the default
65
65
  * localization, replace this with an object that provides all properties, or
@@ -133,9 +133,9 @@ export const MessageInputMixin = (superClass) =>
133
133
  }
134
134
 
135
135
  /** @private */
136
- __buttonPropsChanged(button, disabled, effectiveI18n) {
136
+ __buttonPropsChanged(button, disabled, effectiveI18n, value) {
137
137
  if (button) {
138
- button.disabled = disabled;
138
+ button.disabled = disabled || !value;
139
139
  button.textContent = effectiveI18n.send;
140
140
  }
141
141
  }
@@ -165,10 +165,4 @@ export const MessageInputMixin = (superClass) =>
165
165
  }
166
166
  this._textArea.focus();
167
167
  }
168
-
169
- /**
170
- * Fired when a new message is submitted with `<vaadin-message-input>`, either
171
- * by clicking the "send" button, or pressing the Enter key.
172
- * @event submit
173
- */
174
168
  };
@@ -49,9 +49,6 @@ import { MessageInputMixin } from './vaadin-message-input-mixin.js';
49
49
  *
50
50
  * @customElement vaadin-message-input
51
51
  * @extends HTMLElement
52
- * @mixes MessageInputMixin
53
- * @mixes ThemableMixin
54
- * @mixes ElementMixin
55
52
  */
56
53
  class MessageInput extends MessageInputMixin(
57
54
  ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
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": "25.2.0-alpha1",
4
+ "version": "25.2.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -15,20 +15,7 @@
15
15
  "description": "Set to true to disable this element.",
16
16
  "value": {
17
17
  "type": [
18
- "boolean",
19
- "null",
20
- "undefined"
21
- ]
22
- }
23
- },
24
- {
25
- "name": "i18n",
26
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
27
- "value": {
28
- "type": [
29
- "Object",
30
- "null",
31
- "undefined"
18
+ "boolean"
32
19
  ]
33
20
  }
34
21
  },
@@ -48,9 +35,7 @@
48
35
  "description": "Current content of the text input field",
49
36
  "value": {
50
37
  "type": [
51
- "string",
52
- "null",
53
- "undefined"
38
+ "string"
54
39
  ]
55
40
  }
56
41
  }
@@ -62,9 +47,7 @@
62
47
  "description": "Set to true to disable this element.",
63
48
  "value": {
64
49
  "type": [
65
- "boolean",
66
- "null",
67
- "undefined"
50
+ "boolean"
68
51
  ]
69
52
  }
70
53
  },
@@ -73,7 +56,7 @@
73
56
  "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n // Used as the button label\n send: 'Send',\n\n // Used as the input field's placeholder and aria-label\n message: 'Message'\n}\n```",
74
57
  "value": {
75
58
  "type": [
76
- "?"
59
+ "Object"
77
60
  ]
78
61
  }
79
62
  },
@@ -82,9 +65,7 @@
82
65
  "description": "Current content of the text input field",
83
66
  "value": {
84
67
  "type": [
85
- "string",
86
- "null",
87
- "undefined"
68
+ "string"
88
69
  ]
89
70
  }
90
71
  }
@@ -92,7 +73,7 @@
92
73
  "events": [
93
74
  {
94
75
  "name": "submit",
95
- "description": "Fired when a new message is submitted with `<vaadin-message-input>`, either\nby clicking the \"send\" button, or pressing the Enter key."
76
+ "description": "Fired when a new message is submitted, either by clicking the \"send\" button, or pressing the Enter key."
96
77
  }
97
78
  ]
98
79
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "25.2.0-alpha1",
4
+ "version": "25.2.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  {
44
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.",
45
+ "description": "Fired when a new message is submitted, either by clicking the \"send\" button, or pressing the Enter key.",
46
46
  "value": {
47
47
  "kind": "expression"
48
48
  }