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

@vaadin/field-base

Package Overview
Dependencies
Maintainers
12
Versions
419
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/field-base - npm Package Compare versions

Comparing version 23.2.0-alpha6 to 23.2.0-beta1

6

package.json
{
"name": "@vaadin/field-base",
"version": "23.2.0-alpha6",
"version": "23.2.0-beta1",
"publishConfig": {

@@ -35,3 +35,3 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "23.2.0-alpha6",
"@vaadin/component-base": "23.2.0-beta1",
"lit": "^2.0.0"

@@ -44,3 +44,3 @@ },

},
"gitHead": "61f1fb56953434e97d34a8819640064301dd3d8a"
"gitHead": "82ff7254f27a1a089367e4dd005f63879e33c188"
}
/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2021 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2021 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

@@ -71,4 +71,4 @@ /**

this._boundOnInput = this._onInput.bind(this);
this._boundOnChange = this.__onChange.bind(this);
this._boundOnInput = this.__onInput.bind(this);
this._boundOnChange = this._onChange.bind(this);
}

@@ -152,2 +152,18 @@

/**
* An input event listener used to update `_hasInputValue` property.
* Do not override this method.
*
* @param {Event} event
* @private
*/
__onInput(event) {
// In the case a custom web component is passed as `inputElement`,
// the actual native input element, on which the event occurred,
// can be inside shadow trees.
const target = event.composedPath()[0];
this._hasInputValue = target.value.length > 0;
this._onInput(event);
}
/**
* An input event listener used to update the field value.

@@ -159,5 +175,9 @@ *

_onInput(event) {
// In the case a custom web component is passed as `inputElement`,
// the actual native input element, on which the event occurred,
// can be inside shadow trees.
const target = event.composedPath()[0];
// Ignore fake input events e.g. used by clear button.
this.__userInput = event.isTrusted;
this.value = event.target.value;
this.value = target.value;
this.__userInput = false;

@@ -175,14 +195,2 @@ }

/**
* A change event listener used to update `_hasInputValue` property.
* Do not override this method.
*
* @param {Event} event
* @private
*/
__onChange(event) {
this._hasInputValue = event.target.value.length > 0;
this._onChange(event);
}
/**
* Toggle the has-value attribute based on the value property.

@@ -189,0 +197,0 @@ * @param {boolean} hasValue

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