@anypoint-web-components/anypoint-dropdown-menu
Advanced tools
Comparing version 0.1.23 to 0.1.24
{ | ||
"name": "@anypoint-web-components/anypoint-dropdown-menu", | ||
"description": "Accessible dropdown menu for Anypoint platform", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -118,18 +118,2 @@ import { html, LitElement } from 'lit-element'; | ||
/** | ||
* For form-associated custom elements. Marks this custom element | ||
* as form enabled element. | ||
*/ | ||
static get formAssociated() { | ||
return true; | ||
} | ||
/** | ||
* When form-associated custom elements are supported in the browser it | ||
* returns `<form>` element associated with this control. | ||
*/ | ||
get form() { | ||
return (this._internals && this._internals.form) || null; | ||
} | ||
get validationStates() { | ||
@@ -347,6 +331,2 @@ return this._validationStates; | ||
this.requestUpdate('value', old); | ||
/* istanbul ignore else */ | ||
if (this._internals && this._internals.setFormValue){ | ||
this._internals.setFormValue(value); | ||
} | ||
} | ||
@@ -564,8 +544,2 @@ | ||
this._focusHandler = this._focusHandler.bind(this); | ||
/* istanbul ignore else */ | ||
// @ts-ignore | ||
if (this.attachInternals) { | ||
// @ts-ignore | ||
this._internals = this.attachInternals(); | ||
} | ||
} | ||
@@ -626,19 +600,4 @@ | ||
} | ||
if (this._internals && this._internals.setFormValue){ | ||
this._internals.setFormValue(''); | ||
} | ||
} | ||
/** | ||
* When form-associated custom elements are supported in the browser it | ||
* is called when the form state has been restored | ||
* | ||
* @param {String} state Restored value | ||
*/ | ||
formStateRestoreCallback(state) { | ||
if (this._internals && this._internals.setFormValue) { | ||
this._internals.setFormValue(state); | ||
} | ||
} | ||
firstUpdated() { | ||
@@ -813,3 +772,2 @@ this._openedChanged(this.opened); | ||
this.validate(this.value); | ||
this._updateNativeValidationState(); | ||
} | ||
@@ -819,18 +777,2 @@ this.focus(); | ||
_updateNativeValidationState() { | ||
if (!this._internals || !this._internals.setValidity) { | ||
return; | ||
} | ||
if (this.invalid) { | ||
this._internals.setValidity( | ||
{ | ||
customError: true, | ||
}, | ||
'Please select a value.' | ||
); | ||
} else { | ||
this._internals.setValidity({}); | ||
} | ||
} | ||
_dropdownOpened() { | ||
@@ -875,6 +817,3 @@ this._focusContent(); | ||
checkValidity() { | ||
return ( | ||
this._getValidity() && | ||
((this._internals && this._internals.checkValidity && this._internals.checkValidity()) || true) | ||
); | ||
return this._getValidity(); | ||
} | ||
@@ -881,0 +820,0 @@ |
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
97818
1837