@progress/kendo-angular-dropdowns 7.1.0-dev.202208301349 → 7.1.0-dev.202208301423
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/autocomplete/autocomplete.component.d.ts +0 -1
- package/bundles/kendo-angular-dropdowns.umd.js +1 -1
- package/comboboxes/combobox.component.d.ts +0 -1
- package/common/list.component.d.ts +4 -1
- package/common/searchbar.component.d.ts +17 -6
- package/common/shared.module.d.ts +1 -1
- package/dropdownlist/dropdownlist.component.d.ts +22 -10
- package/esm2015/autocomplete/autocomplete.component.js +12 -8
- package/esm2015/comboboxes/combobox.component.js +14 -8
- package/esm2015/comboboxes/multicolumncombobox.component.js +13 -3
- package/esm2015/common/list.component.js +16 -1
- package/esm2015/common/searchbar.component.js +79 -19
- package/esm2015/common/shared.module.js +6 -6
- package/esm2015/dropdownlist/dropdownlist.component.js +73 -42
- package/esm2015/multiselect/multiselect.component.js +17 -21
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-dropdowns.js +229 -109
- package/multiselect/multiselect.component.d.ts +0 -3
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ import { Component, Input, Output, EventEmitter, ViewChild, HostBinding } from '
|
|
|
6
6
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
7
|
import { Keys } from '@progress/kendo-angular-common';
|
|
8
8
|
import { combineStr } from './util';
|
|
9
|
+
import { Subscription } from 'rxjs';
|
|
10
|
+
import { NgControl } from '@angular/forms';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
11
13
|
import * as i2 from "@progress/kendo-angular-common";
|
|
@@ -13,8 +15,9 @@ import * as i2 from "@progress/kendo-angular-common";
|
|
|
13
15
|
* @hidden
|
|
14
16
|
*/
|
|
15
17
|
export class SearchBarComponent {
|
|
16
|
-
constructor(localization, renderer) {
|
|
18
|
+
constructor(localization, renderer, injector) {
|
|
17
19
|
this.localization = localization;
|
|
20
|
+
this.injector = injector;
|
|
18
21
|
this.valueChange = new EventEmitter();
|
|
19
22
|
this.onBlur = new EventEmitter();
|
|
20
23
|
this.onFocus = new EventEmitter();
|
|
@@ -24,9 +27,30 @@ export class SearchBarComponent {
|
|
|
24
27
|
this._userInput = "";
|
|
25
28
|
this._previousValue = "";
|
|
26
29
|
this._placeholder = "";
|
|
30
|
+
this._isSuggestable = false;
|
|
31
|
+
this._isFilterable = false;
|
|
32
|
+
this.subs = new Subscription();
|
|
27
33
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
28
34
|
this.renderer = renderer;
|
|
29
35
|
}
|
|
36
|
+
set isSuggestable(isSuggestable) {
|
|
37
|
+
this._isSuggestable = isSuggestable;
|
|
38
|
+
this.setAriaAutocomplete();
|
|
39
|
+
}
|
|
40
|
+
;
|
|
41
|
+
get isSuggestable() {
|
|
42
|
+
return this._isSuggestable;
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
set isFilterable(isFilterable) {
|
|
46
|
+
this._isFilterable = isFilterable;
|
|
47
|
+
this.setAriaAutocomplete();
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
get isFilterable() {
|
|
51
|
+
return this._isFilterable;
|
|
52
|
+
}
|
|
53
|
+
;
|
|
30
54
|
get userInput() {
|
|
31
55
|
return this._userInput;
|
|
32
56
|
}
|
|
@@ -47,8 +71,19 @@ export class SearchBarComponent {
|
|
|
47
71
|
return this.role === 'combobox' ? this.popupOpen : null;
|
|
48
72
|
}
|
|
49
73
|
ngOnInit() {
|
|
50
|
-
this.
|
|
51
|
-
.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
|
|
74
|
+
this.subs.add(this.localization
|
|
75
|
+
.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
76
|
+
}
|
|
77
|
+
ngAfterContentChecked() {
|
|
78
|
+
var _a;
|
|
79
|
+
const formControl = (_a = this.injector.get(NgControl, null)) === null || _a === void 0 ? void 0 : _a.control;
|
|
80
|
+
this.control = formControl;
|
|
81
|
+
if (formControl) {
|
|
82
|
+
this.subs.add(formControl.valueChanges.subscribe(() => {
|
|
83
|
+
this.control = formControl;
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
this.setAriaInvalid();
|
|
52
87
|
}
|
|
53
88
|
ngOnChanges(changes) {
|
|
54
89
|
let previousUserInput;
|
|
@@ -80,9 +115,7 @@ export class SearchBarComponent {
|
|
|
80
115
|
}
|
|
81
116
|
}
|
|
82
117
|
ngOnDestroy() {
|
|
83
|
-
|
|
84
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
85
|
-
}
|
|
118
|
+
this.subs.unsubscribe();
|
|
86
119
|
}
|
|
87
120
|
writeInputValue(text) {
|
|
88
121
|
if (isDocumentAvailable()) {
|
|
@@ -99,6 +132,33 @@ export class SearchBarComponent {
|
|
|
99
132
|
}
|
|
100
133
|
}
|
|
101
134
|
}
|
|
135
|
+
setAriaInvalid() {
|
|
136
|
+
if (this.control) {
|
|
137
|
+
if (this.control.invalid) {
|
|
138
|
+
this.renderer.setAttribute(this.input.nativeElement, 'aria-invalid', 'true');
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.renderer.setAttribute(this.input.nativeElement, 'aria-invalid', 'false');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this.renderer.removeAttribute(this.input.nativeElement, 'aria-invalid');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
setAriaAutocomplete() {
|
|
149
|
+
if (this.isFilterable) {
|
|
150
|
+
this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'list');
|
|
151
|
+
}
|
|
152
|
+
if (this.isSuggestable) {
|
|
153
|
+
this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'inline');
|
|
154
|
+
}
|
|
155
|
+
if (this.isFilterable && this.isSuggestable) {
|
|
156
|
+
this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'both');
|
|
157
|
+
}
|
|
158
|
+
if (!this.isFilterable && !this.isSuggestable) {
|
|
159
|
+
this.renderer.removeAttribute(this.input.nativeElement, 'aria-autocomplete');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
102
162
|
handleInput(event) {
|
|
103
163
|
const value = event.target.value;
|
|
104
164
|
if (value !== this.userInput) {
|
|
@@ -139,8 +199,8 @@ export class SearchBarComponent {
|
|
|
139
199
|
this.renderer.setAttribute(input, 'size', size.toString());
|
|
140
200
|
}
|
|
141
201
|
}
|
|
142
|
-
SearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
-
SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SearchBarComponent, selector: "kendo-searchbar", inputs: { id: "id", listId: "listId", tagListId: "tagListId", activeDescendant: "activeDescendant",
|
|
202
|
+
SearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
203
|
+
SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SearchBarComponent, selector: "kendo-searchbar", inputs: { id: "id", listId: "listId", tagListId: "tagListId", activeDescendant: "activeDescendant", disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", popupOpen: "popupOpen", role: "role", isLoading: "isLoading", isSuggestable: "isSuggestable", isFilterable: "isFilterable", userInput: "userInput", suggestedText: "suggestedText", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", onBlur: "onBlur", onFocus: "onFocus", onClick: "onClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-searchbar": "this.searchBarClass" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
144
204
|
<input #input
|
|
145
205
|
autocomplete="off"
|
|
146
206
|
[id]="id"
|
|
@@ -158,14 +218,12 @@ SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
158
218
|
[attr.tabIndex]="tabIndex"
|
|
159
219
|
[attr.dir]="direction"
|
|
160
220
|
[attr.role]="role"
|
|
161
|
-
[attr.aria-disabled]="disabled"
|
|
162
|
-
[attr.aria-readonly]="readonly"
|
|
163
221
|
aria-haspopup="listbox"
|
|
164
222
|
[attr.aria-expanded]="ariaExpanded"
|
|
165
|
-
[attr.aria-
|
|
223
|
+
[attr.aria-controls]="listId"
|
|
166
224
|
[attr.aria-describedby]="tagListId"
|
|
167
225
|
[attr.aria-activedescendant]="activeDescendant"
|
|
168
|
-
[attr.aria-
|
|
226
|
+
[attr.aria-busy]="isLoading"
|
|
169
227
|
/>
|
|
170
228
|
`, isInline: true, directives: [{ type: i2.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
|
|
171
229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
@@ -190,18 +248,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
190
248
|
[attr.tabIndex]="tabIndex"
|
|
191
249
|
[attr.dir]="direction"
|
|
192
250
|
[attr.role]="role"
|
|
193
|
-
[attr.aria-disabled]="disabled"
|
|
194
|
-
[attr.aria-readonly]="readonly"
|
|
195
251
|
aria-haspopup="listbox"
|
|
196
252
|
[attr.aria-expanded]="ariaExpanded"
|
|
197
|
-
[attr.aria-
|
|
253
|
+
[attr.aria-controls]="listId"
|
|
198
254
|
[attr.aria-describedby]="tagListId"
|
|
199
255
|
[attr.aria-activedescendant]="activeDescendant"
|
|
200
|
-
[attr.aria-
|
|
256
|
+
[attr.aria-busy]="isLoading"
|
|
201
257
|
/>
|
|
202
258
|
`
|
|
203
259
|
}]
|
|
204
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { id: [{
|
|
260
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.Injector }]; }, propDecorators: { id: [{
|
|
205
261
|
type: Input
|
|
206
262
|
}], listId: [{
|
|
207
263
|
type: Input
|
|
@@ -209,8 +265,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
209
265
|
type: Input
|
|
210
266
|
}], activeDescendant: [{
|
|
211
267
|
type: Input
|
|
212
|
-
}], noDataLabel: [{
|
|
213
|
-
type: Input
|
|
214
268
|
}], disabled: [{
|
|
215
269
|
type: Input
|
|
216
270
|
}], readonly: [{
|
|
@@ -221,6 +275,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
221
275
|
type: Input
|
|
222
276
|
}], role: [{
|
|
223
277
|
type: Input
|
|
278
|
+
}], isLoading: [{
|
|
279
|
+
type: Input
|
|
280
|
+
}], isSuggestable: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}], isFilterable: [{
|
|
283
|
+
type: Input
|
|
224
284
|
}], userInput: [{
|
|
225
285
|
type: Input
|
|
226
286
|
}], suggestedText: [{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { NgModule } from '@angular/core';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import { ListComponent } from './list.component';
|
|
9
9
|
import { SearchBarComponent } from './searchbar.component';
|
|
10
10
|
import { TagListComponent } from './taglist.component';
|
|
@@ -40,20 +40,20 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
40
40
|
TemplateContextDirective,
|
|
41
41
|
TagListComponent,
|
|
42
42
|
CheckDirective,
|
|
43
|
-
CheckAllDirective], imports: [CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], exports: [ListComponent,
|
|
43
|
+
CheckAllDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], exports: [ListComponent,
|
|
44
44
|
ListItemDirective,
|
|
45
45
|
SelectableDirective,
|
|
46
46
|
SearchBarComponent,
|
|
47
47
|
TemplateContextDirective,
|
|
48
48
|
TagListComponent,
|
|
49
49
|
CheckDirective,
|
|
50
|
-
CheckAllDirective, CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
|
|
51
|
-
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
|
|
50
|
+
CheckAllDirective, CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
|
|
51
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
|
|
52
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
|
|
53
53
|
type: NgModule,
|
|
54
54
|
args: [{
|
|
55
55
|
declarations: [INTERNAL_DIRECTIVES],
|
|
56
|
-
exports: [INTERNAL_DIRECTIVES, CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule],
|
|
57
|
-
imports: [CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule]
|
|
56
|
+
exports: [INTERNAL_DIRECTIVES, CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule],
|
|
57
|
+
imports: [CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule]
|
|
58
58
|
}]
|
|
59
59
|
}] });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, forwardRef, Input, Output, HostBinding, EventEmitter, ContentChild, ViewChild, ViewContainerRef, isDevMode, Optional, Inject, HostListener } from '@angular/core';
|
|
6
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import { packageMetadata } from '../package-metadata';
|
|
9
9
|
import { merge, interval, Subscription } from 'rxjs';
|
|
@@ -73,7 +73,7 @@ const DEFAULT_FILL_MODE = 'solid';
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
export class DropDownListComponent {
|
|
76
|
-
constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled) {
|
|
76
|
+
constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled, injector) {
|
|
77
77
|
this.wrapper = wrapper;
|
|
78
78
|
this.localization = localization;
|
|
79
79
|
this.popupService = popupService;
|
|
@@ -85,6 +85,7 @@ export class DropDownListComponent {
|
|
|
85
85
|
this.renderer = renderer;
|
|
86
86
|
this.cdr = cdr;
|
|
87
87
|
this.touchEnabled = touchEnabled;
|
|
88
|
+
this.injector = injector;
|
|
88
89
|
/**
|
|
89
90
|
* Sets the height of the options list. By default, `listHeight` is 200px.
|
|
90
91
|
*
|
|
@@ -92,10 +93,6 @@ export class DropDownListComponent {
|
|
|
92
93
|
* > To set the height of the popup container, use `popupSettings.height`.
|
|
93
94
|
*/
|
|
94
95
|
this.listHeight = 200;
|
|
95
|
-
/**
|
|
96
|
-
* Sets the disabled state of the component.
|
|
97
|
-
*/
|
|
98
|
-
this.disabled = false;
|
|
99
96
|
/**
|
|
100
97
|
* Sets the read-only state of the component.
|
|
101
98
|
*/
|
|
@@ -167,7 +164,8 @@ export class DropDownListComponent {
|
|
|
167
164
|
* @hidden
|
|
168
165
|
*/
|
|
169
166
|
this.focusableId = `k-${guid()}`;
|
|
170
|
-
this.role = '
|
|
167
|
+
this.role = 'combobox';
|
|
168
|
+
this.haspopup = 'listbox';
|
|
171
169
|
this.groupIndices = [];
|
|
172
170
|
this.listBoxId = guid();
|
|
173
171
|
this.optionPrefix = guid();
|
|
@@ -217,7 +215,7 @@ export class DropDownListComponent {
|
|
|
217
215
|
get ariaExpanded() {
|
|
218
216
|
return this.isOpen;
|
|
219
217
|
}
|
|
220
|
-
get
|
|
218
|
+
get ariaControls() {
|
|
221
219
|
if (!this.isOpen) {
|
|
222
220
|
return;
|
|
223
221
|
}
|
|
@@ -229,11 +227,6 @@ export class DropDownListComponent {
|
|
|
229
227
|
}
|
|
230
228
|
return this.optionPrefix + "-" + getter(this.dataItem, this.valueField);
|
|
231
229
|
}
|
|
232
|
-
get noDataLabel() {
|
|
233
|
-
if (this.dataService.itemsCount === 0) {
|
|
234
|
-
return this.messageFor('noDataText');
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
230
|
get appendTo() {
|
|
238
231
|
const { appendTo } = this.popupSettings;
|
|
239
232
|
if (!appendTo || appendTo === 'root') {
|
|
@@ -241,6 +234,12 @@ export class DropDownListComponent {
|
|
|
241
234
|
}
|
|
242
235
|
return appendTo === 'component' ? this.container : appendTo;
|
|
243
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* @hidden
|
|
239
|
+
*/
|
|
240
|
+
get ariaLive() {
|
|
241
|
+
return this.filterable ? 'polite' : 'off';
|
|
242
|
+
}
|
|
244
243
|
/**
|
|
245
244
|
* Sets the data of the DropDownList.
|
|
246
245
|
*
|
|
@@ -449,9 +448,12 @@ export class DropDownListComponent {
|
|
|
449
448
|
popupWrapper.style.width = max;
|
|
450
449
|
}
|
|
451
450
|
}
|
|
452
|
-
get
|
|
451
|
+
get isDisabledClass() {
|
|
453
452
|
return this.disabled;
|
|
454
453
|
}
|
|
454
|
+
get isDisabledAttribute() {
|
|
455
|
+
return this.disabled ? '' : null;
|
|
456
|
+
}
|
|
455
457
|
get isLoading() {
|
|
456
458
|
return this.loading;
|
|
457
459
|
}
|
|
@@ -461,21 +463,28 @@ export class DropDownListComponent {
|
|
|
461
463
|
get hostTabIndex() {
|
|
462
464
|
return this.widgetTabIndex;
|
|
463
465
|
}
|
|
464
|
-
get
|
|
466
|
+
get readonlyClass() {
|
|
465
467
|
return this.readonly;
|
|
466
468
|
}
|
|
469
|
+
get readonlyAttr() {
|
|
470
|
+
return this.readonly ? '' : null;
|
|
471
|
+
}
|
|
472
|
+
get isBusy() {
|
|
473
|
+
return this.isLoading;
|
|
474
|
+
}
|
|
467
475
|
get isAriaExpanded() {
|
|
468
476
|
return this.ariaExpanded;
|
|
469
477
|
}
|
|
470
|
-
get
|
|
471
|
-
return this.
|
|
478
|
+
get hostAriaControls() {
|
|
479
|
+
return this.ariaControls;
|
|
480
|
+
}
|
|
481
|
+
get hostAriaInvalid() {
|
|
482
|
+
var _a;
|
|
483
|
+
return this.formControl ? (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.invalid.toString() : null;
|
|
472
484
|
}
|
|
473
485
|
get hostAriaActivedescendant() {
|
|
474
486
|
return this.ariaActivedescendant;
|
|
475
487
|
}
|
|
476
|
-
get hostNoDataLabel() {
|
|
477
|
-
return this.noDataLabel;
|
|
478
|
-
}
|
|
479
488
|
/**
|
|
480
489
|
* @hidden
|
|
481
490
|
*/
|
|
@@ -602,6 +611,13 @@ export class DropDownListComponent {
|
|
|
602
611
|
ngAfterContentChecked() {
|
|
603
612
|
this.verifySettings();
|
|
604
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* @hidden
|
|
616
|
+
*/
|
|
617
|
+
get formControl() {
|
|
618
|
+
const ngControl = this.injector.get(NgControl, null);
|
|
619
|
+
return (ngControl === null || ngControl === void 0 ? void 0 : ngControl.control) || null;
|
|
620
|
+
}
|
|
605
621
|
/**
|
|
606
622
|
* Focuses a specific item of the DropDownList based on a provided index.
|
|
607
623
|
* If there is a default item it is positioned at index -1.
|
|
@@ -631,6 +647,7 @@ export class DropDownListComponent {
|
|
|
631
647
|
blur() {
|
|
632
648
|
if (!this.disabled) {
|
|
633
649
|
this.wrapper.nativeElement.blur();
|
|
650
|
+
this.cdr.detectChanges();
|
|
634
651
|
}
|
|
635
652
|
}
|
|
636
653
|
/**
|
|
@@ -802,6 +819,11 @@ export class DropDownListComponent {
|
|
|
802
819
|
popupWrapper.style.width = max;
|
|
803
820
|
popupWrapper.style.height = this.height;
|
|
804
821
|
popupWrapper.setAttribute("dir", this.direction);
|
|
822
|
+
const listBox = popupWrapper.querySelector('ul.k-list-ul');
|
|
823
|
+
const ariaLabel = this.wrapper.nativeElement.getAttribute('aria-labelledby');
|
|
824
|
+
if (ariaLabel) {
|
|
825
|
+
listBox.setAttribute('aria-labelledby', ariaLabel);
|
|
826
|
+
}
|
|
805
827
|
this.subs.add(this.popupRef.popupOpen.subscribe(() => {
|
|
806
828
|
this.cdr.detectChanges();
|
|
807
829
|
this.optionsList.scrollToItem(this.selectionService.focused);
|
|
@@ -1204,8 +1226,8 @@ export class DropDownListComponent {
|
|
|
1204
1226
|
}
|
|
1205
1227
|
}
|
|
1206
1228
|
}
|
|
1207
|
-
DropDownListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownListComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.SelectionService }, { token: i4.NavigationService }, { token: i5.DisabledItemsService }, { token: i6.DataService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1208
|
-
DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: { iconClass: "iconClass", loading: "loading", data: "data", value: "value", textField: "textField", valueField: "valueField", popupSettings: "popupSettings", listHeight: "listHeight", defaultItem: "defaultItem", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", filterable: "filterable", virtual: "virtual", ignoreCase: "ignoreCase", delay: "delay", valuePrimitive: "valuePrimitive", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", focusableId: ["id", "focusableId"] }, outputs: { valueChange: "valueChange", filterChange: "filterChange", selectionChange: "selectionChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "click": "click($event)" }, properties: { "class.k-dropdownlist": "this.hostClasses", "class.k-picker": "this.hostClasses", "class.k-disabled": "this.
|
|
1229
|
+
DropDownListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownListComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.SelectionService }, { token: i4.NavigationService }, { token: i5.DisabledItemsService }, { token: i6.DataService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: TOUCH_ENABLED, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1230
|
+
DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: { iconClass: "iconClass", loading: "loading", data: "data", value: "value", textField: "textField", valueField: "valueField", popupSettings: "popupSettings", listHeight: "listHeight", defaultItem: "defaultItem", disabled: "disabled", itemDisabled: "itemDisabled", readonly: "readonly", filterable: "filterable", virtual: "virtual", ignoreCase: "ignoreCase", delay: "delay", valuePrimitive: "valuePrimitive", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", focusableId: ["id", "focusableId"] }, outputs: { valueChange: "valueChange", filterChange: "filterChange", selectionChange: "selectionChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keypress": "keypress($event)", "click": "click($event)" }, properties: { "class.k-dropdownlist": "this.hostClasses", "class.k-picker": "this.hostClasses", "class.k-disabled": "this.isDisabledClass", "attr.disabled": "this.isDisabledAttribute", "class.k-loading": "this.isLoading", "attr.id": "this.focusableId", "attr.dir": "this.dir", "attr.tabindex": "this.hostTabIndex", "attr.readonly": "this.readonlyAttr", "attr.aria-busy": "this.isBusy", "attr.role": "this.role", "attr.aria-haspopup": "this.haspopup", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-controls": "this.hostAriaControls", "attr.aria-invalid": "this.hostAriaInvalid", "attr.aria-activedescendant": "this.hostAriaActivedescendant" } }, providers: [
|
|
1209
1231
|
DROPDOWNLIST_VALUE_ACCESSOR,
|
|
1210
1232
|
DataService,
|
|
1211
1233
|
SelectionService,
|
|
@@ -1231,7 +1253,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1231
1253
|
selectButtonText="Select"
|
|
1232
1254
|
>
|
|
1233
1255
|
</ng-container>
|
|
1234
|
-
<span class="k-input-inner" unselectable="on"
|
|
1256
|
+
<span class="k-input-inner" unselectable="on" [id]="valueLabelId">
|
|
1235
1257
|
<span class="k-input-value-text">
|
|
1236
1258
|
<ng-template *ngIf="valueTemplate"
|
|
1237
1259
|
[templateContext]="{
|
|
@@ -1270,9 +1292,11 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1270
1292
|
>
|
|
1271
1293
|
<span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
|
|
1272
1294
|
<input
|
|
1273
|
-
|
|
1295
|
+
role="searchbox"
|
|
1296
|
+
aria-autocomplete="list"
|
|
1297
|
+
aria-haspopup="listbox"
|
|
1298
|
+
[attr.aria-controls]="ariaControls"
|
|
1274
1299
|
[attr.aria-activedescendant]="ariaActivedescendant"
|
|
1275
|
-
[attr.aria-label]="noDataLabel"
|
|
1276
1300
|
tabindex="-1"
|
|
1277
1301
|
[filterInput]="isFocused && !touchEnabled"
|
|
1278
1302
|
[dir]="direction"
|
|
@@ -1333,6 +1357,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1333
1357
|
[height]="listHeight"
|
|
1334
1358
|
[show]="isOpen"
|
|
1335
1359
|
[virtual]="virtual"
|
|
1360
|
+
[ariaLive]="ariaLive"
|
|
1336
1361
|
(pageChange)="pageChange($event)"
|
|
1337
1362
|
>
|
|
1338
1363
|
</kendo-list>
|
|
@@ -1358,7 +1383,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1358
1383
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1359
1384
|
</ng-template>
|
|
1360
1385
|
<ng-container #container></ng-container>
|
|
1361
|
-
`, isInline: true, components: [{ type: i7.ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i9.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i13.FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i14.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
|
|
1386
|
+
`, isInline: true, components: [{ type: i7.ListComponent, selector: "kendo-list", inputs: ["selected", "focused", "textField", "valueField", "height", "template", "groupTemplate", "fixedGroupTemplate", "show", "id", "optionPrefix", "multipleSelection", "virtual", "type", "checkboxes", "ariaLive", "isMultiselect", "data", "size", "rounded"], outputs: ["onClick", "pageChange", "listResize"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i9.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i13.FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i14.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
|
|
1362
1387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownListComponent, decorators: [{
|
|
1363
1388
|
type: Component,
|
|
1364
1389
|
args: [{
|
|
@@ -1391,7 +1416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1391
1416
|
selectButtonText="Select"
|
|
1392
1417
|
>
|
|
1393
1418
|
</ng-container>
|
|
1394
|
-
<span class="k-input-inner" unselectable="on"
|
|
1419
|
+
<span class="k-input-inner" unselectable="on" [id]="valueLabelId">
|
|
1395
1420
|
<span class="k-input-value-text">
|
|
1396
1421
|
<ng-template *ngIf="valueTemplate"
|
|
1397
1422
|
[templateContext]="{
|
|
@@ -1430,9 +1455,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1430
1455
|
>
|
|
1431
1456
|
<span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
|
|
1432
1457
|
<input
|
|
1433
|
-
|
|
1458
|
+
role="searchbox"
|
|
1459
|
+
aria-autocomplete="list"
|
|
1460
|
+
aria-haspopup="listbox"
|
|
1461
|
+
[attr.aria-controls]="ariaControls"
|
|
1434
1462
|
[attr.aria-activedescendant]="ariaActivedescendant"
|
|
1435
|
-
[attr.aria-label]="noDataLabel"
|
|
1436
1463
|
tabindex="-1"
|
|
1437
1464
|
[filterInput]="isFocused && !touchEnabled"
|
|
1438
1465
|
[dir]="direction"
|
|
@@ -1493,6 +1520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1493
1520
|
[height]="listHeight"
|
|
1494
1521
|
[show]="isOpen"
|
|
1495
1522
|
[virtual]="virtual"
|
|
1523
|
+
[ariaLive]="ariaLive"
|
|
1496
1524
|
(pageChange)="pageChange($event)"
|
|
1497
1525
|
>
|
|
1498
1526
|
</kendo-list>
|
|
@@ -1525,7 +1553,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1525
1553
|
}, {
|
|
1526
1554
|
type: Inject,
|
|
1527
1555
|
args: [TOUCH_ENABLED]
|
|
1528
|
-
}] }]; }, propDecorators: { iconClass: [{
|
|
1556
|
+
}] }, { type: i0.Injector }]; }, propDecorators: { iconClass: [{
|
|
1529
1557
|
type: Input
|
|
1530
1558
|
}], loading: [{
|
|
1531
1559
|
type: Input
|
|
@@ -1626,12 +1654,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1626
1654
|
}, {
|
|
1627
1655
|
type: HostBinding,
|
|
1628
1656
|
args: ['class.k-picker']
|
|
1629
|
-
}],
|
|
1657
|
+
}], isDisabledClass: [{
|
|
1630
1658
|
type: HostBinding,
|
|
1631
1659
|
args: ['class.k-disabled']
|
|
1632
|
-
}, {
|
|
1660
|
+
}], isDisabledAttribute: [{
|
|
1633
1661
|
type: HostBinding,
|
|
1634
|
-
args: ['attr.
|
|
1662
|
+
args: ['attr.disabled']
|
|
1635
1663
|
}], isLoading: [{
|
|
1636
1664
|
type: HostBinding,
|
|
1637
1665
|
args: ['class.k-loading']
|
|
@@ -1647,30 +1675,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1647
1675
|
}], hostTabIndex: [{
|
|
1648
1676
|
type: HostBinding,
|
|
1649
1677
|
args: ['attr.tabindex']
|
|
1650
|
-
}],
|
|
1678
|
+
}], readonlyClass: [{
|
|
1651
1679
|
type: HostBinding,
|
|
1652
1680
|
args: ['attr.readonly']
|
|
1653
|
-
}, {
|
|
1681
|
+
}], readonlyAttr: [{
|
|
1682
|
+
type: HostBinding,
|
|
1683
|
+
args: ['attr.readonly']
|
|
1684
|
+
}], isBusy: [{
|
|
1654
1685
|
type: HostBinding,
|
|
1655
|
-
args: ['attr.aria-
|
|
1686
|
+
args: ['attr.aria-busy']
|
|
1656
1687
|
}], role: [{
|
|
1657
1688
|
type: HostBinding,
|
|
1658
1689
|
args: ['attr.role']
|
|
1659
|
-
}, {
|
|
1690
|
+
}], haspopup: [{
|
|
1660
1691
|
type: HostBinding,
|
|
1661
1692
|
args: ['attr.aria-haspopup']
|
|
1662
1693
|
}], isAriaExpanded: [{
|
|
1663
1694
|
type: HostBinding,
|
|
1664
1695
|
args: ['attr.aria-expanded']
|
|
1665
|
-
}],
|
|
1696
|
+
}], hostAriaControls: [{
|
|
1697
|
+
type: HostBinding,
|
|
1698
|
+
args: ['attr.aria-controls']
|
|
1699
|
+
}], hostAriaInvalid: [{
|
|
1666
1700
|
type: HostBinding,
|
|
1667
|
-
args: ['attr.aria-
|
|
1701
|
+
args: ['attr.aria-invalid']
|
|
1668
1702
|
}], hostAriaActivedescendant: [{
|
|
1669
1703
|
type: HostBinding,
|
|
1670
1704
|
args: ['attr.aria-activedescendant']
|
|
1671
|
-
}], hostNoDataLabel: [{
|
|
1672
|
-
type: HostBinding,
|
|
1673
|
-
args: ['attr.aria-label']
|
|
1674
1705
|
}], keydown: [{
|
|
1675
1706
|
type: HostListener,
|
|
1676
1707
|
args: ['keydown', ['$event']]
|