@progress/kendo-angular-dropdowns 5.5.1-dev.202111191410 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/autocomplete/autocomplete.component.js +120 -5
- package/dist/es/comboboxes/combobox.component.js +141 -20
- package/dist/es/comboboxes/multicolumncombobox.component.js +30 -10
- package/dist/es/common/list.component.js +83 -5
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/list-type.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/searchbar.component.js +1 -1
- package/dist/es/common/selection/selectable.directive.js +2 -2
- package/dist/es/common/taglist.component.js +58 -5
- package/dist/es/common/util.js +37 -0
- package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
- package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
- package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
- package/dist/es/multiselect/multiselect.component.js +162 -35
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
- package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
- package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
- package/dist/es2015/comboboxes/combobox.component.js +207 -106
- package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
- package/dist/es2015/common/list.component.d.ts +22 -1
- package/dist/es2015/common/list.component.js +115 -37
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/list-type.d.ts +8 -0
- package/dist/es2015/common/models/list-type.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/searchbar.component.js +1 -1
- package/dist/es2015/common/selection/selectable.directive.js +2 -2
- package/dist/es2015/common/taglist.component.d.ts +13 -1
- package/dist/es2015/common/taglist.component.js +102 -47
- package/dist/es2015/common/util.d.ts +17 -0
- package/dist/es2015/common/util.js +37 -0
- package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +77 -13
- package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
- package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
- package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
- package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
- package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
- package/dist/es2015/multiselect/multiselect.component.js +183 -70
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1928 -802
- package/dist/fesm5/index.js +1569 -231
- package/dist/npm/autocomplete/autocomplete.component.js +119 -4
- package/dist/npm/comboboxes/combobox.component.js +140 -19
- package/dist/npm/comboboxes/multicolumncombobox.component.js +29 -9
- package/dist/npm/common/list.component.js +82 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/list-type.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/searchbar.component.js +1 -1
- package/dist/npm/common/selection/selectable.directive.js +2 -2
- package/dist/npm/common/taglist.component.js +56 -3
- package/dist/npm/common/util.js +37 -0
- package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
- package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
- package/dist/npm/multiselect/multiselect.component.js +160 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +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: 1642581653,
|
|
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,7 +4833,6 @@ 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
4838
|
/**
|
|
@@ -4565,7 +4916,8 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4565
4916
|
* Fires each time the DropDownList gets blurred.
|
|
4566
4917
|
*/
|
|
4567
4918
|
this.onBlur = new EventEmitter();
|
|
4568
|
-
this.
|
|
4919
|
+
this.hostClasses = true;
|
|
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,34 +5262,115 @@ 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;
|
|
4839
|
-
}
|
|
4840
|
-
var hasSelected = isPresent(this.selectionService.selected[0]);
|
|
4841
|
-
var focusedItemNotSelected = isPresent(this.selectionService.focused) && !this.selectionService.isSelected(this.selectionService.focused);
|
|
4842
|
-
if (!hasSelected || focusedItemNotSelected) {
|
|
4843
|
-
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.ArrowRight) {
|
|
4844
|
-
offset = -1;
|
|
4845
|
-
}
|
|
4846
|
-
else if (event.keyCode === Keys.ArrowUp || event.keyCode === Keys.ArrowLeft) {
|
|
4847
|
-
offset = 1;
|
|
4848
|
-
}
|
|
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;
|
|
4849
5271
|
}
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
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, "id", {
|
|
5288
|
+
get: function () {
|
|
5289
|
+
return this.focusableId;
|
|
5290
|
+
},
|
|
5291
|
+
enumerable: true,
|
|
5292
|
+
configurable: true
|
|
5293
|
+
});
|
|
5294
|
+
Object.defineProperty(DropDownListComponent.prototype, "dir", {
|
|
5295
|
+
get: function () {
|
|
5296
|
+
return this.direction;
|
|
5297
|
+
},
|
|
5298
|
+
enumerable: true,
|
|
5299
|
+
configurable: true
|
|
5300
|
+
});
|
|
5301
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostTabIndex", {
|
|
5302
|
+
get: function () {
|
|
5303
|
+
return this.widgetTabIndex;
|
|
5304
|
+
},
|
|
5305
|
+
enumerable: true,
|
|
5306
|
+
configurable: true
|
|
5307
|
+
});
|
|
5308
|
+
Object.defineProperty(DropDownListComponent.prototype, "isReadonly", {
|
|
5309
|
+
get: function () {
|
|
5310
|
+
return this.readonly;
|
|
5311
|
+
},
|
|
5312
|
+
enumerable: true,
|
|
5313
|
+
configurable: true
|
|
5314
|
+
});
|
|
5315
|
+
Object.defineProperty(DropDownListComponent.prototype, "isAriaExpanded", {
|
|
5316
|
+
get: function () {
|
|
5317
|
+
return this.ariaExpanded;
|
|
5318
|
+
},
|
|
5319
|
+
enumerable: true,
|
|
5320
|
+
configurable: true
|
|
5321
|
+
});
|
|
5322
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostAriaOwns", {
|
|
5323
|
+
get: function () {
|
|
5324
|
+
return this.ariaOwns;
|
|
5325
|
+
},
|
|
5326
|
+
enumerable: true,
|
|
5327
|
+
configurable: true
|
|
5328
|
+
});
|
|
5329
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostAriaActivedescendant", {
|
|
5330
|
+
get: function () {
|
|
5331
|
+
return this.ariaActivedescendant;
|
|
5332
|
+
},
|
|
5333
|
+
enumerable: true,
|
|
5334
|
+
configurable: true
|
|
5335
|
+
});
|
|
5336
|
+
Object.defineProperty(DropDownListComponent.prototype, "hostNoDataLabel", {
|
|
5337
|
+
get: function () {
|
|
5338
|
+
return this.noDataLabel;
|
|
5339
|
+
},
|
|
5340
|
+
enumerable: true,
|
|
5341
|
+
configurable: true
|
|
5342
|
+
});
|
|
5343
|
+
/**
|
|
5344
|
+
* @hidden
|
|
5345
|
+
*/
|
|
5346
|
+
DropDownListComponent.prototype.keydown = function (event) {
|
|
5347
|
+
var firstIndex = isPresent(this.defaultItem) ? -1 : 0;
|
|
5348
|
+
var focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
|
|
5349
|
+
var offset = 0;
|
|
5350
|
+
if (this.disabled || this.readonly) {
|
|
5351
|
+
return;
|
|
5352
|
+
}
|
|
5353
|
+
var isHomeEnd = event.keyCode === Keys.Home || event.keyCode === Keys.End;
|
|
5354
|
+
var isFilterFocused = this.filterable && this.isFocused && this.isOpen;
|
|
5355
|
+
if (isFilterFocused && isHomeEnd) {
|
|
5356
|
+
return;
|
|
5357
|
+
}
|
|
5358
|
+
var hasSelected = isPresent(this.selectionService.selected[0]);
|
|
5359
|
+
var focusedItemNotSelected = isPresent(this.selectionService.focused) && !this.selectionService.isSelected(this.selectionService.focused);
|
|
5360
|
+
if (!hasSelected || focusedItemNotSelected) {
|
|
5361
|
+
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.ArrowRight) {
|
|
5362
|
+
offset = -1;
|
|
5363
|
+
}
|
|
5364
|
+
else if (event.keyCode === Keys.ArrowUp || event.keyCode === Keys.ArrowLeft) {
|
|
5365
|
+
offset = 1;
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5368
|
+
var eventData = event;
|
|
5369
|
+
var action = this.navigationService.process({
|
|
5370
|
+
current: focused + offset,
|
|
5371
|
+
max: this.dataService.itemsCount - 1,
|
|
5372
|
+
min: this.defaultItem ? -1 : 0,
|
|
5373
|
+
originalEvent: eventData
|
|
4856
5374
|
});
|
|
4857
5375
|
var leftRightKeys = (action === NavigationAction.Left) || (action === NavigationAction.Right);
|
|
4858
5376
|
if (action !== NavigationAction.Undefined &&
|
|
@@ -4882,30 +5400,12 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4882
5400
|
this.focus();
|
|
4883
5401
|
this.togglePopup(!this.isOpen);
|
|
4884
5402
|
};
|
|
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
5403
|
Object.defineProperty(DropDownListComponent.prototype, "isFocused", {
|
|
4904
5404
|
get: function () {
|
|
4905
5405
|
return this._isFocused;
|
|
4906
5406
|
},
|
|
4907
5407
|
set: function (isFocused) {
|
|
4908
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
5408
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
4909
5409
|
this._isFocused = isFocused;
|
|
4910
5410
|
},
|
|
4911
5411
|
enumerable: true,
|
|
@@ -4913,7 +5413,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4913
5413
|
});
|
|
4914
5414
|
DropDownListComponent.prototype.ngOnInit = function () {
|
|
4915
5415
|
var _this = this;
|
|
4916
|
-
this.renderer.removeAttribute(this.
|
|
5416
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
4917
5417
|
this.localizationChangesSubscription = this.localization
|
|
4918
5418
|
.changes.subscribe(function (_a) {
|
|
4919
5419
|
var rtl = _a.rtl;
|
|
@@ -4922,6 +5422,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
4922
5422
|
});
|
|
4923
5423
|
this.setMessages();
|
|
4924
5424
|
this.assignAriaDescribedBy();
|
|
5425
|
+
this.setComponentClasses();
|
|
4925
5426
|
};
|
|
4926
5427
|
/**
|
|
4927
5428
|
* @hidden
|
|
@@ -5103,6 +5604,36 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5103
5604
|
enumerable: true,
|
|
5104
5605
|
configurable: true
|
|
5105
5606
|
});
|
|
5607
|
+
Object.defineProperty(DropDownListComponent.prototype, "selectButtonClasses", {
|
|
5608
|
+
/**
|
|
5609
|
+
* @hidden
|
|
5610
|
+
*/
|
|
5611
|
+
get: function () {
|
|
5612
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
|
|
5613
|
+
},
|
|
5614
|
+
enumerable: true,
|
|
5615
|
+
configurable: true
|
|
5616
|
+
});
|
|
5617
|
+
Object.defineProperty(DropDownListComponent.prototype, "filterInputClasses", {
|
|
5618
|
+
/**
|
|
5619
|
+
* @hidden
|
|
5620
|
+
*/
|
|
5621
|
+
get: function () {
|
|
5622
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
5623
|
+
},
|
|
5624
|
+
enumerable: true,
|
|
5625
|
+
configurable: true
|
|
5626
|
+
});
|
|
5627
|
+
Object.defineProperty(DropDownListComponent.prototype, "optionLabelSizeClass", {
|
|
5628
|
+
/**
|
|
5629
|
+
* @hidden
|
|
5630
|
+
*/
|
|
5631
|
+
get: function () {
|
|
5632
|
+
return "" + (this.size ? getSizeClass('list', this.size) : '');
|
|
5633
|
+
},
|
|
5634
|
+
enumerable: true,
|
|
5635
|
+
configurable: true
|
|
5636
|
+
});
|
|
5106
5637
|
Object.defineProperty(DropDownListComponent.prototype, "listContainerClasses", {
|
|
5107
5638
|
/**
|
|
5108
5639
|
* @hidden
|
|
@@ -5250,13 +5781,13 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5250
5781
|
.subscribe(this.handleEnter.bind(this));
|
|
5251
5782
|
this.escSubscription = this.navigationService.esc
|
|
5252
5783
|
.subscribe(this.handleEscape.bind(this));
|
|
5253
|
-
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.
|
|
5784
|
+
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(function () { return interval(10).pipe(take(1), takeUntil(_this.hostElementFocused)); }))
|
|
5254
5785
|
.subscribe(function () {
|
|
5255
|
-
_this.
|
|
5786
|
+
_this.hostElementBlurred.emit();
|
|
5256
5787
|
});
|
|
5257
5788
|
this._zone.runOutsideAngular(function () {
|
|
5258
5789
|
_this.componentBlurredSubscription =
|
|
5259
|
-
merge(_this.
|
|
5790
|
+
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
5791
|
.subscribe(function () { return _this.componentBlur(); });
|
|
5261
5792
|
});
|
|
5262
5793
|
};
|
|
@@ -5269,7 +5800,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5269
5800
|
// Roll up DropDownList on iOS when tapped outside
|
|
5270
5801
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
5271
5802
|
var target = e.target;
|
|
5272
|
-
if (_this.isFocused && !inDropDown(_this.
|
|
5803
|
+
if (_this.isFocused && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
5273
5804
|
_this._zone.run(function () {
|
|
5274
5805
|
if (_this.filterFocused) {
|
|
5275
5806
|
// Close popup if filter is focused
|
|
@@ -5281,6 +5812,25 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5281
5812
|
});
|
|
5282
5813
|
});
|
|
5283
5814
|
};
|
|
5815
|
+
DropDownListComponent.prototype.subscribeFocusEvents = function () {
|
|
5816
|
+
var _this = this;
|
|
5817
|
+
if (isDocumentAvailable()) {
|
|
5818
|
+
this.focusComponent = this.focusComponent.bind(this);
|
|
5819
|
+
this.blurComponent = this.blurComponent.bind(this);
|
|
5820
|
+
this._zone.runOutsideAngular(function () {
|
|
5821
|
+
var useCapture = true;
|
|
5822
|
+
document.addEventListener('focus', _this.focusComponent, useCapture);
|
|
5823
|
+
document.addEventListener('blur', _this.blurComponent, useCapture);
|
|
5824
|
+
});
|
|
5825
|
+
}
|
|
5826
|
+
};
|
|
5827
|
+
DropDownListComponent.prototype.unSubscribeFocusEvents = function () {
|
|
5828
|
+
if (isDocumentAvailable()) {
|
|
5829
|
+
var useCapture = true;
|
|
5830
|
+
document.removeEventListener('focus', this.focusComponent, useCapture);
|
|
5831
|
+
document.removeEventListener('blur', this.blurComponent, useCapture);
|
|
5832
|
+
}
|
|
5833
|
+
};
|
|
5284
5834
|
DropDownListComponent.prototype.unsubscribeEvents = function () {
|
|
5285
5835
|
if (!isDocumentAvailable()) {
|
|
5286
5836
|
return;
|
|
@@ -5292,6 +5842,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5292
5842
|
this.escSubscription.unsubscribe();
|
|
5293
5843
|
this.componentBlurredSubscription.unsubscribe();
|
|
5294
5844
|
this.filterBlurredSubscription.unsubscribe();
|
|
5845
|
+
this.unSubscribeFocusEvents();
|
|
5295
5846
|
if (this.touchstartDisposeHandler) {
|
|
5296
5847
|
this.touchstartDisposeHandler();
|
|
5297
5848
|
}
|
|
@@ -5384,7 +5935,7 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5384
5935
|
hasObservers(this.close) ||
|
|
5385
5936
|
hasObservers(this.onBlur) ||
|
|
5386
5937
|
hasObservers(this.filterChange) ||
|
|
5387
|
-
isUntouched(this.
|
|
5938
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
5388
5939
|
this._zone.run(function () {
|
|
5389
5940
|
if (valueHasChanged) {
|
|
5390
5941
|
_this.selectionService.change(_this.selectionService.selected[0]);
|
|
@@ -5568,6 +6119,17 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5568
6119
|
var newValue = (this.valueLabelId + " " + trimmed).trim();
|
|
5569
6120
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
5570
6121
|
};
|
|
6122
|
+
DropDownListComponent.prototype.setComponentClasses = function () {
|
|
6123
|
+
if (this.size) {
|
|
6124
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
6125
|
+
}
|
|
6126
|
+
if (this.rounded) {
|
|
6127
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6128
|
+
}
|
|
6129
|
+
if (this.fillMode) {
|
|
6130
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
6131
|
+
}
|
|
6132
|
+
};
|
|
5571
6133
|
var DropDownListComponent_1;
|
|
5572
6134
|
__decorate([
|
|
5573
6135
|
Input(),
|
|
@@ -5656,6 +6218,21 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5656
6218
|
__metadata("design:type", Number),
|
|
5657
6219
|
__metadata("design:paramtypes", [Number])
|
|
5658
6220
|
], DropDownListComponent.prototype, "tabIndex", null);
|
|
6221
|
+
__decorate([
|
|
6222
|
+
Input(),
|
|
6223
|
+
__metadata("design:type", String),
|
|
6224
|
+
__metadata("design:paramtypes", [String])
|
|
6225
|
+
], DropDownListComponent.prototype, "size", null);
|
|
6226
|
+
__decorate([
|
|
6227
|
+
Input(),
|
|
6228
|
+
__metadata("design:type", String),
|
|
6229
|
+
__metadata("design:paramtypes", [String])
|
|
6230
|
+
], DropDownListComponent.prototype, "rounded", null);
|
|
6231
|
+
__decorate([
|
|
6232
|
+
Input(),
|
|
6233
|
+
__metadata("design:type", String),
|
|
6234
|
+
__metadata("design:paramtypes", [String])
|
|
6235
|
+
], DropDownListComponent.prototype, "fillMode", null);
|
|
5659
6236
|
__decorate([
|
|
5660
6237
|
Output(),
|
|
5661
6238
|
__metadata("design:type", EventEmitter)
|
|
@@ -5728,24 +6305,90 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5728
6305
|
ViewChild('popupTemplate', { static: true }),
|
|
5729
6306
|
__metadata("design:type", TemplateRef)
|
|
5730
6307
|
], DropDownListComponent.prototype, "popupTemplate", void 0);
|
|
5731
|
-
__decorate([
|
|
5732
|
-
ViewChild('wrapper', { static: true }),
|
|
5733
|
-
__metadata("design:type", ElementRef)
|
|
5734
|
-
], DropDownListComponent.prototype, "wrapper", void 0);
|
|
5735
6308
|
__decorate([
|
|
5736
6309
|
ViewChild('optionsList', { static: false }),
|
|
5737
6310
|
__metadata("design:type", ListComponent)
|
|
5738
6311
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
5739
6312
|
__decorate([
|
|
5740
|
-
HostBinding('class.k-
|
|
5741
|
-
HostBinding('class.k-
|
|
6313
|
+
HostBinding('class.k-dropdownlist'),
|
|
6314
|
+
HostBinding('class.k-picker'),
|
|
5742
6315
|
__metadata("design:type", Boolean)
|
|
5743
|
-
], DropDownListComponent.prototype, "
|
|
6316
|
+
], DropDownListComponent.prototype, "hostClasses", void 0);
|
|
6317
|
+
__decorate([
|
|
6318
|
+
HostBinding('class.k-disabled'),
|
|
6319
|
+
HostBinding('attr.aria-disabled'),
|
|
6320
|
+
__metadata("design:type", Boolean),
|
|
6321
|
+
__metadata("design:paramtypes", [])
|
|
6322
|
+
], DropDownListComponent.prototype, "isDisabled", null);
|
|
6323
|
+
__decorate([
|
|
6324
|
+
HostBinding('class.k-loading'),
|
|
6325
|
+
__metadata("design:type", Boolean),
|
|
6326
|
+
__metadata("design:paramtypes", [])
|
|
6327
|
+
], DropDownListComponent.prototype, "isLoading", null);
|
|
6328
|
+
__decorate([
|
|
6329
|
+
HostBinding('attr.id'),
|
|
6330
|
+
__metadata("design:type", String),
|
|
6331
|
+
__metadata("design:paramtypes", [])
|
|
6332
|
+
], DropDownListComponent.prototype, "id", null);
|
|
5744
6333
|
__decorate([
|
|
5745
6334
|
HostBinding('attr.dir'),
|
|
5746
6335
|
__metadata("design:type", String),
|
|
5747
6336
|
__metadata("design:paramtypes", [])
|
|
5748
6337
|
], DropDownListComponent.prototype, "dir", null);
|
|
6338
|
+
__decorate([
|
|
6339
|
+
HostBinding('attr.tabindex'),
|
|
6340
|
+
__metadata("design:type", Number),
|
|
6341
|
+
__metadata("design:paramtypes", [])
|
|
6342
|
+
], DropDownListComponent.prototype, "hostTabIndex", null);
|
|
6343
|
+
__decorate([
|
|
6344
|
+
HostBinding('attr.readonly'),
|
|
6345
|
+
HostBinding('attr.aria-readonly'),
|
|
6346
|
+
__metadata("design:type", Boolean),
|
|
6347
|
+
__metadata("design:paramtypes", [])
|
|
6348
|
+
], DropDownListComponent.prototype, "isReadonly", null);
|
|
6349
|
+
__decorate([
|
|
6350
|
+
HostBinding('attr.role'),
|
|
6351
|
+
HostBinding('attr.aria-haspopup'),
|
|
6352
|
+
__metadata("design:type", String)
|
|
6353
|
+
], DropDownListComponent.prototype, "role", void 0);
|
|
6354
|
+
__decorate([
|
|
6355
|
+
HostBinding('attr.aria-expanded'),
|
|
6356
|
+
__metadata("design:type", Boolean),
|
|
6357
|
+
__metadata("design:paramtypes", [])
|
|
6358
|
+
], DropDownListComponent.prototype, "isAriaExpanded", null);
|
|
6359
|
+
__decorate([
|
|
6360
|
+
HostBinding('attr.aria-owns'),
|
|
6361
|
+
__metadata("design:type", String),
|
|
6362
|
+
__metadata("design:paramtypes", [])
|
|
6363
|
+
], DropDownListComponent.prototype, "hostAriaOwns", null);
|
|
6364
|
+
__decorate([
|
|
6365
|
+
HostBinding('attr.aria-activedescendant'),
|
|
6366
|
+
__metadata("design:type", String),
|
|
6367
|
+
__metadata("design:paramtypes", [])
|
|
6368
|
+
], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
|
|
6369
|
+
__decorate([
|
|
6370
|
+
HostBinding('attr.aria-label'),
|
|
6371
|
+
__metadata("design:type", String),
|
|
6372
|
+
__metadata("design:paramtypes", [])
|
|
6373
|
+
], DropDownListComponent.prototype, "hostNoDataLabel", null);
|
|
6374
|
+
__decorate([
|
|
6375
|
+
HostListener('keydown', ['$event']),
|
|
6376
|
+
__metadata("design:type", Function),
|
|
6377
|
+
__metadata("design:paramtypes", [Object]),
|
|
6378
|
+
__metadata("design:returntype", void 0)
|
|
6379
|
+
], DropDownListComponent.prototype, "keydown", null);
|
|
6380
|
+
__decorate([
|
|
6381
|
+
HostListener('keypress', ['$event']),
|
|
6382
|
+
__metadata("design:type", Function),
|
|
6383
|
+
__metadata("design:paramtypes", [Object]),
|
|
6384
|
+
__metadata("design:returntype", void 0)
|
|
6385
|
+
], DropDownListComponent.prototype, "keypress", null);
|
|
6386
|
+
__decorate([
|
|
6387
|
+
HostListener('click', ['$event']),
|
|
6388
|
+
__metadata("design:type", Function),
|
|
6389
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
6390
|
+
__metadata("design:returntype", void 0)
|
|
6391
|
+
], DropDownListComponent.prototype, "click", null);
|
|
5749
6392
|
DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
5750
6393
|
Component({
|
|
5751
6394
|
exportAs: 'kendoDropDownList',
|
|
@@ -5768,10 +6411,11 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5768
6411
|
}
|
|
5769
6412
|
],
|
|
5770
6413
|
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
|
|
6414
|
+
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
6415
|
}),
|
|
5773
6416
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
5774
|
-
__metadata("design:paramtypes", [
|
|
6417
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
6418
|
+
LocalizationService,
|
|
5775
6419
|
PopupService,
|
|
5776
6420
|
SelectionService,
|
|
5777
6421
|
NavigationService,
|
|
@@ -5779,7 +6423,6 @@ var DropDownListComponent = /** @class */ (function () {
|
|
|
5779
6423
|
DataService,
|
|
5780
6424
|
NgZone,
|
|
5781
6425
|
Renderer2,
|
|
5782
|
-
ElementRef,
|
|
5783
6426
|
ChangeDetectorRef, Boolean])
|
|
5784
6427
|
], DropDownListComponent);
|
|
5785
6428
|
return DropDownListComponent;
|
|
@@ -5956,8 +6599,9 @@ var MULTISELECT_VALUE_ACCESSOR = {
|
|
|
5956
6599
|
* ```
|
|
5957
6600
|
*/
|
|
5958
6601
|
var MultiSelectComponent = /** @class */ (function () {
|
|
5959
|
-
function MultiSelectComponent(localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer,
|
|
6602
|
+
function MultiSelectComponent(wrapper, localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer, _zone, touchEnabled$$1) {
|
|
5960
6603
|
var _this = this;
|
|
6604
|
+
this.wrapper = wrapper;
|
|
5961
6605
|
this.localization = localization;
|
|
5962
6606
|
this.popupService = popupService;
|
|
5963
6607
|
this.dataService = dataService;
|
|
@@ -5967,7 +6611,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
5967
6611
|
this.cdr = cdr;
|
|
5968
6612
|
this.differs = differs;
|
|
5969
6613
|
this.renderer = renderer;
|
|
5970
|
-
this.hostElement = hostElement;
|
|
5971
6614
|
this._zone = _zone;
|
|
5972
6615
|
this.touchEnabled = touchEnabled$$1;
|
|
5973
6616
|
this.listBoxId = guid$1();
|
|
@@ -6128,8 +6771,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6128
6771
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
6129
6772
|
*/
|
|
6130
6773
|
this.removeTag = new EventEmitter();
|
|
6131
|
-
this.
|
|
6774
|
+
this.hostClasses = true;
|
|
6132
6775
|
this.initialized = false;
|
|
6776
|
+
this._size = 'medium';
|
|
6777
|
+
this._rounded = 'medium';
|
|
6778
|
+
this._fillMode = 'solid';
|
|
6133
6779
|
this.onChangeCallback = function (_) { };
|
|
6134
6780
|
this.onTouchedCallback = function (_) { };
|
|
6135
6781
|
this._placeholder = '';
|
|
@@ -6206,7 +6852,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6206
6852
|
if (hasObservers(this.onBlur) ||
|
|
6207
6853
|
hasObservers(this.filterChange) ||
|
|
6208
6854
|
hasObservers(this.close) ||
|
|
6209
|
-
isUntouched(this.
|
|
6855
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
6210
6856
|
this._zone.run(function () {
|
|
6211
6857
|
_this.closePopup();
|
|
6212
6858
|
if (!(_this.isOpen && _this.allowCustom)) {
|
|
@@ -6223,22 +6869,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6223
6869
|
this.closePopup();
|
|
6224
6870
|
}
|
|
6225
6871
|
};
|
|
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
6872
|
/**
|
|
6243
6873
|
* @hidden
|
|
6244
6874
|
*/
|
|
@@ -6332,6 +6962,79 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6332
6962
|
enumerable: true,
|
|
6333
6963
|
configurable: true
|
|
6334
6964
|
});
|
|
6965
|
+
Object.defineProperty(MultiSelectComponent.prototype, "size", {
|
|
6966
|
+
get: function () {
|
|
6967
|
+
return this._size;
|
|
6968
|
+
},
|
|
6969
|
+
/**
|
|
6970
|
+
* Sets the size of the component.
|
|
6971
|
+
*
|
|
6972
|
+
* The possible values are:
|
|
6973
|
+
* * `'small'`
|
|
6974
|
+
* * `'medium'` (default)
|
|
6975
|
+
* * `'large'`
|
|
6976
|
+
* * `null`
|
|
6977
|
+
*
|
|
6978
|
+
*/
|
|
6979
|
+
set: function (size) {
|
|
6980
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6981
|
+
if (size) {
|
|
6982
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6983
|
+
}
|
|
6984
|
+
this._size = size;
|
|
6985
|
+
},
|
|
6986
|
+
enumerable: true,
|
|
6987
|
+
configurable: true
|
|
6988
|
+
});
|
|
6989
|
+
Object.defineProperty(MultiSelectComponent.prototype, "rounded", {
|
|
6990
|
+
get: function () {
|
|
6991
|
+
return this._rounded;
|
|
6992
|
+
},
|
|
6993
|
+
/**
|
|
6994
|
+
* Sets the border radius of the component.
|
|
6995
|
+
*
|
|
6996
|
+
* The possible values are:
|
|
6997
|
+
* * `'small'`
|
|
6998
|
+
* * `'medium'` (default)
|
|
6999
|
+
* * `'large'`
|
|
7000
|
+
* * `'full'`
|
|
7001
|
+
* * `null`
|
|
7002
|
+
*
|
|
7003
|
+
*/
|
|
7004
|
+
set: function (rounded) {
|
|
7005
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7006
|
+
if (rounded) {
|
|
7007
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
7008
|
+
}
|
|
7009
|
+
this._rounded = rounded;
|
|
7010
|
+
},
|
|
7011
|
+
enumerable: true,
|
|
7012
|
+
configurable: true
|
|
7013
|
+
});
|
|
7014
|
+
Object.defineProperty(MultiSelectComponent.prototype, "fillMode", {
|
|
7015
|
+
get: function () {
|
|
7016
|
+
return this._fillMode;
|
|
7017
|
+
},
|
|
7018
|
+
/**
|
|
7019
|
+
* Sets the fillMode of the component.
|
|
7020
|
+
*
|
|
7021
|
+
* The possible values are:
|
|
7022
|
+
* * `'flat'`
|
|
7023
|
+
* * `'solid'` (default)
|
|
7024
|
+
* * `'outline'`
|
|
7025
|
+
* * `null`
|
|
7026
|
+
*
|
|
7027
|
+
*/
|
|
7028
|
+
set: function (fillMode) {
|
|
7029
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7030
|
+
if (fillMode) {
|
|
7031
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
7032
|
+
}
|
|
7033
|
+
this._fillMode = fillMode;
|
|
7034
|
+
},
|
|
7035
|
+
enumerable: true,
|
|
7036
|
+
configurable: true
|
|
7037
|
+
});
|
|
6335
7038
|
Object.defineProperty(MultiSelectComponent.prototype, "placeholder", {
|
|
6336
7039
|
get: function () {
|
|
6337
7040
|
return this.selectedDataItems.length ? '' : this._placeholder;
|
|
@@ -6438,6 +7141,29 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6438
7141
|
enumerable: true,
|
|
6439
7142
|
configurable: true
|
|
6440
7143
|
});
|
|
7144
|
+
Object.defineProperty(MultiSelectComponent.prototype, "isLoading", {
|
|
7145
|
+
get: function () {
|
|
7146
|
+
return this.loading;
|
|
7147
|
+
},
|
|
7148
|
+
enumerable: true,
|
|
7149
|
+
configurable: true
|
|
7150
|
+
});
|
|
7151
|
+
/**
|
|
7152
|
+
* @hidden
|
|
7153
|
+
*/
|
|
7154
|
+
MultiSelectComponent.prototype.hostMousedown = function (event) {
|
|
7155
|
+
var inputElement = this.searchbar.input.nativeElement;
|
|
7156
|
+
if (event.button === 0) {
|
|
7157
|
+
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
7158
|
+
return;
|
|
7159
|
+
}
|
|
7160
|
+
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
7161
|
+
this.searchbar.focus();
|
|
7162
|
+
}
|
|
7163
|
+
this.togglePopup(!this.isOpen);
|
|
7164
|
+
event.preventDefault();
|
|
7165
|
+
}
|
|
7166
|
+
};
|
|
6441
7167
|
Object.defineProperty(MultiSelectComponent.prototype, "listContainerClasses", {
|
|
6442
7168
|
get: function () {
|
|
6443
7169
|
var containerClasses = ['k-list-container', 'k-reset'];
|
|
@@ -6449,6 +7175,16 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6449
7175
|
enumerable: true,
|
|
6450
7176
|
configurable: true
|
|
6451
7177
|
});
|
|
7178
|
+
Object.defineProperty(MultiSelectComponent.prototype, "customItemSizeClass", {
|
|
7179
|
+
/**
|
|
7180
|
+
* @hidden
|
|
7181
|
+
*/
|
|
7182
|
+
get: function () {
|
|
7183
|
+
return "" + (this.size ? getSizeClass('list', this.size) : '');
|
|
7184
|
+
},
|
|
7185
|
+
enumerable: true,
|
|
7186
|
+
configurable: true
|
|
7187
|
+
});
|
|
6452
7188
|
Object.defineProperty(MultiSelectComponent.prototype, "width", {
|
|
6453
7189
|
get: function () {
|
|
6454
7190
|
var wrapperOffsetWidth = 0;
|
|
@@ -6722,7 +7458,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6722
7458
|
};
|
|
6723
7459
|
MultiSelectComponent.prototype.ngOnInit = function () {
|
|
6724
7460
|
var _this = this;
|
|
6725
|
-
this.renderer.removeAttribute(this.
|
|
7461
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
6726
7462
|
this.createCustomValueStream();
|
|
6727
7463
|
this.localizationChangeSubscription = this.localization
|
|
6728
7464
|
.changes.subscribe(function (_a) {
|
|
@@ -6732,6 +7468,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6732
7468
|
});
|
|
6733
7469
|
this.setMessages();
|
|
6734
7470
|
this.setState(this.value);
|
|
7471
|
+
this.setComponentClasses();
|
|
6735
7472
|
this.initialized = true;
|
|
6736
7473
|
};
|
|
6737
7474
|
MultiSelectComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -6828,7 +7565,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6828
7565
|
return this._isFocused;
|
|
6829
7566
|
},
|
|
6830
7567
|
set: function (isFocused) {
|
|
6831
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
7568
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
6832
7569
|
this._isFocused = isFocused;
|
|
6833
7570
|
},
|
|
6834
7571
|
enumerable: true,
|
|
@@ -6867,7 +7604,7 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
6867
7604
|
// Roll up MultiSelect on iOS when tapped outside
|
|
6868
7605
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
6869
7606
|
var target = e.target;
|
|
6870
|
-
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.
|
|
7607
|
+
if ((_this.isFocused || _this.isOpen) && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
6871
7608
|
_this._zone.run(function () {
|
|
6872
7609
|
_this.blur();
|
|
6873
7610
|
if (_this.isOpen) {
|
|
@@ -7245,6 +7982,17 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7245
7982
|
});
|
|
7246
7983
|
});
|
|
7247
7984
|
};
|
|
7985
|
+
MultiSelectComponent.prototype.setComponentClasses = function () {
|
|
7986
|
+
if (this.size) {
|
|
7987
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7988
|
+
}
|
|
7989
|
+
if (this.rounded) {
|
|
7990
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7991
|
+
}
|
|
7992
|
+
if (this.fillMode) {
|
|
7993
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7994
|
+
}
|
|
7995
|
+
};
|
|
7248
7996
|
var MultiSelectComponent_1;
|
|
7249
7997
|
__decorate([
|
|
7250
7998
|
Input(),
|
|
@@ -7285,6 +8033,21 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7285
8033
|
__metadata("design:type", Number),
|
|
7286
8034
|
__metadata("design:paramtypes", [Number])
|
|
7287
8035
|
], MultiSelectComponent.prototype, "tabIndex", null);
|
|
8036
|
+
__decorate([
|
|
8037
|
+
Input(),
|
|
8038
|
+
__metadata("design:type", String),
|
|
8039
|
+
__metadata("design:paramtypes", [String])
|
|
8040
|
+
], MultiSelectComponent.prototype, "size", null);
|
|
8041
|
+
__decorate([
|
|
8042
|
+
Input(),
|
|
8043
|
+
__metadata("design:type", String),
|
|
8044
|
+
__metadata("design:paramtypes", [String])
|
|
8045
|
+
], MultiSelectComponent.prototype, "rounded", null);
|
|
8046
|
+
__decorate([
|
|
8047
|
+
Input(),
|
|
8048
|
+
__metadata("design:type", String),
|
|
8049
|
+
__metadata("design:paramtypes", [String])
|
|
8050
|
+
], MultiSelectComponent.prototype, "fillMode", null);
|
|
7288
8051
|
__decorate([
|
|
7289
8052
|
Input(),
|
|
7290
8053
|
__metadata("design:type", String),
|
|
@@ -7395,10 +8158,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7395
8158
|
ViewChild('popupTemplate', { static: true }),
|
|
7396
8159
|
__metadata("design:type", TemplateRef)
|
|
7397
8160
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
7398
|
-
__decorate([
|
|
7399
|
-
ViewChild('wrapper', { static: true }),
|
|
7400
|
-
__metadata("design:type", ElementRef)
|
|
7401
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
7402
8161
|
__decorate([
|
|
7403
8162
|
ViewChild('optionsList', { static: false }),
|
|
7404
8163
|
__metadata("design:type", ListComponent)
|
|
@@ -7440,20 +8199,31 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7440
8199
|
__metadata("design:type", NoDataTemplateDirective)
|
|
7441
8200
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
7442
8201
|
__decorate([
|
|
7443
|
-
HostBinding('class.k-widget'),
|
|
7444
8202
|
HostBinding('class.k-multiselect'),
|
|
8203
|
+
HostBinding('class.k-input'),
|
|
7445
8204
|
__metadata("design:type", Boolean)
|
|
7446
|
-
], MultiSelectComponent.prototype, "
|
|
8205
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
7447
8206
|
__decorate([
|
|
7448
8207
|
HostBinding('attr.dir'),
|
|
7449
8208
|
__metadata("design:type", String),
|
|
7450
8209
|
__metadata("design:paramtypes", [])
|
|
7451
8210
|
], MultiSelectComponent.prototype, "dir", null);
|
|
7452
8211
|
__decorate([
|
|
7453
|
-
HostBinding('class.k-
|
|
8212
|
+
HostBinding('class.k-disabled'),
|
|
7454
8213
|
__metadata("design:type", Boolean),
|
|
7455
8214
|
__metadata("design:paramtypes", [])
|
|
7456
8215
|
], MultiSelectComponent.prototype, "disabledClass", null);
|
|
8216
|
+
__decorate([
|
|
8217
|
+
HostBinding('class.k-loading'),
|
|
8218
|
+
__metadata("design:type", Boolean),
|
|
8219
|
+
__metadata("design:paramtypes", [])
|
|
8220
|
+
], MultiSelectComponent.prototype, "isLoading", null);
|
|
8221
|
+
__decorate([
|
|
8222
|
+
HostListener('mousedown', ['$event']),
|
|
8223
|
+
__metadata("design:type", Function),
|
|
8224
|
+
__metadata("design:paramtypes", [Object]),
|
|
8225
|
+
__metadata("design:returntype", void 0)
|
|
8226
|
+
], MultiSelectComponent.prototype, "hostMousedown", null);
|
|
7457
8227
|
MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
7458
8228
|
Component({
|
|
7459
8229
|
exportAs: 'kendoMultiSelect',
|
|
@@ -7476,10 +8246,11 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7476
8246
|
}
|
|
7477
8247
|
],
|
|
7478
8248
|
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 <
|
|
8249
|
+
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
8250
|
}),
|
|
7481
8251
|
__param(11, Optional()), __param(11, Inject(TOUCH_ENABLED)),
|
|
7482
|
-
__metadata("design:paramtypes", [
|
|
8252
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
8253
|
+
LocalizationService,
|
|
7483
8254
|
PopupService,
|
|
7484
8255
|
DataService,
|
|
7485
8256
|
SelectionService,
|
|
@@ -7488,7 +8259,6 @@ var MultiSelectComponent = /** @class */ (function () {
|
|
|
7488
8259
|
ChangeDetectorRef,
|
|
7489
8260
|
KeyValueDiffers,
|
|
7490
8261
|
Renderer2,
|
|
7491
|
-
ElementRef,
|
|
7492
8262
|
NgZone, Boolean])
|
|
7493
8263
|
], MultiSelectComponent);
|
|
7494
8264
|
return MultiSelectComponent;
|
|
@@ -7663,8 +8433,8 @@ var getRowWidthFromColumnsMeta = function (columns) {
|
|
|
7663
8433
|
*/
|
|
7664
8434
|
var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
7665
8435
|
__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,
|
|
8436
|
+
function MultiColumnComboBoxComponent(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, wrapper, touchEnabled$$1) {
|
|
8437
|
+
var _this = _super.call(this, wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, touchEnabled$$1) || this;
|
|
7668
8438
|
/**
|
|
7669
8439
|
* @hidden
|
|
7670
8440
|
*/
|
|
@@ -7677,6 +8447,16 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7677
8447
|
return _this;
|
|
7678
8448
|
}
|
|
7679
8449
|
MultiColumnComboBoxComponent_1 = MultiColumnComboBoxComponent;
|
|
8450
|
+
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "isDisabled", {
|
|
8451
|
+
/**
|
|
8452
|
+
* @hidden
|
|
8453
|
+
*/
|
|
8454
|
+
get: function () {
|
|
8455
|
+
return this.disabled;
|
|
8456
|
+
},
|
|
8457
|
+
enumerable: true,
|
|
8458
|
+
configurable: true
|
|
8459
|
+
});
|
|
7680
8460
|
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "header", {
|
|
7681
8461
|
/**
|
|
7682
8462
|
* @hidden
|
|
@@ -7699,19 +8479,24 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7699
8479
|
enumerable: true,
|
|
7700
8480
|
configurable: true
|
|
7701
8481
|
});
|
|
8482
|
+
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "tableSizeClass", {
|
|
8483
|
+
/**
|
|
8484
|
+
* @hidden
|
|
8485
|
+
*/
|
|
8486
|
+
get: function () {
|
|
8487
|
+
return "" + (this.size ? getSizeClass('table', this.size) : '');
|
|
8488
|
+
},
|
|
8489
|
+
enumerable: true,
|
|
8490
|
+
configurable: true
|
|
8491
|
+
});
|
|
7702
8492
|
Object.defineProperty(MultiColumnComboBoxComponent.prototype, "listContainerClasses", {
|
|
7703
8493
|
/**
|
|
7704
8494
|
* @hidden
|
|
7705
8495
|
*/
|
|
7706
8496
|
get: function () {
|
|
7707
8497
|
return [
|
|
7708
|
-
'k-list-container',
|
|
7709
8498
|
'k-popup',
|
|
7710
|
-
'k-
|
|
7711
|
-
'k-group',
|
|
7712
|
-
'k-dropdowngrid-popup',
|
|
7713
|
-
'k-popup-flush',
|
|
7714
|
-
'k-state-border-up'
|
|
8499
|
+
'k-dropdowngrid-popup'
|
|
7715
8500
|
].concat(this.popupSettings.popupClass || []);
|
|
7716
8501
|
},
|
|
7717
8502
|
enumerable: true,
|
|
@@ -7794,6 +8579,11 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7794
8579
|
HostBinding('class.k-dropdowngrid'),
|
|
7795
8580
|
__metadata("design:type", Boolean)
|
|
7796
8581
|
], MultiColumnComboBoxComponent.prototype, "hostClasses", void 0);
|
|
8582
|
+
__decorate([
|
|
8583
|
+
HostBinding('class.k-disabled'),
|
|
8584
|
+
__metadata("design:type", Boolean),
|
|
8585
|
+
__metadata("design:paramtypes", [])
|
|
8586
|
+
], MultiColumnComboBoxComponent.prototype, "isDisabled", null);
|
|
7797
8587
|
__decorate([
|
|
7798
8588
|
ContentChildren(ComboBoxColumnComponent),
|
|
7799
8589
|
__metadata("design:type", QueryList)
|
|
@@ -7830,7 +8620,7 @@ var MultiColumnComboBoxComponent = /** @class */ (function (_super) {
|
|
|
7830
8620
|
}
|
|
7831
8621
|
],
|
|
7832
8622
|
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 <
|
|
8623
|
+
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
8624
|
}),
|
|
7835
8625
|
__param(10, Inject(TOUCH_ENABLED)),
|
|
7836
8626
|
__metadata("design:paramtypes", [LocalizationService,
|
|
@@ -7879,16 +8669,18 @@ var isNodeVisible = function () { return true; };
|
|
|
7879
8669
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
7880
8670
|
*/
|
|
7881
8671
|
var DropDownTreeComponent = /** @class */ (function () {
|
|
7882
|
-
function DropDownTreeComponent(popupService, navigationService, renderer,
|
|
8672
|
+
function DropDownTreeComponent(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled$$1) {
|
|
8673
|
+
this.wrapper = wrapper;
|
|
7883
8674
|
this.popupService = popupService;
|
|
7884
8675
|
this.navigationService = navigationService;
|
|
7885
8676
|
this.renderer = renderer;
|
|
7886
|
-
this.hostElement = hostElement;
|
|
7887
8677
|
this._zone = _zone;
|
|
7888
8678
|
this.cdr = cdr;
|
|
7889
8679
|
this.localization = localization;
|
|
7890
8680
|
this.touchEnabled = touchEnabled$$1;
|
|
7891
8681
|
this.hostClasses = true;
|
|
8682
|
+
this.role = 'listbox';
|
|
8683
|
+
this.ariaHasPopup = 'tree';
|
|
7892
8684
|
/**
|
|
7893
8685
|
* Fires each time the popup is about to open
|
|
7894
8686
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -8023,21 +8815,78 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8023
8815
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
8024
8816
|
this._tabindex = 0;
|
|
8025
8817
|
this._isFocused = false;
|
|
8818
|
+
this._size = 'medium';
|
|
8819
|
+
this._rounded = 'medium';
|
|
8820
|
+
this._fillMode = 'solid';
|
|
8026
8821
|
this.subscriptions = [];
|
|
8027
8822
|
this.onTouchedCallback = noop;
|
|
8028
8823
|
this.onChangeCallback = noop;
|
|
8029
8824
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
8030
8825
|
this.subscribeEvents();
|
|
8031
8826
|
this.subscribeTouchEvents();
|
|
8827
|
+
this.subscribeFocusEvents();
|
|
8032
8828
|
}
|
|
8033
8829
|
DropDownTreeComponent_1 = DropDownTreeComponent;
|
|
8034
|
-
Object.defineProperty(DropDownTreeComponent.prototype, "
|
|
8830
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isDisabled", {
|
|
8035
8831
|
get: function () {
|
|
8036
|
-
return this.
|
|
8832
|
+
return this.disabled;
|
|
8037
8833
|
},
|
|
8038
8834
|
enumerable: true,
|
|
8039
8835
|
configurable: true
|
|
8040
8836
|
});
|
|
8837
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isLoading", {
|
|
8838
|
+
get: function () {
|
|
8839
|
+
return this.loading;
|
|
8840
|
+
},
|
|
8841
|
+
enumerable: true,
|
|
8842
|
+
configurable: true
|
|
8843
|
+
});
|
|
8844
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "id", {
|
|
8845
|
+
get: function () {
|
|
8846
|
+
return this.focusableId;
|
|
8847
|
+
},
|
|
8848
|
+
enumerable: true,
|
|
8849
|
+
configurable: true
|
|
8850
|
+
});
|
|
8851
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "hostTabIndex", {
|
|
8852
|
+
get: function () {
|
|
8853
|
+
return this.tabindex;
|
|
8854
|
+
},
|
|
8855
|
+
enumerable: true,
|
|
8856
|
+
configurable: true
|
|
8857
|
+
});
|
|
8858
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isAriaExpanded", {
|
|
8859
|
+
get: function () {
|
|
8860
|
+
return this.isOpen;
|
|
8861
|
+
},
|
|
8862
|
+
enumerable: true,
|
|
8863
|
+
configurable: true
|
|
8864
|
+
});
|
|
8865
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "isReadonly", {
|
|
8866
|
+
get: function () {
|
|
8867
|
+
return this.readonly;
|
|
8868
|
+
},
|
|
8869
|
+
enumerable: true,
|
|
8870
|
+
configurable: true
|
|
8871
|
+
});
|
|
8872
|
+
/**
|
|
8873
|
+
* @hidden
|
|
8874
|
+
*/
|
|
8875
|
+
DropDownTreeComponent.prototype.handleClick = function () {
|
|
8876
|
+
this.togglePopup(!this.isOpen);
|
|
8877
|
+
};
|
|
8878
|
+
/**
|
|
8879
|
+
* @hidden
|
|
8880
|
+
*/
|
|
8881
|
+
DropDownTreeComponent.prototype.handleKeydown = function (event) {
|
|
8882
|
+
if (this.disabled || this.readonly) {
|
|
8883
|
+
return;
|
|
8884
|
+
}
|
|
8885
|
+
var eventData = event;
|
|
8886
|
+
this.navigationService.process({
|
|
8887
|
+
originalEvent: eventData
|
|
8888
|
+
});
|
|
8889
|
+
};
|
|
8041
8890
|
Object.defineProperty(DropDownTreeComponent.prototype, "treeview", {
|
|
8042
8891
|
get: function () {
|
|
8043
8892
|
return this._treeview;
|
|
@@ -8139,12 +8988,85 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8139
8988
|
enumerable: true,
|
|
8140
8989
|
configurable: true
|
|
8141
8990
|
});
|
|
8991
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "size", {
|
|
8992
|
+
get: function () {
|
|
8993
|
+
return this._size;
|
|
8994
|
+
},
|
|
8995
|
+
/**
|
|
8996
|
+
* Sets the size of the component.
|
|
8997
|
+
*
|
|
8998
|
+
* The possible values are:
|
|
8999
|
+
* * `'small'`
|
|
9000
|
+
* * `'medium'` (default)
|
|
9001
|
+
* * `'large'`
|
|
9002
|
+
* * `null`
|
|
9003
|
+
*
|
|
9004
|
+
*/
|
|
9005
|
+
set: function (size) {
|
|
9006
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9007
|
+
if (size) {
|
|
9008
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
9009
|
+
}
|
|
9010
|
+
this._size = size;
|
|
9011
|
+
},
|
|
9012
|
+
enumerable: true,
|
|
9013
|
+
configurable: true
|
|
9014
|
+
});
|
|
9015
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "rounded", {
|
|
9016
|
+
get: function () {
|
|
9017
|
+
return this._rounded;
|
|
9018
|
+
},
|
|
9019
|
+
/**
|
|
9020
|
+
* Sets the border radius of the component.
|
|
9021
|
+
*
|
|
9022
|
+
* The possible values are:
|
|
9023
|
+
* * `'small'`
|
|
9024
|
+
* * `'medium'` (default)
|
|
9025
|
+
* * `'large'`
|
|
9026
|
+
* * `'full'`
|
|
9027
|
+
* * `null`
|
|
9028
|
+
*
|
|
9029
|
+
*/
|
|
9030
|
+
set: function (rounded) {
|
|
9031
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9032
|
+
if (rounded) {
|
|
9033
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
9034
|
+
}
|
|
9035
|
+
this._rounded = rounded;
|
|
9036
|
+
},
|
|
9037
|
+
enumerable: true,
|
|
9038
|
+
configurable: true
|
|
9039
|
+
});
|
|
9040
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "fillMode", {
|
|
9041
|
+
get: function () {
|
|
9042
|
+
return this._fillMode;
|
|
9043
|
+
},
|
|
9044
|
+
/**
|
|
9045
|
+
* Sets the fillMode of the component.
|
|
9046
|
+
*
|
|
9047
|
+
* The possible values are:
|
|
9048
|
+
* * `'flat'`
|
|
9049
|
+
* * `'solid'` (default)
|
|
9050
|
+
* * `'outline'`
|
|
9051
|
+
* * `null`
|
|
9052
|
+
*
|
|
9053
|
+
*/
|
|
9054
|
+
set: function (fillMode) {
|
|
9055
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9056
|
+
if (fillMode) {
|
|
9057
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
9058
|
+
}
|
|
9059
|
+
this._fillMode = fillMode;
|
|
9060
|
+
},
|
|
9061
|
+
enumerable: true,
|
|
9062
|
+
configurable: true
|
|
9063
|
+
});
|
|
8142
9064
|
Object.defineProperty(DropDownTreeComponent.prototype, "isFocused", {
|
|
8143
9065
|
get: function () {
|
|
8144
9066
|
return this._isFocused;
|
|
8145
9067
|
},
|
|
8146
9068
|
set: function (isFocused) {
|
|
8147
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
9069
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
8148
9070
|
this._isFocused = isFocused;
|
|
8149
9071
|
},
|
|
8150
9072
|
enumerable: true,
|
|
@@ -8280,7 +9202,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8280
9202
|
});
|
|
8281
9203
|
DropDownTreeComponent.prototype.ngOnInit = function () {
|
|
8282
9204
|
var _this = this;
|
|
8283
|
-
this.renderer.removeAttribute(this.
|
|
9205
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8284
9206
|
this.assignAriaDescribedBy();
|
|
8285
9207
|
this.subscriptions.push(this.localization
|
|
8286
9208
|
.changes.subscribe(function (_a) {
|
|
@@ -8288,6 +9210,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8288
9210
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
8289
9211
|
_this.cdr.markForCheck();
|
|
8290
9212
|
}));
|
|
9213
|
+
this.setComponentClasses();
|
|
8291
9214
|
};
|
|
8292
9215
|
/**
|
|
8293
9216
|
* @hidden
|
|
@@ -8338,8 +9261,12 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8338
9261
|
/**
|
|
8339
9262
|
* @hidden
|
|
8340
9263
|
*/
|
|
8341
|
-
DropDownTreeComponent.prototype.handleFocus = function () {
|
|
9264
|
+
DropDownTreeComponent.prototype.handleFocus = function (event) {
|
|
8342
9265
|
var _this = this;
|
|
9266
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9267
|
+
return;
|
|
9268
|
+
}
|
|
9269
|
+
event.stopImmediatePropagation();
|
|
8343
9270
|
if (!this.isFocused) {
|
|
8344
9271
|
this.isFocused = true;
|
|
8345
9272
|
if (hasObservers(this.onFocus)) {
|
|
@@ -8355,13 +9282,13 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8355
9282
|
DropDownTreeComponent.prototype.handleBlur = function (e) {
|
|
8356
9283
|
var _this = this;
|
|
8357
9284
|
var relatedTarget = e && e.relatedTarget;
|
|
8358
|
-
if (this.
|
|
9285
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
8359
9286
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
8360
9287
|
return;
|
|
8361
9288
|
}
|
|
8362
9289
|
this.isFocused = false;
|
|
8363
9290
|
if (hasObservers(this.onBlur) ||
|
|
8364
|
-
isUntouched(this.
|
|
9291
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
8365
9292
|
this._zone.run(function () {
|
|
8366
9293
|
_this.togglePopup(false);
|
|
8367
9294
|
_this.onBlur.emit();
|
|
@@ -8372,24 +9299,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8372
9299
|
this.togglePopup(false);
|
|
8373
9300
|
}
|
|
8374
9301
|
};
|
|
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
9302
|
/**
|
|
8394
9303
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
8395
9304
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -8453,7 +9362,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8453
9362
|
* @hidden
|
|
8454
9363
|
*/
|
|
8455
9364
|
get: function () {
|
|
8456
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
9365
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
8457
9366
|
if (this.popupSettings.popupClass) {
|
|
8458
9367
|
containerClasses.push(this.popupSettings.popupClass);
|
|
8459
9368
|
}
|
|
@@ -8566,6 +9475,26 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8566
9475
|
enumerable: true,
|
|
8567
9476
|
configurable: true
|
|
8568
9477
|
});
|
|
9478
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "selectButtonClasses", {
|
|
9479
|
+
/**
|
|
9480
|
+
* @hidden
|
|
9481
|
+
*/
|
|
9482
|
+
get: function () {
|
|
9483
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + '-base' : '');
|
|
9484
|
+
},
|
|
9485
|
+
enumerable: true,
|
|
9486
|
+
configurable: true
|
|
9487
|
+
});
|
|
9488
|
+
Object.defineProperty(DropDownTreeComponent.prototype, "filterInputClasses", {
|
|
9489
|
+
/**
|
|
9490
|
+
* @hidden
|
|
9491
|
+
*/
|
|
9492
|
+
get: function () {
|
|
9493
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
9494
|
+
},
|
|
9495
|
+
enumerable: true,
|
|
9496
|
+
configurable: true
|
|
9497
|
+
});
|
|
8569
9498
|
DropDownTreeComponent.prototype.verifySettings = function () {
|
|
8570
9499
|
if (!isDevMode()) {
|
|
8571
9500
|
return;
|
|
@@ -8729,7 +9658,7 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8729
9658
|
// Roll up DropDownTree on iOS when tapped outside
|
|
8730
9659
|
return _this.touchstartDisposeHandler = _this.renderer.listen(document, 'touchstart', function (e) {
|
|
8731
9660
|
var target = e.target;
|
|
8732
|
-
if (_this.isFocused && !inDropDown(_this.
|
|
9661
|
+
if (_this.isFocused && !inDropDown(_this.wrapper, target, _this.popupRef)) {
|
|
8733
9662
|
_this._zone.run(function () {
|
|
8734
9663
|
if (_this.isOpen) {
|
|
8735
9664
|
_this.treeview.blur();
|
|
@@ -8740,34 +9669,118 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8740
9669
|
});
|
|
8741
9670
|
});
|
|
8742
9671
|
};
|
|
9672
|
+
DropDownTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
9673
|
+
var _this = this;
|
|
9674
|
+
if (isDocumentAvailable()) {
|
|
9675
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
9676
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
9677
|
+
this._zone.runOutsideAngular(function () {
|
|
9678
|
+
var useCapture = true;
|
|
9679
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
9680
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
9681
|
+
});
|
|
9682
|
+
}
|
|
9683
|
+
};
|
|
9684
|
+
DropDownTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
9685
|
+
if (isDocumentAvailable()) {
|
|
9686
|
+
var useCapture = true;
|
|
9687
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
9688
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9689
|
+
}
|
|
9690
|
+
};
|
|
8743
9691
|
DropDownTreeComponent.prototype.unsubscribeEvents = function () {
|
|
8744
9692
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
9693
|
+
this.unSubscribeFocusEvents();
|
|
8745
9694
|
if (this.touchstartDisposeHandler) {
|
|
8746
9695
|
this.touchstartDisposeHandler();
|
|
8747
9696
|
}
|
|
8748
9697
|
};
|
|
9698
|
+
DropDownTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
9699
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9700
|
+
return;
|
|
9701
|
+
}
|
|
9702
|
+
event.stopImmediatePropagation();
|
|
9703
|
+
this.handleBlur(event);
|
|
9704
|
+
};
|
|
8749
9705
|
DropDownTreeComponent.prototype.assignAriaDescribedBy = function () {
|
|
8750
9706
|
var currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
8751
9707
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
8752
9708
|
var newValue = (this.valueLabelId + " " + currentValue.trim()).trim();
|
|
8753
9709
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
8754
9710
|
};
|
|
9711
|
+
DropDownTreeComponent.prototype.setComponentClasses = function () {
|
|
9712
|
+
if (this.size) {
|
|
9713
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9714
|
+
}
|
|
9715
|
+
if (this.rounded) {
|
|
9716
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9717
|
+
}
|
|
9718
|
+
if (this.fillMode) {
|
|
9719
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9720
|
+
}
|
|
9721
|
+
};
|
|
8755
9722
|
var DropDownTreeComponent_1;
|
|
8756
9723
|
__decorate([
|
|
8757
|
-
HostBinding('class.k-widget'),
|
|
8758
9724
|
HostBinding('class.k-dropdowntree'),
|
|
8759
|
-
HostBinding('class.k-
|
|
9725
|
+
HostBinding('class.k-picker'),
|
|
8760
9726
|
__metadata("design:type", Boolean)
|
|
8761
9727
|
], DropDownTreeComponent.prototype, "hostClasses", void 0);
|
|
9728
|
+
__decorate([
|
|
9729
|
+
HostBinding('class.k-disabled'),
|
|
9730
|
+
HostBinding('attr.aria-disabled'),
|
|
9731
|
+
__metadata("design:type", Boolean),
|
|
9732
|
+
__metadata("design:paramtypes", [])
|
|
9733
|
+
], DropDownTreeComponent.prototype, "isDisabled", null);
|
|
9734
|
+
__decorate([
|
|
9735
|
+
HostBinding('class.k-loading'),
|
|
9736
|
+
__metadata("design:type", Boolean),
|
|
9737
|
+
__metadata("design:paramtypes", [])
|
|
9738
|
+
], DropDownTreeComponent.prototype, "isLoading", null);
|
|
9739
|
+
__decorate([
|
|
9740
|
+
HostBinding('attr.id'),
|
|
9741
|
+
__metadata("design:type", String),
|
|
9742
|
+
__metadata("design:paramtypes", [])
|
|
9743
|
+
], DropDownTreeComponent.prototype, "id", null);
|
|
8762
9744
|
__decorate([
|
|
8763
9745
|
HostBinding('attr.dir'),
|
|
8764
9746
|
__metadata("design:type", String)
|
|
8765
9747
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
8766
9748
|
__decorate([
|
|
8767
|
-
HostBinding('
|
|
9749
|
+
HostBinding('attr.tabindex'),
|
|
9750
|
+
__metadata("design:type", Number),
|
|
9751
|
+
__metadata("design:paramtypes", [])
|
|
9752
|
+
], DropDownTreeComponent.prototype, "hostTabIndex", null);
|
|
9753
|
+
__decorate([
|
|
9754
|
+
HostBinding('attr.role'),
|
|
9755
|
+
__metadata("design:type", String)
|
|
9756
|
+
], DropDownTreeComponent.prototype, "role", void 0);
|
|
9757
|
+
__decorate([
|
|
9758
|
+
HostBinding('attr.aria-haspopup'),
|
|
9759
|
+
__metadata("design:type", String)
|
|
9760
|
+
], DropDownTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
9761
|
+
__decorate([
|
|
9762
|
+
HostBinding('attr.aria-expanded'),
|
|
9763
|
+
__metadata("design:type", Boolean),
|
|
9764
|
+
__metadata("design:paramtypes", [])
|
|
9765
|
+
], DropDownTreeComponent.prototype, "isAriaExpanded", null);
|
|
9766
|
+
__decorate([
|
|
9767
|
+
HostBinding('attr.readonly'),
|
|
9768
|
+
HostBinding('attr.aria-readonly'),
|
|
8768
9769
|
__metadata("design:type", Boolean),
|
|
8769
9770
|
__metadata("design:paramtypes", [])
|
|
8770
|
-
], DropDownTreeComponent.prototype, "
|
|
9771
|
+
], DropDownTreeComponent.prototype, "isReadonly", null);
|
|
9772
|
+
__decorate([
|
|
9773
|
+
HostListener('click'),
|
|
9774
|
+
__metadata("design:type", Function),
|
|
9775
|
+
__metadata("design:paramtypes", []),
|
|
9776
|
+
__metadata("design:returntype", void 0)
|
|
9777
|
+
], DropDownTreeComponent.prototype, "handleClick", null);
|
|
9778
|
+
__decorate([
|
|
9779
|
+
HostListener('keydown', ['$event']),
|
|
9780
|
+
__metadata("design:type", Function),
|
|
9781
|
+
__metadata("design:paramtypes", [Object]),
|
|
9782
|
+
__metadata("design:returntype", void 0)
|
|
9783
|
+
], DropDownTreeComponent.prototype, "handleKeydown", null);
|
|
8771
9784
|
__decorate([
|
|
8772
9785
|
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
8773
9786
|
__metadata("design:type", NoDataTemplateDirective)
|
|
@@ -8792,10 +9805,6 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8792
9805
|
ViewChild('popupTemplate', { static: true }),
|
|
8793
9806
|
__metadata("design:type", TemplateRef)
|
|
8794
9807
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
8795
|
-
__decorate([
|
|
8796
|
-
ViewChild('wrapper', { static: true }),
|
|
8797
|
-
__metadata("design:type", ElementRef)
|
|
8798
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
8799
9808
|
__decorate([
|
|
8800
9809
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
8801
9810
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -8922,6 +9931,21 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8922
9931
|
__metadata("design:type", Number),
|
|
8923
9932
|
__metadata("design:paramtypes", [Number])
|
|
8924
9933
|
], DropDownTreeComponent.prototype, "tabindex", null);
|
|
9934
|
+
__decorate([
|
|
9935
|
+
Input(),
|
|
9936
|
+
__metadata("design:type", String),
|
|
9937
|
+
__metadata("design:paramtypes", [String])
|
|
9938
|
+
], DropDownTreeComponent.prototype, "size", null);
|
|
9939
|
+
__decorate([
|
|
9940
|
+
Input(),
|
|
9941
|
+
__metadata("design:type", String),
|
|
9942
|
+
__metadata("design:paramtypes", [String])
|
|
9943
|
+
], DropDownTreeComponent.prototype, "rounded", null);
|
|
9944
|
+
__decorate([
|
|
9945
|
+
Input(),
|
|
9946
|
+
__metadata("design:type", String),
|
|
9947
|
+
__metadata("design:paramtypes", [String])
|
|
9948
|
+
], DropDownTreeComponent.prototype, "fillMode", null);
|
|
8925
9949
|
__decorate([
|
|
8926
9950
|
Input(),
|
|
8927
9951
|
__metadata("design:type", Function)
|
|
@@ -8982,14 +10006,14 @@ var DropDownTreeComponent = /** @class */ (function () {
|
|
|
8982
10006
|
}
|
|
8983
10007
|
],
|
|
8984
10008
|
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
|
|
10009
|
+
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
10010
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8987
10011
|
}),
|
|
8988
10012
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
8989
|
-
__metadata("design:paramtypes", [
|
|
10013
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10014
|
+
PopupService,
|
|
8990
10015
|
NavigationService,
|
|
8991
10016
|
Renderer2,
|
|
8992
|
-
ElementRef,
|
|
8993
10017
|
NgZone,
|
|
8994
10018
|
ChangeDetectorRef,
|
|
8995
10019
|
LocalizationService, Boolean])
|
|
@@ -9008,16 +10032,18 @@ var isNodeVisible$1 = function () { return true; };
|
|
|
9008
10032
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
9009
10033
|
*/
|
|
9010
10034
|
var MultiSelectTreeComponent = /** @class */ (function () {
|
|
9011
|
-
function MultiSelectTreeComponent(popupService, renderer,
|
|
10035
|
+
function MultiSelectTreeComponent(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled$$1) {
|
|
10036
|
+
this.wrapper = wrapper;
|
|
9012
10037
|
this.popupService = popupService;
|
|
9013
10038
|
this.renderer = renderer;
|
|
9014
|
-
this.hostElement = hostElement;
|
|
9015
10039
|
this.navigationService = navigationService;
|
|
9016
10040
|
this._zone = _zone;
|
|
9017
10041
|
this.localization = localization;
|
|
9018
10042
|
this.cdr = cdr;
|
|
9019
10043
|
this.touchEnabled = touchEnabled$$1;
|
|
9020
10044
|
this.hostClasses = true;
|
|
10045
|
+
this.role = 'listbox';
|
|
10046
|
+
this.ariaHasPopup = 'tree';
|
|
9021
10047
|
/**
|
|
9022
10048
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
9023
10049
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -9180,14 +10206,93 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9180
10206
|
this._popupSettings = DEFAULT_POPUP_SETTINGS$1;
|
|
9181
10207
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
9182
10208
|
this._isFocused = false;
|
|
10209
|
+
this._size = 'medium';
|
|
10210
|
+
this._rounded = 'medium';
|
|
10211
|
+
this._fillMode = 'solid';
|
|
9183
10212
|
this.subscriptions = [];
|
|
9184
10213
|
this.lastAction = 'check';
|
|
9185
10214
|
this.onTouchedCallback = noop;
|
|
9186
10215
|
this.onChangeCallback = noop;
|
|
9187
10216
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
9188
10217
|
this.subscribeEvents();
|
|
10218
|
+
this.subscribeFocusEvents();
|
|
9189
10219
|
}
|
|
9190
10220
|
MultiSelectTreeComponent_1 = MultiSelectTreeComponent;
|
|
10221
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isDisabled", {
|
|
10222
|
+
get: function () {
|
|
10223
|
+
return this.disabled;
|
|
10224
|
+
},
|
|
10225
|
+
enumerable: true,
|
|
10226
|
+
configurable: true
|
|
10227
|
+
});
|
|
10228
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isLoading", {
|
|
10229
|
+
get: function () {
|
|
10230
|
+
return this.loading;
|
|
10231
|
+
},
|
|
10232
|
+
enumerable: true,
|
|
10233
|
+
configurable: true
|
|
10234
|
+
});
|
|
10235
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "id", {
|
|
10236
|
+
get: function () {
|
|
10237
|
+
return this.focusableId;
|
|
10238
|
+
},
|
|
10239
|
+
enumerable: true,
|
|
10240
|
+
configurable: true
|
|
10241
|
+
});
|
|
10242
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "hostTabIndex", {
|
|
10243
|
+
get: function () {
|
|
10244
|
+
return this.tabindex;
|
|
10245
|
+
},
|
|
10246
|
+
enumerable: true,
|
|
10247
|
+
configurable: true
|
|
10248
|
+
});
|
|
10249
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "isReadonly", {
|
|
10250
|
+
get: function () {
|
|
10251
|
+
return this.readonly;
|
|
10252
|
+
},
|
|
10253
|
+
enumerable: true,
|
|
10254
|
+
configurable: true
|
|
10255
|
+
});
|
|
10256
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaDescribedBy", {
|
|
10257
|
+
get: function () {
|
|
10258
|
+
return this.tagListId;
|
|
10259
|
+
},
|
|
10260
|
+
enumerable: true,
|
|
10261
|
+
configurable: true
|
|
10262
|
+
});
|
|
10263
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "ariaActiveDescendant", {
|
|
10264
|
+
get: function () {
|
|
10265
|
+
return this.focusedTagId;
|
|
10266
|
+
},
|
|
10267
|
+
enumerable: true,
|
|
10268
|
+
configurable: true
|
|
10269
|
+
});
|
|
10270
|
+
/**
|
|
10271
|
+
* @hidden
|
|
10272
|
+
*/
|
|
10273
|
+
MultiSelectTreeComponent.prototype.handleClick = function () {
|
|
10274
|
+
this.togglePopup(!this.isOpen);
|
|
10275
|
+
};
|
|
10276
|
+
/**
|
|
10277
|
+
* @hidden
|
|
10278
|
+
*/
|
|
10279
|
+
MultiSelectTreeComponent.prototype.handleKeydown = function (event) {
|
|
10280
|
+
var deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
10281
|
+
if (deleteTag) {
|
|
10282
|
+
this.handleBackspace();
|
|
10283
|
+
return;
|
|
10284
|
+
}
|
|
10285
|
+
if (this.disabled || this.readonly) {
|
|
10286
|
+
return;
|
|
10287
|
+
}
|
|
10288
|
+
var eventData = event;
|
|
10289
|
+
var action = this.navigationService.process({
|
|
10290
|
+
originalEvent: eventData
|
|
10291
|
+
});
|
|
10292
|
+
if (action === NavigationAction.Open) {
|
|
10293
|
+
eventData.preventDefault();
|
|
10294
|
+
}
|
|
10295
|
+
};
|
|
9191
10296
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "treeview", {
|
|
9192
10297
|
get: function () {
|
|
9193
10298
|
return this._treeview;
|
|
@@ -9228,6 +10333,79 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9228
10333
|
enumerable: true,
|
|
9229
10334
|
configurable: true
|
|
9230
10335
|
});
|
|
10336
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "size", {
|
|
10337
|
+
get: function () {
|
|
10338
|
+
return this._size;
|
|
10339
|
+
},
|
|
10340
|
+
/**
|
|
10341
|
+
* Sets the size of the component.
|
|
10342
|
+
*
|
|
10343
|
+
* The possible values are:
|
|
10344
|
+
* * `'small'`
|
|
10345
|
+
* * `'medium'` (default)
|
|
10346
|
+
* * `'large'`
|
|
10347
|
+
* * `null`
|
|
10348
|
+
*
|
|
10349
|
+
*/
|
|
10350
|
+
set: function (size) {
|
|
10351
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10352
|
+
if (size) {
|
|
10353
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10354
|
+
}
|
|
10355
|
+
this._size = size;
|
|
10356
|
+
},
|
|
10357
|
+
enumerable: true,
|
|
10358
|
+
configurable: true
|
|
10359
|
+
});
|
|
10360
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "rounded", {
|
|
10361
|
+
get: function () {
|
|
10362
|
+
return this._rounded;
|
|
10363
|
+
},
|
|
10364
|
+
/**
|
|
10365
|
+
* Sets the border radius of the component.
|
|
10366
|
+
*
|
|
10367
|
+
* The possible values are:
|
|
10368
|
+
* * `'small'`
|
|
10369
|
+
* * `'medium'` (default)
|
|
10370
|
+
* * `'large'`
|
|
10371
|
+
* * `'full'`
|
|
10372
|
+
* * `null`
|
|
10373
|
+
*
|
|
10374
|
+
*/
|
|
10375
|
+
set: function (rounded) {
|
|
10376
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10377
|
+
if (rounded) {
|
|
10378
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10379
|
+
}
|
|
10380
|
+
this._rounded = rounded;
|
|
10381
|
+
},
|
|
10382
|
+
enumerable: true,
|
|
10383
|
+
configurable: true
|
|
10384
|
+
});
|
|
10385
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "fillMode", {
|
|
10386
|
+
get: function () {
|
|
10387
|
+
return this._fillMode;
|
|
10388
|
+
},
|
|
10389
|
+
/**
|
|
10390
|
+
* Sets the fillMode of the component.
|
|
10391
|
+
*
|
|
10392
|
+
* The possible values are:
|
|
10393
|
+
* * `'flat'`
|
|
10394
|
+
* * `'solid'` (default)
|
|
10395
|
+
* * `'outline'`
|
|
10396
|
+
* * `null`
|
|
10397
|
+
*
|
|
10398
|
+
*/
|
|
10399
|
+
set: function (fillMode) {
|
|
10400
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10401
|
+
if (fillMode) {
|
|
10402
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10403
|
+
}
|
|
10404
|
+
this._fillMode = fillMode;
|
|
10405
|
+
},
|
|
10406
|
+
enumerable: true,
|
|
10407
|
+
configurable: true
|
|
10408
|
+
});
|
|
9231
10409
|
Object.defineProperty(MultiSelectTreeComponent.prototype, "popupSettings", {
|
|
9232
10410
|
get: function () {
|
|
9233
10411
|
return this._popupSettings;
|
|
@@ -9347,7 +10525,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9347
10525
|
return this._isFocused;
|
|
9348
10526
|
},
|
|
9349
10527
|
set: function (isFocused) {
|
|
9350
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
10528
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
9351
10529
|
this._isFocused = isFocused;
|
|
9352
10530
|
},
|
|
9353
10531
|
enumerable: true,
|
|
@@ -9398,7 +10576,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9398
10576
|
* @hidden
|
|
9399
10577
|
*/
|
|
9400
10578
|
get: function () {
|
|
9401
|
-
var containerClasses = ['k-popup-dropdowntree'
|
|
10579
|
+
var containerClasses = ['k-popup-dropdowntree'];
|
|
9402
10580
|
if (this.popupSettings.popupClass) {
|
|
9403
10581
|
containerClasses.push(this.popupSettings.popupClass);
|
|
9404
10582
|
}
|
|
@@ -9534,7 +10712,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9534
10712
|
});
|
|
9535
10713
|
MultiSelectTreeComponent.prototype.ngOnInit = function () {
|
|
9536
10714
|
var _this = this;
|
|
9537
|
-
this.renderer.removeAttribute(this.
|
|
10715
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
9538
10716
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
9539
10717
|
this.subscriptions.push(this.localization
|
|
9540
10718
|
.changes.subscribe(function (_a) {
|
|
@@ -9542,6 +10720,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9542
10720
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
9543
10721
|
_this.cdr.markForCheck();
|
|
9544
10722
|
}));
|
|
10723
|
+
this.setComponentClasses();
|
|
9545
10724
|
};
|
|
9546
10725
|
/**
|
|
9547
10726
|
* @hidden
|
|
@@ -9647,8 +10826,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9647
10826
|
/**
|
|
9648
10827
|
* @hidden
|
|
9649
10828
|
*/
|
|
9650
|
-
MultiSelectTreeComponent.prototype.handleFocus = function () {
|
|
10829
|
+
MultiSelectTreeComponent.prototype.handleFocus = function (event) {
|
|
9651
10830
|
var _this = this;
|
|
10831
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
10832
|
+
return;
|
|
10833
|
+
}
|
|
10834
|
+
event.stopImmediatePropagation();
|
|
9652
10835
|
if (!this.isFocused) {
|
|
9653
10836
|
this.isFocused = true;
|
|
9654
10837
|
if (hasObservers(this.onFocus)) {
|
|
@@ -9658,7 +10841,9 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9658
10841
|
}
|
|
9659
10842
|
// Re-focus the treeview if `close` is prevented
|
|
9660
10843
|
if (this.isOpen && this.treeview) {
|
|
9661
|
-
this.lastNodeOnFocus
|
|
10844
|
+
if (this.lastNodeOnFocus) {
|
|
10845
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
10846
|
+
}
|
|
9662
10847
|
this.treeview.focus();
|
|
9663
10848
|
}
|
|
9664
10849
|
}
|
|
@@ -9669,46 +10854,20 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9669
10854
|
MultiSelectTreeComponent.prototype.handleBlur = function (e) {
|
|
9670
10855
|
var _this = this;
|
|
9671
10856
|
var relatedTarget = e && e.relatedTarget;
|
|
9672
|
-
if (this.
|
|
10857
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
9673
10858
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
9674
10859
|
return;
|
|
9675
10860
|
}
|
|
9676
10861
|
this.isFocused = false;
|
|
9677
10862
|
this.togglePopup(false);
|
|
9678
10863
|
if (hasObservers(this.onBlur) ||
|
|
9679
|
-
isUntouched(this.
|
|
10864
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
9680
10865
|
this._zone.run(function () {
|
|
9681
10866
|
_this.onBlur.emit();
|
|
9682
10867
|
_this.onTouchedCallback();
|
|
9683
10868
|
});
|
|
9684
10869
|
}
|
|
9685
10870
|
};
|
|
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
10871
|
/**
|
|
9713
10872
|
* @hidden
|
|
9714
10873
|
*/
|
|
@@ -9848,6 +11007,26 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9848
11007
|
this.filterChange.next(term);
|
|
9849
11008
|
this.allNodesHidden = this.nodes.every(function (node, index) { return !_this.isVisible(node, String(index)); });
|
|
9850
11009
|
};
|
|
11010
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "filterInputClasses", {
|
|
11011
|
+
/**
|
|
11012
|
+
* @hidden
|
|
11013
|
+
*/
|
|
11014
|
+
get: function () {
|
|
11015
|
+
return (this.size ? getSizeClass('input', this.size) : '') + " " + (this.fillMode ? 'k-input-' + this.fillMode : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '');
|
|
11016
|
+
},
|
|
11017
|
+
enumerable: true,
|
|
11018
|
+
configurable: true
|
|
11019
|
+
});
|
|
11020
|
+
Object.defineProperty(MultiSelectTreeComponent.prototype, "checkAllCheckboxClasses", {
|
|
11021
|
+
/**
|
|
11022
|
+
* @hidden
|
|
11023
|
+
*/
|
|
11024
|
+
get: function () {
|
|
11025
|
+
return "" + (this.size ? getSizeClass('checkbox', this.size) : '');
|
|
11026
|
+
},
|
|
11027
|
+
enumerable: true,
|
|
11028
|
+
configurable: true
|
|
11029
|
+
});
|
|
9851
11030
|
/**
|
|
9852
11031
|
* @hidden
|
|
9853
11032
|
*/
|
|
@@ -9963,6 +11142,32 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
9963
11142
|
.pipe(filter(function () { return !_this.isTreeViewActive; }))
|
|
9964
11143
|
.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
11144
|
};
|
|
11145
|
+
MultiSelectTreeComponent.prototype.subscribeFocusEvents = function () {
|
|
11146
|
+
var _this = this;
|
|
11147
|
+
if (isDocumentAvailable()) {
|
|
11148
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
11149
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
11150
|
+
this._zone.runOutsideAngular(function () {
|
|
11151
|
+
var useCapture = true;
|
|
11152
|
+
document.addEventListener('focus', _this.handleFocus, useCapture);
|
|
11153
|
+
document.addEventListener('blur', _this.handleDocumentBlur, useCapture);
|
|
11154
|
+
});
|
|
11155
|
+
}
|
|
11156
|
+
};
|
|
11157
|
+
MultiSelectTreeComponent.prototype.unSubscribeFocusEvents = function () {
|
|
11158
|
+
if (isDocumentAvailable()) {
|
|
11159
|
+
var useCapture = true;
|
|
11160
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
11161
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11162
|
+
}
|
|
11163
|
+
};
|
|
11164
|
+
MultiSelectTreeComponent.prototype.handleDocumentBlur = function (event) {
|
|
11165
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
11166
|
+
return;
|
|
11167
|
+
}
|
|
11168
|
+
event.stopImmediatePropagation();
|
|
11169
|
+
this.handleBlur(event);
|
|
11170
|
+
};
|
|
9966
11171
|
MultiSelectTreeComponent.prototype.handleTabKey = function () {
|
|
9967
11172
|
this.focus();
|
|
9968
11173
|
if (this.isOpen) {
|
|
@@ -10065,6 +11270,7 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10065
11270
|
};
|
|
10066
11271
|
MultiSelectTreeComponent.prototype.unsubscribeEvents = function () {
|
|
10067
11272
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
11273
|
+
this.unSubscribeFocusEvents();
|
|
10068
11274
|
};
|
|
10069
11275
|
/**
|
|
10070
11276
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -10114,16 +11320,84 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10114
11320
|
return indices;
|
|
10115
11321
|
}, []));
|
|
10116
11322
|
};
|
|
11323
|
+
MultiSelectTreeComponent.prototype.setComponentClasses = function () {
|
|
11324
|
+
if (this.size) {
|
|
11325
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
11326
|
+
}
|
|
11327
|
+
if (this.rounded) {
|
|
11328
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
11329
|
+
}
|
|
11330
|
+
if (this.fillMode) {
|
|
11331
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
11332
|
+
}
|
|
11333
|
+
};
|
|
10117
11334
|
var MultiSelectTreeComponent_1;
|
|
10118
11335
|
__decorate([
|
|
10119
|
-
HostBinding('class.k-widget'),
|
|
10120
11336
|
HostBinding('class.k-dropdowntree'),
|
|
11337
|
+
HostBinding('class.k-input'),
|
|
10121
11338
|
__metadata("design:type", Boolean)
|
|
10122
11339
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
11340
|
+
__decorate([
|
|
11341
|
+
HostBinding('class.k-disabled'),
|
|
11342
|
+
HostBinding('attr.aria-disabled'),
|
|
11343
|
+
__metadata("design:type", Boolean),
|
|
11344
|
+
__metadata("design:paramtypes", [])
|
|
11345
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
11346
|
+
__decorate([
|
|
11347
|
+
HostBinding('class.k-loading'),
|
|
11348
|
+
__metadata("design:type", Boolean),
|
|
11349
|
+
__metadata("design:paramtypes", [])
|
|
11350
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
11351
|
+
__decorate([
|
|
11352
|
+
HostBinding('attr.id'),
|
|
11353
|
+
__metadata("design:type", String),
|
|
11354
|
+
__metadata("design:paramtypes", [])
|
|
11355
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
10123
11356
|
__decorate([
|
|
10124
11357
|
HostBinding('attr.dir'),
|
|
10125
11358
|
__metadata("design:type", String)
|
|
10126
11359
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
11360
|
+
__decorate([
|
|
11361
|
+
HostBinding('attr.tabindex'),
|
|
11362
|
+
__metadata("design:type", Number),
|
|
11363
|
+
__metadata("design:paramtypes", [])
|
|
11364
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
11365
|
+
__decorate([
|
|
11366
|
+
HostBinding('attr.role'),
|
|
11367
|
+
__metadata("design:type", String)
|
|
11368
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
11369
|
+
__decorate([
|
|
11370
|
+
HostBinding('attr.aria-haspopup'),
|
|
11371
|
+
__metadata("design:type", String)
|
|
11372
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
11373
|
+
__decorate([
|
|
11374
|
+
HostBinding('attr.readonly'),
|
|
11375
|
+
HostBinding('attr.aria-readonly'),
|
|
11376
|
+
__metadata("design:type", Boolean),
|
|
11377
|
+
__metadata("design:paramtypes", [])
|
|
11378
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
11379
|
+
__decorate([
|
|
11380
|
+
HostBinding('attr.aria-describedby'),
|
|
11381
|
+
__metadata("design:type", String),
|
|
11382
|
+
__metadata("design:paramtypes", [])
|
|
11383
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
11384
|
+
__decorate([
|
|
11385
|
+
HostBinding('attr.aria-activedescendant'),
|
|
11386
|
+
__metadata("design:type", String),
|
|
11387
|
+
__metadata("design:paramtypes", [])
|
|
11388
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
11389
|
+
__decorate([
|
|
11390
|
+
HostListener('click'),
|
|
11391
|
+
__metadata("design:type", Function),
|
|
11392
|
+
__metadata("design:paramtypes", []),
|
|
11393
|
+
__metadata("design:returntype", void 0)
|
|
11394
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
11395
|
+
__decorate([
|
|
11396
|
+
HostListener('keydown', ['$event']),
|
|
11397
|
+
__metadata("design:type", Function),
|
|
11398
|
+
__metadata("design:paramtypes", [Object]),
|
|
11399
|
+
__metadata("design:returntype", void 0)
|
|
11400
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
10127
11401
|
__decorate([
|
|
10128
11402
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
10129
11403
|
__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -10152,10 +11426,6 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10152
11426
|
ViewChild('popupTemplate', { static: true }),
|
|
10153
11427
|
__metadata("design:type", TemplateRef)
|
|
10154
11428
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
10155
|
-
__decorate([
|
|
10156
|
-
ViewChild('wrapper', { static: true }),
|
|
10157
|
-
__metadata("design:type", ElementRef)
|
|
10158
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
10159
11429
|
__decorate([
|
|
10160
11430
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
10161
11431
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -10178,6 +11448,21 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10178
11448
|
__metadata("design:type", Number),
|
|
10179
11449
|
__metadata("design:paramtypes", [Number])
|
|
10180
11450
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
11451
|
+
__decorate([
|
|
11452
|
+
Input(),
|
|
11453
|
+
__metadata("design:type", String),
|
|
11454
|
+
__metadata("design:paramtypes", [String])
|
|
11455
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
11456
|
+
__decorate([
|
|
11457
|
+
Input(),
|
|
11458
|
+
__metadata("design:type", String),
|
|
11459
|
+
__metadata("design:paramtypes", [String])
|
|
11460
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
11461
|
+
__decorate([
|
|
11462
|
+
Input(),
|
|
11463
|
+
__metadata("design:type", String),
|
|
11464
|
+
__metadata("design:paramtypes", [String])
|
|
11465
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
10181
11466
|
__decorate([
|
|
10182
11467
|
Input(),
|
|
10183
11468
|
__metadata("design:type", Object),
|
|
@@ -10359,12 +11644,12 @@ var MultiSelectTreeComponent = /** @class */ (function () {
|
|
|
10359
11644
|
}
|
|
10360
11645
|
],
|
|
10361
11646
|
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 <
|
|
11647
|
+
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
11648
|
}),
|
|
10364
11649
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
10365
|
-
__metadata("design:paramtypes", [
|
|
11650
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11651
|
+
PopupService,
|
|
10366
11652
|
Renderer2,
|
|
10367
|
-
ElementRef,
|
|
10368
11653
|
NavigationService,
|
|
10369
11654
|
NgZone,
|
|
10370
11655
|
LocalizationService,
|
|
@@ -10518,13 +11803,40 @@ var DropDownTreesExpandDirective = /** @class */ (function (_super) {
|
|
|
10518
11803
|
* @hidden
|
|
10519
11804
|
*/
|
|
10520
11805
|
var TagListComponent = /** @class */ (function () {
|
|
10521
|
-
function TagListComponent() {
|
|
11806
|
+
function TagListComponent(renderer, hostElement) {
|
|
11807
|
+
this.renderer = renderer;
|
|
11808
|
+
this.hostElement = hostElement;
|
|
11809
|
+
this.rounded = 'medium';
|
|
11810
|
+
this.fillMode = 'solid';
|
|
10522
11811
|
/**
|
|
10523
11812
|
* A collection with the disabled tags' indices.
|
|
10524
11813
|
*/
|
|
10525
11814
|
this.disabledIndices = new Set();
|
|
10526
11815
|
this.removeTag = new EventEmitter();
|
|
11816
|
+
this.hostClasses = true;
|
|
11817
|
+
this._size = 'medium';
|
|
10527
11818
|
}
|
|
11819
|
+
Object.defineProperty(TagListComponent.prototype, "size", {
|
|
11820
|
+
get: function () {
|
|
11821
|
+
return this._size;
|
|
11822
|
+
},
|
|
11823
|
+
set: function (size) {
|
|
11824
|
+
this.renderer.removeClass(this.hostElement.nativeElement, getSizeClass('chip-list', this.size));
|
|
11825
|
+
if (size) {
|
|
11826
|
+
this.renderer.addClass(this.hostElement.nativeElement, getSizeClass('chip-list', size));
|
|
11827
|
+
}
|
|
11828
|
+
this._size = size;
|
|
11829
|
+
},
|
|
11830
|
+
enumerable: true,
|
|
11831
|
+
configurable: true
|
|
11832
|
+
});
|
|
11833
|
+
Object.defineProperty(TagListComponent.prototype, "hostId", {
|
|
11834
|
+
get: function () {
|
|
11835
|
+
return this.id;
|
|
11836
|
+
},
|
|
11837
|
+
enumerable: true,
|
|
11838
|
+
configurable: true
|
|
11839
|
+
});
|
|
10528
11840
|
TagListComponent.prototype.tagProp = function (tag, prop, index) {
|
|
10529
11841
|
var propField = prop && this.getPropField(tag, prop, index);
|
|
10530
11842
|
return getter$1(tag, propField);
|
|
@@ -10614,6 +11926,19 @@ var TagListComponent = /** @class */ (function () {
|
|
|
10614
11926
|
Input(),
|
|
10615
11927
|
__metadata("design:type", String)
|
|
10616
11928
|
], TagListComponent.prototype, "id", void 0);
|
|
11929
|
+
__decorate([
|
|
11930
|
+
Input(),
|
|
11931
|
+
__metadata("design:type", String),
|
|
11932
|
+
__metadata("design:paramtypes", [String])
|
|
11933
|
+
], TagListComponent.prototype, "size", null);
|
|
11934
|
+
__decorate([
|
|
11935
|
+
Input(),
|
|
11936
|
+
__metadata("design:type", String)
|
|
11937
|
+
], TagListComponent.prototype, "rounded", void 0);
|
|
11938
|
+
__decorate([
|
|
11939
|
+
Input(),
|
|
11940
|
+
__metadata("design:type", String)
|
|
11941
|
+
], TagListComponent.prototype, "fillMode", void 0);
|
|
10617
11942
|
__decorate([
|
|
10618
11943
|
Input(),
|
|
10619
11944
|
__metadata("design:type", Set)
|
|
@@ -10622,11 +11947,24 @@ var TagListComponent = /** @class */ (function () {
|
|
|
10622
11947
|
Output(),
|
|
10623
11948
|
__metadata("design:type", EventEmitter)
|
|
10624
11949
|
], TagListComponent.prototype, "removeTag", void 0);
|
|
11950
|
+
__decorate([
|
|
11951
|
+
HostBinding('class.k-input-values'),
|
|
11952
|
+
HostBinding('class.k-chip-list'),
|
|
11953
|
+
HostBinding('class.k-selection-multiple'),
|
|
11954
|
+
__metadata("design:type", Boolean)
|
|
11955
|
+
], TagListComponent.prototype, "hostClasses", void 0);
|
|
11956
|
+
__decorate([
|
|
11957
|
+
HostBinding('attr.id'),
|
|
11958
|
+
__metadata("design:type", String),
|
|
11959
|
+
__metadata("design:paramtypes", [])
|
|
11960
|
+
], TagListComponent.prototype, "hostId", null);
|
|
10625
11961
|
TagListComponent = __decorate([
|
|
10626
11962
|
Component({
|
|
10627
11963
|
selector: 'kendo-taglist',
|
|
10628
|
-
template: "\n <
|
|
10629
|
-
})
|
|
11964
|
+
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 "
|
|
11965
|
+
}),
|
|
11966
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
11967
|
+
ElementRef])
|
|
10630
11968
|
], TagListComponent);
|
|
10631
11969
|
return TagListComponent;
|
|
10632
11970
|
}());
|
|
@@ -10984,12 +12322,12 @@ var SelectableDirective = /** @class */ (function () {
|
|
|
10984
12322
|
__metadata("design:type", Boolean)
|
|
10985
12323
|
], SelectableDirective.prototype, "multipleSelection", void 0);
|
|
10986
12324
|
__decorate([
|
|
10987
|
-
HostBinding('class.k-
|
|
12325
|
+
HostBinding('class.k-focus'),
|
|
10988
12326
|
__metadata("design:type", Boolean),
|
|
10989
12327
|
__metadata("design:paramtypes", [])
|
|
10990
12328
|
], SelectableDirective.prototype, "focusedClassName", null);
|
|
10991
12329
|
__decorate([
|
|
10992
|
-
HostBinding('class.k-
|
|
12330
|
+
HostBinding('class.k-selected'),
|
|
10993
12331
|
__metadata("design:type", Boolean),
|
|
10994
12332
|
__metadata("design:paramtypes", [])
|
|
10995
12333
|
], SelectableDirective.prototype, "selectedClassName", null);
|