@vaadin/vaadin-combo-box
Advanced tools
Comparing version 6.0.0-alpha1 to 6.0.0
{ | ||
"name": "@vaadin/vaadin-combo-box", | ||
"version": "6.0.0-alpha1", | ||
"version": "6.0.0", | ||
"description": "Web Component for displaying a list of items with filtering", | ||
@@ -62,7 +62,7 @@ "main": "vaadin-combo-box.js", | ||
"@vaadin/vaadin-overlay": "^3.5.0", | ||
"@vaadin/vaadin-text-field": "^3.0.0-alpha1", | ||
"@vaadin/vaadin-text-field": "^3.0.0", | ||
"@vaadin/vaadin-themable-mixin": "^1.6.2", | ||
"@vaadin/vaadin-lumo-styles": "^1.6.1", | ||
"@vaadin/vaadin-material-styles": "^1.3.2", | ||
"@vaadin/vaadin-item": "^3.0.0-alpha1", | ||
"@vaadin/vaadin-item": "^3.0.0", | ||
"@vaadin/vaadin-element-mixin": "^2.4.1" | ||
@@ -69,0 +69,0 @@ }, |
@@ -33,2 +33,7 @@ import { ComboBoxElement } from '../src/vaadin-combo-box.js'; | ||
/** | ||
* Fired when the user sets a custom value. | ||
*/ | ||
export type ComboBoxCustomValueSet = CustomEvent<string>; | ||
/** | ||
* Fired when the `opened` property changes. | ||
@@ -59,2 +64,4 @@ */ | ||
export interface ComboBoxElementEventMap { | ||
'custom-value-set': ComboBoxCustomValueSet; | ||
'opened-changed': ComboBoxOpenedChanged; | ||
@@ -61,0 +68,0 @@ |
@@ -34,3 +34,2 @@ /** | ||
position-target="[[positionTarget]]" | ||
on-template-changed="_templateChanged" | ||
on-position-changed="_setOverlayHeight" | ||
@@ -187,8 +186,3 @@ disable-upgrade="" | ||
static get observers() { | ||
return [ | ||
'_selectorChanged(_selector)', | ||
'_loadingChanged(loading)', | ||
'_openedChanged(opened, _items, loading)', | ||
'_restoreScrollerPosition(_items)' | ||
]; | ||
return ['_loadingChanged(loading)', '_openedChanged(opened, _items, loading)', '_restoreScrollerPosition(_items)']; | ||
} | ||
@@ -264,3 +258,7 @@ | ||
this._templateChanged(); | ||
this._selector = this.$.dropdown.$.overlay.content.querySelector('#selector'); | ||
this._scroller = this.$.dropdown.$.overlay.content.querySelector('#scroller'); | ||
this._patchWheelOverScrolling(); | ||
this._loadingChanged(this.loading); | ||
@@ -275,11 +273,2 @@ | ||
_templateChanged() { | ||
if (this.$.dropdown.hasAttribute('disable-upgrade')) { | ||
return; | ||
} | ||
this._selector = this.$.dropdown.$.overlay.content.querySelector('#selector'); | ||
this._scroller = this.$.dropdown.$.overlay.content.querySelector('#scroller'); | ||
} | ||
_loadingChanged(loading) { | ||
@@ -297,8 +286,4 @@ if (this.$.dropdown.hasAttribute('disable-upgrade')) { | ||
_selectorChanged() { | ||
this._patchWheelOverScrolling(); | ||
} | ||
_setOverlayHeight() { | ||
if (!this.opened || !this.positionTarget || !this._selector) { | ||
if (!this.opened || !this.positionTarget) { | ||
return; | ||
@@ -350,6 +335,2 @@ } | ||
_onItemClick(e) { | ||
if (e.detail && e.detail.sourceEvent && e.detail.sourceEvent.stopPropagation) { | ||
this._stopPropagation(e.detail.sourceEvent); | ||
} | ||
this.dispatchEvent(new CustomEvent('selection-changed', { detail: { item: e.model.item } })); | ||
@@ -426,6 +407,2 @@ } | ||
const visibleItemsCount = this._visibleItemsCount(); | ||
if (visibleItemsCount === undefined) { | ||
// Scroller is not visible. Moving is unnecessary. | ||
return; | ||
} | ||
@@ -512,8 +489,2 @@ let targetIndex = index; | ||
_visibleItemsCount() { | ||
if (!this._selector) { | ||
return; | ||
} | ||
// Ensure items are rendered | ||
this._selector.flushDebouncer('_debounceTemplate'); | ||
// Ensure items are positioned | ||
@@ -520,0 +491,0 @@ this._selector.scrollToIndex(this._selector.firstVisibleIndex); |
@@ -85,3 +85,2 @@ /** | ||
opened="[[opened]]" | ||
template="{{template}}" | ||
style="align-items: stretch; margin: 0;" | ||
@@ -106,7 +105,2 @@ theme$="[[theme]]" | ||
template: { | ||
type: Object, | ||
notify: true | ||
}, | ||
/** | ||
@@ -113,0 +107,0 @@ * The element to position/align the dropdown by. |
@@ -52,7 +52,9 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
* | ||
* @fires {CustomEvent<string>} filter-changed | ||
* @fires {CustomEvent<boolean>} invalid-changed | ||
* @fires {CustomEvent<boolean>} opened-change | ||
* @fires {CustomEvent<unknown>} selected-item-changed | ||
* @fires {CustomEvent<string>} value-changed | ||
* @fires {Event} change - Fired when the user commits a value change. | ||
* @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value. | ||
* @fires {CustomEvent} filter-changed - Fired when the `filter` property changes. | ||
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes. | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes. | ||
* @fires {CustomEvent} value-changed - Fired when the `value` property changes. | ||
*/ | ||
@@ -59,0 +61,0 @@ declare class ComboBoxLightElement extends ComboBoxDataProviderMixin(ComboBoxMixin(ThemableMixin(HTMLElement))) { |
@@ -56,7 +56,9 @@ /** | ||
* | ||
* @fires {CustomEvent<string>} filter-changed | ||
* @fires {CustomEvent<boolean>} invalid-changed | ||
* @fires {CustomEvent<boolean>} opened-change | ||
* @fires {CustomEvent<unknown>} selected-item-changed | ||
* @fires {CustomEvent<string>} value-changed | ||
* @fires {Event} change - Fired when the user commits a value change. | ||
* @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value. | ||
* @fires {CustomEvent} filter-changed - Fired when the `filter` property changes. | ||
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes. | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes. | ||
* @fires {CustomEvent} value-changed - Fired when the `value` property changes. | ||
* | ||
@@ -63,0 +65,0 @@ * @extends HTMLElement |
@@ -168,7 +168,9 @@ import { TextFieldElement } from '@vaadin/vaadin-text-field/vaadin-text-field'; | ||
* | ||
* @fires {CustomEvent<string>} filter-changed | ||
* @fires {CustomEvent<boolean>} invalid-changed | ||
* @fires {CustomEvent<boolean>} opened-change | ||
* @fires {CustomEvent<unknown>} selected-item-changed | ||
* @fires {CustomEvent<string>} value-changed | ||
* @fires {Event} change - Fired when the user commits a value change. | ||
* @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value. | ||
* @fires {CustomEvent} filter-changed - Fired when the `filter` property changes. | ||
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes. | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes. | ||
* @fires {CustomEvent} value-changed - Fired when the `value` property changes. | ||
*/ | ||
@@ -175,0 +177,0 @@ declare class ComboBoxElement extends ElementMixin( |
@@ -168,7 +168,9 @@ /** | ||
* | ||
* @fires {CustomEvent<string>} filter-changed | ||
* @fires {CustomEvent<boolean>} invalid-changed | ||
* @fires {CustomEvent<boolean>} opened-change | ||
* @fires {CustomEvent<unknown>} selected-item-changed | ||
* @fires {CustomEvent<string>} value-changed | ||
* @fires {Event} change - Fired when the user commits a value change. | ||
* @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value. | ||
* @fires {CustomEvent} filter-changed - Fired when the `filter` property changes. | ||
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes. | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes. | ||
* @fires {CustomEvent} value-changed - Fired when the `value` property changes. | ||
* | ||
@@ -262,3 +264,3 @@ * @extends HTMLElement | ||
static get version() { | ||
return '6.0.0-alpha1'; | ||
return '6.0.0'; | ||
} | ||
@@ -265,0 +267,0 @@ |
@@ -22,7 +22,2 @@ import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
/* ShadyCSS workaround (show the selected item checkmark) */ | ||
:host::before { | ||
display: block; | ||
} | ||
:host(:hover) { | ||
@@ -29,0 +24,0 @@ background-color: var(--lumo-primary-color-10pct); |
@@ -19,7 +19,2 @@ import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
/* ShadyCSS workaround */ | ||
:host::before { | ||
display: block; | ||
} | ||
:host(:hover) { | ||
@@ -26,0 +21,0 @@ background-color: var(--material-secondary-background-color); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
144511
0
3645