@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
|
@@ -48,16 +48,18 @@ exports.ɵ3 = ɵ3;
|
|
|
48
48
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
49
49
|
*/
|
|
50
50
|
var MultiSelectTreeComponent = /** @class */ (function () {
|
|
51
|
-
function MultiSelectTreeComponent(popupService, renderer,
|
|
51
|
+
function MultiSelectTreeComponent(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled) {
|
|
52
|
+
this.wrapper = wrapper;
|
|
52
53
|
this.popupService = popupService;
|
|
53
54
|
this.renderer = renderer;
|
|
54
|
-
this.hostElement = hostElement;
|
|
55
55
|
this.navigationService = navigationService;
|
|
56
56
|
this._zone = _zone;
|
|
57
57
|
this.localization = localization;
|
|
58
58
|
this.cdr = cdr;
|
|
59
59
|
this.touchEnabled = touchEnabled;
|
|
60
60
|
this.hostClasses = true;
|
|
61
|
+
this.role = 'listbox';
|
|
62
|
+
this.ariaHasPopup = 'tree';
|
|
61
63
|
/**
|
|
62
64
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
63
65
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -220,14 +222,93 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
220
222
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
221
223
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
222
224
|
this._isFocused = false;
|
|
225
|
+
this._size = 'medium';
|
|
226
|
+
this._rounded = 'medium';
|
|
227
|
+
this._fillMode = 'solid';
|
|
223
228
|
this.subscriptions = [];
|
|
224
229
|
this.lastAction = 'check';
|
|
225
230
|
this.onTouchedCallback = util_1.noop;
|
|
226
231
|
this.onChangeCallback = util_1.noop;
|
|
227
232
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
228
233
|
this.subscribeEvents();
|
|
234
|
+
this.subscribeFocusEvents();
|
|
229
235
|
}
|
|
230
236
|
MultiSelectTreeComponent_1 = MultiSelectTreeComponent;
|
|
237
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isDisabled", {
|
|
238
|
+
get: function () {
|
|
239
|
+
return this.disabled;
|
|
240
|
+
},
|
|
241
|
+
enumerable: true,
|
|
242
|
+
configurable: true
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isLoading", {
|
|
245
|
+
get: function () {
|
|
246
|
+
return this.loading;
|
|
247
|
+
},
|
|
248
|
+
enumerable: true,
|
|
249
|
+
configurable: true
|
|
250
|
+
});
|
|
251
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "id", {
|
|
252
|
+
get: function () {
|
|
253
|
+
return this.focusableId;
|
|
254
|
+
},
|
|
255
|
+
enumerable: true,
|
|
256
|
+
configurable: true
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "hostTabIndex", {
|
|
259
|
+
get: function () {
|
|
260
|
+
return this.tabindex;
|
|
261
|
+
},
|
|
262
|
+
enumerable: true,
|
|
263
|
+
configurable: true
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isReadonly", {
|
|
266
|
+
get: function () {
|
|
267
|
+
return this.readonly;
|
|
268
|
+
},
|
|
269
|
+
enumerable: true,
|
|
270
|
+
configurable: true
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaDescribedBy", {
|
|
273
|
+
get: function () {
|
|
274
|
+
return this.tagListId;
|
|
275
|
+
},
|
|
276
|
+
enumerable: true,
|
|
277
|
+
configurable: true
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaActiveDescendant", {
|
|
280
|
+
get: function () {
|
|
281
|
+
return this.focusedTagId;
|
|
282
|
+
},
|
|
283
|
+
enumerable: true,
|
|
284
|
+
configurable: true
|
|
285
|
+
});
|
|
286
|
+
/**
|
|
287
|
+
* @hidden
|
|
288
|
+
*/
|
|
289
|
+
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
290
|
+
this.togglePopup(!this.isOpen);
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* @hidden
|
|
294
|
+
*/
|
|
295
|
+
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
296
|
+
var deleteTag = this.isWrapperActive && event.keyCode === kendo_angular_common_1.Keys.Backspace && this.tags.length > 0;
|
|
297
|
+
if (deleteTag) {
|
|
298
|
+
this.handleBackspace();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (this.disabled || this.readonly) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
var eventData = event;
|
|
305
|
+
var action = this.navigationService.process({
|
|
306
|
+
originalEvent: eventData
|
|
307
|
+
});
|
|
308
|
+
if (action === navigation_action_1.NavigationAction.Open) {
|
|
309
|
+
eventData.preventDefault();
|
|
310
|
+
}
|
|
311
|
+
};
|
|
231
312
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "treeview", {
|
|
232
313
|
get: function () {
|
|
233
314
|
return this._treeview;
|
|
@@ -268,6 +349,79 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
268
349
|
enumerable: true,
|
|
269
350
|
configurable: true
|
|
270
351
|
});
|
|
352
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "size", {
|
|
353
|
+
get: function () {
|
|
354
|
+
return this._size;
|
|
355
|
+
},
|
|
356
|
+
/**
|
|
357
|
+
* Sets the size of the component.
|
|
358
|
+
*
|
|
359
|
+
* The possible values are:
|
|
360
|
+
* * `'small'`
|
|
361
|
+
* * `'medium'` (default)
|
|
362
|
+
* * `'large'`
|
|
363
|
+
* * `null`
|
|
364
|
+
*
|
|
365
|
+
*/
|
|
366
|
+
set: function (size) {
|
|
367
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
368
|
+
if (size) {
|
|
369
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', size));
|
|
370
|
+
}
|
|
371
|
+
this._size = size;
|
|
372
|
+
},
|
|
373
|
+
enumerable: true,
|
|
374
|
+
configurable: true
|
|
375
|
+
});
|
|
376
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "rounded", {
|
|
377
|
+
get: function () {
|
|
378
|
+
return this._rounded;
|
|
379
|
+
},
|
|
380
|
+
/**
|
|
381
|
+
* Sets the border radius of the component.
|
|
382
|
+
*
|
|
383
|
+
* The possible values are:
|
|
384
|
+
* * `'small'`
|
|
385
|
+
* * `'medium'` (default)
|
|
386
|
+
* * `'large'`
|
|
387
|
+
* * `'full'`
|
|
388
|
+
* * `null`
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
391
|
+
set: function (rounded) {
|
|
392
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
393
|
+
if (rounded) {
|
|
394
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
|
|
395
|
+
}
|
|
396
|
+
this._rounded = rounded;
|
|
397
|
+
},
|
|
398
|
+
enumerable: true,
|
|
399
|
+
configurable: true
|
|
400
|
+
});
|
|
401
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "fillMode", {
|
|
402
|
+
get: function () {
|
|
403
|
+
return this._fillMode;
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* Sets the fillMode of the component.
|
|
407
|
+
*
|
|
408
|
+
* The possible values are:
|
|
409
|
+
* * `'flat'`
|
|
410
|
+
* * `'solid'` (default)
|
|
411
|
+
* * `'outline'`
|
|
412
|
+
* * `null`
|
|
413
|
+
*
|
|
414
|
+
*/
|
|
415
|
+
set: function (fillMode) {
|
|
416
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
417
|
+
if (fillMode) {
|
|
418
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', fillMode));
|
|
419
|
+
}
|
|
420
|
+
this._fillMode = fillMode;
|
|
421
|
+
},
|
|
422
|
+
enumerable: true,
|
|
423
|
+
configurable: true
|
|
424
|
+
});
|
|
271
425
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupSettings", {
|
|
272
426
|
get: function () {
|
|
273
427
|
return this._popupSettings;
|
|
@@ -387,7 +541,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
387
541
|
return this._isFocused;
|
|
388
542
|
},
|
|
389
543
|
set: function (isFocused) {
|
|
390
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
544
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
391
545
|
this._isFocused = isFocused;
|
|
392
546
|
},
|
|
393
547
|
enumerable: true,
|
|
@@ -438,7 +592,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
438
592
|
* @hidden
|
|
439
593
|
*/
|
|
440
594
|
get: function () {
|
|
441
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
595
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
442
596
|
if (this.popupSettings.popupClass) {
|
|
443
597
|
containerClasses.push(this.popupSettings.popupClass);
|
|
444
598
|
}
|
|
@@ -574,7 +728,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
574
728
|
});
|
|
575
729
|
MultiSelectTreeComponent.prototype.ngOnInit = function () {
|
|
576
730
|
var _this = this;
|
|
577
|
-
this.renderer.removeAttribute(this.
|
|
731
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
578
732
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
579
733
|
this.subscriptions.push(this.localization
|
|
580
734
|
.changes.subscribe(function (_a) {
|
|
@@ -582,6 +736,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
582
736
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
583
737
|
_this.cdr.markForCheck();
|
|
584
738
|
}));
|
|
739
|
+
this.setComponentClasses();
|
|
585
740
|
};
|
|
586
741
|
/**
|
|
587
742
|
* @hidden
|
|
@@ -687,8 +842,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
687
842
|
/**
|
|
688
843
|
* @hidden
|
|
689
844
|
*/
|
|
690
|
-
MultiSelectTreeComponent.prototype.handleFocus = function () {
|
|
845
|
+
MultiSelectTreeComponent.prototype.handleFocus = function (event) {
|
|
691
846
|
var _this = this;
|
|
847
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
event.stopImmediatePropagation();
|
|
692
851
|
if (!this.isFocused) {
|
|
693
852
|
this.isFocused = true;
|
|
694
853
|
if (kendo_angular_common_1.hasObservers(this.onFocus)) {
|
|
@@ -698,7 +857,9 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
698
857
|
}
|
|
699
858
|
// Re-focus the treeview if `close` is prevented
|
|
700
859
|
if (this.isOpen && this.treeview) {
|
|
701
|
-
this.lastNodeOnFocus
|
|
860
|
+
if (this.lastNodeOnFocus) {
|
|
861
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
862
|
+
}
|
|
702
863
|
this.treeview.focus();
|
|
703
864
|
}
|
|
704
865
|
}
|
|
@@ -709,46 +870,20 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
709
870
|
MultiSelectTreeComponent.prototype.handleBlur = function (e) {
|
|
710
871
|
var _this = this;
|
|
711
872
|
var relatedTarget = e && e.relatedTarget;
|
|
712
|
-
if (this.
|
|
873
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
713
874
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
714
875
|
return;
|
|
715
876
|
}
|
|
716
877
|
this.isFocused = false;
|
|
717
878
|
this.togglePopup(false);
|
|
718
879
|
if (kendo_angular_common_1.hasObservers(this.onBlur) ||
|
|
719
|
-
util_1.isUntouched(this.
|
|
880
|
+
util_1.isUntouched(this.wrapper.nativeElement)) {
|
|
720
881
|
this._zone.run(function () {
|
|
721
882
|
_this.onBlur.emit();
|
|
722
883
|
_this.onTouchedCallback();
|
|
723
884
|
});
|
|
724
885
|
}
|
|
725
886
|
};
|
|
726
|
-
/**
|
|
727
|
-
* @hidden
|
|
728
|
-
*/
|
|
729
|
-
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
730
|
-
this.togglePopup(!this.isOpen);
|
|
731
|
-
};
|
|
732
|
-
/**
|
|
733
|
-
* @hidden
|
|
734
|
-
*/
|
|
735
|
-
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
736
|
-
var deleteTag = this.isWrapperActive && event.keyCode === kendo_angular_common_1.Keys.Backspace && this.tags.length > 0;
|
|
737
|
-
if (deleteTag) {
|
|
738
|
-
this.handleBackspace();
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
if (this.disabled || this.readonly) {
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
var eventData = event;
|
|
745
|
-
var action = this.navigationService.process({
|
|
746
|
-
originalEvent: eventData
|
|
747
|
-
});
|
|
748
|
-
if (action === navigation_action_1.NavigationAction.Open) {
|
|
749
|
-
eventData.preventDefault();
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
887
|
/**
|
|
753
888
|
* @hidden
|
|
754
889
|
*/
|
|
@@ -888,6 +1023,26 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
888
1023
|
this.filterChange.next(term);
|
|
889
1024
|
this.allNodesHidden = this.nodes.every(function (node, index) { return !_this.isVisible(node, String(index)); });
|
|
890
1025
|
};
|
|
1026
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "filterInputClasses", {
|
|
1027
|
+
/**
|
|
1028
|
+
* @hidden
|
|
1029
|
+
*/
|
|
1030
|
+
get: function () {
|
|
1031
|
+
return (this.size ? util_1.getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? util_1.getRoundedClass(this.rounded) : '');
|
|
1032
|
+
},
|
|
1033
|
+
enumerable: true,
|
|
1034
|
+
configurable: true
|
|
1035
|
+
});
|
|
1036
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkAllCheckboxClasses", {
|
|
1037
|
+
/**
|
|
1038
|
+
* @hidden
|
|
1039
|
+
*/
|
|
1040
|
+
get: function () {
|
|
1041
|
+
return "" + (this.size ? util_1.getSizeClass('checkbox', this.size) : '');
|
|
1042
|
+
},
|
|
1043
|
+
enumerable: true,
|
|
1044
|
+
configurable: true
|
|
1045
|
+
});
|
|
891
1046
|
/**
|
|
892
1047
|
* @hidden
|
|
893
1048
|
*/
|
|
@@ -1003,6 +1158,32 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1003
1158
|
.pipe(operators_1.filter(function () { return !_this.isTreeViewActive; }))
|
|
1004
1159
|
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(operators_1.filter(function () { return !_this.isOpen; })).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(operators_1.filter(function () { return !_this.isOpen; })).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(operators_1.filter(function () { return _this.isTagFocused; })).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(operators_1.filter(function () { return _this.isTagFocused; })).subscribe(this.handleDelete.bind(this)));
|
|
1005
1160
|
};
|
|
1161
|
+
MultiSelectTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
1162
|
+
var _this = this;
|
|
1163
|
+
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
1164
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
1165
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
1166
|
+
this._zone.runOutsideAngular(function () {
|
|
1167
|
+
var useCapture = true;
|
|
1168
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
1169
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
};
|
|
1173
|
+
MultiSelectTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
1174
|
+
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
1175
|
+
var useCapture = true;
|
|
1176
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
1177
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
MultiSelectTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
1181
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
event.stopImmediatePropagation();
|
|
1185
|
+
this.handleBlur(event);
|
|
1186
|
+
};
|
|
1006
1187
|
MultiSelectTreeComponent.prototype.handleTabKey = function () {
|
|
1007
1188
|
this.focus();
|
|
1008
1189
|
if (this.isOpen) {
|
|
@@ -1105,6 +1286,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1105
1286
|
};
|
|
1106
1287
|
MultiSelectTreeComponent.prototype.unsubscribeEvents = function () {
|
|
1107
1288
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
1289
|
+
this.unSubscribeFocusEvents();
|
|
1108
1290
|
};
|
|
1109
1291
|
/**
|
|
1110
1292
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -1154,16 +1336,84 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1154
1336
|
return indices;
|
|
1155
1337
|
}, []));
|
|
1156
1338
|
};
|
|
1339
|
+
MultiSelectTreeComponent.prototype.setComponentClasses = function () {
|
|
1340
|
+
if (this.size) {
|
|
1341
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
1342
|
+
}
|
|
1343
|
+
if (this.rounded) {
|
|
1344
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
1345
|
+
}
|
|
1346
|
+
if (this.fillMode) {
|
|
1347
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1157
1350
|
var MultiSelectTreeComponent_1;
|
|
1158
1351
|
tslib_1.__decorate([
|
|
1159
|
-
core_1.HostBinding('class.k-widget'),
|
|
1160
1352
|
core_1.HostBinding('class.k-dropdowntree'),
|
|
1353
|
+
core_1.HostBinding('class.k-input'),
|
|
1161
1354
|
tslib_1.__metadata("design:type", Boolean)
|
|
1162
1355
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
1356
|
+
tslib_1.__decorate([
|
|
1357
|
+
core_1.HostBinding('class.k-disabled'),
|
|
1358
|
+
core_1.HostBinding('attr.aria-disabled'),
|
|
1359
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1360
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1361
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
1362
|
+
tslib_1.__decorate([
|
|
1363
|
+
core_1.HostBinding('class.k-loading'),
|
|
1364
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1365
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1366
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
1367
|
+
tslib_1.__decorate([
|
|
1368
|
+
core_1.HostBinding('attr.id'),
|
|
1369
|
+
tslib_1.__metadata("design:type", String),
|
|
1370
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1371
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
1163
1372
|
tslib_1.__decorate([
|
|
1164
1373
|
core_1.HostBinding('attr.dir'),
|
|
1165
1374
|
tslib_1.__metadata("design:type", String)
|
|
1166
1375
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
1376
|
+
tslib_1.__decorate([
|
|
1377
|
+
core_1.HostBinding('attr.tabindex'),
|
|
1378
|
+
tslib_1.__metadata("design:type", Number),
|
|
1379
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1380
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
1381
|
+
tslib_1.__decorate([
|
|
1382
|
+
core_1.HostBinding('attr.role'),
|
|
1383
|
+
tslib_1.__metadata("design:type", String)
|
|
1384
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
1385
|
+
tslib_1.__decorate([
|
|
1386
|
+
core_1.HostBinding('attr.aria-haspopup'),
|
|
1387
|
+
tslib_1.__metadata("design:type", String)
|
|
1388
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
1389
|
+
tslib_1.__decorate([
|
|
1390
|
+
core_1.HostBinding('attr.readonly'),
|
|
1391
|
+
core_1.HostBinding('attr.aria-readonly'),
|
|
1392
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1393
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1394
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
1395
|
+
tslib_1.__decorate([
|
|
1396
|
+
core_1.HostBinding('attr.aria-describedby'),
|
|
1397
|
+
tslib_1.__metadata("design:type", String),
|
|
1398
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1399
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
1400
|
+
tslib_1.__decorate([
|
|
1401
|
+
core_1.HostBinding('attr.aria-activedescendant'),
|
|
1402
|
+
tslib_1.__metadata("design:type", String),
|
|
1403
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1404
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
1405
|
+
tslib_1.__decorate([
|
|
1406
|
+
core_1.HostListener('click'),
|
|
1407
|
+
tslib_1.__metadata("design:type", Function),
|
|
1408
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
1409
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1410
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
1411
|
+
tslib_1.__decorate([
|
|
1412
|
+
core_1.HostListener('keydown', ['$event']),
|
|
1413
|
+
tslib_1.__metadata("design:type", Function),
|
|
1414
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1415
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1416
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
1167
1417
|
tslib_1.__decorate([
|
|
1168
1418
|
core_1.ContentChild(header_template_directive_1.HeaderTemplateDirective, { static: false }),
|
|
1169
1419
|
tslib_1.__metadata("design:type", header_template_directive_1.HeaderTemplateDirective)
|
|
@@ -1192,10 +1442,6 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1192
1442
|
core_1.ViewChild('popupTemplate', { static: true }),
|
|
1193
1443
|
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
1194
1444
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
1195
|
-
tslib_1.__decorate([
|
|
1196
|
-
core_1.ViewChild('wrapper', { static: true }),
|
|
1197
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
1198
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
1199
1445
|
tslib_1.__decorate([
|
|
1200
1446
|
core_1.ViewChild('container', { read: core_1.ViewContainerRef, static: true }),
|
|
1201
1447
|
tslib_1.__metadata("design:type", core_1.ViewContainerRef)
|
|
@@ -1218,6 +1464,21 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1218
1464
|
tslib_1.__metadata("design:type", Number),
|
|
1219
1465
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1220
1466
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
1467
|
+
tslib_1.__decorate([
|
|
1468
|
+
core_1.Input(),
|
|
1469
|
+
tslib_1.__metadata("design:type", String),
|
|
1470
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1471
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
1472
|
+
tslib_1.__decorate([
|
|
1473
|
+
core_1.Input(),
|
|
1474
|
+
tslib_1.__metadata("design:type", String),
|
|
1475
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1476
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
1477
|
+
tslib_1.__decorate([
|
|
1478
|
+
core_1.Input(),
|
|
1479
|
+
tslib_1.__metadata("design:type", String),
|
|
1480
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1481
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
1221
1482
|
tslib_1.__decorate([
|
|
1222
1483
|
core_1.Input(),
|
|
1223
1484
|
tslib_1.__metadata("design:type", Object),
|
|
@@ -1399,12 +1660,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
1399
1660
|
}
|
|
1400
1661
|
],
|
|
1401
1662
|
selector: 'kendo-multiselecttree',
|
|
1402
|
-
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 <
|
|
1663
|
+
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 "
|
|
1403
1664
|
}),
|
|
1404
1665
|
tslib_1.__param(7, core_1.Optional()), tslib_1.__param(7, core_1.Inject(touch_enabled_1.TOUCH_ENABLED)),
|
|
1405
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1666
|
+
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
1667
|
+
kendo_angular_popup_1.PopupService,
|
|
1406
1668
|
core_1.Renderer2,
|
|
1407
|
-
core_1.ElementRef,
|
|
1408
1669
|
navigation_service_1.NavigationService,
|
|
1409
1670
|
core_1.NgZone,
|
|
1410
1671
|
kendo_angular_l10n_1.LocalizationService,
|