@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.
- 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 +335 -54
- 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 -37
- 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 +80 -17
- package/dist/es2015/dropdownlist/dropdownlist.component.js +391 -167
- 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 +1956 -837
- package/dist/fesm5/index.js +1558 -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 +333 -52
- 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
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
var MultiSelectTreeComponent_1;
|
|
7
|
-
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Inject, Input, isDevMode, NgZone, Optional, Output, Renderer2, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
7
|
+
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, HostListener, Inject, Input, isDevMode, NgZone, Optional, Output, Renderer2, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
8
8
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
-
import { anyChanged, guid, hasObservers, Keys, KendoInput } from '@progress/kendo-angular-common';
|
|
9
|
+
import { anyChanged, guid, hasObservers, Keys, KendoInput, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
10
10
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { NavigationService } from '../common/navigation/navigation.service';
|
|
12
12
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
@@ -16,7 +16,7 @@ import { DisabledItemsService } from '../common/disabled-items/disabled-items.se
|
|
|
16
16
|
import { SelectionService } from '../common/selection/selection.service';
|
|
17
17
|
import { PreventableEvent } from '../common/models/preventable-event';
|
|
18
18
|
import { NavigationAction } from '../common/navigation/navigation-action';
|
|
19
|
-
import { hasProps, isArray, isObject, isObjectArray, isPresent, isUntouched, noop, parseNumber, valueFrom } from '../common/util';
|
|
19
|
+
import { getFillModeClass, getRoundedClass, getSizeClass, hasProps, isArray, isObject, isObjectArray, isPresent, isUntouched, noop, parseNumber, valueFrom } from '../common/util';
|
|
20
20
|
import { RemoveTagEvent } from '../common/models/remove-tag-event';
|
|
21
21
|
import { MultiSelectTreeMessages } from '../common/constants/error-messages';
|
|
22
22
|
import { HeaderTemplateDirective } from '../common/templates/header-template.directive';
|
|
@@ -43,16 +43,18 @@ const ɵ3 = isNodeVisible;
|
|
|
43
43
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
44
44
|
*/
|
|
45
45
|
let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTreeComponent {
|
|
46
|
-
constructor(popupService, renderer,
|
|
46
|
+
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled) {
|
|
47
|
+
this.wrapper = wrapper;
|
|
47
48
|
this.popupService = popupService;
|
|
48
49
|
this.renderer = renderer;
|
|
49
|
-
this.hostElement = hostElement;
|
|
50
50
|
this.navigationService = navigationService;
|
|
51
51
|
this._zone = _zone;
|
|
52
52
|
this.localization = localization;
|
|
53
53
|
this.cdr = cdr;
|
|
54
54
|
this.touchEnabled = touchEnabled;
|
|
55
55
|
this.hostClasses = true;
|
|
56
|
+
this.role = 'listbox';
|
|
57
|
+
this.ariaHasPopup = 'tree';
|
|
56
58
|
/**
|
|
57
59
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
58
60
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -215,12 +217,63 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
215
217
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
216
218
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
217
219
|
this._isFocused = false;
|
|
220
|
+
this._size = 'medium';
|
|
221
|
+
this._rounded = 'medium';
|
|
222
|
+
this._fillMode = 'solid';
|
|
218
223
|
this.subscriptions = [];
|
|
219
224
|
this.lastAction = 'check';
|
|
220
225
|
this.onTouchedCallback = noop;
|
|
221
226
|
this.onChangeCallback = noop;
|
|
222
227
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
223
228
|
this.subscribeEvents();
|
|
229
|
+
this.subscribeFocusEvents();
|
|
230
|
+
}
|
|
231
|
+
get isDisabled() {
|
|
232
|
+
return this.disabled;
|
|
233
|
+
}
|
|
234
|
+
get isLoading() {
|
|
235
|
+
return this.loading;
|
|
236
|
+
}
|
|
237
|
+
get id() {
|
|
238
|
+
return this.focusableId;
|
|
239
|
+
}
|
|
240
|
+
get hostTabIndex() {
|
|
241
|
+
return this.tabindex;
|
|
242
|
+
}
|
|
243
|
+
get isReadonly() {
|
|
244
|
+
return this.readonly;
|
|
245
|
+
}
|
|
246
|
+
get ariaDescribedBy() {
|
|
247
|
+
return this.tagListId;
|
|
248
|
+
}
|
|
249
|
+
get ariaActiveDescendant() {
|
|
250
|
+
return this.focusedTagId;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* @hidden
|
|
254
|
+
*/
|
|
255
|
+
handleClick() {
|
|
256
|
+
this.togglePopup(!this.isOpen);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* @hidden
|
|
260
|
+
*/
|
|
261
|
+
handleKeydown(event) {
|
|
262
|
+
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
263
|
+
if (deleteTag) {
|
|
264
|
+
this.handleBackspace();
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (this.disabled || this.readonly) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const eventData = event;
|
|
271
|
+
const action = this.navigationService.process({
|
|
272
|
+
originalEvent: eventData
|
|
273
|
+
});
|
|
274
|
+
if (action === NavigationAction.Open) {
|
|
275
|
+
eventData.preventDefault();
|
|
276
|
+
}
|
|
224
277
|
}
|
|
225
278
|
set treeview(treeview) {
|
|
226
279
|
this._treeview = treeview;
|
|
@@ -253,6 +306,67 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
253
306
|
get tabindex() {
|
|
254
307
|
return this.disabled ? -1 : this._tabindex;
|
|
255
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Sets the size of the component.
|
|
311
|
+
*
|
|
312
|
+
* The possible values are:
|
|
313
|
+
* * `'small'`
|
|
314
|
+
* * `'medium'` (default)
|
|
315
|
+
* * `'large'`
|
|
316
|
+
* * `null`
|
|
317
|
+
*
|
|
318
|
+
*/
|
|
319
|
+
set size(size) {
|
|
320
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
321
|
+
if (size) {
|
|
322
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
323
|
+
}
|
|
324
|
+
this._size = size;
|
|
325
|
+
}
|
|
326
|
+
get size() {
|
|
327
|
+
return this._size;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Sets the border radius of the component.
|
|
331
|
+
*
|
|
332
|
+
* The possible values are:
|
|
333
|
+
* * `'small'`
|
|
334
|
+
* * `'medium'` (default)
|
|
335
|
+
* * `'large'`
|
|
336
|
+
* * `'full'`
|
|
337
|
+
* * `null`
|
|
338
|
+
*
|
|
339
|
+
*/
|
|
340
|
+
set rounded(rounded) {
|
|
341
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
342
|
+
if (rounded) {
|
|
343
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
344
|
+
}
|
|
345
|
+
this._rounded = rounded;
|
|
346
|
+
}
|
|
347
|
+
get rounded() {
|
|
348
|
+
return this._rounded;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Sets the fillMode of the component.
|
|
352
|
+
*
|
|
353
|
+
* The possible values are:
|
|
354
|
+
* * `'flat'`
|
|
355
|
+
* * `'solid'` (default)
|
|
356
|
+
* * `'outline'`
|
|
357
|
+
* * `null`
|
|
358
|
+
*
|
|
359
|
+
*/
|
|
360
|
+
set fillMode(fillMode) {
|
|
361
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
362
|
+
if (fillMode) {
|
|
363
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
364
|
+
}
|
|
365
|
+
this._fillMode = fillMode;
|
|
366
|
+
}
|
|
367
|
+
get fillMode() {
|
|
368
|
+
return this._fillMode;
|
|
369
|
+
}
|
|
256
370
|
/**
|
|
257
371
|
* Configures the popup of the MultiSelectTree.
|
|
258
372
|
*
|
|
@@ -342,7 +456,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
342
456
|
return `${this.tagPrefix}-${valueFrom({ dataItem }, this.valueField)}`;
|
|
343
457
|
}
|
|
344
458
|
set isFocused(isFocused) {
|
|
345
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
459
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
346
460
|
this._isFocused = isFocused;
|
|
347
461
|
}
|
|
348
462
|
get isFocused() {
|
|
@@ -376,7 +490,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
376
490
|
* @hidden
|
|
377
491
|
*/
|
|
378
492
|
get popupContainerClasses() {
|
|
379
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
493
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
380
494
|
if (this.popupSettings.popupClass) {
|
|
381
495
|
containerClasses.push(this.popupSettings.popupClass);
|
|
382
496
|
}
|
|
@@ -464,13 +578,14 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
464
578
|
return this.checkAllInput && document.activeElement === this.checkAllInput.nativeElement;
|
|
465
579
|
}
|
|
466
580
|
ngOnInit() {
|
|
467
|
-
this.renderer.removeAttribute(this.
|
|
581
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
468
582
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
469
583
|
this.subscriptions.push(this.localization
|
|
470
584
|
.changes.subscribe(({ rtl }) => {
|
|
471
585
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
472
586
|
this.cdr.markForCheck();
|
|
473
587
|
}));
|
|
588
|
+
this.setComponentClasses();
|
|
474
589
|
}
|
|
475
590
|
/**
|
|
476
591
|
* @hidden
|
|
@@ -574,7 +689,11 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
574
689
|
/**
|
|
575
690
|
* @hidden
|
|
576
691
|
*/
|
|
577
|
-
handleFocus() {
|
|
692
|
+
handleFocus(event) {
|
|
693
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
event.stopImmediatePropagation();
|
|
578
697
|
if (!this.isFocused) {
|
|
579
698
|
this.isFocused = true;
|
|
580
699
|
if (hasObservers(this.onFocus)) {
|
|
@@ -584,7 +703,9 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
584
703
|
}
|
|
585
704
|
// Re-focus the treeview if `close` is prevented
|
|
586
705
|
if (this.isOpen && this.treeview) {
|
|
587
|
-
this.lastNodeOnFocus
|
|
706
|
+
if (this.lastNodeOnFocus) {
|
|
707
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
708
|
+
}
|
|
588
709
|
this.treeview.focus();
|
|
589
710
|
}
|
|
590
711
|
}
|
|
@@ -594,46 +715,20 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
594
715
|
*/
|
|
595
716
|
handleBlur(e) {
|
|
596
717
|
const relatedTarget = e && e.relatedTarget;
|
|
597
|
-
if (this.
|
|
718
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
598
719
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
599
720
|
return;
|
|
600
721
|
}
|
|
601
722
|
this.isFocused = false;
|
|
602
723
|
this.togglePopup(false);
|
|
603
724
|
if (hasObservers(this.onBlur) ||
|
|
604
|
-
isUntouched(this.
|
|
725
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
605
726
|
this._zone.run(() => {
|
|
606
727
|
this.onBlur.emit();
|
|
607
728
|
this.onTouchedCallback();
|
|
608
729
|
});
|
|
609
730
|
}
|
|
610
731
|
}
|
|
611
|
-
/**
|
|
612
|
-
* @hidden
|
|
613
|
-
*/
|
|
614
|
-
handleClick() {
|
|
615
|
-
this.togglePopup(!this.isOpen);
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* @hidden
|
|
619
|
-
*/
|
|
620
|
-
handleKeydown(event) {
|
|
621
|
-
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
622
|
-
if (deleteTag) {
|
|
623
|
-
this.handleBackspace();
|
|
624
|
-
return;
|
|
625
|
-
}
|
|
626
|
-
if (this.disabled || this.readonly) {
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
const eventData = event;
|
|
630
|
-
const action = this.navigationService.process({
|
|
631
|
-
originalEvent: eventData
|
|
632
|
-
});
|
|
633
|
-
if (action === NavigationAction.Open) {
|
|
634
|
-
eventData.preventDefault();
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
732
|
/**
|
|
638
733
|
* @hidden
|
|
639
734
|
*/
|
|
@@ -768,6 +863,18 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
768
863
|
this.filterChange.next(term);
|
|
769
864
|
this.allNodesHidden = this.nodes.every((node, index) => !this.isVisible(node, String(index)));
|
|
770
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* @hidden
|
|
868
|
+
*/
|
|
869
|
+
get filterInputClasses() {
|
|
870
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* @hidden
|
|
874
|
+
*/
|
|
875
|
+
get checkAllCheckboxClasses() {
|
|
876
|
+
return `${this.size ? getSizeClass('checkbox', this.size) : ''}`;
|
|
877
|
+
}
|
|
771
878
|
/**
|
|
772
879
|
* @hidden
|
|
773
880
|
*/
|
|
@@ -880,6 +987,31 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
880
987
|
.pipe(filter(() => !this.isTreeViewActive))
|
|
881
988
|
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(filter(() => !this.isOpen)).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(filter(() => !this.isOpen)).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(filter(() => this.isTagFocused)).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(filter(() => this.isTagFocused)).subscribe(this.handleDelete.bind(this)));
|
|
882
989
|
}
|
|
990
|
+
subscribeFocusEvents() {
|
|
991
|
+
if (isDocumentAvailable()) {
|
|
992
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
993
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
994
|
+
this._zone.runOutsideAngular(() => {
|
|
995
|
+
const useCapture = true;
|
|
996
|
+
document.addEventListener('focus', this.handleFocus, useCapture);
|
|
997
|
+
document.addEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
unSubscribeFocusEvents() {
|
|
1002
|
+
if (isDocumentAvailable()) {
|
|
1003
|
+
const useCapture = true;
|
|
1004
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
1005
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
handleDocumentBlur(event) {
|
|
1009
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
1010
|
+
return;
|
|
1011
|
+
}
|
|
1012
|
+
event.stopImmediatePropagation();
|
|
1013
|
+
this.handleBlur(event);
|
|
1014
|
+
}
|
|
883
1015
|
handleTabKey() {
|
|
884
1016
|
this.focus();
|
|
885
1017
|
if (this.isOpen) {
|
|
@@ -982,6 +1114,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
982
1114
|
}
|
|
983
1115
|
unsubscribeEvents() {
|
|
984
1116
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
1117
|
+
this.unSubscribeFocusEvents();
|
|
985
1118
|
}
|
|
986
1119
|
/**
|
|
987
1120
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -1028,16 +1161,84 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
1028
1161
|
return indices;
|
|
1029
1162
|
}, []));
|
|
1030
1163
|
}
|
|
1164
|
+
setComponentClasses() {
|
|
1165
|
+
if (this.size) {
|
|
1166
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1167
|
+
}
|
|
1168
|
+
if (this.rounded) {
|
|
1169
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1170
|
+
}
|
|
1171
|
+
if (this.fillMode) {
|
|
1172
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1031
1175
|
};
|
|
1032
1176
|
tslib_1.__decorate([
|
|
1033
|
-
HostBinding('class.k-widget'),
|
|
1034
1177
|
HostBinding('class.k-dropdowntree'),
|
|
1178
|
+
HostBinding('class.k-input'),
|
|
1035
1179
|
tslib_1.__metadata("design:type", Boolean)
|
|
1036
1180
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
1181
|
+
tslib_1.__decorate([
|
|
1182
|
+
HostBinding('class.k-disabled'),
|
|
1183
|
+
HostBinding('attr.aria-disabled'),
|
|
1184
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1185
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1186
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
1187
|
+
tslib_1.__decorate([
|
|
1188
|
+
HostBinding('class.k-loading'),
|
|
1189
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1190
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1191
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
1192
|
+
tslib_1.__decorate([
|
|
1193
|
+
HostBinding('attr.id'),
|
|
1194
|
+
tslib_1.__metadata("design:type", String),
|
|
1195
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1196
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
1037
1197
|
tslib_1.__decorate([
|
|
1038
1198
|
HostBinding('attr.dir'),
|
|
1039
1199
|
tslib_1.__metadata("design:type", String)
|
|
1040
1200
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
1201
|
+
tslib_1.__decorate([
|
|
1202
|
+
HostBinding('attr.tabindex'),
|
|
1203
|
+
tslib_1.__metadata("design:type", Number),
|
|
1204
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1205
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
1206
|
+
tslib_1.__decorate([
|
|
1207
|
+
HostBinding('attr.role'),
|
|
1208
|
+
tslib_1.__metadata("design:type", String)
|
|
1209
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
1210
|
+
tslib_1.__decorate([
|
|
1211
|
+
HostBinding('attr.aria-haspopup'),
|
|
1212
|
+
tslib_1.__metadata("design:type", String)
|
|
1213
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
1214
|
+
tslib_1.__decorate([
|
|
1215
|
+
HostBinding('attr.readonly'),
|
|
1216
|
+
HostBinding('attr.aria-readonly'),
|
|
1217
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1218
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1219
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
1220
|
+
tslib_1.__decorate([
|
|
1221
|
+
HostBinding('attr.aria-describedby'),
|
|
1222
|
+
tslib_1.__metadata("design:type", String),
|
|
1223
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1224
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
1225
|
+
tslib_1.__decorate([
|
|
1226
|
+
HostBinding('attr.aria-activedescendant'),
|
|
1227
|
+
tslib_1.__metadata("design:type", String),
|
|
1228
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1229
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
1230
|
+
tslib_1.__decorate([
|
|
1231
|
+
HostListener('click'),
|
|
1232
|
+
tslib_1.__metadata("design:type", Function),
|
|
1233
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
1234
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1235
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
1236
|
+
tslib_1.__decorate([
|
|
1237
|
+
HostListener('keydown', ['$event']),
|
|
1238
|
+
tslib_1.__metadata("design:type", Function),
|
|
1239
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1240
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1241
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
1041
1242
|
tslib_1.__decorate([
|
|
1042
1243
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
1043
1244
|
tslib_1.__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -1066,10 +1267,6 @@ tslib_1.__decorate([
|
|
|
1066
1267
|
ViewChild('popupTemplate', { static: true }),
|
|
1067
1268
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
1068
1269
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
1069
|
-
tslib_1.__decorate([
|
|
1070
|
-
ViewChild('wrapper', { static: true }),
|
|
1071
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1072
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
1073
1270
|
tslib_1.__decorate([
|
|
1074
1271
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
1075
1272
|
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
@@ -1092,6 +1289,21 @@ tslib_1.__decorate([
|
|
|
1092
1289
|
tslib_1.__metadata("design:type", Number),
|
|
1093
1290
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1094
1291
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
1292
|
+
tslib_1.__decorate([
|
|
1293
|
+
Input(),
|
|
1294
|
+
tslib_1.__metadata("design:type", String),
|
|
1295
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1296
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
1297
|
+
tslib_1.__decorate([
|
|
1298
|
+
Input(),
|
|
1299
|
+
tslib_1.__metadata("design:type", String),
|
|
1300
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1301
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
1302
|
+
tslib_1.__decorate([
|
|
1303
|
+
Input(),
|
|
1304
|
+
tslib_1.__metadata("design:type", String),
|
|
1305
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1306
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
1095
1307
|
tslib_1.__decorate([
|
|
1096
1308
|
Input(),
|
|
1097
1309
|
tslib_1.__metadata("design:type", Object),
|
|
@@ -1285,87 +1497,75 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
|
1285
1497
|
checkAllText="Check all"
|
|
1286
1498
|
>
|
|
1287
1499
|
</ng-container>
|
|
1288
|
-
<
|
|
1289
|
-
[
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
[
|
|
1297
|
-
[
|
|
1298
|
-
[
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
|
|
1303
|
-
(
|
|
1304
|
-
[kendoEventsOutsideAngular]="{
|
|
1305
|
-
focus: handleFocus,
|
|
1306
|
-
blur: handleBlur
|
|
1307
|
-
}"
|
|
1308
|
-
[scope]="this"
|
|
1500
|
+
<kendo-taglist
|
|
1501
|
+
[size]="size"
|
|
1502
|
+
[rounded]="rounded"
|
|
1503
|
+
[fillMode]="fillMode"
|
|
1504
|
+
[id]="tagListId"
|
|
1505
|
+
[tags]="tags"
|
|
1506
|
+
[focused]="focusedTagIndex"
|
|
1507
|
+
[textField]="textField"
|
|
1508
|
+
[valueField]="valueField"
|
|
1509
|
+
[valueDepth]="valueDepth"
|
|
1510
|
+
[disabled]="disabled"
|
|
1511
|
+
[tagPrefix]="tagPrefix"
|
|
1512
|
+
[template]="tagTemplate"
|
|
1513
|
+
[groupTemplate]="groupTagTemplate"
|
|
1514
|
+
[disabledIndices]="disabledIndices"
|
|
1515
|
+
(removeTag)="handleRemoveTag($event)"
|
|
1309
1516
|
>
|
|
1310
|
-
<kendo-taglist
|
|
1311
|
-
[id]="tagListId"
|
|
1312
|
-
[tags]="tags"
|
|
1313
|
-
[focused]="focusedTagIndex"
|
|
1314
|
-
[textField]="textField"
|
|
1315
|
-
[valueField]="valueField"
|
|
1316
|
-
[valueDepth]="valueDepth"
|
|
1317
|
-
[disabled]="disabled"
|
|
1318
|
-
[tagPrefix]="tagPrefix"
|
|
1319
|
-
[template]="tagTemplate"
|
|
1320
|
-
[groupTemplate]="groupTagTemplate"
|
|
1321
|
-
[disabledIndices]="disabledIndices"
|
|
1322
|
-
(removeTag)="handleRemoveTag($event)"
|
|
1323
|
-
>
|
|
1324
|
-
</kendo-taglist>
|
|
1325
1517
|
<span *ngIf="!tags || !tags.length"
|
|
1326
|
-
class="k-input k-readonly"
|
|
1518
|
+
class="k-input-inner k-readonly"
|
|
1327
1519
|
>
|
|
1328
|
-
{{ placeholder }}
|
|
1520
|
+
<span class="k-input-value-text">{{ placeholder }}</span>
|
|
1329
1521
|
</span>
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
<span
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1522
|
+
</kendo-taglist>
|
|
1523
|
+
<span
|
|
1524
|
+
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
1525
|
+
class="k-clear-value"
|
|
1526
|
+
[attr.title]="messageFor('clearTitle')"
|
|
1527
|
+
role="button"
|
|
1528
|
+
tabindex="-1"
|
|
1529
|
+
(click)="clearAll($event)"
|
|
1530
|
+
>
|
|
1531
|
+
<span class="k-icon k-i-x"></span>
|
|
1532
|
+
</span>
|
|
1533
|
+
<span
|
|
1534
|
+
*ngIf="loading"
|
|
1535
|
+
class="k-icon k-i-loading"
|
|
1536
|
+
>
|
|
1537
|
+
</span>
|
|
1345
1538
|
<ng-template #popupTemplate>
|
|
1346
1539
|
<span
|
|
1347
1540
|
*ngIf="filterable"
|
|
1348
1541
|
class="k-list-filter"
|
|
1349
1542
|
>
|
|
1350
|
-
<
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
[filterInput]="filterable && !touchEnabled"
|
|
1354
|
-
(keydown)="handleKeydown($event)"
|
|
1355
|
-
[(ngModel)]="filter"
|
|
1356
|
-
class="k-textbox"
|
|
1357
|
-
role="textbox"
|
|
1358
|
-
aria-haspopup="true"
|
|
1359
|
-
aria-expanded="false"
|
|
1360
|
-
tabindex="0"
|
|
1361
|
-
aria-disabled="false"
|
|
1362
|
-
aria-readonly="false"
|
|
1363
|
-
[kendoEventsOutsideAngular]="{
|
|
1364
|
-
blur: handleBlur
|
|
1365
|
-
}"
|
|
1366
|
-
[scope]="this"
|
|
1543
|
+
<span
|
|
1544
|
+
class="k-textbox k-input"
|
|
1545
|
+
[ngClass]="filterInputClasses"
|
|
1367
1546
|
>
|
|
1368
|
-
|
|
1547
|
+
<span class="k-input-prefix">
|
|
1548
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
1549
|
+
</span>
|
|
1550
|
+
<input
|
|
1551
|
+
#filterInput
|
|
1552
|
+
(input)="handleFilterInputChange($event.target.value)"
|
|
1553
|
+
[filterInput]="filterable && !touchEnabled"
|
|
1554
|
+
(keydown)="handleKeydown($event)"
|
|
1555
|
+
[(ngModel)]="filter"
|
|
1556
|
+
class="k-input-inner"
|
|
1557
|
+
role="textbox"
|
|
1558
|
+
aria-haspopup="true"
|
|
1559
|
+
aria-expanded="false"
|
|
1560
|
+
tabindex="0"
|
|
1561
|
+
aria-disabled="false"
|
|
1562
|
+
aria-readonly="false"
|
|
1563
|
+
[kendoEventsOutsideAngular]="{
|
|
1564
|
+
blur: handleBlur
|
|
1565
|
+
}"
|
|
1566
|
+
[scope]="this"
|
|
1567
|
+
>
|
|
1568
|
+
</span>
|
|
1369
1569
|
</span>
|
|
1370
1570
|
<!--header template-->
|
|
1371
1571
|
<ng-template
|
|
@@ -1380,6 +1580,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
|
1380
1580
|
[checkAll]="!filterable && !touchEnabled"
|
|
1381
1581
|
type="checkbox"
|
|
1382
1582
|
class="k-checkbox"
|
|
1583
|
+
[ngClass]="checkAllCheckboxClasses"
|
|
1383
1584
|
role="checkbox"
|
|
1384
1585
|
tabindex="0"
|
|
1385
1586
|
aria-disabled="false"
|
|
@@ -1405,6 +1606,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
|
1405
1606
|
</div>
|
|
1406
1607
|
<kendo-treeview
|
|
1407
1608
|
#treeview
|
|
1609
|
+
[size]="size"
|
|
1408
1610
|
[nodes]="data"
|
|
1409
1611
|
[style.maxHeight.px]="listHeight"
|
|
1410
1612
|
[animate]="false"
|
|
@@ -1440,7 +1642,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
|
1440
1642
|
}">
|
|
1441
1643
|
</ng-template>
|
|
1442
1644
|
<!--no-data template-->
|
|
1443
|
-
<div class="k-
|
|
1645
|
+
<div class="k-no-data" *ngIf="data?.length === 0 || allNodesHidden">
|
|
1444
1646
|
<ng-template [ngIf]="noDataTemplate"
|
|
1445
1647
|
[templateContext]="{
|
|
1446
1648
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -1455,9 +1657,9 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = tslib_1.__decorate([
|
|
|
1455
1657
|
`
|
|
1456
1658
|
}),
|
|
1457
1659
|
tslib_1.__param(7, Optional()), tslib_1.__param(7, Inject(TOUCH_ENABLED)),
|
|
1458
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1660
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
1661
|
+
PopupService,
|
|
1459
1662
|
Renderer2,
|
|
1460
|
-
ElementRef,
|
|
1461
1663
|
NavigationService,
|
|
1462
1664
|
NgZone,
|
|
1463
1665
|
LocalizationService,
|