@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/fesm2015/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, __param } from 'tslib';
|
|
6
|
-
import { EventEmitter, Input, Output, 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 { EventEmitter, Input, Output, 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 @@ const 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
|
};
|
|
@@ -270,6 +270,43 @@ const valueFrom = ({ dataItem, index, level }, valueField) => {
|
|
|
270
270
|
const field = fields[normalizedLevel];
|
|
271
271
|
return getter(field)(dataItem);
|
|
272
272
|
};
|
|
273
|
+
/**
|
|
274
|
+
* @hidden
|
|
275
|
+
* Returns the size class based on the component and size input.
|
|
276
|
+
*/
|
|
277
|
+
const getSizeClass = (component, size) => {
|
|
278
|
+
const SIZE_CLASSES = {
|
|
279
|
+
'small': `k-${component}-sm`,
|
|
280
|
+
'medium': `k-${component}-md`,
|
|
281
|
+
'large': `k-${component}-lg`
|
|
282
|
+
};
|
|
283
|
+
return SIZE_CLASSES[size];
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* @hidden
|
|
287
|
+
* Returns the rounded class based on the rounded input.
|
|
288
|
+
*/
|
|
289
|
+
const getRoundedClass = (rounded) => {
|
|
290
|
+
const ROUNDED_CLASSES = {
|
|
291
|
+
'small': 'k-rounded-sm',
|
|
292
|
+
'medium': 'k-rounded-md',
|
|
293
|
+
'large': 'k-rounded-lg',
|
|
294
|
+
'full': 'k-rounded-full'
|
|
295
|
+
};
|
|
296
|
+
return ROUNDED_CLASSES[rounded];
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* @hidden
|
|
300
|
+
* Return the fillMode class based on the component and fillMode input.
|
|
301
|
+
*/
|
|
302
|
+
const getFillModeClass = (component, fillMode) => {
|
|
303
|
+
const FILLMODE_CLASSES = {
|
|
304
|
+
'solid': `k-${component}-solid`,
|
|
305
|
+
'flat': `k-${component}-flat`,
|
|
306
|
+
'outline': `k-${component}-outline`
|
|
307
|
+
};
|
|
308
|
+
return FILLMODE_CLASSES[fillMode];
|
|
309
|
+
};
|
|
273
310
|
|
|
274
311
|
/* tslint:disable:member-ordering */
|
|
275
312
|
/**
|
|
@@ -491,7 +528,7 @@ SearchBarComponent = __decorate([
|
|
|
491
528
|
[disabled]="disabled"
|
|
492
529
|
[readonly]="readonly"
|
|
493
530
|
[placeholder]="placeholder"
|
|
494
|
-
[class]="'k-input'"
|
|
531
|
+
[class]="'k-input-inner'"
|
|
495
532
|
(input)="handleInput($event)"
|
|
496
533
|
(keydown)="handleKeydown($event)"
|
|
497
534
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1350,8 +1387,9 @@ let ListComponent = class ListComponent {
|
|
|
1350
1387
|
this.focused = -1;
|
|
1351
1388
|
this.show = true;
|
|
1352
1389
|
this.multipleSelection = false;
|
|
1353
|
-
this.
|
|
1390
|
+
this.type = 'list';
|
|
1354
1391
|
this.checkboxes = { enabled: false };
|
|
1392
|
+
this.rounded = 'medium';
|
|
1355
1393
|
this.onClick = new EventEmitter();
|
|
1356
1394
|
this.pageChange = new EventEmitter();
|
|
1357
1395
|
this.listResize = new EventEmitter();
|
|
@@ -1359,11 +1397,13 @@ let ListComponent = class ListComponent {
|
|
|
1359
1397
|
this.lastLoaded = 0;
|
|
1360
1398
|
this.lastScrollTop = 0;
|
|
1361
1399
|
this.scrollToFocused = false;
|
|
1400
|
+
this._size = 'medium';
|
|
1362
1401
|
this.selectSubscription = merge(this.selectionService.onSelect.pipe(map((args) => args.indices[0])), this.selectionService.onFocus)
|
|
1363
1402
|
.pipe(
|
|
1364
1403
|
// handle only the very last onSelect/onFocus emission
|
|
1365
1404
|
switchMap(event => this.zone.onStable.pipe(take(1), map(() => event))))
|
|
1366
1405
|
.subscribe(this.scrollToItem.bind(this));
|
|
1406
|
+
this.prepareClasses();
|
|
1367
1407
|
}
|
|
1368
1408
|
set data(data) {
|
|
1369
1409
|
this._data = data[0] && data[0].header ? data.slice(0) : data;
|
|
@@ -1371,6 +1411,18 @@ let ListComponent = class ListComponent {
|
|
|
1371
1411
|
get data() {
|
|
1372
1412
|
return this._data;
|
|
1373
1413
|
}
|
|
1414
|
+
set size(size) {
|
|
1415
|
+
if (this.type === 'list') {
|
|
1416
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('list', this.size));
|
|
1417
|
+
if (size) {
|
|
1418
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('list', size));
|
|
1419
|
+
}
|
|
1420
|
+
this._size = size;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
get size() {
|
|
1424
|
+
return this._size;
|
|
1425
|
+
}
|
|
1374
1426
|
get pageSize() {
|
|
1375
1427
|
if (this.virtual.pageSize) {
|
|
1376
1428
|
return this.virtual.pageSize;
|
|
@@ -1387,6 +1439,12 @@ let ListComponent = class ListComponent {
|
|
|
1387
1439
|
return overflow;
|
|
1388
1440
|
}
|
|
1389
1441
|
}
|
|
1442
|
+
/**
|
|
1443
|
+
* @hidden
|
|
1444
|
+
*/
|
|
1445
|
+
get checkboxClasses() {
|
|
1446
|
+
return `${this.size ? getSizeClass('checkbox', this.size) : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
1447
|
+
}
|
|
1390
1448
|
ngOnChanges(changes) {
|
|
1391
1449
|
if (isChanged('data', changes, false)) {
|
|
1392
1450
|
if (this.lastLoaded <= 0) {
|
|
@@ -1398,8 +1456,12 @@ let ListComponent = class ListComponent {
|
|
|
1398
1456
|
if (isChanged('virtual', changes, false)) {
|
|
1399
1457
|
this.setOverflow();
|
|
1400
1458
|
}
|
|
1459
|
+
if (isChanged('type', changes, false)) {
|
|
1460
|
+
this.prepareClasses();
|
|
1461
|
+
}
|
|
1401
1462
|
}
|
|
1402
1463
|
ngAfterViewInit() {
|
|
1464
|
+
this.setComponentClasses();
|
|
1403
1465
|
this.zone.runOutsideAngular(() => {
|
|
1404
1466
|
this.scrollSubscription = fromEvent(this.content.nativeElement, "scroll").pipe(auditTime(100), tap(this.prefetchData.bind(this)), tap(this.findCurrentGroup.bind(this))).subscribe(() => {
|
|
1405
1467
|
this.lastScrollTop = this.content.nativeElement.scrollTop;
|
|
@@ -1435,6 +1497,28 @@ let ListComponent = class ListComponent {
|
|
|
1435
1497
|
this.selectionService.unselect(index);
|
|
1436
1498
|
}
|
|
1437
1499
|
}
|
|
1500
|
+
prepareClasses() {
|
|
1501
|
+
if (this.type === 'list') {
|
|
1502
|
+
this.listContentClass = 'k-list-content';
|
|
1503
|
+
this.listClass = 'k-list-ul';
|
|
1504
|
+
this.listItemClass = 'k-list-item';
|
|
1505
|
+
this.listVirtualClass = 'k-virtual-list';
|
|
1506
|
+
this.listGroupStickyHeaderClass = 'k-list-group-sticky-header';
|
|
1507
|
+
this.listGroupStickyHeaderTextClass = 'k-list-header-text';
|
|
1508
|
+
this.listGroupItemClass = 'k-list-group-item';
|
|
1509
|
+
this.listGroupItemTextClass = 'k-list-item-text';
|
|
1510
|
+
}
|
|
1511
|
+
else {
|
|
1512
|
+
this.listContentClass = 'k-table-body k-table-scroller';
|
|
1513
|
+
this.listClass = 'k-table k-table-list';
|
|
1514
|
+
this.listItemClass = 'k-table-row';
|
|
1515
|
+
this.listVirtualClass = 'k-virtual-table';
|
|
1516
|
+
this.listGroupStickyHeaderClass = 'k-table-group-sticky-header';
|
|
1517
|
+
this.listGroupStickyHeaderTextClass = 'k-table-th';
|
|
1518
|
+
this.listGroupItemClass = 'k-table-group-row';
|
|
1519
|
+
this.listGroupItemTextClass = 'k-table-th';
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1438
1522
|
isChecked(index) {
|
|
1439
1523
|
const normalizedIndex = this.virtual ? index + this.virtual.skip : index;
|
|
1440
1524
|
return this.selectionService.isSelected(normalizedIndex);
|
|
@@ -1443,7 +1527,7 @@ let ListComponent = class ListComponent {
|
|
|
1443
1527
|
const content = this.content.nativeElement;
|
|
1444
1528
|
const rect = content.getBoundingClientRect();
|
|
1445
1529
|
// IE9 hack
|
|
1446
|
-
const disabled = Array.prototype.slice.call(content.querySelectorAll(".k-
|
|
1530
|
+
const disabled = Array.prototype.slice.call(content.querySelectorAll(".k-disabled"));
|
|
1447
1531
|
// This is a workaround for finding elements with pointer-events: none;
|
|
1448
1532
|
disabled.forEach((el) => this.renderer.setStyle(el, "pointer-events", "auto"));
|
|
1449
1533
|
const item = document.elementFromPoint(rect.left + 1, rect.top + 1);
|
|
@@ -1521,6 +1605,9 @@ let ListComponent = class ListComponent {
|
|
|
1521
1605
|
}
|
|
1522
1606
|
return this.disabledItemsService.isIndexDisabled(index);
|
|
1523
1607
|
}
|
|
1608
|
+
isAltRow(index) {
|
|
1609
|
+
return this.type === 'dropdowngrid' && index % 2 !== 0;
|
|
1610
|
+
}
|
|
1524
1611
|
scrollToItem(index) {
|
|
1525
1612
|
let flatIndex = index;
|
|
1526
1613
|
if (this.dataService.grouped) {
|
|
@@ -1611,6 +1698,17 @@ let ListComponent = class ListComponent {
|
|
|
1611
1698
|
}
|
|
1612
1699
|
return this.virtual.skip === 0 && (this.virtual.pageSize > itemIndex);
|
|
1613
1700
|
}
|
|
1701
|
+
setComponentClasses() {
|
|
1702
|
+
if (this.type === 'list') {
|
|
1703
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-list');
|
|
1704
|
+
if (this.size) {
|
|
1705
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('list', this.size));
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
if (isPresent(this.virtual)) {
|
|
1709
|
+
this.renderer.addClass(this.wrapper.nativeElement, this.listVirtualClass);
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1614
1712
|
};
|
|
1615
1713
|
__decorate([
|
|
1616
1714
|
Input(),
|
|
@@ -1667,7 +1765,7 @@ __decorate([
|
|
|
1667
1765
|
__decorate([
|
|
1668
1766
|
Input(),
|
|
1669
1767
|
__metadata("design:type", String)
|
|
1670
|
-
], ListComponent.prototype, "
|
|
1768
|
+
], ListComponent.prototype, "type", void 0);
|
|
1671
1769
|
__decorate([
|
|
1672
1770
|
Input(),
|
|
1673
1771
|
__metadata("design:type", Object)
|
|
@@ -1677,6 +1775,15 @@ __decorate([
|
|
|
1677
1775
|
__metadata("design:type", Array),
|
|
1678
1776
|
__metadata("design:paramtypes", [Array])
|
|
1679
1777
|
], ListComponent.prototype, "data", null);
|
|
1778
|
+
__decorate([
|
|
1779
|
+
Input(),
|
|
1780
|
+
__metadata("design:type", String),
|
|
1781
|
+
__metadata("design:paramtypes", [String])
|
|
1782
|
+
], ListComponent.prototype, "size", null);
|
|
1783
|
+
__decorate([
|
|
1784
|
+
Input(),
|
|
1785
|
+
__metadata("design:type", String)
|
|
1786
|
+
], ListComponent.prototype, "rounded", void 0);
|
|
1680
1787
|
__decorate([
|
|
1681
1788
|
Output(),
|
|
1682
1789
|
__metadata("design:type", EventEmitter)
|
|
@@ -1710,8 +1817,7 @@ ListComponent = __decorate([
|
|
|
1710
1817
|
selector: 'kendo-list',
|
|
1711
1818
|
template: `
|
|
1712
1819
|
<div *ngIf="dataService.grouped"
|
|
1713
|
-
class=
|
|
1714
|
-
[ngClass]="{'k-virtual-item': virtual}"
|
|
1820
|
+
[class]="listGroupStickyHeaderClass"
|
|
1715
1821
|
[ngStyle]="{
|
|
1716
1822
|
'height.px': virtual?.itemHeight,
|
|
1717
1823
|
'minHeight.px' : virtual?.itemHeight,
|
|
@@ -1723,17 +1829,16 @@ ListComponent = __decorate([
|
|
|
1723
1829
|
$implicit: currentGroup
|
|
1724
1830
|
}">
|
|
1725
1831
|
</ng-template>
|
|
1726
|
-
<ng-template [ngIf]="!fixedGroupTemplate"><
|
|
1832
|
+
<ng-template [ngIf]="!fixedGroupTemplate"><span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span></ng-template>
|
|
1727
1833
|
</div>
|
|
1728
1834
|
<div #content
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1835
|
+
[class]="listContentClass"
|
|
1836
|
+
[style.overscrollBehavior]="'none'"
|
|
1837
|
+
[style.maxHeight.px]="height"
|
|
1838
|
+
unselectable="on">
|
|
1733
1839
|
<ul #list
|
|
1734
1840
|
role="listbox"
|
|
1735
1841
|
[class]="listClass"
|
|
1736
|
-
[ngClass]="{ 'k-virtual-list': virtual }"
|
|
1737
1842
|
[attr.id]="id"
|
|
1738
1843
|
[attr.aria-hidden]="!show">
|
|
1739
1844
|
<ng-template *ngIf="!dataService.grouped && show" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
@@ -1746,31 +1851,35 @@ ListComponent = __decorate([
|
|
|
1746
1851
|
[multipleSelection]="multipleSelection"
|
|
1747
1852
|
[attr.id]="optionPrefix + '-' + getValue(dataItem)"
|
|
1748
1853
|
[attr.tabIndex]="-1"
|
|
1749
|
-
class="
|
|
1750
|
-
[ngClass]="{
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1854
|
+
[class]="listItemClass"
|
|
1855
|
+
[ngClass]="{
|
|
1856
|
+
'k-disabled': isDisabled(itemIndex),
|
|
1857
|
+
'k-table-alt-row': isAltRow(itemIndex)
|
|
1858
|
+
}"
|
|
1859
|
+
>
|
|
1860
|
+
<input
|
|
1861
|
+
*ngIf="checkboxes.enabled"
|
|
1862
|
+
type="checkbox"
|
|
1863
|
+
class="k-checkbox"
|
|
1864
|
+
[ngClass]="checkboxClasses"
|
|
1865
|
+
(change)="onCheckedChange($event, itemIndex)"
|
|
1866
|
+
[checked]="isChecked(itemIndex)"
|
|
1867
|
+
/>
|
|
1759
1868
|
<ng-template *ngIf="template"
|
|
1760
1869
|
[templateContext]="{
|
|
1761
1870
|
templateRef: template.templateRef,
|
|
1762
1871
|
$implicit: dataItem
|
|
1763
1872
|
}">
|
|
1764
1873
|
</ng-template>
|
|
1765
|
-
<ng-template [ngIf]="!template">{{ getText(dataItem) }}</ng-template>
|
|
1874
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
|
|
1766
1875
|
</li>
|
|
1767
1876
|
</ng-template>
|
|
1768
1877
|
<ng-template *ngIf="dataService.grouped" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
1769
1878
|
<li
|
|
1770
1879
|
*ngIf="dataItem.header && dataItem.index > 0"
|
|
1771
1880
|
role="group"
|
|
1772
|
-
class=
|
|
1773
|
-
[
|
|
1881
|
+
[class]="listGroupItemClass"
|
|
1882
|
+
[class.k-table-alt-row]="isAltRow(itemIndex - 1)"
|
|
1774
1883
|
[ngStyle]="{
|
|
1775
1884
|
'height.px': virtual?.itemHeight,
|
|
1776
1885
|
'minHeight.px' : virtual?.itemHeight,
|
|
@@ -1778,15 +1887,17 @@ ListComponent = __decorate([
|
|
|
1778
1887
|
[attr.group-index]="dataItem.index"
|
|
1779
1888
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1780
1889
|
[attr.tabIndex]="-1">
|
|
1781
|
-
<
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1890
|
+
<span [class]="listGroupItemTextClass">
|
|
1891
|
+
<ng-template *ngIf="groupTemplate"
|
|
1892
|
+
[templateContext]="{
|
|
1893
|
+
templateRef: groupTemplate.templateRef,
|
|
1894
|
+
$implicit: dataItem.value
|
|
1895
|
+
}">
|
|
1896
|
+
</ng-template>
|
|
1897
|
+
<ng-template [ngIf]="!groupTemplate">{{ dataItem.value }}</ng-template>
|
|
1898
|
+
</span>
|
|
1899
|
+
</li>
|
|
1900
|
+
<li
|
|
1790
1901
|
*ngIf="!dataItem.header"
|
|
1791
1902
|
role="option"
|
|
1792
1903
|
kendoDropDownsSelectable
|
|
@@ -1796,15 +1907,19 @@ ListComponent = __decorate([
|
|
|
1796
1907
|
[attr.absolute-index]="dataItem.index"
|
|
1797
1908
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1798
1909
|
[attr.tabIndex]="-1"
|
|
1799
|
-
class="
|
|
1800
|
-
[ngClass]="{
|
|
1910
|
+
[class]="listItemClass"
|
|
1911
|
+
[ngClass]="{
|
|
1912
|
+
'k-disabled': isDisabled(dataItem.offsetIndex),
|
|
1913
|
+
'k-table-alt-row': isAltRow(itemIndex - 1)
|
|
1914
|
+
}"
|
|
1915
|
+
>
|
|
1801
1916
|
<ng-template *ngIf="template"
|
|
1802
1917
|
[templateContext]="{
|
|
1803
1918
|
templateRef: template.templateRef,
|
|
1804
1919
|
$implicit: dataItem.value
|
|
1805
1920
|
}">
|
|
1806
1921
|
</ng-template>
|
|
1807
|
-
<ng-template [ngIf]="!template">{{ getText(dataItem.value) }}</ng-template>
|
|
1922
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem.value) }}</span></ng-template>
|
|
1808
1923
|
</li>
|
|
1809
1924
|
</ng-template>
|
|
1810
1925
|
<kendo-resize-sensor
|
|
@@ -1996,6 +2111,9 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
1996
2111
|
this._value = "";
|
|
1997
2112
|
this.valueChangeSubject = new Subject();
|
|
1998
2113
|
this._isFocused = false;
|
|
2114
|
+
this._size = 'medium';
|
|
2115
|
+
this._rounded = 'medium';
|
|
2116
|
+
this._fillMode = 'solid';
|
|
1999
2117
|
validatePackage(packageMetadata);
|
|
2000
2118
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
2001
2119
|
this.wrapper = this.hostElement.nativeElement;
|
|
@@ -2180,16 +2298,80 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2180
2298
|
get virtual() {
|
|
2181
2299
|
return this._virtualSettings;
|
|
2182
2300
|
}
|
|
2301
|
+
/**
|
|
2302
|
+
* Sets the size of the component.
|
|
2303
|
+
*
|
|
2304
|
+
* The possible values are:
|
|
2305
|
+
* * `'small'`
|
|
2306
|
+
* * `'medium'` (default)
|
|
2307
|
+
* * `'large'`
|
|
2308
|
+
* * `null`
|
|
2309
|
+
*
|
|
2310
|
+
*/
|
|
2311
|
+
set size(size) {
|
|
2312
|
+
this.renderer.removeClass(this.wrapper, getSizeClass('input', this.size));
|
|
2313
|
+
if (size) {
|
|
2314
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', size));
|
|
2315
|
+
}
|
|
2316
|
+
this._size = size;
|
|
2317
|
+
}
|
|
2318
|
+
get size() {
|
|
2319
|
+
return this._size;
|
|
2320
|
+
}
|
|
2321
|
+
/**
|
|
2322
|
+
* Sets the border radius of the component.
|
|
2323
|
+
*
|
|
2324
|
+
* The possible values are:
|
|
2325
|
+
* * `'small'`
|
|
2326
|
+
* * `'medium'` (default)
|
|
2327
|
+
* * `'large'`
|
|
2328
|
+
* * `'full'`
|
|
2329
|
+
* * `null`
|
|
2330
|
+
*
|
|
2331
|
+
*/
|
|
2332
|
+
set rounded(rounded) {
|
|
2333
|
+
this.renderer.removeClass(this.wrapper, getRoundedClass(this.rounded));
|
|
2334
|
+
if (rounded) {
|
|
2335
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(rounded));
|
|
2336
|
+
}
|
|
2337
|
+
this._rounded = rounded;
|
|
2338
|
+
}
|
|
2339
|
+
get rounded() {
|
|
2340
|
+
return this._rounded;
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Sets the fillMode of the component.
|
|
2344
|
+
*
|
|
2345
|
+
* The possible values are:
|
|
2346
|
+
* * `'flat'`
|
|
2347
|
+
* * `'solid'` (default)
|
|
2348
|
+
* * `'outline'`
|
|
2349
|
+
* * `null`
|
|
2350
|
+
*
|
|
2351
|
+
*/
|
|
2352
|
+
set fillMode(fillMode) {
|
|
2353
|
+
this.renderer.removeClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
2354
|
+
if (fillMode) {
|
|
2355
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', fillMode));
|
|
2356
|
+
}
|
|
2357
|
+
this._fillMode = fillMode;
|
|
2358
|
+
}
|
|
2359
|
+
get fillMode() {
|
|
2360
|
+
return this._fillMode;
|
|
2361
|
+
}
|
|
2183
2362
|
get isFocused() {
|
|
2184
2363
|
return this._isFocused;
|
|
2185
2364
|
}
|
|
2186
2365
|
set isFocused(isFocused) {
|
|
2187
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-
|
|
2366
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
|
|
2188
2367
|
this._isFocused = isFocused;
|
|
2189
2368
|
}
|
|
2190
2369
|
get isDisabled() {
|
|
2191
2370
|
return this.disabled;
|
|
2192
2371
|
}
|
|
2372
|
+
get isLoading() {
|
|
2373
|
+
return this.loading;
|
|
2374
|
+
}
|
|
2193
2375
|
get dir() {
|
|
2194
2376
|
return this.direction;
|
|
2195
2377
|
}
|
|
@@ -2202,6 +2384,7 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2202
2384
|
this.setMessages();
|
|
2203
2385
|
});
|
|
2204
2386
|
this.setMessages();
|
|
2387
|
+
this.setComponentClasses();
|
|
2205
2388
|
}
|
|
2206
2389
|
ngOnDestroy() {
|
|
2207
2390
|
this.destroyPopup();
|
|
@@ -2629,6 +2812,17 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2629
2812
|
});
|
|
2630
2813
|
});
|
|
2631
2814
|
}
|
|
2815
|
+
setComponentClasses() {
|
|
2816
|
+
if (this.size) {
|
|
2817
|
+
this.renderer.addClass(this.wrapper, getSizeClass('input', this.size));
|
|
2818
|
+
}
|
|
2819
|
+
if (this.rounded) {
|
|
2820
|
+
this.renderer.addClass(this.wrapper, getRoundedClass(this.rounded));
|
|
2821
|
+
}
|
|
2822
|
+
if (this.fillMode) {
|
|
2823
|
+
this.renderer.addClass(this.wrapper, getFillModeClass('input', this.fillMode));
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2632
2826
|
};
|
|
2633
2827
|
__decorate([
|
|
2634
2828
|
Input(),
|
|
@@ -2708,6 +2902,21 @@ __decorate([
|
|
|
2708
2902
|
__metadata("design:type", Object),
|
|
2709
2903
|
__metadata("design:paramtypes", [Object])
|
|
2710
2904
|
], AutoCompleteComponent.prototype, "virtual", null);
|
|
2905
|
+
__decorate([
|
|
2906
|
+
Input(),
|
|
2907
|
+
__metadata("design:type", String),
|
|
2908
|
+
__metadata("design:paramtypes", [String])
|
|
2909
|
+
], AutoCompleteComponent.prototype, "size", null);
|
|
2910
|
+
__decorate([
|
|
2911
|
+
Input(),
|
|
2912
|
+
__metadata("design:type", String),
|
|
2913
|
+
__metadata("design:paramtypes", [String])
|
|
2914
|
+
], AutoCompleteComponent.prototype, "rounded", null);
|
|
2915
|
+
__decorate([
|
|
2916
|
+
Input(),
|
|
2917
|
+
__metadata("design:type", String),
|
|
2918
|
+
__metadata("design:paramtypes", [String])
|
|
2919
|
+
], AutoCompleteComponent.prototype, "fillMode", null);
|
|
2711
2920
|
__decorate([
|
|
2712
2921
|
Output(),
|
|
2713
2922
|
__metadata("design:type", EventEmitter)
|
|
@@ -2781,15 +2990,20 @@ __decorate([
|
|
|
2781
2990
|
__metadata("design:type", ListComponent)
|
|
2782
2991
|
], AutoCompleteComponent.prototype, "optionsList", void 0);
|
|
2783
2992
|
__decorate([
|
|
2784
|
-
HostBinding('class.k-widget'),
|
|
2785
2993
|
HostBinding('class.k-autocomplete'),
|
|
2994
|
+
HostBinding('class.k-input'),
|
|
2786
2995
|
__metadata("design:type", Boolean)
|
|
2787
2996
|
], AutoCompleteComponent.prototype, "widgetClasses", void 0);
|
|
2788
2997
|
__decorate([
|
|
2789
|
-
HostBinding('class.k-
|
|
2998
|
+
HostBinding('class.k-disabled'),
|
|
2790
2999
|
__metadata("design:type", Boolean),
|
|
2791
3000
|
__metadata("design:paramtypes", [])
|
|
2792
3001
|
], AutoCompleteComponent.prototype, "isDisabled", null);
|
|
3002
|
+
__decorate([
|
|
3003
|
+
HostBinding('class.k-loading'),
|
|
3004
|
+
__metadata("design:type", Boolean),
|
|
3005
|
+
__metadata("design:paramtypes", [])
|
|
3006
|
+
], AutoCompleteComponent.prototype, "isLoading", null);
|
|
2793
3007
|
__decorate([
|
|
2794
3008
|
HostBinding('attr.dir'),
|
|
2795
3009
|
__metadata("design:type", Object),
|
|
@@ -2848,7 +3062,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2848
3062
|
></kendo-searchbar>
|
|
2849
3063
|
<span
|
|
2850
3064
|
*ngIf="!loading && !readonly && (clearButton && text?.length)"
|
|
2851
|
-
class="k-
|
|
3065
|
+
class="k-clear-value"
|
|
2852
3066
|
[style.visibility]="clearButtonVisiblity"
|
|
2853
3067
|
[attr.title]="clearTitle"
|
|
2854
3068
|
role="button"
|
|
@@ -2856,7 +3070,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2856
3070
|
(click)="clearValue($event)"
|
|
2857
3071
|
(mousedown)="$event.preventDefault()"
|
|
2858
3072
|
>
|
|
2859
|
-
|
|
3073
|
+
<span class="k-icon k-i-x"></span>
|
|
3074
|
+
</span>
|
|
2860
3075
|
<span *ngIf="loading" class="k-icon k-i-loading"></span>
|
|
2861
3076
|
<ng-template #popupTemplate>
|
|
2862
3077
|
<!--header template-->
|
|
@@ -2868,6 +3083,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2868
3083
|
<!--list-->
|
|
2869
3084
|
<kendo-list
|
|
2870
3085
|
#optionsList
|
|
3086
|
+
[size]="size"
|
|
3087
|
+
[rounded]="rounded"
|
|
2871
3088
|
[id]="listBoxId"
|
|
2872
3089
|
[optionPrefix]="optionPrefix"
|
|
2873
3090
|
[data]="data"
|
|
@@ -2883,7 +3100,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2883
3100
|
>
|
|
2884
3101
|
</kendo-list>
|
|
2885
3102
|
<!--no-data template-->
|
|
2886
|
-
<div class="k-
|
|
3103
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
2887
3104
|
<ng-template [ngIf]="noDataTemplate"
|
|
2888
3105
|
[templateContext]="{
|
|
2889
3106
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -3006,7 +3223,8 @@ const COMBOBOX_VALUE_ACCESSOR = {
|
|
|
3006
3223
|
* ```
|
|
3007
3224
|
*/
|
|
3008
3225
|
let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
3009
|
-
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer,
|
|
3226
|
+
constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, cdr, renderer, touchEnabled$$1) {
|
|
3227
|
+
this.wrapper = wrapper;
|
|
3010
3228
|
this.localization = localization;
|
|
3011
3229
|
this.popupService = popupService;
|
|
3012
3230
|
this.selectionService = selectionService;
|
|
@@ -3016,7 +3234,6 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3016
3234
|
this.zone = zone;
|
|
3017
3235
|
this.cdr = cdr;
|
|
3018
3236
|
this.renderer = renderer;
|
|
3019
|
-
this.hostElement = hostElement;
|
|
3020
3237
|
this.touchEnabled = touchEnabled$$1;
|
|
3021
3238
|
this.selected = [];
|
|
3022
3239
|
/**
|
|
@@ -3181,6 +3398,9 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3181
3398
|
this.valueSubject = new Subject();
|
|
3182
3399
|
this.clearValueSubject = new Subject();
|
|
3183
3400
|
this.subs = new Subscription();
|
|
3401
|
+
this._size = 'medium';
|
|
3402
|
+
this._rounded = 'medium';
|
|
3403
|
+
this._fillMode = 'solid';
|
|
3184
3404
|
validatePackage(packageMetadata);
|
|
3185
3405
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
3186
3406
|
this.data = [];
|
|
@@ -3335,8 +3555,72 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3335
3555
|
get virtual() {
|
|
3336
3556
|
return this._virtualSettings;
|
|
3337
3557
|
}
|
|
3338
|
-
|
|
3339
|
-
|
|
3558
|
+
/**
|
|
3559
|
+
* Sets the size of the component.
|
|
3560
|
+
*
|
|
3561
|
+
* The possible values are:
|
|
3562
|
+
* * `'small'`
|
|
3563
|
+
* * `'medium'` (default)
|
|
3564
|
+
* * `'large'`
|
|
3565
|
+
* * `null`
|
|
3566
|
+
*
|
|
3567
|
+
*/
|
|
3568
|
+
set size(size) {
|
|
3569
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
3570
|
+
if (size) {
|
|
3571
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
3572
|
+
}
|
|
3573
|
+
this._size = size;
|
|
3574
|
+
}
|
|
3575
|
+
get size() {
|
|
3576
|
+
return this._size;
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
* Sets the border radius of the component.
|
|
3580
|
+
*
|
|
3581
|
+
* The possible values are:
|
|
3582
|
+
* * `'small'`
|
|
3583
|
+
* * `'medium'` (default)
|
|
3584
|
+
* * `'large'`
|
|
3585
|
+
* * `'full'`
|
|
3586
|
+
* * `null`
|
|
3587
|
+
*
|
|
3588
|
+
*/
|
|
3589
|
+
set rounded(rounded) {
|
|
3590
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
3591
|
+
if (rounded) {
|
|
3592
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
3593
|
+
}
|
|
3594
|
+
this._rounded = rounded;
|
|
3595
|
+
}
|
|
3596
|
+
get rounded() {
|
|
3597
|
+
return this._rounded;
|
|
3598
|
+
}
|
|
3599
|
+
/**
|
|
3600
|
+
* Sets the fillMode of the component.
|
|
3601
|
+
*
|
|
3602
|
+
* The possible values are:
|
|
3603
|
+
* * `'flat'`
|
|
3604
|
+
* * `'solid'` (default)
|
|
3605
|
+
* * `'outline'`
|
|
3606
|
+
* * `null`
|
|
3607
|
+
*
|
|
3608
|
+
*/
|
|
3609
|
+
set fillMode(fillMode) {
|
|
3610
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
3611
|
+
if (fillMode) {
|
|
3612
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
3613
|
+
}
|
|
3614
|
+
this._fillMode = fillMode;
|
|
3615
|
+
}
|
|
3616
|
+
get fillMode() {
|
|
3617
|
+
return this._fillMode;
|
|
3618
|
+
}
|
|
3619
|
+
get isDisabled() {
|
|
3620
|
+
return this.disabled;
|
|
3621
|
+
}
|
|
3622
|
+
get isLoading() {
|
|
3623
|
+
return this.loading;
|
|
3340
3624
|
}
|
|
3341
3625
|
get dir() {
|
|
3342
3626
|
return this.direction;
|
|
@@ -3345,7 +3629,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3345
3629
|
return this._isFocused;
|
|
3346
3630
|
}
|
|
3347
3631
|
set isFocused(value) {
|
|
3348
|
-
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-
|
|
3632
|
+
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-focus");
|
|
3349
3633
|
this._isFocused = value;
|
|
3350
3634
|
}
|
|
3351
3635
|
get clearButtonVisiblity() {
|
|
@@ -3368,12 +3652,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3368
3652
|
return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
|
|
3369
3653
|
}
|
|
3370
3654
|
ngOnInit() {
|
|
3371
|
-
this.renderer.removeAttribute(this.
|
|
3655
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
3372
3656
|
this.attachStreams();
|
|
3373
3657
|
this.createValueStream();
|
|
3374
3658
|
this.subscribeTouchEvents();
|
|
3375
3659
|
this.attachSelectClickHandler();
|
|
3376
3660
|
this.setMessages();
|
|
3661
|
+
this.setComponentClasses();
|
|
3377
3662
|
}
|
|
3378
3663
|
createValueStream() {
|
|
3379
3664
|
const valueStream = this.valueSubject.pipe(filter((candidate) => {
|
|
@@ -3651,6 +3936,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3651
3936
|
get buttonClasses() {
|
|
3652
3937
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
3653
3938
|
}
|
|
3939
|
+
/**
|
|
3940
|
+
* @hidden
|
|
3941
|
+
*/
|
|
3942
|
+
get selectButtonClasses() {
|
|
3943
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}
|
|
3944
|
+
`;
|
|
3945
|
+
}
|
|
3654
3946
|
/**
|
|
3655
3947
|
* @hidden
|
|
3656
3948
|
*/
|
|
@@ -3876,7 +4168,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3876
4168
|
const currentText = this.searchbar.value;
|
|
3877
4169
|
const textHasChanged = currentText !== (getter$1(this.dataItem, this.textField) || '');
|
|
3878
4170
|
const valueHasChanged = unresolvedSelection || textHasChanged;
|
|
3879
|
-
const runInZone = valueHasChanged || hasObservers(this.onBlur) || hasObservers(this.close) || isUntouched(this.
|
|
4171
|
+
const runInZone = valueHasChanged || hasObservers(this.onBlur) || hasObservers(this.close) || isUntouched(this.wrapper.nativeElement);
|
|
3880
4172
|
if (runInZone) {
|
|
3881
4173
|
this.zone.run(() => {
|
|
3882
4174
|
if (valueHasChanged) {
|
|
@@ -4101,7 +4393,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4101
4393
|
// Roll up ComboBox on iOS when tapped outside
|
|
4102
4394
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
4103
4395
|
const target = e.target;
|
|
4104
|
-
const isInDropDown = inDropDown(this.
|
|
4396
|
+
const isInDropDown = inDropDown(this.wrapper, target, this.popupRef);
|
|
4105
4397
|
if (this.isFocused && !isInDropDown) {
|
|
4106
4398
|
// Close popup and mobile keyboard if searchbar is focused
|
|
4107
4399
|
this.zone.run(() => this.blur());
|
|
@@ -4117,6 +4409,17 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4117
4409
|
const event = pointers ? 'pointerdown' : 'click';
|
|
4118
4410
|
this.selectClickDisposeHandler = this.renderer.listen(selectElement, event, this.selectClick.bind(this));
|
|
4119
4411
|
}
|
|
4412
|
+
setComponentClasses() {
|
|
4413
|
+
if (this.size) {
|
|
4414
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
4415
|
+
}
|
|
4416
|
+
if (this.rounded) {
|
|
4417
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
4418
|
+
}
|
|
4419
|
+
if (this.fillMode) {
|
|
4420
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4120
4423
|
};
|
|
4121
4424
|
__decorate([
|
|
4122
4425
|
Input(),
|
|
@@ -4213,6 +4516,21 @@ __decorate([
|
|
|
4213
4516
|
__metadata("design:type", Object),
|
|
4214
4517
|
__metadata("design:paramtypes", [Object])
|
|
4215
4518
|
], ComboBoxComponent.prototype, "virtual", null);
|
|
4519
|
+
__decorate([
|
|
4520
|
+
Input(),
|
|
4521
|
+
__metadata("design:type", String),
|
|
4522
|
+
__metadata("design:paramtypes", [String])
|
|
4523
|
+
], ComboBoxComponent.prototype, "size", null);
|
|
4524
|
+
__decorate([
|
|
4525
|
+
Input(),
|
|
4526
|
+
__metadata("design:type", String),
|
|
4527
|
+
__metadata("design:paramtypes", [String])
|
|
4528
|
+
], ComboBoxComponent.prototype, "rounded", null);
|
|
4529
|
+
__decorate([
|
|
4530
|
+
Input(),
|
|
4531
|
+
__metadata("design:type", String),
|
|
4532
|
+
__metadata("design:paramtypes", [String])
|
|
4533
|
+
], ComboBoxComponent.prototype, "fillMode", null);
|
|
4216
4534
|
__decorate([
|
|
4217
4535
|
Output(),
|
|
4218
4536
|
__metadata("design:type", EventEmitter)
|
|
@@ -4289,24 +4607,25 @@ __decorate([
|
|
|
4289
4607
|
ViewChild('optionsList', { static: false }),
|
|
4290
4608
|
__metadata("design:type", ListComponent)
|
|
4291
4609
|
], ComboBoxComponent.prototype, "optionsList", void 0);
|
|
4292
|
-
__decorate([
|
|
4293
|
-
ViewChild('wrapper', { static: true }),
|
|
4294
|
-
__metadata("design:type", ElementRef)
|
|
4295
|
-
], ComboBoxComponent.prototype, "wrapper", void 0);
|
|
4296
4610
|
__decorate([
|
|
4297
4611
|
ViewChild('select', { static: true }),
|
|
4298
4612
|
__metadata("design:type", ElementRef)
|
|
4299
4613
|
], ComboBoxComponent.prototype, "select", void 0);
|
|
4300
4614
|
__decorate([
|
|
4301
|
-
HostBinding('class.k-widget'),
|
|
4302
4615
|
HostBinding('class.k-combobox'),
|
|
4616
|
+
HostBinding('class.k-input'),
|
|
4303
4617
|
__metadata("design:type", Boolean)
|
|
4304
4618
|
], ComboBoxComponent.prototype, "widgetClasses", void 0);
|
|
4305
4619
|
__decorate([
|
|
4306
|
-
HostBinding('class.k-
|
|
4620
|
+
HostBinding('class.k-disabled'),
|
|
4621
|
+
__metadata("design:type", Boolean),
|
|
4622
|
+
__metadata("design:paramtypes", [])
|
|
4623
|
+
], ComboBoxComponent.prototype, "isDisabled", null);
|
|
4624
|
+
__decorate([
|
|
4625
|
+
HostBinding('class.k-loading'),
|
|
4307
4626
|
__metadata("design:type", Boolean),
|
|
4308
4627
|
__metadata("design:paramtypes", [])
|
|
4309
|
-
], ComboBoxComponent.prototype, "
|
|
4628
|
+
], ComboBoxComponent.prototype, "isLoading", null);
|
|
4310
4629
|
__decorate([
|
|
4311
4630
|
HostBinding('attr.dir'),
|
|
4312
4631
|
__metadata("design:type", Object),
|
|
@@ -4343,95 +4662,94 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4343
4662
|
clearTitle="clear"
|
|
4344
4663
|
>
|
|
4345
4664
|
</ng-container>
|
|
4346
|
-
<
|
|
4347
|
-
|
|
4348
|
-
[
|
|
4665
|
+
<kendo-searchbar #searchbar
|
|
4666
|
+
[role]="'combobox'"
|
|
4667
|
+
[id]="focusableId"
|
|
4668
|
+
[listId]="listBoxId"
|
|
4669
|
+
[activeDescendant]="activeDescendant"
|
|
4670
|
+
[noDataLabel]="noDataLabel"
|
|
4671
|
+
[userInput]="text"
|
|
4672
|
+
[suggestedText]="getSuggestion()"
|
|
4673
|
+
[disabled]="disabled"
|
|
4674
|
+
[readonly]="readonly"
|
|
4675
|
+
[tabIndex]="tabIndex"
|
|
4676
|
+
[popupOpen]="isOpen"
|
|
4677
|
+
[placeholder]="placeholder"
|
|
4678
|
+
(onNavigate)="handleNavigate($event)"
|
|
4679
|
+
(valueChange)="searchBarChange($event)"
|
|
4680
|
+
(onBlur)="handleBlur()"
|
|
4681
|
+
(onFocus)="handleFocus()"
|
|
4682
|
+
></kendo-searchbar>
|
|
4683
|
+
<span
|
|
4684
|
+
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
4685
|
+
class="k-clear-value"
|
|
4686
|
+
[style.visibility]="clearButtonVisiblity"
|
|
4687
|
+
aria-hidden="true"
|
|
4688
|
+
[attr.title]="clearTitle"
|
|
4689
|
+
(click)="clearValue($event)"
|
|
4690
|
+
[kendoEventsOutsideAngular]="{
|
|
4691
|
+
mousedown: preventEventDefault
|
|
4692
|
+
}"
|
|
4349
4693
|
>
|
|
4350
|
-
|
|
4351
|
-
[role]="'combobox'"
|
|
4352
|
-
[id]="focusableId"
|
|
4353
|
-
[listId]="listBoxId"
|
|
4354
|
-
[activeDescendant]="activeDescendant"
|
|
4355
|
-
[noDataLabel]="noDataLabel"
|
|
4356
|
-
[userInput]="text"
|
|
4357
|
-
[suggestedText]="getSuggestion()"
|
|
4358
|
-
[disabled]="disabled"
|
|
4359
|
-
[readonly]="readonly"
|
|
4360
|
-
[tabIndex]="tabIndex"
|
|
4361
|
-
[popupOpen]="isOpen"
|
|
4362
|
-
[placeholder]="placeholder"
|
|
4363
|
-
(onNavigate)="handleNavigate($event)"
|
|
4364
|
-
(valueChange)="searchBarChange($event)"
|
|
4365
|
-
(onBlur)="handleBlur()"
|
|
4366
|
-
(onFocus)="handleFocus()"
|
|
4367
|
-
></kendo-searchbar>
|
|
4368
|
-
<span
|
|
4369
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
4370
|
-
class="k-icon k-clear-value k-i-close"
|
|
4371
|
-
[style.visibility]="clearButtonVisiblity"
|
|
4372
|
-
aria-hidden="true"
|
|
4373
|
-
[attr.title]="clearTitle"
|
|
4374
|
-
(click)="clearValue($event)"
|
|
4375
|
-
[kendoEventsOutsideAngular]="{
|
|
4376
|
-
mousedown: preventEventDefault
|
|
4377
|
-
}"
|
|
4378
|
-
>
|
|
4379
|
-
</span>
|
|
4380
|
-
<span
|
|
4381
|
-
#select
|
|
4382
|
-
aria-hidden="true"
|
|
4383
|
-
unselectable="on"
|
|
4384
|
-
class="k-select"
|
|
4385
|
-
[kendoEventsOutsideAngular]="{
|
|
4386
|
-
mousedown: preventEventDefault
|
|
4387
|
-
}"
|
|
4388
|
-
>
|
|
4389
|
-
<span class="k-icon" [ngClass]="buttonClasses">
|
|
4390
|
-
</span>
|
|
4391
|
-
</span>
|
|
4392
|
-
<ng-template #popupTemplate>
|
|
4393
|
-
<!--header template-->
|
|
4394
|
-
<ng-template *ngIf="headerTemplate"
|
|
4395
|
-
[templateContext]="{
|
|
4396
|
-
templateRef: headerTemplate.templateRef
|
|
4397
|
-
}">
|
|
4398
|
-
</ng-template>
|
|
4399
|
-
<!--list-->
|
|
4400
|
-
<kendo-list
|
|
4401
|
-
#optionsList
|
|
4402
|
-
[id]="listBoxId"
|
|
4403
|
-
[optionPrefix]="optionPrefix"
|
|
4404
|
-
[data]="data"
|
|
4405
|
-
[textField]="textField"
|
|
4406
|
-
[valueField]="valueField"
|
|
4407
|
-
[template]="template"
|
|
4408
|
-
[groupTemplate]="groupTemplate"
|
|
4409
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
4410
|
-
[height]="listHeight"
|
|
4411
|
-
[show]="isOpen"
|
|
4412
|
-
[virtual]="virtual"
|
|
4413
|
-
(pageChange)="pageChange($event)"
|
|
4414
|
-
>
|
|
4415
|
-
</kendo-list>
|
|
4416
|
-
<!--no-data template-->
|
|
4417
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
4418
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
4419
|
-
[templateContext]="{
|
|
4420
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
4421
|
-
}">
|
|
4422
|
-
</ng-template>
|
|
4423
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
4424
|
-
<div>{{ noDataText }}</div>
|
|
4425
|
-
</ng-template>
|
|
4426
|
-
</div>
|
|
4427
|
-
<!--footer template-->
|
|
4428
|
-
<ng-template *ngIf="footerTemplate"
|
|
4429
|
-
[templateContext]="{
|
|
4430
|
-
templateRef: footerTemplate.templateRef
|
|
4431
|
-
}">
|
|
4432
|
-
</ng-template>
|
|
4433
|
-
</ng-template>
|
|
4694
|
+
<span class="k-icon k-i-x"></span>
|
|
4434
4695
|
</span>
|
|
4696
|
+
<button
|
|
4697
|
+
#select
|
|
4698
|
+
aria-hidden="true"
|
|
4699
|
+
unselectable="on"
|
|
4700
|
+
type="button"
|
|
4701
|
+
class="k-input-button k-button k-icon-button"
|
|
4702
|
+
[ngClass]="selectButtonClasses"
|
|
4703
|
+
[kendoEventsOutsideAngular]="{
|
|
4704
|
+
mousedown: preventEventDefault
|
|
4705
|
+
}"
|
|
4706
|
+
>
|
|
4707
|
+
<span class="k-button-icon k-icon" [ngClass]="buttonClasses"></span>
|
|
4708
|
+
</button>
|
|
4709
|
+
<ng-template #popupTemplate>
|
|
4710
|
+
<!--header template-->
|
|
4711
|
+
<ng-template *ngIf="headerTemplate"
|
|
4712
|
+
[templateContext]="{
|
|
4713
|
+
templateRef: headerTemplate.templateRef
|
|
4714
|
+
}">
|
|
4715
|
+
</ng-template>
|
|
4716
|
+
<!--list-->
|
|
4717
|
+
<kendo-list
|
|
4718
|
+
#optionsList
|
|
4719
|
+
[size]="size"
|
|
4720
|
+
[rounded]="rounded"
|
|
4721
|
+
[id]="listBoxId"
|
|
4722
|
+
[optionPrefix]="optionPrefix"
|
|
4723
|
+
[data]="data"
|
|
4724
|
+
[textField]="textField"
|
|
4725
|
+
[valueField]="valueField"
|
|
4726
|
+
[template]="template"
|
|
4727
|
+
[groupTemplate]="groupTemplate"
|
|
4728
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
4729
|
+
[height]="listHeight"
|
|
4730
|
+
[show]="isOpen"
|
|
4731
|
+
[virtual]="virtual"
|
|
4732
|
+
(pageChange)="pageChange($event)"
|
|
4733
|
+
>
|
|
4734
|
+
</kendo-list>
|
|
4735
|
+
<!--no-data template-->
|
|
4736
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
4737
|
+
<ng-template [ngIf]="noDataTemplate"
|
|
4738
|
+
[templateContext]="{
|
|
4739
|
+
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
4740
|
+
}">
|
|
4741
|
+
</ng-template>
|
|
4742
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
4743
|
+
<div>{{ noDataText }}</div>
|
|
4744
|
+
</ng-template>
|
|
4745
|
+
</div>
|
|
4746
|
+
<!--footer template-->
|
|
4747
|
+
<ng-template *ngIf="footerTemplate"
|
|
4748
|
+
[templateContext]="{
|
|
4749
|
+
templateRef: footerTemplate.templateRef
|
|
4750
|
+
}">
|
|
4751
|
+
</ng-template>
|
|
4752
|
+
</ng-template>
|
|
4435
4753
|
<ng-template [ngIf]="isOpen">
|
|
4436
4754
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
4437
4755
|
</ng-template>
|
|
@@ -4439,7 +4757,8 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4439
4757
|
`
|
|
4440
4758
|
}),
|
|
4441
4759
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
4442
|
-
__metadata("design:paramtypes", [
|
|
4760
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
4761
|
+
LocalizationService,
|
|
4443
4762
|
PopupService,
|
|
4444
4763
|
SelectionService,
|
|
4445
4764
|
NavigationService,
|
|
@@ -4447,8 +4766,7 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4447
4766
|
DataService,
|
|
4448
4767
|
NgZone,
|
|
4449
4768
|
ChangeDetectorRef,
|
|
4450
|
-
Renderer2,
|
|
4451
|
-
ElementRef, Boolean])
|
|
4769
|
+
Renderer2, Boolean])
|
|
4452
4770
|
], ComboBoxComponent);
|
|
4453
4771
|
|
|
4454
4772
|
/**
|
|
@@ -4520,7 +4838,8 @@ const DROPDOWNLIST_VALUE_ACCESSOR = {
|
|
|
4520
4838
|
* ```
|
|
4521
4839
|
*/
|
|
4522
4840
|
let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponent {
|
|
4523
|
-
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer,
|
|
4841
|
+
constructor(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, _zone, renderer, cdr, touchEnabled$$1) {
|
|
4842
|
+
this.wrapper = wrapper;
|
|
4524
4843
|
this.localization = localization;
|
|
4525
4844
|
this.popupService = popupService;
|
|
4526
4845
|
this.selectionService = selectionService;
|
|
@@ -4529,7 +4848,6 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4529
4848
|
this.dataService = dataService;
|
|
4530
4849
|
this._zone = _zone;
|
|
4531
4850
|
this.renderer = renderer;
|
|
4532
|
-
this.hostElement = hostElement;
|
|
4533
4851
|
this.cdr = cdr;
|
|
4534
4852
|
this.touchEnabled = touchEnabled$$1;
|
|
4535
4853
|
/**
|
|
@@ -4613,7 +4931,8 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4613
4931
|
* Fires each time the DropDownList gets blurred.
|
|
4614
4932
|
*/
|
|
4615
4933
|
this.onBlur = new EventEmitter();
|
|
4616
|
-
this.
|
|
4934
|
+
this.hostClasses = true;
|
|
4935
|
+
this.role = 'listbox';
|
|
4617
4936
|
this.groupIndices = [];
|
|
4618
4937
|
this.listBoxId = guid$1();
|
|
4619
4938
|
this.optionPrefix = guid$1();
|
|
@@ -4625,16 +4944,20 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4625
4944
|
this.last = "";
|
|
4626
4945
|
this.filterFocused = new EventEmitter();
|
|
4627
4946
|
this.filterBlurred = new EventEmitter();
|
|
4628
|
-
this.
|
|
4629
|
-
this.
|
|
4947
|
+
this.hostElementFocused = new EventEmitter();
|
|
4948
|
+
this.hostElementBlurred = new EventEmitter();
|
|
4630
4949
|
this.selectionSubscription = new Subscription();
|
|
4631
4950
|
this._open = false;
|
|
4632
4951
|
this._popupSettings = { animate: true };
|
|
4952
|
+
this._size = 'medium';
|
|
4953
|
+
this._rounded = 'medium';
|
|
4954
|
+
this._fillMode = 'solid';
|
|
4633
4955
|
validatePackage(packageMetadata);
|
|
4634
4956
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
4635
4957
|
this.data = [];
|
|
4636
4958
|
this.subscribeEvents();
|
|
4637
4959
|
this.subscribeTouchEvents();
|
|
4960
|
+
this.subscribeFocusEvents();
|
|
4638
4961
|
this.popupMouseDownHandler = this.onMouseDown.bind(this);
|
|
4639
4962
|
}
|
|
4640
4963
|
get width() {
|
|
@@ -4782,11 +5105,76 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4782
5105
|
get tabIndex() {
|
|
4783
5106
|
return this.tabindex;
|
|
4784
5107
|
}
|
|
5108
|
+
/**
|
|
5109
|
+
* Sets the size of the component.
|
|
5110
|
+
*
|
|
5111
|
+
* The possible values are:
|
|
5112
|
+
* * `'small'`
|
|
5113
|
+
* * `'medium'` (default)
|
|
5114
|
+
* * `'large'`
|
|
5115
|
+
* * `null`
|
|
5116
|
+
*
|
|
5117
|
+
*/
|
|
5118
|
+
set size(size) {
|
|
5119
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
5120
|
+
if (size) {
|
|
5121
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
5122
|
+
}
|
|
5123
|
+
this._size = size;
|
|
5124
|
+
}
|
|
5125
|
+
get size() {
|
|
5126
|
+
return this._size;
|
|
5127
|
+
}
|
|
5128
|
+
/**
|
|
5129
|
+
* Sets the border radius of the component.
|
|
5130
|
+
*
|
|
5131
|
+
* The possible values are:
|
|
5132
|
+
* * `'small'`
|
|
5133
|
+
* * `'medium'` (default)
|
|
5134
|
+
* * `'large'`
|
|
5135
|
+
* * `'full'`
|
|
5136
|
+
* * `null`
|
|
5137
|
+
*
|
|
5138
|
+
*/
|
|
5139
|
+
set rounded(rounded) {
|
|
5140
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
5141
|
+
if (rounded) {
|
|
5142
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
5143
|
+
}
|
|
5144
|
+
this._rounded = rounded;
|
|
5145
|
+
}
|
|
5146
|
+
get rounded() {
|
|
5147
|
+
return this._rounded;
|
|
5148
|
+
}
|
|
5149
|
+
/**
|
|
5150
|
+
* Sets the fillMode of the component.
|
|
5151
|
+
*
|
|
5152
|
+
* The possible values are:
|
|
5153
|
+
* * `'flat'`
|
|
5154
|
+
* * `'solid'` (default)
|
|
5155
|
+
* * `'outline'`
|
|
5156
|
+
* * `null`
|
|
5157
|
+
*
|
|
5158
|
+
*/
|
|
5159
|
+
set fillMode(fillMode) {
|
|
5160
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
5161
|
+
if (fillMode) {
|
|
5162
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
5163
|
+
}
|
|
5164
|
+
this._fillMode = fillMode;
|
|
5165
|
+
}
|
|
5166
|
+
get fillMode() {
|
|
5167
|
+
return this._fillMode;
|
|
5168
|
+
}
|
|
4785
5169
|
/**
|
|
4786
5170
|
* @hidden
|
|
4787
5171
|
*/
|
|
4788
|
-
blurComponent() {
|
|
4789
|
-
this.
|
|
5172
|
+
blurComponent(event) {
|
|
5173
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5174
|
+
return;
|
|
5175
|
+
}
|
|
5176
|
+
event.stopImmediatePropagation();
|
|
5177
|
+
this.hostElementBlurred.emit();
|
|
4790
5178
|
}
|
|
4791
5179
|
/**
|
|
4792
5180
|
* @hidden
|
|
@@ -4797,8 +5185,12 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4797
5185
|
/**
|
|
4798
5186
|
* @hidden
|
|
4799
5187
|
*/
|
|
4800
|
-
focusComponent() {
|
|
4801
|
-
this.
|
|
5188
|
+
focusComponent(event) {
|
|
5189
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5190
|
+
return;
|
|
5191
|
+
}
|
|
5192
|
+
event.stopImmediatePropagation();
|
|
5193
|
+
this.hostElementFocused.emit();
|
|
4802
5194
|
if (!this.isFocused) {
|
|
4803
5195
|
this.isFocused = true;
|
|
4804
5196
|
if (hasObservers(this.onFocus)) {
|
|
@@ -4811,8 +5203,49 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4811
5203
|
/**
|
|
4812
5204
|
* @hidden
|
|
4813
5205
|
*/
|
|
4814
|
-
|
|
4815
|
-
|
|
5206
|
+
onResize() {
|
|
5207
|
+
if (this._open) {
|
|
5208
|
+
const popupWrapper = this.popupRef.popupElement;
|
|
5209
|
+
const { min, max } = this.width;
|
|
5210
|
+
popupWrapper.style.minWidth = min;
|
|
5211
|
+
popupWrapper.style.width = max;
|
|
5212
|
+
}
|
|
5213
|
+
}
|
|
5214
|
+
get isDisabled() {
|
|
5215
|
+
return this.disabled;
|
|
5216
|
+
}
|
|
5217
|
+
get isLoading() {
|
|
5218
|
+
return this.loading;
|
|
5219
|
+
}
|
|
5220
|
+
get id() {
|
|
5221
|
+
return this.focusableId;
|
|
5222
|
+
}
|
|
5223
|
+
get dir() {
|
|
5224
|
+
return this.direction;
|
|
5225
|
+
}
|
|
5226
|
+
get hostTabIndex() {
|
|
5227
|
+
return this.widgetTabIndex;
|
|
5228
|
+
}
|
|
5229
|
+
get isReadonly() {
|
|
5230
|
+
return this.readonly;
|
|
5231
|
+
}
|
|
5232
|
+
get isAriaExpanded() {
|
|
5233
|
+
return this.ariaExpanded;
|
|
5234
|
+
}
|
|
5235
|
+
get hostAriaOwns() {
|
|
5236
|
+
return this.ariaOwns;
|
|
5237
|
+
}
|
|
5238
|
+
get hostAriaActivedescendant() {
|
|
5239
|
+
return this.ariaActivedescendant;
|
|
5240
|
+
}
|
|
5241
|
+
get hostNoDataLabel() {
|
|
5242
|
+
return this.noDataLabel;
|
|
5243
|
+
}
|
|
5244
|
+
/**
|
|
5245
|
+
* @hidden
|
|
5246
|
+
*/
|
|
5247
|
+
keydown(event) {
|
|
5248
|
+
const firstIndex = isPresent(this.defaultItem) ? -1 : 0;
|
|
4816
5249
|
let focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
|
|
4817
5250
|
let offset = 0;
|
|
4818
5251
|
if (this.disabled || this.readonly) {
|
|
@@ -4868,29 +5301,15 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4868
5301
|
this.focus();
|
|
4869
5302
|
this.togglePopup(!this.isOpen);
|
|
4870
5303
|
}
|
|
4871
|
-
/**
|
|
4872
|
-
* @hidden
|
|
4873
|
-
*/
|
|
4874
|
-
onResize() {
|
|
4875
|
-
if (this._open) {
|
|
4876
|
-
const popupWrapper = this.popupRef.popupElement;
|
|
4877
|
-
const { min, max } = this.width;
|
|
4878
|
-
popupWrapper.style.minWidth = min;
|
|
4879
|
-
popupWrapper.style.width = max;
|
|
4880
|
-
}
|
|
4881
|
-
}
|
|
4882
|
-
get dir() {
|
|
4883
|
-
return this.direction;
|
|
4884
|
-
}
|
|
4885
5304
|
set isFocused(isFocused) {
|
|
4886
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
5305
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
4887
5306
|
this._isFocused = isFocused;
|
|
4888
5307
|
}
|
|
4889
5308
|
get isFocused() {
|
|
4890
5309
|
return this._isFocused;
|
|
4891
5310
|
}
|
|
4892
5311
|
ngOnInit() {
|
|
4893
|
-
this.renderer.removeAttribute(this.
|
|
5312
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
4894
5313
|
this.localizationChangesSubscription = this.localization
|
|
4895
5314
|
.changes.subscribe(({ rtl }) => {
|
|
4896
5315
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -4898,6 +5317,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4898
5317
|
});
|
|
4899
5318
|
this.setMessages();
|
|
4900
5319
|
this.assignAriaDescribedBy();
|
|
5320
|
+
this.setComponentClasses();
|
|
4901
5321
|
}
|
|
4902
5322
|
/**
|
|
4903
5323
|
* @hidden
|
|
@@ -5070,6 +5490,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5070
5490
|
get buttonClasses() {
|
|
5071
5491
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
5072
5492
|
}
|
|
5493
|
+
/**
|
|
5494
|
+
* @hidden
|
|
5495
|
+
*/
|
|
5496
|
+
get selectButtonClasses() {
|
|
5497
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* @hidden
|
|
5501
|
+
*/
|
|
5502
|
+
get filterInputClasses() {
|
|
5503
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
5504
|
+
}
|
|
5505
|
+
/**
|
|
5506
|
+
* @hidden
|
|
5507
|
+
*/
|
|
5508
|
+
get optionLabelSizeClass() {
|
|
5509
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
5510
|
+
}
|
|
5073
5511
|
/**
|
|
5074
5512
|
* @hidden
|
|
5075
5513
|
*/
|
|
@@ -5204,13 +5642,13 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5204
5642
|
.subscribe(this.handleEnter.bind(this));
|
|
5205
5643
|
this.escSubscription = this.navigationService.esc
|
|
5206
5644
|
.subscribe(this.handleEscape.bind(this));
|
|
5207
|
-
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.
|
|
5645
|
+
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
|
|
5208
5646
|
.subscribe(() => {
|
|
5209
|
-
this.
|
|
5647
|
+
this.hostElementBlurred.emit();
|
|
5210
5648
|
});
|
|
5211
5649
|
this._zone.runOutsideAngular(() => {
|
|
5212
5650
|
this.componentBlurredSubscription =
|
|
5213
|
-
merge(this.
|
|
5651
|
+
merge(this.hostElementBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.filterFocused)))), this.navigationService.tab).pipe(tap(event => event instanceof NavigationEvent && this.focus()), filter(() => this.isFocused))
|
|
5214
5652
|
.subscribe(() => this.componentBlur());
|
|
5215
5653
|
});
|
|
5216
5654
|
}
|
|
@@ -5222,7 +5660,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5222
5660
|
// Roll up DropDownList on iOS when tapped outside
|
|
5223
5661
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
5224
5662
|
const target = e.target;
|
|
5225
|
-
if (this.isFocused && !inDropDown(this.
|
|
5663
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
5226
5664
|
this._zone.run(() => {
|
|
5227
5665
|
if (this.filterFocused) {
|
|
5228
5666
|
// Close popup if filter is focused
|
|
@@ -5233,6 +5671,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5233
5671
|
}
|
|
5234
5672
|
}));
|
|
5235
5673
|
}
|
|
5674
|
+
subscribeFocusEvents() {
|
|
5675
|
+
if (isDocumentAvailable()) {
|
|
5676
|
+
this.focusComponent = this.focusComponent.bind(this);
|
|
5677
|
+
this.blurComponent = this.blurComponent.bind(this);
|
|
5678
|
+
this._zone.runOutsideAngular(() => {
|
|
5679
|
+
const useCapture = true;
|
|
5680
|
+
document.addEventListener('focus', this.focusComponent, useCapture);
|
|
5681
|
+
document.addEventListener('blur', this.blurComponent, useCapture);
|
|
5682
|
+
});
|
|
5683
|
+
}
|
|
5684
|
+
}
|
|
5685
|
+
unSubscribeFocusEvents() {
|
|
5686
|
+
if (isDocumentAvailable()) {
|
|
5687
|
+
const useCapture = true;
|
|
5688
|
+
document.removeEventListener('focus', this.focusComponent, useCapture);
|
|
5689
|
+
document.removeEventListener('blur', this.blurComponent, useCapture);
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5236
5692
|
unsubscribeEvents() {
|
|
5237
5693
|
if (!isDocumentAvailable()) {
|
|
5238
5694
|
return;
|
|
@@ -5244,6 +5700,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5244
5700
|
this.escSubscription.unsubscribe();
|
|
5245
5701
|
this.componentBlurredSubscription.unsubscribe();
|
|
5246
5702
|
this.filterBlurredSubscription.unsubscribe();
|
|
5703
|
+
this.unSubscribeFocusEvents();
|
|
5247
5704
|
if (this.touchstartDisposeHandler) {
|
|
5248
5705
|
this.touchstartDisposeHandler();
|
|
5249
5706
|
}
|
|
@@ -5335,7 +5792,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5335
5792
|
hasObservers(this.close) ||
|
|
5336
5793
|
hasObservers(this.onBlur) ||
|
|
5337
5794
|
hasObservers(this.filterChange) ||
|
|
5338
|
-
isUntouched(this.
|
|
5795
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
5339
5796
|
this._zone.run(() => {
|
|
5340
5797
|
if (valueHasChanged) {
|
|
5341
5798
|
this.selectionService.change(this.selectionService.selected[0]);
|
|
@@ -5515,6 +5972,17 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5515
5972
|
const newValue = `${this.valueLabelId} ${trimmed}`.trim();
|
|
5516
5973
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
5517
5974
|
}
|
|
5975
|
+
setComponentClasses() {
|
|
5976
|
+
if (this.size) {
|
|
5977
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
5978
|
+
}
|
|
5979
|
+
if (this.rounded) {
|
|
5980
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
5981
|
+
}
|
|
5982
|
+
if (this.fillMode) {
|
|
5983
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5518
5986
|
};
|
|
5519
5987
|
__decorate([
|
|
5520
5988
|
Input(),
|
|
@@ -5603,6 +6071,21 @@ __decorate([
|
|
|
5603
6071
|
__metadata("design:type", Number),
|
|
5604
6072
|
__metadata("design:paramtypes", [Number])
|
|
5605
6073
|
], DropDownListComponent.prototype, "tabIndex", null);
|
|
6074
|
+
__decorate([
|
|
6075
|
+
Input(),
|
|
6076
|
+
__metadata("design:type", String),
|
|
6077
|
+
__metadata("design:paramtypes", [String])
|
|
6078
|
+
], DropDownListComponent.prototype, "size", null);
|
|
6079
|
+
__decorate([
|
|
6080
|
+
Input(),
|
|
6081
|
+
__metadata("design:type", String),
|
|
6082
|
+
__metadata("design:paramtypes", [String])
|
|
6083
|
+
], DropDownListComponent.prototype, "rounded", null);
|
|
6084
|
+
__decorate([
|
|
6085
|
+
Input(),
|
|
6086
|
+
__metadata("design:type", String),
|
|
6087
|
+
__metadata("design:paramtypes", [String])
|
|
6088
|
+
], DropDownListComponent.prototype, "fillMode", null);
|
|
5606
6089
|
__decorate([
|
|
5607
6090
|
Output(),
|
|
5608
6091
|
__metadata("design:type", EventEmitter)
|
|
@@ -5675,24 +6158,90 @@ __decorate([
|
|
|
5675
6158
|
ViewChild('popupTemplate', { static: true }),
|
|
5676
6159
|
__metadata("design:type", TemplateRef)
|
|
5677
6160
|
], DropDownListComponent.prototype, "popupTemplate", void 0);
|
|
5678
|
-
__decorate([
|
|
5679
|
-
ViewChild('wrapper', { static: true }),
|
|
5680
|
-
__metadata("design:type", ElementRef)
|
|
5681
|
-
], DropDownListComponent.prototype, "wrapper", void 0);
|
|
5682
6161
|
__decorate([
|
|
5683
6162
|
ViewChild('optionsList', { static: false }),
|
|
5684
6163
|
__metadata("design:type", ListComponent)
|
|
5685
6164
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
5686
6165
|
__decorate([
|
|
5687
|
-
HostBinding('class.k-
|
|
5688
|
-
HostBinding('class.k-
|
|
6166
|
+
HostBinding('class.k-dropdownlist'),
|
|
6167
|
+
HostBinding('class.k-picker'),
|
|
5689
6168
|
__metadata("design:type", Boolean)
|
|
5690
|
-
], DropDownListComponent.prototype, "
|
|
6169
|
+
], DropDownListComponent.prototype, "hostClasses", void 0);
|
|
6170
|
+
__decorate([
|
|
6171
|
+
HostBinding('class.k-disabled'),
|
|
6172
|
+
HostBinding('attr.aria-disabled'),
|
|
6173
|
+
__metadata("design:type", Boolean),
|
|
6174
|
+
__metadata("design:paramtypes", [])
|
|
6175
|
+
], DropDownListComponent.prototype, "isDisabled", null);
|
|
6176
|
+
__decorate([
|
|
6177
|
+
HostBinding('class.k-loading'),
|
|
6178
|
+
__metadata("design:type", Boolean),
|
|
6179
|
+
__metadata("design:paramtypes", [])
|
|
6180
|
+
], DropDownListComponent.prototype, "isLoading", null);
|
|
6181
|
+
__decorate([
|
|
6182
|
+
HostBinding('attr.id'),
|
|
6183
|
+
__metadata("design:type", String),
|
|
6184
|
+
__metadata("design:paramtypes", [])
|
|
6185
|
+
], DropDownListComponent.prototype, "id", null);
|
|
5691
6186
|
__decorate([
|
|
5692
6187
|
HostBinding('attr.dir'),
|
|
5693
6188
|
__metadata("design:type", String),
|
|
5694
6189
|
__metadata("design:paramtypes", [])
|
|
5695
6190
|
], DropDownListComponent.prototype, "dir", null);
|
|
6191
|
+
__decorate([
|
|
6192
|
+
HostBinding('attr.tabindex'),
|
|
6193
|
+
__metadata("design:type", Number),
|
|
6194
|
+
__metadata("design:paramtypes", [])
|
|
6195
|
+
], DropDownListComponent.prototype, "hostTabIndex", null);
|
|
6196
|
+
__decorate([
|
|
6197
|
+
HostBinding('attr.readonly'),
|
|
6198
|
+
HostBinding('attr.aria-readonly'),
|
|
6199
|
+
__metadata("design:type", Boolean),
|
|
6200
|
+
__metadata("design:paramtypes", [])
|
|
6201
|
+
], DropDownListComponent.prototype, "isReadonly", null);
|
|
6202
|
+
__decorate([
|
|
6203
|
+
HostBinding('attr.role'),
|
|
6204
|
+
HostBinding('attr.aria-haspopup'),
|
|
6205
|
+
__metadata("design:type", String)
|
|
6206
|
+
], DropDownListComponent.prototype, "role", void 0);
|
|
6207
|
+
__decorate([
|
|
6208
|
+
HostBinding('attr.aria-expanded'),
|
|
6209
|
+
__metadata("design:type", Boolean),
|
|
6210
|
+
__metadata("design:paramtypes", [])
|
|
6211
|
+
], DropDownListComponent.prototype, "isAriaExpanded", null);
|
|
6212
|
+
__decorate([
|
|
6213
|
+
HostBinding('attr.aria-owns'),
|
|
6214
|
+
__metadata("design:type", String),
|
|
6215
|
+
__metadata("design:paramtypes", [])
|
|
6216
|
+
], DropDownListComponent.prototype, "hostAriaOwns", null);
|
|
6217
|
+
__decorate([
|
|
6218
|
+
HostBinding('attr.aria-activedescendant'),
|
|
6219
|
+
__metadata("design:type", String),
|
|
6220
|
+
__metadata("design:paramtypes", [])
|
|
6221
|
+
], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
|
|
6222
|
+
__decorate([
|
|
6223
|
+
HostBinding('attr.aria-label'),
|
|
6224
|
+
__metadata("design:type", String),
|
|
6225
|
+
__metadata("design:paramtypes", [])
|
|
6226
|
+
], DropDownListComponent.prototype, "hostNoDataLabel", null);
|
|
6227
|
+
__decorate([
|
|
6228
|
+
HostListener('keydown', ['$event']),
|
|
6229
|
+
__metadata("design:type", Function),
|
|
6230
|
+
__metadata("design:paramtypes", [Object]),
|
|
6231
|
+
__metadata("design:returntype", void 0)
|
|
6232
|
+
], DropDownListComponent.prototype, "keydown", null);
|
|
6233
|
+
__decorate([
|
|
6234
|
+
HostListener('keypress', ['$event']),
|
|
6235
|
+
__metadata("design:type", Function),
|
|
6236
|
+
__metadata("design:paramtypes", [Object]),
|
|
6237
|
+
__metadata("design:returntype", void 0)
|
|
6238
|
+
], DropDownListComponent.prototype, "keypress", null);
|
|
6239
|
+
__decorate([
|
|
6240
|
+
HostListener('click', ['$event']),
|
|
6241
|
+
__metadata("design:type", Function),
|
|
6242
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
6243
|
+
__metadata("design:returntype", void 0)
|
|
6244
|
+
], DropDownListComponent.prototype, "click", null);
|
|
5696
6245
|
DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
5697
6246
|
Component({
|
|
5698
6247
|
exportAs: 'kendoDropDownList',
|
|
@@ -5721,128 +6270,128 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5721
6270
|
noDataText="NO DATA FOUND"
|
|
5722
6271
|
>
|
|
5723
6272
|
</ng-container>
|
|
5724
|
-
<span
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
(click)="click($event)"
|
|
5744
|
-
[kendoEventsOutsideAngular]="{
|
|
5745
|
-
focus: focusComponent,
|
|
5746
|
-
blur: blurComponent
|
|
6273
|
+
<span class="k-input-inner" unselectable="on" [id]="valueLabelId">
|
|
6274
|
+
<span class="k-input-value-text">
|
|
6275
|
+
<ng-template *ngIf="valueTemplate"
|
|
6276
|
+
[templateContext]="{
|
|
6277
|
+
templateRef: valueTemplate.templateRef,
|
|
6278
|
+
$implicit: dataItem
|
|
6279
|
+
}">
|
|
6280
|
+
</ng-template>
|
|
6281
|
+
<ng-template [ngIf]="!valueTemplate">{{ getText() }}</ng-template>
|
|
6282
|
+
</span>
|
|
6283
|
+
</span>
|
|
6284
|
+
<button
|
|
6285
|
+
tabindex="-1"
|
|
6286
|
+
unselectable="on"
|
|
6287
|
+
type="button"
|
|
6288
|
+
class="k-input-button k-button k-icon-button"
|
|
6289
|
+
[ngClass]="selectButtonClasses"
|
|
6290
|
+
[kendoEventsOutsideAngular]="{
|
|
6291
|
+
mousedown: onMouseDown
|
|
5747
6292
|
}"
|
|
5748
|
-
[scope]="this"
|
|
5749
6293
|
>
|
|
5750
|
-
<span
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
</span>
|
|
5759
|
-
<span class="k-select" unselectable="on">
|
|
5760
|
-
<span
|
|
5761
|
-
class="k-icon"
|
|
5762
|
-
unselectable="on"
|
|
5763
|
-
[ngClass]="buttonClasses"
|
|
5764
|
-
>
|
|
5765
|
-
</span>
|
|
5766
|
-
</span>
|
|
5767
|
-
<ng-template #popupTemplate>
|
|
5768
|
-
<!--filterable-->
|
|
6294
|
+
<span
|
|
6295
|
+
class="k-button-icon k-icon"
|
|
6296
|
+
unselectable="on"
|
|
6297
|
+
[ngClass]="buttonClasses"
|
|
6298
|
+
></span>
|
|
6299
|
+
</button>
|
|
6300
|
+
<ng-template #popupTemplate>
|
|
6301
|
+
<!--filterable-->
|
|
5769
6302
|
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
</div>
|
|
5793
|
-
</ng-template>
|
|
5794
|
-
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
5795
|
-
<div class="k-list-optionlabel" [ngClass]="{ 'k-state-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
5796
|
-
<ng-template
|
|
5797
|
-
[templateContext]="{
|
|
5798
|
-
templateRef: itemTemplate.templateRef,
|
|
5799
|
-
$implicit: defaultItem
|
|
5800
|
-
}">
|
|
5801
|
-
</ng-template>
|
|
5802
|
-
</div>
|
|
5803
|
-
</ng-template>
|
|
5804
|
-
<!--header template-->
|
|
5805
|
-
<ng-template *ngIf="headerTemplate"
|
|
5806
|
-
[templateContext]="{
|
|
5807
|
-
templateRef: headerTemplate.templateRef
|
|
5808
|
-
}">
|
|
5809
|
-
</ng-template>
|
|
5810
|
-
<!--list-->
|
|
5811
|
-
<kendo-list
|
|
5812
|
-
#optionsList
|
|
5813
|
-
[id]="listBoxId"
|
|
5814
|
-
[optionPrefix]="optionPrefix"
|
|
5815
|
-
[data]="data"
|
|
5816
|
-
[textField]="textField"
|
|
5817
|
-
[valueField]="valueField"
|
|
5818
|
-
[template]="itemTemplate"
|
|
5819
|
-
[groupTemplate]="groupTemplate"
|
|
5820
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
5821
|
-
[height]="listHeight"
|
|
5822
|
-
[show]="isOpen"
|
|
5823
|
-
[virtual]="virtual"
|
|
5824
|
-
(pageChange)="pageChange($event)"
|
|
5825
|
-
>
|
|
5826
|
-
</kendo-list>
|
|
5827
|
-
<!--no-data template-->
|
|
5828
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
5829
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
5830
|
-
[templateContext]="{
|
|
5831
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
5832
|
-
}">
|
|
5833
|
-
</ng-template>
|
|
5834
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
5835
|
-
<div>{{ noDataText }}</div>
|
|
5836
|
-
</ng-template>
|
|
5837
|
-
</div>
|
|
5838
|
-
<!--footer template-->
|
|
5839
|
-
<ng-template *ngIf="footerTemplate"
|
|
5840
|
-
[templateContext]="{
|
|
5841
|
-
templateRef: footerTemplate.templateRef
|
|
5842
|
-
}">
|
|
5843
|
-
</ng-template>
|
|
6303
|
+
<ng-template [ngIf]="filterable">
|
|
6304
|
+
<div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
|
|
6305
|
+
<span
|
|
6306
|
+
class="k-searchbox k-input"
|
|
6307
|
+
[ngClass]="filterInputClasses"
|
|
6308
|
+
>
|
|
6309
|
+
<span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
|
|
6310
|
+
<input
|
|
6311
|
+
[attr.aria-owns]="ariaOwns"
|
|
6312
|
+
[attr.aria-activedescendant]="ariaActivedescendant"
|
|
6313
|
+
[attr.aria-label]="noDataLabel"
|
|
6314
|
+
tabindex="-1"
|
|
6315
|
+
[filterInput]="isFocused && !touchEnabled"
|
|
6316
|
+
[dir]="direction"
|
|
6317
|
+
[(ngModel)]="filterText"
|
|
6318
|
+
class="k-input-inner"
|
|
6319
|
+
(keydown)="keydown($event)"
|
|
6320
|
+
(input)="handleFilter($event)"
|
|
6321
|
+
(focus)="onFilterFocus()"
|
|
6322
|
+
(blur)="blurFilterInput()" />
|
|
6323
|
+
</span>
|
|
6324
|
+
</div>
|
|
5844
6325
|
</ng-template>
|
|
5845
|
-
|
|
6326
|
+
<!--default item-->
|
|
6327
|
+
<ng-template [ngIf]="defaultItem && !itemTemplate">
|
|
6328
|
+
<div
|
|
6329
|
+
class="k-list"
|
|
6330
|
+
[ngClass]="optionLabelSizeClass"
|
|
6331
|
+
>
|
|
6332
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
6333
|
+
{{ getDefaultItemText() }}
|
|
6334
|
+
</div>
|
|
6335
|
+
</div>
|
|
6336
|
+
</ng-template>
|
|
6337
|
+
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
6338
|
+
<div
|
|
6339
|
+
class="k-list"
|
|
6340
|
+
[ngClass]="optionLabelSizeClass"
|
|
6341
|
+
>
|
|
6342
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
6343
|
+
<ng-template
|
|
6344
|
+
[templateContext]="{
|
|
6345
|
+
templateRef: itemTemplate.templateRef,
|
|
6346
|
+
$implicit: defaultItem
|
|
6347
|
+
}">
|
|
6348
|
+
</ng-template>
|
|
6349
|
+
</div>
|
|
6350
|
+
</div>
|
|
6351
|
+
</ng-template>
|
|
6352
|
+
<!--header template-->
|
|
6353
|
+
<ng-template *ngIf="headerTemplate"
|
|
6354
|
+
[templateContext]="{
|
|
6355
|
+
templateRef: headerTemplate.templateRef
|
|
6356
|
+
}">
|
|
6357
|
+
</ng-template>
|
|
6358
|
+
<!--list-->
|
|
6359
|
+
<kendo-list
|
|
6360
|
+
#optionsList
|
|
6361
|
+
[size]="size"
|
|
6362
|
+
[rounded]="rounded"
|
|
6363
|
+
[id]="listBoxId"
|
|
6364
|
+
[optionPrefix]="optionPrefix"
|
|
6365
|
+
[data]="data"
|
|
6366
|
+
[textField]="textField"
|
|
6367
|
+
[valueField]="valueField"
|
|
6368
|
+
[template]="itemTemplate"
|
|
6369
|
+
[groupTemplate]="groupTemplate"
|
|
6370
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
6371
|
+
[height]="listHeight"
|
|
6372
|
+
[show]="isOpen"
|
|
6373
|
+
[virtual]="virtual"
|
|
6374
|
+
(pageChange)="pageChange($event)"
|
|
6375
|
+
>
|
|
6376
|
+
</kendo-list>
|
|
6377
|
+
<!--no-data template-->
|
|
6378
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
6379
|
+
<ng-template [ngIf]="noDataTemplate"
|
|
6380
|
+
[templateContext]="{
|
|
6381
|
+
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
6382
|
+
}">
|
|
6383
|
+
</ng-template>
|
|
6384
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
6385
|
+
<div>{{ noDataText }}</div>
|
|
6386
|
+
</ng-template>
|
|
6387
|
+
</div>
|
|
6388
|
+
<!--footer template-->
|
|
6389
|
+
<ng-template *ngIf="footerTemplate"
|
|
6390
|
+
[templateContext]="{
|
|
6391
|
+
templateRef: footerTemplate.templateRef
|
|
6392
|
+
}">
|
|
6393
|
+
</ng-template>
|
|
6394
|
+
</ng-template>
|
|
5846
6395
|
<ng-template [ngIf]="isOpen">
|
|
5847
6396
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
5848
6397
|
</ng-template>
|
|
@@ -5850,7 +6399,8 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5850
6399
|
`
|
|
5851
6400
|
}),
|
|
5852
6401
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
5853
|
-
__metadata("design:paramtypes", [
|
|
6402
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
6403
|
+
LocalizationService,
|
|
5854
6404
|
PopupService,
|
|
5855
6405
|
SelectionService,
|
|
5856
6406
|
NavigationService,
|
|
@@ -5858,7 +6408,6 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5858
6408
|
DataService,
|
|
5859
6409
|
NgZone,
|
|
5860
6410
|
Renderer2,
|
|
5861
|
-
ElementRef,
|
|
5862
6411
|
ChangeDetectorRef, Boolean])
|
|
5863
6412
|
], DropDownListComponent);
|
|
5864
6413
|
|
|
@@ -6028,7 +6577,8 @@ const MULTISELECT_VALUE_ACCESSOR = {
|
|
|
6028
6577
|
* ```
|
|
6029
6578
|
*/
|
|
6030
6579
|
let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
6031
|
-
constructor(localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer,
|
|
6580
|
+
constructor(wrapper, localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer, _zone, touchEnabled$$1) {
|
|
6581
|
+
this.wrapper = wrapper;
|
|
6032
6582
|
this.localization = localization;
|
|
6033
6583
|
this.popupService = popupService;
|
|
6034
6584
|
this.dataService = dataService;
|
|
@@ -6038,7 +6588,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6038
6588
|
this.cdr = cdr;
|
|
6039
6589
|
this.differs = differs;
|
|
6040
6590
|
this.renderer = renderer;
|
|
6041
|
-
this.hostElement = hostElement;
|
|
6042
6591
|
this._zone = _zone;
|
|
6043
6592
|
this.touchEnabled = touchEnabled$$1;
|
|
6044
6593
|
this.listBoxId = guid$1();
|
|
@@ -6199,8 +6748,11 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6199
6748
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
6200
6749
|
*/
|
|
6201
6750
|
this.removeTag = new EventEmitter();
|
|
6202
|
-
this.
|
|
6751
|
+
this.hostClasses = true;
|
|
6203
6752
|
this.initialized = false;
|
|
6753
|
+
this._size = 'medium';
|
|
6754
|
+
this._rounded = 'medium';
|
|
6755
|
+
this._fillMode = 'solid';
|
|
6204
6756
|
this.onChangeCallback = (_) => { };
|
|
6205
6757
|
this.onTouchedCallback = (_) => { };
|
|
6206
6758
|
this._placeholder = '';
|
|
@@ -6274,7 +6826,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6274
6826
|
if (hasObservers(this.onBlur) ||
|
|
6275
6827
|
hasObservers(this.filterChange) ||
|
|
6276
6828
|
hasObservers(this.close) ||
|
|
6277
|
-
isUntouched(this.
|
|
6829
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
6278
6830
|
this._zone.run(() => {
|
|
6279
6831
|
this.closePopup();
|
|
6280
6832
|
if (!(this.isOpen && this.allowCustom)) {
|
|
@@ -6291,22 +6843,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6291
6843
|
this.closePopup();
|
|
6292
6844
|
}
|
|
6293
6845
|
}
|
|
6294
|
-
/**
|
|
6295
|
-
* @hidden
|
|
6296
|
-
*/
|
|
6297
|
-
wrapperMousedown(event) {
|
|
6298
|
-
const inputElement = this.searchbar.input.nativeElement;
|
|
6299
|
-
if (event.button === 0) {
|
|
6300
|
-
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
6301
|
-
return;
|
|
6302
|
-
}
|
|
6303
|
-
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
6304
|
-
this.searchbar.focus();
|
|
6305
|
-
}
|
|
6306
|
-
this.togglePopup(!this.isOpen);
|
|
6307
|
-
event.preventDefault();
|
|
6308
|
-
}
|
|
6309
|
-
}
|
|
6310
6846
|
/**
|
|
6311
6847
|
* @hidden
|
|
6312
6848
|
*/
|
|
@@ -6384,6 +6920,67 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6384
6920
|
get tabIndex() {
|
|
6385
6921
|
return this.tabindex;
|
|
6386
6922
|
}
|
|
6923
|
+
/**
|
|
6924
|
+
* Sets the size of the component.
|
|
6925
|
+
*
|
|
6926
|
+
* The possible values are:
|
|
6927
|
+
* * `'small'`
|
|
6928
|
+
* * `'medium'` (default)
|
|
6929
|
+
* * `'large'`
|
|
6930
|
+
* * `null`
|
|
6931
|
+
*
|
|
6932
|
+
*/
|
|
6933
|
+
set size(size) {
|
|
6934
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6935
|
+
if (size) {
|
|
6936
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6937
|
+
}
|
|
6938
|
+
this._size = size;
|
|
6939
|
+
}
|
|
6940
|
+
get size() {
|
|
6941
|
+
return this._size;
|
|
6942
|
+
}
|
|
6943
|
+
/**
|
|
6944
|
+
* Sets the border radius of the component.
|
|
6945
|
+
*
|
|
6946
|
+
* The possible values are:
|
|
6947
|
+
* * `'small'`
|
|
6948
|
+
* * `'medium'` (default)
|
|
6949
|
+
* * `'large'`
|
|
6950
|
+
* * `'full'`
|
|
6951
|
+
* * `null`
|
|
6952
|
+
*
|
|
6953
|
+
*/
|
|
6954
|
+
set rounded(rounded) {
|
|
6955
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6956
|
+
if (rounded) {
|
|
6957
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
6958
|
+
}
|
|
6959
|
+
this._rounded = rounded;
|
|
6960
|
+
}
|
|
6961
|
+
get rounded() {
|
|
6962
|
+
return this._rounded;
|
|
6963
|
+
}
|
|
6964
|
+
/**
|
|
6965
|
+
* Sets the fillMode of the component.
|
|
6966
|
+
*
|
|
6967
|
+
* The possible values are:
|
|
6968
|
+
* * `'flat'`
|
|
6969
|
+
* * `'solid'` (default)
|
|
6970
|
+
* * `'outline'`
|
|
6971
|
+
* * `null`
|
|
6972
|
+
*
|
|
6973
|
+
*/
|
|
6974
|
+
set fillMode(fillMode) {
|
|
6975
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
6976
|
+
if (fillMode) {
|
|
6977
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
6978
|
+
}
|
|
6979
|
+
this._fillMode = fillMode;
|
|
6980
|
+
}
|
|
6981
|
+
get fillMode() {
|
|
6982
|
+
return this._fillMode;
|
|
6983
|
+
}
|
|
6387
6984
|
/**
|
|
6388
6985
|
* The hint which is displayed when the component is empty.
|
|
6389
6986
|
* When the values are selected, it disappears.
|
|
@@ -6458,6 +7055,25 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6458
7055
|
get disabledClass() {
|
|
6459
7056
|
return this.disabled;
|
|
6460
7057
|
}
|
|
7058
|
+
get isLoading() {
|
|
7059
|
+
return this.loading;
|
|
7060
|
+
}
|
|
7061
|
+
/**
|
|
7062
|
+
* @hidden
|
|
7063
|
+
*/
|
|
7064
|
+
hostMousedown(event) {
|
|
7065
|
+
const inputElement = this.searchbar.input.nativeElement;
|
|
7066
|
+
if (event.button === 0) {
|
|
7067
|
+
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
7068
|
+
return;
|
|
7069
|
+
}
|
|
7070
|
+
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
7071
|
+
this.searchbar.focus();
|
|
7072
|
+
}
|
|
7073
|
+
this.togglePopup(!this.isOpen);
|
|
7074
|
+
event.preventDefault();
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
6461
7077
|
get listContainerClasses() {
|
|
6462
7078
|
const containerClasses = ['k-list-container', 'k-reset'];
|
|
6463
7079
|
if (this.popupSettings.popupClass) {
|
|
@@ -6465,6 +7081,12 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6465
7081
|
}
|
|
6466
7082
|
return containerClasses;
|
|
6467
7083
|
}
|
|
7084
|
+
/**
|
|
7085
|
+
* @hidden
|
|
7086
|
+
*/
|
|
7087
|
+
get customItemSizeClass() {
|
|
7088
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
7089
|
+
}
|
|
6468
7090
|
get width() {
|
|
6469
7091
|
let wrapperOffsetWidth = 0;
|
|
6470
7092
|
if (isDocumentAvailable()) {
|
|
@@ -6709,7 +7331,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6709
7331
|
this.valueChangeDetected = false;
|
|
6710
7332
|
}
|
|
6711
7333
|
ngOnInit() {
|
|
6712
|
-
this.renderer.removeAttribute(this.
|
|
7334
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
6713
7335
|
this.createCustomValueStream();
|
|
6714
7336
|
this.localizationChangeSubscription = this.localization
|
|
6715
7337
|
.changes.subscribe(({ rtl }) => {
|
|
@@ -6718,6 +7340,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6718
7340
|
});
|
|
6719
7341
|
this.setMessages();
|
|
6720
7342
|
this.setState(this.value);
|
|
7343
|
+
this.setComponentClasses();
|
|
6721
7344
|
this.initialized = true;
|
|
6722
7345
|
}
|
|
6723
7346
|
ngOnChanges(changes) {
|
|
@@ -6805,7 +7428,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6805
7428
|
this.cdr.markForCheck();
|
|
6806
7429
|
}
|
|
6807
7430
|
set isFocused(isFocused) {
|
|
6808
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
7431
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
6809
7432
|
this._isFocused = isFocused;
|
|
6810
7433
|
}
|
|
6811
7434
|
get isFocused() {
|
|
@@ -6842,7 +7465,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6842
7465
|
// Roll up MultiSelect on iOS when tapped outside
|
|
6843
7466
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
6844
7467
|
const target = e.target;
|
|
6845
|
-
if ((this.isFocused || this.isOpen) && !inDropDown(this.
|
|
7468
|
+
if ((this.isFocused || this.isOpen) && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
6846
7469
|
this._zone.run(() => {
|
|
6847
7470
|
this.blur();
|
|
6848
7471
|
if (this.isOpen) {
|
|
@@ -7209,8 +7832,19 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
7209
7832
|
});
|
|
7210
7833
|
});
|
|
7211
7834
|
}
|
|
7212
|
-
|
|
7213
|
-
|
|
7835
|
+
setComponentClasses() {
|
|
7836
|
+
if (this.size) {
|
|
7837
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7838
|
+
}
|
|
7839
|
+
if (this.rounded) {
|
|
7840
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7841
|
+
}
|
|
7842
|
+
if (this.fillMode) {
|
|
7843
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7844
|
+
}
|
|
7845
|
+
}
|
|
7846
|
+
};
|
|
7847
|
+
__decorate([
|
|
7214
7848
|
Input(),
|
|
7215
7849
|
__metadata("design:type", String)
|
|
7216
7850
|
], MultiSelectComponent.prototype, "focusableId", void 0);
|
|
@@ -7249,6 +7883,21 @@ __decorate([
|
|
|
7249
7883
|
__metadata("design:type", Number),
|
|
7250
7884
|
__metadata("design:paramtypes", [Number])
|
|
7251
7885
|
], MultiSelectComponent.prototype, "tabIndex", null);
|
|
7886
|
+
__decorate([
|
|
7887
|
+
Input(),
|
|
7888
|
+
__metadata("design:type", String),
|
|
7889
|
+
__metadata("design:paramtypes", [String])
|
|
7890
|
+
], MultiSelectComponent.prototype, "size", null);
|
|
7891
|
+
__decorate([
|
|
7892
|
+
Input(),
|
|
7893
|
+
__metadata("design:type", String),
|
|
7894
|
+
__metadata("design:paramtypes", [String])
|
|
7895
|
+
], MultiSelectComponent.prototype, "rounded", null);
|
|
7896
|
+
__decorate([
|
|
7897
|
+
Input(),
|
|
7898
|
+
__metadata("design:type", String),
|
|
7899
|
+
__metadata("design:paramtypes", [String])
|
|
7900
|
+
], MultiSelectComponent.prototype, "fillMode", null);
|
|
7252
7901
|
__decorate([
|
|
7253
7902
|
Input(),
|
|
7254
7903
|
__metadata("design:type", String),
|
|
@@ -7359,10 +8008,6 @@ __decorate([
|
|
|
7359
8008
|
ViewChild('popupTemplate', { static: true }),
|
|
7360
8009
|
__metadata("design:type", TemplateRef)
|
|
7361
8010
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
7362
|
-
__decorate([
|
|
7363
|
-
ViewChild('wrapper', { static: true }),
|
|
7364
|
-
__metadata("design:type", ElementRef)
|
|
7365
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
7366
8011
|
__decorate([
|
|
7367
8012
|
ViewChild('optionsList', { static: false }),
|
|
7368
8013
|
__metadata("design:type", ListComponent)
|
|
@@ -7404,20 +8049,31 @@ __decorate([
|
|
|
7404
8049
|
__metadata("design:type", NoDataTemplateDirective)
|
|
7405
8050
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
7406
8051
|
__decorate([
|
|
7407
|
-
HostBinding('class.k-widget'),
|
|
7408
8052
|
HostBinding('class.k-multiselect'),
|
|
8053
|
+
HostBinding('class.k-input'),
|
|
7409
8054
|
__metadata("design:type", Boolean)
|
|
7410
|
-
], MultiSelectComponent.prototype, "
|
|
8055
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
7411
8056
|
__decorate([
|
|
7412
8057
|
HostBinding('attr.dir'),
|
|
7413
8058
|
__metadata("design:type", String),
|
|
7414
8059
|
__metadata("design:paramtypes", [])
|
|
7415
8060
|
], MultiSelectComponent.prototype, "dir", null);
|
|
7416
8061
|
__decorate([
|
|
7417
|
-
HostBinding('class.k-
|
|
8062
|
+
HostBinding('class.k-disabled'),
|
|
7418
8063
|
__metadata("design:type", Boolean),
|
|
7419
8064
|
__metadata("design:paramtypes", [])
|
|
7420
8065
|
], MultiSelectComponent.prototype, "disabledClass", null);
|
|
8066
|
+
__decorate([
|
|
8067
|
+
HostBinding('class.k-loading'),
|
|
8068
|
+
__metadata("design:type", Boolean),
|
|
8069
|
+
__metadata("design:paramtypes", [])
|
|
8070
|
+
], MultiSelectComponent.prototype, "isLoading", null);
|
|
8071
|
+
__decorate([
|
|
8072
|
+
HostListener('mousedown', ['$event']),
|
|
8073
|
+
__metadata("design:type", Function),
|
|
8074
|
+
__metadata("design:paramtypes", [Object]),
|
|
8075
|
+
__metadata("design:returntype", void 0)
|
|
8076
|
+
], MultiSelectComponent.prototype, "hostMousedown", null);
|
|
7421
8077
|
MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
7422
8078
|
Component({
|
|
7423
8079
|
exportAs: 'kendoMultiSelect',
|
|
@@ -7449,24 +8105,22 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7449
8105
|
clearTitle="clear"
|
|
7450
8106
|
>
|
|
7451
8107
|
</ng-container>
|
|
7452
|
-
<
|
|
7453
|
-
|
|
7454
|
-
|
|
8108
|
+
<kendo-taglist
|
|
8109
|
+
[size]="size"
|
|
8110
|
+
[rounded]="rounded"
|
|
8111
|
+
[fillMode]="fillMode"
|
|
8112
|
+
[id]="tagListId"
|
|
8113
|
+
[tags]="tags"
|
|
8114
|
+
[textField]="textField"
|
|
8115
|
+
[valueField]="valueField"
|
|
8116
|
+
[focused]="focusedTagIndex"
|
|
8117
|
+
[disabled]="disabled"
|
|
8118
|
+
[template]="tagTemplate"
|
|
8119
|
+
[groupTemplate]="groupTagTemplate"
|
|
8120
|
+
[tagPrefix]="tagPrefix"
|
|
8121
|
+
[disabledIndices]="disabledIndices"
|
|
8122
|
+
(removeTag)="handleRemoveTag($event)"
|
|
7455
8123
|
>
|
|
7456
|
-
<kendo-taglist
|
|
7457
|
-
[id]="tagListId"
|
|
7458
|
-
[tags]="tags"
|
|
7459
|
-
[textField]="textField"
|
|
7460
|
-
[valueField]="valueField"
|
|
7461
|
-
[focused]="focusedTagIndex"
|
|
7462
|
-
[disabled]="disabled"
|
|
7463
|
-
[template]="tagTemplate"
|
|
7464
|
-
[groupTemplate]="groupTagTemplate"
|
|
7465
|
-
[tagPrefix]="tagPrefix"
|
|
7466
|
-
[disabledIndices]="disabledIndices"
|
|
7467
|
-
(removeTag)="handleRemoveTag($event)"
|
|
7468
|
-
>
|
|
7469
|
-
</kendo-taglist>
|
|
7470
8124
|
<kendo-searchbar
|
|
7471
8125
|
#searchbar
|
|
7472
8126
|
[id]="focusableId"
|
|
@@ -7486,22 +8140,24 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7486
8140
|
(onFocus)="onSearchBarFocus()"
|
|
7487
8141
|
>
|
|
7488
8142
|
</kendo-searchbar>
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
8143
|
+
</kendo-taglist>
|
|
8144
|
+
|
|
8145
|
+
<span
|
|
8146
|
+
*ngIf="!loading && !readonly && clearButton && (tags?.length || text?.length)"
|
|
8147
|
+
class="k-clear-value"
|
|
8148
|
+
[style.visibility]="clearButtonVisiblity"
|
|
8149
|
+
[attr.title]="clearTitle"
|
|
8150
|
+
role="button"
|
|
8151
|
+
tabindex="-1"
|
|
8152
|
+
(mousedown)="clearAll($event)"
|
|
8153
|
+
>
|
|
8154
|
+
<span class="k-icon k-i-x"></span>
|
|
8155
|
+
</span>
|
|
8156
|
+
<span
|
|
8157
|
+
*ngIf="loading"
|
|
8158
|
+
class="k-icon k-i-loading"
|
|
8159
|
+
>
|
|
8160
|
+
</span>
|
|
7505
8161
|
<ng-template #popupTemplate>
|
|
7506
8162
|
<!--header template-->
|
|
7507
8163
|
<ng-template *ngIf="headerTemplate"
|
|
@@ -7510,8 +8166,12 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7510
8166
|
}">
|
|
7511
8167
|
</ng-template>
|
|
7512
8168
|
<!--custom item template-->
|
|
7513
|
-
<div
|
|
7514
|
-
|
|
8169
|
+
<div
|
|
8170
|
+
*ngIf="allowCustom && text"
|
|
8171
|
+
class="k-list"
|
|
8172
|
+
[ngClass]="customItemSizeClass"
|
|
8173
|
+
>
|
|
8174
|
+
<div class="k-list-item k-custom-item" kendoDropDownsSelectable [multipleSelection]="true" [index]="-1">
|
|
7515
8175
|
<ng-template *ngIf="customItemTemplate;else default_custom_item_template"
|
|
7516
8176
|
[templateContext]="{
|
|
7517
8177
|
templateRef: customItemTemplate.templateRef,
|
|
@@ -7525,6 +8185,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7525
8185
|
<!--list-->
|
|
7526
8186
|
<kendo-list
|
|
7527
8187
|
#optionsList
|
|
8188
|
+
[size]="size"
|
|
8189
|
+
[rounded]="rounded"
|
|
7528
8190
|
[id]="listBoxId"
|
|
7529
8191
|
[optionPrefix]="optionPrefix"
|
|
7530
8192
|
[data]="data"
|
|
@@ -7542,7 +8204,7 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7542
8204
|
>
|
|
7543
8205
|
</kendo-list>
|
|
7544
8206
|
<!--no data template-->
|
|
7545
|
-
<div class="k-
|
|
8207
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
7546
8208
|
<ng-template [ngIf]="noDataTemplate"
|
|
7547
8209
|
[templateContext]="{
|
|
7548
8210
|
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
@@ -7566,7 +8228,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7566
8228
|
`
|
|
7567
8229
|
}),
|
|
7568
8230
|
__param(11, Optional()), __param(11, Inject(TOUCH_ENABLED)),
|
|
7569
|
-
__metadata("design:paramtypes", [
|
|
8231
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
8232
|
+
LocalizationService,
|
|
7570
8233
|
PopupService,
|
|
7571
8234
|
DataService,
|
|
7572
8235
|
SelectionService,
|
|
@@ -7575,7 +8238,6 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7575
8238
|
ChangeDetectorRef,
|
|
7576
8239
|
KeyValueDiffers,
|
|
7577
8240
|
Renderer2,
|
|
7578
|
-
ElementRef,
|
|
7579
8241
|
NgZone, Boolean])
|
|
7580
8242
|
], MultiSelectComponent);
|
|
7581
8243
|
|
|
@@ -7749,8 +8411,8 @@ var MultiColumnComboBoxComponent_1;
|
|
|
7749
8411
|
* Represents the [Kendo UI MultiColumnComboBox component for Angular]({% slug overview_multicolumncombobox %}).
|
|
7750
8412
|
*/
|
|
7751
8413
|
let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiColumnComboBoxComponent extends ComboBoxComponent {
|
|
7752
|
-
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
7753
|
-
super(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
8414
|
+
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, wrapper, touchEnabled$$1) {
|
|
8415
|
+
super(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, touchEnabled$$1);
|
|
7754
8416
|
/**
|
|
7755
8417
|
* @hidden
|
|
7756
8418
|
*/
|
|
@@ -7761,6 +8423,12 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7761
8423
|
// use a smaller virtual page size as columns with multiple cells can cause poor performance
|
|
7762
8424
|
this.defaultVirtualPageSize = 30;
|
|
7763
8425
|
}
|
|
8426
|
+
/**
|
|
8427
|
+
* @hidden
|
|
8428
|
+
*/
|
|
8429
|
+
get isDisabled() {
|
|
8430
|
+
return this.disabled;
|
|
8431
|
+
}
|
|
7764
8432
|
/**
|
|
7765
8433
|
* @hidden
|
|
7766
8434
|
*/
|
|
@@ -7775,18 +8443,19 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7775
8443
|
const max = isNaN(width) ? width : `${width}px`;
|
|
7776
8444
|
return { min, max };
|
|
7777
8445
|
}
|
|
8446
|
+
/**
|
|
8447
|
+
* @hidden
|
|
8448
|
+
*/
|
|
8449
|
+
get tableSizeClass() {
|
|
8450
|
+
return `${this.size ? getSizeClass('table', this.size) : ''}`;
|
|
8451
|
+
}
|
|
7778
8452
|
/**
|
|
7779
8453
|
* @hidden
|
|
7780
8454
|
*/
|
|
7781
8455
|
get listContainerClasses() {
|
|
7782
8456
|
return [
|
|
7783
|
-
'k-list-container',
|
|
7784
8457
|
'k-popup',
|
|
7785
|
-
'k-
|
|
7786
|
-
'k-group',
|
|
7787
|
-
'k-dropdowngrid-popup',
|
|
7788
|
-
'k-popup-flush',
|
|
7789
|
-
'k-state-border-up'
|
|
8458
|
+
'k-dropdowngrid-popup'
|
|
7790
8459
|
].concat(this.popupSettings.popupClass || []);
|
|
7791
8460
|
}
|
|
7792
8461
|
ngAfterViewInit() {
|
|
@@ -7862,6 +8531,11 @@ __decorate([
|
|
|
7862
8531
|
HostBinding('class.k-dropdowngrid'),
|
|
7863
8532
|
__metadata("design:type", Boolean)
|
|
7864
8533
|
], MultiColumnComboBoxComponent.prototype, "hostClasses", void 0);
|
|
8534
|
+
__decorate([
|
|
8535
|
+
HostBinding('class.k-disabled'),
|
|
8536
|
+
__metadata("design:type", Boolean),
|
|
8537
|
+
__metadata("design:paramtypes", [])
|
|
8538
|
+
], MultiColumnComboBoxComponent.prototype, "isDisabled", null);
|
|
7865
8539
|
__decorate([
|
|
7866
8540
|
ContentChildren(ComboBoxColumnComponent),
|
|
7867
8541
|
__metadata("design:type", QueryList)
|
|
@@ -7909,63 +8583,56 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7909
8583
|
clearTitle="clear"
|
|
7910
8584
|
>
|
|
7911
8585
|
</ng-container>
|
|
7912
|
-
<
|
|
7913
|
-
#
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
[
|
|
8586
|
+
<kendo-searchbar
|
|
8587
|
+
#searchbar
|
|
8588
|
+
[role]="'combobox'"
|
|
8589
|
+
[id]="focusableId"
|
|
8590
|
+
[listId]="listBoxId"
|
|
8591
|
+
[activeDescendant]="activeDescendant"
|
|
8592
|
+
[noDataLabel]="noDataLabel"
|
|
8593
|
+
[userInput]="text"
|
|
8594
|
+
[suggestedText]="getSuggestion()"
|
|
8595
|
+
[disabled]="disabled"
|
|
8596
|
+
[readonly]="readonly"
|
|
8597
|
+
[tabIndex]="tabIndex"
|
|
8598
|
+
[popupOpen]="isOpen"
|
|
8599
|
+
[placeholder]="placeholder"
|
|
8600
|
+
(onNavigate)="handleNavigate($event)"
|
|
8601
|
+
(valueChange)="searchBarChange($event)"
|
|
8602
|
+
(onBlur)="handleBlur()"
|
|
8603
|
+
(onFocus)="handleFocus()"
|
|
7917
8604
|
>
|
|
7918
|
-
|
|
7919
|
-
#searchbar
|
|
7920
|
-
[role]="'combobox'"
|
|
7921
|
-
[id]="focusableId"
|
|
7922
|
-
[listId]="listBoxId"
|
|
7923
|
-
[activeDescendant]="activeDescendant"
|
|
7924
|
-
[noDataLabel]="noDataLabel"
|
|
7925
|
-
[userInput]="text"
|
|
7926
|
-
[suggestedText]="getSuggestion()"
|
|
7927
|
-
[disabled]="disabled"
|
|
7928
|
-
[readonly]="readonly"
|
|
7929
|
-
[tabIndex]="tabIndex"
|
|
7930
|
-
[popupOpen]="isOpen"
|
|
7931
|
-
[placeholder]="placeholder"
|
|
7932
|
-
(onNavigate)="handleNavigate($event)"
|
|
7933
|
-
(valueChange)="searchBarChange($event)"
|
|
7934
|
-
(onBlur)="handleBlur()"
|
|
7935
|
-
(onFocus)="handleFocus()"
|
|
7936
|
-
>
|
|
7937
|
-
</kendo-searchbar>
|
|
7938
|
-
|
|
7939
|
-
<span
|
|
7940
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
7941
|
-
class="k-icon k-clear-value k-i-close"
|
|
7942
|
-
[style.visibility]="clearButtonVisiblity"
|
|
7943
|
-
aria-hidden="true"
|
|
7944
|
-
[attr.title]="clearTitle"
|
|
7945
|
-
(click)="clearValue($event)"
|
|
7946
|
-
[kendoEventsOutsideAngular]="{
|
|
7947
|
-
mousedown: preventEventDefault
|
|
7948
|
-
}"
|
|
7949
|
-
>
|
|
7950
|
-
</span>
|
|
8605
|
+
</kendo-searchbar>
|
|
7951
8606
|
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
>
|
|
7965
|
-
</span>
|
|
7966
|
-
</span>
|
|
8607
|
+
<span
|
|
8608
|
+
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
8609
|
+
class="k-clear-value"
|
|
8610
|
+
[style.visibility]="clearButtonVisiblity"
|
|
8611
|
+
aria-hidden="true"
|
|
8612
|
+
[attr.title]="clearTitle"
|
|
8613
|
+
(click)="clearValue($event)"
|
|
8614
|
+
[kendoEventsOutsideAngular]="{
|
|
8615
|
+
mousedown: preventEventDefault
|
|
8616
|
+
}"
|
|
8617
|
+
>
|
|
8618
|
+
<span class="k-icon k-i-x"></span>
|
|
7967
8619
|
</span>
|
|
7968
8620
|
|
|
8621
|
+
<button
|
|
8622
|
+
#select
|
|
8623
|
+
tabindex="-1"
|
|
8624
|
+
aria-hidden="true"
|
|
8625
|
+
unselectable="on"
|
|
8626
|
+
type="button"
|
|
8627
|
+
class="k-input-button k-button k-icon-button"
|
|
8628
|
+
[ngClass]="selectButtonClasses"
|
|
8629
|
+
[kendoEventsOutsideAngular]="{
|
|
8630
|
+
mousedown: preventEventDefault
|
|
8631
|
+
}"
|
|
8632
|
+
>
|
|
8633
|
+
<span class="k-button-icon k-icon" [ngClass]="buttonClasses"></span>
|
|
8634
|
+
</button>
|
|
8635
|
+
|
|
7969
8636
|
<ng-template #popupTemplate>
|
|
7970
8637
|
<!--user-defined header template -->
|
|
7971
8638
|
<ng-template
|
|
@@ -7976,125 +8643,139 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7976
8643
|
>
|
|
7977
8644
|
</ng-template>
|
|
7978
8645
|
|
|
7979
|
-
<!--
|
|
7980
|
-
<div
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
[style.width.px]="column.width"
|
|
7991
|
-
/>
|
|
7992
|
-
</ng-container>
|
|
7993
|
-
</colgroup>
|
|
7994
|
-
<tbody>
|
|
7995
|
-
<tr>
|
|
8646
|
+
<!--data table-->
|
|
8647
|
+
<div class="k-data-table" [ngClass]="tableSizeClass">
|
|
8648
|
+
|
|
8649
|
+
<!--grid header-->
|
|
8650
|
+
<div
|
|
8651
|
+
#header
|
|
8652
|
+
class="k-table-header"
|
|
8653
|
+
>
|
|
8654
|
+
<div class="k-table-header-wrap">
|
|
8655
|
+
<table class="k-table" role="presentation">
|
|
8656
|
+
<colgroup>
|
|
7996
8657
|
<ng-container *ngFor="let column of columns">
|
|
7997
|
-
<
|
|
8658
|
+
<col
|
|
7998
8659
|
*ngIf="!column.hidden && column.matchesMedia"
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
[ngClass]="column.headerClass"
|
|
8002
|
-
>
|
|
8003
|
-
<ng-container *ngIf="!column.headerTemplate">
|
|
8004
|
-
{{ column.title || column.field }}
|
|
8005
|
-
</ng-container>
|
|
8006
|
-
<ng-template
|
|
8007
|
-
*ngIf="column.headerTemplate"
|
|
8008
|
-
[templateContext]="{
|
|
8009
|
-
templateRef: column.headerTemplate?.templateRef,
|
|
8010
|
-
$implicit: column,
|
|
8011
|
-
column: column
|
|
8012
|
-
}"
|
|
8013
|
-
>
|
|
8014
|
-
</ng-template>
|
|
8015
|
-
</th>
|
|
8660
|
+
[style.width.px]="column.width"
|
|
8661
|
+
/>
|
|
8016
8662
|
</ng-container>
|
|
8017
|
-
</
|
|
8018
|
-
|
|
8019
|
-
|
|
8663
|
+
</colgroup>
|
|
8664
|
+
<thead class="k-table-thead">
|
|
8665
|
+
<tr class="k-table-row">
|
|
8666
|
+
<ng-container *ngFor="let column of columns">
|
|
8667
|
+
<th
|
|
8668
|
+
*ngIf="!column.hidden && column.matchesMedia"
|
|
8669
|
+
class="k-table-th"
|
|
8670
|
+
[ngStyle]="column.headerStyle"
|
|
8671
|
+
[ngClass]="column.headerClass"
|
|
8672
|
+
>
|
|
8673
|
+
<ng-container *ngIf="!column.headerTemplate">
|
|
8674
|
+
{{ column.title || column.field }}
|
|
8675
|
+
</ng-container>
|
|
8676
|
+
<ng-template
|
|
8677
|
+
*ngIf="column.headerTemplate"
|
|
8678
|
+
[templateContext]="{
|
|
8679
|
+
templateRef: column.headerTemplate?.templateRef,
|
|
8680
|
+
$implicit: column,
|
|
8681
|
+
column: column
|
|
8682
|
+
}"
|
|
8683
|
+
>
|
|
8684
|
+
</ng-template>
|
|
8685
|
+
</th>
|
|
8686
|
+
</ng-container>
|
|
8687
|
+
</tr>
|
|
8688
|
+
</thead>
|
|
8689
|
+
</table>
|
|
8690
|
+
</div>
|
|
8020
8691
|
</div>
|
|
8021
|
-
</div>
|
|
8022
8692
|
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
>
|
|
8033
|
-
<ng-container *ngIf="!column.cellTemplate">
|
|
8034
|
-
{{ textFrom(dataItem, column.field) }}
|
|
8035
|
-
</ng-container>
|
|
8036
|
-
<ng-template
|
|
8037
|
-
*ngIf="column.cellTemplate"
|
|
8038
|
-
[templateContext]="{
|
|
8039
|
-
templateRef: column.cellTemplate?.templateRef,
|
|
8040
|
-
$implicit: dataItem,
|
|
8041
|
-
dataItem: dataItem,
|
|
8042
|
-
column: column
|
|
8043
|
-
}"
|
|
8693
|
+
<!-- item template -->
|
|
8694
|
+
<ng-template #rowTemplate let-dataItem>
|
|
8695
|
+
<ng-container *ngFor="let column of columns">
|
|
8696
|
+
<span
|
|
8697
|
+
*ngIf="!column.hidden && column.matchesMedia"
|
|
8698
|
+
class="k-table-td"
|
|
8699
|
+
[ngClass]="column.class"
|
|
8700
|
+
[style.width.px]="column.width"
|
|
8701
|
+
[ngStyle]="column.style"
|
|
8044
8702
|
>
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
[height]="listHeight"
|
|
8062
|
-
[show]="isOpen"
|
|
8063
|
-
[virtual]="virtual"
|
|
8064
|
-
[listClass]="'k-reset k-grid-list'"
|
|
8065
|
-
(pageChange)="pageChange($event)"
|
|
8066
|
-
(listResize)="updateHeaderPadding(header)"
|
|
8067
|
-
>
|
|
8068
|
-
</kendo-list>
|
|
8703
|
+
<ng-container *ngIf="!column.cellTemplate">
|
|
8704
|
+
{{ textFrom(dataItem, column.field) }}
|
|
8705
|
+
</ng-container>
|
|
8706
|
+
<ng-template
|
|
8707
|
+
*ngIf="column.cellTemplate"
|
|
8708
|
+
[templateContext]="{
|
|
8709
|
+
templateRef: column.cellTemplate?.templateRef,
|
|
8710
|
+
$implicit: dataItem,
|
|
8711
|
+
dataItem: dataItem,
|
|
8712
|
+
column: column
|
|
8713
|
+
}"
|
|
8714
|
+
>
|
|
8715
|
+
</ng-template>
|
|
8716
|
+
</span>
|
|
8717
|
+
</ng-container>
|
|
8718
|
+
</ng-template>
|
|
8069
8719
|
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
[
|
|
8077
|
-
[
|
|
8078
|
-
|
|
8079
|
-
|
|
8720
|
+
<!--list-->
|
|
8721
|
+
<kendo-list
|
|
8722
|
+
#optionsList
|
|
8723
|
+
[id]="listBoxId"
|
|
8724
|
+
[optionPrefix]="optionPrefix"
|
|
8725
|
+
[data]="data"
|
|
8726
|
+
[textField]="textField"
|
|
8727
|
+
[valueField]="valueField"
|
|
8728
|
+
[template]="{ templateRef: rowTemplate }"
|
|
8729
|
+
[groupTemplate]="groupTemplate"
|
|
8730
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
8731
|
+
[height]="listHeight"
|
|
8732
|
+
[show]="isOpen"
|
|
8733
|
+
[virtual]="virtual"
|
|
8734
|
+
[type]="'dropdowngrid'"
|
|
8735
|
+
(pageChange)="pageChange($event)"
|
|
8736
|
+
(listResize)="updateHeaderPadding(header)"
|
|
8080
8737
|
>
|
|
8081
|
-
</
|
|
8082
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
8083
|
-
<div>{{ noDataText }}</div>
|
|
8084
|
-
</ng-template>
|
|
8085
|
-
</div>
|
|
8738
|
+
</kendo-list>
|
|
8086
8739
|
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8740
|
+
<!--no-data template-->
|
|
8741
|
+
<div
|
|
8742
|
+
class="k-no-data"
|
|
8743
|
+
*ngIf="data.length === 0"
|
|
8744
|
+
>
|
|
8090
8745
|
<ng-template
|
|
8746
|
+
[ngIf]="noDataTemplate"
|
|
8091
8747
|
[templateContext]="{
|
|
8092
|
-
templateRef:
|
|
8748
|
+
templateRef: noDataTemplate?.templateRef
|
|
8093
8749
|
}"
|
|
8094
8750
|
>
|
|
8095
8751
|
</ng-template>
|
|
8752
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
8753
|
+
<div>{{ noDataText }}</div>
|
|
8754
|
+
</ng-template>
|
|
8096
8755
|
</div>
|
|
8097
|
-
|
|
8756
|
+
|
|
8757
|
+
<!--user-defined footer template-->
|
|
8758
|
+
<ng-container *ngIf="footerTemplate">
|
|
8759
|
+
<div class="k-table-footer">
|
|
8760
|
+
<table class="k-table">
|
|
8761
|
+
<tfoot class="k-table-tfoot">
|
|
8762
|
+
<tr class="k-table-row">
|
|
8763
|
+
<td class="k-table-td">
|
|
8764
|
+
<ng-template
|
|
8765
|
+
[templateContext]="{
|
|
8766
|
+
templateRef: footerTemplate.templateRef
|
|
8767
|
+
}"
|
|
8768
|
+
>
|
|
8769
|
+
</ng-template>
|
|
8770
|
+
</td>
|
|
8771
|
+
</tr>
|
|
8772
|
+
</tfoot>
|
|
8773
|
+
</table>
|
|
8774
|
+
</div>
|
|
8775
|
+
</ng-container>
|
|
8776
|
+
|
|
8777
|
+
</div>
|
|
8778
|
+
|
|
8098
8779
|
</ng-template>
|
|
8099
8780
|
|
|
8100
8781
|
<kendo-resize-sensor
|
|
@@ -8152,16 +8833,18 @@ const isNodeVisible = () => true;
|
|
|
8152
8833
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
8153
8834
|
*/
|
|
8154
8835
|
let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponent {
|
|
8155
|
-
constructor(popupService, navigationService, renderer,
|
|
8836
|
+
constructor(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled$$1) {
|
|
8837
|
+
this.wrapper = wrapper;
|
|
8156
8838
|
this.popupService = popupService;
|
|
8157
8839
|
this.navigationService = navigationService;
|
|
8158
8840
|
this.renderer = renderer;
|
|
8159
|
-
this.hostElement = hostElement;
|
|
8160
8841
|
this._zone = _zone;
|
|
8161
8842
|
this.cdr = cdr;
|
|
8162
8843
|
this.localization = localization;
|
|
8163
8844
|
this.touchEnabled = touchEnabled$$1;
|
|
8164
8845
|
this.hostClasses = true;
|
|
8846
|
+
this.role = 'listbox';
|
|
8847
|
+
this.ariaHasPopup = 'tree';
|
|
8165
8848
|
/**
|
|
8166
8849
|
* Fires each time the popup is about to open
|
|
8167
8850
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -8296,15 +8979,52 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8296
8979
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
8297
8980
|
this._tabindex = 0;
|
|
8298
8981
|
this._isFocused = false;
|
|
8982
|
+
this._size = 'medium';
|
|
8983
|
+
this._rounded = 'medium';
|
|
8984
|
+
this._fillMode = 'solid';
|
|
8299
8985
|
this.subscriptions = [];
|
|
8300
8986
|
this.onTouchedCallback = noop;
|
|
8301
8987
|
this.onChangeCallback = noop;
|
|
8302
8988
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
8303
8989
|
this.subscribeEvents();
|
|
8304
8990
|
this.subscribeTouchEvents();
|
|
8991
|
+
this.subscribeFocusEvents();
|
|
8992
|
+
}
|
|
8993
|
+
get isDisabled() {
|
|
8994
|
+
return this.disabled;
|
|
8995
|
+
}
|
|
8996
|
+
get isLoading() {
|
|
8997
|
+
return this.loading;
|
|
8305
8998
|
}
|
|
8306
|
-
get
|
|
8307
|
-
return this.
|
|
8999
|
+
get id() {
|
|
9000
|
+
return this.focusableId;
|
|
9001
|
+
}
|
|
9002
|
+
get hostTabIndex() {
|
|
9003
|
+
return this.tabindex;
|
|
9004
|
+
}
|
|
9005
|
+
get isAriaExpanded() {
|
|
9006
|
+
return this.isOpen;
|
|
9007
|
+
}
|
|
9008
|
+
get isReadonly() {
|
|
9009
|
+
return this.readonly;
|
|
9010
|
+
}
|
|
9011
|
+
/**
|
|
9012
|
+
* @hidden
|
|
9013
|
+
*/
|
|
9014
|
+
handleClick() {
|
|
9015
|
+
this.togglePopup(!this.isOpen);
|
|
9016
|
+
}
|
|
9017
|
+
/**
|
|
9018
|
+
* @hidden
|
|
9019
|
+
*/
|
|
9020
|
+
handleKeydown(event) {
|
|
9021
|
+
if (this.disabled || this.readonly) {
|
|
9022
|
+
return;
|
|
9023
|
+
}
|
|
9024
|
+
const eventData = event;
|
|
9025
|
+
this.navigationService.process({
|
|
9026
|
+
originalEvent: eventData
|
|
9027
|
+
});
|
|
8308
9028
|
}
|
|
8309
9029
|
set treeview(treeview) {
|
|
8310
9030
|
if (treeview) {
|
|
@@ -8383,8 +9103,69 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8383
9103
|
get tabindex() {
|
|
8384
9104
|
return this.disabled ? -1 : this._tabindex;
|
|
8385
9105
|
}
|
|
9106
|
+
/**
|
|
9107
|
+
* Sets the size of the component.
|
|
9108
|
+
*
|
|
9109
|
+
* The possible values are:
|
|
9110
|
+
* * `'small'`
|
|
9111
|
+
* * `'medium'` (default)
|
|
9112
|
+
* * `'large'`
|
|
9113
|
+
* * `null`
|
|
9114
|
+
*
|
|
9115
|
+
*/
|
|
9116
|
+
set size(size) {
|
|
9117
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9118
|
+
if (size) {
|
|
9119
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
9120
|
+
}
|
|
9121
|
+
this._size = size;
|
|
9122
|
+
}
|
|
9123
|
+
get size() {
|
|
9124
|
+
return this._size;
|
|
9125
|
+
}
|
|
9126
|
+
/**
|
|
9127
|
+
* Sets the border radius of the component.
|
|
9128
|
+
*
|
|
9129
|
+
* The possible values are:
|
|
9130
|
+
* * `'small'`
|
|
9131
|
+
* * `'medium'` (default)
|
|
9132
|
+
* * `'large'`
|
|
9133
|
+
* * `'full'`
|
|
9134
|
+
* * `null`
|
|
9135
|
+
*
|
|
9136
|
+
*/
|
|
9137
|
+
set rounded(rounded) {
|
|
9138
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9139
|
+
if (rounded) {
|
|
9140
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
9141
|
+
}
|
|
9142
|
+
this._rounded = rounded;
|
|
9143
|
+
}
|
|
9144
|
+
get rounded() {
|
|
9145
|
+
return this._rounded;
|
|
9146
|
+
}
|
|
9147
|
+
/**
|
|
9148
|
+
* Sets the fillMode of the component.
|
|
9149
|
+
*
|
|
9150
|
+
* The possible values are:
|
|
9151
|
+
* * `'flat'`
|
|
9152
|
+
* * `'solid'` (default)
|
|
9153
|
+
* * `'outline'`
|
|
9154
|
+
* * `null`
|
|
9155
|
+
*
|
|
9156
|
+
*/
|
|
9157
|
+
set fillMode(fillMode) {
|
|
9158
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9159
|
+
if (fillMode) {
|
|
9160
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
9161
|
+
}
|
|
9162
|
+
this._fillMode = fillMode;
|
|
9163
|
+
}
|
|
9164
|
+
get fillMode() {
|
|
9165
|
+
return this._fillMode;
|
|
9166
|
+
}
|
|
8386
9167
|
set isFocused(isFocused) {
|
|
8387
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
9168
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
8388
9169
|
this._isFocused = isFocused;
|
|
8389
9170
|
}
|
|
8390
9171
|
get isFocused() {
|
|
@@ -8479,13 +9260,14 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8479
9260
|
return this.isNodeVisible;
|
|
8480
9261
|
}
|
|
8481
9262
|
ngOnInit() {
|
|
8482
|
-
this.renderer.removeAttribute(this.
|
|
9263
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8483
9264
|
this.assignAriaDescribedBy();
|
|
8484
9265
|
this.subscriptions.push(this.localization
|
|
8485
9266
|
.changes.subscribe(({ rtl }) => {
|
|
8486
9267
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8487
9268
|
this.cdr.markForCheck();
|
|
8488
9269
|
}));
|
|
9270
|
+
this.setComponentClasses();
|
|
8489
9271
|
}
|
|
8490
9272
|
/**
|
|
8491
9273
|
* @hidden
|
|
@@ -8536,7 +9318,11 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8536
9318
|
/**
|
|
8537
9319
|
* @hidden
|
|
8538
9320
|
*/
|
|
8539
|
-
handleFocus() {
|
|
9321
|
+
handleFocus(event) {
|
|
9322
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9323
|
+
return;
|
|
9324
|
+
}
|
|
9325
|
+
event.stopImmediatePropagation();
|
|
8540
9326
|
if (!this.isFocused) {
|
|
8541
9327
|
this.isFocused = true;
|
|
8542
9328
|
if (hasObservers(this.onFocus)) {
|
|
@@ -8551,13 +9337,13 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8551
9337
|
*/
|
|
8552
9338
|
handleBlur(e) {
|
|
8553
9339
|
const relatedTarget = e && e.relatedTarget;
|
|
8554
|
-
if (this.
|
|
9340
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
8555
9341
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
8556
9342
|
return;
|
|
8557
9343
|
}
|
|
8558
9344
|
this.isFocused = false;
|
|
8559
9345
|
if (hasObservers(this.onBlur) ||
|
|
8560
|
-
isUntouched(this.
|
|
9346
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
8561
9347
|
this._zone.run(() => {
|
|
8562
9348
|
this.togglePopup(false);
|
|
8563
9349
|
this.onBlur.emit();
|
|
@@ -8568,24 +9354,6 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8568
9354
|
this.togglePopup(false);
|
|
8569
9355
|
}
|
|
8570
9356
|
}
|
|
8571
|
-
/**
|
|
8572
|
-
* @hidden
|
|
8573
|
-
*/
|
|
8574
|
-
handleKeydown(event) {
|
|
8575
|
-
if (this.disabled || this.readonly) {
|
|
8576
|
-
return;
|
|
8577
|
-
}
|
|
8578
|
-
const eventData = event;
|
|
8579
|
-
this.navigationService.process({
|
|
8580
|
-
originalEvent: eventData
|
|
8581
|
-
});
|
|
8582
|
-
}
|
|
8583
|
-
/**
|
|
8584
|
-
* @hidden
|
|
8585
|
-
*/
|
|
8586
|
-
handleClick() {
|
|
8587
|
-
this.togglePopup(!this.isOpen);
|
|
8588
|
-
}
|
|
8589
9357
|
/**
|
|
8590
9358
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
8591
9359
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -8647,7 +9415,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8647
9415
|
* @hidden
|
|
8648
9416
|
*/
|
|
8649
9417
|
get popupContainerClasses() {
|
|
8650
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
9418
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
8651
9419
|
if (this.popupSettings.popupClass) {
|
|
8652
9420
|
containerClasses.push(this.popupSettings.popupClass);
|
|
8653
9421
|
}
|
|
@@ -8747,6 +9515,18 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8747
9515
|
get buttonClasses() {
|
|
8748
9516
|
return this.loading ? 'k-i-loading' : 'k-i-arrow-s';
|
|
8749
9517
|
}
|
|
9518
|
+
/**
|
|
9519
|
+
* @hidden
|
|
9520
|
+
*/
|
|
9521
|
+
get selectButtonClasses() {
|
|
9522
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
|
|
9523
|
+
}
|
|
9524
|
+
/**
|
|
9525
|
+
* @hidden
|
|
9526
|
+
*/
|
|
9527
|
+
get filterInputClasses() {
|
|
9528
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
9529
|
+
}
|
|
8750
9530
|
verifySettings() {
|
|
8751
9531
|
if (!isDevMode()) {
|
|
8752
9532
|
return;
|
|
@@ -8906,7 +9686,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8906
9686
|
// Roll up DropDownTree on iOS when tapped outside
|
|
8907
9687
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
8908
9688
|
const target = e.target;
|
|
8909
|
-
if (this.isFocused && !inDropDown(this.
|
|
9689
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
8910
9690
|
this._zone.run(() => {
|
|
8911
9691
|
if (this.isOpen) {
|
|
8912
9692
|
this.treeview.blur();
|
|
@@ -8916,34 +9696,117 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8916
9696
|
}
|
|
8917
9697
|
}));
|
|
8918
9698
|
}
|
|
9699
|
+
subscribeFocusEvents() {
|
|
9700
|
+
if (isDocumentAvailable()) {
|
|
9701
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
9702
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
9703
|
+
this._zone.runOutsideAngular(() => {
|
|
9704
|
+
const useCapture = true;
|
|
9705
|
+
document.addEventListener('focus', this.handleFocus, useCapture);
|
|
9706
|
+
document.addEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9707
|
+
});
|
|
9708
|
+
}
|
|
9709
|
+
}
|
|
9710
|
+
unSubscribeFocusEvents() {
|
|
9711
|
+
if (isDocumentAvailable()) {
|
|
9712
|
+
const useCapture = true;
|
|
9713
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
9714
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9715
|
+
}
|
|
9716
|
+
}
|
|
8919
9717
|
unsubscribeEvents() {
|
|
8920
9718
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
9719
|
+
this.unSubscribeFocusEvents();
|
|
8921
9720
|
if (this.touchstartDisposeHandler) {
|
|
8922
9721
|
this.touchstartDisposeHandler();
|
|
8923
9722
|
}
|
|
8924
9723
|
}
|
|
9724
|
+
handleDocumentBlur(event) {
|
|
9725
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9726
|
+
return;
|
|
9727
|
+
}
|
|
9728
|
+
event.stopImmediatePropagation();
|
|
9729
|
+
this.handleBlur(event);
|
|
9730
|
+
}
|
|
8925
9731
|
assignAriaDescribedBy() {
|
|
8926
9732
|
const currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
8927
9733
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
8928
9734
|
const newValue = `${this.valueLabelId} ${currentValue.trim()}`.trim();
|
|
8929
9735
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
8930
9736
|
}
|
|
9737
|
+
setComponentClasses() {
|
|
9738
|
+
if (this.size) {
|
|
9739
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9740
|
+
}
|
|
9741
|
+
if (this.rounded) {
|
|
9742
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9743
|
+
}
|
|
9744
|
+
if (this.fillMode) {
|
|
9745
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9746
|
+
}
|
|
9747
|
+
}
|
|
8931
9748
|
};
|
|
8932
9749
|
__decorate([
|
|
8933
|
-
HostBinding('class.k-widget'),
|
|
8934
9750
|
HostBinding('class.k-dropdowntree'),
|
|
8935
|
-
HostBinding('class.k-
|
|
9751
|
+
HostBinding('class.k-picker'),
|
|
8936
9752
|
__metadata("design:type", Boolean)
|
|
8937
9753
|
], DropDownTreeComponent.prototype, "hostClasses", void 0);
|
|
9754
|
+
__decorate([
|
|
9755
|
+
HostBinding('class.k-disabled'),
|
|
9756
|
+
HostBinding('attr.aria-disabled'),
|
|
9757
|
+
__metadata("design:type", Boolean),
|
|
9758
|
+
__metadata("design:paramtypes", [])
|
|
9759
|
+
], DropDownTreeComponent.prototype, "isDisabled", null);
|
|
9760
|
+
__decorate([
|
|
9761
|
+
HostBinding('class.k-loading'),
|
|
9762
|
+
__metadata("design:type", Boolean),
|
|
9763
|
+
__metadata("design:paramtypes", [])
|
|
9764
|
+
], DropDownTreeComponent.prototype, "isLoading", null);
|
|
9765
|
+
__decorate([
|
|
9766
|
+
HostBinding('attr.id'),
|
|
9767
|
+
__metadata("design:type", String),
|
|
9768
|
+
__metadata("design:paramtypes", [])
|
|
9769
|
+
], DropDownTreeComponent.prototype, "id", null);
|
|
8938
9770
|
__decorate([
|
|
8939
9771
|
HostBinding('attr.dir'),
|
|
8940
9772
|
__metadata("design:type", String)
|
|
8941
9773
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
8942
9774
|
__decorate([
|
|
8943
|
-
HostBinding('
|
|
9775
|
+
HostBinding('attr.tabindex'),
|
|
9776
|
+
__metadata("design:type", Number),
|
|
9777
|
+
__metadata("design:paramtypes", [])
|
|
9778
|
+
], DropDownTreeComponent.prototype, "hostTabIndex", null);
|
|
9779
|
+
__decorate([
|
|
9780
|
+
HostBinding('attr.role'),
|
|
9781
|
+
__metadata("design:type", String)
|
|
9782
|
+
], DropDownTreeComponent.prototype, "role", void 0);
|
|
9783
|
+
__decorate([
|
|
9784
|
+
HostBinding('attr.aria-haspopup'),
|
|
9785
|
+
__metadata("design:type", String)
|
|
9786
|
+
], DropDownTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
9787
|
+
__decorate([
|
|
9788
|
+
HostBinding('attr.aria-expanded'),
|
|
9789
|
+
__metadata("design:type", Boolean),
|
|
9790
|
+
__metadata("design:paramtypes", [])
|
|
9791
|
+
], DropDownTreeComponent.prototype, "isAriaExpanded", null);
|
|
9792
|
+
__decorate([
|
|
9793
|
+
HostBinding('attr.readonly'),
|
|
9794
|
+
HostBinding('attr.aria-readonly'),
|
|
8944
9795
|
__metadata("design:type", Boolean),
|
|
8945
9796
|
__metadata("design:paramtypes", [])
|
|
8946
|
-
], DropDownTreeComponent.prototype, "
|
|
9797
|
+
], DropDownTreeComponent.prototype, "isReadonly", null);
|
|
9798
|
+
__decorate([
|
|
9799
|
+
HostListener('click'),
|
|
9800
|
+
__metadata("design:type", Function),
|
|
9801
|
+
__metadata("design:paramtypes", []),
|
|
9802
|
+
__metadata("design:returntype", void 0)
|
|
9803
|
+
], DropDownTreeComponent.prototype, "handleClick", null);
|
|
9804
|
+
__decorate([
|
|
9805
|
+
HostListener('keydown', ['$event']),
|
|
9806
|
+
__metadata("design:type", Function),
|
|
9807
|
+
__metadata("design:paramtypes", [Object]),
|
|
9808
|
+
__metadata("design:returntype", void 0)
|
|
9809
|
+
], DropDownTreeComponent.prototype, "handleKeydown", null);
|
|
8947
9810
|
__decorate([
|
|
8948
9811
|
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
8949
9812
|
__metadata("design:type", NoDataTemplateDirective)
|
|
@@ -8968,10 +9831,6 @@ __decorate([
|
|
|
8968
9831
|
ViewChild('popupTemplate', { static: true }),
|
|
8969
9832
|
__metadata("design:type", TemplateRef)
|
|
8970
9833
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
8971
|
-
__decorate([
|
|
8972
|
-
ViewChild('wrapper', { static: true }),
|
|
8973
|
-
__metadata("design:type", ElementRef)
|
|
8974
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
8975
9834
|
__decorate([
|
|
8976
9835
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
8977
9836
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -9098,6 +9957,21 @@ __decorate([
|
|
|
9098
9957
|
__metadata("design:type", Number),
|
|
9099
9958
|
__metadata("design:paramtypes", [Number])
|
|
9100
9959
|
], DropDownTreeComponent.prototype, "tabindex", null);
|
|
9960
|
+
__decorate([
|
|
9961
|
+
Input(),
|
|
9962
|
+
__metadata("design:type", String),
|
|
9963
|
+
__metadata("design:paramtypes", [String])
|
|
9964
|
+
], DropDownTreeComponent.prototype, "size", null);
|
|
9965
|
+
__decorate([
|
|
9966
|
+
Input(),
|
|
9967
|
+
__metadata("design:type", String),
|
|
9968
|
+
__metadata("design:paramtypes", [String])
|
|
9969
|
+
], DropDownTreeComponent.prototype, "rounded", null);
|
|
9970
|
+
__decorate([
|
|
9971
|
+
Input(),
|
|
9972
|
+
__metadata("design:type", String),
|
|
9973
|
+
__metadata("design:paramtypes", [String])
|
|
9974
|
+
], DropDownTreeComponent.prototype, "fillMode", null);
|
|
9101
9975
|
__decorate([
|
|
9102
9976
|
Input(),
|
|
9103
9977
|
__metadata("design:type", Function)
|
|
@@ -9168,30 +10042,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9168
10042
|
>
|
|
9169
10043
|
</ng-container>
|
|
9170
10044
|
<span
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
'k-dropdown-wrap': true,
|
|
9174
|
-
'k-state-disabled': this.disabled
|
|
9175
|
-
}"
|
|
9176
|
-
[attr.id]="focusableId"
|
|
9177
|
-
role="listbox"
|
|
9178
|
-
aria-haspopup="tree"
|
|
9179
|
-
[attr.aria-expanded]="isOpen"
|
|
9180
|
-
[attr.aria-readonly]="readonly"
|
|
9181
|
-
[attr.tabindex]="tabindex"
|
|
9182
|
-
[attr.dir]="direction"
|
|
9183
|
-
(click)="handleClick()"
|
|
9184
|
-
(keydown)="handleKeydown($event)"
|
|
9185
|
-
[kendoEventsOutsideAngular]="{
|
|
9186
|
-
focus: handleFocus,
|
|
9187
|
-
blur: handleBlur
|
|
9188
|
-
}"
|
|
9189
|
-
[scope]="this"
|
|
10045
|
+
[attr.id]="valueLabelId"
|
|
10046
|
+
class="k-input-inner"
|
|
9190
10047
|
>
|
|
9191
|
-
<span
|
|
9192
|
-
[attr.id]="valueLabelId"
|
|
9193
|
-
class="k-input"
|
|
9194
|
-
>
|
|
10048
|
+
<span class="k-input-value-text">
|
|
9195
10049
|
<ng-template *ngIf="valueTemplate"
|
|
9196
10050
|
[templateContext]="{
|
|
9197
10051
|
templateRef: valueTemplate.templateRef,
|
|
@@ -9200,47 +10054,61 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9200
10054
|
</ng-template>
|
|
9201
10055
|
<ng-template [ngIf]="!valueTemplate"> {{ text || placeholder }} </ng-template>
|
|
9202
10056
|
</span>
|
|
9203
|
-
<span
|
|
9204
|
-
*ngIf="!loading && !readonly && clearButton && text?.length && !disabled"
|
|
9205
|
-
class="k-icon k-clear-value k-i-close"
|
|
9206
|
-
[style.visibility]="clearButtonVisiblity"
|
|
9207
|
-
aria-hidden="true"
|
|
9208
|
-
[attr.title]="messageFor('clearTitle')"
|
|
9209
|
-
(click)="clearValue($event)"
|
|
9210
|
-
>
|
|
9211
|
-
</span>
|
|
9212
|
-
<span class="k-select" aria-hidden="true">
|
|
9213
|
-
<span
|
|
9214
|
-
class="k-icon k-i-arrow-60-down"
|
|
9215
|
-
[ngClass]="buttonClasses"
|
|
9216
|
-
></span>
|
|
9217
|
-
</span>
|
|
9218
10057
|
</span>
|
|
10058
|
+
<span
|
|
10059
|
+
*ngIf="!loading && !readonly && clearButton && text?.length && !disabled"
|
|
10060
|
+
class="k-clear-value"
|
|
10061
|
+
[style.visibility]="clearButtonVisiblity"
|
|
10062
|
+
aria-hidden="true"
|
|
10063
|
+
[attr.title]="messageFor('clearTitle')"
|
|
10064
|
+
(click)="clearValue($event)"
|
|
10065
|
+
>
|
|
10066
|
+
<span class="k-icon k-i-x"></span>
|
|
10067
|
+
</span>
|
|
10068
|
+
<button
|
|
10069
|
+
tabindex="-1"
|
|
10070
|
+
type="button"
|
|
10071
|
+
aria-hidden="true"
|
|
10072
|
+
class="k-input-button k-button k-icon-button"
|
|
10073
|
+
[ngClass]="selectButtonClasses"
|
|
10074
|
+
>
|
|
10075
|
+
<span
|
|
10076
|
+
class="k-button-icon k-icon"
|
|
10077
|
+
[ngClass]="buttonClasses"
|
|
10078
|
+
></span>
|
|
10079
|
+
</button>
|
|
9219
10080
|
<ng-template #popupTemplate>
|
|
9220
10081
|
<span
|
|
9221
10082
|
*ngIf="filterable"
|
|
9222
10083
|
class="k-list-filter"
|
|
9223
10084
|
>
|
|
9224
|
-
<
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
[filterInput]="filterable && !touchEnabled"
|
|
9228
|
-
(keydown.arrowdown)="handleKeydown($event)"
|
|
9229
|
-
(keydown.alt.arrowup)="handleKeydown($event)"
|
|
9230
|
-
[(ngModel)]="filter"
|
|
9231
|
-
class="k-textbox"
|
|
9232
|
-
role="textbox"
|
|
9233
|
-
aria-haspopup="true"
|
|
9234
|
-
aria-expanded="false"
|
|
9235
|
-
tabindex="0"
|
|
9236
|
-
aria-disabled="false"
|
|
9237
|
-
aria-readonly="false"
|
|
9238
|
-
[kendoEventsOutsideAngular]="{
|
|
9239
|
-
blur: handleBlur
|
|
9240
|
-
}"
|
|
9241
|
-
[scope]="this"
|
|
10085
|
+
<span
|
|
10086
|
+
class="k-textbox k-input"
|
|
10087
|
+
[ngClass]="filterInputClasses"
|
|
9242
10088
|
>
|
|
9243
|
-
|
|
10089
|
+
<span class="k-input-prefix">
|
|
10090
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
10091
|
+
</span>
|
|
10092
|
+
<input
|
|
10093
|
+
#filterInput
|
|
10094
|
+
(input)="handleFilterInputChange($event.target.value)"
|
|
10095
|
+
[filterInput]="filterable && !touchEnabled"
|
|
10096
|
+
(keydown.arrowdown)="handleKeydown($event)"
|
|
10097
|
+
(keydown.alt.arrowup)="handleKeydown($event)"
|
|
10098
|
+
[(ngModel)]="filter"
|
|
10099
|
+
class="k-input-inner"
|
|
10100
|
+
role="textbox"
|
|
10101
|
+
aria-haspopup="true"
|
|
10102
|
+
aria-expanded="false"
|
|
10103
|
+
tabindex="0"
|
|
10104
|
+
aria-disabled="false"
|
|
10105
|
+
aria-readonly="false"
|
|
10106
|
+
[kendoEventsOutsideAngular]="{
|
|
10107
|
+
blur: handleBlur
|
|
10108
|
+
}"
|
|
10109
|
+
[scope]="this"
|
|
10110
|
+
>
|
|
10111
|
+
</span>
|
|
9244
10112
|
</span>
|
|
9245
10113
|
<!--header template-->
|
|
9246
10114
|
<ng-template
|
|
@@ -9252,6 +10120,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9252
10120
|
<kendo-treeview
|
|
9253
10121
|
#treeview
|
|
9254
10122
|
*ngIf="data.length !== 0 && !allNodesHidden"
|
|
10123
|
+
[size]="size"
|
|
9255
10124
|
[nodes]="data"
|
|
9256
10125
|
[style.maxHeight.px]="listHeight"
|
|
9257
10126
|
[animate]="false"
|
|
@@ -9282,7 +10151,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9282
10151
|
}">
|
|
9283
10152
|
</ng-template>
|
|
9284
10153
|
<!--no-data template-->
|
|
9285
|
-
<div class="k-
|
|
10154
|
+
<div class="k-no-data" *ngIf="data.length === 0 || allNodesHidden">
|
|
9286
10155
|
<ng-template [ngIf]="noDataTemplate"
|
|
9287
10156
|
[templateContext]="{
|
|
9288
10157
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -9298,10 +10167,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9298
10167
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9299
10168
|
}),
|
|
9300
10169
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
9301
|
-
__metadata("design:paramtypes", [
|
|
10170
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10171
|
+
PopupService,
|
|
9302
10172
|
NavigationService,
|
|
9303
10173
|
Renderer2,
|
|
9304
|
-
ElementRef,
|
|
9305
10174
|
NgZone,
|
|
9306
10175
|
ChangeDetectorRef,
|
|
9307
10176
|
LocalizationService, Boolean])
|
|
@@ -9319,16 +10188,18 @@ const isNodeVisible$1 = () => true;
|
|
|
9319
10188
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
9320
10189
|
*/
|
|
9321
10190
|
let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTreeComponent {
|
|
9322
|
-
constructor(popupService, renderer,
|
|
10191
|
+
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled$$1) {
|
|
10192
|
+
this.wrapper = wrapper;
|
|
9323
10193
|
this.popupService = popupService;
|
|
9324
10194
|
this.renderer = renderer;
|
|
9325
|
-
this.hostElement = hostElement;
|
|
9326
10195
|
this.navigationService = navigationService;
|
|
9327
10196
|
this._zone = _zone;
|
|
9328
10197
|
this.localization = localization;
|
|
9329
10198
|
this.cdr = cdr;
|
|
9330
10199
|
this.touchEnabled = touchEnabled$$1;
|
|
9331
10200
|
this.hostClasses = true;
|
|
10201
|
+
this.role = 'listbox';
|
|
10202
|
+
this.ariaHasPopup = 'tree';
|
|
9332
10203
|
/**
|
|
9333
10204
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
9334
10205
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -9491,12 +10362,63 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9491
10362
|
this._popupSettings = DEFAULT_POPUP_SETTINGS$1;
|
|
9492
10363
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
9493
10364
|
this._isFocused = false;
|
|
10365
|
+
this._size = 'medium';
|
|
10366
|
+
this._rounded = 'medium';
|
|
10367
|
+
this._fillMode = 'solid';
|
|
9494
10368
|
this.subscriptions = [];
|
|
9495
10369
|
this.lastAction = 'check';
|
|
9496
10370
|
this.onTouchedCallback = noop;
|
|
9497
10371
|
this.onChangeCallback = noop;
|
|
9498
10372
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
9499
10373
|
this.subscribeEvents();
|
|
10374
|
+
this.subscribeFocusEvents();
|
|
10375
|
+
}
|
|
10376
|
+
get isDisabled() {
|
|
10377
|
+
return this.disabled;
|
|
10378
|
+
}
|
|
10379
|
+
get isLoading() {
|
|
10380
|
+
return this.loading;
|
|
10381
|
+
}
|
|
10382
|
+
get id() {
|
|
10383
|
+
return this.focusableId;
|
|
10384
|
+
}
|
|
10385
|
+
get hostTabIndex() {
|
|
10386
|
+
return this.tabindex;
|
|
10387
|
+
}
|
|
10388
|
+
get isReadonly() {
|
|
10389
|
+
return this.readonly;
|
|
10390
|
+
}
|
|
10391
|
+
get ariaDescribedBy() {
|
|
10392
|
+
return this.tagListId;
|
|
10393
|
+
}
|
|
10394
|
+
get ariaActiveDescendant() {
|
|
10395
|
+
return this.focusedTagId;
|
|
10396
|
+
}
|
|
10397
|
+
/**
|
|
10398
|
+
* @hidden
|
|
10399
|
+
*/
|
|
10400
|
+
handleClick() {
|
|
10401
|
+
this.togglePopup(!this.isOpen);
|
|
10402
|
+
}
|
|
10403
|
+
/**
|
|
10404
|
+
* @hidden
|
|
10405
|
+
*/
|
|
10406
|
+
handleKeydown(event) {
|
|
10407
|
+
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
10408
|
+
if (deleteTag) {
|
|
10409
|
+
this.handleBackspace();
|
|
10410
|
+
return;
|
|
10411
|
+
}
|
|
10412
|
+
if (this.disabled || this.readonly) {
|
|
10413
|
+
return;
|
|
10414
|
+
}
|
|
10415
|
+
const eventData = event;
|
|
10416
|
+
const action = this.navigationService.process({
|
|
10417
|
+
originalEvent: eventData
|
|
10418
|
+
});
|
|
10419
|
+
if (action === NavigationAction.Open) {
|
|
10420
|
+
eventData.preventDefault();
|
|
10421
|
+
}
|
|
9500
10422
|
}
|
|
9501
10423
|
set treeview(treeview) {
|
|
9502
10424
|
this._treeview = treeview;
|
|
@@ -9529,6 +10451,67 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9529
10451
|
get tabindex() {
|
|
9530
10452
|
return this.disabled ? -1 : this._tabindex;
|
|
9531
10453
|
}
|
|
10454
|
+
/**
|
|
10455
|
+
* Sets the size of the component.
|
|
10456
|
+
*
|
|
10457
|
+
* The possible values are:
|
|
10458
|
+
* * `'small'`
|
|
10459
|
+
* * `'medium'` (default)
|
|
10460
|
+
* * `'large'`
|
|
10461
|
+
* * `null`
|
|
10462
|
+
*
|
|
10463
|
+
*/
|
|
10464
|
+
set size(size) {
|
|
10465
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10466
|
+
if (size) {
|
|
10467
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10468
|
+
}
|
|
10469
|
+
this._size = size;
|
|
10470
|
+
}
|
|
10471
|
+
get size() {
|
|
10472
|
+
return this._size;
|
|
10473
|
+
}
|
|
10474
|
+
/**
|
|
10475
|
+
* Sets the border radius of the component.
|
|
10476
|
+
*
|
|
10477
|
+
* The possible values are:
|
|
10478
|
+
* * `'small'`
|
|
10479
|
+
* * `'medium'` (default)
|
|
10480
|
+
* * `'large'`
|
|
10481
|
+
* * `'full'`
|
|
10482
|
+
* * `null`
|
|
10483
|
+
*
|
|
10484
|
+
*/
|
|
10485
|
+
set rounded(rounded) {
|
|
10486
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10487
|
+
if (rounded) {
|
|
10488
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10489
|
+
}
|
|
10490
|
+
this._rounded = rounded;
|
|
10491
|
+
}
|
|
10492
|
+
get rounded() {
|
|
10493
|
+
return this._rounded;
|
|
10494
|
+
}
|
|
10495
|
+
/**
|
|
10496
|
+
* Sets the fillMode of the component.
|
|
10497
|
+
*
|
|
10498
|
+
* The possible values are:
|
|
10499
|
+
* * `'flat'`
|
|
10500
|
+
* * `'solid'` (default)
|
|
10501
|
+
* * `'outline'`
|
|
10502
|
+
* * `null`
|
|
10503
|
+
*
|
|
10504
|
+
*/
|
|
10505
|
+
set fillMode(fillMode) {
|
|
10506
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10507
|
+
if (fillMode) {
|
|
10508
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10509
|
+
}
|
|
10510
|
+
this._fillMode = fillMode;
|
|
10511
|
+
}
|
|
10512
|
+
get fillMode() {
|
|
10513
|
+
return this._fillMode;
|
|
10514
|
+
}
|
|
9532
10515
|
/**
|
|
9533
10516
|
* Configures the popup of the MultiSelectTree.
|
|
9534
10517
|
*
|
|
@@ -9618,7 +10601,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9618
10601
|
return `${this.tagPrefix}-${valueFrom({ dataItem }, this.valueField)}`;
|
|
9619
10602
|
}
|
|
9620
10603
|
set isFocused(isFocused) {
|
|
9621
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
10604
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
9622
10605
|
this._isFocused = isFocused;
|
|
9623
10606
|
}
|
|
9624
10607
|
get isFocused() {
|
|
@@ -9652,7 +10635,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9652
10635
|
* @hidden
|
|
9653
10636
|
*/
|
|
9654
10637
|
get popupContainerClasses() {
|
|
9655
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
10638
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
9656
10639
|
if (this.popupSettings.popupClass) {
|
|
9657
10640
|
containerClasses.push(this.popupSettings.popupClass);
|
|
9658
10641
|
}
|
|
@@ -9740,13 +10723,14 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9740
10723
|
return this.checkAllInput && document.activeElement === this.checkAllInput.nativeElement;
|
|
9741
10724
|
}
|
|
9742
10725
|
ngOnInit() {
|
|
9743
|
-
this.renderer.removeAttribute(this.
|
|
10726
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
9744
10727
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
9745
10728
|
this.subscriptions.push(this.localization
|
|
9746
10729
|
.changes.subscribe(({ rtl }) => {
|
|
9747
10730
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9748
10731
|
this.cdr.markForCheck();
|
|
9749
10732
|
}));
|
|
10733
|
+
this.setComponentClasses();
|
|
9750
10734
|
}
|
|
9751
10735
|
/**
|
|
9752
10736
|
* @hidden
|
|
@@ -9850,7 +10834,11 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9850
10834
|
/**
|
|
9851
10835
|
* @hidden
|
|
9852
10836
|
*/
|
|
9853
|
-
handleFocus() {
|
|
10837
|
+
handleFocus(event) {
|
|
10838
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
10839
|
+
return;
|
|
10840
|
+
}
|
|
10841
|
+
event.stopImmediatePropagation();
|
|
9854
10842
|
if (!this.isFocused) {
|
|
9855
10843
|
this.isFocused = true;
|
|
9856
10844
|
if (hasObservers(this.onFocus)) {
|
|
@@ -9860,7 +10848,9 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9860
10848
|
}
|
|
9861
10849
|
// Re-focus the treeview if `close` is prevented
|
|
9862
10850
|
if (this.isOpen && this.treeview) {
|
|
9863
|
-
this.lastNodeOnFocus
|
|
10851
|
+
if (this.lastNodeOnFocus) {
|
|
10852
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
10853
|
+
}
|
|
9864
10854
|
this.treeview.focus();
|
|
9865
10855
|
}
|
|
9866
10856
|
}
|
|
@@ -9870,46 +10860,20 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9870
10860
|
*/
|
|
9871
10861
|
handleBlur(e) {
|
|
9872
10862
|
const relatedTarget = e && e.relatedTarget;
|
|
9873
|
-
if (this.
|
|
10863
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
9874
10864
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
9875
10865
|
return;
|
|
9876
10866
|
}
|
|
9877
10867
|
this.isFocused = false;
|
|
9878
10868
|
this.togglePopup(false);
|
|
9879
10869
|
if (hasObservers(this.onBlur) ||
|
|
9880
|
-
isUntouched(this.
|
|
10870
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
9881
10871
|
this._zone.run(() => {
|
|
9882
10872
|
this.onBlur.emit();
|
|
9883
10873
|
this.onTouchedCallback();
|
|
9884
10874
|
});
|
|
9885
10875
|
}
|
|
9886
10876
|
}
|
|
9887
|
-
/**
|
|
9888
|
-
* @hidden
|
|
9889
|
-
*/
|
|
9890
|
-
handleClick() {
|
|
9891
|
-
this.togglePopup(!this.isOpen);
|
|
9892
|
-
}
|
|
9893
|
-
/**
|
|
9894
|
-
* @hidden
|
|
9895
|
-
*/
|
|
9896
|
-
handleKeydown(event) {
|
|
9897
|
-
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
9898
|
-
if (deleteTag) {
|
|
9899
|
-
this.handleBackspace();
|
|
9900
|
-
return;
|
|
9901
|
-
}
|
|
9902
|
-
if (this.disabled || this.readonly) {
|
|
9903
|
-
return;
|
|
9904
|
-
}
|
|
9905
|
-
const eventData = event;
|
|
9906
|
-
const action = this.navigationService.process({
|
|
9907
|
-
originalEvent: eventData
|
|
9908
|
-
});
|
|
9909
|
-
if (action === NavigationAction.Open) {
|
|
9910
|
-
eventData.preventDefault();
|
|
9911
|
-
}
|
|
9912
|
-
}
|
|
9913
10877
|
/**
|
|
9914
10878
|
* @hidden
|
|
9915
10879
|
*/
|
|
@@ -10044,6 +11008,18 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10044
11008
|
this.filterChange.next(term);
|
|
10045
11009
|
this.allNodesHidden = this.nodes.every((node, index) => !this.isVisible(node, String(index)));
|
|
10046
11010
|
}
|
|
11011
|
+
/**
|
|
11012
|
+
* @hidden
|
|
11013
|
+
*/
|
|
11014
|
+
get filterInputClasses() {
|
|
11015
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
11016
|
+
}
|
|
11017
|
+
/**
|
|
11018
|
+
* @hidden
|
|
11019
|
+
*/
|
|
11020
|
+
get checkAllCheckboxClasses() {
|
|
11021
|
+
return `${this.size ? getSizeClass('checkbox', this.size) : ''}`;
|
|
11022
|
+
}
|
|
10047
11023
|
/**
|
|
10048
11024
|
* @hidden
|
|
10049
11025
|
*/
|
|
@@ -10156,6 +11132,31 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10156
11132
|
.pipe(filter(() => !this.isTreeViewActive))
|
|
10157
11133
|
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(filter(() => !this.isOpen)).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(filter(() => !this.isOpen)).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(filter(() => this.isTagFocused)).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(filter(() => this.isTagFocused)).subscribe(this.handleDelete.bind(this)));
|
|
10158
11134
|
}
|
|
11135
|
+
subscribeFocusEvents() {
|
|
11136
|
+
if (isDocumentAvailable()) {
|
|
11137
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
11138
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
11139
|
+
this._zone.runOutsideAngular(() => {
|
|
11140
|
+
const useCapture = true;
|
|
11141
|
+
document.addEventListener('focus', this.handleFocus, useCapture);
|
|
11142
|
+
document.addEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11143
|
+
});
|
|
11144
|
+
}
|
|
11145
|
+
}
|
|
11146
|
+
unSubscribeFocusEvents() {
|
|
11147
|
+
if (isDocumentAvailable()) {
|
|
11148
|
+
const useCapture = true;
|
|
11149
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
11150
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11151
|
+
}
|
|
11152
|
+
}
|
|
11153
|
+
handleDocumentBlur(event) {
|
|
11154
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
11155
|
+
return;
|
|
11156
|
+
}
|
|
11157
|
+
event.stopImmediatePropagation();
|
|
11158
|
+
this.handleBlur(event);
|
|
11159
|
+
}
|
|
10159
11160
|
handleTabKey() {
|
|
10160
11161
|
this.focus();
|
|
10161
11162
|
if (this.isOpen) {
|
|
@@ -10258,6 +11259,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10258
11259
|
}
|
|
10259
11260
|
unsubscribeEvents() {
|
|
10260
11261
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
11262
|
+
this.unSubscribeFocusEvents();
|
|
10261
11263
|
}
|
|
10262
11264
|
/**
|
|
10263
11265
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -10304,16 +11306,84 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10304
11306
|
return indices;
|
|
10305
11307
|
}, []));
|
|
10306
11308
|
}
|
|
11309
|
+
setComponentClasses() {
|
|
11310
|
+
if (this.size) {
|
|
11311
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
11312
|
+
}
|
|
11313
|
+
if (this.rounded) {
|
|
11314
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
11315
|
+
}
|
|
11316
|
+
if (this.fillMode) {
|
|
11317
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
10307
11320
|
};
|
|
10308
11321
|
__decorate([
|
|
10309
|
-
HostBinding('class.k-widget'),
|
|
10310
11322
|
HostBinding('class.k-dropdowntree'),
|
|
11323
|
+
HostBinding('class.k-input'),
|
|
10311
11324
|
__metadata("design:type", Boolean)
|
|
10312
11325
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
11326
|
+
__decorate([
|
|
11327
|
+
HostBinding('class.k-disabled'),
|
|
11328
|
+
HostBinding('attr.aria-disabled'),
|
|
11329
|
+
__metadata("design:type", Boolean),
|
|
11330
|
+
__metadata("design:paramtypes", [])
|
|
11331
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
11332
|
+
__decorate([
|
|
11333
|
+
HostBinding('class.k-loading'),
|
|
11334
|
+
__metadata("design:type", Boolean),
|
|
11335
|
+
__metadata("design:paramtypes", [])
|
|
11336
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
11337
|
+
__decorate([
|
|
11338
|
+
HostBinding('attr.id'),
|
|
11339
|
+
__metadata("design:type", String),
|
|
11340
|
+
__metadata("design:paramtypes", [])
|
|
11341
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
10313
11342
|
__decorate([
|
|
10314
11343
|
HostBinding('attr.dir'),
|
|
10315
11344
|
__metadata("design:type", String)
|
|
10316
11345
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
11346
|
+
__decorate([
|
|
11347
|
+
HostBinding('attr.tabindex'),
|
|
11348
|
+
__metadata("design:type", Number),
|
|
11349
|
+
__metadata("design:paramtypes", [])
|
|
11350
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
11351
|
+
__decorate([
|
|
11352
|
+
HostBinding('attr.role'),
|
|
11353
|
+
__metadata("design:type", String)
|
|
11354
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
11355
|
+
__decorate([
|
|
11356
|
+
HostBinding('attr.aria-haspopup'),
|
|
11357
|
+
__metadata("design:type", String)
|
|
11358
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
11359
|
+
__decorate([
|
|
11360
|
+
HostBinding('attr.readonly'),
|
|
11361
|
+
HostBinding('attr.aria-readonly'),
|
|
11362
|
+
__metadata("design:type", Boolean),
|
|
11363
|
+
__metadata("design:paramtypes", [])
|
|
11364
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
11365
|
+
__decorate([
|
|
11366
|
+
HostBinding('attr.aria-describedby'),
|
|
11367
|
+
__metadata("design:type", String),
|
|
11368
|
+
__metadata("design:paramtypes", [])
|
|
11369
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
11370
|
+
__decorate([
|
|
11371
|
+
HostBinding('attr.aria-activedescendant'),
|
|
11372
|
+
__metadata("design:type", String),
|
|
11373
|
+
__metadata("design:paramtypes", [])
|
|
11374
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
11375
|
+
__decorate([
|
|
11376
|
+
HostListener('click'),
|
|
11377
|
+
__metadata("design:type", Function),
|
|
11378
|
+
__metadata("design:paramtypes", []),
|
|
11379
|
+
__metadata("design:returntype", void 0)
|
|
11380
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
11381
|
+
__decorate([
|
|
11382
|
+
HostListener('keydown', ['$event']),
|
|
11383
|
+
__metadata("design:type", Function),
|
|
11384
|
+
__metadata("design:paramtypes", [Object]),
|
|
11385
|
+
__metadata("design:returntype", void 0)
|
|
11386
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
10317
11387
|
__decorate([
|
|
10318
11388
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
10319
11389
|
__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -10342,10 +11412,6 @@ __decorate([
|
|
|
10342
11412
|
ViewChild('popupTemplate', { static: true }),
|
|
10343
11413
|
__metadata("design:type", TemplateRef)
|
|
10344
11414
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
10345
|
-
__decorate([
|
|
10346
|
-
ViewChild('wrapper', { static: true }),
|
|
10347
|
-
__metadata("design:type", ElementRef)
|
|
10348
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
10349
11415
|
__decorate([
|
|
10350
11416
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
10351
11417
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -10368,6 +11434,21 @@ __decorate([
|
|
|
10368
11434
|
__metadata("design:type", Number),
|
|
10369
11435
|
__metadata("design:paramtypes", [Number])
|
|
10370
11436
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
11437
|
+
__decorate([
|
|
11438
|
+
Input(),
|
|
11439
|
+
__metadata("design:type", String),
|
|
11440
|
+
__metadata("design:paramtypes", [String])
|
|
11441
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
11442
|
+
__decorate([
|
|
11443
|
+
Input(),
|
|
11444
|
+
__metadata("design:type", String),
|
|
11445
|
+
__metadata("design:paramtypes", [String])
|
|
11446
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
11447
|
+
__decorate([
|
|
11448
|
+
Input(),
|
|
11449
|
+
__metadata("design:type", String),
|
|
11450
|
+
__metadata("design:paramtypes", [String])
|
|
11451
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
10371
11452
|
__decorate([
|
|
10372
11453
|
Input(),
|
|
10373
11454
|
__metadata("design:type", Object),
|
|
@@ -10561,87 +11642,75 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10561
11642
|
checkAllText="Check all"
|
|
10562
11643
|
>
|
|
10563
11644
|
</ng-container>
|
|
10564
|
-
<
|
|
10565
|
-
[
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
[
|
|
10573
|
-
[
|
|
10574
|
-
[
|
|
10575
|
-
[
|
|
10576
|
-
[
|
|
10577
|
-
[
|
|
10578
|
-
|
|
10579
|
-
(
|
|
10580
|
-
[kendoEventsOutsideAngular]="{
|
|
10581
|
-
focus: handleFocus,
|
|
10582
|
-
blur: handleBlur
|
|
10583
|
-
}"
|
|
10584
|
-
[scope]="this"
|
|
11645
|
+
<kendo-taglist
|
|
11646
|
+
[size]="size"
|
|
11647
|
+
[rounded]="rounded"
|
|
11648
|
+
[fillMode]="fillMode"
|
|
11649
|
+
[id]="tagListId"
|
|
11650
|
+
[tags]="tags"
|
|
11651
|
+
[focused]="focusedTagIndex"
|
|
11652
|
+
[textField]="textField"
|
|
11653
|
+
[valueField]="valueField"
|
|
11654
|
+
[valueDepth]="valueDepth"
|
|
11655
|
+
[disabled]="disabled"
|
|
11656
|
+
[tagPrefix]="tagPrefix"
|
|
11657
|
+
[template]="tagTemplate"
|
|
11658
|
+
[groupTemplate]="groupTagTemplate"
|
|
11659
|
+
[disabledIndices]="disabledIndices"
|
|
11660
|
+
(removeTag)="handleRemoveTag($event)"
|
|
10585
11661
|
>
|
|
10586
|
-
<kendo-taglist
|
|
10587
|
-
[id]="tagListId"
|
|
10588
|
-
[tags]="tags"
|
|
10589
|
-
[focused]="focusedTagIndex"
|
|
10590
|
-
[textField]="textField"
|
|
10591
|
-
[valueField]="valueField"
|
|
10592
|
-
[valueDepth]="valueDepth"
|
|
10593
|
-
[disabled]="disabled"
|
|
10594
|
-
[tagPrefix]="tagPrefix"
|
|
10595
|
-
[template]="tagTemplate"
|
|
10596
|
-
[groupTemplate]="groupTagTemplate"
|
|
10597
|
-
[disabledIndices]="disabledIndices"
|
|
10598
|
-
(removeTag)="handleRemoveTag($event)"
|
|
10599
|
-
>
|
|
10600
|
-
</kendo-taglist>
|
|
10601
11662
|
<span *ngIf="!tags || !tags.length"
|
|
10602
|
-
class="k-input k-readonly"
|
|
10603
|
-
>
|
|
10604
|
-
{{ placeholder }}
|
|
10605
|
-
</span>
|
|
10606
|
-
<span
|
|
10607
|
-
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
10608
|
-
class="k-icon k-clear-value k-i-close"
|
|
10609
|
-
[attr.title]="messageFor('clearTitle')"
|
|
10610
|
-
role="button"
|
|
10611
|
-
tabindex="-1"
|
|
10612
|
-
(click)="clearAll($event)"
|
|
10613
|
-
>
|
|
10614
|
-
</span>
|
|
10615
|
-
<span
|
|
10616
|
-
*ngIf="loading"
|
|
10617
|
-
class="k-icon k-i-loading"
|
|
11663
|
+
class="k-input-inner k-readonly"
|
|
10618
11664
|
>
|
|
11665
|
+
<span class="k-input-value-text">{{ placeholder }}</span>
|
|
10619
11666
|
</span>
|
|
10620
|
-
</
|
|
11667
|
+
</kendo-taglist>
|
|
11668
|
+
<span
|
|
11669
|
+
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
11670
|
+
class="k-clear-value"
|
|
11671
|
+
[attr.title]="messageFor('clearTitle')"
|
|
11672
|
+
role="button"
|
|
11673
|
+
tabindex="-1"
|
|
11674
|
+
(click)="clearAll($event)"
|
|
11675
|
+
>
|
|
11676
|
+
<span class="k-icon k-i-x"></span>
|
|
11677
|
+
</span>
|
|
11678
|
+
<span
|
|
11679
|
+
*ngIf="loading"
|
|
11680
|
+
class="k-icon k-i-loading"
|
|
11681
|
+
>
|
|
11682
|
+
</span>
|
|
10621
11683
|
<ng-template #popupTemplate>
|
|
10622
11684
|
<span
|
|
10623
11685
|
*ngIf="filterable"
|
|
10624
11686
|
class="k-list-filter"
|
|
10625
11687
|
>
|
|
10626
|
-
<
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
[filterInput]="filterable && !touchEnabled"
|
|
10630
|
-
(keydown)="handleKeydown($event)"
|
|
10631
|
-
[(ngModel)]="filter"
|
|
10632
|
-
class="k-textbox"
|
|
10633
|
-
role="textbox"
|
|
10634
|
-
aria-haspopup="true"
|
|
10635
|
-
aria-expanded="false"
|
|
10636
|
-
tabindex="0"
|
|
10637
|
-
aria-disabled="false"
|
|
10638
|
-
aria-readonly="false"
|
|
10639
|
-
[kendoEventsOutsideAngular]="{
|
|
10640
|
-
blur: handleBlur
|
|
10641
|
-
}"
|
|
10642
|
-
[scope]="this"
|
|
11688
|
+
<span
|
|
11689
|
+
class="k-textbox k-input"
|
|
11690
|
+
[ngClass]="filterInputClasses"
|
|
10643
11691
|
>
|
|
10644
|
-
|
|
11692
|
+
<span class="k-input-prefix">
|
|
11693
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
11694
|
+
</span>
|
|
11695
|
+
<input
|
|
11696
|
+
#filterInput
|
|
11697
|
+
(input)="handleFilterInputChange($event.target.value)"
|
|
11698
|
+
[filterInput]="filterable && !touchEnabled"
|
|
11699
|
+
(keydown)="handleKeydown($event)"
|
|
11700
|
+
[(ngModel)]="filter"
|
|
11701
|
+
class="k-input-inner"
|
|
11702
|
+
role="textbox"
|
|
11703
|
+
aria-haspopup="true"
|
|
11704
|
+
aria-expanded="false"
|
|
11705
|
+
tabindex="0"
|
|
11706
|
+
aria-disabled="false"
|
|
11707
|
+
aria-readonly="false"
|
|
11708
|
+
[kendoEventsOutsideAngular]="{
|
|
11709
|
+
blur: handleBlur
|
|
11710
|
+
}"
|
|
11711
|
+
[scope]="this"
|
|
11712
|
+
>
|
|
11713
|
+
</span>
|
|
10645
11714
|
</span>
|
|
10646
11715
|
<!--header template-->
|
|
10647
11716
|
<ng-template
|
|
@@ -10656,6 +11725,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10656
11725
|
[checkAll]="!filterable && !touchEnabled"
|
|
10657
11726
|
type="checkbox"
|
|
10658
11727
|
class="k-checkbox"
|
|
11728
|
+
[ngClass]="checkAllCheckboxClasses"
|
|
10659
11729
|
role="checkbox"
|
|
10660
11730
|
tabindex="0"
|
|
10661
11731
|
aria-disabled="false"
|
|
@@ -10681,6 +11751,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10681
11751
|
</div>
|
|
10682
11752
|
<kendo-treeview
|
|
10683
11753
|
#treeview
|
|
11754
|
+
[size]="size"
|
|
10684
11755
|
[nodes]="data"
|
|
10685
11756
|
[style.maxHeight.px]="listHeight"
|
|
10686
11757
|
[animate]="false"
|
|
@@ -10716,7 +11787,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10716
11787
|
}">
|
|
10717
11788
|
</ng-template>
|
|
10718
11789
|
<!--no-data template-->
|
|
10719
|
-
<div class="k-
|
|
11790
|
+
<div class="k-no-data" *ngIf="data?.length === 0 || allNodesHidden">
|
|
10720
11791
|
<ng-template [ngIf]="noDataTemplate"
|
|
10721
11792
|
[templateContext]="{
|
|
10722
11793
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -10731,9 +11802,9 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10731
11802
|
`
|
|
10732
11803
|
}),
|
|
10733
11804
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
10734
|
-
__metadata("design:paramtypes", [
|
|
11805
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11806
|
+
PopupService,
|
|
10735
11807
|
Renderer2,
|
|
10736
|
-
ElementRef,
|
|
10737
11808
|
NavigationService,
|
|
10738
11809
|
NgZone,
|
|
10739
11810
|
LocalizationService,
|
|
@@ -10865,15 +11936,31 @@ DropDownTreesExpandDirective = __decorate([
|
|
|
10865
11936
|
* @hidden
|
|
10866
11937
|
*/
|
|
10867
11938
|
let TagListComponent = class TagListComponent {
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
11939
|
+
constructor(renderer, hostElement) {
|
|
11940
|
+
this.renderer = renderer;
|
|
11941
|
+
this.hostElement = hostElement;
|
|
11942
|
+
this.rounded = 'medium';
|
|
11943
|
+
this.fillMode = 'solid';
|
|
10872
11944
|
/**
|
|
10873
11945
|
* A collection with the disabled tags' indices.
|
|
10874
11946
|
*/
|
|
10875
11947
|
this.disabledIndices = new Set();
|
|
10876
11948
|
this.removeTag = new EventEmitter();
|
|
11949
|
+
this.hostClasses = true;
|
|
11950
|
+
this._size = 'medium';
|
|
11951
|
+
}
|
|
11952
|
+
set size(size) {
|
|
11953
|
+
this.renderer.removeClass(this.hostElement.nativeElement, getSizeClass('chip-list', this.size));
|
|
11954
|
+
if (size) {
|
|
11955
|
+
this.renderer.addClass(this.hostElement.nativeElement, getSizeClass('chip-list', size));
|
|
11956
|
+
}
|
|
11957
|
+
this._size = size;
|
|
11958
|
+
}
|
|
11959
|
+
get size() {
|
|
11960
|
+
return this._size;
|
|
11961
|
+
}
|
|
11962
|
+
get hostId() {
|
|
11963
|
+
return this.id;
|
|
10877
11964
|
}
|
|
10878
11965
|
tagProp(tag, prop, index) {
|
|
10879
11966
|
const propField = prop && this.getPropField(tag, prop, index);
|
|
@@ -10964,6 +12051,19 @@ __decorate([
|
|
|
10964
12051
|
Input(),
|
|
10965
12052
|
__metadata("design:type", String)
|
|
10966
12053
|
], TagListComponent.prototype, "id", void 0);
|
|
12054
|
+
__decorate([
|
|
12055
|
+
Input(),
|
|
12056
|
+
__metadata("design:type", String),
|
|
12057
|
+
__metadata("design:paramtypes", [String])
|
|
12058
|
+
], TagListComponent.prototype, "size", null);
|
|
12059
|
+
__decorate([
|
|
12060
|
+
Input(),
|
|
12061
|
+
__metadata("design:type", String)
|
|
12062
|
+
], TagListComponent.prototype, "rounded", void 0);
|
|
12063
|
+
__decorate([
|
|
12064
|
+
Input(),
|
|
12065
|
+
__metadata("design:type", String)
|
|
12066
|
+
], TagListComponent.prototype, "fillMode", void 0);
|
|
10967
12067
|
__decorate([
|
|
10968
12068
|
Input(),
|
|
10969
12069
|
__metadata("design:type", Set)
|
|
@@ -10972,56 +12072,82 @@ __decorate([
|
|
|
10972
12072
|
Output(),
|
|
10973
12073
|
__metadata("design:type", EventEmitter)
|
|
10974
12074
|
], TagListComponent.prototype, "removeTag", void 0);
|
|
12075
|
+
__decorate([
|
|
12076
|
+
HostBinding('class.k-input-values'),
|
|
12077
|
+
HostBinding('class.k-chip-list'),
|
|
12078
|
+
HostBinding('class.k-selection-multiple'),
|
|
12079
|
+
__metadata("design:type", Boolean)
|
|
12080
|
+
], TagListComponent.prototype, "hostClasses", void 0);
|
|
12081
|
+
__decorate([
|
|
12082
|
+
HostBinding('attr.id'),
|
|
12083
|
+
__metadata("design:type", String),
|
|
12084
|
+
__metadata("design:paramtypes", [])
|
|
12085
|
+
], TagListComponent.prototype, "hostId", null);
|
|
10975
12086
|
TagListComponent = __decorate([
|
|
10976
12087
|
Component({
|
|
10977
12088
|
selector: 'kendo-taglist',
|
|
10978
12089
|
template: `
|
|
10979
|
-
<
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
12090
|
+
<div
|
|
12091
|
+
*ngFor="let tag of tags; let index = index;"
|
|
12092
|
+
role="option"
|
|
12093
|
+
[attr.id]="itemId(tag, index)"
|
|
12094
|
+
[attr.aria-hidden]="tagAriaHidden(index)"
|
|
12095
|
+
aria-selected="true"
|
|
12096
|
+
[attr.aria-setsize]="tags?.length"
|
|
12097
|
+
class="k-chip"
|
|
12098
|
+
[ngClass]="{
|
|
12099
|
+
'k-focus': index === focused,
|
|
12100
|
+
'k-disabled': isTagDisabled(tag, index),
|
|
12101
|
+
'k-chip-sm': size === 'small',
|
|
12102
|
+
'k-chip-md': size === 'medium',
|
|
12103
|
+
'k-chip-lg': size === 'large',
|
|
12104
|
+
'k-rounded-sm': rounded === 'small',
|
|
12105
|
+
'k-rounded-md': rounded === 'medium',
|
|
12106
|
+
'k-rounded-lg': rounded === 'large',
|
|
12107
|
+
'k-rounded-full': rounded === 'full',
|
|
12108
|
+
'k-chip-solid k-chip-solid-base': fillMode === 'solid',
|
|
12109
|
+
'k-chip-flat k-chip-flat-base': fillMode === 'flat',
|
|
12110
|
+
'k-chip-outline k-chip-outline-base': fillMode === 'outline'
|
|
12111
|
+
}"
|
|
12112
|
+
>
|
|
12113
|
+
<span class="k-chip-content">
|
|
10993
12114
|
<ng-template *ngIf="isGroupTag(tag); then groupTag else singleTag"></ng-template>
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
12115
|
+
<ng-template #groupTag>
|
|
12116
|
+
<span class="k-chip-label k-text-ellipsis">
|
|
12117
|
+
<ng-template *ngIf="groupTemplate"
|
|
12118
|
+
[templateContext]="{
|
|
12119
|
+
templateRef: groupTemplate.templateRef,
|
|
12120
|
+
$implicit: tag
|
|
12121
|
+
}">
|
|
12122
|
+
</ng-template>
|
|
12123
|
+
<ng-template [ngIf]="!groupTemplate">{{ tag.length }} {{ tag.length === 1 ? 'item' : 'items' }} selected</ng-template>
|
|
12124
|
+
</span>
|
|
12125
|
+
</ng-template>
|
|
12126
|
+
<ng-template #singleTag>
|
|
12127
|
+
<span class="k-chip-label k-text-ellipsis">
|
|
12128
|
+
<ng-template *ngIf="template"
|
|
12129
|
+
[templateContext]="{
|
|
12130
|
+
templateRef: template.templateRef,
|
|
12131
|
+
$implicit: tag
|
|
12132
|
+
}">
|
|
12133
|
+
</ng-template>
|
|
12134
|
+
<ng-template [ngIf]="!template">{{ tagProp(tag, textField, index) }}</ng-template>
|
|
12135
|
+
</span>
|
|
12136
|
+
</ng-template>
|
|
12137
|
+
</span>
|
|
11016
12138
|
|
|
11017
|
-
|
|
11018
|
-
|
|
12139
|
+
<span class="k-chip-actions">
|
|
12140
|
+
<span aria-label="delete" [attr.aria-hidden]="index !== focused" class="k-chip-action k-chip-remove-action">
|
|
12141
|
+
<span class="k-icon k-i-x-circle" (mousedown)="deleteTag($event, tag, index)">
|
|
11019
12142
|
</span>
|
|
11020
12143
|
</span>
|
|
11021
|
-
</
|
|
11022
|
-
</
|
|
12144
|
+
</span>
|
|
12145
|
+
</div>
|
|
12146
|
+
<ng-content></ng-content>
|
|
11023
12147
|
`
|
|
11024
|
-
})
|
|
12148
|
+
}),
|
|
12149
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
12150
|
+
ElementRef])
|
|
11025
12151
|
], TagListComponent);
|
|
11026
12152
|
|
|
11027
12153
|
/**
|
|
@@ -11345,12 +12471,12 @@ __decorate([
|
|
|
11345
12471
|
__metadata("design:type", Boolean)
|
|
11346
12472
|
], SelectableDirective.prototype, "multipleSelection", void 0);
|
|
11347
12473
|
__decorate([
|
|
11348
|
-
HostBinding('class.k-
|
|
12474
|
+
HostBinding('class.k-focus'),
|
|
11349
12475
|
__metadata("design:type", Boolean),
|
|
11350
12476
|
__metadata("design:paramtypes", [])
|
|
11351
12477
|
], SelectableDirective.prototype, "focusedClassName", null);
|
|
11352
12478
|
__decorate([
|
|
11353
|
-
HostBinding('class.k-
|
|
12479
|
+
HostBinding('class.k-selected'),
|
|
11354
12480
|
__metadata("design:type", Boolean),
|
|
11355
12481
|
__metadata("design:paramtypes", [])
|
|
11356
12482
|
], SelectableDirective.prototype, "selectedClassName", null);
|