@vaadin/virtual-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.
- package/custom-elements.json +311 -0
- package/package.json +11 -9
- package/src/vaadin-virtual-list.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "vaadin-virtual-list.js",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "js",
|
|
12
|
+
"name": "*",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "*",
|
|
15
|
+
"module": "src/vaadin-virtual-list.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"kind": "javascript-module",
|
|
22
|
+
"path": "src/vaadin-virtual-list-mixin.js",
|
|
23
|
+
"declarations": [
|
|
24
|
+
{
|
|
25
|
+
"kind": "mixin",
|
|
26
|
+
"description": "",
|
|
27
|
+
"name": "VirtualListMixin",
|
|
28
|
+
"members": [
|
|
29
|
+
{
|
|
30
|
+
"kind": "field",
|
|
31
|
+
"name": "firstVisibleIndex",
|
|
32
|
+
"description": "Gets the index of the first visible item in the viewport.",
|
|
33
|
+
"return": {
|
|
34
|
+
"type": {
|
|
35
|
+
"text": "number"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"readonly": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"kind": "field",
|
|
42
|
+
"name": "itemAccessibleNameGenerator",
|
|
43
|
+
"privacy": "public",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "function"
|
|
46
|
+
},
|
|
47
|
+
"description": "A function that generates accessible names for virtual list items.\nThe function gets the item as an argument and the\nreturn value should be a string representing that item. The\nresult gets applied to the corresponding virtual list child element\nas an `aria-label` attribute.",
|
|
48
|
+
"attribute": "item-accessible-name-generator"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "field",
|
|
52
|
+
"name": "items",
|
|
53
|
+
"privacy": "public",
|
|
54
|
+
"type": {
|
|
55
|
+
"text": "Array<!VirtualListItem> | undefined"
|
|
56
|
+
},
|
|
57
|
+
"description": "An array containing items determining how many instances to render.",
|
|
58
|
+
"attribute": "items"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"kind": "field",
|
|
62
|
+
"name": "lastVisibleIndex",
|
|
63
|
+
"description": "Gets the index of the last visible item in the viewport.",
|
|
64
|
+
"return": {
|
|
65
|
+
"type": {
|
|
66
|
+
"text": "number"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"readonly": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"kind": "field",
|
|
73
|
+
"name": "renderer",
|
|
74
|
+
"privacy": "public",
|
|
75
|
+
"type": {
|
|
76
|
+
"text": "VirtualListRenderer | undefined"
|
|
77
|
+
},
|
|
78
|
+
"description": "Custom function for rendering the content of every item.\nReceives three arguments:\n\n- `root` The render target element representing one item at a time.\n- `virtualList` The reference to the `<vaadin-virtual-list>` element.\n- `model` The object with the properties related with the rendered\n item, contains:\n - `model.index` The index of the rendered item.\n - `model.item` The item.",
|
|
79
|
+
"attribute": "renderer"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"kind": "method",
|
|
83
|
+
"name": "requestContentUpdate",
|
|
84
|
+
"description": "Requests an update for the content of the rows.\nWhile performing the update, it invokes the renderer passed in the `renderer` property for each visible row.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "method",
|
|
88
|
+
"name": "scrollToIndex",
|
|
89
|
+
"parameters": [
|
|
90
|
+
{
|
|
91
|
+
"name": "index",
|
|
92
|
+
"description": "Index to scroll to",
|
|
93
|
+
"type": {
|
|
94
|
+
"text": "number"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"description": "Scroll to a specific index in the virtual list."
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"attributes": [
|
|
102
|
+
{
|
|
103
|
+
"name": "item-accessible-name-generator",
|
|
104
|
+
"type": {
|
|
105
|
+
"text": "function"
|
|
106
|
+
},
|
|
107
|
+
"description": "A function that generates accessible names for virtual list items.\nThe function gets the item as an argument and the\nreturn value should be a string representing that item. The\nresult gets applied to the corresponding virtual list child element\nas an `aria-label` attribute.",
|
|
108
|
+
"fieldName": "itemAccessibleNameGenerator"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "renderer",
|
|
112
|
+
"type": {
|
|
113
|
+
"text": "VirtualListRenderer | undefined"
|
|
114
|
+
},
|
|
115
|
+
"description": "Custom function for rendering the content of every item.\nReceives three arguments:\n\n- `root` The render target element representing one item at a time.\n- `virtualList` The reference to the `<vaadin-virtual-list>` element.\n- `model` The object with the properties related with the rendered\n item, contains:\n - `model.index` The index of the rendered item.\n - `model.item` The item.",
|
|
116
|
+
"fieldName": "renderer"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"parameters": [
|
|
120
|
+
{
|
|
121
|
+
"name": "superClass"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"exports": [
|
|
127
|
+
{
|
|
128
|
+
"kind": "js",
|
|
129
|
+
"name": "VirtualListMixin",
|
|
130
|
+
"declaration": {
|
|
131
|
+
"name": "VirtualListMixin",
|
|
132
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"kind": "javascript-module",
|
|
139
|
+
"path": "src/vaadin-virtual-list.js",
|
|
140
|
+
"declarations": [
|
|
141
|
+
{
|
|
142
|
+
"kind": "class",
|
|
143
|
+
"description": "`<vaadin-virtual-list>` is a Web Component for displaying a virtual/infinite list of items.\n\n```html\n<vaadin-virtual-list></vaadin-virtual-list>\n```\n\n```js\nconst list = document.querySelector('vaadin-virtual-list');\nlist.items = items; // An array of data items\nlist.renderer = (root, list, {item, index}) => {\n root.textContent = `#${index}: ${item.name}`\n}\n```\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`overflow` | Set to `top`, `bottom`, both, or none.\n\n### Built-in Theme Variants\n\n`<vaadin-virtual-list>` supports the following theme variants:\n\nTheme variant | Description\n-----------------------------------------|---------------\n`theme=\"overflow-indicators\"` | Shows visual indicators at the top and bottom when the content is scrolled\n`theme=\"overflow-indicator-top\"` | Shows the visual indicator at the top when the content is scrolled\n`theme=\"overflow-indicator-top-bottom\"` | Shows the visual indicator at the bottom when the content is scrolled\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property | Description\n---------------------------------------|-------------\n`--vaadin-virtual-list-padding-block` | The CSS padding applied to top and bottom edges\n`--vaadin-virtual-list-padding-inline` | The CSS padding applied to left and right edges\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
144
|
+
"name": "VirtualList",
|
|
145
|
+
"members": [
|
|
146
|
+
{
|
|
147
|
+
"kind": "field",
|
|
148
|
+
"name": "firstVisibleIndex",
|
|
149
|
+
"description": "Gets the index of the first visible item in the viewport.",
|
|
150
|
+
"return": {
|
|
151
|
+
"type": {
|
|
152
|
+
"text": "number"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"readonly": true,
|
|
156
|
+
"inheritedFrom": {
|
|
157
|
+
"name": "VirtualListMixin",
|
|
158
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"kind": "field",
|
|
163
|
+
"name": "itemAccessibleNameGenerator",
|
|
164
|
+
"privacy": "public",
|
|
165
|
+
"type": {
|
|
166
|
+
"text": "function"
|
|
167
|
+
},
|
|
168
|
+
"description": "A function that generates accessible names for virtual list items.\nThe function gets the item as an argument and the\nreturn value should be a string representing that item. The\nresult gets applied to the corresponding virtual list child element\nas an `aria-label` attribute.",
|
|
169
|
+
"attribute": "item-accessible-name-generator",
|
|
170
|
+
"inheritedFrom": {
|
|
171
|
+
"name": "VirtualListMixin",
|
|
172
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"kind": "field",
|
|
177
|
+
"name": "items",
|
|
178
|
+
"privacy": "public",
|
|
179
|
+
"type": {
|
|
180
|
+
"text": "Array<!VirtualListItem> | undefined"
|
|
181
|
+
},
|
|
182
|
+
"description": "An array containing items determining how many instances to render.",
|
|
183
|
+
"attribute": "items",
|
|
184
|
+
"inheritedFrom": {
|
|
185
|
+
"name": "VirtualListMixin",
|
|
186
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"kind": "field",
|
|
191
|
+
"name": "lastVisibleIndex",
|
|
192
|
+
"description": "Gets the index of the last visible item in the viewport.",
|
|
193
|
+
"return": {
|
|
194
|
+
"type": {
|
|
195
|
+
"text": "number"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"readonly": true,
|
|
199
|
+
"inheritedFrom": {
|
|
200
|
+
"name": "VirtualListMixin",
|
|
201
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "field",
|
|
206
|
+
"name": "renderer",
|
|
207
|
+
"privacy": "public",
|
|
208
|
+
"type": {
|
|
209
|
+
"text": "VirtualListRenderer | undefined"
|
|
210
|
+
},
|
|
211
|
+
"description": "Custom function for rendering the content of every item.\nReceives three arguments:\n\n- `root` The render target element representing one item at a time.\n- `virtualList` The reference to the `<vaadin-virtual-list>` element.\n- `model` The object with the properties related with the rendered\n item, contains:\n - `model.index` The index of the rendered item.\n - `model.item` The item.",
|
|
212
|
+
"attribute": "renderer",
|
|
213
|
+
"inheritedFrom": {
|
|
214
|
+
"name": "VirtualListMixin",
|
|
215
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"kind": "method",
|
|
220
|
+
"name": "requestContentUpdate",
|
|
221
|
+
"description": "Requests an update for the content of the rows.\nWhile performing the update, it invokes the renderer passed in the `renderer` property for each visible row.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
|
|
222
|
+
"inheritedFrom": {
|
|
223
|
+
"name": "VirtualListMixin",
|
|
224
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"kind": "method",
|
|
229
|
+
"name": "scrollToIndex",
|
|
230
|
+
"parameters": [
|
|
231
|
+
{
|
|
232
|
+
"name": "index",
|
|
233
|
+
"description": "Index to scroll to",
|
|
234
|
+
"type": {
|
|
235
|
+
"text": "number"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"description": "Scroll to a specific index in the virtual list.",
|
|
240
|
+
"inheritedFrom": {
|
|
241
|
+
"name": "VirtualListMixin",
|
|
242
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"mixins": [
|
|
247
|
+
{
|
|
248
|
+
"name": "VirtualListMixin",
|
|
249
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "ThemableMixin",
|
|
253
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "ElementMixin",
|
|
257
|
+
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "PolylitMixin",
|
|
261
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"superclass": {
|
|
265
|
+
"name": "LitElement",
|
|
266
|
+
"package": "lit"
|
|
267
|
+
},
|
|
268
|
+
"tagName": "vaadin-virtual-list",
|
|
269
|
+
"customElement": true,
|
|
270
|
+
"attributes": [
|
|
271
|
+
{
|
|
272
|
+
"name": "item-accessible-name-generator",
|
|
273
|
+
"type": {
|
|
274
|
+
"text": "function"
|
|
275
|
+
},
|
|
276
|
+
"description": "A function that generates accessible names for virtual list items.\nThe function gets the item as an argument and the\nreturn value should be a string representing that item. The\nresult gets applied to the corresponding virtual list child element\nas an `aria-label` attribute.",
|
|
277
|
+
"fieldName": "itemAccessibleNameGenerator",
|
|
278
|
+
"inheritedFrom": {
|
|
279
|
+
"name": "VirtualListMixin",
|
|
280
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "renderer",
|
|
285
|
+
"type": {
|
|
286
|
+
"text": "VirtualListRenderer | undefined"
|
|
287
|
+
},
|
|
288
|
+
"description": "Custom function for rendering the content of every item.\nReceives three arguments:\n\n- `root` The render target element representing one item at a time.\n- `virtualList` The reference to the `<vaadin-virtual-list>` element.\n- `model` The object with the properties related with the rendered\n item, contains:\n - `model.index` The index of the rendered item.\n - `model.item` The item.",
|
|
289
|
+
"fieldName": "renderer",
|
|
290
|
+
"inheritedFrom": {
|
|
291
|
+
"name": "VirtualListMixin",
|
|
292
|
+
"module": "src/vaadin-virtual-list-mixin.js"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"events": []
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"exports": [
|
|
300
|
+
{
|
|
301
|
+
"kind": "js",
|
|
302
|
+
"name": "VirtualList",
|
|
303
|
+
"declaration": {
|
|
304
|
+
"name": "VirtualList",
|
|
305
|
+
"module": "src/vaadin-virtual-list.js"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/virtual-list",
|
|
3
|
-
"version": "25.1.0-
|
|
3
|
+
"version": "25.1.0-alpha8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"src",
|
|
26
26
|
"vaadin-*.d.ts",
|
|
27
27
|
"vaadin-*.js",
|
|
28
|
+
"custom-elements.json",
|
|
28
29
|
"web-types.json",
|
|
29
30
|
"web-types.lit.json"
|
|
30
31
|
],
|
|
@@ -37,22 +38,23 @@
|
|
|
37
38
|
],
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/component-base": "25.1.0-
|
|
41
|
-
"@vaadin/lit-renderer": "25.1.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "25.1.0-
|
|
41
|
+
"@vaadin/component-base": "25.1.0-alpha8",
|
|
42
|
+
"@vaadin/lit-renderer": "25.1.0-alpha8",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.1.0-alpha8",
|
|
43
44
|
"lit": "^3.0.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@vaadin/aura": "25.1.0-
|
|
47
|
-
"@vaadin/chai-plugins": "25.1.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.1.0-
|
|
47
|
+
"@vaadin/aura": "25.1.0-alpha8",
|
|
48
|
+
"@vaadin/chai-plugins": "25.1.0-alpha8",
|
|
49
|
+
"@vaadin/test-runner-commands": "25.1.0-alpha8",
|
|
49
50
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.1.0-
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "25.1.0-alpha8",
|
|
51
52
|
"sinon": "^21.0.0"
|
|
52
53
|
},
|
|
54
|
+
"customElements": "custom-elements.json",
|
|
53
55
|
"web-types": [
|
|
54
56
|
"web-types.json",
|
|
55
57
|
"web-types.lit.json"
|
|
56
58
|
],
|
|
57
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "810590c9c7682a9326c9352df795b5ea4891a71f"
|
|
58
60
|
}
|
|
@@ -55,7 +55,7 @@ import { VirtualListMixin } from './vaadin-virtual-list-mixin.js';
|
|
|
55
55
|
*
|
|
56
56
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
57
57
|
*
|
|
58
|
-
* @customElement
|
|
58
|
+
* @customElement vaadin-virtual-list
|
|
59
59
|
* @extends HTMLElement
|
|
60
60
|
* @mixes ElementMixin
|
|
61
61
|
* @mixes ThemableMixin
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED