🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@vaadin/component-base

Package Overview
Dependencies
Maintainers
12
Versions
618
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/component-base - npm Package Compare versions

Comparing version
25.2.1
to
25.2.2
+4
-4
package.json
{
"name": "@vaadin/component-base",
"version": "25.2.1",
"version": "25.2.2",
"publishConfig": {

@@ -41,4 +41,4 @@ "access": "public"

"devDependencies": {
"@vaadin/chai-plugins": "~25.2.1",
"@vaadin/test-runner-commands": "~25.2.1",
"@vaadin/chai-plugins": "~25.2.2",
"@vaadin/test-runner-commands": "~25.2.2",
"@vaadin/testing-helpers": "^2.0.0",

@@ -48,3 +48,3 @@ "sinon": "^22.0.0"

"customElements": "custom-elements.json",
"gitHead": "2a5e2ee168d3eddf191336d25768d247ea9e2f59"
"gitHead": "7d89c827505a3c4112a7aa228da445e39b5fed9a"
}

@@ -19,9 +19,2 @@ /**

/**
* The number of items to display per page.
*
* @type {number}
*/
pageSize;
/**
* An array of cached items.

@@ -55,2 +48,10 @@ *

/**
* The number of items per page.
*
* @type {number}
* @private
*/
#pageSize;
/**
* The number of items.

@@ -129,2 +130,25 @@ *

/**
* The number of items per page.
*
* @return {number}
*/
get pageSize() {
return this.#pageSize;
}
/**
* Sets the number of items per page for this cache and its descendants.
* Changing the page size discards all pending page requests.
*
* @param {number} pageSize
*/
set pageSize(pageSize) {
this.#pageSize = pageSize;
this.pendingRequests = {};
this.subCaches.forEach((subCache) => {
subCache.pageSize = pageSize;
});
}
/**
* The number of items.

@@ -131,0 +155,0 @@ *

@@ -33,9 +33,2 @@ /**

/**
* A number of items to display per page.
*
* @type {number}
*/
pageSize;
/**
* A callback that returns whether the given item is expanded.

@@ -82,3 +75,2 @@ *

this.host = host;
this.pageSize = pageSize;
this.getItemId = getItemId;

@@ -90,3 +82,3 @@ this.isExpanded = isExpanded;

this.dataProviderParams = dataProviderParams;
this.rootCache = this.#createRootCache(size);
this.rootCache = this.#createRootCache(pageSize, size);
}

@@ -101,2 +93,9 @@

/**
* The number of items per page in the root cache.
*/
get pageSize() {
return this.rootCache.pageSize;
}
/** @private */

@@ -120,3 +119,3 @@ get #cacheContext() {

/**
* Sets the page size and clears the cache.
* Sets the number of items per page in the root cache and any of its descendants.
*

@@ -126,4 +125,3 @@ * @param {number} pageSize

setPageSize(pageSize) {
this.pageSize = pageSize;
this.clearCache();
this.rootCache.pageSize = pageSize;
}

@@ -138,3 +136,2 @@

this.dataProvider = dataProvider;
this.clearCache();
}

@@ -153,3 +150,3 @@

clearCache() {
this.rootCache = this.#createRootCache(this.rootCache.size);
this.rootCache = this.#createRootCache(this.rootCache.pageSize, this.rootCache.size);
}

@@ -249,4 +246,4 @@

/** @private */
#createRootCache(size) {
return new Cache(this.#cacheContext, this.pageSize, size);
#createRootCache(pageSize, size) {
return new Cache(this.#cacheContext, pageSize, size);
}

@@ -262,3 +259,3 @@

page,
pageSize: this.pageSize,
pageSize: cache.pageSize,
parentItem: cache.parentItem,

@@ -265,0 +262,0 @@ };

@@ -16,3 +16,3 @@ /**

export function defineCustomElement(CustomElement, version = '25.2.1') {
export function defineCustomElement(CustomElement, version = '25.2.2') {
Object.defineProperty(CustomElement, 'version', {

@@ -19,0 +19,0 @@ get() {