@progress/kendo-angular-dropdowns 7.0.3 → 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.
@@ -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,11 +164,13 @@ export class DropDownListComponent {
167
164
  * @hidden
168
165
  */
169
166
  this.focusableId = `k-${guid()}`;
170
- this.role = 'listbox';
167
+ this.role = 'combobox';
168
+ this.haspopup = 'listbox';
171
169
  this.groupIndices = [];
172
170
  this.listBoxId = guid();
173
171
  this.optionPrefix = guid();
174
172
  this.filterText = "";
173
+ this.subs = new Subscription();
175
174
  this._isFocused = false;
176
175
  this.onTouchedCallback = (_) => { };
177
176
  this.onChangeCallback = (_) => { };
@@ -181,7 +180,6 @@ export class DropDownListComponent {
181
180
  this.filterBlurred = new EventEmitter();
182
181
  this.hostElementFocused = new EventEmitter();
183
182
  this.hostElementBlurred = new EventEmitter();
184
- this.selectionSubscription = new Subscription();
185
183
  this._open = false;
186
184
  this._popupSettings = { animate: true };
187
185
  this._size = 'medium';
@@ -217,7 +215,7 @@ export class DropDownListComponent {
217
215
  get ariaExpanded() {
218
216
  return this.isOpen;
219
217
  }
220
- get ariaOwns() {
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 isDisabled() {
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 isReadonly() {
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 hostAriaOwns() {
471
- return this.ariaOwns;
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
  */
@@ -513,6 +522,8 @@ export class DropDownListComponent {
513
522
  action !== NavigationAction.Tab &&
514
523
  action !== NavigationAction.Backspace &&
515
524
  action !== NavigationAction.Delete &&
525
+ action !== NavigationAction.PageDown &&
526
+ action !== NavigationAction.PageUp &&
516
527
  !(leftRightKeys && this.filterable) &&
517
528
  action !== NavigationAction.Enter //enter when popup is opened is handled before `handleEnter`
518
529
  ) {
@@ -545,11 +556,11 @@ export class DropDownListComponent {
545
556
  }
546
557
  ngOnInit() {
547
558
  this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
548
- this.localizationChangesSubscription = this.localization
559
+ this.subs.add(this.localization
549
560
  .changes.subscribe(({ rtl }) => {
550
561
  this.direction = rtl ? 'rtl' : 'ltr';
551
562
  this.cdr.detectChanges();
552
- });
563
+ }));
553
564
  this.assignAriaDescribedBy();
554
565
  this.setComponentClasses();
555
566
  }
@@ -572,9 +583,10 @@ export class DropDownListComponent {
572
583
  */
573
584
  ngOnDestroy() {
574
585
  this.destroyPopup();
575
- this.unsubscribeEvents();
576
- if (this.localizationChangesSubscription) {
577
- this.localizationChangesSubscription.unsubscribe();
586
+ this.subs.unsubscribe();
587
+ this.unSubscribeFocusEvents();
588
+ if (this.touchstartDisposeHandler) {
589
+ this.touchstartDisposeHandler();
578
590
  }
579
591
  }
580
592
  /**
@@ -599,6 +611,13 @@ export class DropDownListComponent {
599
611
  ngAfterContentChecked() {
600
612
  this.verifySettings();
601
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
+ }
602
621
  /**
603
622
  * Focuses a specific item of the DropDownList based on a provided index.
604
623
  * If there is a default item it is positioned at index -1.
@@ -628,6 +647,7 @@ export class DropDownListComponent {
628
647
  blur() {
629
648
  if (!this.disabled) {
630
649
  this.wrapper.nativeElement.blur();
650
+ this.cdr.detectChanges();
631
651
  }
632
652
  }
633
653
  /**
@@ -727,7 +747,7 @@ export class DropDownListComponent {
727
747
  * @hidden
728
748
  */
729
749
  get buttonClasses() {
730
- return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-arrow-s';
750
+ return this.loading ? 'k-i-loading k-input-loading-icon' : this.iconClass || 'k-i-caret-alt-down';
731
751
  }
732
752
  /**
733
753
  * @hidden
@@ -799,16 +819,21 @@ export class DropDownListComponent {
799
819
  popupWrapper.style.width = max;
800
820
  popupWrapper.style.height = this.height;
801
821
  popupWrapper.setAttribute("dir", this.direction);
802
- this.popupRef.popupOpen.subscribe(() => {
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
+ }
827
+ this.subs.add(this.popupRef.popupOpen.subscribe(() => {
803
828
  this.cdr.detectChanges();
804
829
  this.optionsList.scrollToItem(this.selectionService.focused);
805
830
  this.opened.emit();
806
- });
807
- this.popupRef.popupClose.subscribe(() => {
831
+ }));
832
+ this.subs.add(this.popupRef.popupClose.subscribe(() => {
808
833
  this.closed.emit();
809
- });
834
+ }));
810
835
  if (!this.filterable) {
811
- this.popupRef.popupAnchorViewportLeave.subscribe(() => this.togglePopup(false));
836
+ this.subs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => this.togglePopup(false)));
812
837
  }
813
838
  }
814
839
  destroyPopup() {
@@ -847,10 +872,10 @@ export class DropDownListComponent {
847
872
  return;
848
873
  }
849
874
  // Item selection when the popup is open.
850
- this.selectionSubscription.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), map(this.itemFromEvent.bind(this)))
875
+ this.subs.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), map(this.itemFromEvent.bind(this)))
851
876
  .subscribe(this.onSelectionChange.bind(this)));
852
877
  // Item selection when the popup is closed | clicked | enter, and so on.
853
- this.selectionSubscription.add(merge(this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(_ => this.togglePopup(false)))
878
+ this.subs.add(merge(this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(_ => this.togglePopup(false)))
854
879
  .subscribe(({ dataItem, value: newValue, newSelection }) => {
855
880
  if (newSelection) {
856
881
  this.onSelectionChange({ dataItem });
@@ -868,27 +893,31 @@ export class DropDownListComponent {
868
893
  }
869
894
  this.clearFilter();
870
895
  }));
871
- this.navigationSubscription = merge(this.navigationService.up, this.navigationService.down, this.navigationService.left.pipe(skipWhile(() => this.filterable)), this.navigationService.right.pipe(skipWhile(() => this.filterable)), this.navigationService.home, this.navigationService.end)
896
+ this.subs.add(merge(this.navigationService.up, this.navigationService.down, this.navigationService.left.pipe(skipWhile(() => this.filterable)), this.navigationService.right.pipe(skipWhile(() => this.filterable)), this.navigationService.home, this.navigationService.end)
872
897
  .pipe(filter((event) => !isNaN(event.index)))
873
- .subscribe((event) => this.selectionService.select(event.index));
874
- this.openSubscription = this.navigationService.open.subscribe(() => this.togglePopup(true));
875
- this.closeSubscription = this.navigationService.close.subscribe(() => {
898
+ .subscribe((event) => this.selectionService.select(event.index)));
899
+ this.subs.add(merge(this.navigationService.pagedown, this.navigationService.pageup).subscribe((event) => {
900
+ if (this.isOpen) {
901
+ this.optionsList.scrollWithOnePage(NavigationAction[event.originalEvent.code]);
902
+ }
903
+ }));
904
+ this.subs.add(this.navigationService.open.subscribe(() => this.togglePopup(true)));
905
+ this.subs.add(this.navigationService.close.subscribe(() => {
876
906
  this.togglePopup(false);
877
907
  this.focus();
878
- });
879
- this.enterSubscription = this.navigationService.enter
908
+ }));
909
+ this.subs.add(this.navigationService.enter
880
910
  .pipe(tap((event) => event.originalEvent.preventDefault()))
881
- .subscribe(this.handleEnter.bind(this));
882
- this.escSubscription = this.navigationService.esc
883
- .subscribe(this.handleEscape.bind(this));
884
- this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
911
+ .subscribe(this.handleEnter.bind(this)));
912
+ this.subs.add(this.navigationService.esc
913
+ .subscribe(this.handleEscape.bind(this)));
914
+ this.subs.add(this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
885
915
  .subscribe(() => {
886
916
  this.hostElementBlurred.emit();
887
- });
917
+ }));
888
918
  this._zone.runOutsideAngular(() => {
889
- this.componentBlurredSubscription =
890
- merge(this.hostElementBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.filterFocused)))), this.navigationService.tab).pipe(tap(event => event instanceof NavigationEvent && this.focus()), filter(() => this.isFocused))
891
- .subscribe(() => this.componentBlur());
919
+ this.subs.add(merge(this.hostElementBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.filterFocused)))), this.navigationService.tab).pipe(tap(event => event instanceof NavigationEvent && this.focus()), filter(() => this.isFocused))
920
+ .subscribe(() => this.componentBlur()));
892
921
  });
893
922
  }
894
923
  subscribeTouchEvents() {
@@ -928,25 +957,6 @@ export class DropDownListComponent {
928
957
  document.removeEventListener('blur', this.blurComponent, useCapture);
929
958
  }
930
959
  }
931
- unsubscribeEvents() {
932
- if (!isDocumentAvailable()) {
933
- return;
934
- }
935
- this.navigationSubscription.unsubscribe();
936
- this.openSubscription.unsubscribe();
937
- this.closeSubscription.unsubscribe();
938
- this.enterSubscription.unsubscribe();
939
- this.escSubscription.unsubscribe();
940
- this.componentBlurredSubscription.unsubscribe();
941
- this.filterBlurredSubscription.unsubscribe();
942
- this.unSubscribeFocusEvents();
943
- if (this.touchstartDisposeHandler) {
944
- this.touchstartDisposeHandler();
945
- }
946
- if (this.selectionSubscription) {
947
- this.selectionSubscription.unsubscribe();
948
- }
949
- }
950
960
  itemFromEvent(event) {
951
961
  const index = event.indices[0];
952
962
  let dataItem = this.dataService.itemAt(index);
@@ -1216,8 +1226,8 @@ export class DropDownListComponent {
1216
1226
  }
1217
1227
  }
1218
1228
  }
1219
- 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 });
1220
- 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.isDisabled", "attr.aria-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.id": "this.focusableId", "attr.dir": "this.dir", "attr.tabindex": "this.hostTabIndex", "attr.readonly": "this.isReadonly", "attr.aria-readonly": "this.isReadonly", "attr.role": "this.role", "attr.aria-haspopup": "this.role", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-owns": "this.hostAriaOwns", "attr.aria-activedescendant": "this.hostAriaActivedescendant", "attr.aria-label": "this.hostNoDataLabel" } }, providers: [
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: [
1221
1231
  DROPDOWNLIST_VALUE_ACCESSOR,
1222
1232
  DataService,
1223
1233
  SelectionService,
@@ -1243,7 +1253,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
1243
1253
  selectButtonText="Select"
1244
1254
  >
1245
1255
  </ng-container>
1246
- <span class="k-input-inner" unselectable="on" role="option" [id]="valueLabelId">
1256
+ <span class="k-input-inner" unselectable="on" [id]="valueLabelId">
1247
1257
  <span class="k-input-value-text">
1248
1258
  <ng-template *ngIf="valueTemplate"
1249
1259
  [templateContext]="{
@@ -1282,9 +1292,11 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
1282
1292
  >
1283
1293
  <span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
1284
1294
  <input
1285
- [attr.aria-owns]="ariaOwns"
1295
+ role="searchbox"
1296
+ aria-autocomplete="list"
1297
+ aria-haspopup="listbox"
1298
+ [attr.aria-controls]="ariaControls"
1286
1299
  [attr.aria-activedescendant]="ariaActivedescendant"
1287
- [attr.aria-label]="noDataLabel"
1288
1300
  tabindex="-1"
1289
1301
  [filterInput]="isFocused && !touchEnabled"
1290
1302
  [dir]="direction"
@@ -1345,6 +1357,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
1345
1357
  [height]="listHeight"
1346
1358
  [show]="isOpen"
1347
1359
  [virtual]="virtual"
1360
+ [ariaLive]="ariaLive"
1348
1361
  (pageChange)="pageChange($event)"
1349
1362
  >
1350
1363
  </kendo-list>
@@ -1370,7 +1383,7 @@ DropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
1370
1383
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1371
1384
  </ng-template>
1372
1385
  <ng-container #container></ng-container>
1373
- `, 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"] }] });
1374
1387
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DropDownListComponent, decorators: [{
1375
1388
  type: Component,
1376
1389
  args: [{
@@ -1403,7 +1416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1403
1416
  selectButtonText="Select"
1404
1417
  >
1405
1418
  </ng-container>
1406
- <span class="k-input-inner" unselectable="on" role="option" [id]="valueLabelId">
1419
+ <span class="k-input-inner" unselectable="on" [id]="valueLabelId">
1407
1420
  <span class="k-input-value-text">
1408
1421
  <ng-template *ngIf="valueTemplate"
1409
1422
  [templateContext]="{
@@ -1442,9 +1455,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1442
1455
  >
1443
1456
  <span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
1444
1457
  <input
1445
- [attr.aria-owns]="ariaOwns"
1458
+ role="searchbox"
1459
+ aria-autocomplete="list"
1460
+ aria-haspopup="listbox"
1461
+ [attr.aria-controls]="ariaControls"
1446
1462
  [attr.aria-activedescendant]="ariaActivedescendant"
1447
- [attr.aria-label]="noDataLabel"
1448
1463
  tabindex="-1"
1449
1464
  [filterInput]="isFocused && !touchEnabled"
1450
1465
  [dir]="direction"
@@ -1505,6 +1520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1505
1520
  [height]="listHeight"
1506
1521
  [show]="isOpen"
1507
1522
  [virtual]="virtual"
1523
+ [ariaLive]="ariaLive"
1508
1524
  (pageChange)="pageChange($event)"
1509
1525
  >
1510
1526
  </kendo-list>
@@ -1537,7 +1553,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1537
1553
  }, {
1538
1554
  type: Inject,
1539
1555
  args: [TOUCH_ENABLED]
1540
- }] }]; }, propDecorators: { iconClass: [{
1556
+ }] }, { type: i0.Injector }]; }, propDecorators: { iconClass: [{
1541
1557
  type: Input
1542
1558
  }], loading: [{
1543
1559
  type: Input
@@ -1638,12 +1654,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1638
1654
  }, {
1639
1655
  type: HostBinding,
1640
1656
  args: ['class.k-picker']
1641
- }], isDisabled: [{
1657
+ }], isDisabledClass: [{
1642
1658
  type: HostBinding,
1643
1659
  args: ['class.k-disabled']
1644
- }, {
1660
+ }], isDisabledAttribute: [{
1645
1661
  type: HostBinding,
1646
- args: ['attr.aria-disabled']
1662
+ args: ['attr.disabled']
1647
1663
  }], isLoading: [{
1648
1664
  type: HostBinding,
1649
1665
  args: ['class.k-loading']
@@ -1659,30 +1675,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1659
1675
  }], hostTabIndex: [{
1660
1676
  type: HostBinding,
1661
1677
  args: ['attr.tabindex']
1662
- }], isReadonly: [{
1678
+ }], readonlyClass: [{
1663
1679
  type: HostBinding,
1664
1680
  args: ['attr.readonly']
1665
- }, {
1681
+ }], readonlyAttr: [{
1682
+ type: HostBinding,
1683
+ args: ['attr.readonly']
1684
+ }], isBusy: [{
1666
1685
  type: HostBinding,
1667
- args: ['attr.aria-readonly']
1686
+ args: ['attr.aria-busy']
1668
1687
  }], role: [{
1669
1688
  type: HostBinding,
1670
1689
  args: ['attr.role']
1671
- }, {
1690
+ }], haspopup: [{
1672
1691
  type: HostBinding,
1673
1692
  args: ['attr.aria-haspopup']
1674
1693
  }], isAriaExpanded: [{
1675
1694
  type: HostBinding,
1676
1695
  args: ['attr.aria-expanded']
1677
- }], hostAriaOwns: [{
1696
+ }], hostAriaControls: [{
1697
+ type: HostBinding,
1698
+ args: ['attr.aria-controls']
1699
+ }], hostAriaInvalid: [{
1678
1700
  type: HostBinding,
1679
- args: ['attr.aria-owns']
1701
+ args: ['attr.aria-invalid']
1680
1702
  }], hostAriaActivedescendant: [{
1681
1703
  type: HostBinding,
1682
1704
  args: ['attr.aria-activedescendant']
1683
- }], hostNoDataLabel: [{
1684
- type: HostBinding,
1685
- args: ['attr.aria-label']
1686
1705
  }], keydown: [{
1687
1706
  type: HostListener,
1688
1707
  args: ['keydown', ['$event']]
@@ -732,7 +732,7 @@ export class DropDownTreeComponent {
732
732
  * @hidden
733
733
  */
734
734
  get buttonClasses() {
735
- return this.loading ? 'k-i-loading k-input-loading-icon' : 'k-i-arrow-s';
735
+ return this.loading ? 'k-i-loading k-input-loading-icon' : 'k-i-caret-alt-down';
736
736
  }
737
737
  /**
738
738
  * @hidden
@@ -248,7 +248,6 @@ export class MultiSelectComponent {
248
248
  */
249
249
  this.removeTag = new EventEmitter();
250
250
  this.hostClasses = true;
251
- this.role = 'combobox';
252
251
  this.initialized = false;
253
252
  this._size = 'medium';
254
253
  this._rounded = 'medium';
@@ -561,9 +560,6 @@ export class MultiSelectComponent {
561
560
  get isLoading() {
562
561
  return this.loading;
563
562
  }
564
- get isAriaExpanded() {
565
- return this.isOpen;
566
- }
567
563
  /**
568
564
  * @hidden
569
565
  */
@@ -625,11 +621,6 @@ export class MultiSelectComponent {
625
621
  }
626
622
  return prefix + "-" + getter(item, this.valueField);
627
623
  }
628
- get noDataLabel() {
629
- if (this.dataService.itemsCount === 0) {
630
- return this.messageFor('noDataText');
631
- }
632
- }
633
624
  get clearButtonVisiblity() {
634
625
  if (this.touchEnabled) {
635
626
  return 'visible';
@@ -1285,6 +1276,11 @@ export class MultiSelectComponent {
1285
1276
  popupWrapper.style.width = max;
1286
1277
  popupWrapper.style.height = this.height;
1287
1278
  popupWrapper.setAttribute("dir", this.direction);
1279
+ const listBox = popupWrapper.querySelector('ul.k-list-ul');
1280
+ const ariaLabel = this.searchbar.input.nativeElement.getAttribute('aria-labelledby');
1281
+ if (ariaLabel) {
1282
+ listBox.setAttribute('aria-labelledby', ariaLabel);
1283
+ }
1288
1284
  this.popupRef.popupOpen.subscribe(() => {
1289
1285
  this.cdr.detectChanges();
1290
1286
  this.optionsList.scrollToItem(this.selectionService.focused);
@@ -1343,7 +1339,7 @@ export class MultiSelectComponent {
1343
1339
  }
1344
1340
  }
1345
1341
  MultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectComponent, deps: [{ token: i0.ElementRef }, { token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.DataService }, { token: i4.SelectionService }, { token: i5.NavigationService }, { token: i6.DisabledItemsService }, { token: i0.ChangeDetectorRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: TOUCH_ENABLED, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1346
- MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiSelectComponent, selector: "kendo-multiselect", inputs: { focusableId: "focusableId", autoClose: "autoClose", loading: "loading", data: "data", value: "value", valueField: "valueField", textField: "textField", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", placeholder: "placeholder", disabled: "disabled", itemDisabled: "itemDisabled", checkboxes: "checkboxes", readonly: "readonly", filterable: "filterable", virtual: "virtual", popupSettings: "popupSettings", listHeight: "listHeight", valuePrimitive: "valuePrimitive", clearButton: "clearButton", tagMapper: "tagMapper", allowCustom: "allowCustom", valueNormalizer: "valueNormalizer" }, outputs: { filterChange: "filterChange", valueChange: "valueChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur", removeTag: "removeTag" }, host: { listeners: { "mousedown": "hostMousedown($event)" }, properties: { "class.k-multiselect": "this.hostClasses", "class.k-input": "this.hostClasses", "attr.dir": "this.dir", "class.k-disabled": "this.disabledClass", "class.k-loading": "this.isLoading", "attr.role": "this.role", "attr.aria-expanded": "this.isAriaExpanded" } }, providers: [
1342
+ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiSelectComponent, selector: "kendo-multiselect", inputs: { focusableId: "focusableId", autoClose: "autoClose", loading: "loading", data: "data", value: "value", valueField: "valueField", textField: "textField", tabindex: "tabindex", tabIndex: "tabIndex", size: "size", rounded: "rounded", fillMode: "fillMode", placeholder: "placeholder", disabled: "disabled", itemDisabled: "itemDisabled", checkboxes: "checkboxes", readonly: "readonly", filterable: "filterable", virtual: "virtual", popupSettings: "popupSettings", listHeight: "listHeight", valuePrimitive: "valuePrimitive", clearButton: "clearButton", tagMapper: "tagMapper", allowCustom: "allowCustom", valueNormalizer: "valueNormalizer" }, outputs: { filterChange: "filterChange", valueChange: "valueChange", open: "open", opened: "opened", close: "close", closed: "closed", onFocus: "focus", onBlur: "blur", removeTag: "removeTag" }, host: { listeners: { "mousedown": "hostMousedown($event)" }, properties: { "class.k-multiselect": "this.hostClasses", "class.k-input": "this.hostClasses", "attr.dir": "this.dir", "class.k-disabled": "this.disabledClass", "class.k-loading": "this.isLoading" } }, providers: [
1347
1343
  MULTISELECT_VALUE_ACCESSOR,
1348
1344
  DataService,
1349
1345
  SelectionService,
@@ -1388,10 +1384,12 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
1388
1384
  <kendo-searchbar
1389
1385
  #searchbar
1390
1386
  [id]="focusableId"
1391
- [role]="'textbox'"
1387
+ [role]="'combobox'"
1392
1388
  [tagListId]="tagListId"
1389
+ [listId]="listBoxId"
1390
+ [isLoading]="loading"
1391
+ [isFilterable]="filterable"
1393
1392
  [activeDescendant]="activeDescendant"
1394
- [noDataLabel]="noDataLabel"
1395
1393
  [userInput]="text"
1396
1394
  [disabled]="disabled"
1397
1395
  [readonly]="readonly"
@@ -1465,6 +1463,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
1465
1463
  [virtual]="virtual"
1466
1464
  (pageChange)="pageChange($event)"
1467
1465
  [checkboxes]="checkboxes"
1466
+ [isMultiselect]="true"
1468
1467
  >
1469
1468
  </kendo-list>
1470
1469
  <!--no data template-->
@@ -1489,7 +1488,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
1489
1488
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1490
1489
  </ng-template>
1491
1490
  <ng-container #container></ng-container>
1492
- `, isInline: true, components: [{ type: i7.TagListComponent, selector: "kendo-taglist", inputs: ["tags", "textField", "valueField", "valueDepth", "focused", "template", "groupTemplate", "disabled", "tagPrefix", "id", "size", "rounded", "fillMode", "disabledIndices"], outputs: ["removeTag"] }, { type: i8.SearchBarComponent, selector: "kendo-searchbar", inputs: ["id", "listId", "tagListId", "activeDescendant", "noDataLabel", "disabled", "readonly", "tabIndex", "popupOpen", "role", "userInput", "suggestedText", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { type: i9.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: i10.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i14.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
1491
+ `, isInline: true, components: [{ type: i7.TagListComponent, selector: "kendo-taglist", inputs: ["tags", "textField", "valueField", "valueDepth", "focused", "template", "groupTemplate", "disabled", "tagPrefix", "id", "size", "rounded", "fillMode", "disabledIndices"], outputs: ["removeTag"] }, { type: i8.SearchBarComponent, selector: "kendo-searchbar", inputs: ["id", "listId", "tagListId", "activeDescendant", "disabled", "readonly", "tabIndex", "popupOpen", "role", "isLoading", "isSuggestable", "isFilterable", "userInput", "suggestedText", "placeholder"], outputs: ["valueChange", "onBlur", "onFocus", "onClick", "onNavigate"] }, { type: i9.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: i10.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i14.SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "multipleSelection"] }] });
1493
1492
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiSelectComponent, decorators: [{
1494
1493
  type: Component,
1495
1494
  args: [{
@@ -1541,10 +1540,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1541
1540
  <kendo-searchbar
1542
1541
  #searchbar
1543
1542
  [id]="focusableId"
1544
- [role]="'textbox'"
1543
+ [role]="'combobox'"
1545
1544
  [tagListId]="tagListId"
1545
+ [listId]="listBoxId"
1546
+ [isLoading]="loading"
1547
+ [isFilterable]="filterable"
1546
1548
  [activeDescendant]="activeDescendant"
1547
- [noDataLabel]="noDataLabel"
1548
1549
  [userInput]="text"
1549
1550
  [disabled]="disabled"
1550
1551
  [readonly]="readonly"
@@ -1618,6 +1619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1618
1619
  [virtual]="virtual"
1619
1620
  (pageChange)="pageChange($event)"
1620
1621
  [checkboxes]="checkboxes"
1622
+ [isMultiselect]="true"
1621
1623
  >
1622
1624
  </kendo-list>
1623
1625
  <!--no data template-->
@@ -1776,12 +1778,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1776
1778
  }], isLoading: [{
1777
1779
  type: HostBinding,
1778
1780
  args: ['class.k-loading']
1779
- }], role: [{
1780
- type: HostBinding,
1781
- args: ['attr.role']
1782
- }], isAriaExpanded: [{
1783
- type: HostBinding,
1784
- args: ['attr.aria-expanded']
1785
1781
  }], hostMousedown: [{
1786
1782
  type: HostListener,
1787
1783
  args: ['mousedown', ['$event']]
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-dropdowns',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1659511295,
12
+ publishDate: 1661869333,
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
  };