@vaadin/message-input 25.4.0-alpha3 → 25.4.0-alpha4

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.
@@ -39,16 +39,11 @@
39
39
  {
40
40
  "kind": "field",
41
41
  "name": "i18n",
42
- "privacy": "public",
42
+ "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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```",
43
43
  "type": {
44
- "text": "Object | undefined"
44
+ "text": "MessageInputI18n | undefined"
45
45
  },
46
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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```",
47
- "attribute": "i18n",
48
- "inheritedFrom": {
49
- "name": "I18nMixin",
50
- "package": "@vaadin/component-base/src/i18n-mixin.js"
51
- }
46
+ "privacy": "public"
52
47
  },
53
48
  {
54
49
  "kind": "field",
@@ -78,18 +73,6 @@
78
73
  "description": "Set to true to disable this element.",
79
74
  "fieldName": "disabled"
80
75
  },
81
- {
82
- "name": "i18n",
83
- "type": {
84
- "text": "Object | undefined"
85
- },
86
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
87
- "fieldName": "i18n",
88
- "inheritedFrom": {
89
- "name": "I18nMixin",
90
- "package": "@vaadin/component-base/src/i18n-mixin.js"
91
- }
92
- },
93
76
  {
94
77
  "name": "value",
95
78
  "type": {
@@ -153,15 +136,14 @@
153
136
  {
154
137
  "kind": "field",
155
138
  "name": "i18n",
156
- "privacy": "public",
139
+ "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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```",
157
140
  "type": {
158
- "text": "Object | undefined"
141
+ "text": "MessageInputI18n | undefined"
159
142
  },
160
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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```",
161
- "attribute": "i18n",
143
+ "privacy": "public",
162
144
  "inheritedFrom": {
163
- "name": "I18nMixin",
164
- "package": "@vaadin/component-base/src/i18n-mixin.js"
145
+ "name": "MessageInputMixin",
146
+ "module": "src/vaadin-message-input-mixin.js"
165
147
  }
166
148
  },
167
149
  {
@@ -181,15 +163,11 @@
181
163
  ],
182
164
  "events": [
183
165
  {
184
- "name": "submit",
185
166
  "type": {
186
167
  "text": "CustomEvent"
187
168
  },
188
169
  "description": "Fired when a new message is submitted, either by clicking the \"send\" button, or pressing the Enter key.",
189
- "inheritedFrom": {
190
- "name": "MessageInputMixin",
191
- "module": "src/vaadin-message-input-mixin.js"
192
- }
170
+ "name": "submit"
193
171
  }
194
172
  ],
195
173
  "attributes": [
@@ -205,18 +183,6 @@
205
183
  "module": "src/vaadin-message-input-mixin.js"
206
184
  }
207
185
  },
208
- {
209
- "name": "i18n",
210
- "type": {
211
- "text": "Object | undefined"
212
- },
213
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
214
- "fieldName": "i18n",
215
- "inheritedFrom": {
216
- "name": "I18nMixin",
217
- "package": "@vaadin/component-base/src/i18n-mixin.js"
218
- }
219
- },
220
186
  {
221
187
  "type": {
222
188
  "text": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/message-input",
3
- "version": "25.4.0-alpha3",
3
+ "version": "25.4.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,19 +35,19 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.4.0-alpha3",
39
- "@vaadin/button": "25.4.0-alpha3",
40
- "@vaadin/component-base": "25.4.0-alpha3",
41
- "@vaadin/text-area": "25.4.0-alpha3",
42
- "@vaadin/vaadin-themable-mixin": "25.4.0-alpha3",
38
+ "@vaadin/a11y-base": "25.4.0-alpha4",
39
+ "@vaadin/button": "25.4.0-alpha4",
40
+ "@vaadin/component-base": "25.4.0-alpha4",
41
+ "@vaadin/text-area": "25.4.0-alpha4",
42
+ "@vaadin/vaadin-themable-mixin": "25.4.0-alpha4",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/aura": "25.4.0-alpha3",
47
- "@vaadin/chai-plugins": "25.4.0-alpha3",
48
- "@vaadin/test-runner-commands": "25.4.0-alpha3",
46
+ "@vaadin/aura": "25.4.0-alpha4",
47
+ "@vaadin/chai-plugins": "25.4.0-alpha4",
48
+ "@vaadin/test-runner-commands": "25.4.0-alpha4",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.4.0-alpha3",
50
+ "@vaadin/vaadin-lumo-styles": "25.4.0-alpha4",
51
51
  "sinon": "^22.0.0"
52
52
  },
53
53
  "customElements": "custom-elements.json",
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "db7e679c1a8af00840cc05ddcbefff68dfed1e45"
58
+ "gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
59
59
  }
@@ -46,6 +46,10 @@ export class ButtonController extends SlotController {
46
46
  setLabel(label) {
47
47
  const { node } = this;
48
48
 
49
+ if (!node) {
50
+ return;
51
+ }
52
+
49
53
  if (node === this.defaultNode) {
50
54
  node.textContent = label;
51
55
  return;
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "25.4.0-alpha3",
4
+ "version": "25.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-message-input",
11
- "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Slots\n\nThe following slots are available for adding content to the message input:\n\nName | Description\n-----------|-------------\n`header` | Content displayed above the text area and controls\n`prefix` | Content displayed before the text area\n`button` | Button that submits the message, replacing the default one\n`footer` | Content displayed below the text area and controls\n\nWhen a custom button has no text content or accessible label, `aria-label` attribute\nis set based on the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha3/#/elements/vaadin-message-input#property-i18n) property.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the text area is focused\n`focus-ring` | Set when the text area is focused using the keyboard\n`has-header` | Set when the element has content in the header slot\n`has-prefix` | Set when the element has content in the prefix slot\n`has-footer` | Set when the element has content in the footer slot\n`has-tooltip` | Set when the element has a slotted tooltip\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Slots\n\nThe following slots are available for adding content to the message input:\n\nName | Description\n-----------|-------------\n`header` | Content displayed above the text area and controls\n`prefix` | Content displayed before the text area\n`button` | Button that submits the message, replacing the default one\n`footer` | Content displayed below the text area and controls\n\nWhen a custom button has no text content or accessible label, `aria-label` attribute\nis set based on the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha4/#/elements/vaadin-message-input#property-i18n) property.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the text area is focused\n`focus-ring` | Set when the text area is focused using the keyboard\n`has-header` | Set when the element has content in the header slot\n`has-prefix` | Set when the element has content in the prefix slot\n`has-footer` | Set when the element has content in the footer slot\n`has-tooltip` | Set when the element has a slotted tooltip\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -54,7 +54,7 @@
54
54
  "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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```",
55
55
  "value": {
56
56
  "type": [
57
- "Object",
57
+ "MessageInputI18n",
58
58
  "undefined"
59
59
  ]
60
60
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-input",
4
- "version": "25.4.0-alpha3",
4
+ "version": "25.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-message-input",
19
- "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Slots\n\nThe following slots are available for adding content to the message input:\n\nName | Description\n-----------|-------------\n`header` | Content displayed above the text area and controls\n`prefix` | Content displayed before the text area\n`button` | Button that submits the message, replacing the default one\n`footer` | Content displayed below the text area and controls\n\nWhen a custom button has no text content or accessible label, `aria-label` attribute\nis set based on the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha3/#/elements/vaadin-message-input#property-i18n) property.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the text area is focused\n`focus-ring` | Set when the text area is focused using the keyboard\n`has-header` | Set when the element has content in the header slot\n`has-prefix` | Set when the element has content in the prefix slot\n`has-footer` | Set when the element has content in the footer slot\n`has-tooltip` | Set when the element has a slotted tooltip\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-message-input>` is a Web Component for sending messages.\nIt consists of a text area that grows on along with the content, and a send button to send message.\n\nThe message can be sent by one of the following actions:\n- by pressing Enter (use Shift + Enter to add a new line)\n- by clicking `submit` button.\n\n```html\n<vaadin-message-input></vaadin-message-input>\n```\n\n### Slots\n\nThe following slots are available for adding content to the message input:\n\nName | Description\n-----------|-------------\n`header` | Content displayed above the text area and controls\n`prefix` | Content displayed before the text area\n`button` | Button that submits the message, replacing the default one\n`footer` | Content displayed below the text area and controls\n\nWhen a custom button has no text content or accessible label, `aria-label` attribute\nis set based on the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/25.4.0-alpha4/#/elements/vaadin-message-input#property-i18n) property.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the text area is focused\n`focus-ring` | Set when the text area is focused using the keyboard\n`has-header` | Set when the element has content in the header slot\n`has-prefix` | Set when the element has content in the prefix slot\n`has-footer` | Set when the element has content in the footer slot\n`has-tooltip` | Set when the element has a slotted tooltip\n\n### Internal components\n\nIn addition to `<vaadin-message-input>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-message-input-button>` - has the same API as `<vaadin-button>`\n- `<vaadin-text-area>`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {