@vaadin/integer-field 23.1.2 → 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/integer-field",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polymer/polymer": "^3.0.0",
|
|
36
|
-
"@vaadin/number-field": "
|
|
37
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
38
|
-
"@vaadin/vaadin-material-styles": "
|
|
36
|
+
"@vaadin/number-field": "23.2.0-alpha3",
|
|
37
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha3",
|
|
38
|
+
"@vaadin/vaadin-material-styles": "23.2.0-alpha3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@esm-bundle/chai": "^4.3.4",
|
|
42
42
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
43
43
|
"sinon": "^13.0.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "06e5875be93ca50da2846dafc65a8531010c0576"
|
|
46
46
|
}
|
|
@@ -22,10 +22,17 @@ export type IntegerFieldInvalidChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
22
22
|
*/
|
|
23
23
|
export type IntegerFieldValueChangedEvent = CustomEvent<{ value: string }>;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Fired whenever the field is validated.
|
|
27
|
+
*/
|
|
28
|
+
export type IntegerFieldValidatedEvent = CustomEvent<{ valid: boolean }>;
|
|
29
|
+
|
|
25
30
|
export interface IntegerFieldCustomEventMap {
|
|
26
31
|
'invalid-changed': IntegerFieldInvalidChangedEvent;
|
|
27
32
|
|
|
28
33
|
'value-changed': IntegerFieldValueChangedEvent;
|
|
34
|
+
|
|
35
|
+
validated: IntegerFieldValidatedEvent;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
export interface IntegerFieldEventMap extends HTMLElementEventMap, IntegerFieldCustomEventMap {
|
|
@@ -51,14 +58,13 @@ export interface IntegerFieldEventMap extends HTMLElementEventMap, IntegerFieldC
|
|
|
51
58
|
* `increase-button` | Increase ("plus") button
|
|
52
59
|
* `decrease-button` | Decrease ("minus") button
|
|
53
60
|
*
|
|
54
|
-
* Note, the `input-prevented` state attribute is not supported by `<vaadin-integer-field>`.
|
|
55
|
-
*
|
|
56
61
|
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
57
62
|
*
|
|
58
63
|
* @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.
|
|
59
64
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
60
65
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
61
66
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
67
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
62
68
|
*/
|
|
63
69
|
declare class IntegerField extends NumberField {
|
|
64
70
|
addEventListener<K extends keyof IntegerFieldEventMap>(
|
|
@@ -24,14 +24,13 @@ import { NumberField } from '@vaadin/number-field/src/vaadin-number-field.js';
|
|
|
24
24
|
* `increase-button` | Increase ("plus") button
|
|
25
25
|
* `decrease-button` | Decrease ("minus") button
|
|
26
26
|
*
|
|
27
|
-
* Note, the `input-prevented` state attribute is not supported by `<vaadin-integer-field>`.
|
|
28
|
-
*
|
|
29
27
|
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
30
28
|
*
|
|
31
29
|
* @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.
|
|
32
30
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
33
31
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
34
32
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
33
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
35
34
|
*
|
|
36
35
|
* @extends NumberField
|
|
37
36
|
*/
|
|
@@ -40,23 +39,10 @@ export class IntegerField extends NumberField {
|
|
|
40
39
|
return 'vaadin-integer-field';
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* When set, the field will prevent:
|
|
48
|
-
* - `keyDown` events if the entered key doesn't match `/^_enabledCharPattern$/`
|
|
49
|
-
* - `paste` events if the pasted text doesn't match `/^_enabledCharPattern*$/`
|
|
50
|
-
* - `drop` events if the dropped text doesn't match `/^_enabledCharPattern*$/`
|
|
51
|
-
*
|
|
52
|
-
* For example, to enable entering only numbers and minus signs,
|
|
53
|
-
* `_enabledCharPattern = "[\\d-]"`
|
|
54
|
-
* @protected
|
|
55
|
-
*/
|
|
56
|
-
_enabledCharPattern: {
|
|
57
|
-
value: '[-+\\d]',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
|
|
45
|
+
this.allowedCharPattern = '[-+\\d]';
|
|
60
46
|
}
|
|
61
47
|
|
|
62
48
|
/**
|