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