@progress/kendo-angular-dropdowns 5.5.1-dev.202111191410 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/autocomplete/autocomplete.component.js +120 -5
  7. package/dist/es/comboboxes/combobox.component.js +141 -20
  8. package/dist/es/comboboxes/multicolumncombobox.component.js +30 -10
  9. package/dist/es/common/list.component.js +83 -5
  10. package/dist/es/common/models/fillmode.js +4 -0
  11. package/dist/es/common/models/list-type.js +4 -0
  12. package/dist/es/common/models/rounded.js +4 -0
  13. package/dist/es/common/models/size.js +4 -0
  14. package/dist/es/common/searchbar.component.js +1 -1
  15. package/dist/es/common/selection/selectable.directive.js +2 -2
  16. package/dist/es/common/taglist.component.js +58 -5
  17. package/dist/es/common/util.js +37 -0
  18. package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
  19. package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
  20. package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
  21. package/dist/es/multiselect/multiselect.component.js +162 -35
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
  24. package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
  25. package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
  26. package/dist/es2015/comboboxes/combobox.component.js +207 -106
  27. package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
  28. package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
  29. package/dist/es2015/common/list.component.d.ts +22 -1
  30. package/dist/es2015/common/list.component.js +115 -37
  31. package/dist/es2015/common/models/fillmode.d.ts +14 -0
  32. package/dist/es2015/common/models/fillmode.js +4 -0
  33. package/dist/es2015/common/models/list-type.d.ts +8 -0
  34. package/dist/es2015/common/models/list-type.js +4 -0
  35. package/dist/es2015/common/models/rounded.d.ts +15 -0
  36. package/dist/es2015/common/models/rounded.js +4 -0
  37. package/dist/es2015/common/models/size.d.ts +14 -0
  38. package/dist/es2015/common/models/size.js +4 -0
  39. package/dist/es2015/common/searchbar.component.js +1 -1
  40. package/dist/es2015/common/selection/selectable.directive.js +2 -2
  41. package/dist/es2015/common/taglist.component.d.ts +13 -1
  42. package/dist/es2015/common/taglist.component.js +102 -47
  43. package/dist/es2015/common/util.d.ts +17 -0
  44. package/dist/es2015/common/util.js +37 -0
  45. package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +77 -13
  46. package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
  47. package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
  48. package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
  49. package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
  50. package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
  51. package/dist/es2015/index.metadata.json +1 -1
  52. package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
  53. package/dist/es2015/multiselect/multiselect.component.js +183 -70
  54. package/dist/es2015/package-metadata.js +1 -1
  55. package/dist/fesm2015/index.js +1928 -802
  56. package/dist/fesm5/index.js +1569 -231
  57. package/dist/npm/autocomplete/autocomplete.component.js +119 -4
  58. package/dist/npm/comboboxes/combobox.component.js +140 -19
  59. package/dist/npm/comboboxes/multicolumncombobox.component.js +29 -9
  60. package/dist/npm/common/list.component.js +82 -4
  61. package/dist/npm/common/models/fillmode.js +6 -0
  62. package/dist/npm/common/models/list-type.js +6 -0
  63. package/dist/npm/common/models/rounded.js +6 -0
  64. package/dist/npm/common/models/size.js +6 -0
  65. package/dist/npm/common/searchbar.component.js +1 -1
  66. package/dist/npm/common/selection/selectable.directive.js +2 -2
  67. package/dist/npm/common/taglist.component.js +56 -3
  68. package/dist/npm/common/util.js +37 -0
  69. package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
  70. package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
  71. package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
  72. package/dist/npm/multiselect/multiselect.component.js +160 -33
  73. package/dist/npm/package-metadata.js +1 -1
  74. package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
  75. package/package.json +21 -17
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /* tslint:disable:member-ordering */
6
6
  import * as tslib_1 from "tslib";
7
- import { Component, Renderer2, forwardRef, ElementRef, Input, Output, HostBinding, EventEmitter, ContentChild, ViewChild, ViewContainerRef, isDevMode, Optional, Inject, NgZone, TemplateRef, ChangeDetectorRef } from '@angular/core';
7
+ import { Component, Renderer2, forwardRef, ElementRef, Input, Output, HostBinding, EventEmitter, ContentChild, ViewChild, ViewContainerRef, isDevMode, Optional, Inject, NgZone, TemplateRef, ChangeDetectorRef, HostListener } from '@angular/core';
8
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { packageMetadata } from '../package-metadata';
@@ -12,7 +12,7 @@ import { merge, interval, Subscription } from 'rxjs';
12
12
  import { concatMap, filter, map, skipWhile, take, takeUntil, tap } from 'rxjs/operators';
13
13
  import { isDocumentAvailable, KendoInput, hasObservers, anyChanged, isChanged } from '@progress/kendo-angular-common';
14
14
  import { Keys } from '@progress/kendo-angular-common';
15
- import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown } from '../common/util';
15
+ import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass } from '../common/util';
16
16
  import { SelectionService } from '../common/selection/selection.service';
17
17
  import { NavigationService, NavigationEvent } from '../common/navigation/navigation.service';
18
18
  import { ItemTemplateDirective } from '../common/templates/item-template.directive';
@@ -59,7 +59,8 @@ export var DROPDOWNLIST_VALUE_ACCESSOR = {
59
59
  * ```
60
60
  */
61
61
  var DropDownListComponent = /** @class */ (function () {
62
- function DropDownListComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, hostElement, cdr, touchEnabled) {
62
+ function DropDownListComponent(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled) {
63
+ this.wrapper = wrapper;
63
64
  this.localization = localization;
64
65
  this.popupService = popupService;
65
66
  this.selectionService = selectionService;
@@ -68,7 +69,6 @@ var DropDownListComponent = /** @class */ (function () {
68
69
  this.dataService = dataService;
69
70
  this._zone = _zone;
70
71
  this.renderer = renderer;
71
- this.hostElement = hostElement;
72
72
  this.cdr = cdr;
73
73
  this.touchEnabled = touchEnabled;
74
74
  /**
@@ -152,7 +152,8 @@ var DropDownListComponent = /** @class */ (function () {
152
152
  * Fires each time the DropDownList gets blurred.
153
153
  */
154
154
  this.onBlur = new EventEmitter();
155
- this.widgetClasses = true;
155
+ this.hostClasses = true;
156
+ this.role = 'listbox';
156
157
  this.groupIndices = [];
157
158
  this.listBoxId = guid();
158
159
  this.optionPrefix = guid();
@@ -164,16 +165,20 @@ var DropDownListComponent = /** @class */ (function () {
164
165
  this.last = "";
165
166
  this.filterFocused = new EventEmitter();
166
167
  this.filterBlurred = new EventEmitter();
167
- this.wrapperFocused = new EventEmitter();
168
- this.wrapperBlurred = new EventEmitter();
168
+ this.hostElementFocused = new EventEmitter();
169
+ this.hostElementBlurred = new EventEmitter();
169
170
  this.selectionSubscription = new Subscription();
170
171
  this._open = false;
171
172
  this._popupSettings = { animate: true };
173
+ this._size = 'medium';
174
+ this._rounded = 'medium';
175
+ this._fillMode = 'solid';
172
176
  validatePackage(packageMetadata);
173
177
  this.direction = localization.rtl ? 'rtl' : 'ltr';
174
178
  this.data = [];
175
179
  this.subscribeEvents();
176
180
  this.subscribeTouchEvents();
181
+ this.subscribeFocusEvents();
177
182
  this.popupMouseDownHandler = this.onMouseDown.bind(this);
178
183
  }
179
184
  DropDownListComponent_1 = DropDownListComponent;
@@ -382,11 +387,88 @@ var DropDownListComponent = /** @class */ (function () {
382
387
  enumerable: true,
383
388
  configurable: true
384
389
  });
390
+ Object.defineProperty(DropDownListComponent.prototype, "size", {
391
+ get: function () {
392
+ return this._size;
393
+ },
394
+ /**
395
+ * Sets the size of the component.
396
+ *
397
+ * The possible values are:
398
+ * * `'small'`
399
+ * * `'medium'` (default)
400
+ * * `'large'`
401
+ * * `null`
402
+ *
403
+ */
404
+ set: function (size) {
405
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
406
+ if (size) {
407
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
408
+ }
409
+ this._size = size;
410
+ },
411
+ enumerable: true,
412
+ configurable: true
413
+ });
414
+ Object.defineProperty(DropDownListComponent.prototype, "rounded", {
415
+ get: function () {
416
+ return this._rounded;
417
+ },
418
+ /**
419
+ * Sets the border radius of the component.
420
+ *
421
+ * The possible values are:
422
+ * * `'small'`
423
+ * * `'medium'` (default)
424
+ * * `'large'`
425
+ * * `'full'`
426
+ * * `null`
427
+ *
428
+ */
429
+ set: function (rounded) {
430
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
431
+ if (rounded) {
432
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
433
+ }
434
+ this._rounded = rounded;
435
+ },
436
+ enumerable: true,
437
+ configurable: true
438
+ });
439
+ Object.defineProperty(DropDownListComponent.prototype, "fillMode", {
440
+ get: function () {
441
+ return this._fillMode;
442
+ },
443
+ /**
444
+ * Sets the fillMode of the component.
445
+ *
446
+ * The possible values are:
447
+ * * `'flat'`
448
+ * * `'solid'` (default)
449
+ * * `'outline'`
450
+ * * `null`
451
+ *
452
+ */
453
+ set: function (fillMode) {
454
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
455
+ if (fillMode) {
456
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
457
+ }
458
+ this._fillMode = fillMode;
459
+ },
460
+ enumerable: true,
461
+ configurable: true
462
+ });
385
463
  /**
386
464
  * @hidden
387
465
  */
388
- DropDownListComponent.prototype.blurComponent = function () {
389
- this.wrapperBlurred.emit();
466
+ DropDownListComponent.prototype.blurComponent = function (event) {
467
+ if (event.target !== this.wrapper.nativeElement) {
468
+ return;
469
+ }
470
+ event.stopImmediatePropagation();
471
+ this.hostElementBlurred.emit();
390
472
  };
391
473
  /**
392
474
  * @hidden
@@ -397,9 +479,13 @@ var DropDownListComponent = /** @class */ (function () {
397
479
  /**
398
480
  * @hidden
399
481
  */
400
- DropDownListComponent.prototype.focusComponent = function () {
482
+ DropDownListComponent.prototype.focusComponent = function (event) {
401
483
  var _this = this;
402
- this.wrapperFocused.emit();
484
+ if (event.target !== this.wrapper.nativeElement) {
485
+ return;
486
+ }
487
+ event.stopImmediatePropagation();
488
+ this.hostElementFocused.emit();
403
489
  if (!this.isFocused) {
404
490
  this.isFocused = true;
405
491
  if (hasObservers(this.onFocus)) {
@@ -409,6 +495,87 @@ var DropDownListComponent = /** @class */ (function () {
409
495
  }
410
496
  }
411
497
  };
498
+ /**
499
+ * @hidden
500
+ */
501
+ DropDownListComponent.prototype.onResize = function () {
502
+ if (this._open) {
503
+ var popupWrapper = this.popupRef.popupElement;
504
+ var _a = this.width, min = _a.min, max = _a.max;
505
+ popupWrapper.style.minWidth = min;
506
+ popupWrapper.style.width = max;
507
+ }
508
+ };
509
+ Object.defineProperty(DropDownListComponent.prototype, "isDisabled", {
510
+ get: function () {
511
+ return this.disabled;
512
+ },
513
+ enumerable: true,
514
+ configurable: true
515
+ });
516
+ Object.defineProperty(DropDownListComponent.prototype, "isLoading", {
517
+ get: function () {
518
+ return this.loading;
519
+ },
520
+ enumerable: true,
521
+ configurable: true
522
+ });
523
+ Object.defineProperty(DropDownListComponent.prototype, "id", {
524
+ get: function () {
525
+ return this.focusableId;
526
+ },
527
+ enumerable: true,
528
+ configurable: true
529
+ });
530
+ Object.defineProperty(DropDownListComponent.prototype, "dir", {
531
+ get: function () {
532
+ return this.direction;
533
+ },
534
+ enumerable: true,
535
+ configurable: true
536
+ });
537
+ Object.defineProperty(DropDownListComponent.prototype, "hostTabIndex", {
538
+ get: function () {
539
+ return this.widgetTabIndex;
540
+ },
541
+ enumerable: true,
542
+ configurable: true
543
+ });
544
+ Object.defineProperty(DropDownListComponent.prototype, "isReadonly", {
545
+ get: function () {
546
+ return this.readonly;
547
+ },
548
+ enumerable: true,
549
+ configurable: true
550
+ });
551
+ Object.defineProperty(DropDownListComponent.prototype, "isAriaExpanded", {
552
+ get: function () {
553
+ return this.ariaExpanded;
554
+ },
555
+ enumerable: true,
556
+ configurable: true
557
+ });
558
+ Object.defineProperty(DropDownListComponent.prototype, "hostAriaOwns", {
559
+ get: function () {
560
+ return this.ariaOwns;
561
+ },
562
+ enumerable: true,
563
+ configurable: true
564
+ });
565
+ Object.defineProperty(DropDownListComponent.prototype, "hostAriaActivedescendant", {
566
+ get: function () {
567
+ return this.ariaActivedescendant;
568
+ },
569
+ enumerable: true,
570
+ configurable: true
571
+ });
572
+ Object.defineProperty(DropDownListComponent.prototype, "hostNoDataLabel", {
573
+ get: function () {
574
+ return this.noDataLabel;
575
+ },
576
+ enumerable: true,
577
+ configurable: true
578
+ });
412
579
  /**
413
580
  * @hidden
414
581
  */
@@ -469,30 +636,12 @@ var DropDownListComponent = /** @class */ (function () {
469
636
  this.focus();
470
637
  this.togglePopup(!this.isOpen);
471
638
  };
472
- /**
473
- * @hidden
474
- */
475
- DropDownListComponent.prototype.onResize = function () {
476
- if (this._open) {
477
- var popupWrapper = this.popupRef.popupElement;
478
- var _a = this.width, min = _a.min, max = _a.max;
479
- popupWrapper.style.minWidth = min;
480
- popupWrapper.style.width = max;
481
- }
482
- };
483
- Object.defineProperty(DropDownListComponent.prototype, "dir", {
484
- get: function () {
485
- return this.direction;
486
- },
487
- enumerable: true,
488
- configurable: true
489
- });
490
639
  Object.defineProperty(DropDownListComponent.prototype, "isFocused", {
491
640
  get: function () {
492
641
  return this._isFocused;
493
642
  },
494
643
  set: function (isFocused) {
495
- this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-state-focused');
644
+ this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
496
645
  this._isFocused = isFocused;
497
646
  },
498
647
  enumerable: true,
@@ -500,7 +649,7 @@ var DropDownListComponent = /** @class */ (function () {
500
649
  });
501
650
  DropDownListComponent.prototype.ngOnInit = function () {
502
651
  var _this = this;
503
- this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
652
+ this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
504
653
  this.localizationChangesSubscription = this.localization
505
654
  .changes.subscribe(function (_a) {
506
655
  var rtl = _a.rtl;
@@ -509,6 +658,7 @@ var DropDownListComponent = /** @class */ (function () {
509
658
  });
510
659
  this.setMessages();
511
660
  this.assignAriaDescribedBy();
661
+ this.setComponentClasses();
512
662
  };
513
663
  /**
514
664
  * @hidden
@@ -690,6 +840,36 @@ var DropDownListComponent = /** @class */ (function () {
690
840
  enumerable: true,
691
841
  configurable: true
692
842
  });
843
+ Object.defineProperty(DropDownListComponent.prototype, "selectButtonClasses", {
844
+ /**
845
+ * @hidden
846
+ */
847
+ get: function () {
848
+ return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
849
+ },
850
+ enumerable: true,
851
+ configurable: true
852
+ });
853
+ Object.defineProperty(DropDownListComponent.prototype, "filterInputClasses", {
854
+ /**
855
+ * @hidden
856
+ */
857
+ get: function () {
858
+ return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
859
+ },
860
+ enumerable: true,
861
+ configurable: true
862
+ });
863
+ Object.defineProperty(DropDownListComponent.prototype, "optionLabelSizeClass", {
864
+ /**
865
+ * @hidden
866
+ */
867
+ get: function () {
868
+ return "" + (this.size ? getSizeClass('list', this.size) : '');
869
+ },
870
+ enumerable: true,
871
+ configurable: true
872
+ });
693
873
  Object.defineProperty(DropDownListComponent.prototype, "listContainerClasses", {
694
874
  /**
695
875
  * @hidden
@@ -837,13 +1017,13 @@ var DropDownListComponent = /** @class */ (function () {
837
1017
  .subscribe(this.handleEnter.bind(this));
838
1018
  this.escSubscription = this.navigationService.esc
839
1019
  .subscribe(this.handleEscape.bind(this));
840
- this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.wrapperFocused)); }))
1020
+ this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.hostElementFocused)); }))
841
1021
  .subscribe(function () {
842
- _this.wrapperBlurred.emit();
1022
+ _this.hostElementBlurred.emit();
843
1023
  });
844
1024
  this._zone.runOutsideAngular(function () {
845
1025
  _this.componentBlurredSubscription =
846
- merge(_this.wrapperBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.filterFocused)); })), _this.navigationService.tab).pipe(tap(function (event) { return event instanceof NavigationEvent && _this.focus(); }), filter(function () { return _this.isFocused; }))
1026
+ merge(_this.hostElementBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.filterFocused)); })), _this.navigationService.tab).pipe(tap(function (event) { return event instanceof NavigationEvent && _this.focus(); }), filter(function () { return _this.isFocused; }))
847
1027
  .subscribe(function () { return _this.componentBlur(); });
848
1028
  });
849
1029
  };
@@ -856,7 +1036,7 @@ var DropDownListComponent = /** @class */ (function () {
856
1036
  // Roll up DropDownList on iOS when tapped outside
857
1037
  return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
858
1038
  var target = e.target;
859
- if (_this.isFocused && !inDropDown(_this.hostElement, target, _this.popupRef)) {
1039
+ if (_this.isFocused && !inDropDown(_this.wrapper, target, _this.popupRef)) {
860
1040
  _this._zone.run(function () {
861
1041
  if (_this.filterFocused) {
862
1042
  // Close popup if filter is focused
@@ -868,6 +1048,25 @@ var DropDownListComponent = /** @class */ (function () {
868
1048
  });
869
1049
  });
870
1050
  };
1051
+ DropDownListComponent.prototype.subscribeFocusEvents = function () {
1052
+ var _this = this;
1053
+ if (isDocumentAvailable()) {
1054
+ this.focusComponent = this.focusComponent.bind(this);
1055
+ this.blurComponent = this.blurComponent.bind(this);
1056
+ this._zone.runOutsideAngular(function () {
1057
+ var useCapture = true;
1058
+ document.addEventListener('focus', _this.focusComponent, useCapture);
1059
+ document.addEventListener('blur', _this.blurComponent, useCapture);
1060
+ });
1061
+ }
1062
+ };
1063
+ DropDownListComponent.prototype.unSubscribeFocusEvents = function () {
1064
+ if (isDocumentAvailable()) {
1065
+ var useCapture = true;
1066
+ document.removeEventListener('focus', this.focusComponent, useCapture);
1067
+ document.removeEventListener('blur', this.blurComponent, useCapture);
1068
+ }
1069
+ };
871
1070
  DropDownListComponent.prototype.unsubscribeEvents = function () {
872
1071
  if (!isDocumentAvailable()) {
873
1072
  return;
@@ -879,6 +1078,7 @@ var DropDownListComponent = /** @class */ (function () {
879
1078
  this.escSubscription.unsubscribe();
880
1079
  this.componentBlurredSubscription.unsubscribe();
881
1080
  this.filterBlurredSubscription.unsubscribe();
1081
+ this.unSubscribeFocusEvents();
882
1082
  if (this.touchstartDisposeHandler) {
883
1083
  this.touchstartDisposeHandler();
884
1084
  }
@@ -971,7 +1171,7 @@ var DropDownListComponent = /** @class */ (function () {
971
1171
  hasObservers(this.close) ||
972
1172
  hasObservers(this.onBlur) ||
973
1173
  hasObservers(this.filterChange) ||
974
- isUntouched(this.hostElement.nativeElement)) {
1174
+ isUntouched(this.wrapper.nativeElement)) {
975
1175
  this._zone.run(function () {
976
1176
  if (valueHasChanged) {
977
1177
  _this.selectionService.change(_this.selectionService.selected[0]);
@@ -1155,6 +1355,17 @@ var DropDownListComponent = /** @class */ (function () {
1155
1355
  var newValue = (this.valueLabelId + " " + trimmed).trim();
1156
1356
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
1157
1357
  };
1358
+ DropDownListComponent.prototype.setComponentClasses = function () {
1359
+ if (this.size) {
1360
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
1361
+ }
1362
+ if (this.rounded) {
1363
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
1364
+ }
1365
+ if (this.fillMode) {
1366
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
1367
+ }
1368
+ };
1158
1369
  var DropDownListComponent_1;
1159
1370
  tslib_1.__decorate([
1160
1371
  Input(),
@@ -1243,6 +1454,21 @@ var DropDownListComponent = /** @class */ (function () {
1243
1454
  tslib_1.__metadata("design:type", Number),
1244
1455
  tslib_1.__metadata("design:paramtypes", [Number])
1245
1456
  ], DropDownListComponent.prototype, "tabIndex", null);
1457
+ tslib_1.__decorate([
1458
+ Input(),
1459
+ tslib_1.__metadata("design:type", String),
1460
+ tslib_1.__metadata("design:paramtypes", [String])
1461
+ ], DropDownListComponent.prototype, "size", null);
1462
+ tslib_1.__decorate([
1463
+ Input(),
1464
+ tslib_1.__metadata("design:type", String),
1465
+ tslib_1.__metadata("design:paramtypes", [String])
1466
+ ], DropDownListComponent.prototype, "rounded", null);
1467
+ tslib_1.__decorate([
1468
+ Input(),
1469
+ tslib_1.__metadata("design:type", String),
1470
+ tslib_1.__metadata("design:paramtypes", [String])
1471
+ ], DropDownListComponent.prototype, "fillMode", null);
1246
1472
  tslib_1.__decorate([
1247
1473
  Output(),
1248
1474
  tslib_1.__metadata("design:type", EventEmitter)
@@ -1315,24 +1541,90 @@ var DropDownListComponent = /** @class */ (function () {
1315
1541
  ViewChild('popupTemplate', { static: true }),
1316
1542
  tslib_1.__metadata("design:type", TemplateRef)
1317
1543
  ], DropDownListComponent.prototype, "popupTemplate", void 0);
1318
- tslib_1.__decorate([
1319
- ViewChild('wrapper', { static: true }),
1320
- tslib_1.__metadata("design:type", ElementRef)
1321
- ], DropDownListComponent.prototype, "wrapper", void 0);
1322
1544
  tslib_1.__decorate([
1323
1545
  ViewChild('optionsList', { static: false }),
1324
1546
  tslib_1.__metadata("design:type", ListComponent)
1325
1547
  ], DropDownListComponent.prototype, "optionsList", void 0);
1326
1548
  tslib_1.__decorate([
1327
- HostBinding('class.k-widget'),
1328
- HostBinding('class.k-dropdown'),
1549
+ HostBinding('class.k-dropdownlist'),
1550
+ HostBinding('class.k-picker'),
1329
1551
  tslib_1.__metadata("design:type", Boolean)
1330
- ], DropDownListComponent.prototype, "widgetClasses", void 0);
1552
+ ], DropDownListComponent.prototype, "hostClasses", void 0);
1553
+ tslib_1.__decorate([
1554
+ HostBinding('class.k-disabled'),
1555
+ HostBinding('attr.aria-disabled'),
1556
+ tslib_1.__metadata("design:type", Boolean),
1557
+ tslib_1.__metadata("design:paramtypes", [])
1558
+ ], DropDownListComponent.prototype, "isDisabled", null);
1559
+ tslib_1.__decorate([
1560
+ HostBinding('class.k-loading'),
1561
+ tslib_1.__metadata("design:type", Boolean),
1562
+ tslib_1.__metadata("design:paramtypes", [])
1563
+ ], DropDownListComponent.prototype, "isLoading", null);
1564
+ tslib_1.__decorate([
1565
+ HostBinding('attr.id'),
1566
+ tslib_1.__metadata("design:type", String),
1567
+ tslib_1.__metadata("design:paramtypes", [])
1568
+ ], DropDownListComponent.prototype, "id", null);
1331
1569
  tslib_1.__decorate([
1332
1570
  HostBinding('attr.dir'),
1333
1571
  tslib_1.__metadata("design:type", String),
1334
1572
  tslib_1.__metadata("design:paramtypes", [])
1335
1573
  ], DropDownListComponent.prototype, "dir", null);
1574
+ tslib_1.__decorate([
1575
+ HostBinding('attr.tabindex'),
1576
+ tslib_1.__metadata("design:type", Number),
1577
+ tslib_1.__metadata("design:paramtypes", [])
1578
+ ], DropDownListComponent.prototype, "hostTabIndex", null);
1579
+ tslib_1.__decorate([
1580
+ HostBinding('attr.readonly'),
1581
+ HostBinding('attr.aria-readonly'),
1582
+ tslib_1.__metadata("design:type", Boolean),
1583
+ tslib_1.__metadata("design:paramtypes", [])
1584
+ ], DropDownListComponent.prototype, "isReadonly", null);
1585
+ tslib_1.__decorate([
1586
+ HostBinding('attr.role'),
1587
+ HostBinding('attr.aria-haspopup'),
1588
+ tslib_1.__metadata("design:type", String)
1589
+ ], DropDownListComponent.prototype, "role", void 0);
1590
+ tslib_1.__decorate([
1591
+ HostBinding('attr.aria-expanded'),
1592
+ tslib_1.__metadata("design:type", Boolean),
1593
+ tslib_1.__metadata("design:paramtypes", [])
1594
+ ], DropDownListComponent.prototype, "isAriaExpanded", null);
1595
+ tslib_1.__decorate([
1596
+ HostBinding('attr.aria-owns'),
1597
+ tslib_1.__metadata("design:type", String),
1598
+ tslib_1.__metadata("design:paramtypes", [])
1599
+ ], DropDownListComponent.prototype, "hostAriaOwns", null);
1600
+ tslib_1.__decorate([
1601
+ HostBinding('attr.aria-activedescendant'),
1602
+ tslib_1.__metadata("design:type", String),
1603
+ tslib_1.__metadata("design:paramtypes", [])
1604
+ ], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
1605
+ tslib_1.__decorate([
1606
+ HostBinding('attr.aria-label'),
1607
+ tslib_1.__metadata("design:type", String),
1608
+ tslib_1.__metadata("design:paramtypes", [])
1609
+ ], DropDownListComponent.prototype, "hostNoDataLabel", null);
1610
+ tslib_1.__decorate([
1611
+ HostListener('keydown', ['$event']),
1612
+ tslib_1.__metadata("design:type", Function),
1613
+ tslib_1.__metadata("design:paramtypes", [Object]),
1614
+ tslib_1.__metadata("design:returntype", void 0)
1615
+ ], DropDownListComponent.prototype, "keydown", null);
1616
+ tslib_1.__decorate([
1617
+ HostListener('keypress', ['$event']),
1618
+ tslib_1.__metadata("design:type", Function),
1619
+ tslib_1.__metadata("design:paramtypes", [Object]),
1620
+ tslib_1.__metadata("design:returntype", void 0)
1621
+ ], DropDownListComponent.prototype, "keypress", null);
1622
+ tslib_1.__decorate([
1623
+ HostListener('click', ['$event']),
1624
+ tslib_1.__metadata("design:type", Function),
1625
+ tslib_1.__metadata("design:paramtypes", [MouseEvent]),
1626
+ tslib_1.__metadata("design:returntype", void 0)
1627
+ ], DropDownListComponent.prototype, "click", null);
1336
1628
  DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1337
1629
  Component({
1338
1630
  exportAs: 'kendoDropDownList',
@@ -1355,10 +1647,11 @@ var DropDownListComponent = /** @class */ (function () {
1355
1647
  }
1356
1648
  ],
1357
1649
  selector: 'kendo-dropdownlist',
1358
- template: "\n <ng-container kendoDropDownListLocalizedMessages\n i18n-noDataText=\"kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n >\n </ng-container>\n <span #wrapper unselectable=\"on\"\n role=\"listbox\"\n [id]=\"focusableId\"\n [ngClass]=\"{\n 'k-dropdown-wrap': true,\n 'k-state-disabled': this.disabled\n }\"\n [attr.dir]=\"direction\"\n [attr.readonly]=\"readonly\"\n [attr.tabindex]=\"widgetTabIndex\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-readonly]=\"readonly\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-activedescendant]=\"ariaActivedescendant\"\n [attr.aria-label]=\"noDataLabel\"\n (keydown)=\"keydown($event)\"\n (keypress)=\"keypress($event)\"\n (click)=\"click($event)\"\n [kendoEventsOutsideAngular]=\"{\n focus: focusComponent,\n blur: blurComponent\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-input\" unselectable=\"on\" [id]=\"valueLabelId\">\n <ng-template *ngIf=\"valueTemplate\"\n [templateContext]=\"{\n templateRef: valueTemplate.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!valueTemplate\">{{ getText() }}</ng-template>\n </span>\n <span class=\"k-select\" unselectable=\"on\">\n <span\n class=\"k-icon\"\n unselectable=\"on\"\n [ngClass]=\"buttonClasses\"\n >\n </span>\n </span>\n <ng-template #popupTemplate>\n <!--filterable-->\n\n <ng-template [ngIf]=\"filterable\">\n <span class=\"k-list-filter\" (click)=\"$event.stopImmediatePropagation()\">\n <input\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-activedescendant]=\"ariaActivedescendant\"\n [attr.aria-label]=\"noDataLabel\"\n tabindex=\"-1\"\n [filterInput]=\"isFocused && !touchEnabled\"\n [dir]=\"direction\"\n [(ngModel)]=\"filterText\"\n class=\"k-textbox\"\n (keydown)=\"keydown($event)\"\n (input)=\"handleFilter($event)\"\n (focus)=\"onFilterFocus()\"\n (blur)=\"blurFilterInput()\" />\n <span class=\"k-icon k-i-search\" unselectable=\"on\"></span>\n </span>\n </ng-template>\n <!--default item-->\n <ng-template [ngIf]=\"defaultItem && !itemTemplate\">\n <div class=\"k-list-optionlabel\" [ngClass]=\"{ 'k-state-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n {{ getDefaultItemText() }}\n </div>\n </ng-template>\n <ng-template [ngIf]=\"defaultItem && itemTemplate\">\n <div class=\"k-list-optionlabel\" [ngClass]=\"{ 'k-state-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n <ng-template\n [templateContext]=\"{\n templateRef: itemTemplate.templateRef,\n $implicit: defaultItem\n }\">\n </ng-template>\n </div>\n </ng-template>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"itemTemplate\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-nodata\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n </span>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
1650
+ template: "\n <ng-container kendoDropDownListLocalizedMessages\n i18n-noDataText=\"kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n >\n </ng-container>\n <span class=\"k-input-inner\" unselectable=\"on\" [id]=\"valueLabelId\">\n <span class=\"k-input-value-text\">\n <ng-template *ngIf=\"valueTemplate\"\n [templateContext]=\"{\n templateRef: valueTemplate.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!valueTemplate\">{{ getText() }}</ng-template>\n </span>\n </span>\n <button\n tabindex=\"-1\"\n unselectable=\"on\"\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: onMouseDown\n }\"\n >\n <span\n class=\"k-button-icon k-icon\"\n unselectable=\"on\"\n [ngClass]=\"buttonClasses\"\n ></span>\n </button>\n <ng-template #popupTemplate>\n <!--filterable-->\n\n <ng-template [ngIf]=\"filterable\">\n <div class=\"k-list-filter\" (click)=\"$event.stopImmediatePropagation()\">\n <span\n class=\"k-searchbox k-input\"\n [ngClass]=\"filterInputClasses\"\n >\n <span class=\"k-input-icon k-icon k-i-search\" unselectable=\"on\"></span>\n <input\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-activedescendant]=\"ariaActivedescendant\"\n [attr.aria-label]=\"noDataLabel\"\n tabindex=\"-1\"\n [filterInput]=\"isFocused && !touchEnabled\"\n [dir]=\"direction\"\n [(ngModel)]=\"filterText\"\n class=\"k-input-inner\"\n (keydown)=\"keydown($event)\"\n (input)=\"handleFilter($event)\"\n (focus)=\"onFilterFocus()\"\n (blur)=\"blurFilterInput()\" />\n </span>\n </div>\n </ng-template>\n <!--default item-->\n <ng-template [ngIf]=\"defaultItem && !itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel k-list-item\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n {{ getDefaultItemText() }}\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"defaultItem && itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel k-list-item\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n <ng-template\n [templateContext]=\"{\n templateRef: itemTemplate.templateRef,\n $implicit: defaultItem\n }\">\n </ng-template>\n </div>\n </div>\n </ng-template>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"itemTemplate\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
1359
1651
  }),
1360
1652
  tslib_1.__param(10, Optional()), tslib_1.__param(10, Inject(TOUCH_ENABLED)),
1361
- tslib_1.__metadata("design:paramtypes", [LocalizationService,
1653
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
1654
+ LocalizationService,
1362
1655
  PopupService,
1363
1656
  SelectionService,
1364
1657
  NavigationService,
@@ -1366,7 +1659,6 @@ var DropDownListComponent = /** @class */ (function () {
1366
1659
  DataService,
1367
1660
  NgZone,
1368
1661
  Renderer2,
1369
- ElementRef,
1370
1662
  ChangeDetectorRef, Boolean])
1371
1663
  ], DropDownListComponent);
1372
1664
  return DropDownListComponent;