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

@vaadin/combo-box

Package Overview
Dependencies
Maintainers
19
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/combo-box - npm Package Compare versions

Comparing version 23.0.0-alpha1 to 23.0.0-alpha2

27

package.json
{
"name": "@vaadin/combo-box",
"version": "23.0.0-alpha1",
"version": "23.0.0-alpha2",
"publishConfig": {

@@ -35,23 +35,22 @@ "access": "public"

"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/iron-resizable-behavior": "^3.0.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "23.0.0-alpha1",
"@vaadin/field-base": "23.0.0-alpha1",
"@vaadin/input-container": "23.0.0-alpha1",
"@vaadin/item": "23.0.0-alpha1",
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha1",
"@vaadin/vaadin-material-styles": "23.0.0-alpha1",
"@vaadin/vaadin-overlay": "23.0.0-alpha1",
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha1"
"@vaadin/component-base": "23.0.0-alpha2",
"@vaadin/field-base": "23.0.0-alpha2",
"@vaadin/input-container": "23.0.0-alpha2",
"@vaadin/item": "23.0.0-alpha2",
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha2",
"@vaadin/vaadin-material-styles": "23.0.0-alpha2",
"@vaadin/vaadin-overlay": "23.0.0-alpha2",
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha2"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/dialog": "23.0.0-alpha1",
"@vaadin/polymer-legacy-adapter": "23.0.0-alpha1",
"@vaadin/dialog": "23.0.0-alpha2",
"@vaadin/polymer-legacy-adapter": "23.0.0-alpha2",
"@vaadin/testing-helpers": "^0.3.2",
"@vaadin/text-field": "23.0.0-alpha1",
"@vaadin/text-field": "23.0.0-alpha2",
"lit": "^2.0.0",
"sinon": "^9.2.0"
},
"gitHead": "fbcb07328fdf88260e3b461088d207426b21c710"
"gitHead": "070f586dead02ca41b66717820c647f48bf1665f"
}

@@ -161,5 +161,4 @@ /**

return loadedItem instanceof ComboBoxPlaceholder;
} else {
return this.size === undefined;
}
return this.size === undefined;
}

@@ -166,0 +165,0 @@

@@ -9,4 +9,2 @@ /**

import './vaadin-combo-box-scroller.js';
import { IronResizableBehavior } from '@polymer/iron-resizable-behavior/iron-resizable-behavior.js';
import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class.js';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';

@@ -20,3 +18,3 @@

*/
export class ComboBoxDropdown extends mixinBehaviors(IronResizableBehavior, PolymerElement) {
export class ComboBoxDropdown extends PolymerElement {
static get is() {

@@ -36,2 +34,4 @@ return 'vaadin-combo-box-dropdown';

no-vertical-overlap
restore-focus-on-close="[[restoreFocusOnClose]]"
restore-focus-node="[[restoreFocusNode]]"
></vaadin-combo-box-overlay>

@@ -177,10 +177,2 @@ `;

notifyResize() {
super.notifyResize();
if (this.positionTarget && this.opened) {
this._setOverlayWidth();
}
}
_fireTouchAction(sourceEvent) {

@@ -269,2 +261,3 @@ this.dispatchEvent(

// eslint-disable-next-line max-params
__updateScroller(scroller, items, opened, loading, selectedItem, itemIdPath, focusedIndex, renderer, theme) {

@@ -271,0 +264,0 @@ if (scroller) {

@@ -143,3 +143,3 @@ /**

/** @private */
__rendererOrItemChanged(renderer, index, item, _selected, _focused) {
__rendererOrItemChanged(renderer, index, item) {
if (item === undefined || index === undefined) {

@@ -165,3 +165,5 @@ return;

__updateLabel(label, renderer) {
if (renderer) return;
if (renderer) {
return;
}

@@ -168,0 +170,0 @@ this.textContent = label;

@@ -82,2 +82,4 @@ /**

position-target="[[inputElement]]"
restore-focus-on-close="[[__restoreFocusOnClose]]"
restore-focus-node="[[inputElement]]"
renderer="[[renderer]]"

@@ -137,5 +139,4 @@ _focused-index="[[_focusedIndex]]"

return this.inputElement.validate();
} else {
return super.checkValidity();
}
return super.checkValidity();
}

@@ -142,0 +143,0 @@

@@ -193,3 +193,6 @@ /**

/** @private */
_closeOnBlurIsPrevented: Boolean
_closeOnBlurIsPrevented: Boolean,
/** @private */
__restoreFocusOnClose: Boolean
};

@@ -368,2 +371,4 @@ }

}
this.__restoreFocusOnClose = true;
} else {

@@ -440,3 +445,5 @@ this._onClosed();

_onKeyDown(e) {
if (e.keyCode === 40) {
if (e.key === 'Tab') {
this.__restoreFocusOnClose = false;
} else if (e.key === 'ArrowDown') {
this._closeOnBlurIsPrevented = true;

@@ -448,3 +455,3 @@ this._onArrowDown();

e.preventDefault();
} else if (e.keyCode === 38) {
} else if (e.key === 'ArrowUp') {
this._closeOnBlurIsPrevented = true;

@@ -456,5 +463,5 @@ this._onArrowUp();

e.preventDefault();
} else if (e.keyCode === 13) {
} else if (e.key === 'Enter') {
this._onEnter(e);
} else if (e.keyCode === 27) {
} else if (e.key === 'Escape') {
this._onEscape(e);

@@ -589,21 +596,19 @@ }

}
} else {
} else if (this.opened) {
// Auto-open is enabled
if (this.opened) {
// The overlay is open
e.stopPropagation();
// The overlay is open
e.stopPropagation();
if (this._focusedIndex > -1) {
// An item is focused, revert the input to the filtered value
this._focusedIndex = -1;
this._revertInputValue();
} else {
// No item is focused, cancel the change and close the overlay
this.cancel();
}
} else if (this.clearButtonVisible && !!this.value) {
e.stopPropagation();
// The clear button is visible and the overlay is closed, so clear the value.
this._clear();
if (this._focusedIndex > -1) {
// An item is focused, revert the input to the filtered value
this._focusedIndex = -1;
this._revertInputValue();
} else {
// No item is focused, cancel the change and close the overlay
this.cancel();
}
} else if (this.clearButtonVisible && !!this.value) {
e.stopPropagation();
// The clear button is visible and the overlay is closed, so clear the value.
this._clear();
}

@@ -652,4 +657,2 @@ }

_onOpened() {
setTimeout(() => this._resizeDropdown(), 1);
// Defer scroll position adjustment to improve performance.

@@ -831,7 +834,2 @@ requestAnimationFrame(() => {

/** @private */
_resizeDropdown() {
this.$.dropdown.notifyResize();
}
/** @private */
_selectedItemChanged(selectedItem) {

@@ -838,0 +836,0 @@ if (selectedItem === null || selectedItem === undefined) {

@@ -224,5 +224,4 @@ /**

return this.get(itemIdPath, item) === this.get(itemIdPath, selectedItem);
} else {
return item === selectedItem;
}
return item === selectedItem;
}

@@ -229,0 +228,0 @@

@@ -204,2 +204,4 @@ /**

position-target="[[_positionTarget]]"
restore-focus-on-close="[[__restoreFocusOnClose]]"
restore-focus-node="[[inputElement]]"
_focused-index="[[_focusedIndex]]"

@@ -206,0 +208,0 @@ _item-id-path="[[itemIdPath]]"

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