@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
package/dist/fesm5/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { __decorate, __metadata, __assign, __param, __extends } from 'tslib';
|
|
6
|
-
import { Input, Output, EventEmitter, ViewChild, ElementRef, HostBinding, Component, Renderer2, Directive, TemplateRef, Injectable, ViewChildren, QueryList, ChangeDetectorRef, NgZone, InjectionToken, forwardRef, isDevMode, ContentChild, ViewContainerRef, Optional, Inject, KeyValueDiffers, ContentChildren, ChangeDetectionStrategy, NgModule
|
|
6
|
+
import { Input, Output, EventEmitter, ViewChild, ElementRef, HostBinding, Component, Renderer2, Directive, TemplateRef, Injectable, ViewChildren, QueryList, ChangeDetectorRef, NgZone, InjectionToken, forwardRef, isDevMode, ContentChild, ViewContainerRef, Optional, Inject, HostListener, KeyValueDiffers, ContentChildren, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable, Keys, isChanged, hasObservers, KendoInput, anyChanged, guid, ResizeSensorModule, EventsModule } from '@progress/kendo-angular-common';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -23,7 +23,7 @@ var packageMetadata = {
|
|
|
23
23
|
name: '@progress/kendo-angular-dropdowns',
|
|
24
24
|
productName: 'Kendo UI for Angular',
|
|
25
25
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
26
|
-
publishDate:
|
|
26
|
+
publishDate: 1642677856,
|
|
27
27
|
version: '',
|
|
28
28
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
29
29
|
};
|
|
@@ -279,6 +279,43 @@ var valueFrom = function (_a, valueField) {
|
|
|
279
279
|
var field = fields[normalizedLevel];
|
|
280
280
|
return getter(field)(dataItem);
|
|
281
281
|
};
|
|
282
|
+
/**
|
|
283
|
+
* @hidden
|
|
284
|
+
* Returns the size class based on the component and size input.
|
|
285
|
+
*/
|
|
286
|
+
var getSizeClass = function (component, size) {
|
|
287
|
+
var SIZE_CLASSES = {
|
|
288
|
+
'small': "k-" + component + "-sm",
|
|
289
|
+
'medium': "k-" + component + "-md",
|
|
290
|
+
'large': "k-" + component + "-lg"
|
|
291
|
+
};
|
|
292
|
+
return SIZE_CLASSES[size];
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* @hidden
|
|
296
|
+
* Returns the rounded class based on the rounded input.
|
|
297
|
+
*/
|
|
298
|
+
var getRoundedClass = function (rounded) {
|
|
299
|
+
var ROUNDED_CLASSES = {
|
|
300
|
+
'small': 'k-rounded-sm',
|
|
301
|
+
'medium': 'k-rounded-md',
|
|
302
|
+
'large': 'k-rounded-lg',
|
|
303
|
+
'full': 'k-rounded-full'
|
|
304
|
+
};
|
|
305
|
+
return ROUNDED_CLASSES[rounded];
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* @hidden
|
|
309
|
+
* Return the fillMode class based on the component and fillMode input.
|
|
310
|
+
*/
|
|
311
|
+
var getFillModeClass = function (component, fillMode) {
|
|
312
|
+
var FILLMODE_CLASSES = {
|
|
313
|
+
'solid': "k-" + component + "-solid",
|
|
314
|
+
'flat': "k-" + component + "-flat",
|
|
315
|
+
'outline': "k-" + component + "-outline"
|
|
316
|
+
};
|
|
317
|
+
return FILLMODE_CLASSES[fillMode];
|
|
318
|
+
};
|
|
282
319
|
|
|
283
320
|
/* tslint:disable:member-ordering */
|
|
284
321
|
/**
|
|
@@ -508,7 +545,7 @@ var SearchBarComponent = /** @class */ (function () {
|
|
|
508
545
|
SearchBarComponent = __decorate([
|
|
509
546
|
Component({
|
|
510
547
|
selector: 'kendo-searchbar',
|
|
511
|
-
template: "\n <input #input\n autocomplete=\"off\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [class]=\"'k-input'\"\n (input)=\"handleInput($event)\"\n (keydown)=\"handleKeydown($event)\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.dir]=\"direction\"\n [attr.role]=\"role\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-readonly]=\"readonly\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"popupOpen\"\n [attr.aria-owns]=\"listId\"\n [attr.aria-describedby]=\"tagListId\"\n [attr.aria-activedescendant]=\"activeDescendant\"\n [attr.aria-label]=\"noDataLabel\"\n />\n "
|
|
548
|
+
template: "\n <input #input\n autocomplete=\"off\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [class]=\"'k-input-inner'\"\n (input)=\"handleInput($event)\"\n (keydown)=\"handleKeydown($event)\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.dir]=\"direction\"\n [attr.role]=\"role\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-readonly]=\"readonly\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"popupOpen\"\n [attr.aria-owns]=\"listId\"\n [attr.aria-describedby]=\"tagListId\"\n [attr.aria-activedescendant]=\"activeDescendant\"\n [attr.aria-label]=\"noDataLabel\"\n />\n "
|
|
512
549
|
}),
|
|
513
550
|
__metadata("design:paramtypes", [LocalizationService,
|
|
514
551
|
Renderer2])
|
|
@@ -1381,8 +1418,9 @@ var ListComponent = /** @class */ (function () {
|
|
|
1381
1418
|
this.focused = -1;
|
|
1382
1419
|
this.show = true;
|
|
1383
1420
|
this.multipleSelection = false;
|
|
1384
|
-
this.
|
|
1421
|
+
this.type = 'list';
|
|
1385
1422
|
this.checkboxes = { enabled: false };
|
|
1423
|
+
this.rounded = 'medium';
|
|
1386
1424
|
this.onClick = new EventEmitter();
|
|
1387
1425
|
this.pageChange = new EventEmitter();
|
|
1388
1426
|
this.listResize = new EventEmitter();
|
|
@@ -1390,11 +1428,13 @@ var ListComponent = /** @class */ (function () {
|
|
|
1390
1428
|
this.lastLoaded = 0;
|
|
1391
1429
|
this.lastScrollTop = 0;
|
|
1392
1430
|
this.scrollToFocused = false;
|
|
1431
|
+
this._size = 'medium';
|
|
1393
1432
|
this.selectSubscription = merge(this.selectionService.onSelect.pipe(map(function (args) { return args.indices[0]; })), this.selectionService.onFocus)
|
|
1394
1433
|
.pipe(
|
|
1395
1434
|
// handle only the very last onSelect/onFocus emission
|
|
1396
1435
|
switchMap(function (event) { return _this.zone.onStable.pipe(take(1), map(function () { return event; })); }))
|
|
1397
1436
|
.subscribe(this.scrollToItem.bind(this));
|
|
1437
|
+
this.prepareClasses();
|
|
1398
1438
|
}
|
|
1399
1439
|
Object.defineProperty(ListComponent.prototype, "data", {
|
|
1400
1440
|
get: function () {
|
|
@@ -1406,6 +1446,22 @@ var ListComponent = /** @class */ (function () {
|
|
|
1406
1446
|
enumerable: true,
|
|
1407
1447
|
configurable: true
|
|
1408
1448
|
});
|
|
1449
|
+
Object.defineProperty(ListComponent.prototype, "size", {
|
|
1450
|
+
get: function () {
|
|
1451
|
+
return this._size;
|
|
1452
|
+
},
|
|
1453
|
+
set: function (size) {
|
|
1454
|
+
if (this.type === 'list') {
|
|
1455
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('list', this.size));
|
|
1456
|
+
if (size) {
|
|
1457
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('list', size));
|
|
1458
|
+
}
|
|
1459
|
+
this._size = size;
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
enumerable: true,
|
|
1463
|
+
configurable: true
|
|
1464
|
+
});
|
|
1409
1465
|
Object.defineProperty(ListComponent.prototype, "pageSize", {
|
|
1410
1466
|
get: function () {
|
|
1411
1467
|
if (this.virtual.pageSize) {
|
|
@@ -1434,6 +1490,16 @@ var ListComponent = /** @class */ (function () {
|
|
|
1434
1490
|
enumerable: true,
|
|
1435
1491
|
configurable: true
|
|
1436
1492
|
});
|
|
1493
|
+
Object.defineProperty(ListComponent.prototype, "checkboxClasses", {
|
|
1494
|
+
/**
|
|
1495
|
+
* @hidden
|
|
1496
|
+
*/
|
|
1497
|
+
get: function () {
|
|
1498
|
+
return (this.size ? getSizeClass('checkbox', this.size) : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
1499
|
+
},
|
|
1500
|
+
enumerable: true,
|
|
1501
|
+
configurable: true
|
|
1502
|
+
});
|
|
1437
1503
|
ListComponent.prototype.ngOnChanges = function (changes) {
|
|
1438
1504
|
if (isChanged('data', changes, false)) {
|
|
1439
1505
|
if (this.lastLoaded <= 0) {
|
|
@@ -1445,9 +1511,13 @@ var ListComponent = /** @class */ (function () {
|
|
|
1445
1511
|
if (isChanged('virtual', changes, false)) {
|
|
1446
1512
|
this.setOverflow();
|
|
1447
1513
|
}
|
|
1514
|
+
if (isChanged('type', changes, false)) {
|
|
1515
|
+
this.prepareClasses();
|
|
1516
|
+
}
|
|
1448
1517
|
};
|
|
1449
1518
|
ListComponent.prototype.ngAfterViewInit = function () {
|
|
1450
1519
|
var _this = this;
|
|
1520
|
+
this.setComponentClasses();
|
|
1451
1521
|
this.zone.runOutsideAngular(function () {
|
|
1452
1522
|
_this.scrollSubscription = fromEvent(_this.content.nativeElement, "scroll").pipe(auditTime(100), tap(_this.prefetchData.bind(_this)), tap(_this.findCurrentGroup.bind(_this))).subscribe(function () {
|
|
1453
1523
|
_this.lastScrollTop = _this.content.nativeElement.scrollTop;
|
|
@@ -1483,6 +1553,28 @@ var ListComponent = /** @class */ (function () {
|
|
|
1483
1553
|
this.selectionService.unselect(index);
|
|
1484
1554
|
}
|
|
1485
1555
|
};
|
|
1556
|
+
ListComponent.prototype.prepareClasses = function () {
|
|
1557
|
+
if (this.type === 'list') {
|
|
1558
|
+
this.listContentClass = 'k-list-content';
|
|
1559
|
+
this.listClass = 'k-list-ul';
|
|
1560
|
+
this.listItemClass = 'k-list-item';
|
|
1561
|
+
this.listVirtualClass = 'k-virtual-list';
|
|
1562
|
+
this.listGroupStickyHeaderClass = 'k-list-group-sticky-header';
|
|
1563
|
+
this.listGroupStickyHeaderTextClass = 'k-list-header-text';
|
|
1564
|
+
this.listGroupItemClass = 'k-list-group-item';
|
|
1565
|
+
this.listGroupItemTextClass = 'k-list-item-text';
|
|
1566
|
+
}
|
|
1567
|
+
else {
|
|
1568
|
+
this.listContentClass = 'k-table-body k-table-scroller';
|
|
1569
|
+
this.listClass = 'k-table k-table-list';
|
|
1570
|
+
this.listItemClass = 'k-table-row';
|
|
1571
|
+
this.listVirtualClass = 'k-virtual-table';
|
|
1572
|
+
this.listGroupStickyHeaderClass = 'k-table-group-sticky-header';
|
|
1573
|
+
this.listGroupStickyHeaderTextClass = 'k-table-th';
|
|
1574
|
+
this.listGroupItemClass = 'k-table-group-row';
|
|
1575
|
+
this.listGroupItemTextClass = 'k-table-th';
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1486
1578
|
ListComponent.prototype.isChecked = function (index) {
|
|
1487
1579
|
var normalizedIndex = this.virtual ? index + this.virtual.skip : index;
|
|
1488
1580
|
return this.selectionService.isSelected(normalizedIndex);
|
|
@@ -1492,7 +1584,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
1492
1584
|
var content = this.content.nativeElement;
|
|
1493
1585
|
var rect = content.getBoundingClientRect();
|
|
1494
1586
|
// IE9 hack
|
|
1495
|
-
var disabled = Array.prototype.slice.call(content.querySelectorAll(".k-
|
|
1587
|
+
var disabled = Array.prototype.slice.call(content.querySelectorAll(".k-disabled"));
|
|
1496
1588
|
// This is a workaround for finding elements with pointer-events: none;
|
|
1497
1589
|
disabled.forEach(function (el) { return _this.renderer.setStyle(el, "pointer-events", "auto"); });
|
|
1498
1590
|
var item = document.elementFromPoint(rect.left + 1, rect.top + 1);
|
|
@@ -1571,6 +1663,9 @@ var ListComponent = /** @class */ (function () {
|
|
|
1571
1663
|
}
|
|
1572
1664
|
return this.disabledItemsService.isIndexDisabled(index);
|
|
1573
1665
|
};
|
|
1666
|
+
ListComponent.prototype.isAltRow = function (index) {
|
|
1667
|
+
return this.type === 'dropdowngrid' && index % 2 !== 0;
|
|
1668
|
+
};
|
|
1574
1669
|
ListComponent.prototype.scrollToItem = function (index) {
|
|
1575
1670
|
var flatIndex = index;
|
|
1576
1671
|
if (this.dataService.grouped) {
|
|
@@ -1662,6 +1757,17 @@ var ListComponent = /** @class */ (function () {
|
|
|
1662
1757
|
}
|
|
1663
1758
|
return this.virtual.skip === 0 && (this.virtual.pageSize > itemIndex);
|
|
1664
1759
|
};
|
|
1760
|
+
ListComponent.prototype.setComponentClasses = function () {
|
|
1761
|
+
if (this.type === 'list') {
|
|
1762
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-list');
|
|
1763
|
+
if (this.size) {
|
|
1764
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('list', this.size));
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
if (isPresent(this.virtual)) {
|
|
1768
|
+
this.renderer.addClass(this.wrapper.nativeElement, this.listVirtualClass);
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1665
1771
|
__decorate([
|
|
1666
1772
|
Input(),
|
|
1667
1773
|
__metadata("design:type", Array)
|
|
@@ -1717,7 +1823,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
1717
1823
|
__decorate([
|
|
1718
1824
|
Input(),
|
|
1719
1825
|
__metadata("design:type", String)
|
|
1720
|
-
], ListComponent.prototype, "
|
|
1826
|
+
], ListComponent.prototype, "type", void 0);
|
|
1721
1827
|
__decorate([
|
|
1722
1828
|
Input(),
|
|
1723
1829
|
__metadata("design:type", Object)
|
|
@@ -1727,6 +1833,15 @@ var ListComponent = /** @class */ (function () {
|
|
|
1727
1833
|
__metadata("design:type", Array),
|
|
1728
1834
|
__metadata("design:paramtypes", [Array])
|
|
1729
1835
|
], ListComponent.prototype, "data", null);
|
|
1836
|
+
__decorate([
|
|
1837
|
+
Input(),
|
|
1838
|
+
__metadata("design:type", String),
|
|
1839
|
+
__metadata("design:paramtypes", [String])
|
|
1840
|
+
], ListComponent.prototype, "size", null);
|
|
1841
|
+
__decorate([
|
|
1842
|
+
Input(),
|
|
1843
|
+
__metadata("design:type", String)
|
|
1844
|
+
], ListComponent.prototype, "rounded", void 0);
|
|
1730
1845
|
__decorate([
|
|
1731
1846
|
Output(),
|
|
1732
1847
|
__metadata("design:type", EventEmitter)
|
|
@@ -1758,7 +1873,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
1758
1873
|
ListComponent = __decorate([
|
|
1759
1874
|
Component({
|
|
1760
1875
|
selector: 'kendo-list',
|
|
1761
|
-
template: "\n <div *ngIf=\"dataService.grouped\"\n class
|
|
1876
|
+
template: "\n <div *ngIf=\"dataService.grouped\"\n [class]=\"listGroupStickyHeaderClass\"\n [ngStyle]=\"{\n 'height.px': virtual?.itemHeight,\n 'minHeight.px' : virtual?.itemHeight,\n 'boxSizing' : virtual ? 'border-box' : 'inherit'}\"\n >\n <ng-template *ngIf=\"fixedGroupTemplate\"\n [templateContext]=\"{\n templateRef: fixedGroupTemplate.templateRef,\n $implicit: currentGroup\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!fixedGroupTemplate\"><span [class]=\"listGroupStickyHeaderTextClass\">{{ currentGroup }}</span></ng-template>\n </div>\n <div #content\n [class]=\"listContentClass\"\n [style.overscrollBehavior]=\"'none'\"\n [style.maxHeight.px]=\"height\"\n unselectable=\"on\">\n <ul #list\n role=\"listbox\"\n [class]=\"listClass\"\n [attr.id]=\"id\"\n [attr.aria-hidden]=\"!show\">\n <ng-template *ngIf=\"!dataService.grouped && show\" ngFor let-dataItem let-itemIndex=\"index\" [ngForOf]=\"data\">\n <li\n role=\"option\"\n kendoDropDownsSelectable\n [checkboxes]=\"checkboxes\"\n [height]=\"virtual?.itemHeight\"\n [index]=\"itemIndex + startFrom\"\n [multipleSelection]=\"multipleSelection\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem)\"\n [attr.tabIndex]=\"-1\"\n [class]=\"listItemClass\"\n [ngClass]=\"{\n 'k-disabled': isDisabled(itemIndex),\n 'k-table-alt-row': isAltRow(itemIndex)\n }\"\n >\n <input\n *ngIf=\"checkboxes.enabled\"\n type=\"checkbox\"\n class=\"k-checkbox\"\n [ngClass]=\"checkboxClasses\"\n (change)=\"onCheckedChange($event, itemIndex)\"\n [checked]=\"isChecked(itemIndex)\"\n />\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\"><span class=\"k-list-item-text\">{{ getText(dataItem) }}</span></ng-template>\n </li>\n </ng-template>\n <ng-template *ngIf=\"dataService.grouped\" ngFor let-dataItem let-itemIndex=\"index\" [ngForOf]=\"data\">\n <li\n *ngIf=\"dataItem.header && dataItem.index > 0\"\n role=\"group\"\n [class]=\"listGroupItemClass\"\n [class.k-table-alt-row]=\"isAltRow(itemIndex - 1)\"\n [ngStyle]=\"{\n 'height.px': virtual?.itemHeight,\n 'minHeight.px' : virtual?.itemHeight,\n 'boxSizing' : virtual ? 'border-box' : 'inherit'}\"\n [attr.group-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\">\n <span [class]=\"listGroupItemTextClass\">\n <ng-template *ngIf=\"groupTemplate\"\n [templateContext]=\"{\n templateRef: groupTemplate.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!groupTemplate\">{{ dataItem.value }}</ng-template>\n </span>\n </li>\n <li\n *ngIf=\"!dataItem.header\"\n role=\"option\"\n kendoDropDownsSelectable\n [height]=\"virtual?.itemHeight\"\n [index]=\"dataItem.offsetIndex\"\n [multipleSelection]=\"multipleSelection\"\n [attr.absolute-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\"\n [class]=\"listItemClass\"\n [ngClass]=\"{\n 'k-disabled': isDisabled(dataItem.offsetIndex),\n 'k-table-alt-row': isAltRow(itemIndex - 1)\n }\"\n >\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\"><span class=\"k-list-item-text\">{{ getText(dataItem.value) }}</span></ng-template>\n </li>\n </ng-template>\n <kendo-resize-sensor\n *ngIf=\"!virtual\"\n (resize)=\"listResize.emit()\"\n >\n </kendo-resize-sensor>\n </ul>\n <div *ngIf=\"virtual\" #virtualContainer class=\"k-height-container\" role=\"presentation\">\n <div [style.height.px]=\"scrollHeight\">\n <kendo-resize-sensor (resize)=\"listResize.emit()\"></kendo-resize-sensor>\n </div>\n </div>\n </div>\n "
|
|
1762
1877
|
}),
|
|
1763
1878
|
__metadata("design:paramtypes", [DataService,
|
|
1764
1879
|
ElementRef,
|
|
@@ -1936,6 +2051,9 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
1936
2051
|
this._value = "";
|
|
1937
2052
|
this.valueChangeSubject = new Subject();
|
|
1938
2053
|
this._isFocused = false;
|
|
2054
|
+
this._size = 'medium';
|
|
2055
|
+
this._rounded = 'medium';
|
|
2056
|
+
this._fillMode = 'solid';
|
|
1939
2057
|
validatePackage(packageMetadata);
|
|
1940
2058
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
1941
2059
|
this.wrapper = this.hostElement.nativeElement;
|
|
@@ -2186,12 +2304,85 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2186
2304
|
enumerable: true,
|
|
2187
2305
|
configurable: true
|
|
2188
2306
|
});
|
|
2307
|
+
Object.defineProperty(AutoCompleteComponent.prototype, "size", {
|
|
2308
|
+
get: function () {
|
|
2309
|
+
return this._size;
|
|
2310
|
+
},
|
|
2311
|
+
/**
|
|
2312
|
+
* Sets the size of the component.
|
|
2313
|
+
*
|
|
2314
|
+
* The possible values are:
|
|
2315
|
+
* * `'small'`
|
|
2316
|
+
* * `'medium'` (default)
|
|
2317
|
+
* * `'large'`
|
|
2318
|
+
* * `null`
|
|
2319
|
+
*
|
|
2320
|
+
*/
|
|
2321
|
+
set: function (size) {
|
|
2322
|
+
this.renderer.removeClass(this.wrapper, getSizeClass('input', this.size));
|
|
2323
|
+
if (size) {
|
|
2324
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', size));
|
|
2325
|
+
}
|
|
2326
|
+
this._size = size;
|
|
2327
|
+
},
|
|
2328
|
+
enumerable: true,
|
|
2329
|
+
configurable: true
|
|
2330
|
+
});
|
|
2331
|
+
Object.defineProperty(AutoCompleteComponent.prototype, "rounded", {
|
|
2332
|
+
get: function () {
|
|
2333
|
+
return this._rounded;
|
|
2334
|
+
},
|
|
2335
|
+
/**
|
|
2336
|
+
* Sets the border radius of the component.
|
|
2337
|
+
*
|
|
2338
|
+
* The possible values are:
|
|
2339
|
+
* * `'small'`
|
|
2340
|
+
* * `'medium'` (default)
|
|
2341
|
+
* * `'large'`
|
|
2342
|
+
* * `'full'`
|
|
2343
|
+
* * `null`
|
|
2344
|
+
*
|
|
2345
|
+
*/
|
|
2346
|
+
set: function (rounded) {
|
|
2347
|
+
this.renderer.removeClass(this.wrapper, getRoundedClass(this.rounded));
|
|
2348
|
+
if (rounded) {
|
|
2349
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(rounded));
|
|
2350
|
+
}
|
|
2351
|
+
this._rounded = rounded;
|
|
2352
|
+
},
|
|
2353
|
+
enumerable: true,
|
|
2354
|
+
configurable: true
|
|
2355
|
+
});
|
|
2356
|
+
Object.defineProperty(AutoCompleteComponent.prototype, "fillMode", {
|
|
2357
|
+
get: function () {
|
|
2358
|
+
return this._fillMode;
|
|
2359
|
+
},
|
|
2360
|
+
/**
|
|
2361
|
+
* Sets the fillMode of the component.
|
|
2362
|
+
*
|
|
2363
|
+
* The possible values are:
|
|
2364
|
+
* * `'flat'`
|
|
2365
|
+
* * `'solid'` (default)
|
|
2366
|
+
* * `'outline'`
|
|
2367
|
+
* * `null`
|
|
2368
|
+
*
|
|
2369
|
+
*/
|
|
2370
|
+
set: function (fillMode) {
|
|
2371
|
+
this.renderer.removeClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
2372
|
+
if (fillMode) {
|
|
2373
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', fillMode));
|
|
2374
|
+
}
|
|
2375
|
+
this._fillMode = fillMode;
|
|
2376
|
+
},
|
|
2377
|
+
enumerable: true,
|
|
2378
|
+
configurable: true
|
|
2379
|
+
});
|
|
2189
2380
|
Object.defineProperty(AutoCompleteComponent.prototype, "isFocused", {
|
|
2190
2381
|
get: function () {
|
|
2191
2382
|
return this._isFocused;
|
|
2192
2383
|
},
|
|
2193
2384
|
set: function (isFocused) {
|
|
2194
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-
|
|
2385
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
|
|
2195
2386
|
this._isFocused = isFocused;
|
|
2196
2387
|
},
|
|
2197
2388
|
enumerable: true,
|
|
@@ -2204,6 +2395,13 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2204
2395
|
enumerable: true,
|
|
2205
2396
|
configurable: true
|
|
2206
2397
|
});
|
|
2398
|
+
Object.defineProperty(AutoCompleteComponent.prototype, "isLoading", {
|
|
2399
|
+
get: function () {
|
|
2400
|
+
return this.loading;
|
|
2401
|
+
},
|
|
2402
|
+
enumerable: true,
|
|
2403
|
+
configurable: true
|
|
2404
|
+
});
|
|
2207
2405
|
Object.defineProperty(AutoCompleteComponent.prototype, "dir", {
|
|
2208
2406
|
get: function () {
|
|
2209
2407
|
return this.direction;
|
|
@@ -2222,6 +2420,7 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2222
2420
|
_this.setMessages();
|
|
2223
2421
|
});
|
|
2224
2422
|
this.setMessages();
|
|
2423
|
+
this.setComponentClasses();
|
|
2225
2424
|
};
|
|
2226
2425
|
AutoCompleteComponent.prototype.ngOnDestroy = function () {
|
|
2227
2426
|
this.destroyPopup();
|
|
@@ -2658,6 +2857,17 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2658
2857
|
});
|
|
2659
2858
|
});
|
|
2660
2859
|
};
|
|
2860
|
+
AutoCompleteComponent.prototype.setComponentClasses = function () {
|
|
2861
|
+
if (this.size) {
|
|
2862
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', this.size));
|
|
2863
|
+
}
|
|
2864
|
+
if (this.rounded) {
|
|
2865
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(this.rounded));
|
|
2866
|
+
}
|
|
2867
|
+
if (this.fillMode) {
|
|
2868
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
2869
|
+
}
|
|
2870
|
+
};
|
|
2661
2871
|
var AutoCompleteComponent_1;
|
|
2662
2872
|
__decorate([
|
|
2663
2873
|
Input(),
|
|
@@ -2737,6 +2947,21 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2737
2947
|
__metadata("design:type", Object),
|
|
2738
2948
|
__metadata("design:paramtypes", [Object])
|
|
2739
2949
|
], AutoCompleteComponent.prototype, "virtual", null);
|
|
2950
|
+
__decorate([
|
|
2951
|
+
Input(),
|
|
2952
|
+
__metadata("design:type", String),
|
|
2953
|
+
__metadata("design:paramtypes", [String])
|
|
2954
|
+
], AutoCompleteComponent.prototype, "size", null);
|
|
2955
|
+
__decorate([
|
|
2956
|
+
Input(),
|
|
2957
|
+
__metadata("design:type", String),
|
|
2958
|
+
__metadata("design:paramtypes", [String])
|
|
2959
|
+
], AutoCompleteComponent.prototype, "rounded", null);
|
|
2960
|
+
__decorate([
|
|
2961
|
+
Input(),
|
|
2962
|
+
__metadata("design:type", String),
|
|
2963
|
+
__metadata("design:paramtypes", [String])
|
|
2964
|
+
], AutoCompleteComponent.prototype, "fillMode", null);
|
|
2740
2965
|
__decorate([
|
|
2741
2966
|
Output(),
|
|
2742
2967
|
__metadata("design:type", EventEmitter)
|
|
@@ -2810,15 +3035,20 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2810
3035
|
__metadata("design:type", ListComponent)
|
|
2811
3036
|
], AutoCompleteComponent.prototype, "optionsList", void 0);
|
|
2812
3037
|
__decorate([
|
|
2813
|
-
HostBinding('class.k-widget'),
|
|
2814
3038
|
HostBinding('class.k-autocomplete'),
|
|
3039
|
+
HostBinding('class.k-input'),
|
|
2815
3040
|
__metadata("design:type", Boolean)
|
|
2816
3041
|
], AutoCompleteComponent.prototype, "widgetClasses", void 0);
|
|
2817
3042
|
__decorate([
|
|
2818
|
-
HostBinding('class.k-
|
|
3043
|
+
HostBinding('class.k-disabled'),
|
|
2819
3044
|
__metadata("design:type", Boolean),
|
|
2820
3045
|
__metadata("design:paramtypes", [])
|
|
2821
3046
|
], AutoCompleteComponent.prototype, "isDisabled", null);
|
|
3047
|
+
__decorate([
|
|
3048
|
+
HostBinding('class.k-loading'),
|
|
3049
|
+
__metadata("design:type", Boolean),
|
|
3050
|
+
__metadata("design:paramtypes", [])
|
|
3051
|
+
], AutoCompleteComponent.prototype, "isLoading", null);
|
|
2822
3052
|
__decorate([
|
|
2823
3053
|
HostBinding('attr.dir'),
|
|
2824
3054
|
__metadata("design:type", Object),
|
|
@@ -2848,7 +3078,7 @@ var AutoCompleteComponent = /** @class */ (function () {
|
|
|
2848
3078
|
}
|
|
2849
3079
|
],
|
|
2850
3080
|
selector: 'kendo-autocomplete',
|
|
2851
|
-
template: "\n <ng-container kendoAutoCompleteLocalizedMessages\n i18n-noDataText=\"kendo.autocomplete.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.autocomplete.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-searchbar #searchbar\n [role]=\"'combobox'\"\n [id]=\"focusableId\"\n [listId]=\"listBoxId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [suggestedText]=\"suggestion\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"searchBarChange($event)\"\n (onBlur)=\"handleBlur()\"\n (onFocus)=\"handleFocus()\"\n ></kendo-searchbar>\n <span\n *ngIf=\"!loading && !readonly && (clearButton && text?.length)\"\n class=\"k-
|
|
3081
|
+
template: "\n <ng-container kendoAutoCompleteLocalizedMessages\n i18n-noDataText=\"kendo.autocomplete.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.autocomplete.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-searchbar #searchbar\n [role]=\"'combobox'\"\n [id]=\"focusableId\"\n [listId]=\"listBoxId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [suggestedText]=\"suggestion\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"searchBarChange($event)\"\n (onBlur)=\"handleBlur()\"\n (onFocus)=\"handleFocus()\"\n ></kendo-searchbar>\n <span\n *ngIf=\"!loading && !readonly && (clearButton && text?.length)\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n [attr.title]=\"clearTitle\"\n role=\"button\"\n tabindex=\"-1\"\n (click)=\"clearValue($event)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <span *ngIf=\"loading\" class=\"k-icon k-i-loading\"></span>\n <ng-template #popupTemplate>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"valueField\"\n [valueField]=\"valueField\"\n [template]=\"template\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate?.templateRef\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
2852
3082
|
}),
|
|
2853
3083
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
2854
3084
|
__metadata("design:paramtypes", [LocalizationService,
|
|
@@ -2951,7 +3181,8 @@ var COMBOBOX_VALUE_ACCESSOR = {
|
|
|
2951
3181
|
* ```
|
|
2952
3182
|
*/
|
|
2953
3183
|
var ComboBoxComponent = /** @class */ (function () {
|
|
2954
|
-
function ComboBoxComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer,
|
|
3184
|
+
function ComboBoxComponent(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, touchEnabled$$1) {
|
|
3185
|
+
this.wrapper = wrapper;
|
|
2955
3186
|
this.localization = localization;
|
|
2956
3187
|
this.popupService = popupService;
|
|
2957
3188
|
this.selectionService = selectionService;
|
|
@@ -2961,7 +3192,6 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
2961
3192
|
this.zone = zone;
|
|
2962
3193
|
this.cdr = cdr;
|
|
2963
3194
|
this.renderer = renderer;
|
|
2964
|
-
this.hostElement = hostElement;
|
|
2965
3195
|
this.touchEnabled = touchEnabled$$1;
|
|
2966
3196
|
this.selected = [];
|
|
2967
3197
|
/**
|
|
@@ -3128,6 +3358,9 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3128
3358
|
this.valueSubject = new Subject();
|
|
3129
3359
|
this.clearValueSubject = new Subject();
|
|
3130
3360
|
this.subs = new Subscription();
|
|
3361
|
+
this._size = 'medium';
|
|
3362
|
+
this._rounded = 'medium';
|
|
3363
|
+
this._fillMode = 'solid';
|
|
3131
3364
|
validatePackage(packageMetadata);
|
|
3132
3365
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
3133
3366
|
this.data = [];
|
|
@@ -3331,9 +3564,89 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3331
3564
|
enumerable: true,
|
|
3332
3565
|
configurable: true
|
|
3333
3566
|
});
|
|
3334
|
-
Object.defineProperty(ComboBoxComponent.prototype, "
|
|
3567
|
+
Object.defineProperty(ComboBoxComponent.prototype, "size", {
|
|
3568
|
+
get: function () {
|
|
3569
|
+
return this._size;
|
|
3570
|
+
},
|
|
3571
|
+
/**
|
|
3572
|
+
* Sets the size of the component.
|
|
3573
|
+
*
|
|
3574
|
+
* The possible values are:
|
|
3575
|
+
* * `'small'`
|
|
3576
|
+
* * `'medium'` (default)
|
|
3577
|
+
* * `'large'`
|
|
3578
|
+
* * `null`
|
|
3579
|
+
*
|
|
3580
|
+
*/
|
|
3581
|
+
set: function (size) {
|
|
3582
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
3583
|
+
if (size) {
|
|
3584
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
3585
|
+
}
|
|
3586
|
+
this._size = size;
|
|
3587
|
+
},
|
|
3588
|
+
enumerable: true,
|
|
3589
|
+
configurable: true
|
|
3590
|
+
});
|
|
3591
|
+
Object.defineProperty(ComboBoxComponent.prototype, "rounded", {
|
|
3592
|
+
get: function () {
|
|
3593
|
+
return this._rounded;
|
|
3594
|
+
},
|
|
3595
|
+
/**
|
|
3596
|
+
* Sets the border radius of the component.
|
|
3597
|
+
*
|
|
3598
|
+
* The possible values are:
|
|
3599
|
+
* * `'small'`
|
|
3600
|
+
* * `'medium'` (default)
|
|
3601
|
+
* * `'large'`
|
|
3602
|
+
* * `'full'`
|
|
3603
|
+
* * `null`
|
|
3604
|
+
*
|
|
3605
|
+
*/
|
|
3606
|
+
set: function (rounded) {
|
|
3607
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
3608
|
+
if (rounded) {
|
|
3609
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
3610
|
+
}
|
|
3611
|
+
this._rounded = rounded;
|
|
3612
|
+
},
|
|
3613
|
+
enumerable: true,
|
|
3614
|
+
configurable: true
|
|
3615
|
+
});
|
|
3616
|
+
Object.defineProperty(ComboBoxComponent.prototype, "fillMode", {
|
|
3617
|
+
get: function () {
|
|
3618
|
+
return this._fillMode;
|
|
3619
|
+
},
|
|
3620
|
+
/**
|
|
3621
|
+
* Sets the fillMode of the component.
|
|
3622
|
+
*
|
|
3623
|
+
* The possible values are:
|
|
3624
|
+
* * `'flat'`
|
|
3625
|
+
* * `'solid'` (default)
|
|
3626
|
+
* * `'outline'`
|
|
3627
|
+
* * `null`
|
|
3628
|
+
*
|
|
3629
|
+
*/
|
|
3630
|
+
set: function (fillMode) {
|
|
3631
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
3632
|
+
if (fillMode) {
|
|
3633
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
3634
|
+
}
|
|
3635
|
+
this._fillMode = fillMode;
|
|
3636
|
+
},
|
|
3637
|
+
enumerable: true,
|
|
3638
|
+
configurable: true
|
|
3639
|
+
});
|
|
3640
|
+
Object.defineProperty(ComboBoxComponent.prototype, "isDisabled", {
|
|
3641
|
+
get: function () {
|
|
3642
|
+
return this.disabled;
|
|
3643
|
+
},
|
|
3644
|
+
enumerable: true,
|
|
3645
|
+
configurable: true
|
|
3646
|
+
});
|
|
3647
|
+
Object.defineProperty(ComboBoxComponent.prototype, "isLoading", {
|
|
3335
3648
|
get: function () {
|
|
3336
|
-
return this.
|
|
3649
|
+
return this.loading;
|
|
3337
3650
|
},
|
|
3338
3651
|
enumerable: true,
|
|
3339
3652
|
configurable: true
|
|
@@ -3350,7 +3663,7 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3350
3663
|
return this._isFocused;
|
|
3351
3664
|
},
|
|
3352
3665
|
set: function (value) {
|
|
3353
|
-
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-
|
|
3666
|
+
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-focus");
|
|
3354
3667
|
this._isFocused = value;
|
|
3355
3668
|
},
|
|
3356
3669
|
enumerable: true,
|
|
@@ -3388,12 +3701,13 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3388
3701
|
configurable: true
|
|
3389
3702
|
});
|
|
3390
3703
|
ComboBoxComponent.prototype.ngOnInit = function () {
|
|
3391
|
-
this.renderer.removeAttribute(this.
|
|
3704
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
3392
3705
|
this.attachStreams();
|
|
3393
3706
|
this.createValueStream();
|
|
3394
3707
|
this.subscribeTouchEvents();
|
|
3395
3708
|
this.attachSelectClickHandler();
|
|
3396
3709
|
this.setMessages();
|
|
3710
|
+
this.setComponentClasses();
|
|
3397
3711
|
};
|
|
3398
3712
|
ComboBoxComponent.prototype.createValueStream = function () {
|
|
3399
3713
|
var _this = this;
|
|
@@ -3683,6 +3997,16 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3683
3997
|
enumerable: true,
|
|
3684
3998
|
configurable: true
|
|
3685
3999
|
});
|
|
4000
|
+
Object.defineProperty(ComboBoxComponent.prototype, "selectButtonClasses", {
|
|
4001
|
+
/**
|
|
4002
|
+
* @hidden
|
|
4003
|
+
*/
|
|
4004
|
+
get: function () {
|
|
4005
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '') + "\n ";
|
|
4006
|
+
},
|
|
4007
|
+
enumerable: true,
|
|
4008
|
+
configurable: true
|
|
4009
|
+
});
|
|
3686
4010
|
/**
|
|
3687
4011
|
* @hidden
|
|
3688
4012
|
*/
|
|
@@ -3914,7 +4238,7 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
3914
4238
|
var currentText = this.searchbar.value;
|
|
3915
4239
|
var textHasChanged = currentText !== (getter$1(this.dataItem, this.textField) || '');
|
|
3916
4240
|
var valueHasChanged = unresolvedSelection || textHasChanged;
|
|
3917
|
-
var runInZone = valueHasChanged || hasObservers(this.onBlur) || hasObservers(this.close) || isUntouched(this.
|
|
4241
|
+
var runInZone = valueHasChanged || hasObservers(this.onBlur) || hasObservers(this.close) || isUntouched(this.wrapper.nativeElement);
|
|
3918
4242
|
if (runInZone) {
|
|
3919
4243
|
this.zone.run(function () {
|
|
3920
4244
|
if (valueHasChanged) {
|
|
@@ -4152,7 +4476,7 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4152
4476
|
// Roll up ComboBox on iOS when tapped outside
|
|
4153
4477
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
4154
4478
|
var target = e.target;
|
|
4155
|
-
var isInDropDown = inDropDown(_this.
|
|
4479
|
+
var isInDropDown = inDropDown(_this.wrapper, target, _this.popupRef);
|
|
4156
4480
|
if (_this.isFocused && !isInDropDown) {
|
|
4157
4481
|
// Close popup and mobile keyboard if searchbar is focused
|
|
4158
4482
|
_this.zone.run(function () { return _this.blur(); });
|
|
@@ -4169,6 +4493,17 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4169
4493
|
var event = pointers ? 'pointerdown' : 'click';
|
|
4170
4494
|
this.selectClickDisposeHandler = this.renderer.listen(selectElement, event, this.selectClick.bind(this));
|
|
4171
4495
|
};
|
|
4496
|
+
ComboBoxComponent.prototype.setComponentClasses = function () {
|
|
4497
|
+
if (this.size) {
|
|
4498
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
4499
|
+
}
|
|
4500
|
+
if (this.rounded) {
|
|
4501
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
4502
|
+
}
|
|
4503
|
+
if (this.fillMode) {
|
|
4504
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
4505
|
+
}
|
|
4506
|
+
};
|
|
4172
4507
|
var ComboBoxComponent_1;
|
|
4173
4508
|
__decorate([
|
|
4174
4509
|
Input(),
|
|
@@ -4265,6 +4600,21 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4265
4600
|
__metadata("design:type", Object),
|
|
4266
4601
|
__metadata("design:paramtypes", [Object])
|
|
4267
4602
|
], ComboBoxComponent.prototype, "virtual", null);
|
|
4603
|
+
__decorate([
|
|
4604
|
+
Input(),
|
|
4605
|
+
__metadata("design:type", String),
|
|
4606
|
+
__metadata("design:paramtypes", [String])
|
|
4607
|
+
], ComboBoxComponent.prototype, "size", null);
|
|
4608
|
+
__decorate([
|
|
4609
|
+
Input(),
|
|
4610
|
+
__metadata("design:type", String),
|
|
4611
|
+
__metadata("design:paramtypes", [String])
|
|
4612
|
+
], ComboBoxComponent.prototype, "rounded", null);
|
|
4613
|
+
__decorate([
|
|
4614
|
+
Input(),
|
|
4615
|
+
__metadata("design:type", String),
|
|
4616
|
+
__metadata("design:paramtypes", [String])
|
|
4617
|
+
], ComboBoxComponent.prototype, "fillMode", null);
|
|
4268
4618
|
__decorate([
|
|
4269
4619
|
Output(),
|
|
4270
4620
|
__metadata("design:type", EventEmitter)
|
|
@@ -4341,24 +4691,25 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4341
4691
|
ViewChild('optionsList', { static: false }),
|
|
4342
4692
|
__metadata("design:type", ListComponent)
|
|
4343
4693
|
], ComboBoxComponent.prototype, "optionsList", void 0);
|
|
4344
|
-
__decorate([
|
|
4345
|
-
ViewChild('wrapper', { static: true }),
|
|
4346
|
-
__metadata("design:type", ElementRef)
|
|
4347
|
-
], ComboBoxComponent.prototype, "wrapper", void 0);
|
|
4348
4694
|
__decorate([
|
|
4349
4695
|
ViewChild('select', { static: true }),
|
|
4350
4696
|
__metadata("design:type", ElementRef)
|
|
4351
4697
|
], ComboBoxComponent.prototype, "select", void 0);
|
|
4352
4698
|
__decorate([
|
|
4353
|
-
HostBinding('class.k-widget'),
|
|
4354
4699
|
HostBinding('class.k-combobox'),
|
|
4700
|
+
HostBinding('class.k-input'),
|
|
4355
4701
|
__metadata("design:type", Boolean)
|
|
4356
4702
|
], ComboBoxComponent.prototype, "widgetClasses", void 0);
|
|
4357
4703
|
__decorate([
|
|
4358
|
-
HostBinding('class.k-
|
|
4704
|
+
HostBinding('class.k-disabled'),
|
|
4359
4705
|
__metadata("design:type", Boolean),
|
|
4360
4706
|
__metadata("design:paramtypes", [])
|
|
4361
|
-
], ComboBoxComponent.prototype, "
|
|
4707
|
+
], ComboBoxComponent.prototype, "isDisabled", null);
|
|
4708
|
+
__decorate([
|
|
4709
|
+
HostBinding('class.k-loading'),
|
|
4710
|
+
__metadata("design:type", Boolean),
|
|
4711
|
+
__metadata("design:paramtypes", [])
|
|
4712
|
+
], ComboBoxComponent.prototype, "isLoading", null);
|
|
4362
4713
|
__decorate([
|
|
4363
4714
|
HostBinding('attr.dir'),
|
|
4364
4715
|
__metadata("design:type", Object),
|
|
@@ -4386,10 +4737,11 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4386
4737
|
}
|
|
4387
4738
|
],
|
|
4388
4739
|
selector: 'kendo-combobox',
|
|
4389
|
-
template: "\n <ng-container kendoComboBoxLocalizedMessages\n i18n-noDataText=\"kendo.combobox.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <
|
|
4740
|
+
template: "\n <ng-container kendoComboBoxLocalizedMessages\n i18n-noDataText=\"kendo.combobox.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-searchbar #searchbar\n [role]=\"'combobox'\"\n [id]=\"focusableId\"\n [listId]=\"listBoxId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [suggestedText]=\"getSuggestion()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"searchBarChange($event)\"\n (onBlur)=\"handleBlur()\"\n (onFocus)=\"handleFocus()\"\n ></kendo-searchbar>\n <span\n *ngIf=\"clearButton && !loading && !disabled && !readonly && text?.length\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n aria-hidden=\"true\"\n [attr.title]=\"clearTitle\"\n (click)=\"clearValue($event)\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventEventDefault\n }\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n <button\n #select\n aria-hidden=\"true\"\n unselectable=\"on\"\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventEventDefault\n }\"\n >\n <span class=\"k-button-icon k-icon\" [ngClass]=\"buttonClasses\"></span>\n </button>\n <ng-template #popupTemplate>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"template\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
4390
4741
|
}),
|
|
4391
4742
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
4392
|
-
__metadata("design:paramtypes", [
|
|
4743
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
4744
|
+
LocalizationService,
|
|
4393
4745
|
PopupService,
|
|
4394
4746
|
SelectionService,
|
|
4395
4747
|
NavigationService,
|
|
@@ -4397,8 +4749,7 @@ var ComboBoxComponent = /** @class */ (function () {
|
|
|
4397
4749
|
DataService,
|
|
4398
4750
|
NgZone,
|
|
4399
4751
|
ChangeDetectorRef,
|
|
4400
|
-
Renderer2,
|
|
4401
|
-
ElementRef, Boolean])
|
|
4752
|
+
Renderer2, Boolean])
|
|
4402
4753
|
], ComboBoxComponent);
|
|
4403
4754
|
return ComboBoxComponent;
|
|
4404
4755
|
}());
|
|
@@ -4472,7 +4823,8 @@ var DROPDOWNLIST_VALUE_ACCESSOR = {
|
|
|
4472
4823
|
* ```
|
|
4473
4824
|
*/
|
|
4474
4825
|
var DropDownListComponent = /** @class */ (function () {
|
|
4475
|
-
function DropDownListComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer,
|
|
4826
|
+
function DropDownListComponent(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled$$1) {
|
|
4827
|
+
this.wrapper = wrapper;
|
|
4476
4828
|
this.localization = localization;
|
|
4477
4829
|
this.popupService = popupService;
|
|
4478
4830
|
this.selectionService = selectionService;
|
|
@@ -4481,13 +4833,8 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4481
4833
|
this.dataService = dataService;
|
|
4482
4834
|
this._zone = _zone;
|
|
4483
4835
|
this.renderer = renderer;
|
|
4484
|
-
this.hostElement = hostElement;
|
|
4485
4836
|
this.cdr = cdr;
|
|
4486
4837
|
this.touchEnabled = touchEnabled$$1;
|
|
4487
|
-
/**
|
|
4488
|
-
* @hidden
|
|
4489
|
-
*/
|
|
4490
|
-
this.focusableId = "k-" + guid$1();
|
|
4491
4838
|
/**
|
|
4492
4839
|
* Sets the height of the options list. By default, `listHeight` is 200px.
|
|
4493
4840
|
*
|
|
@@ -4565,7 +4912,12 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4565
4912
|
* Fires each time the DropDownList gets blurred.
|
|
4566
4913
|
*/
|
|
4567
4914
|
this.onBlur = new EventEmitter();
|
|
4568
|
-
this.
|
|
4915
|
+
this.hostClasses = true;
|
|
4916
|
+
/**
|
|
4917
|
+
* @hidden
|
|
4918
|
+
*/
|
|
4919
|
+
this.focusableId = "k-" + guid$1();
|
|
4920
|
+
this.role = 'listbox';
|
|
4569
4921
|
this.groupIndices = [];
|
|
4570
4922
|
this.listBoxId = guid$1();
|
|
4571
4923
|
this.optionPrefix = guid$1();
|
|
@@ -4577,16 +4929,20 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4577
4929
|
this.last = "";
|
|
4578
4930
|
this.filterFocused = new EventEmitter();
|
|
4579
4931
|
this.filterBlurred = new EventEmitter();
|
|
4580
|
-
this.
|
|
4581
|
-
this.
|
|
4932
|
+
this.hostElementFocused = new EventEmitter();
|
|
4933
|
+
this.hostElementBlurred = new EventEmitter();
|
|
4582
4934
|
this.selectionSubscription = new Subscription();
|
|
4583
4935
|
this._open = false;
|
|
4584
4936
|
this._popupSettings = { animate: true };
|
|
4937
|
+
this._size = 'medium';
|
|
4938
|
+
this._rounded = 'medium';
|
|
4939
|
+
this._fillMode = 'solid';
|
|
4585
4940
|
validatePackage(packageMetadata);
|
|
4586
4941
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
4587
4942
|
this.data = [];
|
|
4588
4943
|
this.subscribeEvents();
|
|
4589
4944
|
this.subscribeTouchEvents();
|
|
4945
|
+
this.subscribeFocusEvents();
|
|
4590
4946
|
this.popupMouseDownHandler = this.onMouseDown.bind(this);
|
|
4591
4947
|
}
|
|
4592
4948
|
DropDownListComponent_1 = DropDownListComponent;
|
|
@@ -4795,11 +5151,88 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4795
5151
|
enumerable: true,
|
|
4796
5152
|
configurable: true
|
|
4797
5153
|
});
|
|
5154
|
+
Object.defineProperty(DropDownListComponent.prototype, "size", {
|
|
5155
|
+
get: function () {
|
|
5156
|
+
return this._size;
|
|
5157
|
+
},
|
|
5158
|
+
/**
|
|
5159
|
+
* Sets the size of the component.
|
|
5160
|
+
*
|
|
5161
|
+
* The possible values are:
|
|
5162
|
+
* * `'small'`
|
|
5163
|
+
* * `'medium'` (default)
|
|
5164
|
+
* * `'large'`
|
|
5165
|
+
* * `null`
|
|
5166
|
+
*
|
|
5167
|
+
*/
|
|
5168
|
+
set: function (size) {
|
|
5169
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
5170
|
+
if (size) {
|
|
5171
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
5172
|
+
}
|
|
5173
|
+
this._size = size;
|
|
5174
|
+
},
|
|
5175
|
+
enumerable: true,
|
|
5176
|
+
configurable: true
|
|
5177
|
+
});
|
|
5178
|
+
Object.defineProperty(DropDownListComponent.prototype, "rounded", {
|
|
5179
|
+
get: function () {
|
|
5180
|
+
return this._rounded;
|
|
5181
|
+
},
|
|
5182
|
+
/**
|
|
5183
|
+
* Sets the border radius of the component.
|
|
5184
|
+
*
|
|
5185
|
+
* The possible values are:
|
|
5186
|
+
* * `'small'`
|
|
5187
|
+
* * `'medium'` (default)
|
|
5188
|
+
* * `'large'`
|
|
5189
|
+
* * `'full'`
|
|
5190
|
+
* * `null`
|
|
5191
|
+
*
|
|
5192
|
+
*/
|
|
5193
|
+
set: function (rounded) {
|
|
5194
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
5195
|
+
if (rounded) {
|
|
5196
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
5197
|
+
}
|
|
5198
|
+
this._rounded = rounded;
|
|
5199
|
+
},
|
|
5200
|
+
enumerable: true,
|
|
5201
|
+
configurable: true
|
|
5202
|
+
});
|
|
5203
|
+
Object.defineProperty(DropDownListComponent.prototype, "fillMode", {
|
|
5204
|
+
get: function () {
|
|
5205
|
+
return this._fillMode;
|
|
5206
|
+
},
|
|
5207
|
+
/**
|
|
5208
|
+
* Sets the fillMode of the component.
|
|
5209
|
+
*
|
|
5210
|
+
* The possible values are:
|
|
5211
|
+
* * `'flat'`
|
|
5212
|
+
* * `'solid'` (default)
|
|
5213
|
+
* * `'outline'`
|
|
5214
|
+
* * `null`
|
|
5215
|
+
*
|
|
5216
|
+
*/
|
|
5217
|
+
set: function (fillMode) {
|
|
5218
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
5219
|
+
if (fillMode) {
|
|
5220
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
5221
|
+
}
|
|
5222
|
+
this._fillMode = fillMode;
|
|
5223
|
+
},
|
|
5224
|
+
enumerable: true,
|
|
5225
|
+
configurable: true
|
|
5226
|
+
});
|
|
4798
5227
|
/**
|
|
4799
5228
|
* @hidden
|
|
4800
5229
|
*/
|
|
4801
|
-
DropDownListComponent.prototype.blurComponent = function () {
|
|
4802
|
-
this.
|
|
5230
|
+
DropDownListComponent.prototype.blurComponent = function (event) {
|
|
5231
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5232
|
+
return;
|
|
5233
|
+
}
|
|
5234
|
+
event.stopImmediatePropagation();
|
|
5235
|
+
this.hostElementBlurred.emit();
|
|
4803
5236
|
};
|
|
4804
5237
|
/**
|
|
4805
5238
|
* @hidden
|
|
@@ -4810,9 +5243,13 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4810
5243
|
/**
|
|
4811
5244
|
* @hidden
|
|
4812
5245
|
*/
|
|
4813
|
-
DropDownListComponent.prototype.focusComponent = function () {
|
|
5246
|
+
DropDownListComponent.prototype.focusComponent = function (event) {
|
|
4814
5247
|
var _this = this;
|
|
4815
|
-
this.
|
|
5248
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5249
|
+
return;
|
|
5250
|
+
}
|
|
5251
|
+
event.stopImmediatePropagation();
|
|
5252
|
+
this.hostElementFocused.emit();
|
|
4816
5253
|
if (!this.isFocused) {
|
|
4817
5254
|
this.isFocused = true;
|
|
4818
5255
|
if (hasObservers(this.onFocus)) {
|
|
@@ -4825,26 +5262,100 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4825
5262
|
/**
|
|
4826
5263
|
* @hidden
|
|
4827
5264
|
*/
|
|
4828
|
-
DropDownListComponent.prototype.
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
}
|
|
4835
|
-
var isHomeEnd = event.keyCode === Keys.Home || event.keyCode === Keys.End;
|
|
4836
|
-
var isFilterFocused = this.filterable && this.isFocused && this.isOpen;
|
|
4837
|
-
if (isFilterFocused && isHomeEnd) {
|
|
4838
|
-
return;
|
|
5265
|
+
DropDownListComponent.prototype.onResize = function () {
|
|
5266
|
+
if (this._open) {
|
|
5267
|
+
var popupWrapper = this.popupRef.popupElement;
|
|
5268
|
+
var _a = this.width, min = _a.min, max = _a.max;
|
|
5269
|
+
popupWrapper.style.minWidth = min;
|
|
5270
|
+
popupWrapper.style.width = max;
|
|
4839
5271
|
}
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
5272
|
+
};
|
|
5273
|
+
Object.defineProperty(DropDownListComponent.prototype, "isDisabled", {
|
|
5274
|
+
get: function () {
|
|
5275
|
+
return this.disabled;
|
|
5276
|
+
},
|
|
5277
|
+
enumerable: true,
|
|
5278
|
+
configurable: true
|
|
5279
|
+
});
|
|
5280
|
+
Object.defineProperty(DropDownListComponent.prototype, "isLoading", {
|
|
5281
|
+
get: function () {
|
|
5282
|
+
return this.loading;
|
|
5283
|
+
},
|
|
5284
|
+
enumerable: true,
|
|
5285
|
+
configurable: true
|
|
5286
|
+
});
|
|
5287
|
+
Object.defineProperty(DropDownListComponent.prototype, "dir", {
|
|
5288
|
+
get: function () {
|
|
5289
|
+
return this.direction;
|
|
5290
|
+
},
|
|
5291
|
+
enumerable: true,
|
|
5292
|
+
configurable: true
|
|
5293
|
+
});
|
|
5294
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostTabIndex", {
|
|
5295
|
+
get: function () {
|
|
5296
|
+
return this.widgetTabIndex;
|
|
5297
|
+
},
|
|
5298
|
+
enumerable: true,
|
|
5299
|
+
configurable: true
|
|
5300
|
+
});
|
|
5301
|
+
Object.defineProperty(DropDownListComponent.prototype, "isReadonly", {
|
|
5302
|
+
get: function () {
|
|
5303
|
+
return this.readonly;
|
|
5304
|
+
},
|
|
5305
|
+
enumerable: true,
|
|
5306
|
+
configurable: true
|
|
5307
|
+
});
|
|
5308
|
+
Object.defineProperty(DropDownListComponent.prototype, "isAriaExpanded", {
|
|
5309
|
+
get: function () {
|
|
5310
|
+
return this.ariaExpanded;
|
|
5311
|
+
},
|
|
5312
|
+
enumerable: true,
|
|
5313
|
+
configurable: true
|
|
5314
|
+
});
|
|
5315
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostAriaOwns", {
|
|
5316
|
+
get: function () {
|
|
5317
|
+
return this.ariaOwns;
|
|
5318
|
+
},
|
|
5319
|
+
enumerable: true,
|
|
5320
|
+
configurable: true
|
|
5321
|
+
});
|
|
5322
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostAriaActivedescendant", {
|
|
5323
|
+
get: function () {
|
|
5324
|
+
return this.ariaActivedescendant;
|
|
5325
|
+
},
|
|
5326
|
+
enumerable: true,
|
|
5327
|
+
configurable: true
|
|
5328
|
+
});
|
|
5329
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostNoDataLabel", {
|
|
5330
|
+
get: function () {
|
|
5331
|
+
return this.noDataLabel;
|
|
5332
|
+
},
|
|
5333
|
+
enumerable: true,
|
|
5334
|
+
configurable: true
|
|
5335
|
+
});
|
|
5336
|
+
/**
|
|
5337
|
+
* @hidden
|
|
5338
|
+
*/
|
|
5339
|
+
DropDownListComponent.prototype.keydown = function (event) {
|
|
5340
|
+
var firstIndex = isPresent(this.defaultItem) ? -1 : 0;
|
|
5341
|
+
var focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
|
|
5342
|
+
var offset = 0;
|
|
5343
|
+
if (this.disabled || this.readonly) {
|
|
5344
|
+
return;
|
|
5345
|
+
}
|
|
5346
|
+
var isHomeEnd = event.keyCode === Keys.Home || event.keyCode === Keys.End;
|
|
5347
|
+
var isFilterFocused = this.filterable && this.isFocused && this.isOpen;
|
|
5348
|
+
if (isFilterFocused && isHomeEnd) {
|
|
5349
|
+
return;
|
|
5350
|
+
}
|
|
5351
|
+
var hasSelected = isPresent(this.selectionService.selected[0]);
|
|
5352
|
+
var focusedItemNotSelected = isPresent(this.selectionService.focused) && !this.selectionService.isSelected(this.selectionService.focused);
|
|
5353
|
+
if (!hasSelected || focusedItemNotSelected) {
|
|
5354
|
+
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.ArrowRight) {
|
|
5355
|
+
offset = -1;
|
|
5356
|
+
}
|
|
5357
|
+
else if (event.keyCode === Keys.ArrowUp || event.keyCode === Keys.ArrowLeft) {
|
|
5358
|
+
offset = 1;
|
|
4848
5359
|
}
|
|
4849
5360
|
}
|
|
4850
5361
|
var eventData = event;
|
|
@@ -4882,30 +5393,12 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4882
5393
|
this.focus();
|
|
4883
5394
|
this.togglePopup(!this.isOpen);
|
|
4884
5395
|
};
|
|
4885
|
-
/**
|
|
4886
|
-
* @hidden
|
|
4887
|
-
*/
|
|
4888
|
-
DropDownListComponent.prototype.onResize = function () {
|
|
4889
|
-
if (this._open) {
|
|
4890
|
-
var popupWrapper = this.popupRef.popupElement;
|
|
4891
|
-
var _a = this.width, min = _a.min, max = _a.max;
|
|
4892
|
-
popupWrapper.style.minWidth = min;
|
|
4893
|
-
popupWrapper.style.width = max;
|
|
4894
|
-
}
|
|
4895
|
-
};
|
|
4896
|
-
Object.defineProperty(DropDownListComponent.prototype, "dir", {
|
|
4897
|
-
get: function () {
|
|
4898
|
-
return this.direction;
|
|
4899
|
-
},
|
|
4900
|
-
enumerable: true,
|
|
4901
|
-
configurable: true
|
|
4902
|
-
});
|
|
4903
5396
|
Object.defineProperty(DropDownListComponent.prototype, "isFocused", {
|
|
4904
5397
|
get: function () {
|
|
4905
5398
|
return this._isFocused;
|
|
4906
5399
|
},
|
|
4907
5400
|
set: function (isFocused) {
|
|
4908
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
5401
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
4909
5402
|
this._isFocused = isFocused;
|
|
4910
5403
|
},
|
|
4911
5404
|
enumerable: true,
|
|
@@ -4913,7 +5406,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4913
5406
|
});
|
|
4914
5407
|
DropDownListComponent.prototype.ngOnInit = function () {
|
|
4915
5408
|
var _this = this;
|
|
4916
|
-
this.renderer.removeAttribute(this.
|
|
5409
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
4917
5410
|
this.localizationChangesSubscription = this.localization
|
|
4918
5411
|
.changes.subscribe(function (_a) {
|
|
4919
5412
|
var rtl = _a.rtl;
|
|
@@ -4922,6 +5415,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4922
5415
|
});
|
|
4923
5416
|
this.setMessages();
|
|
4924
5417
|
this.assignAriaDescribedBy();
|
|
5418
|
+
this.setComponentClasses();
|
|
4925
5419
|
};
|
|
4926
5420
|
/**
|
|
4927
5421
|
* @hidden
|
|
@@ -5103,6 +5597,36 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5103
5597
|
enumerable: true,
|
|
5104
5598
|
configurable: true
|
|
5105
5599
|
});
|
|
5600
|
+
Object.defineProperty(DropDownListComponent.prototype, "selectButtonClasses", {
|
|
5601
|
+
/**
|
|
5602
|
+
* @hidden
|
|
5603
|
+
*/
|
|
5604
|
+
get: function () {
|
|
5605
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
|
|
5606
|
+
},
|
|
5607
|
+
enumerable: true,
|
|
5608
|
+
configurable: true
|
|
5609
|
+
});
|
|
5610
|
+
Object.defineProperty(DropDownListComponent.prototype, "filterInputClasses", {
|
|
5611
|
+
/**
|
|
5612
|
+
* @hidden
|
|
5613
|
+
*/
|
|
5614
|
+
get: function () {
|
|
5615
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
5616
|
+
},
|
|
5617
|
+
enumerable: true,
|
|
5618
|
+
configurable: true
|
|
5619
|
+
});
|
|
5620
|
+
Object.defineProperty(DropDownListComponent.prototype, "optionLabelSizeClass", {
|
|
5621
|
+
/**
|
|
5622
|
+
* @hidden
|
|
5623
|
+
*/
|
|
5624
|
+
get: function () {
|
|
5625
|
+
return "" + (this.size ? getSizeClass('list', this.size) : '');
|
|
5626
|
+
},
|
|
5627
|
+
enumerable: true,
|
|
5628
|
+
configurable: true
|
|
5629
|
+
});
|
|
5106
5630
|
Object.defineProperty(DropDownListComponent.prototype, "listContainerClasses", {
|
|
5107
5631
|
/**
|
|
5108
5632
|
* @hidden
|
|
@@ -5250,13 +5774,13 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5250
5774
|
.subscribe(this.handleEnter.bind(this));
|
|
5251
5775
|
this.escSubscription = this.navigationService.esc
|
|
5252
5776
|
.subscribe(this.handleEscape.bind(this));
|
|
5253
|
-
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.
|
|
5777
|
+
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.hostElementFocused)); }))
|
|
5254
5778
|
.subscribe(function () {
|
|
5255
|
-
_this.
|
|
5779
|
+
_this.hostElementBlurred.emit();
|
|
5256
5780
|
});
|
|
5257
5781
|
this._zone.runOutsideAngular(function () {
|
|
5258
5782
|
_this.componentBlurredSubscription =
|
|
5259
|
-
merge(_this.
|
|
5783
|
+
merge(_this.hostElementBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.filterFocused)); })), _this.navigationService.tab).pipe(tap(function (event) { return event instanceof NavigationEvent && _this.focus(); }), filter(function () { return _this.isFocused; }))
|
|
5260
5784
|
.subscribe(function () { return _this.componentBlur(); });
|
|
5261
5785
|
});
|
|
5262
5786
|
};
|
|
@@ -5269,7 +5793,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5269
5793
|
// Roll up DropDownList on iOS when tapped outside
|
|
5270
5794
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
5271
5795
|
var target = e.target;
|
|
5272
|
-
if (_this.isFocused && !inDropDown(_this.
|
|
5796
|
+
if (_this.isFocused && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
5273
5797
|
_this._zone.run(function () {
|
|
5274
5798
|
if (_this.filterFocused) {
|
|
5275
5799
|
// Close popup if filter is focused
|
|
@@ -5281,6 +5805,25 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5281
5805
|
});
|
|
5282
5806
|
});
|
|
5283
5807
|
};
|
|
5808
|
+
DropDownListComponent.prototype.subscribeFocusEvents = function () {
|
|
5809
|
+
var _this = this;
|
|
5810
|
+
if (isDocumentAvailable()) {
|
|
5811
|
+
this.focusComponent = this.focusComponent.bind(this);
|
|
5812
|
+
this.blurComponent = this.blurComponent.bind(this);
|
|
5813
|
+
this._zone.runOutsideAngular(function () {
|
|
5814
|
+
var useCapture = true;
|
|
5815
|
+
document.addEventListener('focus', _this.focusComponent, useCapture);
|
|
5816
|
+
document.addEventListener('blur', _this.blurComponent, useCapture);
|
|
5817
|
+
});
|
|
5818
|
+
}
|
|
5819
|
+
};
|
|
5820
|
+
DropDownListComponent.prototype.unSubscribeFocusEvents = function () {
|
|
5821
|
+
if (isDocumentAvailable()) {
|
|
5822
|
+
var useCapture = true;
|
|
5823
|
+
document.removeEventListener('focus', this.focusComponent, useCapture);
|
|
5824
|
+
document.removeEventListener('blur', this.blurComponent, useCapture);
|
|
5825
|
+
}
|
|
5826
|
+
};
|
|
5284
5827
|
DropDownListComponent.prototype.unsubscribeEvents = function () {
|
|
5285
5828
|
if (!isDocumentAvailable()) {
|
|
5286
5829
|
return;
|
|
@@ -5292,6 +5835,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5292
5835
|
this.escSubscription.unsubscribe();
|
|
5293
5836
|
this.componentBlurredSubscription.unsubscribe();
|
|
5294
5837
|
this.filterBlurredSubscription.unsubscribe();
|
|
5838
|
+
this.unSubscribeFocusEvents();
|
|
5295
5839
|
if (this.touchstartDisposeHandler) {
|
|
5296
5840
|
this.touchstartDisposeHandler();
|
|
5297
5841
|
}
|
|
@@ -5384,7 +5928,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5384
5928
|
hasObservers(this.close) ||
|
|
5385
5929
|
hasObservers(this.onBlur) ||
|
|
5386
5930
|
hasObservers(this.filterChange) ||
|
|
5387
|
-
isUntouched(this.
|
|
5931
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
5388
5932
|
this._zone.run(function () {
|
|
5389
5933
|
if (valueHasChanged) {
|
|
5390
5934
|
_this.selectionService.change(_this.selectionService.selected[0]);
|
|
@@ -5568,11 +6112,18 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5568
6112
|
var newValue = (this.valueLabelId + " " + trimmed).trim();
|
|
5569
6113
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
5570
6114
|
};
|
|
6115
|
+
DropDownListComponent.prototype.setComponentClasses = function () {
|
|
6116
|
+
if (this.size) {
|
|
6117
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
6118
|
+
}
|
|
6119
|
+
if (this.rounded) {
|
|
6120
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6121
|
+
}
|
|
6122
|
+
if (this.fillMode) {
|
|
6123
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
6124
|
+
}
|
|
6125
|
+
};
|
|
5571
6126
|
var DropDownListComponent_1;
|
|
5572
|
-
__decorate([
|
|
5573
|
-
Input(),
|
|
5574
|
-
__metadata("design:type", String)
|
|
5575
|
-
], DropDownListComponent.prototype, "focusableId", void 0);
|
|
5576
6127
|
__decorate([
|
|
5577
6128
|
Input(),
|
|
5578
6129
|
__metadata("design:type", String)
|
|
@@ -5656,6 +6207,21 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5656
6207
|
__metadata("design:type", Number),
|
|
5657
6208
|
__metadata("design:paramtypes", [Number])
|
|
5658
6209
|
], DropDownListComponent.prototype, "tabIndex", null);
|
|
6210
|
+
__decorate([
|
|
6211
|
+
Input(),
|
|
6212
|
+
__metadata("design:type", String),
|
|
6213
|
+
__metadata("design:paramtypes", [String])
|
|
6214
|
+
], DropDownListComponent.prototype, "size", null);
|
|
6215
|
+
__decorate([
|
|
6216
|
+
Input(),
|
|
6217
|
+
__metadata("design:type", String),
|
|
6218
|
+
__metadata("design:paramtypes", [String])
|
|
6219
|
+
], DropDownListComponent.prototype, "rounded", null);
|
|
6220
|
+
__decorate([
|
|
6221
|
+
Input(),
|
|
6222
|
+
__metadata("design:type", String),
|
|
6223
|
+
__metadata("design:paramtypes", [String])
|
|
6224
|
+
], DropDownListComponent.prototype, "fillMode", null);
|
|
5659
6225
|
__decorate([
|
|
5660
6226
|
Output(),
|
|
5661
6227
|
__metadata("design:type", EventEmitter)
|
|
@@ -5728,24 +6294,90 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5728
6294
|
ViewChild('popupTemplate', { static: true }),
|
|
5729
6295
|
__metadata("design:type", TemplateRef)
|
|
5730
6296
|
], DropDownListComponent.prototype, "popupTemplate", void 0);
|
|
5731
|
-
__decorate([
|
|
5732
|
-
ViewChild('wrapper', { static: true }),
|
|
5733
|
-
__metadata("design:type", ElementRef)
|
|
5734
|
-
], DropDownListComponent.prototype, "wrapper", void 0);
|
|
5735
6297
|
__decorate([
|
|
5736
6298
|
ViewChild('optionsList', { static: false }),
|
|
5737
6299
|
__metadata("design:type", ListComponent)
|
|
5738
6300
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
5739
6301
|
__decorate([
|
|
5740
|
-
HostBinding('class.k-
|
|
5741
|
-
HostBinding('class.k-
|
|
6302
|
+
HostBinding('class.k-dropdownlist'),
|
|
6303
|
+
HostBinding('class.k-picker'),
|
|
5742
6304
|
__metadata("design:type", Boolean)
|
|
5743
|
-
], DropDownListComponent.prototype, "
|
|
6305
|
+
], DropDownListComponent.prototype, "hostClasses", void 0);
|
|
6306
|
+
__decorate([
|
|
6307
|
+
HostBinding('class.k-disabled'),
|
|
6308
|
+
HostBinding('attr.aria-disabled'),
|
|
6309
|
+
__metadata("design:type", Boolean),
|
|
6310
|
+
__metadata("design:paramtypes", [])
|
|
6311
|
+
], DropDownListComponent.prototype, "isDisabled", null);
|
|
6312
|
+
__decorate([
|
|
6313
|
+
HostBinding('class.k-loading'),
|
|
6314
|
+
__metadata("design:type", Boolean),
|
|
6315
|
+
__metadata("design:paramtypes", [])
|
|
6316
|
+
], DropDownListComponent.prototype, "isLoading", null);
|
|
6317
|
+
__decorate([
|
|
6318
|
+
Input('id'),
|
|
6319
|
+
HostBinding('attr.id'),
|
|
6320
|
+
__metadata("design:type", String)
|
|
6321
|
+
], DropDownListComponent.prototype, "focusableId", void 0);
|
|
5744
6322
|
__decorate([
|
|
5745
6323
|
HostBinding('attr.dir'),
|
|
5746
6324
|
__metadata("design:type", String),
|
|
5747
6325
|
__metadata("design:paramtypes", [])
|
|
5748
6326
|
], DropDownListComponent.prototype, "dir", null);
|
|
6327
|
+
__decorate([
|
|
6328
|
+
HostBinding('attr.tabindex'),
|
|
6329
|
+
__metadata("design:type", Number),
|
|
6330
|
+
__metadata("design:paramtypes", [])
|
|
6331
|
+
], DropDownListComponent.prototype, "hostTabIndex", null);
|
|
6332
|
+
__decorate([
|
|
6333
|
+
HostBinding('attr.readonly'),
|
|
6334
|
+
HostBinding('attr.aria-readonly'),
|
|
6335
|
+
__metadata("design:type", Boolean),
|
|
6336
|
+
__metadata("design:paramtypes", [])
|
|
6337
|
+
], DropDownListComponent.prototype, "isReadonly", null);
|
|
6338
|
+
__decorate([
|
|
6339
|
+
HostBinding('attr.role'),
|
|
6340
|
+
HostBinding('attr.aria-haspopup'),
|
|
6341
|
+
__metadata("design:type", String)
|
|
6342
|
+
], DropDownListComponent.prototype, "role", void 0);
|
|
6343
|
+
__decorate([
|
|
6344
|
+
HostBinding('attr.aria-expanded'),
|
|
6345
|
+
__metadata("design:type", Boolean),
|
|
6346
|
+
__metadata("design:paramtypes", [])
|
|
6347
|
+
], DropDownListComponent.prototype, "isAriaExpanded", null);
|
|
6348
|
+
__decorate([
|
|
6349
|
+
HostBinding('attr.aria-owns'),
|
|
6350
|
+
__metadata("design:type", String),
|
|
6351
|
+
__metadata("design:paramtypes", [])
|
|
6352
|
+
], DropDownListComponent.prototype, "hostAriaOwns", null);
|
|
6353
|
+
__decorate([
|
|
6354
|
+
HostBinding('attr.aria-activedescendant'),
|
|
6355
|
+
__metadata("design:type", String),
|
|
6356
|
+
__metadata("design:paramtypes", [])
|
|
6357
|
+
], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
|
|
6358
|
+
__decorate([
|
|
6359
|
+
HostBinding('attr.aria-label'),
|
|
6360
|
+
__metadata("design:type", String),
|
|
6361
|
+
__metadata("design:paramtypes", [])
|
|
6362
|
+
], DropDownListComponent.prototype, "hostNoDataLabel", null);
|
|
6363
|
+
__decorate([
|
|
6364
|
+
HostListener('keydown', ['$event']),
|
|
6365
|
+
__metadata("design:type", Function),
|
|
6366
|
+
__metadata("design:paramtypes", [Object]),
|
|
6367
|
+
__metadata("design:returntype", void 0)
|
|
6368
|
+
], DropDownListComponent.prototype, "keydown", null);
|
|
6369
|
+
__decorate([
|
|
6370
|
+
HostListener('keypress', ['$event']),
|
|
6371
|
+
__metadata("design:type", Function),
|
|
6372
|
+
__metadata("design:paramtypes", [Object]),
|
|
6373
|
+
__metadata("design:returntype", void 0)
|
|
6374
|
+
], DropDownListComponent.prototype, "keypress", null);
|
|
6375
|
+
__decorate([
|
|
6376
|
+
HostListener('click', ['$event']),
|
|
6377
|
+
__metadata("design:type", Function),
|
|
6378
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
6379
|
+
__metadata("design:returntype", void 0)
|
|
6380
|
+
], DropDownListComponent.prototype, "click", null);
|
|
5749
6381
|
DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
5750
6382
|
Component({
|
|
5751
6383
|
exportAs: 'kendoDropDownList',
|
|
@@ -5768,10 +6400,11 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5768
6400
|
}
|
|
5769
6401
|
],
|
|
5770
6402
|
selector: 'kendo-dropdownlist',
|
|
5771
|
-
template: "\n <ng-container kendoDropDownListLocalizedMessages\n i18n-noDataText=\"kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n >\n </ng-container>\n <span
|
|
6403
|
+
template: "\n <ng-container kendoDropDownListLocalizedMessages\n i18n-noDataText=\"kendo.dropdownlist.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n >\n </ng-container>\n <span class=\"k-input-inner\" unselectable=\"on\" [id]=\"valueLabelId\">\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\">{{ getText() }}</ng-template>\n </span>\n </span>\n <button\n tabindex=\"-1\"\n unselectable=\"on\"\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: onMouseDown\n }\"\n >\n <span\n class=\"k-button-icon k-icon\"\n unselectable=\"on\"\n [ngClass]=\"buttonClasses\"\n ></span>\n </button>\n <ng-template #popupTemplate>\n <!--filterable-->\n\n <ng-template [ngIf]=\"filterable\">\n <div class=\"k-list-filter\" (click)=\"$event.stopImmediatePropagation()\">\n <span\n class=\"k-searchbox k-input\"\n [ngClass]=\"filterInputClasses\"\n >\n <span class=\"k-input-icon k-icon k-i-search\" unselectable=\"on\"></span>\n <input\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-activedescendant]=\"ariaActivedescendant\"\n [attr.aria-label]=\"noDataLabel\"\n tabindex=\"-1\"\n [filterInput]=\"isFocused && !touchEnabled\"\n [dir]=\"direction\"\n [(ngModel)]=\"filterText\"\n class=\"k-input-inner\"\n (keydown)=\"keydown($event)\"\n (input)=\"handleFilter($event)\"\n (focus)=\"onFilterFocus()\"\n (blur)=\"blurFilterInput()\" />\n </span>\n </div>\n </ng-template>\n <!--default item-->\n <ng-template [ngIf]=\"defaultItem && !itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel k-list-item\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n {{ getDefaultItemText() }}\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"defaultItem && itemTemplate\">\n <div\n class=\"k-list\"\n [ngClass]=\"optionLabelSizeClass\"\n >\n <div class=\"k-list-optionlabel k-list-item\" [ngClass]=\"{ 'k-disabled': isDisabledDefaultItem }\" kendoDropDownsSelectable [index]=\"-1\">\n <ng-template\n [templateContext]=\"{\n templateRef: itemTemplate.templateRef,\n $implicit: defaultItem\n }\">\n </ng-template>\n </div>\n </div>\n </ng-template>\n <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"itemTemplate\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n >\n </kendo-list>\n <!--no-data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
5772
6404
|
}),
|
|
5773
6405
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
5774
|
-
__metadata("design:paramtypes", [
|
|
6406
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
6407
|
+
LocalizationService,
|
|
5775
6408
|
PopupService,
|
|
5776
6409
|
SelectionService,
|
|
5777
6410
|
NavigationService,
|
|
@@ -5779,7 +6412,6 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5779
6412
|
DataService,
|
|
5780
6413
|
NgZone,
|
|
5781
6414
|
Renderer2,
|
|
5782
|
-
ElementRef,
|
|
5783
6415
|
ChangeDetectorRef, Boolean])
|
|
5784
6416
|
], DropDownListComponent);
|
|
5785
6417
|
return DropDownListComponent;
|
|
@@ -5956,8 +6588,9 @@ var MULTISELECT_VALUE_ACCESSOR = {
|
|
|
5956
6588
|
* ```
|
|
5957
6589
|
*/
|
|
5958
6590
|
var MultiSelectComponent = /** @class */ (function () {
|
|
5959
|
-
function MultiSelectComponent(localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer,
|
|
6591
|
+
function MultiSelectComponent(wrapper, localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer, _zone, touchEnabled$$1) {
|
|
5960
6592
|
var _this = this;
|
|
6593
|
+
this.wrapper = wrapper;
|
|
5961
6594
|
this.localization = localization;
|
|
5962
6595
|
this.popupService = popupService;
|
|
5963
6596
|
this.dataService = dataService;
|
|
@@ -5967,7 +6600,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
5967
6600
|
this.cdr = cdr;
|
|
5968
6601
|
this.differs = differs;
|
|
5969
6602
|
this.renderer = renderer;
|
|
5970
|
-
this.hostElement = hostElement;
|
|
5971
6603
|
this._zone = _zone;
|
|
5972
6604
|
this.touchEnabled = touchEnabled$$1;
|
|
5973
6605
|
this.listBoxId = guid$1();
|
|
@@ -6128,8 +6760,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6128
6760
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
6129
6761
|
*/
|
|
6130
6762
|
this.removeTag = new EventEmitter();
|
|
6131
|
-
this.
|
|
6763
|
+
this.hostClasses = true;
|
|
6132
6764
|
this.initialized = false;
|
|
6765
|
+
this._size = 'medium';
|
|
6766
|
+
this._rounded = 'medium';
|
|
6767
|
+
this._fillMode = 'solid';
|
|
6133
6768
|
this.onChangeCallback = function (_) { };
|
|
6134
6769
|
this.onTouchedCallback = function (_) { };
|
|
6135
6770
|
this._placeholder = '';
|
|
@@ -6206,7 +6841,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6206
6841
|
if (hasObservers(this.onBlur) ||
|
|
6207
6842
|
hasObservers(this.filterChange) ||
|
|
6208
6843
|
hasObservers(this.close) ||
|
|
6209
|
-
isUntouched(this.
|
|
6844
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
6210
6845
|
this._zone.run(function () {
|
|
6211
6846
|
_this.closePopup();
|
|
6212
6847
|
if (!(_this.isOpen && _this.allowCustom)) {
|
|
@@ -6223,22 +6858,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6223
6858
|
this.closePopup();
|
|
6224
6859
|
}
|
|
6225
6860
|
};
|
|
6226
|
-
/**
|
|
6227
|
-
* @hidden
|
|
6228
|
-
*/
|
|
6229
|
-
MultiSelectComponent.prototype.wrapperMousedown = function (event) {
|
|
6230
|
-
var inputElement = this.searchbar.input.nativeElement;
|
|
6231
|
-
if (event.button === 0) {
|
|
6232
|
-
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
6233
|
-
return;
|
|
6234
|
-
}
|
|
6235
|
-
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
6236
|
-
this.searchbar.focus();
|
|
6237
|
-
}
|
|
6238
|
-
this.togglePopup(!this.isOpen);
|
|
6239
|
-
event.preventDefault();
|
|
6240
|
-
}
|
|
6241
|
-
};
|
|
6242
6861
|
/**
|
|
6243
6862
|
* @hidden
|
|
6244
6863
|
*/
|
|
@@ -6332,6 +6951,79 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6332
6951
|
enumerable: true,
|
|
6333
6952
|
configurable: true
|
|
6334
6953
|
});
|
|
6954
|
+
Object.defineProperty(MultiSelectComponent.prototype, "size", {
|
|
6955
|
+
get: function () {
|
|
6956
|
+
return this._size;
|
|
6957
|
+
},
|
|
6958
|
+
/**
|
|
6959
|
+
* Sets the size of the component.
|
|
6960
|
+
*
|
|
6961
|
+
* The possible values are:
|
|
6962
|
+
* * `'small'`
|
|
6963
|
+
* * `'medium'` (default)
|
|
6964
|
+
* * `'large'`
|
|
6965
|
+
* * `null`
|
|
6966
|
+
*
|
|
6967
|
+
*/
|
|
6968
|
+
set: function (size) {
|
|
6969
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6970
|
+
if (size) {
|
|
6971
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6972
|
+
}
|
|
6973
|
+
this._size = size;
|
|
6974
|
+
},
|
|
6975
|
+
enumerable: true,
|
|
6976
|
+
configurable: true
|
|
6977
|
+
});
|
|
6978
|
+
Object.defineProperty(MultiSelectComponent.prototype, "rounded", {
|
|
6979
|
+
get: function () {
|
|
6980
|
+
return this._rounded;
|
|
6981
|
+
},
|
|
6982
|
+
/**
|
|
6983
|
+
* Sets the border radius of the component.
|
|
6984
|
+
*
|
|
6985
|
+
* The possible values are:
|
|
6986
|
+
* * `'small'`
|
|
6987
|
+
* * `'medium'` (default)
|
|
6988
|
+
* * `'large'`
|
|
6989
|
+
* * `'full'`
|
|
6990
|
+
* * `null`
|
|
6991
|
+
*
|
|
6992
|
+
*/
|
|
6993
|
+
set: function (rounded) {
|
|
6994
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6995
|
+
if (rounded) {
|
|
6996
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
6997
|
+
}
|
|
6998
|
+
this._rounded = rounded;
|
|
6999
|
+
},
|
|
7000
|
+
enumerable: true,
|
|
7001
|
+
configurable: true
|
|
7002
|
+
});
|
|
7003
|
+
Object.defineProperty(MultiSelectComponent.prototype, "fillMode", {
|
|
7004
|
+
get: function () {
|
|
7005
|
+
return this._fillMode;
|
|
7006
|
+
},
|
|
7007
|
+
/**
|
|
7008
|
+
* Sets the fillMode of the component.
|
|
7009
|
+
*
|
|
7010
|
+
* The possible values are:
|
|
7011
|
+
* * `'flat'`
|
|
7012
|
+
* * `'solid'` (default)
|
|
7013
|
+
* * `'outline'`
|
|
7014
|
+
* * `null`
|
|
7015
|
+
*
|
|
7016
|
+
*/
|
|
7017
|
+
set: function (fillMode) {
|
|
7018
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7019
|
+
if (fillMode) {
|
|
7020
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
7021
|
+
}
|
|
7022
|
+
this._fillMode = fillMode;
|
|
7023
|
+
},
|
|
7024
|
+
enumerable: true,
|
|
7025
|
+
configurable: true
|
|
7026
|
+
});
|
|
6335
7027
|
Object.defineProperty(MultiSelectComponent.prototype, "placeholder", {
|
|
6336
7028
|
get: function () {
|
|
6337
7029
|
return this.selectedDataItems.length ? '' : this._placeholder;
|
|
@@ -6438,6 +7130,29 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6438
7130
|
enumerable: true,
|
|
6439
7131
|
configurable: true
|
|
6440
7132
|
});
|
|
7133
|
+
Object.defineProperty(MultiSelectComponent.prototype, "isLoading", {
|
|
7134
|
+
get: function () {
|
|
7135
|
+
return this.loading;
|
|
7136
|
+
},
|
|
7137
|
+
enumerable: true,
|
|
7138
|
+
configurable: true
|
|
7139
|
+
});
|
|
7140
|
+
/**
|
|
7141
|
+
* @hidden
|
|
7142
|
+
*/
|
|
7143
|
+
MultiSelectComponent.prototype.hostMousedown = function (event) {
|
|
7144
|
+
var inputElement = this.searchbar.input.nativeElement;
|
|
7145
|
+
if (event.button === 0) {
|
|
7146
|
+
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
7147
|
+
return;
|
|
7148
|
+
}
|
|
7149
|
+
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
7150
|
+
this.searchbar.focus();
|
|
7151
|
+
}
|
|
7152
|
+
this.togglePopup(!this.isOpen);
|
|
7153
|
+
event.preventDefault();
|
|
7154
|
+
}
|
|
7155
|
+
};
|
|
6441
7156
|
Object.defineProperty(MultiSelectComponent.prototype, "listContainerClasses", {
|
|
6442
7157
|
get: function () {
|
|
6443
7158
|
var containerClasses = ['k-list-container', 'k-reset'];
|
|
@@ -6449,6 +7164,16 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6449
7164
|
enumerable: true,
|
|
6450
7165
|
configurable: true
|
|
6451
7166
|
});
|
|
7167
|
+
Object.defineProperty(MultiSelectComponent.prototype, "customItemSizeClass", {
|
|
7168
|
+
/**
|
|
7169
|
+
* @hidden
|
|
7170
|
+
*/
|
|
7171
|
+
get: function () {
|
|
7172
|
+
return "" + (this.size ? getSizeClass('list', this.size) : '');
|
|
7173
|
+
},
|
|
7174
|
+
enumerable: true,
|
|
7175
|
+
configurable: true
|
|
7176
|
+
});
|
|
6452
7177
|
Object.defineProperty(MultiSelectComponent.prototype, "width", {
|
|
6453
7178
|
get: function () {
|
|
6454
7179
|
var wrapperOffsetWidth = 0;
|
|
@@ -6722,7 +7447,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6722
7447
|
};
|
|
6723
7448
|
MultiSelectComponent.prototype.ngOnInit = function () {
|
|
6724
7449
|
var _this = this;
|
|
6725
|
-
this.renderer.removeAttribute(this.
|
|
7450
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
6726
7451
|
this.createCustomValueStream();
|
|
6727
7452
|
this.localizationChangeSubscription = this.localization
|
|
6728
7453
|
.changes.subscribe(function (_a) {
|
|
@@ -6732,6 +7457,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6732
7457
|
});
|
|
6733
7458
|
this.setMessages();
|
|
6734
7459
|
this.setState(this.value);
|
|
7460
|
+
this.setComponentClasses();
|
|
6735
7461
|
this.initialized = true;
|
|
6736
7462
|
};
|
|
6737
7463
|
MultiSelectComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -6828,7 +7554,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6828
7554
|
return this._isFocused;
|
|
6829
7555
|
},
|
|
6830
7556
|
set: function (isFocused) {
|
|
6831
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
7557
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
6832
7558
|
this._isFocused = isFocused;
|
|
6833
7559
|
},
|
|
6834
7560
|
enumerable: true,
|
|
@@ -6867,7 +7593,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6867
7593
|
// Roll up MultiSelect on iOS when tapped outside
|
|
6868
7594
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
6869
7595
|
var target = e.target;
|
|
6870
|
-
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.
|
|
7596
|
+
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
6871
7597
|
_this._zone.run(function () {
|
|
6872
7598
|
_this.blur();
|
|
6873
7599
|
if (_this.isOpen) {
|
|
@@ -7245,6 +7971,17 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7245
7971
|
});
|
|
7246
7972
|
});
|
|
7247
7973
|
};
|
|
7974
|
+
MultiSelectComponent.prototype.setComponentClasses = function () {
|
|
7975
|
+
if (this.size) {
|
|
7976
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7977
|
+
}
|
|
7978
|
+
if (this.rounded) {
|
|
7979
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7980
|
+
}
|
|
7981
|
+
if (this.fillMode) {
|
|
7982
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7983
|
+
}
|
|
7984
|
+
};
|
|
7248
7985
|
var MultiSelectComponent_1;
|
|
7249
7986
|
__decorate([
|
|
7250
7987
|
Input(),
|
|
@@ -7285,6 +8022,21 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7285
8022
|
__metadata("design:type", Number),
|
|
7286
8023
|
__metadata("design:paramtypes", [Number])
|
|
7287
8024
|
], MultiSelectComponent.prototype, "tabIndex", null);
|
|
8025
|
+
__decorate([
|
|
8026
|
+
Input(),
|
|
8027
|
+
__metadata("design:type", String),
|
|
8028
|
+
__metadata("design:paramtypes", [String])
|
|
8029
|
+
], MultiSelectComponent.prototype, "size", null);
|
|
8030
|
+
__decorate([
|
|
8031
|
+
Input(),
|
|
8032
|
+
__metadata("design:type", String),
|
|
8033
|
+
__metadata("design:paramtypes", [String])
|
|
8034
|
+
], MultiSelectComponent.prototype, "rounded", null);
|
|
8035
|
+
__decorate([
|
|
8036
|
+
Input(),
|
|
8037
|
+
__metadata("design:type", String),
|
|
8038
|
+
__metadata("design:paramtypes", [String])
|
|
8039
|
+
], MultiSelectComponent.prototype, "fillMode", null);
|
|
7288
8040
|
__decorate([
|
|
7289
8041
|
Input(),
|
|
7290
8042
|
__metadata("design:type", String),
|
|
@@ -7395,10 +8147,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7395
8147
|
ViewChild('popupTemplate', { static: true }),
|
|
7396
8148
|
__metadata("design:type", TemplateRef)
|
|
7397
8149
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
7398
|
-
__decorate([
|
|
7399
|
-
ViewChild('wrapper', { static: true }),
|
|
7400
|
-
__metadata("design:type", ElementRef)
|
|
7401
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
7402
8150
|
__decorate([
|
|
7403
8151
|
ViewChild('optionsList', { static: false }),
|
|
7404
8152
|
__metadata("design:type", ListComponent)
|
|
@@ -7440,20 +8188,31 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7440
8188
|
__metadata("design:type", NoDataTemplateDirective)
|
|
7441
8189
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
7442
8190
|
__decorate([
|
|
7443
|
-
HostBinding('class.k-widget'),
|
|
7444
8191
|
HostBinding('class.k-multiselect'),
|
|
8192
|
+
HostBinding('class.k-input'),
|
|
7445
8193
|
__metadata("design:type", Boolean)
|
|
7446
|
-
], MultiSelectComponent.prototype, "
|
|
8194
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
7447
8195
|
__decorate([
|
|
7448
8196
|
HostBinding('attr.dir'),
|
|
7449
8197
|
__metadata("design:type", String),
|
|
7450
8198
|
__metadata("design:paramtypes", [])
|
|
7451
8199
|
], MultiSelectComponent.prototype, "dir", null);
|
|
7452
8200
|
__decorate([
|
|
7453
|
-
HostBinding('class.k-
|
|
8201
|
+
HostBinding('class.k-disabled'),
|
|
7454
8202
|
__metadata("design:type", Boolean),
|
|
7455
8203
|
__metadata("design:paramtypes", [])
|
|
7456
8204
|
], MultiSelectComponent.prototype, "disabledClass", null);
|
|
8205
|
+
__decorate([
|
|
8206
|
+
HostBinding('class.k-loading'),
|
|
8207
|
+
__metadata("design:type", Boolean),
|
|
8208
|
+
__metadata("design:paramtypes", [])
|
|
8209
|
+
], MultiSelectComponent.prototype, "isLoading", null);
|
|
8210
|
+
__decorate([
|
|
8211
|
+
HostListener('mousedown', ['$event']),
|
|
8212
|
+
__metadata("design:type", Function),
|
|
8213
|
+
__metadata("design:paramtypes", [Object]),
|
|
8214
|
+
__metadata("design:returntype", void 0)
|
|
8215
|
+
], MultiSelectComponent.prototype, "hostMousedown", null);
|
|
7457
8216
|
MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
7458
8217
|
Component({
|
|
7459
8218
|
exportAs: 'kendoMultiSelect',
|
|
@@ -7476,10 +8235,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7476
8235
|
}
|
|
7477
8236
|
],
|
|
7478
8237
|
selector: 'kendo-multiselect',
|
|
7479
|
-
template: "\n <ng-container kendoMultiSelectLocalizedMessages\n i18n-noDataText=\"kendo.multiselect.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <
|
|
8238
|
+
template: "\n <ng-container kendoMultiSelectLocalizedMessages\n i18n-noDataText=\"kendo.multiselect.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.combobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-taglist\n [size]=\"size\"\n [rounded]=\"rounded\"\n [fillMode]=\"fillMode\"\n [id]=\"tagListId\"\n [tags]=\"tags\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [focused]=\"focusedTagIndex\"\n [disabled]=\"disabled\"\n [template]=\"tagTemplate\"\n [groupTemplate]=\"groupTagTemplate\"\n [tagPrefix]=\"tagPrefix\"\n [disabledIndices]=\"disabledIndices\"\n (removeTag)=\"handleRemoveTag($event)\"\n >\n <kendo-searchbar\n #searchbar\n [id]=\"focusableId\"\n [role]=\"'listbox'\"\n [tagListId]=\"tagListId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"handleFilter($event)\"\n (onBlur)=\"onSearchBarBlur()\"\n (onFocus)=\"onSearchBarFocus()\"\n >\n </kendo-searchbar>\n </kendo-taglist>\n\n <span\n *ngIf=\"!loading && !readonly && clearButton && (tags?.length || text?.length)\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n [attr.title]=\"clearTitle\"\n role=\"button\"\n tabindex=\"-1\"\n (mousedown)=\"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 <!--header template-->\n <ng-template *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate.templateRef\n }\">\n </ng-template>\n <!--custom item template-->\n <div\n *ngIf=\"allowCustom && text\"\n class=\"k-list\"\n [ngClass]=\"customItemSizeClass\"\n >\n <div class=\"k-list-item k-custom-item\" kendoDropDownsSelectable [multipleSelection]=\"true\" [index]=\"-1\">\n <ng-template *ngIf=\"customItemTemplate;else default_custom_item_template\"\n [templateContext]=\"{\n templateRef: customItemTemplate.templateRef,\n $implicit: text\n }\">\n </ng-template>\n <ng-template #default_custom_item_template>{{ text }}</ng-template>\n <span class=\"k-icon k-i-plus\" style=\"float: right\"></span>\n </div>\n </div>\n <!--list-->\n <kendo-list\n #optionsList\n [size]=\"size\"\n [rounded]=\"rounded\"\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [height]=\"listHeight\"\n [template]=\"template\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [show]=\"isOpen\"\n [multipleSelection]=\"true\"\n [virtual]=\"virtual\"\n (pageChange)=\"pageChange($event)\"\n [checkboxes]=\"checkboxes\"\n >\n </kendo-list>\n <!--no data template-->\n <div class=\"k-no-data\" *ngIf=\"data.length === 0\">\n <ng-template [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n <!--footer template-->\n <ng-template *ngIf=\"footerTemplate\"\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\">\n </ng-template>\n </ng-template>\n <ng-template [ngIf]=\"isOpen\">\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
7480
8239
|
}),
|
|
7481
8240
|
__param(11, Optional()), __param(11, Inject(TOUCH_ENABLED)),
|
|
7482
|
-
__metadata("design:paramtypes", [
|
|
8241
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
8242
|
+
LocalizationService,
|
|
7483
8243
|
PopupService,
|
|
7484
8244
|
DataService,
|
|
7485
8245
|
SelectionService,
|
|
@@ -7488,7 +8248,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7488
8248
|
ChangeDetectorRef,
|
|
7489
8249
|
KeyValueDiffers,
|
|
7490
8250
|
Renderer2,
|
|
7491
|
-
ElementRef,
|
|
7492
8251
|
NgZone, Boolean])
|
|
7493
8252
|
], MultiSelectComponent);
|
|
7494
8253
|
return MultiSelectComponent;
|
|
@@ -7663,8 +8422,8 @@ var getRowWidthFromColumnsMeta = function (columns) {
|
|
|
7663
8422
|
*/
|
|
7664
8423
|
var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
7665
8424
|
__extends(MultiColumnComboBoxComponent, _super);
|
|
7666
|
-
function MultiColumnComboBoxComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
7667
|
-
var _this = _super.call(this, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
8425
|
+
function MultiColumnComboBoxComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, wrapper, touchEnabled$$1) {
|
|
8426
|
+
var _this = _super.call(this, wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, touchEnabled$$1) || this;
|
|
7668
8427
|
/**
|
|
7669
8428
|
* @hidden
|
|
7670
8429
|
*/
|
|
@@ -7677,6 +8436,16 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7677
8436
|
return _this;
|
|
7678
8437
|
}
|
|
7679
8438
|
MultiColumnComboBoxComponent_1 = MultiColumnComboBoxComponent;
|
|
8439
|
+
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "isDisabled", {
|
|
8440
|
+
/**
|
|
8441
|
+
* @hidden
|
|
8442
|
+
*/
|
|
8443
|
+
get: function () {
|
|
8444
|
+
return this.disabled;
|
|
8445
|
+
},
|
|
8446
|
+
enumerable: true,
|
|
8447
|
+
configurable: true
|
|
8448
|
+
});
|
|
7680
8449
|
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "header", {
|
|
7681
8450
|
/**
|
|
7682
8451
|
* @hidden
|
|
@@ -7699,19 +8468,24 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7699
8468
|
enumerable: true,
|
|
7700
8469
|
configurable: true
|
|
7701
8470
|
});
|
|
8471
|
+
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "tableSizeClass", {
|
|
8472
|
+
/**
|
|
8473
|
+
* @hidden
|
|
8474
|
+
*/
|
|
8475
|
+
get: function () {
|
|
8476
|
+
return "" + (this.size ? getSizeClass('table', this.size) : '');
|
|
8477
|
+
},
|
|
8478
|
+
enumerable: true,
|
|
8479
|
+
configurable: true
|
|
8480
|
+
});
|
|
7702
8481
|
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "listContainerClasses", {
|
|
7703
8482
|
/**
|
|
7704
8483
|
* @hidden
|
|
7705
8484
|
*/
|
|
7706
8485
|
get: function () {
|
|
7707
8486
|
return [
|
|
7708
|
-
'k-list-container',
|
|
7709
8487
|
'k-popup',
|
|
7710
|
-
'k-
|
|
7711
|
-
'k-group',
|
|
7712
|
-
'k-dropdowngrid-popup',
|
|
7713
|
-
'k-popup-flush',
|
|
7714
|
-
'k-state-border-up'
|
|
8488
|
+
'k-dropdowngrid-popup'
|
|
7715
8489
|
].concat(this.popupSettings.popupClass || []);
|
|
7716
8490
|
},
|
|
7717
8491
|
enumerable: true,
|
|
@@ -7794,6 +8568,11 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7794
8568
|
HostBinding('class.k-dropdowngrid'),
|
|
7795
8569
|
__metadata("design:type", Boolean)
|
|
7796
8570
|
], MultiColumnComboBoxComponent.prototype, "hostClasses", void 0);
|
|
8571
|
+
__decorate([
|
|
8572
|
+
HostBinding('class.k-disabled'),
|
|
8573
|
+
__metadata("design:type", Boolean),
|
|
8574
|
+
__metadata("design:paramtypes", [])
|
|
8575
|
+
], MultiColumnComboBoxComponent.prototype, "isDisabled", null);
|
|
7797
8576
|
__decorate([
|
|
7798
8577
|
ContentChildren(ComboBoxColumnComponent),
|
|
7799
8578
|
__metadata("design:type", QueryList)
|
|
@@ -7830,7 +8609,7 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7830
8609
|
}
|
|
7831
8610
|
],
|
|
7832
8611
|
selector: 'kendo-multicolumncombobox',
|
|
7833
|
-
template: "\n <ng-container\n kendoMultiColumnComboBoxLocalizedMessages\n\n i18n-noDataText=\"kendo.multicolumncombobox.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.multicolumncombobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <
|
|
8612
|
+
template: "\n <ng-container\n kendoMultiColumnComboBoxLocalizedMessages\n\n i18n-noDataText=\"kendo.multicolumncombobox.noDataText|The text displayed in the popup when there are no items\"\n noDataText=\"NO DATA FOUND\"\n\n i18n-clearTitle=\"kendo.multicolumncombobox.clearTitle|The title of the clear button\"\n clearTitle=\"clear\"\n >\n </ng-container>\n <kendo-searchbar\n #searchbar\n [role]=\"'combobox'\"\n [id]=\"focusableId\"\n [listId]=\"listBoxId\"\n [activeDescendant]=\"activeDescendant\"\n [noDataLabel]=\"noDataLabel\"\n [userInput]=\"text\"\n [suggestedText]=\"getSuggestion()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabIndex\"\n [popupOpen]=\"isOpen\"\n [placeholder]=\"placeholder\"\n (onNavigate)=\"handleNavigate($event)\"\n (valueChange)=\"searchBarChange($event)\"\n (onBlur)=\"handleBlur()\"\n (onFocus)=\"handleFocus()\"\n >\n </kendo-searchbar>\n\n <span\n *ngIf=\"clearButton && !loading && !disabled && !readonly && text?.length\"\n class=\"k-clear-value\"\n [style.visibility]=\"clearButtonVisiblity\"\n aria-hidden=\"true\"\n [attr.title]=\"clearTitle\"\n (click)=\"clearValue($event)\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventEventDefault\n }\"\n >\n <span class=\"k-icon k-i-x\"></span>\n </span>\n\n <button\n #select\n tabindex=\"-1\"\n aria-hidden=\"true\"\n unselectable=\"on\"\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [ngClass]=\"selectButtonClasses\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventEventDefault\n }\"\n >\n <span class=\"k-button-icon k-icon\" [ngClass]=\"buttonClasses\"></span>\n </button>\n\n <ng-template #popupTemplate>\n <!--user-defined header template -->\n <ng-template\n *ngIf=\"headerTemplate\"\n [templateContext]=\"{\n templateRef: headerTemplate?.templateRef\n }\"\n >\n </ng-template>\n\n <!--data table-->\n <div class=\"k-data-table\" [ngClass]=\"tableSizeClass\">\n\n <!--grid header-->\n <div\n #header\n class=\"k-table-header\"\n >\n <div class=\"k-table-header-wrap\">\n <table class=\"k-table\" role=\"presentation\">\n <colgroup>\n <ng-container *ngFor=\"let column of columns\">\n <col\n *ngIf=\"!column.hidden && column.matchesMedia\"\n [style.width.px]=\"column.width\"\n />\n </ng-container>\n </colgroup>\n <thead class=\"k-table-thead\">\n <tr class=\"k-table-row\">\n <ng-container *ngFor=\"let column of columns\">\n <th\n *ngIf=\"!column.hidden && column.matchesMedia\"\n class=\"k-table-th\"\n [ngStyle]=\"column.headerStyle\"\n [ngClass]=\"column.headerClass\"\n >\n <ng-container *ngIf=\"!column.headerTemplate\">\n {{ column.title || column.field }}\n </ng-container>\n <ng-template\n *ngIf=\"column.headerTemplate\"\n [templateContext]=\"{\n templateRef: column.headerTemplate?.templateRef,\n $implicit: column,\n column: column\n }\"\n >\n </ng-template>\n </th>\n </ng-container>\n </tr>\n </thead>\n </table>\n </div>\n </div>\n\n <!-- item template -->\n <ng-template #rowTemplate let-dataItem>\n <ng-container *ngFor=\"let column of columns\">\n <span\n *ngIf=\"!column.hidden && column.matchesMedia\"\n class=\"k-table-td\"\n [ngClass]=\"column.class\"\n [style.width.px]=\"column.width\"\n [ngStyle]=\"column.style\"\n >\n <ng-container *ngIf=\"!column.cellTemplate\">\n {{ textFrom(dataItem, column.field) }}\n </ng-container>\n <ng-template\n *ngIf=\"column.cellTemplate\"\n [templateContext]=\"{\n templateRef: column.cellTemplate?.templateRef,\n $implicit: dataItem,\n dataItem: dataItem,\n column: column\n }\"\n >\n </ng-template>\n </span>\n </ng-container>\n </ng-template>\n\n <!--list-->\n <kendo-list\n #optionsList\n [id]=\"listBoxId\"\n [optionPrefix]=\"optionPrefix\"\n [data]=\"data\"\n [textField]=\"textField\"\n [valueField]=\"valueField\"\n [template]=\"{ templateRef: rowTemplate }\"\n [groupTemplate]=\"groupTemplate\"\n [fixedGroupTemplate]=\"fixedGroupTemplate\"\n [height]=\"listHeight\"\n [show]=\"isOpen\"\n [virtual]=\"virtual\"\n [type]=\"'dropdowngrid'\"\n (pageChange)=\"pageChange($event)\"\n (listResize)=\"updateHeaderPadding(header)\"\n >\n </kendo-list>\n\n <!--no-data template-->\n <div\n class=\"k-no-data\"\n *ngIf=\"data.length === 0\"\n >\n <ng-template\n [ngIf]=\"noDataTemplate\"\n [templateContext]=\"{\n templateRef: noDataTemplate?.templateRef\n }\"\n >\n </ng-template>\n <ng-template [ngIf]=\"!noDataTemplate\">\n <div>{{ noDataText }}</div>\n </ng-template>\n </div>\n\n <!--user-defined footer template-->\n <ng-container *ngIf=\"footerTemplate\">\n <div class=\"k-table-footer\">\n <table class=\"k-table\">\n <tfoot class=\"k-table-tfoot\">\n <tr class=\"k-table-row\">\n <td class=\"k-table-td\">\n <ng-template\n [templateContext]=\"{\n templateRef: footerTemplate.templateRef\n }\"\n >\n </ng-template>\n </td>\n </tr>\n </tfoot>\n </table>\n </div>\n </ng-container>\n\n </div>\n\n </ng-template>\n\n <kendo-resize-sensor\n *ngIf=\"isOpen\"\n (resize)=\"onResize()\"\n >\n </kendo-resize-sensor>\n\n <!-- when the popupSettings.appendTo value is set to 'component', this container is used -->\n <ng-container #container></ng-container>\n "
|
|
7834
8613
|
}),
|
|
7835
8614
|
__param(10, Inject(TOUCH_ENABLED)),
|
|
7836
8615
|
__metadata("design:paramtypes", [LocalizationService,
|
|
@@ -7879,16 +8658,18 @@ var isNodeVisible = function () { return true; };
|
|
|
7879
8658
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
7880
8659
|
*/
|
|
7881
8660
|
var DropDownTreeComponent = /** @class */ (function () {
|
|
7882
|
-
function DropDownTreeComponent(popupService, navigationService, renderer,
|
|
8661
|
+
function DropDownTreeComponent(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled$$1) {
|
|
8662
|
+
this.wrapper = wrapper;
|
|
7883
8663
|
this.popupService = popupService;
|
|
7884
8664
|
this.navigationService = navigationService;
|
|
7885
8665
|
this.renderer = renderer;
|
|
7886
|
-
this.hostElement = hostElement;
|
|
7887
8666
|
this._zone = _zone;
|
|
7888
8667
|
this.cdr = cdr;
|
|
7889
8668
|
this.localization = localization;
|
|
7890
8669
|
this.touchEnabled = touchEnabled$$1;
|
|
7891
8670
|
this.hostClasses = true;
|
|
8671
|
+
this.role = 'listbox';
|
|
8672
|
+
this.ariaHasPopup = 'tree';
|
|
7892
8673
|
/**
|
|
7893
8674
|
* Fires each time the popup is about to open
|
|
7894
8675
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -8023,21 +8804,78 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8023
8804
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
8024
8805
|
this._tabindex = 0;
|
|
8025
8806
|
this._isFocused = false;
|
|
8807
|
+
this._size = 'medium';
|
|
8808
|
+
this._rounded = 'medium';
|
|
8809
|
+
this._fillMode = 'solid';
|
|
8026
8810
|
this.subscriptions = [];
|
|
8027
8811
|
this.onTouchedCallback = noop;
|
|
8028
8812
|
this.onChangeCallback = noop;
|
|
8029
8813
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
8030
8814
|
this.subscribeEvents();
|
|
8031
8815
|
this.subscribeTouchEvents();
|
|
8816
|
+
this.subscribeFocusEvents();
|
|
8032
8817
|
}
|
|
8033
8818
|
DropDownTreeComponent_1 = DropDownTreeComponent;
|
|
8034
|
-
Object.defineProperty(DropDownTreeComponent.prototype, "
|
|
8819
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isDisabled", {
|
|
8820
|
+
get: function () {
|
|
8821
|
+
return this.disabled;
|
|
8822
|
+
},
|
|
8823
|
+
enumerable: true,
|
|
8824
|
+
configurable: true
|
|
8825
|
+
});
|
|
8826
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isLoading", {
|
|
8827
|
+
get: function () {
|
|
8828
|
+
return this.loading;
|
|
8829
|
+
},
|
|
8830
|
+
enumerable: true,
|
|
8831
|
+
configurable: true
|
|
8832
|
+
});
|
|
8833
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "id", {
|
|
8035
8834
|
get: function () {
|
|
8036
|
-
return this.
|
|
8835
|
+
return this.focusableId;
|
|
8037
8836
|
},
|
|
8038
8837
|
enumerable: true,
|
|
8039
8838
|
configurable: true
|
|
8040
8839
|
});
|
|
8840
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "hostTabIndex", {
|
|
8841
|
+
get: function () {
|
|
8842
|
+
return this.tabindex;
|
|
8843
|
+
},
|
|
8844
|
+
enumerable: true,
|
|
8845
|
+
configurable: true
|
|
8846
|
+
});
|
|
8847
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isAriaExpanded", {
|
|
8848
|
+
get: function () {
|
|
8849
|
+
return this.isOpen;
|
|
8850
|
+
},
|
|
8851
|
+
enumerable: true,
|
|
8852
|
+
configurable: true
|
|
8853
|
+
});
|
|
8854
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isReadonly", {
|
|
8855
|
+
get: function () {
|
|
8856
|
+
return this.readonly;
|
|
8857
|
+
},
|
|
8858
|
+
enumerable: true,
|
|
8859
|
+
configurable: true
|
|
8860
|
+
});
|
|
8861
|
+
/**
|
|
8862
|
+
* @hidden
|
|
8863
|
+
*/
|
|
8864
|
+
DropDownTreeComponent.prototype.handleClick = function () {
|
|
8865
|
+
this.togglePopup(!this.isOpen);
|
|
8866
|
+
};
|
|
8867
|
+
/**
|
|
8868
|
+
* @hidden
|
|
8869
|
+
*/
|
|
8870
|
+
DropDownTreeComponent.prototype.handleKeydown = function (event) {
|
|
8871
|
+
if (this.disabled || this.readonly) {
|
|
8872
|
+
return;
|
|
8873
|
+
}
|
|
8874
|
+
var eventData = event;
|
|
8875
|
+
this.navigationService.process({
|
|
8876
|
+
originalEvent: eventData
|
|
8877
|
+
});
|
|
8878
|
+
};
|
|
8041
8879
|
Object.defineProperty(DropDownTreeComponent.prototype, "treeview", {
|
|
8042
8880
|
get: function () {
|
|
8043
8881
|
return this._treeview;
|
|
@@ -8139,12 +8977,85 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8139
8977
|
enumerable: true,
|
|
8140
8978
|
configurable: true
|
|
8141
8979
|
});
|
|
8980
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "size", {
|
|
8981
|
+
get: function () {
|
|
8982
|
+
return this._size;
|
|
8983
|
+
},
|
|
8984
|
+
/**
|
|
8985
|
+
* Sets the size of the component.
|
|
8986
|
+
*
|
|
8987
|
+
* The possible values are:
|
|
8988
|
+
* * `'small'`
|
|
8989
|
+
* * `'medium'` (default)
|
|
8990
|
+
* * `'large'`
|
|
8991
|
+
* * `null`
|
|
8992
|
+
*
|
|
8993
|
+
*/
|
|
8994
|
+
set: function (size) {
|
|
8995
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
8996
|
+
if (size) {
|
|
8997
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
8998
|
+
}
|
|
8999
|
+
this._size = size;
|
|
9000
|
+
},
|
|
9001
|
+
enumerable: true,
|
|
9002
|
+
configurable: true
|
|
9003
|
+
});
|
|
9004
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "rounded", {
|
|
9005
|
+
get: function () {
|
|
9006
|
+
return this._rounded;
|
|
9007
|
+
},
|
|
9008
|
+
/**
|
|
9009
|
+
* Sets the border radius of the component.
|
|
9010
|
+
*
|
|
9011
|
+
* The possible values are:
|
|
9012
|
+
* * `'small'`
|
|
9013
|
+
* * `'medium'` (default)
|
|
9014
|
+
* * `'large'`
|
|
9015
|
+
* * `'full'`
|
|
9016
|
+
* * `null`
|
|
9017
|
+
*
|
|
9018
|
+
*/
|
|
9019
|
+
set: function (rounded) {
|
|
9020
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9021
|
+
if (rounded) {
|
|
9022
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
9023
|
+
}
|
|
9024
|
+
this._rounded = rounded;
|
|
9025
|
+
},
|
|
9026
|
+
enumerable: true,
|
|
9027
|
+
configurable: true
|
|
9028
|
+
});
|
|
9029
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "fillMode", {
|
|
9030
|
+
get: function () {
|
|
9031
|
+
return this._fillMode;
|
|
9032
|
+
},
|
|
9033
|
+
/**
|
|
9034
|
+
* Sets the fillMode of the component.
|
|
9035
|
+
*
|
|
9036
|
+
* The possible values are:
|
|
9037
|
+
* * `'flat'`
|
|
9038
|
+
* * `'solid'` (default)
|
|
9039
|
+
* * `'outline'`
|
|
9040
|
+
* * `null`
|
|
9041
|
+
*
|
|
9042
|
+
*/
|
|
9043
|
+
set: function (fillMode) {
|
|
9044
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9045
|
+
if (fillMode) {
|
|
9046
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
9047
|
+
}
|
|
9048
|
+
this._fillMode = fillMode;
|
|
9049
|
+
},
|
|
9050
|
+
enumerable: true,
|
|
9051
|
+
configurable: true
|
|
9052
|
+
});
|
|
8142
9053
|
Object.defineProperty(DropDownTreeComponent.prototype, "isFocused", {
|
|
8143
9054
|
get: function () {
|
|
8144
9055
|
return this._isFocused;
|
|
8145
9056
|
},
|
|
8146
9057
|
set: function (isFocused) {
|
|
8147
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
9058
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
8148
9059
|
this._isFocused = isFocused;
|
|
8149
9060
|
},
|
|
8150
9061
|
enumerable: true,
|
|
@@ -8280,7 +9191,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8280
9191
|
});
|
|
8281
9192
|
DropDownTreeComponent.prototype.ngOnInit = function () {
|
|
8282
9193
|
var _this = this;
|
|
8283
|
-
this.renderer.removeAttribute(this.
|
|
9194
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8284
9195
|
this.assignAriaDescribedBy();
|
|
8285
9196
|
this.subscriptions.push(this.localization
|
|
8286
9197
|
.changes.subscribe(function (_a) {
|
|
@@ -8288,6 +9199,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8288
9199
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
8289
9200
|
_this.cdr.markForCheck();
|
|
8290
9201
|
}));
|
|
9202
|
+
this.setComponentClasses();
|
|
8291
9203
|
};
|
|
8292
9204
|
/**
|
|
8293
9205
|
* @hidden
|
|
@@ -8338,8 +9250,12 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8338
9250
|
/**
|
|
8339
9251
|
* @hidden
|
|
8340
9252
|
*/
|
|
8341
|
-
DropDownTreeComponent.prototype.handleFocus = function () {
|
|
9253
|
+
DropDownTreeComponent.prototype.handleFocus = function (event) {
|
|
8342
9254
|
var _this = this;
|
|
9255
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9256
|
+
return;
|
|
9257
|
+
}
|
|
9258
|
+
event.stopImmediatePropagation();
|
|
8343
9259
|
if (!this.isFocused) {
|
|
8344
9260
|
this.isFocused = true;
|
|
8345
9261
|
if (hasObservers(this.onFocus)) {
|
|
@@ -8355,13 +9271,13 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8355
9271
|
DropDownTreeComponent.prototype.handleBlur = function (e) {
|
|
8356
9272
|
var _this = this;
|
|
8357
9273
|
var relatedTarget = e && e.relatedTarget;
|
|
8358
|
-
if (this.
|
|
9274
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
8359
9275
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
8360
9276
|
return;
|
|
8361
9277
|
}
|
|
8362
9278
|
this.isFocused = false;
|
|
8363
9279
|
if (hasObservers(this.onBlur) ||
|
|
8364
|
-
isUntouched(this.
|
|
9280
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
8365
9281
|
this._zone.run(function () {
|
|
8366
9282
|
_this.togglePopup(false);
|
|
8367
9283
|
_this.onBlur.emit();
|
|
@@ -8372,24 +9288,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8372
9288
|
this.togglePopup(false);
|
|
8373
9289
|
}
|
|
8374
9290
|
};
|
|
8375
|
-
/**
|
|
8376
|
-
* @hidden
|
|
8377
|
-
*/
|
|
8378
|
-
DropDownTreeComponent.prototype.handleKeydown = function (event) {
|
|
8379
|
-
if (this.disabled || this.readonly) {
|
|
8380
|
-
return;
|
|
8381
|
-
}
|
|
8382
|
-
var eventData = event;
|
|
8383
|
-
this.navigationService.process({
|
|
8384
|
-
originalEvent: eventData
|
|
8385
|
-
});
|
|
8386
|
-
};
|
|
8387
|
-
/**
|
|
8388
|
-
* @hidden
|
|
8389
|
-
*/
|
|
8390
|
-
DropDownTreeComponent.prototype.handleClick = function () {
|
|
8391
|
-
this.togglePopup(!this.isOpen);
|
|
8392
|
-
};
|
|
8393
9291
|
/**
|
|
8394
9292
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
8395
9293
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -8453,7 +9351,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8453
9351
|
* @hidden
|
|
8454
9352
|
*/
|
|
8455
9353
|
get: function () {
|
|
8456
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
9354
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
8457
9355
|
if (this.popupSettings.popupClass) {
|
|
8458
9356
|
containerClasses.push(this.popupSettings.popupClass);
|
|
8459
9357
|
}
|
|
@@ -8566,6 +9464,26 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8566
9464
|
enumerable: true,
|
|
8567
9465
|
configurable: true
|
|
8568
9466
|
});
|
|
9467
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "selectButtonClasses", {
|
|
9468
|
+
/**
|
|
9469
|
+
* @hidden
|
|
9470
|
+
*/
|
|
9471
|
+
get: function () {
|
|
9472
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
|
|
9473
|
+
},
|
|
9474
|
+
enumerable: true,
|
|
9475
|
+
configurable: true
|
|
9476
|
+
});
|
|
9477
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "filterInputClasses", {
|
|
9478
|
+
/**
|
|
9479
|
+
* @hidden
|
|
9480
|
+
*/
|
|
9481
|
+
get: function () {
|
|
9482
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
9483
|
+
},
|
|
9484
|
+
enumerable: true,
|
|
9485
|
+
configurable: true
|
|
9486
|
+
});
|
|
8569
9487
|
DropDownTreeComponent.prototype.verifySettings = function () {
|
|
8570
9488
|
if (!isDevMode()) {
|
|
8571
9489
|
return;
|
|
@@ -8729,7 +9647,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8729
9647
|
// Roll up DropDownTree on iOS when tapped outside
|
|
8730
9648
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
8731
9649
|
var target = e.target;
|
|
8732
|
-
if (_this.isFocused && !inDropDown(_this.
|
|
9650
|
+
if (_this.isFocused && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
8733
9651
|
_this._zone.run(function () {
|
|
8734
9652
|
if (_this.isOpen) {
|
|
8735
9653
|
_this.treeview.blur();
|
|
@@ -8740,34 +9658,118 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8740
9658
|
});
|
|
8741
9659
|
});
|
|
8742
9660
|
};
|
|
9661
|
+
DropDownTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
9662
|
+
var _this = this;
|
|
9663
|
+
if (isDocumentAvailable()) {
|
|
9664
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
9665
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
9666
|
+
this._zone.runOutsideAngular(function () {
|
|
9667
|
+
var useCapture = true;
|
|
9668
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
9669
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
9670
|
+
});
|
|
9671
|
+
}
|
|
9672
|
+
};
|
|
9673
|
+
DropDownTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
9674
|
+
if (isDocumentAvailable()) {
|
|
9675
|
+
var useCapture = true;
|
|
9676
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
9677
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9678
|
+
}
|
|
9679
|
+
};
|
|
8743
9680
|
DropDownTreeComponent.prototype.unsubscribeEvents = function () {
|
|
8744
9681
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
9682
|
+
this.unSubscribeFocusEvents();
|
|
8745
9683
|
if (this.touchstartDisposeHandler) {
|
|
8746
9684
|
this.touchstartDisposeHandler();
|
|
8747
9685
|
}
|
|
8748
9686
|
};
|
|
9687
|
+
DropDownTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
9688
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9689
|
+
return;
|
|
9690
|
+
}
|
|
9691
|
+
event.stopImmediatePropagation();
|
|
9692
|
+
this.handleBlur(event);
|
|
9693
|
+
};
|
|
8749
9694
|
DropDownTreeComponent.prototype.assignAriaDescribedBy = function () {
|
|
8750
9695
|
var currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
8751
9696
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
8752
9697
|
var newValue = (this.valueLabelId + " " + currentValue.trim()).trim();
|
|
8753
9698
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
8754
9699
|
};
|
|
9700
|
+
DropDownTreeComponent.prototype.setComponentClasses = function () {
|
|
9701
|
+
if (this.size) {
|
|
9702
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9703
|
+
}
|
|
9704
|
+
if (this.rounded) {
|
|
9705
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9706
|
+
}
|
|
9707
|
+
if (this.fillMode) {
|
|
9708
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9709
|
+
}
|
|
9710
|
+
};
|
|
8755
9711
|
var DropDownTreeComponent_1;
|
|
8756
9712
|
__decorate([
|
|
8757
|
-
HostBinding('class.k-widget'),
|
|
8758
9713
|
HostBinding('class.k-dropdowntree'),
|
|
8759
|
-
HostBinding('class.k-
|
|
9714
|
+
HostBinding('class.k-picker'),
|
|
8760
9715
|
__metadata("design:type", Boolean)
|
|
8761
9716
|
], DropDownTreeComponent.prototype, "hostClasses", void 0);
|
|
9717
|
+
__decorate([
|
|
9718
|
+
HostBinding('class.k-disabled'),
|
|
9719
|
+
HostBinding('attr.aria-disabled'),
|
|
9720
|
+
__metadata("design:type", Boolean),
|
|
9721
|
+
__metadata("design:paramtypes", [])
|
|
9722
|
+
], DropDownTreeComponent.prototype, "isDisabled", null);
|
|
9723
|
+
__decorate([
|
|
9724
|
+
HostBinding('class.k-loading'),
|
|
9725
|
+
__metadata("design:type", Boolean),
|
|
9726
|
+
__metadata("design:paramtypes", [])
|
|
9727
|
+
], DropDownTreeComponent.prototype, "isLoading", null);
|
|
9728
|
+
__decorate([
|
|
9729
|
+
HostBinding('attr.id'),
|
|
9730
|
+
__metadata("design:type", String),
|
|
9731
|
+
__metadata("design:paramtypes", [])
|
|
9732
|
+
], DropDownTreeComponent.prototype, "id", null);
|
|
8762
9733
|
__decorate([
|
|
8763
9734
|
HostBinding('attr.dir'),
|
|
8764
9735
|
__metadata("design:type", String)
|
|
8765
9736
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
8766
9737
|
__decorate([
|
|
8767
|
-
HostBinding('
|
|
9738
|
+
HostBinding('attr.tabindex'),
|
|
9739
|
+
__metadata("design:type", Number),
|
|
9740
|
+
__metadata("design:paramtypes", [])
|
|
9741
|
+
], DropDownTreeComponent.prototype, "hostTabIndex", null);
|
|
9742
|
+
__decorate([
|
|
9743
|
+
HostBinding('attr.role'),
|
|
9744
|
+
__metadata("design:type", String)
|
|
9745
|
+
], DropDownTreeComponent.prototype, "role", void 0);
|
|
9746
|
+
__decorate([
|
|
9747
|
+
HostBinding('attr.aria-haspopup'),
|
|
9748
|
+
__metadata("design:type", String)
|
|
9749
|
+
], DropDownTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
9750
|
+
__decorate([
|
|
9751
|
+
HostBinding('attr.aria-expanded'),
|
|
9752
|
+
__metadata("design:type", Boolean),
|
|
9753
|
+
__metadata("design:paramtypes", [])
|
|
9754
|
+
], DropDownTreeComponent.prototype, "isAriaExpanded", null);
|
|
9755
|
+
__decorate([
|
|
9756
|
+
HostBinding('attr.readonly'),
|
|
9757
|
+
HostBinding('attr.aria-readonly'),
|
|
8768
9758
|
__metadata("design:type", Boolean),
|
|
8769
9759
|
__metadata("design:paramtypes", [])
|
|
8770
|
-
], DropDownTreeComponent.prototype, "
|
|
9760
|
+
], DropDownTreeComponent.prototype, "isReadonly", null);
|
|
9761
|
+
__decorate([
|
|
9762
|
+
HostListener('click'),
|
|
9763
|
+
__metadata("design:type", Function),
|
|
9764
|
+
__metadata("design:paramtypes", []),
|
|
9765
|
+
__metadata("design:returntype", void 0)
|
|
9766
|
+
], DropDownTreeComponent.prototype, "handleClick", null);
|
|
9767
|
+
__decorate([
|
|
9768
|
+
HostListener('keydown', ['$event']),
|
|
9769
|
+
__metadata("design:type", Function),
|
|
9770
|
+
__metadata("design:paramtypes", [Object]),
|
|
9771
|
+
__metadata("design:returntype", void 0)
|
|
9772
|
+
], DropDownTreeComponent.prototype, "handleKeydown", null);
|
|
8771
9773
|
__decorate([
|
|
8772
9774
|
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
8773
9775
|
__metadata("design:type", NoDataTemplateDirective)
|
|
@@ -8792,10 +9794,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8792
9794
|
ViewChild('popupTemplate', { static: true }),
|
|
8793
9795
|
__metadata("design:type", TemplateRef)
|
|
8794
9796
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
8795
|
-
__decorate([
|
|
8796
|
-
ViewChild('wrapper', { static: true }),
|
|
8797
|
-
__metadata("design:type", ElementRef)
|
|
8798
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
8799
9797
|
__decorate([
|
|
8800
9798
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
8801
9799
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -8922,6 +9920,21 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8922
9920
|
__metadata("design:type", Number),
|
|
8923
9921
|
__metadata("design:paramtypes", [Number])
|
|
8924
9922
|
], DropDownTreeComponent.prototype, "tabindex", null);
|
|
9923
|
+
__decorate([
|
|
9924
|
+
Input(),
|
|
9925
|
+
__metadata("design:type", String),
|
|
9926
|
+
__metadata("design:paramtypes", [String])
|
|
9927
|
+
], DropDownTreeComponent.prototype, "size", null);
|
|
9928
|
+
__decorate([
|
|
9929
|
+
Input(),
|
|
9930
|
+
__metadata("design:type", String),
|
|
9931
|
+
__metadata("design:paramtypes", [String])
|
|
9932
|
+
], DropDownTreeComponent.prototype, "rounded", null);
|
|
9933
|
+
__decorate([
|
|
9934
|
+
Input(),
|
|
9935
|
+
__metadata("design:type", String),
|
|
9936
|
+
__metadata("design:paramtypes", [String])
|
|
9937
|
+
], DropDownTreeComponent.prototype, "fillMode", null);
|
|
8925
9938
|
__decorate([
|
|
8926
9939
|
Input(),
|
|
8927
9940
|
__metadata("design:type", Function)
|
|
@@ -8982,14 +9995,14 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8982
9995
|
}
|
|
8983
9996
|
],
|
|
8984
9997
|
selector: 'kendo-dropdowntree',
|
|
8985
|
-
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
|
|
9998
|
+
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 ",
|
|
8986
9999
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8987
10000
|
}),
|
|
8988
10001
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
8989
|
-
__metadata("design:paramtypes", [
|
|
10002
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10003
|
+
PopupService,
|
|
8990
10004
|
NavigationService,
|
|
8991
10005
|
Renderer2,
|
|
8992
|
-
ElementRef,
|
|
8993
10006
|
NgZone,
|
|
8994
10007
|
ChangeDetectorRef,
|
|
8995
10008
|
LocalizationService, Boolean])
|
|
@@ -9008,16 +10021,18 @@ var isNodeVisible$1 = function () { return true; };
|
|
|
9008
10021
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
9009
10022
|
*/
|
|
9010
10023
|
var MultiSelectTreeComponent = /** @class */ (function () {
|
|
9011
|
-
function MultiSelectTreeComponent(popupService, renderer,
|
|
10024
|
+
function MultiSelectTreeComponent(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled$$1) {
|
|
10025
|
+
this.wrapper = wrapper;
|
|
9012
10026
|
this.popupService = popupService;
|
|
9013
10027
|
this.renderer = renderer;
|
|
9014
|
-
this.hostElement = hostElement;
|
|
9015
10028
|
this.navigationService = navigationService;
|
|
9016
10029
|
this._zone = _zone;
|
|
9017
10030
|
this.localization = localization;
|
|
9018
10031
|
this.cdr = cdr;
|
|
9019
10032
|
this.touchEnabled = touchEnabled$$1;
|
|
9020
10033
|
this.hostClasses = true;
|
|
10034
|
+
this.role = 'listbox';
|
|
10035
|
+
this.ariaHasPopup = 'tree';
|
|
9021
10036
|
/**
|
|
9022
10037
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
9023
10038
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -9180,14 +10195,93 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9180
10195
|
this._popupSettings = DEFAULT_POPUP_SETTINGS$1;
|
|
9181
10196
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
9182
10197
|
this._isFocused = false;
|
|
10198
|
+
this._size = 'medium';
|
|
10199
|
+
this._rounded = 'medium';
|
|
10200
|
+
this._fillMode = 'solid';
|
|
9183
10201
|
this.subscriptions = [];
|
|
9184
10202
|
this.lastAction = 'check';
|
|
9185
10203
|
this.onTouchedCallback = noop;
|
|
9186
10204
|
this.onChangeCallback = noop;
|
|
9187
10205
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
9188
10206
|
this.subscribeEvents();
|
|
10207
|
+
this.subscribeFocusEvents();
|
|
9189
10208
|
}
|
|
9190
10209
|
MultiSelectTreeComponent_1 = MultiSelectTreeComponent;
|
|
10210
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isDisabled", {
|
|
10211
|
+
get: function () {
|
|
10212
|
+
return this.disabled;
|
|
10213
|
+
},
|
|
10214
|
+
enumerable: true,
|
|
10215
|
+
configurable: true
|
|
10216
|
+
});
|
|
10217
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isLoading", {
|
|
10218
|
+
get: function () {
|
|
10219
|
+
return this.loading;
|
|
10220
|
+
},
|
|
10221
|
+
enumerable: true,
|
|
10222
|
+
configurable: true
|
|
10223
|
+
});
|
|
10224
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "id", {
|
|
10225
|
+
get: function () {
|
|
10226
|
+
return this.focusableId;
|
|
10227
|
+
},
|
|
10228
|
+
enumerable: true,
|
|
10229
|
+
configurable: true
|
|
10230
|
+
});
|
|
10231
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "hostTabIndex", {
|
|
10232
|
+
get: function () {
|
|
10233
|
+
return this.tabindex;
|
|
10234
|
+
},
|
|
10235
|
+
enumerable: true,
|
|
10236
|
+
configurable: true
|
|
10237
|
+
});
|
|
10238
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isReadonly", {
|
|
10239
|
+
get: function () {
|
|
10240
|
+
return this.readonly;
|
|
10241
|
+
},
|
|
10242
|
+
enumerable: true,
|
|
10243
|
+
configurable: true
|
|
10244
|
+
});
|
|
10245
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaDescribedBy", {
|
|
10246
|
+
get: function () {
|
|
10247
|
+
return this.tagListId;
|
|
10248
|
+
},
|
|
10249
|
+
enumerable: true,
|
|
10250
|
+
configurable: true
|
|
10251
|
+
});
|
|
10252
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaActiveDescendant", {
|
|
10253
|
+
get: function () {
|
|
10254
|
+
return this.focusedTagId;
|
|
10255
|
+
},
|
|
10256
|
+
enumerable: true,
|
|
10257
|
+
configurable: true
|
|
10258
|
+
});
|
|
10259
|
+
/**
|
|
10260
|
+
* @hidden
|
|
10261
|
+
*/
|
|
10262
|
+
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
10263
|
+
this.togglePopup(!this.isOpen);
|
|
10264
|
+
};
|
|
10265
|
+
/**
|
|
10266
|
+
* @hidden
|
|
10267
|
+
*/
|
|
10268
|
+
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
10269
|
+
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
10270
|
+
if (deleteTag) {
|
|
10271
|
+
this.handleBackspace();
|
|
10272
|
+
return;
|
|
10273
|
+
}
|
|
10274
|
+
if (this.disabled || this.readonly) {
|
|
10275
|
+
return;
|
|
10276
|
+
}
|
|
10277
|
+
var eventData = event;
|
|
10278
|
+
var action = this.navigationService.process({
|
|
10279
|
+
originalEvent: eventData
|
|
10280
|
+
});
|
|
10281
|
+
if (action === NavigationAction.Open) {
|
|
10282
|
+
eventData.preventDefault();
|
|
10283
|
+
}
|
|
10284
|
+
};
|
|
9191
10285
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "treeview", {
|
|
9192
10286
|
get: function () {
|
|
9193
10287
|
return this._treeview;
|
|
@@ -9228,6 +10322,79 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9228
10322
|
enumerable: true,
|
|
9229
10323
|
configurable: true
|
|
9230
10324
|
});
|
|
10325
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "size", {
|
|
10326
|
+
get: function () {
|
|
10327
|
+
return this._size;
|
|
10328
|
+
},
|
|
10329
|
+
/**
|
|
10330
|
+
* Sets the size of the component.
|
|
10331
|
+
*
|
|
10332
|
+
* The possible values are:
|
|
10333
|
+
* * `'small'`
|
|
10334
|
+
* * `'medium'` (default)
|
|
10335
|
+
* * `'large'`
|
|
10336
|
+
* * `null`
|
|
10337
|
+
*
|
|
10338
|
+
*/
|
|
10339
|
+
set: function (size) {
|
|
10340
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10341
|
+
if (size) {
|
|
10342
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10343
|
+
}
|
|
10344
|
+
this._size = size;
|
|
10345
|
+
},
|
|
10346
|
+
enumerable: true,
|
|
10347
|
+
configurable: true
|
|
10348
|
+
});
|
|
10349
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "rounded", {
|
|
10350
|
+
get: function () {
|
|
10351
|
+
return this._rounded;
|
|
10352
|
+
},
|
|
10353
|
+
/**
|
|
10354
|
+
* Sets the border radius of the component.
|
|
10355
|
+
*
|
|
10356
|
+
* The possible values are:
|
|
10357
|
+
* * `'small'`
|
|
10358
|
+
* * `'medium'` (default)
|
|
10359
|
+
* * `'large'`
|
|
10360
|
+
* * `'full'`
|
|
10361
|
+
* * `null`
|
|
10362
|
+
*
|
|
10363
|
+
*/
|
|
10364
|
+
set: function (rounded) {
|
|
10365
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10366
|
+
if (rounded) {
|
|
10367
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10368
|
+
}
|
|
10369
|
+
this._rounded = rounded;
|
|
10370
|
+
},
|
|
10371
|
+
enumerable: true,
|
|
10372
|
+
configurable: true
|
|
10373
|
+
});
|
|
10374
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "fillMode", {
|
|
10375
|
+
get: function () {
|
|
10376
|
+
return this._fillMode;
|
|
10377
|
+
},
|
|
10378
|
+
/**
|
|
10379
|
+
* Sets the fillMode of the component.
|
|
10380
|
+
*
|
|
10381
|
+
* The possible values are:
|
|
10382
|
+
* * `'flat'`
|
|
10383
|
+
* * `'solid'` (default)
|
|
10384
|
+
* * `'outline'`
|
|
10385
|
+
* * `null`
|
|
10386
|
+
*
|
|
10387
|
+
*/
|
|
10388
|
+
set: function (fillMode) {
|
|
10389
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10390
|
+
if (fillMode) {
|
|
10391
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10392
|
+
}
|
|
10393
|
+
this._fillMode = fillMode;
|
|
10394
|
+
},
|
|
10395
|
+
enumerable: true,
|
|
10396
|
+
configurable: true
|
|
10397
|
+
});
|
|
9231
10398
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupSettings", {
|
|
9232
10399
|
get: function () {
|
|
9233
10400
|
return this._popupSettings;
|
|
@@ -9347,7 +10514,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9347
10514
|
return this._isFocused;
|
|
9348
10515
|
},
|
|
9349
10516
|
set: function (isFocused) {
|
|
9350
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
10517
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
9351
10518
|
this._isFocused = isFocused;
|
|
9352
10519
|
},
|
|
9353
10520
|
enumerable: true,
|
|
@@ -9398,7 +10565,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9398
10565
|
* @hidden
|
|
9399
10566
|
*/
|
|
9400
10567
|
get: function () {
|
|
9401
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
10568
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
9402
10569
|
if (this.popupSettings.popupClass) {
|
|
9403
10570
|
containerClasses.push(this.popupSettings.popupClass);
|
|
9404
10571
|
}
|
|
@@ -9534,7 +10701,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9534
10701
|
});
|
|
9535
10702
|
MultiSelectTreeComponent.prototype.ngOnInit = function () {
|
|
9536
10703
|
var _this = this;
|
|
9537
|
-
this.renderer.removeAttribute(this.
|
|
10704
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
9538
10705
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
9539
10706
|
this.subscriptions.push(this.localization
|
|
9540
10707
|
.changes.subscribe(function (_a) {
|
|
@@ -9542,6 +10709,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9542
10709
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
9543
10710
|
_this.cdr.markForCheck();
|
|
9544
10711
|
}));
|
|
10712
|
+
this.setComponentClasses();
|
|
9545
10713
|
};
|
|
9546
10714
|
/**
|
|
9547
10715
|
* @hidden
|
|
@@ -9647,8 +10815,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9647
10815
|
/**
|
|
9648
10816
|
* @hidden
|
|
9649
10817
|
*/
|
|
9650
|
-
MultiSelectTreeComponent.prototype.handleFocus = function () {
|
|
10818
|
+
MultiSelectTreeComponent.prototype.handleFocus = function (event) {
|
|
9651
10819
|
var _this = this;
|
|
10820
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
10821
|
+
return;
|
|
10822
|
+
}
|
|
10823
|
+
event.stopImmediatePropagation();
|
|
9652
10824
|
if (!this.isFocused) {
|
|
9653
10825
|
this.isFocused = true;
|
|
9654
10826
|
if (hasObservers(this.onFocus)) {
|
|
@@ -9658,7 +10830,9 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9658
10830
|
}
|
|
9659
10831
|
// Re-focus the treeview if `close` is prevented
|
|
9660
10832
|
if (this.isOpen && this.treeview) {
|
|
9661
|
-
this.lastNodeOnFocus
|
|
10833
|
+
if (this.lastNodeOnFocus) {
|
|
10834
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
10835
|
+
}
|
|
9662
10836
|
this.treeview.focus();
|
|
9663
10837
|
}
|
|
9664
10838
|
}
|
|
@@ -9669,46 +10843,20 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9669
10843
|
MultiSelectTreeComponent.prototype.handleBlur = function (e) {
|
|
9670
10844
|
var _this = this;
|
|
9671
10845
|
var relatedTarget = e && e.relatedTarget;
|
|
9672
|
-
if (this.
|
|
10846
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
9673
10847
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
9674
10848
|
return;
|
|
9675
10849
|
}
|
|
9676
10850
|
this.isFocused = false;
|
|
9677
10851
|
this.togglePopup(false);
|
|
9678
10852
|
if (hasObservers(this.onBlur) ||
|
|
9679
|
-
isUntouched(this.
|
|
10853
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
9680
10854
|
this._zone.run(function () {
|
|
9681
10855
|
_this.onBlur.emit();
|
|
9682
10856
|
_this.onTouchedCallback();
|
|
9683
10857
|
});
|
|
9684
10858
|
}
|
|
9685
10859
|
};
|
|
9686
|
-
/**
|
|
9687
|
-
* @hidden
|
|
9688
|
-
*/
|
|
9689
|
-
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
9690
|
-
this.togglePopup(!this.isOpen);
|
|
9691
|
-
};
|
|
9692
|
-
/**
|
|
9693
|
-
* @hidden
|
|
9694
|
-
*/
|
|
9695
|
-
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
9696
|
-
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
9697
|
-
if (deleteTag) {
|
|
9698
|
-
this.handleBackspace();
|
|
9699
|
-
return;
|
|
9700
|
-
}
|
|
9701
|
-
if (this.disabled || this.readonly) {
|
|
9702
|
-
return;
|
|
9703
|
-
}
|
|
9704
|
-
var eventData = event;
|
|
9705
|
-
var action = this.navigationService.process({
|
|
9706
|
-
originalEvent: eventData
|
|
9707
|
-
});
|
|
9708
|
-
if (action === NavigationAction.Open) {
|
|
9709
|
-
eventData.preventDefault();
|
|
9710
|
-
}
|
|
9711
|
-
};
|
|
9712
10860
|
/**
|
|
9713
10861
|
* @hidden
|
|
9714
10862
|
*/
|
|
@@ -9848,6 +10996,26 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9848
10996
|
this.filterChange.next(term);
|
|
9849
10997
|
this.allNodesHidden = this.nodes.every(function (node, index) { return !_this.isVisible(node, String(index)); });
|
|
9850
10998
|
};
|
|
10999
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "filterInputClasses", {
|
|
11000
|
+
/**
|
|
11001
|
+
* @hidden
|
|
11002
|
+
*/
|
|
11003
|
+
get: function () {
|
|
11004
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
11005
|
+
},
|
|
11006
|
+
enumerable: true,
|
|
11007
|
+
configurable: true
|
|
11008
|
+
});
|
|
11009
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkAllCheckboxClasses", {
|
|
11010
|
+
/**
|
|
11011
|
+
* @hidden
|
|
11012
|
+
*/
|
|
11013
|
+
get: function () {
|
|
11014
|
+
return "" + (this.size ? getSizeClass('checkbox', this.size) : '');
|
|
11015
|
+
},
|
|
11016
|
+
enumerable: true,
|
|
11017
|
+
configurable: true
|
|
11018
|
+
});
|
|
9851
11019
|
/**
|
|
9852
11020
|
* @hidden
|
|
9853
11021
|
*/
|
|
@@ -9963,6 +11131,32 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9963
11131
|
.pipe(filter(function () { return !_this.isTreeViewActive; }))
|
|
9964
11132
|
.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)));
|
|
9965
11133
|
};
|
|
11134
|
+
MultiSelectTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
11135
|
+
var _this = this;
|
|
11136
|
+
if (isDocumentAvailable()) {
|
|
11137
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
11138
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
11139
|
+
this._zone.runOutsideAngular(function () {
|
|
11140
|
+
var useCapture = true;
|
|
11141
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
11142
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
11143
|
+
});
|
|
11144
|
+
}
|
|
11145
|
+
};
|
|
11146
|
+
MultiSelectTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
11147
|
+
if (isDocumentAvailable()) {
|
|
11148
|
+
var useCapture = true;
|
|
11149
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
11150
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11151
|
+
}
|
|
11152
|
+
};
|
|
11153
|
+
MultiSelectTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
11154
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
11155
|
+
return;
|
|
11156
|
+
}
|
|
11157
|
+
event.stopImmediatePropagation();
|
|
11158
|
+
this.handleBlur(event);
|
|
11159
|
+
};
|
|
9966
11160
|
MultiSelectTreeComponent.prototype.handleTabKey = function () {
|
|
9967
11161
|
this.focus();
|
|
9968
11162
|
if (this.isOpen) {
|
|
@@ -10065,6 +11259,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10065
11259
|
};
|
|
10066
11260
|
MultiSelectTreeComponent.prototype.unsubscribeEvents = function () {
|
|
10067
11261
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
11262
|
+
this.unSubscribeFocusEvents();
|
|
10068
11263
|
};
|
|
10069
11264
|
/**
|
|
10070
11265
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -10114,16 +11309,84 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10114
11309
|
return indices;
|
|
10115
11310
|
}, []));
|
|
10116
11311
|
};
|
|
11312
|
+
MultiSelectTreeComponent.prototype.setComponentClasses = function () {
|
|
11313
|
+
if (this.size) {
|
|
11314
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
11315
|
+
}
|
|
11316
|
+
if (this.rounded) {
|
|
11317
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
11318
|
+
}
|
|
11319
|
+
if (this.fillMode) {
|
|
11320
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
11321
|
+
}
|
|
11322
|
+
};
|
|
10117
11323
|
var MultiSelectTreeComponent_1;
|
|
10118
11324
|
__decorate([
|
|
10119
|
-
HostBinding('class.k-widget'),
|
|
10120
11325
|
HostBinding('class.k-dropdowntree'),
|
|
11326
|
+
HostBinding('class.k-input'),
|
|
10121
11327
|
__metadata("design:type", Boolean)
|
|
10122
11328
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
11329
|
+
__decorate([
|
|
11330
|
+
HostBinding('class.k-disabled'),
|
|
11331
|
+
HostBinding('attr.aria-disabled'),
|
|
11332
|
+
__metadata("design:type", Boolean),
|
|
11333
|
+
__metadata("design:paramtypes", [])
|
|
11334
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
11335
|
+
__decorate([
|
|
11336
|
+
HostBinding('class.k-loading'),
|
|
11337
|
+
__metadata("design:type", Boolean),
|
|
11338
|
+
__metadata("design:paramtypes", [])
|
|
11339
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
11340
|
+
__decorate([
|
|
11341
|
+
HostBinding('attr.id'),
|
|
11342
|
+
__metadata("design:type", String),
|
|
11343
|
+
__metadata("design:paramtypes", [])
|
|
11344
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
10123
11345
|
__decorate([
|
|
10124
11346
|
HostBinding('attr.dir'),
|
|
10125
11347
|
__metadata("design:type", String)
|
|
10126
11348
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
11349
|
+
__decorate([
|
|
11350
|
+
HostBinding('attr.tabindex'),
|
|
11351
|
+
__metadata("design:type", Number),
|
|
11352
|
+
__metadata("design:paramtypes", [])
|
|
11353
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
11354
|
+
__decorate([
|
|
11355
|
+
HostBinding('attr.role'),
|
|
11356
|
+
__metadata("design:type", String)
|
|
11357
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
11358
|
+
__decorate([
|
|
11359
|
+
HostBinding('attr.aria-haspopup'),
|
|
11360
|
+
__metadata("design:type", String)
|
|
11361
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
11362
|
+
__decorate([
|
|
11363
|
+
HostBinding('attr.readonly'),
|
|
11364
|
+
HostBinding('attr.aria-readonly'),
|
|
11365
|
+
__metadata("design:type", Boolean),
|
|
11366
|
+
__metadata("design:paramtypes", [])
|
|
11367
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
11368
|
+
__decorate([
|
|
11369
|
+
HostBinding('attr.aria-describedby'),
|
|
11370
|
+
__metadata("design:type", String),
|
|
11371
|
+
__metadata("design:paramtypes", [])
|
|
11372
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
11373
|
+
__decorate([
|
|
11374
|
+
HostBinding('attr.aria-activedescendant'),
|
|
11375
|
+
__metadata("design:type", String),
|
|
11376
|
+
__metadata("design:paramtypes", [])
|
|
11377
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
11378
|
+
__decorate([
|
|
11379
|
+
HostListener('click'),
|
|
11380
|
+
__metadata("design:type", Function),
|
|
11381
|
+
__metadata("design:paramtypes", []),
|
|
11382
|
+
__metadata("design:returntype", void 0)
|
|
11383
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
11384
|
+
__decorate([
|
|
11385
|
+
HostListener('keydown', ['$event']),
|
|
11386
|
+
__metadata("design:type", Function),
|
|
11387
|
+
__metadata("design:paramtypes", [Object]),
|
|
11388
|
+
__metadata("design:returntype", void 0)
|
|
11389
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
10127
11390
|
__decorate([
|
|
10128
11391
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
10129
11392
|
__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -10152,10 +11415,6 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10152
11415
|
ViewChild('popupTemplate', { static: true }),
|
|
10153
11416
|
__metadata("design:type", TemplateRef)
|
|
10154
11417
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
10155
|
-
__decorate([
|
|
10156
|
-
ViewChild('wrapper', { static: true }),
|
|
10157
|
-
__metadata("design:type", ElementRef)
|
|
10158
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
10159
11418
|
__decorate([
|
|
10160
11419
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
10161
11420
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -10178,6 +11437,21 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10178
11437
|
__metadata("design:type", Number),
|
|
10179
11438
|
__metadata("design:paramtypes", [Number])
|
|
10180
11439
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
11440
|
+
__decorate([
|
|
11441
|
+
Input(),
|
|
11442
|
+
__metadata("design:type", String),
|
|
11443
|
+
__metadata("design:paramtypes", [String])
|
|
11444
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
11445
|
+
__decorate([
|
|
11446
|
+
Input(),
|
|
11447
|
+
__metadata("design:type", String),
|
|
11448
|
+
__metadata("design:paramtypes", [String])
|
|
11449
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
11450
|
+
__decorate([
|
|
11451
|
+
Input(),
|
|
11452
|
+
__metadata("design:type", String),
|
|
11453
|
+
__metadata("design:paramtypes", [String])
|
|
11454
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
10181
11455
|
__decorate([
|
|
10182
11456
|
Input(),
|
|
10183
11457
|
__metadata("design:type", Object),
|
|
@@ -10359,12 +11633,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10359
11633
|
}
|
|
10360
11634
|
],
|
|
10361
11635
|
selector: 'kendo-multiselecttree',
|
|
10362
|
-
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 <
|
|
11636
|
+
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 "
|
|
10363
11637
|
}),
|
|
10364
11638
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
10365
|
-
__metadata("design:paramtypes", [
|
|
11639
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11640
|
+
PopupService,
|
|
10366
11641
|
Renderer2,
|
|
10367
|
-
ElementRef,
|
|
10368
11642
|
NavigationService,
|
|
10369
11643
|
NgZone,
|
|
10370
11644
|
LocalizationService,
|
|
@@ -10518,13 +11792,40 @@ var DropDownTreesExpandDirective = /** @class */ (function (_super) {
|
|
|
10518
11792
|
* @hidden
|
|
10519
11793
|
*/
|
|
10520
11794
|
var TagListComponent = /** @class */ (function () {
|
|
10521
|
-
function TagListComponent() {
|
|
11795
|
+
function TagListComponent(renderer, hostElement) {
|
|
11796
|
+
this.renderer = renderer;
|
|
11797
|
+
this.hostElement = hostElement;
|
|
11798
|
+
this.rounded = 'medium';
|
|
11799
|
+
this.fillMode = 'solid';
|
|
10522
11800
|
/**
|
|
10523
11801
|
* A collection with the disabled tags' indices.
|
|
10524
11802
|
*/
|
|
10525
11803
|
this.disabledIndices = new Set();
|
|
10526
11804
|
this.removeTag = new EventEmitter();
|
|
11805
|
+
this.hostClasses = true;
|
|
11806
|
+
this._size = 'medium';
|
|
10527
11807
|
}
|
|
11808
|
+
Object.defineProperty(TagListComponent.prototype, "size", {
|
|
11809
|
+
get: function () {
|
|
11810
|
+
return this._size;
|
|
11811
|
+
},
|
|
11812
|
+
set: function (size) {
|
|
11813
|
+
this.renderer.removeClass(this.hostElement.nativeElement, getSizeClass('chip-list', this.size));
|
|
11814
|
+
if (size) {
|
|
11815
|
+
this.renderer.addClass(this.hostElement.nativeElement, getSizeClass('chip-list', size));
|
|
11816
|
+
}
|
|
11817
|
+
this._size = size;
|
|
11818
|
+
},
|
|
11819
|
+
enumerable: true,
|
|
11820
|
+
configurable: true
|
|
11821
|
+
});
|
|
11822
|
+
Object.defineProperty(TagListComponent.prototype, "hostId", {
|
|
11823
|
+
get: function () {
|
|
11824
|
+
return this.id;
|
|
11825
|
+
},
|
|
11826
|
+
enumerable: true,
|
|
11827
|
+
configurable: true
|
|
11828
|
+
});
|
|
10528
11829
|
TagListComponent.prototype.tagProp = function (tag, prop, index) {
|
|
10529
11830
|
var propField = prop && this.getPropField(tag, prop, index);
|
|
10530
11831
|
return getter$1(tag, propField);
|
|
@@ -10614,6 +11915,19 @@ var TagListComponent = /** @class */ (function () {
|
|
|
10614
11915
|
Input(),
|
|
10615
11916
|
__metadata("design:type", String)
|
|
10616
11917
|
], TagListComponent.prototype, "id", void 0);
|
|
11918
|
+
__decorate([
|
|
11919
|
+
Input(),
|
|
11920
|
+
__metadata("design:type", String),
|
|
11921
|
+
__metadata("design:paramtypes", [String])
|
|
11922
|
+
], TagListComponent.prototype, "size", null);
|
|
11923
|
+
__decorate([
|
|
11924
|
+
Input(),
|
|
11925
|
+
__metadata("design:type", String)
|
|
11926
|
+
], TagListComponent.prototype, "rounded", void 0);
|
|
11927
|
+
__decorate([
|
|
11928
|
+
Input(),
|
|
11929
|
+
__metadata("design:type", String)
|
|
11930
|
+
], TagListComponent.prototype, "fillMode", void 0);
|
|
10617
11931
|
__decorate([
|
|
10618
11932
|
Input(),
|
|
10619
11933
|
__metadata("design:type", Set)
|
|
@@ -10622,11 +11936,24 @@ var TagListComponent = /** @class */ (function () {
|
|
|
10622
11936
|
Output(),
|
|
10623
11937
|
__metadata("design:type", EventEmitter)
|
|
10624
11938
|
], TagListComponent.prototype, "removeTag", void 0);
|
|
11939
|
+
__decorate([
|
|
11940
|
+
HostBinding('class.k-input-values'),
|
|
11941
|
+
HostBinding('class.k-chip-list'),
|
|
11942
|
+
HostBinding('class.k-selection-multiple'),
|
|
11943
|
+
__metadata("design:type", Boolean)
|
|
11944
|
+
], TagListComponent.prototype, "hostClasses", void 0);
|
|
11945
|
+
__decorate([
|
|
11946
|
+
HostBinding('attr.id'),
|
|
11947
|
+
__metadata("design:type", String),
|
|
11948
|
+
__metadata("design:paramtypes", [])
|
|
11949
|
+
], TagListComponent.prototype, "hostId", null);
|
|
10625
11950
|
TagListComponent = __decorate([
|
|
10626
11951
|
Component({
|
|
10627
11952
|
selector: 'kendo-taglist',
|
|
10628
|
-
template: "\n <
|
|
10629
|
-
})
|
|
11953
|
+
template: "\n <div\n *ngFor=\"let tag of tags; let index = index;\"\n role=\"option\"\n [attr.id]=\"itemId(tag, index)\"\n [attr.aria-hidden]=\"tagAriaHidden(index)\"\n aria-selected=\"true\"\n [attr.aria-setsize]=\"tags?.length\"\n class=\"k-chip\"\n [ngClass]=\"{\n 'k-focus': index === focused,\n 'k-disabled': isTagDisabled(tag, index),\n 'k-chip-sm': size === 'small',\n 'k-chip-md': size === 'medium',\n 'k-chip-lg': size === 'large',\n 'k-rounded-sm': rounded === 'small',\n 'k-rounded-md': rounded === 'medium',\n 'k-rounded-lg': rounded === 'large',\n 'k-rounded-full': rounded === 'full',\n 'k-chip-solid k-chip-solid-base': fillMode === 'solid',\n 'k-chip-flat k-chip-flat-base': fillMode === 'flat',\n 'k-chip-outline k-chip-outline-base': fillMode === 'outline'\n }\"\n >\n <span class=\"k-chip-content\">\n <ng-template *ngIf=\"isGroupTag(tag); then groupTag else singleTag\"></ng-template>\n <ng-template #groupTag>\n <span class=\"k-chip-label k-text-ellipsis\">\n <ng-template *ngIf=\"groupTemplate\"\n [templateContext]=\"{\n templateRef: groupTemplate.templateRef,\n $implicit: tag\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!groupTemplate\">{{ tag.length }} {{ tag.length === 1 ? 'item' : 'items' }} selected</ng-template>\n </span>\n </ng-template>\n <ng-template #singleTag>\n <span class=\"k-chip-label k-text-ellipsis\">\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: tag\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\">{{ tagProp(tag, textField, index) }}</ng-template>\n </span>\n </ng-template>\n </span>\n\n <span class=\"k-chip-actions\">\n <span aria-label=\"delete\" [attr.aria-hidden]=\"index !== focused\" class=\"k-chip-action k-chip-remove-action\">\n <span class=\"k-icon k-i-x-circle\" (mousedown)=\"deleteTag($event, tag, index)\">\n </span>\n </span>\n </span>\n </div>\n <ng-content></ng-content>\n "
|
|
11954
|
+
}),
|
|
11955
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
11956
|
+
ElementRef])
|
|
10630
11957
|
], TagListComponent);
|
|
10631
11958
|
return TagListComponent;
|
|
10632
11959
|
}());
|
|
@@ -10984,12 +12311,12 @@ var SelectableDirective = /** @class */ (function () {
|
|
|
10984
12311
|
__metadata("design:type", Boolean)
|
|
10985
12312
|
], SelectableDirective.prototype, "multipleSelection", void 0);
|
|
10986
12313
|
__decorate([
|
|
10987
|
-
HostBinding('class.k-
|
|
12314
|
+
HostBinding('class.k-focus'),
|
|
10988
12315
|
__metadata("design:type", Boolean),
|
|
10989
12316
|
__metadata("design:paramtypes", [])
|
|
10990
12317
|
], SelectableDirective.prototype, "focusedClassName", null);
|
|
10991
12318
|
__decorate([
|
|
10992
|
-
HostBinding('class.k-
|
|
12319
|
+
HostBinding('class.k-selected'),
|
|
10993
12320
|
__metadata("design:type", Boolean),
|
|
10994
12321
|
__metadata("design:paramtypes", [])
|
|
10995
12322
|
], SelectableDirective.prototype, "selectedClassName", null);
|