@progress/kendo-angular-dropdowns 5.5.1-dev.202111181325 → 6.0.0-dev.202201190829
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 -36
- 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 -801
- 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: 1642580652,
|
|
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,16 +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
|
-
|
|
1835
|
+
[class]="listContentClass"
|
|
1836
|
+
[style.overscrollBehavior]="'none'"
|
|
1837
|
+
[style.maxHeight.px]="height"
|
|
1838
|
+
unselectable="on">
|
|
1732
1839
|
<ul #list
|
|
1733
1840
|
role="listbox"
|
|
1734
1841
|
[class]="listClass"
|
|
1735
|
-
[ngClass]="{ 'k-virtual-list': virtual }"
|
|
1736
1842
|
[attr.id]="id"
|
|
1737
1843
|
[attr.aria-hidden]="!show">
|
|
1738
1844
|
<ng-template *ngIf="!dataService.grouped && show" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
@@ -1745,31 +1851,35 @@ ListComponent = __decorate([
|
|
|
1745
1851
|
[multipleSelection]="multipleSelection"
|
|
1746
1852
|
[attr.id]="optionPrefix + '-' + getValue(dataItem)"
|
|
1747
1853
|
[attr.tabIndex]="-1"
|
|
1748
|
-
class="
|
|
1749
|
-
[ngClass]="{
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
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
|
+
/>
|
|
1758
1868
|
<ng-template *ngIf="template"
|
|
1759
1869
|
[templateContext]="{
|
|
1760
1870
|
templateRef: template.templateRef,
|
|
1761
1871
|
$implicit: dataItem
|
|
1762
1872
|
}">
|
|
1763
1873
|
</ng-template>
|
|
1764
|
-
<ng-template [ngIf]="!template">{{ getText(dataItem) }}</ng-template>
|
|
1874
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
|
|
1765
1875
|
</li>
|
|
1766
1876
|
</ng-template>
|
|
1767
1877
|
<ng-template *ngIf="dataService.grouped" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
1768
1878
|
<li
|
|
1769
1879
|
*ngIf="dataItem.header && dataItem.index > 0"
|
|
1770
1880
|
role="group"
|
|
1771
|
-
class=
|
|
1772
|
-
[
|
|
1881
|
+
[class]="listGroupItemClass"
|
|
1882
|
+
[class.k-table-alt-row]="isAltRow(itemIndex - 1)"
|
|
1773
1883
|
[ngStyle]="{
|
|
1774
1884
|
'height.px': virtual?.itemHeight,
|
|
1775
1885
|
'minHeight.px' : virtual?.itemHeight,
|
|
@@ -1777,15 +1887,17 @@ ListComponent = __decorate([
|
|
|
1777
1887
|
[attr.group-index]="dataItem.index"
|
|
1778
1888
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1779
1889
|
[attr.tabIndex]="-1">
|
|
1780
|
-
<
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
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
|
|
1789
1901
|
*ngIf="!dataItem.header"
|
|
1790
1902
|
role="option"
|
|
1791
1903
|
kendoDropDownsSelectable
|
|
@@ -1795,15 +1907,19 @@ ListComponent = __decorate([
|
|
|
1795
1907
|
[attr.absolute-index]="dataItem.index"
|
|
1796
1908
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1797
1909
|
[attr.tabIndex]="-1"
|
|
1798
|
-
class="
|
|
1799
|
-
[ngClass]="{
|
|
1910
|
+
[class]="listItemClass"
|
|
1911
|
+
[ngClass]="{
|
|
1912
|
+
'k-disabled': isDisabled(dataItem.offsetIndex),
|
|
1913
|
+
'k-table-alt-row': isAltRow(itemIndex - 1)
|
|
1914
|
+
}"
|
|
1915
|
+
>
|
|
1800
1916
|
<ng-template *ngIf="template"
|
|
1801
1917
|
[templateContext]="{
|
|
1802
1918
|
templateRef: template.templateRef,
|
|
1803
1919
|
$implicit: dataItem.value
|
|
1804
1920
|
}">
|
|
1805
1921
|
</ng-template>
|
|
1806
|
-
<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>
|
|
1807
1923
|
</li>
|
|
1808
1924
|
</ng-template>
|
|
1809
1925
|
<kendo-resize-sensor
|
|
@@ -1995,6 +2111,9 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
1995
2111
|
this._value = "";
|
|
1996
2112
|
this.valueChangeSubject = new Subject();
|
|
1997
2113
|
this._isFocused = false;
|
|
2114
|
+
this._size = 'medium';
|
|
2115
|
+
this._rounded = 'medium';
|
|
2116
|
+
this._fillMode = 'solid';
|
|
1998
2117
|
validatePackage(packageMetadata);
|
|
1999
2118
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
2000
2119
|
this.wrapper = this.hostElement.nativeElement;
|
|
@@ -2179,16 +2298,80 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2179
2298
|
get virtual() {
|
|
2180
2299
|
return this._virtualSettings;
|
|
2181
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
|
+
}
|
|
2182
2362
|
get isFocused() {
|
|
2183
2363
|
return this._isFocused;
|
|
2184
2364
|
}
|
|
2185
2365
|
set isFocused(isFocused) {
|
|
2186
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-
|
|
2366
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
|
|
2187
2367
|
this._isFocused = isFocused;
|
|
2188
2368
|
}
|
|
2189
2369
|
get isDisabled() {
|
|
2190
2370
|
return this.disabled;
|
|
2191
2371
|
}
|
|
2372
|
+
get isLoading() {
|
|
2373
|
+
return this.loading;
|
|
2374
|
+
}
|
|
2192
2375
|
get dir() {
|
|
2193
2376
|
return this.direction;
|
|
2194
2377
|
}
|
|
@@ -2201,6 +2384,7 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2201
2384
|
this.setMessages();
|
|
2202
2385
|
});
|
|
2203
2386
|
this.setMessages();
|
|
2387
|
+
this.setComponentClasses();
|
|
2204
2388
|
}
|
|
2205
2389
|
ngOnDestroy() {
|
|
2206
2390
|
this.destroyPopup();
|
|
@@ -2628,6 +2812,17 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2628
2812
|
});
|
|
2629
2813
|
});
|
|
2630
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
|
+
}
|
|
2631
2826
|
};
|
|
2632
2827
|
__decorate([
|
|
2633
2828
|
Input(),
|
|
@@ -2707,6 +2902,21 @@ __decorate([
|
|
|
2707
2902
|
__metadata("design:type", Object),
|
|
2708
2903
|
__metadata("design:paramtypes", [Object])
|
|
2709
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);
|
|
2710
2920
|
__decorate([
|
|
2711
2921
|
Output(),
|
|
2712
2922
|
__metadata("design:type", EventEmitter)
|
|
@@ -2780,15 +2990,20 @@ __decorate([
|
|
|
2780
2990
|
__metadata("design:type", ListComponent)
|
|
2781
2991
|
], AutoCompleteComponent.prototype, "optionsList", void 0);
|
|
2782
2992
|
__decorate([
|
|
2783
|
-
HostBinding('class.k-widget'),
|
|
2784
2993
|
HostBinding('class.k-autocomplete'),
|
|
2994
|
+
HostBinding('class.k-input'),
|
|
2785
2995
|
__metadata("design:type", Boolean)
|
|
2786
2996
|
], AutoCompleteComponent.prototype, "widgetClasses", void 0);
|
|
2787
2997
|
__decorate([
|
|
2788
|
-
HostBinding('class.k-
|
|
2998
|
+
HostBinding('class.k-disabled'),
|
|
2789
2999
|
__metadata("design:type", Boolean),
|
|
2790
3000
|
__metadata("design:paramtypes", [])
|
|
2791
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);
|
|
2792
3007
|
__decorate([
|
|
2793
3008
|
HostBinding('attr.dir'),
|
|
2794
3009
|
__metadata("design:type", Object),
|
|
@@ -2847,7 +3062,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2847
3062
|
></kendo-searchbar>
|
|
2848
3063
|
<span
|
|
2849
3064
|
*ngIf="!loading && !readonly && (clearButton && text?.length)"
|
|
2850
|
-
class="k-
|
|
3065
|
+
class="k-clear-value"
|
|
2851
3066
|
[style.visibility]="clearButtonVisiblity"
|
|
2852
3067
|
[attr.title]="clearTitle"
|
|
2853
3068
|
role="button"
|
|
@@ -2855,7 +3070,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2855
3070
|
(click)="clearValue($event)"
|
|
2856
3071
|
(mousedown)="$event.preventDefault()"
|
|
2857
3072
|
>
|
|
2858
|
-
|
|
3073
|
+
<span class="k-icon k-i-x"></span>
|
|
3074
|
+
</span>
|
|
2859
3075
|
<span *ngIf="loading" class="k-icon k-i-loading"></span>
|
|
2860
3076
|
<ng-template #popupTemplate>
|
|
2861
3077
|
<!--header template-->
|
|
@@ -2867,6 +3083,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2867
3083
|
<!--list-->
|
|
2868
3084
|
<kendo-list
|
|
2869
3085
|
#optionsList
|
|
3086
|
+
[size]="size"
|
|
3087
|
+
[rounded]="rounded"
|
|
2870
3088
|
[id]="listBoxId"
|
|
2871
3089
|
[optionPrefix]="optionPrefix"
|
|
2872
3090
|
[data]="data"
|
|
@@ -2882,7 +3100,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2882
3100
|
>
|
|
2883
3101
|
</kendo-list>
|
|
2884
3102
|
<!--no-data template-->
|
|
2885
|
-
<div class="k-
|
|
3103
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
2886
3104
|
<ng-template [ngIf]="noDataTemplate"
|
|
2887
3105
|
[templateContext]="{
|
|
2888
3106
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -3005,7 +3223,8 @@ const COMBOBOX_VALUE_ACCESSOR = {
|
|
|
3005
3223
|
* ```
|
|
3006
3224
|
*/
|
|
3007
3225
|
let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
3008
|
-
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;
|
|
3009
3228
|
this.localization = localization;
|
|
3010
3229
|
this.popupService = popupService;
|
|
3011
3230
|
this.selectionService = selectionService;
|
|
@@ -3015,7 +3234,6 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3015
3234
|
this.zone = zone;
|
|
3016
3235
|
this.cdr = cdr;
|
|
3017
3236
|
this.renderer = renderer;
|
|
3018
|
-
this.hostElement = hostElement;
|
|
3019
3237
|
this.touchEnabled = touchEnabled$$1;
|
|
3020
3238
|
this.selected = [];
|
|
3021
3239
|
/**
|
|
@@ -3180,6 +3398,9 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3180
3398
|
this.valueSubject = new Subject();
|
|
3181
3399
|
this.clearValueSubject = new Subject();
|
|
3182
3400
|
this.subs = new Subscription();
|
|
3401
|
+
this._size = 'medium';
|
|
3402
|
+
this._rounded = 'medium';
|
|
3403
|
+
this._fillMode = 'solid';
|
|
3183
3404
|
validatePackage(packageMetadata);
|
|
3184
3405
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
3185
3406
|
this.data = [];
|
|
@@ -3334,8 +3555,72 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3334
3555
|
get virtual() {
|
|
3335
3556
|
return this._virtualSettings;
|
|
3336
3557
|
}
|
|
3337
|
-
|
|
3338
|
-
|
|
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;
|
|
3339
3624
|
}
|
|
3340
3625
|
get dir() {
|
|
3341
3626
|
return this.direction;
|
|
@@ -3344,7 +3629,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3344
3629
|
return this._isFocused;
|
|
3345
3630
|
}
|
|
3346
3631
|
set isFocused(value) {
|
|
3347
|
-
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-
|
|
3632
|
+
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-focus");
|
|
3348
3633
|
this._isFocused = value;
|
|
3349
3634
|
}
|
|
3350
3635
|
get clearButtonVisiblity() {
|
|
@@ -3367,12 +3652,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3367
3652
|
return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
|
|
3368
3653
|
}
|
|
3369
3654
|
ngOnInit() {
|
|
3370
|
-
this.renderer.removeAttribute(this.
|
|
3655
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
3371
3656
|
this.attachStreams();
|
|
3372
3657
|
this.createValueStream();
|
|
3373
3658
|
this.subscribeTouchEvents();
|
|
3374
3659
|
this.attachSelectClickHandler();
|
|
3375
3660
|
this.setMessages();
|
|
3661
|
+
this.setComponentClasses();
|
|
3376
3662
|
}
|
|
3377
3663
|
createValueStream() {
|
|
3378
3664
|
const valueStream = this.valueSubject.pipe(filter((candidate) => {
|
|
@@ -3650,6 +3936,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3650
3936
|
get buttonClasses() {
|
|
3651
3937
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
3652
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
|
+
}
|
|
3653
3946
|
/**
|
|
3654
3947
|
* @hidden
|
|
3655
3948
|
*/
|
|
@@ -3875,7 +4168,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3875
4168
|
const currentText = this.searchbar.value;
|
|
3876
4169
|
const textHasChanged = currentText !== (getter$1(this.dataItem, this.textField) || '');
|
|
3877
4170
|
const valueHasChanged = unresolvedSelection || textHasChanged;
|
|
3878
|
-
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);
|
|
3879
4172
|
if (runInZone) {
|
|
3880
4173
|
this.zone.run(() => {
|
|
3881
4174
|
if (valueHasChanged) {
|
|
@@ -4100,7 +4393,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4100
4393
|
// Roll up ComboBox on iOS when tapped outside
|
|
4101
4394
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
4102
4395
|
const target = e.target;
|
|
4103
|
-
const isInDropDown = inDropDown(this.
|
|
4396
|
+
const isInDropDown = inDropDown(this.wrapper, target, this.popupRef);
|
|
4104
4397
|
if (this.isFocused && !isInDropDown) {
|
|
4105
4398
|
// Close popup and mobile keyboard if searchbar is focused
|
|
4106
4399
|
this.zone.run(() => this.blur());
|
|
@@ -4116,6 +4409,17 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4116
4409
|
const event = pointers ? 'pointerdown' : 'click';
|
|
4117
4410
|
this.selectClickDisposeHandler = this.renderer.listen(selectElement, event, this.selectClick.bind(this));
|
|
4118
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
|
+
}
|
|
4119
4423
|
};
|
|
4120
4424
|
__decorate([
|
|
4121
4425
|
Input(),
|
|
@@ -4212,6 +4516,21 @@ __decorate([
|
|
|
4212
4516
|
__metadata("design:type", Object),
|
|
4213
4517
|
__metadata("design:paramtypes", [Object])
|
|
4214
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);
|
|
4215
4534
|
__decorate([
|
|
4216
4535
|
Output(),
|
|
4217
4536
|
__metadata("design:type", EventEmitter)
|
|
@@ -4288,24 +4607,25 @@ __decorate([
|
|
|
4288
4607
|
ViewChild('optionsList', { static: false }),
|
|
4289
4608
|
__metadata("design:type", ListComponent)
|
|
4290
4609
|
], ComboBoxComponent.prototype, "optionsList", void 0);
|
|
4291
|
-
__decorate([
|
|
4292
|
-
ViewChild('wrapper', { static: true }),
|
|
4293
|
-
__metadata("design:type", ElementRef)
|
|
4294
|
-
], ComboBoxComponent.prototype, "wrapper", void 0);
|
|
4295
4610
|
__decorate([
|
|
4296
4611
|
ViewChild('select', { static: true }),
|
|
4297
4612
|
__metadata("design:type", ElementRef)
|
|
4298
4613
|
], ComboBoxComponent.prototype, "select", void 0);
|
|
4299
4614
|
__decorate([
|
|
4300
|
-
HostBinding('class.k-widget'),
|
|
4301
4615
|
HostBinding('class.k-combobox'),
|
|
4616
|
+
HostBinding('class.k-input'),
|
|
4302
4617
|
__metadata("design:type", Boolean)
|
|
4303
4618
|
], ComboBoxComponent.prototype, "widgetClasses", void 0);
|
|
4304
4619
|
__decorate([
|
|
4305
|
-
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'),
|
|
4306
4626
|
__metadata("design:type", Boolean),
|
|
4307
4627
|
__metadata("design:paramtypes", [])
|
|
4308
|
-
], ComboBoxComponent.prototype, "
|
|
4628
|
+
], ComboBoxComponent.prototype, "isLoading", null);
|
|
4309
4629
|
__decorate([
|
|
4310
4630
|
HostBinding('attr.dir'),
|
|
4311
4631
|
__metadata("design:type", Object),
|
|
@@ -4342,95 +4662,94 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4342
4662
|
clearTitle="clear"
|
|
4343
4663
|
>
|
|
4344
4664
|
</ng-container>
|
|
4345
|
-
<
|
|
4346
|
-
|
|
4347
|
-
[
|
|
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
|
+
}"
|
|
4348
4693
|
>
|
|
4349
|
-
|
|
4350
|
-
[role]="'combobox'"
|
|
4351
|
-
[id]="focusableId"
|
|
4352
|
-
[listId]="listBoxId"
|
|
4353
|
-
[activeDescendant]="activeDescendant"
|
|
4354
|
-
[noDataLabel]="noDataLabel"
|
|
4355
|
-
[userInput]="text"
|
|
4356
|
-
[suggestedText]="getSuggestion()"
|
|
4357
|
-
[disabled]="disabled"
|
|
4358
|
-
[readonly]="readonly"
|
|
4359
|
-
[tabIndex]="tabIndex"
|
|
4360
|
-
[popupOpen]="isOpen"
|
|
4361
|
-
[placeholder]="placeholder"
|
|
4362
|
-
(onNavigate)="handleNavigate($event)"
|
|
4363
|
-
(valueChange)="searchBarChange($event)"
|
|
4364
|
-
(onBlur)="handleBlur()"
|
|
4365
|
-
(onFocus)="handleFocus()"
|
|
4366
|
-
></kendo-searchbar>
|
|
4367
|
-
<span
|
|
4368
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
4369
|
-
class="k-icon k-clear-value k-i-close"
|
|
4370
|
-
[style.visibility]="clearButtonVisiblity"
|
|
4371
|
-
aria-hidden="true"
|
|
4372
|
-
[attr.title]="clearTitle"
|
|
4373
|
-
(click)="clearValue($event)"
|
|
4374
|
-
[kendoEventsOutsideAngular]="{
|
|
4375
|
-
mousedown: preventEventDefault
|
|
4376
|
-
}"
|
|
4377
|
-
>
|
|
4378
|
-
</span>
|
|
4379
|
-
<span
|
|
4380
|
-
#select
|
|
4381
|
-
aria-hidden="true"
|
|
4382
|
-
unselectable="on"
|
|
4383
|
-
class="k-select"
|
|
4384
|
-
[kendoEventsOutsideAngular]="{
|
|
4385
|
-
mousedown: preventEventDefault
|
|
4386
|
-
}"
|
|
4387
|
-
>
|
|
4388
|
-
<span class="k-icon" [ngClass]="buttonClasses">
|
|
4389
|
-
</span>
|
|
4390
|
-
</span>
|
|
4391
|
-
<ng-template #popupTemplate>
|
|
4392
|
-
<!--header template-->
|
|
4393
|
-
<ng-template *ngIf="headerTemplate"
|
|
4394
|
-
[templateContext]="{
|
|
4395
|
-
templateRef: headerTemplate.templateRef
|
|
4396
|
-
}">
|
|
4397
|
-
</ng-template>
|
|
4398
|
-
<!--list-->
|
|
4399
|
-
<kendo-list
|
|
4400
|
-
#optionsList
|
|
4401
|
-
[id]="listBoxId"
|
|
4402
|
-
[optionPrefix]="optionPrefix"
|
|
4403
|
-
[data]="data"
|
|
4404
|
-
[textField]="textField"
|
|
4405
|
-
[valueField]="valueField"
|
|
4406
|
-
[template]="template"
|
|
4407
|
-
[groupTemplate]="groupTemplate"
|
|
4408
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
4409
|
-
[height]="listHeight"
|
|
4410
|
-
[show]="isOpen"
|
|
4411
|
-
[virtual]="virtual"
|
|
4412
|
-
(pageChange)="pageChange($event)"
|
|
4413
|
-
>
|
|
4414
|
-
</kendo-list>
|
|
4415
|
-
<!--no-data template-->
|
|
4416
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
4417
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
4418
|
-
[templateContext]="{
|
|
4419
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
4420
|
-
}">
|
|
4421
|
-
</ng-template>
|
|
4422
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
4423
|
-
<div>{{ noDataText }}</div>
|
|
4424
|
-
</ng-template>
|
|
4425
|
-
</div>
|
|
4426
|
-
<!--footer template-->
|
|
4427
|
-
<ng-template *ngIf="footerTemplate"
|
|
4428
|
-
[templateContext]="{
|
|
4429
|
-
templateRef: footerTemplate.templateRef
|
|
4430
|
-
}">
|
|
4431
|
-
</ng-template>
|
|
4432
|
-
</ng-template>
|
|
4694
|
+
<span class="k-icon k-i-x"></span>
|
|
4433
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>
|
|
4434
4753
|
<ng-template [ngIf]="isOpen">
|
|
4435
4754
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
4436
4755
|
</ng-template>
|
|
@@ -4438,7 +4757,8 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4438
4757
|
`
|
|
4439
4758
|
}),
|
|
4440
4759
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
4441
|
-
__metadata("design:paramtypes", [
|
|
4760
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
4761
|
+
LocalizationService,
|
|
4442
4762
|
PopupService,
|
|
4443
4763
|
SelectionService,
|
|
4444
4764
|
NavigationService,
|
|
@@ -4446,8 +4766,7 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4446
4766
|
DataService,
|
|
4447
4767
|
NgZone,
|
|
4448
4768
|
ChangeDetectorRef,
|
|
4449
|
-
Renderer2,
|
|
4450
|
-
ElementRef, Boolean])
|
|
4769
|
+
Renderer2, Boolean])
|
|
4451
4770
|
], ComboBoxComponent);
|
|
4452
4771
|
|
|
4453
4772
|
/**
|
|
@@ -4519,7 +4838,8 @@ const DROPDOWNLIST_VALUE_ACCESSOR = {
|
|
|
4519
4838
|
* ```
|
|
4520
4839
|
*/
|
|
4521
4840
|
let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponent {
|
|
4522
|
-
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;
|
|
4523
4843
|
this.localization = localization;
|
|
4524
4844
|
this.popupService = popupService;
|
|
4525
4845
|
this.selectionService = selectionService;
|
|
@@ -4528,7 +4848,6 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4528
4848
|
this.dataService = dataService;
|
|
4529
4849
|
this._zone = _zone;
|
|
4530
4850
|
this.renderer = renderer;
|
|
4531
|
-
this.hostElement = hostElement;
|
|
4532
4851
|
this.cdr = cdr;
|
|
4533
4852
|
this.touchEnabled = touchEnabled$$1;
|
|
4534
4853
|
/**
|
|
@@ -4612,7 +4931,8 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4612
4931
|
* Fires each time the DropDownList gets blurred.
|
|
4613
4932
|
*/
|
|
4614
4933
|
this.onBlur = new EventEmitter();
|
|
4615
|
-
this.
|
|
4934
|
+
this.hostClasses = true;
|
|
4935
|
+
this.role = 'listbox';
|
|
4616
4936
|
this.groupIndices = [];
|
|
4617
4937
|
this.listBoxId = guid$1();
|
|
4618
4938
|
this.optionPrefix = guid$1();
|
|
@@ -4624,16 +4944,20 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4624
4944
|
this.last = "";
|
|
4625
4945
|
this.filterFocused = new EventEmitter();
|
|
4626
4946
|
this.filterBlurred = new EventEmitter();
|
|
4627
|
-
this.
|
|
4628
|
-
this.
|
|
4947
|
+
this.hostElementFocused = new EventEmitter();
|
|
4948
|
+
this.hostElementBlurred = new EventEmitter();
|
|
4629
4949
|
this.selectionSubscription = new Subscription();
|
|
4630
4950
|
this._open = false;
|
|
4631
4951
|
this._popupSettings = { animate: true };
|
|
4952
|
+
this._size = 'medium';
|
|
4953
|
+
this._rounded = 'medium';
|
|
4954
|
+
this._fillMode = 'solid';
|
|
4632
4955
|
validatePackage(packageMetadata);
|
|
4633
4956
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
4634
4957
|
this.data = [];
|
|
4635
4958
|
this.subscribeEvents();
|
|
4636
4959
|
this.subscribeTouchEvents();
|
|
4960
|
+
this.subscribeFocusEvents();
|
|
4637
4961
|
this.popupMouseDownHandler = this.onMouseDown.bind(this);
|
|
4638
4962
|
}
|
|
4639
4963
|
get width() {
|
|
@@ -4781,11 +5105,76 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4781
5105
|
get tabIndex() {
|
|
4782
5106
|
return this.tabindex;
|
|
4783
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
|
+
}
|
|
4784
5169
|
/**
|
|
4785
5170
|
* @hidden
|
|
4786
5171
|
*/
|
|
4787
|
-
blurComponent() {
|
|
4788
|
-
this.
|
|
5172
|
+
blurComponent(event) {
|
|
5173
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5174
|
+
return;
|
|
5175
|
+
}
|
|
5176
|
+
event.stopImmediatePropagation();
|
|
5177
|
+
this.hostElementBlurred.emit();
|
|
4789
5178
|
}
|
|
4790
5179
|
/**
|
|
4791
5180
|
* @hidden
|
|
@@ -4796,8 +5185,12 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4796
5185
|
/**
|
|
4797
5186
|
* @hidden
|
|
4798
5187
|
*/
|
|
4799
|
-
focusComponent() {
|
|
4800
|
-
this.
|
|
5188
|
+
focusComponent(event) {
|
|
5189
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
5190
|
+
return;
|
|
5191
|
+
}
|
|
5192
|
+
event.stopImmediatePropagation();
|
|
5193
|
+
this.hostElementFocused.emit();
|
|
4801
5194
|
if (!this.isFocused) {
|
|
4802
5195
|
this.isFocused = true;
|
|
4803
5196
|
if (hasObservers(this.onFocus)) {
|
|
@@ -4810,8 +5203,49 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4810
5203
|
/**
|
|
4811
5204
|
* @hidden
|
|
4812
5205
|
*/
|
|
4813
|
-
|
|
4814
|
-
|
|
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;
|
|
4815
5249
|
let focused = isNaN(this.selectionService.focused) ? this.firstFocusableIndex(firstIndex) : this.selectionService.focused;
|
|
4816
5250
|
let offset = 0;
|
|
4817
5251
|
if (this.disabled || this.readonly) {
|
|
@@ -4867,29 +5301,15 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4867
5301
|
this.focus();
|
|
4868
5302
|
this.togglePopup(!this.isOpen);
|
|
4869
5303
|
}
|
|
4870
|
-
/**
|
|
4871
|
-
* @hidden
|
|
4872
|
-
*/
|
|
4873
|
-
onResize() {
|
|
4874
|
-
if (this._open) {
|
|
4875
|
-
const popupWrapper = this.popupRef.popupElement;
|
|
4876
|
-
const { min, max } = this.width;
|
|
4877
|
-
popupWrapper.style.minWidth = min;
|
|
4878
|
-
popupWrapper.style.width = max;
|
|
4879
|
-
}
|
|
4880
|
-
}
|
|
4881
|
-
get dir() {
|
|
4882
|
-
return this.direction;
|
|
4883
|
-
}
|
|
4884
5304
|
set isFocused(isFocused) {
|
|
4885
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
5305
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
4886
5306
|
this._isFocused = isFocused;
|
|
4887
5307
|
}
|
|
4888
5308
|
get isFocused() {
|
|
4889
5309
|
return this._isFocused;
|
|
4890
5310
|
}
|
|
4891
5311
|
ngOnInit() {
|
|
4892
|
-
this.renderer.removeAttribute(this.
|
|
5312
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
4893
5313
|
this.localizationChangesSubscription = this.localization
|
|
4894
5314
|
.changes.subscribe(({ rtl }) => {
|
|
4895
5315
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -4897,6 +5317,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4897
5317
|
});
|
|
4898
5318
|
this.setMessages();
|
|
4899
5319
|
this.assignAriaDescribedBy();
|
|
5320
|
+
this.setComponentClasses();
|
|
4900
5321
|
}
|
|
4901
5322
|
/**
|
|
4902
5323
|
* @hidden
|
|
@@ -5069,6 +5490,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5069
5490
|
get buttonClasses() {
|
|
5070
5491
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
5071
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
|
+
}
|
|
5072
5511
|
/**
|
|
5073
5512
|
* @hidden
|
|
5074
5513
|
*/
|
|
@@ -5203,13 +5642,13 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5203
5642
|
.subscribe(this.handleEnter.bind(this));
|
|
5204
5643
|
this.escSubscription = this.navigationService.esc
|
|
5205
5644
|
.subscribe(this.handleEscape.bind(this));
|
|
5206
|
-
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))))
|
|
5207
5646
|
.subscribe(() => {
|
|
5208
|
-
this.
|
|
5647
|
+
this.hostElementBlurred.emit();
|
|
5209
5648
|
});
|
|
5210
5649
|
this._zone.runOutsideAngular(() => {
|
|
5211
5650
|
this.componentBlurredSubscription =
|
|
5212
|
-
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))
|
|
5213
5652
|
.subscribe(() => this.componentBlur());
|
|
5214
5653
|
});
|
|
5215
5654
|
}
|
|
@@ -5221,7 +5660,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5221
5660
|
// Roll up DropDownList on iOS when tapped outside
|
|
5222
5661
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
5223
5662
|
const target = e.target;
|
|
5224
|
-
if (this.isFocused && !inDropDown(this.
|
|
5663
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
5225
5664
|
this._zone.run(() => {
|
|
5226
5665
|
if (this.filterFocused) {
|
|
5227
5666
|
// Close popup if filter is focused
|
|
@@ -5232,6 +5671,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5232
5671
|
}
|
|
5233
5672
|
}));
|
|
5234
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
|
+
}
|
|
5235
5692
|
unsubscribeEvents() {
|
|
5236
5693
|
if (!isDocumentAvailable()) {
|
|
5237
5694
|
return;
|
|
@@ -5243,6 +5700,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5243
5700
|
this.escSubscription.unsubscribe();
|
|
5244
5701
|
this.componentBlurredSubscription.unsubscribe();
|
|
5245
5702
|
this.filterBlurredSubscription.unsubscribe();
|
|
5703
|
+
this.unSubscribeFocusEvents();
|
|
5246
5704
|
if (this.touchstartDisposeHandler) {
|
|
5247
5705
|
this.touchstartDisposeHandler();
|
|
5248
5706
|
}
|
|
@@ -5334,7 +5792,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5334
5792
|
hasObservers(this.close) ||
|
|
5335
5793
|
hasObservers(this.onBlur) ||
|
|
5336
5794
|
hasObservers(this.filterChange) ||
|
|
5337
|
-
isUntouched(this.
|
|
5795
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
5338
5796
|
this._zone.run(() => {
|
|
5339
5797
|
if (valueHasChanged) {
|
|
5340
5798
|
this.selectionService.change(this.selectionService.selected[0]);
|
|
@@ -5514,6 +5972,17 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5514
5972
|
const newValue = `${this.valueLabelId} ${trimmed}`.trim();
|
|
5515
5973
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
5516
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
|
+
}
|
|
5517
5986
|
};
|
|
5518
5987
|
__decorate([
|
|
5519
5988
|
Input(),
|
|
@@ -5602,6 +6071,21 @@ __decorate([
|
|
|
5602
6071
|
__metadata("design:type", Number),
|
|
5603
6072
|
__metadata("design:paramtypes", [Number])
|
|
5604
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);
|
|
5605
6089
|
__decorate([
|
|
5606
6090
|
Output(),
|
|
5607
6091
|
__metadata("design:type", EventEmitter)
|
|
@@ -5674,24 +6158,90 @@ __decorate([
|
|
|
5674
6158
|
ViewChild('popupTemplate', { static: true }),
|
|
5675
6159
|
__metadata("design:type", TemplateRef)
|
|
5676
6160
|
], DropDownListComponent.prototype, "popupTemplate", void 0);
|
|
5677
|
-
__decorate([
|
|
5678
|
-
ViewChild('wrapper', { static: true }),
|
|
5679
|
-
__metadata("design:type", ElementRef)
|
|
5680
|
-
], DropDownListComponent.prototype, "wrapper", void 0);
|
|
5681
6161
|
__decorate([
|
|
5682
6162
|
ViewChild('optionsList', { static: false }),
|
|
5683
6163
|
__metadata("design:type", ListComponent)
|
|
5684
6164
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
5685
6165
|
__decorate([
|
|
5686
|
-
HostBinding('class.k-
|
|
5687
|
-
HostBinding('class.k-
|
|
6166
|
+
HostBinding('class.k-dropdownlist'),
|
|
6167
|
+
HostBinding('class.k-picker'),
|
|
5688
6168
|
__metadata("design:type", Boolean)
|
|
5689
|
-
], 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);
|
|
5690
6186
|
__decorate([
|
|
5691
6187
|
HostBinding('attr.dir'),
|
|
5692
6188
|
__metadata("design:type", String),
|
|
5693
6189
|
__metadata("design:paramtypes", [])
|
|
5694
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);
|
|
5695
6245
|
DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
5696
6246
|
Component({
|
|
5697
6247
|
exportAs: 'kendoDropDownList',
|
|
@@ -5720,128 +6270,128 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5720
6270
|
noDataText="NO DATA FOUND"
|
|
5721
6271
|
>
|
|
5722
6272
|
</ng-container>
|
|
5723
|
-
<span
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
(click)="click($event)"
|
|
5743
|
-
[kendoEventsOutsideAngular]="{
|
|
5744
|
-
focus: focusComponent,
|
|
5745
|
-
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
|
|
5746
6292
|
}"
|
|
5747
|
-
[scope]="this"
|
|
5748
6293
|
>
|
|
5749
|
-
<span
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
</span>
|
|
5758
|
-
<span class="k-select" unselectable="on">
|
|
5759
|
-
<span
|
|
5760
|
-
class="k-icon"
|
|
5761
|
-
unselectable="on"
|
|
5762
|
-
[ngClass]="buttonClasses"
|
|
5763
|
-
>
|
|
5764
|
-
</span>
|
|
5765
|
-
</span>
|
|
5766
|
-
<ng-template #popupTemplate>
|
|
5767
|
-
<!--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-->
|
|
5768
6302
|
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
</div>
|
|
5792
|
-
</ng-template>
|
|
5793
|
-
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
5794
|
-
<div class="k-list-optionlabel" [ngClass]="{ 'k-state-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
5795
|
-
<ng-template
|
|
5796
|
-
[templateContext]="{
|
|
5797
|
-
templateRef: itemTemplate.templateRef,
|
|
5798
|
-
$implicit: defaultItem
|
|
5799
|
-
}">
|
|
5800
|
-
</ng-template>
|
|
5801
|
-
</div>
|
|
5802
|
-
</ng-template>
|
|
5803
|
-
<!--header template-->
|
|
5804
|
-
<ng-template *ngIf="headerTemplate"
|
|
5805
|
-
[templateContext]="{
|
|
5806
|
-
templateRef: headerTemplate.templateRef
|
|
5807
|
-
}">
|
|
5808
|
-
</ng-template>
|
|
5809
|
-
<!--list-->
|
|
5810
|
-
<kendo-list
|
|
5811
|
-
#optionsList
|
|
5812
|
-
[id]="listBoxId"
|
|
5813
|
-
[optionPrefix]="optionPrefix"
|
|
5814
|
-
[data]="data"
|
|
5815
|
-
[textField]="textField"
|
|
5816
|
-
[valueField]="valueField"
|
|
5817
|
-
[template]="itemTemplate"
|
|
5818
|
-
[groupTemplate]="groupTemplate"
|
|
5819
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
5820
|
-
[height]="listHeight"
|
|
5821
|
-
[show]="isOpen"
|
|
5822
|
-
[virtual]="virtual"
|
|
5823
|
-
(pageChange)="pageChange($event)"
|
|
5824
|
-
>
|
|
5825
|
-
</kendo-list>
|
|
5826
|
-
<!--no-data template-->
|
|
5827
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
5828
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
5829
|
-
[templateContext]="{
|
|
5830
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
5831
|
-
}">
|
|
5832
|
-
</ng-template>
|
|
5833
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
5834
|
-
<div>{{ noDataText }}</div>
|
|
5835
|
-
</ng-template>
|
|
5836
|
-
</div>
|
|
5837
|
-
<!--footer template-->
|
|
5838
|
-
<ng-template *ngIf="footerTemplate"
|
|
5839
|
-
[templateContext]="{
|
|
5840
|
-
templateRef: footerTemplate.templateRef
|
|
5841
|
-
}">
|
|
5842
|
-
</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>
|
|
5843
6325
|
</ng-template>
|
|
5844
|
-
|
|
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>
|
|
5845
6395
|
<ng-template [ngIf]="isOpen">
|
|
5846
6396
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
5847
6397
|
</ng-template>
|
|
@@ -5849,7 +6399,8 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5849
6399
|
`
|
|
5850
6400
|
}),
|
|
5851
6401
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
5852
|
-
__metadata("design:paramtypes", [
|
|
6402
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
6403
|
+
LocalizationService,
|
|
5853
6404
|
PopupService,
|
|
5854
6405
|
SelectionService,
|
|
5855
6406
|
NavigationService,
|
|
@@ -5857,7 +6408,6 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5857
6408
|
DataService,
|
|
5858
6409
|
NgZone,
|
|
5859
6410
|
Renderer2,
|
|
5860
|
-
ElementRef,
|
|
5861
6411
|
ChangeDetectorRef, Boolean])
|
|
5862
6412
|
], DropDownListComponent);
|
|
5863
6413
|
|
|
@@ -6027,7 +6577,8 @@ const MULTISELECT_VALUE_ACCESSOR = {
|
|
|
6027
6577
|
* ```
|
|
6028
6578
|
*/
|
|
6029
6579
|
let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
6030
|
-
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;
|
|
6031
6582
|
this.localization = localization;
|
|
6032
6583
|
this.popupService = popupService;
|
|
6033
6584
|
this.dataService = dataService;
|
|
@@ -6037,7 +6588,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6037
6588
|
this.cdr = cdr;
|
|
6038
6589
|
this.differs = differs;
|
|
6039
6590
|
this.renderer = renderer;
|
|
6040
|
-
this.hostElement = hostElement;
|
|
6041
6591
|
this._zone = _zone;
|
|
6042
6592
|
this.touchEnabled = touchEnabled$$1;
|
|
6043
6593
|
this.listBoxId = guid$1();
|
|
@@ -6198,8 +6748,11 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6198
6748
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
6199
6749
|
*/
|
|
6200
6750
|
this.removeTag = new EventEmitter();
|
|
6201
|
-
this.
|
|
6751
|
+
this.hostClasses = true;
|
|
6202
6752
|
this.initialized = false;
|
|
6753
|
+
this._size = 'medium';
|
|
6754
|
+
this._rounded = 'medium';
|
|
6755
|
+
this._fillMode = 'solid';
|
|
6203
6756
|
this.onChangeCallback = (_) => { };
|
|
6204
6757
|
this.onTouchedCallback = (_) => { };
|
|
6205
6758
|
this._placeholder = '';
|
|
@@ -6273,7 +6826,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6273
6826
|
if (hasObservers(this.onBlur) ||
|
|
6274
6827
|
hasObservers(this.filterChange) ||
|
|
6275
6828
|
hasObservers(this.close) ||
|
|
6276
|
-
isUntouched(this.
|
|
6829
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
6277
6830
|
this._zone.run(() => {
|
|
6278
6831
|
this.closePopup();
|
|
6279
6832
|
if (!(this.isOpen && this.allowCustom)) {
|
|
@@ -6290,22 +6843,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6290
6843
|
this.closePopup();
|
|
6291
6844
|
}
|
|
6292
6845
|
}
|
|
6293
|
-
/**
|
|
6294
|
-
* @hidden
|
|
6295
|
-
*/
|
|
6296
|
-
wrapperMousedown(event) {
|
|
6297
|
-
const inputElement = this.searchbar.input.nativeElement;
|
|
6298
|
-
if (event.button === 0) {
|
|
6299
|
-
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
6300
|
-
return;
|
|
6301
|
-
}
|
|
6302
|
-
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
6303
|
-
this.searchbar.focus();
|
|
6304
|
-
}
|
|
6305
|
-
this.togglePopup(!this.isOpen);
|
|
6306
|
-
event.preventDefault();
|
|
6307
|
-
}
|
|
6308
|
-
}
|
|
6309
6846
|
/**
|
|
6310
6847
|
* @hidden
|
|
6311
6848
|
*/
|
|
@@ -6383,6 +6920,67 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6383
6920
|
get tabIndex() {
|
|
6384
6921
|
return this.tabindex;
|
|
6385
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
|
+
}
|
|
6386
6984
|
/**
|
|
6387
6985
|
* The hint which is displayed when the component is empty.
|
|
6388
6986
|
* When the values are selected, it disappears.
|
|
@@ -6457,6 +7055,25 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6457
7055
|
get disabledClass() {
|
|
6458
7056
|
return this.disabled;
|
|
6459
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
|
+
}
|
|
6460
7077
|
get listContainerClasses() {
|
|
6461
7078
|
const containerClasses = ['k-list-container', 'k-reset'];
|
|
6462
7079
|
if (this.popupSettings.popupClass) {
|
|
@@ -6464,6 +7081,12 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6464
7081
|
}
|
|
6465
7082
|
return containerClasses;
|
|
6466
7083
|
}
|
|
7084
|
+
/**
|
|
7085
|
+
* @hidden
|
|
7086
|
+
*/
|
|
7087
|
+
get customItemSizeClass() {
|
|
7088
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
7089
|
+
}
|
|
6467
7090
|
get width() {
|
|
6468
7091
|
let wrapperOffsetWidth = 0;
|
|
6469
7092
|
if (isDocumentAvailable()) {
|
|
@@ -6708,7 +7331,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6708
7331
|
this.valueChangeDetected = false;
|
|
6709
7332
|
}
|
|
6710
7333
|
ngOnInit() {
|
|
6711
|
-
this.renderer.removeAttribute(this.
|
|
7334
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
6712
7335
|
this.createCustomValueStream();
|
|
6713
7336
|
this.localizationChangeSubscription = this.localization
|
|
6714
7337
|
.changes.subscribe(({ rtl }) => {
|
|
@@ -6717,6 +7340,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6717
7340
|
});
|
|
6718
7341
|
this.setMessages();
|
|
6719
7342
|
this.setState(this.value);
|
|
7343
|
+
this.setComponentClasses();
|
|
6720
7344
|
this.initialized = true;
|
|
6721
7345
|
}
|
|
6722
7346
|
ngOnChanges(changes) {
|
|
@@ -6804,7 +7428,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6804
7428
|
this.cdr.markForCheck();
|
|
6805
7429
|
}
|
|
6806
7430
|
set isFocused(isFocused) {
|
|
6807
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
7431
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
6808
7432
|
this._isFocused = isFocused;
|
|
6809
7433
|
}
|
|
6810
7434
|
get isFocused() {
|
|
@@ -6841,7 +7465,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6841
7465
|
// Roll up MultiSelect on iOS when tapped outside
|
|
6842
7466
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
6843
7467
|
const target = e.target;
|
|
6844
|
-
if ((this.isFocused || this.isOpen) && !inDropDown(this.
|
|
7468
|
+
if ((this.isFocused || this.isOpen) && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
6845
7469
|
this._zone.run(() => {
|
|
6846
7470
|
this.blur();
|
|
6847
7471
|
if (this.isOpen) {
|
|
@@ -7208,8 +7832,19 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
7208
7832
|
});
|
|
7209
7833
|
});
|
|
7210
7834
|
}
|
|
7211
|
-
|
|
7212
|
-
|
|
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([
|
|
7213
7848
|
Input(),
|
|
7214
7849
|
__metadata("design:type", String)
|
|
7215
7850
|
], MultiSelectComponent.prototype, "focusableId", void 0);
|
|
@@ -7248,6 +7883,21 @@ __decorate([
|
|
|
7248
7883
|
__metadata("design:type", Number),
|
|
7249
7884
|
__metadata("design:paramtypes", [Number])
|
|
7250
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);
|
|
7251
7901
|
__decorate([
|
|
7252
7902
|
Input(),
|
|
7253
7903
|
__metadata("design:type", String),
|
|
@@ -7358,10 +8008,6 @@ __decorate([
|
|
|
7358
8008
|
ViewChild('popupTemplate', { static: true }),
|
|
7359
8009
|
__metadata("design:type", TemplateRef)
|
|
7360
8010
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
7361
|
-
__decorate([
|
|
7362
|
-
ViewChild('wrapper', { static: true }),
|
|
7363
|
-
__metadata("design:type", ElementRef)
|
|
7364
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
7365
8011
|
__decorate([
|
|
7366
8012
|
ViewChild('optionsList', { static: false }),
|
|
7367
8013
|
__metadata("design:type", ListComponent)
|
|
@@ -7403,20 +8049,31 @@ __decorate([
|
|
|
7403
8049
|
__metadata("design:type", NoDataTemplateDirective)
|
|
7404
8050
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
7405
8051
|
__decorate([
|
|
7406
|
-
HostBinding('class.k-widget'),
|
|
7407
8052
|
HostBinding('class.k-multiselect'),
|
|
8053
|
+
HostBinding('class.k-input'),
|
|
7408
8054
|
__metadata("design:type", Boolean)
|
|
7409
|
-
], MultiSelectComponent.prototype, "
|
|
8055
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
7410
8056
|
__decorate([
|
|
7411
8057
|
HostBinding('attr.dir'),
|
|
7412
8058
|
__metadata("design:type", String),
|
|
7413
8059
|
__metadata("design:paramtypes", [])
|
|
7414
8060
|
], MultiSelectComponent.prototype, "dir", null);
|
|
7415
8061
|
__decorate([
|
|
7416
|
-
HostBinding('class.k-
|
|
8062
|
+
HostBinding('class.k-disabled'),
|
|
7417
8063
|
__metadata("design:type", Boolean),
|
|
7418
8064
|
__metadata("design:paramtypes", [])
|
|
7419
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);
|
|
7420
8077
|
MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
7421
8078
|
Component({
|
|
7422
8079
|
exportAs: 'kendoMultiSelect',
|
|
@@ -7448,24 +8105,22 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7448
8105
|
clearTitle="clear"
|
|
7449
8106
|
>
|
|
7450
8107
|
</ng-container>
|
|
7451
|
-
<
|
|
7452
|
-
|
|
7453
|
-
|
|
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)"
|
|
7454
8123
|
>
|
|
7455
|
-
<kendo-taglist
|
|
7456
|
-
[id]="tagListId"
|
|
7457
|
-
[tags]="tags"
|
|
7458
|
-
[textField]="textField"
|
|
7459
|
-
[valueField]="valueField"
|
|
7460
|
-
[focused]="focusedTagIndex"
|
|
7461
|
-
[disabled]="disabled"
|
|
7462
|
-
[template]="tagTemplate"
|
|
7463
|
-
[groupTemplate]="groupTagTemplate"
|
|
7464
|
-
[tagPrefix]="tagPrefix"
|
|
7465
|
-
[disabledIndices]="disabledIndices"
|
|
7466
|
-
(removeTag)="handleRemoveTag($event)"
|
|
7467
|
-
>
|
|
7468
|
-
</kendo-taglist>
|
|
7469
8124
|
<kendo-searchbar
|
|
7470
8125
|
#searchbar
|
|
7471
8126
|
[id]="focusableId"
|
|
@@ -7485,22 +8140,24 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7485
8140
|
(onFocus)="onSearchBarFocus()"
|
|
7486
8141
|
>
|
|
7487
8142
|
</kendo-searchbar>
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
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>
|
|
7504
8161
|
<ng-template #popupTemplate>
|
|
7505
8162
|
<!--header template-->
|
|
7506
8163
|
<ng-template *ngIf="headerTemplate"
|
|
@@ -7509,8 +8166,12 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7509
8166
|
}">
|
|
7510
8167
|
</ng-template>
|
|
7511
8168
|
<!--custom item template-->
|
|
7512
|
-
<div
|
|
7513
|
-
|
|
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">
|
|
7514
8175
|
<ng-template *ngIf="customItemTemplate;else default_custom_item_template"
|
|
7515
8176
|
[templateContext]="{
|
|
7516
8177
|
templateRef: customItemTemplate.templateRef,
|
|
@@ -7524,6 +8185,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7524
8185
|
<!--list-->
|
|
7525
8186
|
<kendo-list
|
|
7526
8187
|
#optionsList
|
|
8188
|
+
[size]="size"
|
|
8189
|
+
[rounded]="rounded"
|
|
7527
8190
|
[id]="listBoxId"
|
|
7528
8191
|
[optionPrefix]="optionPrefix"
|
|
7529
8192
|
[data]="data"
|
|
@@ -7541,7 +8204,7 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7541
8204
|
>
|
|
7542
8205
|
</kendo-list>
|
|
7543
8206
|
<!--no data template-->
|
|
7544
|
-
<div class="k-
|
|
8207
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
7545
8208
|
<ng-template [ngIf]="noDataTemplate"
|
|
7546
8209
|
[templateContext]="{
|
|
7547
8210
|
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
@@ -7565,7 +8228,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7565
8228
|
`
|
|
7566
8229
|
}),
|
|
7567
8230
|
__param(11, Optional()), __param(11, Inject(TOUCH_ENABLED)),
|
|
7568
|
-
__metadata("design:paramtypes", [
|
|
8231
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
8232
|
+
LocalizationService,
|
|
7569
8233
|
PopupService,
|
|
7570
8234
|
DataService,
|
|
7571
8235
|
SelectionService,
|
|
@@ -7574,7 +8238,6 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7574
8238
|
ChangeDetectorRef,
|
|
7575
8239
|
KeyValueDiffers,
|
|
7576
8240
|
Renderer2,
|
|
7577
|
-
ElementRef,
|
|
7578
8241
|
NgZone, Boolean])
|
|
7579
8242
|
], MultiSelectComponent);
|
|
7580
8243
|
|
|
@@ -7748,8 +8411,8 @@ var MultiColumnComboBoxComponent_1;
|
|
|
7748
8411
|
* Represents the [Kendo UI MultiColumnComboBox component for Angular]({% slug overview_multicolumncombobox %}).
|
|
7749
8412
|
*/
|
|
7750
8413
|
let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiColumnComboBoxComponent extends ComboBoxComponent {
|
|
7751
|
-
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
7752
|
-
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);
|
|
7753
8416
|
/**
|
|
7754
8417
|
* @hidden
|
|
7755
8418
|
*/
|
|
@@ -7760,6 +8423,12 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7760
8423
|
// use a smaller virtual page size as columns with multiple cells can cause poor performance
|
|
7761
8424
|
this.defaultVirtualPageSize = 30;
|
|
7762
8425
|
}
|
|
8426
|
+
/**
|
|
8427
|
+
* @hidden
|
|
8428
|
+
*/
|
|
8429
|
+
get isDisabled() {
|
|
8430
|
+
return this.disabled;
|
|
8431
|
+
}
|
|
7763
8432
|
/**
|
|
7764
8433
|
* @hidden
|
|
7765
8434
|
*/
|
|
@@ -7774,18 +8443,19 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7774
8443
|
const max = isNaN(width) ? width : `${width}px`;
|
|
7775
8444
|
return { min, max };
|
|
7776
8445
|
}
|
|
8446
|
+
/**
|
|
8447
|
+
* @hidden
|
|
8448
|
+
*/
|
|
8449
|
+
get tableSizeClass() {
|
|
8450
|
+
return `${this.size ? getSizeClass('table', this.size) : ''}`;
|
|
8451
|
+
}
|
|
7777
8452
|
/**
|
|
7778
8453
|
* @hidden
|
|
7779
8454
|
*/
|
|
7780
8455
|
get listContainerClasses() {
|
|
7781
8456
|
return [
|
|
7782
|
-
'k-list-container',
|
|
7783
8457
|
'k-popup',
|
|
7784
|
-
'k-
|
|
7785
|
-
'k-group',
|
|
7786
|
-
'k-dropdowngrid-popup',
|
|
7787
|
-
'k-popup-flush',
|
|
7788
|
-
'k-state-border-up'
|
|
8458
|
+
'k-dropdowngrid-popup'
|
|
7789
8459
|
].concat(this.popupSettings.popupClass || []);
|
|
7790
8460
|
}
|
|
7791
8461
|
ngAfterViewInit() {
|
|
@@ -7861,6 +8531,11 @@ __decorate([
|
|
|
7861
8531
|
HostBinding('class.k-dropdowngrid'),
|
|
7862
8532
|
__metadata("design:type", Boolean)
|
|
7863
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);
|
|
7864
8539
|
__decorate([
|
|
7865
8540
|
ContentChildren(ComboBoxColumnComponent),
|
|
7866
8541
|
__metadata("design:type", QueryList)
|
|
@@ -7908,63 +8583,56 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7908
8583
|
clearTitle="clear"
|
|
7909
8584
|
>
|
|
7910
8585
|
</ng-container>
|
|
7911
|
-
<
|
|
7912
|
-
#
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
[
|
|
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()"
|
|
7916
8604
|
>
|
|
7917
|
-
|
|
7918
|
-
#searchbar
|
|
7919
|
-
[role]="'combobox'"
|
|
7920
|
-
[id]="focusableId"
|
|
7921
|
-
[listId]="listBoxId"
|
|
7922
|
-
[activeDescendant]="activeDescendant"
|
|
7923
|
-
[noDataLabel]="noDataLabel"
|
|
7924
|
-
[userInput]="text"
|
|
7925
|
-
[suggestedText]="getSuggestion()"
|
|
7926
|
-
[disabled]="disabled"
|
|
7927
|
-
[readonly]="readonly"
|
|
7928
|
-
[tabIndex]="tabIndex"
|
|
7929
|
-
[popupOpen]="isOpen"
|
|
7930
|
-
[placeholder]="placeholder"
|
|
7931
|
-
(onNavigate)="handleNavigate($event)"
|
|
7932
|
-
(valueChange)="searchBarChange($event)"
|
|
7933
|
-
(onBlur)="handleBlur()"
|
|
7934
|
-
(onFocus)="handleFocus()"
|
|
7935
|
-
>
|
|
7936
|
-
</kendo-searchbar>
|
|
7937
|
-
|
|
7938
|
-
<span
|
|
7939
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
7940
|
-
class="k-icon k-clear-value k-i-close"
|
|
7941
|
-
[style.visibility]="clearButtonVisiblity"
|
|
7942
|
-
aria-hidden="true"
|
|
7943
|
-
[attr.title]="clearTitle"
|
|
7944
|
-
(click)="clearValue($event)"
|
|
7945
|
-
[kendoEventsOutsideAngular]="{
|
|
7946
|
-
mousedown: preventEventDefault
|
|
7947
|
-
}"
|
|
7948
|
-
>
|
|
7949
|
-
</span>
|
|
8605
|
+
</kendo-searchbar>
|
|
7950
8606
|
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
>
|
|
7964
|
-
</span>
|
|
7965
|
-
</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>
|
|
7966
8619
|
</span>
|
|
7967
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
|
+
|
|
7968
8636
|
<ng-template #popupTemplate>
|
|
7969
8637
|
<!--user-defined header template -->
|
|
7970
8638
|
<ng-template
|
|
@@ -7975,125 +8643,139 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7975
8643
|
>
|
|
7976
8644
|
</ng-template>
|
|
7977
8645
|
|
|
7978
|
-
<!--
|
|
7979
|
-
<div
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
[style.width.px]="column.width"
|
|
7990
|
-
/>
|
|
7991
|
-
</ng-container>
|
|
7992
|
-
</colgroup>
|
|
7993
|
-
<tbody>
|
|
7994
|
-
<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>
|
|
7995
8657
|
<ng-container *ngFor="let column of columns">
|
|
7996
|
-
<
|
|
8658
|
+
<col
|
|
7997
8659
|
*ngIf="!column.hidden && column.matchesMedia"
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
[ngClass]="column.headerClass"
|
|
8001
|
-
>
|
|
8002
|
-
<ng-container *ngIf="!column.headerTemplate">
|
|
8003
|
-
{{ column.title || column.field }}
|
|
8004
|
-
</ng-container>
|
|
8005
|
-
<ng-template
|
|
8006
|
-
*ngIf="column.headerTemplate"
|
|
8007
|
-
[templateContext]="{
|
|
8008
|
-
templateRef: column.headerTemplate?.templateRef,
|
|
8009
|
-
$implicit: column,
|
|
8010
|
-
column: column
|
|
8011
|
-
}"
|
|
8012
|
-
>
|
|
8013
|
-
</ng-template>
|
|
8014
|
-
</th>
|
|
8660
|
+
[style.width.px]="column.width"
|
|
8661
|
+
/>
|
|
8015
8662
|
</ng-container>
|
|
8016
|
-
</
|
|
8017
|
-
|
|
8018
|
-
|
|
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>
|
|
8019
8691
|
</div>
|
|
8020
|
-
</div>
|
|
8021
8692
|
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
>
|
|
8032
|
-
<ng-container *ngIf="!column.cellTemplate">
|
|
8033
|
-
{{ textFrom(dataItem, column.field) }}
|
|
8034
|
-
</ng-container>
|
|
8035
|
-
<ng-template
|
|
8036
|
-
*ngIf="column.cellTemplate"
|
|
8037
|
-
[templateContext]="{
|
|
8038
|
-
templateRef: column.cellTemplate?.templateRef,
|
|
8039
|
-
$implicit: dataItem,
|
|
8040
|
-
dataItem: dataItem,
|
|
8041
|
-
column: column
|
|
8042
|
-
}"
|
|
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"
|
|
8043
8702
|
>
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
[height]="listHeight"
|
|
8061
|
-
[show]="isOpen"
|
|
8062
|
-
[virtual]="virtual"
|
|
8063
|
-
[listClass]="'k-reset k-grid-list'"
|
|
8064
|
-
(pageChange)="pageChange($event)"
|
|
8065
|
-
(listResize)="updateHeaderPadding(header)"
|
|
8066
|
-
>
|
|
8067
|
-
</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>
|
|
8068
8719
|
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
[
|
|
8076
|
-
[
|
|
8077
|
-
|
|
8078
|
-
|
|
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)"
|
|
8079
8737
|
>
|
|
8080
|
-
</
|
|
8081
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
8082
|
-
<div>{{ noDataText }}</div>
|
|
8083
|
-
</ng-template>
|
|
8084
|
-
</div>
|
|
8738
|
+
</kendo-list>
|
|
8085
8739
|
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8740
|
+
<!--no-data template-->
|
|
8741
|
+
<div
|
|
8742
|
+
class="k-no-data"
|
|
8743
|
+
*ngIf="data.length === 0"
|
|
8744
|
+
>
|
|
8089
8745
|
<ng-template
|
|
8746
|
+
[ngIf]="noDataTemplate"
|
|
8090
8747
|
[templateContext]="{
|
|
8091
|
-
templateRef:
|
|
8748
|
+
templateRef: noDataTemplate?.templateRef
|
|
8092
8749
|
}"
|
|
8093
8750
|
>
|
|
8094
8751
|
</ng-template>
|
|
8752
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
8753
|
+
<div>{{ noDataText }}</div>
|
|
8754
|
+
</ng-template>
|
|
8095
8755
|
</div>
|
|
8096
|
-
|
|
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
|
+
|
|
8097
8779
|
</ng-template>
|
|
8098
8780
|
|
|
8099
8781
|
<kendo-resize-sensor
|
|
@@ -8151,16 +8833,18 @@ const isNodeVisible = () => true;
|
|
|
8151
8833
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
8152
8834
|
*/
|
|
8153
8835
|
let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponent {
|
|
8154
|
-
constructor(popupService, navigationService, renderer,
|
|
8836
|
+
constructor(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled$$1) {
|
|
8837
|
+
this.wrapper = wrapper;
|
|
8155
8838
|
this.popupService = popupService;
|
|
8156
8839
|
this.navigationService = navigationService;
|
|
8157
8840
|
this.renderer = renderer;
|
|
8158
|
-
this.hostElement = hostElement;
|
|
8159
8841
|
this._zone = _zone;
|
|
8160
8842
|
this.cdr = cdr;
|
|
8161
8843
|
this.localization = localization;
|
|
8162
8844
|
this.touchEnabled = touchEnabled$$1;
|
|
8163
8845
|
this.hostClasses = true;
|
|
8846
|
+
this.role = 'listbox';
|
|
8847
|
+
this.ariaHasPopup = 'tree';
|
|
8164
8848
|
/**
|
|
8165
8849
|
* Fires each time the popup is about to open
|
|
8166
8850
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -8295,15 +8979,52 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8295
8979
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
8296
8980
|
this._tabindex = 0;
|
|
8297
8981
|
this._isFocused = false;
|
|
8982
|
+
this._size = 'medium';
|
|
8983
|
+
this._rounded = 'medium';
|
|
8984
|
+
this._fillMode = 'solid';
|
|
8298
8985
|
this.subscriptions = [];
|
|
8299
8986
|
this.onTouchedCallback = noop;
|
|
8300
8987
|
this.onChangeCallback = noop;
|
|
8301
8988
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
8302
8989
|
this.subscribeEvents();
|
|
8303
8990
|
this.subscribeTouchEvents();
|
|
8991
|
+
this.subscribeFocusEvents();
|
|
8992
|
+
}
|
|
8993
|
+
get isDisabled() {
|
|
8994
|
+
return this.disabled;
|
|
8995
|
+
}
|
|
8996
|
+
get isLoading() {
|
|
8997
|
+
return this.loading;
|
|
8304
8998
|
}
|
|
8305
|
-
get
|
|
8306
|
-
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
|
+
});
|
|
8307
9028
|
}
|
|
8308
9029
|
set treeview(treeview) {
|
|
8309
9030
|
if (treeview) {
|
|
@@ -8382,8 +9103,69 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8382
9103
|
get tabindex() {
|
|
8383
9104
|
return this.disabled ? -1 : this._tabindex;
|
|
8384
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
|
+
}
|
|
8385
9167
|
set isFocused(isFocused) {
|
|
8386
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
9168
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
8387
9169
|
this._isFocused = isFocused;
|
|
8388
9170
|
}
|
|
8389
9171
|
get isFocused() {
|
|
@@ -8478,13 +9260,14 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8478
9260
|
return this.isNodeVisible;
|
|
8479
9261
|
}
|
|
8480
9262
|
ngOnInit() {
|
|
8481
|
-
this.renderer.removeAttribute(this.
|
|
9263
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8482
9264
|
this.assignAriaDescribedBy();
|
|
8483
9265
|
this.subscriptions.push(this.localization
|
|
8484
9266
|
.changes.subscribe(({ rtl }) => {
|
|
8485
9267
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8486
9268
|
this.cdr.markForCheck();
|
|
8487
9269
|
}));
|
|
9270
|
+
this.setComponentClasses();
|
|
8488
9271
|
}
|
|
8489
9272
|
/**
|
|
8490
9273
|
* @hidden
|
|
@@ -8535,7 +9318,11 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8535
9318
|
/**
|
|
8536
9319
|
* @hidden
|
|
8537
9320
|
*/
|
|
8538
|
-
handleFocus() {
|
|
9321
|
+
handleFocus(event) {
|
|
9322
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9323
|
+
return;
|
|
9324
|
+
}
|
|
9325
|
+
event.stopImmediatePropagation();
|
|
8539
9326
|
if (!this.isFocused) {
|
|
8540
9327
|
this.isFocused = true;
|
|
8541
9328
|
if (hasObservers(this.onFocus)) {
|
|
@@ -8550,13 +9337,13 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8550
9337
|
*/
|
|
8551
9338
|
handleBlur(e) {
|
|
8552
9339
|
const relatedTarget = e && e.relatedTarget;
|
|
8553
|
-
if (this.
|
|
9340
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
8554
9341
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
8555
9342
|
return;
|
|
8556
9343
|
}
|
|
8557
9344
|
this.isFocused = false;
|
|
8558
9345
|
if (hasObservers(this.onBlur) ||
|
|
8559
|
-
isUntouched(this.
|
|
9346
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
8560
9347
|
this._zone.run(() => {
|
|
8561
9348
|
this.togglePopup(false);
|
|
8562
9349
|
this.onBlur.emit();
|
|
@@ -8567,24 +9354,6 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8567
9354
|
this.togglePopup(false);
|
|
8568
9355
|
}
|
|
8569
9356
|
}
|
|
8570
|
-
/**
|
|
8571
|
-
* @hidden
|
|
8572
|
-
*/
|
|
8573
|
-
handleKeydown(event) {
|
|
8574
|
-
if (this.disabled || this.readonly) {
|
|
8575
|
-
return;
|
|
8576
|
-
}
|
|
8577
|
-
const eventData = event;
|
|
8578
|
-
this.navigationService.process({
|
|
8579
|
-
originalEvent: eventData
|
|
8580
|
-
});
|
|
8581
|
-
}
|
|
8582
|
-
/**
|
|
8583
|
-
* @hidden
|
|
8584
|
-
*/
|
|
8585
|
-
handleClick() {
|
|
8586
|
-
this.togglePopup(!this.isOpen);
|
|
8587
|
-
}
|
|
8588
9357
|
/**
|
|
8589
9358
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
8590
9359
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -8646,7 +9415,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8646
9415
|
* @hidden
|
|
8647
9416
|
*/
|
|
8648
9417
|
get popupContainerClasses() {
|
|
8649
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
9418
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
8650
9419
|
if (this.popupSettings.popupClass) {
|
|
8651
9420
|
containerClasses.push(this.popupSettings.popupClass);
|
|
8652
9421
|
}
|
|
@@ -8746,6 +9515,18 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8746
9515
|
get buttonClasses() {
|
|
8747
9516
|
return this.loading ? 'k-i-loading' : 'k-i-arrow-s';
|
|
8748
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
|
+
}
|
|
8749
9530
|
verifySettings() {
|
|
8750
9531
|
if (!isDevMode()) {
|
|
8751
9532
|
return;
|
|
@@ -8905,7 +9686,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8905
9686
|
// Roll up DropDownTree on iOS when tapped outside
|
|
8906
9687
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
8907
9688
|
const target = e.target;
|
|
8908
|
-
if (this.isFocused && !inDropDown(this.
|
|
9689
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
8909
9690
|
this._zone.run(() => {
|
|
8910
9691
|
if (this.isOpen) {
|
|
8911
9692
|
this.treeview.blur();
|
|
@@ -8915,34 +9696,117 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8915
9696
|
}
|
|
8916
9697
|
}));
|
|
8917
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
|
+
}
|
|
8918
9717
|
unsubscribeEvents() {
|
|
8919
9718
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
9719
|
+
this.unSubscribeFocusEvents();
|
|
8920
9720
|
if (this.touchstartDisposeHandler) {
|
|
8921
9721
|
this.touchstartDisposeHandler();
|
|
8922
9722
|
}
|
|
8923
9723
|
}
|
|
9724
|
+
handleDocumentBlur(event) {
|
|
9725
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9726
|
+
return;
|
|
9727
|
+
}
|
|
9728
|
+
event.stopImmediatePropagation();
|
|
9729
|
+
this.handleBlur(event);
|
|
9730
|
+
}
|
|
8924
9731
|
assignAriaDescribedBy() {
|
|
8925
9732
|
const currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
8926
9733
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
8927
9734
|
const newValue = `${this.valueLabelId} ${currentValue.trim()}`.trim();
|
|
8928
9735
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
8929
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
|
+
}
|
|
8930
9748
|
};
|
|
8931
9749
|
__decorate([
|
|
8932
|
-
HostBinding('class.k-widget'),
|
|
8933
9750
|
HostBinding('class.k-dropdowntree'),
|
|
8934
|
-
HostBinding('class.k-
|
|
9751
|
+
HostBinding('class.k-picker'),
|
|
8935
9752
|
__metadata("design:type", Boolean)
|
|
8936
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);
|
|
8937
9770
|
__decorate([
|
|
8938
9771
|
HostBinding('attr.dir'),
|
|
8939
9772
|
__metadata("design:type", String)
|
|
8940
9773
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
8941
9774
|
__decorate([
|
|
8942
|
-
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'),
|
|
8943
9795
|
__metadata("design:type", Boolean),
|
|
8944
9796
|
__metadata("design:paramtypes", [])
|
|
8945
|
-
], 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);
|
|
8946
9810
|
__decorate([
|
|
8947
9811
|
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
8948
9812
|
__metadata("design:type", NoDataTemplateDirective)
|
|
@@ -8967,10 +9831,6 @@ __decorate([
|
|
|
8967
9831
|
ViewChild('popupTemplate', { static: true }),
|
|
8968
9832
|
__metadata("design:type", TemplateRef)
|
|
8969
9833
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
8970
|
-
__decorate([
|
|
8971
|
-
ViewChild('wrapper', { static: true }),
|
|
8972
|
-
__metadata("design:type", ElementRef)
|
|
8973
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
8974
9834
|
__decorate([
|
|
8975
9835
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
8976
9836
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -9097,6 +9957,21 @@ __decorate([
|
|
|
9097
9957
|
__metadata("design:type", Number),
|
|
9098
9958
|
__metadata("design:paramtypes", [Number])
|
|
9099
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);
|
|
9100
9975
|
__decorate([
|
|
9101
9976
|
Input(),
|
|
9102
9977
|
__metadata("design:type", Function)
|
|
@@ -9167,30 +10042,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9167
10042
|
>
|
|
9168
10043
|
</ng-container>
|
|
9169
10044
|
<span
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
'k-dropdown-wrap': true,
|
|
9173
|
-
'k-state-disabled': this.disabled
|
|
9174
|
-
}"
|
|
9175
|
-
[attr.id]="focusableId"
|
|
9176
|
-
role="listbox"
|
|
9177
|
-
aria-haspopup="tree"
|
|
9178
|
-
[attr.aria-expanded]="isOpen"
|
|
9179
|
-
[attr.aria-readonly]="readonly"
|
|
9180
|
-
[attr.tabindex]="tabindex"
|
|
9181
|
-
[attr.dir]="direction"
|
|
9182
|
-
(click)="handleClick()"
|
|
9183
|
-
(keydown)="handleKeydown($event)"
|
|
9184
|
-
[kendoEventsOutsideAngular]="{
|
|
9185
|
-
focus: handleFocus,
|
|
9186
|
-
blur: handleBlur
|
|
9187
|
-
}"
|
|
9188
|
-
[scope]="this"
|
|
10045
|
+
[attr.id]="valueLabelId"
|
|
10046
|
+
class="k-input-inner"
|
|
9189
10047
|
>
|
|
9190
|
-
<span
|
|
9191
|
-
[attr.id]="valueLabelId"
|
|
9192
|
-
class="k-input"
|
|
9193
|
-
>
|
|
10048
|
+
<span class="k-input-value-text">
|
|
9194
10049
|
<ng-template *ngIf="valueTemplate"
|
|
9195
10050
|
[templateContext]="{
|
|
9196
10051
|
templateRef: valueTemplate.templateRef,
|
|
@@ -9199,47 +10054,61 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9199
10054
|
</ng-template>
|
|
9200
10055
|
<ng-template [ngIf]="!valueTemplate"> {{ text || placeholder }} </ng-template>
|
|
9201
10056
|
</span>
|
|
9202
|
-
<span
|
|
9203
|
-
*ngIf="!loading && !readonly && clearButton && text?.length && !disabled"
|
|
9204
|
-
class="k-icon k-clear-value k-i-close"
|
|
9205
|
-
[style.visibility]="clearButtonVisiblity"
|
|
9206
|
-
aria-hidden="true"
|
|
9207
|
-
[attr.title]="messageFor('clearTitle')"
|
|
9208
|
-
(click)="clearValue($event)"
|
|
9209
|
-
>
|
|
9210
|
-
</span>
|
|
9211
|
-
<span class="k-select" aria-hidden="true">
|
|
9212
|
-
<span
|
|
9213
|
-
class="k-icon k-i-arrow-60-down"
|
|
9214
|
-
[ngClass]="buttonClasses"
|
|
9215
|
-
></span>
|
|
9216
|
-
</span>
|
|
9217
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>
|
|
9218
10080
|
<ng-template #popupTemplate>
|
|
9219
10081
|
<span
|
|
9220
10082
|
*ngIf="filterable"
|
|
9221
10083
|
class="k-list-filter"
|
|
9222
10084
|
>
|
|
9223
|
-
<
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
[filterInput]="filterable && !touchEnabled"
|
|
9227
|
-
(keydown.arrowdown)="handleKeydown($event)"
|
|
9228
|
-
(keydown.alt.arrowup)="handleKeydown($event)"
|
|
9229
|
-
[(ngModel)]="filter"
|
|
9230
|
-
class="k-textbox"
|
|
9231
|
-
role="textbox"
|
|
9232
|
-
aria-haspopup="true"
|
|
9233
|
-
aria-expanded="false"
|
|
9234
|
-
tabindex="0"
|
|
9235
|
-
aria-disabled="false"
|
|
9236
|
-
aria-readonly="false"
|
|
9237
|
-
[kendoEventsOutsideAngular]="{
|
|
9238
|
-
blur: handleBlur
|
|
9239
|
-
}"
|
|
9240
|
-
[scope]="this"
|
|
10085
|
+
<span
|
|
10086
|
+
class="k-textbox k-input"
|
|
10087
|
+
[ngClass]="filterInputClasses"
|
|
9241
10088
|
>
|
|
9242
|
-
|
|
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>
|
|
9243
10112
|
</span>
|
|
9244
10113
|
<!--header template-->
|
|
9245
10114
|
<ng-template
|
|
@@ -9251,6 +10120,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9251
10120
|
<kendo-treeview
|
|
9252
10121
|
#treeview
|
|
9253
10122
|
*ngIf="data.length !== 0 && !allNodesHidden"
|
|
10123
|
+
[size]="size"
|
|
9254
10124
|
[nodes]="data"
|
|
9255
10125
|
[style.maxHeight.px]="listHeight"
|
|
9256
10126
|
[animate]="false"
|
|
@@ -9281,7 +10151,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9281
10151
|
}">
|
|
9282
10152
|
</ng-template>
|
|
9283
10153
|
<!--no-data template-->
|
|
9284
|
-
<div class="k-
|
|
10154
|
+
<div class="k-no-data" *ngIf="data.length === 0 || allNodesHidden">
|
|
9285
10155
|
<ng-template [ngIf]="noDataTemplate"
|
|
9286
10156
|
[templateContext]="{
|
|
9287
10157
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -9297,10 +10167,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9297
10167
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9298
10168
|
}),
|
|
9299
10169
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
9300
|
-
__metadata("design:paramtypes", [
|
|
10170
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10171
|
+
PopupService,
|
|
9301
10172
|
NavigationService,
|
|
9302
10173
|
Renderer2,
|
|
9303
|
-
ElementRef,
|
|
9304
10174
|
NgZone,
|
|
9305
10175
|
ChangeDetectorRef,
|
|
9306
10176
|
LocalizationService, Boolean])
|
|
@@ -9318,16 +10188,18 @@ const isNodeVisible$1 = () => true;
|
|
|
9318
10188
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
9319
10189
|
*/
|
|
9320
10190
|
let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTreeComponent {
|
|
9321
|
-
constructor(popupService, renderer,
|
|
10191
|
+
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled$$1) {
|
|
10192
|
+
this.wrapper = wrapper;
|
|
9322
10193
|
this.popupService = popupService;
|
|
9323
10194
|
this.renderer = renderer;
|
|
9324
|
-
this.hostElement = hostElement;
|
|
9325
10195
|
this.navigationService = navigationService;
|
|
9326
10196
|
this._zone = _zone;
|
|
9327
10197
|
this.localization = localization;
|
|
9328
10198
|
this.cdr = cdr;
|
|
9329
10199
|
this.touchEnabled = touchEnabled$$1;
|
|
9330
10200
|
this.hostClasses = true;
|
|
10201
|
+
this.role = 'listbox';
|
|
10202
|
+
this.ariaHasPopup = 'tree';
|
|
9331
10203
|
/**
|
|
9332
10204
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
9333
10205
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -9490,12 +10362,63 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9490
10362
|
this._popupSettings = DEFAULT_POPUP_SETTINGS$1;
|
|
9491
10363
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
9492
10364
|
this._isFocused = false;
|
|
10365
|
+
this._size = 'medium';
|
|
10366
|
+
this._rounded = 'medium';
|
|
10367
|
+
this._fillMode = 'solid';
|
|
9493
10368
|
this.subscriptions = [];
|
|
9494
10369
|
this.lastAction = 'check';
|
|
9495
10370
|
this.onTouchedCallback = noop;
|
|
9496
10371
|
this.onChangeCallback = noop;
|
|
9497
10372
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
9498
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
|
+
}
|
|
9499
10422
|
}
|
|
9500
10423
|
set treeview(treeview) {
|
|
9501
10424
|
this._treeview = treeview;
|
|
@@ -9528,6 +10451,67 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9528
10451
|
get tabindex() {
|
|
9529
10452
|
return this.disabled ? -1 : this._tabindex;
|
|
9530
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
|
+
}
|
|
9531
10515
|
/**
|
|
9532
10516
|
* Configures the popup of the MultiSelectTree.
|
|
9533
10517
|
*
|
|
@@ -9617,7 +10601,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9617
10601
|
return `${this.tagPrefix}-${valueFrom({ dataItem }, this.valueField)}`;
|
|
9618
10602
|
}
|
|
9619
10603
|
set isFocused(isFocused) {
|
|
9620
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
10604
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
9621
10605
|
this._isFocused = isFocused;
|
|
9622
10606
|
}
|
|
9623
10607
|
get isFocused() {
|
|
@@ -9651,7 +10635,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9651
10635
|
* @hidden
|
|
9652
10636
|
*/
|
|
9653
10637
|
get popupContainerClasses() {
|
|
9654
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
10638
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
9655
10639
|
if (this.popupSettings.popupClass) {
|
|
9656
10640
|
containerClasses.push(this.popupSettings.popupClass);
|
|
9657
10641
|
}
|
|
@@ -9739,13 +10723,14 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9739
10723
|
return this.checkAllInput && document.activeElement === this.checkAllInput.nativeElement;
|
|
9740
10724
|
}
|
|
9741
10725
|
ngOnInit() {
|
|
9742
|
-
this.renderer.removeAttribute(this.
|
|
10726
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
9743
10727
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
9744
10728
|
this.subscriptions.push(this.localization
|
|
9745
10729
|
.changes.subscribe(({ rtl }) => {
|
|
9746
10730
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9747
10731
|
this.cdr.markForCheck();
|
|
9748
10732
|
}));
|
|
10733
|
+
this.setComponentClasses();
|
|
9749
10734
|
}
|
|
9750
10735
|
/**
|
|
9751
10736
|
* @hidden
|
|
@@ -9849,7 +10834,11 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9849
10834
|
/**
|
|
9850
10835
|
* @hidden
|
|
9851
10836
|
*/
|
|
9852
|
-
handleFocus() {
|
|
10837
|
+
handleFocus(event) {
|
|
10838
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
10839
|
+
return;
|
|
10840
|
+
}
|
|
10841
|
+
event.stopImmediatePropagation();
|
|
9853
10842
|
if (!this.isFocused) {
|
|
9854
10843
|
this.isFocused = true;
|
|
9855
10844
|
if (hasObservers(this.onFocus)) {
|
|
@@ -9859,7 +10848,9 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9859
10848
|
}
|
|
9860
10849
|
// Re-focus the treeview if `close` is prevented
|
|
9861
10850
|
if (this.isOpen && this.treeview) {
|
|
9862
|
-
this.lastNodeOnFocus
|
|
10851
|
+
if (this.lastNodeOnFocus) {
|
|
10852
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
10853
|
+
}
|
|
9863
10854
|
this.treeview.focus();
|
|
9864
10855
|
}
|
|
9865
10856
|
}
|
|
@@ -9869,46 +10860,20 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9869
10860
|
*/
|
|
9870
10861
|
handleBlur(e) {
|
|
9871
10862
|
const relatedTarget = e && e.relatedTarget;
|
|
9872
|
-
if (this.
|
|
10863
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
9873
10864
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
9874
10865
|
return;
|
|
9875
10866
|
}
|
|
9876
10867
|
this.isFocused = false;
|
|
9877
10868
|
this.togglePopup(false);
|
|
9878
10869
|
if (hasObservers(this.onBlur) ||
|
|
9879
|
-
isUntouched(this.
|
|
10870
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
9880
10871
|
this._zone.run(() => {
|
|
9881
10872
|
this.onBlur.emit();
|
|
9882
10873
|
this.onTouchedCallback();
|
|
9883
10874
|
});
|
|
9884
10875
|
}
|
|
9885
10876
|
}
|
|
9886
|
-
/**
|
|
9887
|
-
* @hidden
|
|
9888
|
-
*/
|
|
9889
|
-
handleClick() {
|
|
9890
|
-
this.togglePopup(!this.isOpen);
|
|
9891
|
-
}
|
|
9892
|
-
/**
|
|
9893
|
-
* @hidden
|
|
9894
|
-
*/
|
|
9895
|
-
handleKeydown(event) {
|
|
9896
|
-
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
9897
|
-
if (deleteTag) {
|
|
9898
|
-
this.handleBackspace();
|
|
9899
|
-
return;
|
|
9900
|
-
}
|
|
9901
|
-
if (this.disabled || this.readonly) {
|
|
9902
|
-
return;
|
|
9903
|
-
}
|
|
9904
|
-
const eventData = event;
|
|
9905
|
-
const action = this.navigationService.process({
|
|
9906
|
-
originalEvent: eventData
|
|
9907
|
-
});
|
|
9908
|
-
if (action === NavigationAction.Open) {
|
|
9909
|
-
eventData.preventDefault();
|
|
9910
|
-
}
|
|
9911
|
-
}
|
|
9912
10877
|
/**
|
|
9913
10878
|
* @hidden
|
|
9914
10879
|
*/
|
|
@@ -10043,6 +11008,18 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10043
11008
|
this.filterChange.next(term);
|
|
10044
11009
|
this.allNodesHidden = this.nodes.every((node, index) => !this.isVisible(node, String(index)));
|
|
10045
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
|
+
}
|
|
10046
11023
|
/**
|
|
10047
11024
|
* @hidden
|
|
10048
11025
|
*/
|
|
@@ -10155,6 +11132,31 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10155
11132
|
.pipe(filter(() => !this.isTreeViewActive))
|
|
10156
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)));
|
|
10157
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
|
+
}
|
|
10158
11160
|
handleTabKey() {
|
|
10159
11161
|
this.focus();
|
|
10160
11162
|
if (this.isOpen) {
|
|
@@ -10257,6 +11259,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10257
11259
|
}
|
|
10258
11260
|
unsubscribeEvents() {
|
|
10259
11261
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
11262
|
+
this.unSubscribeFocusEvents();
|
|
10260
11263
|
}
|
|
10261
11264
|
/**
|
|
10262
11265
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -10303,16 +11306,84 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10303
11306
|
return indices;
|
|
10304
11307
|
}, []));
|
|
10305
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
|
+
}
|
|
10306
11320
|
};
|
|
10307
11321
|
__decorate([
|
|
10308
|
-
HostBinding('class.k-widget'),
|
|
10309
11322
|
HostBinding('class.k-dropdowntree'),
|
|
11323
|
+
HostBinding('class.k-input'),
|
|
10310
11324
|
__metadata("design:type", Boolean)
|
|
10311
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);
|
|
10312
11342
|
__decorate([
|
|
10313
11343
|
HostBinding('attr.dir'),
|
|
10314
11344
|
__metadata("design:type", String)
|
|
10315
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);
|
|
10316
11387
|
__decorate([
|
|
10317
11388
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
10318
11389
|
__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -10341,10 +11412,6 @@ __decorate([
|
|
|
10341
11412
|
ViewChild('popupTemplate', { static: true }),
|
|
10342
11413
|
__metadata("design:type", TemplateRef)
|
|
10343
11414
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
10344
|
-
__decorate([
|
|
10345
|
-
ViewChild('wrapper', { static: true }),
|
|
10346
|
-
__metadata("design:type", ElementRef)
|
|
10347
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
10348
11415
|
__decorate([
|
|
10349
11416
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
10350
11417
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -10367,6 +11434,21 @@ __decorate([
|
|
|
10367
11434
|
__metadata("design:type", Number),
|
|
10368
11435
|
__metadata("design:paramtypes", [Number])
|
|
10369
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);
|
|
10370
11452
|
__decorate([
|
|
10371
11453
|
Input(),
|
|
10372
11454
|
__metadata("design:type", Object),
|
|
@@ -10560,87 +11642,75 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10560
11642
|
checkAllText="Check all"
|
|
10561
11643
|
>
|
|
10562
11644
|
</ng-container>
|
|
10563
|
-
<
|
|
10564
|
-
[
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
[
|
|
10572
|
-
[
|
|
10573
|
-
[
|
|
10574
|
-
[
|
|
10575
|
-
[
|
|
10576
|
-
[
|
|
10577
|
-
|
|
10578
|
-
(
|
|
10579
|
-
[kendoEventsOutsideAngular]="{
|
|
10580
|
-
focus: handleFocus,
|
|
10581
|
-
blur: handleBlur
|
|
10582
|
-
}"
|
|
10583
|
-
[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)"
|
|
10584
11661
|
>
|
|
10585
|
-
<kendo-taglist
|
|
10586
|
-
[id]="tagListId"
|
|
10587
|
-
[tags]="tags"
|
|
10588
|
-
[focused]="focusedTagIndex"
|
|
10589
|
-
[textField]="textField"
|
|
10590
|
-
[valueField]="valueField"
|
|
10591
|
-
[valueDepth]="valueDepth"
|
|
10592
|
-
[disabled]="disabled"
|
|
10593
|
-
[tagPrefix]="tagPrefix"
|
|
10594
|
-
[template]="tagTemplate"
|
|
10595
|
-
[groupTemplate]="groupTagTemplate"
|
|
10596
|
-
[disabledIndices]="disabledIndices"
|
|
10597
|
-
(removeTag)="handleRemoveTag($event)"
|
|
10598
|
-
>
|
|
10599
|
-
</kendo-taglist>
|
|
10600
11662
|
<span *ngIf="!tags || !tags.length"
|
|
10601
|
-
class="k-input k-readonly"
|
|
10602
|
-
>
|
|
10603
|
-
{{ placeholder }}
|
|
10604
|
-
</span>
|
|
10605
|
-
<span
|
|
10606
|
-
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
10607
|
-
class="k-icon k-clear-value k-i-close"
|
|
10608
|
-
[attr.title]="messageFor('clearTitle')"
|
|
10609
|
-
role="button"
|
|
10610
|
-
tabindex="-1"
|
|
10611
|
-
(click)="clearAll($event)"
|
|
10612
|
-
>
|
|
10613
|
-
</span>
|
|
10614
|
-
<span
|
|
10615
|
-
*ngIf="loading"
|
|
10616
|
-
class="k-icon k-i-loading"
|
|
11663
|
+
class="k-input-inner k-readonly"
|
|
10617
11664
|
>
|
|
11665
|
+
<span class="k-input-value-text">{{ placeholder }}</span>
|
|
10618
11666
|
</span>
|
|
10619
|
-
</
|
|
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>
|
|
10620
11683
|
<ng-template #popupTemplate>
|
|
10621
11684
|
<span
|
|
10622
11685
|
*ngIf="filterable"
|
|
10623
11686
|
class="k-list-filter"
|
|
10624
11687
|
>
|
|
10625
|
-
<
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
[filterInput]="filterable && !touchEnabled"
|
|
10629
|
-
(keydown)="handleKeydown($event)"
|
|
10630
|
-
[(ngModel)]="filter"
|
|
10631
|
-
class="k-textbox"
|
|
10632
|
-
role="textbox"
|
|
10633
|
-
aria-haspopup="true"
|
|
10634
|
-
aria-expanded="false"
|
|
10635
|
-
tabindex="0"
|
|
10636
|
-
aria-disabled="false"
|
|
10637
|
-
aria-readonly="false"
|
|
10638
|
-
[kendoEventsOutsideAngular]="{
|
|
10639
|
-
blur: handleBlur
|
|
10640
|
-
}"
|
|
10641
|
-
[scope]="this"
|
|
11688
|
+
<span
|
|
11689
|
+
class="k-textbox k-input"
|
|
11690
|
+
[ngClass]="filterInputClasses"
|
|
10642
11691
|
>
|
|
10643
|
-
|
|
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>
|
|
10644
11714
|
</span>
|
|
10645
11715
|
<!--header template-->
|
|
10646
11716
|
<ng-template
|
|
@@ -10655,6 +11725,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10655
11725
|
[checkAll]="!filterable && !touchEnabled"
|
|
10656
11726
|
type="checkbox"
|
|
10657
11727
|
class="k-checkbox"
|
|
11728
|
+
[ngClass]="checkAllCheckboxClasses"
|
|
10658
11729
|
role="checkbox"
|
|
10659
11730
|
tabindex="0"
|
|
10660
11731
|
aria-disabled="false"
|
|
@@ -10680,6 +11751,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10680
11751
|
</div>
|
|
10681
11752
|
<kendo-treeview
|
|
10682
11753
|
#treeview
|
|
11754
|
+
[size]="size"
|
|
10683
11755
|
[nodes]="data"
|
|
10684
11756
|
[style.maxHeight.px]="listHeight"
|
|
10685
11757
|
[animate]="false"
|
|
@@ -10715,7 +11787,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10715
11787
|
}">
|
|
10716
11788
|
</ng-template>
|
|
10717
11789
|
<!--no-data template-->
|
|
10718
|
-
<div class="k-
|
|
11790
|
+
<div class="k-no-data" *ngIf="data?.length === 0 || allNodesHidden">
|
|
10719
11791
|
<ng-template [ngIf]="noDataTemplate"
|
|
10720
11792
|
[templateContext]="{
|
|
10721
11793
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -10730,9 +11802,9 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10730
11802
|
`
|
|
10731
11803
|
}),
|
|
10732
11804
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
10733
|
-
__metadata("design:paramtypes", [
|
|
11805
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11806
|
+
PopupService,
|
|
10734
11807
|
Renderer2,
|
|
10735
|
-
ElementRef,
|
|
10736
11808
|
NavigationService,
|
|
10737
11809
|
NgZone,
|
|
10738
11810
|
LocalizationService,
|
|
@@ -10864,15 +11936,31 @@ DropDownTreesExpandDirective = __decorate([
|
|
|
10864
11936
|
* @hidden
|
|
10865
11937
|
*/
|
|
10866
11938
|
let TagListComponent = class TagListComponent {
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
11939
|
+
constructor(renderer, hostElement) {
|
|
11940
|
+
this.renderer = renderer;
|
|
11941
|
+
this.hostElement = hostElement;
|
|
11942
|
+
this.rounded = 'medium';
|
|
11943
|
+
this.fillMode = 'solid';
|
|
10871
11944
|
/**
|
|
10872
11945
|
* A collection with the disabled tags' indices.
|
|
10873
11946
|
*/
|
|
10874
11947
|
this.disabledIndices = new Set();
|
|
10875
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;
|
|
10876
11964
|
}
|
|
10877
11965
|
tagProp(tag, prop, index) {
|
|
10878
11966
|
const propField = prop && this.getPropField(tag, prop, index);
|
|
@@ -10963,6 +12051,19 @@ __decorate([
|
|
|
10963
12051
|
Input(),
|
|
10964
12052
|
__metadata("design:type", String)
|
|
10965
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);
|
|
10966
12067
|
__decorate([
|
|
10967
12068
|
Input(),
|
|
10968
12069
|
__metadata("design:type", Set)
|
|
@@ -10971,56 +12072,82 @@ __decorate([
|
|
|
10971
12072
|
Output(),
|
|
10972
12073
|
__metadata("design:type", EventEmitter)
|
|
10973
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);
|
|
10974
12086
|
TagListComponent = __decorate([
|
|
10975
12087
|
Component({
|
|
10976
12088
|
selector: 'kendo-taglist',
|
|
10977
12089
|
template: `
|
|
10978
|
-
<
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
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">
|
|
10992
12114
|
<ng-template *ngIf="isGroupTag(tag); then groupTag else singleTag"></ng-template>
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
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>
|
|
11015
12138
|
|
|
11016
|
-
|
|
11017
|
-
|
|
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)">
|
|
11018
12142
|
</span>
|
|
11019
12143
|
</span>
|
|
11020
|
-
</
|
|
11021
|
-
</
|
|
12144
|
+
</span>
|
|
12145
|
+
</div>
|
|
12146
|
+
<ng-content></ng-content>
|
|
11022
12147
|
`
|
|
11023
|
-
})
|
|
12148
|
+
}),
|
|
12149
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
12150
|
+
ElementRef])
|
|
11024
12151
|
], TagListComponent);
|
|
11025
12152
|
|
|
11026
12153
|
/**
|
|
@@ -11344,12 +12471,12 @@ __decorate([
|
|
|
11344
12471
|
__metadata("design:type", Boolean)
|
|
11345
12472
|
], SelectableDirective.prototype, "multipleSelection", void 0);
|
|
11346
12473
|
__decorate([
|
|
11347
|
-
HostBinding('class.k-
|
|
12474
|
+
HostBinding('class.k-focus'),
|
|
11348
12475
|
__metadata("design:type", Boolean),
|
|
11349
12476
|
__metadata("design:paramtypes", [])
|
|
11350
12477
|
], SelectableDirective.prototype, "focusedClassName", null);
|
|
11351
12478
|
__decorate([
|
|
11352
|
-
HostBinding('class.k-
|
|
12479
|
+
HostBinding('class.k-selected'),
|
|
11353
12480
|
__metadata("design:type", Boolean),
|
|
11354
12481
|
__metadata("design:paramtypes", [])
|
|
11355
12482
|
], SelectableDirective.prototype, "selectedClassName", null);
|