@progress/kendo-angular-dropdowns 5.5.1-dev.202111181325 → 6.0.0-dev.202201190829
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/autocomplete/autocomplete.component.js +120 -5
- package/dist/es/comboboxes/combobox.component.js +141 -20
- package/dist/es/comboboxes/multicolumncombobox.component.js +30 -10
- package/dist/es/common/list.component.js +83 -5
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/list-type.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/searchbar.component.js +1 -1
- package/dist/es/common/selection/selectable.directive.js +2 -2
- package/dist/es/common/taglist.component.js +58 -5
- package/dist/es/common/util.js +37 -0
- package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
- package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
- package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
- package/dist/es/multiselect/multiselect.component.js +162 -35
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
- package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
- package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
- package/dist/es2015/comboboxes/combobox.component.js +207 -106
- package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
- package/dist/es2015/common/list.component.d.ts +22 -1
- package/dist/es2015/common/list.component.js +115 -36
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/list-type.d.ts +8 -0
- package/dist/es2015/common/models/list-type.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/searchbar.component.js +1 -1
- package/dist/es2015/common/selection/selectable.directive.js +2 -2
- package/dist/es2015/common/taglist.component.d.ts +13 -1
- package/dist/es2015/common/taglist.component.js +102 -47
- package/dist/es2015/common/util.d.ts +17 -0
- package/dist/es2015/common/util.js +37 -0
- package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +77 -13
- package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
- package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
- package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
- package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
- package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
- package/dist/es2015/multiselect/multiselect.component.js +183 -70
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1928 -801
- package/dist/fesm5/index.js +1569 -231
- package/dist/npm/autocomplete/autocomplete.component.js +119 -4
- package/dist/npm/comboboxes/combobox.component.js +140 -19
- package/dist/npm/comboboxes/multicolumncombobox.component.js +29 -9
- package/dist/npm/common/list.component.js +82 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/list-type.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/searchbar.component.js +1 -1
- package/dist/npm/common/selection/selectable.directive.js +2 -2
- package/dist/npm/common/taglist.component.js +56 -3
- package/dist/npm/common/util.js +37 -0
- package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
- package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
- package/dist/npm/multiselect/multiselect.component.js +160 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- 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,
|
|
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,7 +70,6 @@ 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
75
|
/**
|
|
@@ -153,7 +153,8 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
153
153
|
* Fires each time the DropDownList gets blurred.
|
|
154
154
|
*/
|
|
155
155
|
this.onBlur = new EventEmitter();
|
|
156
|
-
this.
|
|
156
|
+
this.hostClasses = true;
|
|
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.
|
|
169
|
-
this.
|
|
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.
|
|
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.
|
|
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,47 @@ 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 id() {
|
|
443
|
+
return this.focusableId;
|
|
444
|
+
}
|
|
445
|
+
get dir() {
|
|
446
|
+
return this.direction;
|
|
447
|
+
}
|
|
448
|
+
get hostTabIndex() {
|
|
449
|
+
return this.widgetTabIndex;
|
|
450
|
+
}
|
|
451
|
+
get isReadonly() {
|
|
452
|
+
return this.readonly;
|
|
453
|
+
}
|
|
454
|
+
get isAriaExpanded() {
|
|
455
|
+
return this.ariaExpanded;
|
|
456
|
+
}
|
|
457
|
+
get hostAriaOwns() {
|
|
458
|
+
return this.ariaOwns;
|
|
459
|
+
}
|
|
460
|
+
get hostAriaActivedescendant() {
|
|
461
|
+
return this.ariaActivedescendant;
|
|
462
|
+
}
|
|
463
|
+
get hostNoDataLabel() {
|
|
464
|
+
return this.noDataLabel;
|
|
465
|
+
}
|
|
351
466
|
/**
|
|
352
467
|
* @hidden
|
|
353
468
|
*/
|
|
@@ -408,29 +523,15 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
408
523
|
this.focus();
|
|
409
524
|
this.togglePopup(!this.isOpen);
|
|
410
525
|
}
|
|
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
526
|
set isFocused(isFocused) {
|
|
426
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
527
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
427
528
|
this._isFocused = isFocused;
|
|
428
529
|
}
|
|
429
530
|
get isFocused() {
|
|
430
531
|
return this._isFocused;
|
|
431
532
|
}
|
|
432
533
|
ngOnInit() {
|
|
433
|
-
this.renderer.removeAttribute(this.
|
|
534
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
434
535
|
this.localizationChangesSubscription = this.localization
|
|
435
536
|
.changes.subscribe(({ rtl }) => {
|
|
436
537
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -438,6 +539,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
438
539
|
});
|
|
439
540
|
this.setMessages();
|
|
440
541
|
this.assignAriaDescribedBy();
|
|
542
|
+
this.setComponentClasses();
|
|
441
543
|
}
|
|
442
544
|
/**
|
|
443
545
|
* @hidden
|
|
@@ -610,6 +712,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
610
712
|
get buttonClasses() {
|
|
611
713
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
612
714
|
}
|
|
715
|
+
/**
|
|
716
|
+
* @hidden
|
|
717
|
+
*/
|
|
718
|
+
get selectButtonClasses() {
|
|
719
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* @hidden
|
|
723
|
+
*/
|
|
724
|
+
get filterInputClasses() {
|
|
725
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* @hidden
|
|
729
|
+
*/
|
|
730
|
+
get optionLabelSizeClass() {
|
|
731
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
732
|
+
}
|
|
613
733
|
/**
|
|
614
734
|
* @hidden
|
|
615
735
|
*/
|
|
@@ -744,13 +864,13 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
744
864
|
.subscribe(this.handleEnter.bind(this));
|
|
745
865
|
this.escSubscription = this.navigationService.esc
|
|
746
866
|
.subscribe(this.handleEscape.bind(this));
|
|
747
|
-
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.
|
|
867
|
+
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
|
|
748
868
|
.subscribe(() => {
|
|
749
|
-
this.
|
|
869
|
+
this.hostElementBlurred.emit();
|
|
750
870
|
});
|
|
751
871
|
this._zone.runOutsideAngular(() => {
|
|
752
872
|
this.componentBlurredSubscription =
|
|
753
|
-
merge(this.
|
|
873
|
+
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
874
|
.subscribe(() => this.componentBlur());
|
|
755
875
|
});
|
|
756
876
|
}
|
|
@@ -762,7 +882,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
762
882
|
// Roll up DropDownList on iOS when tapped outside
|
|
763
883
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
764
884
|
const target = e.target;
|
|
765
|
-
if (this.isFocused && !inDropDown(this.
|
|
885
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
766
886
|
this._zone.run(() => {
|
|
767
887
|
if (this.filterFocused) {
|
|
768
888
|
// Close popup if filter is focused
|
|
@@ -773,6 +893,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
773
893
|
}
|
|
774
894
|
}));
|
|
775
895
|
}
|
|
896
|
+
subscribeFocusEvents() {
|
|
897
|
+
if (isDocumentAvailable()) {
|
|
898
|
+
this.focusComponent = this.focusComponent.bind(this);
|
|
899
|
+
this.blurComponent = this.blurComponent.bind(this);
|
|
900
|
+
this._zone.runOutsideAngular(() => {
|
|
901
|
+
const useCapture = true;
|
|
902
|
+
document.addEventListener('focus', this.focusComponent, useCapture);
|
|
903
|
+
document.addEventListener('blur', this.blurComponent, useCapture);
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
unSubscribeFocusEvents() {
|
|
908
|
+
if (isDocumentAvailable()) {
|
|
909
|
+
const useCapture = true;
|
|
910
|
+
document.removeEventListener('focus', this.focusComponent, useCapture);
|
|
911
|
+
document.removeEventListener('blur', this.blurComponent, useCapture);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
776
914
|
unsubscribeEvents() {
|
|
777
915
|
if (!isDocumentAvailable()) {
|
|
778
916
|
return;
|
|
@@ -784,6 +922,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
784
922
|
this.escSubscription.unsubscribe();
|
|
785
923
|
this.componentBlurredSubscription.unsubscribe();
|
|
786
924
|
this.filterBlurredSubscription.unsubscribe();
|
|
925
|
+
this.unSubscribeFocusEvents();
|
|
787
926
|
if (this.touchstartDisposeHandler) {
|
|
788
927
|
this.touchstartDisposeHandler();
|
|
789
928
|
}
|
|
@@ -875,7 +1014,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
875
1014
|
hasObservers(this.close) ||
|
|
876
1015
|
hasObservers(this.onBlur) ||
|
|
877
1016
|
hasObservers(this.filterChange) ||
|
|
878
|
-
isUntouched(this.
|
|
1017
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
879
1018
|
this._zone.run(() => {
|
|
880
1019
|
if (valueHasChanged) {
|
|
881
1020
|
this.selectionService.change(this.selectionService.selected[0]);
|
|
@@ -1055,6 +1194,17 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
1055
1194
|
const newValue = `${this.valueLabelId} ${trimmed}`.trim();
|
|
1056
1195
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
1057
1196
|
}
|
|
1197
|
+
setComponentClasses() {
|
|
1198
|
+
if (this.size) {
|
|
1199
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
1200
|
+
}
|
|
1201
|
+
if (this.rounded) {
|
|
1202
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1203
|
+
}
|
|
1204
|
+
if (this.fillMode) {
|
|
1205
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1058
1208
|
};
|
|
1059
1209
|
tslib_1.__decorate([
|
|
1060
1210
|
Input(),
|
|
@@ -1143,6 +1293,21 @@ tslib_1.__decorate([
|
|
|
1143
1293
|
tslib_1.__metadata("design:type", Number),
|
|
1144
1294
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1145
1295
|
], DropDownListComponent.prototype, "tabIndex", null);
|
|
1296
|
+
tslib_1.__decorate([
|
|
1297
|
+
Input(),
|
|
1298
|
+
tslib_1.__metadata("design:type", String),
|
|
1299
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1300
|
+
], DropDownListComponent.prototype, "size", null);
|
|
1301
|
+
tslib_1.__decorate([
|
|
1302
|
+
Input(),
|
|
1303
|
+
tslib_1.__metadata("design:type", String),
|
|
1304
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1305
|
+
], DropDownListComponent.prototype, "rounded", null);
|
|
1306
|
+
tslib_1.__decorate([
|
|
1307
|
+
Input(),
|
|
1308
|
+
tslib_1.__metadata("design:type", String),
|
|
1309
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1310
|
+
], DropDownListComponent.prototype, "fillMode", null);
|
|
1146
1311
|
tslib_1.__decorate([
|
|
1147
1312
|
Output(),
|
|
1148
1313
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -1215,24 +1380,90 @@ tslib_1.__decorate([
|
|
|
1215
1380
|
ViewChild('popupTemplate', { static: true }),
|
|
1216
1381
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
1217
1382
|
], 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
1383
|
tslib_1.__decorate([
|
|
1223
1384
|
ViewChild('optionsList', { static: false }),
|
|
1224
1385
|
tslib_1.__metadata("design:type", ListComponent)
|
|
1225
1386
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
1226
1387
|
tslib_1.__decorate([
|
|
1227
|
-
HostBinding('class.k-
|
|
1228
|
-
HostBinding('class.k-
|
|
1388
|
+
HostBinding('class.k-dropdownlist'),
|
|
1389
|
+
HostBinding('class.k-picker'),
|
|
1229
1390
|
tslib_1.__metadata("design:type", Boolean)
|
|
1230
|
-
], DropDownListComponent.prototype, "
|
|
1391
|
+
], DropDownListComponent.prototype, "hostClasses", void 0);
|
|
1392
|
+
tslib_1.__decorate([
|
|
1393
|
+
HostBinding('class.k-disabled'),
|
|
1394
|
+
HostBinding('attr.aria-disabled'),
|
|
1395
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1396
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1397
|
+
], DropDownListComponent.prototype, "isDisabled", null);
|
|
1398
|
+
tslib_1.__decorate([
|
|
1399
|
+
HostBinding('class.k-loading'),
|
|
1400
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1401
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1402
|
+
], DropDownListComponent.prototype, "isLoading", null);
|
|
1403
|
+
tslib_1.__decorate([
|
|
1404
|
+
HostBinding('attr.id'),
|
|
1405
|
+
tslib_1.__metadata("design:type", String),
|
|
1406
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1407
|
+
], DropDownListComponent.prototype, "id", null);
|
|
1231
1408
|
tslib_1.__decorate([
|
|
1232
1409
|
HostBinding('attr.dir'),
|
|
1233
1410
|
tslib_1.__metadata("design:type", String),
|
|
1234
1411
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1235
1412
|
], DropDownListComponent.prototype, "dir", null);
|
|
1413
|
+
tslib_1.__decorate([
|
|
1414
|
+
HostBinding('attr.tabindex'),
|
|
1415
|
+
tslib_1.__metadata("design:type", Number),
|
|
1416
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1417
|
+
], DropDownListComponent.prototype, "hostTabIndex", null);
|
|
1418
|
+
tslib_1.__decorate([
|
|
1419
|
+
HostBinding('attr.readonly'),
|
|
1420
|
+
HostBinding('attr.aria-readonly'),
|
|
1421
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1422
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1423
|
+
], DropDownListComponent.prototype, "isReadonly", null);
|
|
1424
|
+
tslib_1.__decorate([
|
|
1425
|
+
HostBinding('attr.role'),
|
|
1426
|
+
HostBinding('attr.aria-haspopup'),
|
|
1427
|
+
tslib_1.__metadata("design:type", String)
|
|
1428
|
+
], DropDownListComponent.prototype, "role", void 0);
|
|
1429
|
+
tslib_1.__decorate([
|
|
1430
|
+
HostBinding('attr.aria-expanded'),
|
|
1431
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1432
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1433
|
+
], DropDownListComponent.prototype, "isAriaExpanded", null);
|
|
1434
|
+
tslib_1.__decorate([
|
|
1435
|
+
HostBinding('attr.aria-owns'),
|
|
1436
|
+
tslib_1.__metadata("design:type", String),
|
|
1437
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1438
|
+
], DropDownListComponent.prototype, "hostAriaOwns", null);
|
|
1439
|
+
tslib_1.__decorate([
|
|
1440
|
+
HostBinding('attr.aria-activedescendant'),
|
|
1441
|
+
tslib_1.__metadata("design:type", String),
|
|
1442
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1443
|
+
], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
|
|
1444
|
+
tslib_1.__decorate([
|
|
1445
|
+
HostBinding('attr.aria-label'),
|
|
1446
|
+
tslib_1.__metadata("design:type", String),
|
|
1447
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1448
|
+
], DropDownListComponent.prototype, "hostNoDataLabel", null);
|
|
1449
|
+
tslib_1.__decorate([
|
|
1450
|
+
HostListener('keydown', ['$event']),
|
|
1451
|
+
tslib_1.__metadata("design:type", Function),
|
|
1452
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1453
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1454
|
+
], DropDownListComponent.prototype, "keydown", null);
|
|
1455
|
+
tslib_1.__decorate([
|
|
1456
|
+
HostListener('keypress', ['$event']),
|
|
1457
|
+
tslib_1.__metadata("design:type", Function),
|
|
1458
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1459
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1460
|
+
], DropDownListComponent.prototype, "keypress", null);
|
|
1461
|
+
tslib_1.__decorate([
|
|
1462
|
+
HostListener('click', ['$event']),
|
|
1463
|
+
tslib_1.__metadata("design:type", Function),
|
|
1464
|
+
tslib_1.__metadata("design:paramtypes", [MouseEvent]),
|
|
1465
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1466
|
+
], DropDownListComponent.prototype, "click", null);
|
|
1236
1467
|
DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
1237
1468
|
Component({
|
|
1238
1469
|
exportAs: 'kendoDropDownList',
|
|
@@ -1261,128 +1492,128 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
|
1261
1492
|
noDataText="NO DATA FOUND"
|
|
1262
1493
|
>
|
|
1263
1494
|
</ng-container>
|
|
1264
|
-
<span
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
(click)="click($event)"
|
|
1284
|
-
[kendoEventsOutsideAngular]="{
|
|
1285
|
-
focus: focusComponent,
|
|
1286
|
-
blur: blurComponent
|
|
1495
|
+
<span class="k-input-inner" unselectable="on" [id]="valueLabelId">
|
|
1496
|
+
<span class="k-input-value-text">
|
|
1497
|
+
<ng-template *ngIf="valueTemplate"
|
|
1498
|
+
[templateContext]="{
|
|
1499
|
+
templateRef: valueTemplate.templateRef,
|
|
1500
|
+
$implicit: dataItem
|
|
1501
|
+
}">
|
|
1502
|
+
</ng-template>
|
|
1503
|
+
<ng-template [ngIf]="!valueTemplate">{{ getText() }}</ng-template>
|
|
1504
|
+
</span>
|
|
1505
|
+
</span>
|
|
1506
|
+
<button
|
|
1507
|
+
tabindex="-1"
|
|
1508
|
+
unselectable="on"
|
|
1509
|
+
type="button"
|
|
1510
|
+
class="k-input-button k-button k-icon-button"
|
|
1511
|
+
[ngClass]="selectButtonClasses"
|
|
1512
|
+
[kendoEventsOutsideAngular]="{
|
|
1513
|
+
mousedown: onMouseDown
|
|
1287
1514
|
}"
|
|
1288
|
-
[scope]="this"
|
|
1289
1515
|
>
|
|
1290
|
-
<span
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
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-->
|
|
1516
|
+
<span
|
|
1517
|
+
class="k-button-icon k-icon"
|
|
1518
|
+
unselectable="on"
|
|
1519
|
+
[ngClass]="buttonClasses"
|
|
1520
|
+
></span>
|
|
1521
|
+
</button>
|
|
1522
|
+
<ng-template #popupTemplate>
|
|
1523
|
+
<!--filterable-->
|
|
1309
1524
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
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>
|
|
1525
|
+
<ng-template [ngIf]="filterable">
|
|
1526
|
+
<div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
|
|
1527
|
+
<span
|
|
1528
|
+
class="k-searchbox k-input"
|
|
1529
|
+
[ngClass]="filterInputClasses"
|
|
1530
|
+
>
|
|
1531
|
+
<span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
|
|
1532
|
+
<input
|
|
1533
|
+
[attr.aria-owns]="ariaOwns"
|
|
1534
|
+
[attr.aria-activedescendant]="ariaActivedescendant"
|
|
1535
|
+
[attr.aria-label]="noDataLabel"
|
|
1536
|
+
tabindex="-1"
|
|
1537
|
+
[filterInput]="isFocused && !touchEnabled"
|
|
1538
|
+
[dir]="direction"
|
|
1539
|
+
[(ngModel)]="filterText"
|
|
1540
|
+
class="k-input-inner"
|
|
1541
|
+
(keydown)="keydown($event)"
|
|
1542
|
+
(input)="handleFilter($event)"
|
|
1543
|
+
(focus)="onFilterFocus()"
|
|
1544
|
+
(blur)="blurFilterInput()" />
|
|
1545
|
+
</span>
|
|
1546
|
+
</div>
|
|
1384
1547
|
</ng-template>
|
|
1385
|
-
|
|
1548
|
+
<!--default item-->
|
|
1549
|
+
<ng-template [ngIf]="defaultItem && !itemTemplate">
|
|
1550
|
+
<div
|
|
1551
|
+
class="k-list"
|
|
1552
|
+
[ngClass]="optionLabelSizeClass"
|
|
1553
|
+
>
|
|
1554
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
1555
|
+
{{ getDefaultItemText() }}
|
|
1556
|
+
</div>
|
|
1557
|
+
</div>
|
|
1558
|
+
</ng-template>
|
|
1559
|
+
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
1560
|
+
<div
|
|
1561
|
+
class="k-list"
|
|
1562
|
+
[ngClass]="optionLabelSizeClass"
|
|
1563
|
+
>
|
|
1564
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
1565
|
+
<ng-template
|
|
1566
|
+
[templateContext]="{
|
|
1567
|
+
templateRef: itemTemplate.templateRef,
|
|
1568
|
+
$implicit: defaultItem
|
|
1569
|
+
}">
|
|
1570
|
+
</ng-template>
|
|
1571
|
+
</div>
|
|
1572
|
+
</div>
|
|
1573
|
+
</ng-template>
|
|
1574
|
+
<!--header template-->
|
|
1575
|
+
<ng-template *ngIf="headerTemplate"
|
|
1576
|
+
[templateContext]="{
|
|
1577
|
+
templateRef: headerTemplate.templateRef
|
|
1578
|
+
}">
|
|
1579
|
+
</ng-template>
|
|
1580
|
+
<!--list-->
|
|
1581
|
+
<kendo-list
|
|
1582
|
+
#optionsList
|
|
1583
|
+
[size]="size"
|
|
1584
|
+
[rounded]="rounded"
|
|
1585
|
+
[id]="listBoxId"
|
|
1586
|
+
[optionPrefix]="optionPrefix"
|
|
1587
|
+
[data]="data"
|
|
1588
|
+
[textField]="textField"
|
|
1589
|
+
[valueField]="valueField"
|
|
1590
|
+
[template]="itemTemplate"
|
|
1591
|
+
[groupTemplate]="groupTemplate"
|
|
1592
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
1593
|
+
[height]="listHeight"
|
|
1594
|
+
[show]="isOpen"
|
|
1595
|
+
[virtual]="virtual"
|
|
1596
|
+
(pageChange)="pageChange($event)"
|
|
1597
|
+
>
|
|
1598
|
+
</kendo-list>
|
|
1599
|
+
<!--no-data template-->
|
|
1600
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
1601
|
+
<ng-template [ngIf]="noDataTemplate"
|
|
1602
|
+
[templateContext]="{
|
|
1603
|
+
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
1604
|
+
}">
|
|
1605
|
+
</ng-template>
|
|
1606
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
1607
|
+
<div>{{ noDataText }}</div>
|
|
1608
|
+
</ng-template>
|
|
1609
|
+
</div>
|
|
1610
|
+
<!--footer template-->
|
|
1611
|
+
<ng-template *ngIf="footerTemplate"
|
|
1612
|
+
[templateContext]="{
|
|
1613
|
+
templateRef: footerTemplate.templateRef
|
|
1614
|
+
}">
|
|
1615
|
+
</ng-template>
|
|
1616
|
+
</ng-template>
|
|
1386
1617
|
<ng-template [ngIf]="isOpen">
|
|
1387
1618
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1388
1619
|
</ng-template>
|
|
@@ -1390,7 +1621,8 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
|
1390
1621
|
`
|
|
1391
1622
|
}),
|
|
1392
1623
|
tslib_1.__param(10, Optional()), tslib_1.__param(10, Inject(TOUCH_ENABLED)),
|
|
1393
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1624
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
1625
|
+
LocalizationService,
|
|
1394
1626
|
PopupService,
|
|
1395
1627
|
SelectionService,
|
|
1396
1628
|
NavigationService,
|
|
@@ -1398,7 +1630,6 @@ DropDownListComponent = DropDownListComponent_1 = tslib_1.__decorate([
|
|
|
1398
1630
|
DataService,
|
|
1399
1631
|
NgZone,
|
|
1400
1632
|
Renderer2,
|
|
1401
|
-
ElementRef,
|
|
1402
1633
|
ChangeDetectorRef, Boolean])
|
|
1403
1634
|
], DropDownListComponent);
|
|
1404
1635
|
export { DropDownListComponent };
|