@vaadin/combo-box
Advanced tools
Comparing version 23.2.0-alpha3 to 23.2.0-alpha4
{ | ||
"name": "@vaadin/combo-box", | ||
"version": "23.2.0-alpha3", | ||
"version": "23.2.0-alpha4", | ||
"publishConfig": { | ||
@@ -27,3 +27,5 @@ "access": "public" | ||
"vaadin-*.d.ts", | ||
"vaadin-*.js" | ||
"vaadin-*.js", | ||
"web-types.json", | ||
"web-types.lit.json" | ||
], | ||
@@ -40,21 +42,25 @@ "keywords": [ | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "23.2.0-alpha3", | ||
"@vaadin/field-base": "23.2.0-alpha3", | ||
"@vaadin/input-container": "23.2.0-alpha3", | ||
"@vaadin/item": "23.2.0-alpha3", | ||
"@vaadin/lit-renderer": "23.2.0-alpha3", | ||
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha3", | ||
"@vaadin/vaadin-material-styles": "23.2.0-alpha3", | ||
"@vaadin/vaadin-overlay": "23.2.0-alpha3", | ||
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha3" | ||
"@vaadin/component-base": "23.2.0-alpha4", | ||
"@vaadin/field-base": "23.2.0-alpha4", | ||
"@vaadin/input-container": "23.2.0-alpha4", | ||
"@vaadin/item": "23.2.0-alpha4", | ||
"@vaadin/lit-renderer": "23.2.0-alpha4", | ||
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha4", | ||
"@vaadin/vaadin-material-styles": "23.2.0-alpha4", | ||
"@vaadin/vaadin-overlay": "23.2.0-alpha4", | ||
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha4" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/polymer-legacy-adapter": "23.2.0-alpha3", | ||
"@vaadin/polymer-legacy-adapter": "23.2.0-alpha4", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
"@vaadin/text-field": "23.2.0-alpha3", | ||
"@vaadin/text-field": "23.2.0-alpha4", | ||
"lit": "^2.0.0", | ||
"sinon": "^13.0.2" | ||
}, | ||
"gitHead": "06e5875be93ca50da2846dafc65a8531010c0576" | ||
"web-types": [ | ||
"web-types.json", | ||
"web-types.lit.json" | ||
], | ||
"gitHead": "cbf5f1d0f38ac9b81c65cf9ef5660182e176e598" | ||
} |
@@ -23,3 +23,3 @@ /** | ||
base: T, | ||
): T & Constructor<ComboBoxDataProviderMixinClass<TItem>>; | ||
): Constructor<ComboBoxDataProviderMixinClass<TItem>> & T; | ||
@@ -26,0 +26,0 @@ export declare class ComboBoxDataProviderMixinClass<TItem> { |
@@ -189,3 +189,3 @@ /** | ||
if (!this.opened && !this.hasAttribute('focused')) { | ||
if (!this.opened && !this._isInputFocused()) { | ||
this._commitValue(); | ||
@@ -192,0 +192,0 @@ } |
@@ -137,3 +137,3 @@ /** | ||
listener: (this: ComboBoxLight<TItem>, ev: ComboBoxLightEventMap<TItem>[K]) => void, | ||
options?: boolean | AddEventListenerOptions, | ||
options?: AddEventListenerOptions | boolean, | ||
): void; | ||
@@ -144,3 +144,3 @@ | ||
listener: (this: ComboBoxLight<TItem>, ev: ComboBoxLightEventMap<TItem>[K]) => void, | ||
options?: boolean | EventListenerOptions, | ||
options?: EventListenerOptions | boolean, | ||
): void; | ||
@@ -147,0 +147,0 @@ } |
@@ -27,7 +27,7 @@ /** | ||
base: T, | ||
): T & | ||
Constructor<ComboBoxMixinClass<TItem>> & | ||
): Constructor<ComboBoxMixinClass<TItem>> & | ||
Constructor<DisabledMixinClass> & | ||
Constructor<InputMixinClass> & | ||
Constructor<KeyboardMixinClass>; | ||
Constructor<KeyboardMixinClass> & | ||
T; | ||
@@ -169,14 +169,3 @@ export declare class ComboBoxMixinClass<TItem> { | ||
/** | ||
* Returns true if `value` is valid, and sets the `invalid` flag appropriately. | ||
*/ | ||
validate(): boolean; | ||
/** | ||
* Returns true if the current input value satisfies all constraints (if any). | ||
* You can override this method for custom validations. | ||
*/ | ||
checkValidity(): boolean; | ||
protected _revertInputValue(): void; | ||
} |
@@ -9,2 +9,3 @@ /** | ||
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js'; | ||
import { isElementFocused } from '@vaadin/component-base/src/focus-utils.js'; | ||
import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js'; | ||
@@ -417,7 +418,2 @@ import { processTemplates } from '@vaadin/component-base/src/templates.js'; | ||
// Preventing the default modal behavior of the overlay on input click | ||
overlay.addEventListener('vaadin-overlay-outside-click', (e) => { | ||
e.preventDefault(); | ||
}); | ||
// Manual two-way binding for the overlay "opened" property | ||
@@ -516,2 +512,7 @@ overlay.addEventListener('opened-changed', (e) => { | ||
/** @protected */ | ||
_isInputFocused() { | ||
return this.inputElement && isElementFocused(this.inputElement); | ||
} | ||
/** @private */ | ||
@@ -543,3 +544,3 @@ _updateActiveDescendant(index) { | ||
// unless input element is explicitly focused by the user. | ||
if (!this.hasAttribute('focused') && !isTouch) { | ||
if (!this._isInputFocused() && !isTouch) { | ||
this.focus(); | ||
@@ -551,3 +552,3 @@ } | ||
this._onClosed(); | ||
if (this._openedWithFocusRing && this.hasAttribute('focused')) { | ||
if (this._openedWithFocusRing && this._isInputFocused()) { | ||
this.setAttribute('focus-ring', ''); | ||
@@ -626,4 +627,2 @@ } | ||
_onClick(e) { | ||
this._closeOnBlurIsPrevented = true; | ||
const path = e.composedPath(); | ||
@@ -638,4 +637,2 @@ | ||
} | ||
this._closeOnBlurIsPrevented = false; | ||
} | ||
@@ -656,5 +653,3 @@ | ||
} else if (e.key === 'ArrowDown') { | ||
this._closeOnBlurIsPrevented = true; | ||
this._onArrowDown(); | ||
this._closeOnBlurIsPrevented = false; | ||
@@ -664,5 +659,3 @@ // Prevent caret from moving | ||
} else if (e.key === 'ArrowUp') { | ||
this._closeOnBlurIsPrevented = true; | ||
this._onArrowUp(); | ||
this._closeOnBlurIsPrevented = false; | ||
@@ -738,4 +731,3 @@ // Prevent caret from moving | ||
// the next focusable element instead of the combo-box itself. | ||
// Checking the focused property here is enough instead of checking the activeElement. | ||
if (this.hasAttribute('focused')) { | ||
if (this._isInputFocused() && this.inputElement.setSelectionRange) { | ||
this.inputElement.setSelectionRange(start, end); | ||
@@ -850,3 +842,3 @@ } | ||
toggleElement.addEventListener('click', () => { | ||
if (isTouch && !this.hasAttribute('focused')) { | ||
if (isTouch && !this._isInputFocused()) { | ||
document.activeElement.blur(); | ||
@@ -853,0 +845,0 @@ } |
@@ -224,3 +224,3 @@ /** | ||
listener: (this: ComboBox<TItem>, ev: ComboBoxEventMap<TItem>[K]) => void, | ||
options?: boolean | AddEventListenerOptions, | ||
options?: AddEventListenerOptions | boolean, | ||
): void; | ||
@@ -231,3 +231,3 @@ | ||
listener: (this: ComboBox<TItem>, ev: ComboBoxEventMap<TItem>[K]) => void, | ||
options?: boolean | EventListenerOptions, | ||
options?: EventListenerOptions | boolean, | ||
): void; | ||
@@ -234,0 +234,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
208434
35
5022
+ Added@vaadin/component-base@23.2.0-alpha4(transitive)
+ Added@vaadin/field-base@23.2.0-alpha4(transitive)
+ Added@vaadin/icon@23.2.0-alpha4(transitive)
+ Added@vaadin/input-container@23.2.0-alpha4(transitive)
+ Added@vaadin/item@23.2.0-alpha4(transitive)
+ Added@vaadin/lit-renderer@23.2.0-alpha4(transitive)
+ Added@vaadin/vaadin-lumo-styles@23.2.0-alpha4(transitive)
+ Added@vaadin/vaadin-material-styles@23.2.0-alpha4(transitive)
+ Added@vaadin/vaadin-overlay@23.2.0-alpha4(transitive)
+ Added@vaadin/vaadin-themable-mixin@23.2.0-alpha4(transitive)
- Removed@vaadin/component-base@23.2.0-alpha3(transitive)
- Removed@vaadin/field-base@23.2.0-alpha3(transitive)
- Removed@vaadin/icon@23.2.0-alpha3(transitive)
- Removed@vaadin/input-container@23.2.0-alpha3(transitive)
- Removed@vaadin/item@23.2.0-alpha3(transitive)
- Removed@vaadin/lit-renderer@23.2.0-alpha3(transitive)
- Removed@vaadin/vaadin-lumo-styles@23.2.0-alpha3(transitive)
- Removed@vaadin/vaadin-material-styles@23.2.0-alpha3(transitive)
- Removed@vaadin/vaadin-overlay@23.2.0-alpha3(transitive)
- Removed@vaadin/vaadin-themable-mixin@23.2.0-alpha3(transitive)
Updated@vaadin/item@23.2.0-alpha4