@vaadin/component-base 25.0.0-alpha15 → 25.0.0-alpha16
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 +5 -5
- package/src/data-provider-controller/helpers.js +1 -1
- package/src/define.js +1 -1
- package/src/slot-controller.js +1 -1
- package/src/tooltip-controller.js +0 -1
- package/src/virtualizer.js +1 -3
- package/src/warnings.d.ts +10 -0
- package/src/warnings.js +27 -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-alpha16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
35
35
|
"@vaadin/vaadin-development-mode-detector": "^2.0.0",
|
|
36
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
36
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha16",
|
|
37
37
|
"@vaadin/vaadin-usage-statistics": "^2.1.0",
|
|
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-alpha16",
|
|
42
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha16",
|
|
43
43
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
44
|
"sinon": "^18.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "4b316158a4a4f702f032bc9940fc82f0faa840f4"
|
|
47
47
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @param {Cache} cache
|
|
20
20
|
* @param {number} flatIndex
|
|
21
|
+
* @param {number} level
|
|
21
22
|
*/
|
|
22
23
|
export function getFlatIndexContext(cache, flatIndex, level = 0) {
|
|
23
24
|
let levelIndex = flatIndex;
|
|
@@ -53,7 +54,6 @@ export function getFlatIndexContext(cache, flatIndex, level = 0) {
|
|
|
53
54
|
*
|
|
54
55
|
* If the item isn't found, the method returns undefined.
|
|
55
56
|
*
|
|
56
|
-
* @param {Cache} cache
|
|
57
57
|
* @param {{ getItemId: (item: unknown) => unknown}} context
|
|
58
58
|
* @param {Cache} cache
|
|
59
59
|
* @param {unknown} targetItem
|
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-alpha16') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
package/src/slot-controller.js
CHANGED
package/src/virtualizer.js
CHANGED
|
@@ -78,9 +78,7 @@ export class Virtualizer {
|
|
|
78
78
|
/**
|
|
79
79
|
* Flushes active asynchronous tasks so that the component and the DOM end up in a stable state
|
|
80
80
|
*
|
|
81
|
-
* @method
|
|
82
|
-
* @param {number | undefined} startIndex The start index of the range
|
|
83
|
-
* @param {number | undefined} endIndex The end index of the range
|
|
81
|
+
* @method flush
|
|
84
82
|
*/
|
|
85
83
|
flush() {
|
|
86
84
|
this.__adapter.flush();
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Issues a warning in the browser console if it has not been issued before.
|
|
9
|
+
*/
|
|
10
|
+
export declare function issueWarning(warning: string): void;
|
package/src/warnings.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
const issuedWarnings = new Set();
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Issues a warning in the browser console if it has not been issued before.
|
|
11
|
+
* @param {string} warning
|
|
12
|
+
*/
|
|
13
|
+
export function issueWarning(warning) {
|
|
14
|
+
if (issuedWarnings.has(warning)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
issuedWarnings.add(warning);
|
|
19
|
+
console.warn(warning);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Clears all issued warnings. Only intended for testing purposes.
|
|
24
|
+
*/
|
|
25
|
+
export function clearWarnings() {
|
|
26
|
+
issuedWarnings.clear();
|
|
27
|
+
}
|