@vaadin/select 23.2.0-alpha2 → 23.2.0-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/select",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.2.0",
|
|
39
|
-
"@vaadin/button": "23.2.0-
|
|
40
|
-
"@vaadin/component-base": "23.2.0-
|
|
41
|
-
"@vaadin/field-base": "23.2.0-
|
|
42
|
-
"@vaadin/input-container": "23.2.0-
|
|
43
|
-
"@vaadin/item": "23.2.0-
|
|
44
|
-
"@vaadin/list-box": "23.2.0-
|
|
45
|
-
"@vaadin/lit-renderer": "23.2.0-
|
|
46
|
-
"@vaadin/vaadin-list-mixin": "23.2.0-
|
|
47
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0-
|
|
48
|
-
"@vaadin/vaadin-material-styles": "23.2.0-
|
|
49
|
-
"@vaadin/vaadin-overlay": "23.2.0-
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
39
|
+
"@vaadin/button": "23.2.0-alpha3",
|
|
40
|
+
"@vaadin/component-base": "23.2.0-alpha3",
|
|
41
|
+
"@vaadin/field-base": "23.2.0-alpha3",
|
|
42
|
+
"@vaadin/input-container": "23.2.0-alpha3",
|
|
43
|
+
"@vaadin/item": "23.2.0-alpha3",
|
|
44
|
+
"@vaadin/list-box": "23.2.0-alpha3",
|
|
45
|
+
"@vaadin/lit-renderer": "23.2.0-alpha3",
|
|
46
|
+
"@vaadin/vaadin-list-mixin": "23.2.0-alpha3",
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha3",
|
|
48
|
+
"@vaadin/vaadin-material-styles": "23.2.0-alpha3",
|
|
49
|
+
"@vaadin/vaadin-overlay": "23.2.0-alpha3",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@esm-bundle/chai": "^4.3.4",
|
|
54
|
-
"@vaadin/polymer-legacy-adapter": "23.2.0-
|
|
54
|
+
"@vaadin/polymer-legacy-adapter": "23.2.0-alpha3",
|
|
55
55
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
56
56
|
"lit": "^2.0.0",
|
|
57
57
|
"sinon": "^13.0.2"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "06e5875be93ca50da2846dafc65a8531010c0576"
|
|
60
60
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { TemplateResult } from 'lit';
|
|
7
|
-
import { DirectiveResult } from 'lit/directive.js';
|
|
6
|
+
import type { TemplateResult } from 'lit';
|
|
7
|
+
import type { DirectiveResult } from 'lit/directive.js';
|
|
8
8
|
import { LitRendererDirective } from '@vaadin/lit-renderer';
|
|
9
|
-
import { Select } from '../vaadin-select.js';
|
|
9
|
+
import type { Select } from '../vaadin-select.js';
|
|
10
10
|
|
|
11
11
|
export type SelectLitRenderer = (select: Select) => TemplateResult;
|
|
12
12
|
|
package/src/vaadin-select.d.ts
CHANGED
|
@@ -47,12 +47,19 @@ export type SelectInvalidChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
47
47
|
*/
|
|
48
48
|
export type SelectValueChangedEvent = CustomEvent<{ value: string }>;
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Fired whenever the field is validated.
|
|
52
|
+
*/
|
|
53
|
+
export type SelectValidatedEvent = CustomEvent<{ valid: boolean }>;
|
|
54
|
+
|
|
50
55
|
export interface SelectCustomEventMap {
|
|
51
56
|
'opened-changed': SelectOpenedChangedEvent;
|
|
52
57
|
|
|
53
58
|
'invalid-changed': SelectInvalidChangedEvent;
|
|
54
59
|
|
|
55
60
|
'value-changed': SelectValueChangedEvent;
|
|
61
|
+
|
|
62
|
+
validated: SelectValidatedEvent;
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
export interface SelectEventMap extends HTMLElementEventMap, SelectCustomEventMap {
|
|
@@ -162,6 +169,7 @@ export interface SelectEventMap extends HTMLElementEventMap, SelectCustomEventMa
|
|
|
162
169
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
163
170
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
164
171
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
172
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
165
173
|
*/
|
|
166
174
|
declare class Select extends DelegateFocusMixin(FieldMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
|
|
167
175
|
/**
|
|
@@ -244,13 +252,6 @@ declare class Select extends DelegateFocusMixin(FieldMixin(ElementMixin(Themable
|
|
|
244
252
|
*/
|
|
245
253
|
requestContentUpdate(): void;
|
|
246
254
|
|
|
247
|
-
/**
|
|
248
|
-
* Returns true if `value` is valid, and sets the `invalid` flag appropriately.
|
|
249
|
-
*
|
|
250
|
-
* @returns True if the value is valid and sets the `invalid` flag appropriately
|
|
251
|
-
*/
|
|
252
|
-
validate(): boolean;
|
|
253
|
-
|
|
254
255
|
addEventListener<K extends keyof SelectEventMap>(
|
|
255
256
|
type: K,
|
|
256
257
|
listener: (this: Select, ev: SelectEventMap[K]) => void,
|
package/src/vaadin-select.js
CHANGED
|
@@ -125,6 +125,7 @@ registerStyles('vaadin-select', [fieldShared, inputFieldContainer], { moduleId:
|
|
|
125
125
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
126
126
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
127
127
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
128
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
128
129
|
*
|
|
129
130
|
* @extends HTMLElement
|
|
130
131
|
* @mixes ElementMixin
|
|
@@ -697,12 +698,12 @@ class Select extends DelegateFocusMixin(FieldMixin(ElementMixin(ThemableMixin(Po
|
|
|
697
698
|
}
|
|
698
699
|
|
|
699
700
|
/**
|
|
700
|
-
* Returns true if
|
|
701
|
+
* Returns true if the current value satisfies all constraints (if any)
|
|
701
702
|
*
|
|
702
|
-
* @return {boolean}
|
|
703
|
+
* @return {boolean}
|
|
703
704
|
*/
|
|
704
|
-
|
|
705
|
-
return
|
|
705
|
+
checkValidity() {
|
|
706
|
+
return this.disabled || !this.required || !!this.value;
|
|
706
707
|
}
|
|
707
708
|
|
|
708
709
|
/**
|