@vaadin/message-list 23.1.0-alpha3 → 23.1.0-beta2
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 +7 -7
- package/src/vaadin-message-avatar.js +1 -1
- package/src/vaadin-message-list.js +7 -9
- package/src/vaadin-message.js +6 -6
- package/theme/lumo/vaadin-message-avatar-styles.js +1 -1
- package/theme/lumo/vaadin-message-styles.js +1 -1
- package/theme/material/vaadin-message-avatar-styles.js +1 -1
- package/theme/material/vaadin-message-list-styles.js +1 -1
- package/theme/material/vaadin-message-styles.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/message-list",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/avatar": "23.1.0-
|
|
40
|
-
"@vaadin/component-base": "23.1.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
39
|
+
"@vaadin/avatar": "23.1.0-beta2",
|
|
40
|
+
"@vaadin/component-base": "23.1.0-beta2",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-beta2",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.1.0-beta2",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-beta2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
48
|
"sinon": "^13.0.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
|
|
51
51
|
}
|
|
@@ -65,11 +65,9 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
65
65
|
*/
|
|
66
66
|
items: {
|
|
67
67
|
type: Array,
|
|
68
|
-
value:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
observer: '_itemsChanged'
|
|
72
|
-
}
|
|
68
|
+
value: () => [],
|
|
69
|
+
observer: '_itemsChanged',
|
|
70
|
+
},
|
|
73
71
|
};
|
|
74
72
|
}
|
|
75
73
|
|
|
@@ -148,7 +146,7 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
148
146
|
return;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
//
|
|
149
|
+
// Get index of the item that was focused when event happened
|
|
152
150
|
const target = event.composedPath()[0];
|
|
153
151
|
let currentIndex = this._messages.indexOf(target);
|
|
154
152
|
|
|
@@ -166,7 +164,7 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
166
164
|
currentIndex = this._messages.length - 1;
|
|
167
165
|
break;
|
|
168
166
|
default:
|
|
169
|
-
return; //
|
|
167
|
+
return; // Nothing to do
|
|
170
168
|
}
|
|
171
169
|
if (currentIndex < 0) {
|
|
172
170
|
currentIndex = this._messages.length - 1;
|
|
@@ -206,8 +204,8 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
_getIndexOfFocusableElement() {
|
|
209
|
-
const index = this._messages.findIndex((e) => e.tabIndex
|
|
210
|
-
return index
|
|
207
|
+
const index = this._messages.findIndex((e) => e.tabIndex === 0);
|
|
208
|
+
return index !== -1 ? index : 0;
|
|
211
209
|
}
|
|
212
210
|
}
|
|
213
211
|
|
package/src/vaadin-message.js
CHANGED
|
@@ -59,7 +59,7 @@ class Message extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
59
59
|
* so the formatting is up to you.
|
|
60
60
|
*/
|
|
61
61
|
time: {
|
|
62
|
-
type: String
|
|
62
|
+
type: String,
|
|
63
63
|
},
|
|
64
64
|
|
|
65
65
|
/**
|
|
@@ -69,7 +69,7 @@ class Message extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
69
69
|
* Example: `message.userName = "Jessica Jacobs";`
|
|
70
70
|
*/
|
|
71
71
|
userName: {
|
|
72
|
-
type: String
|
|
72
|
+
type: String,
|
|
73
73
|
},
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -79,7 +79,7 @@ class Message extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
79
79
|
* Example: `message.userAbbr = "JJ";`
|
|
80
80
|
*/
|
|
81
81
|
userAbbr: {
|
|
82
|
-
type: String
|
|
82
|
+
type: String,
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -88,7 +88,7 @@ class Message extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
88
88
|
* Example: `message.userImg = "/static/img/avatar.jpg";`
|
|
89
89
|
*/
|
|
90
90
|
userImg: {
|
|
91
|
-
type: String
|
|
91
|
+
type: String,
|
|
92
92
|
},
|
|
93
93
|
|
|
94
94
|
/**
|
|
@@ -111,8 +111,8 @@ class Message extends FocusMixin(ElementMixin(ThemableMixin(PolymerElement))) {
|
|
|
111
111
|
* ```
|
|
112
112
|
*/
|
|
113
113
|
userColorIndex: {
|
|
114
|
-
type: Number
|
|
115
|
-
}
|
|
114
|
+
type: Number,
|
|
115
|
+
},
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|