@vaadin/component-base 25.0.0-alpha3 → 25.0.0-alpha4
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 +4 -4
- package/src/browser-utils.js +0 -3
- package/src/data-provider-controller/cache.d.ts +0 -38
- package/src/data-provider-controller/cache.js +0 -76
- package/src/data-provider-controller/data-provider-controller.js +0 -2
- package/src/define.js +1 -1
- package/src/gestures.js +0 -1
- package/src/iron-list-core.js +0 -1
- package/src/virtualizer.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
41
|
+
"@vaadin/chai-plugins": "25.0.0-alpha4",
|
|
42
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha4",
|
|
43
43
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
44
|
"sinon": "^18.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ce4421f0daf26027b863b91787a474e4cc264344"
|
|
47
47
|
}
|
package/src/browser-utils.js
CHANGED
|
@@ -58,14 +58,6 @@ export class Cache<TItem> {
|
|
|
58
58
|
*/
|
|
59
59
|
get flatSize(): number;
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* The total number of items, including items from expanded sub-caches.
|
|
63
|
-
*
|
|
64
|
-
* @protected
|
|
65
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
66
|
-
*/
|
|
67
|
-
get effectiveSize(): number;
|
|
68
|
-
|
|
69
61
|
constructor(
|
|
70
62
|
context: CacheContext<TItem>,
|
|
71
63
|
pageSize: number,
|
|
@@ -113,34 +105,4 @@ export class Cache<TItem> {
|
|
|
113
105
|
* of an item in the `items` array.
|
|
114
106
|
*/
|
|
115
107
|
getFlatIndex(index: number): number;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
119
|
-
*/
|
|
120
|
-
getItemForIndex(index: number): TItem | undefined;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
124
|
-
*/
|
|
125
|
-
getCacheAndIndex(index: number): { cache: Cache<TItem>; scaledIndex: number };
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
129
|
-
*/
|
|
130
|
-
updateSize(): void;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
134
|
-
*/
|
|
135
|
-
ensureSubCacheForScaledIndex(scaledIndex: number): void;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
139
|
-
*/
|
|
140
|
-
get grid(): HTMLElement;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
144
|
-
*/
|
|
145
|
-
get itemCaches(): object;
|
|
146
108
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { getFlatIndexContext } from './helpers.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* A class that stores items with their associated sub-caches.
|
|
@@ -124,19 +123,6 @@ export class Cache {
|
|
|
124
123
|
return this.__flatSize;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
|
-
/**
|
|
128
|
-
* The total number of items, including items from expanded sub-caches.
|
|
129
|
-
*
|
|
130
|
-
* @protected
|
|
131
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
132
|
-
*/
|
|
133
|
-
get effectiveSize() {
|
|
134
|
-
console.warn(
|
|
135
|
-
'<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25.',
|
|
136
|
-
);
|
|
137
|
-
return this.flatSize;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
126
|
/**
|
|
141
127
|
* The number of items.
|
|
142
128
|
*
|
|
@@ -261,66 +247,4 @@ export class Cache {
|
|
|
261
247
|
return clampedIndex > index ? prev + subCache.flatSize : prev;
|
|
262
248
|
}, clampedIndex);
|
|
263
249
|
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
267
|
-
*/
|
|
268
|
-
getItemForIndex(index) {
|
|
269
|
-
console.warn(
|
|
270
|
-
'<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.',
|
|
271
|
-
);
|
|
272
|
-
const { item } = getFlatIndexContext(this, index);
|
|
273
|
-
return item;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
278
|
-
*/
|
|
279
|
-
getCacheAndIndex(index) {
|
|
280
|
-
console.warn(
|
|
281
|
-
'<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.',
|
|
282
|
-
);
|
|
283
|
-
const { cache, index: scaledIndex } = getFlatIndexContext(this, index);
|
|
284
|
-
return { cache, scaledIndex };
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
289
|
-
*/
|
|
290
|
-
updateSize() {
|
|
291
|
-
console.warn('<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25.');
|
|
292
|
-
this.recalculateFlatSize();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
297
|
-
*/
|
|
298
|
-
ensureSubCacheForScaledIndex(scaledIndex) {
|
|
299
|
-
console.warn(
|
|
300
|
-
'<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.',
|
|
301
|
-
);
|
|
302
|
-
|
|
303
|
-
if (!this.getSubCache(scaledIndex)) {
|
|
304
|
-
const subCache = this.createSubCache(scaledIndex);
|
|
305
|
-
this.context.__controller.__loadCachePage(subCache, 0);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
311
|
-
*/
|
|
312
|
-
get grid() {
|
|
313
|
-
console.warn('<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25.');
|
|
314
|
-
return this.context.__controller.host;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* @deprecated since 24.3 and will be removed in Vaadin 25.
|
|
319
|
-
*/
|
|
320
|
-
get itemCaches() {
|
|
321
|
-
console.warn(
|
|
322
|
-
'<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25.',
|
|
323
|
-
);
|
|
324
|
-
return this.__subCacheByIndex;
|
|
325
|
-
}
|
|
326
250
|
}
|
|
@@ -100,8 +100,6 @@ export class DataProviderController extends EventTarget {
|
|
|
100
100
|
return {
|
|
101
101
|
isExpanded: this.isExpanded,
|
|
102
102
|
placeholder: this.placeholder,
|
|
103
|
-
// The controller instance is needed to ensure deprecated cache methods work.
|
|
104
|
-
__controller: this,
|
|
105
103
|
};
|
|
106
104
|
}
|
|
107
105
|
|
package/src/define.js
CHANGED
|
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
|
|
|
13
13
|
|
|
14
14
|
const experimentalMap = {};
|
|
15
15
|
|
|
16
|
-
export function defineCustomElement(CustomElement, version = '25.0.0-
|
|
16
|
+
export function defineCustomElement(CustomElement, version = '25.0.0-alpha4') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
package/src/gestures.js
CHANGED
package/src/iron-list-core.js
CHANGED
|
@@ -347,7 +347,6 @@ export const ironList = {
|
|
|
347
347
|
ith = this._physicalEnd;
|
|
348
348
|
offsetContent = bottom - scrollBottom;
|
|
349
349
|
}
|
|
350
|
-
// eslint-disable-next-line no-constant-condition
|
|
351
350
|
while (true) {
|
|
352
351
|
physicalItemHeight = this._getPhysicalSizeIncrement(ith);
|
|
353
352
|
offsetContent -= physicalItemHeight;
|
package/src/virtualizer.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
1
6
|
import { IronListAdapter } from './virtualizer-iron-list-adapter.js';
|
|
2
7
|
|
|
3
8
|
export class Virtualizer {
|