@progress/kendo-angular-dropdowns 5.5.1 → 6.0.1-dev.202201201129

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 +335 -54
  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 +80 -17
  46. package/dist/es2015/dropdownlist/dropdownlist.component.js +391 -167
  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 +1956 -837
  56. package/dist/fesm5/index.js +1558 -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 +333 -52
  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
@@ -5,7 +5,7 @@
5
5
  /* tslint:disable:member-ordering */
6
6
  import * as tslib_1 from "tslib";
7
7
  var DropDownListComponent_1;
8
- import { Component, Renderer2, forwardRef, ElementRef, Input, Output, HostBinding, EventEmitter, ContentChild, ViewChild, ViewContainerRef, isDevMode, Optional, Inject, NgZone, TemplateRef, ChangeDetectorRef } from '@angular/core';
8
+ import { Component, Renderer2, forwardRef, ElementRef, Input, Output, HostBinding, EventEmitter, ContentChild, ViewChild, ViewContainerRef, isDevMode, Optional, Inject, NgZone, TemplateRef, ChangeDetectorRef, HostListener } from '@angular/core';
9
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from '../package-metadata';
@@ -13,7 +13,7 @@ import { merge, interval, Subscription } from 'rxjs';
13
13
  import { concatMap, filter, map, skipWhile, take, takeUntil, tap } from 'rxjs/operators';
14
14
  import { isDocumentAvailable, KendoInput, hasObservers, anyChanged, isChanged } from '@progress/kendo-angular-common';
15
15
  import { Keys } from '@progress/kendo-angular-common';
16
- import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown } from '../common/util';
16
+ import { isPresent, guid, getter, shuffleData, sameCharsOnly, matchText, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass } from '../common/util';
17
17
  import { SelectionService } from '../common/selection/selection.service';
18
18
  import { NavigationService, NavigationEvent } from '../common/navigation/navigation.service';
19
19
  import { ItemTemplateDirective } from '../common/templates/item-template.directive';
@@ -60,7 +60,8 @@ export const DROPDOWNLIST_VALUE_ACCESSOR = {
60
60
  * ```
61
61
  */
62
62
  let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponent {
63
- constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, hostElement, cdr, touchEnabled) {
63
+ constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled) {
64
+ this.wrapper = wrapper;
64
65
  this.localization = localization;
65
66
  this.popupService = popupService;
66
67
  this.selectionService = selectionService;
@@ -69,13 +70,8 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
69
70
  this.dataService = dataService;
70
71
  this._zone = _zone;
71
72
  this.renderer = renderer;
72
- this.hostElement = hostElement;
73
73
  this.cdr = cdr;
74
74
  this.touchEnabled = touchEnabled;
75
- /**
76
- * @hidden
77
- */
78
- this.focusableId = `k-${guid()}`;
79
75
  /**
80
76
  * Sets the height of the options list. By default, `listHeight` is 200px.
81
77
  *
@@ -153,7 +149,12 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
153
149
  * Fires each time the DropDownList gets blurred.
154
150
  */
155
151
  this.onBlur = new EventEmitter();
156
- this.widgetClasses = true;
152
+ this.hostClasses = true;
153
+ /**
154
+ * @hidden
155
+ */
156
+ this.focusableId = `k-${guid()}`;
157
+ this.role = 'listbox';
157
158
  this.groupIndices = [];
158
159
  this.listBoxId = guid();
159
160
  this.optionPrefix = guid();
@@ -165,16 +166,20 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
165
166
  this.last = "";
166
167
  this.filterFocused = new EventEmitter();
167
168
  this.filterBlurred = new EventEmitter();
168
- this.wrapperFocused = new EventEmitter();
169
- this.wrapperBlurred = new EventEmitter();
169
+ this.hostElementFocused = new EventEmitter();
170
+ this.hostElementBlurred = new EventEmitter();
170
171
  this.selectionSubscription = new Subscription();
171
172
  this._open = false;
172
173
  this._popupSettings = { animate: true };
174
+ this._size = 'medium';
175
+ this._rounded = 'medium';
176
+ this._fillMode = 'solid';
173
177
  validatePackage(packageMetadata);
174
178
  this.direction = localization.rtl ? 'rtl' : 'ltr';
175
179
  this.data = [];
176
180
  this.subscribeEvents();
177
181
  this.subscribeTouchEvents();
182
+ this.subscribeFocusEvents();
178
183
  this.popupMouseDownHandler = this.onMouseDown.bind(this);
179
184
  }
180
185
  get width() {
@@ -322,11 +327,76 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
322
327
  get tabIndex() {
323
328
  return this.tabindex;
324
329
  }
330
+ /**
331
+ * Sets the size of the component.
332
+ *
333
+ * The possible values are:
334
+ * * `'small'`
335
+ * * `'medium'` (default)
336
+ * * `'large'`
337
+ * * `null`
338
+ *
339
+ */
340
+ set size(size) {
341
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
342
+ if (size) {
343
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
344
+ }
345
+ this._size = size;
346
+ }
347
+ get size() {
348
+ return this._size;
349
+ }
350
+ /**
351
+ * Sets the border radius of the component.
352
+ *
353
+ * The possible values are:
354
+ * * `'small'`
355
+ * * `'medium'` (default)
356
+ * * `'large'`
357
+ * * `'full'`
358
+ * * `null`
359
+ *
360
+ */
361
+ set rounded(rounded) {
362
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
363
+ if (rounded) {
364
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
365
+ }
366
+ this._rounded = rounded;
367
+ }
368
+ get rounded() {
369
+ return this._rounded;
370
+ }
371
+ /**
372
+ * Sets the fillMode of the component.
373
+ *
374
+ * The possible values are:
375
+ * * `'flat'`
376
+ * * `'solid'` (default)
377
+ * * `'outline'`
378
+ * * `null`
379
+ *
380
+ */
381
+ set fillMode(fillMode) {
382
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
383
+ if (fillMode) {
384
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
385
+ }
386
+ this._fillMode = fillMode;
387
+ }
388
+ get fillMode() {
389
+ return this._fillMode;
390
+ }
325
391
  /**
326
392
  * @hidden
327
393
  */
328
- blurComponent() {
329
- this.wrapperBlurred.emit();
394
+ blurComponent(event) {
395
+ if (event.target !== this.wrapper.nativeElement) {
396
+ return;
397
+ }
398
+ event.stopImmediatePropagation();
399
+ this.hostElementBlurred.emit();
330
400
  }
331
401
  /**
332
402
  * @hidden
@@ -337,8 +407,12 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
337
407
  /**
338
408
  * @hidden
339
409
  */
340
- focusComponent() {
341
- this.wrapperFocused.emit();
410
+ focusComponent(event) {
411
+ if (event.target !== this.wrapper.nativeElement) {
412
+ return;
413
+ }
414
+ event.stopImmediatePropagation();
415
+ this.hostElementFocused.emit();
342
416
  if (!this.isFocused) {
343
417
  this.isFocused = true;
344
418
  if (hasObservers(this.onFocus)) {
@@ -348,6 +422,44 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
348
422
  }
349
423
  }
350
424
  }
425
+ /**
426
+ * @hidden
427
+ */
428
+ onResize() {
429
+ if (this._open) {
430
+ const popupWrapper = this.popupRef.popupElement;
431
+ const { min, max } = this.width;
432
+ popupWrapper.style.minWidth = min;
433
+ popupWrapper.style.width = max;
434
+ }
435
+ }
436
+ get isDisabled() {
437
+ return this.disabled;
438
+ }
439
+ get isLoading() {
440
+ return this.loading;
441
+ }
442
+ get dir() {
443
+ return this.direction;
444
+ }
445
+ get hostTabIndex() {
446
+ return this.widgetTabIndex;
447
+ }
448
+ get isReadonly() {
449
+ return this.readonly;
450
+ }
451
+ get isAriaExpanded() {
452
+ return this.ariaExpanded;
453
+ }
454
+ get hostAriaOwns() {
455
+ return this.ariaOwns;
456
+ }
457
+ get hostAriaActivedescendant() {
458
+ return this.ariaActivedescendant;
459
+ }
460
+ get hostNoDataLabel() {
461
+ return this.noDataLabel;
462
+ }
351
463
  /**
352
464
  * @hidden
353
465
  */
@@ -408,29 +520,15 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
408
520
  this.focus();
409
521
  this.togglePopup(!this.isOpen);
410
522
  }
411
- /**
412
- * @hidden
413
- */
414
- onResize() {
415
- if (this._open) {
416
- const popupWrapper = this.popupRef.popupElement;
417
- const { min, max } = this.width;
418
- popupWrapper.style.minWidth = min;
419
- popupWrapper.style.width = max;
420
- }
421
- }
422
- get dir() {
423
- return this.direction;
424
- }
425
523
  set isFocused(isFocused) {
426
- this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-state-focused');
524
+ this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
427
525
  this._isFocused = isFocused;
428
526
  }
429
527
  get isFocused() {
430
528
  return this._isFocused;
431
529
  }
432
530
  ngOnInit() {
433
- this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
531
+ this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
434
532
  this.localizationChangesSubscription = this.localization
435
533
  .changes.subscribe(({ rtl }) => {
436
534
  this.direction = rtl ? 'rtl' : 'ltr';
@@ -438,6 +536,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
438
536
  });
439
537
  this.setMessages();
440
538
  this.assignAriaDescribedBy();
539
+ this.setComponentClasses();
441
540
  }
442
541
  /**
443
542
  * @hidden
@@ -610,6 +709,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
610
709
  get buttonClasses() {
611
710
  return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
612
711
  }
712
+ /**
713
+ * @hidden
714
+ */
715
+ get selectButtonClasses() {
716
+ return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
717
+ }
718
+ /**
719
+ * @hidden
720
+ */
721
+ get filterInputClasses() {
722
+ return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
723
+ }
724
+ /**
725
+ * @hidden
726
+ */
727
+ get optionLabelSizeClass() {
728
+ return `${this.size ? getSizeClass('list', this.size) : ''}`;
729
+ }
613
730
  /**
614
731
  * @hidden
615
732
  */
@@ -744,13 +861,13 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
744
861
  .subscribe(this.handleEnter.bind(this));
745
862
  this.escSubscription = this.navigationService.esc
746
863
  .subscribe(this.handleEscape.bind(this));
747
- this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.wrapperFocused))))
864
+ this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
748
865
  .subscribe(() => {
749
- this.wrapperBlurred.emit();
866
+ this.hostElementBlurred.emit();
750
867
  });
751
868
  this._zone.runOutsideAngular(() => {
752
869
  this.componentBlurredSubscription =
753
- merge(this.wrapperBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.filterFocused)))), this.navigationService.tab).pipe(tap(event => event instanceof NavigationEvent && this.focus()), filter(() => this.isFocused))
870
+ 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))
754
871
  .subscribe(() => this.componentBlur());
755
872
  });
756
873
  }
@@ -762,7 +879,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
762
879
  // Roll up DropDownList on iOS when tapped outside
763
880
  this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
764
881
  const target = e.target;
765
- if (this.isFocused && !inDropDown(this.hostElement, target, this.popupRef)) {
882
+ if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
766
883
  this._zone.run(() => {
767
884
  if (this.filterFocused) {
768
885
  // Close popup if filter is focused
@@ -773,6 +890,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
773
890
  }
774
891
  }));
775
892
  }
893
+ subscribeFocusEvents() {
894
+ if (isDocumentAvailable()) {
895
+ this.focusComponent = this.focusComponent.bind(this);
896
+ this.blurComponent = this.blurComponent.bind(this);
897
+ this._zone.runOutsideAngular(() => {
898
+ const useCapture = true;
899
+ document.addEventListener('focus', this.focusComponent, useCapture);
900
+ document.addEventListener('blur', this.blurComponent, useCapture);
901
+ });
902
+ }
903
+ }
904
+ unSubscribeFocusEvents() {
905
+ if (isDocumentAvailable()) {
906
+ const useCapture = true;
907
+ document.removeEventListener('focus', this.focusComponent, useCapture);
908
+ document.removeEventListener('blur', this.blurComponent, useCapture);
909
+ }
910
+ }
776
911
  unsubscribeEvents() {
777
912
  if (!isDocumentAvailable()) {
778
913
  return;
@@ -784,6 +919,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
784
919
  this.escSubscription.unsubscribe();
785
920
  this.componentBlurredSubscription.unsubscribe();
786
921
  this.filterBlurredSubscription.unsubscribe();
922
+ this.unSubscribeFocusEvents();
787
923
  if (this.touchstartDisposeHandler) {
788
924
  this.touchstartDisposeHandler();
789
925
  }
@@ -875,7 +1011,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
875
1011
  hasObservers(this.close) ||
876
1012
  hasObservers(this.onBlur) ||
877
1013
  hasObservers(this.filterChange) ||
878
- isUntouched(this.hostElement.nativeElement)) {
1014
+ isUntouched(this.wrapper.nativeElement)) {
879
1015
  this._zone.run(() => {
880
1016
  if (valueHasChanged) {
881
1017
  this.selectionService.change(this.selectionService.selected[0]);
@@ -1055,11 +1191,18 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
1055
1191
  const newValue = `${this.valueLabelId} ${trimmed}`.trim();
1056
1192
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
1057
1193
  }
1194
+ setComponentClasses() {
1195
+ if (this.size) {
1196
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
1197
+ }
1198
+ if (this.rounded) {
1199
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
1200
+ }
1201
+ if (this.fillMode) {
1202
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
1203
+ }
1204
+ }
1058
1205
  };
1059
- tslib_1.__decorate([
1060
- Input(),
1061
- tslib_1.__metadata("design:type", String)
1062
- ], DropDownListComponent.prototype, "focusableId", void 0);
1063
1206
  tslib_1.__decorate([
1064
1207
  Input(),
1065
1208
  tslib_1.__metadata("design:type", String)
@@ -1143,6 +1286,21 @@ tslib_1.__decorate([
1143
1286
  tslib_1.__metadata("design:type", Number),
1144
1287
  tslib_1.__metadata("design:paramtypes", [Number])
1145
1288
  ], DropDownListComponent.prototype, "tabIndex", null);
1289
+ tslib_1.__decorate([
1290
+ Input(),
1291
+ tslib_1.__metadata("design:type", String),
1292
+ tslib_1.__metadata("design:paramtypes", [String])
1293
+ ], DropDownListComponent.prototype, "size", null);
1294
+ tslib_1.__decorate([
1295
+ Input(),
1296
+ tslib_1.__metadata("design:type", String),
1297
+ tslib_1.__metadata("design:paramtypes", [String])
1298
+ ], DropDownListComponent.prototype, "rounded", null);
1299
+ tslib_1.__decorate([
1300
+ Input(),
1301
+ tslib_1.__metadata("design:type", String),
1302
+ tslib_1.__metadata("design:paramtypes", [String])
1303
+ ], DropDownListComponent.prototype, "fillMode", null);
1146
1304
  tslib_1.__decorate([
1147
1305
  Output(),
1148
1306
  tslib_1.__metadata("design:type", EventEmitter)
@@ -1215,24 +1373,90 @@ tslib_1.__decorate([
1215
1373
  ViewChild('popupTemplate', { static: true }),
1216
1374
  tslib_1.__metadata("design:type", TemplateRef)
1217
1375
  ], DropDownListComponent.prototype, "popupTemplate", void 0);
1218
- tslib_1.__decorate([
1219
- ViewChild('wrapper', { static: true }),
1220
- tslib_1.__metadata("design:type", ElementRef)
1221
- ], DropDownListComponent.prototype, "wrapper", void 0);
1222
1376
  tslib_1.__decorate([
1223
1377
  ViewChild('optionsList', { static: false }),
1224
1378
  tslib_1.__metadata("design:type", ListComponent)
1225
1379
  ], DropDownListComponent.prototype, "optionsList", void 0);
1226
1380
  tslib_1.__decorate([
1227
- HostBinding('class.k-widget'),
1228
- HostBinding('class.k-dropdown'),
1381
+ HostBinding('class.k-dropdownlist'),
1382
+ HostBinding('class.k-picker'),
1229
1383
  tslib_1.__metadata("design:type", Boolean)
1230
- ], DropDownListComponent.prototype, "widgetClasses", void 0);
1384
+ ], DropDownListComponent.prototype, "hostClasses", void 0);
1385
+ tslib_1.__decorate([
1386
+ HostBinding('class.k-disabled'),
1387
+ HostBinding('attr.aria-disabled'),
1388
+ tslib_1.__metadata("design:type", Boolean),
1389
+ tslib_1.__metadata("design:paramtypes", [])
1390
+ ], DropDownListComponent.prototype, "isDisabled", null);
1391
+ tslib_1.__decorate([
1392
+ HostBinding('class.k-loading'),
1393
+ tslib_1.__metadata("design:type", Boolean),
1394
+ tslib_1.__metadata("design:paramtypes", [])
1395
+ ], DropDownListComponent.prototype, "isLoading", null);
1396
+ tslib_1.__decorate([
1397
+ Input('id'),
1398
+ HostBinding('attr.id'),
1399
+ tslib_1.__metadata("design:type", String)
1400
+ ], DropDownListComponent.prototype, "focusableId", void 0);
1231
1401
  tslib_1.__decorate([
1232
1402
  HostBinding('attr.dir'),
1233
1403
  tslib_1.__metadata("design:type", String),
1234
1404
  tslib_1.__metadata("design:paramtypes", [])
1235
1405
  ], DropDownListComponent.prototype, "dir", null);
1406
+ tslib_1.__decorate([
1407
+ HostBinding('attr.tabindex'),
1408
+ tslib_1.__metadata("design:type", Number),
1409
+ tslib_1.__metadata("design:paramtypes", [])
1410
+ ], DropDownListComponent.prototype, "hostTabIndex", null);
1411
+ tslib_1.__decorate([
1412
+ HostBinding('attr.readonly'),
1413
+ HostBinding('attr.aria-readonly'),
1414
+ tslib_1.__metadata("design:type", Boolean),
1415
+ tslib_1.__metadata("design:paramtypes", [])
1416
+ ], DropDownListComponent.prototype, "isReadonly", null);
1417
+ tslib_1.__decorate([
1418
+ HostBinding('attr.role'),
1419
+ HostBinding('attr.aria-haspopup'),
1420
+ tslib_1.__metadata("design:type", String)
1421
+ ], DropDownListComponent.prototype, "role", void 0);
1422
+ tslib_1.__decorate([
1423
+ HostBinding('attr.aria-expanded'),
1424
+ tslib_1.__metadata("design:type", Boolean),
1425
+ tslib_1.__metadata("design:paramtypes", [])
1426
+ ], DropDownListComponent.prototype, "isAriaExpanded", null);
1427
+ tslib_1.__decorate([
1428
+ HostBinding('attr.aria-owns'),
1429
+ tslib_1.__metadata("design:type", String),
1430
+ tslib_1.__metadata("design:paramtypes", [])
1431
+ ], DropDownListComponent.prototype, "hostAriaOwns", null);
1432
+ tslib_1.__decorate([
1433
+ HostBinding('attr.aria-activedescendant'),
1434
+ tslib_1.__metadata("design:type", String),
1435
+ tslib_1.__metadata("design:paramtypes", [])
1436
+ ], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
1437
+ tslib_1.__decorate([
1438
+ HostBinding('attr.aria-label'),
1439
+ tslib_1.__metadata("design:type", String),
1440
+ tslib_1.__metadata("design:paramtypes", [])
1441
+ ], DropDownListComponent.prototype, "hostNoDataLabel", null);
1442
+ tslib_1.__decorate([
1443
+ HostListener('keydown', ['$event']),
1444
+ tslib_1.__metadata("design:type", Function),
1445
+ tslib_1.__metadata("design:paramtypes", [Object]),
1446
+ tslib_1.__metadata("design:returntype", void 0)
1447
+ ], DropDownListComponent.prototype, "keydown", null);
1448
+ tslib_1.__decorate([
1449
+ HostListener('keypress', ['$event']),
1450
+ tslib_1.__metadata("design:type", Function),
1451
+ tslib_1.__metadata("design:paramtypes", [Object]),
1452
+ tslib_1.__metadata("design:returntype", void 0)
1453
+ ], DropDownListComponent.prototype, "keypress", null);
1454
+ tslib_1.__decorate([
1455
+ HostListener('click', ['$event']),
1456
+ tslib_1.__metadata("design:type", Function),
1457
+ tslib_1.__metadata("design:paramtypes", [MouseEvent]),
1458
+ tslib_1.__metadata("design:returntype", void 0)
1459
+ ], DropDownListComponent.prototype, "click", null);
1236
1460
  DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1237
1461
  Component({
1238
1462
  exportAs: 'kendoDropDownList',
@@ -1261,128 +1485,128 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1261
1485
  noDataText="NO DATA FOUND"
1262
1486
  >
1263
1487
  </ng-container>
1264
- <span #wrapper unselectable="on"
1265
- role="listbox"
1266
- [id]="focusableId"
1267
- [ngClass]="{
1268
- 'k-dropdown-wrap': true,
1269
- 'k-state-disabled': this.disabled
1270
- }"
1271
- [attr.dir]="direction"
1272
- [attr.readonly]="readonly"
1273
- [attr.tabindex]="widgetTabIndex"
1274
- [attr.aria-disabled]="disabled"
1275
- [attr.aria-readonly]="readonly"
1276
- aria-haspopup="listbox"
1277
- [attr.aria-expanded]="ariaExpanded"
1278
- [attr.aria-owns]="ariaOwns"
1279
- [attr.aria-activedescendant]="ariaActivedescendant"
1280
- [attr.aria-label]="noDataLabel"
1281
- (keydown)="keydown($event)"
1282
- (keypress)="keypress($event)"
1283
- (click)="click($event)"
1284
- [kendoEventsOutsideAngular]="{
1285
- focus: focusComponent,
1286
- blur: blurComponent
1488
+ <span class="k-input-inner" unselectable="on" [id]="valueLabelId">
1489
+ <span class="k-input-value-text">
1490
+ <ng-template *ngIf="valueTemplate"
1491
+ [templateContext]="{
1492
+ templateRef: valueTemplate.templateRef,
1493
+ $implicit: dataItem
1494
+ }">
1495
+ </ng-template>
1496
+ <ng-template [ngIf]="!valueTemplate">{{ getText() }}</ng-template>
1497
+ </span>
1498
+ </span>
1499
+ <button
1500
+ tabindex="-1"
1501
+ unselectable="on"
1502
+ type="button"
1503
+ class="k-input-button k-button k-icon-button"
1504
+ [ngClass]="selectButtonClasses"
1505
+ [kendoEventsOutsideAngular]="{
1506
+ mousedown: onMouseDown
1287
1507
  }"
1288
- [scope]="this"
1289
1508
  >
1290
- <span class="k-input" unselectable="on" [id]="valueLabelId">
1291
- <ng-template *ngIf="valueTemplate"
1292
- [templateContext]="{
1293
- templateRef: valueTemplate.templateRef,
1294
- $implicit: dataItem
1295
- }">
1296
- </ng-template>
1297
- <ng-template [ngIf]="!valueTemplate">{{ getText() }}</ng-template>
1298
- </span>
1299
- <span class="k-select" unselectable="on">
1300
- <span
1301
- class="k-icon"
1302
- unselectable="on"
1303
- [ngClass]="buttonClasses"
1304
- >
1305
- </span>
1306
- </span>
1307
- <ng-template #popupTemplate>
1308
- <!--filterable-->
1509
+ <span
1510
+ class="k-button-icon k-icon"
1511
+ unselectable="on"
1512
+ [ngClass]="buttonClasses"
1513
+ ></span>
1514
+ </button>
1515
+ <ng-template #popupTemplate>
1516
+ <!--filterable-->
1309
1517
 
1310
- <ng-template [ngIf]="filterable">
1311
- <span class="k-list-filter" (click)="$event.stopImmediatePropagation()">
1312
- <input
1313
- [attr.aria-owns]="ariaOwns"
1314
- [attr.aria-activedescendant]="ariaActivedescendant"
1315
- [attr.aria-label]="noDataLabel"
1316
- tabindex="-1"
1317
- [filterInput]="isFocused && !touchEnabled"
1318
- [dir]="direction"
1319
- [(ngModel)]="filterText"
1320
- class="k-textbox"
1321
- (keydown)="keydown($event)"
1322
- (input)="handleFilter($event)"
1323
- (focus)="onFilterFocus()"
1324
- (blur)="blurFilterInput()" />
1325
- <span class="k-icon k-i-search" unselectable="on"></span>
1326
- </span>
1327
- </ng-template>
1328
- <!--default item-->
1329
- <ng-template [ngIf]="defaultItem && !itemTemplate">
1330
- <div class="k-list-optionlabel" [ngClass]="{ 'k-state-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
1331
- {{ getDefaultItemText() }}
1332
- </div>
1333
- </ng-template>
1334
- <ng-template [ngIf]="defaultItem && itemTemplate">
1335
- <div class="k-list-optionlabel" [ngClass]="{ 'k-state-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
1336
- <ng-template
1337
- [templateContext]="{
1338
- templateRef: itemTemplate.templateRef,
1339
- $implicit: defaultItem
1340
- }">
1341
- </ng-template>
1342
- </div>
1343
- </ng-template>
1344
- <!--header template-->
1345
- <ng-template *ngIf="headerTemplate"
1346
- [templateContext]="{
1347
- templateRef: headerTemplate.templateRef
1348
- }">
1349
- </ng-template>
1350
- <!--list-->
1351
- <kendo-list
1352
- #optionsList
1353
- [id]="listBoxId"
1354
- [optionPrefix]="optionPrefix"
1355
- [data]="data"
1356
- [textField]="textField"
1357
- [valueField]="valueField"
1358
- [template]="itemTemplate"
1359
- [groupTemplate]="groupTemplate"
1360
- [fixedGroupTemplate]="fixedGroupTemplate"
1361
- [height]="listHeight"
1362
- [show]="isOpen"
1363
- [virtual]="virtual"
1364
- (pageChange)="pageChange($event)"
1365
- >
1366
- </kendo-list>
1367
- <!--no-data template-->
1368
- <div class="k-nodata" *ngIf="data.length === 0">
1369
- <ng-template [ngIf]="noDataTemplate"
1370
- [templateContext]="{
1371
- templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
1372
- }">
1373
- </ng-template>
1374
- <ng-template [ngIf]="!noDataTemplate">
1375
- <div>{{ noDataText }}</div>
1376
- </ng-template>
1377
- </div>
1378
- <!--footer template-->
1379
- <ng-template *ngIf="footerTemplate"
1380
- [templateContext]="{
1381
- templateRef: footerTemplate.templateRef
1382
- }">
1383
- </ng-template>
1518
+ <ng-template [ngIf]="filterable">
1519
+ <div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
1520
+ <span
1521
+ class="k-searchbox k-input"
1522
+ [ngClass]="filterInputClasses"
1523
+ >
1524
+ <span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
1525
+ <input
1526
+ [attr.aria-owns]="ariaOwns"
1527
+ [attr.aria-activedescendant]="ariaActivedescendant"
1528
+ [attr.aria-label]="noDataLabel"
1529
+ tabindex="-1"
1530
+ [filterInput]="isFocused && !touchEnabled"
1531
+ [dir]="direction"
1532
+ [(ngModel)]="filterText"
1533
+ class="k-input-inner"
1534
+ (keydown)="keydown($event)"
1535
+ (input)="handleFilter($event)"
1536
+ (focus)="onFilterFocus()"
1537
+ (blur)="blurFilterInput()" />
1538
+ </span>
1539
+ </div>
1384
1540
  </ng-template>
1385
- </span>
1541
+ <!--default item-->
1542
+ <ng-template [ngIf]="defaultItem && !itemTemplate">
1543
+ <div
1544
+ class="k-list"
1545
+ [ngClass]="optionLabelSizeClass"
1546
+ >
1547
+ <div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
1548
+ {{ getDefaultItemText() }}
1549
+ </div>
1550
+ </div>
1551
+ </ng-template>
1552
+ <ng-template [ngIf]="defaultItem && itemTemplate">
1553
+ <div
1554
+ class="k-list"
1555
+ [ngClass]="optionLabelSizeClass"
1556
+ >
1557
+ <div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
1558
+ <ng-template
1559
+ [templateContext]="{
1560
+ templateRef: itemTemplate.templateRef,
1561
+ $implicit: defaultItem
1562
+ }">
1563
+ </ng-template>
1564
+ </div>
1565
+ </div>
1566
+ </ng-template>
1567
+ <!--header template-->
1568
+ <ng-template *ngIf="headerTemplate"
1569
+ [templateContext]="{
1570
+ templateRef: headerTemplate.templateRef
1571
+ }">
1572
+ </ng-template>
1573
+ <!--list-->
1574
+ <kendo-list
1575
+ #optionsList
1576
+ [size]="size"
1577
+ [rounded]="rounded"
1578
+ [id]="listBoxId"
1579
+ [optionPrefix]="optionPrefix"
1580
+ [data]="data"
1581
+ [textField]="textField"
1582
+ [valueField]="valueField"
1583
+ [template]="itemTemplate"
1584
+ [groupTemplate]="groupTemplate"
1585
+ [fixedGroupTemplate]="fixedGroupTemplate"
1586
+ [height]="listHeight"
1587
+ [show]="isOpen"
1588
+ [virtual]="virtual"
1589
+ (pageChange)="pageChange($event)"
1590
+ >
1591
+ </kendo-list>
1592
+ <!--no-data template-->
1593
+ <div class="k-no-data" *ngIf="data.length === 0">
1594
+ <ng-template [ngIf]="noDataTemplate"
1595
+ [templateContext]="{
1596
+ templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
1597
+ }">
1598
+ </ng-template>
1599
+ <ng-template [ngIf]="!noDataTemplate">
1600
+ <div>{{ noDataText }}</div>
1601
+ </ng-template>
1602
+ </div>
1603
+ <!--footer template-->
1604
+ <ng-template *ngIf="footerTemplate"
1605
+ [templateContext]="{
1606
+ templateRef: footerTemplate.templateRef
1607
+ }">
1608
+ </ng-template>
1609
+ </ng-template>
1386
1610
  <ng-template [ngIf]="isOpen">
1387
1611
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
1388
1612
  </ng-template>
@@ -1390,7 +1614,8 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1390
1614
  `
1391
1615
  }),
1392
1616
  tslib_1.__param(10, Optional()), tslib_1.__param(10, Inject(TOUCH_ENABLED)),
1393
- tslib_1.__metadata("design:paramtypes", [LocalizationService,
1617
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
1618
+ LocalizationService,
1394
1619
  PopupService,
1395
1620
  SelectionService,
1396
1621
  NavigationService,
@@ -1398,7 +1623,6 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
1398
1623
  DataService,
1399
1624
  NgZone,
1400
1625
  Renderer2,
1401
- ElementRef,
1402
1626
  ChangeDetectorRef, Boolean])
1403
1627
  ], DropDownListComponent);
1404
1628
  export { DropDownListComponent };