@vaadin/message-list 25.1.0-alpha6 → 25.1.0-alpha8

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.
@@ -0,0 +1,632 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "vaadin-message.js",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "module": "src/vaadin-message.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "vaadin-message-list.js",
23
+ "declarations": [],
24
+ "exports": [
25
+ {
26
+ "kind": "js",
27
+ "name": "*",
28
+ "declaration": {
29
+ "name": "*",
30
+ "module": "src/vaadin-message-list.js"
31
+ }
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "kind": "javascript-module",
37
+ "path": "src/vaadin-message-list-mixin.js",
38
+ "declarations": [
39
+ {
40
+ "kind": "mixin",
41
+ "description": "",
42
+ "name": "MessageListMixin",
43
+ "members": [
44
+ {
45
+ "kind": "field",
46
+ "name": "announceMessages",
47
+ "privacy": "public",
48
+ "type": {
49
+ "text": "boolean"
50
+ },
51
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
52
+ "attribute": "announce-messages"
53
+ },
54
+ {
55
+ "kind": "field",
56
+ "name": "items",
57
+ "privacy": "public",
58
+ "type": {
59
+ "text": "array"
60
+ },
61
+ "description": "An array of objects which will be rendered as messages.\nThe message objects can have the following properties:\n```js\nArray<{\n text: string,\n time: string,\n userName: string,\n userAbbr: string,\n userImg: string,\n userColorIndex: number,\n className: string,\n theme: string,\n attachments: Array<{\n name: string,\n url: string,\n type: string\n }>\n}>\n```\n\nWhen a message has attachments, they are rendered in the message's shadow DOM.\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.\nClicking an attachment dispatches an `attachment-click` event.",
62
+ "attribute": "items"
63
+ },
64
+ {
65
+ "kind": "field",
66
+ "name": "markdown",
67
+ "privacy": "public",
68
+ "type": {
69
+ "text": "boolean"
70
+ },
71
+ "description": "When set to `true`, the message text is parsed as Markdown.",
72
+ "attribute": "markdown"
73
+ }
74
+ ],
75
+ "events": [
76
+ {
77
+ "name": "attachment-click",
78
+ "type": {
79
+ "text": "CustomEvent"
80
+ }
81
+ }
82
+ ],
83
+ "attributes": [
84
+ {
85
+ "name": "announce-messages",
86
+ "type": {
87
+ "text": "boolean"
88
+ },
89
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
90
+ "fieldName": "announceMessages"
91
+ },
92
+ {
93
+ "name": "items",
94
+ "type": {
95
+ "text": "array"
96
+ },
97
+ "description": "An array of objects which will be rendered as messages.\nThe message objects can have the following properties:\n```js\nArray<{\n text: string,\n time: string,\n userName: string,\n userAbbr: string,\n userImg: string,\n userColorIndex: number,\n className: string,\n theme: string,\n attachments: Array<{\n name: string,\n url: string,\n type: string\n }>\n}>\n```\n\nWhen a message has attachments, they are rendered in the message's shadow DOM.\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.\nClicking an attachment dispatches an `attachment-click` event.",
98
+ "fieldName": "items"
99
+ },
100
+ {
101
+ "name": "markdown",
102
+ "type": {
103
+ "text": "boolean"
104
+ },
105
+ "description": "When set to `true`, the message text is parsed as Markdown.",
106
+ "fieldName": "markdown"
107
+ }
108
+ ],
109
+ "mixins": [
110
+ {
111
+ "name": "KeyboardDirectionMixin",
112
+ "package": "@vaadin/a11y-base/src/keyboard-direction-mixin.js"
113
+ }
114
+ ],
115
+ "parameters": [
116
+ {
117
+ "name": "superClass"
118
+ }
119
+ ]
120
+ }
121
+ ],
122
+ "exports": [
123
+ {
124
+ "kind": "js",
125
+ "name": "MessageListMixin",
126
+ "declaration": {
127
+ "name": "MessageListMixin",
128
+ "module": "src/vaadin-message-list-mixin.js"
129
+ }
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "kind": "javascript-module",
135
+ "path": "src/vaadin-message-list.js",
136
+ "declarations": [
137
+ {
138
+ "kind": "class",
139
+ "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
140
+ "name": "MessageList",
141
+ "members": [
142
+ {
143
+ "kind": "field",
144
+ "name": "announceMessages",
145
+ "privacy": "public",
146
+ "type": {
147
+ "text": "boolean"
148
+ },
149
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
150
+ "attribute": "announce-messages",
151
+ "inheritedFrom": {
152
+ "name": "MessageListMixin",
153
+ "module": "src/vaadin-message-list-mixin.js"
154
+ }
155
+ },
156
+ {
157
+ "kind": "field",
158
+ "name": "items",
159
+ "privacy": "public",
160
+ "type": {
161
+ "text": "array"
162
+ },
163
+ "description": "An array of objects which will be rendered as messages.\nThe message objects can have the following properties:\n```js\nArray<{\n text: string,\n time: string,\n userName: string,\n userAbbr: string,\n userImg: string,\n userColorIndex: number,\n className: string,\n theme: string,\n attachments: Array<{\n name: string,\n url: string,\n type: string\n }>\n}>\n```\n\nWhen a message has attachments, they are rendered in the message's shadow DOM.\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.\nClicking an attachment dispatches an `attachment-click` event.",
164
+ "attribute": "items",
165
+ "inheritedFrom": {
166
+ "name": "MessageListMixin",
167
+ "module": "src/vaadin-message-list-mixin.js"
168
+ }
169
+ },
170
+ {
171
+ "kind": "field",
172
+ "name": "markdown",
173
+ "privacy": "public",
174
+ "type": {
175
+ "text": "boolean"
176
+ },
177
+ "description": "When set to `true`, the message text is parsed as Markdown.",
178
+ "attribute": "markdown",
179
+ "inheritedFrom": {
180
+ "name": "MessageListMixin",
181
+ "module": "src/vaadin-message-list-mixin.js"
182
+ }
183
+ }
184
+ ],
185
+ "events": [
186
+ {
187
+ "name": "attachment-click",
188
+ "type": {
189
+ "text": "CustomEvent"
190
+ },
191
+ "description": "Fired when an attachment is clicked.",
192
+ "inheritedFrom": {
193
+ "name": "MessageListMixin",
194
+ "module": "src/vaadin-message-list-mixin.js"
195
+ }
196
+ }
197
+ ],
198
+ "mixins": [
199
+ {
200
+ "name": "SlotStylesMixin",
201
+ "package": "@vaadin/component-base/src/slot-styles-mixin.js"
202
+ },
203
+ {
204
+ "name": "MessageListMixin",
205
+ "module": "src/vaadin-message-list-mixin.js"
206
+ },
207
+ {
208
+ "name": "ElementMixin",
209
+ "package": "@vaadin/component-base/src/element-mixin.js"
210
+ },
211
+ {
212
+ "name": "ThemableMixin",
213
+ "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
214
+ },
215
+ {
216
+ "name": "PolylitMixin",
217
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
218
+ }
219
+ ],
220
+ "superclass": {
221
+ "name": "LitElement",
222
+ "package": "lit"
223
+ },
224
+ "tagName": "vaadin-message-list",
225
+ "customElement": true,
226
+ "attributes": [
227
+ {
228
+ "name": "announce-messages",
229
+ "type": {
230
+ "text": "boolean"
231
+ },
232
+ "description": "When set to `true`, new messages are announced to assistive technologies using ARIA live regions.",
233
+ "fieldName": "announceMessages",
234
+ "inheritedFrom": {
235
+ "name": "MessageListMixin",
236
+ "module": "src/vaadin-message-list-mixin.js"
237
+ }
238
+ },
239
+ {
240
+ "name": "items",
241
+ "type": {
242
+ "text": "array"
243
+ },
244
+ "description": "An array of objects which will be rendered as messages.\nThe message objects can have the following properties:\n```js\nArray<{\n text: string,\n time: string,\n userName: string,\n userAbbr: string,\n userImg: string,\n userColorIndex: number,\n className: string,\n theme: string,\n attachments: Array<{\n name: string,\n url: string,\n type: string\n }>\n}>\n```\n\nWhen a message has attachments, they are rendered in the message's shadow DOM.\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.\nClicking an attachment dispatches an `attachment-click` event.",
245
+ "fieldName": "items",
246
+ "inheritedFrom": {
247
+ "name": "MessageListMixin",
248
+ "module": "src/vaadin-message-list-mixin.js"
249
+ }
250
+ },
251
+ {
252
+ "name": "markdown",
253
+ "type": {
254
+ "text": "boolean"
255
+ },
256
+ "description": "When set to `true`, the message text is parsed as Markdown.",
257
+ "fieldName": "markdown",
258
+ "inheritedFrom": {
259
+ "name": "MessageListMixin",
260
+ "module": "src/vaadin-message-list-mixin.js"
261
+ }
262
+ }
263
+ ]
264
+ }
265
+ ],
266
+ "exports": [
267
+ {
268
+ "kind": "js",
269
+ "name": "MessageList",
270
+ "declaration": {
271
+ "name": "MessageList",
272
+ "module": "src/vaadin-message-list.js"
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ {
278
+ "kind": "javascript-module",
279
+ "path": "src/vaadin-message-mixin.js",
280
+ "declarations": [
281
+ {
282
+ "kind": "mixin",
283
+ "description": "",
284
+ "name": "MessageMixin",
285
+ "members": [
286
+ {
287
+ "kind": "field",
288
+ "name": "attachments",
289
+ "privacy": "public",
290
+ "type": {
291
+ "text": "Array<{name?: string, url?: string, type?: string}>"
292
+ },
293
+ "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
294
+ "attribute": "attachments"
295
+ },
296
+ {
297
+ "kind": "field",
298
+ "name": "time",
299
+ "privacy": "public",
300
+ "type": {
301
+ "text": "string"
302
+ },
303
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
304
+ "attribute": "time"
305
+ },
306
+ {
307
+ "kind": "field",
308
+ "name": "userAbbr",
309
+ "privacy": "public",
310
+ "type": {
311
+ "text": "string"
312
+ },
313
+ "description": "The abbreviation of the user.\nThe abbreviation will be passed on to avatar of the message.\nIf the user does not have an avatar picture set with `userImg`, `userAbbr` will be shown in the avatar.\nExample: `message.userAbbr = \"JJ\";`",
314
+ "attribute": "user-abbr"
315
+ },
316
+ {
317
+ "kind": "field",
318
+ "name": "userColorIndex",
319
+ "privacy": "public",
320
+ "type": {
321
+ "text": "number"
322
+ },
323
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
324
+ "attribute": "user-color-index"
325
+ },
326
+ {
327
+ "kind": "field",
328
+ "name": "userImg",
329
+ "privacy": "public",
330
+ "type": {
331
+ "text": "string"
332
+ },
333
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
334
+ "attribute": "user-img"
335
+ },
336
+ {
337
+ "kind": "field",
338
+ "name": "userName",
339
+ "privacy": "public",
340
+ "type": {
341
+ "text": "string"
342
+ },
343
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
344
+ "attribute": "user-name"
345
+ }
346
+ ],
347
+ "events": [
348
+ {
349
+ "name": "attachment-click",
350
+ "type": {
351
+ "text": "CustomEvent"
352
+ }
353
+ }
354
+ ],
355
+ "attributes": [
356
+ {
357
+ "name": "time",
358
+ "type": {
359
+ "text": "string"
360
+ },
361
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
362
+ "fieldName": "time"
363
+ },
364
+ {
365
+ "name": "user-abbr",
366
+ "type": {
367
+ "text": "string"
368
+ },
369
+ "description": "The abbreviation of the user.\nThe abbreviation will be passed on to avatar of the message.\nIf the user does not have an avatar picture set with `userImg`, `userAbbr` will be shown in the avatar.\nExample: `message.userAbbr = \"JJ\";`",
370
+ "fieldName": "userAbbr"
371
+ },
372
+ {
373
+ "name": "user-color-index",
374
+ "type": {
375
+ "text": "number"
376
+ },
377
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
378
+ "fieldName": "userColorIndex"
379
+ },
380
+ {
381
+ "name": "user-img",
382
+ "type": {
383
+ "text": "string"
384
+ },
385
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
386
+ "fieldName": "userImg"
387
+ },
388
+ {
389
+ "name": "user-name",
390
+ "type": {
391
+ "text": "string"
392
+ },
393
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
394
+ "fieldName": "userName"
395
+ }
396
+ ],
397
+ "mixins": [
398
+ {
399
+ "name": "FocusMixin",
400
+ "package": "@vaadin/a11y-base/src/focus-mixin.js"
401
+ }
402
+ ],
403
+ "parameters": [
404
+ {
405
+ "name": "superClass"
406
+ }
407
+ ]
408
+ }
409
+ ],
410
+ "exports": [
411
+ {
412
+ "kind": "js",
413
+ "name": "MessageMixin",
414
+ "declaration": {
415
+ "name": "MessageMixin",
416
+ "module": "src/vaadin-message-mixin.js"
417
+ }
418
+ }
419
+ ]
420
+ },
421
+ {
422
+ "kind": "javascript-module",
423
+ "path": "src/vaadin-message.js",
424
+ "declarations": [
425
+ {
426
+ "kind": "class",
427
+ "description": "`<vaadin-message>` is a Web Component for showing a single message with an author, message and time.\n\n```html\n<vaadin-message time=\"2021-01-28 10:43\"\n user-name = \"Bob Ross\"\n user-abbr = \"BR\"\n user-img = \"/static/img/avatar.jpg\">There is no real ending. It's just the place where you stop the story.</vaadin-message>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n--------------------|----------------\n`name` | Author's name\n`time` | When the message was posted\n`content` | The message itself as a slotted content\n`attachments` | Container for the attachments\n`attachment` | Individual attachment button\n`attachment-image` | Image attachment button (in addition to `attachment`)\n`attachment-file` | File attachment button (in addition to `attachment`)\n`attachment-preview`| Image preview inside an image attachment\n`attachment-icon` | File icon inside a file attachment\n`attachment-name` | File name inside a file attachment\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`focus-ring` | Set when the message is focused using the keyboard.\n`focused` | Set when the message is focused.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
428
+ "name": "Message",
429
+ "members": [
430
+ {
431
+ "kind": "field",
432
+ "name": "attachments",
433
+ "privacy": "public",
434
+ "type": {
435
+ "text": "Array<{name?: string, url?: string, type?: string}>"
436
+ },
437
+ "description": "An array of attachment objects to display with the message.\nEach attachment object can have the following properties:\n- `name`: The name of the attachment file\n- `url`: The URL of the attachment\n- `type`: The MIME type of the attachment (e.g., 'image/png', 'application/pdf')\n\nImage attachments (type starting with \"image/\") show a thumbnail preview,\nwhile other attachments show a document icon with the file name.",
438
+ "attribute": "attachments",
439
+ "inheritedFrom": {
440
+ "name": "MessageMixin",
441
+ "module": "src/vaadin-message-mixin.js"
442
+ }
443
+ },
444
+ {
445
+ "kind": "field",
446
+ "name": "time",
447
+ "privacy": "public",
448
+ "type": {
449
+ "text": "string"
450
+ },
451
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
452
+ "attribute": "time",
453
+ "inheritedFrom": {
454
+ "name": "MessageMixin",
455
+ "module": "src/vaadin-message-mixin.js"
456
+ }
457
+ },
458
+ {
459
+ "kind": "field",
460
+ "name": "userAbbr",
461
+ "privacy": "public",
462
+ "type": {
463
+ "text": "string"
464
+ },
465
+ "description": "The abbreviation of the user.\nThe abbreviation will be passed on to avatar of the message.\nIf the user does not have an avatar picture set with `userImg`, `userAbbr` will be shown in the avatar.\nExample: `message.userAbbr = \"JJ\";`",
466
+ "attribute": "user-abbr",
467
+ "inheritedFrom": {
468
+ "name": "MessageMixin",
469
+ "module": "src/vaadin-message-mixin.js"
470
+ }
471
+ },
472
+ {
473
+ "kind": "field",
474
+ "name": "userColorIndex",
475
+ "privacy": "public",
476
+ "type": {
477
+ "text": "number"
478
+ },
479
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
480
+ "attribute": "user-color-index",
481
+ "inheritedFrom": {
482
+ "name": "MessageMixin",
483
+ "module": "src/vaadin-message-mixin.js"
484
+ }
485
+ },
486
+ {
487
+ "kind": "field",
488
+ "name": "userImg",
489
+ "privacy": "public",
490
+ "type": {
491
+ "text": "string"
492
+ },
493
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
494
+ "attribute": "user-img",
495
+ "inheritedFrom": {
496
+ "name": "MessageMixin",
497
+ "module": "src/vaadin-message-mixin.js"
498
+ }
499
+ },
500
+ {
501
+ "kind": "field",
502
+ "name": "userName",
503
+ "privacy": "public",
504
+ "type": {
505
+ "text": "string"
506
+ },
507
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
508
+ "attribute": "user-name",
509
+ "inheritedFrom": {
510
+ "name": "MessageMixin",
511
+ "module": "src/vaadin-message-mixin.js"
512
+ }
513
+ }
514
+ ],
515
+ "events": [
516
+ {
517
+ "name": "attachment-click",
518
+ "type": {
519
+ "text": "CustomEvent"
520
+ },
521
+ "description": "Fired when an attachment is clicked.",
522
+ "inheritedFrom": {
523
+ "name": "MessageMixin",
524
+ "module": "src/vaadin-message-mixin.js"
525
+ }
526
+ }
527
+ ],
528
+ "mixins": [
529
+ {
530
+ "name": "MessageMixin",
531
+ "module": "src/vaadin-message-mixin.js"
532
+ },
533
+ {
534
+ "name": "ElementMixin",
535
+ "package": "@vaadin/component-base/src/element-mixin.js"
536
+ },
537
+ {
538
+ "name": "ThemableMixin",
539
+ "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
540
+ },
541
+ {
542
+ "name": "PolylitMixin",
543
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
544
+ },
545
+ {
546
+ "name": "LumoInjectionMixin",
547
+ "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
548
+ }
549
+ ],
550
+ "superclass": {
551
+ "name": "LitElement",
552
+ "package": "lit"
553
+ },
554
+ "tagName": "vaadin-message",
555
+ "customElement": true,
556
+ "attributes": [
557
+ {
558
+ "name": "time",
559
+ "type": {
560
+ "text": "string"
561
+ },
562
+ "description": "Time of sending the message. It is rendered as-is to the part='time' slot,\nso the formatting is up to you.",
563
+ "fieldName": "time",
564
+ "inheritedFrom": {
565
+ "name": "MessageMixin",
566
+ "module": "src/vaadin-message-mixin.js"
567
+ }
568
+ },
569
+ {
570
+ "name": "user-abbr",
571
+ "type": {
572
+ "text": "string"
573
+ },
574
+ "description": "The abbreviation of the user.\nThe abbreviation will be passed on to avatar of the message.\nIf the user does not have an avatar picture set with `userImg`, `userAbbr` will be shown in the avatar.\nExample: `message.userAbbr = \"JJ\";`",
575
+ "fieldName": "userAbbr",
576
+ "inheritedFrom": {
577
+ "name": "MessageMixin",
578
+ "module": "src/vaadin-message-mixin.js"
579
+ }
580
+ },
581
+ {
582
+ "name": "user-color-index",
583
+ "type": {
584
+ "text": "number"
585
+ },
586
+ "description": "A color index to be used to render the color of the avatar.\nWith no `userColorIndex` set, the basic avatar color will be used.\nBy setting a userColorIndex, the component will check if there exists a CSS variable defining the color, and uses it if there is one.\nIf now CSS variable is found for the color index, the property for the color will not be set.\n\nExample:\nCSS:\n```css\nhtml {\n --vaadin-user-color-1: red;\n}\n```\n\nJavaScript:\n```js\nmessage.userColorIndex = 1;\n```",
587
+ "fieldName": "userColorIndex",
588
+ "inheritedFrom": {
589
+ "name": "MessageMixin",
590
+ "module": "src/vaadin-message-mixin.js"
591
+ }
592
+ },
593
+ {
594
+ "name": "user-img",
595
+ "type": {
596
+ "text": "string"
597
+ },
598
+ "description": "An URL for a user image.\nThe image will be used in the avatar component to show who has sent the message.\nExample: `message.userImg = \"/static/img/avatar.jpg\";`",
599
+ "fieldName": "userImg",
600
+ "inheritedFrom": {
601
+ "name": "MessageMixin",
602
+ "module": "src/vaadin-message-mixin.js"
603
+ }
604
+ },
605
+ {
606
+ "name": "user-name",
607
+ "type": {
608
+ "text": "string"
609
+ },
610
+ "description": "The name of the user posting the message.\nIt will be placed in the name part to indicate who has sent the message.\nIt is also used as a tooltip for the avatar.\nExample: `message.userName = \"Jessica Jacobs\";`",
611
+ "fieldName": "userName",
612
+ "inheritedFrom": {
613
+ "name": "MessageMixin",
614
+ "module": "src/vaadin-message-mixin.js"
615
+ }
616
+ }
617
+ ]
618
+ }
619
+ ],
620
+ "exports": [
621
+ {
622
+ "kind": "js",
623
+ "name": "Message",
624
+ "declaration": {
625
+ "name": "Message",
626
+ "module": "src/vaadin-message.js"
627
+ }
628
+ }
629
+ ]
630
+ }
631
+ ]
632
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/message-list",
3
- "version": "25.1.0-alpha6",
3
+ "version": "25.1.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,6 +23,7 @@
23
23
  "src",
24
24
  "vaadin-*.d.ts",
25
25
  "vaadin-*.js",
26
+ "custom-elements.json",
26
27
  "web-types.json",
27
28
  "web-types.lit.json"
28
29
  ],
@@ -36,24 +37,25 @@
36
37
  ],
37
38
  "dependencies": {
38
39
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/a11y-base": "25.1.0-alpha6",
40
- "@vaadin/avatar": "25.1.0-alpha6",
41
- "@vaadin/component-base": "25.1.0-alpha6",
42
- "@vaadin/markdown": "25.1.0-alpha6",
43
- "@vaadin/vaadin-themable-mixin": "25.1.0-alpha6",
40
+ "@vaadin/a11y-base": "25.1.0-alpha8",
41
+ "@vaadin/avatar": "25.1.0-alpha8",
42
+ "@vaadin/component-base": "25.1.0-alpha8",
43
+ "@vaadin/markdown": "25.1.0-alpha8",
44
+ "@vaadin/vaadin-themable-mixin": "25.1.0-alpha8",
44
45
  "lit": "^3.0.0"
45
46
  },
46
47
  "devDependencies": {
47
- "@vaadin/aura": "25.1.0-alpha6",
48
- "@vaadin/chai-plugins": "25.1.0-alpha6",
49
- "@vaadin/test-runner-commands": "25.1.0-alpha6",
48
+ "@vaadin/aura": "25.1.0-alpha8",
49
+ "@vaadin/chai-plugins": "25.1.0-alpha8",
50
+ "@vaadin/test-runner-commands": "25.1.0-alpha8",
50
51
  "@vaadin/testing-helpers": "^2.0.0",
51
- "@vaadin/vaadin-lumo-styles": "25.1.0-alpha6",
52
+ "@vaadin/vaadin-lumo-styles": "25.1.0-alpha8",
52
53
  "sinon": "^21.0.0"
53
54
  },
55
+ "customElements": "custom-elements.json",
54
56
  "web-types": [
55
57
  "web-types.json",
56
58
  "web-types.lit.json"
57
59
  ],
58
- "gitHead": "da6f4194492cbd77d18c6c1cd8d4d9f072e9ce8d"
60
+ "gitHead": "810590c9c7682a9326c9352df795b5ea4891a71f"
59
61
  }
@@ -47,7 +47,7 @@ import { MessageListMixin } from './vaadin-message-list-mixin.js';
47
47
  *
48
48
  * @fires {CustomEvent} attachment-click - Fired when an attachment is clicked.
49
49
  *
50
- * @customElement
50
+ * @customElement vaadin-message-list
51
51
  * @extends HTMLElement
52
52
  * @mixes ThemableMixin
53
53
  * @mixes ElementMixin
@@ -137,6 +137,16 @@ export const MessageMixin = (superClass) =>
137
137
  * @private
138
138
  */
139
139
  __renderAttachments() {
140
+ if (
141
+ !(
142
+ window.Vaadin &&
143
+ window.Vaadin.featureFlags &&
144
+ (window.Vaadin.featureFlags.messageListAttachments || window.Vaadin.featureFlags.aiComponents)
145
+ )
146
+ ) {
147
+ return '';
148
+ }
149
+
140
150
  const attachments = this.attachments;
141
151
  if (!attachments || attachments.length === 0) {
142
152
  return '';
@@ -51,7 +51,7 @@ import { MessageMixin } from './vaadin-message-mixin.js';
51
51
  *
52
52
  * @fires {CustomEvent} attachment-click - Fired when an attachment is clicked.
53
53
  *
54
- * @customElement
54
+ * @customElement vaadin-message
55
55
  * @extends HTMLElement
56
56
  * @mixes MessageMixin
57
57
  * @mixes ThemableMixin
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-list",
4
- "version": "25.1.0-alpha6",
4
+ "version": "25.1.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -151,7 +151,7 @@
151
151
  },
152
152
  {
153
153
  "name": "vaadin-message-list",
154
- "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha6/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha6/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
154
+ "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
155
155
  "attributes": [
156
156
  {
157
157
  "name": "markdown",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/message-list",
4
- "version": "25.1.0-alpha6",
4
+ "version": "25.1.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -65,7 +65,7 @@
65
65
  },
66
66
  {
67
67
  "name": "vaadin-message-list",
68
- "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha6/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha6/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
68
+ "description": "`<vaadin-message-list>` is a Web Component for showing an ordered list of messages. The messages are rendered as <vaadin-message>\n\n### Example\n\nTo create a new message list, add the component to the page:\n\n```html\n<vaadin-message-list></vaadin-message-list>\n```\n\nProvide the messages to the message list with the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message-list#property-items) property.\n\n```js\ndocument.querySelector('vaadin-message-list').items = [\n { text: 'Hello list', time: 'yesterday', userName: 'Matt Mambo', userAbbr: 'MM', userColorIndex: 1 },\n { text: 'Another message', time: 'right now', userName: 'Linsey Listy', userAbbr: 'LL', userColorIndex: 2, userImg: '/static/img/avatar.jpg' }\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------|----------------\n`list` | The container wrapping messages.\n\nSee the [`<vaadin-message>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-alpha8/#/elements/vaadin-message) documentation for the available\nstate attributes and stylable shadow parts of message elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
69
69
  "extension": true,
70
70
  "attributes": [
71
71
  {