@vaadin/field-base
Advanced tools
Comparing version 24.6.0-alpha7 to 24.6.0-alpha8
{ | ||
"name": "@vaadin/field-base", | ||
"version": "24.6.0-alpha7", | ||
"version": "24.6.0-alpha8", | ||
"publishConfig": { | ||
@@ -35,12 +35,12 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.6.0-alpha7", | ||
"@vaadin/component-base": "24.6.0-alpha7", | ||
"@vaadin/a11y-base": "24.6.0-alpha8", | ||
"@vaadin/component-base": "24.6.0-alpha8", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.6.0-alpha7", | ||
"@vaadin/chai-plugins": "24.6.0-alpha8", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
"sinon": "^18.0.0" | ||
}, | ||
"gitHead": "675d6fe0a08b8cc63ac00140c63f28fc3f52e4ea" | ||
"gitHead": "a11e1510c4caa08775b202714f5fc1198c22132a" | ||
} |
@@ -93,4 +93,4 @@ /** | ||
if ((this._hasValue || this.invalid) && hasConstraints) { | ||
this.validate(); | ||
} else if (isLastConstraintRemoved) { | ||
this._requestValidation(); | ||
} else if (isLastConstraintRemoved && !this.manualValidation) { | ||
this._setInvalid(false); | ||
@@ -113,3 +113,3 @@ } | ||
this.validate(); | ||
this._requestValidation(); | ||
@@ -116,0 +116,0 @@ this.dispatchEvent( |
@@ -100,3 +100,3 @@ /** | ||
if (!focused && document.hasFocus()) { | ||
this.validate(); | ||
this._requestValidation(); | ||
} | ||
@@ -116,3 +116,3 @@ } | ||
if (this.invalid) { | ||
this.validate(); | ||
this._requestValidation(); | ||
} | ||
@@ -138,5 +138,5 @@ } | ||
if (this.invalid) { | ||
this.validate(); | ||
this._requestValidation(); | ||
} | ||
} | ||
}; |
@@ -20,2 +20,15 @@ /** | ||
/** | ||
* Set to true to enable manual validation mode. This mode disables automatic | ||
* constraint validation, allowing you to control the validation process yourself. | ||
* You can still trigger constraint validation manually with the `validate()` method | ||
* or use `checkValidity()` to assess the component's validity without affecting | ||
* the invalid state. In manual validation mode, you can also manipulate | ||
* the `invalid` property directly through your application logic without conflicts | ||
* with the component's internal validation. | ||
* | ||
* @attr {boolean} manual-validation | ||
*/ | ||
manualValidation: boolean; | ||
/** | ||
* Specifies that the user must fill in a value. | ||
@@ -34,2 +47,4 @@ */ | ||
checkValidity(): boolean; | ||
protected _requestValidation(): void; | ||
} |
@@ -29,2 +29,18 @@ /** | ||
/** | ||
* Set to true to enable manual validation mode. This mode disables automatic | ||
* constraint validation, allowing you to control the validation process yourself. | ||
* You can still trigger constraint validation manually with the `validate()` method | ||
* or use `checkValidity()` to assess the component's validity without affecting | ||
* the invalid state. In manual validation mode, you can also manipulate | ||
* the `invalid` property directly through your application logic without conflicts | ||
* with the component's internal validation. | ||
* | ||
* @attr {boolean} manual-validation | ||
*/ | ||
manualValidation: { | ||
type: Boolean, | ||
value: false, | ||
}, | ||
/** | ||
* Specifies that the user must fill in a value. | ||
@@ -83,2 +99,10 @@ */ | ||
/** @protected */ | ||
_requestValidation() { | ||
if (!this.manualValidation) { | ||
// eslint-disable-next-line no-restricted-syntax | ||
this.validate(); | ||
} | ||
} | ||
/** | ||
@@ -85,0 +109,0 @@ * Fired whenever the field is validated. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89572
2316
+ Added@vaadin/a11y-base@24.6.0-alpha8(transitive)
+ Added@vaadin/component-base@24.6.0-alpha8(transitive)
- Removed@vaadin/a11y-base@24.6.0-alpha7(transitive)
- Removed@vaadin/component-base@24.6.0-alpha7(transitive)