@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/message-list",
3
- "version": "23.1.0-alpha3",
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-alpha3",
40
- "@vaadin/component-base": "23.1.0-alpha3",
41
- "@vaadin/vaadin-lumo-styles": "23.1.0-alpha3",
42
- "@vaadin/vaadin-material-styles": "23.1.0-alpha3",
43
- "@vaadin/vaadin-themable-mixin": "23.1.0-alpha3"
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": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
50
+ "gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
51
51
  }
@@ -14,7 +14,7 @@ registerStyles(
14
14
  flex-shrink: 0;
15
15
  }
16
16
  `,
17
- { moduleId: 'vaadin-message-avatar-styles' }
17
+ { moduleId: 'vaadin-message-avatar-styles' },
18
18
  );
19
19
 
20
20
  /**
@@ -65,11 +65,9 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
65
65
  */
66
66
  items: {
67
67
  type: Array,
68
- value: function () {
69
- return [];
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
- // get index of the item that was focused when event happened
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; // nothing to do
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 == 0);
210
- return index != -1 ? index : 0;
207
+ const index = this._messages.findIndex((e) => e.tabIndex === 0);
208
+ return index !== -1 ? index : 0;
211
209
  }
212
210
  }
213
211
 
@@ -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
 
@@ -14,5 +14,5 @@ registerStyles(
14
14
  margin-right: calc(var(--vaadin-avatar-outline-width) * -1);
15
15
  }
16
16
  `,
17
- { moduleId: 'lumo-message-avatar' }
17
+ { moduleId: 'lumo-message-avatar' },
18
18
  );
@@ -50,5 +50,5 @@ registerStyles(
50
50
  font-size: var(--lumo-font-size-s);
51
51
  }
52
52
  `,
53
- { moduleId: 'lumo-message' }
53
+ { moduleId: 'lumo-message' },
54
54
  );
@@ -15,5 +15,5 @@ registerStyles(
15
15
  margin-right: calc(var(--vaadin-avatar-outline-width) * -1);
16
16
  }
17
17
  `,
18
- { moduleId: 'material-message-avatar' }
18
+ { moduleId: 'material-message-avatar' },
19
19
  );
@@ -10,5 +10,5 @@ registerStyles(
10
10
  padding: 8px 0;
11
11
  }
12
12
  `,
13
- { moduleId: 'material-message-list' }
13
+ { moduleId: 'material-message-list' },
14
14
  );
@@ -59,5 +59,5 @@ registerStyles(
59
59
  line-height: 1.25rem;
60
60
  }
61
61
  `,
62
- { moduleId: 'material-message' }
62
+ { moduleId: 'material-message' },
63
63
  );