@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
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Inject, Input, isDevMode, NgZone, Optional, Output, Renderer2, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
6
|
+
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, HostListener, Inject, Input, isDevMode, NgZone, Optional, Output, Renderer2, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { anyChanged, guid, hasObservers, Keys, KendoInput } from '@progress/kendo-angular-common';
|
|
8
|
+
import { anyChanged, guid, hasObservers, Keys, KendoInput, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
9
9
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { NavigationService } from '../common/navigation/navigation.service';
|
|
11
11
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
@@ -15,7 +15,7 @@ import { DisabledItemsService } from '../common/disabled-items/disabled-items.se
|
|
|
15
15
|
import { SelectionService } from '../common/selection/selection.service';
|
|
16
16
|
import { PreventableEvent } from '../common/models/preventable-event';
|
|
17
17
|
import { NavigationAction } from '../common/navigation/navigation-action';
|
|
18
|
-
import { hasProps, isArray, isObject, isObjectArray, isPresent, isUntouched, noop, parseNumber, valueFrom } from '../common/util';
|
|
18
|
+
import { getFillModeClass, getRoundedClass, getSizeClass, hasProps, isArray, isObject, isObjectArray, isPresent, isUntouched, noop, parseNumber, valueFrom } from '../common/util';
|
|
19
19
|
import { RemoveTagEvent } from '../common/models/remove-tag-event';
|
|
20
20
|
import { MultiSelectTreeMessages } from '../common/constants/error-messages';
|
|
21
21
|
import { HeaderTemplateDirective } from '../common/templates/header-template.directive';
|
|
@@ -42,16 +42,18 @@ var ɵ3 = isNodeVisible;
|
|
|
42
42
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
43
43
|
*/
|
|
44
44
|
var MultiSelectTreeComponent = /** @class */ (function () {
|
|
45
|
-
function MultiSelectTreeComponent(popupService, renderer,
|
|
45
|
+
function MultiSelectTreeComponent(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled) {
|
|
46
|
+
this.wrapper = wrapper;
|
|
46
47
|
this.popupService = popupService;
|
|
47
48
|
this.renderer = renderer;
|
|
48
|
-
this.hostElement = hostElement;
|
|
49
49
|
this.navigationService = navigationService;
|
|
50
50
|
this._zone = _zone;
|
|
51
51
|
this.localization = localization;
|
|
52
52
|
this.cdr = cdr;
|
|
53
53
|
this.touchEnabled = touchEnabled;
|
|
54
54
|
this.hostClasses = true;
|
|
55
|
+
this.role = 'listbox';
|
|
56
|
+
this.ariaHasPopup = 'tree';
|
|
55
57
|
/**
|
|
56
58
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
57
59
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -214,14 +216,93 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
214
216
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
215
217
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
216
218
|
this._isFocused = false;
|
|
219
|
+
this._size = 'medium';
|
|
220
|
+
this._rounded = 'medium';
|
|
221
|
+
this._fillMode = 'solid';
|
|
217
222
|
this.subscriptions = [];
|
|
218
223
|
this.lastAction = 'check';
|
|
219
224
|
this.onTouchedCallback = noop;
|
|
220
225
|
this.onChangeCallback = noop;
|
|
221
226
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
222
227
|
this.subscribeEvents();
|
|
228
|
+
this.subscribeFocusEvents();
|
|
223
229
|
}
|
|
224
230
|
MultiSelectTreeComponent_1 = MultiSelectTreeComponent;
|
|
231
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isDisabled", {
|
|
232
|
+
get: function () {
|
|
233
|
+
return this.disabled;
|
|
234
|
+
},
|
|
235
|
+
enumerable: true,
|
|
236
|
+
configurable: true
|
|
237
|
+
});
|
|
238
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isLoading", {
|
|
239
|
+
get: function () {
|
|
240
|
+
return this.loading;
|
|
241
|
+
},
|
|
242
|
+
enumerable: true,
|
|
243
|
+
configurable: true
|
|
244
|
+
});
|
|
245
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "id", {
|
|
246
|
+
get: function () {
|
|
247
|
+
return this.focusableId;
|
|
248
|
+
},
|
|
249
|
+
enumerable: true,
|
|
250
|
+
configurable: true
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "hostTabIndex", {
|
|
253
|
+
get: function () {
|
|
254
|
+
return this.tabindex;
|
|
255
|
+
},
|
|
256
|
+
enumerable: true,
|
|
257
|
+
configurable: true
|
|
258
|
+
});
|
|
259
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isReadonly", {
|
|
260
|
+
get: function () {
|
|
261
|
+
return this.readonly;
|
|
262
|
+
},
|
|
263
|
+
enumerable: true,
|
|
264
|
+
configurable: true
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaDescribedBy", {
|
|
267
|
+
get: function () {
|
|
268
|
+
return this.tagListId;
|
|
269
|
+
},
|
|
270
|
+
enumerable: true,
|
|
271
|
+
configurable: true
|
|
272
|
+
});
|
|
273
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaActiveDescendant", {
|
|
274
|
+
get: function () {
|
|
275
|
+
return this.focusedTagId;
|
|
276
|
+
},
|
|
277
|
+
enumerable: true,
|
|
278
|
+
configurable: true
|
|
279
|
+
});
|
|
280
|
+
/**
|
|
281
|
+
* @hidden
|
|
282
|
+
*/
|
|
283
|
+
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
284
|
+
this.togglePopup(!this.isOpen);
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* @hidden
|
|
288
|
+
*/
|
|
289
|
+
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
290
|
+
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
291
|
+
if (deleteTag) {
|
|
292
|
+
this.handleBackspace();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (this.disabled || this.readonly) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
var eventData = event;
|
|
299
|
+
var action = this.navigationService.process({
|
|
300
|
+
originalEvent: eventData
|
|
301
|
+
});
|
|
302
|
+
if (action === NavigationAction.Open) {
|
|
303
|
+
eventData.preventDefault();
|
|
304
|
+
}
|
|
305
|
+
};
|
|
225
306
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "treeview", {
|
|
226
307
|
get: function () {
|
|
227
308
|
return this._treeview;
|
|
@@ -262,6 +343,79 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
262
343
|
enumerable: true,
|
|
263
344
|
configurable: true
|
|
264
345
|
});
|
|
346
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "size", {
|
|
347
|
+
get: function () {
|
|
348
|
+
return this._size;
|
|
349
|
+
},
|
|
350
|
+
/**
|
|
351
|
+
* Sets the size of the component.
|
|
352
|
+
*
|
|
353
|
+
* The possible values are:
|
|
354
|
+
* * `'small'`
|
|
355
|
+
* * `'medium'` (default)
|
|
356
|
+
* * `'large'`
|
|
357
|
+
* * `null`
|
|
358
|
+
*
|
|
359
|
+
*/
|
|
360
|
+
set: function (size) {
|
|
361
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
362
|
+
if (size) {
|
|
363
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
364
|
+
}
|
|
365
|
+
this._size = size;
|
|
366
|
+
},
|
|
367
|
+
enumerable: true,
|
|
368
|
+
configurable: true
|
|
369
|
+
});
|
|
370
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "rounded", {
|
|
371
|
+
get: function () {
|
|
372
|
+
return this._rounded;
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* Sets the border radius of the component.
|
|
376
|
+
*
|
|
377
|
+
* The possible values are:
|
|
378
|
+
* * `'small'`
|
|
379
|
+
* * `'medium'` (default)
|
|
380
|
+
* * `'large'`
|
|
381
|
+
* * `'full'`
|
|
382
|
+
* * `null`
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
set: function (rounded) {
|
|
386
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
387
|
+
if (rounded) {
|
|
388
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
389
|
+
}
|
|
390
|
+
this._rounded = rounded;
|
|
391
|
+
},
|
|
392
|
+
enumerable: true,
|
|
393
|
+
configurable: true
|
|
394
|
+
});
|
|
395
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "fillMode", {
|
|
396
|
+
get: function () {
|
|
397
|
+
return this._fillMode;
|
|
398
|
+
},
|
|
399
|
+
/**
|
|
400
|
+
* Sets the fillMode of the component.
|
|
401
|
+
*
|
|
402
|
+
* The possible values are:
|
|
403
|
+
* * `'flat'`
|
|
404
|
+
* * `'solid'` (default)
|
|
405
|
+
* * `'outline'`
|
|
406
|
+
* * `null`
|
|
407
|
+
*
|
|
408
|
+
*/
|
|
409
|
+
set: function (fillMode) {
|
|
410
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
411
|
+
if (fillMode) {
|
|
412
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
413
|
+
}
|
|
414
|
+
this._fillMode = fillMode;
|
|
415
|
+
},
|
|
416
|
+
enumerable: true,
|
|
417
|
+
configurable: true
|
|
418
|
+
});
|
|
265
419
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupSettings", {
|
|
266
420
|
get: function () {
|
|
267
421
|
return this._popupSettings;
|
|
@@ -381,7 +535,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
381
535
|
return this._isFocused;
|
|
382
536
|
},
|
|
383
537
|
set: function (isFocused) {
|
|
384
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
538
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
385
539
|
this._isFocused = isFocused;
|
|
386
540
|
},
|
|
387
541
|
enumerable: true,
|
|
@@ -432,7 +586,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
432
586
|
* @hidden
|
|
433
587
|
*/
|
|
434
588
|
get: function () {
|
|
435
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
589
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
436
590
|
if (this.popupSettings.popupClass) {
|
|
437
591
|
containerClasses.push(this.popupSettings.popupClass);
|
|
438
592
|
}
|
|
@@ -568,7 +722,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
568
722
|
});
|
|
569
723
|
MultiSelectTreeComponent.prototype.ngOnInit = function () {
|
|
570
724
|
var _this = this;
|
|
571
|
-
this.renderer.removeAttribute(this.
|
|
725
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
572
726
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
573
727
|
this.subscriptions.push(this.localization
|
|
574
728
|
.changes.subscribe(function (_a) {
|
|
@@ -576,6 +730,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
576
730
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
577
731
|
_this.cdr.markForCheck();
|
|
578
732
|
}));
|
|
733
|
+
this.setComponentClasses();
|
|
579
734
|
};
|
|
580
735
|
/**
|
|
581
736
|
* @hidden
|
|
@@ -681,8 +836,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
681
836
|
/**
|
|
682
837
|
* @hidden
|
|
683
838
|
*/
|
|
684
|
-
MultiSelectTreeComponent.prototype.handleFocus = function () {
|
|
839
|
+
MultiSelectTreeComponent.prototype.handleFocus = function (event) {
|
|
685
840
|
var _this = this;
|
|
841
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
event.stopImmediatePropagation();
|
|
686
845
|
if (!this.isFocused) {
|
|
687
846
|
this.isFocused = true;
|
|
688
847
|
if (hasObservers(this.onFocus)) {
|
|
@@ -692,7 +851,9 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
692
851
|
}
|
|
693
852
|
// Re-focus the treeview if `close` is prevented
|
|
694
853
|
if (this.isOpen && this.treeview) {
|
|
695
|
-
this.lastNodeOnFocus
|
|
854
|
+
if (this.lastNodeOnFocus) {
|
|
855
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
856
|
+
}
|
|
696
857
|
this.treeview.focus();
|
|
697
858
|
}
|
|
698
859
|
}
|
|
@@ -703,46 +864,20 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
703
864
|
MultiSelectTreeComponent.prototype.handleBlur = function (e) {
|
|
704
865
|
var _this = this;
|
|
705
866
|
var relatedTarget = e && e.relatedTarget;
|
|
706
|
-
if (this.
|
|
867
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
707
868
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
708
869
|
return;
|
|
709
870
|
}
|
|
710
871
|
this.isFocused = false;
|
|
711
872
|
this.togglePopup(false);
|
|
712
873
|
if (hasObservers(this.onBlur) ||
|
|
713
|
-
isUntouched(this.
|
|
874
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
714
875
|
this._zone.run(function () {
|
|
715
876
|
_this.onBlur.emit();
|
|
716
877
|
_this.onTouchedCallback();
|
|
717
878
|
});
|
|
718
879
|
}
|
|
719
880
|
};
|
|
720
|
-
/**
|
|
721
|
-
* @hidden
|
|
722
|
-
*/
|
|
723
|
-
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
724
|
-
this.togglePopup(!this.isOpen);
|
|
725
|
-
};
|
|
726
|
-
/**
|
|
727
|
-
* @hidden
|
|
728
|
-
*/
|
|
729
|
-
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
730
|
-
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
731
|
-
if (deleteTag) {
|
|
732
|
-
this.handleBackspace();
|
|
733
|
-
return;
|
|
734
|
-
}
|
|
735
|
-
if (this.disabled || this.readonly) {
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
var eventData = event;
|
|
739
|
-
var action = this.navigationService.process({
|
|
740
|
-
originalEvent: eventData
|
|
741
|
-
});
|
|
742
|
-
if (action === NavigationAction.Open) {
|
|
743
|
-
eventData.preventDefault();
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
881
|
/**
|
|
747
882
|
* @hidden
|
|
748
883
|
*/
|
|
@@ -882,6 +1017,26 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
882
1017
|
this.filterChange.next(term);
|
|
883
1018
|
this.allNodesHidden = this.nodes.every(function (node, index) { return !_this.isVisible(node, String(index)); });
|
|
884
1019
|
};
|
|
1020
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "filterInputClasses", {
|
|
1021
|
+
/**
|
|
1022
|
+
* @hidden
|
|
1023
|
+
*/
|
|
1024
|
+
get: function () {
|
|
1025
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
1026
|
+
},
|
|
1027
|
+
enumerable: true,
|
|
1028
|
+
configurable: true
|
|
1029
|
+
});
|
|
1030
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkAllCheckboxClasses", {
|
|
1031
|
+
/**
|
|
1032
|
+
* @hidden
|
|
1033
|
+
*/
|
|
1034
|
+
get: function () {
|
|
1035
|
+
return "" + (this.size ? getSizeClass('checkbox', this.size) : '');
|
|
1036
|
+
},
|
|
1037
|
+
enumerable: true,
|
|
1038
|
+
configurable: true
|
|
1039
|
+
});
|
|
885
1040
|
/**
|
|
886
1041
|
* @hidden
|
|
887
1042
|
*/
|
|
@@ -997,6 +1152,32 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
997
1152
|
.pipe(filter(function () { return !_this.isTreeViewActive; }))
|
|
998
1153
|
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(filter(function () { return !_this.isOpen; })).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(filter(function () { return !_this.isOpen; })).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(filter(function () { return _this.isTagFocused; })).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(filter(function () { return _this.isTagFocused; })).subscribe(this.handleDelete.bind(this)));
|
|
999
1154
|
};
|
|
1155
|
+
MultiSelectTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
1156
|
+
var _this = this;
|
|
1157
|
+
if (isDocumentAvailable()) {
|
|
1158
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
1159
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
1160
|
+
this._zone.runOutsideAngular(function () {
|
|
1161
|
+
var useCapture = true;
|
|
1162
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
1163
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
MultiSelectTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
1168
|
+
if (isDocumentAvailable()) {
|
|
1169
|
+
var useCapture = true;
|
|
1170
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
1171
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
MultiSelectTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
1175
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
event.stopImmediatePropagation();
|
|
1179
|
+
this.handleBlur(event);
|
|
1180
|
+
};
|
|
1000
1181
|
MultiSelectTreeComponent.prototype.handleTabKey = function () {
|
|
1001
1182
|
this.focus();
|
|
1002
1183
|
if (this.isOpen) {
|
|
@@ -1099,6 +1280,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1099
1280
|
};
|
|
1100
1281
|
MultiSelectTreeComponent.prototype.unsubscribeEvents = function () {
|
|
1101
1282
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
1283
|
+
this.unSubscribeFocusEvents();
|
|
1102
1284
|
};
|
|
1103
1285
|
/**
|
|
1104
1286
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -1148,16 +1330,84 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1148
1330
|
return indices;
|
|
1149
1331
|
}, []));
|
|
1150
1332
|
};
|
|
1333
|
+
MultiSelectTreeComponent.prototype.setComponentClasses = function () {
|
|
1334
|
+
if (this.size) {
|
|
1335
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1336
|
+
}
|
|
1337
|
+
if (this.rounded) {
|
|
1338
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1339
|
+
}
|
|
1340
|
+
if (this.fillMode) {
|
|
1341
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1342
|
+
}
|
|
1343
|
+
};
|
|
1151
1344
|
var MultiSelectTreeComponent_1;
|
|
1152
1345
|
tslib_1.__decorate([
|
|
1153
|
-
HostBinding('class.k-widget'),
|
|
1154
1346
|
HostBinding('class.k-dropdowntree'),
|
|
1347
|
+
HostBinding('class.k-input'),
|
|
1155
1348
|
tslib_1.__metadata("design:type", Boolean)
|
|
1156
1349
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
1350
|
+
tslib_1.__decorate([
|
|
1351
|
+
HostBinding('class.k-disabled'),
|
|
1352
|
+
HostBinding('attr.aria-disabled'),
|
|
1353
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1354
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1355
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
1356
|
+
tslib_1.__decorate([
|
|
1357
|
+
HostBinding('class.k-loading'),
|
|
1358
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1359
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1360
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
1361
|
+
tslib_1.__decorate([
|
|
1362
|
+
HostBinding('attr.id'),
|
|
1363
|
+
tslib_1.__metadata("design:type", String),
|
|
1364
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1365
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
1157
1366
|
tslib_1.__decorate([
|
|
1158
1367
|
HostBinding('attr.dir'),
|
|
1159
1368
|
tslib_1.__metadata("design:type", String)
|
|
1160
1369
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
1370
|
+
tslib_1.__decorate([
|
|
1371
|
+
HostBinding('attr.tabindex'),
|
|
1372
|
+
tslib_1.__metadata("design:type", Number),
|
|
1373
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1374
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
1375
|
+
tslib_1.__decorate([
|
|
1376
|
+
HostBinding('attr.role'),
|
|
1377
|
+
tslib_1.__metadata("design:type", String)
|
|
1378
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
1379
|
+
tslib_1.__decorate([
|
|
1380
|
+
HostBinding('attr.aria-haspopup'),
|
|
1381
|
+
tslib_1.__metadata("design:type", String)
|
|
1382
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
1383
|
+
tslib_1.__decorate([
|
|
1384
|
+
HostBinding('attr.readonly'),
|
|
1385
|
+
HostBinding('attr.aria-readonly'),
|
|
1386
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1387
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1388
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
1389
|
+
tslib_1.__decorate([
|
|
1390
|
+
HostBinding('attr.aria-describedby'),
|
|
1391
|
+
tslib_1.__metadata("design:type", String),
|
|
1392
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1393
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
1394
|
+
tslib_1.__decorate([
|
|
1395
|
+
HostBinding('attr.aria-activedescendant'),
|
|
1396
|
+
tslib_1.__metadata("design:type", String),
|
|
1397
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1398
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
1399
|
+
tslib_1.__decorate([
|
|
1400
|
+
HostListener('click'),
|
|
1401
|
+
tslib_1.__metadata("design:type", Function),
|
|
1402
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
1403
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1404
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
1405
|
+
tslib_1.__decorate([
|
|
1406
|
+
HostListener('keydown', ['$event']),
|
|
1407
|
+
tslib_1.__metadata("design:type", Function),
|
|
1408
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1409
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1410
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
1161
1411
|
tslib_1.__decorate([
|
|
1162
1412
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
1163
1413
|
tslib_1.__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -1186,10 +1436,6 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1186
1436
|
ViewChild('popupTemplate', { static: true }),
|
|
1187
1437
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
1188
1438
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
1189
|
-
tslib_1.__decorate([
|
|
1190
|
-
ViewChild('wrapper', { static: true }),
|
|
1191
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
1192
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
1193
1439
|
tslib_1.__decorate([
|
|
1194
1440
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
1195
1441
|
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
@@ -1212,6 +1458,21 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1212
1458
|
tslib_1.__metadata("design:type", Number),
|
|
1213
1459
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1214
1460
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
1461
|
+
tslib_1.__decorate([
|
|
1462
|
+
Input(),
|
|
1463
|
+
tslib_1.__metadata("design:type", String),
|
|
1464
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1465
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
1466
|
+
tslib_1.__decorate([
|
|
1467
|
+
Input(),
|
|
1468
|
+
tslib_1.__metadata("design:type", String),
|
|
1469
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1470
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
1471
|
+
tslib_1.__decorate([
|
|
1472
|
+
Input(),
|
|
1473
|
+
tslib_1.__metadata("design:type", String),
|
|
1474
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1475
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
1215
1476
|
tslib_1.__decorate([
|
|
1216
1477
|
Input(),
|
|
1217
1478
|
tslib_1.__metadata("design:type", Object),
|
|
@@ -1393,12 +1654,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1393
1654
|
}
|
|
1394
1655
|
],
|
|
1395
1656
|
selector: 'kendo-multiselecttree',
|
|
1396
|
-
template: "\n <ng-container kendoMultiSelectTreeLocalizedMessages\n i18n-noDataText=\"kendo.multiselecttree.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.multiselecttree.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n\n i18n-checkAllText=\"kendo.multiselecttree.checkAllText|The text displayed for the check-all checkbox\"\n checkAllText=\"Check all\"\n >\n </ng-container>\n <
|
|
1657
|
+
template: "\n <ng-container kendoMultiSelectTreeLocalizedMessages\n i18n-noDataText=\"kendo.multiselecttree.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.multiselecttree.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n\n i18n-checkAllText=\"kendo.multiselecttree.checkAllText|The text displayed for the check-all checkbox\"\n checkAllText=\"Check all\"\n >\n </ng-container>\n <kendo-taglist\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [id]=\"tagListId\"\n [tags]=\"tags\"\n [focused]=\"focusedTagIndex\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [valueDepth]=\"valueDepth\"\n [disabled]=\"disabled\"\n [tagPrefix]=\"tagPrefix\"\n [template]=\"tagTemplate\"\n [groupTemplate]=\"groupTagTemplate\"\n [disabledIndices]=\"disabledIndices\"\n (removeTag)=\"handleRemoveTag($event)\"\n >\n <span *ngIf=\"!tags || !tags.length\"\n class=\"k-input-inner k-readonly\"\n >\n <span class=\"k-input-value-text\">{{ placeholder }}</span>\n </span>\n </kendo-taglist>\n <span\n *ngIf=\"!disabled && !loading && !readonly && clearButton && tags?.length\"\n class=\"k-clear-value\"\n [attr.title]=\"messageFor('clearTitle')\"\n role=\"button\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <span\n *ngIf=\"loading\"\n class=\"k-icon k-i-loading\"\n >\n </span>\n <ng-template #popupTemplate>\n <span\n *ngIf=\"filterable\"\n class=\"k-list-filter\"\n >\n <span\n class=\"k-textbox k-input\"\n [ngClass]=\"filterInputClasses\"\n >\n <span class=\"k-input-prefix\">\n <span class=\"k-input-icon k-icon k-i-search\"></span>\n </span>\n <input\n #filterInput\n (input)=\"handleFilterInputChange($event.target.value)\"\n [filterInput]=\"filterable && !touchEnabled\"\n (keydown)=\"handleKeydown($event)\"\n [(ngModel)]=\"filter\"\n class=\"k-input-inner\"\n role=\"textbox\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n tabindex=\"0\"\n aria-disabled=\"false\"\n aria-readonly=\"false\"\n [kendoEventsOutsideAngular]=\"{\n blur: handleBlur\n }\"\n [scope]=\"this\"\n >\n </span>\n </span>\n <!--header template-->\n <ng-template\n *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate?.templateRef\n }\">\n </ng-template>\n <div *ngIf=\"checkAll\" class=\"k-check-all\">\n <input\n #checkAllInput\n [checkAll]=\"!filterable && !touchEnabled\"\n type=\"checkbox\"\n class=\"k-checkbox\"\n [ngClass]=\"checkAllCheckboxClasses\"\n role=\"checkbox\"\n tabindex=\"0\"\n aria-disabled=\"false\"\n aria-readonly=\"false\"\n [treeview]=\"treeview\"\n [checkedItems]=\"checkedItems\"\n [valueField]=\"valueField\"\n [lastAction]=\"lastAction\"\n (checkedItemsChange)=\"handleCheckedItemsChange($event)\"\n (keydown)=\"handleKeydown($event)\"\n [kendoEventsOutsideAngular]=\"{\n blur: handleBlur\n }\"\n [scope]=\"this\"\n >\n <span\n class=\"k-checkbox-label\"\n (click)=\"toggleCheckAll()\"\n (mousedown)=\"$event.preventDefault()\"\n >\n {{ messageFor('checkAllText') }}\n </span>\n </div>\n <kendo-treeview\n #treeview\n [size]=\"size\"\n [nodes]=\"data\"\n [style.maxHeight.px]=\"listHeight\"\n [animate]=\"false\"\n kendoMultiSelectTreeCheckable\n [checkable]=\"checkableSettings\"\n [checkedItems]=\"checkedItems\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isExpanded]=\"isNodeExpanded\"\n [isDisabled]=\"itemDisabled\"\n [nodeTemplate]=\"nodeTemplate\"\n [loadOnDemand]=\"loadOnDemand\"\n [filter]=\"filter\"\n [isVisible]=\"isNodeVisible\"\n (keydown)=\"handleKeydown($event)\"\n (nodeClick)=\"handleNodeClick($event)\"\n (expand)=\"nodeExpand.emit($event)\"\n (collapse)=\"nodeCollapse.emit($event)\"\n (checkedItemsChange)=\"handleCheckedItemsChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n </kendo-treeview>\n <!--footer template-->\n <ng-template\n *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate?.templateRef\n }\">\n </ng-template>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data?.length === 0 || allNodesHidden\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate?.templateRef\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ messageFor('noDataText') }}</div>\n </ng-template>\n </div>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
1397
1658
|
}),
|
|
1398
1659
|
tslib_1.__param(7, Optional()), tslib_1.__param(7, Inject(TOUCH_ENABLED)),
|
|
1399
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1660
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
1661
|
+
PopupService,
|
|
1400
1662
|
Renderer2,
|
|
1401
|
-
ElementRef,
|
|
1402
1663
|
NavigationService,
|
|
1403
1664
|
NgZone,
|
|
1404
1665
|
LocalizationService,
|