@vaadin/virtual-list 23.2.0-alpha4 → 23.2.0-alpha5
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 +8 -8
- package/src/vaadin-virtual-list.d.ts +10 -1
- package/src/vaadin-virtual-list.js +13 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/virtual-list",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/component-base": "23.2.0-
|
|
42
|
-
"@vaadin/lit-renderer": "23.2.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "23.2.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
41
|
+
"@vaadin/component-base": "23.2.0-alpha5",
|
|
42
|
+
"@vaadin/lit-renderer": "23.2.0-alpha5",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha5",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "23.2.0-alpha5",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
|
-
"@vaadin/polymer-legacy-adapter": "23.2.0-
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "23.2.0-alpha5",
|
|
50
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
51
51
|
"lit": "^2.0.0",
|
|
52
52
|
"sinon": "^13.0.2"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c6247fd741d61096d75a71feda4a1faf88b6f0ce"
|
|
59
59
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
6
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
9
|
|
|
@@ -34,13 +35,21 @@ export type VirtualListRenderer<TItem> = (
|
|
|
34
35
|
* }
|
|
35
36
|
* ```
|
|
36
37
|
*
|
|
38
|
+
* The following state attributes are available for styling:
|
|
39
|
+
*
|
|
40
|
+
* Attribute | Description
|
|
41
|
+
* -----------------|--------------------------------------------
|
|
42
|
+
* `overflow` | Set to `top`, `bottom`, both, or none.
|
|
43
|
+
*
|
|
37
44
|
* See [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.
|
|
38
45
|
*
|
|
39
46
|
* @extends HTMLElement
|
|
40
47
|
* @mixes ElementMixin
|
|
41
48
|
* @mixes ThemableMixin
|
|
42
49
|
*/
|
|
43
|
-
declare class VirtualList<TItem = VirtualListDefaultItem> extends ElementMixin(
|
|
50
|
+
declare class VirtualList<TItem = VirtualListDefaultItem> extends ElementMixin(
|
|
51
|
+
ControllerMixin(ThemableMixin(HTMLElement)),
|
|
52
|
+
) {
|
|
44
53
|
/**
|
|
45
54
|
* Gets the index of the first visible item in the viewport.
|
|
46
55
|
*/
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
+
import { OverflowController } from '@vaadin/component-base/src/overflow-controller.js';
|
|
8
10
|
import { processTemplates } from '@vaadin/component-base/src/templates.js';
|
|
9
11
|
import { Virtualizer } from '@vaadin/component-base/src/virtualizer.js';
|
|
10
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -24,13 +26,20 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
24
26
|
* }
|
|
25
27
|
* ```
|
|
26
28
|
*
|
|
29
|
+
* The following state attributes are available for styling:
|
|
30
|
+
*
|
|
31
|
+
* Attribute | Description
|
|
32
|
+
* -----------------|--------------------------------------------
|
|
33
|
+
* `overflow` | Set to `top`, `bottom`, both, or none.
|
|
34
|
+
*
|
|
27
35
|
* See [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.
|
|
28
36
|
*
|
|
29
37
|
* @extends HTMLElement
|
|
38
|
+
* @mixes ControllerMixin
|
|
30
39
|
* @mixes ElementMixin
|
|
31
40
|
* @mixes ThemableMixin
|
|
32
41
|
*/
|
|
33
|
-
class VirtualList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
42
|
+
class VirtualList extends ElementMixin(ControllerMixin(ThemableMixin(PolymerElement))) {
|
|
34
43
|
static get template() {
|
|
35
44
|
return html`
|
|
36
45
|
<style>
|
|
@@ -104,6 +113,9 @@ class VirtualList extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
104
113
|
scrollContainer: this.shadowRoot.querySelector('#items'),
|
|
105
114
|
});
|
|
106
115
|
|
|
116
|
+
this.__overflowController = new OverflowController(this);
|
|
117
|
+
this.addController(this.__overflowController);
|
|
118
|
+
|
|
107
119
|
processTemplates(this);
|
|
108
120
|
}
|
|
109
121
|
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/virtual-list",
|
|
4
|
-
"version": "23.2.0-
|
|
4
|
+
"version": "23.2.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-virtual-list",
|
|
11
|
-
"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```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\nSee [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.",
|
|
11
|
+
"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```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\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`overflow` | Set to `top`, `bottom`, both, or none.\n\nSee [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "theme",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/virtual-list",
|
|
4
|
-
"version": "23.2.0-
|
|
4
|
+
"version": "23.2.0-alpha5",
|
|
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-virtual-list",
|
|
19
|
-
"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```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\nSee [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.",
|
|
19
|
+
"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```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\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`overflow` | Set to `top`, `bottom`, both, or none.\n\nSee [Virtual List](https://vaadin.com/docs/latest/ds/components/virtual-list) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|