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

@vaadin/multi-select-combo-box

Package Overview
Dependencies
Maintainers
14
Versions
331
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/multi-select-combo-box - npm Package Compare versions

Comparing version 23.1.1 to 23.2.0-alpha1

lit.d.ts

21

package.json
{
"name": "@vaadin/multi-select-combo-box",
"version": "23.1.1",
"version": "23.2.0-alpha1",
"publishConfig": {

@@ -22,2 +22,4 @@ "access": "public"

"files": [
"lit.js",
"lit.d.ts",
"src",

@@ -37,9 +39,10 @@ "theme",

"@polymer/polymer": "^3.0.0",
"@vaadin/combo-box": "^23.1.1",
"@vaadin/component-base": "^23.1.1",
"@vaadin/field-base": "^23.1.1",
"@vaadin/input-container": "^23.1.1",
"@vaadin/vaadin-lumo-styles": "^23.1.1",
"@vaadin/vaadin-material-styles": "^23.1.1",
"@vaadin/vaadin-themable-mixin": "^23.1.1"
"@vaadin/combo-box": "23.2.0-alpha1",
"@vaadin/component-base": "23.2.0-alpha1",
"@vaadin/field-base": "23.2.0-alpha1",
"@vaadin/input-container": "23.2.0-alpha1",
"@vaadin/lit-renderer": "23.2.0-alpha1",
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha1",
"@vaadin/vaadin-material-styles": "23.2.0-alpha1",
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha1"
},

@@ -51,3 +54,3 @@ "devDependencies": {

},
"gitHead": "390458d6519433a2dd502cef90da48e84573a275"
"gitHead": "f226a2976c270d3d53c824f6e0a740a5d3382d91"
}

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

*/
import './vaadin-multi-select-combo-box-dropdown.js';
import './vaadin-multi-select-combo-box-item.js';
import './vaadin-multi-select-combo-box-overlay.js';
import './vaadin-multi-select-combo-box-scroller.js';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';

@@ -38,13 +40,12 @@ import { ComboBoxDataProviderMixin } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';

<vaadin-multi-select-combo-box-dropdown
id="dropdown"
opened="[[opened]]"
<vaadin-multi-select-combo-box-overlay
id="overlay"
hidden$="[[_isOverlayHidden(filteredItems, loading)]]"
opened="[[_overlayOpened]]"
loading$="[[loading]]"
theme$="[[_theme]]"
position-target="[[_target]]"
renderer="[[renderer]]"
_focused-index="[[_focusedIndex]]"
_item-id-path="[[itemIdPath]]"
_item-label-path="[[itemLabelPath]]"
loading="[[loading]]"
theme="[[theme]]"
></vaadin-multi-select-combo-box-dropdown>
no-vertical-overlap
restore-focus-node="[[inputElement]]"
></vaadin-multi-select-combo-box-overlay>
`;

@@ -97,6 +98,2 @@ }

static get observers() {
return ['_readonlyItemsChanged(readonly, selectedItems)'];
}
/**

@@ -112,2 +109,11 @@ * Reference to the clear button element.

/**
* Tag name prefix used by scroller and items.
* @protected
* @return {string}
*/
get _tagNamePrefix() {
return 'vaadin-multi-select-combo-box';
}
/**
* Override method inherited from the combo-box

@@ -123,10 +129,2 @@ * to allow opening dropdown when readonly.

/**
* @protected
* @override
*/
_getItemElements() {
return Array.from(this.$.dropdown._scroller.querySelectorAll('vaadin-multi-select-combo-box-item'));
}
/** @protected */

@@ -141,2 +139,16 @@ ready() {

/**
* Override combo-box method to set correct owner for using by item renderers.
* This needs to be done before the scroller gets added to the DOM to ensure
* Lit directive works in case when combo-box is opened using attribute.
*
* @protected
* @override
*/
_initScroller() {
const comboBox = this.getRootNode().host;
super._initScroller(comboBox);
}
/**
* Override method from `InputMixin`.

@@ -289,15 +301,2 @@ *

* Override method inherited from the combo-box
* to render only selected items when read-only,
* even if a different set of items is provided.
*
* @protected
* @override
*/
_setOverlayItems(items) {
const effectiveItems = this.readonly ? this.selectedItems : items;
super._setOverlayItems(effectiveItems);
}
/**
* Override method inherited from the combo-box
* to not request data provider when read-only.

@@ -317,18 +316,4 @@ *

}
/** @private */
_readonlyItemsChanged(readonly, selectedItems) {
if (readonly && selectedItems) {
this.__savedItems = this._getOverlayItems();
this._setOverlayItems(selectedItems);
}
// Restore the original dropdown items
if (readonly === false && this.__savedItems) {
this._setOverlayItems(this.__savedItems);
this.__savedItems = null;
}
}
}
customElements.define(MultiSelectComboBoxInternal.is, MultiSelectComboBoxInternal);

@@ -156,3 +156,3 @@ /**

id="comboBox"
items="[[items]]"
items="[[__effectiveItems]]"
item-id-path="[[itemIdPath]]"

@@ -169,3 +169,3 @@ item-label-path="[[itemLabelPath]]"

size="{{size}}"
filtered-items="[[filteredItems]]"
filtered-items="[[__effectiveFilteredItems]]"
selected-items="[[selectedItems]]"

@@ -428,2 +428,14 @@ opened="{{opened}}"

/** @private */
__effectiveItems: {
type: Array,
computed: '__computeEffectiveItems(items, selectedItems, readonly)',
},
/** @private */
__effectiveFilteredItems: {
type: Array,
computed: '__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)',
},
/** @protected */

@@ -620,3 +632,6 @@ _hasValue: {

_onFilteredItemsChanged(event) {
this.filteredItems = event.detail.value;
const { value } = event.detail;
if (Array.isArray(value) || value == null) {
this.filteredItems = value;
}
}

@@ -679,3 +694,3 @@

_getItemLabel(item) {
return item && Object.prototype.hasOwnProperty.call(item, this.itemLabelPath) ? item[this.itemLabelPath] : item;
return this.$.comboBox._getItemLabel(item);
}

@@ -1075,2 +1090,12 @@

}
/** @private */
__computeEffectiveItems(items, selectedItems, readonly) {
return items && readonly ? selectedItems : items;
}
/** @private */
__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly) {
return !items && readonly ? selectedItems : filteredItems;
}
}

@@ -1077,0 +1102,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