@anypoint-web-components/anypoint-checkbox
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "@anypoint-web-components/anypoint-checkbox", | ||
"description": "Anypoint and Material DS styled checkbox", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -78,10 +78,2 @@ import { LitElement, html } from 'lit-element'; | ||
static get formAssociated() { | ||
return true; | ||
} | ||
get form() { | ||
return this._internals && this._internals.form; | ||
} | ||
/** | ||
@@ -129,7 +121,2 @@ * @returns {EventListener} Previously registered event listener or null | ||
this._hasIronCheckedElementBehavior = true; | ||
// @ts-ignore | ||
if (this.attachInternals) { | ||
// @ts-ignore | ||
this._internals = this.attachInternals(); | ||
} | ||
} | ||
@@ -198,15 +185,3 @@ | ||
this.setAttribute('aria-checked', value ? 'true' : 'false'); | ||
if (this._internals && this._internals.setFormValue && this._internals.setValidity) { | ||
this._internals.setFormValue(value ? this.value : ''); | ||
if (!this.matches(':disabled') && this.hasAttribute('required') && !value) { | ||
this._internals.setValidity({ | ||
customError: true | ||
}, 'This field is required.'); | ||
} else { | ||
this._internals.setValidity({}); | ||
} | ||
} else { | ||
this.validate(this.checked); | ||
} | ||
this.validate(this.checked); | ||
} | ||
@@ -222,5 +197,2 @@ | ||
checkValidity() { | ||
if (this._internals && this._internals.checkValidity) { | ||
return this._internals.checkValidity(); | ||
} | ||
return this.required ? this.checked : true; | ||
@@ -235,13 +207,7 @@ } | ||
this.checked = false; | ||
if (this._internals && this._internals.setFormValue) { | ||
this._internals.setFormValue(''); | ||
} | ||
} | ||
formStateRestoreCallback(state) { | ||
if (this._internals && this._internals.setFormValue) { | ||
this._internals.setFormValue(state); | ||
} | ||
this.checked = !!state; | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
35850
18
712
1