@progress/kendo-angular-dropdowns 5.5.1 → 6.0.0-dev.202201171002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/autocomplete/autocomplete.component.js +120 -5
- package/dist/es/comboboxes/combobox.component.js +141 -20
- package/dist/es/comboboxes/multicolumncombobox.component.js +30 -10
- package/dist/es/common/list.component.js +83 -5
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/list-type.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/searchbar.component.js +1 -1
- package/dist/es/common/selection/selectable.directive.js +2 -2
- package/dist/es/common/taglist.component.js +58 -5
- package/dist/es/common/util.js +37 -0
- package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
- package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
- package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
- package/dist/es/multiselect/multiselect.component.js +162 -35
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
- package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
- package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
- package/dist/es2015/comboboxes/combobox.component.js +207 -106
- package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
- package/dist/es2015/common/list.component.d.ts +22 -1
- package/dist/es2015/common/list.component.js +115 -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 +77 -13
- package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
- package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
- package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
- package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
- package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
- package/dist/es2015/multiselect/multiselect.component.js +183 -70
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1928 -802
- package/dist/fesm5/index.js +1569 -231
- package/dist/npm/autocomplete/autocomplete.component.js +119 -4
- package/dist/npm/comboboxes/combobox.component.js +140 -19
- package/dist/npm/comboboxes/multicolumncombobox.component.js +29 -9
- package/dist/npm/common/list.component.js +82 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/list-type.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/searchbar.component.js +1 -1
- package/dist/npm/common/selection/selectable.directive.js +2 -2
- package/dist/npm/common/taglist.component.js +56 -3
- package/dist/npm/common/util.js +37 -0
- package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
- package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
- package/dist/npm/multiselect/multiselect.component.js +160 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +18 -14
|
@@ -45,16 +45,18 @@ exports.ɵ3 = ɵ3;
|
|
|
45
45
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
46
46
|
*/
|
|
47
47
|
var DropDownTreeComponent = /** @class */ (function () {
|
|
48
|
-
function DropDownTreeComponent(popupService, navigationService, renderer,
|
|
48
|
+
function DropDownTreeComponent(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled) {
|
|
49
|
+
this.wrapper = wrapper;
|
|
49
50
|
this.popupService = popupService;
|
|
50
51
|
this.navigationService = navigationService;
|
|
51
52
|
this.renderer = renderer;
|
|
52
|
-
this.hostElement = hostElement;
|
|
53
53
|
this._zone = _zone;
|
|
54
54
|
this.cdr = cdr;
|
|
55
55
|
this.localization = localization;
|
|
56
56
|
this.touchEnabled = touchEnabled;
|
|
57
57
|
this.hostClasses = true;
|
|
58
|
+
this.role = 'listbox';
|
|
59
|
+
this.ariaHasPopup = 'tree';
|
|
58
60
|
/**
|
|
59
61
|
* Fires each time the popup is about to open
|
|
60
62
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -189,21 +191,78 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
189
191
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
190
192
|
this._tabindex = 0;
|
|
191
193
|
this._isFocused = false;
|
|
194
|
+
this._size = 'medium';
|
|
195
|
+
this._rounded = 'medium';
|
|
196
|
+
this._fillMode = 'solid';
|
|
192
197
|
this.subscriptions = [];
|
|
193
198
|
this.onTouchedCallback = util_1.noop;
|
|
194
199
|
this.onChangeCallback = util_1.noop;
|
|
195
200
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
196
201
|
this.subscribeEvents();
|
|
197
202
|
this.subscribeTouchEvents();
|
|
203
|
+
this.subscribeFocusEvents();
|
|
198
204
|
}
|
|
199
205
|
DropDownTreeComponent_1 = DropDownTreeComponent;
|
|
200
|
-
Object.defineProperty(DropDownTreeComponent.prototype, "
|
|
206
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isDisabled", {
|
|
201
207
|
get: function () {
|
|
202
|
-
return this.
|
|
208
|
+
return this.disabled;
|
|
203
209
|
},
|
|
204
210
|
enumerable: true,
|
|
205
211
|
configurable: true
|
|
206
212
|
});
|
|
213
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isLoading", {
|
|
214
|
+
get: function () {
|
|
215
|
+
return this.loading;
|
|
216
|
+
},
|
|
217
|
+
enumerable: true,
|
|
218
|
+
configurable: true
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "id", {
|
|
221
|
+
get: function () {
|
|
222
|
+
return this.focusableId;
|
|
223
|
+
},
|
|
224
|
+
enumerable: true,
|
|
225
|
+
configurable: true
|
|
226
|
+
});
|
|
227
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "hostTabIndex", {
|
|
228
|
+
get: function () {
|
|
229
|
+
return this.tabindex;
|
|
230
|
+
},
|
|
231
|
+
enumerable: true,
|
|
232
|
+
configurable: true
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isAriaExpanded", {
|
|
235
|
+
get: function () {
|
|
236
|
+
return this.isOpen;
|
|
237
|
+
},
|
|
238
|
+
enumerable: true,
|
|
239
|
+
configurable: true
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isReadonly", {
|
|
242
|
+
get: function () {
|
|
243
|
+
return this.readonly;
|
|
244
|
+
},
|
|
245
|
+
enumerable: true,
|
|
246
|
+
configurable: true
|
|
247
|
+
});
|
|
248
|
+
/**
|
|
249
|
+
* @hidden
|
|
250
|
+
*/
|
|
251
|
+
DropDownTreeComponent.prototype.handleClick = function () {
|
|
252
|
+
this.togglePopup(!this.isOpen);
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* @hidden
|
|
256
|
+
*/
|
|
257
|
+
DropDownTreeComponent.prototype.handleKeydown = function (event) {
|
|
258
|
+
if (this.disabled || this.readonly) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
var eventData = event;
|
|
262
|
+
this.navigationService.process({
|
|
263
|
+
originalEvent: eventData
|
|
264
|
+
});
|
|
265
|
+
};
|
|
207
266
|
Object.defineProperty(DropDownTreeComponent.prototype, "treeview", {
|
|
208
267
|
get: function () {
|
|
209
268
|
return this._treeview;
|
|
@@ -305,12 +364,85 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
305
364
|
enumerable: true,
|
|
306
365
|
configurable: true
|
|
307
366
|
});
|
|
367
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "size", {
|
|
368
|
+
get: function () {
|
|
369
|
+
return this._size;
|
|
370
|
+
},
|
|
371
|
+
/**
|
|
372
|
+
* Sets the size of the component.
|
|
373
|
+
*
|
|
374
|
+
* The possible values are:
|
|
375
|
+
* * `'small'`
|
|
376
|
+
* * `'medium'` (default)
|
|
377
|
+
* * `'large'`
|
|
378
|
+
* * `null`
|
|
379
|
+
*
|
|
380
|
+
*/
|
|
381
|
+
set: function (size) {
|
|
382
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', this.size));
|
|
383
|
+
if (size) {
|
|
384
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', size));
|
|
385
|
+
}
|
|
386
|
+
this._size = size;
|
|
387
|
+
},
|
|
388
|
+
enumerable: true,
|
|
389
|
+
configurable: true
|
|
390
|
+
});
|
|
391
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "rounded", {
|
|
392
|
+
get: function () {
|
|
393
|
+
return this._rounded;
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
* Sets the border radius of the component.
|
|
397
|
+
*
|
|
398
|
+
* The possible values are:
|
|
399
|
+
* * `'small'`
|
|
400
|
+
* * `'medium'` (default)
|
|
401
|
+
* * `'large'`
|
|
402
|
+
* * `'full'`
|
|
403
|
+
* * `null`
|
|
404
|
+
*
|
|
405
|
+
*/
|
|
406
|
+
set: function (rounded) {
|
|
407
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
408
|
+
if (rounded) {
|
|
409
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
|
|
410
|
+
}
|
|
411
|
+
this._rounded = rounded;
|
|
412
|
+
},
|
|
413
|
+
enumerable: true,
|
|
414
|
+
configurable: true
|
|
415
|
+
});
|
|
416
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "fillMode", {
|
|
417
|
+
get: function () {
|
|
418
|
+
return this._fillMode;
|
|
419
|
+
},
|
|
420
|
+
/**
|
|
421
|
+
* Sets the fillMode of the component.
|
|
422
|
+
*
|
|
423
|
+
* The possible values are:
|
|
424
|
+
* * `'flat'`
|
|
425
|
+
* * `'solid'` (default)
|
|
426
|
+
* * `'outline'`
|
|
427
|
+
* * `null`
|
|
428
|
+
*
|
|
429
|
+
*/
|
|
430
|
+
set: function (fillMode) {
|
|
431
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', this.fillMode));
|
|
432
|
+
if (fillMode) {
|
|
433
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', fillMode));
|
|
434
|
+
}
|
|
435
|
+
this._fillMode = fillMode;
|
|
436
|
+
},
|
|
437
|
+
enumerable: true,
|
|
438
|
+
configurable: true
|
|
439
|
+
});
|
|
308
440
|
Object.defineProperty(DropDownTreeComponent.prototype, "isFocused", {
|
|
309
441
|
get: function () {
|
|
310
442
|
return this._isFocused;
|
|
311
443
|
},
|
|
312
444
|
set: function (isFocused) {
|
|
313
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
445
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
314
446
|
this._isFocused = isFocused;
|
|
315
447
|
},
|
|
316
448
|
enumerable: true,
|
|
@@ -446,7 +578,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
446
578
|
});
|
|
447
579
|
DropDownTreeComponent.prototype.ngOnInit = function () {
|
|
448
580
|
var _this = this;
|
|
449
|
-
this.renderer.removeAttribute(this.
|
|
581
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
450
582
|
this.assignAriaDescribedBy();
|
|
451
583
|
this.subscriptions.push(this.localization
|
|
452
584
|
.changes.subscribe(function (_a) {
|
|
@@ -454,6 +586,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
454
586
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
455
587
|
_this.cdr.markForCheck();
|
|
456
588
|
}));
|
|
589
|
+
this.setComponentClasses();
|
|
457
590
|
};
|
|
458
591
|
/**
|
|
459
592
|
* @hidden
|
|
@@ -504,8 +637,12 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
504
637
|
/**
|
|
505
638
|
* @hidden
|
|
506
639
|
*/
|
|
507
|
-
DropDownTreeComponent.prototype.handleFocus = function () {
|
|
640
|
+
DropDownTreeComponent.prototype.handleFocus = function (event) {
|
|
508
641
|
var _this = this;
|
|
642
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
event.stopImmediatePropagation();
|
|
509
646
|
if (!this.isFocused) {
|
|
510
647
|
this.isFocused = true;
|
|
511
648
|
if (kendo_angular_common_1.hasObservers(this.onFocus)) {
|
|
@@ -521,13 +658,13 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
521
658
|
DropDownTreeComponent.prototype.handleBlur = function (e) {
|
|
522
659
|
var _this = this;
|
|
523
660
|
var relatedTarget = e && e.relatedTarget;
|
|
524
|
-
if (this.
|
|
661
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
525
662
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
526
663
|
return;
|
|
527
664
|
}
|
|
528
665
|
this.isFocused = false;
|
|
529
666
|
if (kendo_angular_common_1.hasObservers(this.onBlur) ||
|
|
530
|
-
util_1.isUntouched(this.
|
|
667
|
+
util_1.isUntouched(this.wrapper.nativeElement)) {
|
|
531
668
|
this._zone.run(function () {
|
|
532
669
|
_this.togglePopup(false);
|
|
533
670
|
_this.onBlur.emit();
|
|
@@ -538,24 +675,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
538
675
|
this.togglePopup(false);
|
|
539
676
|
}
|
|
540
677
|
};
|
|
541
|
-
/**
|
|
542
|
-
* @hidden
|
|
543
|
-
*/
|
|
544
|
-
DropDownTreeComponent.prototype.handleKeydown = function (event) {
|
|
545
|
-
if (this.disabled || this.readonly) {
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
var eventData = event;
|
|
549
|
-
this.navigationService.process({
|
|
550
|
-
originalEvent: eventData
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
/**
|
|
554
|
-
* @hidden
|
|
555
|
-
*/
|
|
556
|
-
DropDownTreeComponent.prototype.handleClick = function () {
|
|
557
|
-
this.togglePopup(!this.isOpen);
|
|
558
|
-
};
|
|
559
678
|
/**
|
|
560
679
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
561
680
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -619,7 +738,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
619
738
|
* @hidden
|
|
620
739
|
*/
|
|
621
740
|
get: function () {
|
|
622
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
741
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
623
742
|
if (this.popupSettings.popupClass) {
|
|
624
743
|
containerClasses.push(this.popupSettings.popupClass);
|
|
625
744
|
}
|
|
@@ -732,6 +851,26 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
732
851
|
enumerable: true,
|
|
733
852
|
configurable: true
|
|
734
853
|
});
|
|
854
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "selectButtonClasses", {
|
|
855
|
+
/**
|
|
856
|
+
* @hidden
|
|
857
|
+
*/
|
|
858
|
+
get: function () {
|
|
859
|
+
return (this.size ? util_1.getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
|
|
860
|
+
},
|
|
861
|
+
enumerable: true,
|
|
862
|
+
configurable: true
|
|
863
|
+
});
|
|
864
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "filterInputClasses", {
|
|
865
|
+
/**
|
|
866
|
+
* @hidden
|
|
867
|
+
*/
|
|
868
|
+
get: function () {
|
|
869
|
+
return (this.size ? util_1.getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? util_1.getRoundedClass(this.rounded) : '');
|
|
870
|
+
},
|
|
871
|
+
enumerable: true,
|
|
872
|
+
configurable: true
|
|
873
|
+
});
|
|
735
874
|
DropDownTreeComponent.prototype.verifySettings = function () {
|
|
736
875
|
if (!core_1.isDevMode()) {
|
|
737
876
|
return;
|
|
@@ -895,7 +1034,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
895
1034
|
// Roll up DropDownTree on iOS when tapped outside
|
|
896
1035
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
897
1036
|
var target = e.target;
|
|
898
|
-
if (_this.isFocused && !util_1.inDropDown(_this.
|
|
1037
|
+
if (_this.isFocused && !util_1.inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
899
1038
|
_this._zone.run(function () {
|
|
900
1039
|
if (_this.isOpen) {
|
|
901
1040
|
_this.treeview.blur();
|
|
@@ -906,34 +1045,118 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
906
1045
|
});
|
|
907
1046
|
});
|
|
908
1047
|
};
|
|
1048
|
+
DropDownTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
1049
|
+
var _this = this;
|
|
1050
|
+
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
1051
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
1052
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
1053
|
+
this._zone.runOutsideAngular(function () {
|
|
1054
|
+
var useCapture = true;
|
|
1055
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
1056
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
DropDownTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
1061
|
+
if (kendo_angular_common_1.isDocumentAvailable()) {
|
|
1062
|
+
var useCapture = true;
|
|
1063
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
1064
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
909
1067
|
DropDownTreeComponent.prototype.unsubscribeEvents = function () {
|
|
910
1068
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
1069
|
+
this.unSubscribeFocusEvents();
|
|
911
1070
|
if (this.touchstartDisposeHandler) {
|
|
912
1071
|
this.touchstartDisposeHandler();
|
|
913
1072
|
}
|
|
914
1073
|
};
|
|
1074
|
+
DropDownTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
1075
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
event.stopImmediatePropagation();
|
|
1079
|
+
this.handleBlur(event);
|
|
1080
|
+
};
|
|
915
1081
|
DropDownTreeComponent.prototype.assignAriaDescribedBy = function () {
|
|
916
1082
|
var currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
917
1083
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
918
1084
|
var newValue = (this.valueLabelId + " " + currentValue.trim()).trim();
|
|
919
1085
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
920
1086
|
};
|
|
1087
|
+
DropDownTreeComponent.prototype.setComponentClasses = function () {
|
|
1088
|
+
if (this.size) {
|
|
1089
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('picker', this.size));
|
|
1090
|
+
}
|
|
1091
|
+
if (this.rounded) {
|
|
1092
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
1093
|
+
}
|
|
1094
|
+
if (this.fillMode) {
|
|
1095
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('picker', this.fillMode));
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
921
1098
|
var DropDownTreeComponent_1;
|
|
922
1099
|
tslib_1.__decorate([
|
|
923
|
-
core_1.HostBinding('class.k-widget'),
|
|
924
1100
|
core_1.HostBinding('class.k-dropdowntree'),
|
|
925
|
-
core_1.HostBinding('class.k-
|
|
1101
|
+
core_1.HostBinding('class.k-picker'),
|
|
926
1102
|
tslib_1.__metadata("design:type", Boolean)
|
|
927
1103
|
], DropDownTreeComponent.prototype, "hostClasses", void 0);
|
|
1104
|
+
tslib_1.__decorate([
|
|
1105
|
+
core_1.HostBinding('class.k-disabled'),
|
|
1106
|
+
core_1.HostBinding('attr.aria-disabled'),
|
|
1107
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1108
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1109
|
+
], DropDownTreeComponent.prototype, "isDisabled", null);
|
|
1110
|
+
tslib_1.__decorate([
|
|
1111
|
+
core_1.HostBinding('class.k-loading'),
|
|
1112
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1113
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1114
|
+
], DropDownTreeComponent.prototype, "isLoading", null);
|
|
1115
|
+
tslib_1.__decorate([
|
|
1116
|
+
core_1.HostBinding('attr.id'),
|
|
1117
|
+
tslib_1.__metadata("design:type", String),
|
|
1118
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1119
|
+
], DropDownTreeComponent.prototype, "id", null);
|
|
928
1120
|
tslib_1.__decorate([
|
|
929
1121
|
core_1.HostBinding('attr.dir'),
|
|
930
1122
|
tslib_1.__metadata("design:type", String)
|
|
931
1123
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
932
1124
|
tslib_1.__decorate([
|
|
933
|
-
core_1.HostBinding('
|
|
1125
|
+
core_1.HostBinding('attr.tabindex'),
|
|
1126
|
+
tslib_1.__metadata("design:type", Number),
|
|
1127
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1128
|
+
], DropDownTreeComponent.prototype, "hostTabIndex", null);
|
|
1129
|
+
tslib_1.__decorate([
|
|
1130
|
+
core_1.HostBinding('attr.role'),
|
|
1131
|
+
tslib_1.__metadata("design:type", String)
|
|
1132
|
+
], DropDownTreeComponent.prototype, "role", void 0);
|
|
1133
|
+
tslib_1.__decorate([
|
|
1134
|
+
core_1.HostBinding('attr.aria-haspopup'),
|
|
1135
|
+
tslib_1.__metadata("design:type", String)
|
|
1136
|
+
], DropDownTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
1137
|
+
tslib_1.__decorate([
|
|
1138
|
+
core_1.HostBinding('attr.aria-expanded'),
|
|
934
1139
|
tslib_1.__metadata("design:type", Boolean),
|
|
935
1140
|
tslib_1.__metadata("design:paramtypes", [])
|
|
936
|
-
], DropDownTreeComponent.prototype, "
|
|
1141
|
+
], DropDownTreeComponent.prototype, "isAriaExpanded", null);
|
|
1142
|
+
tslib_1.__decorate([
|
|
1143
|
+
core_1.HostBinding('attr.readonly'),
|
|
1144
|
+
core_1.HostBinding('attr.aria-readonly'),
|
|
1145
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1146
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1147
|
+
], DropDownTreeComponent.prototype, "isReadonly", null);
|
|
1148
|
+
tslib_1.__decorate([
|
|
1149
|
+
core_1.HostListener('click'),
|
|
1150
|
+
tslib_1.__metadata("design:type", Function),
|
|
1151
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
1152
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1153
|
+
], DropDownTreeComponent.prototype, "handleClick", null);
|
|
1154
|
+
tslib_1.__decorate([
|
|
1155
|
+
core_1.HostListener('keydown', ['$event']),
|
|
1156
|
+
tslib_1.__metadata("design:type", Function),
|
|
1157
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1158
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
1159
|
+
], DropDownTreeComponent.prototype, "handleKeydown", null);
|
|
937
1160
|
tslib_1.__decorate([
|
|
938
1161
|
core_1.ContentChild(no_data_template_directive_1.NoDataTemplateDirective, { static: false }),
|
|
939
1162
|
tslib_1.__metadata("design:type", no_data_template_directive_1.NoDataTemplateDirective)
|
|
@@ -958,10 +1181,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
958
1181
|
core_1.ViewChild('popupTemplate', { static: true }),
|
|
959
1182
|
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
960
1183
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
961
|
-
tslib_1.__decorate([
|
|
962
|
-
core_1.ViewChild('wrapper', { static: true }),
|
|
963
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
964
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
965
1184
|
tslib_1.__decorate([
|
|
966
1185
|
core_1.ViewChild('container', { read: core_1.ViewContainerRef, static: true }),
|
|
967
1186
|
tslib_1.__metadata("design:type", core_1.ViewContainerRef)
|
|
@@ -1088,6 +1307,21 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
1088
1307
|
tslib_1.__metadata("design:type", Number),
|
|
1089
1308
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
1090
1309
|
], DropDownTreeComponent.prototype, "tabindex", null);
|
|
1310
|
+
tslib_1.__decorate([
|
|
1311
|
+
core_1.Input(),
|
|
1312
|
+
tslib_1.__metadata("design:type", String),
|
|
1313
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1314
|
+
], DropDownTreeComponent.prototype, "size", null);
|
|
1315
|
+
tslib_1.__decorate([
|
|
1316
|
+
core_1.Input(),
|
|
1317
|
+
tslib_1.__metadata("design:type", String),
|
|
1318
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1319
|
+
], DropDownTreeComponent.prototype, "rounded", null);
|
|
1320
|
+
tslib_1.__decorate([
|
|
1321
|
+
core_1.Input(),
|
|
1322
|
+
tslib_1.__metadata("design:type", String),
|
|
1323
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1324
|
+
], DropDownTreeComponent.prototype, "fillMode", null);
|
|
1091
1325
|
tslib_1.__decorate([
|
|
1092
1326
|
core_1.Input(),
|
|
1093
1327
|
tslib_1.__metadata("design:type", Function)
|
|
@@ -1148,14 +1382,14 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
1148
1382
|
}
|
|
1149
1383
|
],
|
|
1150
1384
|
selector: 'kendo-dropdowntree',
|
|
1151
|
-
template: "\n <ng-container kendoDropDownTreeLocalizedMessages\n i18n-noDataText=\"kendo.dropdowntree.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.dropdowntree.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <span\n
|
|
1385
|
+
template: "\n <ng-container kendoDropDownTreeLocalizedMessages\n i18n-noDataText=\"kendo.dropdowntree.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.dropdowntree.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <span\n [attr.id]=\"valueLabelId\"\n class=\"k-input-inner\"\n >\n <span class=\"k-input-value-text\">\n <ng-template *ngIf=\"valueTemplate\"\n [templateContext]=\"{\n templateRef: valueTemplate.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!valueTemplate\"> {{ text || placeholder }} </ng-template>\n </span>\n </span>\n <span\n *ngIf=\"!loading && !readonly && clearButton && text?.length && !disabled\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n aria-hidden=\"true\"\n [attr.title]=\"messageFor('clearTitle')\"\n (click)=\"clearValue($event)\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <button\n tabindex=\"-1\"\n type=\"button\"\n aria-hidden=\"true\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n >\n <span\n class=\"k-button-icon k-icon\"\n [ngClass]=\"buttonClasses\"\n ></span>\n </button>\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.arrowdown)=\"handleKeydown($event)\"\n (keydown.alt.arrowup)=\"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 <kendo-treeview\n #treeview\n *ngIf=\"data.length !== 0 && !allNodesHidden\"\n [size]=\"size\"\n [nodes]=\"data\"\n [style.maxHeight.px]=\"listHeight\"\n [animate]=\"false\"\n [(selectedKeys)]=\"selectedKeys\"\n [selectBy]=\"selectBy\"\n [textField]=\"textField\"\n kendoTreeViewSelectable\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [loadOnDemand]=\"loadOnDemand\"\n [isExpanded]=\"isNodeExpanded\"\n [isDisabled]=\"itemDisabled\"\n [nodeTemplate]=\"nodeTemplate\"\n [filter]=\"filter\"\n [isVisible]=\"isNodeVisible\"\n (focusout)=\"handleBlur($event)\"\n (keydown)=\"handleKeydown($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (expand)=\"nodeExpand.emit($event)\"\n (collapse)=\"nodeCollapse.emit($event)\"\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 ",
|
|
1152
1386
|
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
1153
1387
|
}),
|
|
1154
1388
|
tslib_1.__param(7, core_1.Optional()), tslib_1.__param(7, core_1.Inject(touch_enabled_1.TOUCH_ENABLED)),
|
|
1155
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
1389
|
+
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
1390
|
+
kendo_angular_popup_1.PopupService,
|
|
1156
1391
|
navigation_service_1.NavigationService,
|
|
1157
1392
|
core_1.Renderer2,
|
|
1158
|
-
core_1.ElementRef,
|
|
1159
1393
|
core_1.NgZone,
|
|
1160
1394
|
core_1.ChangeDetectorRef,
|
|
1161
1395
|
kendo_angular_l10n_1.LocalizationService, Boolean])
|