@vaadin/field-base 23.1.0-rc1 → 23.1.0
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/field-base",
|
|
3
|
-
"version": "23.1.0
|
|
3
|
+
"version": "23.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/component-base": "23.1.0
|
|
35
|
+
"@vaadin/component-base": "^23.1.0",
|
|
36
36
|
"lit": "^2.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
41
41
|
"sinon": "^13.0.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "322bba42b83f908a78cd972b06acadc5da95a69d"
|
|
44
44
|
}
|
package/src/field-mixin.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
7
|
import { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
|
|
8
|
-
import { SlotMixinClass } from '@vaadin/component-base/src/slot-mixin.js';
|
|
9
8
|
import { LabelMixinClass } from './label-mixin.js';
|
|
10
9
|
import { ValidateMixinClass } from './validate-mixin.js';
|
|
11
10
|
|
|
@@ -18,7 +17,6 @@ export declare function FieldMixin<T extends Constructor<HTMLElement>>(
|
|
|
18
17
|
Constructor<ControllerMixinClass> &
|
|
19
18
|
Constructor<FieldMixinClass> &
|
|
20
19
|
Constructor<LabelMixinClass> &
|
|
21
|
-
Constructor<SlotMixinClass> &
|
|
22
20
|
Constructor<ValidateMixinClass>;
|
|
23
21
|
|
|
24
22
|
export declare class FieldMixinClass {
|
|
@@ -49,11 +47,7 @@ export declare class FieldMixinClass {
|
|
|
49
47
|
|
|
50
48
|
protected _ariaTargetChanged(target: HTMLElement): void;
|
|
51
49
|
|
|
52
|
-
protected _updateErrorMessage(invalid: boolean, errorMessage: string | null | undefined): void;
|
|
53
|
-
|
|
54
50
|
protected _requiredChanged(required: boolean): void;
|
|
55
51
|
|
|
56
|
-
protected _helperIdChanged(helperId: string): void;
|
|
57
|
-
|
|
58
52
|
protected _invalidChanged(invalid: boolean): void;
|
|
59
53
|
}
|
package/src/field-mixin.js
CHANGED
|
@@ -49,9 +49,6 @@ export const FieldMixin = (superclass) =>
|
|
|
49
49
|
type: String,
|
|
50
50
|
observer: '_helperTextChanged',
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
/** @protected */
|
|
54
|
-
_helperId: String,
|
|
55
52
|
};
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -169,7 +166,7 @@ export const FieldMixin = (superclass) =>
|
|
|
169
166
|
this._errorController.setInvalid(invalid);
|
|
170
167
|
|
|
171
168
|
// This timeout is needed to prevent NVDA from announcing the error message twice:
|
|
172
|
-
// 1. Once adding the `[role=alert]` attribute
|
|
169
|
+
// 1. Once adding the `[role=alert]` attribute when updating `has-error-message` (OK).
|
|
173
170
|
// 2. Once linking the error ID with the ARIA target here (unwanted).
|
|
174
171
|
// Related issue: https://github.com/vaadin/web-components/issues/3061.
|
|
175
172
|
setTimeout(() => {
|
|
@@ -127,15 +127,15 @@ export const InputControlMixin = (superclass) =>
|
|
|
127
127
|
/**
|
|
128
128
|
* Override an event listener inherited from `KeydownMixin` to clear on Esc.
|
|
129
129
|
* Components that extend this mixin can prevent this behavior by overriding
|
|
130
|
-
* this method without calling `super.
|
|
130
|
+
* this method without calling `super._onEscape` to provide custom logic.
|
|
131
131
|
* @param {KeyboardEvent} event
|
|
132
132
|
* @protected
|
|
133
133
|
* @override
|
|
134
134
|
*/
|
|
135
|
-
|
|
136
|
-
super.
|
|
135
|
+
_onEscape(event) {
|
|
136
|
+
super._onEscape(event);
|
|
137
137
|
|
|
138
|
-
if (
|
|
138
|
+
if (this.clearButtonVisible && !!this.value) {
|
|
139
139
|
event.stopPropagation();
|
|
140
140
|
this.__clear();
|
|
141
141
|
}
|
package/src/input-field-mixin.js
CHANGED
|
@@ -179,7 +179,7 @@ export const InputFieldMixin = (superclass) =>
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* Override an event listener from `
|
|
182
|
+
* Override an event listener from `InputControlMixin`
|
|
183
183
|
* to avoid adding a separate listener.
|
|
184
184
|
* @param {!KeyboardEvent} event
|
|
185
185
|
* @protected
|
package/src/label-mixin.d.ts
CHANGED
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
-
import { SlotMixinClass } from '@vaadin/component-base/src/slot-mixin.js';
|
|
8
7
|
import { LabelController } from './label-controller.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* A mixin to provide label via corresponding property or named slot.
|
|
12
11
|
*/
|
|
13
|
-
export declare function LabelMixin<T extends Constructor<HTMLElement>>(
|
|
14
|
-
base: T,
|
|
15
|
-
): T & Constructor<LabelMixinClass> & Constructor<SlotMixinClass>;
|
|
12
|
+
export declare function LabelMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<LabelMixinClass>;
|
|
16
13
|
|
|
17
14
|
export declare class LabelMixinClass {
|
|
18
15
|
/**
|