@vaadin/field-base 23.3.3 → 24.0.0-alpha10
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/index.d.ts +0 -3
- package/index.js +0 -3
- package/package.json +3 -3
- package/src/checked-mixin.d.ts +2 -2
- package/src/checked-mixin.js +2 -2
- package/src/error-controller.d.ts +3 -8
- package/src/error-controller.js +53 -65
- package/src/field-aria-controller.d.ts +1 -1
- package/src/field-aria-controller.js +11 -11
- package/src/field-mixin.d.ts +1 -1
- package/src/field-mixin.js +24 -28
- package/src/helper-controller.d.ts +3 -5
- package/src/helper-controller.js +47 -147
- package/src/input-constraints-mixin.d.ts +2 -2
- package/src/input-constraints-mixin.js +2 -2
- package/src/input-control-mixin.d.ts +3 -3
- package/src/input-control-mixin.js +4 -4
- package/src/input-controller.d.ts +1 -1
- package/src/input-controller.js +5 -8
- package/src/input-field-mixin.d.ts +3 -3
- package/src/input-field-mixin.js +10 -10
- package/src/input-mixin.d.ts +1 -1
- package/src/input-mixin.js +17 -11
- package/src/label-controller.d.ts +3 -8
- package/src/label-controller.js +45 -149
- package/src/label-mixin.d.ts +1 -1
- package/src/label-mixin.js +13 -8
- package/src/labelled-input-controller.d.ts +1 -1
- package/src/labelled-input-controller.js +2 -2
- package/src/pattern-mixin.d.ts +3 -11
- package/src/pattern-mixin.js +2 -50
- package/src/slot-styles-mixin.d.ts +1 -1
- package/src/slot-styles-mixin.js +1 -1
- package/src/styles/clear-button-styles.d.ts +1 -1
- package/src/styles/clear-button-styles.js +1 -1
- package/src/styles/field-shared-styles.d.ts +1 -1
- package/src/styles/field-shared-styles.js +1 -1
- package/src/styles/input-field-container-styles.d.ts +1 -1
- package/src/styles/input-field-container-styles.js +1 -1
- package/src/styles/input-field-shared-styles.d.ts +1 -1
- package/src/styles/input-field-shared-styles.js +1 -1
- package/src/text-area-controller.d.ts +1 -1
- package/src/text-area-controller.js +5 -8
- package/src/validate-mixin.d.ts +1 -1
- package/src/validate-mixin.js +1 -1
- package/src/virtual-keyboard-controller.d.ts +1 -1
- package/src/virtual-keyboard-controller.js +1 -1
- package/src/delegate-focus-mixin.d.ts +0 -48
- package/src/delegate-focus-mixin.js +0 -228
- package/src/delegate-state-mixin.d.ts +0 -20
- package/src/delegate-state-mixin.js +0 -125
- package/src/shadow-focus-mixin.d.ts +0 -23
- package/src/shadow-focus-mixin.js +0 -97
- package/src/slot-target-controller.d.ts +0 -31
- package/src/slot-target-controller.js +0 -123
package/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { CheckedMixin } from './src/checked-mixin.js';
|
|
2
|
-
export { DelegateFocusMixin } from './src/delegate-focus-mixin.js';
|
|
3
|
-
export { DelegateStateMixin } from './src/delegate-state-mixin.js';
|
|
4
2
|
export { FieldAriaController } from './src/field-aria-controller.js';
|
|
5
3
|
export { FieldMixin } from './src/field-mixin.js';
|
|
6
4
|
export { InputController } from './src/input-controller.js';
|
|
@@ -10,7 +8,6 @@ export { InputMixin } from './src/input-mixin.js';
|
|
|
10
8
|
export { LabelledInputController } from './src/labelled-input-controller.js';
|
|
11
9
|
export { LabelMixin } from './src/label-mixin.js';
|
|
12
10
|
export { PatternMixin } from './src/pattern-mixin.js';
|
|
13
|
-
export { ShadowFocusMixin } from './src/shadow-focus-mixin.js';
|
|
14
11
|
export { SlotStylesMixin } from './src/slot-styles-mixin.js';
|
|
15
12
|
export { TextAreaController } from './src/text-area-controller.js';
|
|
16
13
|
export { ValidateMixin } from './src/validate-mixin.js';
|
package/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { CheckedMixin } from './src/checked-mixin.js';
|
|
2
|
-
export { DelegateFocusMixin } from './src/delegate-focus-mixin.js';
|
|
3
|
-
export { DelegateStateMixin } from './src/delegate-state-mixin.js';
|
|
4
2
|
export { FieldAriaController } from './src/field-aria-controller.js';
|
|
5
3
|
export { FieldMixin } from './src/field-mixin.js';
|
|
6
4
|
export { InputController } from './src/input-controller.js';
|
|
@@ -10,7 +8,6 @@ export { InputMixin } from './src/input-mixin.js';
|
|
|
10
8
|
export { LabelledInputController } from './src/labelled-input-controller.js';
|
|
11
9
|
export { LabelMixin } from './src/label-mixin.js';
|
|
12
10
|
export { PatternMixin } from './src/pattern-mixin.js';
|
|
13
|
-
export { ShadowFocusMixin } from './src/shadow-focus-mixin.js';
|
|
14
11
|
export { SlotStylesMixin } from './src/slot-styles-mixin.js';
|
|
15
12
|
export { TextAreaController } from './src/text-area-controller.js';
|
|
16
13
|
export { ValidateMixin } from './src/validate-mixin.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/field-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0-alpha10",
|
|
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": "
|
|
35
|
+
"@vaadin/component-base": "24.0.0-alpha10",
|
|
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": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
|
|
44
44
|
}
|
package/src/checked-mixin.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
+
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
7
8
|
import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
8
|
-
import type { DelegateStateMixinClass } from './delegate-state-mixin.js';
|
|
9
9
|
import type { InputMixinClass } from './input-mixin.js';
|
|
10
10
|
|
|
11
11
|
/**
|
package/src/checked-mixin.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
|
|
7
|
+
import { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
7
8
|
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
8
9
|
import { isElementFocused } from '@vaadin/component-base/src/focus-utils.js';
|
|
9
|
-
import { DelegateStateMixin } from './delegate-state-mixin.js';
|
|
10
10
|
import { InputMixin } from './input-mixin.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A controller that manages the error message node content.
|
|
10
10
|
*/
|
|
11
|
-
export class ErrorController extends
|
|
12
|
-
/**
|
|
13
|
-
* ID attribute value set on the error message element.
|
|
14
|
-
*/
|
|
15
|
-
readonly errorId: string;
|
|
16
|
-
|
|
11
|
+
export class ErrorController extends SlotChildObserveController {
|
|
17
12
|
/**
|
|
18
13
|
* String used for the error message text content.
|
|
19
14
|
*/
|
package/src/error-controller.js
CHANGED
|
@@ -1,35 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A controller that manages the error message node content.
|
|
10
10
|
*/
|
|
11
|
-
export class ErrorController extends
|
|
11
|
+
export class ErrorController extends SlotChildObserveController {
|
|
12
12
|
constructor(host) {
|
|
13
|
-
super(
|
|
14
|
-
host,
|
|
15
|
-
'error-message',
|
|
16
|
-
() => document.createElement('div'),
|
|
17
|
-
(_host, node) => {
|
|
18
|
-
this.__updateErrorId(node);
|
|
19
|
-
|
|
20
|
-
this.__updateHasError();
|
|
21
|
-
},
|
|
22
|
-
true,
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* ID attribute value set on the error message element.
|
|
28
|
-
*
|
|
29
|
-
* @return {string}
|
|
30
|
-
*/
|
|
31
|
-
get errorId() {
|
|
32
|
-
return this.node && this.node.id;
|
|
13
|
+
super(host, 'error-message', 'div');
|
|
33
14
|
}
|
|
34
15
|
|
|
35
16
|
/**
|
|
@@ -40,7 +21,7 @@ export class ErrorController extends SlotController {
|
|
|
40
21
|
setErrorMessage(errorMessage) {
|
|
41
22
|
this.errorMessage = errorMessage;
|
|
42
23
|
|
|
43
|
-
this.
|
|
24
|
+
this.updateDefaultNode(this.node);
|
|
44
25
|
}
|
|
45
26
|
|
|
46
27
|
/**
|
|
@@ -51,7 +32,33 @@ export class ErrorController extends SlotController {
|
|
|
51
32
|
setInvalid(invalid) {
|
|
52
33
|
this.invalid = invalid;
|
|
53
34
|
|
|
54
|
-
this.
|
|
35
|
+
this.updateDefaultNode(this.node);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Override method inherited from `SlotController` to not run
|
|
40
|
+
* initializer on the custom slotted node unnecessarily.
|
|
41
|
+
*
|
|
42
|
+
* @param {Node} node
|
|
43
|
+
* @protected
|
|
44
|
+
* @override
|
|
45
|
+
*/
|
|
46
|
+
initAddedNode(node) {
|
|
47
|
+
if (node !== this.defaultNode) {
|
|
48
|
+
// There is no need to run `initNode`.
|
|
49
|
+
this.initCustomNode(node);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Override to initialize the newly added default error message.
|
|
55
|
+
*
|
|
56
|
+
* @param {Node} errorNode
|
|
57
|
+
* @protected
|
|
58
|
+
* @override
|
|
59
|
+
*/
|
|
60
|
+
initNode(errorNode) {
|
|
61
|
+
this.updateDefaultNode(errorNode);
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
/**
|
|
@@ -62,53 +69,43 @@ export class ErrorController extends SlotController {
|
|
|
62
69
|
* @override
|
|
63
70
|
*/
|
|
64
71
|
initCustomNode(errorNode) {
|
|
65
|
-
this.__updateErrorId(errorNode);
|
|
66
|
-
|
|
67
72
|
// Save the custom error message content on the host.
|
|
68
73
|
if (errorNode.textContent && !this.errorMessage) {
|
|
69
74
|
this.errorMessage = errorNode.textContent.trim();
|
|
70
75
|
}
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
// Notify the host about custom node.
|
|
78
|
+
super.initCustomNode(errorNode);
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
/**
|
|
76
|
-
* Override
|
|
82
|
+
* Override method inherited from `SlotChildObserveController`
|
|
83
|
+
* to restore the default error message element.
|
|
77
84
|
*
|
|
78
|
-
* @param {Node} node
|
|
79
85
|
* @protected
|
|
80
86
|
* @override
|
|
81
87
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// If custom error was removed, restore the default one.
|
|
86
|
-
if (!errorNode && node !== this.defaultNode) {
|
|
87
|
-
errorNode = this.attachDefaultNode();
|
|
88
|
-
|
|
89
|
-
// Run initializer to update default error message ID.
|
|
90
|
-
this.initNode(errorNode);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
this.__updateHasError();
|
|
88
|
+
restoreDefaultNode() {
|
|
89
|
+
this.attachDefaultNode();
|
|
94
90
|
}
|
|
95
91
|
|
|
96
92
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
93
|
+
* Override method inherited from `SlotChildObserveController`
|
|
94
|
+
* to update the error message text and hidden state.
|
|
95
|
+
*
|
|
96
|
+
* Note: unlike with other controllers, this method is
|
|
97
|
+
* called for both default and custom error message.
|
|
98
|
+
*
|
|
99
|
+
* @param {Node | undefined} node
|
|
100
|
+
* @protected
|
|
101
|
+
* @override
|
|
99
102
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/** @private */
|
|
105
|
-
__updateHasError() {
|
|
106
|
-
const errorNode = this.node;
|
|
107
|
-
const hasError = Boolean(this.invalid && this.__isNotEmpty(this.errorMessage));
|
|
103
|
+
updateDefaultNode(errorNode) {
|
|
104
|
+
const { errorMessage, invalid } = this;
|
|
105
|
+
const hasError = Boolean(invalid && errorMessage && errorMessage.trim() !== '');
|
|
108
106
|
|
|
109
|
-
// Update both default and custom error message node.
|
|
110
107
|
if (errorNode) {
|
|
111
|
-
errorNode.textContent = hasError ?
|
|
108
|
+
errorNode.textContent = hasError ? errorMessage : '';
|
|
112
109
|
errorNode.hidden = !hasError;
|
|
113
110
|
|
|
114
111
|
// Role alert will make the error message announce immediately
|
|
@@ -120,16 +117,7 @@ export class ErrorController extends SlotController {
|
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @param {HTMLElement} errorNode
|
|
128
|
-
* @private
|
|
129
|
-
*/
|
|
130
|
-
__updateErrorId(errorNode) {
|
|
131
|
-
if (!errorNode.id) {
|
|
132
|
-
errorNode.id = this.defaultId;
|
|
133
|
-
}
|
|
120
|
+
// Notify the host after update.
|
|
121
|
+
super.updateDefaultNode(errorNode);
|
|
134
122
|
}
|
|
135
123
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addValueToAttribute, removeValueFromAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
@@ -15,6 +15,16 @@ export class FieldAriaController {
|
|
|
15
15
|
this.__required = false;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* `true` if the target element is the host component itself, `false` otherwise.
|
|
20
|
+
*
|
|
21
|
+
* @return {boolean}
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
get __isGroupField() {
|
|
25
|
+
return this.__target === this.host;
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* Sets a target element to which ARIA attributes are added.
|
|
20
30
|
*
|
|
@@ -81,16 +91,6 @@ export class FieldAriaController {
|
|
|
81
91
|
this.__helperId = helperId;
|
|
82
92
|
}
|
|
83
93
|
|
|
84
|
-
/**
|
|
85
|
-
* `true` if the target element is the host component itself, `false` otherwise.
|
|
86
|
-
*
|
|
87
|
-
* @return {boolean}
|
|
88
|
-
* @private
|
|
89
|
-
*/
|
|
90
|
-
get __isGroupField() {
|
|
91
|
-
return this.__target === this.host;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
94
|
/**
|
|
95
95
|
* @param {string | null | undefined} labelId
|
|
96
96
|
* @param {string | null | undefined} oldLabelId
|
package/src/field-mixin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
package/src/field-mixin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
@@ -56,9 +56,27 @@ export const FieldMixin = (superclass) =>
|
|
|
56
56
|
return ['_invalidChanged(invalid)', '_requiredChanged(required)'];
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
constructor() {
|
|
60
|
+
super();
|
|
61
|
+
|
|
62
|
+
this._fieldAriaController = new FieldAriaController(this);
|
|
63
|
+
this._helperController = new HelperController(this);
|
|
64
|
+
this._errorController = new ErrorController(this);
|
|
65
|
+
|
|
66
|
+
this._errorController.addEventListener('slot-content-changed', (event) => {
|
|
67
|
+
this.toggleAttribute('has-error-message', event.detail.hasContent);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this._labelController.addEventListener('slot-content-changed', (event) => {
|
|
71
|
+
const { hasContent, node } = event.detail;
|
|
72
|
+
this.__labelChanged(hasContent, node);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
this._helperController.addEventListener('slot-content-changed', (event) => {
|
|
76
|
+
const { hasContent, node } = event.detail;
|
|
77
|
+
this.toggleAttribute('has-helper', hasContent);
|
|
78
|
+
this.__helperChanged(hasContent, node);
|
|
79
|
+
});
|
|
62
80
|
}
|
|
63
81
|
|
|
64
82
|
/**
|
|
@@ -69,11 +87,6 @@ export const FieldMixin = (superclass) =>
|
|
|
69
87
|
return this._errorController.node;
|
|
70
88
|
}
|
|
71
89
|
|
|
72
|
-
/** @protected */
|
|
73
|
-
get _helperId() {
|
|
74
|
-
return this._helperController.helperId;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
90
|
/**
|
|
78
91
|
* @protected
|
|
79
92
|
* @return {HTMLElement}
|
|
@@ -82,24 +95,6 @@ export const FieldMixin = (superclass) =>
|
|
|
82
95
|
return this._helperController.node;
|
|
83
96
|
}
|
|
84
97
|
|
|
85
|
-
constructor() {
|
|
86
|
-
super();
|
|
87
|
-
|
|
88
|
-
this._fieldAriaController = new FieldAriaController(this);
|
|
89
|
-
this._helperController = new HelperController(this);
|
|
90
|
-
this._errorController = new ErrorController(this);
|
|
91
|
-
|
|
92
|
-
this._labelController.addEventListener('label-changed', (event) => {
|
|
93
|
-
const { hasLabel, node } = event.detail;
|
|
94
|
-
this.__labelChanged(hasLabel, node);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
this._helperController.addEventListener('helper-changed', (event) => {
|
|
98
|
-
const { hasHelper, node } = event.detail;
|
|
99
|
-
this.__helperChanged(hasHelper, node);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
98
|
/** @protected */
|
|
104
99
|
ready() {
|
|
105
100
|
super.ready();
|
|
@@ -178,7 +173,8 @@ export const FieldMixin = (superclass) =>
|
|
|
178
173
|
// Error message ID needs to be dynamically added / removed based on the validity
|
|
179
174
|
// Otherwise assistive technologies would announce the error, even if we hide it.
|
|
180
175
|
if (invalid) {
|
|
181
|
-
this.
|
|
176
|
+
const node = this._errorNode;
|
|
177
|
+
this._fieldAriaController.setErrorId(node && node.id);
|
|
182
178
|
} else {
|
|
183
179
|
this._fieldAriaController.setErrorId(null);
|
|
184
180
|
}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A controller that manages the helper node content.
|
|
10
10
|
*/
|
|
11
|
-
export class HelperController extends
|
|
11
|
+
export class HelperController extends SlotChildObserveController {
|
|
12
12
|
/**
|
|
13
13
|
* String used for the helper text.
|
|
14
14
|
*/
|
|
15
15
|
helperText: string | null | undefined;
|
|
16
16
|
|
|
17
|
-
helperId: string;
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* Set helper text based on corresponding host property.
|
|
21
19
|
*/
|