@progress/kendo-angular-inputs 9.0.0-next.202204130851 → 9.0.1
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.
|
@@ -107,6 +107,9 @@ export class FormFieldComponent {
|
|
|
107
107
|
ngAfterViewInit() {
|
|
108
108
|
this.setDescription();
|
|
109
109
|
}
|
|
110
|
+
ngAfterViewChecked() {
|
|
111
|
+
this.updateDescription();
|
|
112
|
+
}
|
|
110
113
|
ngOnDestroy() {
|
|
111
114
|
this.subscriptions.unsubscribe();
|
|
112
115
|
}
|
|
@@ -145,7 +148,12 @@ export class FormFieldComponent {
|
|
|
145
148
|
controls.forEach((control) => {
|
|
146
149
|
if (this.errorChildren.length > 0 || this.hintChildren.length > 0) {
|
|
147
150
|
const ariaIds = this.generateDescriptionIds(control);
|
|
148
|
-
|
|
151
|
+
if (ariaIds !== '') {
|
|
152
|
+
this.renderer.setAttribute(control, 'aria-describedby', ariaIds);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.renderer.removeAttribute(control, 'aria-describedby');
|
|
156
|
+
}
|
|
149
157
|
}
|
|
150
158
|
});
|
|
151
159
|
}
|
|
@@ -161,8 +169,10 @@ export class FormFieldComponent {
|
|
|
161
169
|
}
|
|
162
170
|
generateDescriptionIds(control) {
|
|
163
171
|
const ids = new Set();
|
|
172
|
+
let errorAttribute = '';
|
|
164
173
|
if (control.hasAttribute('aria-describedby')) {
|
|
165
174
|
const attributes = control.getAttribute('aria-describedby').split(' ');
|
|
175
|
+
errorAttribute = attributes.filter(attr => attr.includes('kendo-error-'))[0];
|
|
166
176
|
attributes.forEach((attr) => {
|
|
167
177
|
if (attr.includes('kendo-hint-') || attr.includes('kendo-error-')) {
|
|
168
178
|
return;
|
|
@@ -173,9 +183,14 @@ export class FormFieldComponent {
|
|
|
173
183
|
this.hintChildren.forEach((hint) => {
|
|
174
184
|
ids.add(hint.id);
|
|
175
185
|
});
|
|
176
|
-
this.
|
|
177
|
-
|
|
178
|
-
|
|
186
|
+
if (this.hasErrors) {
|
|
187
|
+
this.errorChildren.forEach((error) => {
|
|
188
|
+
ids.add(error.id);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
ids.delete(errorAttribute);
|
|
193
|
+
}
|
|
179
194
|
return Array.from(ids).join(' ');
|
|
180
195
|
}
|
|
181
196
|
showHintsInitial() {
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1652107572,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -519,7 +519,7 @@ const packageMetadata = {
|
|
|
519
519
|
name: '@progress/kendo-angular-inputs',
|
|
520
520
|
productName: 'Kendo UI for Angular',
|
|
521
521
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
522
|
-
publishDate:
|
|
522
|
+
publishDate: 1652107572,
|
|
523
523
|
version: '',
|
|
524
524
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
525
525
|
};
|
|
@@ -12746,6 +12746,9 @@ class FormFieldComponent {
|
|
|
12746
12746
|
ngAfterViewInit() {
|
|
12747
12747
|
this.setDescription();
|
|
12748
12748
|
}
|
|
12749
|
+
ngAfterViewChecked() {
|
|
12750
|
+
this.updateDescription();
|
|
12751
|
+
}
|
|
12749
12752
|
ngOnDestroy() {
|
|
12750
12753
|
this.subscriptions.unsubscribe();
|
|
12751
12754
|
}
|
|
@@ -12784,7 +12787,12 @@ class FormFieldComponent {
|
|
|
12784
12787
|
controls.forEach((control) => {
|
|
12785
12788
|
if (this.errorChildren.length > 0 || this.hintChildren.length > 0) {
|
|
12786
12789
|
const ariaIds = this.generateDescriptionIds(control);
|
|
12787
|
-
|
|
12790
|
+
if (ariaIds !== '') {
|
|
12791
|
+
this.renderer.setAttribute(control, 'aria-describedby', ariaIds);
|
|
12792
|
+
}
|
|
12793
|
+
else {
|
|
12794
|
+
this.renderer.removeAttribute(control, 'aria-describedby');
|
|
12795
|
+
}
|
|
12788
12796
|
}
|
|
12789
12797
|
});
|
|
12790
12798
|
}
|
|
@@ -12800,8 +12808,10 @@ class FormFieldComponent {
|
|
|
12800
12808
|
}
|
|
12801
12809
|
generateDescriptionIds(control) {
|
|
12802
12810
|
const ids = new Set();
|
|
12811
|
+
let errorAttribute = '';
|
|
12803
12812
|
if (control.hasAttribute('aria-describedby')) {
|
|
12804
12813
|
const attributes = control.getAttribute('aria-describedby').split(' ');
|
|
12814
|
+
errorAttribute = attributes.filter(attr => attr.includes('kendo-error-'))[0];
|
|
12805
12815
|
attributes.forEach((attr) => {
|
|
12806
12816
|
if (attr.includes('kendo-hint-') || attr.includes('kendo-error-')) {
|
|
12807
12817
|
return;
|
|
@@ -12812,9 +12822,14 @@ class FormFieldComponent {
|
|
|
12812
12822
|
this.hintChildren.forEach((hint) => {
|
|
12813
12823
|
ids.add(hint.id);
|
|
12814
12824
|
});
|
|
12815
|
-
this.
|
|
12816
|
-
|
|
12817
|
-
|
|
12825
|
+
if (this.hasErrors) {
|
|
12826
|
+
this.errorChildren.forEach((error) => {
|
|
12827
|
+
ids.add(error.id);
|
|
12828
|
+
});
|
|
12829
|
+
}
|
|
12830
|
+
else {
|
|
12831
|
+
ids.delete(errorAttribute);
|
|
12832
|
+
}
|
|
12818
12833
|
return Array.from(ids).join(' ');
|
|
12819
12834
|
}
|
|
12820
12835
|
showHintsInitial() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { AfterViewInit, ElementRef, Renderer2, QueryList } from '@angular/core';
|
|
5
|
+
import { AfterViewInit, ElementRef, Renderer2, QueryList, AfterViewChecked } from '@angular/core';
|
|
6
6
|
import { NgControl } from '@angular/forms';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { ShowOptions } from './models/show-options';
|
|
@@ -14,7 +14,7 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
* Specifies a container for form-bound controls (Kendo controls or native HTML controls).
|
|
15
15
|
* Applies styling and behavior rules.
|
|
16
16
|
*/
|
|
17
|
-
export declare class FormFieldComponent implements AfterViewInit {
|
|
17
|
+
export declare class FormFieldComponent implements AfterViewInit, AfterViewChecked {
|
|
18
18
|
private renderer;
|
|
19
19
|
private localizationService;
|
|
20
20
|
private hostElement;
|
|
@@ -79,6 +79,7 @@ export declare class FormFieldComponent implements AfterViewInit {
|
|
|
79
79
|
private rtl;
|
|
80
80
|
constructor(renderer: Renderer2, localizationService: LocalizationService, hostElement: ElementRef<HTMLElement>);
|
|
81
81
|
ngAfterViewInit(): void;
|
|
82
|
+
ngAfterViewChecked(): void;
|
|
82
83
|
ngOnDestroy(): void;
|
|
83
84
|
private disabledKendoInput;
|
|
84
85
|
private disabledControl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-inputs",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Inputs Package for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"tslib": "^2.3.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@angular/animations": "
|
|
41
|
-
"@angular/common": "
|
|
42
|
-
"@angular/core": "
|
|
43
|
-
"@angular/forms": "
|
|
44
|
-
"@progress/kendo-angular-common": "
|
|
45
|
-
"@progress/kendo-angular-intl": "
|
|
46
|
-
"@progress/kendo-angular-l10n": "
|
|
47
|
-
"@progress/kendo-angular-popup": "
|
|
40
|
+
"@angular/animations": "12 - 14",
|
|
41
|
+
"@angular/common": "12 - 14",
|
|
42
|
+
"@angular/core": "12 - 14",
|
|
43
|
+
"@angular/forms": "12 - 14",
|
|
44
|
+
"@progress/kendo-angular-common": "^3.0.0",
|
|
45
|
+
"@progress/kendo-angular-intl": "^4.0.0",
|
|
46
|
+
"@progress/kendo-angular-l10n": "^4.0.0",
|
|
47
|
+
"@progress/kendo-angular-popup": "^5.0.0",
|
|
48
48
|
"@progress/kendo-drawing": "^1.5.12",
|
|
49
49
|
"@progress/kendo-licensing": "^1.0.2",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
@@ -76,12 +76,10 @@
|
|
|
76
76
|
"release": {
|
|
77
77
|
"debug": false,
|
|
78
78
|
"branchTags": {
|
|
79
|
-
"develop": "dev"
|
|
80
|
-
"ng12-update": "next"
|
|
79
|
+
"develop": "dev"
|
|
81
80
|
},
|
|
82
81
|
"fallbackTags": {
|
|
83
|
-
"dev": "latest"
|
|
84
|
-
"next": "latest"
|
|
82
|
+
"dev": "latest"
|
|
85
83
|
},
|
|
86
84
|
"analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits",
|
|
87
85
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|