Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anypoint-web-components/anypoint-switch

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anypoint-web-components/anypoint-switch - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

2

package.json
{
"name": "@anypoint-web-components/anypoint-switch",
"description": "A toggle button styled for Material Design and Anypoint platform.",
"version": "0.1.12",
"version": "0.1.13",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -28,10 +28,2 @@ import { LitElement, html } from 'lit-element';

static get formAssociated() {
return true;
}
get form() {
return this._internals && this._internals.form;
}
/**

@@ -71,7 +63,2 @@ * @returns {EventListener} Previously registered event listener or null

this._hasIronCheckedElementBehavior = true;
// @ts-ignore
if (this.attachInternals) {
// @ts-ignore
this._internals = this.attachInternals();
}
}

@@ -122,25 +109,6 @@

this.setAttribute('aria-checked', value ? 'true' : 'false');
if (this._internals) {
if (this._internals.setFormValue) {
this._internals.setFormValue(value ? this.value : '');
}
if (this._internals.setValidity) {
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);
}
checkValidity() {
if (this._internals && this._internals.checkValidity) {
return this._internals.checkValidity();
}
return this.required ? this.checked : true;

@@ -155,11 +123,5 @@ }

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;

@@ -166,0 +128,0 @@ }

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