New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-custom-field

Package Overview
Dependencies
Maintainers
12
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-custom-field - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

15

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-custom-field",
"version": "1.3.1",
"version": "1.4.0",
"main": "vaadin-custom-field.js",

@@ -29,4 +29,2 @@ "author": "Vaadin Ltd",

"resolutions": {
"es-abstract": "1.17.6",
"@types/doctrine": "0.0.3",
"inherits": "2.0.3",

@@ -44,6 +42,5 @@ "samsam": "1.1.3",

},
"scripts": {
"generate-typings": "gen-typescript-declarations --outDir . --verify"
},
"devDependencies": {
"devDependencies": {
"@web-padawan/gen-typescript-declarations": "^1.6.2",
"web-component-tester": "6.9.2",
"@polymer/iron-component-page": "^4.0.0",

@@ -61,3 +58,7 @@ "@polymer/iron-test-helpers": "^3.0.0",

"@vaadin/vaadin-list-box": "^1.3.0"
},
"scripts": {
"generate-typings": "gen-typescript-declarations --outDir . --verify",
"test": "wct --npm"
}
}

@@ -103,7 +103,14 @@ /**

helperText: string|null;
_setInvalid(invalid: boolean): void;
/**
* Returns true if `value` is valid.
* `<iron-form>` uses this to check the validity or all its elements.
* Override this method to define whether the given `invalid` state should be set.
*/
_shouldSetInvalid(_invalid: boolean): boolean;
/**
* Validates the field and sets the `invalid` property based on the result.
*
* The method fires a `validated` event with the result of the validation.
*
* @returns True if the value is valid.

@@ -110,0 +117,0 @@ */

@@ -101,3 +101,3 @@ /**

static get version() {
return '1.3.0';
return '1.4.0';
}

@@ -220,9 +220,34 @@

/**
* Returns true if `value` is valid.
* `<iron-form>` uses this to check the validity or all its elements.
* @param {boolean} invalid
* @protected
*/
_setInvalid(invalid) {
if (this._shouldSetInvalid(invalid)) {
this.invalid = invalid;
}
}
/**
* Override this method to define whether the given `invalid` state should be set.
*
* @param {boolean} _invalid
* @return {boolean}
* @protected
*/
_shouldSetInvalid(_invalid) {
return true;
}
/**
* Validates the field and sets the `invalid` property based on the result.
*
* The method fires a `validated` event with the result of the validation.
*
* @return {boolean} True if the value is valid.
*/
validate() {
return !(this.invalid = !this.checkValidity());
const isValid = this.checkValidity();
this._setInvalid(!isValid);
this.dispatchEvent(new CustomEvent('validated', {detail: {valid: isValid}}));
return isValid;
}

@@ -287,2 +312,10 @@

}
/**
* Fired whenever the field is validated.
*
* @event validated
* @param {Object} detail
* @param {boolean} detail.valid the result of the validation.
*/
}

@@ -289,0 +322,0 @@

@@ -130,2 +130,7 @@ import '@vaadin/vaadin-lumo-styles/color.js';

}
/* When custom-field is used with components without outer margin */
:host([theme~="whitespace"][has-label]) [part="label"] {
padding-bottom: 0.5em;
}
</style>

@@ -132,0 +137,0 @@ </template>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc